diff options
| author | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
| commit | a02a98ee7ada1a658e28698484058be2796dc0df (patch) | |
| tree | 945986054565bd8b5212fc755415096050d1d3a8 /audio/engine_1.asm | |
| parent | Use long option flags for rgbgfx, same as tools/gfx (diff) | |
| parent | Use `const_skip` (diff) | |
| download | pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'audio/engine_1.asm')
| -rw-r--r-- | audio/engine_1.asm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/engine_1.asm b/audio/engine_1.asm index c155dda6..fc70c73d 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -15,9 +15,9 @@ Audio1_UpdateMusic:: ld a, [wMuteAudioAndPauseMusic] and a jr z, .applyAffects - bit 7, a + bit BIT_MUTE_AUDIO, a jr nz, .nextChannel - set 7, a + set BIT_MUTE_AUDIO, a ld [wMuteAudioAndPauseMusic], a xor a ; disable all channels' output ldh [rNR51], a @@ -161,7 +161,7 @@ Audio1_PlayNextNote: cp $4 jr nz, .asm_918c ld a, [wLowHealthAlarm] - bit 7, a + bit BIT_LOW_HEALTH_ALARM, a jr z, .asm_918c call Audio1_EnableChannelOutput ret @@ -206,7 +206,7 @@ Audio1_sound_ret: .dontDisable jr .afterDisable .returnFromCall - res 1, [hl] + res BIT_SOUND_CALL, [hl] ld d, $0 ld a, c add a @@ -386,8 +386,8 @@ Audio1_toggle_perfect_pitch: ld hl, wChannelFlags1 add hl, bc ld a, [hl] - xor $1 - ld [hl], a ; flip bit 0 of wChannelFlags1 + xor 1 << BIT_PERFECT_PITCH + ld [hl], a jp Audio1_sound_ret Audio1_vibrato: @@ -841,7 +841,8 @@ Audio1_note_pitch: bit BIT_PERFECT_PITCH, [hl] ; has toggle_perfect_pitch been used? jr z, .skipFrequencyInc inc e ; if yes, increment the frequency by 1 - jr nc, .skipFrequencyInc + jr nc, .skipFrequencyInc ; Likely a mistake, because `inc` does not set flag C. + ; Fortunately this does not seem to affect any notes that actually occur. inc d .skipFrequencyInc ld hl, wChannelFrequencyLowBytes @@ -971,7 +972,7 @@ Audio1_ApplyWavePatternAndFrequency: cp $4 ret nz ld a, [wLowHealthAlarm] - bit 7, a + bit BIT_LOW_HEALTH_ALARM, a ret z xor a ld [wFrequencyModifier], a |
