File size: 915 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
56
57
58
59
60
61
62













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











U0 RotateTank()
{
  CDC *dc=DCAlias;
  DCDepthBufAlloc(dc);
  dc->flags|=DCF_TRANSFORMATION;
  WinHorz(TEXT_COLS/2-12,TEXT_COLS/2+12);
  WinVert(TEXT_ROWS/2-12,TEXT_ROWS/2+12);
  DocClear;
  try {
    while (!ScanChar) {
      DCDepthBufRst(dc);
      Mat4x4IdentEqu(dc->r);
      Mat4x4RotY(dc->r,0.25*Sin(tS/10*2*pi)+pi/2);
      Mat4x4RotX(dc->r,0.4*Sin(tS/5*2*pi));
      Mat4x4RotZ(dc->r,0.25*Sin(tS/10*2*pi)-pi/2);
      Mat4x4Scale(dc->r,0.25+Saw(tS,5));
      DCMat4x4Set(dc,dc->r);//Not needed--Sets scale for pen-width

      dc->x=Fs->pix_width/2;
      dc->y=Fs->pix_height/2;
//Offsets the image Z so that no parts are clipped by
      //the conceptual plane of the scrn.
      dc->z=GR_Z_ALL;

      Sprite3(dc,0,0,0,<1>);
      Refresh;
      DCFill;
    }
  } catch
    PutExcept;

  DCFill;
  DCDel(dc);
}

RotateTank;