diff options
Diffstat (limited to 'audio/engine_1.asm')
-rw-r--r-- | audio/engine_1.asm | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/audio/engine_1.asm b/audio/engine_1.asm index a31572f3..f9b4166a 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -41,7 +41,7 @@ Audio1_ApplyMusicAffects: ld hl, wChannelNoteDelayCounters ; delay until next note add hl, bc ld a, [hl] - cp $1 ; if the delay is 1, play next note + cp 1 ; if the delay is 1, play next note jp z, Audio1_PlayNextNote dec a ; otherwise, decrease the delay timer ld [hl], a @@ -163,8 +163,8 @@ Audio1_PlayNextNote: Audio1_sound_ret: call Audio1_GetNextMusicByte ld d, a - cp $ff ; is this command a sound_ret? - jp nz, Audio1_sound_call ; no + cp sound_ret_cmd + jp nz, Audio1_sound_call ld b, 0 ld hl, wChannelFlags1 add hl, bc @@ -251,8 +251,8 @@ Audio1_sound_ret: ret Audio1_sound_call: - cp $fd ; is this command a sound_call? - jp nz, Audio1_sound_loop ; no + cp sound_call_cmd + jp nz, Audio1_sound_loop call Audio1_GetNextMusicByte push af call Audio1_GetNextMusicByte @@ -288,8 +288,8 @@ Audio1_sound_call: jp Audio1_sound_ret Audio1_sound_loop: - cp $fe ; is this command a sound_loop? - jp nz, Audio1_note_type ; no + cp sound_loop_cmd + jp nz, Audio1_note_type call Audio1_GetNextMusicByte ld e, a and a @@ -327,8 +327,8 @@ Audio1_sound_loop: Audio1_note_type: and $f0 - cp $d0 ; is this command a note_type? - jp nz, Audio1_toggle_perfect_pitch ; no + cp note_type_cmd + jp nz, Audio1_toggle_perfect_pitch ld a, d and $f ld b, $0 @@ -371,8 +371,8 @@ Audio1_note_type: Audio1_toggle_perfect_pitch: ld a, d - cp $e8 ; is this command a toggle_perfect_pitch? - jr nz, Audio1_vibrato ; no + cp toggle_perfect_pitch_cmd + jr nz, Audio1_vibrato ld b, 0 ld hl, wChannelFlags1 add hl, bc @@ -382,8 +382,8 @@ Audio1_toggle_perfect_pitch: jp Audio1_sound_ret Audio1_vibrato: - cp $ea ; is this command a vibrato? - jr nz, Audio1_pitch_slide ; no + cp vibrato_cmd + jr nz, Audio1_pitch_slide call Audio1_GetNextMusicByte ld b, 0 ld hl, wChannelVibratoDelayCounters @@ -430,8 +430,8 @@ Audio1_vibrato: jp Audio1_sound_ret Audio1_pitch_slide: - cp $eb ; is this command a pitch_slide? - jr nz, Audio1_duty_cycle ; no + cp pitch_slide_cmd + jr nz, Audio1_duty_cycle call Audio1_GetNextMusicByte ld b, 0 ld hl, wChannelPitchSlideLengthModifiers @@ -461,8 +461,8 @@ Audio1_pitch_slide: jp Audio1_note_length Audio1_duty_cycle: - cp $ec ; is this command a duty_cycle? - jr nz, Audio1_tempo ; no + cp duty_cycle_cmd + jr nz, Audio1_tempo call Audio1_GetNextMusicByte rrca rrca @@ -474,8 +474,8 @@ Audio1_duty_cycle: jp Audio1_sound_ret Audio1_tempo: - cp $ed ; is this command a tempo? - jr nz, Audio1_stereo_panning ; no + cp tempo_cmd + jr nz, Audio1_stereo_panning ld a, c cp Ch5 jr nc, .sfxChannel @@ -503,16 +503,16 @@ Audio1_tempo: jp Audio1_sound_ret Audio1_stereo_panning: - cp $ee ; is this command a stereo_panning? - jr nz, Audio1_unknownmusic0xef ; no + cp stereo_panning_cmd + jr nz, Audio1_unknownmusic0xef call Audio1_GetNextMusicByte ld [wStereoPanning], a ; store panning jp Audio1_sound_ret ; this appears to never be used Audio1_unknownmusic0xef: - cp $ef ; is this command an unknownmusic0xef? - jr nz, Audio1_duty_cycle_pattern ; no + cp unknownmusic0xef_cmd + jr nz, Audio1_duty_cycle_pattern call Audio1_GetNextMusicByte push bc call Audio1_PlaySound @@ -528,8 +528,8 @@ Audio1_unknownmusic0xef: jp Audio1_sound_ret Audio1_duty_cycle_pattern: - cp $fc ; is this command a duty_cycle_pattern? - jr nz, Audio1_volume ; no + cp duty_cycle_pattern_cmd + jr nz, Audio1_volume call Audio1_GetNextMusicByte ld b, 0 ld hl, wChannelDutyCyclePatterns @@ -545,15 +545,15 @@ Audio1_duty_cycle_pattern: jp Audio1_sound_ret Audio1_volume: - cp $f0 ; is this command a volume? - jr nz, Audio1_execute_music ; no + cp volume_cmd + jr nz, Audio1_execute_music call Audio1_GetNextMusicByte ldh [rNR50], a ; store volume jp Audio1_sound_ret Audio1_execute_music: - cp $f8 ; is this command an execute_music? - jr nz, Audio1_octave ; no + cp execute_music_cmd + jr nz, Audio1_octave ld b, $0 ld hl, wChannelFlags2 add hl, bc @@ -562,8 +562,8 @@ Audio1_execute_music: Audio1_octave: and $f0 - cp $e0 ; is this command an octave? - jr nz, Audio1_sfx_note ; no + cp octave_cmd + jr nz, Audio1_sfx_note ld hl, wChannelOctaves ld b, 0 add hl, bc @@ -574,7 +574,7 @@ Audio1_octave: ; sfx_note is either square_note or noise_note depending on the channel Audio1_sfx_note: - cp $20 ; is this command a sfx_note? + cp sfx_note_cmd jr nz, Audio1_pitch_sweep ld a, c cp Ch4 ; is this a noise or sfx channel? @@ -630,8 +630,8 @@ Audio1_pitch_sweep: cp Ch5 jr c, Audio1_note ; if not a sfx ld a, d - cp $10 ; is this command a pitch_sweep? - jr nz, Audio1_note ; no + cp pitch_sweep_cmd + jr nz, Audio1_note ld b, $0 ld hl, wChannelFlags2 add hl, bc @@ -647,12 +647,12 @@ Audio1_note: jr nz, Audio1_note_length ; if not noise channel ld a, d and $f0 - cp $b0 ; is this command a drum_note? + cp drum_note_cmd jr z, .drum_note - jr nc, Audio1_note_length ; no + jr nc, Audio1_note_length ; this executes when on the noise channel and - ; the command id is less than $b0 + ; the command id is less than drum_note_cmd ($b0) ; in this case, the upper nybble is used as the noise instrument ($1-$a) ; and the lower nybble is the length minus 1 (0-15) ; however, this doesn't work for instrument #2 because the command id @@ -748,7 +748,7 @@ Audio1_note_length: Audio1_note_pitch: pop af and $f0 - cp $c0 ; compare to rest + cp rest_cmd jr nz, .notRest ld a, c cp Ch5 @@ -1330,7 +1330,7 @@ Audio1_CalculateFrequency: Audio1_PlaySound:: ld [wSoundID], a - cp $ff + cp SFX_STOP_ALL_MUSIC jp z, .stopAllAudio cp MAX_SFX_ID_1 jp z, .playSfx |