64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
//has graphics
|
||
|
||
|
||
$PI,"<2>",2$
|
||
|
||
$PI,"<1>",1$
|
||
|
||
|
||
|
||
|
||
|
||
void EndTsk()
|
||
{
|
||
Sound(0);
|
||
Exit;
|
||
}
|
||
|
||
double t0=0.0;
|
||
|
||
void DrawIt(TssStruct *tss)
|
||
{
|
||
GrBitMap *base=GrAlias(grbase2,tss);
|
||
|
||
//$FG,2$The following draws the normal text.$FG$
|
||
LtfUpdateBothLtf(tss);
|
||
|
||
GrElemsPlot(base,20,8,0,$IB,"<2>",2$);
|
||
if (t0) {
|
||
GrElemsPlot(base,20,24,0,$IB,"<1>",1$);
|
||
Sound((t-t0)*100);
|
||
if (t>t0+0.15)
|
||
t0=0.0;
|
||
}
|
||
GrDel(base);
|
||
}
|
||
|
||
void Song()
|
||
{
|
||
void *old_update=Fs->update_win;
|
||
Fs->update_win=&DrawIt;
|
||
Fs->end_task_cb=&EndTsk;
|
||
music_tempo=2.5;
|
||
try {
|
||
while (!ScanKey) {
|
||
Play("3eBCsAGAGeAAetGAAsBBBBeCDqDeEA",
|
||
"Now, \0I \0su\0 \0u\0 \0ure \0 \0 \0 \0won't \0do\0o\0o\0o \0that \0a\0gain!\r\n\0 \0 \0");
|
||
|
||
t0=t;
|
||
Play("BCsAGAGeAAetGAAsBBBBeCDqDeEA",
|
||
"Now, \0I \0su\0 \0u\0 \0ure \0 \0 \0 \0won't \0do\0o\0o\0o \0that \0a\0gain!\r\n\0 \0 \0");
|
||
Play("2qG3etAAGBB2G3eEFCDqFeAGqC",
|
||
" \0 \0 \0 \0 \0 \0 \0Learn\0ing \0from \0 \0my \0 \0mis\0takes.\r\n\0");
|
||
Play("2G3etAAGBB2G3eEFCDqFeAGqC",
|
||
" \0 \0 \0 \0 \0 \0 \0Learn\0ing \0from \0 \0my \0 \0mis\0takes.\r\n\0");
|
||
}
|
||
} catch
|
||
Fs->catch_except=TRUE;
|
||
Fs->update_win=old_update;
|
||
Sound(0);
|
||
}
|
||
|
||
Song;
|
||
|