shithub: pokecrystal

Download patch

ref: 860d7447f94af644b1c4da8ea271705173ae8dc6
parent: b52aa983252a1762aafc4f2d79be6e658cece19b
author: yenatch <[email protected]>
date: Fri Feb 15 18:25:29 EST 2013

Point to map groups instead of their first header

--- a/main.asm
+++ b/main.asm
@@ -2501,7 +2501,7 @@
 
 GetMapHeaderPointer: ; 0x2bed
 ; Prior to calling this function, you must have switched banks so that
-; MapHeaderPointers is visible.
+; MapGroupPointers is visible.
 
 ; inputs:
 ; b = map group, c = map number
@@ -2515,7 +2515,7 @@
 	dec b
 	ld c, b
 	ld b, $0
-	ld hl, MapHeaderPointers
+	ld hl, MapGroupPointers
 	add hl, bc
 	add hl, bc
 
@@ -2551,7 +2551,7 @@
 	; bankswitch
 	ld a, [$ff9d]
 	push af
-	ld a, BANK(MapHeaderPointers)
+	ld a, BANK(MapGroupPointers)
 	rst Bankswitch
 
 	call GetMapHeaderPointer
@@ -44751,34 +44751,34 @@
 
 SECTION "bank25",DATA,BANK[$25]
 
-MapHeaderPointers: ; 0x94000
+MapGroupPointers: ; 0x94000
 ; pointers to the first map header of each map group
-	dw OlivinePokeCenter1F_MapHeader
-	dw MahoganyRedGyaradosSpeechHouse_MapHeader
-	dw SproutTower1F_MapHeader
-	dw EcruteakHouse_MapHeader
-	dw BlackthornGym1F_MapHeader
-	dw CinnabarPokeCenter1F_MapHeader
-	dw CeruleanGymBadgeSpeechHouse_MapHeader
-	dw AzaleaPokeCenter1F_MapHeader
-	dw LakeofRageHiddenPowerHouse_MapHeader
-	dw Route32_MapHeader
-	dw Route34_MapHeader
-	dw Route6_MapHeader
-	dw Route1_MapHeader
-	dw Route3_MapHeader
-	dw OlivinePort_MapHeader
-	dw Route23_MapHeader
-	dw Route13_MapHeader
-	dw Route8_MapHeader
-	dw Route28_MapHeader
-	dw PokeCenter2F_MapHeader
-	dw Route7_MapHeader
-	dw Route40_MapHeader
-	dw Route2_MapHeader
-	dw Route26_MapHeader
-	dw Route5_MapHeader
-	dw Route30_MapHeader
+	dw MapGroup0
+	dw MapGroup1
+	dw MapGroup2
+	dw MapGroup3
+	dw MapGroup4
+	dw MapGroup5
+	dw MapGroup6
+	dw MapGroup7
+	dw MapGroup8
+	dw MapGroup9
+	dw MapGroup10
+	dw MapGroup11
+	dw MapGroup12
+	dw MapGroup13
+	dw MapGroup14
+	dw MapGroup15
+	dw MapGroup16
+	dw MapGroup17
+	dw MapGroup18
+	dw MapGroup19
+	dw MapGroup20
+	dw MapGroup21
+	dw MapGroup22
+	dw MapGroup23
+	dw MapGroup24
+	dw MapGroup25
 
 
 INCLUDE "maps/map_headers.asm"
--- a/maps/map_headers.asm
+++ b/maps/map_headers.asm
@@ -1,3 +1,6 @@
+
+MapGroup0:
+
 OlivinePokeCenter1F_MapHeader: ; 0x94034
 	; bank, tileset, permission
 	db BANK(OlivinePokeCenter1F_SecondMapHeader), $7, 3
@@ -154,6 +157,9 @@
 	db $1b, $2d, 0, 1
 ; 0x940b2
 
+
+MapGroup1:
+
 MahoganyRedGyaradosSpeechHouse_MapHeader: ; 0x940b2
 	; bank, tileset, permission
 	db BANK(MahoganyRedGyaradosSpeechHouse_SecondMapHeader), $5, 3
@@ -231,6 +237,9 @@
 	db $24, $26, 0, 1
 ; 0x940f1
 
+
+MapGroup2:
+
 SproutTower1F_MapHeader: ; 0x940f1
 	; bank, tileset, permission
 	db BANK(SproutTower1F_SecondMapHeader), $17, 7
@@ -1232,6 +1241,9 @@
 	db $58, $4f, 18, 1
 ; 0x94424
 
+
+MapGroup3:
+
 EcruteakHouse_MapHeader: ; 0x94424
 	; bank, tileset, permission
 	db BANK(EcruteakHouse_SecondMapHeader), $17, 3
@@ -1331,6 +1343,9 @@
 	db $16, $2c, 0, 4
 ; 0x94475
 
+
+MapGroup4:
+
 BlackthornGym1F_MapHeader: ; 0x94475
 	; bank, tileset, permission
 	db $25, $f, 3
@@ -1441,6 +1456,9 @@
 	db $29, $25, 0, 4
 ; 0x944cf
 
+
+MapGroup5:
+
 CinnabarPokeCenter1F_MapHeader: ; 0x944cf
 	; bank, tileset, permission
 	db BANK(CinnabarPokeCenter1F_SecondMapHeader), $7, 3
@@ -1529,6 +1547,9 @@
 	db $55, $15, 0, 2
 ; 0x94517
 
+
+MapGroup6:
+
 CeruleanGymBadgeSpeechHouse_MapHeader: ; 0x94517
 	; bank, tileset, permission
 	db BANK(CeruleanGymBadgeSpeechHouse_SecondMapHeader), $5, 3
@@ -1716,6 +1737,9 @@
 	db $37, $15, 0, 0
 ; 0x945b0
 
+
+MapGroup7:
+
 AzaleaPokeCenter1F_MapHeader: ; 0x945b0
 	; bank, tileset, permission
 	db BANK(AzaleaPokeCenter1F_SecondMapHeader), $7, 3
@@ -1793,6 +1817,9 @@
 	db $c, $25, 0, 1
 ; 0x945ef
 
+
+MapGroup8:
+
 LakeofRageHiddenPowerHouse_MapHeader: ; 0x945ef
 	; bank, tileset, permission
 	db BANK(LakeofRageHiddenPowerHouse_SecondMapHeader), $5, 3
@@ -1859,6 +1886,9 @@
 	db $26, $45, 0, 8
 ; 0x94625
 
+
+MapGroup9:
+
 Route32_MapHeader: ; 0x94625
 	; bank, tileset, permission
 	db BANK(Route32_SecondMapHeader), $1, 2
@@ -2046,6 +2076,9 @@
 	db $14, $3d, 1, 1
 ; 0x946be
 
+
+MapGroup10:
+
 Route34_MapHeader: ; 0x946be
 	; bank, tileset, permission
 	db BANK(Route34_SecondMapHeader), $2, 2
@@ -2310,6 +2343,9 @@
 	db $f, $25, 1, 1
 ; 0x94796
 
+
+MapGroup11:
+
 Route6_MapHeader: ; 0x94796
 	; bank, tileset, permission
 	db BANK(Route6_SecondMapHeader), $3, 2
@@ -2453,6 +2489,9 @@
 	db $3c, $3, 1, 1
 ; 0x9480b
 
+
+MapGroup12:
+
 Route1_MapHeader: ; 0x9480b
 	; bank, tileset, permission
 	db BANK(Route1_SecondMapHeader), $3, 2
@@ -2519,6 +2558,9 @@
 	db $2f, $1d, 1, 1
 ; 0x94841
 
+
+MapGroup13:
+
 Route3_MapHeader: ; 0x94841
 	; bank, tileset, permission
 	db BANK(Route3_SecondMapHeader), $3, 2
@@ -2607,6 +2649,9 @@
 	db $33, $15, 1, 1
 ; 0x94889
 
+
+MapGroup14:
+
 OlivinePort_MapHeader: ; 0x94889
 	; bank, tileset, permission
 	db BANK(OlivinePort_SecondMapHeader), $9, 2
@@ -2739,6 +2784,9 @@
 	db $17, $41, 0, 1
 ; 0x948f5
 
+
+MapGroup15:
+
 Route23_MapHeader: ; 0x948f5
 	; bank, tileset, permission
 	db BANK(Route23_SecondMapHeader), $3, 1
@@ -2827,6 +2875,9 @@
 	db $5a, $3c, 17, 1
 ; 0x9493d
 
+
+MapGroup16:
+
 Route13_MapHeader: ; 0x9493d
 	; bank, tileset, permission
 	db BANK(Route13_SecondMapHeader), $3, 2
@@ -2970,6 +3021,9 @@
 	db $4d, $4, 1, 1
 ; 0x949b2
 
+
+MapGroup17:
+
 Route8_MapHeader: ; 0x949b2
 	; bank, tileset, permission
 	db BANK(Route8_SecondMapHeader), $3, 2
@@ -3124,6 +3178,9 @@
 	db $4a, $15, 1, 1
 ; 0x94a30
 
+
+MapGroup18:
+
 Route28_MapHeader: ; 0x94a30
 	; bank, tileset, permission
 	db BANK(Route28_SecondMapHeader), $3, 2
@@ -3168,6 +3225,9 @@
 	db $5e, $25, 1, 1
 ; 0x94a54
 
+
+MapGroup19:
+
 PokeCenter2F_MapHeader: ; 0x94a54
 	; bank, tileset, permission
 	db BANK(PokeCenter2F_SecondMapHeader), $7, 3
@@ -3234,6 +3294,9 @@
 	db $0, $26, 17, 1
 ; 0x94a8a
 
+
+MapGroup20:
+
 Route7_MapHeader: ; 0x94a8a
 	; bank, tileset, permission
 	db BANK(Route7_SecondMapHeader), $3, 2
@@ -3520,6 +3583,9 @@
 	db $4f, $3, 1, 1
 ; 0x94b74
 
+
+MapGroup21:
+
 Route40_MapHeader: ; 0x94b74
 	; bank, tileset, permission
 	db BANK(Route40_SecondMapHeader), $1, 2
@@ -3696,6 +3762,9 @@
 	db $1d, $63, 0, 1
 ; 0x94c04
 
+
+MapGroup22:
+
 Route2_MapHeader: ; 0x94c04
 	; bank, tileset, permission
 	db BANK(Route2_SecondMapHeader), $3, 2
@@ -3839,6 +3908,9 @@
 	db $5b, $46, 1, 1
 ; 0x94c79
 
+
+MapGroup23:
+
 Route26_MapHeader: ; 0x94c79
 	; bank, tileset, permission
 	db BANK(Route26_SecondMapHeader), $1, 2
@@ -3982,6 +4054,9 @@
 	db $2, $34, 1, 1
 ; 0x94cee
 
+
+MapGroup24:
+
 Route5_MapHeader: ; 0x94cee
 	; bank, tileset, permission
 	db BANK(Route5_SecondMapHeader), $3, 2
@@ -4147,6 +4222,9 @@
 	db $3a, $15, 1, 1
 ; 0x94d75
 
+
+MapGroup25:
+
 Route30_MapHeader: ; 0x94d75
 	; bank, tileset, permission
 	db BANK(Route30_SecondMapHeader), $1, 2
@@ -4267,4 +4345,5 @@
 	; location on world map, music, time of day, fishing group
 	db $5, $2b, 1, 1
 ; 0x94dd8
+