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..2e7cd165
--- /dev/null
+++ b/engine/overworld/clear_loadmapdata_vars.asm
@@ -0,0 +1,20 @@
+ClearVariablesAfterLoadingMapData: ; c07c (3:407c)
+ 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, wWhichTrade
+ ld bc, $1e
+ call FillMemory
+ ret \ No newline at end of file