diff options
author | Marcus Huderle <huderlem@gmail.com> | 2015-03-05 20:24:23 -0800 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2015-03-05 20:24:23 -0800 |
commit | f8580d043fc24f5dec47b262795ad0b763b91cb6 (patch) | |
tree | ad008a2ad81fa26e2eacd724c416191d87c3247f | |
parent | d5fb679f078058e41ba13b76c5b0268762a952bb (diff) |
Added map constants.
-rwxr-xr-x | constants.asm | 1 | ||||
-rwxr-xr-x | constants/map_constants.asm | 20 | ||||
-rwxr-xr-x | macros.asm | 10 | ||||
-rwxr-xr-x | main.asm | 14 |
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 @@ -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) @@ -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 |