Rename Gv_GetVarX() to Gv_GetVar() (overloaded)

git-svn-id: https://svn.eduke32.com/eduke32@7652 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-05-19 03:54:35 +00:00 committed by Christoph Oelckers
parent a1556e9da7
commit 0ff1188b59
7 changed files with 492 additions and 492 deletions

View file

@ -49,8 +49,8 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags);
void Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32_t dwFlags);
extern void Gv_Init(void);
extern int32_t __fastcall Gv_GetVarX(int32_t id);
extern void __fastcall Gv_SetVarX(int32_t id, int32_t lValue);
extern int32_t __fastcall Gv_GetVar(int32_t id);
extern void __fastcall Gv_SetVar(int32_t id, int32_t lValue);
extern int32_t __fastcall Gv_GetVarN(int32_t id); // 'N' for "no side-effects"... vars and locals only!
extern void SetGamePalette(int32_t);

File diff suppressed because it is too large Load diff

View file

@ -720,7 +720,7 @@ static int __fastcall Gv_GetArrayOrStruct(int gameVar, int spriteNum, int const
break;
case STRUCT_USERDEF:
arrayIndexVar = (EDUKE32_PREDICT_FALSE(UserdefsLabels[labelNum].flags & LABEL_HASPARM2)) ? Gv_GetVarX(*insptr++) : 0;
arrayIndexVar = (EDUKE32_PREDICT_FALSE(UserdefsLabels[labelNum].flags & LABEL_HASPARM2)) ? Gv_GetVar(*insptr++) : 0;
returnValue = VM_GetUserdef(labelNum, arrayIndexVar);
break;
}
@ -796,7 +796,7 @@ static FORCE_INLINE int __fastcall Gv_GetVar__(int &gameVar, int &spriteNum, int
#undef CHECK_INDEX
int __fastcall Gv_GetVar(int gameVar, int spriteNum, int const playerNum) { return Gv_GetVar__(gameVar, spriteNum, playerNum); }
int __fastcall Gv_GetVarX(int gameVar) { return Gv_GetVar__(gameVar, vm.spriteNum, vm.playerNum); }
int __fastcall Gv_GetVar(int gameVar) { return Gv_GetVar__(gameVar, vm.spriteNum, vm.playerNum); }
void __fastcall Gv_GetManyVars(int const numVars, int32_t * const outBuf)
{

View file

@ -123,7 +123,7 @@ size_t __fastcall Gv_GetArrayCountFromFile(int const arrayIdx, size_t const file
int __fastcall Gv_GetArrayValue(int const id, int index);
int __fastcall Gv_GetVar(int gameVar, int spriteNum, int playerNum);
void __fastcall Gv_SetVar(int const gameVar, int const newValue, int const spriteNum, int const playerNum);
int __fastcall Gv_GetVarX(int gameVar);
int __fastcall Gv_GetVar(int gameVar);
void __fastcall Gv_GetManyVars(int const numVars, int32_t * const outBuf);
void __fastcall Gv_SetVarX(int const gameVar, int const newValue);

File diff suppressed because it is too large Load diff

View file

@ -41,7 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
static int32_t __fastcall VM_AccessWall(int32_t how, int32_t lVar1, int32_t labelNum, int32_t lVar2)
{
int32_t lValue;
int32_t i = (how&ACCESS_USEVARS) ? Gv_GetVarX(lVar1) : lVar1;
int32_t i = (how&ACCESS_USEVARS) ? Gv_GetVar(lVar1) : lVar1;
if (!m32_script_expertmode && (i<0 || i >= numwalls))
goto badwall;
@ -51,7 +51,7 @@ static int32_t __fastcall VM_AccessWall(int32_t how, int32_t lVar1, int32_t labe
if (!m32_script_expertmode && (WallLabels[labelNum].flags & 1))
goto readonly;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVarX(lVar2) : lVar2;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVar(lVar2) : lVar2;
asksave = 1;
@ -159,7 +159,7 @@ static int32_t __fastcall VM_AccessSector(int32_t how, int32_t lVar1, int32_t la
int32_t i = (how&ACCESS_USEVARS) ? sprite[vm.spriteNum].sectnum : lVar1;
if ((how&ACCESS_USEVARS) && lVar1 != M32_THISACTOR_VAR_ID)
i = Gv_GetVarX(lVar1);
i = Gv_GetVar(lVar1);
if (!m32_script_expertmode && (i<0 || i >= numsectors))
goto badsector;
@ -169,7 +169,7 @@ static int32_t __fastcall VM_AccessSector(int32_t how, int32_t lVar1, int32_t la
if (!m32_script_expertmode && (SectorLabels[labelNum].flags & 1))
goto readonly;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVarX(lVar2) : lVar2;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVar(lVar2) : lVar2;
asksave = 1;
@ -282,7 +282,7 @@ static int32_t __fastcall VM_AccessSprite(int32_t how, int32_t lVar1, int32_t la
int32_t i = (how&ACCESS_USEVARS) ? vm.spriteNum : lVar1;
if ((how&ACCESS_USEVARS) && lVar1 != M32_THISACTOR_VAR_ID)
i = Gv_GetVarX(lVar1);
i = Gv_GetVar(lVar1);
if ((unsigned)i >= MAXSPRITES)
goto badsprite;
@ -292,7 +292,7 @@ static int32_t __fastcall VM_AccessSprite(int32_t how, int32_t lVar1, int32_t la
if (!m32_script_expertmode && (SpriteLabels[labelNum].flags & 1))
goto readonly;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVarX(lVar2) : lVar2;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVar(lVar2) : lVar2;
asksave = 1;
@ -390,7 +390,7 @@ static int32_t __fastcall VM_AccessTsprite(int32_t how, int32_t lVar1, int32_t l
const memberlabel_t *dalabel = lightp ? &LightLabels[labelNum-LIGHT_X] : &SpriteLabels[labelNum];
if ((how&ACCESS_USEVARS) && lVar1 != M32_THISACTOR_VAR_ID)
i = Gv_GetVarX(lVar1);
i = Gv_GetVar(lVar1);
if (!lightp)
{
@ -437,7 +437,7 @@ static int32_t __fastcall VM_AccessTsprite(int32_t how, int32_t lVar1, int32_t l
if (!m32_script_expertmode && (dalabel->flags & 1))
goto readonly;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVarX(lVar2) : lVar2;
lValue = (how&ACCESS_USEVARS) ? Gv_GetVar(lVar2) : lVar2;
damin = dalabel->min;
damax = dalabel->max;

View file

@ -249,7 +249,7 @@ int32_t __fastcall Gv_GetVarN(int32_t id) // 'N' for "no side-effects"... vars
}
}
int32_t __fastcall Gv_GetVarX(int32_t id)
int32_t __fastcall Gv_GetVar(int32_t id)
{
int32_t negateResult = !!(id&M32_FLAG_NEGATE);