Prev: 9CA0 Up: Map Next: 9CBF
9CA8: Play sound FX
Used by the routine at call_play_sound.
Input
C Index of sound FX (1-9), maybe 1 is no sound?
play_sound_fx 9CA8 LD A,(tune_index) Get tune playing
9CAB AND A If zero
9CAC RET Z Then return
9CAD CP $06 Are we playing tune 6?
9CAF JR Z,play_sound_fx_2 Then skip ahead
9CB1 LD A,C A = index of sound FX
9CB2 CP $02 Is it < 2?
9CB4 RET C Then return
This entry point is used by the routines at play_tune_2 and sound_fx_command_5_8.
play_sound_fx_2 9CB5 LD A,C A = index of sound FX
9CB6 PUSH AF Save index
9CB7 CALL init_sound_fx Call next routine
9CBA POP AF Restore index
9CBB CP $09 Is it 9? (if called from play_tune or 9E45)
9CBD RET NZ Return if not
9CBE INC A Index + 1 (now 10) (continue into init_sound_fx)
Prev: 9CA0 Up: Map Next: 9CBF