summaryrefslogtreecommitdiff
path: root/src/scrcmd.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-10-09 12:12:18 -0400
committerGriffinR <griffin.g.richards@gmail.com>2021-10-09 13:19:27 -0400
commit862febe03a354218d3c8bd14d9c7d1a49e8981b8 (patch)
tree583c9759092167966229324c1cf72868cdd5f0e7 /src/scrcmd.c
parent28de627913f04e059f995169299e41ce4c2544f0 (diff)
Add MAP_OFFSET
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;
}