Split up bank 2; other relabelings

This commit is contained in:
PikalaxALT
2015-10-16 13:35:43 -04:00
parent 1e2ff967aa
commit 4fa6c6daa4
45 changed files with 7856 additions and 7783 deletions

View File

@@ -39,7 +39,7 @@ Joypad:: ; 935
; We can only get four inputs at a time.
; We take d-pad first for no particular reason.
ld a, D_PAD
ld a, R_DPAD
ld [rJOYP], a
; Read twice to give the request time to take.
rept 2
@@ -57,7 +57,7 @@ endr
; Buttons make 8 total inputs (A, B, Select, Start).
; We can fit this into one byte.
ld a, BUTTONS
ld a, R_BUTTONS
ld [rJOYP], a
; Wait for input to stabilize.
rept 6
@@ -285,7 +285,7 @@ Functiona1b:: ; a1b
cp D_UP | SELECT | B_BUTTON
jr z, .asm_a34
ld a, [$ffa9]
ld a, [hJoyLast]
and START | A_BUTTON
jr nz, .asm_a34
@@ -325,29 +325,29 @@ CloseText:: ; a46
Functiona57:: ; a57
call GetJoypad
ld a, [$ffaa]
ld a, [hInMenu]
and a
ld a, [hJoyPressed]
jr z, .asm_a63
jr z, .ok
ld a, [hJoyDown]
.asm_a63
.ok
ld [hJoyLast], a
ld a, [hJoyPressed]
and a
jr z, .asm_a70
jr z, .checkframedelay
ld a, 15
ld [TextDelayFrames], a
ret
.asm_a70
.checkframedelay
ld a, [TextDelayFrames]
and a
jr z, .asm_a7a
jr z, .restartframedelay
xor a
ld [hJoyLast], a
ret
.asm_a7a
.restartframedelay
ld a, 5
ld [TextDelayFrames], a
ret
@@ -356,23 +356,23 @@ Functiona57:: ; a57
Functiona80:: ; a80
ld a, [hConnectionStripLength]
push af
ld a, [$ffb0]
ld a, [hConnectedMapWidth]
push af
xor a
ld [hConnectionStripLength], a
ld a, $6
ld [$ffb0], a
ld [hConnectedMapWidth], a
.asm_a8d
push hl
hlcoord 18, 17
call Functionb06
pop hl
call Functiona57
ld a, [$ffa9]
ld a, [hJoyLast]
and $3
jr z, .asm_a8d
pop af
ld [$ffb0], a
ld [hConnectedMapWidth], a
pop af
ld [hConnectionStripLength], a
ret
@@ -380,7 +380,7 @@ Functiona80:: ; a80
Functionaa5:: ; aa5
call Functiona57
ld a, [$ffa9]
ld a, [hJoyLast]
and A_BUTTON | B_BUTTON
jr z, Functionaa5
ret
@@ -456,16 +456,16 @@ Functionb06:: ; b06
dec a
ld [hConnectionStripLength], a
ret nz
ld a, [$ffb0]
ld a, [hConnectedMapWidth]
dec a
ld [$ffb0], a
ld [hConnectedMapWidth], a
ret nz
ld a, $7a
ld [hl], a
ld a, $ff
ld [hConnectionStripLength], a
ld a, $6
ld [$ffb0], a
ld [hConnectedMapWidth], a
ret
.asm_b27
@@ -477,12 +477,12 @@ Functionb06:: ; b06
ret nz
dec a
ld [hConnectionStripLength], a
ld a, [$ffb0]
ld a, [hConnectedMapWidth]
dec a
ld [$ffb0], a
ld [hConnectedMapWidth], a
ret nz
ld a, $6
ld [$ffb0], a
ld [hConnectedMapWidth], a
ld a, $ee
ld [hl], a
ret

View File

@@ -81,16 +81,16 @@ InterpretMenu2:: ; 0x1d81
call Function1c66
ld a, [wcf91]
bit 7, a
jr z, .asm_1da7 ; 0x1d98 $d
jr z, .cancel ; 0x1d98 $d
call Function1c10
call Function1bc9
call Function1ff8
bit 1, a
jr z, .asm_1da9 ; 0x1da5 $2
.asm_1da7
jr z, .okay ; 0x1da5 $2
.cancel
scf
ret
.asm_1da9
.okay
and a
ret
; 0x1dab
@@ -165,15 +165,15 @@ Function1dfe:: ; 1dfe
call DelayFrames
call WriteBackup
pop af
jr c, .asm_1e16
jr c, .no
ld a, [wcfa9]
cp 2 ; no
jr z, .asm_1e16
jr z, .no
and a
ret
.asm_1e16
ld a, $2
.no
ld a, 2
ld [wcfa9], a
scf
ret
@@ -308,7 +308,7 @@ Function1ebd:: ; 1ebd
; 1eda
Function1eda:: ; 1eda
call Function1cfd
call GetMemTileCoord
ld bc, $002a
add hl, bc
.asm_1ee1
@@ -521,13 +521,13 @@ Function1ff0:: ; 1ff0
Function1ff8:: ; 1ff8
push af
and $3
jr z, .asm_2007
jr z, .nosound
ld hl, wcf81
bit 3, [hl]
jr nz, .asm_2007
jr nz, .nosound
call PlayClickSFX
.asm_2007
.nosound
pop af
ret
; 2009

View File

@@ -159,11 +159,11 @@ Function1bd3:: ; 1bd3
Function1bdd:: ; 1bdd
push bc
push af
ld a, [$ffa9]
and $f0
ld a, [hJoyLast]
and D_PAD
ld b, a
ld a, [hJoyPressed]
and $f
and BUTTONS
or b
ld b, a
pop af
@@ -214,7 +214,7 @@ WriteBackup:: ; 0x1c17
ret
Function1c23:: ; 0x1c23
call Function1cfd
call GetMemTileCoord
call Function1c30
call Function1d19
call Function1c30

View File

@@ -79,6 +79,7 @@ DmgToCgbBGPals:: ; c9f
ld [rBGP], a
push af
; Don't need to be here if CGB
ld a, [hCGB]
and a
jr z, .end
@@ -89,7 +90,7 @@ DmgToCgbBGPals:: ; c9f
ld a, [rSVBK]
push af
ld a, 5
ld a, 5 ; gfx
ld [rSVBK], a
; copy & reorder bg pal buffer
@@ -165,16 +166,21 @@ DmgToCgbObjPals:: ; ccb
Functioncf8:: ; cf8
ld [rOBP0], a
push af
; Don't need to be here if CGB
ld a, [hCGB]
and a
jr z, .asm_d22
jr z, .done
push hl
push de
push bc
ld a, [rSVBK]
push af
ld a, $5
ld a, 5 ; gfx
ld [rSVBK], a
ld hl, OBPals
ld de, Unkn2Pals
ld a, [rOBP0]
@@ -183,13 +189,15 @@ Functioncf8:: ; cf8
call CopyPals
ld a, $1
ld [hCGBPalUpdate], a
pop af
ld [rSVBK], a
pop bc
pop de
pop hl
.asm_d22
.done
pop af
ret
; d24

View File

@@ -17,19 +17,19 @@ ClearBox:: ; fb6
ld a, " "
FillBoxWithByte::
.col
.row
push bc
push hl
.row
.col
ld [hli], a
dec c
jr nz, .row
jr nz, .col
pop hl
ld bc, SCREEN_WIDTH
add hl, bc
pop bc
dec b
jr nz, .col
jr nz, .row
ret
; fc8
@@ -61,8 +61,11 @@ ClearScreen:: ; fdb
TextBox:: ; fe8
; Draw a text box width c height b at hl.
; Dimensions do not include the border.
; Draw a text box at hl with room for
; b lines of c characters each.
; Places a border around the textbox,
; then switches the palette to the
; text black-and-white scheme.
push bc
push hl
call TextBoxBorder
@@ -263,14 +266,14 @@ endm
dict "<ROCKET>", RocketChar
dict "<TM>", TMChar
dict "<TRNER>", TrainerChar
dict $23, Char23
dict $22, Char22
dict $23, PlaceKougeki
dict "<LNBRK>", Char22
dict "<CONT>", ContText
dict "<......>", SixDotsChar
dict "<DONE>", DoneText
dict "<PROMPT>", PromptText
dict "<PKMN>", PlacePKMN
dict $24, PlacePOKE
dict "<POKE>", PlacePOKE
dict $25, NextChar
dict2 $1f, " "
dict "<DEXEND>", PlaceDexEnd
@@ -349,7 +352,7 @@ TMChar: print_name TMCharText ; 11b0
PCChar: print_name PCCharText ; 11b7
RocketChar: print_name RocketCharText ; 11be
PlacePOKe: print_name PlacePOKeText ; 11c5
Char23: print_name Char23Text ; 11cc
PlaceKougeki: print_name KougekiText ; 11cc
SixDotsChar: print_name SixDotsCharText ; 11d3
PlacePKMN: print_name PlacePKMNText ; 11da
PlacePOKE: print_name PlacePOKEText ; 11e1
@@ -444,7 +447,7 @@ TrainerCharText:: db "TRAINER@" ; 1276
PCCharText:: db "PC@" ; 127e
RocketCharText:: db "ROCKET@" ; 1281
PlacePOKeText:: db "POKé@" ; 1288
Char23Text:: db "こうげき@" ; 128d
KougekiText:: db "こうげき@" ; 128d
SixDotsCharText:: db "……@" ; 1292
EnemyText:: db "Enemy @" ; 1295
PlacePKMNText:: db "<PK><MN>@" ; PK MN ; 129c

View File

@@ -99,7 +99,7 @@ Function1c89:: ; 1c89
ld a, [wcf91]
bit 4, a
ret z
call Function1cfd
call GetMemTileCoord
ld a, [de]
ld c, a
inc de
@@ -109,7 +109,7 @@ Function1c89:: ; 1c89
; 1cbb
Function1cbb:: ; 1cbb
call Function1cfd
call GetMemTileCoord
call Function1c53
dec b
dec c
@@ -139,7 +139,7 @@ Function1cc6:: ; 1cc6
; 1ce1
Function1ce1:: ; 1ce1
call Function1cfd
call GetMemTileCoord
ld bc, $0015
add hl, bc
call Function1c53
@@ -150,7 +150,7 @@ Function1ce1:: ; 1ce1
; 1cf1
Function1cf1:: ; 1cf1
call Function1cfd
call GetMemTileCoord
call Function1c53
inc c
inc b
@@ -159,7 +159,7 @@ Function1cf1:: ; 1cf1
; 1cfd
Function1cfd:: ; 1cfd
GetMemTileCoord:: ; 1cfd
ld a, [wcf83]
ld c, a
ld a, [wcf82]

View File

@@ -146,7 +146,7 @@ VBlank0:: ; 2b1
rst Bankswitch
ld a, [hSeconds]
ld [$ffe3], a
ld [hSecondsBackup], a
ret
; 325