ref: 54d76dec388a70260aad6ef6acb94a5b9f95fd6d
parent: c7e3aed0b86b1a06151a38db914135255b760118
parent: a49ca6ef4153c16f5f5f1f968cc704e07b669d96
author: Rangi <35663410+Rangi42@users.noreply.github.com>
date: Wed Jul 8 06:59:12 EDT 2020
Merge pull request #268 from Rangi42/master 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