-
Notifications
You must be signed in to change notification settings - Fork 0
/
clear object.c
62 lines (52 loc) · 1.14 KB
/
clear object.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
/***
*void Clear_Object
*
*Purpose:
* put zero in screen arrey and space on screen.
*
*Entry:
*
* short screen[][ROW] = hold the real position on screen.
* short BackGround[][ROW + 1] = hold the back ground colors numbers.
* int X = the X of the starting point.
* int Y = the Y of the starting point.
* int Wide = number of char horizontal.
* int High = number of char vertical.
*
*Exit:
*
*******************************************************************************/
#include "atari.h"
void Clear_Object (
short screen[][ROW],
short BackGround[][ROW + 1],
int X,
int Y,
int Wide,
int High
)
{
int j;
SetCursor (X, Y);
//clear verticals shapes.
for (j = 0; j < Wide; j++)
{
screen[X + j][Y] = 0;
SetColor(
BLACK,
BackGround[X + j] [Y]
);
putch (SPACE);
}
//clear horizental shapes.
for (j = 0; j < High; j++)
{
SetCursor (X, Y + j);
screen[X][Y + j] = 0;
SetColor(
BLACK,
BackGround[X] [Y + j]
);
putch (SPACE);
}
}