aboutsummaryrefslogtreecommitdiff
path: root/games/xrally
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2005-06-12 03:41:48 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2005-06-12 03:41:48 +0000
commitaf063d47886545937bb04d90fd918d014aa5c7f0 (patch)
tree329ba5659b6456625de01c80f7f223140f8be8bc /games/xrally
parent467763c64bc8679d84e20011c52e4805615883bb (diff)
downloadports-af063d47886545937bb04d90fd918d014aa5c7f0.tar.gz
ports-af063d47886545937bb04d90fd918d014aa5c7f0.zip
Notes
Diffstat (limited to 'games/xrally')
-rw-r--r--games/xrally/Makefile3
-rw-r--r--games/xrally/distinfo2
-rw-r--r--games/xrally/files/patch-xrally-1.1.1146
3 files changed, 150 insertions, 1 deletions
diff --git a/games/xrally/Makefile b/games/xrally/Makefile
index f4b381c90207..e23d9f4ff23a 100644
--- a/games/xrally/Makefile
+++ b/games/xrally/Makefile
@@ -7,9 +7,10 @@
#
PORTNAME= xrally
-PORTVERSION= 1.1
+PORTVERSION= 1.1.1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+DISTNAME= ${PORTNAME}-1.1
MASTER_SITE_SUBDIR= xrally
MAINTAINER= edwin@mavetju.org
diff --git a/games/xrally/distinfo b/games/xrally/distinfo
index 6b9b0df94fb5..5deba4b19298 100644
--- a/games/xrally/distinfo
+++ b/games/xrally/distinfo
@@ -1,2 +1,4 @@
MD5 (xrally-1.1.tar.bz2) = ecb8027508a65a960c0b804ba1f8363c
SIZE (xrally-1.1.tar.bz2) = 750547
+MD5 (xrally-1.1.1.patch) = ad7d4a4f9942dc661009190315fc955f
+SIZE (xrally-1.1.1.patch) = 4307
diff --git a/games/xrally/files/patch-xrally-1.1.1 b/games/xrally/files/patch-xrally-1.1.1
new file mode 100644
index 000000000000..c313fd2e70f0
--- /dev/null
+++ b/games/xrally/files/patch-xrally-1.1.1
@@ -0,0 +1,146 @@
+--- 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>
+--- 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 @@
+ ***************************************************************************/
+ #include "graphics.h"
+ #include "global.h"
++#include <unistd.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 @@
+ 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)
++ XWindowEvent(dpy, win, KeyPressMask | ExposureMask, xev);
++ else
++ a = XCheckMaskEvent(dpy, KeyPressMask | ExposureMask, xev);
+ switch (xev->type) {
+ case KeyPress:
+ last = xev;
+@@ -417,7 +423,7 @@
+ default:
+ break;
+ }
+- }
++ } while ((blocking && !last) || (!blocking && a));
+ // No events
+ xev = last;
+ return (last) ? true : false;
+@@ -426,32 +432,35 @@
+
+ KeySym check_key() {
+ XEvent xev;
+- if (_check_event(&xev) && xev.type == KeyPress)
++ if (_check_event(&xev, 0) && xev.type == KeyPress)
+ return XLookupKeysym(&xev.xkey, 0);
+ // No events
+ return XK_VoidSymbol;
+ }
+
+ KeySym wait_key() {
+- KeySym key = XK_VoidSymbol;
+- while (key == XK_VoidSymbol) {
+- key = check_key();
+- }
+- return key;
++ XEvent xev;
++ _check_event(&xev, 1);
++ return XLookupKeysym(&xev.xkey, 0);
+ }
+
+ void wait_time(long time_wait) {
+- struct timeval it;
++ struct timeval it, tmp;
+ XEvent xev;
+ gettimeofday(&it, NULL);
+- while (time_diff(&it) < time_wait)
+- _check_event(&xev);
++ while (time_diff(&it) < time_wait) {
++ /* Reduce system load, sleeping for a while */
++ tmp.tv_sec = 0;
++ tmp.tv_usec = 1000;
++ select(0, NULL, NULL, NULL, &tmp);
++ _check_event(&xev, 0);
++ }
+ }
+
+ KeySym wait_char(char *str) {
+ KeySym key = XK_VoidSymbol;
+ XEvent xev;
+- while (!_check_event(&xev) || xev.type != KeyPress);
++ _check_event(&xev, 1);
+ 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