mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- split names into common and Raze-specific
This commit is contained in:
parent
1446486871
commit
19d8d65fd0
7 changed files with 106 additions and 953 deletions
File diff suppressed because it is too large
Load diff
|
@ -40,7 +40,14 @@
|
|||
#include "basics.h"
|
||||
#include "memarena.h"
|
||||
#include "cmdlib.h"
|
||||
#include "m_alloc.h"
|
||||
|
||||
#if __has_include("m_alloc.h")
|
||||
#include "m_alloc.h"
|
||||
#else
|
||||
#define M_Malloc malloc
|
||||
#define M_Realloc realloc
|
||||
#define M_Free free
|
||||
#endif
|
||||
|
||||
struct FMemArena::Block
|
||||
{
|
||||
|
|
|
@ -75,6 +75,9 @@ static const char *PredefinedNames[] =
|
|||
#define xx(n) #n,
|
||||
#define xy(n, s) s,
|
||||
#include "namedef.h"
|
||||
#if __has_include("namedef_custom.h")
|
||||
#include "namedef_custom.h"
|
||||
#endif
|
||||
#undef xx
|
||||
#undef xy
|
||||
};
|
||||
|
|
|
@ -42,6 +42,9 @@ enum ENamedName
|
|||
#define xx(n) NAME_##n,
|
||||
#define xy(n, s) NAME_##n,
|
||||
#include "namedef.h"
|
||||
#if __has_include("namedef_custom.h")
|
||||
#include "namedef_custom.h"
|
||||
#endif
|
||||
#undef xx
|
||||
#undef xy
|
||||
};
|
||||
|
|
|
@ -61,7 +61,13 @@
|
|||
#include <stdint.h> // for mingw
|
||||
#endif
|
||||
|
||||
#include "m_alloc.h"
|
||||
#if __has_include("m_alloc.h")
|
||||
#include "m_alloc.h"
|
||||
#else
|
||||
#define M_Malloc malloc
|
||||
#define M_Realloc realloc
|
||||
#define M_Free free
|
||||
#endif
|
||||
|
||||
template<typename T> class TIterator
|
||||
{
|
||||
|
@ -1925,3 +1931,8 @@ private:
|
|||
unsigned int Count;
|
||||
};
|
||||
|
||||
#if !__has_include("m_alloc.h")
|
||||
#undef M_Malloc
|
||||
#undef M_Realloc
|
||||
#undef M_Free
|
||||
#endif
|
||||
|
|
|
@ -168,10 +168,6 @@ bool M_SetSpecialMenu(FName& menu, int param)
|
|||
}
|
||||
return false;
|
||||
|
||||
case NAME_CustomSubMenu1:
|
||||
menu = ENamedName(menu.GetIndex() + param);
|
||||
break;
|
||||
|
||||
case NAME_Savegamemenu:
|
||||
if (!gi->CanSave())
|
||||
{
|
||||
|
|
12
source/core/namedef_custom.h
Normal file
12
source/core/namedef_custom.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Raze specific names
|
||||
|
||||
xx(IngameMenu)
|
||||
xx(ListMenuItemBloodDripDrawer)
|
||||
xx(StartgameNoSkill)
|
||||
xx(UsermapMenu)
|
||||
xx(EngineCredits)
|
||||
xx(EngineCredits2)
|
||||
xx(CreditsMenu)
|
||||
xx(MultiMenu)
|
||||
xx(RazeStatusBar)
|
||||
xx(zoomsize)
|
Loading…
Reference in a new issue