You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Add labels for ram values discovered while disassembling battle music.
This commit is contained in:
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
|
; XXX this is not the start of the routine
|
||||||
; determine what music plays in battle
|
; determine what music plays in battle
|
||||||
ld a, [$d22f] ; are we fighting a trainer?
|
ld a, [OtherTrainerClass] ; are we fighting a trainer?
|
||||||
and a
|
and a
|
||||||
jr nz, .trainermusic
|
jr nz, .trainermusic
|
||||||
ld a, BANK(RegionCheck)
|
ld a, BANK(RegionCheck)
|
||||||
ld hl, RegionCheck
|
ld hl, RegionCheck
|
||||||
rst $8 ; XXX check region
|
rst $8
|
||||||
ld a, e
|
ld a, e
|
||||||
and a
|
and a
|
||||||
jr nz, .kantowild
|
jr nz, .kantowild
|
||||||
ld de, $0029 ; johto daytime wild battle music
|
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?
|
cp $2 ; nighttime?
|
||||||
jr nz, .done ; if no, then done
|
jr nz, .done ; if no, then done
|
||||||
ld de, $004a ; johto nighttime wild battle music
|
ld de, $004a ; johto nighttime wild battle music
|
||||||
@@ -5685,12 +5685,12 @@ INCBIN "baserom.gbc",$2C41a,$2ee8f - $2C41a
|
|||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
ld de, $0030 ; rival battle music
|
ld de, $0030 ; rival battle music
|
||||||
ld a, [$d22f]
|
ld a, [OtherTrainerClass]
|
||||||
cp RIVAL1
|
cp RIVAL1
|
||||||
jr z, .done
|
jr z, .done
|
||||||
cp RIVAL2
|
cp RIVAL2
|
||||||
jr nz, .othertrainer
|
jr nz, .othertrainer
|
||||||
ld a, [$d231] ; which rival are we fighting?
|
ld a, [OtherTrainerID] ; which rival are we fighting?
|
||||||
cp $4
|
cp $4
|
||||||
jr c, .done ; if it's not the fight inside Indigo Plateau, we're done
|
jr c, .done ; if it's not the fight inside Indigo Plateau, we're done
|
||||||
ld de, $002f ; rival indigo plateau battle music
|
ld de, $002f ; rival indigo plateau battle music
|
||||||
@@ -117026,10 +117026,11 @@ RegionCheck: ; 0x1caea1
|
|||||||
jr z, .johto
|
jr z, .johto
|
||||||
cp $0 ; special
|
cp $0 ; special
|
||||||
jr nz, .checkagain
|
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 b, a
|
||||||
ld a, [$dcae]
|
ld a, [BackupMapNumber]
|
||||||
ld c, a
|
ld c, a
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
.checkagain
|
.checkagain
|
||||||
|
33
wram.asm
33
wram.asm
@@ -56,6 +56,30 @@ BattleMonSpclAtk: ; c646
|
|||||||
BattleMonSpclDef: ; c648
|
BattleMonSpclDef: ; c648
|
||||||
ds 2
|
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]
|
SECTION "OtherTrainerParty",BSS[$d280]
|
||||||
|
|
||||||
OTPartyMonHeader: ; d280
|
OTPartyMonHeader: ; d280
|
||||||
@@ -649,6 +673,15 @@ Box13Name: ; 0xdb31
|
|||||||
Box14Name: ; 0xdb3a
|
Box14Name: ; 0xdb3a
|
||||||
ds 9
|
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]
|
SECTION "PlayerMapInfo", BSS[$dcb4]
|
||||||
|
|
||||||
WarpNumber: ; 0xdcb4
|
WarpNumber: ; 0xdcb4
|
||||||
|
Reference in New Issue
Block a user