init-sounds ( cpu -- )


Vocabulary
roms.space-invaders

Inputs
cpuan object


Outputs
None

Definition


: init-sounds ( cpu -- )
init-openal {
[ 9 gen-sources swap sounds<< ]
[
SOUND-SHOT
"vocab:roms/space-invaders/resources/Shot.wav"
init-sound
]
[
SOUND-UFO
"vocab:roms/space-invaders/resources/Ufo.wav"
init-sound
]
[
sounds>> SOUND-UFO swap nth
AL_LOOPING AL_TRUE set-source-param
]
[
SOUND-BASE-HIT
"vocab:roms/space-invaders/resources/BaseHit.wav"
init-sound
]
[
SOUND-INVADER-HIT
"vocab:roms/space-invaders/resources/InvHit.Wav"
init-sound
]
[
SOUND-WALK1
"vocab:roms/space-invaders/resources/Walk1.wav"
init-sound
]
[
SOUND-WALK2
"vocab:roms/space-invaders/resources/Walk2.wav"
init-sound
]
[
SOUND-WALK3
"vocab:roms/space-invaders/resources/Walk3.wav"
init-sound
]
[
SOUND-WALK4
"vocab:roms/space-invaders/resources/Walk4.wav"
init-sound
]
[
SOUND-UFO-HIT
"vocab:roms/space-invaders/resources/UfoHit.wav"
init-sound
]
[ f swap looping?<< ]
} cleave ;