mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 23:55:24 +13:00
Move crysaudio ram from sram to wram
This commit is contained in:
parent
baf447a260
commit
5f87413b23
12 changed files with 253 additions and 379 deletions
|
|
@ -781,10 +781,10 @@ FaintEnemyPokemon:
|
|||
ld [wTempoModifier], a
|
||||
ld a, SFX_FAINT_FALL
|
||||
call PlaySoundWaitForCurrent
|
||||
.sfxwait
|
||||
ld a, [wChannelSoundIDs + Ch5]
|
||||
cp SFX_FAINT_FALL
|
||||
jr z, .sfxwait
|
||||
;.sfxwait
|
||||
; ld a, [wChannelSoundIDs + Ch5]
|
||||
; cp SFX_FAINT_FALL
|
||||
; jr z, .sfxwait
|
||||
ld a, SFX_FAINT_THUD
|
||||
call PlaySound
|
||||
call WaitForSoundToFinish
|
||||
|
|
@ -866,7 +866,7 @@ EndLowHealthAlarm:
|
|||
; the low health alarm and prevents it from reactivating until the next battle.
|
||||
xor a
|
||||
ld [wLowHealthAlarm], a ; turn off low health alarm
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
; ld [wChannelSoundIDs + Ch5], a
|
||||
inc a
|
||||
ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating
|
||||
ret
|
||||
|
|
@ -1864,7 +1864,7 @@ DrawPlayerHUDAndHPBar:
|
|||
ld [hl], $0
|
||||
ret z
|
||||
xor a
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
; ld [wChannelSoundIDs + Ch5], a
|
||||
ret
|
||||
.setLowHealthAlarm
|
||||
ld hl, wLowHealthAlarm
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ EndOfBattle:
|
|||
.resetVariables
|
||||
xor a
|
||||
ld [wLowHealthAlarm], a ;disable low health alarm
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
; ld [wChannelSoundIDs + Ch5], a
|
||||
ld [wIsInBattle], a
|
||||
ld [wBattleType], a
|
||||
ld [wMoveMissed], a
|
||||
|
|
|
|||
|
|
@ -991,7 +991,7 @@ ItemUseMedicine:
|
|||
.notFullHP ; if the pokemon's current HP doesn't equal its max HP
|
||||
xor a
|
||||
ld [wLowHealthAlarm], a ;disable low health alarm
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
; ld [wChannelSoundIDs + Ch5], a
|
||||
push hl
|
||||
push de
|
||||
ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1)
|
||||
|
|
@ -1736,10 +1736,10 @@ ItemUsePokeflute:
|
|||
jr nz, .skipMusic
|
||||
call WaitForSoundToFinish ; wait for sound to end
|
||||
;farcall Music_PokeFluteInBattle ; play in-battle pokeflute music ; XXX
|
||||
.musicWaitLoop ; wait for music to finish playing
|
||||
ld a, [wChannelSoundIDs + Ch7]
|
||||
and a ; music off?
|
||||
jr nz, .musicWaitLoop
|
||||
;.musicWaitLoop ; wait for music to finish playing
|
||||
; ld a, [wChannelSoundIDs + Ch7]
|
||||
; and a ; music off?
|
||||
; jr nz, .musicWaitLoop
|
||||
.skipMusic
|
||||
ld hl, FluteWokeUpText
|
||||
jp PrintText
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@ LoadSAV:
|
|||
call ClearScreen
|
||||
call LoadFontTilePatterns
|
||||
call LoadTextBoxTilePatterns
|
||||
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
call LoadSAV0
|
||||
jr c, .badsum
|
||||
call LoadSAV1
|
||||
|
|
@ -29,9 +25,6 @@ LoadSAV:
|
|||
ld a, $1 ; bad checksum
|
||||
.goodsum
|
||||
ld [wSaveFileStatus], a
|
||||
|
||||
ld a, 0
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
FileDataDestroyedText:
|
||||
|
|
@ -281,18 +274,9 @@ SaveSAVtoSRAM2:
|
|||
SaveSAVtoSRAM::
|
||||
ld a, $2
|
||||
ld [wSaveFileStatus], a
|
||||
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
call SaveSAVtoSRAM0
|
||||
call SaveSAVtoSRAM1
|
||||
call SaveSAVtoSRAM2
|
||||
|
||||
ld a, 0
|
||||
ld [wHaltAudio], a
|
||||
|
||||
ret
|
||||
jp SaveSAVtoSRAM2
|
||||
|
||||
SAVCheckSum:
|
||||
;Check Sum (result[1 byte] is complemented)
|
||||
|
|
@ -407,9 +391,6 @@ WhenYouChangeBoxText:
|
|||
|
||||
CopyBoxToOrFromSRAM:
|
||||
; copy an entire box from hl to de with b as the SRAM bank
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
push hl
|
||||
ld a, SRAM_ENABLE
|
||||
ld [MBC1SRamEnable], a
|
||||
|
|
@ -435,9 +416,6 @@ CopyBoxToOrFromSRAM:
|
|||
xor a
|
||||
ld [MBC1SRamBankingMode], a
|
||||
ld [MBC1SRamEnable], a
|
||||
|
||||
xor a
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
DisplayChangeBoxMenu:
|
||||
|
|
@ -535,9 +513,6 @@ BoxNoText:
|
|||
EmptyAllSRAMBoxes:
|
||||
; marks all boxes in SRAM as empty (initialisation for the first time the
|
||||
; player changes the box)
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
ld a, SRAM_ENABLE
|
||||
ld [MBC1SRamEnable], a
|
||||
ld a, $1
|
||||
|
|
@ -551,9 +526,6 @@ EmptyAllSRAMBoxes:
|
|||
xor a
|
||||
ld [MBC1SRamBankingMode], a
|
||||
ld [MBC1SRamEnable], a
|
||||
|
||||
xor a
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
EmptySRAMBoxesInBank:
|
||||
|
|
@ -585,9 +557,6 @@ EmptySRAMBox:
|
|||
ret
|
||||
|
||||
GetMonCountsForAllBoxes:
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
ld hl, wBoxMonCounts
|
||||
push hl
|
||||
ld a, SRAM_ENABLE
|
||||
|
|
@ -614,8 +583,6 @@ GetMonCountsForAllBoxes:
|
|||
ld a, [wNumInBox]
|
||||
ld [hl], a
|
||||
|
||||
xor a
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
GetMonCountsForBoxesInBank:
|
||||
|
|
@ -637,9 +604,6 @@ SAVCheckRandomID:
|
|||
; checks if Sav file is the same by checking player's name 1st letter
|
||||
; and the two random numbers generated at game beginning
|
||||
; (which are stored at wPlayerID)s
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
ld a, $0a
|
||||
ld [MBC1SRamEnable], a
|
||||
ld a, $01
|
||||
|
|
@ -668,9 +632,6 @@ SAVCheckRandomID:
|
|||
ld a, $00
|
||||
ld [MBC1SRamBankingMode], a
|
||||
ld [MBC1SRamEnable], a
|
||||
|
||||
xor a
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
SaveHallOfFameTeams:
|
||||
|
|
@ -709,9 +670,6 @@ LoadHallOfFameTeams:
|
|||
; fallthrough
|
||||
|
||||
HallOfFame_Copy:
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
ld a, SRAM_ENABLE
|
||||
ld [MBC1SRamEnable], a
|
||||
ld a, $1
|
||||
|
|
@ -722,15 +680,9 @@ HallOfFame_Copy:
|
|||
xor a
|
||||
ld [MBC1SRamBankingMode], a
|
||||
ld [MBC1SRamEnable], a
|
||||
|
||||
xor a
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
ClearSAV:
|
||||
ld a, 1
|
||||
ld [wHaltAudio], a
|
||||
|
||||
ld a, SRAM_ENABLE
|
||||
ld [MBC1SRamEnable], a
|
||||
ld a, $1
|
||||
|
|
@ -746,9 +698,6 @@ ClearSAV:
|
|||
xor a
|
||||
ld [MBC1SRamBankingMode], a
|
||||
ld [MBC1SRamEnable], a
|
||||
|
||||
xor a
|
||||
ld [wHaltAudio], a
|
||||
ret
|
||||
|
||||
PadSRAM_FF:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ EvolveMon:
|
|||
push af
|
||||
xor a
|
||||
ld [wLowHealthAlarm], a
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
; ld [wChannelSoundIDs + Ch5], a
|
||||
dec a ; SFX_STOP_ALL_MUSIC
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ ShakeElevator::
|
|||
ld c, 0 ; BANK(SFX_Safari_Zone_PA)
|
||||
ld a, SFX_SAFARI_ZONE_PA
|
||||
call PlaySound
|
||||
.musicLoop
|
||||
ld a, [wChannelSoundIDs + Ch5]
|
||||
cp SFX_SAFARI_ZONE_PA
|
||||
jr z, .musicLoop
|
||||
;.musicLoop
|
||||
; ld a, [wChannelSoundIDs + Ch5]
|
||||
; cp SFX_SAFARI_ZONE_PA
|
||||
; jr z, .musicLoop
|
||||
call UpdateSprites
|
||||
jp PlayDefaultMusic
|
||||
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ SlotMachine_CheckForMatches:
|
|||
call PrintText
|
||||
.done
|
||||
xor a
|
||||
ld [wMuteAudioAndPauseMusic], a
|
||||
; ld [wMuteAudioAndPauseMusic], a
|
||||
ret
|
||||
.rollWheel3DownByOneSymbol
|
||||
call SlotMachine_AnimWheel3
|
||||
|
|
@ -655,7 +655,7 @@ SlotMachine_PrintPayoutCoins:
|
|||
|
||||
SlotMachine_PayCoinsToPlayer:
|
||||
ld a, $1
|
||||
ld [wMuteAudioAndPauseMusic], a
|
||||
; ld [wMuteAudioAndPauseMusic], a
|
||||
call WaitForSoundToFinish
|
||||
|
||||
; Put 1 in the temp coins variable. This value is added to the player's coins
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue