aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2009-02-19 17:32:23 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2009-02-19 17:32:23 +0000
commit0a0ac2ad0f301416cf0655f9c4b05cde287f1b6b (patch)
treed495fd100ffbbfad928e985fa40e0bfe973ca814 /games
parenta507ffddd7049a45e4a28391e79527b722c77c33 (diff)
downloadports-0a0ac2ad0f301416cf0655f9c4b05cde287f1b6b.tar.gz
ports-0a0ac2ad0f301416cf0655f9c4b05cde287f1b6b.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/tyrquake/Makefile5
-rw-r--r--games/tyrquake/files/patch-Makefile11
-rw-r--r--games/tyrquake/files/patch-common::gl_vidlinuxglx.c20
-rw-r--r--games/tyrquake/files/patch-common::in_x11.c116
-rw-r--r--games/tyrquake/files/patch-common::vid_x.c19
5 files changed, 169 insertions, 2 deletions
diff --git a/games/tyrquake/Makefile b/games/tyrquake/Makefile
index 4819ea901aa4..dff4d8e185e0 100644
--- a/games/tyrquake/Makefile
+++ b/games/tyrquake/Makefile
@@ -7,15 +7,16 @@
PORTNAME= tyrquake
PORTVERSION= 0.59
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= http://disenchant.net/files/engine/
-MAINTAINER= alepulver@FreeBSD.org
+MAINTAINER= rsmith@xs4all.nl
COMMENT= Very conservative branch of the Quake source code
+USE_XORG= x11 xxf86vm xdamage xfixes xau xext xdmcp
USE_GL= yes
USE_GMAKE= yes
-USE_XORG= xxf86dga
MAKE_ENV= QBASEDIR="${Q1DIR}"
OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
diff --git a/games/tyrquake/files/patch-Makefile b/games/tyrquake/files/patch-Makefile
new file mode 100644
index 000000000000..f8a5581e5e30
--- /dev/null
+++ b/games/tyrquake/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2008-04-26 13:05:35.000000000 +0200
++++ Makefile 2009-01-24 16:53:10.000000000 +0100
+@@ -124,7 +124,7 @@
+ NQ_W32_SW_LIBS = mgllt ddraw
+ NQ_W32_GL_LIBS = opengl32 comctl32
+
+-NQ_UNIX_COMMON_LIBS = m X11 Xext Xxf86dga Xxf86vm
++NQ_UNIX_COMMON_LIBS = m X11 Xext Xxf86vm
+ NQ_UNIX_GL_LIBS = GL
+
+ NQ_W32_SW_LFLAGS := $(patsubst %,-l%,$(NQ_W32_SW_LIBS) $(NQ_W32_COMMON_LIBS))
diff --git a/games/tyrquake/files/patch-common::gl_vidlinuxglx.c b/games/tyrquake/files/patch-common::gl_vidlinuxglx.c
new file mode 100644
index 000000000000..10fe76a75454
--- /dev/null
+++ b/games/tyrquake/files/patch-common::gl_vidlinuxglx.c
@@ -0,0 +1,20 @@
+--- common/gl_vidlinuxglx.c.orig 2009-01-24 11:35:16.000000000 +0100
++++ common/gl_vidlinuxglx.c 2009-01-24 11:35:26.000000000 +0100
+@@ -387,16 +387,12 @@
+
+ case MotionNotify:
+ if (mouse_grab_active) {
+- if (dga_mouse_active) {
+- mouse_x += event.xmotion.x_root;
+- mouse_y += event.xmotion.y_root;
+- } else {
+ mouse_x = event.xmotion.x - (int)(vid.width / 2);
+ mouse_y = event.xmotion.y - (int)(vid.height / 2);
+
+ if (mouse_x || mouse_y)
+ dowarp = true;
+- }
++
+ }
+ break;
+
diff --git a/games/tyrquake/files/patch-common::in_x11.c b/games/tyrquake/files/patch-common::in_x11.c
new file mode 100644
index 000000000000..a245bb76567f
--- /dev/null
+++ b/games/tyrquake/files/patch-common::in_x11.c
@@ -0,0 +1,116 @@
+--- common/in_x11.c.orig 2009-01-24 11:18:46.000000000 +0100
++++ common/in_x11.c 2009-01-24 11:27:30.000000000 +0100
+@@ -25,15 +25,11 @@
+ #include "vid.h"
+ #include "sys.h"
+
+-#include <X11/extensions/xf86dga.h>
+-
+ // FIXME - make static when possible
+ qboolean mouse_available = false; // Mouse available for use
+
+ static qboolean keyboard_grab_active = false;
+ qboolean mouse_grab_active = false;
+-static qboolean dga_available = false;
+-qboolean dga_mouse_active = false;
+
+ int mouse_x, mouse_y;
+
+@@ -58,41 +54,7 @@
+ }
+
+
+-static void
+-IN_ActivateDGAMouse(void)
+-{
+- if (dga_available && !dga_mouse_active) {
+- XF86DGADirectVideo(x_disp, DefaultScreen(x_disp), XF86DGADirectMouse);
+- dga_mouse_active = true;
+- }
+-}
+-
+-static void
+-IN_DeactivateDGAMouse(void)
+-{
+- if (dga_available && dga_mouse_active) {
+- XF86DGADirectVideo(x_disp, DefaultScreen(x_disp), 0);
+- dga_mouse_active = false;
+- IN_CenterMouse(); // maybe set mouse_x = 0 and mouse_y = 0?
+- }
+-}
+-
+-static void
+-in_dgamouse_f(struct cvar_s *var)
+-{
+- if (var->value) {
+- Con_DPrintf("Callback: in_dgamouse ON\n");
+- IN_ActivateDGAMouse();
+- } else {
+- Con_DPrintf("Callback: in_dgamouse OFF\n");
+- IN_DeactivateDGAMouse();
+- }
+-}
+-
+ cvar_t in_mouse = { "in_mouse", "1", false };
+-cvar_t in_dgamouse = { "in_dgamouse", "1", false, false, 0,
+- in_dgamouse_f
+-};
+ cvar_t _windowed_mouse = { "_windowed_mouse", "0", true, false, 0,
+ windowed_mouse_f
+ };
+@@ -154,13 +116,6 @@
+ }
+ mouse_grab_active = true;
+
+- // FIXME - need those cvar callbacks to fix changed values...
+- if (dga_available) {
+- if (in_dgamouse.value)
+- IN_ActivateDGAMouse();
+- } else {
+- in_dgamouse.value = 0;
+- }
+ } else {
+ Sys_Error("Bad grab?");
+ }
+@@ -174,10 +129,6 @@
+ XUndefineCursor(x_disp, x_win);
+ mouse_grab_active = false;
+ }
+-
+- if (dga_mouse_active) {
+- IN_DeactivateDGAMouse();
+- }
+ }
+
+ void
+@@ -208,7 +159,6 @@
+ IN_InitCvars(void)
+ {
+ Cvar_RegisterVariable(&in_mouse);
+- Cvar_RegisterVariable(&in_dgamouse);
+ Cvar_RegisterVariable(&m_filter);
+ Cvar_RegisterVariable(&_windowed_mouse);
+ }
+@@ -220,7 +170,6 @@
+
+ keyboard_grab_active = false;
+ mouse_grab_active = false;
+- dga_mouse_active = false;
+
+ // FIXME - do proper detection?
+ // - Also, look at other vid_*.c files for clues
+@@ -229,14 +178,6 @@
+ if (x_disp == NULL)
+ Sys_Error("x_disp not initialised before input...");
+
+- if (!XF86DGAQueryVersion(x_disp, &MajorVersion, &MinorVersion)) {
+- Con_Printf("Failed to detect XF86DGA Mouse\n");
+- in_dgamouse.value = 0;
+- dga_available = false;
+- } else {
+- dga_available = true;
+- }
+-
+ // Need to grab the input focus at startup, just in case...
+ // FIXME - must be viewable or get BadMatch
+ XSetInputFocus(x_disp, x_win, RevertToParent, CurrentTime);
diff --git a/games/tyrquake/files/patch-common::vid_x.c b/games/tyrquake/files/patch-common::vid_x.c
new file mode 100644
index 000000000000..fbe3ce995ebf
--- /dev/null
+++ b/games/tyrquake/files/patch-common::vid_x.c
@@ -0,0 +1,19 @@
+--- common/vid_x.c.orig 2009-01-24 11:30:23.000000000 +0100
++++ common/vid_x.c 2009-01-24 11:32:14.000000000 +0100
+@@ -1059,16 +1059,11 @@
+
+ case MotionNotify:
+ if (mouse_grab_active) {
+- if (dga_mouse_active) {
+- mouse_x += x_event.xmotion.x_root;
+- mouse_y += x_event.xmotion.y_root;
+- } else {
+ mouse_x = x_event.xmotion.x - (int)(vid.width / 2);
+ mouse_y = x_event.xmotion.y - (int)(vid.height / 2);
+
+ if (mouse_x || mouse_y)
+ dowarp = true;
+- }
+ }
+ break;
+