diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-07 19:48:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 19:48:22 -0400 |
commit | 9571c550b6a0dcb3a4f54513c881661a87271024 (patch) | |
tree | d73507228a57e4f3cece2fb93fe7df3a9439553f /audio/engine_1.asm | |
parent | c480632d5494d04f7f5f0298a31877a2293b564e (diff) | |
parent | bbf2f51a02b2544f1bef32a5868503b474ae2fef (diff) |
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'audio/engine_1.asm')
-rw-r--r-- | audio/engine_1.asm | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/audio/engine_1.asm b/audio/engine_1.asm index 20b992aa..8af8f707 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -20,10 +20,10 @@ Audio1_UpdateMusic:: set 7, a ld [wMuteAudioAndPauseMusic], a xor a ; disable all channels' output - ld [rNR51], a - ld [rNR30], a + ldh [rNR51], a + ldh [rNR30], a ld a, $80 - ld [rNR30], a + ldh [rNR30], a jr .nextChannel .applyAffects call Audio1_ApplyMusicAffects @@ -183,9 +183,9 @@ Audio1_sound_ret: jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 - ld [rNR30], a + ldh [rNR30], a ld a, $80 - ld [rNR30], a + ldh [rNR30], a .skipSfxChannel3 jr nz, .dontDisable ld a, [wDisableChannelOutputWhenSfxEnds] @@ -219,9 +219,9 @@ Audio1_sound_ret: .disableChannelOutput ld hl, Audio1_HWChannelDisableMasks add hl, bc - ld a, [rNR51] + ldh a, [rNR51] and [hl] - ld [rNR51], a + ldh [rNR51], a .afterDisable ld a, [wChannelSoundIDs + Ch5] cp CRY_SFX_START @@ -241,7 +241,7 @@ Audio1_sound_ret: ret c .skipRewind ld a, [wSavedVolume] - ld [rNR50], a + ldh [rNR50], a xor a ld [wSavedVolume], a .skipCry @@ -548,7 +548,7 @@ Audio1_volume: cp $f0 ; is this command a volume? jr nz, Audio1_execute_music ; no call Audio1_GetNextMusicByte - ld [rNR50], a ; store volume + ldh [rNR50], a ; store volume jp Audio1_sound_ret Audio1_execute_music: @@ -638,7 +638,7 @@ Audio1_pitch_sweep: bit BIT_EXECUTE_MUSIC, [hl] jr nz, Audio1_note ; no call Audio1_GetNextMusicByte - ld [rNR10], a + ldh [rNR10], a jp Audio1_sound_ret Audio1_note: @@ -770,9 +770,9 @@ Audio1_note_pitch: ld b, 0 ld hl, Audio1_HWChannelDisableMasks add hl, bc - ld a, [rNR51] + ldh a, [rNR51] and [hl] - ld [rNR51], a ; disable hardware channel 3's output + ldh [rNR51], a ; disable hardware channel 3's output jr .done .notChannel3 ld b, REG_VOLUME_ENVELOPE @@ -844,7 +844,7 @@ Audio1_EnableChannelOutput: ld b, 0 ld hl, Audio1_HWChannelEnableMasks add hl, bc - ld a, [rNR51] + ldh a, [rNR51] or [hl] ; set this channel's bits ld d, a ld a, c @@ -866,7 +866,7 @@ Audio1_EnableChannelOutput: add hl, bc and [hl] ld d, a - ld a, [rNR51] + ldh a, [rNR51] ld hl, Audio1_HWChannelDisableMasks add hl, bc and [hl] ; reset this channel's output bits @@ -874,7 +874,7 @@ Audio1_EnableChannelOutput: ld d, a .skip ld a, d - ld [rNR51], a + ldh [rNR51], a ret Audio1_ApplyDutyCycleAndSoundLength: @@ -928,7 +928,7 @@ Audio1_ApplyWavePatternAndFrequency: ld hl, rWave_0 ld b, $f ld a, $0 ; stop hardware channel 3 - ld [rNR30], a + ldh [rNR30], a .loop ld a, [de] inc de @@ -938,7 +938,7 @@ Audio1_ApplyWavePatternAndFrequency: and a jr nz, .loop ld a, $80 ; start hardware channel 3 - ld [rNR30], a + ldh [rNR30], a pop de .notChannel3 ld a, d @@ -1399,17 +1399,17 @@ Audio1_PlaySound:: ld a, $ff ld [wStereoPanning], a xor a - ld [rNR50], a + ldh [rNR50], a ld a, $8 - ld [rNR10], a + ldh [rNR10], a ld a, 0 - ld [rNR51], a + ldh [rNR51], a xor a - ld [rNR30], a + ldh [rNR30], a ld a, $80 - ld [rNR30], a + ldh [rNR30], a ld a, $77 - ld [rNR50], a + ldh [rNR50], a jp .playSoundCommon .playSfx @@ -1555,7 +1555,7 @@ Audio1_PlaySound:: cp Ch5 jr nz, .skipSweepDisable ld a, $8 - ld [rNR10], a ; sweep off + ldh [rNR10], a ; sweep off .skipSweepDisable ld a, c and a @@ -1565,22 +1565,22 @@ Audio1_PlaySound:: .stopAllAudio ld a, $80 - ld [rNR52], a ; sound hardware on - ld [rNR30], a ; wave playback on + ldh [rNR52], a ; sound hardware on + ldh [rNR30], a ; wave playback on xor a - ld [rNR51], a ; no sound output - ld [rNR32], a ; mute channel 3 (wave channel) + ldh [rNR51], a ; no sound output + ldh [rNR32], a ; mute channel 3 (wave channel) ld a, $8 - ld [rNR10], a ; sweep off - ld [rNR12], a ; mute channel 1 (pulse channel 1) - ld [rNR22], a ; mute channel 2 (pulse channel 2) - ld [rNR42], a ; mute channel 4 (noise channel) + ldh [rNR10], a ; sweep off + ldh [rNR12], a ; mute channel 1 (pulse channel 1) + ldh [rNR22], a ; mute channel 2 (pulse channel 2) + ldh [rNR42], a ; mute channel 4 (noise channel) ld a, $40 - ld [rNR14], a ; counter mode - ld [rNR24], a - ld [rNR44], a + ldh [rNR14], a ; counter mode + ldh [rNR24], a + ldh [rNR44], a ld a, $77 - ld [rNR50], a ; full volume + ldh [rNR50], a ; full volume xor a ld [wUnusedC000], a ld [wDisableChannelOutputWhenSfxEnds], a @@ -1699,10 +1699,10 @@ Audio1_PlaySound:: ld a, [wSavedVolume] and a jr nz, .done - ld a, [rNR50] + ldh a, [rNR50] ld [wSavedVolume], a ld a, $77 - ld [rNR50], a ; full volume + ldh [rNR50], a ; full volume .done ret |