-
Notifications
You must be signed in to change notification settings - Fork 0
/
hit bonus.c
69 lines (56 loc) · 1.03 KB
/
hit bonus.c
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
63
64
65
66
67
68
69
/***
*void Hit_Bonus
*
*Purpose:
* clear bonus and arrow if hit.
* add one soul to tanks.
*
*Entry:
*
*
*Exit:
*
*
***********************************************/
#include "atari.h"
void Hit_Bonus (
short screen[][ROW],
short BackGround[][ROW + 1],
ARROW *Killing_Arrow,
MONSTER *Dead_Bonus,
int *tanks
)
{
//clear bonus if hrizontal.
Clear_Object(
screen,
BackGround,
Dead_Bonus -> x - 1,
Dead_Bonus -> y,
3, 0
);
//clear bonus if vertical.
Clear_Object(
screen,
BackGround,
Dead_Bonus -> x,
Dead_Bonus -> y - 1,
0, 3
);
Dead_Bonus -> on = false;
Dead_Bonus -> x =COL - 10;
//clear arrow.
Clear_Object(
screen,
BackGround,
Killing_Arrow -> x,
Killing_Arrow -> y,
1, 0
);
Killing_Arrow -> on = false;
Killing_Arrow -> y = -1;
SetColor(YELLOW, BackGround[70][0]);
SetCursor (70, 0);
printf("TANKS:%d", ++*tanks );
sndPlaySound ("Explode.wav", SND_SYNC);
}