52 lines
4.8 KiB
C++
52 lines
4.8 KiB
C++
//7 has graphics
|
|
|
|
|
|
|
|
$SP,"<1>",BI=1$
|
|
|
|
$BG,7$
|
|
|
|
$SP,"<2>",BI=2$
|
|
|
|
$BG$
|
|
F64 t0=Beat;
|
|
|
|
U0 DrawIt(CTask *task,CDC *dc)
|
|
{
|
|
I64 w=task->pix_width,h=task->pix_height;
|
|
F64 t=(Beat-t0-16.5)/2,
|
|
x=w*Saw(t,2.0),
|
|
y=h*Sqr((x-w>>1)/w>>1),
|
|
dx=w/2,
|
|
dy=h*2*((x-w>>1)/w>>1),
|
|
é=Arg(dx,dy);
|
|
if (0<t<8) {
|
|
SpriteZ3B(dc,x,y,0,$IB,"<3>",BI=3$,0.3*Sin(30*t)+é);
|
|
SpriteZ3B(dc,x,y+20*FullSaw(30*t,0.5),0,$IB,"<4>",BI=4$,0.3*Sin(t)+é);
|
|
}
|
|
}
|
|
|
|
U0 Song()
|
|
{
|
|
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
|
Fs->draw_it=&DrawIt;
|
|
Fs->task_end_cb=&SndTaskEndCB;
|
|
MusicSettingsRst;
|
|
music.tempo=2.0;
|
|
music.stacatto_factor= 0.902;
|
|
try {
|
|
while (!ScanKey) {
|
|
t0=Beat;
|
|
Play("M9/8");
|
|
Play("3qAeCBAq.CsAAqAeCBA2q.G3sBC");
|
|
Play("qAeDCAhBeFsEEeDq.CM4/4");
|
|
Play("sAFAFeF2GsG3B2G3BqGeAsAAetEGDE2G3DeGsGG");
|
|
Play("AFAFeF2GsG3B2G3BqGeAsAAetEGDE2G3DeGsGG");
|
|
}
|
|
} catch
|
|
PutExcept;
|
|
SettingsPop;
|
|
}
|
|
|
|
Song;
|
|
|