Line 0
Link Here
|
|
|
1 |
--- drivers.c.orig |
2 |
+++ drivers.c |
3 |
@@ -12,7 +12,7 @@ |
4 |
* variables (pac_x, pac_y), the direction variables (pac_ix, pac_iy), |
5 |
* and the clipping region (pac_region). |
6 |
*/ |
7 |
-control_pac() |
8 |
+void control_pac() |
9 |
{ |
10 |
register int xx = pac_x, yy = pac_y, i, dx, dy; |
11 |
register char *pc = md[yy >> 4] + (xx >> 4); |
12 |
@@ -89,7 +89,7 @@ |
13 |
* eaten something which is not a ghost -- a dot, a power-dot, |
14 |
* or the fruit. If so, the appropriate action is taken. |
15 |
*/ |
16 |
-check_dots() |
17 |
+void check_dots() |
18 |
{ |
19 |
register char *pi; |
20 |
register int i; |
21 |
@@ -218,7 +218,7 @@ |
22 |
* The function below causes ghosts to follow the player around, with a bit |
23 |
* of randomness thrown in as well. |
24 |
*/ |
25 |
-follow(i) |
26 |
+void follow(i) |
27 |
register int i; |
28 |
{ |
29 |
int xx = ghost_x[i], yy = ghost_y[i]; |
30 |
@@ -289,7 +289,7 @@ |
31 |
* at half speed. It is set up as the driver function during |
32 |
* the ghost-eating periods of the game. |
33 |
*/ |
34 |
-run(i) |
35 |
+void run(i) |
36 |
register int i; |
37 |
{ |
38 |
int xx = ghost_x[i], yy = ghost_y[i]; |
39 |
@@ -358,7 +358,7 @@ |
40 |
* high speed. It is set up as the driver for ghosts which have |
41 |
* been eaten. |
42 |
*/ |
43 |
-go_home(i) |
44 |
+void go_home(i) |
45 |
register int i; |
46 |
{ |
47 |
int xx = ghost_x[i], yy = ghost_y[i]; |
48 |
@@ -459,14 +459,14 @@ |
49 |
* They simply hover around in a circular pattern. Randomness is |
50 |
* used to decide when the ghosts leave the box. |
51 |
*/ |
52 |
-hover(i) |
53 |
+void hover(i) |
54 |
register int i; |
55 |
{ |
56 |
register int yy = ghost_y[i] >> 4, xx = ghost_x[i] >> 4; |
57 |
char *pc = md[yy] + xx; |
58 |
register int *px = ghost_ix + i, *py = ghost_iy + i; |
59 |
|
60 |
- if (xx == door_x) |
61 |
+ if (xx == door_x) { |
62 |
if (yy == (door_y - 1)) { |
63 |
|
64 |
/* |
65 |
@@ -490,6 +490,7 @@ |
66 |
*px = 0, *py = (-2); |
67 |
return; |
68 |
} |
69 |
+ } |
70 |
|
71 |
/* |
72 |
* The rest of the function drives the ghost around the |
73 |
@@ -514,14 +515,14 @@ |
74 |
* the ghost-eating periods of the game -- they move at half |
75 |
* speed. |
76 |
*/ |
77 |
-hover2(i) |
78 |
+void hover2(i) |
79 |
register int i; |
80 |
{ |
81 |
register int yy = ghost_y[i] >> 4, xx = ghost_x[i] >> 4; |
82 |
char *pc = md[yy] + xx; |
83 |
register int *px = ghost_ix + i, *py = ghost_iy + i; |
84 |
|
85 |
- if (xx == door_x) |
86 |
+ if (xx == door_x) { |
87 |
if (yy == (door_y - 1)) { |
88 |
drive[i] = run; |
89 |
run(i); |
90 |
@@ -532,6 +533,7 @@ |
91 |
*px = 0, *py = (-1); |
92 |
return; |
93 |
} |
94 |
+ } |
95 |
|
96 |
if (*px > 0) { |
97 |
if (pc[1]) *px = 0, *py = (-1); |