57 lines
1017 B
C++
57 lines
1017 B
C++
/*This uses $LK,"gr.dc2",A="MN:CGrGlbls"$. It must be redrawn 60 fps
|
|
by the winmgr task with a Fs->draw_it() callback.
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$SP,"<1>",BI=1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CDC *dc;
|
|
|
|
U0 DrawIt(CTask *,CDC *)
|
|
{
|
|
DCDepthBufRst(dc);
|
|
Sprite3(dc,0,0,0,$IB,"<1>",BI=1$);
|
|
}
|
|
|
|
U0 SpritePlot3D()
|
|
{
|
|
F64 é=0,è=0;
|
|
dc=DCAlias(gr.dc2,Fs);
|
|
|
|
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
|
Fs->draw_it=&DrawIt;
|
|
Preempt(OFF); //We don't want update during matrix change, mid draw.
|
|
dc->x=200;
|
|
dc->y=200;
|
|
dc->z=GR_Z_ALL;
|
|
dc->flags|=DCF_TRANSFORMATION;
|
|
DCAllocDepthBuf(dc);
|
|
while (!ScanChar) {
|
|
GrIdentEqu(dc->r);
|
|
GrRotXEqu(dc->r,è);
|
|
GrRotZEqu(dc->r,é);
|
|
GrSetRotMat(dc,dc->r);
|
|
|
|
Sleep(40);
|
|
|
|
é+=2*ã/100;
|
|
è+=2*ã/130;
|
|
}
|
|
SettingsPop;
|
|
DCDel(dc);
|
|
}
|
|
|
|
SpritePlot3D;
|
|
|