From 5b84b8d2eadd983f5914979e026cd4e05ea342fd Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 22 Aug 2006 15:22:30 +0000 Subject: Rename static clock variable to avoid conflict with function from time.h on DragonFly. --- games/neverball/distinfo | 3 +- games/neverball/patches/patch-aa | 75 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 games/neverball/patches/patch-aa (limited to 'games') 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. */ -- cgit v1.2.3