mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 00:40:56 +00:00
Remove the register keyword, since it is deprecated in C++11 and removed in C++17.
git-svn-id: https://svn.eduke32.com/eduke32@6143 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
576ff98f4d
commit
8d8fd61ed0
8 changed files with 60 additions and 60 deletions
|
@ -40,7 +40,7 @@ extern char *apStrings[MAXQUOTES+1], *apXStrings[MAXQUOTES+1];
|
||||||
extern int32_t g_numQuoteRedefinitions;
|
extern int32_t g_numQuoteRedefinitions;
|
||||||
|
|
||||||
extern int32_t VM_Execute(int32_t once);
|
extern int32_t VM_Execute(int32_t once);
|
||||||
extern void VM_OnEvent(register int32_t iEventID, register int32_t iActor);
|
extern void VM_OnEvent(int32_t iEventID, int32_t iActor);
|
||||||
|
|
||||||
extern void VM_ScriptInfo(void);
|
extern void VM_ScriptInfo(void);
|
||||||
extern void VM_Disasm(ofstype beg, int32_t size);
|
extern void VM_Disasm(ofstype beg, int32_t size);
|
||||||
|
@ -49,9 +49,9 @@ extern int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags
|
||||||
extern int32_t Gv_NewArray(const char *pszLabel, void *arrayptr, int32_t asize, uint32_t dwFlags);
|
extern int32_t Gv_NewArray(const char *pszLabel, void *arrayptr, int32_t asize, uint32_t dwFlags);
|
||||||
extern void Gv_Init(void);
|
extern void Gv_Init(void);
|
||||||
|
|
||||||
extern int32_t __fastcall Gv_GetVarX(register int32_t id);
|
extern int32_t __fastcall Gv_GetVarX(int32_t id);
|
||||||
extern void __fastcall Gv_SetVarX(register int32_t id, register int32_t lValue);
|
extern void __fastcall Gv_SetVarX(int32_t id, int32_t lValue);
|
||||||
extern int32_t __fastcall Gv_GetVarN(register int32_t id); // 'N' for "no side-effects"... vars and locals only!
|
extern int32_t __fastcall Gv_GetVarN(int32_t id); // 'N' for "no side-effects"... vars and locals only!
|
||||||
|
|
||||||
extern void SetGamePalette(int32_t);
|
extern void SetGamePalette(int32_t);
|
||||||
|
|
||||||
|
|
|
@ -454,8 +454,8 @@ extern void __wrap_c_default_exceptionhandler(frame_context *pCtx);
|
||||||
|
|
||||||
static void _cpu_print_stack(void *pc,void *lr,void *r1)
|
static void _cpu_print_stack(void *pc,void *lr,void *r1)
|
||||||
{
|
{
|
||||||
register u32 i = 0;
|
u32 i = 0;
|
||||||
register frame_rec_t l,p = (frame_rec_t)lr;
|
frame_rec_t l,p = (frame_rec_t)lr;
|
||||||
|
|
||||||
l = p;
|
l = p;
|
||||||
p = (frame_rec_t)r1;
|
p = (frame_rec_t)r1;
|
||||||
|
|
|
@ -2135,7 +2135,7 @@ static inline uint32_t C_Pow2IntLogBase2(int32_t const v)
|
||||||
0xFF00FF00, 0xFFFF0000
|
0xFF00FF00, 0xFFFF0000
|
||||||
};
|
};
|
||||||
|
|
||||||
register uint32_t r = (v & b[0]) != 0;
|
uint32_t r = (v & b[0]) != 0;
|
||||||
|
|
||||||
for (bssize_t i = 4; i > 0; i--)
|
for (bssize_t i = 4; i > 0; i--)
|
||||||
r |= ((v & b[i]) != 0) << i;
|
r |= ((v & b[i]) != 0) << i;
|
||||||
|
|
|
@ -24,28 +24,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
// I got a 3-4 fps gain by inlining these...
|
// I got a 3-4 fps gain by inlining these...
|
||||||
|
|
||||||
#ifndef gamevars_c_
|
#ifndef gamevars_c_
|
||||||
int32_t __fastcall VM_GetUserdef(register int32_t labelNum);
|
int32_t __fastcall VM_GetUserdef(int32_t labelNum);
|
||||||
void __fastcall VM_SetUserdef(register int32_t const labelNum, register int32_t const iSet);
|
void __fastcall VM_SetUserdef(int32_t const labelNum, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetActiveProjectile(register int32_t const spriteNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetActiveProjectile(int32_t const spriteNum, int32_t labelNum);
|
||||||
void __fastcall VM_SetActiveProjectile(register int32_t const spriteNum, register int32_t const labelNum, register int32_t const iSet);
|
void __fastcall VM_SetActiveProjectile(int32_t const spriteNum, int32_t const labelNum, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetPlayer(register int32_t const playerNum, register int32_t labelNum, register int32_t const lParm2);
|
int32_t __fastcall VM_GetPlayer(int32_t const playerNum, int32_t labelNum, int32_t const lParm2);
|
||||||
void __fastcall VM_SetPlayer(register int32_t const playerNum, register int32_t const labelNum, register int32_t const lParm2, register int32_t const iSet);
|
void __fastcall VM_SetPlayer(int32_t const playerNum, int32_t const labelNum, int32_t const lParm2, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetPlayerInput(register int32_t const playerNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetPlayerInput(int32_t const playerNum, int32_t labelNum);
|
||||||
void __fastcall VM_SetPlayerInput(register int32_t const playerNum, register int32_t const labelNum, register int32_t const iSet);
|
void __fastcall VM_SetPlayerInput(int32_t const playerNum, int32_t const labelNum, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetWall(register int32_t const wallNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetWall(int32_t const wallNum, int32_t labelNum);
|
||||||
void __fastcall VM_SetWall(register int32_t const wallNum, register int32_t const labelNum, register int32_t const iSet);
|
void __fastcall VM_SetWall(int32_t const wallNum, int32_t const labelNum, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetSector(register int32_t const sectNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetSector(int32_t const sectNum, int32_t labelNum);
|
||||||
void __fastcall VM_SetSector(register int32_t const sectNum, register int32_t const labelNum, register int32_t iSet);
|
void __fastcall VM_SetSector(int32_t const sectNum, int32_t const labelNum, int32_t iSet);
|
||||||
int32_t __fastcall VM_GetSprite(register int32_t const spriteNum, register int32_t labelNum, register int32_t const lParm2);
|
int32_t __fastcall VM_GetSprite(int32_t const spriteNum, int32_t labelNum, int32_t const lParm2);
|
||||||
void __fastcall VM_SetSprite(register int32_t const spriteNum, register int32_t const labelNum, register int32_t const lParm2, register int32_t const iSet);
|
void __fastcall VM_SetSprite(int32_t const spriteNum, int32_t const labelNum, int32_t const lParm2, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetTsprite(register int32_t const spriteNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetTsprite(int32_t const spriteNum, int32_t labelNum);
|
||||||
void __fastcall VM_SetTsprite(register int32_t const spriteNum, register int32_t const labelNum, register int32_t const iSet);
|
void __fastcall VM_SetTsprite(int32_t const spriteNum, int32_t const labelNum, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetProjectile(register int32_t const tileNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetProjectile(int32_t const tileNum, int32_t labelNum);
|
||||||
void __fastcall VM_SetProjectile(register int32_t const tileNum, register int32_t const labelNum, register int32_t const iSet);
|
void __fastcall VM_SetProjectile(int32_t const tileNum, int32_t const labelNum, int32_t const iSet);
|
||||||
int32_t __fastcall VM_GetTileData(register int32_t const tileNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetTileData(int32_t const tileNum, int32_t labelNum);
|
||||||
int32_t __fastcall VM_GetPalData(register int32_t const palNum, register int32_t labelNum);
|
int32_t __fastcall VM_GetPalData(int32_t const palNum, int32_t labelNum);
|
||||||
#else
|
#else
|
||||||
int32_t __fastcall VM_GetUserdef(register int32_t labelNum)
|
int32_t __fastcall VM_GetUserdef(int32_t labelNum)
|
||||||
{
|
{
|
||||||
switch (labelNum)
|
switch (labelNum)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ int32_t __fastcall VM_GetUserdef(register int32_t labelNum)
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetUserdef(register int32_t const labelNum, register int32_t const iSet)
|
void __fastcall VM_SetUserdef(int32_t const labelNum, int32_t const iSet)
|
||||||
{
|
{
|
||||||
switch (labelNum)
|
switch (labelNum)
|
||||||
{
|
{
|
||||||
|
@ -292,7 +292,7 @@ void __fastcall VM_SetUserdef(register int32_t const labelNum, register int32_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetActiveProjectile(register int32_t const spriteNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetActiveProjectile(int32_t const spriteNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
||||||
{
|
{
|
||||||
|
@ -341,7 +341,7 @@ int32_t __fastcall VM_GetActiveProjectile(register int32_t const spriteNum, regi
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetActiveProjectile(register int32_t const spriteNum, register int32_t const labelNum, register int32_t const iSet)
|
void __fastcall VM_SetActiveProjectile(int32_t const spriteNum, int32_t const labelNum, int32_t const iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ void __fastcall VM_SetActiveProjectile(register int32_t const spriteNum, registe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetPlayer(register int32_t const playerNum, register int32_t labelNum, register int32_t const lParm2)
|
int32_t __fastcall VM_GetPlayer(int32_t const playerNum, int32_t labelNum, int32_t const lParm2)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
||||||
{
|
{
|
||||||
|
@ -572,7 +572,7 @@ int32_t __fastcall VM_GetPlayer(register int32_t const playerNum, register int32
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetPlayer(register int32_t const playerNum, register int32_t const labelNum, register int32_t const lParm2, register int32_t const iSet)
|
void __fastcall VM_SetPlayer(int32_t const playerNum, int32_t const labelNum, int32_t const lParm2, int32_t const iSet)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
||||||
|
@ -767,7 +767,7 @@ void __fastcall VM_SetPlayer(register int32_t const playerNum, register int32_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetPlayerInput(register int32_t const playerNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetPlayerInput(int32_t const playerNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
||||||
{
|
{
|
||||||
|
@ -791,7 +791,7 @@ int32_t __fastcall VM_GetPlayerInput(register int32_t const playerNum, register
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetPlayerInput(register int32_t const playerNum, register int32_t const labelNum, register int32_t const iSet)
|
void __fastcall VM_SetPlayerInput(int32_t const playerNum, int32_t const labelNum, int32_t const iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
||||||
{
|
{
|
||||||
|
@ -815,7 +815,7 @@ void __fastcall VM_SetPlayerInput(register int32_t const playerNum, register int
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int32_t __fastcall VM_GetWall(register int32_t const wallNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetWall(int32_t const wallNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)wallNum >= (unsigned)numwalls))
|
if (EDUKE32_PREDICT_FALSE((unsigned)wallNum >= (unsigned)numwalls))
|
||||||
{
|
{
|
||||||
|
@ -852,7 +852,7 @@ int32_t __fastcall VM_GetWall(register int32_t const wallNum, register int32_t l
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetWall(register int32_t const wallNum, register int32_t const labelNum, register int32_t const iSet)
|
void __fastcall VM_SetWall(int32_t const wallNum, int32_t const labelNum, int32_t const iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)wallNum >= (unsigned)numwalls))
|
if (EDUKE32_PREDICT_FALSE((unsigned)wallNum >= (unsigned)numwalls))
|
||||||
{
|
{
|
||||||
|
@ -888,7 +888,7 @@ void __fastcall VM_SetWall(register int32_t const wallNum, register int32_t cons
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetSector(register int32_t const sectNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetSector(int32_t const sectNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)sectNum >= (unsigned)numsectors))
|
if (EDUKE32_PREDICT_FALSE((unsigned)sectNum >= (unsigned)numsectors))
|
||||||
{
|
{
|
||||||
|
@ -946,7 +946,7 @@ int32_t __fastcall VM_GetSector(register int32_t const sectNum, register int32_t
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetSector(register int32_t const sectNum, register int32_t const labelNum, register int32_t iSet)
|
void __fastcall VM_SetSector(int32_t const sectNum, int32_t const labelNum, int32_t iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)sectNum >= (unsigned)numsectors))
|
if (EDUKE32_PREDICT_FALSE((unsigned)sectNum >= (unsigned)numsectors))
|
||||||
{
|
{
|
||||||
|
@ -1002,7 +1002,7 @@ void __fastcall VM_SetSector(register int32_t const sectNum, register int32_t co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetSprite(register int32_t const spriteNum, register int32_t const labelNum, register int32_t const lParm2, register int32_t const iSet)
|
void __fastcall VM_SetSprite(int32_t const spriteNum, int32_t const labelNum, int32_t const lParm2, int32_t const iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
||||||
{
|
{
|
||||||
|
@ -1079,7 +1079,7 @@ void __fastcall VM_SetSprite(register int32_t const spriteNum, register int32_t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t __fastcall VM_GetSprite(register int32_t const spriteNum, register int32_t labelNum, register int32_t const lParm2)
|
int32_t __fastcall VM_GetSprite(int32_t const spriteNum, int32_t labelNum, int32_t const lParm2)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
||||||
{
|
{
|
||||||
|
@ -1159,7 +1159,7 @@ int32_t __fastcall VM_GetSprite(register int32_t const spriteNum, register int32
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetTsprite(register int32_t const spriteNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetTsprite(int32_t const spriteNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
||||||
{
|
{
|
||||||
|
@ -1208,7 +1208,7 @@ int32_t __fastcall VM_GetTsprite(register int32_t const spriteNum, register int3
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetTsprite(register int32_t const spriteNum, register int32_t const labelNum, register int32_t const iSet)
|
void __fastcall VM_SetTsprite(int32_t const spriteNum, int32_t const labelNum, int32_t const iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)spriteNum >= MAXSPRITES))
|
||||||
{
|
{
|
||||||
|
@ -1254,7 +1254,7 @@ void __fastcall VM_SetTsprite(register int32_t const spriteNum, register int32_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetProjectile(register int32_t const tileNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetProjectile(int32_t const tileNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)tileNum >= MAXTILES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)tileNum >= MAXTILES))
|
||||||
{
|
{
|
||||||
|
@ -1308,7 +1308,7 @@ int32_t __fastcall VM_GetProjectile(register int32_t const tileNum, register int
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall VM_SetProjectile(register int32_t const tileNum, register int32_t const labelNum, register int32_t const iSet)
|
void __fastcall VM_SetProjectile(int32_t const tileNum, int32_t const labelNum, int32_t const iSet)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)tileNum >= MAXTILES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)tileNum >= MAXTILES))
|
||||||
{
|
{
|
||||||
|
@ -1359,7 +1359,7 @@ void __fastcall VM_SetProjectile(register int32_t const tileNum, register int32_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetTileData(register int32_t const tileNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetTileData(int32_t const tileNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)tileNum >= MAXTILES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)tileNum >= MAXTILES))
|
||||||
{
|
{
|
||||||
|
@ -1386,7 +1386,7 @@ int32_t __fastcall VM_GetTileData(register int32_t const tileNum, register int32
|
||||||
return labelNum;
|
return labelNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall VM_GetPalData(register int32_t const palNum, register int32_t labelNum)
|
int32_t __fastcall VM_GetPalData(int32_t const palNum, int32_t labelNum)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)palNum >= MAXPALOOKUPS))
|
if (EDUKE32_PREDICT_FALSE((unsigned)palNum >= MAXPALOOKUPS))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1529,7 +1529,7 @@ static inline uint32_t C_Pow2IntLogBase2(int32_t v)
|
||||||
static const uint32_t b[] = {0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0,
|
static const uint32_t b[] = {0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0,
|
||||||
0xFF00FF00, 0xFFFF0000
|
0xFF00FF00, 0xFFFF0000
|
||||||
};
|
};
|
||||||
register uint32_t r = (v & b[0]) != 0;
|
uint32_t r = (v & b[0]) != 0;
|
||||||
int32_t i = 4;
|
int32_t i = 4;
|
||||||
|
|
||||||
for (; i > 0; i--)
|
for (; i > 0; i--)
|
||||||
|
|
|
@ -122,7 +122,7 @@ void M32_PostScriptExec(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VM_OnEvent(register int32_t iEventID, register int32_t spriteNum)
|
void VM_OnEvent(int32_t iEventID, int32_t spriteNum)
|
||||||
{
|
{
|
||||||
if (iEventID < 0 || iEventID >= MAXEVENTS)
|
if (iEventID < 0 || iEventID >= MAXEVENTS)
|
||||||
{
|
{
|
||||||
|
@ -201,7 +201,7 @@ static int32_t G_GetAngleDelta(int32_t a,int32_t na)
|
||||||
return na-a;
|
return na-a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __fastcall VM_DoConditional(register int32_t condition)
|
static inline void __fastcall VM_DoConditional(int32_t condition)
|
||||||
{
|
{
|
||||||
if (condition)
|
if (condition)
|
||||||
{
|
{
|
||||||
|
@ -308,7 +308,7 @@ static int CheckArray(int aidx)
|
||||||
|
|
||||||
int32_t VM_Execute(int32_t once)
|
int32_t VM_Execute(int32_t once)
|
||||||
{
|
{
|
||||||
register int32_t tw = *insptr;
|
int32_t tw = *insptr;
|
||||||
|
|
||||||
// jump directly into the loop, saving us from the checks during the first iteration
|
// jump directly into the loop, saving us from the checks during the first iteration
|
||||||
goto skip_check;
|
goto skip_check;
|
||||||
|
|
|
@ -279,7 +279,7 @@ readonly:
|
||||||
static int32_t __fastcall VM_AccessSprite(int32_t how, int32_t lVar1, int32_t labelNum, int32_t lVar2)
|
static int32_t __fastcall VM_AccessSprite(int32_t how, int32_t lVar1, int32_t labelNum, int32_t lVar2)
|
||||||
{
|
{
|
||||||
int32_t lValue;
|
int32_t lValue;
|
||||||
register int32_t i = (how&ACCESS_USEVARS) ? vm.spriteNum : lVar1;
|
int32_t i = (how&ACCESS_USEVARS) ? vm.spriteNum : lVar1;
|
||||||
|
|
||||||
if ((how&ACCESS_USEVARS) && lVar1 != M32_THISACTOR_VAR_ID)
|
if ((how&ACCESS_USEVARS) && lVar1 != M32_THISACTOR_VAR_ID)
|
||||||
i = Gv_GetVarX(lVar1);
|
i = Gv_GetVarX(lVar1);
|
||||||
|
|
|
@ -214,7 +214,7 @@ int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall Gv_GetVarN(register int32_t id) // 'N' for "no side-effects"... vars and locals only!
|
int32_t __fastcall Gv_GetVarN(int32_t id) // 'N' for "no side-effects"... vars and locals only!
|
||||||
{
|
{
|
||||||
if (id == M32_THISACTOR_VAR_ID)
|
if (id == M32_THISACTOR_VAR_ID)
|
||||||
return vm.spriteNum;
|
return vm.spriteNum;
|
||||||
|
@ -255,9 +255,9 @@ int32_t __fastcall Gv_GetVarN(register int32_t id) // 'N' for "no side-effects"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t __fastcall Gv_GetVarX(register int32_t id)
|
int32_t __fastcall Gv_GetVarX(int32_t id)
|
||||||
{
|
{
|
||||||
register int32_t negateResult = !!(id&M32_FLAG_NEGATE);
|
int32_t negateResult = !!(id&M32_FLAG_NEGATE);
|
||||||
|
|
||||||
if (id == M32_THISACTOR_VAR_ID)
|
if (id == M32_THISACTOR_VAR_ID)
|
||||||
return vm.spriteNum;
|
return vm.spriteNum;
|
||||||
|
@ -285,7 +285,7 @@ int32_t __fastcall Gv_GetVarX(register int32_t id)
|
||||||
{
|
{
|
||||||
case M32_FLAG_ARRAY:
|
case M32_FLAG_ARRAY:
|
||||||
{
|
{
|
||||||
register int32_t index;
|
int32_t index;
|
||||||
|
|
||||||
index = (int32_t)((id>>16)&0xffff);
|
index = (int32_t)((id>>16)&0xffff);
|
||||||
if (!(id&M32_FLAG_CONSTANTINDEX))
|
if (!(id&M32_FLAG_CONSTANTINDEX))
|
||||||
|
@ -321,7 +321,7 @@ int32_t __fastcall Gv_GetVarX(register int32_t id)
|
||||||
}
|
}
|
||||||
case M32_FLAG_STRUCT:
|
case M32_FLAG_STRUCT:
|
||||||
{
|
{
|
||||||
register int32_t index, memberid;
|
int32_t index, memberid;
|
||||||
|
|
||||||
index = (id>>16)&0x7fff;
|
index = (id>>16)&0x7fff;
|
||||||
if (!(id&M32_FLAG_CONSTANTINDEX))
|
if (!(id&M32_FLAG_CONSTANTINDEX))
|
||||||
|
@ -381,13 +381,13 @@ 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(int32_t id, int32_t lValue)
|
||||||
{
|
{
|
||||||
switch (id&M32_VARTYPE_MASK)
|
switch (id&M32_VARTYPE_MASK)
|
||||||
{
|
{
|
||||||
case M32_FLAG_ARRAY:
|
case M32_FLAG_ARRAY:
|
||||||
{
|
{
|
||||||
register int32_t index;
|
int32_t index;
|
||||||
|
|
||||||
index = (id>>16)&0xffff;
|
index = (id>>16)&0xffff;
|
||||||
if (!(id&M32_FLAG_CONSTANTINDEX))
|
if (!(id&M32_FLAG_CONSTANTINDEX))
|
||||||
|
@ -427,7 +427,7 @@ void __fastcall Gv_SetVarX(register int32_t id, register int32_t lValue)
|
||||||
}
|
}
|
||||||
case M32_FLAG_STRUCT:
|
case M32_FLAG_STRUCT:
|
||||||
{
|
{
|
||||||
register int32_t index, memberid;
|
int32_t index, memberid;
|
||||||
|
|
||||||
index = (id>>16)&0x7fff;
|
index = (id>>16)&0x7fff;
|
||||||
if (!(id&M32_FLAG_CONSTANTINDEX))
|
if (!(id&M32_FLAG_CONSTANTINDEX))
|
||||||
|
|
Loading…
Reference in a new issue