diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2009-02-22 04:05:02 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2009-02-22 04:05:02 +0000 |
commit | 3669dacd4ad96024ee919bd0ff5a4c2732ef93eb (patch) | |
tree | abd2752f544f5a27413f16f8331a1a430d6fca0b /games/xrally/files | |
parent | 4dd16db24288af196f5adf642634ae59a22ec658 (diff) | |
download | ports-3669dacd4ad96024ee919bd0ff5a4c2732ef93eb.tar.gz ports-3669dacd4ad96024ee919bd0ff5a4c2732ef93eb.zip |
Notes
Diffstat (limited to 'games/xrally/files')
-rw-r--r-- | games/xrally/files/patch-global.h | 42 | ||||
-rw-r--r-- | games/xrally/files/patch-graphics.c (renamed from games/xrally/files/patch-xrally-1.1.1) | 82 | ||||
-rw-r--r-- | games/xrally/files/patch-menu.c | 21 | ||||
-rw-r--r-- | games/xrally/files/patch-score.c | 10 | ||||
-rw-r--r-- | games/xrally/files/patch-sound.c | 18 | ||||
-rw-r--r-- | games/xrally/files/patch-soundplayer.h | 15 |
6 files changed, 124 insertions, 64 deletions
diff --git a/games/xrally/files/patch-global.h b/games/xrally/files/patch-global.h new file mode 100644 index 000000000000..9c3194bc553e --- /dev/null +++ b/games/xrally/files/patch-global.h @@ -0,0 +1,42 @@ +--- global.h.orig 2001-01-02 05:49:16.000000000 +1100 ++++ global.h 2009-02-22 13:18:18.000000000 +1100 +@@ -5,7 +5,7 @@ + copyright : (C) 2000 by Perdig + email : perdig@linuxbr.com.br + +- $Id: global.h,v 1.9 2001/01/01 18:49:16 perdig Exp $ ++ $Id: global.h,v 1.10 2001/01/11 15:28:03 perdig Exp $ + ***************************************************************************/ + + /*************************************************************************** +@@ -181,10 +181,12 @@ + #define _D_INFO "\x1b[33m" + #define _D_CRIT "\x1b[31m" + #define _D_WARN "\x1b[36m" +-#define _D(args...) do { \ +- printf("\x1b[33m" __PRETTY_FUNCTION__ " \x1b[37m[" __FILE__ \ +- ":%d] " _D_INFO, __LINE__); printf (args); printf ("\x1b[0m\n"); \ +- } while (0) ++#define _D(args...) { \ ++ printf("\x1b[33m%s \x1b[37m[%s:%d]%s", \ ++ __PRETTY_FUNCTION__, __FILE__, __LINE__, _D_INFO); \ ++ printf(args); \ ++ printf("\x1b[0m\n"); \ ++ } + + #define ldbg(STR...) { if (DEBUG&4) _D(_D_INFO STR); } + #define dbg(STR...) { if (DEBUG&2) _D(_D_WARN STR); } +@@ -213,4 +215,13 @@ + + #define PLAYABLE + ++#ifndef USE_SOUND ++#define sound_switch() ++#define sound_stop() ++#define sound_volume(a) ++#define sound_start() ++#define sound_select(a) ++#define sound_load(a) ++#endif ++ + #endif diff --git a/games/xrally/files/patch-xrally-1.1.1 b/games/xrally/files/patch-graphics.c index c313fd2e70f0..b64957ce0935 100644 --- a/games/xrally/files/patch-xrally-1.1.1 +++ b/games/xrally/files/patch-graphics.c @@ -1,59 +1,39 @@ ---- menu.c 2001/01/01 18:49:16 1.22 XRALLY_1_1 -+++ menu.c 2001/01/11 15:28:03 1.23 HEAD +--- graphics.c.orig 2000-12-09 04:42:47.000000000 +1100 ++++ graphics.c 2009-02-22 14:41:51.000000000 +1100 @@ -5,7 +5,7 @@ copyright : (C) 2000 by Perdig email : perdig@linuxbr.com.br - -- $Id: menu.c,v 1.22 2001/01/01 18:49:16 perdig Exp $ -+ $Id: menu.c,v 1.23 2001/01/11 15:28:03 perdig Exp $ - ***************************************************************************/ - - /*************************************************************************** -@@ -25,7 +25,9 @@ - #include "level.h" - #include "score.h" - #include "dirent.h" -+#ifdef USE_SOUND - #include "sound.h" -+#endif - #include "limits.h" - #include <stdio.h> - #include <string.h> ---- graphics.c 2000/12/07 12:44:10 1.15 XRALLY_1_1 -+++ graphics.c 2001/01/11 15:28:03 1.16 HEAD -@@ -5,7 +5,7 @@ - copyright : (C) 2000 by Perdig - email : perdig@linuxbr.com.br - + - $Id: graphics.c,v 1.15 2000/12/07 12:44:10 perdig Exp $ + $Id: graphics.c,v 1.16 2001/01/11 15:28:03 perdig Exp $ ***************************************************************************/ - + /*************************************************************************** -@@ -18,12 +18,13 @@ +@@ -18,12 +18,14 @@ ***************************************************************************/ #include "graphics.h" #include "global.h" +#include <unistd.h> ++#include <string.h> #include <sys/time.h> - + // Internal functions - + static char ** _split_text(const char *_txt); -static int _check_event(XEvent *xev); +static int _check_event(XEvent *xev, int blocking); long time_diff(struct timeval *rt); - + // Basic X11 variables -@@ -401,10 +402,15 @@ +@@ -401,10 +403,15 @@ return double_buffer; } - + -static int _check_event(XEvent *xev) { +static int _check_event(XEvent *xev, int blocking) { XEvent *last = NULL; + int a = 0; - + - while (XCheckMaskEvent(dpy, KeyPressMask | ExposureMask, xev)) { + do { + if (blocking) @@ -63,7 +43,7 @@ switch (xev->type) { case KeyPress: last = xev; -@@ -417,7 +423,7 @@ +@@ -417,7 +424,7 @@ default: break; } @@ -72,8 +52,8 @@ // No events xev = last; return (last) ? true : false; -@@ -426,32 +432,35 @@ - +@@ -426,32 +433,35 @@ + KeySym check_key() { XEvent xev; - if (_check_event(&xev) && xev.type == KeyPress) @@ -82,7 +62,7 @@ // No events return XK_VoidSymbol; } - + KeySym wait_key() { - KeySym key = XK_VoidSymbol; - while (key == XK_VoidSymbol) { @@ -93,7 +73,7 @@ + _check_event(&xev, 1); + return XLookupKeysym(&xev.xkey, 0); } - + void wait_time(long time_wait) { - struct timeval it; + struct timeval it, tmp; @@ -109,7 +89,7 @@ + _check_event(&xev, 0); + } } - + KeySym wait_char(char *str) { KeySym key = XK_VoidSymbol; XEvent xev; @@ -118,29 +98,3 @@ XLookupString(&xev.xkey, str, 3, &key, NULL); return key; } ---- global.h 2001/01/01 18:49:16 1.9 XRALLY_1_1 -+++ global.h 2001/01/11 15:28:03 1.10 -@@ -5,7 +5,7 @@ - copyright : (C) 2000 by Perdig - email : perdig@linuxbr.com.br - -- $Id: global.h,v 1.9 2001/01/01 18:49:16 perdig Exp $ -+ $Id: global.h,v 1.10 2001/01/11 15:28:03 perdig Exp $ - ***************************************************************************/ - - /*************************************************************************** -@@ -212,5 +212,14 @@ - - - #define PLAYABLE -+ -+#ifndef USE_SOUND -+#define sound_switch() -+#define sound_stop() -+#define sound_volume(a) -+#define sound_start() -+#define sound_select(a) -+#define sound_load(a) -+#endif - - #endif diff --git a/games/xrally/files/patch-menu.c b/games/xrally/files/patch-menu.c new file mode 100644 index 000000000000..4ae1d40be1a8 --- /dev/null +++ b/games/xrally/files/patch-menu.c @@ -0,0 +1,21 @@ +--- menu.c 2001/01/01 18:49:16 1.22 XRALLY_1_1 ++++ menu.c 2001/01/11 15:28:03 1.23 HEAD +@@ -5,7 +5,7 @@ + copyright : (C) 2000 by Perdig + email : perdig@linuxbr.com.br + +- $Id: menu.c,v 1.22 2001/01/01 18:49:16 perdig Exp $ ++ $Id: menu.c,v 1.23 2001/01/11 15:28:03 perdig Exp $ + ***************************************************************************/ + + /*************************************************************************** +@@ -25,7 +25,9 @@ + #include "level.h" + #include "score.h" + #include "dirent.h" ++#ifdef USE_SOUND + #include "sound.h" ++#endif + #include "limits.h" + #include <stdio.h> + #include <string.h> diff --git a/games/xrally/files/patch-score.c b/games/xrally/files/patch-score.c new file mode 100644 index 000000000000..c9551774bd76 --- /dev/null +++ b/games/xrally/files/patch-score.c @@ -0,0 +1,10 @@ +--- score.c.orig 2009-02-22 14:37:44.000000000 +1100 ++++ score.c 2009-02-22 14:37:54.000000000 +1100 +@@ -17,6 +17,7 @@ + * * + ***************************************************************************/ + ++#include <string.h> + #include "config.h" + #include "score.h" + #include "time.h" diff --git a/games/xrally/files/patch-sound.c b/games/xrally/files/patch-sound.c new file mode 100644 index 000000000000..f2bfaba58362 --- /dev/null +++ b/games/xrally/files/patch-sound.c @@ -0,0 +1,18 @@ +--- sound.c.orig 2009-02-22 14:43:06.000000000 +1100 ++++ sound.c 2009-02-22 15:00:36.000000000 +1100 +@@ -19,6 +19,7 @@ + #include <stdio.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> +@@ -563,6 +564,7 @@ + } + + skip_extended: ++ while (0) {}; + } else { + /* + * In the rest of the frames we slide volume, pitch, diff --git a/games/xrally/files/patch-soundplayer.h b/games/xrally/files/patch-soundplayer.h new file mode 100644 index 000000000000..83ae66bcb1c5 --- /dev/null +++ b/games/xrally/files/patch-soundplayer.h @@ -0,0 +1,15 @@ +--- soundplayer.h.orig 2009-02-22 14:46:33.000000000 +1100 ++++ soundplayer.h 2009-02-22 14:59:51.000000000 +1100 +@@ -103,9 +103,9 @@ + #define vphase data[2] + #define target data[0] + +-#define fx_enable(x) do { x##.active = 1; } while (0) +-#define fx_disable(x) do { x##.active = 0; } while (0) +-#define fx_test(x) (x##.active != 0) ++#define fx_enable(x) do { x.active = 1; } while (0) ++#define fx_disable(x) do { x.active = 0; } while (0) ++#define fx_test(x) (x.active != 0) + + /* Sound driver stuff */ + |