aboutsummaryrefslogtreecommitdiffstats
path: root/engine/overworld/specific_script_flags.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-11-04 20:11:52 -0500
committerGitHub <noreply@github.com>2020-11-04 20:11:52 -0500
commited03fc4f4a3287a01647e528abba27aac1937de0 (patch)
tree32fef70a31af3a0b5ad2b0d34042c312574fb42d /engine/overworld/specific_script_flags.asm
parentMerge branch 'master' of https://github.com/pret/pokered (diff)
parentStart reorganizing pokeyellow (diff)
downloadpokeyellow-ed03fc4f4a3287a01647e528abba27aac1937de0.tar.gz
pokeyellow-ed03fc4f4a3287a01647e528abba27aac1937de0.tar.xz
pokeyellow-ed03fc4f4a3287a01647e528abba27aac1937de0.zip
Merge pull request #59 from Rangi42/master
Start reorganizing pokeyellow
Diffstat (limited to 'engine/overworld/specific_script_flags.asm')
-rw-r--r--engine/overworld/specific_script_flags.asm25
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/overworld/specific_script_flags.asm b/engine/overworld/specific_script_flags.asm
new file mode 100644
index 00000000..d6f333ac
--- /dev/null
+++ b/engine/overworld/specific_script_flags.asm
@@ -0,0 +1,25 @@
+SetMapSpecificScriptFlagsOnMapReload::
+ ld a, [wCurMap]
+ cp VERMILION_GYM
+ jr z, .vermilion_gym
+ ld c, a
+ ld hl, Bit5Maps
+.search_loop
+ ld a, [hli]
+ cp c
+ jr z, .in_list
+ cp a, $ff
+ jr nz, .search_loop
+ ret
+
+.vermilion_gym
+ ld hl, wCurrentMapScriptFlags
+ set 6, [hl]
+ ret
+
+.in_list
+ ld hl, wCurrentMapScriptFlags
+ set 5, [hl]
+ ret
+
+INCLUDE "data/maps/bit_5_maps.asm"