summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-08-22 15:22:30 +0000
committerjoerg <joerg@pkgsrc.org>2006-08-22 15:22:30 +0000
commit199716bc4063117d0f39a56a9f03b5587757af55 (patch)
tree68f9c0f185179b2013f9f2af6a152c261eaa59f5 /games
parent145c19abef5a5cc1df758bfca6079432c0de1380 (diff)
downloadpkgsrc-199716bc4063117d0f39a56a9f03b5587757af55.tar.gz
Rename static clock variable to avoid conflict with function from
time.h on DragonFly.
Diffstat (limited to 'games')
-rw-r--r--games/neverball/distinfo3
-rw-r--r--games/neverball/patches/patch-aa75
2 files changed, 77 insertions, 1 deletions
diff --git a/games/neverball/distinfo b/games/neverball/distinfo
index bf1d0922f8d..e65bcb58899 100644
--- a/games/neverball/distinfo
+++ b/games/neverball/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.5 2006/01/22 21:35:22 wiz Exp $
+$NetBSD: distinfo,v 1.6 2006/08/22 15:22:30 joerg Exp $
SHA1 (neverball-1.4.0.tar.gz) = 630aab5b4149d6ffb781cc38c4ce26dd6b048b40
RMD160 (neverball-1.4.0.tar.gz) = 7952f588ead50aec8681802aee53953b29f72383
Size (neverball-1.4.0.tar.gz) = 11314294 bytes
+SHA1 (patch-aa) = 23921fb1c6353c65ad2db72b14c7b9e3a0366e75
diff --git a/games/neverball/patches/patch-aa b/games/neverball/patches/patch-aa
new file mode 100644
index 00000000000..3d3ba4cc410
--- /dev/null
+++ b/games/neverball/patches/patch-aa
@@ -0,0 +1,75 @@
+$NetBSD: patch-aa,v 1.1 2006/08/22 15:22:31 joerg Exp $
+
+--- ball/game.c.orig 2004-07-21 21:20:07.000000000 +0000
++++ ball/game.c
+@@ -36,7 +36,7 @@ static int game_state = 0;
+ static struct s_file file;
+ static struct s_file back;
+
+-static float clock = 0.f; /* Clock time */
++static float my_clock = 0.f; /* Clock time */
+
+ static float game_ix; /* Input rotation about X axis */
+ static float game_iz; /* Input rotation about Z axis */
+@@ -102,7 +102,7 @@ int game_init(const char *file_name,
+ const char *back_name,
+ const char *grad_name, int t, int e)
+ {
+- clock = (float) t / 100.f;
++ my_clock = (float) t / 100.f;
+
+ if (game_state)
+ game_free();
+@@ -159,7 +159,7 @@ void game_free(void)
+
+ int curr_clock(void)
+ {
+- return (int) (clock * 100.f);
++ return (int) (my_clock * 100.f);
+ }
+
+ char *curr_intro(void)
+@@ -600,8 +600,8 @@ static void game_update_view(float dt)
+
+ static void game_update_time(float dt, int b)
+ {
+- int tick = (int) floor(clock);
+- int tock = (int) floor(clock * 2);
++ int tick = (int) floor(my_clock);
++ int tock = (int) floor(my_clock * 2);
+
+ if (goal_e && goal_k < 1.0f)
+ goal_k += dt;
+@@ -610,17 +610,17 @@ static void game_update_time(float dt, i
+
+ if (b)
+ {
+- if (clock < 600.f)
+- clock -= dt;
+- if (clock < 0.f)
+- clock = 0.f;
++ if (my_clock < 600.f)
++ my_clock -= dt;
++ if (my_clock < 0.f)
++ my_clock = 0.f;
+
+- if (0 < tick && tick <= 10 && tick == (int) ceil(clock))
++ if (0 < tick && tick <= 10 && tick == (int) ceil(my_clock))
+ {
+ audio_play(AUD_TICK, 1.f);
+ hud_time_pulse(1.50);
+ }
+- else if (0 < tock && tock <= 10 && tock == (int) ceil(clock * 2))
++ else if (0 < tock && tock <= 10 && tock == (int) ceil(my_clock * 2))
+ {
+ audio_play(AUD_TOCK, 1.f);
+ hud_time_pulse(1.25);
+@@ -671,7 +671,7 @@ static int game_update_state(void)
+
+ /* Test for time-out. */
+
+- if (clock <= 0.f)
++ if (my_clock <= 0.f)
+ return GAME_TIME;
+
+ /* Test for fall-out. */