Team Ai
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes847downloads
SpritePlot3D.txt55 linesDownload Raw Back to Graphics
1 2 3 4 5 6 7 8 9 10      <1>/* Graphics Not Rendered in HTML */11 12 13 14 15 16 17 18 19 20I64 glbl_r[4][4];21 22U0 DrawIt(CTask *,CDC *dc)23{24  I64 *old_r=dc->r;25  dc->x=200;26  dc->y=200;27  dc->z=GR_Z_ALL;28  dc->flags|=DCF_TRANSFORMATION;29  DCDepthBufAlloc(dc);30  DCMat4x4Set(dc,glbl_r); //This assigns to dc->r and sets r_norm.31  DCDepthBufRst(dc);32  Sprite3(dc,0,0,0,<1>);33  dc->r=old_r;34}35 36U0 SpritePlot3D()37{38  F64 theta=0,phi=0;39 40  SettingsPush; //See SettingsPush41  Fs->draw_it=&DrawIt;42  while (!ScanChar) {43    Mat4x4IdentEqu(glbl_r);44    Mat4x4RotX(glbl_r,phi);45    Mat4x4RotZ(glbl_r,theta);46 47    Sleep(40);48    theta+=2*pi/100;49    phi+=2*pi/130;50  }51  SettingsPop;52}53 54SpritePlot3D;55