mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Merge pull request #253 from yenatch/master
Clean up music and battle interfaces in home.asm.
This commit is contained in:
commit
1f30919037
@ -2,6 +2,7 @@
|
||||
; name length
|
||||
PLAYER_NAME_LENGTH EQU 8
|
||||
PKMN_NAME_LENGTH EQU 11
|
||||
NAME_LENGTH EQU 11
|
||||
|
||||
; boxes
|
||||
NUM_BOXES EQU 14
|
||||
|
File diff suppressed because it is too large
Load Diff
598
home/audio.asm
Normal file
598
home/audio.asm
Normal file
File diff suppressed because it is too large
Load Diff
337
home/battle.asm
Normal file
337
home/battle.asm
Normal file
@ -0,0 +1,337 @@
|
||||
UserPartyAttr:: ; 3945
|
||||
push af
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr nz, .ot
|
||||
pop af
|
||||
jr BattlePartyAttr
|
||||
.ot
|
||||
pop af
|
||||
jr OTPartyAttr
|
||||
; 3951
|
||||
|
||||
|
||||
OpponentPartyAttr:: ; 3951
|
||||
push af
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .ot
|
||||
pop af
|
||||
jr BattlePartyAttr
|
||||
.ot
|
||||
pop af
|
||||
jr OTPartyAttr
|
||||
; 395d
|
||||
|
||||
|
||||
BattlePartyAttr:: ; 395d
|
||||
; Get attribute a from the active BattleMon's party struct.
|
||||
push bc
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, PartyMons
|
||||
add hl, bc
|
||||
ld a, [CurBattleMon]
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ret
|
||||
; 396d
|
||||
|
||||
|
||||
OTPartyAttr:: ; 396d
|
||||
; Get attribute a from the active EnemyMon's party struct.
|
||||
push bc
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, OTPartyMon1Species
|
||||
add hl, bc
|
||||
ld a, [CurOTMon]
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ret
|
||||
; 397d
|
||||
|
||||
|
||||
ResetDamage:: ; 397d
|
||||
xor a
|
||||
ld [CurDamage], a
|
||||
ld [CurDamage + 1], a
|
||||
ret
|
||||
; 3985
|
||||
|
||||
SetPlayerTurn:: ; 3985
|
||||
xor a
|
||||
ld [hBattleTurn], a
|
||||
ret
|
||||
; 3989
|
||||
|
||||
SetEnemyTurn:: ; 3989
|
||||
ld a, 1
|
||||
ld [hBattleTurn], a
|
||||
ret
|
||||
; 398e
|
||||
|
||||
|
||||
UpdateOpponentInParty:: ; 398e
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, UpdateEnemyMonInParty
|
||||
jr UpdateBattleMonInParty
|
||||
; 3995
|
||||
|
||||
UpdateUserInParty:: ; 3995
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, UpdateBattleMonInParty
|
||||
jr UpdateEnemyMonInParty
|
||||
; 399c
|
||||
|
||||
UpdateBattleMonInParty:: ; 399c
|
||||
; Update level, status, current HP
|
||||
|
||||
ld a, [CurBattleMon]
|
||||
|
||||
Function399f:: ; 399f
|
||||
ld hl, PartyMon1Level
|
||||
call GetPartyLocation
|
||||
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, BattleMonLevel
|
||||
ld bc, BattleMonMaxHP - BattleMonLevel
|
||||
jp CopyBytes
|
||||
; 39b0
|
||||
|
||||
UpdateEnemyMonInParty:: ; 39b0
|
||||
; Update level, status, current HP
|
||||
|
||||
; No wildmons.
|
||||
ld a, [IsInBattle]
|
||||
dec a
|
||||
ret z
|
||||
|
||||
ld a, [CurOTMon]
|
||||
ld hl, OTPartyMon1Level
|
||||
call GetPartyLocation
|
||||
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, EnemyMonLevel
|
||||
ld bc, EnemyMonMaxHP - EnemyMonLevel
|
||||
jp CopyBytes
|
||||
; 39c9
|
||||
|
||||
|
||||
RefreshBattleHuds:: ; 39c9
|
||||
call UpdateBattleHuds
|
||||
ld c, 3
|
||||
call DelayFrames
|
||||
jp WaitBGMap
|
||||
; 39d4
|
||||
|
||||
UpdateBattleHuds:: ; 39d4
|
||||
callba Function3df48
|
||||
callba Function3e036
|
||||
ret
|
||||
; 39e1
|
||||
|
||||
|
||||
GetBattleVar:: ; 39e1
|
||||
; Preserves hl.
|
||||
push hl
|
||||
call _GetBattleVar
|
||||
pop hl
|
||||
ret
|
||||
; 39e7
|
||||
|
||||
_GetBattleVar:: ; 39e7
|
||||
; Get variable from pair a, depending on whose turn it is.
|
||||
; There are 21 variable pairs.
|
||||
|
||||
push bc
|
||||
|
||||
ld hl, .battlevarpairs
|
||||
ld c, a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
; Enemy turn uses the second byte instead.
|
||||
; This lets battle variable calls be side-neutral.
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .getvar
|
||||
inc hl
|
||||
|
||||
.getvar
|
||||
; var id
|
||||
ld a, [hl]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
|
||||
ld hl, .vars
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
ld a, [hl]
|
||||
|
||||
pop bc
|
||||
ret
|
||||
|
||||
.battlevarpairs
|
||||
dw .substatus1, .substatus2, .substatus3, .substatus4, .substatus5
|
||||
dw .substatus1opp, .substatus2opp, .substatus3opp, .substatus4opp, .substatus5opp
|
||||
dw .status, .statusopp, .animation, .effect, .power, .type
|
||||
dw .curmove, .lastcounter, .lastcounteropp, .lastmove, .lastmoveopp
|
||||
|
||||
const_def
|
||||
const PLAYER_SUBSTATUS_1
|
||||
const ENEMY_SUBSTATUS_1
|
||||
const PLAYER_SUBSTATUS_2
|
||||
const ENEMY_SUBSTATUS_2
|
||||
const PLAYER_SUBSTATUS_3
|
||||
const ENEMY_SUBSTATUS_3
|
||||
const PLAYER_SUBSTATUS_4
|
||||
const ENEMY_SUBSTATUS_4
|
||||
const PLAYER_SUBSTATUS_5
|
||||
const ENEMY_SUBSTATUS_5
|
||||
const PLAYER_STATUS
|
||||
const ENEMY_STATUS
|
||||
const PLAYER_MOVE_ANIMATION
|
||||
const ENEMY_MOVE_ANIMATION
|
||||
const PLAYER_MOVE_EFFECT
|
||||
const ENEMY_MOVE_EFFECT
|
||||
const PLAYER_MOVE_POWER
|
||||
const ENEMY_MOVE_POWER
|
||||
const PLAYER_MOVE_TYPE
|
||||
const ENEMY_MOVE_TYPE
|
||||
const PLAYER_CUR_MOVE
|
||||
const ENEMY_CUR_MOVE
|
||||
const PLAYER_COUNTER_MOVE
|
||||
const ENEMY_COUNTER_MOVE
|
||||
const PLAYER_LAST_MOVE
|
||||
const ENEMY_LAST_MOVE
|
||||
|
||||
; player enemy
|
||||
.substatus1 db PLAYER_SUBSTATUS_1, ENEMY_SUBSTATUS_1
|
||||
.substatus1opp db ENEMY_SUBSTATUS_1, PLAYER_SUBSTATUS_1
|
||||
.substatus2 db PLAYER_SUBSTATUS_2, ENEMY_SUBSTATUS_2
|
||||
.substatus2opp db ENEMY_SUBSTATUS_2, PLAYER_SUBSTATUS_2
|
||||
.substatus3 db PLAYER_SUBSTATUS_3, ENEMY_SUBSTATUS_3
|
||||
.substatus3opp db ENEMY_SUBSTATUS_3, PLAYER_SUBSTATUS_3
|
||||
.substatus4 db PLAYER_SUBSTATUS_4, ENEMY_SUBSTATUS_4
|
||||
.substatus4opp db ENEMY_SUBSTATUS_4, PLAYER_SUBSTATUS_4
|
||||
.substatus5 db PLAYER_SUBSTATUS_5, ENEMY_SUBSTATUS_5
|
||||
.substatus5opp db ENEMY_SUBSTATUS_5, PLAYER_SUBSTATUS_5
|
||||
.status db PLAYER_STATUS, ENEMY_STATUS
|
||||
.statusopp db ENEMY_STATUS, PLAYER_STATUS
|
||||
.animation db PLAYER_MOVE_ANIMATION, ENEMY_MOVE_ANIMATION
|
||||
.effect db PLAYER_MOVE_EFFECT, ENEMY_MOVE_EFFECT
|
||||
.power db PLAYER_MOVE_POWER, ENEMY_MOVE_POWER
|
||||
.type db PLAYER_MOVE_TYPE, ENEMY_MOVE_TYPE
|
||||
.curmove db PLAYER_CUR_MOVE, ENEMY_CUR_MOVE
|
||||
.lastcounter db PLAYER_COUNTER_MOVE, ENEMY_COUNTER_MOVE
|
||||
.lastcounteropp db ENEMY_COUNTER_MOVE, PLAYER_COUNTER_MOVE
|
||||
.lastmove db PLAYER_LAST_MOVE, ENEMY_LAST_MOVE
|
||||
.lastmoveopp db ENEMY_LAST_MOVE, PLAYER_LAST_MOVE
|
||||
|
||||
.vars
|
||||
dw PlayerSubStatus1, EnemySubStatus1
|
||||
dw PlayerSubStatus2, EnemySubStatus2
|
||||
dw PlayerSubStatus3, EnemySubStatus3
|
||||
dw PlayerSubStatus4, EnemySubStatus4
|
||||
dw PlayerSubStatus5, EnemySubStatus5
|
||||
dw BattleMonStatus, EnemyMonStatus
|
||||
dw PlayerMoveAnimation, EnemyMoveAnimation
|
||||
dw PlayerMoveEffect, EnemyMoveEffect
|
||||
dw PlayerMovePower, EnemyMovePower
|
||||
dw PlayerMoveType, EnemyMoveType
|
||||
dw CurPlayerMove, CurEnemyMove
|
||||
dw LastEnemyCounterMove, LastPlayerCounterMove
|
||||
dw LastPlayerMove, LastEnemyMove
|
||||
; 3a90
|
||||
|
||||
|
||||
Function3a90:: ; 3a90
|
||||
inc hl
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, [hli]
|
||||
ld [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
ld a, e
|
||||
ld l, a
|
||||
ld a, d
|
||||
ld h, a
|
||||
ld de, $d00c
|
||||
ld bc, $0028
|
||||
call CopyBytes
|
||||
pop af
|
||||
ld [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
ret
|
||||
; 3ab2
|
||||
|
||||
|
||||
MobileTextBorder:: ; 3ab2
|
||||
|
||||
CELL_PHONE_TOP EQU $5e
|
||||
CELL_PHONE_BOTTOM EQU $5f
|
||||
|
||||
; For mobile link battles only.
|
||||
ld a, [InLinkBattle]
|
||||
cp 4
|
||||
ret c
|
||||
|
||||
; Draw a cell phone icon at the
|
||||
; top right corner of the border.
|
||||
hlcoord 19, 12
|
||||
ld [hl], CELL_PHONE_TOP
|
||||
hlcoord 19, 13
|
||||
ld [hl], CELL_PHONE_BOTTOM
|
||||
ret
|
||||
; 3ac3
|
||||
|
||||
|
||||
BattleTextBox:: ; 3ac3
|
||||
; Open a textbox and print text at hl.
|
||||
push hl
|
||||
call SpeechTextBox
|
||||
call MobileTextBorder
|
||||
call Function1ad2
|
||||
call Function321c
|
||||
pop hl
|
||||
call PrintTextBoxText
|
||||
ret
|
||||
; 3ad5
|
||||
|
||||
|
||||
StdBattleTextBox:: ; 3ad5
|
||||
; Open a textbox and print battle text at 20:hl.
|
||||
|
||||
GLOBAL BattleText
|
||||
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
|
||||
ld a, BANK(BattleText)
|
||||
rst Bankswitch
|
||||
|
||||
call BattleTextBox
|
||||
|
||||
pop af
|
||||
rst Bankswitch
|
||||
ret
|
||||
; 3ae1
|
@ -172,7 +172,7 @@ Init:: ; 17d
|
||||
|
||||
call SoundRestart
|
||||
xor a
|
||||
ld [CurMusic], a
|
||||
ld [wMapMusic], a
|
||||
jp GameInit
|
||||
; 245
|
||||
|
||||
|
55
home/map.asm
55
home/map.asm
@ -1034,7 +1034,7 @@ Function2653:: ; 2653
|
||||
; 2674
|
||||
|
||||
Function2674:: ; 2674
|
||||
callba Unknown_0x974f3
|
||||
callba Function974f3
|
||||
ld a, [ScriptMode]
|
||||
push af
|
||||
ld hl, ScriptFlags
|
||||
@ -2021,8 +2021,8 @@ Function2bae:: ; 2bae
|
||||
callba Function8c001
|
||||
call Function2173
|
||||
call Function2821
|
||||
ld a, $9
|
||||
call Function3cb4
|
||||
ld a, 9
|
||||
call SkipMusic
|
||||
pop af
|
||||
rst Bankswitch
|
||||
|
||||
@ -2259,48 +2259,51 @@ GetWorldMapLocation:: ; 0x2caf
|
||||
ret
|
||||
; 0x2cbd
|
||||
|
||||
Function2cbd:: ; 2cbd
|
||||
GetMapHeaderMusic:: ; 2cbd
|
||||
RADIO_TOWER_MUSIC EQU 7
|
||||
|
||||
push hl
|
||||
push bc
|
||||
ld de, $0006
|
||||
ld de, 6 ; music
|
||||
call GetMapHeaderMember
|
||||
ld a, c
|
||||
cp $64
|
||||
jr z, .asm_2cee
|
||||
bit 7, c
|
||||
jr nz, .asm_2cda
|
||||
cp MUSIC_MAHOGANY_MART
|
||||
jr z, .mahoganymart
|
||||
bit RADIO_TOWER_MUSIC, c
|
||||
jr nz, .radiotower
|
||||
callba Function8b342
|
||||
ld e, c
|
||||
ld d, $0
|
||||
.asm_2cd7
|
||||
ld d, 0
|
||||
.done
|
||||
pop bc
|
||||
pop hl
|
||||
ret
|
||||
|
||||
.asm_2cda
|
||||
.radiotower
|
||||
ld a, [StatusFlags2]
|
||||
bit 0, a
|
||||
jr z, .asm_2ce6
|
||||
ld de, $0056
|
||||
jr .asm_2cd7
|
||||
jr z, .clearedradiotower
|
||||
ld de, MUSIC_ROCKET_OVERTURE
|
||||
jr .done
|
||||
|
||||
.asm_2ce6
|
||||
.clearedradiotower
|
||||
; the rest of the byte
|
||||
ld a, c
|
||||
and $7f
|
||||
and 1 << RADIO_TOWER_MUSIC - 1
|
||||
ld e, a
|
||||
ld d, $0
|
||||
jr .asm_2cd7
|
||||
ld d, 0
|
||||
jr .done
|
||||
|
||||
.asm_2cee
|
||||
.mahoganymart
|
||||
ld a, [StatusFlags2]
|
||||
bit 7, a
|
||||
jr z, .asm_2cfa
|
||||
ld de, $0048
|
||||
jr .asm_2cd7
|
||||
jr z, .clearedmahogany
|
||||
ld de, MUSIC_ROCKET_HIDEOUT
|
||||
jr .done
|
||||
|
||||
.asm_2cfa
|
||||
ld de, $0026
|
||||
jr .asm_2cd7
|
||||
.clearedmahogany
|
||||
ld de, MUSIC_CHERRYGROVE_CITY
|
||||
jr .done
|
||||
; 2cff
|
||||
|
||||
Function2cff:: ; 2cff
|
||||
|
130
main.asm
130
main.asm
@ -3747,7 +3747,7 @@ Function5ae8: ; 5ae8
|
||||
call DelayFrame
|
||||
ld de, MUSIC_MAIN_MENU
|
||||
ld a, e
|
||||
ld [CurMusic], a
|
||||
ld [wMapMusic], a
|
||||
call PlayMusic
|
||||
callba MainMenu
|
||||
jp Function6219
|
||||
@ -7940,8 +7940,8 @@ SpecialsPointers: ; c029
|
||||
dbw BANK(Functionc230), Functionc230
|
||||
dbw BANK(SpecialSeenMon), SpecialSeenMon
|
||||
dbw BANK(WaitSFX),WaitSFX
|
||||
dbw BANK(Function3cdf), Function3cdf
|
||||
dbw BANK(Function3d47), Function3d47
|
||||
dbw BANK(PlayMapMusic), PlayMapMusic
|
||||
dbw BANK(RestartMapMusic), RestartMapMusic
|
||||
dbw BANK(Function12324), Function12324
|
||||
dbw BANK(Function8379), Function8379
|
||||
dbw BANK(Functionc25a), Functionc25a
|
||||
@ -8402,7 +8402,7 @@ SpecialSnorlaxAwake: ; 0xc43d
|
||||
; ScriptVar is 1 if the conditions are met, otherwise 0.
|
||||
|
||||
; check background music
|
||||
ld a, [CurMusic]
|
||||
ld a, [wMapMusic]
|
||||
cp MUSIC_POKE_FLUTE_CHANNEL
|
||||
jr nz, .nope
|
||||
|
||||
@ -10774,7 +10774,7 @@ Functiond0bc: ; d0bc
|
||||
call MaxVolume
|
||||
ld de, MUSIC_BICYCLE
|
||||
ld a, e
|
||||
ld [CurMusic], a
|
||||
ld [wMapMusic], a
|
||||
call PlayMusic
|
||||
ld a, $1
|
||||
ret
|
||||
@ -21177,13 +21177,13 @@ Function1344a: ; 1344a
|
||||
ld a, e
|
||||
ld [$d03f], a
|
||||
ld a, d
|
||||
ld [MartPointer], a
|
||||
ld [$d040], a
|
||||
call Function1345a
|
||||
ret
|
||||
; 1345a
|
||||
|
||||
Function1345a: ; 1345a
|
||||
ld de, CurMart
|
||||
ld de, $d0f0
|
||||
ld bc, $0004
|
||||
ld hl, $d03f
|
||||
ld a, [hli]
|
||||
@ -23072,6 +23072,8 @@ AddSpriteGFX: ; 142e5
|
||||
|
||||
|
||||
LoadSpriteGFX: ; 14306
|
||||
; Bug: b is not preserved, so
|
||||
; it's useless as a loop count.
|
||||
|
||||
ld hl, UsedSprites
|
||||
ld b, $20
|
||||
@ -25882,11 +25884,11 @@ MapSetupCommands: ; 15440
|
||||
dbw BANK(EnableLCD), EnableLCD
|
||||
dbw BANK(DisableLCD), DisableLCD
|
||||
dbw BANK(SoundRestart), SoundRestart
|
||||
dbw BANK(Function3cdf), Function3cdf
|
||||
dbw BANK(Function3d47), Function3d47
|
||||
dbw BANK(Function3cbc), Function3cbc
|
||||
dbw BANK(PlayMapMusic), PlayMapMusic
|
||||
dbw BANK(RestartMapMusic), RestartMapMusic
|
||||
dbw BANK(FadeToMapMusic), FadeToMapMusic
|
||||
dbw BANK(Function15574), Function15574
|
||||
dbw BANK(Function3d03), Function3d03
|
||||
dbw BANK(EnterMapMusic), EnterMapMusic
|
||||
dbw BANK(Function15587), Function15587
|
||||
dbw BANK(Function3cae), Function3cae
|
||||
dbw BANK(Function24cd), Function24cd
|
||||
@ -26045,8 +26047,8 @@ Function1554e: ; 1554e (5:554e)
|
||||
; 15567
|
||||
|
||||
Function15567: ; 15567
|
||||
ld a, $6
|
||||
call Function3cb4
|
||||
ld a, 6
|
||||
call SkipMusic
|
||||
ret
|
||||
; 1556d
|
||||
|
||||
@ -27077,7 +27079,7 @@ Function15c25: ; 15c25
|
||||
ld l, a
|
||||
push hl
|
||||
inc hl
|
||||
ld bc, DefaultFlypoint
|
||||
ld bc, $d002
|
||||
ld de, CurMart + 1
|
||||
.asm_15c33
|
||||
ld a, [hli]
|
||||
@ -27316,7 +27318,7 @@ Function15da5: ; 15da5
|
||||
ld a, [$d107]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, MartPointer
|
||||
ld hl, $d040
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -27357,7 +27359,7 @@ Function15df9: ; 15df9
|
||||
ld a, [$d107]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, MartPointer
|
||||
ld hl, $d040
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -29488,12 +29490,12 @@ Function16be4: ; 16be4
|
||||
|
||||
ld de, UnownDexATile
|
||||
ld hl, $8ef0
|
||||
ld bc, $0501
|
||||
lb bc, BANK(UnownDexBTile), 1
|
||||
call Request1bpp
|
||||
|
||||
ld de, UnownDexBTile
|
||||
ld hl, $8f50
|
||||
ld bc, $0501
|
||||
lb bc, BANK(UnownDexBTile), 1
|
||||
call Request1bpp
|
||||
|
||||
ld hl, TileMap
|
||||
@ -29554,7 +29556,7 @@ Function16be4: ; 16be4
|
||||
ld a, [$cf63]
|
||||
push af
|
||||
callba Function84560
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
pop af
|
||||
ld [$cf63], a
|
||||
jr .asm_16c6b
|
||||
@ -29969,7 +29971,7 @@ Function16f5e:: ; 16f5e
|
||||
call Function1d6e
|
||||
call Function16f70
|
||||
call Function2b4d
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
jp Function2dcf
|
||||
; 16f70
|
||||
|
||||
@ -40609,7 +40611,7 @@ Function2a111: ; 2a111
|
||||
Function2a124:: ; 2a124
|
||||
; Pokemon March and Ruins of Alph signal double encounter rate.
|
||||
; Pokemon Lullaby halves encounter rate.
|
||||
ld a, [CurMusic]
|
||||
ld a, [wMapMusic]
|
||||
cp MUSIC_POKEMON_MARCH
|
||||
jr z, .asm_2a135
|
||||
cp MUSIC_RUINS_OF_ALPH_RADIO
|
||||
@ -47388,8 +47390,8 @@ Function414b7: ; 414b7
|
||||
ld hl, PokedexSlowpokeLZ
|
||||
ld de, VTiles0
|
||||
call Decompress
|
||||
ld a, $6
|
||||
call Function3cb4
|
||||
ld a, 6
|
||||
call SkipMusic
|
||||
call EnableLCD
|
||||
ret
|
||||
|
||||
@ -47893,7 +47895,7 @@ Function423ff: ; 423ff
|
||||
ret nz
|
||||
ld a, [$d268]
|
||||
and a
|
||||
call nz, Function3d47
|
||||
call nz, RestartMapMusic
|
||||
ret
|
||||
; 42414
|
||||
|
||||
@ -49099,7 +49101,7 @@ Function447fb: ; 0x447fb
|
||||
|
||||
Function44806: ; 0x44806
|
||||
xor a
|
||||
ld [CurMart], a
|
||||
ld [$d0f0], a
|
||||
ld a, $1
|
||||
ld [$d0f1], a
|
||||
.asm_4480f
|
||||
@ -49112,11 +49114,11 @@ Function44806: ; 0x44806
|
||||
call Function1ad2
|
||||
ld a, [$d0f1]
|
||||
ld [$cf88], a
|
||||
ld a, [CurMart]
|
||||
ld a, [$d0f0]
|
||||
ld [$d0e4], a
|
||||
call Function350c
|
||||
ld a, [$d0e4]
|
||||
ld [CurMart], a
|
||||
ld [$d0f0], a
|
||||
ld a, [$cfa9]
|
||||
ld [$d0f1], a
|
||||
ld a, [$cf73]
|
||||
@ -52964,7 +52966,7 @@ MainMenu_MysteryGift: ; 49ef5
|
||||
MainMenu_Mobile: ; 49efc
|
||||
call WhiteBGMap
|
||||
ld a, MUSIC_MOBILE_ADAPTER_MENU
|
||||
ld [CurMusic], a
|
||||
ld [wMapMusic], a
|
||||
ld de, MUSIC_MOBILE_ADAPTER_MENU
|
||||
call Function4a6c5
|
||||
Function49f0a: ; 49f0a
|
||||
@ -53031,7 +53033,7 @@ Function49f16: ; 49f16
|
||||
call WhiteBGMap
|
||||
call ClearTileMap
|
||||
ld a, MUSIC_MAIN_MENU
|
||||
ld [CurMusic], a
|
||||
ld [wMapMusic], a
|
||||
ld de, MUSIC_MAIN_MENU
|
||||
call Function4a6c5
|
||||
ret
|
||||
@ -57194,7 +57196,7 @@ Function4ddd6: ; 4ddd6 (13:5dd6)
|
||||
|
||||
; no known jump sources
|
||||
Function4dde6: ; 4dde6 (13:5de6)
|
||||
call Function3c74
|
||||
call IsSFXPlaying
|
||||
ret nc
|
||||
ld a, [$cf63]
|
||||
inc a
|
||||
@ -61140,7 +61142,7 @@ Function50db9: ; 50db9
|
||||
.asm_50dd8
|
||||
cp $5
|
||||
jr nz, .asm_50de6
|
||||
ld hl, CurMart
|
||||
ld hl, $d0f0
|
||||
ld de, PokemonNames
|
||||
ld a, $1
|
||||
jr .asm_50dfc
|
||||
@ -61154,7 +61156,7 @@ Function50db9: ; 50db9
|
||||
jr .asm_50dfc
|
||||
|
||||
.asm_50df4
|
||||
ld hl, CurMart
|
||||
ld hl, $d0f0
|
||||
ld de, Function50000
|
||||
ld a, $4
|
||||
|
||||
@ -62432,7 +62434,7 @@ TryStep: ; 8016b
|
||||
call CheckLandPermissions
|
||||
jr c, .asm_801be
|
||||
|
||||
call Function80341
|
||||
call IsNPCInFront
|
||||
and a
|
||||
jr z, .asm_801be
|
||||
cp 2
|
||||
@ -62490,17 +62492,17 @@ TryStep: ; 8016b
|
||||
TrySurfStep: ; 801c0
|
||||
|
||||
call CheckWaterPermissions
|
||||
ld [MartPointer], a
|
||||
ld [$d040], a
|
||||
jr c, .asm_801f1
|
||||
|
||||
call Function80341
|
||||
call IsNPCInFront
|
||||
ld [$d03f], a
|
||||
and a
|
||||
jr z, .asm_801f1
|
||||
cp 2
|
||||
jr z, .asm_801f1
|
||||
|
||||
ld a, [MartPointer]
|
||||
ld a, [$d040]
|
||||
and a
|
||||
jr nz, .ExitWater
|
||||
|
||||
@ -62511,7 +62513,7 @@ TrySurfStep: ; 801c0
|
||||
|
||||
.ExitWater
|
||||
call WaterToLandSprite
|
||||
call Function3cdf ; PlayMapMusic
|
||||
call PlayMapMusic
|
||||
ld a, STEP_WALK
|
||||
call DoStep
|
||||
ld a, 6
|
||||
@ -62773,7 +62775,7 @@ GetMovementAction: ; 802ec
|
||||
; 80341
|
||||
|
||||
|
||||
Function80341: ; 80341
|
||||
IsNPCInFront: ; 80341
|
||||
|
||||
ld a, 0
|
||||
ld [hConnectionStripLength], a
|
||||
@ -65883,7 +65885,7 @@ Function8474c: ; 8474c
|
||||
; 84753
|
||||
|
||||
Function84753: ; 84753
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
ret
|
||||
; 84757
|
||||
|
||||
@ -69841,7 +69843,7 @@ Function89d0d: ; 89d0d (22:5d0d)
|
||||
call Function89240
|
||||
ld c, $18
|
||||
call DelayFrames
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
ret
|
||||
; 89d4e (22:5d4e)
|
||||
|
||||
@ -81610,8 +81612,8 @@ Function90bea: ; 90bea (24:4bea)
|
||||
call Function90c4e
|
||||
callba Function8cf53
|
||||
call Function90d32
|
||||
ld a, $8
|
||||
call Function3cb4
|
||||
ld a, 8
|
||||
call SkipMusic
|
||||
ld a, $e3
|
||||
ld [rLCDC], a
|
||||
call Function90d70
|
||||
@ -82923,13 +82925,13 @@ Function91492: ; 91492
|
||||
cp $fe
|
||||
jr z, .asm_914a3
|
||||
cp $ff
|
||||
call z, Function3d03
|
||||
call z, EnterMapMusic
|
||||
xor a
|
||||
ld [$c6dc], a
|
||||
ret
|
||||
|
||||
.asm_914a3
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
xor a
|
||||
ld [$c6dc], a
|
||||
ret
|
||||
@ -83359,7 +83361,7 @@ Function91854: ; 91854 (24:5854)
|
||||
call PlayMusic
|
||||
pop de
|
||||
ld a, e
|
||||
ld [CurMusic], a ; $c2c0
|
||||
ld [wMapMusic], a
|
||||
call PlayMusic
|
||||
ret
|
||||
|
||||
@ -83446,8 +83448,8 @@ Function9191c: ; 9191c
|
||||
call DisableLCD
|
||||
call Function90c4e
|
||||
callba Function8cf53
|
||||
ld a, $8
|
||||
call Function3cb4
|
||||
ld a, 8
|
||||
call SkipMusic
|
||||
ld a, $e3
|
||||
ld [rLCDC], a
|
||||
call Function90d56
|
||||
@ -96955,8 +96957,8 @@ Functione33e8: ; e33e8 (38:73e8)
|
||||
ld hl, PCSelectLZ
|
||||
ld de, $8000
|
||||
call Decompress
|
||||
ld a, $6
|
||||
call Function3cb4
|
||||
ld a, 6
|
||||
call SkipMusic
|
||||
call EnableLCD
|
||||
ret
|
||||
; e3419 (38:7419)
|
||||
@ -97617,7 +97619,7 @@ Options_Sound: ; e43dd
|
||||
|
||||
.SetMono
|
||||
res 5, [hl]
|
||||
call Function3d47 ;reload the music
|
||||
call RestartMapMusic
|
||||
|
||||
.ToggleMono
|
||||
ld de, .Mono
|
||||
@ -97625,7 +97627,7 @@ Options_Sound: ; e43dd
|
||||
|
||||
.SetStereo
|
||||
set 5, [hl]
|
||||
call Function3d47 ;reload the music
|
||||
call RestartMapMusic
|
||||
|
||||
.ToggleStereo
|
||||
ld de, .Stereo
|
||||
@ -99934,7 +99936,7 @@ Functione5516: ; e5516 (39:5516)
|
||||
push af
|
||||
ld a, $5
|
||||
ld [rSVBK], a ; $ff00+$70
|
||||
ld hl, CurMartEnd ; $d100 (aliases: LYOverrides)
|
||||
ld hl, LYOverrides
|
||||
ld bc, $90
|
||||
xor a
|
||||
call ByteFill
|
||||
@ -99953,7 +99955,7 @@ Functione552f: ; e552f (39:552f)
|
||||
ld a, [$cf64]
|
||||
and $1
|
||||
jr z, .asm_e5548
|
||||
ld hl, CurMartEnd ; $d100 (aliases: LYOverrides)
|
||||
ld hl, LYOverrides
|
||||
ld a, [hl]
|
||||
inc a
|
||||
ld bc, $5f
|
||||
@ -99965,7 +99967,7 @@ Functione552f: ; e552f (39:552f)
|
||||
inc a
|
||||
ld bc, $31
|
||||
call ByteFill
|
||||
ld a, [CurMartEnd] ; $d100 (aliases: LYOverrides)
|
||||
ld a, [LYOverrides + 0]
|
||||
ld [hSCX], a ; $ff00+$cf
|
||||
pop af
|
||||
ld [rSVBK], a ; $ff00+$70
|
||||
@ -101561,7 +101563,7 @@ NPCTrade:: ; fcba8
|
||||
ld hl, TradedForText
|
||||
call PrintText
|
||||
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
|
||||
ld a, TRADE_COMPLETE
|
||||
|
||||
@ -112685,7 +112687,7 @@ Function11b7e5: ; 11b7e5
|
||||
|
||||
.asm_11b872
|
||||
call Function2b3c
|
||||
call Function3d47
|
||||
call RestartMapMusic
|
||||
ret
|
||||
; 11b879
|
||||
|
||||
@ -114152,7 +114154,7 @@ Function11c7bc: ; 11c7bc (47:47bc)
|
||||
jr nz, .asm_11c7d0
|
||||
ret
|
||||
.asm_11c7e9
|
||||
ld hl, CurMartEnd ; $d100 (aliases: LYOverrides)
|
||||
ld hl, $d100
|
||||
ld a, [$cd26]
|
||||
ld e, a
|
||||
add hl, de
|
||||
@ -114186,8 +114188,8 @@ Function11c7bc: ; 11c7bc (47:47bc)
|
||||
pop de
|
||||
ret
|
||||
.asm_11c814
|
||||
ld hl, BattleMonSpclDef ; $c648
|
||||
ld a, [CreditsTimer] ; $cd22
|
||||
ld hl, $c648
|
||||
ld a, [$cd22]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
add hl, de
|
||||
@ -114336,13 +114338,13 @@ Function11c8f6: ; 11c8f6 (47:48f6)
|
||||
add [hl]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld hl, CurMartEnd ; $d100 (aliases: LYOverrides)
|
||||
ld hl, $d100
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
jr .asm_11c911
|
||||
.asm_11c938
|
||||
ld hl, BattleMonSpclDef ; $c648
|
||||
ld a, [CreditsTimer] ; $cd22
|
||||
ld hl, $c648
|
||||
ld a, [$cd22]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
add hl, de
|
||||
@ -117747,7 +117749,7 @@ Function17d2ce: ; 17d2ce
|
||||
ld [rSVBK], a
|
||||
ld de, MUSIC_MOBILE_CENTER
|
||||
ld a, e
|
||||
ld [CurMusic], a
|
||||
ld [wMapMusic], a
|
||||
ld [MusicFadeIDLo], a
|
||||
ld a, d
|
||||
ld [MusicFadeIDHi], a
|
||||
@ -119158,7 +119160,7 @@ Function17ff23: ; 17ff23
|
||||
ret z
|
||||
ld a, $8
|
||||
ld [MusicFade], a
|
||||
ld a, [CurMusic]
|
||||
ld a, [wMapMusic]
|
||||
ld [MusicFadeIDLo], a
|
||||
xor a
|
||||
ld [MusicFadeIDHi], a
|
||||
|
@ -257,7 +257,7 @@ Function17a7ff: ; 17a7ff (5e:67ff)
|
||||
|
||||
; no known jump sources
|
||||
Function17a81a: ; 17a81a (5e:681a)
|
||||
call Function3c74
|
||||
call IsSFXPlaying
|
||||
ret nc
|
||||
ld a, [hJoyPressed] ; $ff00+$a7
|
||||
and $3
|
||||
|
Loading…
x
Reference in New Issue
Block a user