File size: 682 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



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


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

U0 DrawIt(CTask *task,CDC *dc)
{
  I64 x,y;

  x=ms.pos.x-task->pix_left;
  y=ms.pos.y-task->pix_top;
  Sprite3(dc,x,y,0,<1>);

  x=task->pix_width>>1;
  y=task->pix_height>>1;

  dc->color=ROP_COLLISION;
  dc->bkcolor=WHITE;
  dc->collision_cnt=0;
  Sprite3(dc,x,y,0,<1>);

  dc->color=ROP_EQU;
  GrPrint(dc,0,(task->pix_height-FONT_HEIGHT)>>1,
        "Collisions:%d",dc->collision_cnt);

  if (!dc->collision_cnt)
    Sprite3(dc,x,y,0,<1>);
  else
    Sprite3(dc,x,y,0,<2>);
}

U0 Collision()
{
  SettingsPush; //See SettingsPush
  Fs->draw_it=&DrawIt;
  PressAKey;
  SettingsPop;
}

Collision;