mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-24 03:10:27 +01:00
189c343368
Menu.cpp is so large(>6000 lines). I'll separate it!
38 lines
908 B
C++
38 lines
908 B
C++
/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */
|
|
|
|
#include "StdH.h"
|
|
#include <Engine/Build.h>
|
|
|
|
#include "MenuStuff.h"
|
|
|
|
ULONG GetSpawnFlagsForGameType(INDEX iGameType)
|
|
{
|
|
if (iGameType == -1) return SPF_SINGLEPLAYER;
|
|
|
|
// get function that will provide us the flags
|
|
CShellSymbol *pss = _pShell->GetSymbol("GetSpawnFlagsForGameTypeSS", /*bDeclaredOnly=*/ TRUE);
|
|
// if none
|
|
if (pss == NULL) {
|
|
// error
|
|
ASSERT(FALSE);
|
|
return 0;
|
|
}
|
|
|
|
ULONG(*pFunc)(INDEX) = (ULONG(*)(INDEX))pss->ss_pvValue;
|
|
return pFunc(iGameType);
|
|
}
|
|
|
|
BOOL IsMenuEnabled(const CTString &strMenuName)
|
|
{
|
|
// get function that will provide us the flags
|
|
CShellSymbol *pss = _pShell->GetSymbol("IsMenuEnabledSS", /*bDeclaredOnly=*/ TRUE);
|
|
// if none
|
|
if (pss == NULL) {
|
|
// error
|
|
ASSERT(FALSE);
|
|
return TRUE;
|
|
}
|
|
|
|
BOOL(*pFunc)(const CTString &) = (BOOL(*)(const CTString &))pss->ss_pvValue;
|
|
return pFunc(strMenuName);
|
|
} |