summaryrefslogtreecommitdiff
path: root/src/scrcmd.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-10-17 11:32:30 -0400
committerGitHub <noreply@github.com>2021-10-17 11:32:30 -0400
commit164590e37d67a385bf6479aafcbe5b351891bc0b (patch)
treec3d4cac1627512d166440ead47d9f2285c8b4044 /src/scrcmd.c
parenta4a3c1c9e5a0026415330eab9bea2f8f3e83e0a3 (diff)
parent1f39c34ca47e43b0afccaabe97d1df19e3f0b39b (diff)
Merge pull request #1512 from GriffinRichards/minor-constants
Add some misc constants/usage
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r--src/scrcmd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c
index dfda7b3a2..de0ec7c26 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -791,9 +791,9 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
PlayerGetDestCoords(&x, &y);
if (mapGroup == 0xFF && mapNum == 0xFF)
- SetWarpDestinationToFixedHoleWarp(x - 7, y - 7);
+ SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET);
else
- SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7);
+ SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET);
DoFallWarp();
ResetInitialPlayerAvatarState();
return TRUE;
@@ -2043,8 +2043,8 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx)
u16 tileId = VarGet(ScriptReadHalfword(ctx));
u16 isImpassable = VarGet(ScriptReadHalfword(ctx));
- x += 7;
- y += 7;
+ x += MAP_OFFSET;
+ y += MAP_OFFSET;
if (!isImpassable)
MapGridSetMetatileIdAt(x, y, tileId);
else
@@ -2057,8 +2057,8 @@ bool8 ScrCmd_opendoor(struct ScriptContext *ctx)
u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx));
- x += 7;
- y += 7;
+ x += MAP_OFFSET;
+ y += MAP_OFFSET;
PlaySE(GetDoorSoundEffect(x, y));
FieldAnimateDoorOpen(x, y);
return FALSE;
@@ -2069,8 +2069,8 @@ bool8 ScrCmd_closedoor(struct ScriptContext *ctx)
u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx));
- x += 7;
- y += 7;
+ x += MAP_OFFSET;
+ y += MAP_OFFSET;
FieldAnimateDoorClose(x, y);
return FALSE;
}
@@ -2094,8 +2094,8 @@ bool8 ScrCmd_setdooropen(struct ScriptContext *ctx)
u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx));
- x += 7;
- y += 7;
+ x += MAP_OFFSET;
+ y += MAP_OFFSET;
FieldSetDoorOpened(x, y);
return FALSE;
}
@@ -2105,8 +2105,8 @@ bool8 ScrCmd_setdoorclosed(struct ScriptContext *ctx)
u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx));
- x += 7;
- y += 7;
+ x += MAP_OFFSET;
+ y += MAP_OFFSET;
FieldSetDoorClosed(x, y);
return FALSE;
}