shithub: pokecrystal

Download patch

ref: fae070755617e9abf52bc48c5038e542a2469de8
parent: 35d77a29885ccdbcde4350f59c93b6afe010b5f3
parent: 5419d34a214a78f07dec94e255e9d43768ab50d5
author: Bryan Bishop <[email protected]>
date: Sun May 12 12:18:22 EDT 2013

Merge pull request #133 from iimarckus/oakintro

Oak speech.

--- a/main.asm
+++ b/main.asm
@@ -1241,9 +1241,15 @@
 ; 1048
 
 
-INCBIN "baserom.gbc", $1048, $1065 - $1048
+INCBIN "baserom.gbc", $1048, $1057 - $1048
 
-
+PrintText: ; 0x1057
+	call $106c
+	push hl
+	ld hl, $c5b9
+	ld bc, $0312
+	call ClearBox
+	pop hl
 PrintTextBoxText: ; 1065
 	ld bc, $c5b9 ; TileMap(1,14)
 	call $13e5 ; PrintText
@@ -1407,7 +1413,7 @@
 	ld a, [InLinkBattle]
 	and a
 	jr nz, .linkbattle
-	ld a, [$d233]
+	ld a, [TrainerClass]
 	cp $9
 	jr z, .asm_1248 ; 0x1227 $1f
 	cp $2a
@@ -4583,8 +4589,110 @@
 
 SECTION "bank1",DATA,BANK[$1]
 
-INCBIN "baserom.gbc", $4000, $617c - $4000
+INCBIN "baserom.gbc", $4000, $5f99 - $4000
 
+OakSpeech: ; 0x5f99
+	ld a, $24
+	ld hl, $4672
+	rst $8
+	call $04dd
+	call ClearTileMap
+	ld de, $002b
+	call StartMusic
+	call $04a3
+	call $04b6
+	xor a
+	ld [CurPartySpecies], a
+	ld a, POKEMON_PROF
+	ld [TrainerClass], a
+	call $619c
+	ld b, $1c
+	call GetSGBLayout
+	call $616a
+	ld hl, OakText1
+	call PrintText
+	call $04b6
+	call ClearTileMap
+	ld a, $c2
+	ld [$cf60], a
+	ld [CurPartySpecies], a
+	call $3856
+	ld hl, $c4f6
+	call $3786
+	xor a
+	ld [$d123], a
+	ld [$d124], a
+	ld b, $1c
+	call $3340
+	call $6182
+	ld hl, OakText2
+	call PrintText
+	ld hl, OakText4
+	call PrintText
+	call $04b6
+	call ClearTileMap
+	xor a
+	ld [CurPartySpecies], a
+	ld a, POKEMON_PROF
+	ld [TrainerClass], a
+	call $619c
+	ld b, $1c
+	call $3340
+	call $616a
+	ld hl, OakText5
+	call PrintText
+	call $04b6
+	call ClearTileMap
+	xor a
+	ld [CurPartySpecies], a
+	ld a, $22
+	ld hl, $4874
+	rst $8
+	ld b, $1c
+	call $3340
+	call $616a
+	ld hl, OakText6
+	call PrintText
+	call $6074
+	ld hl, OakText7
+	call PrintText
+	ret
+
+OakText1: ; 0x6045
+	TX_FAR _OakText1
+	db "@"
+
+OakText2: ; 0x604a
+	TX_FAR _OakText2
+	db 8
+	ld a,WOOPER
+	call $37ce
+	call $3c55
+	ld hl,OakText3
+	ret
+
+OakText3: ; 0x605b
+	TX_FAR _OakText3
+	db "@"
+
+OakText4: ; 0x6060
+	TX_FAR _OakText4
+	db "@"
+
+OakText5: ; 0x6065
+	TX_FAR _OakText5
+	db "@"
+
+OakText6: ; 0x606a
+	TX_FAR _OakText6
+	db "@"
+
+OakText7: ; 0x606f
+	TX_FAR _OakText7
+	db "@"
+
+INCBIN "baserom.gbc", $6074, $617c - $6074
+
 IntroFadePalettes: ; 0x617c
 	db %01010100
 	db %10101000
@@ -5339,7 +5447,7 @@
 	dbw $00, $0d91
 	dbw $00, $31f3
 	dbw $00, $0485
-	dbw $00, $0fc8
+	dbw BANK(ClearTileMap), ClearTileMap
 	dbw $00, $1ad2
 	dbw $00, $0e4a
 	dbw $03, $4230
@@ -10015,7 +10123,7 @@
 	push bc
 	push hl
 	call $31f3
-	call $0fc8
+	call ClearTileMap
 	call $1ad2
 	ld a, $3e
 	ld hl, $753e
@@ -10023,7 +10131,7 @@
 	pop hl
 	call JpHl
 	call $31f3
-	call $0fc8
+	call ClearTileMap
 	pop bc
 	; restore old values
 	ld a, b
@@ -17007,7 +17115,7 @@
 
 Function117b28:
 	ld hl, MobileStadiumEntryText
-	call $1057
+	call PrintText
 	jp Function117cdd
 
 Function117b31:
@@ -17167,7 +17275,7 @@
 	ld hl, $4061
 	rst FarCall
 	ld hl, MobileStadiumSuccessText
-	call $1057
+	call PrintText
 	ld a, [rSVBK]
 	push af
 	ld a, $5
--- a/text/common_2.asm
+++ b/text/common_2.asm
@@ -1504,7 +1504,7 @@
 	db "on SELECT Button.", $57
 ; 1c1d35
 
-UnknownText_0x1c1d35: ; 1c1d35
+_OakText1: ; 1c1d35
 	db $0, "Hello! Sorry to", $4f
 	db "keep you waiting!", $51
 	db "Welcome to the", $4f
@@ -1514,7 +1514,7 @@
 	db "#MON PROF.", $58
 ; 1c1da4
 
-UnknownText_0x1c1da4: ; 1c1da4
+_OakText2: ; 1c1da4
 	db $0, "This world is in-", $4f
 	db "habited by crea-", $55
 	db "tures that we call", $55
@@ -1522,7 +1522,7 @@
 	db "@"
 ; 1c1de2
 
-UnknownText_0x1c1de2: ; 1c1de2
+_OakText3: ; 1c1de2
 	text_waitbutton
 	db "@"
 ; 1c1de4
@@ -1531,7 +1531,7 @@
 	db "@"
 ; 1c1de5
 
-UnknownText_0x1c1de5: ; 1c1de5
+_OakText4: ; 1c1de5
 	db $0, "People and #MON", $4f
 	db "live together by", $51
 	db "supporting each", $4f
@@ -1541,7 +1541,7 @@
 	db "battle with them.", $58
 ; 1c1e51
 
-UnknownText_0x1c1e51: ; 1c1e51
+_OakText5: ; 1c1e51
 	db $0, "But we don't know", $4f
 	db "everything about", $55
 	db "#MON yet.", $51
@@ -1551,4 +1551,3 @@
 	db "That's why I study", $4f
 	db "#MON every day.", $58
 ; 1c1ec9
-
--- a/text/common_3.asm
+++ b/text/common_3.asm
@@ -1,9 +1,9 @@
-UnknownText_0x1c4000: ; 0x1c4000
+_OakText6: ; 0x1c4000
 	db $0, "Now, what did you", $4f
 	db "say your name was?", $58
 ; 0x1c4026
 
-UnknownText_0x1c4026: ; 0x1c4026
+_OakText7: ; 0x1c4026
 	db $0, $52, ", are you", $4f
 	db "ready?", $51
 	db "Your very own", $4f