File size: 662 Bytes
806d4b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55









      <1>/* Graphics Not Rendered in HTML */









I64 glbl_r[4][4];

U0 DrawIt(CTask *,CDC *dc)
{
  I64 *old_r=dc->r;
  dc->x=200;
  dc->y=200;
  dc->z=GR_Z_ALL;
  dc->flags|=DCF_TRANSFORMATION;
  DCDepthBufAlloc(dc);
  DCMat4x4Set(dc,glbl_r); //This assigns to dc->r and sets r_norm.
  DCDepthBufRst(dc);
  Sprite3(dc,0,0,0,<1>);
  dc->r=old_r;
}

U0 SpritePlot3D()
{
  F64 theta=0,phi=0;

  SettingsPush; //See SettingsPush
  Fs->draw_it=&DrawIt;
  while (!ScanChar) {
    Mat4x4IdentEqu(glbl_r);
    Mat4x4RotX(glbl_r,phi);
    Mat4x4RotZ(glbl_r,theta);

    Sleep(40);
    theta+=2*pi/100;
    phi+=2*pi/130;
  }
  SettingsPop;
}

SpritePlot3D;