ref: a49ca6ef4153c16f5f5f1f968cc704e07b669d96
parent: c7e3aed0b86b1a06151a38db914135255b760118
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Wed Jul 8 06:31:44 EDT 2020
Factor out MapBadgeFlags and EscapeRopeTilesets data tables
--- /dev/null
+++ b/data/maps/badge_maps.asm
@@ -1,0 +1,10 @@
+MapBadgeFlags:
+ db PEWTER_GYM, %00000001
+ db CERULEAN_GYM, %00000010
+ db VERMILION_GYM,%00000100
+ db CELADON_GYM, %00001000
+ db FUCHSIA_GYM, %00010000
+ db SAFFRON_GYM, %00100000
+ db CINNABAR_GYM, %01000000
+ db VIRIDIAN_GYM, %10000000
+ db $ff
--- /dev/null
+++ b/data/tilesets/escape_rope_tilesets.asm
@@ -1,0 +1,3 @@
+EscapeRopeTilesets:
+ db FOREST, CEMETERY, CAVERN, FACILITY, INTERIOR
+ db $ff ; terminator
--- a/engine/events/hidden_objects/gym_statues.asm
+++ b/engine/events/hidden_objects/gym_statues.asm
@@ -6,7 +6,7 @@
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
- ld hl, .BadgeFlags
+ ld hl, MapBadgeFlags
ld a, [wCurMap]
ld b, a
.loop
@@ -28,16 +28,7 @@
.haveBadge
jp PrintPredefTextID
-.BadgeFlags:
- db PEWTER_GYM, %00000001
- db CERULEAN_GYM, %00000010
- db VERMILION_GYM,%00000100
- db CELADON_GYM, %00001000
- db FUCHSIA_GYM, %00010000
- db SAFFRON_GYM, %00100000
- db CINNABAR_GYM, %01000000
- db VIRIDIAN_GYM, %10000000
- db $ff
+INCLUDE "data/maps/badge_maps.asm"
GymStatueText1::
text_far _GymStatueText1
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1525,9 +1525,7 @@
.notUsable
jp ItemUseNotTime
-EscapeRopeTilesets:
- db FOREST, CEMETERY, CAVERN, FACILITY, INTERIOR
- db $ff ; terminator
+INCLUDE "data/tilesets/escape_rope_tilesets.asm"
ItemUseRepel:
ld b, 100