ref: eacf9b85f50b2344910dcf84fa50de102ba5222e
parent: 23003bd772a2b025ea1972fade00309cc04003a7
parent: 3633411a9be03b9421d1525954669de9ff6a90c1
author: Bryan Bishop <[email protected]>
date: Wed Feb 27 18:20:02 EST 2013
Merge pull request #117 from iimarckus/master Hall of Fame things.
--- a/main.asm
+++ b/main.asm
@@ -8777,9 +8777,51 @@
INCBIN "gfx/fx/039.lz"
; 8640b
-INCBIN "baserom.gbc", $8640b, $868f7 - $8640b
+INCBIN "baserom.gbc", $8640b, $8640e - $8640b
+HallOfFame3: ; 0x8640e
+ call $648e
+ ld a, [$d84c]
+ push af
+ ld a, $1
+ ld [$c2cd], a
+ call $2ed3
+ ld a, $1
+ ld [$d4b5], a
+ ; Enable the Pokégear map to cycle through all of Kanto
+ ld hl, $d84c
+ set 6, [hl]
+
+ ld a, $5
+ ld hl, $4da0
+ rst $8
+ ld hl, $d95e
+ ld a, [hl]
+ cp $c8
+ jr nc, .asm_86436 ; 0x86433 $1
+ inc [hl]
+.asm_86436
+ ld a, $5
+ ld hl, $4b85
+ rst $8
+ call $653f
+ ld a, $5
+ ld hl, $4b5f
+ rst $8
+ xor a
+ ld [$c2cd], a
+ call $64c3
+ pop af
+ ld b, a
+ ld a, $42
+ ld hl, $5847
+ rst $8
+ ret
+; 0x86455
+
+INCBIN "baserom.gbc", $86455, $88000 - $86455
+
SECTION "bank22",DATA,BANK[$22]
INCBIN "baserom.gbc",$88000,$8832c - $88000
@@ -12707,7 +12749,17 @@
; japanese mystery gift gfx
INCBIN "gfx/misc/mystery_gift_jp.2bpp"
-INCBIN "baserom.gbc",$105db0,$1060bb - $105db0
+INCBIN "baserom.gbc",$105db0,$105ef6 - $105db0
+
+HallOfFame2: ; 0x105ef6
+ ret
+
+INCBIN "baserom.gbc",$105ef7,$106078 - $105ef7
+
+HallOfFame1: ; 0x106078
+ ret
+
+INCBIN "baserom.gbc",$106079,$1060bb - $106079
Function1060bb: ; 1060bb
; commented out
--- a/scripting.asm
+++ b/scripting.asm
@@ -1371,7 +1371,7 @@
ld e, a
call $26d4
ld d, a
- jr Unknown_974cb ; 0x974ae $1b
+ jr ScriptCall
; 0x974b0
Script_3call: ; 0x974b0
@@ -1385,7 +1385,7 @@
ld e, a
call $26d4
ld d, a
- jr Unknown_974cb ; 0x974bc $d
+ jr ScriptCall
; 0x974be
Script_2ptcall: ; 0x974be
@@ -1402,8 +1402,9 @@
ld e, [hl]
inc hl
ld d, [hl]
+ ; fallthrough
-Unknown_974cb: ; 0x974cb
+ScriptCall: ; 0x974cb
push de
ld hl, $d43c
ld e, [hl]
@@ -1484,7 +1485,7 @@
ld a, [$c2dd]
and a
jp nz, $7596
- jp $74fe
+ jp Script_2jump
; 0x97536
Script_iftrue: ; 0x97536
@@ -1494,7 +1495,7 @@
ld a, [$c2dd]
and a
- jp nz, $74fe
+ jp nz, Script_2jump
jp $7596
; 0x97540
@@ -1665,6 +1666,7 @@
ld b, a
call $26d4
ld c, a
+ ; fallthrough
Unknown_975fd: ; 0x975fd
call $2147
@@ -2818,7 +2820,7 @@
; pointer (ScriptPointerLabelParam)
call $6e11
- jp $74fe
+ jp Script_2jump
; 0x97b74
Script_end: ; 0x97b74
@@ -2871,18 +2873,18 @@
ld hl, $cfbc
res 0, [hl]
- ld a, $41
- ld hl, $6078
+ ld a, BANK(HallOfFame1)
+ ld hl, HallOfFame1
rst $8
- ld a, $41
- ld hl, $5ef6
+ ld a, BANK(HallOfFame2)
+ ld hl, HallOfFame2
rst $8
- ld a, $21
- ld hl, $640e
+ ld a, BANK(HallOfFame3)
+ ld hl, HallOfFame3
rst $8
ld hl, $cfbc
set 0, [hl]
- jr Unknown_97bf9 ; 0x97bf1 $6
+ jr DisplayCredits
; 0x97bf3
Script_credits: ; 0x97bf3
@@ -2891,8 +2893,8 @@
ld a, $21
ld hl, $6455
rst $8
-
-Unknown_97bf9: ; 0x97bf9
+ ; fallthrough
+DisplayCredits:
call $7bc0
ld a, $3
call $261b