mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-10-01 22:09:43 -05:00
Rename function that was named incorrectly, TryGetVarPointer->TryGetVar
This commit is contained in:
@@ -166,7 +166,7 @@ static inline u16 * ScriptContext_GetVarPointer (ScriptContext * ctx)
|
||||
|
||||
static inline u16 ScriptContext_GetVar (ScriptContext * ctx)
|
||||
{
|
||||
return FieldSystem_TryGetVarPointer(ctx->fieldSystem, ScriptContext_ReadHalfWord(ctx));
|
||||
return FieldSystem_TryGetVar(ctx->fieldSystem, ScriptContext_ReadHalfWord(ctx));
|
||||
}
|
||||
|
||||
static inline void inline_0204E650 (VarsFlags * param0)
|
||||
|
||||
@@ -140,7 +140,7 @@ void * ScriptManager_GetMemberPtr(ScriptManager * scriptManager, u32 member);
|
||||
void * FieldSystem_GetScriptMember(FieldSystem * fieldSystem, u32 member);
|
||||
void sub_0203F0C0(FieldSystem * fieldSystem);
|
||||
u16 * FieldSystem_GetVarPointer(FieldSystem * fieldSystem, u16 varID);
|
||||
u16 FieldSystem_TryGetVarPointer(FieldSystem * fieldSystem, u16 varID);
|
||||
u16 FieldSystem_TryGetVar(FieldSystem * fieldSystem, u16 varID);
|
||||
u16 sub_0203F164(FieldSystem * fieldSystem, u16 param1);
|
||||
BOOL FieldSystem_CheckFlag(FieldSystem * fieldSystem, u16 flagID);
|
||||
void FieldSystem_SetFlag(FieldSystem * fieldSystem, u16 flagID);
|
||||
|
||||
@@ -95,7 +95,7 @@ static void ov5_021F8250(UnkStruct_ov5_021F7ED8 * param0);
|
||||
|
||||
BOOL ScrCmd_337 (ScriptContext * param0)
|
||||
{
|
||||
u16 v0 = FieldSystem_TryGetVarPointer(param0->fieldSystem, ScriptContext_ReadHalfWord(param0));
|
||||
u16 v0 = FieldSystem_TryGetVar(param0->fieldSystem, ScriptContext_ReadHalfWord(param0));
|
||||
u16 * v1 = FieldSystem_GetVarPointer(param0->fieldSystem, ScriptContext_ReadHalfWord(param0));
|
||||
PokedexData * v2 = SaveData_Pokedex(param0->fieldSystem->saveData);
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ u16 sub_0203CC14 (FieldSystem * fieldSystem, void * param1, int param2)
|
||||
int v2 = Player_GetZPos(fieldSystem->playerAvatar);
|
||||
|
||||
for (v3 = 0; v3 < param2; v3++) {
|
||||
if ((v1 >= v0[v3].x) && (v1 < (v0[v3].x + v0[v3].width)) && (v2 >= v0[v3].z) && (v2 < (v0[v3].z + v0[v3].length)) && (FieldSystem_TryGetVarPointer(fieldSystem, v0[v3].var) == v0[v3].value)) {
|
||||
if ((v1 >= v0[v3].x) && (v1 < (v0[v3].x + v0[v3].width)) && (v2 >= v0[v3].z) && (v2 < (v0[v3].z + v0[v3].length)) && (FieldSystem_TryGetVar(fieldSystem, v0[v3].var) == v0[v3].value)) {
|
||||
return v0[v3].script;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,21 +486,21 @@ u16 * FieldSystem_GetVarPointer (FieldSystem * fieldSystem, u16 varID)
|
||||
return FieldSystem_GetScriptMember(fieldSystem, SCRIPT_DATA_START + varID - SPECIAL_VARS_START);
|
||||
}
|
||||
|
||||
u16 FieldSystem_TryGetVarPointer (FieldSystem * fieldSystem, u16 varID)
|
||||
u16 FieldSystem_TryGetVar (FieldSystem * fieldSystem, u16 varID)
|
||||
{
|
||||
u16 *varPtr = FieldSystem_GetVarPointer(fieldSystem, varID);
|
||||
u16 *var = FieldSystem_GetVarPointer(fieldSystem, varID);
|
||||
|
||||
if (varPtr == NULL) {
|
||||
if (var == NULL) {
|
||||
return varID;
|
||||
}
|
||||
|
||||
return *varPtr;
|
||||
return *var;
|
||||
}
|
||||
|
||||
u16 sub_0203F164 (FieldSystem * fieldSystem, u16 varID)
|
||||
{
|
||||
GF_ASSERT(varID < 16);
|
||||
return FieldSystem_TryGetVarPointer(fieldSystem, (((0 + VARS_START) + 32) + varID));
|
||||
return FieldSystem_TryGetVar(fieldSystem, (((0 + VARS_START) + 32) + varID));
|
||||
}
|
||||
|
||||
BOOL FieldSystem_CheckFlag (FieldSystem * fieldSystem, u16 flagID)
|
||||
@@ -837,7 +837,7 @@ static u16 sub_0203F638 (FieldSystem * fieldSystem, const u8 * param1, u8 param2
|
||||
v1 = (*param1 + (*(param1 + 1) << 8));
|
||||
param1 += 2;
|
||||
|
||||
if (FieldSystem_TryGetVarPointer(fieldSystem, v0) == FieldSystem_TryGetVarPointer(fieldSystem, v1)) {
|
||||
if (FieldSystem_TryGetVar(fieldSystem, v0) == FieldSystem_TryGetVar(fieldSystem, v1)) {
|
||||
return *param1 + (*(param1 + 1) << 8);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user