mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@292 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f14861b77a
commit
6db5e70888
10 changed files with 270 additions and 258 deletions
|
@ -10,14 +10,12 @@
|
||||||
# SUPERBUILD - enables voxels
|
# SUPERBUILD - enables voxels
|
||||||
# POLYMOST - enables Polymost renderer
|
# POLYMOST - enables Polymost renderer
|
||||||
# USE_OPENGL - enables OpenGL support in Polymost
|
# USE_OPENGL - enables OpenGL support in Polymost
|
||||||
# USE_A_C - enables use of C version of classic renderer
|
|
||||||
# NOASM - disables the use of inline assembly pragmas
|
# NOASM - disables the use of inline assembly pragmas
|
||||||
#
|
#
|
||||||
# SETSPRITEZ - set to 1 for Shadow Warrior
|
# SETSPRITEZ - set to 1 for Shadow Warrior
|
||||||
SUPERBUILD ?= 1
|
SUPERBUILD ?= 1
|
||||||
POLYMOST ?= 1
|
POLYMOST ?= 1
|
||||||
USE_OPENGL ?= 1
|
USE_OPENGL ?= 1
|
||||||
USE_A_C ?= 0
|
|
||||||
NOASM ?= 0
|
NOASM ?= 0
|
||||||
|
|
||||||
SETSPRITEZ ?= 0
|
SETSPRITEZ ?= 0
|
||||||
|
@ -71,13 +69,13 @@ EXESUFFIX=
|
||||||
|
|
||||||
include Makefile.shared
|
include Makefile.shared
|
||||||
|
|
||||||
ifneq (0,$(USE_A_C))
|
ENGINEOBJS=
|
||||||
ENGINEOBJS=$(OBJ)/a-c.$o
|
ifeq (0,$(NOASM))
|
||||||
else
|
ENGINEOBJS+= $(OBJ)/a.$o
|
||||||
ENGINEOBJS=$(OBJ)/a.$o
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ENGINEOBJS+= \
|
ENGINEOBJS+= \
|
||||||
|
$(OBJ)/a-c.$o \
|
||||||
$(OBJ)/baselayer.$o \
|
$(OBJ)/baselayer.$o \
|
||||||
$(OBJ)/cache1d.$o \
|
$(OBJ)/cache1d.$o \
|
||||||
$(OBJ)/compat.$o \
|
$(OBJ)/compat.$o \
|
||||||
|
|
|
@ -40,8 +40,8 @@ $(OBJ)/buildres.$(res): $(SRC)/misc/buildres.rc $(INC)/startwin.editor.h
|
||||||
$(OBJ)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h
|
$(OBJ)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h
|
||||||
$(OBJ)/startgtk.editor.$o: $(SRC)/startgtk.editor.c $(INC)/baselayer.h $(INC)/build.h $(INC)/editor.h $(INC)/compat.h
|
$(OBJ)/startgtk.editor.$o: $(SRC)/startgtk.editor.c $(INC)/baselayer.h $(INC)/build.h $(INC)/editor.h $(INC)/compat.h
|
||||||
|
|
||||||
$(OBJ)/game_icon.$o: $(RSRC)game_icon.c
|
$(OBJ)/game_icon.$o: $(RSRC)/game_icon.c
|
||||||
$(OBJ)/build_icon.$o: $(RSRC)build_icon.c
|
$(OBJ)/build_icon.$o: $(RSRC)/build_icon.c
|
||||||
|
|
||||||
$(OBJ)/kextract.$o: $(SRC)/util/kextract.c $(INC)/compat.h
|
$(OBJ)/kextract.$o: $(SRC)/util/kextract.c $(INC)/compat.h
|
||||||
$(OBJ)/kgroup.$o: $(SRC)/util/kgroup.c $(INC)/compat.h
|
$(OBJ)/kgroup.$o: $(SRC)/util/kgroup.c $(INC)/compat.h
|
||||||
|
|
|
@ -24,13 +24,8 @@ DXROOT=c:\sdks\directx\dx7
|
||||||
FMODROOT=c:\sdks\fmodapi374win\api
|
FMODROOT=c:\sdks\fmodapi374win\api
|
||||||
|
|
||||||
# /D these to enable certain features of the port's compile process
|
# /D these to enable certain features of the port's compile process
|
||||||
# USE_A_C This uses a C version of the classic renderer code rather
|
# NOASM When defined, uses C instead of assembly code
|
||||||
# than the assembly version in A.ASM.
|
TARGETOPTS=#/DNOASM
|
||||||
# If this is defined, alter the $(OBJ)\a.$o in the
|
|
||||||
# ENGINEOBJS declaration to be $(OBJ)\a-c.$o
|
|
||||||
# NOASM When defined, uses C instead of Microsoft inline
|
|
||||||
# assembly for the features in PRAGMAS.H
|
|
||||||
TARGETOPTS=#/DUSE_A_C #/DNOASM
|
|
||||||
|
|
||||||
!ifdef DEBUG
|
!ifdef DEBUG
|
||||||
# debugging options
|
# debugging options
|
||||||
|
|
|
@ -80,7 +80,7 @@ endif
|
||||||
ifeq ($(PLATFORM),SKYOS)
|
ifeq ($(PLATFORM),SKYOS)
|
||||||
RENDERTYPE=SDL
|
RENDERTYPE=SDL
|
||||||
EXESUFFIX=.app
|
EXESUFFIX=.app
|
||||||
override USE_A_C=1
|
override NOASM=1
|
||||||
BUILDCFLAGS+= -DUNDERSCORES
|
BUILDCFLAGS+= -DUNDERSCORES
|
||||||
SDLCONFIG=
|
SDLCONFIG=
|
||||||
SDLCONFIG_CFLAGS=-I/boot/programs/sdk/include/sdl
|
SDLCONFIG_CFLAGS=-I/boot/programs/sdk/include/sdl
|
||||||
|
@ -89,7 +89,7 @@ endif
|
||||||
ifeq ($(PLATFORM),QNX)
|
ifeq ($(PLATFORM),QNX)
|
||||||
RENDERTYPE=SDL
|
RENDERTYPE=SDL
|
||||||
override USE_OPENGL=0
|
override USE_OPENGL=0
|
||||||
override USE_A_C=1
|
override NOASM=1
|
||||||
STDCPPLIB=-lstdc++
|
STDCPPLIB=-lstdc++
|
||||||
LIBS+= -lsocket
|
LIBS+= -lsocket
|
||||||
endif
|
endif
|
||||||
|
@ -97,7 +97,6 @@ ifeq ($(PLATFORM),SUNOS)
|
||||||
RENDERTYPE=SDL
|
RENDERTYPE=SDL
|
||||||
override USE_OPENGL=0
|
override USE_OPENGL=0
|
||||||
override NOASM=1
|
override NOASM=1
|
||||||
override USE_A_C=1
|
|
||||||
STDCPPLIB=-lstdc++
|
STDCPPLIB=-lstdc++
|
||||||
LIBS+= -lsocket -lnsl
|
LIBS+= -lsocket -lnsl
|
||||||
endif
|
endif
|
||||||
|
@ -147,9 +146,6 @@ endif
|
||||||
ifneq (0,$(USE_OPENGL))
|
ifneq (0,$(USE_OPENGL))
|
||||||
BUILDCFLAGS+= -DUSE_OPENGL
|
BUILDCFLAGS+= -DUSE_OPENGL
|
||||||
endif
|
endif
|
||||||
ifneq (0,$(USE_A_C))
|
|
||||||
BUILDCFLAGS+= -DUSE_A_C
|
|
||||||
endif
|
|
||||||
ifneq (0,$(NOASM))
|
ifneq (0,$(NOASM))
|
||||||
BUILDCFLAGS+= -DNOASM
|
BUILDCFLAGS+= -DNOASM
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -29,13 +29,8 @@ DXROOT=c:\sdks\directx\dx7
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# -d these to enable certain features of the port's compile process
|
# -d these to enable certain features of the port's compile process
|
||||||
# USE_A_C This uses a C version of the classic renderer code rather
|
# NOASM When defined, uses C code instead assembly code
|
||||||
# than the assembly version in A.ASM.
|
TARGETOPTS=#-dNOASM
|
||||||
# If this is defined, alter the $(OBJ)\a.$o in the
|
|
||||||
# ENGINEOBJS declaration to be $(OBJ)\a-c.$o
|
|
||||||
# NOASM When defined, uses C code instead of Watcom inline
|
|
||||||
# assembly for the features in PRAGMAS.H
|
|
||||||
TARGETOPTS=#-dUSE_A_C #-dNOASM
|
|
||||||
|
|
||||||
CC=wcc386
|
CC=wcc386
|
||||||
CXX=wpp386
|
CXX=wpp386
|
||||||
|
|
|
@ -6,54 +6,7 @@
|
||||||
#ifndef __a_h__
|
#ifndef __a_h__
|
||||||
#define __a_h__
|
#define __a_h__
|
||||||
|
|
||||||
#if defined(USE_A_C)
|
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||||
|
|
||||||
#define ENGINE_USING_A_C
|
|
||||||
|
|
||||||
void setvlinebpl(long dabpl);
|
|
||||||
void fixtransluscence(long datransoff);
|
|
||||||
void settransnormal(void);
|
|
||||||
void settransreverse(void);
|
|
||||||
|
|
||||||
void sethlinesizes(long logx, long logy, long bufplc);
|
|
||||||
void setpalookupaddress(char *paladdr);
|
|
||||||
void setuphlineasm4(long bxinc, long byinc);
|
|
||||||
void hlineasm4(long cnt, long skiploadincs, long paloffs, unsigned long by, unsigned long bx, long p);
|
|
||||||
|
|
||||||
void setupslopevlin(long logylogx, long bufplc, long pinc);
|
|
||||||
void slopevlin(long p, long i, long slopaloffs, long cnt, long bx, long by);
|
|
||||||
|
|
||||||
void setupvlineasm(long neglogy);
|
|
||||||
void vlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p);
|
|
||||||
|
|
||||||
void setupmvlineasm(long neglogy);
|
|
||||||
void mvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p);
|
|
||||||
|
|
||||||
void setuptvlineasm(long neglogy);
|
|
||||||
void tvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p);
|
|
||||||
|
|
||||||
void msethlineshift(long logx, long logy);
|
|
||||||
void mhline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p);
|
|
||||||
|
|
||||||
void tsethlineshift(long logx, long logy);
|
|
||||||
void thline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p);
|
|
||||||
|
|
||||||
void setupspritevline(long paloffs, long bxinc, long byinc, long ysiz);
|
|
||||||
void spritevline(long bx, long by, long cnt, long bufplc, long p);
|
|
||||||
|
|
||||||
void msetupspritevline(long paloffs, long bxinc, long byinc, long ysiz);
|
|
||||||
void mspritevline(long bx, long by, long cnt, long bufplc, long p);
|
|
||||||
|
|
||||||
void tsetupspritevline(long paloffs, long bxinc, long byinc, long ysiz);
|
|
||||||
void tspritevline(long bx, long by, long cnt, long bufplc, long p);
|
|
||||||
|
|
||||||
void setupdrawslab (long dabpl, long pal);
|
|
||||||
void drawslab (long dx, long v, long dy, long vi, long vptr, long p);
|
|
||||||
void stretchhline (long p0, long u, long cnt, long uinc, long rptr, long p);
|
|
||||||
|
|
||||||
void mmxoverlay();
|
|
||||||
|
|
||||||
#elif defined(__WATCOMC__) // USE_A_C
|
|
||||||
|
|
||||||
extern long mmxoverlay();
|
extern long mmxoverlay();
|
||||||
#pragma aux mmxoverlay modify [eax ebx ecx edx];
|
#pragma aux mmxoverlay modify [eax ebx ecx edx];
|
||||||
|
@ -140,7 +93,7 @@ extern long setupdrawslab(long,long);
|
||||||
extern long drawslab(long,long,long,long,long,long);
|
extern long drawslab(long,long,long,long,long,long);
|
||||||
#pragma aux drawslab parm [eax][ebx][ecx][edx][esi][edi];
|
#pragma aux drawslab parm [eax][ebx][ecx][edx][esi][edi];
|
||||||
|
|
||||||
#elif defined(__GNUC__) && defined(__i386__) // __WATCOMC__
|
#elif defined(__GNUC__) && defined(__i386__) && !defined(NOASM) // __WATCOMC__
|
||||||
|
|
||||||
#if defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__SYLLABLE__)
|
#if defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__SYLLABLE__)
|
||||||
#define __cdecl
|
#define __cdecl
|
||||||
|
@ -190,7 +143,7 @@ extern long __cdecl setupdrawslab(long,long);
|
||||||
extern long __cdecl drawslab(long,long,long,long,long,long);
|
extern long __cdecl drawslab(long,long,long,long,long,long);
|
||||||
extern void __cdecl stretchhline(long,long,long,long,long,long);
|
extern void __cdecl stretchhline(long,long,long,long,long,long);
|
||||||
|
|
||||||
#elif defined(_MSC_VER) // __GNUC__ && __i386__
|
#elif defined(_MSC_VER) && !defined(NOASM) // __GNUC__ && __i386__
|
||||||
|
|
||||||
extern long _cdecl mmxoverlay();
|
extern long _cdecl mmxoverlay();
|
||||||
extern long _cdecl sethlinesizes(long,long,long);
|
extern long _cdecl sethlinesizes(long,long,long);
|
||||||
|
@ -238,7 +191,50 @@ extern void _cdecl stretchhline(long,long,long,long,long,long);
|
||||||
|
|
||||||
#else // _MSC_VER
|
#else // _MSC_VER
|
||||||
|
|
||||||
#error Unsupported compiler or architecture.
|
#define ENGINE_USING_A_C
|
||||||
|
|
||||||
|
void setvlinebpl(long dabpl);
|
||||||
|
void fixtransluscence(long datransoff);
|
||||||
|
void settransnormal(void);
|
||||||
|
void settransreverse(void);
|
||||||
|
|
||||||
|
void sethlinesizes(long logx, long logy, long bufplc);
|
||||||
|
void setpalookupaddress(char *paladdr);
|
||||||
|
void setuphlineasm4(long bxinc, long byinc);
|
||||||
|
void hlineasm4(long cnt, long skiploadincs, long paloffs, unsigned long by, unsigned long bx, long p);
|
||||||
|
|
||||||
|
void setupslopevlin(long logylogx, long bufplc, long pinc);
|
||||||
|
void slopevlin(long p, long i, long slopaloffs, long cnt, long bx, long by);
|
||||||
|
|
||||||
|
void setupvlineasm(long neglogy);
|
||||||
|
void vlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p);
|
||||||
|
|
||||||
|
void setupmvlineasm(long neglogy);
|
||||||
|
void mvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p);
|
||||||
|
|
||||||
|
void setuptvlineasm(long neglogy);
|
||||||
|
void tvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p);
|
||||||
|
|
||||||
|
void msethlineshift(long logx, long logy);
|
||||||
|
void mhline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p);
|
||||||
|
|
||||||
|
void tsethlineshift(long logx, long logy);
|
||||||
|
void thline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p);
|
||||||
|
|
||||||
|
void setupspritevline(long paloffs, long bxinc, long byinc, long ysiz);
|
||||||
|
void spritevline(long bx, long by, long cnt, long bufplc, long p);
|
||||||
|
|
||||||
|
void msetupspritevline(long paloffs, long bxinc, long byinc, long ysiz);
|
||||||
|
void mspritevline(long bx, long by, long cnt, long bufplc, long p);
|
||||||
|
|
||||||
|
void tsetupspritevline(long paloffs, long bxinc, long byinc, long ysiz);
|
||||||
|
void tspritevline(long bx, long by, long cnt, long bufplc, long p);
|
||||||
|
|
||||||
|
void setupdrawslab (long dabpl, long pal);
|
||||||
|
void drawslab (long dx, long v, long dy, long vi, long vptr, long p);
|
||||||
|
void stretchhline (long p0, long u, long cnt, long uinc, long rptr, long p);
|
||||||
|
|
||||||
|
void mmxoverlay();
|
||||||
|
|
||||||
#endif // else
|
#endif // else
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,7 @@
|
||||||
|
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
|
|
||||||
#ifndef ENGINE_USING_A_C
|
#ifdef ENGINE_USING_A_C
|
||||||
# error A.H has indicated that optimized code has been requested. This means a-c.c is being compiled \
|
|
||||||
when USE_A_C has not been defined.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
long krecip(long num); // from engine.c
|
long krecip(long num); // from engine.c
|
||||||
|
|
||||||
|
@ -292,6 +289,7 @@ void stretchhline (long p0, long u, long cnt, long uinc, long rptr, long p)
|
||||||
|
|
||||||
void mmxoverlay() { }
|
void mmxoverlay() { }
|
||||||
|
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* vim:ts=4:
|
* vim:ts=4:
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
SUPERBUILD = 1
|
SUPERBUILD = 1
|
||||||
POLYMOST = 1
|
POLYMOST = 1
|
||||||
USE_OPENGL = 1
|
USE_OPENGL = 1
|
||||||
USE_A_C = 0
|
|
||||||
NOASM = 0
|
NOASM = 0
|
||||||
|
|
||||||
# Debugging options
|
# Debugging options
|
||||||
|
@ -36,7 +35,7 @@ CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
# -Werror-implicit-function-declaration
|
# -Werror-implicit-function-declaration
|
||||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \
|
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \
|
||||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
|
-fno-pic -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
|
||||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -I../jfaud/inc
|
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -I../jfaud/inc
|
||||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||||
LIBS=-lm
|
LIBS=-lm
|
||||||
|
@ -188,7 +187,7 @@ enginelib editorlib:
|
||||||
-mkdir $(EOBJ)
|
-mkdir $(EOBJ)
|
||||||
$(MAKE) -C $(EROOT)/ "OBJ=$(CURDIR)/$(EOBJ)" \
|
$(MAKE) -C $(EROOT)/ "OBJ=$(CURDIR)/$(EOBJ)" \
|
||||||
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \
|
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \
|
||||||
USE_OPENGL=$(USE_OPENGL) USE_A_C=$(USE_A_C) \
|
USE_OPENGL=$(USE_OPENGL) \
|
||||||
NOASM=$(NOASM) RELEASE=$(RELEASE) $@
|
NOASM=$(NOASM) RELEASE=$(RELEASE) $@
|
||||||
|
|
||||||
$(EOBJ)/$(ENGINELIB): enginelib
|
$(EOBJ)/$(ENGINELIB): enginelib
|
||||||
|
|
|
@ -66,6 +66,10 @@ static int32 CommandMusicToggleOff = 0;
|
||||||
static char *CommandMap = NULL;
|
static char *CommandMap = NULL;
|
||||||
static char *CommandName = NULL,*CommandNet = NULL;
|
static char *CommandName = NULL,*CommandNet = NULL;
|
||||||
int32 CommandWeaponChoice = 0;
|
int32 CommandWeaponChoice = 0;
|
||||||
|
static struct strllist {
|
||||||
|
struct strllist *next;
|
||||||
|
char *str;
|
||||||
|
} *CommandPaths = NULL, *CommandGrps = NULL;
|
||||||
|
|
||||||
char confilename[BMAX_PATH] = {"EDUKE.CON"}, boardfilename[BMAX_PATH] = {0};
|
char confilename[BMAX_PATH] = {"EDUKE.CON"}, boardfilename[BMAX_PATH] = {0};
|
||||||
char waterpal[768], slimepal[768], titlepal[768], drealms[768], endingpal[768];
|
char waterpal[768], slimepal[768], titlepal[768], drealms[768], endingpal[768];
|
||||||
|
@ -7678,6 +7682,7 @@ void comlinehelp(char **argv)
|
||||||
"-i#\t\tNetwork mode (1/0) (multiplayer only) (default == 1)\n"
|
"-i#\t\tNetwork mode (1/0) (multiplayer only) (default == 1)\n"
|
||||||
"-f#\t\tSend fewer packets (1, 2, 4) (multiplayer only)\n"
|
"-f#\t\tSend fewer packets (1, 2, 4) (multiplayer only)\n"
|
||||||
"-gFILE\t\tUse multiple group files (must be last on command line)\n"
|
"-gFILE\t\tUse multiple group files (must be last on command line)\n"
|
||||||
|
"-jDIRECTORY\t\tAdd a directory to the file path stack\n"
|
||||||
"-hFILE\t\tUse FILE instead of DUKE3D.DEF\n"
|
"-hFILE\t\tUse FILE instead of DUKE3D.DEF\n"
|
||||||
"-xFILE\t\tUse specified CON file (default EDUKE.CON/GAME.CON)\n"
|
"-xFILE\t\tUse specified CON file (default EDUKE.CON/GAME.CON)\n"
|
||||||
"-u#########\tUser's favorite weapon order (default: 3425689071)\n"
|
"-u#########\tUser's favorite weapon order (default: 3425689071)\n"
|
||||||
|
@ -7847,21 +7852,13 @@ void checkcommandline(int argc,char **argv)
|
||||||
c = argv[i];
|
c = argv[i];
|
||||||
if (((*c == '/') || (*c == '-')) && (!firstnet))
|
if (((*c == '/') || (*c == '-')) && (!firstnet))
|
||||||
{
|
{
|
||||||
if (!Bstrcasecmp(c+1,"addpath")) {
|
|
||||||
if (argc > i+1)
|
|
||||||
{
|
|
||||||
Bstrcpy(tempbuf,argv[i+1]);
|
|
||||||
addsearchpath(tempbuf);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!Bstrcasecmp(c+1,"nam")) {
|
if (!Bstrcasecmp(c+1,"nam")) {
|
||||||
|
strcpy(defaultduke3dgrp, "nam.grp");
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!Bstrcasecmp(c+1,"setup")) {
|
if (!Bstrcasecmp(c+1,"setup")) {
|
||||||
|
CommandSetup = TRUE;
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -7881,6 +7878,7 @@ void checkcommandline(int argc,char **argv)
|
||||||
}
|
}
|
||||||
if (!Bstrcasecmp(c+1,"rmnet"))
|
if (!Bstrcasecmp(c+1,"rmnet"))
|
||||||
{
|
{
|
||||||
|
NoSetup = TRUE;
|
||||||
if (argc > i+1)
|
if (argc > i+1)
|
||||||
{
|
{
|
||||||
CommandNet = argv[i+1];
|
CommandNet = argv[i+1];
|
||||||
|
@ -7976,6 +7974,7 @@ void checkcommandline(int argc,char **argv)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!Bstrcasecmp(c+1,"net")) {
|
if (!Bstrcasecmp(c+1,"net")) {
|
||||||
|
NoSetup = TRUE;
|
||||||
firstnet = i;
|
firstnet = i;
|
||||||
netparamcount = argc - i - 1;
|
netparamcount = argc - i - 1;
|
||||||
netparam = (char **)calloc(netparamcount, sizeof(char**));
|
netparam = (char **)calloc(netparamcount, sizeof(char**));
|
||||||
|
@ -8030,87 +8029,15 @@ void checkcommandline(int argc,char **argv)
|
||||||
c++;
|
c++;
|
||||||
switch(*c)
|
switch(*c)
|
||||||
{
|
{
|
||||||
default: break;
|
case '?':
|
||||||
case 'x':
|
comlinehelp(argv);
|
||||||
case 'X':
|
exit(0);
|
||||||
c++;
|
|
||||||
if(*c)
|
|
||||||
{
|
|
||||||
Bstrcpy(confilename,c);
|
|
||||||
userconfiles = 1;
|
|
||||||
initprintf("Using CON file: %s.\n",confilename);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'g':
|
|
||||||
case 'G':
|
|
||||||
c++;
|
|
||||||
if(*c)
|
|
||||||
{
|
|
||||||
Bstrcpy(tempbuf,c);
|
|
||||||
if( strchr(tempbuf,'.') == 0)
|
|
||||||
Bstrcat(tempbuf,".grp");
|
|
||||||
|
|
||||||
j = initgroupfile(tempbuf);
|
|
||||||
if( j == -1 )
|
|
||||||
initprintf("Could not find GRP file: %s.\n",tempbuf);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
groupfile = j;
|
|
||||||
initprintf("Using GRP file: %s.\n",tempbuf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'h':
|
|
||||||
case 'H':
|
|
||||||
c++;
|
|
||||||
if (*c) {
|
|
||||||
duke3ddef = c;
|
|
||||||
initprintf("Using DEF file: %s.\n",duke3ddef);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'A':
|
case 'A':
|
||||||
ud.playerai = 1;
|
ud.playerai = 1;
|
||||||
initprintf("Other player AI.\n");
|
initprintf("Other player AI.\n");
|
||||||
break;
|
break;
|
||||||
case 'n':
|
|
||||||
case 'N':
|
|
||||||
c++;
|
|
||||||
if(*c == 's' || *c == 'S')
|
|
||||||
{
|
|
||||||
CommandSoundToggleOff = 2;
|
|
||||||
initprintf("Sound off.\n");
|
|
||||||
}
|
|
||||||
else if(*c == 'm' || *c == 'M')
|
|
||||||
{
|
|
||||||
CommandMusicToggleOff = 1;
|
|
||||||
initprintf("Music off.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( *c == 'D')
|
|
||||||
{
|
|
||||||
FILE * fp=fopen("gamevars.txt","w");
|
|
||||||
InitGameVars();
|
|
||||||
DumpGameVars(fp);
|
|
||||||
fclose(fp);
|
|
||||||
initprintf("Game variables saved to gamevars.txt.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
comlinehelp(argv);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'i':
|
|
||||||
case 'I':
|
|
||||||
c++;
|
|
||||||
if(*c == '0') networkmode = 0;
|
|
||||||
if(*c == '1') networkmode = 1;
|
|
||||||
initprintf("Network Mode %d\n",networkmode);
|
|
||||||
break;
|
|
||||||
case 'c':
|
case 'c':
|
||||||
case 'C':
|
case 'C':
|
||||||
|
|
||||||
|
@ -8139,6 +8066,14 @@ void checkcommandline(int argc,char **argv)
|
||||||
// break;
|
// break;
|
||||||
//}
|
//}
|
||||||
break;
|
break;
|
||||||
|
case 'd':
|
||||||
|
case 'D':
|
||||||
|
c++;
|
||||||
|
if( strchr(c,'.') == 0)
|
||||||
|
Bstrcat(c,".dmo");
|
||||||
|
initprintf("Play demo %s.\n",c);
|
||||||
|
Bstrcpy(firstdemofile,c);
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'F':
|
case 'F':
|
||||||
c++;
|
c++;
|
||||||
|
@ -8152,19 +8087,64 @@ void checkcommandline(int argc,char **argv)
|
||||||
setpackettimeout(0x3fffffff,0x3fffffff);
|
setpackettimeout(0x3fffffff,0x3fffffff);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 'g':
|
||||||
case 'T':
|
case 'G':
|
||||||
c++;
|
c++;
|
||||||
if(*c == '1') ud.m_respawn_monsters = 1;
|
if(!*c) break;
|
||||||
else if(*c == '2') ud.m_respawn_items = 1;
|
strcpy(tempbuf,c);
|
||||||
else if(*c == '3') ud.m_respawn_inventory = 1;
|
if( strchr(tempbuf,'.') == 0)
|
||||||
else
|
strcat(tempbuf,".grp");
|
||||||
|
|
||||||
{
|
{
|
||||||
ud.m_respawn_monsters = 1;
|
struct strllist *s;
|
||||||
ud.m_respawn_items = 1;
|
s = (struct strllist *)calloc(1,sizeof(struct strllist));
|
||||||
ud.m_respawn_inventory = 1;
|
s->str = strdup(tempbuf);
|
||||||
|
if (CommandGrps) {
|
||||||
|
struct strllist *t;
|
||||||
|
for (t = CommandGrps; t->next; t=t->next) ;
|
||||||
|
t->next = s;
|
||||||
|
} else {
|
||||||
|
CommandGrps = s;
|
||||||
}
|
}
|
||||||
initprintf("Respawn on.\n");
|
}
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
case 'H':
|
||||||
|
c++;
|
||||||
|
if (*c) {
|
||||||
|
duke3ddef = c;
|
||||||
|
initprintf("Using DEF file: %s.\n",duke3ddef);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'i':
|
||||||
|
case 'I':
|
||||||
|
c++;
|
||||||
|
if(*c == '0') networkmode = 0;
|
||||||
|
if(*c == '1') networkmode = 1;
|
||||||
|
initprintf("Network Mode %d\n",networkmode);
|
||||||
|
break;
|
||||||
|
case 'j':
|
||||||
|
case 'J':
|
||||||
|
c++;
|
||||||
|
if(!*c) break;
|
||||||
|
{
|
||||||
|
struct strllist *s;
|
||||||
|
s = (struct strllist *)calloc(1,sizeof(struct strllist));
|
||||||
|
s->str = strdup(c);
|
||||||
|
if (CommandPaths) {
|
||||||
|
struct strllist *t;
|
||||||
|
for (t = CommandPaths; t->next; t=t->next) ;
|
||||||
|
t->next = s;
|
||||||
|
} else {
|
||||||
|
CommandPaths = s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'l':
|
||||||
|
case 'L':
|
||||||
|
ud.warp_on = 1;
|
||||||
|
c++;
|
||||||
|
ud.m_level_number = ud.level_number = (atol(c)-1)%11;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
case 'M':
|
case 'M':
|
||||||
|
@ -8175,9 +8155,32 @@ void checkcommandline(int argc,char **argv)
|
||||||
initprintf("Monsters off.\n");
|
initprintf("Monsters off.\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'n':
|
||||||
case 'W':
|
case 'N':
|
||||||
ud.coords = 1;
|
c++;
|
||||||
|
if(*c == 's' || *c == 'S')
|
||||||
|
{
|
||||||
|
CommandSoundToggleOff = 2;
|
||||||
|
initprintf("Sound off.\n");
|
||||||
|
}
|
||||||
|
else if(*c == 'm' || *c == 'M')
|
||||||
|
{
|
||||||
|
CommandMusicToggleOff = 1;
|
||||||
|
initprintf("Music off.\n");
|
||||||
|
}
|
||||||
|
else if(*c == 'd' || *c == 'D')
|
||||||
|
{
|
||||||
|
FILE * fp=fopen("gamevars.txt","w");
|
||||||
|
InitGameVars();
|
||||||
|
DumpGameVars(fp);
|
||||||
|
fclose(fp);
|
||||||
|
initprintf("Game variables saved to gamevars.txt.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
comlinehelp(argv);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
case 'Q':
|
case 'Q':
|
||||||
|
@ -8195,31 +8198,6 @@ void checkcommandline(int argc,char **argv)
|
||||||
ud.m_recstat = 1;
|
ud.m_recstat = 1;
|
||||||
initprintf("Demo record mode on.\n");
|
initprintf("Demo record mode on.\n");
|
||||||
break;
|
break;
|
||||||
case 'd':
|
|
||||||
case 'D':
|
|
||||||
c++;
|
|
||||||
if( strchr(c,'.') == 0)
|
|
||||||
Bstrcat(c,".dmo");
|
|
||||||
initprintf("Play demo %s.\n",c);
|
|
||||||
Bstrcpy(firstdemofile,c);
|
|
||||||
break;
|
|
||||||
case 'l':
|
|
||||||
case 'L':
|
|
||||||
ud.warp_on = 1;
|
|
||||||
c++;
|
|
||||||
ud.m_level_number = ud.level_number = (atol(c)-1)%11;
|
|
||||||
break;
|
|
||||||
case 'j':
|
|
||||||
case 'J':
|
|
||||||
initprintf(HEAD2);
|
|
||||||
exit(0);
|
|
||||||
|
|
||||||
case 'v':
|
|
||||||
case 'V':
|
|
||||||
c++;
|
|
||||||
ud.warp_on = 1;
|
|
||||||
ud.m_volume_number = ud.volume_number = atol(c)-1;
|
|
||||||
break;
|
|
||||||
case 's':
|
case 's':
|
||||||
case 'S':
|
case 'S':
|
||||||
c++;
|
c++;
|
||||||
|
@ -8227,17 +8205,19 @@ void checkcommandline(int argc,char **argv)
|
||||||
if(ud.m_player_skill == 4)
|
if(ud.m_player_skill == 4)
|
||||||
ud.m_respawn_monsters = ud.respawn_monsters = 1;
|
ud.m_respawn_monsters = ud.respawn_monsters = 1;
|
||||||
break;
|
break;
|
||||||
case '0':
|
case 't':
|
||||||
case '1':
|
case 'T':
|
||||||
case '2':
|
c++;
|
||||||
case '3':
|
if(*c == '1') ud.m_respawn_monsters = 1;
|
||||||
case '4':
|
else if(*c == '2') ud.m_respawn_items = 1;
|
||||||
case '5':
|
else if(*c == '3') ud.m_respawn_inventory = 1;
|
||||||
case '6':
|
else
|
||||||
case '7':
|
{
|
||||||
case '8':
|
ud.m_respawn_monsters = 1;
|
||||||
case '9':
|
ud.m_respawn_items = 1;
|
||||||
ud.warp_on = 2 + (*c) - '0';
|
ud.m_respawn_inventory = 1;
|
||||||
|
}
|
||||||
|
initprintf("Respawn on.\n");
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'U':
|
case 'U':
|
||||||
|
@ -8277,7 +8257,38 @@ void checkcommandline(int argc,char **argv)
|
||||||
ud.wchoice[0][8] = 9;
|
ud.wchoice[0][8] = 9;
|
||||||
ud.wchoice[0][9] = 1;
|
ud.wchoice[0][9] = 1;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
case 'V':
|
||||||
|
c++;
|
||||||
|
ud.warp_on = 1;
|
||||||
|
ud.m_volume_number = ud.volume_number = atol(c)-1;
|
||||||
|
break;
|
||||||
|
case 'w':
|
||||||
|
case 'W':
|
||||||
|
ud.coords = 1;
|
||||||
|
break;
|
||||||
|
case 'x':
|
||||||
|
case 'X':
|
||||||
|
c++;
|
||||||
|
if(*c)
|
||||||
|
{
|
||||||
|
Bstrcpy(confilename,c);
|
||||||
|
userconfiles = 1;
|
||||||
|
initprintf("Using CON file: %s.\n",confilename);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '0':
|
||||||
|
case '1':
|
||||||
|
case '2':
|
||||||
|
case '3':
|
||||||
|
case '4':
|
||||||
|
case '5':
|
||||||
|
case '6':
|
||||||
|
case '7':
|
||||||
|
case '8':
|
||||||
|
case '9':
|
||||||
|
ud.warp_on = 2 + (*c) - '0';
|
||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
case 'Z':
|
case 'Z':
|
||||||
|
@ -8923,6 +8934,29 @@ void app_main(int argc,char **argv)
|
||||||
initprintf("Copyright (c) 1996, 2003 3D Realms Entertainment\n");
|
initprintf("Copyright (c) 1996, 2003 3D Realms Entertainment\n");
|
||||||
initprintf("Copyright (c) 2006 EDuke32 team\n");
|
initprintf("Copyright (c) 2006 EDuke32 team\n");
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
|
addsearchpath("/usr/share/games/eduke32");
|
||||||
|
addsearchpath("/usr/local/share/games/eduke32");
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
addsearchpath("/Library/Application Support/EDuke32");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ud.multimode = 1;
|
||||||
|
|
||||||
|
checkcommandline(argc,argv);
|
||||||
|
|
||||||
|
{
|
||||||
|
struct strllist *s;
|
||||||
|
while (CommandPaths) {
|
||||||
|
s = CommandPaths->next;
|
||||||
|
addsearchpath(CommandPaths->str);
|
||||||
|
|
||||||
|
free(CommandPaths->str);
|
||||||
|
free(CommandPaths);
|
||||||
|
CommandPaths = s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
if (!access("user_profiles_enabled", F_OK))
|
if (!access("user_profiles_enabled", F_OK))
|
||||||
#else
|
#else
|
||||||
|
@ -8933,12 +8967,6 @@ void app_main(int argc,char **argv)
|
||||||
char *homedir;
|
char *homedir;
|
||||||
int asperr;
|
int asperr;
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
||||||
addsearchpath("/usr/share/games/eduke32");
|
|
||||||
addsearchpath("/usr/local/share/games/eduke32");
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
addsearchpath("/Library/Application Support/EDuke32");
|
|
||||||
#endif
|
|
||||||
if (getcwd(cwd,BMAX_PATH)) addsearchpath(cwd);
|
if (getcwd(cwd,BMAX_PATH)) addsearchpath(cwd);
|
||||||
if ((homedir = Bgethomedir())) {
|
if ((homedir = Bgethomedir())) {
|
||||||
Bsnprintf(cwd,sizeof(cwd),"%s/"
|
Bsnprintf(cwd,sizeof(cwd),"%s/"
|
||||||
|
@ -8961,22 +8989,10 @@ void app_main(int argc,char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=1;i<argc;i++) {
|
|
||||||
if (argv[i][0] != '-' && argv[i][0] != '/') continue;
|
|
||||||
if (!Bstrcasecmp(argv[i]+1, "setup")) CommandSetup = TRUE;
|
|
||||||
else if (!Bstrcasecmp(argv[i]+1, "net")) NoSetup = TRUE;
|
|
||||||
else if (!Bstrcasecmp(argv[i]+1, "nam")) {
|
|
||||||
strcpy(defaultduke3dgrp, "nam.grp");
|
|
||||||
}
|
|
||||||
else if (!Bstrcasecmp(argv[i]+1, "?")) {
|
|
||||||
comlinehelp(argv);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
glusetexcache = glusetexcachecompression = -1;
|
glusetexcache = glusetexcachecompression = -1;
|
||||||
|
|
||||||
i = CONFIG_ReadSetup();
|
i = CONFIG_ReadSetup();
|
||||||
|
if (getenv("DUKE3DGRP")) duke3dgrp = getenv("DUKE3DGRP");
|
||||||
|
|
||||||
if(glusetexcache == -1 || glusetexcachecompression == -1)
|
if(glusetexcache == -1 || glusetexcachecompression == -1)
|
||||||
{
|
{
|
||||||
|
@ -9040,7 +9056,6 @@ void app_main(int argc,char **argv)
|
||||||
Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)");
|
Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getenv("DUKE3DGRP")) duke3dgrp = getenv("DUKE3DGRP");
|
|
||||||
initprintf("Main GRP file: %s.\n", duke3dgrp);
|
initprintf("Main GRP file: %s.\n", duke3dgrp);
|
||||||
initgroupfile(duke3dgrp);
|
initgroupfile(duke3dgrp);
|
||||||
|
|
||||||
|
@ -9050,17 +9065,30 @@ void app_main(int argc,char **argv)
|
||||||
kclose(i);
|
kclose(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
struct strllist *s;
|
||||||
|
while (CommandGrps) {
|
||||||
|
s = CommandGrps->next;
|
||||||
|
j = initgroupfile(CommandGrps->str);
|
||||||
|
if( j == -1 ) initprintf("Warning: could not find group file %s.\n",CommandGrps->str);
|
||||||
|
else {
|
||||||
|
groupfile = j;
|
||||||
|
initprintf("Using group file %s.\n",CommandGrps->str);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(CommandGrps->str);
|
||||||
|
free(CommandGrps);
|
||||||
|
CommandGrps = s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadgroupfiles(duke3ddef);
|
||||||
|
|
||||||
copyprotect();
|
copyprotect();
|
||||||
if (cp) return;
|
if (cp) return;
|
||||||
|
|
||||||
ud.multimode = 1;
|
|
||||||
|
|
||||||
checkcommandline(argc,argv);
|
|
||||||
|
|
||||||
if (netparamcount > 0) _buildargc = (argc -= netparamcount+1); // crop off the net parameters
|
if (netparamcount > 0) _buildargc = (argc -= netparamcount+1); // crop off the net parameters
|
||||||
|
|
||||||
if (VOLUMEALL)
|
|
||||||
loadgroupfiles(duke3ddef);
|
|
||||||
|
|
||||||
// gotta set the proper title after we compile the CONs if this is the full version
|
// gotta set the proper title after we compile the CONs if this is the full version
|
||||||
|
|
||||||
|
@ -10456,15 +10484,18 @@ char domovethings(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=connecthead;i>=0;i=connectpoint2[i])
|
for(i=connecthead;i>=0;i=connectpoint2[i])
|
||||||
{
|
|
||||||
if(gametype_flags[ud.coop] & GAMETYPE_FLAG_TDM)
|
|
||||||
{
|
{
|
||||||
if(sync[i].extbits&(1<<6))
|
if(sync[i].extbits&(1<<6))
|
||||||
{
|
{
|
||||||
ps[i].team = ud.pteam[i];
|
ps[i].team = ud.pteam[i];
|
||||||
|
if(gametype_flags[ud.coop] & GAMETYPE_FLAG_TDM)
|
||||||
|
{
|
||||||
hittype[ps[i].i].picnum = APLAYERTOP;
|
hittype[ps[i].i].picnum = APLAYERTOP;
|
||||||
quickkill(&ps[i]);
|
quickkill(&ps[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(gametype_flags[ud.coop] & GAMETYPE_FLAG_TDM)
|
||||||
|
{
|
||||||
j = 0;
|
j = 0;
|
||||||
switch(ps[i].team)
|
switch(ps[i].team)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2740,23 +2740,27 @@ void getinput(short snum)
|
||||||
{
|
{
|
||||||
if(info.dpitch > 0)
|
if(info.dpitch > 0)
|
||||||
{
|
{
|
||||||
|
if(info.dpitch > MouseFilter)
|
||||||
info.dpitch -= MouseFilter;
|
info.dpitch -= MouseFilter;
|
||||||
if(info.dpitch < 0) info.dpitch = 0;
|
else info.dpitch = 0;
|
||||||
}
|
}
|
||||||
else if(info.dpitch < 0)
|
else if(info.dpitch < 0)
|
||||||
{
|
{
|
||||||
|
if(info.dpitch < -MouseFilter)
|
||||||
info.dpitch += MouseFilter;
|
info.dpitch += MouseFilter;
|
||||||
if(info.dpitch > 0) info.dpitch = 0;
|
else info.dpitch = 0;
|
||||||
}
|
}
|
||||||
if(info.dyaw > 0)
|
if(info.dyaw > 0)
|
||||||
{
|
{
|
||||||
|
if(info.dyaw > MouseFilter)
|
||||||
info.dyaw -= MouseFilter;
|
info.dyaw -= MouseFilter;
|
||||||
if(info.dyaw < 0) info.dyaw = 0;
|
else info.dyaw = 0;
|
||||||
}
|
}
|
||||||
else if(info.dyaw < 0)
|
else if(info.dyaw < 0)
|
||||||
{
|
{
|
||||||
|
if(info.dyaw < -MouseFilter)
|
||||||
info.dyaw += MouseFilter;
|
info.dyaw += MouseFilter;
|
||||||
if(info.dyaw > 0) info.dyaw = 0;
|
else info.dyaw = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue