mirror of
https://github.com/stevenhowes/CTheEscape.git
synced 2026-05-27 00:03:27 +01:00
50 lines
903 B
C
50 lines
903 B
C
#include "Graphics.h"
|
|
|
|
extern int tick;
|
|
extern int lasttick;
|
|
|
|
void intro()
|
|
{
|
|
int currentstart = 0;
|
|
int introframe = 0;
|
|
|
|
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();
|
|
}
|
|
}
|