summaryrefslogtreecommitdiff
path: root/engine/overworld/clear_loadmapdata_vars.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/clear_loadmapdata_vars.asm')
-rw-r--r--engine/overworld/clear_loadmapdata_vars.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/overworld/clear_loadmapdata_vars.asm b/engine/overworld/clear_loadmapdata_vars.asm
new file mode 100644
index 00000000..c5dc21fa
--- /dev/null
+++ b/engine/overworld/clear_loadmapdata_vars.asm
@@ -0,0 +1,20 @@
+ClearVariablesAfterLoadingMapData:
+ ld a, $90
+ ld [hWY], a
+ ld [rWY], a
+ xor a
+ ld [H_AUTOBGTRANSFERENABLED], a
+ ld [wStepCounter], a
+ ld [wLoneAttackNo], a ; wGymLeaderNo
+ ld [hJoyPressed], a
+ ld [hJoyReleased], a
+ ld [hJoyHeld], a
+ ld [wActionResultOrTookBattleTurn], a
+ ld [wUnusedD5A3], a
+ ld hl, wCardKeyDoorY
+ ld [hli], a
+ ld [hl], a
+ ld hl, wUnusedCD3D
+ ld bc, wStandingOnWarpPadOrHole - wUnusedCD3D
+ call FillMemory
+ ret