diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-09 12:12:18 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-10-09 13:19:27 -0400 |
commit | 862febe03a354218d3c8bd14d9c7d1a49e8981b8 (patch) | |
tree | 583c9759092167966229324c1cf72868cdd5f0e7 /src/scrcmd.c | |
parent | 28de627913f04e059f995169299e41ce4c2544f0 (diff) |
Add MAP_OFFSET
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r-- | src/scrcmd.c | 24 |
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; } |