mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
Promote display_mirror
from char to int32_t and remove GAMEVAR_UINT8PTR handling since nothing else was using it
git-svn-id: https://svn.eduke32.com/eduke32@7662 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0becd69e91
commit
9aa1030a09
3 changed files with 3 additions and 15 deletions
|
@ -715,7 +715,7 @@ EXTERN int16_t headsectbunch[2][YAX_MAXBUNCHES], nextsectbunch[2][MAXSECTORS];
|
|||
|
||||
EXTERN int32_t Numsprites;
|
||||
EXTERN int16_t numsectors, numwalls;
|
||||
EXTERN char display_mirror;
|
||||
EXTERN int32_t display_mirror;
|
||||
// totalclocklock: the totalclock value that is backed up once on each
|
||||
// drawrooms() and is used for animateoffs().
|
||||
EXTERN int32_t totalclock, totalclocklock;
|
||||
|
|
|
@ -308,8 +308,6 @@ void Gv_DumpValues(void)
|
|||
buildprint(*(int32_t *)aGameVars[i].global);
|
||||
else if (aGameVars[i].flags & (GAMEVAR_INT16PTR))
|
||||
buildprint(*(int16_t *)aGameVars[i].global);
|
||||
else if (aGameVars[i].flags & (GAMEVAR_UINT8PTR))
|
||||
buildprint(*(int8_t *)aGameVars[i].global);
|
||||
else
|
||||
buildprint(aGameVars[i].global);
|
||||
|
||||
|
@ -778,7 +776,6 @@ static FORCE_INLINE int __fastcall Gv_GetVar__(int &gameVar, int &spriteNum, int
|
|||
{
|
||||
case GAMEVAR_INT32PTR: returnValue = *(int32_t *)var.global; break;
|
||||
case GAMEVAR_INT16PTR: returnValue = *(int16_t *)var.global; break;
|
||||
case GAMEVAR_UINT8PTR: returnValue = *(char *)var.global; break;
|
||||
case GAMEVAR_Q16PTR:
|
||||
returnValue = (var.flags & GAMEVAR_SPECIAL) ? *(int32_t *)var.global : fix16_to_int(*(fix16_t *)var.global);
|
||||
break;
|
||||
|
@ -827,7 +824,6 @@ static FORCE_INLINE void __fastcall Gv_SetVar__(int const &gameVar, int const &n
|
|||
{
|
||||
case GAMEVAR_INT32PTR: *((int32_t *)var.global) = (int32_t)newValue; break;
|
||||
case GAMEVAR_INT16PTR: *((int16_t *)var.global) = (int16_t)newValue; break;
|
||||
case GAMEVAR_UINT8PTR: *((uint8_t *)var.global) = (uint8_t)newValue; break;
|
||||
case GAMEVAR_Q16PTR: *(fix16_t *)var.global = (var.flags & GAMEVAR_SPECIAL) ? (int32_t)newValue : fix16_from_int((int16_t)newValue);
|
||||
break;
|
||||
}
|
||||
|
@ -1309,7 +1305,7 @@ static void Gv_AddSystemVars(void)
|
|||
Gv_NewVar("cameraz", (intptr_t)&ud.camerapos.z, GAMEVAR_SYSTEM | GAMEVAR_INT32PTR);
|
||||
Gv_NewVar("current_menu", (intptr_t)&g_currentMenu, GAMEVAR_SYSTEM | GAMEVAR_INT32PTR | GAMEVAR_READONLY);
|
||||
Gv_NewVar("currentweapon", (intptr_t)&hudweap.cur, GAMEVAR_SYSTEM | GAMEVAR_INT32PTR);
|
||||
Gv_NewVar("display_mirror", (intptr_t)&display_mirror, GAMEVAR_SYSTEM | GAMEVAR_UINT8PTR);
|
||||
Gv_NewVar("display_mirror", (intptr_t)&display_mirror, GAMEVAR_SYSTEM | GAMEVAR_INT32PTR);
|
||||
Gv_NewVar("framerate", (intptr_t)&g_frameRate, GAMEVAR_SYSTEM | GAMEVAR_INT32PTR | GAMEVAR_READONLY);
|
||||
Gv_NewVar("gametype_flags", (intptr_t)&g_gametypeFlags[ud.coop], GAMEVAR_SYSTEM | GAMEVAR_INT32PTR);
|
||||
Gv_NewVar("gravitationalconstant", (intptr_t)&g_spriteGravity, GAMEVAR_SYSTEM | GAMEVAR_INT32PTR);
|
||||
|
|
|
@ -49,12 +49,11 @@ enum GamevarFlags_t
|
|||
GAMEVAR_READONLY = 0x00001000, // values are read-only (no setvar allowed)
|
||||
GAMEVAR_INT32PTR = 0x00002000, // plValues is a pointer to an int32_t
|
||||
GAMEVAR_INT16PTR = 0x00008000, // plValues is a pointer to a short
|
||||
GAMEVAR_UINT8PTR = 0x00010000, // plValues is a pointer to a char
|
||||
GAMEVAR_NORESET = 0x00020000, // var values are not reset when restoring map state
|
||||
GAMEVAR_SPECIAL = 0x00040000, // flag for structure member shortcut vars
|
||||
GAMEVAR_NOMULTI = 0x00080000, // don't attach to multiplayer packets
|
||||
GAMEVAR_Q16PTR = 0x00100000, // plValues is a pointer to a q16.16
|
||||
GAMEVAR_PTR_MASK = (GAMEVAR_INT32PTR | GAMEVAR_INT16PTR | GAMEVAR_UINT8PTR | GAMEVAR_Q16PTR),
|
||||
GAMEVAR_PTR_MASK = (GAMEVAR_INT32PTR | GAMEVAR_INT16PTR | GAMEVAR_Q16PTR),
|
||||
};
|
||||
|
||||
#if !defined LUNATIC
|
||||
|
@ -223,7 +222,6 @@ static FORCE_INLINE void __fastcall VM_SetStruct(uint32_t const flags, intptr_t
|
|||
break; \
|
||||
case GAMEVAR_INT32PTR: *(int32_t *)var.pValues operator(int32_t) operand; break; \
|
||||
case GAMEVAR_INT16PTR: *(int16_t *)var.pValues operator(int16_t) operand; break; \
|
||||
case GAMEVAR_UINT8PTR: *(uint8_t *)var.pValues operator(uint8_t) operand; break; \
|
||||
case GAMEVAR_Q16PTR: \
|
||||
{ \
|
||||
Fix16 *pfix = (Fix16 *)var.global; \
|
||||
|
@ -272,12 +270,6 @@ skip:
|
|||
value = (int16_t)libdivide_s32_do(value, dptr);
|
||||
return;
|
||||
}
|
||||
case GAMEVAR_UINT8PTR:
|
||||
{
|
||||
uint8_t &value = *(uint8_t *)var.pValues;
|
||||
value = (uint8_t)libdivide_s32_do(value, dptr);
|
||||
return;
|
||||
}
|
||||
case GAMEVAR_Q16PTR:
|
||||
{
|
||||
fix16_t &value = *(fix16_t *)var.pValues;
|
||||
|
|
Loading…
Reference in a new issue