Files
CTheEscape/!TheEsc/c/Intro
T
2021-04-04 21:09:03 +01:00

51 lines
922 B
C

#include "Graphics.h"
extern int tick;
extern int lasttick;
void intro()
{
int currentstart = 0;
int introframe = 0;
sound_voices(4);
sound_set_voice(1,"WaveSynth-Beep");
sound_set_voice(2,"WaveSynth-Beep");
sound_set_voice(3,"WaveSynth-Beep");
sound_set_voice(4,"WaveSynth-Beep");
sound_composition_init();
sound_composition_load("music.cmpintro");
tick = clock();
sound_composition_start(clock());
draw_sprite("spacebar",(DISPLAY_X/2)-106,50);
while(sound_composition_incomplete())
{
sound_composition_tick(clock());
if(introframe == 0)
{
if(clock() > (tick + 200))
{
introframe++;
draw_sprite("tng_st",320,600);
}
}
if(introframe == 1)
{
if(clock() > (tick + 600))
{
introframe++;
draw_sprite("tng_te",425,500);
}
}
if(input_readkey(98))
sound_composition_stop();
}
}