Files
Astral/patches/tyrquake/jinx-working-patch.patch
T
2024-08-21 23:40:30 -03:00

132 lines
3.9 KiB
Diff

diff --git tyrquake-clean/Makefile tyrquake-workdir/Makefile
index 5709a79..25ddf7c 100644
--- tyrquake-clean/Makefile
+++ tyrquake-workdir/Makefile
@@ -14,12 +14,12 @@ DOC_DIR ?= doc
DIST_DIR ?= dist
DEBUG ?= N# Compile with debug info
OPTIMIZED_CFLAGS ?= Y# Enable compiler optimisations (if DEBUG != Y)
-USE_X86_ASM ?= $(I386_GUESS)
-USE_SDL ?= N# New (experimental) SDL video/sound/input targets
-LOCALBASE ?= /usr/local
+USE_X86_ASM ?= N
+USE_SDL ?= Y# New (experimental) SDL video/sound/input targets
+LOCALBASE ?= /usr/
QBASEDIR ?= .# Default basedir for quake data files (Linux/BSD only)
-TARGET_OS ?= $(HOST_OS)
-TARGET_UNIX ?= $(if $(filter UNIX,$(TARGET_OS)),$(HOST_UNIX),)
+TARGET_OS ?= UNIX
+TARGET_UNIX ?= Astral
# ============================================================================
@@ -134,6 +134,10 @@ ifeq ($(TARGET_UNIX),linux)
CD_TARGET ?= linux
SND_TARGET ?= pulseaudio
endif
+ifeq ($(TARGET_UNIX),Astral)
+CD_TARGET ?= null
+SND_TARGET ?= null
+endif
endif
ifneq (,$(findstring $(TARGET_OS),WIN32 WIN64))
@@ -350,8 +354,8 @@ QWGLDIR = $(BUILD_DIR)/qwgl
QWSVDIR = $(BUILD_DIR)/qwsv
APPS = tyr-quake$(EXT) tyr-glquake$(EXT) \
- tyr-qwcl$(EXT) tyr-glqwcl$(EXT) \
- tyr-qwsv$(EXT)
+ #tyr-qwcl$(EXT) tyr-glqwcl$(EXT) \
+ #tyr-qwsv$(EXT)
default: all
@@ -936,7 +940,7 @@ CL_CPPFLAGS += -DX11
CL_OBJS += x11_core.o vid_x11_common.o
SW_OBJS += vid_x.o
GL_OBJS += vid_glx.o
-CL_LIBS += X11 Xext Xxf86vm
+CL_LIBS += X11 Xext Xxf86vm c
ifneq ($(X11BASE),)
CL_CPPFLAGS += -idirafter $(X11BASE)/include
CL_LFLAGS += $(call libdir-check,$(X11BASE)/lib)
diff --git tyrquake-clean/NQ/net_udp.c tyrquake-workdir/NQ/net_udp.c
index 2f3bf49..19c3b4d 100644
--- tyrquake-clean/NQ/net_udp.c
+++ tyrquake-workdir/NQ/net_udp.c
@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <unistd.h>
#include <net/if.h>
#include <ifaddrs.h>
+#include <fcntl.h>
#include "common.h"
#include "console.h"
@@ -258,12 +259,16 @@ UDP_OpenSocket(int port)
{
int newsocket;
struct sockaddr_in address;
- int _true = 1;
+ //int _true = 1;
if ((newsocket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
return -1;
- if (ioctl(newsocket, FIONBIO, &_true) == -1)
- goto ErrorReturn;
+
+ //if (ioctl(newsocket, FIONBIO, &_true) == -1)
+ // goto ErrorReturn;
+
+ if (fcntl(newsocket, F_SETFL, O_NONBLOCK) == -1)
+ goto ErrorReturn;
address.sin_family = AF_INET;
address.sin_addr.s_addr = bind_address.ip.l;
diff --git tyrquake-clean/NQ/net_wins.c tyrquake-workdir/NQ/net_wins.c
index 4ece6e9..4f50aca 100644
--- tyrquake-clean/NQ/net_wins.c
+++ tyrquake-workdir/NQ/net_wins.c
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "quakedef.h"
#include "sys.h"
#include "winquake.h"
+#include <fcntl.h>
/* socket for fielding new connections */
static int net_acceptsocket = -1;
@@ -273,8 +274,10 @@ WINS_OpenSocket(int port)
if ((newsocket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
return -1;
- if (ioctlsocket(newsocket, FIONBIO, &_true) == -1)
- goto ErrorReturn;
+ //if (ioctlsocket(newsocket, FIONBIO, &_true) == -1)
+ // goto ErrorReturn;
+ if (fcntl(newsocket, F_SETFL, O_NONBLOCK) == -1)
+ goto ErrorReturn;
address.sin_family = AF_INET;
if (bind_address.ip.l != INADDR_NONE)
diff --git tyrquake-clean/common/snd_dma.c tyrquake-workdir/common/snd_dma.c
index 8e4852b..06656c0 100644
--- tyrquake-clean/common/snd_dma.c
+++ tyrquake-workdir/common/snd_dma.c
@@ -243,7 +243,7 @@ S_InitAmbients()
void
S_Init(void)
{
- if (COM_CheckParm("-nosound"))
+// if (COM_CheckParm("-nosound"))
return;
if (COM_CheckParm("-simsound"))
@@ -279,6 +279,7 @@ S_Init(void)
void
S_ClearOverflow()
{
+ return;
S_StopAllSounds(true);
struct known_sfx *known = known_sfx->overflow;