mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
Replace arbitrary MAXGAMEEVENTS macro with the properly generated MAXEVENTS.
git-svn-id: https://svn.eduke32.com/eduke32@6503 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
67e3166fb3
commit
bad61e3934
4 changed files with 6 additions and 7 deletions
|
@ -65,7 +65,7 @@ weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS];
|
|||
static intptr_t g_parsingActorPtr;
|
||||
static intptr_t g_parsingEventPtr;
|
||||
static intptr_t g_parsingEventBreakPtr;
|
||||
static intptr_t apScriptGameEventEnd[MAXGAMEEVENTS];
|
||||
static intptr_t apScriptGameEventEnd[MAXEVENTS];
|
||||
static char *textptr;
|
||||
#endif
|
||||
|
||||
|
@ -3588,7 +3588,7 @@ DO_DEFSTATE:
|
|||
g_currentEvent = j;
|
||||
//Bsprintf(g_szBuf,"Adding Event for %d at %lX",j, g_parsingEventPtr);
|
||||
//AddLog(g_szBuf);
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXGAMEEVENTS-1))
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXEVENTS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: invalid event ID.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
|
@ -6326,7 +6326,7 @@ void C_PrintStats(void)
|
|||
|
||||
if (j) initprintf("%d strings, ", j);
|
||||
|
||||
for (i=MAXGAMEEVENTS-1, j=0; i>=0; i--)
|
||||
for (i=MAXEVENTS-1, j=0; i>=0; i--)
|
||||
{
|
||||
if (apScriptEvents[i])
|
||||
j++;
|
||||
|
|
|
@ -31,7 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAXGAMEEVENTS 128
|
||||
#define LABEL_HASPARM2 1
|
||||
#define LABEL_ISSTRING 2
|
||||
|
||||
|
@ -100,7 +99,8 @@ enum QuickStructureAccess_t
|
|||
|
||||
extern int32_t g_structVarIDs;
|
||||
|
||||
extern intptr_t apScriptEvents[MAXGAMEEVENTS];
|
||||
#include "events_defs.h"
|
||||
extern intptr_t apScriptEvents[MAXEVENTS];
|
||||
#endif
|
||||
|
||||
extern char CheatStrings[][MAXCHEATLEN];
|
||||
|
|
|
@ -132,7 +132,7 @@ static void VM_DeleteSprite(int const spriteNum, int const playerNum)
|
|||
A_DeleteSprite(spriteNum);
|
||||
}
|
||||
|
||||
intptr_t apScriptEvents[MAXGAMEEVENTS];
|
||||
intptr_t apScriptEvents[MAXEVENTS];
|
||||
|
||||
// May recurse, e.g. through EVENT_XXX -> ... -> EVENT_KILLIT
|
||||
#ifdef LUNATIC
|
||||
|
|
|
@ -1113,7 +1113,6 @@ static const dataspec_t svgm_script[] =
|
|||
#if !defined LUNATIC
|
||||
{ DS_LOADFN|DS_NOCHK, (void *)&sv_prescriptload_once, 0, 1 },
|
||||
{ DS_DYNAMIC|DS_CNT(g_scriptSize)|DS_NOCHK, &apScript, sizeof(apScript[0]), (intptr_t)&g_scriptSize },
|
||||
// { DS_NOCHK, &apScriptGameEvent[0], sizeof(apScriptGameEvent[0]), MAXGAMEEVENTS },
|
||||
{ DS_SAVEFN|DS_LOADFN|DS_NOCHK, (void *)&sv_postscript_once, 0, 1 },
|
||||
#endif
|
||||
{ DS_SAVEFN, (void *)&sv_preactordatasave, 0, 1 },
|
||||
|
|
Loading…
Reference in a new issue