home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
maj
/
4401
/
exc.arj
/
FGDOC
/
EXAMPLES
/
C
/
15-07.C
< prev
next >
Wrap
Text File
|
1994-01-24
|
633b
|
36 lines
#include <fastgraf.h>
void main(void);
#define ESC 27
void main()
{
int color;
int old_mode;
unsigned char key, aux;
old_mode = fg_getmode();
fg_setmode(fg_automode());
color = 0;
fg_musicb("O4 L16 CC#DD#EFF#GG#AA#B O+ CC#DD#EFF#GG#AA#B$",-1);
while (fg_playing())
{
color = (color + 1) & 15;
fg_setcolor(color);
fg_rect(0,fg_getmaxx(),0,fg_getmaxy());
fg_waitfor(4);
fg_intkey(&key,&aux);
if (key == ESC)
fg_hush();
else if (key+aux != 0)
fg_hushnext();
}
fg_setmode(old_mode);
fg_reset();
}