Remove uses of INVALID_ defines, clean up some arrays with constants, and spaces -> tabs

This commit is contained in:
nullableVoidPtr
2018-12-05 22:31:01 +08:00
parent 405f1bb529
commit f9ff7316d5
140 changed files with 27697 additions and 23904 deletions

View File

@@ -790,7 +790,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
u16 y;
PlayerGetDestCoords(&x, &y);
if (mapGroup == INVALID_U8 && mapNum == INVALID_U8)
if (mapGroup == 0xFF && mapNum == 0xFF)
SetFixedHoleWarpAsDestination(x - 7, y - 7);
else
Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7);
@@ -1491,7 +1491,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
if (width > 0x1C)
width = 0x1C;
for (i = 0, height = 4; gStringVar4[i] != INVALID_U8;)
for (i = 0, height = 4; gStringVar4[i] != 0xFF;)
{
if (gStringVar4[i++] == 0xFE)
height += 3;
@@ -2238,8 +2238,8 @@ bool8 ScrCmd_warpD1(struct ScriptContext *ctx)
u16 y = VarGet(ScriptReadHalfword(ctx));
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
sub_808D074(GetPlayerFacingDirection());
sub_80B0244();
sub_808D074(GetPlayerFacingDirection());
sub_80B0244();
ResetInitialPlayerAvatarState();
return TRUE;
}
@@ -2292,7 +2292,7 @@ bool8 ScrCmd_warpE0(struct ScriptContext *ctx)
u16 y = VarGet(ScriptReadHalfword(ctx));
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
sub_80AF79C();
sub_80AF79C();
ResetInitialPlayerAvatarState();
return TRUE;
}