157 lines
4.1 KiB
Diff
157 lines
4.1 KiB
Diff
|
The name pipe2 clashes with unistd.h function pipe2(3),
|
||
|
thus rename pipe1 and pipe2 to kpipe1 and kpipe2.
|
||
|
|
||
|
--- enemies.h 2007-12-24 09:18:52.000000000 +0100
|
||
|
+++ enemies.h 2015-10-11 17:20:42.882531076 +0200
|
||
|
@@ -70,9 +70,9 @@
|
||
|
extern const enemy_kind bomb2;
|
||
|
extern const enemy_kind bombdeto;
|
||
|
extern const enemy_kind cannon;
|
||
|
-extern const enemy_kind pipe1;
|
||
|
+extern const enemy_kind kpipe1;
|
||
|
extern const enemy_kind core;
|
||
|
-extern const enemy_kind pipe2;
|
||
|
+extern const enemy_kind kpipe2;
|
||
|
extern const enemy_kind rock;
|
||
|
extern const enemy_kind ring;
|
||
|
extern const enemy_kind enemy_m1;
|
||
|
@@ -157,11 +157,11 @@
|
||
|
void move_core();
|
||
|
void kill_core();
|
||
|
|
||
|
- void make_pipe1();
|
||
|
- void move_pipe1();
|
||
|
+ void make_kpipe1();
|
||
|
+ void move_kpipe1();
|
||
|
|
||
|
- void make_pipe2();
|
||
|
- void move_pipe2();
|
||
|
+ void make_kpipe2();
|
||
|
+ void move_kpipe2();
|
||
|
|
||
|
void make_enemy1();
|
||
|
void move_enemy1();
|
||
|
@@ -430,7 +430,7 @@
|
||
|
|
||
|
inline int _enemy::is_pipe()
|
||
|
{
|
||
|
- return ((_state != notuse) && ((ek == &pipe1) || (ek == &pipe2)));
|
||
|
+ return ((_state != notuse) && ((ek == &kpipe1) || (ek == &kpipe2)));
|
||
|
}
|
||
|
|
||
|
|
||
|
--- enemy.cpp 2007-12-24 11:36:46.000000000 +0100
|
||
|
+++ enemy.cpp 2015-10-11 17:20:18.011533017 +0200
|
||
|
@@ -713,7 +713,7 @@
|
||
|
|
||
|
void _enemy::kill_cannon()
|
||
|
{
|
||
|
- enemies.make(&pipe1, CS2PIXEL(x), CS2PIXEL(y));
|
||
|
+ enemies.make(&kpipe1, CS2PIXEL(x), CS2PIXEL(y));
|
||
|
sound.g_base_node_explo(x, y);
|
||
|
release();
|
||
|
}
|
||
|
@@ -755,10 +755,10 @@
|
||
|
|
||
|
void _enemy::kill_core()
|
||
|
{
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
|
||
|
enemies.make(&explosion4, CS2PIXEL(x), CS2PIXEL(y));
|
||
|
sound.g_base_core_explo(x, y);
|
||
|
release();
|
||
|
@@ -777,10 +777,10 @@
|
||
|
|
||
|
/*
|
||
|
* ===========================================================================
|
||
|
- * pipe1
|
||
|
+ * kpipe1
|
||
|
* ===========================================================================
|
||
|
*/
|
||
|
-void _enemy::make_pipe1()
|
||
|
+void _enemy::make_kpipe1()
|
||
|
{
|
||
|
health = 1;
|
||
|
damage = 0;
|
||
|
@@ -790,7 +790,7 @@
|
||
|
b = 0;
|
||
|
}
|
||
|
|
||
|
-void _enemy::move_pipe1()
|
||
|
+void _enemy::move_kpipe1()
|
||
|
{
|
||
|
sound.g_pipe_rumble(x, y);
|
||
|
if((norm < ((VIEWLIMIT >> 1) + 32)) && (count == 1))
|
||
|
@@ -851,10 +851,10 @@
|
||
|
screen.set_map(x1, y1, m ^ a);
|
||
|
release();
|
||
|
}
|
||
|
-const enemy_kind pipe1 = {
|
||
|
+const enemy_kind kpipe1 = {
|
||
|
0,
|
||
|
- &_enemy::make_pipe1,
|
||
|
- &_enemy::move_pipe1,
|
||
|
+ &_enemy::make_kpipe1,
|
||
|
+ &_enemy::move_kpipe1,
|
||
|
&_enemy::kill_default,
|
||
|
-1,
|
||
|
-1, 0,
|
||
|
@@ -863,10 +863,10 @@
|
||
|
|
||
|
/*
|
||
|
* ===========================================================================
|
||
|
- * pipe2
|
||
|
+ * kpipe2
|
||
|
* ===========================================================================
|
||
|
*/
|
||
|
-void _enemy::make_pipe2()
|
||
|
+void _enemy::make_kpipe2()
|
||
|
{
|
||
|
int x1 = (CS2PIXEL(x) & (WORLD_SIZEX - 1)) >> 4;
|
||
|
int y1 = (CS2PIXEL(y) & (WORLD_SIZEY - 1)) >> 4;
|
||
|
@@ -898,7 +898,7 @@
|
||
|
}
|
||
|
|
||
|
|
||
|
-void _enemy::move_pipe2()
|
||
|
+void _enemy::move_kpipe2()
|
||
|
{
|
||
|
if((norm < ((VIEWLIMIT >> 1) + 32)) && (count == 1))
|
||
|
enemies.make(&explosion,
|
||
|
@@ -978,22 +978,22 @@
|
||
|
}
|
||
|
p ^= a;
|
||
|
if(p & U_MASK)
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
|
||
|
if(p & R_MASK)
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
|
||
|
if(p & D_MASK)
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
|
||
|
if(p & L_MASK)
|
||
|
- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
|
||
|
+ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
|
||
|
manage.add_score(10);
|
||
|
release();
|
||
|
}
|
||
|
|
||
|
|
||
|
-const enemy_kind pipe2 = {
|
||
|
+const enemy_kind kpipe2 = {
|
||
|
0,
|
||
|
- &_enemy::make_pipe2,
|
||
|
- &_enemy::move_pipe2,
|
||
|
+ &_enemy::make_kpipe2,
|
||
|
+ &_enemy::move_kpipe2,
|
||
|
&_enemy::kill_default,
|
||
|
-1,
|
||
|
-1, 0,
|