mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Remove mixed Lunatic/legacy build option.
git-svn-id: https://svn.eduke32.com/eduke32@3410 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d63ddb6e39
commit
2b0b8d34cc
9 changed files with 35 additions and 35 deletions
|
@ -421,7 +421,7 @@ ifneq ($(LUNATIC),0)
|
||||||
else
|
else
|
||||||
BASECOMMONFLAGS+= -I/usr/local/include/luajit-2.0
|
BASECOMMONFLAGS+= -I/usr/local/include/luajit-2.0
|
||||||
endif
|
endif
|
||||||
BASECOMMONFLAGS+= -I$(SRC)/lunatic -DLUNATIC -DLUNATIC_ONLY
|
BASECOMMONFLAGS+= -I$(SRC)/lunatic -DLUNATIC
|
||||||
|
|
||||||
ifeq ($(PLATFORM),WINDOWS)
|
ifeq ($(PLATFORM),WINDOWS)
|
||||||
BASELIBS+= -lluajit
|
BASELIBS+= -lluajit
|
||||||
|
|
|
@ -156,7 +156,7 @@ static inline int32_t G_HaveActor(int32_t actortile)
|
||||||
|
|
||||||
static inline int32_t G_InitialActorStrength(int32_t actortile)
|
static inline int32_t G_InitialActorStrength(int32_t actortile)
|
||||||
{
|
{
|
||||||
#ifdef LUNATIC_ONLY
|
#ifdef LUNATIC
|
||||||
return g_elActors[actortile].strength;
|
return g_elActors[actortile].strength;
|
||||||
#else
|
#else
|
||||||
return g_tile[actortile].execPtr[0];
|
return g_tile[actortile].execPtr[0];
|
||||||
|
|
|
@ -4050,7 +4050,7 @@ int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int3
|
||||||
|
|
||||||
Bmemset(&spriteext[i], 0, sizeof(spriteext_t));
|
Bmemset(&spriteext[i], 0, sizeof(spriteext_t));
|
||||||
Bmemset(&spritesmooth[i], 0, sizeof(spritesmooth_t));
|
Bmemset(&spritesmooth[i], 0, sizeof(spritesmooth_t));
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
A_ResetVars(i);
|
A_ResetVars(i);
|
||||||
#endif
|
#endif
|
||||||
if (G_HaveEvent(EVENT_EGS))
|
if (G_HaveEvent(EVENT_EGS))
|
||||||
|
@ -9485,7 +9485,7 @@ static void G_Cleanup(void)
|
||||||
if (g_sounds[i].filename != NULL) Bfree(g_sounds[i].filename);
|
if (g_sounds[i].filename != NULL) Bfree(g_sounds[i].filename);
|
||||||
if (g_sounds[i].filename1 != NULL) Bfree(g_sounds[i].filename1);
|
if (g_sounds[i].filename1 != NULL) Bfree(g_sounds[i].filename1);
|
||||||
}
|
}
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
if (label != NULL && label != (char *)&sprite[0]) Bfree(label);
|
if (label != NULL && label != (char *)&sprite[0]) Bfree(label);
|
||||||
if (labelcode != NULL && labelcode != (int32_t *)§or[0]) Bfree(labelcode);
|
if (labelcode != NULL && labelcode != (int32_t *)§or[0]) Bfree(labelcode);
|
||||||
if (script != NULL) Bfree(script);
|
if (script != NULL) Bfree(script);
|
||||||
|
@ -9530,7 +9530,7 @@ void G_Shutdown(void)
|
||||||
|
|
||||||
static void G_CompileScripts(void)
|
static void G_CompileScripts(void)
|
||||||
{
|
{
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
int32_t psm = pathsearchmode;
|
int32_t psm = pathsearchmode;
|
||||||
|
|
||||||
label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
|
label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
|
||||||
|
@ -9541,7 +9541,7 @@ static void G_CompileScripts(void)
|
||||||
if (g_scriptNamePtr != NULL)
|
if (g_scriptNamePtr != NULL)
|
||||||
Bcorrectfilename(g_scriptNamePtr,0);
|
Bcorrectfilename(g_scriptNamePtr,0);
|
||||||
|
|
||||||
#if defined LUNATIC_ONLY
|
#if defined LUNATIC
|
||||||
Gv_Init();
|
Gv_Init();
|
||||||
#else
|
#else
|
||||||
// if we compile for a V7 engine wall[] should be used for label names since it's bigger
|
// if we compile for a V7 engine wall[] should be used for label names since it's bigger
|
||||||
|
|
|
@ -98,7 +98,7 @@ int32_t g_totalLines,g_lineNumber;
|
||||||
static int32_t g_checkingIfElse, g_processingState, g_lastKeyword = -1;
|
static int32_t g_checkingIfElse, g_processingState, g_lastKeyword = -1;
|
||||||
char g_szBuf[1024];
|
char g_szBuf[1024];
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
// The pointer to the start of the case table in a switch statement.
|
// The pointer to the start of the case table in a switch statement.
|
||||||
// First entry is 'default' code.
|
// First entry is 'default' code.
|
||||||
static intptr_t *g_caseScriptPtr=NULL;
|
static intptr_t *g_caseScriptPtr=NULL;
|
||||||
|
@ -179,7 +179,7 @@ enum
|
||||||
LABEL_MOVE = 32,
|
LABEL_MOVE = 32,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
static const char *C_GetLabelType(int32_t type)
|
static const char *C_GetLabelType(int32_t type)
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
@ -676,7 +676,7 @@ const char *EventNames[MAXEVENTS] =
|
||||||
"EVENT_CHANGEMENU"
|
"EVENT_CHANGEMENU"
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
const memberlabel_t SectorLabels[]=
|
const memberlabel_t SectorLabels[]=
|
||||||
{
|
{
|
||||||
{ "wallptr", SECTOR_WALLPTR, 0, 0 },
|
{ "wallptr", SECTOR_WALLPTR, 0, 0 },
|
||||||
|
@ -1149,7 +1149,7 @@ hashtable_t h_gamevars = { MAXGAMEVARS>>1, NULL };
|
||||||
hashtable_t h_arrays = { MAXGAMEARRAYS>>1, NULL };
|
hashtable_t h_arrays = { MAXGAMEARRAYS>>1, NULL };
|
||||||
hashtable_t h_labels = { 11264>>1, NULL };
|
hashtable_t h_labels = { 11264>>1, NULL };
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
static hashtable_t h_keywords = { CON_END>>1, NULL };
|
static hashtable_t h_keywords = { CON_END>>1, NULL };
|
||||||
|
|
||||||
static hashtable_t sectorH = { SECTOR_END>>1, NULL };
|
static hashtable_t sectorH = { SECTOR_END>>1, NULL };
|
||||||
|
@ -2053,7 +2053,7 @@ static void C_Include(const char *confile)
|
||||||
|
|
||||||
Bfree(mptr);
|
Bfree(mptr);
|
||||||
}
|
}
|
||||||
#endif // !defined LUNATIC_ONLY
|
#endif // !defined LUNATIC
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static void check_filename_case(const char *fn)
|
static void check_filename_case(const char *fn)
|
||||||
|
@ -2304,7 +2304,7 @@ void C_InitQuotes(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
static int32_t C_ParseCommand(int32_t loop)
|
static int32_t C_ParseCommand(int32_t loop)
|
||||||
{
|
{
|
||||||
int32_t i, j=0, k=0, tw, otw;
|
int32_t i, j=0, k=0, tw, otw;
|
||||||
|
@ -6288,11 +6288,11 @@ void C_Compile(const char *filenam)
|
||||||
C_InitQuotes();
|
C_InitQuotes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // !defined LUNATIC_ONLY
|
#endif // !defined LUNATIC
|
||||||
|
|
||||||
void C_ReportError(int32_t iError)
|
void C_ReportError(int32_t iError)
|
||||||
{
|
{
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
if (Bstrcmp(g_szCurrentBlockName,g_szLastBlockName))
|
if (Bstrcmp(g_szCurrentBlockName,g_szLastBlockName))
|
||||||
{
|
{
|
||||||
if (g_parsingEventPtr || g_processingState || g_parsingActorPtr)
|
if (g_parsingEventPtr || g_processingState || g_parsingActorPtr)
|
||||||
|
|
|
@ -92,7 +92,7 @@ int32_t C_AllocQuote(int32_t qnum);
|
||||||
void C_InitQuotes(void);
|
void C_InitQuotes(void);
|
||||||
|
|
||||||
void C_ReportError(int32_t iError);
|
void C_ReportError(int32_t iError);
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
void C_Compile(const char *filenam);
|
void C_Compile(const char *filenam);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ int32_t g_tw;
|
||||||
|
|
||||||
int32_t g_currentEventExec = -1;
|
int32_t g_currentEventExec = -1;
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
GAMEEXEC_STATIC void VM_Execute(int32_t loop);
|
GAMEEXEC_STATIC void VM_Execute(int32_t loop);
|
||||||
|
|
||||||
# include "gamestructures.c"
|
# include "gamestructures.c"
|
||||||
|
@ -72,7 +72,7 @@ GAMEEXEC_STATIC void VM_Execute(int32_t loop);
|
||||||
|
|
||||||
void VM_ScriptInfo(void)
|
void VM_ScriptInfo(void)
|
||||||
{
|
{
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
intptr_t *p;
|
intptr_t *p;
|
||||||
|
|
||||||
if (!script)
|
if (!script)
|
||||||
|
@ -115,7 +115,7 @@ int32_t VM_OnEvent(int32_t iEventID, int32_t iActor, int32_t iPlayer, int32_t lD
|
||||||
El_CallEvent(&g_ElState, iEventID, iActor, iPlayer, lDist);
|
El_CallEvent(&g_ElState, iEventID, iActor, iPlayer, lDist);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
if (apScriptGameEvent[iEventID])
|
if (apScriptGameEvent[iEventID])
|
||||||
{
|
{
|
||||||
intptr_t *oinsptr=insptr;
|
intptr_t *oinsptr=insptr;
|
||||||
|
@ -780,7 +780,7 @@ void P_AddWeaponMaybeSwitch(DukePlayer_t *ps, int32_t weap)
|
||||||
P_AddWeaponNoSwitch(ps, weap);
|
P_AddWeaponNoSwitch(ps, weap);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
static void P_AddWeaponAmmoCommon(DukePlayer_t *ps, int32_t weap, int32_t amount)
|
static void P_AddWeaponAmmoCommon(DukePlayer_t *ps, int32_t weap, int32_t amount)
|
||||||
{
|
{
|
||||||
P_AddAmmo(weap, ps, amount);
|
P_AddAmmo(weap, ps, amount);
|
||||||
|
@ -965,7 +965,7 @@ static void VM_ResetPlayer(void)
|
||||||
//AddLog("EOF: resetplayer");
|
//AddLog("EOF: resetplayer");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
GAMEEXEC_STATIC void VM_Execute(int32_t loop)
|
GAMEEXEC_STATIC void VM_Execute(int32_t loop)
|
||||||
{
|
{
|
||||||
register int32_t tw = *insptr;
|
register int32_t tw = *insptr;
|
||||||
|
@ -2013,7 +2013,7 @@ nullquote:
|
||||||
actor[i].flags = 0;
|
actor[i].flags = 0;
|
||||||
sprite[i].hitag = 0;
|
sprite[i].hitag = 0;
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
// TODO: Lunatic
|
// TODO: Lunatic
|
||||||
if (g_tile[sprite[i].picnum].execPtr)
|
if (g_tile[sprite[i].picnum].execPtr)
|
||||||
{
|
{
|
||||||
|
@ -5133,7 +5133,7 @@ nullquote:
|
||||||
// NORECURSE
|
// NORECURSE
|
||||||
void A_LoadActor(int32_t iActor)
|
void A_LoadActor(int32_t iActor)
|
||||||
{
|
{
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
vm.g_i = iActor; // Sprite ID
|
vm.g_i = iActor; // Sprite ID
|
||||||
vm.g_p = -1; // iPlayer; // Player ID
|
vm.g_p = -1; // iPlayer; // Player ID
|
||||||
vm.g_x = -1; // lDist; // ?
|
vm.g_x = -1; // lDist; // ?
|
||||||
|
@ -5237,7 +5237,7 @@ void A_Execute(int32_t iActor,int32_t iPlayer,int32_t lDist)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
insptr = 4 + (g_tile[vm.g_sp->picnum].execPtr);
|
insptr = 4 + (g_tile[vm.g_sp->picnum].execPtr);
|
||||||
VM_Execute(1);
|
VM_Execute(1);
|
||||||
insptr = NULL;
|
insptr = NULL;
|
||||||
|
@ -5486,7 +5486,7 @@ void G_RestoreMapState(mapstate_t *save)
|
||||||
Bmemcpy(&lockclock,&save->lockclock,sizeof(lockclock));
|
Bmemcpy(&lockclock,&save->lockclock,sizeof(lockclock));
|
||||||
Bmemcpy(&randomseed,&save->randomseed,sizeof(randomseed));
|
Bmemcpy(&randomseed,&save->randomseed,sizeof(randomseed));
|
||||||
Bmemcpy(&g_globalRandom,&save->g_globalRandom,sizeof(g_globalRandom));
|
Bmemcpy(&g_globalRandom,&save->g_globalRandom,sizeof(g_globalRandom));
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
for (i=g_gameVarCount-1; i>=0; i--)
|
for (i=g_gameVarCount-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (aGameVars[i].dwFlags & GAMEVAR_NORESET) continue;
|
if (aGameVars[i].dwFlags & GAMEVAR_NORESET) continue;
|
||||||
|
|
|
@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
|
|
||||||
#define _gamevars_c_
|
#define _gamevars_c_
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
# include "gamestructures.c"
|
# include "gamestructures.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ extern int32_t OSD_errors;
|
||||||
void Gv_RefreshPointers(void);
|
void Gv_RefreshPointers(void);
|
||||||
extern void G_FreeMapState(int32_t mapnum);
|
extern void G_FreeMapState(int32_t mapnum);
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
static void Gv_Free(void) /* called from Gv_ReadSave() and Gv_ResetVars() */
|
static void Gv_Free(void) /* called from Gv_ReadSave() and Gv_ResetVars() */
|
||||||
{
|
{
|
||||||
// call this function as many times as needed.
|
// call this function as many times as needed.
|
||||||
|
@ -112,7 +112,7 @@ static void Gv_Clear(void)
|
||||||
|
|
||||||
int32_t Gv_ReadSave(int32_t fil, int32_t newbehav)
|
int32_t Gv_ReadSave(int32_t fil, int32_t newbehav)
|
||||||
{
|
{
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
int32_t i, j;
|
int32_t i, j;
|
||||||
char savedstate[MAXVOLUMES*MAXLEVELS];
|
char savedstate[MAXVOLUMES*MAXLEVELS];
|
||||||
char tbuf[12];
|
char tbuf[12];
|
||||||
|
@ -253,7 +253,7 @@ corrupt:
|
||||||
|
|
||||||
void Gv_WriteSave(FILE *fil, int32_t newbehav)
|
void Gv_WriteSave(FILE *fil, int32_t newbehav)
|
||||||
{
|
{
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
int32_t i, j;
|
int32_t i, j;
|
||||||
char savedstate[MAXVOLUMES*MAXLEVELS];
|
char savedstate[MAXVOLUMES*MAXLEVELS];
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ void Gv_WriteSave(FILE *fil, int32_t newbehav)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
void Gv_DumpValues(void)
|
void Gv_DumpValues(void)
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
@ -1070,7 +1070,7 @@ void Gv_ResetSystemDefaults(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
g_iReturnVarID=Gv_GetVarIndex("RETURN");
|
g_iReturnVarID=Gv_GetVarIndex("RETURN");
|
||||||
g_iWeaponVarID=Gv_GetVarIndex("WEAPON");
|
g_iWeaponVarID=Gv_GetVarIndex("WEAPON");
|
||||||
g_iWorksLikeVarID=Gv_GetVarIndex("WORKSLIKE");
|
g_iWorksLikeVarID=Gv_GetVarIndex("WORKSLIKE");
|
||||||
|
@ -1417,7 +1417,7 @@ void Gv_Init(void)
|
||||||
|
|
||||||
// initprintf("Initializing game variables\n");
|
// initprintf("Initializing game variables\n");
|
||||||
//AddLog("Gv_Init");
|
//AddLog("Gv_Init");
|
||||||
#ifdef LUNATIC_ONLY
|
#ifdef LUNATIC
|
||||||
Gv_AddSystemVars(); // set up weapon defaults, g_playerWeapon[][]
|
Gv_AddSystemVars(); // set up weapon defaults, g_playerWeapon[][]
|
||||||
Gv_ResetSystemDefaults();
|
Gv_ResetSystemDefaults();
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -94,7 +94,7 @@ extern gamearray_t aGameArrays[MAXGAMEARRAYS];
|
||||||
extern int32_t g_gameVarCount;
|
extern int32_t g_gameVarCount;
|
||||||
extern int32_t g_gameArrayCount;
|
extern int32_t g_gameArrayCount;
|
||||||
|
|
||||||
#if defined LUNATIC_ONLY
|
#if defined LUNATIC
|
||||||
# define Gv_GetVar(id, iActor, iPlayer) 0 // (OSD_Printf("Gv_GetVar @ %s:%d\n", __FILE__, __LINE__), 0)
|
# define Gv_GetVar(id, iActor, iPlayer) 0 // (OSD_Printf("Gv_GetVar @ %s:%d\n", __FILE__, __LINE__), 0)
|
||||||
# define Gv_SetVar(id, lValue, iActor, iPlayer) do{}while(0) //OSD_Printf("Gv_SetVar @ %s:%d\n", __FILE__, __LINE__)
|
# define Gv_SetVar(id, lValue, iActor, iPlayer) do{}while(0) //OSD_Printf("Gv_SetVar @ %s:%d\n", __FILE__, __LINE__)
|
||||||
#else
|
#else
|
||||||
|
@ -104,7 +104,7 @@ void __fastcall Gv_SetVar(register int32_t id,register int32_t lValue,register i
|
||||||
int32_t __fastcall Gv_GetVarX(register int32_t id);
|
int32_t __fastcall Gv_GetVarX(register int32_t id);
|
||||||
void __fastcall Gv_SetVarX(register int32_t id,register int32_t lValue);
|
void __fastcall Gv_SetVarX(register int32_t id,register int32_t lValue);
|
||||||
|
|
||||||
#ifdef LUNATIC_ONLY
|
#ifdef LUNATIC
|
||||||
# define Gv_GetVarByLabel(szGameLabel, lDefault, iActor, iPlayer) (lDefault)
|
# define Gv_GetVarByLabel(szGameLabel, lDefault, iActor, iPlayer) (lDefault)
|
||||||
#else
|
#else
|
||||||
int32_t Gv_GetVarByLabel(const char *szGameLabel,int32_t lDefault,int32_t iActor,int32_t iPlayer);
|
int32_t Gv_GetVarByLabel(const char *szGameLabel,int32_t lDefault,int32_t iActor,int32_t iPlayer);
|
||||||
|
|
|
@ -1105,7 +1105,7 @@ static inline void prelevel(char g)
|
||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
nexti = nextspritestat[i];
|
nexti = nextspritestat[i];
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
A_ResetVars(i);
|
A_ResetVars(i);
|
||||||
#endif
|
#endif
|
||||||
A_LoadActor(i);
|
A_LoadActor(i);
|
||||||
|
@ -1443,7 +1443,7 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
||||||
p->zoom = 768;
|
p->zoom = 768;
|
||||||
p->gm = 0;
|
p->gm = 0;
|
||||||
|
|
||||||
#if !defined LUNATIC_ONLY
|
#if !defined LUNATIC
|
||||||
//AddLog("Newgame");
|
//AddLog("Newgame");
|
||||||
Gv_ResetVars();
|
Gv_ResetVars();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue