summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconstants.asm1
-rwxr-xr-xconstants/map_constants.asm20
-rwxr-xr-xmacros.asm10
-rwxr-xr-xmain.asm14
4 files changed, 41 insertions, 4 deletions
diff --git a/constants.asm b/constants.asm
index 2b2dbe5..ec27c6f 100755
--- a/constants.asm
+++ b/constants.asm
@@ -2,5 +2,6 @@ INCLUDE "hram.asm"
INCLUDE "vram.asm"
INCLUDE "constants/joy_constants.asm"
+INCLUDE "constants/map_constants.asm"
INCLUDE "constants/song_constants.asm"
INCLUDE "constants/sound_effect_constants.asm"
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
new file mode 100755
index 0000000..2572e86
--- /dev/null
+++ b/constants/map_constants.asm
@@ -0,0 +1,20 @@
+const_value = 0
+
+ const PALLET_TOWN ; $0
+ const VIRIDIAN_CITY ; $1
+ const VIRIDIAN_FOREST ; $2
+ const PEWTER_CITY ; $3
+ const MT_MOON ; $4
+ const CERULEAN_CITY ; $5
+ const VERMILION_SEASIDE ; $6
+ const VERMILION_STREETS ; $7
+ const ROCK_MOUNTAIN ; $8
+ const LAVENDER_TOWN ; $9
+ const CELADON_CITY ; $a
+ const CYCLING_ROAD ; $b
+ const FUCHSIA_CITY ; $c
+ const SAFARI_ZONE ; $d
+ const SAFFRON_CITY ; $e
+ const SEAFOAM_ISLANDS ; $f
+ const CINNABAR_ISLAND ; $10
+ const INDIGO_PLATEAU ; $11
diff --git a/macros.asm b/macros.asm
index 0b301bc..54a779e 100755
--- a/macros.asm
+++ b/macros.asm
@@ -36,6 +36,16 @@ bigBCD6: MACRO
dn ((\1) / 100000000000) % 10, ((\1) / 10000000000) % 10
ENDM
+; Constant enumeration is useful for mons, maps, etc.
+const_def: MACRO
+const_value = 0
+ENDM
+
+const: MACRO
+\1 EQU const_value
+const_value = const_value + 1
+ENDM
+
;\1 = X
;\2 = Y
;\3 = Reference Background Map (e.g. vBGMap0 or vBGMap1)
diff --git a/main.asm b/main.asm
index 6d64896..c94f05c 100755
--- a/main.asm
+++ b/main.asm
@@ -1,5 +1,5 @@
-INCLUDE "constants.asm"
INCLUDE "macros.asm"
+INCLUDE "constants.asm"
SECTION "rst 00", ROM0 [$00]
di
@@ -5486,7 +5486,7 @@ INCBIN "baserom.gbc",$14000,$1659c - $14000
ld [$d4e1], a
ld c, a
ld b, $0
- ld hl, Data_16605
+ ld hl, RedStageInitialMaps
add hl, bc
ld a, [hl]
ld [$d54a], a
@@ -5530,8 +5530,14 @@ INCBIN "baserom.gbc",$14000,$1659c - $14000
ld [$d4e2], a
ret
-Data_16605: ; 0x16605
- db $00, $02, $03, $05, $06, $08, $09
+RedStageInitialMaps: ; 0x16605
+ db PALLET_TOWN
+ db VIRIDIAN_FOREST
+ db PEWTER_CITY
+ db CERULEAN_CITY
+ db VERMILION_SEASIDE
+ db ROCK_MOUNTAIN
+ db LAVENDER_TOWN
INCBIN "baserom.gbc",$1660c,$18000 - $1660c