1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

Disable sound and joystick support on the Alpha.

This commit is contained in:
Steve Price 1999-06-22 17:58:23 +00:00
parent 3e94dbb52b
commit 3c014fdf9c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=19684
6 changed files with 140 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# Date created: 27 May 1999
# Whom: Thomas Gellekum <tg@FreeBSD.ORG>
#
# $Id$
# $Id: Makefile,v 1.1.1.1 1999/05/27 13:53:02 tg Exp $
#
DISTNAME= rocksndiamonds-1.2.0
@ -15,7 +15,10 @@ MAINTAINER= ports@FreeBSD.ORG
USE_XLIB= yes
USE_GMAKE= yes
MAKE_ENV= GAME_DIR=${GAME_DIR} X11_PATH=${X11BASE} OPTIONS="${CFLAGS}"
MAKE_ENV+= GAME_DIR=${GAME_DIR} X11_PATH=${X11BASE} OPTIONS="${CFLAGS}"
.if ${MACHINE_ARCH} == "alpha"
MAKE_ENV+= SOUNDS="-DNO_SOUNDS" JOYSTICK="-DNO_JOYSTICK"
.endif
GAME_DIR=${PREFIX}/share/rocksndiamonds
DOC_DIR=${PREFIX}/share/doc/rocksndiamonds

View File

@ -0,0 +1,12 @@
--- src/joystick.h.orig Sun Jun 20 18:06:28 1999
+++ src/joystick.h Sun Jun 20 18:07:24 1999
@@ -20,7 +20,9 @@
#define JOYSTICK_OFF 0
#define JOYSTICK_AVAILABLE 1
#ifdef __FreeBSD__
+#if !defined(NO_JOYSTICK)
#include <machine/joystick.h>
+#endif
#define DEV_JOYSTICK_0 "/dev/joy0"
#define DEV_JOYSTICK_1 "/dev/joy1"
#define DEV_JOYSTICK_2 "/dev/joy2"

View File

@ -0,0 +1,11 @@
--- src/sound.h.orig Sun Jun 20 18:05:54 1999
+++ src/sound.h Sun Jun 20 18:06:06 1999
@@ -26,7 +26,7 @@
extern void ioctl(long, long, void *);
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_SOUNDS)
#include <machine/soundcard.h>
#endif

View File

@ -0,0 +1,13 @@
--- src/tools.c.orig Sun Jun 20 18:09:07 1999
+++ src/tools.c Sun Jun 20 18:09:42 1999
@@ -13,10 +13,6 @@
#include <stdarg.h>
-#ifdef __FreeBSD__
-#include <machine/joystick.h>
-#endif
-
#include "tools.h"
#include "game.h"
#include "events.h"

View File

@ -0,0 +1,68 @@
--- src/screens.c.orig Sun Jun 20 18:10:54 1999
+++ src/screens.c Sun Jun 20 18:14:57 1999
@@ -1640,7 +1640,7 @@
void CalibrateJoystick(int player_nr)
{
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
struct joystick joy_ctrl;
#else
struct joystick_control
@@ -1705,7 +1705,7 @@
BackToFront();
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
joy_ctrl.b1 = joy_ctrl.b2 = 0;
#else
joy_ctrl.buttons = 0;
@@ -1914,13 +1914,13 @@
DrawText(SX+16, SY+9*32, "AND PRESS BUTTON",FS_BIG,FC_YELLOW);
BackToFront();
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
joy_ctrl.b1 = joy_ctrl.b2 = 0;
#else
joy_ctrl.buttons = 0;
#endif
while(Joystick() & JOY_BUTTON);
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
while(!(joy_ctrl.b1 || joy_ctrl.b2))
#else
while(!joy_ctrl.buttons)
@@ -1943,13 +1943,13 @@
DrawText(SX+16, SY+9*32, "AND PRESS BUTTON",FS_BIG,FC_YELLOW);
BackToFront();
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
joy_ctrl.b1 = joy_ctrl.b2 = 0;
#else
joy_ctrl.buttons = 0;
#endif
while(Joystick() & JOY_BUTTON);
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
while(!(joy_ctrl.b1 || joy_ctrl.b2))
#else
while(!joy_ctrl.buttons)
@@ -1971,13 +1971,13 @@
DrawText(SX+16, SY+16+8*32, "AND PRESS BUTTON",FS_BIG,FC_YELLOW);
BackToFront();
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
joy_ctrl.b1 = joy_ctrl.b2 = 0;
#else
joy_ctrl.buttons = 0;
#endif
while(Joystick() & JOY_BUTTON);
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
while(!(joy_ctrl.b1 || joy_ctrl.b2))
#else
while(!joy_ctrl.buttons)

View File

@ -0,0 +1,31 @@
--- src/joystick.c.orig Sun Jun 20 18:15:41 1999
+++ src/joystick.c Sun Jun 20 18:16:24 1999
@@ -11,10 +11,6 @@
* joystick.c *
***********************************************************/
-#ifdef __FreeBSD__
-#include <machine/joystick.h>
-#endif
-
#include "joystick.h"
#include "misc.h"
@@ -67,7 +63,7 @@
#ifndef MSDOS
int Joystick(int player_nr)
{
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
struct joystick joy_ctrl;
#else
struct joystick_control
@@ -103,7 +99,7 @@
js_x = joy_ctrl.x;
js_y = joy_ctrl.y;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(NO_JOYSTICK)
js_b1 = joy_ctrl.b1;
js_b2 = joy_ctrl.b2;
#else