updated on Tue Jan 17 16:10:12 UTC 2012
[aur-mirror.git] / xkobo / 01-modernize.patch
blobc8ee922701d48dc06bf9f5fb0de5f228061a326f
1 --- xkobo-1.11/map.h.old 2009-06-15 20:42:15.756238318 -0400
2 +++ xkobo-1.11/map.h 2009-06-15 20:43:30.449564382 -0400
3 @@ -38,10 +38,10 @@
4 #define HIT_MASK (CORE | U_MASK | R_MASK | D_MASK | L_MASK)
6 class _map{
7 - const int sx_log2 = MAP_SIZEX_LOG2;
8 - const int sy_log2 = MAP_SIZEY_LOG2;
9 - const int sx = 1 << sx_log2;
10 - const int sy = 1 << sy_log2;
11 + static const int sx_log2 = MAP_SIZEX_LOG2;
12 + static const int sy_log2 = MAP_SIZEY_LOG2;
13 + static const int sx = 1 << sx_log2;
14 + static const int sy = 1 << sy_log2;
15 int sitex[SITE_MAX];
16 int sitey[SITE_MAX];
17 int site_max;
18 --- xkobo-1.11/xkobo.C.old 2009-06-15 20:43:56.626227950 -0400
19 +++ xkobo-1.11/xkobo.C 2009-06-15 20:45:29.656429086 -0400
20 @@ -51,7 +51,7 @@
22 static int signal_delivered = 1;
24 -static void sig_handle(...)
25 +static void sig_handle(int)
27 signal_delivered = 1;
29 --- xkobo-1.11/enemies.h.old 2009-06-15 20:53:43.352835966 -0400
30 +++ xkobo-1.11/enemies.h 2009-06-15 20:56:22.449489554 -0400
31 @@ -62,7 +62,7 @@
32 extern const enemy_kind cannon;
33 extern const enemy_kind pipe1;
34 extern const enemy_kind core;
35 -extern const enemy_kind pipe2;
36 +extern const enemy_kind pipe2_xk;
37 extern const enemy_kind rock;
38 extern const enemy_kind ring;
39 extern const enemy_kind enemy_m1;
40 @@ -121,8 +121,8 @@
41 void move_core();
42 void make_pipe1();
43 void move_pipe1();
44 - void make_pipe2();
45 - void move_pipe2();
46 + void make_pipe2_xk();
47 + void move_pipe2_xk();
48 void make_enemy1();
49 void move_enemy1();
50 void make_enemy2();
51 @@ -209,10 +209,10 @@
52 state = notuse;
54 else if (ek == &core){
55 - enemies.make(&pipe2, x>>SHIFT, y>>SHIFT, 0, 0, 3);
56 - enemies.make(&pipe2, x>>SHIFT, y>>SHIFT, 0, 0, 7);
57 - enemies.make(&pipe2, x>>SHIFT, y>>SHIFT, 0, 0, 1);
58 - enemies.make(&pipe2, x>>SHIFT, y>>SHIFT, 0, 0, 5);
59 + enemies.make(&pipe2_xk, x>>SHIFT, y>>SHIFT, 0, 0, 3);
60 + enemies.make(&pipe2_xk, x>>SHIFT, y>>SHIFT, 0, 0, 7);
61 + enemies.make(&pipe2_xk, x>>SHIFT, y>>SHIFT, 0, 0, 1);
62 + enemies.make(&pipe2_xk, x>>SHIFT, y>>SHIFT, 0, 0, 5);
63 enemies.make(&explosion, x>>SHIFT, y>>SHIFT);
64 state = notuse;
65 manage.destroyed_a_core();
66 @@ -304,7 +304,7 @@
68 inline int _enemy::is_pipe()
70 - return ((state != notuse) && ((ek == &pipe1) || (ek == &pipe2)));
71 + return ((state != notuse) && ((ek == &pipe1) || (ek == &pipe2_xk)));
75 --- xkobo-1.11/enemy.C.old 2009-06-15 20:56:44.456152021 -0400
76 +++ xkobo-1.11/enemy.C 2009-06-15 20:57:10.629690915 -0400
77 @@ -521,10 +521,10 @@
80 * ===========================================================================
81 - * pipe2
82 + * pipe2_xk
83 * ===========================================================================
85 -void _enemy::make_pipe2()
86 +void _enemy::make_pipe2_xk()
88 int x1 = ((x>>SHIFT) & (SCREEN_SIZEX-1))>>4;
89 int y1 = ((y>>SHIFT) & (SCREEN_SIZEY-1))>>4;
90 @@ -554,7 +554,7 @@
94 -void _enemy::move_pipe2()
95 +void _enemy::move_pipe2_xk()
97 if ((norm < ((WSIZE>>1)+32)) && (count == 1))
98 enemies.make(&explosion, (x>>SHIFT)+rand_num.get(4)-8,
99 @@ -612,20 +612,20 @@
100 p ^= a;
101 int a=0, b=0, c=0, d=0;
102 if (p & U_MASK)
103 - a=enemies.make(&pipe2, (x>>SHIFT), (y>>SHIFT), 0, 0, 1);
104 + a=enemies.make(&pipe2_xk, (x>>SHIFT), (y>>SHIFT), 0, 0, 1);
105 if (p & R_MASK)
106 - b=enemies.make(&pipe2, (x>>SHIFT), (y>>SHIFT), 0, 0, 3);
107 + b=enemies.make(&pipe2_xk, (x>>SHIFT), (y>>SHIFT), 0, 0, 3);
108 if (p & D_MASK)
109 - c=enemies.make(&pipe2, (x>>SHIFT), (y>>SHIFT), 0, 0, 5);
110 + c=enemies.make(&pipe2_xk, (x>>SHIFT), (y>>SHIFT), 0, 0, 5);
111 if (p & L_MASK)
112 - d=enemies.make(&pipe2, (x>>SHIFT), (y>>SHIFT), 0, 0, 7);
113 + d=enemies.make(&pipe2_xk, (x>>SHIFT), (y>>SHIFT), 0, 0, 7);
114 manage.add_score(10);
115 state = notuse;
117 -const enemy_kind pipe2 = {
118 +const enemy_kind pipe2_xk = {
120 - &_enemy::make_pipe2,
121 - &_enemy::move_pipe2,
122 + &_enemy::make_pipe2_xk,
123 + &_enemy::move_pipe2_xk,
125 0, 0,