mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Add labels for ram values discovered while disassembling battle music.
This commit is contained in:
parent
9037759c1a
commit
3501a0be8c
17
main.asm
17
main.asm
@ -5639,17 +5639,17 @@ INCBIN "baserom.gbc",$2C41a,$2ee8f - $2C41a
|
||||
|
||||
; XXX this is not the start of the routine
|
||||
; determine what music plays in battle
|
||||
ld a, [$d22f] ; are we fighting a trainer?
|
||||
ld a, [OtherTrainerClass] ; are we fighting a trainer?
|
||||
and a
|
||||
jr nz, .trainermusic
|
||||
ld a, BANK(RegionCheck)
|
||||
ld hl, RegionCheck
|
||||
rst $8 ; XXX check region
|
||||
rst $8
|
||||
ld a, e
|
||||
and a
|
||||
jr nz, .kantowild
|
||||
ld de, $0029 ; johto daytime wild battle music
|
||||
ld a, [$d269] ; check time of day
|
||||
ld a, [TimeOfDay] ; check time of day
|
||||
cp $2 ; nighttime?
|
||||
jr nz, .done ; if no, then done
|
||||
ld de, $004a ; johto nighttime wild battle music
|
||||
@ -5685,12 +5685,12 @@ INCBIN "baserom.gbc",$2C41a,$2ee8f - $2C41a
|
||||
jr c, .done
|
||||
|
||||
ld de, $0030 ; rival battle music
|
||||
ld a, [$d22f]
|
||||
ld a, [OtherTrainerClass]
|
||||
cp RIVAL1
|
||||
jr z, .done
|
||||
cp RIVAL2
|
||||
jr nz, .othertrainer
|
||||
ld a, [$d231] ; which rival are we fighting?
|
||||
ld a, [OtherTrainerID] ; which rival are we fighting?
|
||||
cp $4
|
||||
jr c, .done ; if it's not the fight inside Indigo Plateau, we're done
|
||||
ld de, $002f ; rival indigo plateau battle music
|
||||
@ -117026,10 +117026,11 @@ RegionCheck: ; 0x1caea1
|
||||
jr z, .johto
|
||||
cp $0 ; special
|
||||
jr nz, .checkagain
|
||||
; XXX if in map $00, load map group / map id from... where???
|
||||
ld a, [$dcad]
|
||||
|
||||
; If in map $00, load map group / map id from backup locations
|
||||
ld a, [BackupMapGroup]
|
||||
ld b, a
|
||||
ld a, [$dcae]
|
||||
ld a, [BackupMapNumber]
|
||||
ld c, a
|
||||
call GetWorldMapLocation
|
||||
.checkagain
|
||||
|
33
wram.asm
33
wram.asm
@ -56,6 +56,30 @@ BattleMonSpclAtk: ; c646
|
||||
BattleMonSpclDef: ; c648
|
||||
ds 2
|
||||
|
||||
SECTION "OtherTrainerClass",BSS[$d22f]
|
||||
|
||||
OtherTrainerClass: ; 0xd22f
|
||||
; class (Youngster, Bug Catcher, etc.) of opposing trainer
|
||||
; 0 if opponent is a wild Pokémon, not a trainer
|
||||
ds 1
|
||||
|
||||
Wramd230: ; 0xd230
|
||||
; XXX what is this for
|
||||
ds 1
|
||||
|
||||
OtherTrainerID: ; 0xd231
|
||||
; which trainer of the class that you're fighting
|
||||
; (Joey, Mikey, Albert, etc.)
|
||||
ds 1
|
||||
|
||||
SECTION "Timeofday",BSS[$d269]
|
||||
|
||||
TimeOfDay: ; 0xd269
|
||||
; 0 if morn
|
||||
; 1 if day
|
||||
; 2 if nite
|
||||
ds 1
|
||||
|
||||
SECTION "OtherTrainerParty",BSS[$d280]
|
||||
|
||||
OTPartyMonHeader: ; d280
|
||||
@ -649,6 +673,15 @@ Box13Name: ; 0xdb31
|
||||
Box14Name: ; 0xdb3a
|
||||
ds 9
|
||||
|
||||
SECTION "BackupMapInfo", BSS[$dcad]
|
||||
|
||||
; used on maps like second floor pokécenter, which are reused, so we know which
|
||||
; map to return to
|
||||
BackupMapGroup: ; 0xdcad
|
||||
ds 1
|
||||
BackupMapNumber: ; 0xdcae
|
||||
ds 1
|
||||
|
||||
SECTION "PlayerMapInfo", BSS[$dcb4]
|
||||
|
||||
WarpNumber: ; 0xdcb4
|
||||
|
Loading…
Reference in New Issue
Block a user