mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Source code "cleanup," herein referred to as "rape"
git-svn-id: https://svn.eduke32.com/eduke32@1625 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4ba108994c
commit
45d93544a6
72 changed files with 6489 additions and 5916 deletions
|
@ -3,8 +3,7 @@
|
|||
|
||||
SOURCEFILES=GNU.TXT buildlic.txt \
|
||||
Makefile Makefile.deps Makefile.msvc Makefile.watcom MakeDistributions \
|
||||
makemsc.bat makew.bat ChangeLog.html duke3d.def.sample \
|
||||
SEHELP.HLP STHELP.HLP ChangeLog enhance.con.sample names.h
|
||||
duke3d.def.sample SEHELP.HLP STHELP.HLP enhance.con.sample names.h
|
||||
|
||||
BINARYFILES=mapster32.exe eduke32.exe GNU.TXT buildlic.txt \
|
||||
ChangeLog.html setup.exe duke3d.def.sample SEHELP.HLP STHELP.HLP \
|
||||
|
|
|
@ -80,6 +80,9 @@ ifeq (4,$(GCC_MAJOR))
|
|||
# debug += -finline-small-functions -fpredictive-commoning
|
||||
endif
|
||||
endif
|
||||
ifeq (5,$(GCC_MINOR))
|
||||
debug += -flto
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -89,7 +92,7 @@ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
|||
-fjump-tables -fno-stack-protector
|
||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=-lm
|
||||
LIBS=-lm -ldl -pthread
|
||||
|
||||
NASMFLAGS = -s
|
||||
EXESUFFIX=
|
||||
|
|
|
@ -24,14 +24,12 @@ flags_cl= /Od /Zi
|
|||
flags_link=/DEBUG
|
||||
!else
|
||||
# release options
|
||||
flags_cl=/Ox /GL /arch:SSE
|
||||
flags_cl=/O2 /GL /arch:SSE /MP
|
||||
flags_link=/RELEASE /LTCG
|
||||
!endif
|
||||
|
||||
|
||||
DXROOT="U:\SDKs\Microsoft DirectX SDK (April 2007)
|
||||
MSSDKROOT="N:\Program Files\Microsoft Visual Studio 9.0\VC
|
||||
PLATFORMSDK="N:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK
|
||||
DXROOT="C:\Program Files\Microsoft DirectX SDK (February 2010)"
|
||||
|
||||
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DPOLYMER
|
||||
|
||||
|
@ -40,10 +38,10 @@ AS=ml
|
|||
LINK=link /nologo /opt:ref
|
||||
MT=mt
|
||||
CFLAGS= /MT /J /nologo $(flags_cl) \
|
||||
/I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(ENETDIR)\include /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" \
|
||||
/I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(ENETDIR)\include \
|
||||
/D "_CRT_SECURE_NO_DEPRECATE" /W2 $(ENGINEOPTS) \
|
||||
/I$(DXROOT)\include" /DRENDERTYPEWIN=1
|
||||
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib ws2_32.lib comctl32.lib \
|
||||
/I$(DXROOT)\include /DRENDERTYPEWIN=1
|
||||
LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib dxguid.lib comctl32.lib \
|
||||
/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib
|
||||
|
||||
LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib dsound.lib advapi32.lib $(LIBS)
|
||||
|
@ -128,18 +126,18 @@ EDITOROBJS=$(OBJ)\astub.$o \
|
|||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\misc}.rc{$(OBJ)\}.res:
|
||||
$(RC) /i$(EINC)\ /i$(SRC)\ /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" /DPOLYMER /fo$@ /r $<
|
||||
$(RC) /i$(EINC)\ /i$(SRC)\ /DPOLYMER /fo$@ /r $<
|
||||
|
||||
|
||||
# TARGETS
|
||||
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) # duke3d_w32$(EXESUFFIX);
|
||||
|
||||
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB) $(JAUDIOLIBDIR)\$(JAUDIOLIB) $(ENETDIR)\$(ENETLIB)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86 $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $(RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
||||
|
||||
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB) $(JAUDIOLIBDIR)\$(JAUDIOLIB)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86 $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $(RSRC)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
||||
|
||||
!include Makefile.deps
|
||||
|
|
|
@ -102,6 +102,9 @@ ifeq (4,$(GCC_MAJOR))
|
|||
# debug += -finline-small-functions -fpredictive-commoning
|
||||
endif
|
||||
endif
|
||||
ifeq (5,$(GCC_MINOR))
|
||||
debug += -flto
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -111,7 +114,7 @@ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
|||
-fjump-tables -fno-stack-protector
|
||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=-pthread
|
||||
LIBS=-pthread -ldl
|
||||
ASFLAGS=-s #-g
|
||||
EXESUFFIX=
|
||||
|
||||
|
@ -140,7 +143,8 @@ ENGINEOBJS+= \
|
|||
$(OBJ)/osd.$o \
|
||||
$(OBJ)/pragmas.$o \
|
||||
$(OBJ)/scriptfile.$o \
|
||||
$(OBJ)/nedmalloc.$o
|
||||
$(OBJ)/nedmalloc.$o \
|
||||
$(OBJ)/mutex.$o
|
||||
|
||||
ifeq (1,$(USE_OPENGL))
|
||||
ENGINEOBJS+= $(OBJ)/mdsprite.$o
|
||||
|
@ -202,7 +206,7 @@ ifeq ($(RENDERTYPE),SDL)
|
|||
endif
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
ENGINEOBJS+= $(OBJ)/winlayer.$o
|
||||
ENGINEOBJS+= $(OBJ)/winlayer.$o $(OBJ)/rawinput.$o
|
||||
EDITOROBJS+= $(OBJ)/startwin.editor.$o
|
||||
endif
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ $(OBJ)/compat.$o: $(SRC)/compat.c $(INC)/compat.h
|
|||
$(OBJ)/config.$o: $(SRC)/config.c $(INC)/compat.h $(INC)/osd.h $(INC)/editor.h
|
||||
$(OBJ)/crc32.$o: $(SRC)/crc32.c $(INC)/crc32.h
|
||||
$(OBJ)/defs.$o: $(SRC)/defs.c $(INC)/build.h $(INC)/baselayer.h $(INC)/scriptfile.h $(INC)/compat.h
|
||||
$(OBJ)/engine.$o: $(SRC)/engine.c $(INC)/compat.h $(INC)/build.h $(INC)/pragmas.h $(INC)/cache1d.h $(INC)/a.h $(INC)/osd.h $(INC)/baselayer.h $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h $(INC)/polymer.h
|
||||
$(OBJ)/polymost.$o: $(SRC)/polymost.c $(INC)/md4.h $(INC)/quicklz.h $(INC)/lzwnew.h $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h
|
||||
$(OBJ)/hightile.$o: $(SRC)/hightile.c $(INC)/kplib.h $(INC)/hightile.h
|
||||
$(OBJ)/mdsprite.$o: $(SRC)/mdsprite.c $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h
|
||||
$(OBJ)/textfont.$o: $(SRC)/textfont.c
|
||||
$(OBJ)/smalltextfont.$o: $(SRC)/smalltextfont.c
|
||||
$(OBJ)/engine.$o: $(SRC)/engine.c $(INC)/compat.h $(INC)/build.h $(INC)/pragmas.h $(INC)/cache1d.h $(INC)/a.h $(INC)/osd.h $(INC)/baselayer.h $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h $(INC)/polymer.h
|
||||
$(OBJ)/polymost.$o: $(SRC)/polymost.c $(INC)/md4.h $(INC)/quicklz.h $(INC)/lzwnew.h $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h
|
||||
$(OBJ)/hightile.$o: $(SRC)/hightile.c $(INC)/kplib.h $(INC)/hightile.h
|
||||
$(OBJ)/mdsprite.$o: $(SRC)/mdsprite.c $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h
|
||||
$(OBJ)/textfont.$o: $(SRC)/textfont.c
|
||||
$(OBJ)/smalltextfont.$o: $(SRC)/smalltextfont.c
|
||||
$(OBJ)/glbuild.$o: $(SRC)/glbuild.c $(INC)/glbuild.h $(INC)/baselayer.h
|
||||
$(OBJ)/kplib.$o: $(SRC)/kplib.c $(INC)/compat.h
|
||||
$(OBJ)/quicklz.$o: $(SRC)/quicklz.c $(INC)/quicklz.h
|
||||
|
@ -29,6 +29,8 @@ $(OBJ)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(INC)/dyn
|
|||
$(OBJ)/dynamicgtk.$o: $(SRC)/dynamicgtk.c $(INC)/dynamicgtk.h
|
||||
$(OBJ)/polymer.$o: $(SRC)/polymer.c $(INC)/polymer.h $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/osd.h $(INC)/pragmas.h $(INC)/mdsprite.h $(INC)/polymost.h
|
||||
$(OBJ)/nedmalloc.$o: $(SRC)/nedmalloc.c $(INC)/nedmalloc.h $(INC)/malloc.c.h
|
||||
$(OBJ)/mutex.$o: $(SRC)/mutex.c $(INC)/mutex.h
|
||||
$(OBJ)/rawinput.$o: $(SRC)/rawinput.c $(INC)/rawinput.h
|
||||
|
||||
$(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
|
||||
|
|
|
@ -19,9 +19,6 @@ asm=masm
|
|||
ENGINELIB=engine.lib
|
||||
EDITORLIB=build.lib
|
||||
|
||||
DXROOT="U:\SDKs\Microsoft DirectX SDK (April 2007)
|
||||
MSSDKROOT="N:\Program Files\Microsoft Visual Studio 9.0\VC
|
||||
PLATFORMSDK="N:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK
|
||||
# ENETROOT=$(SRC)\enet
|
||||
|
||||
# /D these to enable certain features of the port's compile process
|
||||
|
@ -37,7 +34,7 @@ flags_link=/DEBUG
|
|||
flags_lib=
|
||||
!else
|
||||
# release options
|
||||
flags_cl=/Ox /GL /arch:SSE
|
||||
flags_cl=/O2 /GL /arch:SSE /MP
|
||||
flags_link=/RELEASE /LTCG
|
||||
flags_lib=/LTCG
|
||||
!endif
|
||||
|
@ -46,7 +43,7 @@ CC=cl
|
|||
AS=ml
|
||||
RC=rc
|
||||
LINK=link /opt:ref /nologo
|
||||
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" /I$(DXROOT)\include" # /I$(ENETROOT)\include"
|
||||
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) # /I$(ENETROOT)\include"
|
||||
ASFLAGS=/nologo /coff /c
|
||||
EXESUFFIX=.exe
|
||||
!ifdef DEBUG
|
||||
|
@ -80,14 +77,16 @@ ENGINEOBJS= \
|
|||
$(OBJ)\scriptfile.$o \
|
||||
$(OBJ)\winlayer.$o \
|
||||
$(OBJ)\polymer.$o \
|
||||
$(OBJ)\nedmalloc.$o
|
||||
$(OBJ)\nedmalloc.$o \
|
||||
$(OBJ)\mutex.$o \
|
||||
$(OBJ)\rawinput.$o
|
||||
|
||||
EDITOROBJS=$(OBJ)\build.$o \
|
||||
$(OBJ)\startwin.editor.$o \
|
||||
$(OBJ)\config.$o
|
||||
|
||||
RENDERTYPE=WIN
|
||||
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib dxguid.lib wsock32.lib comctl32.lib
|
||||
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib wsock32.lib comctl32.lib dxguid.lib
|
||||
CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /D "_CRT_SECURE_NO_DEPRECATE" /W2
|
||||
|
||||
# RULES
|
||||
|
@ -127,23 +126,23 @@ $(OBJ)\$(EDITORLIB): $(EDITOROBJS)
|
|||
|
||||
# the tools
|
||||
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
# DEPENDENCIES
|
||||
|
|
|
@ -38,7 +38,7 @@ extern void (*baselayer_onvideomodechange)(int32_t);
|
|||
#ifdef USE_OPENGL
|
||||
extern int32_t osdcmd_glinfo(const osdfuncparm_t *parm);
|
||||
|
||||
struct glinfo {
|
||||
struct glinfo_t {
|
||||
const char *vendor;
|
||||
const char *renderer;
|
||||
const char *version;
|
||||
|
@ -66,7 +66,7 @@ struct glinfo {
|
|||
char dumped;
|
||||
};
|
||||
|
||||
extern struct glinfo glinfo;
|
||||
extern struct glinfo_t glinfo;
|
||||
extern void setvsync(int32_t sync);
|
||||
#endif
|
||||
|
||||
|
@ -113,7 +113,8 @@ const char *getjoyname(int32_t what, int32_t num); // what: 0=axis, 1=button, 2=
|
|||
char *strtolower(char *str, int32_t len);
|
||||
|
||||
char bgetchar(void);
|
||||
int32_t bkbhit(void);
|
||||
#define bkbhit() (keyasciififoplc != keyasciififoend)
|
||||
|
||||
void bflushchars(void);
|
||||
|
||||
int32_t initmouse(void);
|
||||
|
|
|
@ -158,8 +158,7 @@ typedef struct
|
|||
typedef struct {
|
||||
uint32_t mdanimtims;
|
||||
int16_t mdanimcur;
|
||||
int16_t angoff;
|
||||
int16_t pitch, roll;
|
||||
int16_t angoff, pitch, roll;
|
||||
int32_t xoff, yoff, zoff;
|
||||
uint8_t flags;
|
||||
uint8_t xpanning, ypanning;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define __cache1d_h__
|
||||
|
||||
#include "compat.h"
|
||||
#include "mutex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -19,6 +20,7 @@ void allocache(intptr_t *newhandle, int32_t newbytes, char *newlockptr);
|
|||
void suckcache(intptr_t *suckptr);
|
||||
void agecache(void);
|
||||
|
||||
mutex_t cachemutex;
|
||||
extern int32_t pathsearchmode; // 0 = gamefs mode (default), 1 = localfs mode (editor's mode)
|
||||
int32_t addsearchpath(const char *p);
|
||||
int32_t findfrompath(const char *fn, char **where);
|
||||
|
|
|
@ -1,345 +1,53 @@
|
|||
#ifndef __dxdidf_h__
|
||||
#define __dxdidf_h__
|
||||
|
||||
// Keyboard
|
||||
|
||||
static DIOBJECTDATAFORMAT c_dfDIKeyboard_odf[] = {
|
||||
{ &GUID_Key, 0, 0x8000000C, 0x00000000 },
|
||||
{ &GUID_Key, 1, 0x8000010C, 0x00000000 },
|
||||
{ &GUID_Key, 2, 0x8000020C, 0x00000000 },
|
||||
{ &GUID_Key, 3, 0x8000030C, 0x00000000 },
|
||||
{ &GUID_Key, 4, 0x8000040C, 0x00000000 },
|
||||
{ &GUID_Key, 5, 0x8000050C, 0x00000000 },
|
||||
{ &GUID_Key, 6, 0x8000060C, 0x00000000 },
|
||||
{ &GUID_Key, 7, 0x8000070C, 0x00000000 },
|
||||
{ &GUID_Key, 8, 0x8000080C, 0x00000000 },
|
||||
{ &GUID_Key, 9, 0x8000090C, 0x00000000 },
|
||||
{ &GUID_Key, 10, 0x80000A0C, 0x00000000 },
|
||||
{ &GUID_Key, 11, 0x80000B0C, 0x00000000 },
|
||||
{ &GUID_Key, 12, 0x80000C0C, 0x00000000 },
|
||||
{ &GUID_Key, 13, 0x80000D0C, 0x00000000 },
|
||||
{ &GUID_Key, 14, 0x80000E0C, 0x00000000 },
|
||||
{ &GUID_Key, 15, 0x80000F0C, 0x00000000 },
|
||||
{ &GUID_Key, 16, 0x8000100C, 0x00000000 },
|
||||
{ &GUID_Key, 17, 0x8000110C, 0x00000000 },
|
||||
{ &GUID_Key, 18, 0x8000120C, 0x00000000 },
|
||||
{ &GUID_Key, 19, 0x8000130C, 0x00000000 },
|
||||
{ &GUID_Key, 20, 0x8000140C, 0x00000000 },
|
||||
{ &GUID_Key, 21, 0x8000150C, 0x00000000 },
|
||||
{ &GUID_Key, 22, 0x8000160C, 0x00000000 },
|
||||
{ &GUID_Key, 23, 0x8000170C, 0x00000000 },
|
||||
{ &GUID_Key, 24, 0x8000180C, 0x00000000 },
|
||||
{ &GUID_Key, 25, 0x8000190C, 0x00000000 },
|
||||
{ &GUID_Key, 26, 0x80001A0C, 0x00000000 },
|
||||
{ &GUID_Key, 27, 0x80001B0C, 0x00000000 },
|
||||
{ &GUID_Key, 28, 0x80001C0C, 0x00000000 },
|
||||
{ &GUID_Key, 29, 0x80001D0C, 0x00000000 },
|
||||
{ &GUID_Key, 30, 0x80001E0C, 0x00000000 },
|
||||
{ &GUID_Key, 31, 0x80001F0C, 0x00000000 },
|
||||
{ &GUID_Key, 32, 0x8000200C, 0x00000000 },
|
||||
{ &GUID_Key, 33, 0x8000210C, 0x00000000 },
|
||||
{ &GUID_Key, 34, 0x8000220C, 0x00000000 },
|
||||
{ &GUID_Key, 35, 0x8000230C, 0x00000000 },
|
||||
{ &GUID_Key, 36, 0x8000240C, 0x00000000 },
|
||||
{ &GUID_Key, 37, 0x8000250C, 0x00000000 },
|
||||
{ &GUID_Key, 38, 0x8000260C, 0x00000000 },
|
||||
{ &GUID_Key, 39, 0x8000270C, 0x00000000 },
|
||||
{ &GUID_Key, 40, 0x8000280C, 0x00000000 },
|
||||
{ &GUID_Key, 41, 0x8000290C, 0x00000000 },
|
||||
{ &GUID_Key, 42, 0x80002A0C, 0x00000000 },
|
||||
{ &GUID_Key, 43, 0x80002B0C, 0x00000000 },
|
||||
{ &GUID_Key, 44, 0x80002C0C, 0x00000000 },
|
||||
{ &GUID_Key, 45, 0x80002D0C, 0x00000000 },
|
||||
{ &GUID_Key, 46, 0x80002E0C, 0x00000000 },
|
||||
{ &GUID_Key, 47, 0x80002F0C, 0x00000000 },
|
||||
{ &GUID_Key, 48, 0x8000300C, 0x00000000 },
|
||||
{ &GUID_Key, 49, 0x8000310C, 0x00000000 },
|
||||
{ &GUID_Key, 50, 0x8000320C, 0x00000000 },
|
||||
{ &GUID_Key, 51, 0x8000330C, 0x00000000 },
|
||||
{ &GUID_Key, 52, 0x8000340C, 0x00000000 },
|
||||
{ &GUID_Key, 53, 0x8000350C, 0x00000000 },
|
||||
{ &GUID_Key, 54, 0x8000360C, 0x00000000 },
|
||||
{ &GUID_Key, 55, 0x8000370C, 0x00000000 },
|
||||
{ &GUID_Key, 56, 0x8000380C, 0x00000000 },
|
||||
{ &GUID_Key, 57, 0x8000390C, 0x00000000 },
|
||||
{ &GUID_Key, 58, 0x80003A0C, 0x00000000 },
|
||||
{ &GUID_Key, 59, 0x80003B0C, 0x00000000 },
|
||||
{ &GUID_Key, 60, 0x80003C0C, 0x00000000 },
|
||||
{ &GUID_Key, 61, 0x80003D0C, 0x00000000 },
|
||||
{ &GUID_Key, 62, 0x80003E0C, 0x00000000 },
|
||||
{ &GUID_Key, 63, 0x80003F0C, 0x00000000 },
|
||||
{ &GUID_Key, 64, 0x8000400C, 0x00000000 },
|
||||
{ &GUID_Key, 65, 0x8000410C, 0x00000000 },
|
||||
{ &GUID_Key, 66, 0x8000420C, 0x00000000 },
|
||||
{ &GUID_Key, 67, 0x8000430C, 0x00000000 },
|
||||
{ &GUID_Key, 68, 0x8000440C, 0x00000000 },
|
||||
{ &GUID_Key, 69, 0x8000450C, 0x00000000 },
|
||||
{ &GUID_Key, 70, 0x8000460C, 0x00000000 },
|
||||
{ &GUID_Key, 71, 0x8000470C, 0x00000000 },
|
||||
{ &GUID_Key, 72, 0x8000480C, 0x00000000 },
|
||||
{ &GUID_Key, 73, 0x8000490C, 0x00000000 },
|
||||
{ &GUID_Key, 74, 0x80004A0C, 0x00000000 },
|
||||
{ &GUID_Key, 75, 0x80004B0C, 0x00000000 },
|
||||
{ &GUID_Key, 76, 0x80004C0C, 0x00000000 },
|
||||
{ &GUID_Key, 77, 0x80004D0C, 0x00000000 },
|
||||
{ &GUID_Key, 78, 0x80004E0C, 0x00000000 },
|
||||
{ &GUID_Key, 79, 0x80004F0C, 0x00000000 },
|
||||
{ &GUID_Key, 80, 0x8000500C, 0x00000000 },
|
||||
{ &GUID_Key, 81, 0x8000510C, 0x00000000 },
|
||||
{ &GUID_Key, 82, 0x8000520C, 0x00000000 },
|
||||
{ &GUID_Key, 83, 0x8000530C, 0x00000000 },
|
||||
{ &GUID_Key, 84, 0x8000540C, 0x00000000 },
|
||||
{ &GUID_Key, 85, 0x8000550C, 0x00000000 },
|
||||
{ &GUID_Key, 86, 0x8000560C, 0x00000000 },
|
||||
{ &GUID_Key, 87, 0x8000570C, 0x00000000 },
|
||||
{ &GUID_Key, 88, 0x8000580C, 0x00000000 },
|
||||
{ &GUID_Key, 89, 0x8000590C, 0x00000000 },
|
||||
{ &GUID_Key, 90, 0x80005A0C, 0x00000000 },
|
||||
{ &GUID_Key, 91, 0x80005B0C, 0x00000000 },
|
||||
{ &GUID_Key, 92, 0x80005C0C, 0x00000000 },
|
||||
{ &GUID_Key, 93, 0x80005D0C, 0x00000000 },
|
||||
{ &GUID_Key, 94, 0x80005E0C, 0x00000000 },
|
||||
{ &GUID_Key, 95, 0x80005F0C, 0x00000000 },
|
||||
{ &GUID_Key, 96, 0x8000600C, 0x00000000 },
|
||||
{ &GUID_Key, 97, 0x8000610C, 0x00000000 },
|
||||
{ &GUID_Key, 98, 0x8000620C, 0x00000000 },
|
||||
{ &GUID_Key, 99, 0x8000630C, 0x00000000 },
|
||||
{ &GUID_Key, 100, 0x8000640C, 0x00000000 },
|
||||
{ &GUID_Key, 101, 0x8000650C, 0x00000000 },
|
||||
{ &GUID_Key, 102, 0x8000660C, 0x00000000 },
|
||||
{ &GUID_Key, 103, 0x8000670C, 0x00000000 },
|
||||
{ &GUID_Key, 104, 0x8000680C, 0x00000000 },
|
||||
{ &GUID_Key, 105, 0x8000690C, 0x00000000 },
|
||||
{ &GUID_Key, 106, 0x80006A0C, 0x00000000 },
|
||||
{ &GUID_Key, 107, 0x80006B0C, 0x00000000 },
|
||||
{ &GUID_Key, 108, 0x80006C0C, 0x00000000 },
|
||||
{ &GUID_Key, 109, 0x80006D0C, 0x00000000 },
|
||||
{ &GUID_Key, 110, 0x80006E0C, 0x00000000 },
|
||||
{ &GUID_Key, 111, 0x80006F0C, 0x00000000 },
|
||||
{ &GUID_Key, 112, 0x8000700C, 0x00000000 },
|
||||
{ &GUID_Key, 113, 0x8000710C, 0x00000000 },
|
||||
{ &GUID_Key, 114, 0x8000720C, 0x00000000 },
|
||||
{ &GUID_Key, 115, 0x8000730C, 0x00000000 },
|
||||
{ &GUID_Key, 116, 0x8000740C, 0x00000000 },
|
||||
{ &GUID_Key, 117, 0x8000750C, 0x00000000 },
|
||||
{ &GUID_Key, 118, 0x8000760C, 0x00000000 },
|
||||
{ &GUID_Key, 119, 0x8000770C, 0x00000000 },
|
||||
{ &GUID_Key, 120, 0x8000780C, 0x00000000 },
|
||||
{ &GUID_Key, 121, 0x8000790C, 0x00000000 },
|
||||
{ &GUID_Key, 122, 0x80007A0C, 0x00000000 },
|
||||
{ &GUID_Key, 123, 0x80007B0C, 0x00000000 },
|
||||
{ &GUID_Key, 124, 0x80007C0C, 0x00000000 },
|
||||
{ &GUID_Key, 125, 0x80007D0C, 0x00000000 },
|
||||
{ &GUID_Key, 126, 0x80007E0C, 0x00000000 },
|
||||
{ &GUID_Key, 127, 0x80007F0C, 0x00000000 },
|
||||
{ &GUID_Key, 128, 0x8000800C, 0x00000000 },
|
||||
{ &GUID_Key, 129, 0x8000810C, 0x00000000 },
|
||||
{ &GUID_Key, 130, 0x8000820C, 0x00000000 },
|
||||
{ &GUID_Key, 131, 0x8000830C, 0x00000000 },
|
||||
{ &GUID_Key, 132, 0x8000840C, 0x00000000 },
|
||||
{ &GUID_Key, 133, 0x8000850C, 0x00000000 },
|
||||
{ &GUID_Key, 134, 0x8000860C, 0x00000000 },
|
||||
{ &GUID_Key, 135, 0x8000870C, 0x00000000 },
|
||||
{ &GUID_Key, 136, 0x8000880C, 0x00000000 },
|
||||
{ &GUID_Key, 137, 0x8000890C, 0x00000000 },
|
||||
{ &GUID_Key, 138, 0x80008A0C, 0x00000000 },
|
||||
{ &GUID_Key, 139, 0x80008B0C, 0x00000000 },
|
||||
{ &GUID_Key, 140, 0x80008C0C, 0x00000000 },
|
||||
{ &GUID_Key, 141, 0x80008D0C, 0x00000000 },
|
||||
{ &GUID_Key, 142, 0x80008E0C, 0x00000000 },
|
||||
{ &GUID_Key, 143, 0x80008F0C, 0x00000000 },
|
||||
{ &GUID_Key, 144, 0x8000900C, 0x00000000 },
|
||||
{ &GUID_Key, 145, 0x8000910C, 0x00000000 },
|
||||
{ &GUID_Key, 146, 0x8000920C, 0x00000000 },
|
||||
{ &GUID_Key, 147, 0x8000930C, 0x00000000 },
|
||||
{ &GUID_Key, 148, 0x8000940C, 0x00000000 },
|
||||
{ &GUID_Key, 149, 0x8000950C, 0x00000000 },
|
||||
{ &GUID_Key, 150, 0x8000960C, 0x00000000 },
|
||||
{ &GUID_Key, 151, 0x8000970C, 0x00000000 },
|
||||
{ &GUID_Key, 152, 0x8000980C, 0x00000000 },
|
||||
{ &GUID_Key, 153, 0x8000990C, 0x00000000 },
|
||||
{ &GUID_Key, 154, 0x80009A0C, 0x00000000 },
|
||||
{ &GUID_Key, 155, 0x80009B0C, 0x00000000 },
|
||||
{ &GUID_Key, 156, 0x80009C0C, 0x00000000 },
|
||||
{ &GUID_Key, 157, 0x80009D0C, 0x00000000 },
|
||||
{ &GUID_Key, 158, 0x80009E0C, 0x00000000 },
|
||||
{ &GUID_Key, 159, 0x80009F0C, 0x00000000 },
|
||||
{ &GUID_Key, 160, 0x8000A00C, 0x00000000 },
|
||||
{ &GUID_Key, 161, 0x8000A10C, 0x00000000 },
|
||||
{ &GUID_Key, 162, 0x8000A20C, 0x00000000 },
|
||||
{ &GUID_Key, 163, 0x8000A30C, 0x00000000 },
|
||||
{ &GUID_Key, 164, 0x8000A40C, 0x00000000 },
|
||||
{ &GUID_Key, 165, 0x8000A50C, 0x00000000 },
|
||||
{ &GUID_Key, 166, 0x8000A60C, 0x00000000 },
|
||||
{ &GUID_Key, 167, 0x8000A70C, 0x00000000 },
|
||||
{ &GUID_Key, 168, 0x8000A80C, 0x00000000 },
|
||||
{ &GUID_Key, 169, 0x8000A90C, 0x00000000 },
|
||||
{ &GUID_Key, 170, 0x8000AA0C, 0x00000000 },
|
||||
{ &GUID_Key, 171, 0x8000AB0C, 0x00000000 },
|
||||
{ &GUID_Key, 172, 0x8000AC0C, 0x00000000 },
|
||||
{ &GUID_Key, 173, 0x8000AD0C, 0x00000000 },
|
||||
{ &GUID_Key, 174, 0x8000AE0C, 0x00000000 },
|
||||
{ &GUID_Key, 175, 0x8000AF0C, 0x00000000 },
|
||||
{ &GUID_Key, 176, 0x8000B00C, 0x00000000 },
|
||||
{ &GUID_Key, 177, 0x8000B10C, 0x00000000 },
|
||||
{ &GUID_Key, 178, 0x8000B20C, 0x00000000 },
|
||||
{ &GUID_Key, 179, 0x8000B30C, 0x00000000 },
|
||||
{ &GUID_Key, 180, 0x8000B40C, 0x00000000 },
|
||||
{ &GUID_Key, 181, 0x8000B50C, 0x00000000 },
|
||||
{ &GUID_Key, 182, 0x8000B60C, 0x00000000 },
|
||||
{ &GUID_Key, 183, 0x8000B70C, 0x00000000 },
|
||||
{ &GUID_Key, 184, 0x8000B80C, 0x00000000 },
|
||||
{ &GUID_Key, 185, 0x8000B90C, 0x00000000 },
|
||||
{ &GUID_Key, 186, 0x8000BA0C, 0x00000000 },
|
||||
{ &GUID_Key, 187, 0x8000BB0C, 0x00000000 },
|
||||
{ &GUID_Key, 188, 0x8000BC0C, 0x00000000 },
|
||||
{ &GUID_Key, 189, 0x8000BD0C, 0x00000000 },
|
||||
{ &GUID_Key, 190, 0x8000BE0C, 0x00000000 },
|
||||
{ &GUID_Key, 191, 0x8000BF0C, 0x00000000 },
|
||||
{ &GUID_Key, 192, 0x8000C00C, 0x00000000 },
|
||||
{ &GUID_Key, 193, 0x8000C10C, 0x00000000 },
|
||||
{ &GUID_Key, 194, 0x8000C20C, 0x00000000 },
|
||||
{ &GUID_Key, 195, 0x8000C30C, 0x00000000 },
|
||||
{ &GUID_Key, 196, 0x8000C40C, 0x00000000 },
|
||||
{ &GUID_Key, 197, 0x8000C50C, 0x00000000 },
|
||||
{ &GUID_Key, 198, 0x8000C60C, 0x00000000 },
|
||||
{ &GUID_Key, 199, 0x8000C70C, 0x00000000 },
|
||||
{ &GUID_Key, 200, 0x8000C80C, 0x00000000 },
|
||||
{ &GUID_Key, 201, 0x8000C90C, 0x00000000 },
|
||||
{ &GUID_Key, 202, 0x8000CA0C, 0x00000000 },
|
||||
{ &GUID_Key, 203, 0x8000CB0C, 0x00000000 },
|
||||
{ &GUID_Key, 204, 0x8000CC0C, 0x00000000 },
|
||||
{ &GUID_Key, 205, 0x8000CD0C, 0x00000000 },
|
||||
{ &GUID_Key, 206, 0x8000CE0C, 0x00000000 },
|
||||
{ &GUID_Key, 207, 0x8000CF0C, 0x00000000 },
|
||||
{ &GUID_Key, 208, 0x8000D00C, 0x00000000 },
|
||||
{ &GUID_Key, 209, 0x8000D10C, 0x00000000 },
|
||||
{ &GUID_Key, 210, 0x8000D20C, 0x00000000 },
|
||||
{ &GUID_Key, 211, 0x8000D30C, 0x00000000 },
|
||||
{ &GUID_Key, 212, 0x8000D40C, 0x00000000 },
|
||||
{ &GUID_Key, 213, 0x8000D50C, 0x00000000 },
|
||||
{ &GUID_Key, 214, 0x8000D60C, 0x00000000 },
|
||||
{ &GUID_Key, 215, 0x8000D70C, 0x00000000 },
|
||||
{ &GUID_Key, 216, 0x8000D80C, 0x00000000 },
|
||||
{ &GUID_Key, 217, 0x8000D90C, 0x00000000 },
|
||||
{ &GUID_Key, 218, 0x8000DA0C, 0x00000000 },
|
||||
{ &GUID_Key, 219, 0x8000DB0C, 0x00000000 },
|
||||
{ &GUID_Key, 220, 0x8000DC0C, 0x00000000 },
|
||||
{ &GUID_Key, 221, 0x8000DD0C, 0x00000000 },
|
||||
{ &GUID_Key, 222, 0x8000DE0C, 0x00000000 },
|
||||
{ &GUID_Key, 223, 0x8000DF0C, 0x00000000 },
|
||||
{ &GUID_Key, 224, 0x8000E00C, 0x00000000 },
|
||||
{ &GUID_Key, 225, 0x8000E10C, 0x00000000 },
|
||||
{ &GUID_Key, 226, 0x8000E20C, 0x00000000 },
|
||||
{ &GUID_Key, 227, 0x8000E30C, 0x00000000 },
|
||||
{ &GUID_Key, 228, 0x8000E40C, 0x00000000 },
|
||||
{ &GUID_Key, 229, 0x8000E50C, 0x00000000 },
|
||||
{ &GUID_Key, 230, 0x8000E60C, 0x00000000 },
|
||||
{ &GUID_Key, 231, 0x8000E70C, 0x00000000 },
|
||||
{ &GUID_Key, 232, 0x8000E80C, 0x00000000 },
|
||||
{ &GUID_Key, 233, 0x8000E90C, 0x00000000 },
|
||||
{ &GUID_Key, 234, 0x8000EA0C, 0x00000000 },
|
||||
{ &GUID_Key, 235, 0x8000EB0C, 0x00000000 },
|
||||
{ &GUID_Key, 236, 0x8000EC0C, 0x00000000 },
|
||||
{ &GUID_Key, 237, 0x8000ED0C, 0x00000000 },
|
||||
{ &GUID_Key, 238, 0x8000EE0C, 0x00000000 },
|
||||
{ &GUID_Key, 239, 0x8000EF0C, 0x00000000 },
|
||||
{ &GUID_Key, 240, 0x8000F00C, 0x00000000 },
|
||||
{ &GUID_Key, 241, 0x8000F10C, 0x00000000 },
|
||||
{ &GUID_Key, 242, 0x8000F20C, 0x00000000 },
|
||||
{ &GUID_Key, 243, 0x8000F30C, 0x00000000 },
|
||||
{ &GUID_Key, 244, 0x8000F40C, 0x00000000 },
|
||||
{ &GUID_Key, 245, 0x8000F50C, 0x00000000 },
|
||||
{ &GUID_Key, 246, 0x8000F60C, 0x00000000 },
|
||||
{ &GUID_Key, 247, 0x8000F70C, 0x00000000 },
|
||||
{ &GUID_Key, 248, 0x8000F80C, 0x00000000 },
|
||||
{ &GUID_Key, 249, 0x8000F90C, 0x00000000 },
|
||||
{ &GUID_Key, 250, 0x8000FA0C, 0x00000000 },
|
||||
{ &GUID_Key, 251, 0x8000FB0C, 0x00000000 },
|
||||
{ &GUID_Key, 252, 0x8000FC0C, 0x00000000 },
|
||||
{ &GUID_Key, 253, 0x8000FD0C, 0x00000000 },
|
||||
{ &GUID_Key, 254, 0x8000FE0C, 0x00000000 },
|
||||
{ &GUID_Key, 255, 0x8000FF0C, 0x00000000 }
|
||||
};
|
||||
|
||||
const DIDATAFORMAT c_dfDIKeyboard = { 24, 16, 0x00000002, 256, 256, c_dfDIKeyboard_odf };
|
||||
|
||||
// Mouse
|
||||
/*
|
||||
static DIOBJECTDATAFORMAT c_dfDIMouse_odf[] = {
|
||||
{ &GUID_XAxis, 0, 0x00FFFF03, 0x00000000 },
|
||||
{ &GUID_YAxis, 4, 0x00FFFF03, 0x00000000 },
|
||||
{ &GUID_ZAxis, 8, 0x80FFFF03, 0x00000000 },
|
||||
{ NULL, 12, 0x00FFFF0C, 0x00000000 },
|
||||
{ NULL, 13, 0x00FFFF0C, 0x00000000 },
|
||||
{ NULL, 14, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 15, 0x80FFFF0C, 0x00000000 }
|
||||
};
|
||||
|
||||
const DIDATAFORMAT c_dfDIMouse = { 24, 16, 0x00000002, 16, 7, c_dfDIMouse_odf };
|
||||
*/
|
||||
static DIOBJECTDATAFORMAT c_dfDIMouse2_odf[] = {
|
||||
{&GUID_XAxis, 0, 16776963, 0},
|
||||
{&GUID_YAxis, 4, 16776963, 0},
|
||||
{&GUID_ZAxis, 8, -2130706685, 0},
|
||||
{0, 12, 16776972, 0},
|
||||
{0, 13, 16776972, 0},
|
||||
{0, 14, -2130706676, 0},
|
||||
{0, 15, -2130706676, 0},
|
||||
{0, 16, -2130706676, 0},
|
||||
{0, 17, -2130706676, 0},
|
||||
{0, 18, -2130706676,0},
|
||||
{0, 19, -2130706676, 0}
|
||||
};
|
||||
const DIDATAFORMAT c_dfDIMouse2 = {24, 16, 2, 20, 11, c_dfDIMouse2_odf};
|
||||
|
||||
// Joystick
|
||||
|
||||
static DIOBJECTDATAFORMAT c_dfDIJoystick_odf[] = {
|
||||
{ &GUID_XAxis, 0, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_YAxis, 4, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_ZAxis, 8, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RxAxis, 12, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RyAxis, 16, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RzAxis, 20, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_Slider, 24, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_Slider, 28, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_POV, 32, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 36, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 40, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 44, 0x80FFFF10, 0x00000000 },
|
||||
{ NULL, 48, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 49, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 50, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 51, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 52, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 53, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 54, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 55, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 56, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 57, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 58, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 59, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 60, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 61, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 62, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 63, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 64, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 65, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 66, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 67, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 68, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 69, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 70, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 71, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 72, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 73, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 74, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 75, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 76, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 77, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 78, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 79, 0x80FFFF0C, 0x00000000 }
|
||||
{ &GUID_XAxis, 0, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_YAxis, 4, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_ZAxis, 8, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RxAxis, 12, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RyAxis, 16, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RzAxis, 20, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_Slider, 24, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_Slider, 28, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_POV, 32, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 36, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 40, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 44, 0x80FFFF10, 0x00000000 },
|
||||
{ NULL, 48, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 49, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 50, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 51, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 52, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 53, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 54, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 55, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 56, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 57, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 58, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 59, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 60, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 61, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 62, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 63, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 64, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 65, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 66, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 67, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 68, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 69, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 70, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 71, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 72, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 73, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 74, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 75, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 76, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 77, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 78, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 79, 0x80FFFF0C, 0x00000000 }
|
||||
};
|
||||
|
||||
const DIDATAFORMAT c_dfDIJoystick = { 24, 16, 0x00000001, 80, 44, c_dfDIJoystick_odf };
|
||||
|
|
|
@ -46,11 +46,11 @@ extern int32_t g_numQuoteRedefinitions;
|
|||
//extern int16_t neartagsector, neartagwall, neartagsprite;
|
||||
//extern int32_t neartaghitdist;
|
||||
|
||||
extern int32_t X_DoExecute(int32_t once);
|
||||
extern void X_OnEvent(register int32_t iEventID, register int32_t iActor);
|
||||
extern int32_t VM_Execute(int32_t once);
|
||||
extern void VM_OnEvent(register int32_t iEventID, register int32_t iActor);
|
||||
|
||||
extern void X_ScriptInfo(void);
|
||||
extern void X_Disasm(ofstype beg, int32_t size);
|
||||
extern void VM_ScriptInfo(void);
|
||||
extern void VM_Disasm(ofstype beg, int32_t size);
|
||||
extern void C_ReportError(int32_t iError);
|
||||
|
||||
extern int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags);
|
||||
|
@ -77,12 +77,12 @@ extern int32_t g_scriptSize;
|
|||
extern char *label;
|
||||
//extern int32_t label_allocsize;
|
||||
|
||||
extern hashtable_t labelH;
|
||||
extern hashtable_t h_labels;
|
||||
|
||||
#define MAXLABELLEN 32
|
||||
|
||||
//extern uint8_t waterpal[768],slimepal[768],titlepal[768],drealms[768],endingpal[768],animpal[768];
|
||||
//extern char currentboardfilename[BMAX_PATH];
|
||||
//extern char currentboardfilename[BMAVM_PATH];
|
||||
|
||||
|
||||
enum GameEvent_t {
|
||||
|
@ -180,10 +180,10 @@ extern int32_t g_iThisActorID; // var ID of "I" ///"THISACTOR"
|
|||
|
||||
extern int32_t g_numQuoteRedefinitions;
|
||||
|
||||
extern hashtable_t gamevarH;
|
||||
extern hashtable_t arrayH;
|
||||
extern hashtable_t keywH;
|
||||
extern hashtable_t gamefuncH;
|
||||
extern hashtable_t h_gamevars;
|
||||
extern hashtable_t h_arrays;
|
||||
extern hashtable_t h_keywords;
|
||||
extern hashtable_t h_gamefuncs;
|
||||
|
||||
|
||||
extern int16_t asksave;
|
||||
|
|
|
@ -1937,7 +1937,7 @@ struct win32_mlock_t {
|
|||
#define TRY_LOCK(sl) win32_try_lock(sl)
|
||||
#define SPINS_PER_YIELD 63
|
||||
|
||||
static MLOCK_T malloc_global_mutex = { 0, 0, 0};
|
||||
static MLOCK_T malloc_global_mutex = { 0, "", 0, 0};
|
||||
|
||||
static FORCEINLINE int win32_acquire_lock (MLOCK_T *sl) {
|
||||
int spins = 0;
|
||||
|
|
21
polymer/eduke32/build/include/mutex.h
Normal file
21
polymer/eduke32/build/include/mutex.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef __mutex_h__
|
||||
#define __mutex_h__
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef HANDLE mutex_t;
|
||||
#else
|
||||
typedef pthread_mutex_t mutex_t;
|
||||
#endif
|
||||
|
||||
extern int32_t mutex_init(mutex_t *mutex);
|
||||
extern int32_t mutex_lock(mutex_t *mutex);
|
||||
extern int32_t mutex_unlock(mutex_t *mutex);
|
||||
|
||||
#endif
|
|
@ -24,20 +24,20 @@ typedef struct _symbol
|
|||
|
||||
symbol_t *symbols;
|
||||
|
||||
const char *stripcolorcodes(char *out, const char *in);
|
||||
const char *OSD_StripColors(char *out, const char *in);
|
||||
|
||||
enum cvartypes
|
||||
enum cvartype_t
|
||||
{
|
||||
CVAR_FLOAT = 1,
|
||||
CVAR_INT = 2,
|
||||
CVAR_UINT = 4,
|
||||
CVAR_BOOL = 8,
|
||||
CVAR_STRING = 16,
|
||||
CVAR_DOUBLE = 32,
|
||||
CVAR_NOMULTI = 128,
|
||||
CVAR_MULTI = 256,
|
||||
CVAR_NOSAVE = 512,
|
||||
CVAR_FUNCPTR = 1024,
|
||||
CVAR_FLOAT = 0x00000001,
|
||||
CVAR_INT = 0x00000002,
|
||||
CVAR_UINT = 0x00000004,
|
||||
CVAR_BOOL = 0x00000008,
|
||||
CVAR_STRING = 0x00000010,
|
||||
CVAR_DOUBLE = 0x00000020,
|
||||
CVAR_NOMULTI = 0x00000040,
|
||||
CVAR_MULTI = 0x00000080,
|
||||
CVAR_NOSAVE = 0x00000100,
|
||||
CVAR_FUNCPTR = 0x00000200,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
@ -45,15 +45,24 @@ typedef struct
|
|||
char *name;
|
||||
char *helpstr;
|
||||
void *var;
|
||||
int32_t type; // 0 = integer, 1 = unsigned integer, 2 = boolean, 3 = string, |128 = not in multiplayer, |256 = update multi
|
||||
int32_t extra; // for string, is the length
|
||||
int32_t type; // see cvartype_t
|
||||
int32_t min;
|
||||
int32_t max;
|
||||
int32_t max; // for string, is the length
|
||||
} cvar_t;
|
||||
|
||||
enum osdflags_t
|
||||
{
|
||||
OSD_INITIALIZED = 0x00000001,
|
||||
OSD_DRAW = 0x00000002,
|
||||
OSD_CAPTURE = 0x00000004,
|
||||
OSD_OVERTYPE = 0x00000008,
|
||||
OSD_SHIFT = 0x00000010,
|
||||
OSD_CTRL = 0x00000020,
|
||||
OSD_CAPS = 0x00000040
|
||||
};
|
||||
|
||||
#define OSD_ALIAS 1337
|
||||
#define OSD_UNALIASED 1338
|
||||
#define OSD_ALIAS (void *)0x1337
|
||||
#define OSD_UNALIASED (void *)0xDEAD
|
||||
|
||||
#define OSDCMD_OK 0
|
||||
#define OSDCMD_SHOWHELP 1
|
||||
|
@ -112,7 +121,7 @@ void OSD_ResizeDisplay(int32_t w,int32_t h);
|
|||
void OSD_CaptureInput(int32_t cap);
|
||||
|
||||
// sets the console version string
|
||||
void OSD_SetVersionString(const char *version, int32_t shade, int32_t pal);
|
||||
void OSD_SetVersion(const char *version, int32_t shade, int32_t pal);
|
||||
|
||||
// shows or hides the onscreen display
|
||||
void OSD_ShowDisplay(int32_t onf);
|
||||
|
@ -143,19 +152,19 @@ void OSD_WriteCvars(FILE *fp);
|
|||
// these correspond to the Duke palettes, so they shouldn't really be here
|
||||
// ...but I don't care
|
||||
|
||||
#define OSDTEXT_BLUE "^00"
|
||||
#define OSDTEXT_GOLD "^07"
|
||||
#define OSDTEXT_DARKRED "^10"
|
||||
#define OSDTEXT_GREEN "^11"
|
||||
#define OSDTEXT_GRAY "^12"
|
||||
#define OSDTEXT_DARKGRAY "^13"
|
||||
#define OSDTEXT_BLUE "^00"
|
||||
#define OSDTEXT_GOLD "^07"
|
||||
#define OSDTEXT_DARKRED "^10"
|
||||
#define OSDTEXT_GREEN "^11"
|
||||
#define OSDTEXT_GRAY "^12"
|
||||
#define OSDTEXT_DARKGRAY "^13"
|
||||
#define OSDTEXT_DARKGREEN "^14"
|
||||
#define OSDTEXT_BROWN "^15"
|
||||
#define OSDTEXT_DARKBLUE "^16"
|
||||
#define OSDTEXT_RED "^21"
|
||||
#define OSDTEXT_YELLOW "^23"
|
||||
#define OSDTEXT_BROWN "^15"
|
||||
#define OSDTEXT_DARKBLUE "^16"
|
||||
#define OSDTEXT_RED "^21"
|
||||
#define OSDTEXT_YELLOW "^23"
|
||||
|
||||
#define OSDTEXT_BRIGHT "^S0"
|
||||
#define OSDTEXT_BRIGHT "^S0"
|
||||
|
||||
#define OSD_ERROR OSDTEXT_DARKRED OSDTEXT_BRIGHT
|
||||
#define TEXTSIZE 32768
|
||||
|
|
|
@ -67,7 +67,7 @@ extern GLuint peelprogram[2];
|
|||
|
||||
extern int32_t cachefilehandle;
|
||||
extern FILE *cacheindexptr;
|
||||
extern hashtable_t cacheH;
|
||||
extern hashtable_t h_texcache;
|
||||
|
||||
struct cacheitem_t
|
||||
{
|
||||
|
|
26
polymer/eduke32/build/include/rawinput.h
Normal file
26
polymer/eduke32/build/include/rawinput.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef rawinput_h__
|
||||
#define rawinput_h__
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
void RI_PollDevices();
|
||||
|
||||
uint8_t RI_MouseState( uint8_t Button );
|
||||
|
||||
int8_t RI_WheelState();
|
||||
|
||||
int32_t RI_CaptureInput(int32_t grab, HWND target);
|
||||
|
||||
#define VK_LBUTTON 0x01
|
||||
#define VK_RBUTTON 0x02
|
||||
#define VK_CANCEL 0x03
|
||||
#define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
|
||||
|
||||
// mouse states for RI_MouseState
|
||||
|
||||
#define BUTTON_PRESSED 0x01
|
||||
#define BUTTON_RELEASED 0x02
|
||||
#define BUTTON_HELD 0x03
|
||||
|
||||
#endif // rawinput_h__
|
||||
|
123
polymer/eduke32/build/include/scancodes.h
Normal file
123
polymer/eduke32/build/include/scancodes.h
Normal file
|
@ -0,0 +1,123 @@
|
|||
|
||||
#define sc_None 0
|
||||
#define sc_Bad 0xff
|
||||
#define sc_Comma 0x33
|
||||
#define sc_Period 0x34
|
||||
#define sc_Return 0x1c
|
||||
#define sc_Enter sc_Return
|
||||
#define sc_Escape 0x01
|
||||
#define sc_Space 0x39
|
||||
#define sc_BackSpace 0x0e
|
||||
#define sc_Tab 0x0f
|
||||
#define sc_LeftAlt 0x38
|
||||
#define sc_LeftControl 0x1d
|
||||
#define sc_CapsLock 0x3a
|
||||
#define sc_LeftShift 0x2a
|
||||
#define sc_RightShift 0x36
|
||||
#define sc_F1 0x3b
|
||||
#define sc_F2 0x3c
|
||||
#define sc_F3 0x3d
|
||||
#define sc_F4 0x3e
|
||||
#define sc_F5 0x3f
|
||||
#define sc_F6 0x40
|
||||
#define sc_F7 0x41
|
||||
#define sc_F8 0x42
|
||||
#define sc_F9 0x43
|
||||
#define sc_F10 0x44
|
||||
#define sc_F11 0x57
|
||||
#define sc_F12 0x58
|
||||
#define sc_Kpad_Star 0x37
|
||||
#define sc_Pause 0x59
|
||||
#define sc_ScrollLock 0x46
|
||||
#define sc_NumLock 0x45
|
||||
#define sc_Slash 0x35
|
||||
#define sc_SemiColon 0x27
|
||||
#define sc_Quote 0x28
|
||||
#define sc_Tilde 0x29
|
||||
#define sc_BackSlash 0x2b
|
||||
|
||||
#define sc_OpenBracket 0x1a
|
||||
#define sc_CloseBracket 0x1b
|
||||
|
||||
#define sc_1 0x02
|
||||
#define sc_2 0x03
|
||||
#define sc_3 0x04
|
||||
#define sc_4 0x05
|
||||
#define sc_5 0x06
|
||||
#define sc_6 0x07
|
||||
#define sc_7 0x08
|
||||
#define sc_8 0x09
|
||||
#define sc_9 0x0a
|
||||
#define sc_0 0x0b
|
||||
#define sc_Minus 0x0c
|
||||
#define sc_Equals 0x0d
|
||||
#define sc_Plus 0x0d
|
||||
|
||||
#define sc_kpad_1 0x4f
|
||||
#define sc_kpad_2 0x50
|
||||
#define sc_kpad_3 0x51
|
||||
#define sc_kpad_4 0x4b
|
||||
#define sc_kpad_5 0x4c
|
||||
#define sc_kpad_6 0x4d
|
||||
#define sc_kpad_7 0x47
|
||||
#define sc_kpad_8 0x48
|
||||
#define sc_kpad_9 0x49
|
||||
#define sc_kpad_0 0x52
|
||||
#define sc_kpad_Minus 0x4a
|
||||
#define sc_kpad_Plus 0x4e
|
||||
#define sc_kpad_Period 0x53
|
||||
|
||||
#define sc_A 0x1e
|
||||
#define sc_B 0x30
|
||||
#define sc_C 0x2e
|
||||
#define sc_D 0x20
|
||||
#define sc_E 0x12
|
||||
#define sc_F 0x21
|
||||
#define sc_G 0x22
|
||||
#define sc_H 0x23
|
||||
#define sc_I 0x17
|
||||
#define sc_J 0x24
|
||||
#define sc_K 0x25
|
||||
#define sc_L 0x26
|
||||
#define sc_M 0x32
|
||||
#define sc_N 0x31
|
||||
#define sc_O 0x18
|
||||
#define sc_P 0x19
|
||||
#define sc_Q 0x10
|
||||
#define sc_R 0x13
|
||||
#define sc_S 0x1f
|
||||
#define sc_T 0x14
|
||||
#define sc_U 0x16
|
||||
#define sc_V 0x2f
|
||||
#define sc_W 0x11
|
||||
#define sc_X 0x2d
|
||||
#define sc_Y 0x15
|
||||
#define sc_Z 0x2c
|
||||
|
||||
// Extended scan codes
|
||||
|
||||
#define sc_UpArrow 0xc8 //0x5a
|
||||
#define sc_DownArrow 0xd0 //0x6a
|
||||
#define sc_LeftArrow 0xcb //0x6b
|
||||
#define sc_RightArrow 0xcd //0x6c
|
||||
#define sc_Insert 0xd2 //0x5e
|
||||
#define sc_Delete 0xd3 //0x5f
|
||||
#define sc_Home 0xc7 //0x61
|
||||
#define sc_End 0xcf //0x62
|
||||
#define sc_PgUp 0xc9 //0x63
|
||||
#define sc_PgDn 0xd1 //0x64
|
||||
#define sc_RightAlt 0xb8 //0x65
|
||||
#define sc_RightControl 0x9d //0x66
|
||||
#define sc_kpad_Slash 0xb5 //0x67
|
||||
#define sc_kpad_Enter 0x9c //0x68
|
||||
#define sc_PrintScreen 0xb7 //0x69
|
||||
#define sc_LastScanCode 0x6e
|
||||
|
||||
// Ascii scan codes
|
||||
|
||||
#define asc_Enter 13
|
||||
#define asc_Escape 27
|
||||
#define asc_BackSpace 8
|
||||
#define asc_Tab 9
|
||||
#define asc_Space 32
|
||||
|
|
@ -16,6 +16,10 @@ int32_t win_gethinstance(void);
|
|||
void win_allowtaskswitching(int32_t onf);
|
||||
int32_t win_checkinstance(void);
|
||||
|
||||
extern void (*keypresscallback)(int32_t,int32_t);
|
||||
extern void (*mousepresscallback)(int32_t,int32_t);
|
||||
extern void (*joypresscallback)(int32_t,int32_t);
|
||||
|
||||
#include "baselayer.h"
|
||||
|
||||
#else
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
make -f Makefile %1 %2 %3 %4 %5
|
|
@ -1 +0,0 @@
|
|||
nmake /f Makefile.msvc %1 %2 %3 %4 %5
|
|
@ -1 +0,0 @@
|
|||
wmake -f Makefile.watcom %1 %2 %3 %4 %5
|
|
@ -3,7 +3,7 @@
|
|||
; See the included license file "BUILDLIC.TXT" for license info.
|
||||
|
||||
.586P
|
||||
.8087
|
||||
;.8087
|
||||
;include mmx.inc ;Include this if using < WATCOM 11.0 WASM
|
||||
|
||||
;Warning: IN THIS FILE, ALL SEGMENTS ARE REMOVED. THIS MEANS THAT DS:[]
|
||||
|
|
|
@ -22,7 +22,7 @@ char scantoasc[128] =
|
|||
};
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
struct glinfo glinfo =
|
||||
struct glinfo_t glinfo =
|
||||
{
|
||||
"Unknown", // vendor
|
||||
"Unknown", // renderer
|
||||
|
@ -230,17 +230,19 @@ int32_t baselayer_init(void)
|
|||
cvar_t cvars_engine[] =
|
||||
{
|
||||
#ifdef SUPERBUILD
|
||||
{ "r_novoxmips","r_novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",(void *)&novoxmips, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_voxels","r_voxels: enable/disable automatic sprite->voxel rendering",(void *)&usevoxels, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_scrcaptureformat","r_scrcaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars, CVAR_FUNCPTR, 0, 0, 0 },
|
||||
{ "r_novoxmips","r_novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",(void *)&novoxmips, CVAR_BOOL, 0, 1 },
|
||||
{ "r_voxels","r_voxels: enable/disable automatic sprite->voxel rendering",(void *)&usevoxels, CVAR_BOOL, 0, 1 },
|
||||
{ "r_scrcaptureformat","r_scrcaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars, CVAR_FUNCPTR, 0, 0 },
|
||||
#endif
|
||||
};
|
||||
|
||||
for (i=0; i<sizeof(cvars_engine)/sizeof(cvars_engine[0]); i++)
|
||||
{
|
||||
OSD_RegisterCvar(&cvars_engine[i]);
|
||||
if (cvars_engine[i].type == CVAR_FUNCPTR) OSD_RegisterFunction(cvars_engine[i].name, cvars_engine[i].helpstr, cvars_engine[i].var);
|
||||
else OSD_RegisterFunction(cvars_engine[i].name, cvars_engine[i].helpstr, osdcmd_cvar_set);
|
||||
if (OSD_RegisterCvar(&cvars_engine[i]))
|
||||
continue;
|
||||
|
||||
OSD_RegisterFunction(cvars_engine[i].name, cvars_engine[i].helpstr,
|
||||
cvars_engine[i].type == CVAR_FUNCPTR ? cvars_engine[i].var : osdcmd_cvar_set);
|
||||
}
|
||||
|
||||
#ifdef POLYMOST
|
||||
|
|
|
@ -1108,7 +1108,7 @@ void editinput(void)
|
|||
updatenumsprites();
|
||||
asksave = 1;
|
||||
|
||||
X_OnEvent(EVENT_INSERTSPRITE3D, i);
|
||||
VM_OnEvent(EVENT_INSERTSPRITE3D, i);
|
||||
}
|
||||
|
||||
keystatus[0x1f] = 0;
|
||||
|
@ -1288,6 +1288,9 @@ void overheadeditor(void)
|
|||
keystatus[buildkeys[BK_MODE2D_3D]] = 0;
|
||||
while ((keystatus[buildkeys[BK_MODE2D_3D]]>>1) == 0)
|
||||
{
|
||||
if ((keystatus[buildkeys[BK_MOVEUP]] || (bstatus&(16|32)) || keystatus[buildkeys[BK_MOVEDOWN]]) == 0)
|
||||
idle_waitevent();
|
||||
|
||||
if (handleevents())
|
||||
{
|
||||
if (quitevent)
|
||||
|
@ -1297,11 +1300,10 @@ void overheadeditor(void)
|
|||
}
|
||||
}
|
||||
|
||||
idle();
|
||||
OSD_DispatchQueued();
|
||||
|
||||
if (totalclock < 120*3)
|
||||
printmessage16("Based on BUILD by Ken Silverman.");
|
||||
printmessage16("Uses BUILD technology by Ken Silverman.");
|
||||
else if (totalclock < 120*6)
|
||||
{
|
||||
printmessage16("Press F1 for help. This is a test release; always keep backups of your maps.");
|
||||
|
@ -1319,6 +1321,7 @@ void overheadeditor(void)
|
|||
}
|
||||
searchx += mousx;
|
||||
searchy += mousy;
|
||||
|
||||
if (searchx < 8) searchx = 8;
|
||||
if (searchx > xdim-8-1) searchx = xdim-8-1;
|
||||
if (searchy < 8) searchy = 8;
|
||||
|
@ -1422,7 +1425,7 @@ void overheadeditor(void)
|
|||
}
|
||||
|
||||
draw2dscreen(pos.x,pos.y,ang,zoom,grid);
|
||||
X_OnEvent(EVENT_DRAW2DSCREEN, -1);
|
||||
VM_OnEvent(EVENT_DRAW2DSCREEN, -1);
|
||||
|
||||
begindrawing(); //{{{
|
||||
if (showtags == 1)
|
||||
|
@ -1620,7 +1623,7 @@ void overheadeditor(void)
|
|||
OSD_Draw();
|
||||
}
|
||||
|
||||
X_OnEvent(EVENT_PREKEYS2D, -1);
|
||||
VM_OnEvent(EVENT_PREKEYS2D, -1);
|
||||
ExtCheckKeys(); // TX 20050101, it makes more sense to have this here so keys can be overwritten with new functions in bstub.c
|
||||
|
||||
// Flip/mirror sector Ed Coolidge
|
||||
|
@ -2864,7 +2867,7 @@ SKIP:
|
|||
|
||||
if ((keystatus[buildkeys[BK_MOVEUP]] || (bstatus&16)) && (zoom < 65536))
|
||||
{
|
||||
zoom += synctics*(zoom>>4);
|
||||
zoom += (synctics>>1)*(zoom>>3);
|
||||
if (zoom < 24) zoom += 2;
|
||||
if (bstatus&16 && (keystatus[0x38] || keystatus[0xb8]))
|
||||
{
|
||||
|
@ -2878,7 +2881,7 @@ SKIP:
|
|||
}
|
||||
if ((keystatus[buildkeys[BK_MOVEDOWN]] || (bstatus&32)) && (zoom > 8))
|
||||
{
|
||||
zoom -= synctics*(zoom>>4);
|
||||
zoom -= (synctics>>1)*(zoom>>3);
|
||||
if (bstatus&32 && (keystatus[0x38] || keystatus[0xb8]))
|
||||
{
|
||||
searchx = halfxdim16;
|
||||
|
@ -3193,7 +3196,7 @@ SKIP:
|
|||
updatenumsprites();
|
||||
asksave = 1;
|
||||
|
||||
X_OnEvent(EVENT_INSERTSPRITE2D, i);
|
||||
VM_OnEvent(EVENT_INSERTSPRITE2D, i);
|
||||
}
|
||||
|
||||
keystatus[0x1f] = 0;
|
||||
|
@ -4747,7 +4750,7 @@ CANCEL:
|
|||
clearkeys();
|
||||
}
|
||||
|
||||
X_OnEvent(EVENT_KEYS2D, -1);
|
||||
VM_OnEvent(EVENT_KEYS2D, -1);
|
||||
|
||||
//nextpage();
|
||||
}
|
||||
|
@ -4783,7 +4786,7 @@ CANCEL:
|
|||
searchx = scale(searchx,xdimgame,xdim2d);
|
||||
searchy = scale(searchy,ydimgame,ydim2d-STATUS2DSIZ);
|
||||
|
||||
X_OnEvent(EVENT_ENTER3DMODE, -1);
|
||||
VM_OnEvent(EVENT_ENTER3DMODE, -1);
|
||||
}
|
||||
|
||||
void getpoint(int32_t searchxe, int32_t searchye, int32_t *x, int32_t *y)
|
||||
|
@ -6142,27 +6145,15 @@ void showsectordata(int16_t sectnum)
|
|||
int32_t mode = (sectnum & 16384);
|
||||
int32_t color = mode?whitecol:editorcolors[11];
|
||||
|
||||
if (mode)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
row = 2;
|
||||
begindrawing();
|
||||
col = whitecol - 21;
|
||||
for (i=ydim-(row*96)-STATUS2DSIZ+16; i<ydim-STATUS2DSIZ2-8; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline) + 4), 192, ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
if (col > 0) col--;
|
||||
}
|
||||
enddrawing();
|
||||
col = 1;
|
||||
}
|
||||
sectnum &= ~16384;
|
||||
|
||||
Bsprintf(snotbuf,"^10Sector %d",sectnum);
|
||||
if (mode)
|
||||
Bstrcat(snotbuf," ^O(F7 to edit)");
|
||||
{
|
||||
_printmessage16("^10Sector %d ^O(F7 to edit)",sectnum);
|
||||
return;
|
||||
}
|
||||
|
||||
Bsprintf(snotbuf,"^10Sector %d",sectnum);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Firstwall: %d",sector[sectnum].wallptr);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
|
@ -6181,9 +6172,7 @@ void showsectordata(int16_t sectnum)
|
|||
Bsprintf(snotbuf,"Pixel height: %d",(sector[sectnum].floorz-sector[sectnum].ceilingz)>>8);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+104,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
col++;
|
||||
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+32,color,-1,"^10CEILING:^O",0);
|
||||
Bsprintf(snotbuf,"Flags (hex): %x",sector[sectnum].ceilingstat);
|
||||
|
@ -6201,9 +6190,7 @@ void showsectordata(int16_t sectnum)
|
|||
Bsprintf(snotbuf,"Palookup number: %d",sector[sectnum].ceilingpal);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
col++;
|
||||
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+32,color,-1,"^10FLOOR:^O",0);
|
||||
Bsprintf(snotbuf,"Flags (hex): %x",sector[sectnum].floorstat);
|
||||
|
@ -6230,27 +6217,15 @@ void showwalldata(int16_t wallnum)
|
|||
int32_t mode = (wallnum & 16384);
|
||||
int32_t color = mode?whitecol:editorcolors[11];
|
||||
|
||||
if (mode)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
row = 2;
|
||||
begindrawing();
|
||||
col = whitecol - 21;
|
||||
for (i=ydim-(row*80)-STATUS2DSIZ+16; i<ydim-STATUS2DSIZ2-8; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline) + 4), 192, ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
if (col > 0) col--;
|
||||
}
|
||||
enddrawing();
|
||||
col = 1;
|
||||
}
|
||||
|
||||
wallnum &= ~16384;
|
||||
|
||||
if (mode)
|
||||
{
|
||||
_printmessage16("^10Wall %d ^O(F8 to edit)",wallnum);
|
||||
return;
|
||||
}
|
||||
|
||||
Bsprintf(snotbuf,"^10Wall %d",wallnum);
|
||||
if (mode) Bstrcat(snotbuf," ^O(F8 to edit)");
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"X-coordinate: %d",wall[wallnum].x);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
|
@ -6266,9 +6241,7 @@ void showwalldata(int16_t wallnum)
|
|||
Bsprintf(snotbuf," (0x%x), (0x%x)",wall[wallnum].hitag,wall[wallnum].lotag);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
col++;
|
||||
|
||||
Bsprintf(snotbuf,"^10%s^O",names[wall[wallnum].picnum]);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
|
@ -6287,9 +6260,7 @@ void showwalldata(int16_t wallnum)
|
|||
Bsprintf(snotbuf,"OverTile number: %d",wall[wallnum].overpicnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
col++;
|
||||
|
||||
Bsprintf(snotbuf,"nextsector: %d",wall[wallnum].nextsector);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+48-(mode?16:0),color,-1,snotbuf,0);
|
||||
|
@ -6320,26 +6291,15 @@ void showspritedata(int16_t spritenum)
|
|||
int32_t mode = (spritenum & 16384);
|
||||
int32_t color = mode?whitecol:editorcolors[11];
|
||||
|
||||
if (mode)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
row = 2;
|
||||
begindrawing();
|
||||
col = whitecol - 21;
|
||||
for (i=ydim-(row*80)-STATUS2DSIZ+16; i<ydim-STATUS2DSIZ2-8; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline) + 4), 224, ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
if (col > 0) col--;
|
||||
}
|
||||
enddrawing();
|
||||
col = 1;
|
||||
}
|
||||
spritenum &= ~16384;
|
||||
|
||||
if (mode)
|
||||
{
|
||||
_printmessage16("^10Sprite %d ^O(F8 to edit)",spritenum);
|
||||
return;
|
||||
}
|
||||
|
||||
Bsprintf(snotbuf,"^10Sprite %d",spritenum);
|
||||
if (mode) Bstrcat(snotbuf," ^O(F8 to edit)");
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"X-coordinate: %d",sprite[spritenum].x);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
|
@ -6358,9 +6318,7 @@ void showspritedata(int16_t spritenum)
|
|||
Bsprintf(snotbuf," (0x%x), (0x%x)",sprite[spritenum].hitag,sprite[spritenum].lotag);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+104,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
col++;
|
||||
|
||||
Bsprintf(snotbuf,"^10%s^O",names[sprite[spritenum].picnum]);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
|
@ -6377,9 +6335,7 @@ void showspritedata(int16_t spritenum)
|
|||
Bsprintf(snotbuf,"Tile number: %d",sprite[spritenum].picnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
col++;
|
||||
|
||||
Bsprintf(snotbuf,"Angle (2048 degrees): %d",sprite[spritenum].ang);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "cache1d.h"
|
||||
#include "pragmas.h"
|
||||
#include "baselayer.h"
|
||||
#include "mutex.h"
|
||||
|
||||
#ifdef WITHKPLIB
|
||||
#include "kplib.h"
|
||||
|
@ -59,6 +60,7 @@ static intptr_t kzipopen(char *filnam)
|
|||
|
||||
#define MAXCACHEOBJECTS 9216
|
||||
|
||||
mutex_t cachemutex;
|
||||
static int32_t cachesize = 0;
|
||||
int32_t cachecount = 0;
|
||||
char zerochar = 0;
|
||||
|
@ -99,6 +101,7 @@ void initcache(intptr_t dacachestart, int32_t dacachesize)
|
|||
cac[0].lock = &zerochar;
|
||||
cacnum = 1;
|
||||
|
||||
mutex_init(&cachemutex);
|
||||
initprintf("Initialized %.1fM cache\n", (float)(dacachesize/1024.f/1024.f));
|
||||
}
|
||||
|
||||
|
@ -186,8 +189,10 @@ void suckcache(intptr_t *suckptr)
|
|||
{
|
||||
int32_t i;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
//Can't exit early, because invalid pointer might be same even though lock = 0
|
||||
for (i=0; i<cacnum; i++)
|
||||
{
|
||||
if ((intptr_t)(*cac[i].hand) == (intptr_t)suckptr)
|
||||
{
|
||||
if (*cac[i].lock) *cac[i].hand = 0;
|
||||
|
@ -206,6 +211,9 @@ void suckcache(intptr_t *suckptr)
|
|||
cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
void agecache(void)
|
||||
|
@ -214,6 +222,7 @@ void agecache(void)
|
|||
|
||||
if (agecount >= cacnum) agecount = cacnum-1;
|
||||
if (agecount < 0 || !cnt) return;
|
||||
while(mutex_lock(&cachemutex));
|
||||
for (; cnt>=0; cnt--)
|
||||
{
|
||||
if ((((*cac[agecount].lock)-2)&255) < 198)
|
||||
|
@ -222,6 +231,7 @@ void agecache(void)
|
|||
agecount--;
|
||||
if (agecount < 0) agecount = cacnum-1;
|
||||
}
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
static void reportandexit(char *errormessage)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define _WIN32_IE 0x0400
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <direct.h>
|
||||
|
|
|
@ -7805,7 +7805,7 @@ void nextpage(void)
|
|||
per->dashade,per->dapalnum,per->dastat,
|
||||
per->cx1,per->cy1,per->cx2,per->cy2,per->uniqid);
|
||||
}
|
||||
enddrawing(); //}}}
|
||||
enddrawing(); //}}}
|
||||
|
||||
OSD_Draw();
|
||||
showframe(0);
|
||||
|
@ -10039,7 +10039,7 @@ void setbrightness(char dabrightness, uint8_t *dapal, char noapply)
|
|||
//
|
||||
void setpalettefade(char r, char g, char b, char offset)
|
||||
{
|
||||
int32_t i,k;
|
||||
int32_t i;
|
||||
palette_t p;
|
||||
|
||||
palfadergb.r = min(63,r) << 2;
|
||||
|
@ -10047,7 +10047,6 @@ void setpalettefade(char r, char g, char b, char offset)
|
|||
palfadergb.b = min(63,b) << 2;
|
||||
palfadedelta = min(63,offset) << 2;
|
||||
|
||||
k = 0;
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
if (gammabrightness) p = curpalette[i];
|
||||
|
|
|
@ -550,7 +550,7 @@ int32_t mdloadskin_trytexcache(char *fn, int32_t len, int32_t pal, char effect,
|
|||
}
|
||||
while (cacheindexptr->next);
|
||||
*/
|
||||
i = hash_find(&cacheH,cachefn);
|
||||
i = hash_find(&h_texcache,cachefn);
|
||||
if (i != -1)
|
||||
{
|
||||
texcacheindex *cacheindexptr = cacheptrs[i];
|
||||
|
|
35
polymer/eduke32/build/src/mutex.c
Normal file
35
polymer/eduke32/build/src/mutex.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "compat.h"
|
||||
#include "mutex.h"
|
||||
|
||||
int32_t mutex_init(mutex_t *mutex)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
*mutex = CreateMutex(0, FALSE, 0);
|
||||
return (*mutex == 0);
|
||||
#else
|
||||
return pthread_mutex_init(mutex, NULL);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
int32_t mutex_lock(mutex_t *mutex)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return (WaitForSingleObject(*mutex, INFINITE) == WAIT_FAILED);
|
||||
#else
|
||||
return pthread_mutex_lock(mutex);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
int32_t mutex_unlock(mutex_t *mutex)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return (ReleaseMutex(*mutex) == 0);
|
||||
#else
|
||||
return pthread_mutex_unlock(mutex);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ DEALINGS IN THE SOFTWARE.
|
|||
#define ENABLE_FAST_HEAP_DETECTION 1
|
||||
#define NDEBUG 1
|
||||
#define THREADCACHEMAX 32768
|
||||
#define THREADCACHEMAXBINS ((15-4)*2)
|
||||
#define THREADCACHEMAXBINS ((15-4)*2)
|
||||
/*#define ENABLE_TOLERANT_NEDMALLOC 1*/
|
||||
/*#define ENABLE_FAST_HEAP_DETECTION 1*/
|
||||
/*#define NEDMALLOC_DEBUG 1*/
|
||||
|
@ -450,9 +450,13 @@ static NEDMALLOCNOALIASATTR mstate nedblkmstate(void *RESTRICT mem) THROWSPEC
|
|||
}
|
||||
#else
|
||||
#ifdef WIN32
|
||||
__try
|
||||
#ifdef _MSC_VER
|
||||
__try
|
||||
#elif defined(__MINGW32__)
|
||||
__try1
|
||||
#endif
|
||||
{
|
||||
#endif
|
||||
{
|
||||
/* We try to return zero here if it isn't one of our own blocks, however
|
||||
the current block annotation scheme used by dlmalloc makes it impossible
|
||||
to be absolutely sure of avoiding a segfault.
|
||||
|
@ -493,7 +497,11 @@ static NEDMALLOCNOALIASATTR mstate nedblkmstate(void *RESTRICT mem) THROWSPEC
|
|||
}
|
||||
}
|
||||
#ifdef WIN32
|
||||
__except(1) { }
|
||||
#ifdef _MSC_VER
|
||||
__except(1) { }
|
||||
#elif defined(__MINGW32__)
|
||||
__except1(1) { }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -18,11 +18,11 @@ files, but most of it is in here. If you're looking for polymost-related code in
|
|||
files, you should find most of them by searching for either "polymost" or "rendmode". Speaking of
|
||||
rendmode, there are now 4 rendering modes in Build:
|
||||
|
||||
rendmode 0: The original code I wrote from 1993-1997
|
||||
rendmode 1: Solid-color rendering: my debug code before I did texture mapping
|
||||
rendmode 2: Software rendering before I started the OpenGL code (Note: this is just a quick
|
||||
hack to make testing easier - it's not optimized to my usual standards!)
|
||||
rendmode 3: The OpenGL code
|
||||
rendmode 0: The original code I wrote from 1993-1997
|
||||
rendmode 1: Solid-color rendering: my debug code before I did texture mapping
|
||||
rendmode 2: Software rendering before I started the OpenGL code (Note: this is just a quick
|
||||
hack to make testing easier - it's not optimized to my usual standards!)
|
||||
rendmode 3: The OpenGL code
|
||||
|
||||
The original Build engine did hidden surface removal by using a vertical span buffer on the tops
|
||||
and bottoms of walls. This worked nice back in the day, but it it's not suitable for a polygon
|
||||
|
@ -34,9 +34,9 @@ Brief history:
|
|||
04/01/2003: 3D Realms releases Duke Nukem 3D source code
|
||||
10/04/2003: Jonathon Fowler gets his Windows port working in Visual C
|
||||
10/04/2003: I start writing POLYMOST.BAS, a new hidden surface removal algorithm for Build that
|
||||
works on a polygon level instead of spans.
|
||||
works on a polygon level instead of spans.
|
||||
10/16/2003: Ported POLYMOST.BAS to C inside JonoF KenBuild's ENGINE.C; later this code was split
|
||||
out of ENGINE.C and put in this file, POLYMOST.C.
|
||||
out of ENGINE.C and put in this file, POLYMOST.C.
|
||||
12/10/2003: Started OpenGL code for POLYMOST (rendmode 3)
|
||||
12/23/2003: 1st public release
|
||||
01/01/2004: 2nd public release: fixed stray lines, status bar, mirrors, sky, and lots of other bugs.
|
||||
|
@ -46,22 +46,22 @@ Brief history:
|
|||
Todo list (in approximate chronological order):
|
||||
|
||||
High priority:
|
||||
* BOTH: Do accurate software sorting/chopping for sprites: drawing in wrong order is bad :/
|
||||
* BOTH: Fix hall of mirrors near "zenith". Call polymost_drawrooms twice?
|
||||
* OPENGL: drawmapview()
|
||||
* BOTH: Do accurate software sorting/chopping for sprites: drawing in wrong order is bad :/
|
||||
* BOTH: Fix hall of mirrors near "zenith". Call polymost_drawrooms twice?
|
||||
* OPENGL: drawmapview()
|
||||
|
||||
Low priority:
|
||||
* SOFT6D: Do back-face culling of sprites during up/down/tilt transformation (top of drawpoly)
|
||||
* SOFT6D: Fix depth shading: use saturation&LUT
|
||||
* SOFT6D: Optimize using hyperbolic mapping (similar to KUBE algo)
|
||||
* SOFT6D: Slab6-style voxel sprites. How to accelerate? :/
|
||||
* OPENGL: KENBUILD: Write flipping code for floor mirrors
|
||||
* BOTH: KENBUILD: Parallaxing sky modes 1&2
|
||||
* BOTH: Masked/1-way walls don't clip correctly to sectors of intersecting ceiling/floor slopes
|
||||
* BOTH: Editart x-center is not working correctly with Duke's camera/turret sprites
|
||||
* BOTH: Get rid of horizontal line above Duke full-screen status bar
|
||||
* BOTH: Combine ceilings/floors into a single triangle strip (should lower poly count by 2x)
|
||||
* BOTH: Optimize/clean up texture-map setup equations
|
||||
* SOFT6D: Do back-face culling of sprites during up/down/tilt transformation (top of drawpoly)
|
||||
* SOFT6D: Fix depth shading: use saturation&LUT
|
||||
* SOFT6D: Optimize using hyperbolic mapping (similar to KUBE algo)
|
||||
* SOFT6D: Slab6-style voxel sprites. How to accelerate? :/
|
||||
* OPENGL: KENBUILD: Write flipping code for floor mirrors
|
||||
* BOTH: KENBUILD: Parallaxing sky modes 1&2
|
||||
* BOTH: Masked/1-way walls don't clip correctly to sectors of intersecting ceiling/floor slopes
|
||||
* BOTH: Editart x-center is not working correctly with Duke's camera/turret sprites
|
||||
* BOTH: Get rid of horizontal line above Duke full-screen status bar
|
||||
* BOTH: Combine ceilings/floors into a single triangle strip (should lower poly count by 2x)
|
||||
* BOTH: Optimize/clean up texture-map setup equations
|
||||
|
||||
**************************************************************************************************/
|
||||
|
||||
|
@ -256,7 +256,7 @@ void drawline2d(float x0, float y0, float x1, float y1, char col)
|
|||
int32_t cachefilehandle = -1; // texture cache file handle
|
||||
FILE *cacheindexptr = NULL;
|
||||
|
||||
hashtable_t cacheH = { 1024, NULL };
|
||||
hashtable_t h_texcache = { 1024, NULL };
|
||||
|
||||
char TEXCACHEFILE[BMAX_PATH] = "textures";
|
||||
|
||||
|
@ -718,7 +718,7 @@ void polymost_glinit()
|
|||
// Bmemset(&firstcacheindex, 0, sizeof(texcacheindex));
|
||||
// Bmemset(&cacheptrs[0], 0, sizeof(cacheptrs));
|
||||
|
||||
hash_init(&cacheH);
|
||||
hash_init(&h_texcache);
|
||||
LoadCacheOffsets();
|
||||
|
||||
Bstrcpy(ptempbuf,TEXCACHEFILE);
|
||||
|
@ -803,7 +803,7 @@ void invalidatecache(void)
|
|||
// Bmemset(&firstcacheindex, 0, sizeof(texcacheindex));
|
||||
// Bmemset(&cacheptrs[0], 0, sizeof(cacheptrs));
|
||||
|
||||
hash_init(&cacheH);
|
||||
hash_init(&h_texcache);
|
||||
// LoadCacheOffsets();
|
||||
|
||||
Bstrcpy(ptempbuf,TEXCACHEFILE);
|
||||
|
@ -984,14 +984,14 @@ void uploadtexture(int32_t doalloc, int32_t xsiz, int32_t ysiz, int32_t intexfmt
|
|||
|
||||
/*
|
||||
OSD_Printf("Uploading %dx%d %s as %s\n", xsiz,ysiz,
|
||||
(texfmt==GL_RGBA?"GL_RGBA":
|
||||
texfmt==GL_RGB?"GL_RGB":
|
||||
texfmt==GL_BGR?"GL_BGR":
|
||||
texfmt==GL_BGRA?"GL_BGRA":"other"),
|
||||
(intexfmt==GL_RGBA?"GL_RGBA":
|
||||
intexfmt==GL_RGB?"GL_RGB":
|
||||
intexfmt==GL_COMPRESSED_RGBA_ARB?"GL_COMPRESSED_RGBA_ARB":
|
||||
intexfmt==GL_COMPRESSED_RGB_ARB?"GL_COMPRESSED_RGB_ARB":"other"));
|
||||
(texfmt==GL_RGBA?"GL_RGBA":
|
||||
texfmt==GL_RGB?"GL_RGB":
|
||||
texfmt==GL_BGR?"GL_BGR":
|
||||
texfmt==GL_BGRA?"GL_BGRA":"other"),
|
||||
(intexfmt==GL_RGBA?"GL_RGBA":
|
||||
intexfmt==GL_RGB?"GL_RGB":
|
||||
intexfmt==GL_COMPRESSED_RGBA_ARB?"GL_COMPRESSED_RGBA_ARB":
|
||||
intexfmt==GL_COMPRESSED_RGB_ARB?"GL_COMPRESSED_RGB_ARB":"other"));
|
||||
*/
|
||||
|
||||
if (js == 0)
|
||||
|
@ -1214,7 +1214,7 @@ static int32_t LoadCacheOffsets(void)
|
|||
if (scriptfile_getnumber(script, &foffset)) break; // offset in cache
|
||||
if (scriptfile_getnumber(script, &fsize)) break; // size
|
||||
|
||||
i = hash_find(&cacheH,fname);
|
||||
i = hash_find(&h_texcache,fname);
|
||||
if (i > -1)
|
||||
{
|
||||
// update an existing entry
|
||||
|
@ -1229,7 +1229,7 @@ static int32_t LoadCacheOffsets(void)
|
|||
curcacheindex->offset = foffset;
|
||||
curcacheindex->len = fsize;
|
||||
curcacheindex->next = (texcacheindex *)Bcalloc(1, sizeof(texcacheindex));
|
||||
hash_replace(&cacheH, Bstrdup(fname), numcacheentries);
|
||||
hash_replace(&h_texcache, Bstrdup(fname), numcacheentries);
|
||||
cacheptrs[numcacheentries++] = curcacheindex;
|
||||
curcacheindex = curcacheindex->next;
|
||||
}
|
||||
|
@ -1275,7 +1275,7 @@ int32_t trytexcache(char *fn, int32_t len, int32_t dameth, char effect, texcache
|
|||
int32_t len = 0;
|
||||
int32_t i;
|
||||
|
||||
i = hash_find(&cacheH,cachefn);
|
||||
i = hash_find(&h_texcache,cachefn);
|
||||
if (i > -1)
|
||||
{
|
||||
texcacheindex *t = cacheptrs[i];
|
||||
|
@ -1380,7 +1380,7 @@ void writexcache(char *fn, int32_t len, int32_t dameth, char effect, texcachehea
|
|||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&gi);
|
||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||
#ifdef __APPLE__
|
||||
if(pr_ati_textureformat_one && gi == 1 ) gi = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
||||
if(pr_ati_textureformat_one && gi == 1 ) gi = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
||||
#endif
|
||||
pict.format = B_LITTLE32(gi);
|
||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, (GLint *)&gi);
|
||||
|
@ -1420,7 +1420,7 @@ void writexcache(char *fn, int32_t len, int32_t dameth, char effect, texcachehea
|
|||
}
|
||||
|
||||
{
|
||||
int32_t i = hash_find(&cacheH,cachefn);
|
||||
int32_t i = hash_find(&h_texcache,cachefn);
|
||||
if (i > -1)
|
||||
{
|
||||
// update an existing entry
|
||||
|
@ -1450,7 +1450,7 @@ void writexcache(char *fn, int32_t len, int32_t dameth, char effect, texcachehea
|
|||
}
|
||||
else OSD_Printf("wtf?\n");
|
||||
|
||||
hash_add(&cacheH, Bstrdup(cachefn), numcacheentries);
|
||||
hash_add(&h_texcache, Bstrdup(cachefn), numcacheentries);
|
||||
cacheptrs[numcacheentries++] = curcacheindex;
|
||||
curcacheindex = curcacheindex->next;
|
||||
}
|
||||
|
@ -3559,11 +3559,11 @@ static void polymost_drawalls(int32_t bunch)
|
|||
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
|
||||
else if ((oy < cy0) != (oy < cy1))
|
||||
{ /* cy1 cy0
|
||||
// / \
|
||||
//oy---------- oy---------
|
||||
// / \
|
||||
// cy0 cy1
|
||||
*/
|
||||
// / \
|
||||
//oy---------- oy---------
|
||||
// / \
|
||||
// cy0 cy1
|
||||
*/
|
||||
ox = (oy-cy0)*(x1-x0)/(cy1-cy0) + x0;
|
||||
if (oy < cy0) { domost(ox,oy,x0,oy); domost(x1,cy1,ox,oy); }
|
||||
else { domost(ox,oy,x0,cy0); domost(x1,oy,ox,oy); }
|
||||
|
@ -5959,77 +5959,77 @@ void polymost_initosdfuncs(void)
|
|||
cvar_t cvars_polymost[] =
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
{ "r_animsmoothing","r_animsmoothing: enable/disable model animation smoothing",(void *)&r_animsmoothing, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_modelocclusionchecking","r_modelocclusionchecking: enable/disable hack to cull \"obstructed\" models",(void *)&r_modelocclusionchecking, CVAR_INT, 0, 0, 2 },
|
||||
{ "r_detailmapping","r_detailmapping: enable/disable detail mapping",(void *)&r_detailmapping, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_downsize","r_downsize: controls downsizing factor for hires textures",(void *)&r_downsizevar, CVAR_INT|CVAR_FUNCPTR, 0, 0, 5 },
|
||||
{ "r_fullbrights","r_fullbrights: enable/disable fullbright textures",(void *)&r_fullbrights, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_glowmapping","r_glowmapping: enable/disable glow mapping",(void *)&r_glowmapping, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_animsmoothing","r_animsmoothing: enable/disable model animation smoothing",(void *)&r_animsmoothing, CVAR_BOOL, 0, 1 },
|
||||
{ "r_modelocclusionchecking","r_modelocclusionchecking: enable/disable hack to cull \"obstructed\" models",(void *)&r_modelocclusionchecking, CVAR_INT, 0, 2 },
|
||||
{ "r_detailmapping","r_detailmapping: enable/disable detail mapping",(void *)&r_detailmapping, CVAR_BOOL, 0, 1 },
|
||||
{ "r_downsize","r_downsize: controls downsizing factor for hires textures",(void *)&r_downsizevar, CVAR_INT|CVAR_FUNCPTR, 0, 5 },
|
||||
{ "r_fullbrights","r_fullbrights: enable/disable fullbright textures",(void *)&r_fullbrights, CVAR_BOOL, 0, 1 },
|
||||
{ "r_glowmapping","r_glowmapping: enable/disable glow mapping",(void *)&r_glowmapping, CVAR_BOOL, 0, 1 },
|
||||
/*
|
||||
{ "r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",(void *)&r_glowmapping, CVAR_BOOL, 0, 0, 1 }
|
||||
{ "r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",(void *)&glnvmultisamplehint, CVAR_BOOL, 0, 0, 1 }
|
||||
{ "r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",(void *)&r_glowmapping, CVAR_BOOL, 0, 1 }
|
||||
{ "r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",(void *)&glnvmultisamplehint, CVAR_BOOL, 0, 1 }
|
||||
*/
|
||||
{ "r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping",
|
||||
(void *)&r_parallaxskyclamping, CVAR_BOOL, 0, 0, 1 },
|
||||
(void *)&r_parallaxskyclamping, CVAR_BOOL, 0, 1 },
|
||||
{ "r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky",
|
||||
(void *)&r_parallaxskypanning, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_polygonmode","r_polygonmode: debugging feature",(void *)&glpolygonmode, CVAR_INT | CVAR_NOSAVE, 0, 0, 3 },
|
||||
{ "r_redbluemode","r_redbluemode: enable/disable experimental OpenGL red-blue glasses mode",(void *)&glredbluemode, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_shadescale","r_shadescale: multiplier for lighting",(void *)&shadescale, CVAR_FLOAT, 0, 0, 10 },
|
||||
{ "r_swapinterval","r_swapinterval: sets the GL swap interval (VSync)",(void *)&vsync, CVAR_BOOL|CVAR_FUNCPTR, 0, 0, 1 },
|
||||
{ "r_texcache","r_texcache: enable/disable OpenGL compressed texture cache",(void *)&glusetexcache, CVAR_INT, 0, 0, 2 },
|
||||
{ "r_texcompr","r_texcompr: enable/disable OpenGL texture compression",(void *)&glusetexcompr, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_textureanisotropy", "r_textureanisotropy: changes the OpenGL texture anisotropy setting", (void *)&glanisotropy, CVAR_INT|CVAR_FUNCPTR, 0, 0, 16 },
|
||||
{ "r_texturemaxsize","r_texturemaxsize: changes the maximum OpenGL texture size limit",(void *)&gltexmaxsize, CVAR_INT | CVAR_NOSAVE, 0, 0, 4096 },
|
||||
{ "r_texturemiplevel","r_texturemiplevel: changes the highest OpenGL mipmap level used",(void *)&gltexmiplevel, CVAR_INT, 0, 0, 6 },
|
||||
{ "r_texturemode", "r_texturemode: changes the texture filtering settings", (void *)&gltexfiltermode, CVAR_INT|CVAR_FUNCPTR, 0, 0, 5 },
|
||||
{ "r_vbocount","r_vbocount: sets the number of Vertex Buffer Objects to use when drawing models",(void *)&r_vbocount, CVAR_INT, 0, 1, 256 },
|
||||
{ "r_vbos","r_vbos: enable/disable using Vertex Buffer Objects when drawing models",(void *)&r_vbos, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_vertexarrays","r_vertexarrays: enable/disable using vertex arrays when drawing models",(void *)&r_vertexarrays, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_INT, 0, 0, 2 },
|
||||
(void *)&r_parallaxskypanning, CVAR_BOOL, 0, 1 },
|
||||
{ "r_polygonmode","r_polygonmode: debugging feature",(void *)&glpolygonmode, CVAR_INT | CVAR_NOSAVE, 0, 3 },
|
||||
{ "r_redbluemode","r_redbluemode: enable/disable experimental OpenGL red-blue glasses mode",(void *)&glredbluemode, CVAR_BOOL, 0, 1 },
|
||||
{ "r_shadescale","r_shadescale: multiplier for lighting",(void *)&shadescale, CVAR_FLOAT, 0, 10 },
|
||||
{ "r_swapinterval","r_swapinterval: sets the GL swap interval (VSync)",(void *)&vsync, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "r_texcache","r_texcache: enable/disable OpenGL compressed texture cache",(void *)&glusetexcache, CVAR_INT, 0, 2 },
|
||||
{ "r_texcompr","r_texcompr: enable/disable OpenGL texture compression",(void *)&glusetexcompr, CVAR_BOOL, 0, 1 },
|
||||
{ "r_textureanisotropy", "r_textureanisotropy: changes the OpenGL texture anisotropy setting", (void *)&glanisotropy, CVAR_INT|CVAR_FUNCPTR, 0, 16 },
|
||||
{ "r_texturemaxsize","r_texturemaxsize: changes the maximum OpenGL texture size limit",(void *)&gltexmaxsize, CVAR_INT | CVAR_NOSAVE, 0, 4096 },
|
||||
{ "r_texturemiplevel","r_texturemiplevel: changes the highest OpenGL mipmap level used",(void *)&gltexmiplevel, CVAR_INT, 0, 6 },
|
||||
{ "r_texturemode", "r_texturemode: changes the texture filtering settings", (void *)&gltexfiltermode, CVAR_INT|CVAR_FUNCPTR, 0, 5 },
|
||||
{ "r_vbocount","r_vbocount: sets the number of Vertex Buffer Objects to use when drawing models",(void *)&r_vbocount, CVAR_INT, 1, 256 },
|
||||
{ "r_vbos","r_vbos: enable/disable using Vertex Buffer Objects when drawing models",(void *)&r_vbos, CVAR_BOOL, 0, 1 },
|
||||
{ "r_vertexarrays","r_vertexarrays: enable/disable using vertex arrays when drawing models",(void *)&r_vertexarrays, CVAR_BOOL, 0, 1 },
|
||||
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 1 },
|
||||
{ "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_INT, 0, 2 },
|
||||
|
||||
#ifdef POLYMER
|
||||
// polymer cvars
|
||||
{ "r_pr_lighting", "r_pr_lighting: enable/disable dynamic lights", (void*)&pr_lighting, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_pr_normalmapping", "r_pr_normalmapping: enable/disable virtual displacement mapping", (void*)&pr_normalmapping, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_pr_specularmapping", "r_pr_specularmapping: enable/disable specular mapping", (void*)&pr_specularmapping, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_pr_shadows", "r_pr_shadows: enable/disable dynamic shadows", (void*)&pr_shadows, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_pr_shadowcount", "r_pr_shadowcount: maximal amount of shadow emitting lights on screen - you need to restart the renderer for it to take effect", (void*)&pr_shadowcount, CVAR_INT, 0, 0, 64 },
|
||||
{ "r_pr_shadowdetail", "r_pr_shadowdetail: sets the shadow map resolution - you need to restart the renderer for it to take effect", (void*)&pr_shadowdetail, CVAR_INT, 0, 0, 5 },
|
||||
{ "r_pr_shadowfiltering", "r_pr_shadowfiltering: enable/disable shadow edges filtering - you need to restart the renderer for it to take effect", (void*)&pr_shadowfiltering, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_pr_maxlightpasses", "r_pr_maxlightpasses: the maximal amount of lights a single object can by affected by", (void*)&r_pr_maxlightpasses, CVAR_INT|CVAR_FUNCPTR, 0, 0, PR_MAXLIGHTS },
|
||||
{ "r_pr_maxlightpriority", "r_pr_maxlightpriority: lowering that value removes less meaningful lights from the scene", (void*)&pr_maxlightpriority, CVAR_INT, 0, 0, PR_MAXLIGHTPRIORITY },
|
||||
{ "r_pr_fov", "r_pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 0, 1023},
|
||||
{ "r_pr_customaspect", "r_pr_customaspect: if non-zero, forces the 3D view aspect ratio", (void*)&pr_customaspect, CVAR_FLOAT, 0, 0, 3 },
|
||||
{ "r_pr_billboardingmode", "r_pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 0, 1 },
|
||||
{ "r_pr_verbosity", "r_pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 },
|
||||
{ "r_pr_wireframe", "r_pr_wireframe: toggles wireframe mode", (void*)&pr_wireframe, CVAR_INT | CVAR_NOSAVE, 0, 0, 1 },
|
||||
{ "r_pr_vbos", "r_pr_vbos: contols Vertex Buffer Object usage. 0: no VBOs. 1: VBOs for map data. 2: VBOs for model data.", (void*)&pr_vbos, CVAR_INT, 0, 0, 2 },
|
||||
{ "r_pr_gpusmoothing", "r_pr_gpusmoothing: toggles model animation interpolation", (void*)&pr_gpusmoothing, CVAR_INT, 0, 0, 1 },
|
||||
{ "r_pr_overrideparallax", "r_pr_overrideparallax: overrides parallax mapping scale and bias values with values from the pr_parallaxscale and pr_parallaxbias cvars; use it to fine-tune DEF tokens", (void*)&pr_overrideparallax, CVAR_BOOL | CVAR_NOSAVE, 0, 0, 1 },
|
||||
{ "r_pr_parallaxscale", "r_pr_parallaxscale: overriden parallax mapping offset scale", (void*)&pr_parallaxscale, CVAR_FLOAT | CVAR_NOSAVE, 0, -10, 10 },
|
||||
{ "r_pr_parallaxbias", "r_pr_parallaxbias: overriden parallax mapping offset bias", (void*)&pr_parallaxbias, CVAR_FLOAT | CVAR_NOSAVE, 0, -10, 10 },
|
||||
{ "r_pr_overridespecular", "r_pr_overridespecular: overrides specular material power and factor values with values from the pr_specularpower and pr_specularfactor cvars; use it to fine-tune DEF tokens", (void*)&pr_overridespecular, CVAR_BOOL | CVAR_NOSAVE, 0, 0, 1 },
|
||||
{ "r_pr_specularpower", "r_pr_specularpower: overriden specular material power", (void*)&pr_specularpower, CVAR_FLOAT | CVAR_NOSAVE, 0, -10, 1000 },
|
||||
{ "r_pr_specularfactor", "r_pr_specularfactor: overriden specular material factor", (void*)&pr_specularfactor, CVAR_FLOAT | CVAR_NOSAVE, 0, -10, 1000 },
|
||||
{ "r_pr_ati_fboworkaround", "r_pr_ati_fboworkaround: enable this to workaround an ATI driver bug that causes sprite shadows to be square - you need to restart the renderer for it to take effect", (void*)&pr_ati_fboworkaround, CVAR_BOOL | CVAR_NOSAVE, 0, 0, 1 },
|
||||
{ "r_pr_ati_nodepthoffset", "r_pr_ati_nodepthoffset: enable this to workaround an ATI driver bug that causes sprite drawing to freeze the game on Radeon X1x00 hardware - you need to restart the renderer for it to take effect", (void*)&pr_ati_nodepthoffset, CVAR_BOOL | CVAR_NOSAVE, 0, 0, 1 },
|
||||
{ "r_pr_lighting", "r_pr_lighting: enable/disable dynamic lights", (void*)&pr_lighting, CVAR_BOOL, 0, 1 },
|
||||
{ "r_pr_normalmapping", "r_pr_normalmapping: enable/disable virtual displacement mapping", (void*)&pr_normalmapping, CVAR_BOOL, 0, 1 },
|
||||
{ "r_pr_specularmapping", "r_pr_specularmapping: enable/disable specular mapping", (void*)&pr_specularmapping, CVAR_BOOL, 0, 1 },
|
||||
{ "r_pr_shadows", "r_pr_shadows: enable/disable dynamic shadows", (void*)&pr_shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "r_pr_shadowcount", "r_pr_shadowcount: maximal amount of shadow emitting lights on screen - you need to restart the renderer for it to take effect", (void*)&pr_shadowcount, CVAR_INT, 0, 64 },
|
||||
{ "r_pr_shadowdetail", "r_pr_shadowdetail: sets the shadow map resolution - you need to restart the renderer for it to take effect", (void*)&pr_shadowdetail, CVAR_INT, 0, 5 },
|
||||
{ "r_pr_shadowfiltering", "r_pr_shadowfiltering: enable/disable shadow edges filtering - you need to restart the renderer for it to take effect", (void*)&pr_shadowfiltering, CVAR_BOOL, 0, 1 },
|
||||
{ "r_pr_maxlightpasses", "r_pr_maxlightpasses: the maximal amount of lights a single object can by affected by", (void*)&r_pr_maxlightpasses, CVAR_INT|CVAR_FUNCPTR, 0, PR_MAXLIGHTS },
|
||||
{ "r_pr_maxlightpriority", "r_pr_maxlightpriority: lowering that value removes less meaningful lights from the scene", (void*)&pr_maxlightpriority, CVAR_INT, 0, PR_MAXLIGHTPRIORITY },
|
||||
{ "r_pr_fov", "r_pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 1023},
|
||||
{ "r_pr_customaspect", "r_pr_customaspect: if non-zero, forces the 3D view aspect ratio", (void*)&pr_customaspect, CVAR_FLOAT, 0, 3 },
|
||||
{ "r_pr_billboardingmode", "r_pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 1 },
|
||||
{ "r_pr_verbosity", "r_pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 3 },
|
||||
{ "r_pr_wireframe", "r_pr_wireframe: toggles wireframe mode", (void*)&pr_wireframe, CVAR_INT | CVAR_NOSAVE, 0, 1 },
|
||||
{ "r_pr_vbos", "r_pr_vbos: contols Vertex Buffer Object usage. 0: no VBOs. 1: VBOs for map data. 2: VBOs for model data.", (void*)&pr_vbos, CVAR_INT, 0, 2 },
|
||||
{ "r_pr_gpusmoothing", "r_pr_gpusmoothing: toggles model animation interpolation", (void*)&pr_gpusmoothing, CVAR_INT, 0, 1 },
|
||||
{ "r_pr_overrideparallax", "r_pr_overrideparallax: overrides parallax mapping scale and bias values with values from the pr_parallaxscale and pr_parallaxbias cvars; use it to fine-tune DEF tokens", (void*)&pr_overrideparallax, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
|
||||
{ "r_pr_parallaxscale", "r_pr_parallaxscale: overriden parallax mapping offset scale", (void*)&pr_parallaxscale, CVAR_FLOAT | CVAR_NOSAVE, -10, 10 },
|
||||
{ "r_pr_parallaxbias", "r_pr_parallaxbias: overriden parallax mapping offset bias", (void*)&pr_parallaxbias, CVAR_FLOAT | CVAR_NOSAVE, -10, 10 },
|
||||
{ "r_pr_overridespecular", "r_pr_overridespecular: overrides specular material power and factor values with values from the pr_specularpower and pr_specularfactor cvars; use it to fine-tune DEF tokens", (void*)&pr_overridespecular, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
|
||||
{ "r_pr_specularpower", "r_pr_specularpower: overriden specular material power", (void*)&pr_specularpower, CVAR_FLOAT | CVAR_NOSAVE, -10, 1000 },
|
||||
{ "r_pr_specularfactor", "r_pr_specularfactor: overriden specular material factor", (void*)&pr_specularfactor, CVAR_FLOAT | CVAR_NOSAVE, -10, 1000 },
|
||||
{ "r_pr_ati_fboworkaround", "r_pr_ati_fboworkaround: enable this to workaround an ATI driver bug that causes sprite shadows to be square - you need to restart the renderer for it to take effect", (void*)&pr_ati_fboworkaround, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
|
||||
{ "r_pr_ati_nodepthoffset", "r_pr_ati_nodepthoffset: enable this to workaround an ATI driver bug that causes sprite drawing to freeze the game on Radeon X1x00 hardware - you need to restart the renderer for it to take effect", (void*)&pr_ati_nodepthoffset, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
|
||||
#endif
|
||||
|
||||
{ "r_models","r_models: enable/disable model rendering",(void *)&usemodels, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_hightile","r_hightile: enable/disable hightile texture rendering",(void *)&usehightile, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_models","r_models: enable/disable model rendering",(void *)&usemodels, CVAR_BOOL, 0, 1 },
|
||||
{ "r_hightile","r_hightile: enable/disable hightile texture rendering",(void *)&usehightile, CVAR_BOOL, 0, 1 },
|
||||
#endif
|
||||
};
|
||||
|
||||
for (i=0; i<sizeof(cvars_polymost)/sizeof(cvars_polymost[0]); i++)
|
||||
{
|
||||
OSD_RegisterCvar(&cvars_polymost[i]);
|
||||
// this is a little different than elsewhere
|
||||
if (cvars_polymost[i].type & CVAR_FUNCPTR) OSD_RegisterFunction(cvars_polymost[i].name, cvars_polymost[i].helpstr, osdcmd_cvar_set_polymost);
|
||||
else OSD_RegisterFunction(cvars_polymost[i].name, cvars_polymost[i].helpstr, osdcmd_cvar_set);
|
||||
}
|
||||
if (OSD_RegisterCvar(&cvars_polymost[i]))
|
||||
continue;
|
||||
|
||||
OSD_RegisterFunction(cvars_polymost[i].name, cvars_polymost[i].helpstr,
|
||||
cvars_polymost[i].type & CVAR_FUNCPTR ? osdcmd_cvar_set_polymost : osdcmd_cvar_set);
|
||||
}
|
||||
}
|
||||
|
||||
void polymost_precache(int32_t dapicnum, int32_t dapalnum, int32_t datype)
|
||||
|
|
265
polymer/eduke32/build/src/rawinput.c
Normal file
265
polymer/eduke32/build/src/rawinput.c
Normal file
|
@ -0,0 +1,265 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
#include "rawinput.h"
|
||||
#include "winlayer.h"
|
||||
#include "scancodes.h"
|
||||
#include "build.h"
|
||||
|
||||
static BOOL init_done = 0;
|
||||
static uint8_t KeyboardState[256] = {0};
|
||||
static uint8_t MouseState0[5] = {0};
|
||||
static uint8_t MouseState1[5] = {0};
|
||||
static int8_t MWheel = 0;
|
||||
|
||||
extern volatile uint8_t moustat, mousegrab;
|
||||
extern uint32_t mousewheel[2];
|
||||
|
||||
#define MASK_DOWN (1<<(i<<1))
|
||||
#define MASK_UP (MASK_DOWN<<1)
|
||||
|
||||
#define MouseWheelFakePressTime 50
|
||||
|
||||
void RI_ProcessMouse(const RAWMOUSE* rmouse)
|
||||
{
|
||||
int32_t i, mask;
|
||||
|
||||
if (!mousegrab)
|
||||
return;
|
||||
|
||||
mousex += rmouse->lLastX;
|
||||
mousey += rmouse->lLastY;
|
||||
|
||||
if (rmouse->usFlags & MOUSE_MOVE_ABSOLUTE)
|
||||
{
|
||||
// untested... maybe devices like wacom tablets set this flag?
|
||||
POINT pos = { xdim>>1, ydim>>1 };
|
||||
|
||||
ClientToScreen((HWND)win_gethwnd(), &pos);
|
||||
|
||||
mousex -= pos.x;
|
||||
mousey -= pos.y;
|
||||
}
|
||||
|
||||
for (i = 0, mask = 1; i < 4; i++)
|
||||
{
|
||||
MouseState1[i] = MouseState0[i];
|
||||
|
||||
if (rmouse->usButtonFlags & mask) // button down
|
||||
{
|
||||
MouseState1[i] = 1;
|
||||
if (mousepresscallback)
|
||||
mousepresscallback(i, MouseState1[i]);
|
||||
mouseb |= 1<<i;
|
||||
}
|
||||
else if (rmouse->usButtonFlags & (mask<<1)) // button up
|
||||
{
|
||||
MouseState1[i] = 0;
|
||||
if (mousepresscallback)
|
||||
mousepresscallback(i, MouseState1[i]);
|
||||
mouseb &= ~(1<<i);
|
||||
}
|
||||
mask <<= 2;
|
||||
}
|
||||
|
||||
MWheel = (rmouse->usButtonFlags & RI_MOUSE_WHEEL) ? rmouse->usButtonData : 0;
|
||||
|
||||
if (MWheel > 0) // wheel up
|
||||
{
|
||||
if (mousewheel[0] > 0 && mousepresscallback) mousepresscallback(5,0);
|
||||
mousewheel[0] = getticks();
|
||||
mouseb |= 16;
|
||||
if (mousepresscallback) mousepresscallback(5, 1);
|
||||
}
|
||||
else if (MWheel < 0) // wheel down
|
||||
{
|
||||
if (mousewheel[1] > 0 && mousepresscallback) mousepresscallback(6,0);
|
||||
mousewheel[1] = getticks();
|
||||
mouseb |= 32;
|
||||
if (mousepresscallback) mousepresscallback(6, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void RI_ProcessKeyboard(const RAWKEYBOARD* rkbd)
|
||||
{
|
||||
uint8_t key = rkbd->MakeCode;
|
||||
uint8_t VKey = rkbd->VKey;
|
||||
|
||||
// for some reason rkbd->MakeCode is wrong for these
|
||||
// even though rkbd->VKey is right...
|
||||
|
||||
switch (VKey)
|
||||
{
|
||||
case VK_SHIFT:
|
||||
if (rkbd->Flags & RI_KEY_E0) VKey = VK_RSHIFT, key = sc_RightShift; break;
|
||||
case VK_CONTROL:
|
||||
if (rkbd->Flags & RI_KEY_E0) VKey = VK_RCONTROL, key = sc_RightControl; break;
|
||||
case VK_MENU:
|
||||
if (rkbd->Flags & RI_KEY_E0) VKey = VK_RMENU, key = sc_RightAlt; break;
|
||||
case VK_UP:
|
||||
key = sc_UpArrow; break;
|
||||
case VK_DOWN:
|
||||
key = sc_DownArrow; break;
|
||||
case VK_LEFT:
|
||||
key = sc_LeftArrow; break;
|
||||
case VK_RIGHT:
|
||||
key = sc_RightArrow; break;
|
||||
case VK_INSERT:
|
||||
key = sc_Insert; break;
|
||||
case VK_HOME:
|
||||
key = sc_Home; break;
|
||||
case VK_DELETE:
|
||||
key = sc_Delete; break;
|
||||
case VK_END:
|
||||
key = sc_End; break;
|
||||
case VK_PRIOR:
|
||||
key = sc_PgUp; break;
|
||||
case VK_NEXT:
|
||||
key = sc_PgDn; break;
|
||||
}
|
||||
|
||||
KeyboardState[VKey] &= 0xfe;
|
||||
KeyboardState[VKey] |= 1 - (rkbd->Flags & RI_KEY_BREAK);
|
||||
|
||||
if (OSD_HandleScanCode(key, (rkbd->Flags & RI_KEY_BREAK) == 0))
|
||||
{
|
||||
SetKey(key, (rkbd->Flags & RI_KEY_BREAK) == 0);
|
||||
|
||||
if (keypresscallback)
|
||||
keypresscallback(key, (rkbd->Flags & RI_KEY_BREAK) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
// keyboard is always captured regardless of what we tell this function
|
||||
int32_t RI_CaptureInput(int32_t grab, HWND target)
|
||||
{
|
||||
RAWINPUTDEVICE raw[2];
|
||||
|
||||
raw[0].usUsagePage = 0x01;
|
||||
raw[0].usUsage = 0x02;
|
||||
raw[0].dwFlags = grab ? (RIDEV_NOLEGACY | RIDEV_CAPTUREMOUSE) : 0;
|
||||
raw[0].hwndTarget = grab ? target : NULL;
|
||||
|
||||
raw[1].usUsagePage = 0x01;
|
||||
raw[1].usUsage = 0x06;
|
||||
raw[1].dwFlags = 0;
|
||||
raw[1].hwndTarget = NULL;
|
||||
|
||||
mousegrab = grab;
|
||||
|
||||
return (RegisterRawInputDevices(raw, 2, sizeof(raw[0])) == FALSE);
|
||||
}
|
||||
|
||||
uint8_t RI_MouseState(uint8_t Button)
|
||||
{
|
||||
return ((MouseState0[Button-1] << 1) | MouseState1[Button-1]) & 0x03;
|
||||
}
|
||||
|
||||
void RI_PollDevices()
|
||||
{
|
||||
int32_t i;
|
||||
MSG msg;
|
||||
|
||||
if (!init_done)
|
||||
{
|
||||
if (RI_CaptureInput(1, (HWND)win_gethwnd()))
|
||||
return;
|
||||
|
||||
init_done = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
KeyboardState[i] = (KeyboardState[i] << 1) | (1 & KeyboardState[i]);
|
||||
|
||||
Bmemcpy(MouseState0, MouseState1, sizeof(MouseState0));
|
||||
|
||||
MWheel = 0;
|
||||
|
||||
while (PeekMessage(&msg, 0, WM_INPUT, WM_INPUT, PM_REMOVE | PM_QS_INPUT))
|
||||
{
|
||||
if (GET_RAWINPUT_CODE_WPARAM(msg.wParam) == RIM_INPUT)
|
||||
{
|
||||
UINT dwSize = sizeof(RAWINPUT);
|
||||
RAWINPUT raw;
|
||||
|
||||
GetRawInputData((HRAWINPUT)msg.lParam, RID_INPUT, &raw, &dwSize, sizeof(RAWINPUTHEADER));
|
||||
|
||||
if (raw.header.dwType == RIM_TYPEKEYBOARD)
|
||||
RI_ProcessKeyboard(&raw.data.keyboard);
|
||||
else if (raw.header.dwType == RIM_TYPEMOUSE)
|
||||
RI_ProcessMouse(&raw.data.mouse);
|
||||
}
|
||||
|
||||
DefWindowProc(msg.hwnd, msg.message, msg.wParam, msg.lParam);
|
||||
}
|
||||
|
||||
if (mousegrab)
|
||||
{
|
||||
// center the cursor in the window
|
||||
POINT pt = { xdim>>1, ydim>>1 };
|
||||
|
||||
ClientToScreen((HWND)win_gethwnd(), &pt);
|
||||
SetCursorPos(pt.x, pt.y);
|
||||
|
||||
// do this here because we only want the wheel to signal once, but hold the state for a moment
|
||||
if (mousewheel[0] > 0 && getticks() - mousewheel[0] > MouseWheelFakePressTime)
|
||||
{
|
||||
if (mousepresscallback) mousepresscallback(5,0);
|
||||
mousewheel[0] = 0; mouseb &= ~16;
|
||||
}
|
||||
if (mousewheel[1] > 0 && getticks() - mousewheel[1] > MouseWheelFakePressTime)
|
||||
{
|
||||
if (mousepresscallback) mousepresscallback(6,0);
|
||||
mousewheel[1] = 0; mouseb &= ~32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int32_t initmouse(void)
|
||||
{
|
||||
if (moustat) return 0;
|
||||
grabmouse(moustat = 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void uninitmouse(void)
|
||||
{
|
||||
if (!moustat) return;
|
||||
grabmouse(moustat = 0);
|
||||
}
|
||||
|
||||
void grabmouse(char a)
|
||||
{
|
||||
static POINT pos;
|
||||
static int32_t d = 0;
|
||||
|
||||
if (!moustat) return;
|
||||
|
||||
if (!mousegrab || !d)
|
||||
{
|
||||
GetCursorPos(&pos);
|
||||
d = 1;
|
||||
}
|
||||
|
||||
ShowCursor(a == 0);
|
||||
RI_CaptureInput(a, (HWND)win_gethwnd());
|
||||
SetCursorPos(pos.x, pos.y);
|
||||
|
||||
mousex = mousey = mouseb = 0;
|
||||
}
|
||||
|
||||
void readmousexy(int32_t *x, int32_t *y)
|
||||
{
|
||||
if (!moustat || !mousegrab) { *x = *y = 0; return; }
|
||||
*x = mousex;
|
||||
mousex = 0;
|
||||
*y = mousey;
|
||||
mousey = 0;
|
||||
}
|
||||
|
||||
void readmousebstatus(int32_t *b)
|
||||
{
|
||||
if (!moustat || !mousegrab) { *b = 0; return; }
|
||||
*b = mouseb;
|
||||
}
|
||||
|
|
@ -522,7 +522,7 @@ const char *getjoyname(int32_t what, int32_t num)
|
|||
}
|
||||
|
||||
//
|
||||
// bgetchar, bkbhit, bflushchars -- character-based input functions
|
||||
// bgetchar, bflushchars -- character-based input functions
|
||||
//
|
||||
char bgetchar(void)
|
||||
{
|
||||
|
@ -536,11 +536,6 @@ char bgetchar(void)
|
|||
}
|
||||
}
|
||||
|
||||
int32_t bkbhit(void)
|
||||
{
|
||||
return (keyasciififoplc != keyasciififoend);
|
||||
}
|
||||
|
||||
void bflushchars(void)
|
||||
{
|
||||
keyasciififoplc = keyasciififoend = 0;
|
||||
|
@ -806,18 +801,18 @@ void getvalidmodes(void)
|
|||
// initprintf("Detecting video modes:\n");
|
||||
|
||||
#define ADDMODE(x,y,c,f) if (validmodecnt<MAXVALIDMODES) { \
|
||||
int32_t mn; \
|
||||
for(mn=0;mn<validmodecnt;mn++) \
|
||||
if (validmode[mn].xdim==x && validmode[mn].ydim==y && \
|
||||
validmode[mn].bpp==c && validmode[mn].fs==f) break; \
|
||||
if (mn==validmodecnt) { \
|
||||
validmode[validmodecnt].xdim=x; \
|
||||
validmode[validmodecnt].ydim=y; \
|
||||
validmode[validmodecnt].bpp=c; \
|
||||
validmode[validmodecnt].fs=f; \
|
||||
validmodecnt++; \
|
||||
/*initprintf(" - %dx%d %d-bit %s\n", x, y, c, (f&1)?"fullscreen":"windowed");*/ \
|
||||
} \
|
||||
int32_t mn; \
|
||||
for(mn=0;mn<validmodecnt;mn++) \
|
||||
if (validmode[mn].xdim==x && validmode[mn].ydim==y && \
|
||||
validmode[mn].bpp==c && validmode[mn].fs==f) break; \
|
||||
if (mn==validmodecnt) { \
|
||||
validmode[validmodecnt].xdim=x; \
|
||||
validmode[validmodecnt].ydim=y; \
|
||||
validmode[validmodecnt].bpp=c; \
|
||||
validmode[validmodecnt].fs=f; \
|
||||
validmodecnt++; \
|
||||
/*initprintf(" - %dx%d %d-bit %s\n", x, y, c, (f&1)?"fullscreen":"windowed");*/ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define CHECK(w,h) if ((w < maxx) && (h < maxy))
|
||||
|
@ -1148,7 +1143,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
} else
|
||||
pr_ati_nodepthoffset = 0;
|
||||
#ifdef __APPLE__
|
||||
//See bug description at http://lists.apple.com/archives/mac-opengl/2005/Oct/msg00169.html
|
||||
//See bug description at http://lists.apple.com/archives/mac-opengl/2005/Oct/msg00169.html
|
||||
if (!Bstrncmp(glinfo.renderer,"ATI Radeon 9600", 15)) {
|
||||
pr_ati_textureformat_one = 1;
|
||||
initprintf("Enabling ATI Radeon 9600 texture format workaround.\n");
|
||||
|
@ -1465,20 +1460,20 @@ int32_t setpalette(int32_t start, int32_t num)
|
|||
/*
|
||||
int32_t getpalette(int32_t start, int32_t num, char *dapal)
|
||||
{
|
||||
int32_t i;
|
||||
SDL_Palette *pal;
|
||||
int32_t i;
|
||||
SDL_Palette *pal;
|
||||
|
||||
// we shouldn't need to lock the surface to get the palette
|
||||
pal = sdl_surface->format->palette;
|
||||
// we shouldn't need to lock the surface to get the palette
|
||||
pal = sdl_surface->format->palette;
|
||||
|
||||
for (i=num; i>0; i--, start++) {
|
||||
dapal[0] = pal->colors[start].b >> 2;
|
||||
dapal[1] = pal->colors[start].g >> 2;
|
||||
dapal[2] = pal->colors[start].r >> 2;
|
||||
dapal += 4;
|
||||
}
|
||||
for (i=num; i>0; i--, start++) {
|
||||
dapal[0] = pal->colors[start].b >> 2;
|
||||
dapal[1] = pal->colors[start].g >> 2;
|
||||
dapal[2] = pal->colors[start].r >> 2;
|
||||
dapal += 4;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eduke32", "eduke32.vcproj", "{8E7A6179-0B72-4073-8A4C-E8682D481DAE}"
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eduke32", "eduke32.vcxproj", "{8E7A6179-0B72-4073-8A4C-E8682D481DAE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
263
polymer/eduke32/eduke32.vcxproj
Normal file
263
polymer/eduke32/eduke32.vcxproj
Normal file
|
@ -0,0 +1,263 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8E7A6179-0B72-4073-8A4C-E8682D481DAE}</ProjectGuid>
|
||||
<RootNamespace>eduke32</RootNamespace>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f Makefile.msvc DEBUG=1</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f Makefile.msvc veryclean all DEBUG=1</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f Makefile.msvc veryclean</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;SUPERBUILD;POLYMOST;POLYMER;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f Makefile.msvc</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f Makefile.msvc veryclean all</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f Makefile.msvc veryclean</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;_DEBUG;SUPERBUILD;POLYMOST;POLYMER;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">u:\SDKs\oggvorbis-win32sdk-1.0.1\include;$(IncludePath)</IncludePath>
|
||||
<SourcePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SourcePath)</SourcePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<BuildLog>
|
||||
<Path>
|
||||
</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<BuildLog>
|
||||
<Path>
|
||||
</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="build\include\a.h" />
|
||||
<ClInclude Include="build\include\baselayer.h" />
|
||||
<ClInclude Include="build\include\build.h" />
|
||||
<ClInclude Include="build\include\cache1d.h" />
|
||||
<ClInclude Include="build\include\compat.h" />
|
||||
<ClInclude Include="build\include\crc32.h" />
|
||||
<ClInclude Include="build\include\dxdidf.h" />
|
||||
<ClInclude Include="build\include\dynamicgtk.h" />
|
||||
<ClInclude Include="build\include\editor.h" />
|
||||
<ClInclude Include="build\include\enet_mmulti.h" />
|
||||
<ClInclude Include="build\include\glbuild.h" />
|
||||
<ClInclude Include="build\include\glext.h" />
|
||||
<ClInclude Include="build\include\gtkbits.h" />
|
||||
<ClInclude Include="build\include\kplib.h" />
|
||||
<ClInclude Include="build\include\lzwnew.h" />
|
||||
<ClInclude Include="build\include\malloc.c.h" />
|
||||
<ClInclude Include="build\include\md4.h" />
|
||||
<ClInclude Include="build\include\mdsprite.h" />
|
||||
<ClInclude Include="build\include\mmulti.h" />
|
||||
<ClInclude Include="build\include\mutex.h" />
|
||||
<ClInclude Include="build\include\nedmalloc.h" />
|
||||
<ClInclude Include="build\include\osd.h" />
|
||||
<ClInclude Include="build\include\osxbits.h" />
|
||||
<ClInclude Include="build\include\osxmain.h" />
|
||||
<ClInclude Include="build\include\polymer.h" />
|
||||
<ClInclude Include="build\include\polymost.h" />
|
||||
<ClInclude Include="build\include\pragmas.h" />
|
||||
<ClInclude Include="build\include\quicklz.h" />
|
||||
<ClInclude Include="build\include\rawinput.h" />
|
||||
<ClInclude Include="build\include\scriptfile.h" />
|
||||
<ClInclude Include="build\include\sdlayer.h" />
|
||||
<ClInclude Include="build\include\startwin.editor.h" />
|
||||
<ClInclude Include="build\include\winlayer.h" />
|
||||
<ClInclude Include="build\include\msvc\inttypes.h" />
|
||||
<ClInclude Include="build\include\msvc\stdint.h" />
|
||||
<ClInclude Include="build\src\engine_priv.h" />
|
||||
<ClInclude Include="source\_functio.h" />
|
||||
<ClInclude Include="source\_rts.h" />
|
||||
<ClInclude Include="source\config.h" />
|
||||
<ClInclude Include="source\duke3d.h" />
|
||||
<ClInclude Include="source\funct.h" />
|
||||
<ClInclude Include="source\function.h" />
|
||||
<ClInclude Include="source\gamedef.h" />
|
||||
<ClInclude Include="source\gamedefs.h" />
|
||||
<ClInclude Include="source\grpscan.h" />
|
||||
<ClInclude Include="source\keys.h" />
|
||||
<ClInclude Include="source\macros.h" />
|
||||
<ClInclude Include="source\mapster32.h" />
|
||||
<ClInclude Include="source\mdump.h" />
|
||||
<ClInclude Include="source\names.h" />
|
||||
<ClInclude Include="source\namesdyn.h" />
|
||||
<ClInclude Include="source\osdcmds.h" />
|
||||
<ClInclude Include="source\osdfuncs.h" />
|
||||
<ClInclude Include="source\rts.h" />
|
||||
<ClInclude Include="source\soundefs.h" />
|
||||
<ClInclude Include="source\sounds.h" />
|
||||
<ClInclude Include="source\sounds_mapster32.h" />
|
||||
<ClInclude Include="source\startwin.game.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\_multivc.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\driver_directsound.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\driver_nosound.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\driver_sdl.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\drivers.h" />
|
||||
<ClInclude Include="source\jaudiolib\include\fx_man.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\linklist.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\ll_man.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\multivoc.h" />
|
||||
<ClInclude Include="source\jaudiolib\include\music.h" />
|
||||
<ClInclude Include="source\jaudiolib\src\pitch.h" />
|
||||
<ClInclude Include="source\jaudiolib\include\sndcards.h" />
|
||||
<ClInclude Include="source\jmact\_control.h" />
|
||||
<ClInclude Include="source\jmact\_scrplib.h" />
|
||||
<ClInclude Include="source\jmact\animlib.h" />
|
||||
<ClInclude Include="source\jmact\control.h" />
|
||||
<ClInclude Include="source\jmact\file_lib.h" />
|
||||
<ClInclude Include="source\jmact\keyboard.h" />
|
||||
<ClInclude Include="source\jmact\mathutil.h" />
|
||||
<ClInclude Include="source\jmact\mouse.h" />
|
||||
<ClInclude Include="source\jmact\scriplib.h" />
|
||||
<ClInclude Include="source\jmact\util_lib.h" />
|
||||
<ClInclude Include="source\enet\include\enet\callbacks.h" />
|
||||
<ClInclude Include="source\enet\include\enet\enet.h" />
|
||||
<ClInclude Include="source\enet\include\enet\list.h" />
|
||||
<ClInclude Include="source\enet\include\enet\protocol.h" />
|
||||
<ClInclude Include="source\enet\include\enet\time.h" />
|
||||
<ClInclude Include="source\enet\include\enet\types.h" />
|
||||
<ClInclude Include="source\enet\include\enet\unix.h" />
|
||||
<ClInclude Include="source\enet\include\enet\utility.h" />
|
||||
<ClInclude Include="source\enet\include\enet\win32.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="build\src\a-c.c" />
|
||||
<ClCompile Include="build\src\baselayer.c" />
|
||||
<ClCompile Include="build\src\build.c" />
|
||||
<ClCompile Include="build\src\cache1d.c" />
|
||||
<ClCompile Include="build\src\compat.c" />
|
||||
<ClCompile Include="build\src\config.c" />
|
||||
<ClCompile Include="build\src\crc32.c" />
|
||||
<ClCompile Include="build\src\defs.c" />
|
||||
<ClCompile Include="build\src\dynamicgtk.c" />
|
||||
<ClCompile Include="build\src\engine.c" />
|
||||
<ClCompile Include="build\src\glbuild.c" />
|
||||
<ClCompile Include="build\src\gtkbits.c" />
|
||||
<ClCompile Include="build\src\hightile.c" />
|
||||
<ClCompile Include="build\src\kplib.c" />
|
||||
<ClCompile Include="build\src\lzwnew.c" />
|
||||
<ClCompile Include="build\src\md4.c" />
|
||||
<ClCompile Include="build\src\mdsprite.c" />
|
||||
<ClCompile Include="build\src\mutex.c" />
|
||||
<ClCompile Include="build\src\nedmalloc.c" />
|
||||
<ClCompile Include="build\src\osd.c" />
|
||||
<ClCompile Include="build\src\polymer.c" />
|
||||
<ClCompile Include="build\src\polymost.c" />
|
||||
<ClCompile Include="build\src\pragmas.c" />
|
||||
<ClCompile Include="build\src\quicklz.c" />
|
||||
<ClCompile Include="build\src\rawinput.c" />
|
||||
<ClCompile Include="build\src\scriptfile.c" />
|
||||
<ClCompile Include="build\src\sdlayer.c" />
|
||||
<ClCompile Include="build\src\smalltextfont.c" />
|
||||
<ClCompile Include="build\src\startgtk.editor.c" />
|
||||
<ClCompile Include="build\src\startwin.editor.c" />
|
||||
<ClCompile Include="build\src\textfont.c" />
|
||||
<ClCompile Include="build\src\winlayer.c" />
|
||||
<ClCompile Include="source\actors.c" />
|
||||
<ClCompile Include="source\anim.c" />
|
||||
<ClCompile Include="source\astub.c" />
|
||||
<ClCompile Include="source\config.c" />
|
||||
<ClCompile Include="source\game.c" />
|
||||
<ClCompile Include="source\gamedef.c" />
|
||||
<ClCompile Include="source\gameexec.c" />
|
||||
<ClCompile Include="source\gamestructures.c" />
|
||||
<ClCompile Include="source\gamevars.c" />
|
||||
<ClCompile Include="source\global.c" />
|
||||
<ClCompile Include="source\grpscan.c" />
|
||||
<ClCompile Include="source\m32def.c" />
|
||||
<ClCompile Include="source\m32exec.c" />
|
||||
<ClCompile Include="source\m32structures.c" />
|
||||
<ClCompile Include="source\m32vars.c" />
|
||||
<ClCompile Include="source\mdump.cpp" />
|
||||
<ClCompile Include="source\menus.c" />
|
||||
<ClCompile Include="source\midi.c" />
|
||||
<ClCompile Include="source\mpu401.c" />
|
||||
<ClCompile Include="source\music.c" />
|
||||
<ClCompile Include="source\namesdyn.c" />
|
||||
<ClCompile Include="source\osdcmds.c" />
|
||||
<ClCompile Include="source\osdfuncs.c" />
|
||||
<ClCompile Include="source\player.c" />
|
||||
<ClCompile Include="source\premap.c" />
|
||||
<ClCompile Include="source\rts.c" />
|
||||
<ClCompile Include="source\savegame.c" />
|
||||
<ClCompile Include="source\sdlmusic.c" />
|
||||
<ClCompile Include="source\sector.c" />
|
||||
<ClCompile Include="source\sounds.c" />
|
||||
<ClCompile Include="source\sounds_mapster32.c" />
|
||||
<ClCompile Include="source\startgtk.game.c" />
|
||||
<ClCompile Include="source\startwin.game.c" />
|
||||
<ClCompile Include="source\winbits.c" />
|
||||
<ClCompile Include="source\wrapper.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\driver_directsound.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\driver_nosound.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\driver_sdl.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\drivers.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\fx_man.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\mix.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\mixst.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\multivoc.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\pitch.c" />
|
||||
<ClCompile Include="source\jaudiolib\src\vorbis.c" />
|
||||
<ClCompile Include="source\jmact\animlib.c" />
|
||||
<ClCompile Include="source\jmact\control.c" />
|
||||
<ClCompile Include="source\jmact\file_lib.c" />
|
||||
<ClCompile Include="source\jmact\keyboard.c" />
|
||||
<ClCompile Include="source\jmact\mathutil.c" />
|
||||
<ClCompile Include="source\jmact\mouse.c" />
|
||||
<ClCompile Include="source\jmact\scriplib.c" />
|
||||
<ClCompile Include="source\jmact\util_lib.c" />
|
||||
<ClCompile Include="source\enet\src\callbacks.c" />
|
||||
<ClCompile Include="source\enet\src\host.c" />
|
||||
<ClCompile Include="source\enet\src\list.c" />
|
||||
<ClCompile Include="source\enet\src\packet.c" />
|
||||
<ClCompile Include="source\enet\src\peer.c" />
|
||||
<ClCompile Include="source\enet\src\protocol.c" />
|
||||
<ClCompile Include="source\enet\src\unix.c" />
|
||||
<ClCompile Include="source\enet\src\win32.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
603
polymer/eduke32/eduke32.vcxproj.filters
Normal file
603
polymer/eduke32/eduke32.vcxproj.filters
Normal file
|
@ -0,0 +1,603 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="enet">
|
||||
<UniqueIdentifier>{be808922-2ddf-4835-a57d-42e2f8d6e6d1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="enet\source">
|
||||
<UniqueIdentifier>{6b639a6d-6609-479e-bf61-3e2d3e4323e6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="enet\headers">
|
||||
<UniqueIdentifier>{84e51a60-037b-40c6-933a-7001d46906ab}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="jaudiolib">
|
||||
<UniqueIdentifier>{eb6a8145-04f6-4b81-b8eb-508836cfdc91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="jaudiolib\headers">
|
||||
<UniqueIdentifier>{7f1918c8-1b71-43db-b2af-aefaf13d21ac}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="jaudiolib\source">
|
||||
<UniqueIdentifier>{447f3e7e-c01b-4ec3-8427-36441da24049}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="build">
|
||||
<UniqueIdentifier>{da5afe7a-2de4-4594-b07f-69cd3d29cc1b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="build\headers">
|
||||
<UniqueIdentifier>{4386b181-dad1-4aaa-9395-b5b57e49bca1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="build\headers\MSVC">
|
||||
<UniqueIdentifier>{647e88f0-5d39-46cc-9822-460f2db9dfe6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="build\source">
|
||||
<UniqueIdentifier>{766da152-470f-4b3b-8c8c-8289206d0d4e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="eduke32">
|
||||
<UniqueIdentifier>{df162924-c116-4c59-a0f3-589ebfb0ca27}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="eduke32\source">
|
||||
<UniqueIdentifier>{dd93df66-1ed9-4b54-bd54-18abf46d2773}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="eduke32\headers">
|
||||
<UniqueIdentifier>{82d4000f-cd8c-4737-88dc-4ada5775a68e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="jmact">
|
||||
<UniqueIdentifier>{65030203-c837-4739-a552-281c7535372f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="jmact\headers">
|
||||
<UniqueIdentifier>{607ab16a-c3a5-4dad-b6ba-3393e6309d23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="jmact\source">
|
||||
<UniqueIdentifier>{8a6aad55-a3bc-4e4f-a61d-4652c29d8b92}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="build\include\a.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\baselayer.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\build.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\cache1d.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\compat.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\crc32.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\dxdidf.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\dynamicgtk.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\editor.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\enet_mmulti.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\glbuild.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\glext.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\gtkbits.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\kplib.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\lzwnew.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\malloc.c.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\md4.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\mdsprite.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\mmulti.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\nedmalloc.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\osd.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\osxbits.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\osxmain.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\polymer.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\polymost.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\pragmas.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\quicklz.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\scriptfile.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\sdlayer.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\startwin.editor.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\winlayer.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\msvc\inttypes.h">
|
||||
<Filter>build\headers\MSVC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\msvc\stdint.h">
|
||||
<Filter>build\headers\MSVC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\src\engine_priv.h">
|
||||
<Filter>build\source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\_functio.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\_rts.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\config.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\duke3d.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\funct.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\function.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\gamedef.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\gamedefs.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\grpscan.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\keys.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\macros.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\mapster32.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\mdump.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\names.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\namesdyn.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\osdcmds.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\osdfuncs.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\rts.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\soundefs.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\sounds.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\sounds_mapster32.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\startwin.game.h">
|
||||
<Filter>eduke32\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\_multivc.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\driver_directsound.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\driver_nosound.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\driver_sdl.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\drivers.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\include\fx_man.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\linklist.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\ll_man.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\multivoc.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\include\music.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\src\pitch.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jaudiolib\include\sndcards.h">
|
||||
<Filter>jaudiolib\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\_control.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\_scrplib.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\animlib.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\control.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\file_lib.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\keyboard.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\mathutil.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\mouse.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\scriplib.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\jmact\util_lib.h">
|
||||
<Filter>jmact\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\callbacks.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\enet.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\list.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\protocol.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\time.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\types.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\unix.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\utility.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\enet\include\enet\win32.h">
|
||||
<Filter>enet\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\mutex.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="build\include\rawinput.h">
|
||||
<Filter>build\headers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="build\src\a-c.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\baselayer.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\build.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\cache1d.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\compat.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\config.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\crc32.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\defs.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\dynamicgtk.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\engine.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\glbuild.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\gtkbits.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\hightile.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\kplib.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\lzwnew.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\md4.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\mdsprite.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\nedmalloc.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\osd.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\polymer.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\polymost.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\pragmas.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\quicklz.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\scriptfile.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\sdlayer.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\smalltextfont.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\startgtk.editor.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\startwin.editor.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\textfont.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\winlayer.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\actors.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\anim.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\astub.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\config.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\game.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\gamedef.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\gameexec.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\gamestructures.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\gamevars.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\global.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\grpscan.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\m32def.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\m32exec.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\m32structures.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\m32vars.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\mdump.cpp">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\menus.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\midi.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\mpu401.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\music.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\namesdyn.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\osdcmds.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\osdfuncs.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\player.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\premap.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\rts.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\savegame.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\sdlmusic.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\sector.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\sounds.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\sounds_mapster32.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\startgtk.game.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\startwin.game.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\winbits.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\wrapper.c">
|
||||
<Filter>eduke32\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\driver_directsound.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\driver_nosound.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\driver_sdl.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\drivers.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\fx_man.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\mix.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\mixst.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\multivoc.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\pitch.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jaudiolib\src\vorbis.c">
|
||||
<Filter>jaudiolib\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\animlib.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\control.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\file_lib.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\keyboard.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\mathutil.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\mouse.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\scriplib.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\jmact\util_lib.c">
|
||||
<Filter>jmact\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\callbacks.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\host.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\list.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\packet.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\peer.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\protocol.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\unix.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\enet\src\win32.c">
|
||||
<Filter>enet\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\mutex.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="build\src\rawinput.c">
|
||||
<Filter>build\source</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
3
polymer/eduke32/eduke32.vcxproj.user
Normal file
3
polymer/eduke32/eduke32.vcxproj.user
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
|
@ -1 +0,0 @@
|
|||
nmake /f Makefile.msvc %1 %2 %3 %4 %5
|
|
@ -1 +0,0 @@
|
|||
wmake -f Makefile.watcom %1 %2 %3 %4 %5
|
File diff suppressed because it is too large
Load diff
|
@ -4326,7 +4326,7 @@ static void Keys3d(void)
|
|||
if (g_numsounds > 0 && AmbienceToggle)
|
||||
{
|
||||
M32_MoveFX();
|
||||
S_Pan3D();
|
||||
S_Update();
|
||||
}
|
||||
|
||||
if (usedcount && !helpon)
|
||||
|
@ -4476,7 +4476,7 @@ static void Keys3d(void)
|
|||
enddrawing();
|
||||
}
|
||||
|
||||
X_OnEvent(EVENT_PREKEYS3D, -1);
|
||||
VM_OnEvent(EVENT_PREKEYS3D, -1);
|
||||
|
||||
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_V]) // ' V
|
||||
{
|
||||
|
@ -7084,7 +7084,7 @@ static void Keys3d(void)
|
|||
}
|
||||
}
|
||||
|
||||
X_OnEvent(EVENT_KEYS3D, -1);
|
||||
VM_OnEvent(EVENT_KEYS3D, -1);
|
||||
}// end 3d
|
||||
|
||||
static void DoSpriteSearch(int32_t dir) // <0: backwards, >=0: forwards
|
||||
|
@ -7237,7 +7237,7 @@ static void Keys2d(void)
|
|||
if (keystatus[KEYSC_TAB]) //TAB
|
||||
{
|
||||
if (cursectornum >= 0)
|
||||
showsectordata((int16_t)i+16384);
|
||||
showsectordata((int16_t)i);
|
||||
}
|
||||
else if (!(keystatus[KEYSC_F5]|keystatus[KEYSC_F6]|keystatus[KEYSC_F7]|keystatus[KEYSC_F8]))
|
||||
{
|
||||
|
@ -7252,7 +7252,7 @@ static void Keys2d(void)
|
|||
olinehighlight = linehighlight;
|
||||
ocursectornum = cursectornum;
|
||||
|
||||
if (counter >= 40)
|
||||
if (counter >= 40 && totalclock >= 120*6)
|
||||
{
|
||||
if (pointhighlight >= 16384)
|
||||
{
|
||||
|
@ -7329,7 +7329,7 @@ static void Keys2d(void)
|
|||
keystatus[0x14] = 0;
|
||||
if (keystatus[0x1d]|keystatus[0x9d]) //Ctrl-T
|
||||
{
|
||||
extern int16_t showtags;
|
||||
extern int32_t showtags;
|
||||
|
||||
showtags ^= 1;
|
||||
if (showtags == 0)
|
||||
|
@ -8276,7 +8276,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
|
|||
|
||||
int32_t ExtPreInit(int32_t argc,const char **argv)
|
||||
{
|
||||
wm_setapptitle("Mapster32"VERSION BUILDDATE);
|
||||
wm_setapptitle("Mapster32");
|
||||
|
||||
#ifdef _WIN32
|
||||
tempbuf[GetModuleFileName(NULL,tempbuf,BMAX_PATH)] = 0;
|
||||
|
@ -8285,7 +8285,7 @@ int32_t ExtPreInit(int32_t argc,const char **argv)
|
|||
#endif
|
||||
|
||||
OSD_SetLogFile("mapster32.log");
|
||||
OSD_SetVersionString("Mapster32"VERSION,0,2);
|
||||
OSD_SetVersion("Mapster32"VERSION,0,2);
|
||||
initprintf("Mapster32"VERSION BUILDDATE"\n");
|
||||
// initprintf("Copyright (c) 2008 EDuke32 team\n");
|
||||
|
||||
|
@ -8657,7 +8657,7 @@ static int32_t osdcmd_do(const osdfuncparm_t *parm)
|
|||
|
||||
insptr = script + tscrofs;
|
||||
Bmemcpy(&vm, &vm_default, sizeof(vmstate_t));
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
// asksave = 1; // handled in Access(Sprite|Sector|Wall)
|
||||
}
|
||||
|
||||
|
@ -8697,11 +8697,11 @@ static int32_t osdcmd_endisableevent(const osdfuncparm_t *parm)
|
|||
if (isdigit(parm->parms[i][0]))
|
||||
j = atoi(parm->parms[i]);
|
||||
else if (!Bstrncmp(parm->parms[i], "EVENT_", 6))
|
||||
j = hash_find(&labelH, parm->parms[i]);
|
||||
j = hash_find(&h_labels, parm->parms[i]);
|
||||
else
|
||||
{
|
||||
Bstrncat(buf, parm->parms[i], sizeof(buf)-6-1);
|
||||
j = hash_find(&labelH, buf);
|
||||
j = hash_find(&h_labels, buf);
|
||||
}
|
||||
|
||||
if (j>=0 && j<MAXEVENTS)
|
||||
|
@ -10340,7 +10340,7 @@ void ExtAnalyzeSprites(void)
|
|||
}
|
||||
}
|
||||
|
||||
X_OnEvent(EVENT_ANALYZESPRITES, -1);
|
||||
VM_OnEvent(EVENT_ANALYZESPRITES, -1);
|
||||
}
|
||||
|
||||
#define MESSAGEX 3 // (xdimgame>>1)
|
||||
|
|
|
@ -51,18 +51,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
===================
|
||||
*/
|
||||
|
||||
hashtable_t gamefuncH = { NUMGAMEFUNCTIONS<<1, NULL };
|
||||
hashtable_t h_gamefuncs = { NUMGAMEFUNCTIONS<<1, NULL };
|
||||
|
||||
int32_t CONFIG_FunctionNameToNum(char * func)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
i = hash_find(&gamefuncH,func);
|
||||
i = hash_find(&h_gamefuncs,func);
|
||||
|
||||
if (i < 0)
|
||||
{
|
||||
char *str = strtolower(Bstrdup(func),Bstrlen(func));
|
||||
i = hash_find(&gamefuncH,str);
|
||||
i = hash_find(&h_gamefuncs,str);
|
||||
Bfree(str);
|
||||
|
||||
return i;
|
||||
|
@ -656,7 +656,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
|
||||
SCRIPT_GetString(ud.config.scripthandle, "Comm Setup","PlayerName",&tempbuf[0]);
|
||||
|
||||
while (Bstrlen(stripcolorcodes(dummybuf,tempbuf)) > 10)
|
||||
while (Bstrlen(OSD_StripColors(dummybuf,tempbuf)) > 10)
|
||||
tempbuf[Bstrlen(tempbuf)-1] = '\0';
|
||||
|
||||
Bstrncpy(szPlayerName,tempbuf,sizeof(szPlayerName)-1);
|
||||
|
@ -691,6 +691,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetString(ud.config.scripthandle, "Setup","SelectedGRP",&g_grpNamePtr[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
{
|
||||
tempbuf[0] = 0;
|
||||
SCRIPT_GetString(ud.config.scripthandle, "Screen Setup", "AmbientLight",&tempbuf[0]);
|
||||
|
@ -713,8 +714,11 @@ int32_t CONFIG_ReadSetup(void)
|
|||
g_frameDelay = (1000/r_maxfps);
|
||||
else g_frameDelay = 0;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "Messages",&ud.fta_on);
|
||||
*/
|
||||
|
||||
if (!NAM)
|
||||
{
|
||||
|
@ -722,11 +726,16 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetString(ud.config.scripthandle, "Screen Setup","Password",&ud.pwlockout[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenGamma",&ud.brightness);
|
||||
*/
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenHeight",&ud.config.ScreenHeight);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenMode",&ud.config.ScreenMode);
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenSize",&ud.screen_size);
|
||||
*/
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenWidth",&ud.config.ScreenWidth);
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "Shadows",&ud.shadows);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "Tilt",&ud.screen_tilting);
|
||||
|
||||
|
@ -747,6 +756,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetString(ud.config.scripthandle, "Screen Setup", "VidContrast",&tempbuf[0]);
|
||||
if (tempbuf[0]) vid_contrast = atof(tempbuf);
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
{
|
||||
|
@ -758,6 +768,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
{
|
||||
#ifdef _WIN32
|
||||
dummy = 0;
|
||||
|
@ -775,18 +786,20 @@ int32_t CONFIG_ReadSetup(void)
|
|||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLAnimationSmoothing", &r_animsmoothing);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||
/*SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLDepthPeeling", &r_depthpeeling);*/
|
||||
/ *SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLDepthPeeling", &r_depthpeeling);* /
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLDetailMapping", &r_detailmapping);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLFullbrights", &r_fullbrights);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLGlowMapping", &r_glowmapping);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLOcclusionChecking", &r_modelocclusionchecking);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyClamping", &r_parallaxskyclamping);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyPanning", &r_parallaxskypanning);
|
||||
/*SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount", &r_peelscount);*/
|
||||
/ *SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount", &r_peelscount);* /
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLProjectionFix", &glprojectionhacks);
|
||||
*/
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "Polymer", &dummy);
|
||||
if (dummy > 0) glrendmode = 4;
|
||||
else glrendmode = 3;
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLTextureQuality", &r_downsize);
|
||||
r_downsizevar = r_downsize;
|
||||
|
@ -798,12 +811,14 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLVSync", &vsync);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLWidescreen", &glwidescreen);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "OSDHightile",&osdhightile);
|
||||
*/
|
||||
|
||||
{
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenBPP", &ud.config.ScreenBPP);
|
||||
if (ud.config.ScreenBPP < 8) ud.config.ScreenBPP = 32;
|
||||
}
|
||||
|
||||
/*
|
||||
{
|
||||
dummy = usehightile;
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "UseHightile",&dummy);
|
||||
|
@ -850,12 +865,16 @@ int32_t CONFIG_ReadSetup(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "CrosshairScale",&ud.crosshairscale);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Crosshairs",&ud.crosshair);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "DeathMessages",&ud.obituaries);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "DemoCams",&ud.democams);
|
||||
*/
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Executions",&ud.executions);
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "IDPlayers",&ud.idplayers);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "MPMessageDisplayTime",&ud.msgdisptime);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "RunMode",&ud.config.RunMode);
|
||||
|
@ -865,14 +884,18 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "StatusBarMode",&ud.statusbarmode);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "StatusBarScale",&ud.statusbarscale);
|
||||
*/
|
||||
|
||||
/*
|
||||
{
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Team",&dummy);
|
||||
ud.team = 0;
|
||||
if (dummy < 4 && dummy > -1) ud.team = dummy;
|
||||
g_player[0].pteam = ud.team;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "TextScale",&ud.textscale);
|
||||
dummy = ud.config.useprecache;
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "UsePrecache",&dummy);
|
||||
|
@ -893,6 +916,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
demorec_synccompress_cvar = min(max(0, demorec_synccompress_cvar), 1);
|
||||
demoplay_diffs = !!demoplay_diffs;
|
||||
}
|
||||
*/
|
||||
|
||||
// weapon choices are defaulted in G_CheckCommandLine, which may override them
|
||||
if (!g_forceWeaponChoice)
|
||||
|
@ -904,6 +928,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
if (dummy >= 0) g_player[0].wchoice[i] = dummy;
|
||||
}
|
||||
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "AmbienceToggle",&ud.config.AmbienceToggle);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "FXDevice",&ud.config.FXDevice);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "FXVolume",&ud.config.FXVolume);
|
||||
|
@ -922,7 +947,9 @@ int32_t CONFIG_ReadSetup(void)
|
|||
// hack to switch old VoiceToggle value over to new bitfield format
|
||||
if (ud.config.VoiceToggle == 2) ud.config.VoiceToggle = 5;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Controls","AimingFlag",(int32_t *)&g_myAimMode); // (if toggle mode) gives state
|
||||
|
||||
{
|
||||
|
@ -953,6 +980,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetNumber(ud.config.scripthandle, "Controls","WeaponSwitchMode",&ud.weaponswitch);
|
||||
g_player[0].ps->weaponswitch = ud.weaponswitch;
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", &ud.config.CheckForUpdates);
|
||||
|
@ -961,7 +989,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
|
||||
}
|
||||
|
||||
CONFIG_ReadKeys();
|
||||
// CONFIG_ReadKeys();
|
||||
|
||||
//CONFIG_SetupMouse(ud.config.scripthandle);
|
||||
//CONFIG_SetupJoystick(ud.config.scripthandle);
|
||||
|
@ -977,14 +1005,17 @@ int32_t CONFIG_ReadSetup(void)
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_WriteBinds(void) // save binds and aliases to <cfgname>_binds.cfg
|
||||
void CONFIG_WriteBinds(void) // save binds and aliases to <cfgname>_settings.cfg
|
||||
{
|
||||
int32_t i;
|
||||
FILE *fp;
|
||||
char *ptr = Bstrdup(setupfilename);
|
||||
char tempbuf[128];
|
||||
|
||||
Bsprintf(tempbuf, "%s_binds.cfg", strtok(ptr, "."));
|
||||
if (!Bstrcmp(setupfilename, SETUPFILENAME))
|
||||
Bsprintf(tempbuf, "settings.cfg");
|
||||
else Bsprintf(tempbuf, "%s_settings.cfg", strtok(ptr, "."));
|
||||
|
||||
fp = fopen(tempbuf, "wt");
|
||||
|
||||
if (fp)
|
||||
|
@ -1013,12 +1044,18 @@ void CONFIG_WriteBinds(void) // save binds and aliases to <cfgname>_binds.cfg
|
|||
*/
|
||||
OSD_WriteCvars(fp);
|
||||
fclose(fp);
|
||||
Bsprintf(tempbuf,"Wrote %s_binds.cfg\n",ptr);
|
||||
if (!Bstrcmp(setupfilename, SETUPFILENAME))
|
||||
Bsprintf(tempbuf, "Wrote settings.cfg\n");
|
||||
else Bsprintf(tempbuf,"Wrote %s_settings.cfg\n",ptr);
|
||||
OSD_Printf(tempbuf);
|
||||
Bfree(ptr);
|
||||
return;
|
||||
}
|
||||
Bsprintf(tempbuf,"Error writing %s_binds.cfg: %s\n",ptr,strerror(errno));
|
||||
|
||||
if (!Bstrcmp(setupfilename, SETUPFILENAME))
|
||||
Bsprintf(tempbuf, "Error writing settings.cfg: %s\n", strerror(errno));
|
||||
else Bsprintf(tempbuf,"Error writing %s_settings.cfg: %s\n",ptr,strerror(errno));
|
||||
|
||||
OSD_Printf(tempbuf);
|
||||
Bfree(ptr);
|
||||
}
|
||||
|
@ -1033,6 +1070,7 @@ void CONFIG_WriteSetup(void)
|
|||
if (ud.config.scripthandle < 0)
|
||||
ud.config.scripthandle = SCRIPT_Init(setupfilename);
|
||||
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls","AimingFlag",(int32_t) g_myAimMode,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls","AutoAim",ud.config.AutoAim,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls","MouseAimingFlipped",ud.mouseflip,FALSE,FALSE);
|
||||
|
@ -1062,7 +1100,9 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Crosshairs",ud.crosshair,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DeathMessages",ud.obituaries,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoCams",ud.democams,FALSE,FALSE);
|
||||
*/
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Executions",++ud.executions,FALSE,FALSE);
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "IDPlayers",ud.idplayers,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "MPMessageDisplayTime",ud.msgdisptime,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "RunMode",ud.config.RunMode,FALSE,FALSE);
|
||||
|
@ -1072,10 +1112,14 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "ShowViewWeapon",ud.drawweapon,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "StatusBarMode",ud.statusbarmode,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "StatusBarScale",ud.statusbarscale,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Team",ud.team,FALSE,FALSE);
|
||||
*/
|
||||
|
||||
/*SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Team",ud.team,FALSE,FALSE);*/
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "TextScale",ud.textscale,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "UsePrecache",ud.config.useprecache,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "ViewBobbing",ud.viewbob,FALSE,FALSE);
|
||||
*/
|
||||
|
||||
for (dummy=0; dummy<10; dummy++)
|
||||
{
|
||||
|
@ -1083,6 +1127,7 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc",buf,g_player[myconnectindex].wchoice[dummy],FALSE,FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "WeaponScale",ud.weaponscale,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "WeaponSway",ud.weaponsway,FALSE,FALSE);
|
||||
|
||||
|
@ -1091,11 +1136,13 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoRecDiffCompress",demorec_diffcompress_cvar,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoRecSyncCompress",demorec_synccompress_cvar,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoPlayDiffs",demoplay_diffs,FALSE,FALSE);
|
||||
*/
|
||||
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup","ConfigVersion",BYTEVERSION_JF,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "ForceSetup",ud.config.ForceSetup,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "NoAutoLoad",ud.config.NoAutoLoad,FALSE,FALSE);
|
||||
|
||||
/*
|
||||
{
|
||||
Bsprintf(tempbuf,"%.2f",r_ambientlight);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "AmbientLight",tempbuf);
|
||||
|
@ -1105,16 +1152,18 @@ void CONFIG_WriteSetup(void)
|
|||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLAnimationSmoothing",r_animsmoothing,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,FALSE,FALSE);
|
||||
/*SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLDepthPeeling",r_depthpeeling,false,false);*/
|
||||
/ *SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLDepthPeeling",r_depthpeeling,false,false);* /
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLDetailMapping", r_detailmapping,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLFullbrights", r_fullbrights,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLGlowMapping", r_glowmapping,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLOcclusionChecking", r_modelocclusionchecking,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyClamping",r_parallaxskyclamping,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyPanning",r_parallaxskypanning,FALSE,FALSE);
|
||||
/*SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount",r_peelscount,false,false);*/
|
||||
/ *SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount",r_peelscount,false,false);* /
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLProjectionFix",glprojectionhacks,FALSE,FALSE);
|
||||
*/
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Polymer",glrendmode == 4,FALSE,FALSE);
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLTextureQuality", r_downsize,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,FALSE,FALSE);
|
||||
|
@ -1133,6 +1182,7 @@ void CONFIG_WriteSetup(void)
|
|||
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "OSDHightile",osdhightile,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "OSDTextMode",OSD_GetTextMode(),FALSE,FALSE);
|
||||
*/
|
||||
|
||||
if (!NAM)
|
||||
{
|
||||
|
@ -1141,11 +1191,14 @@ void CONFIG_WriteSetup(void)
|
|||
}
|
||||
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenBPP",ud.config.ScreenBPP,FALSE,FALSE); // JBF 20040523
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenGamma",ud.brightness,FALSE,FALSE);
|
||||
*/
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenHeight",ud.config.ScreenHeight,FALSE,FALSE); // JBF 20031206
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenMode",ud.config.ScreenMode,FALSE,FALSE); // JBF 20031206
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenSize",ud.screen_size,FALSE,FALSE);
|
||||
/* SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenSize",ud.screen_size,FALSE,FALSE);*/
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenWidth",ud.config.ScreenWidth,FALSE,FALSE); // JBF 20031206
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Shadows",ud.shadows,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Tilt",ud.screen_tilting,FALSE,FALSE);
|
||||
|
||||
|
@ -1162,6 +1215,7 @@ void CONFIG_WriteSetup(void)
|
|||
Bsprintf(tempbuf,"%.2f",vid_gamma);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "VidGamma",tempbuf);
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "WindowPositioning", windowpos, FALSE, FALSE);
|
||||
|
@ -1169,6 +1223,7 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "WindowPosY", windowy, FALSE, FALSE);
|
||||
#endif
|
||||
|
||||
/*
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "AmbienceToggle",ud.config.AmbienceToggle,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "FXVolume",ud.config.FXVolume,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "MusicToggle",ud.config.MusicToggle,FALSE,FALSE);
|
||||
|
@ -1180,6 +1235,7 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "ReverseStereo",ud.config.ReverseStereo,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "SoundToggle",ud.config.SoundToggle,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "VoiceToggle",ud.config.VoiceToggle,FALSE,FALSE);
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", ud.config.CheckForUpdates, FALSE, FALSE);
|
||||
|
@ -1187,36 +1243,56 @@ void CONFIG_WriteSetup(void)
|
|||
#endif
|
||||
|
||||
// JBF 20031211
|
||||
/*
|
||||
for (dummy=0; dummy<NUMGAMEFUNCTIONS; dummy++)
|
||||
{
|
||||
SCRIPT_PutDoubleString(ud.config.scripthandle, "KeyDefinitions", CONFIG_FunctionNumToName(dummy),
|
||||
KB_ScanCodeToString(ud.config.KeyboardKeys[dummy][0]), KB_ScanCodeToString(ud.config.KeyboardKeys[dummy][1]));
|
||||
}
|
||||
*/
|
||||
|
||||
for (dummy=0; dummy<MAXMOUSEBUTTONS; dummy++)
|
||||
{
|
||||
Bsprintf(buf,"MouseButton%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]))
|
||||
{
|
||||
Bsprintf(buf,"MouseButton%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]));
|
||||
}
|
||||
|
||||
if (dummy >= (MAXMOUSEBUTTONS-2)) continue;
|
||||
|
||||
Bsprintf(buf,"MouseButtonClicked%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]))
|
||||
{
|
||||
Bsprintf(buf,"MouseButtonClicked%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]));
|
||||
}
|
||||
}
|
||||
|
||||
for (dummy=0; dummy<MAXMOUSEAXES; dummy++)
|
||||
{
|
||||
Bsprintf(buf,"MouseAnalogAxes%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]));
|
||||
if (CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]))
|
||||
{
|
||||
Bsprintf(buf,"MouseAnalogAxes%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"MouseDigitalAxes%d_0",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]))
|
||||
{
|
||||
Bsprintf(buf,"MouseDigitalAxes%d_0",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"MouseDigitalAxes%d_1",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]))
|
||||
{
|
||||
Bsprintf(buf,"MouseDigitalAxes%d_1",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"MouseAnalogScale%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE);
|
||||
if (ud.config.MouseAnalogueScale[dummy] != 65536)
|
||||
{
|
||||
Bsprintf(buf,"MouseAnalogScale%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
Bsprintf(tempbuf,"%.2f",CONTROL_MouseSensitivity);
|
||||
|
@ -1224,31 +1300,55 @@ void CONFIG_WriteSetup(void)
|
|||
|
||||
for (dummy=0; dummy<MAXJOYBUTTONS; dummy++)
|
||||
{
|
||||
Bsprintf(buf,"JoystickButton%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]))
|
||||
{
|
||||
Bsprintf(buf,"JoystickButton%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"JoystickButtonClicked%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]))
|
||||
{
|
||||
Bsprintf(buf,"JoystickButtonClicked%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]));
|
||||
}
|
||||
}
|
||||
for (dummy=0; dummy<MAXJOYAXES; dummy++)
|
||||
{
|
||||
Bsprintf(buf,"JoystickAnalogAxes%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]));
|
||||
if (CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]))
|
||||
{
|
||||
Bsprintf(buf,"JoystickAnalogAxes%d",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"JoystickDigitalAxes%d_0",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]))
|
||||
{
|
||||
Bsprintf(buf,"JoystickDigitalAxes%d_0",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"JoystickDigitalAxes%d_1",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]));
|
||||
if (CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]))
|
||||
{
|
||||
Bsprintf(buf,"JoystickDigitalAxes%d_1",dummy);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]));
|
||||
}
|
||||
|
||||
Bsprintf(buf,"JoystickAnalogScale%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueScale[dummy], FALSE, FALSE);
|
||||
if (ud.config.JoystickAnalogueScale[dummy] != 65536)
|
||||
{
|
||||
Bsprintf(buf,"JoystickAnalogScale%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueScale[dummy], FALSE, FALSE);
|
||||
}
|
||||
|
||||
Bsprintf(buf,"JoystickAnalogDead%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueDead[dummy], FALSE, FALSE);
|
||||
if (ud.config.JoystickAnalogueDead[dummy] != 1000)
|
||||
{
|
||||
Bsprintf(buf,"JoystickAnalogDead%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueDead[dummy], FALSE, FALSE);
|
||||
}
|
||||
|
||||
Bsprintf(buf,"JoystickAnalogSaturate%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE);
|
||||
if (ud.config.JoystickAnalogueSaturate[dummy] != 9500)
|
||||
{
|
||||
Bsprintf(buf,"JoystickAnalogSaturate%d",dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","PlayerName",&szPlayerName[0]);
|
||||
|
|
|
@ -125,21 +125,11 @@ extern int32_t g_scriptVersion, g_Shareware, g_gameType;
|
|||
|
||||
#define TICRATE (120)
|
||||
#define GAMETICSPERSEC 26
|
||||
#define TICSPERFRAME (TICRATE/GAMETICSPERSEC)
|
||||
|
||||
// #define GC (TICSPERFRAME*44)
|
||||
#define TICSPERFRAME 4 // this used to be TICRATE/GAMETICSPERSEC which was 4.615~ truncated to 4 by integer division
|
||||
#define REALGAMETICSPERSEC 30
|
||||
|
||||
#define MAXSOUNDS 2560
|
||||
|
||||
/*
|
||||
#pragma aux sgn =\
|
||||
"add ebx, ebx",\
|
||||
"sbb eax, eax",\
|
||||
"cmp eax, ebx",\
|
||||
"adc eax, 0",\
|
||||
parm [ebx]\
|
||||
*/
|
||||
|
||||
#define STAT_DEFAULT 0
|
||||
#define STAT_ACTOR 1
|
||||
#define STAT_ZOMBIEACTOR 2
|
||||
|
@ -162,14 +152,13 @@ extern int32_t g_scriptVersion, g_Shareware, g_gameType;
|
|||
#define PHEIGHT (38<<8)
|
||||
|
||||
enum GameMode_t {
|
||||
MODE_MENU = 1,
|
||||
MODE_DEMO = 2,
|
||||
MODE_GAME = 4,
|
||||
MODE_EOL = 8,
|
||||
MODE_TYPE = 16,
|
||||
MODE_RESTART = 32,
|
||||
MODE_SENDTOWHOM = 64,
|
||||
MODE_END = 128
|
||||
MODE_MENU = 0x00000001,
|
||||
MODE_DEMO = 0x00000002,
|
||||
MODE_GAME = 0x00000004,
|
||||
MODE_EOL = 0x00000008,
|
||||
MODE_TYPE = 0x00000010,
|
||||
MODE_RESTART = 0x00000020,
|
||||
MODE_SENDTOWHOM = 0x00000040,
|
||||
};
|
||||
|
||||
#define MAXANIMWALLS 512
|
||||
|
@ -302,7 +291,7 @@ extern volatile char g_soundlocks[MAXSOUNDS];
|
|||
extern sound_t g_sounds[MAXSOUNDS];
|
||||
|
||||
typedef struct {
|
||||
int32_t wallnum, tag;
|
||||
int16_t wallnum, tag;
|
||||
} animwalltype;
|
||||
|
||||
extern animwalltype animwall[MAXANIMWALLS];
|
||||
|
@ -437,66 +426,64 @@ extern int32_t fricxv,fricyv;
|
|||
// mywhatever type globals
|
||||
|
||||
typedef struct {
|
||||
int32_t posx, posy, posz, oposx, oposy, oposz, posxv, posyv, poszv;
|
||||
int32_t bobposx, bobposy, pyoff, opyoff, invdisptime;
|
||||
int32_t last_pissed_time, truefz, truecz;
|
||||
int32_t player_par, visibility;
|
||||
int32_t bobcounter, weapon_sway;
|
||||
int32_t pals_time, randomflamex, crack_time;
|
||||
int32_t zoom, exitx, exity;
|
||||
vec3_t pos, opos, posvel;
|
||||
int32_t bobposx, bobposy;
|
||||
int32_t truefz, truecz, player_par;
|
||||
int32_t randomflamex, exitx, exity;
|
||||
int32_t runspeed, max_player_health, max_shield_amount;
|
||||
|
||||
uint32_t interface_toggle_flag;
|
||||
|
||||
int32_t max_secret_rooms, secret_rooms, max_actors_killed, actors_killed;
|
||||
int32_t runspeed, movement_lock, team;
|
||||
int32_t max_player_health, max_shield_amount, max_ammo_amount[MAX_WEAPONS];
|
||||
|
||||
int32_t scream_voice;
|
||||
|
||||
int32_t loogiex[64], loogiey[64], numloogs, loogcnt;
|
||||
|
||||
uint8_t *palette;
|
||||
|
||||
int16_t sbs, sound_pitch;
|
||||
uint16_t max_actors_killed, actors_killed;
|
||||
uint16_t gotweapon, zoom;
|
||||
|
||||
int16_t loogiex[64], loogiey[64], sbs, sound_pitch;
|
||||
|
||||
int16_t ang, oang, angvel, cursectnum, look_ang, last_extra, subweapon;
|
||||
int16_t ammo_amount[MAX_WEAPONS], inv_amount[GET_MAX], wackedbyactor, frag, fraggedself;
|
||||
int16_t max_ammo_amount[MAX_WEAPONS], ammo_amount[MAX_WEAPONS], inv_amount[GET_MAX];
|
||||
int16_t wackedbyactor, pyoff, opyoff;
|
||||
|
||||
int16_t curr_weapon, last_weapon, tipincs, horiz, horizoff, ohoriz, ohorizoff, wantweaponfire;
|
||||
int16_t newowner, hurt_delay, hbomb_hold_delay;
|
||||
int16_t jumping_counter, airleft, knee_incs, access_incs;
|
||||
int16_t horiz, horizoff, ohoriz, ohorizoff;
|
||||
int16_t newowner, jumping_counter, airleft;
|
||||
int16_t fta, ftq, access_wallnum, access_spritenum;
|
||||
int16_t kickback_pic, got_access, weapon_ang;
|
||||
int16_t got_access, weapon_ang, visibility;
|
||||
int16_t somethingonplayer, on_crane, i, one_parallax_sectnum;
|
||||
int16_t over_shoulder_on, random_club_frame, fist_incs;
|
||||
int16_t one_eighty_count, cheat_phase;
|
||||
int16_t dummyplayersprite, extra_extra8, quick_kick, last_quick_kick;
|
||||
int16_t actorsqu, timebeforeexit, customexitsound;
|
||||
int16_t random_club_frame, one_eighty_count;
|
||||
int16_t dummyplayersprite, extra_extra8;
|
||||
int16_t actorsqu, timebeforeexit, customexitsound, last_pissed_time;
|
||||
|
||||
int16_t weaprecs[16], weapreccnt;
|
||||
int16_t weaprecs[MAX_WEAPONS], weapon_sway, crack_time, bobcounter;
|
||||
|
||||
int16_t orotscrnang, rotscrnang, dead_flag; // JBF 20031220: added orotscrnang
|
||||
int16_t holoduke_on, pycount;
|
||||
|
||||
int16_t orotscrnang, rotscrnang, dead_flag, show_empty_weapon; // JBF 20031220: added orotscrnang
|
||||
int16_t holoduke_on, pycount, weapon_pos, frag_ps;
|
||||
int16_t transporter_hold, last_full_weapon, footprintshade;
|
||||
uint8_t max_secret_rooms, secret_rooms;
|
||||
uint8_t frag, fraggedself, quick_kick, last_quick_kick;
|
||||
uint8_t return_to_center, reloading, weapreccnt;
|
||||
uint8_t aim_mode, auto_aim, weaponswitch, movement_lock, team;
|
||||
uint8_t tipincs, hbomb_hold_delay, frag_ps, kickback_pic;
|
||||
|
||||
char aim_mode, auto_aim, weaponswitch;
|
||||
uint8_t gm, on_warping_sector, footprintcount, hurt_delay;
|
||||
uint8_t hbomb_on, jumping_toggle, rapid_fire_hold, on_ground;
|
||||
uint8_t inven_icon, buttonpalette, over_shoulder_on, show_empty_weapon;
|
||||
|
||||
char gm, on_warping_sector, footprintcount;
|
||||
char hbomb_on, jumping_toggle, rapid_fire_hold, on_ground;
|
||||
char inven_icon, buttonpalette;
|
||||
uint8_t jetpack_on, spritebridge, lastrandomspot;
|
||||
uint8_t scuba_on, footprintpal, heat_on, invdisptime;
|
||||
|
||||
char jetpack_on, spritebridge, lastrandomspot;
|
||||
char scuba_on, footprintpal, heat_on;
|
||||
uint8_t holster_weapon, falling_counter, footprintshade;
|
||||
uint8_t refresh_inventory, last_full_weapon;
|
||||
|
||||
char holster_weapon, falling_counter;
|
||||
char gotweapon[MAX_WEAPONS], refresh_inventory;
|
||||
uint8_t toggle_key_flag, knuckle_incs, knee_incs, access_incs;
|
||||
uint8_t walking_snd_toggle, palookup, hard_landing, fist_incs;
|
||||
|
||||
char toggle_key_flag, knuckle_incs; // , select_dir;
|
||||
char walking_snd_toggle, palookup, hard_landing;
|
||||
char /*fire_flag, */pals[3];
|
||||
char return_to_center, reloading;
|
||||
char name[32];
|
||||
int8_t numloogs, loogcnt, scream_voice, transporter_hold;
|
||||
int8_t last_weapon, cheat_phase, weapon_pos, wantweaponfire, curr_weapon;
|
||||
|
||||
palette_t pals;
|
||||
|
||||
char name[32];
|
||||
} DukePlayer_t;
|
||||
|
||||
extern char tempbuf[2048], packbuf[4096], menutextbuf[128];
|
||||
|
@ -518,7 +505,7 @@ extern char buf[1024]; //My own generic input buffer
|
|||
extern char *ScriptQuotes[MAXQUOTES],*ScriptQuoteRedefinitions[MAXQUOTES];
|
||||
extern char ready2send;
|
||||
|
||||
void X_ScriptInfo(void);
|
||||
void VM_ScriptInfo(void);
|
||||
extern intptr_t *script,*insptr,*labelcode,*labeltype;
|
||||
extern int32_t g_numLabels,g_numDefaultLabels;
|
||||
extern int32_t g_scriptSize;
|
||||
|
@ -532,19 +519,22 @@ extern char EnvMusicFilename[MAXVOLUMES+1][BMAX_PATH];
|
|||
extern int16_t camsprite;
|
||||
|
||||
typedef struct {
|
||||
int32_t workslike, extra, cstat, extra_rand; // 16b
|
||||
int32_t workslike, cstat; // 8b
|
||||
int32_t hitradius, range, flashcolor; // 12b
|
||||
int16_t spawns, sound, isound, vel; // 8b
|
||||
int16_t decal, trail, tnum, drop; // 8b
|
||||
int16_t clipdist, offset, bounces, bsound; // 8b
|
||||
int16_t offset, bounces, bsound; // 6b
|
||||
int16_t toffset; // 2b
|
||||
int16_t extra, extra_rand; // 4b
|
||||
int8_t sxrepeat, syrepeat, txrepeat, tyrepeat; // 4b
|
||||
int8_t shade, xrepeat, yrepeat, pal; // 4b
|
||||
int8_t velmult, filler; // 2b
|
||||
int8_t velmult; // 1b
|
||||
uint8_t clipdist; // 1b
|
||||
int8_t filler[6]; // 6b
|
||||
} projectile_t;
|
||||
|
||||
typedef struct {
|
||||
intptr_t temp_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
||||
intptr_t t_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
||||
|
||||
int16_t picnum,ang,extra,owner; //8b
|
||||
int16_t movflag,tempang,timetosleep; //6b
|
||||
|
@ -569,7 +559,7 @@ typedef struct {
|
|||
|
||||
// this struct needs to match the beginning of ActorData_t above
|
||||
typedef struct {
|
||||
intptr_t temp_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
||||
intptr_t t_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
||||
|
||||
int16_t picnum,ang,extra,owner; //8b
|
||||
int16_t movflag,tempang,timetosleep; // 6b
|
||||
|
@ -577,11 +567,11 @@ typedef struct {
|
|||
int32_t flags; // 4b
|
||||
} NetActorData_t;
|
||||
|
||||
extern ActorData_t ActorExtra[MAXSPRITES];
|
||||
extern ActorData_t actor[MAXSPRITES];
|
||||
|
||||
extern input_t loc;
|
||||
extern input_t recsync[RECSYNCBUFSIZ];
|
||||
extern int32_t avgfvel, avgsvel, avgavel, avghorz, avgbits, avgextbits;
|
||||
extern input_t avg;
|
||||
|
||||
extern int32_t numplayers, myconnectindex;
|
||||
extern int32_t connecthead, connectpoint2[MAXPLAYERS]; //Player linked list variables (indeces, not connection numbers)
|
||||
|
@ -599,7 +589,6 @@ extern int32_t ototalclock;
|
|||
extern int32_t *animateptr[MAXANIMATES];
|
||||
extern int32_t animategoal[MAXANIMATES];
|
||||
extern int32_t animatevel[MAXANIMATES];
|
||||
// extern int32_t oanimateval[MAXANIMATES];
|
||||
extern int16_t neartagsector, neartagwall, neartagsprite;
|
||||
extern int32_t neartaghitdist;
|
||||
extern int16_t animatesect[MAXANIMATES];
|
||||
|
@ -673,7 +662,8 @@ typedef struct {
|
|||
int16_t got_access, last_extra, inv_amount[GET_MAX], curr_weapon, holoduke_on;
|
||||
int16_t last_weapon, weapon_pos, kickback_pic;
|
||||
int16_t ammo_amount[MAX_WEAPONS], frag[MAXPLAYERS];
|
||||
char inven_icon, jetpack_on, heat_on, gotweapon[MAX_WEAPONS];
|
||||
uint16_t gotweapon;
|
||||
char inven_icon, jetpack_on, heat_on;
|
||||
} DukeStatus_t;
|
||||
#pragma pack(push,1)
|
||||
|
||||
|
@ -723,6 +713,7 @@ extern uint32_t g_moveThingsCount;
|
|||
#define TILE_ANIM (MAXTILES-4)
|
||||
#define TILE_VIEWSCR (MAXTILES-5)
|
||||
|
||||
// the order of these can't be changed or else compatibility with EDuke 2.0 mods will break
|
||||
enum GameEvent_t {
|
||||
EVENT_INIT,
|
||||
EVENT_ENTERLEVEL,
|
||||
|
@ -872,17 +863,17 @@ extern int32_t g_gameArrayCount;
|
|||
extern int32_t SpriteFlags[MAXTILES];
|
||||
|
||||
enum SpriteFlags_t {
|
||||
SPRITE_SHADOW = 1,
|
||||
SPRITE_NVG = 2,
|
||||
SPRITE_NOSHADE = 4,
|
||||
SPRITE_PROJECTILE = 8,
|
||||
SPRITE_DECAL = 16,
|
||||
SPRITE_BADGUY = 32,
|
||||
SPRITE_NOPAL = 64,
|
||||
SPRITE_NOEVENTCODE = 128,
|
||||
SPRITE_NOLIGHT = 256,
|
||||
SPRITE_USEACTIVATOR = 512,
|
||||
SPRITE_NULL = 1024, // null sprite in multiplayer
|
||||
SPRITE_SHADOW = 0x00000001,
|
||||
SPRITE_NVG = 0x00000002,
|
||||
SPRITE_NOSHADE = 0x00000004,
|
||||
SPRITE_PROJECTILE = 0x00000008,
|
||||
SPRITE_DECAL = 0x00000010,
|
||||
SPRITE_BADGUY = 0x00000020,
|
||||
SPRITE_NOPAL = 0x00000040,
|
||||
SPRITE_NOEVENTCODE = 0x00000080,
|
||||
SPRITE_NOLIGHT = 0x00000100,
|
||||
SPRITE_USEACTIVATOR = 0x00000200,
|
||||
SPRITE_NULL = 0x00000400, // null sprite in multiplayer
|
||||
};
|
||||
|
||||
extern int16_t SpriteCacheList[MAXTILES][3];
|
||||
|
@ -894,8 +885,8 @@ extern int32_t g_iZRangeVarID;
|
|||
extern int32_t g_iAngRangeVarID;
|
||||
extern int32_t g_iAimAngleVarID;
|
||||
extern int32_t g_iLoTagID; // var ID of "LOTAG"
|
||||
extern int32_t g_iHiTagID; // ver ID of "HITAG"
|
||||
extern int32_t g_iTextureID; // ver ID of "TEXTURE"
|
||||
extern int32_t g_iHiTagID; // var ID of "HITAG"
|
||||
extern int32_t g_iTextureID; // var ID of "TEXTURE"
|
||||
|
||||
extern char g_bEnhanced; // are we 'enhanced' (more minerals, etc)
|
||||
|
||||
|
@ -927,56 +918,56 @@ extern intptr_t *aplWeaponFlashColor[MAX_WEAPONS]; // Color for polymer muz
|
|||
extern int32_t g_timerTicsPerSecond;
|
||||
|
||||
enum WeaponFlags_t {
|
||||
WEAPON_HOLSTER_CLEARS_CLIP = 1, // 'holstering' clears the current clip
|
||||
WEAPON_GLOWS = 2, // weapon 'glows' (shrinker and grower)
|
||||
WEAPON_AUTOMATIC = 4, // automatic fire (continues while 'fire' is held down
|
||||
WEAPON_FIREEVERYOTHER = 8, // during 'hold time' fire every frame
|
||||
WEAPON_FIREEVERYTHIRD = 16, // during 'hold time' fire every third frame
|
||||
WEAPON_RANDOMRESTART = 32, // restart for automatic is 'randomized' by RND 3
|
||||
WEAPON_AMMOPERSHOT = 64, // uses ammo for each shot (for automatic)
|
||||
WEAPON_BOMB_TRIGGER = 128, // weapon is the 'bomb' trigger
|
||||
WEAPON_NOVISIBLE = 256, // weapon use does not cause user to become 'visible'
|
||||
WEAPON_THROWIT = 512, // weapon 'throws' the 'shoots' item...
|
||||
WEAPON_CHECKATRELOAD = 1024, // check weapon availability at 'reload' time
|
||||
WEAPON_STANDSTILL = 2048, // player stops jumping before actual fire (like tripbomb in duke)
|
||||
WEAPON_SPAWNTYPE1 = 0, // just spawn
|
||||
WEAPON_SPAWNTYPE2 = 4096, // spawn like shotgun shells
|
||||
WEAPON_SPAWNTYPE3 = 8192, // spawn like chaingun shells
|
||||
WEAPON_SEMIAUTO = 16384, // cancel button press after each shot
|
||||
WEAPON_RELOAD_TIMING = 32768, // special casing for pistol reload sounds
|
||||
WEAPON_RESET = 65536 // cycle weapon back to frame 1 if fire is held, 0 if not
|
||||
WEAPON_SPAWNTYPE1 = 0x00000000, // just spawn
|
||||
WEAPON_HOLSTER_CLEARS_CLIP = 0x00000001, // 'holstering' clears the current clip
|
||||
WEAPON_GLOWS = 0x00000002, // weapon 'glows' (shrinker and grower)
|
||||
WEAPON_AUTOMATIC = 0x00000004, // automatic fire (continues while 'fire' is held down
|
||||
WEAPON_FIREEVERYOTHER = 0x00000008, // during 'hold time' fire every frame
|
||||
WEAPON_FIREEVERYTHIRD = 0x00000010, // during 'hold time' fire every third frame
|
||||
WEAPON_RANDOMRESTART = 0x00000020, // restart for automatic is 'randomized' by RND 3
|
||||
WEAPON_AMMOPERSHOT = 0x00000040, // uses ammo for each shot (for automatic)
|
||||
WEAPON_BOMB_TRIGGER = 0x00000080, // weapon is the 'bomb' trigger
|
||||
WEAPON_NOVISIBLE = 0x00000100, // weapon use does not cause user to become 'visible'
|
||||
WEAPON_THROWIT = 0x00000200, // weapon 'throws' the 'shoots' item...
|
||||
WEAPON_CHECKATRELOAD = 0x00000400, // check weapon availability at 'reload' time
|
||||
WEAPON_STANDSTILL = 0x00000800, // player stops jumping before actual fire (like tripbomb in duke)
|
||||
WEAPON_SPAWNTYPE2 = 0x00001000, // spawn like shotgun shells
|
||||
WEAPON_SPAWNTYPE3 = 0x00002000, // spawn like chaingun shells
|
||||
WEAPON_SEMIAUTO = 0x00004000, // cancel button press after each shot
|
||||
WEAPON_RELOAD_TIMING = 0x00008000, // special casing for pistol reload sounds
|
||||
WEAPON_RESET = 0x00010000 // cycle weapon back to frame 1 if fire is held, 0 if not
|
||||
};
|
||||
|
||||
#define TRIPBOMB_TRIPWIRE 1
|
||||
#define TRIPBOMB_TIMER 2
|
||||
#define TRIPBOMB_TRIPWIRE 0x00000001
|
||||
#define TRIPBOMB_TIMER 0x00000002
|
||||
|
||||
#define PIPEBOMB_REMOTE 1
|
||||
#define PIPEBOMB_TIMER 2
|
||||
#define PIPEBOMB_REMOTE 0x00000001
|
||||
#define PIPEBOMB_TIMER 0x00000002
|
||||
|
||||
// custom projectiles
|
||||
|
||||
enum ProjectileFlags_t {
|
||||
PROJECTILE_HITSCAN = 1,
|
||||
PROJECTILE_RPG = 2,
|
||||
PROJECTILE_BOUNCESOFFWALLS = 4,
|
||||
PROJECTILE_BOUNCESOFFMIRRORS = 8,
|
||||
PROJECTILE_KNEE = 16,
|
||||
PROJECTILE_WATERBUBBLES = 32,
|
||||
PROJECTILE_TIMED = 64,
|
||||
PROJECTILE_BOUNCESOFFSPRITES = 128,
|
||||
PROJECTILE_SPIT = 256,
|
||||
PROJECTILE_COOLEXPLOSION1 = 512,
|
||||
PROJECTILE_BLOOD = 1024,
|
||||
PROJECTILE_LOSESVELOCITY = 2048,
|
||||
PROJECTILE_NOAIM = 4096,
|
||||
PROJECTILE_RANDDECALSIZE = 8192,
|
||||
PROJECTILE_EXPLODEONTIMER = 16384,
|
||||
PROJECTILE_RPG_IMPACT = 32768,
|
||||
PROJECTILE_RADIUS_PICNUM = 65536,
|
||||
PROJECTILE_ACCURATE_AUTOAIM = 131072,
|
||||
PROJECTILE_FORCEIMPACT = 262144,
|
||||
PROJECTILE_REALCLIPDIST = 524288,
|
||||
PROJECTILE_ACCURATE = 1048576,
|
||||
PROJECTILE_HITSCAN = 0x00000001,
|
||||
PROJECTILE_RPG = 0x00000002,
|
||||
PROJECTILE_BOUNCESOFFWALLS = 0x00000004,
|
||||
PROJECTILE_BOUNCESOFFMIRRORS = 0x00000008,
|
||||
PROJECTILE_KNEE = 0x00000010,
|
||||
PROJECTILE_WATERBUBBLES = 0x00000020,
|
||||
PROJECTILE_TIMED = 0x00000040,
|
||||
PROJECTILE_BOUNCESOFFSPRITES = 0x00000080,
|
||||
PROJECTILE_SPIT = 0x00000100,
|
||||
PROJECTILE_COOLEXPLOSION1 = 0x00000200,
|
||||
PROJECTILE_BLOOD = 0x00000400,
|
||||
PROJECTILE_LOSESVELOCITY = 0x00000800,
|
||||
PROJECTILE_NOAIM = 0x00001000,
|
||||
PROJECTILE_RANDDECALSIZE = 0x00002000,
|
||||
PROJECTILE_EXPLODEONTIMER = 0x00004000,
|
||||
PROJECTILE_RPG_IMPACT = 0x00008000,
|
||||
PROJECTILE_RADIUS_PICNUM = 0x00010000,
|
||||
PROJECTILE_ACCURATE_AUTOAIM = 0x00020000,
|
||||
PROJECTILE_FORCEIMPACT = 0x00040000,
|
||||
PROJECTILE_REALCLIPDIST = 0x00080000,
|
||||
PROJECTILE_ACCURATE = 0x00100000,
|
||||
};
|
||||
|
||||
extern projectile_t ProjectileData[MAXTILES], DefaultProjectileData[MAXTILES], SpriteProjectile[MAXSPRITES];
|
||||
|
@ -984,16 +975,16 @@ extern projectile_t ProjectileData[MAXTILES], DefaultProjectileData[MAXTILES], S
|
|||
// logo control
|
||||
|
||||
enum LogoFlags_t {
|
||||
LOGO_ENABLED = 1,
|
||||
LOGO_PLAYANIM = 2,
|
||||
LOGO_PLAYMUSIC = 4,
|
||||
LOGO_3DRSCREEN = 8,
|
||||
LOGO_TITLESCREEN = 16,
|
||||
LOGO_DUKENUKEM = 32,
|
||||
LOGO_THREEDEE = 64,
|
||||
LOGO_PLUTOPAKSPRITE = 128,
|
||||
LOGO_SHAREWARESCREENS = 256,
|
||||
LOGO_TENSCREEN = 512
|
||||
LOGO_ENABLED = 0x00000001,
|
||||
LOGO_PLAYANIM = 0x00000002,
|
||||
LOGO_PLAYMUSIC = 0x00000004,
|
||||
LOGO_3DRSCREEN = 0x00000008,
|
||||
LOGO_TITLESCREEN = 0x00000010,
|
||||
LOGO_DUKENUKEM = 0x00000020,
|
||||
LOGO_THREEDEE = 0x00000040,
|
||||
LOGO_PLUTOPAKSPRITE = 0x00000080,
|
||||
LOGO_SHAREWARESCREENS = 0x00000100,
|
||||
LOGO_TENSCREEN = 0x00000200
|
||||
};
|
||||
|
||||
extern int32_t g_numRealPalettes;
|
||||
|
@ -1043,7 +1034,7 @@ typedef struct {
|
|||
uint8_t scriptptrs[MAXSPRITES];
|
||||
uint8_t show2dsector[(MAXSECTORS+7)>>3];
|
||||
|
||||
ActorData_t ActorExtra[MAXSPRITES];
|
||||
ActorData_t actor[MAXSPRITES];
|
||||
PlayerSpawn_t g_playerSpawnPoints[MAXPLAYERS];
|
||||
animwalltype animwall[MAXANIMWALLS];
|
||||
sectortype sector[MAXSECTORS];
|
||||
|
@ -1069,7 +1060,8 @@ typedef struct {
|
|||
|
||||
int32_t movefifoend, syncvalhead;
|
||||
int16_t ping, filler;
|
||||
int32_t pcolor, pteam, frags[MAXPLAYERS], wchoice[MAX_WEAPONS];
|
||||
int32_t pcolor, pteam;
|
||||
uint8_t frags[MAXPLAYERS], wchoice[MAX_WEAPONS];
|
||||
|
||||
char vote, gotvote, playerreadyflag, playerquitflag;
|
||||
char user_name[32];
|
||||
|
@ -1093,10 +1085,10 @@ extern char *ConsoleButtons[];
|
|||
extern char *g_grpNamePtr, *g_gameNamePtr;
|
||||
extern char g_modDir[BMAX_PATH];
|
||||
|
||||
extern hashtable_t gamevarH;
|
||||
extern hashtable_t arrayH;
|
||||
extern hashtable_t keywH;
|
||||
extern hashtable_t gamefuncH;
|
||||
extern hashtable_t h_gamevars;
|
||||
extern hashtable_t h_arrays;
|
||||
extern hashtable_t h_keywords;
|
||||
extern hashtable_t h_gamefuncs;
|
||||
|
||||
enum DukePacket_t
|
||||
{
|
||||
|
@ -1115,8 +1107,10 @@ enum DukePacket_t
|
|||
PACKET_PLAYER_READY,
|
||||
|
||||
// any packet with an ID higher than PACKET_BROADCAST is rebroadcast by server
|
||||
// this is so hacked clients can't create fake server packets and get the server
|
||||
// to send them to everyone
|
||||
// so hacked clients can't create fake server packets and get the server to
|
||||
// send them to everyone
|
||||
// newer versions of the netcode also make this determination based on which
|
||||
// channel the packet was broadcast on
|
||||
|
||||
PACKET_BROADCAST,
|
||||
PACKET_NEW_GAME,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct
|
||||
typedef struct _ENetCallbacks
|
||||
{
|
||||
void * (ENET_CALLBACK * malloc) (size_t size);
|
||||
void (ENET_CALLBACK * free) (void * memory);
|
||||
|
|
|
@ -23,25 +23,25 @@ extern "C"
|
|||
#include "enet/list.h"
|
||||
#include "enet/callbacks.h"
|
||||
|
||||
typedef enum
|
||||
typedef enum _ENetVersion
|
||||
{
|
||||
ENET_VERSION = 1
|
||||
} ENetVersion;
|
||||
|
||||
typedef enum
|
||||
typedef enum _ENetSocketType
|
||||
{
|
||||
ENET_SOCKET_TYPE_STREAM = 1,
|
||||
ENET_SOCKET_TYPE_DATAGRAM = 2
|
||||
} ENetSocketType;
|
||||
|
||||
typedef enum
|
||||
typedef enum _ENetSocketWait
|
||||
{
|
||||
ENET_SOCKET_WAIT_NONE = 0,
|
||||
ENET_SOCKET_WAIT_SEND = (1 << 0),
|
||||
ENET_SOCKET_WAIT_RECEIVE = (1 << 1)
|
||||
} ENetSocketWait;
|
||||
|
||||
typedef enum
|
||||
typedef enum _ENetSocketOption
|
||||
{
|
||||
ENET_SOCKOPT_NONBLOCK = 1,
|
||||
ENET_SOCKOPT_BROADCAST = 2,
|
||||
|
@ -83,7 +83,7 @@ typedef struct _ENetAddress
|
|||
|
||||
@sa ENetPacket
|
||||
*/
|
||||
typedef enum
|
||||
typedef enum _ENetPacketFlag
|
||||
{
|
||||
/** packet must be received by the target peer and resend attempts should be
|
||||
* made until the packet is delivered */
|
||||
|
@ -161,7 +161,7 @@ typedef struct _ENetIncomingCommand
|
|||
ENetPacket * packet;
|
||||
} ENetIncomingCommand;
|
||||
|
||||
typedef enum
|
||||
typedef enum _ENetPeerState
|
||||
{
|
||||
ENET_PEER_STATE_DISCONNECTED = 0,
|
||||
ENET_PEER_STATE_CONNECTING = 1,
|
||||
|
@ -319,7 +319,7 @@ typedef struct _ENetHost
|
|||
/**
|
||||
* An ENet event type, as specified in @ref ENetEvent.
|
||||
*/
|
||||
typedef enum
|
||||
typedef enum _ENetEventType
|
||||
{
|
||||
/** no event occurred within the specified time limit */
|
||||
ENET_EVENT_TYPE_NONE = 0,
|
||||
|
|
|
@ -41,7 +41,7 @@ extern int32_t S_PlaySound(int32_t num);
|
|||
extern int32_t A_PlaySound(uint32_t num,int32_t i);
|
||||
extern void S_StopSound(int32_t num);
|
||||
extern void S_StopEnvSound(int32_t num,int32_t i);
|
||||
extern void S_Pan3D(void);
|
||||
extern void S_Update(void);
|
||||
extern void S_Callback(uint32_t num);
|
||||
extern void S_ClearSoundLocks(void);
|
||||
extern int32_t A_CallSound(int32_t sn,int32_t whatsprite);
|
||||
|
@ -110,7 +110,7 @@ extern void ChangeToMenu(int32_t cm);
|
|||
extern int32_t G_LoadPlayer(int32_t spot);
|
||||
extern int32_t G_SavePlayer(int32_t spot);
|
||||
extern int32_t menutext_(int32_t x,int32_t y,int32_t s,int32_t p,char *t,int32_t bits);
|
||||
#define menutext(x,y,s,p,t) menutext_(x,y,s,p,(char *)stripcolorcodes(menutextbuf,t),10+16)
|
||||
#define menutext(x,y,s,p,t) menutext_(x,y,s,p,(char *)OSD_StripColors(menutextbuf,t),10+16)
|
||||
extern void M_DisplayMenus(void);
|
||||
extern void G_FadePalette(int32_t r,int32_t g,int32_t b,int32_t e);
|
||||
extern void G_PlayAnim(const char *fn,char);
|
||||
|
@ -238,7 +238,7 @@ extern void C_ReportError(int32_t iError);
|
|||
|
||||
extern void onvideomodechange(int32_t newmode);
|
||||
|
||||
extern void X_OnEvent(register int32_t iEventID, register int32_t sActor, register int32_t sPlayer, register int32_t lDist);
|
||||
extern void VM_OnEvent(register int32_t iEventID, register int32_t sActor, register int32_t sPlayer, register int32_t lDist);
|
||||
|
||||
extern int32_t A_CheckSoundPlaying(int32_t i, int32_t num);
|
||||
extern int32_t S_CheckSoundPlaying(int32_t i, int32_t num);
|
||||
|
@ -254,7 +254,7 @@ extern void Net_Connect(const char * srvaddr);
|
|||
|
||||
extern int32_t SpriteFlags[MAXTILES];
|
||||
|
||||
#define A_CheckSpriteFlags(iActor, iType) (((SpriteFlags[sprite[iActor].picnum]^ActorExtra[iActor].flags) & iType) != 0)
|
||||
#define A_CheckSpriteFlags(iActor, iType) (((SpriteFlags[sprite[iActor].picnum]^actor[iActor].flags) & iType) != 0)
|
||||
#define A_CheckSpriteTileFlags(iPicnum, iType) ((SpriteFlags[iPicnum] & iType) != 0)
|
||||
|
||||
static inline int32_t G_GetTeamPalette(int32_t team)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -165,7 +165,7 @@ const char *keyw[] =
|
|||
"strength", // 11 sets health
|
||||
"break", // 12 stops processing
|
||||
"shoot", // 13 shoots a projectile
|
||||
"palfrom", // 14 used for player screen shading effect, sets p->pals_time and p->pals[0-2]
|
||||
"palfrom", // 14 used for player screen shading effect, sets p->pals
|
||||
"sound", // 15 plays a sound that was defined with definesound
|
||||
"fall", // 16 causes actor to fall to sector floor height
|
||||
"state", // 17 begins defining a state if used outside a state or actor, otherwise calls a state
|
||||
|
@ -741,7 +741,7 @@ const memberlabel_t PlayerLabels[]=
|
|||
{ "actorsqu", PLAYER_ACTORSQU, 0, 0 },
|
||||
{ "timebeforeexit", PLAYER_TIMEBEFOREEXIT, 0, 0 },
|
||||
{ "customexitsound", PLAYER_CUSTOMEXITSOUND, 0, 0 },
|
||||
{ "weaprecs[16]", PLAYER_WEAPRECS, 0, 0 },
|
||||
{ "weaprecs", PLAYER_WEAPRECS, LABEL_HASPARM2, MAX_WEAPONS },
|
||||
{ "weapreccnt", PLAYER_WEAPRECCNT, 0, 0 },
|
||||
{ "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE_FLAG, 0, 0 },
|
||||
{ "rotscrnang", PLAYER_ROTSCRNANG, 0, 0 },
|
||||
|
@ -959,10 +959,10 @@ const memberlabel_t InputLabels[]=
|
|||
char *bitptr; // pointer to bitmap of which bytecode positions contain pointers
|
||||
#define BITPTR_POINTER 1
|
||||
|
||||
hashtable_t gamevarH = { MAXGAMEVARS>>1, NULL };
|
||||
hashtable_t arrayH = { MAXGAMEARRAYS>>1, NULL };
|
||||
hashtable_t labelH = { 11264>>1, NULL };
|
||||
hashtable_t keywH = { CON_END>>1, NULL };
|
||||
hashtable_t h_gamevars = { MAXGAMEVARS>>1, NULL };
|
||||
hashtable_t h_arrays = { MAXGAMEARRAYS>>1, NULL };
|
||||
hashtable_t h_labels = { 11264>>1, NULL };
|
||||
hashtable_t h_keywords = { CON_END>>1, NULL };
|
||||
|
||||
hashtable_t sectorH = { SECTOR_END>>1, NULL };
|
||||
hashtable_t wallH = { WALL_END>>1, NULL };
|
||||
|
@ -981,12 +981,12 @@ void C_InitHashes()
|
|||
{
|
||||
int32_t i;
|
||||
|
||||
hash_init(&gamevarH);
|
||||
hash_init(&arrayH);
|
||||
hash_init(&labelH);
|
||||
hash_init(&h_gamevars);
|
||||
hash_init(&h_arrays);
|
||||
hash_init(&h_labels);
|
||||
inithashnames();
|
||||
|
||||
hash_init(&keywH);
|
||||
hash_init(&h_keywords);
|
||||
hash_init(§orH);
|
||||
hash_init(&wallH);
|
||||
hash_init(&userdefH);
|
||||
|
@ -996,7 +996,7 @@ void C_InitHashes()
|
|||
hash_init(&actorH);
|
||||
hash_init(&tspriteH);
|
||||
|
||||
for (i=NUMKEYWORDS-1; i>=0; i--) hash_add(&keywH,keyw[i],i);
|
||||
for (i=NUMKEYWORDS-1; i>=0; i--) hash_add(&h_keywords,keyw[i],i);
|
||||
for (i=0; SectorLabels[i].lId >= 0; i++) hash_add(§orH,SectorLabels[i].name,i);
|
||||
for (i=0; WallLabels[i].lId >= 0; i++) hash_add(&wallH,WallLabels[i].name,i);
|
||||
for (i=0; UserdefsLabels[i].lId >= 0; i++) hash_add(&userdefH,UserdefsLabels[i].name,i);
|
||||
|
@ -1009,9 +1009,9 @@ void C_InitHashes()
|
|||
|
||||
void C_FreeHashes(void)
|
||||
{
|
||||
hash_free(&gamevarH);
|
||||
hash_free(&arrayH);
|
||||
hash_free(&labelH);
|
||||
hash_free(&h_gamevars);
|
||||
hash_free(&h_arrays);
|
||||
hash_free(&h_labels);
|
||||
}
|
||||
|
||||
// "magic" number for { and }, overrides line number in compiled code for later detection
|
||||
|
@ -1418,8 +1418,8 @@ static int32_t C_CheckEventSync(int32_t iEventID)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#define GetDefID(szGameLabel) hash_find(&gamevarH,szGameLabel)
|
||||
#define GetADefID(szGameLabel) hash_find(&arrayH,szGameLabel)
|
||||
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
|
||||
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
|
||||
|
||||
static inline int32_t isaltok(const char c)
|
||||
{
|
||||
|
@ -1483,7 +1483,7 @@ static int32_t C_GetKeyword(void)
|
|||
while (isaltok(*temptextptr))
|
||||
tempbuf[i++] = *(temptextptr++);
|
||||
tempbuf[i] = 0;
|
||||
return hash_find(&keywH,tempbuf);
|
||||
return hash_find(&h_keywords,tempbuf);
|
||||
}
|
||||
|
||||
static int32_t C_GetNextKeyword(void) //Returns its code #
|
||||
|
@ -1508,7 +1508,7 @@ static int32_t C_GetNextKeyword(void) //Returns its code #
|
|||
}
|
||||
tempbuf[l] = 0;
|
||||
|
||||
i = hash_find(&keywH,tempbuf);
|
||||
i = hash_find(&h_keywords,tempbuf);
|
||||
if (i>=0)
|
||||
{
|
||||
if (i == CON_LEFTBRACE || i == CON_RIGHTBRACE || i == CON_NULLOP)
|
||||
|
@ -1586,7 +1586,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
}
|
||||
C_GetNextLabelName();
|
||||
|
||||
if (!g_skipKeywordCheck && hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (!g_skipKeywordCheck && hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
|
@ -1726,7 +1726,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
{
|
||||
//try looking for a define instead
|
||||
Bstrcpy(tempbuf,label+(g_numLabels<<6));
|
||||
i = hash_find(&labelH,tempbuf);
|
||||
i = hash_find(&h_labels,tempbuf);
|
||||
if (i>=0)
|
||||
{
|
||||
if (labeltype[i] & LABEL_DEFINE)
|
||||
|
@ -1805,14 +1805,14 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
}
|
||||
tempbuf[l] = 0;
|
||||
|
||||
if (!g_skipKeywordCheck && hash_find(&keywH,tempbuf /*label+(g_numLabels<<6)*/)>=0)
|
||||
if (!g_skipKeywordCheck && hash_find(&h_keywords,tempbuf /*label+(g_numLabels<<6)*/)>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
textptr+=l;
|
||||
}
|
||||
|
||||
i = hash_find(&labelH,tempbuf);
|
||||
i = hash_find(&h_labels,tempbuf);
|
||||
if (i>=0)
|
||||
{
|
||||
char *el,*gl;
|
||||
|
@ -2040,28 +2040,28 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
g_processingState = 1;
|
||||
Bsprintf(g_szCurrentBlockName,"%s",label+(g_numLabels<<6));
|
||||
hash_add(&labelH,label+(g_numLabels<<6),g_numLabels);
|
||||
hash_add(&h_labels,label+(g_numLabels<<6),g_numLabels);
|
||||
g_numLabels++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
C_GetNextLabelName();
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_gamevars,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
j = hash_find(&labelH,label+(g_numLabels<<6));
|
||||
j = hash_find(&h_labels,label+(g_numLabels<<6));
|
||||
if (j>=0)
|
||||
{
|
||||
if (labeltype[j] & LABEL_STATE)
|
||||
|
@ -2226,7 +2226,7 @@ static int32_t C_ParseCommand(void)
|
|||
//printf("Got Label '%.20s'\n",textptr);
|
||||
// Check to see it's already defined
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
|
@ -2271,14 +2271,14 @@ static int32_t C_ParseCommand(void)
|
|||
//printf("Got Label '%.20s'\n",textptr);
|
||||
// Check to see it's already defined
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_gamevars,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
|
@ -2299,21 +2299,21 @@ static int32_t C_ParseCommand(void)
|
|||
//printf("Got label. '%.20s'\n",textptr);
|
||||
// Check to see it's already defined
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_gamevars,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
i = hash_find(&labelH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_labels,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
/* if (i >= g_numDefaultLabels)
|
||||
|
@ -2329,7 +2329,7 @@ static int32_t C_ParseCommand(void)
|
|||
if (i == -1)
|
||||
{
|
||||
// printf("Defining Definition '%s' to be '%d'\n",label+(g_numLabels<<6),*(g_scriptPtr-1));
|
||||
hash_add(&labelH,label+(g_numLabels<<6),g_numLabels);
|
||||
hash_add(&h_labels,label+(g_numLabels<<6),g_numLabels);
|
||||
labeltype[g_numLabels] = LABEL_DEFINE;
|
||||
labelcode[g_numLabels++] = *(g_scriptPtr-1);
|
||||
if (*(g_scriptPtr-1) >= 0 && *(g_scriptPtr-1) < MAXTILES && g_dynamicTileMapping)
|
||||
|
@ -2392,20 +2392,20 @@ static int32_t C_ParseCommand(void)
|
|||
C_GetNextLabelName();
|
||||
// Check to see it's already defined
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hash_find(&gamevarH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_gamevars,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
if ((i = hash_find(&labelH,label+(g_numLabels<<6))) >= 0)
|
||||
if ((i = hash_find(&h_labels,label+(g_numLabels<<6))) >= 0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
initprintf("%s:%d: warning: duplicate move `%s' ignored.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
|
||||
|
@ -2413,7 +2413,7 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
if (i == -1)
|
||||
{
|
||||
hash_add(&labelH,label+(g_numLabels<<6),g_numLabels);
|
||||
hash_add(&h_labels,label+(g_numLabels<<6),g_numLabels);
|
||||
labeltype[g_numLabels] = LABEL_MOVE;
|
||||
labelcode[g_numLabels++] = (intptr_t) g_scriptPtr;
|
||||
}
|
||||
|
@ -2585,21 +2585,21 @@ static int32_t C_ParseCommand(void)
|
|||
g_scriptPtr--;
|
||||
C_GetNextLabelName();
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_gamevars,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
i = hash_find(&labelH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_labels,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
|
@ -2609,7 +2609,7 @@ static int32_t C_ParseCommand(void)
|
|||
if (i == -1)
|
||||
{
|
||||
labeltype[g_numLabels] = LABEL_AI;
|
||||
hash_add(&labelH,label+(g_numLabels<<6),g_numLabels);
|
||||
hash_add(&h_labels,label+(g_numLabels<<6),g_numLabels);
|
||||
labelcode[g_numLabels++] = (intptr_t) g_scriptPtr;
|
||||
}
|
||||
|
||||
|
@ -2666,21 +2666,21 @@ static int32_t C_ParseCommand(void)
|
|||
C_GetNextLabelName();
|
||||
// Check to see it's already defined
|
||||
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_gamevars,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
i = hash_find(&labelH,label+(g_numLabels<<6));
|
||||
i = hash_find(&h_labels,label+(g_numLabels<<6));
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
|
@ -2691,7 +2691,7 @@ static int32_t C_ParseCommand(void)
|
|||
{
|
||||
labeltype[g_numLabels] = LABEL_ACTION;
|
||||
labelcode[g_numLabels] = (intptr_t) g_scriptPtr;
|
||||
hash_add(&labelH,label+(g_numLabels<<6),g_numLabels);
|
||||
hash_add(&h_labels,label+(g_numLabels<<6),g_numLabels);
|
||||
g_numLabels++;
|
||||
}
|
||||
|
||||
|
@ -3578,7 +3578,7 @@ static int32_t C_ParseCommand(void)
|
|||
//printf("found label of '%s'\n", label+(g_numLabels<<6));
|
||||
|
||||
// Check to see if it's a keyword
|
||||
if (hash_find(&keywH,label+(g_numLabels<<6))>=0)
|
||||
if (hash_find(&h_keywords,label+(g_numLabels<<6))>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
|
@ -3658,9 +3658,8 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
// now get name of .xxx
|
||||
while ((*textptr != '['))
|
||||
{
|
||||
textptr++;
|
||||
}
|
||||
|
||||
if (*textptr == '[')
|
||||
textptr++;
|
||||
|
||||
|
@ -3669,6 +3668,7 @@ static int32_t C_ParseCommand(void)
|
|||
C_GetNextVar();
|
||||
g_labelsOnly = 0;
|
||||
// now get name of .xxx
|
||||
|
||||
while (*textptr != '.')
|
||||
{
|
||||
if (*textptr == 0xa)
|
||||
|
@ -3678,7 +3678,8 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
textptr++;
|
||||
}
|
||||
if (*textptr!='.')
|
||||
|
||||
if (*textptr != '.')
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_SYNTAXERROR);
|
||||
|
@ -3686,6 +3687,7 @@ static int32_t C_ParseCommand(void)
|
|||
}
|
||||
textptr++;
|
||||
/// now pointing at 'xxx'
|
||||
|
||||
C_GetNextLabelName();
|
||||
//printf("found xxx label of '%s'\n", label+(g_numLabels<<6));
|
||||
|
||||
|
@ -3709,10 +3711,6 @@ static int32_t C_ParseCommand(void)
|
|||
// get the ID of the DEF
|
||||
C_GetNextVar();
|
||||
}
|
||||
else
|
||||
{
|
||||
//printf("Member does not have Parm2\n");
|
||||
}
|
||||
|
||||
// now at target VAR...
|
||||
|
||||
|
@ -4033,17 +4031,16 @@ static int32_t C_ParseCommand(void)
|
|||
case CON_RESIZEARRAY:
|
||||
C_GetNextLabelName();
|
||||
i=GetADefID(label+(g_numLabels<<6));
|
||||
if (i > (-1))
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i;
|
||||
}
|
||||
else
|
||||
if (i < 0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_NOTAGAMEARRAY);
|
||||
return 1;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i;
|
||||
|
||||
C_SkipComments();
|
||||
C_GetNextVar();
|
||||
return 0;
|
||||
|
@ -5119,10 +5116,10 @@ repeatcase:
|
|||
}
|
||||
gamefunctions[j][i] = '\0';
|
||||
keydefaults[j*3][i] = '\0';
|
||||
hash_add(&gamefuncH,gamefunctions[j],j);
|
||||
hash_add(&h_gamefuncs,gamefunctions[j],j);
|
||||
{
|
||||
char *str = strtolower(Bstrdup(gamefunctions[j]),Bstrlen(gamefunctions[j]));
|
||||
hash_add(&gamefuncH,str,j);
|
||||
hash_add(&h_gamefuncs,str,j);
|
||||
Bfree(str);
|
||||
}
|
||||
|
||||
|
@ -5374,15 +5371,15 @@ repeatcase:
|
|||
C_SkipComments();
|
||||
|
||||
MapInfo[j*MAXLEVELS+k].partime =
|
||||
(((*(textptr+0)-'0')*10+(*(textptr+1)-'0'))*GAMETICSPERSEC*60)+
|
||||
(((*(textptr+3)-'0')*10+(*(textptr+4)-'0'))*GAMETICSPERSEC);
|
||||
(((*(textptr+0)-'0')*10+(*(textptr+1)-'0'))*REALGAMETICSPERSEC*60)+
|
||||
(((*(textptr+3)-'0')*10+(*(textptr+4)-'0'))*REALGAMETICSPERSEC);
|
||||
|
||||
textptr += 5;
|
||||
while (*textptr == ' ' || *textptr == '\t') textptr++;
|
||||
|
||||
MapInfo[j*MAXLEVELS+k].designertime =
|
||||
(((*(textptr+0)-'0')*10+(*(textptr+1)-'0'))*GAMETICSPERSEC*60)+
|
||||
(((*(textptr+3)-'0')*10+(*(textptr+4)-'0'))*GAMETICSPERSEC);
|
||||
(((*(textptr+0)-'0')*10+(*(textptr+1)-'0'))*REALGAMETICSPERSEC*60)+
|
||||
(((*(textptr+3)-'0')*10+(*(textptr+4)-'0'))*REALGAMETICSPERSEC);
|
||||
|
||||
textptr += 5;
|
||||
while (*textptr == ' ' || *textptr == '\t') textptr++;
|
||||
|
@ -5826,7 +5823,7 @@ static void C_AddDefinition(const char *lLabel,int32_t lValue,int32_t lType)
|
|||
{
|
||||
Bstrcpy(label+(g_numLabels<<6),lLabel);
|
||||
labeltype[g_numLabels] = lType;
|
||||
hash_add(&labelH,label+(g_numLabels<<6),g_numLabels);
|
||||
hash_add(&h_labels,label+(g_numLabels<<6),g_numLabels);
|
||||
labelcode[g_numLabels++] = lValue;
|
||||
g_numDefaultLabels++;
|
||||
}
|
||||
|
@ -6157,7 +6154,7 @@ void C_Compile(const char *filenam)
|
|||
{
|
||||
int32_t j=0, k=0;
|
||||
|
||||
hash_free(&keywH);
|
||||
hash_free(&h_keywords);
|
||||
freehashnames();
|
||||
|
||||
hash_free(§orH);
|
||||
|
|
|
@ -84,25 +84,30 @@ extern const memberlabel_t InputLabels[];
|
|||
extern const memberlabel_t TsprLabels[];
|
||||
|
||||
/*
|
||||
extern void X_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2);
|
||||
extern void X_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void X_AccessPlayer(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2);
|
||||
extern void X_AccessPlayerInput(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void X_AccessWall(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void X_AccessSector(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void X_AccessSprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2);
|
||||
extern void X_AccessTsprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void X_AccessProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessPlayer(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2);
|
||||
extern void VM_AccessPlayerInput(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessWall(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessSector(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessSprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2);
|
||||
extern void VM_AccessTsprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
extern void VM_AccessProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2);
|
||||
*/
|
||||
|
||||
#define CON_ERROR OSD_ERROR "Line %d, %s: "
|
||||
|
||||
enum vmflags_t {
|
||||
VM_RETURN = 0x00000001,
|
||||
VM_KILL = 0x00000002,
|
||||
VM_NOEXECUTE = 0x00000004,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int32_t g_i, g_p, g_x;
|
||||
intptr_t *g_t;
|
||||
spritetype *g_sp;
|
||||
int32_t g_killitFlag, g_returnFlag;
|
||||
int32_t filler;
|
||||
int32_t g_flags;
|
||||
} vmstate_t;
|
||||
|
||||
extern vmstate_t vm;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// I got a 3-4 fps gain by inlining these...
|
||||
|
||||
#ifndef _gamevars_c_
|
||||
static void __fastcall X_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0;
|
||||
|
||||
|
@ -911,7 +911,7 @@ static void __fastcall X_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t l
|
|||
}
|
||||
}
|
||||
|
||||
static void __fastcall X_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0,proj=vm.g_i;
|
||||
|
||||
|
@ -920,7 +920,7 @@ static void __fastcall X_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int
|
|||
|
||||
if ((proj < 0 || proj >= MAXSPRITES) /* && g_scriptSanityChecks */)
|
||||
{
|
||||
// OSD_Printf("X_AccessActiveProjectile(): invalid projectile (%d)\n",proj);
|
||||
// OSD_Printf("VM_AccessActiveProjectile(): invalid projectile (%d)\n",proj);
|
||||
OSD_Printf(CON_ERROR "tried to %s %s on invalid target projectile (%d) %d %d from %s\n",g_errorLineNum,keyw[g_tw],
|
||||
iSet?"set":"get",ProjectileLabels[lLabelID].name,proj,vm.g_i,vm.g_sp->picnum,
|
||||
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
||||
|
@ -1199,7 +1199,7 @@ static void __fastcall X_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int
|
|||
}
|
||||
}
|
||||
|
||||
static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLabelID, register int32_t lVar2, int32_t lParm2)
|
||||
static void __fastcall VM_GetPlayer(register int32_t lVar1, register int32_t lLabelID, register int32_t lVar2, int32_t lParm2)
|
||||
{
|
||||
register int32_t iPlayer=vm.g_p;
|
||||
|
||||
|
@ -1229,11 +1229,11 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
case PLAYER_LOOGCNT:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->loogcnt, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_POSX:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posx, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pos.x, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_POSY:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posy, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pos.y, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_POSZ:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posz, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pos.z, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_HORIZ:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->horiz, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_OHORIZ:
|
||||
|
@ -1247,21 +1247,21 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
case PLAYER_BOBPOSY:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->bobposy, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_OPOSX:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->oposx, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->opos.x, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_OPOSY:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->oposy, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->opos.y, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_OPOSZ:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->oposz, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->opos.z, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_PYOFF:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pyoff, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_OPYOFF:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->opyoff, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_POSXV:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posxv, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posvel.x, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_POSYV:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posyv, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posvel.y, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_POSZV:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->poszv, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->posvel.z, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_LAST_PISSED_TIME:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->last_pissed_time, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_TRUEFZ:
|
||||
|
@ -1277,7 +1277,7 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
case PLAYER_WEAPON_SWAY:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->weapon_sway, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_PALS_TIME:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals_time, vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals.f, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_RANDOMFLAMEX:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->randomflamex, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_CRACK_TIME:
|
||||
|
@ -1381,7 +1381,7 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
case PLAYER_CUSTOMEXITSOUND:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->customexitsound, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_WEAPRECS:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->weaprecs[15], vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->weaprecs[lParm2], vm.g_i, vm.g_p); return;
|
||||
case PLAYER_WEAPRECCNT:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->weapreccnt, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
||||
|
@ -1453,7 +1453,7 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
case PLAYER_FALLING_COUNTER:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->falling_counter, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_GOTWEAPON:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->gotweapon[lParm2], vm.g_i, vm.g_p); return;
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->gotweapon & (1<<lParm2), vm.g_i, vm.g_p); return;
|
||||
case PLAYER_REFRESH_INVENTORY:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->refresh_inventory, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_TOGGLE_KEY_FLAG:
|
||||
|
@ -1471,7 +1471,16 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
case PLAYER_SECRET_ROOMS:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->secret_rooms, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_PALS:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals[lParm2], vm.g_i, vm.g_p); return;
|
||||
switch (lParm2)
|
||||
{
|
||||
case 0:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals.r, vm.g_i, vm.g_p); return;
|
||||
case 1:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals.g, vm.g_i, vm.g_p); return;
|
||||
case 2:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals.b, vm.g_i, vm.g_p); return;
|
||||
}
|
||||
return;
|
||||
case PLAYER_MAX_ACTORS_KILLED:
|
||||
Gv_SetVar(lVar2, g_player[iPlayer].ps->max_actors_killed, vm.g_i, vm.g_p); return;
|
||||
case PLAYER_ACTORS_KILLED:
|
||||
|
@ -1509,7 +1518,7 @@ static void __fastcall X_GetPlayer(register int32_t lVar1, register int32_t lLab
|
|||
}
|
||||
|
||||
badplayer:
|
||||
// OSD_Printf("X_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
||||
// OSD_Printf("VM_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
||||
OSD_Printf(CON_ERROR "tried to get %s on invalid target player (%d) from spr %d gv %s\n",g_errorLineNum,keyw[g_tw],
|
||||
PlayerLabels[lLabelID].name,iPlayer,vm.g_i,
|
||||
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
||||
|
@ -1521,7 +1530,7 @@ badpos:
|
|||
return;
|
||||
}
|
||||
|
||||
static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
||||
static void __fastcall VM_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
||||
{
|
||||
register int32_t iPlayer=vm.g_p;
|
||||
|
||||
|
@ -1553,11 +1562,11 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
case PLAYER_LOOGCNT:
|
||||
g_player[iPlayer].ps->loogcnt=lVar1; return;
|
||||
case PLAYER_POSX:
|
||||
g_player[iPlayer].ps->posx=lVar1; return;
|
||||
g_player[iPlayer].ps->pos.x=lVar1; return;
|
||||
case PLAYER_POSY:
|
||||
g_player[iPlayer].ps->posy=lVar1; return;
|
||||
g_player[iPlayer].ps->pos.y=lVar1; return;
|
||||
case PLAYER_POSZ:
|
||||
g_player[iPlayer].ps->posz=lVar1; return;
|
||||
g_player[iPlayer].ps->pos.z=lVar1; return;
|
||||
case PLAYER_HORIZ:
|
||||
g_player[iPlayer].ps->horiz=lVar1; return;
|
||||
case PLAYER_OHORIZ:
|
||||
|
@ -1571,21 +1580,21 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
case PLAYER_BOBPOSY:
|
||||
g_player[iPlayer].ps->bobposy=lVar1; return;
|
||||
case PLAYER_OPOSX:
|
||||
g_player[iPlayer].ps->oposx=lVar1; return;
|
||||
g_player[iPlayer].ps->opos.x=lVar1; return;
|
||||
case PLAYER_OPOSY:
|
||||
g_player[iPlayer].ps->oposy=lVar1; return;
|
||||
g_player[iPlayer].ps->opos.y=lVar1; return;
|
||||
case PLAYER_OPOSZ:
|
||||
g_player[iPlayer].ps->oposz=lVar1; return;
|
||||
g_player[iPlayer].ps->opos.z=lVar1; return;
|
||||
case PLAYER_PYOFF:
|
||||
g_player[iPlayer].ps->pyoff=lVar1; return;
|
||||
case PLAYER_OPYOFF:
|
||||
g_player[iPlayer].ps->opyoff=lVar1; return;
|
||||
case PLAYER_POSXV:
|
||||
g_player[iPlayer].ps->posxv=lVar1; return;
|
||||
g_player[iPlayer].ps->posvel.x=lVar1; return;
|
||||
case PLAYER_POSYV:
|
||||
g_player[iPlayer].ps->posyv=lVar1; return;
|
||||
g_player[iPlayer].ps->posvel.y=lVar1; return;
|
||||
case PLAYER_POSZV:
|
||||
g_player[iPlayer].ps->poszv=lVar1; return;
|
||||
g_player[iPlayer].ps->posvel.z=lVar1; return;
|
||||
case PLAYER_LAST_PISSED_TIME:
|
||||
g_player[iPlayer].ps->last_pissed_time=lVar1; return;
|
||||
case PLAYER_TRUEFZ:
|
||||
|
@ -1601,7 +1610,7 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
case PLAYER_WEAPON_SWAY:
|
||||
g_player[iPlayer].ps->weapon_sway=lVar1; return;
|
||||
case PLAYER_PALS_TIME:
|
||||
g_player[iPlayer].ps->pals_time=lVar1; return;
|
||||
g_player[iPlayer].ps->pals.f=lVar1; return;
|
||||
case PLAYER_RANDOMFLAMEX:
|
||||
g_player[iPlayer].ps->randomflamex=lVar1; return;
|
||||
case PLAYER_CRACK_TIME:
|
||||
|
@ -1705,7 +1714,7 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
case PLAYER_CUSTOMEXITSOUND:
|
||||
g_player[iPlayer].ps->customexitsound=lVar1; return;
|
||||
case PLAYER_WEAPRECS:
|
||||
g_player[iPlayer].ps->weaprecs[15]=lVar1; return;
|
||||
g_player[iPlayer].ps->weaprecs[lParm2]=lVar1; return;
|
||||
case PLAYER_WEAPRECCNT:
|
||||
g_player[iPlayer].ps->weapreccnt=lVar1; return;
|
||||
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
||||
|
@ -1781,7 +1790,14 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
case PLAYER_FALLING_COUNTER:
|
||||
g_player[iPlayer].ps->falling_counter=lVar1; return;
|
||||
case PLAYER_GOTWEAPON:
|
||||
g_player[iPlayer].ps->gotweapon[lParm2]=lVar1; return;
|
||||
if (lVar1)
|
||||
{
|
||||
g_player[iPlayer].ps->gotweapon |= (1<<lParm2);
|
||||
return;
|
||||
}
|
||||
|
||||
g_player[iPlayer].ps->gotweapon &= ~(1<<lParm2);
|
||||
return;
|
||||
case PLAYER_REFRESH_INVENTORY:
|
||||
g_player[iPlayer].ps->refresh_inventory=lVar1; return;
|
||||
case PLAYER_TOGGLE_KEY_FLAG:
|
||||
|
@ -1799,7 +1815,16 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
case PLAYER_SECRET_ROOMS:
|
||||
g_player[iPlayer].ps->secret_rooms=lVar1; return;
|
||||
case PLAYER_PALS:
|
||||
g_player[iPlayer].ps->pals[lParm2]=lVar1; return;
|
||||
switch (lParm2)
|
||||
{
|
||||
case 0:
|
||||
g_player[iPlayer].ps->pals.r = lVar1; return;
|
||||
case 1:
|
||||
g_player[iPlayer].ps->pals.g = lVar1; return;
|
||||
case 2:
|
||||
g_player[iPlayer].ps->pals.b = lVar1; return;
|
||||
}
|
||||
return;
|
||||
case PLAYER_MAX_ACTORS_KILLED:
|
||||
g_player[iPlayer].ps->max_actors_killed=lVar1; return;
|
||||
case PLAYER_ACTORS_KILLED:
|
||||
|
@ -1837,7 +1862,7 @@ static void __fastcall X_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
}
|
||||
|
||||
badplayer:
|
||||
// OSD_Printf("X_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
||||
// OSD_Printf("VM_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
||||
OSD_Printf(CON_ERROR "tried to set %s on invalid target player (%d) from spr %d gv %s\n",g_errorLineNum,keyw[g_tw],
|
||||
PlayerLabels[lLabelID].name,iPlayer,vm.g_i,
|
||||
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
||||
|
@ -1851,7 +1876,7 @@ badpos:
|
|||
return;
|
||||
}
|
||||
|
||||
static void __fastcall X_AccessPlayerInput(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessPlayerInput(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0;
|
||||
int32_t iPlayer=vm.g_p;
|
||||
|
@ -1930,7 +1955,7 @@ badplayer:
|
|||
return;
|
||||
}
|
||||
|
||||
static void __fastcall X_AccessWall(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessWall(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0;
|
||||
int32_t iWall = Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
||||
|
@ -2105,7 +2130,7 @@ badwall:
|
|||
return;
|
||||
}
|
||||
|
||||
static void __fastcall X_AccessSector(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessSector(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0;
|
||||
int32_t iSector=sprite[vm.g_i].sectnum;
|
||||
|
@ -2338,7 +2363,7 @@ badsector:
|
|||
return;
|
||||
}
|
||||
|
||||
static void __fastcall X_SetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
||||
static void __fastcall VM_SetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
||||
{
|
||||
register int32_t iActor=vm.g_i;
|
||||
|
||||
|
@ -2448,75 +2473,75 @@ static void __fastcall X_SetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
return;
|
||||
|
||||
case ACTOR_HTCGG:
|
||||
ActorExtra[iActor].cgg=lVar1;
|
||||
actor[iActor].cgg=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTPICNUM :
|
||||
ActorExtra[iActor].picnum=lVar1;
|
||||
actor[iActor].picnum=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTANG:
|
||||
ActorExtra[iActor].ang=lVar1;
|
||||
actor[iActor].ang=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTEXTRA:
|
||||
ActorExtra[iActor].extra=lVar1;
|
||||
actor[iActor].extra=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTOWNER:
|
||||
ActorExtra[iActor].owner=lVar1;
|
||||
actor[iActor].owner=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTMOVFLAG:
|
||||
ActorExtra[iActor].movflag=lVar1;
|
||||
actor[iActor].movflag=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTTEMPANG:
|
||||
ActorExtra[iActor].tempang=lVar1;
|
||||
actor[iActor].tempang=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTACTORSTAYPUT:
|
||||
ActorExtra[iActor].actorstayput=lVar1;
|
||||
actor[iActor].actorstayput=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTDISPICNUM:
|
||||
ActorExtra[iActor].dispicnum=lVar1;
|
||||
actor[iActor].dispicnum=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTTIMETOSLEEP:
|
||||
ActorExtra[iActor].timetosleep=lVar1;
|
||||
actor[iActor].timetosleep=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTFLOORZ:
|
||||
ActorExtra[iActor].floorz=lVar1;
|
||||
actor[iActor].floorz=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTCEILINGZ:
|
||||
ActorExtra[iActor].ceilingz=lVar1;
|
||||
actor[iActor].ceilingz=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTLASTVX:
|
||||
ActorExtra[iActor].lastvx=lVar1;
|
||||
actor[iActor].lastvx=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTLASTVY:
|
||||
ActorExtra[iActor].lastvy=lVar1;
|
||||
actor[iActor].lastvy=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTBPOSX:
|
||||
ActorExtra[iActor].bposx=lVar1;
|
||||
actor[iActor].bposx=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTBPOSY:
|
||||
ActorExtra[iActor].bposy=lVar1;
|
||||
actor[iActor].bposy=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTBPOSZ:
|
||||
ActorExtra[iActor].bposz=lVar1;
|
||||
actor[iActor].bposz=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_HTG_T:
|
||||
ActorExtra[iActor].temp_data[lParm2]=lVar1;
|
||||
actor[iActor].t_data[lParm2]=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_ANGOFF:
|
||||
|
@ -2556,7 +2581,7 @@ static void __fastcall X_SetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
return;
|
||||
|
||||
case ACTOR_HTFLAGS:
|
||||
ActorExtra[iActor].flags=lVar1;
|
||||
actor[iActor].flags=lVar1;
|
||||
return;
|
||||
|
||||
case ACTOR_ALPHA:
|
||||
|
@ -2582,7 +2607,7 @@ badpos:
|
|||
}
|
||||
|
||||
|
||||
static void __fastcall X_GetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
||||
static void __fastcall VM_GetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
||||
{
|
||||
register int32_t iActor=vm.g_i;
|
||||
|
||||
|
@ -2690,75 +2715,75 @@ static void __fastcall X_GetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
return;
|
||||
|
||||
case ACTOR_HTCGG:
|
||||
Gv_SetVar(lVar2, ActorExtra[iActor].cgg, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2, actor[iActor].cgg, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTPICNUM :
|
||||
Gv_SetVar(lVar2, ActorExtra[iActor].picnum, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2, actor[iActor].picnum, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTANG:
|
||||
Gv_SetVar(lVar2, ActorExtra[iActor].ang, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2, actor[iActor].ang, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTEXTRA:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].extra, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].extra, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTOWNER:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].owner, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].owner, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTMOVFLAG:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].movflag, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].movflag, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTTEMPANG:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].tempang, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].tempang, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTACTORSTAYPUT:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].actorstayput, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].actorstayput, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTDISPICNUM:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].dispicnum, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].dispicnum, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTTIMETOSLEEP:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].timetosleep, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].timetosleep, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTFLOORZ:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].floorz, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].floorz, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTCEILINGZ:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].ceilingz, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].ceilingz, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTLASTVX:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].lastvx, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].lastvx, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTLASTVY:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].lastvy, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].lastvy, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTBPOSX:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].bposx, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].bposx, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTBPOSY:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].bposy, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].bposy, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTBPOSZ:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].bposz, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].bposz, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_HTG_T:
|
||||
Gv_SetVar(lVar2, ActorExtra[iActor].temp_data[lParm2], vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2, actor[iActor].t_data[lParm2], vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_ANGOFF:
|
||||
|
@ -2798,7 +2823,7 @@ static void __fastcall X_GetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar
|
|||
return;
|
||||
|
||||
case ACTOR_HTFLAGS:
|
||||
Gv_SetVar(lVar2,ActorExtra[iActor].flags, vm.g_i, vm.g_p);
|
||||
Gv_SetVar(lVar2,actor[iActor].flags, vm.g_i, vm.g_p);
|
||||
return;
|
||||
|
||||
case ACTOR_ALPHA:
|
||||
|
@ -2824,7 +2849,7 @@ badpos:
|
|||
}
|
||||
|
||||
|
||||
static void __fastcall X_AccessTsprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessTsprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0;
|
||||
int32_t iActor=vm.g_i;
|
||||
|
@ -3066,7 +3091,7 @@ badtspr:
|
|||
return;
|
||||
}
|
||||
|
||||
static void __fastcall X_AccessProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static void __fastcall VM_AccessProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue=0;
|
||||
|
||||
|
@ -3340,7 +3365,7 @@ badtile:
|
|||
return;
|
||||
}
|
||||
#else
|
||||
static int32_t __fastcall X_AccessSpriteX(int32_t iActor, int32_t lLabelID, int32_t lParm2)
|
||||
static int32_t __fastcall VM_AccessSpriteX(int32_t iActor, int32_t lLabelID, int32_t lParm2)
|
||||
{
|
||||
if ((ActorLabels[lLabelID].flags & LABEL_HASPARM2 && (lParm2 < 0 || lParm2 >= ActorLabels[lLabelID].maxParm2)) /* && g_scriptSanityChecks */)
|
||||
goto badpos;
|
||||
|
@ -3370,24 +3395,24 @@ static int32_t __fastcall X_AccessSpriteX(int32_t iActor, int32_t lLabelID, int3
|
|||
case ACTOR_LOTAG: return sprite[iActor].lotag;
|
||||
case ACTOR_HITAG: return sprite[iActor].hitag;
|
||||
case ACTOR_EXTRA: return sprite[iActor].extra;
|
||||
case ACTOR_HTCGG: return ActorExtra[iActor].cgg;
|
||||
case ACTOR_HTPICNUM : return ActorExtra[iActor].picnum;
|
||||
case ACTOR_HTANG: return ActorExtra[iActor].ang;
|
||||
case ACTOR_HTEXTRA: return ActorExtra[iActor].extra;
|
||||
case ACTOR_HTOWNER: return ActorExtra[iActor].owner;
|
||||
case ACTOR_HTMOVFLAG: return ActorExtra[iActor].movflag;
|
||||
case ACTOR_HTTEMPANG: return ActorExtra[iActor].tempang;
|
||||
case ACTOR_HTACTORSTAYPUT: return ActorExtra[iActor].actorstayput;
|
||||
case ACTOR_HTDISPICNUM: return ActorExtra[iActor].dispicnum;
|
||||
case ACTOR_HTTIMETOSLEEP: return ActorExtra[iActor].timetosleep;
|
||||
case ACTOR_HTFLOORZ: return ActorExtra[iActor].floorz;
|
||||
case ACTOR_HTCEILINGZ: return ActorExtra[iActor].ceilingz;
|
||||
case ACTOR_HTLASTVX: return ActorExtra[iActor].lastvx;
|
||||
case ACTOR_HTLASTVY: return ActorExtra[iActor].lastvy;
|
||||
case ACTOR_HTBPOSX: return ActorExtra[iActor].bposx;
|
||||
case ACTOR_HTBPOSY: return ActorExtra[iActor].bposy;
|
||||
case ACTOR_HTBPOSZ: return ActorExtra[iActor].bposz;
|
||||
case ACTOR_HTG_T: return ActorExtra[iActor].temp_data[lParm2];
|
||||
case ACTOR_HTCGG: return actor[iActor].cgg;
|
||||
case ACTOR_HTPICNUM : return actor[iActor].picnum;
|
||||
case ACTOR_HTANG: return actor[iActor].ang;
|
||||
case ACTOR_HTEXTRA: return actor[iActor].extra;
|
||||
case ACTOR_HTOWNER: return actor[iActor].owner;
|
||||
case ACTOR_HTMOVFLAG: return actor[iActor].movflag;
|
||||
case ACTOR_HTTEMPANG: return actor[iActor].tempang;
|
||||
case ACTOR_HTACTORSTAYPUT: return actor[iActor].actorstayput;
|
||||
case ACTOR_HTDISPICNUM: return actor[iActor].dispicnum;
|
||||
case ACTOR_HTTIMETOSLEEP: return actor[iActor].timetosleep;
|
||||
case ACTOR_HTFLOORZ: return actor[iActor].floorz;
|
||||
case ACTOR_HTCEILINGZ: return actor[iActor].ceilingz;
|
||||
case ACTOR_HTLASTVX: return actor[iActor].lastvx;
|
||||
case ACTOR_HTLASTVY: return actor[iActor].lastvy;
|
||||
case ACTOR_HTBPOSX: return actor[iActor].bposx;
|
||||
case ACTOR_HTBPOSY: return actor[iActor].bposy;
|
||||
case ACTOR_HTBPOSZ: return actor[iActor].bposz;
|
||||
case ACTOR_HTG_T: return actor[iActor].t_data[lParm2];
|
||||
case ACTOR_ANGOFF: return spriteext[iActor].angoff;
|
||||
case ACTOR_PITCH: return spriteext[iActor].pitch;
|
||||
case ACTOR_ROLL: return spriteext[iActor].roll;
|
||||
|
@ -3397,7 +3422,7 @@ static int32_t __fastcall X_AccessSpriteX(int32_t iActor, int32_t lLabelID, int3
|
|||
case ACTOR_MDFLAGS: return spriteext[iActor].flags;
|
||||
case ACTOR_XPANNING: return spriteext[iActor].xpanning;
|
||||
case ACTOR_YPANNING: return spriteext[iActor].ypanning;
|
||||
case ACTOR_HTFLAGS: return ActorExtra[iActor].flags;
|
||||
case ACTOR_HTFLAGS: return actor[iActor].flags;
|
||||
case ACTOR_ALPHA: return (uint8_t)(spriteext[iActor].alpha*255.0f);
|
||||
default: return -1;
|
||||
}
|
||||
|
@ -3408,7 +3433,7 @@ badpos:
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int32_t __fastcall X_AccessSectorX(int32_t iSector, int32_t lLabelID)
|
||||
static int32_t __fastcall VM_AccessSectorX(int32_t iSector, int32_t lLabelID)
|
||||
{
|
||||
switch (lLabelID)
|
||||
{
|
||||
|
@ -3439,7 +3464,7 @@ static int32_t __fastcall X_AccessSectorX(int32_t iSector, int32_t lLabelID)
|
|||
}
|
||||
}
|
||||
|
||||
static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int32_t lParm2)
|
||||
static int32_t __fastcall VM_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int32_t lParm2)
|
||||
{
|
||||
if ((PlayerLabels[lLabelID].flags & LABEL_HASPARM2 && (lParm2 < 0 || lParm2 >= PlayerLabels[lLabelID].maxParm2)) /* && g_scriptSanityChecks */)
|
||||
goto badpos;
|
||||
|
@ -3461,11 +3486,11 @@ static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int
|
|||
case PLAYER_LOOGCNT:
|
||||
return g_player[iPlayer].ps->loogcnt;
|
||||
case PLAYER_POSX:
|
||||
return g_player[iPlayer].ps->posx;
|
||||
return g_player[iPlayer].ps->pos.x;
|
||||
case PLAYER_POSY:
|
||||
return g_player[iPlayer].ps->posy;
|
||||
return g_player[iPlayer].ps->pos.y;
|
||||
case PLAYER_POSZ:
|
||||
return g_player[iPlayer].ps->posz;
|
||||
return g_player[iPlayer].ps->pos.z;
|
||||
case PLAYER_HORIZ:
|
||||
return g_player[iPlayer].ps->horiz;
|
||||
case PLAYER_OHORIZ:
|
||||
|
@ -3479,21 +3504,21 @@ static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int
|
|||
case PLAYER_BOBPOSY:
|
||||
return g_player[iPlayer].ps->bobposy;
|
||||
case PLAYER_OPOSX:
|
||||
return g_player[iPlayer].ps->oposx;
|
||||
return g_player[iPlayer].ps->opos.x;
|
||||
case PLAYER_OPOSY:
|
||||
return g_player[iPlayer].ps->oposy;
|
||||
return g_player[iPlayer].ps->opos.y;
|
||||
case PLAYER_OPOSZ:
|
||||
return g_player[iPlayer].ps->oposz;
|
||||
return g_player[iPlayer].ps->opos.z;
|
||||
case PLAYER_PYOFF:
|
||||
return g_player[iPlayer].ps->pyoff;
|
||||
case PLAYER_OPYOFF:
|
||||
return g_player[iPlayer].ps->opyoff;
|
||||
case PLAYER_POSXV:
|
||||
return g_player[iPlayer].ps->posxv;
|
||||
return g_player[iPlayer].ps->posvel.x;
|
||||
case PLAYER_POSYV:
|
||||
return g_player[iPlayer].ps->posyv;
|
||||
return g_player[iPlayer].ps->posvel.y;
|
||||
case PLAYER_POSZV:
|
||||
return g_player[iPlayer].ps->poszv;
|
||||
return g_player[iPlayer].ps->posvel.z;
|
||||
case PLAYER_LAST_PISSED_TIME:
|
||||
return g_player[iPlayer].ps->last_pissed_time;
|
||||
case PLAYER_TRUEFZ:
|
||||
|
@ -3509,7 +3534,7 @@ static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int
|
|||
case PLAYER_WEAPON_SWAY:
|
||||
return g_player[iPlayer].ps->weapon_sway;
|
||||
case PLAYER_PALS_TIME:
|
||||
return g_player[iPlayer].ps->pals_time;
|
||||
return g_player[iPlayer].ps->pals.f;
|
||||
case PLAYER_RANDOMFLAMEX:
|
||||
return g_player[iPlayer].ps->randomflamex;
|
||||
case PLAYER_CRACK_TIME:
|
||||
|
@ -3613,7 +3638,7 @@ static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int
|
|||
case PLAYER_CUSTOMEXITSOUND:
|
||||
return g_player[iPlayer].ps->customexitsound;
|
||||
case PLAYER_WEAPRECS:
|
||||
return g_player[iPlayer].ps->weaprecs[15];
|
||||
return g_player[iPlayer].ps->weaprecs[lParm2];
|
||||
case PLAYER_WEAPRECCNT:
|
||||
return g_player[iPlayer].ps->weapreccnt;
|
||||
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
||||
|
@ -3685,7 +3710,7 @@ static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int
|
|||
case PLAYER_FALLING_COUNTER:
|
||||
return g_player[iPlayer].ps->falling_counter;
|
||||
case PLAYER_GOTWEAPON:
|
||||
return g_player[iPlayer].ps->gotweapon[lParm2];
|
||||
return g_player[iPlayer].ps->gotweapon & (1<<lParm2);
|
||||
case PLAYER_REFRESH_INVENTORY:
|
||||
return g_player[iPlayer].ps->refresh_inventory;
|
||||
case PLAYER_TOGGLE_KEY_FLAG:
|
||||
|
@ -3703,7 +3728,16 @@ static int32_t __fastcall X_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int
|
|||
case PLAYER_SECRET_ROOMS:
|
||||
return g_player[iPlayer].ps->secret_rooms;
|
||||
case PLAYER_PALS:
|
||||
return g_player[iPlayer].ps->pals[lParm2];
|
||||
switch (lParm2)
|
||||
{
|
||||
case 0:
|
||||
return g_player[iPlayer].ps->pals.r;
|
||||
case 1:
|
||||
return g_player[iPlayer].ps->pals.g;
|
||||
case 2:
|
||||
return g_player[iPlayer].ps->pals.b;
|
||||
}
|
||||
return -1;
|
||||
case PLAYER_MAX_ACTORS_KILLED:
|
||||
return g_player[iPlayer].ps->max_actors_killed;
|
||||
case PLAYER_ACTORS_KILLED:
|
||||
|
@ -3744,7 +3778,7 @@ badpos:
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int32_t __fastcall X_AccessWallX(int32_t iWall, int32_t lLabelID)
|
||||
static int32_t __fastcall VM_AccessWallX(int32_t iWall, int32_t lLabelID)
|
||||
{
|
||||
switch (lLabelID)
|
||||
{
|
||||
|
|
|
@ -54,8 +54,8 @@ static void Gv_Free(void) /* called from Gv_ReadSave() and Gv_ResetVars() */
|
|||
aGameArrays[i].bReset=1;
|
||||
}
|
||||
g_gameVarCount=g_gameArrayCount=0;
|
||||
hash_init(&gamevarH);
|
||||
hash_init(&arrayH);
|
||||
hash_init(&h_gamevars);
|
||||
hash_init(&h_arrays);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,8 @@ static void Gv_Clear(void)
|
|||
aGameArrays[i].bReset=1;
|
||||
}
|
||||
g_gameVarCount=g_gameArrayCount=0;
|
||||
hash_init(&gamevarH);
|
||||
hash_init(&arrayH);
|
||||
hash_init(&h_gamevars);
|
||||
hash_init(&h_arrays);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ int32_t Gv_ReadSave(int32_t fil, int32_t newbehav)
|
|||
if (kdfread(&(aGameVars[i]),sizeof(gamevar_t),1,fil) != 1) goto corrupt;
|
||||
aGameVars[i].szLabel=Bcalloc(MAXVARLABEL,sizeof(uint8_t));
|
||||
if (kdfread(aGameVars[i].szLabel,sizeof(uint8_t) * MAXVARLABEL, 1, fil) != 1) goto corrupt;
|
||||
hash_replace(&gamevarH,aGameVars[i].szLabel,i);
|
||||
hash_replace(&h_gamevars,aGameVars[i].szLabel,i);
|
||||
|
||||
if (aGameVars[i].dwFlags & GAMEVAR_PERPLAYER)
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ int32_t Gv_ReadSave(int32_t fil, int32_t newbehav)
|
|||
if (kdfread(&(aGameArrays[i]),sizeof(gamearray_t),1,fil) != 1) goto corrupt;
|
||||
aGameArrays[i].szLabel=Bcalloc(MAXARRAYLABEL,sizeof(uint8_t));
|
||||
if (kdfread(aGameArrays[i].szLabel,sizeof(uint8_t) * MAXARRAYLABEL, 1, fil) != 1) goto corrupt;
|
||||
hash_replace(&arrayH,aGameArrays[i].szLabel,i);
|
||||
hash_replace(&h_arrays,aGameArrays[i].szLabel,i);
|
||||
|
||||
aGameArrays[i].plValues=Bcalloc(aGameArrays[i].size,sizeof(intptr_t));
|
||||
if (kdfread(aGameArrays[i].plValues,sizeof(intptr_t) * aGameArrays[i].size, 1, fil) < 1) goto corrupt;
|
||||
|
@ -408,7 +408,7 @@ int32_t Gv_NewArray(const char *pszLabel, int32_t asize)
|
|||
initprintf("%s:%d: error: array name `%s' exceeds limit of %d characters.\n",g_szScriptFileName,g_lineNumber,pszLabel, MAXARRAYLABEL);
|
||||
return 0;
|
||||
}
|
||||
i = hash_find(&arrayH,pszLabel);
|
||||
i = hash_find(&h_arrays,pszLabel);
|
||||
if (i >=0 && !aGameArrays[i].bReset)
|
||||
{
|
||||
// found it it's a duplicate in error
|
||||
|
@ -427,7 +427,7 @@ int32_t Gv_NewArray(const char *pszLabel, int32_t asize)
|
|||
aGameArrays[i].size=asize;
|
||||
aGameArrays[i].bReset=0;
|
||||
g_gameArrayCount++;
|
||||
hash_replace(&arrayH,aGameArrays[i].szLabel,i);
|
||||
hash_replace(&h_arrays,aGameArrays[i].szLabel,i);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ int32_t Gv_NewVar(const char *pszLabel, int32_t lValue, uint32_t dwFlags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,pszLabel);
|
||||
i = hash_find(&h_gamevars,pszLabel);
|
||||
|
||||
if (i >= 0 && !(aGameVars[i].dwFlags & GAMEVAR_RESET))
|
||||
{
|
||||
|
@ -504,7 +504,7 @@ int32_t Gv_NewVar(const char *pszLabel, int32_t lValue, uint32_t dwFlags)
|
|||
if (i == g_gameVarCount)
|
||||
{
|
||||
// we're adding a new one.
|
||||
hash_add(&gamevarH, aGameVars[i].szLabel, g_gameVarCount++);
|
||||
hash_add(&h_gamevars, aGameVars[i].szLabel, g_gameVarCount++);
|
||||
}
|
||||
|
||||
if (aGameVars[i].dwFlags & GAMEVAR_PERPLAYER)
|
||||
|
@ -539,7 +539,7 @@ void __fastcall A_ResetVars(register int32_t iActor)
|
|||
|
||||
static int32_t Gv_GetVarIndex(const char *szGameLabel)
|
||||
{
|
||||
int32_t i = hash_find(&gamevarH,szGameLabel);
|
||||
int32_t i = hash_find(&h_gamevars,szGameLabel);
|
||||
if (i == -1)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Gv_GetVarDataPtr(): INTERNAL ERROR: couldn't find gamevar %s!\n",szGameLabel);
|
||||
|
@ -590,7 +590,7 @@ int32_t __fastcall Gv_GetVar(register int32_t id, register int32_t iActor, regis
|
|||
if (ActorLabels[label].flags & LABEL_HASPARM2)
|
||||
parm2 = Gv_GetVar(*insptr++, iActor, iPlayer);
|
||||
|
||||
return ((X_AccessSpriteX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessSpriteX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
}
|
||||
case 3: //else if (id == g_iPlayerVarID)
|
||||
{
|
||||
|
@ -600,15 +600,15 @@ int32_t __fastcall Gv_GetVar(register int32_t id, register int32_t iActor, regis
|
|||
parm2 = Gv_GetVar(*insptr++, iActor, iPlayer);
|
||||
|
||||
if (index == vm.g_i) index = vm.g_p;
|
||||
return ((X_AccessPlayerX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessPlayerX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
}
|
||||
case 4: //else if (id == g_iActorVarID)
|
||||
return ((Gv_GetVar(*insptr++, index, iPlayer) ^ -negateResult) + negateResult);
|
||||
case 1: //else if (id == g_iSectorVarID)
|
||||
if (index == vm.g_i) index = sprite[vm.g_i].sectnum;
|
||||
return ((X_AccessSectorX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessSectorX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
case 2: //else if (id == g_iWallVarID)
|
||||
return ((X_AccessWallX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessWallX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
default:
|
||||
OSD_Printf(CON_ERROR "Gv_GetVar(): WTF?\n",g_errorLineNum,keyw[g_tw]);
|
||||
return -1;
|
||||
|
@ -735,7 +735,7 @@ int32_t __fastcall Gv_GetVarX(register int32_t id)
|
|||
if (ActorLabels[label].flags & LABEL_HASPARM2)
|
||||
parm2 = Gv_GetVarX(*insptr++);
|
||||
|
||||
return ((X_AccessSpriteX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessSpriteX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
}
|
||||
case 3: //else if (id == g_iPlayerVarID)
|
||||
{
|
||||
|
@ -745,15 +745,15 @@ int32_t __fastcall Gv_GetVarX(register int32_t id)
|
|||
parm2 = Gv_GetVarX(*insptr++);
|
||||
|
||||
if (index == vm.g_i) index = vm.g_p;
|
||||
return ((X_AccessPlayerX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessPlayerX(index, label, parm2) ^ -negateResult) + negateResult);
|
||||
}
|
||||
case 4: //else if (id == g_iActorVarID)
|
||||
return ((Gv_GetVar(*insptr++, index, vm.g_p) ^ -negateResult) + negateResult);
|
||||
case 1: //else if (id == g_iSectorVarID)
|
||||
if (index == vm.g_i) index = sprite[vm.g_i].sectnum;
|
||||
return ((X_AccessSectorX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessSectorX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
case 2: //else if (id == g_iWallVarID)
|
||||
return ((X_AccessWallX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessWallX(index, *insptr++) ^ -negateResult) + negateResult);
|
||||
default:
|
||||
OSD_Printf(CON_ERROR "Gv_GetVar(): WTF?\n",g_errorLineNum,keyw[g_tw]);
|
||||
return -1;
|
||||
|
@ -816,7 +816,7 @@ void __fastcall Gv_SetVarX(register int32_t id, register int32_t lValue)
|
|||
|
||||
int32_t Gv_GetVarByLabel(const char *szGameLabel, int32_t lDefault, int32_t iActor, int32_t iPlayer)
|
||||
{
|
||||
int32_t i = hash_find(&gamevarH,szGameLabel);
|
||||
int32_t i = hash_find(&h_gamevars,szGameLabel);
|
||||
|
||||
if (i < 0)
|
||||
return lDefault;
|
||||
|
@ -826,7 +826,7 @@ int32_t Gv_GetVarByLabel(const char *szGameLabel, int32_t lDefault, int32_t iAct
|
|||
|
||||
static intptr_t *Gv_GetVarDataPtr(const char *szGameLabel)
|
||||
{
|
||||
int32_t i = hash_find(&gamevarH,szGameLabel);
|
||||
int32_t i = hash_find(&h_gamevars,szGameLabel);
|
||||
|
||||
if (i < 0)
|
||||
return NULL;
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20100311";
|
||||
const char *s_buildDate = "20100427";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
@ -35,7 +35,7 @@ int32_t neartaghitdist,lockclock,g_startArmorAmount;
|
|||
int32_t g_spriteGravity=176;
|
||||
|
||||
// int32_t temp_data[MAXSPRITES][6];
|
||||
ActorData_t ActorExtra[MAXSPRITES];
|
||||
ActorData_t actor[MAXSPRITES];
|
||||
|
||||
int16_t SpriteDeletionQueue[1024],g_spriteDeleteQueuePos,g_spriteDeleteQueueSize=64;
|
||||
animwalltype animwall[MAXANIMWALLS];
|
||||
|
@ -98,7 +98,7 @@ int32_t syncvaltail, syncvaltottail;
|
|||
|
||||
input_t loc;
|
||||
input_t recsync[RECSYNCBUFSIZ];
|
||||
int32_t avgfvel, avgsvel, avgavel, avghorz, avgbits, avgextbits;
|
||||
input_t avg;
|
||||
|
||||
int32_t movefifosendplc;
|
||||
|
||||
|
|
|
@ -757,88 +757,88 @@ void CONTROL_ButtonFunctionState(int32_t *p1)
|
|||
/*
|
||||
void CONTROL_GetUserInput( UserInput *info )
|
||||
{
|
||||
ControlInfo ci;
|
||||
ControlInfo ci;
|
||||
|
||||
CONTROL_PollDevices( &ci );
|
||||
CONTROL_PollDevices( &ci );
|
||||
|
||||
info->dir = dir_None;
|
||||
info->dir = dir_None;
|
||||
|
||||
// checks if CONTROL_UserInputDelay is too far in the future due to clock skew?
|
||||
if (GetTime() + ((ticrate * USERINPUTDELAY) / 1000) < CONTROL_UserInputDelay)
|
||||
CONTROL_UserInputDelay = -1;
|
||||
// checks if CONTROL_UserInputDelay is too far in the future due to clock skew?
|
||||
if (GetTime() + ((ticrate * USERINPUTDELAY) / 1000) < CONTROL_UserInputDelay)
|
||||
CONTROL_UserInputDelay = -1;
|
||||
|
||||
if (GetTime() >= CONTROL_UserInputDelay) {
|
||||
if (CONTROL_MouseAxes[1].digital == -1)
|
||||
info->dir = dir_North;
|
||||
else if (CONTROL_MouseAxes[1].digital == 1)
|
||||
info->dir = dir_South;
|
||||
else if (CONTROL_MouseAxes[0].digital == -1)
|
||||
info->dir = dir_West;
|
||||
else if (CONTROL_MouseAxes[0].digital == 1)
|
||||
info->dir = dir_East;
|
||||
if (GetTime() >= CONTROL_UserInputDelay) {
|
||||
if (CONTROL_MouseAxes[1].digital == -1)
|
||||
info->dir = dir_North;
|
||||
else if (CONTROL_MouseAxes[1].digital == 1)
|
||||
info->dir = dir_South;
|
||||
else if (CONTROL_MouseAxes[0].digital == -1)
|
||||
info->dir = dir_West;
|
||||
else if (CONTROL_MouseAxes[0].digital == 1)
|
||||
info->dir = dir_East;
|
||||
|
||||
if (CONTROL_JoyAxes[1].digital == -1)
|
||||
info->dir = dir_North;
|
||||
else if (CONTROL_JoyAxes[1].digital == 1)
|
||||
info->dir = dir_South;
|
||||
else if (CONTROL_JoyAxes[0].digital == -1)
|
||||
info->dir = dir_West;
|
||||
else if (CONTROL_JoyAxes[0].digital == 1)
|
||||
info->dir = dir_East;
|
||||
}
|
||||
if (CONTROL_JoyAxes[1].digital == -1)
|
||||
info->dir = dir_North;
|
||||
else if (CONTROL_JoyAxes[1].digital == 1)
|
||||
info->dir = dir_South;
|
||||
else if (CONTROL_JoyAxes[0].digital == -1)
|
||||
info->dir = dir_West;
|
||||
else if (CONTROL_JoyAxes[0].digital == 1)
|
||||
info->dir = dir_East;
|
||||
}
|
||||
|
||||
info->button0 = CONTROL_MouseButtonState[0] | CONTROL_JoyButtonState[0];
|
||||
info->button1 = CONTROL_MouseButtonState[1] | CONTROL_JoyButtonState[1];
|
||||
info->button0 = CONTROL_MouseButtonState[0] | CONTROL_JoyButtonState[0];
|
||||
info->button1 = CONTROL_MouseButtonState[1] | CONTROL_JoyButtonState[1];
|
||||
|
||||
if (KB_KeyDown[sc_kpad_8] || KB_KeyDown[sc_UpArrow])
|
||||
info->dir = dir_North;
|
||||
else if (KB_KeyDown[sc_kpad_2] || KB_KeyDown[sc_DownArrow])
|
||||
info->dir = dir_South;
|
||||
else if (KB_KeyDown[sc_kpad_4] || KB_KeyDown[sc_LeftArrow])
|
||||
info->dir = dir_West;
|
||||
else if (KB_KeyDown[sc_kpad_6] || KB_KeyDown[sc_RightArrow])
|
||||
info->dir = dir_East;
|
||||
if (KB_KeyDown[sc_kpad_8] || KB_KeyDown[sc_UpArrow])
|
||||
info->dir = dir_North;
|
||||
else if (KB_KeyDown[sc_kpad_2] || KB_KeyDown[sc_DownArrow])
|
||||
info->dir = dir_South;
|
||||
else if (KB_KeyDown[sc_kpad_4] || KB_KeyDown[sc_LeftArrow])
|
||||
info->dir = dir_West;
|
||||
else if (KB_KeyDown[sc_kpad_6] || KB_KeyDown[sc_RightArrow])
|
||||
info->dir = dir_East;
|
||||
|
||||
if (KB_KeyDown[BUTTON0_SCAN_1] || KB_KeyDown[BUTTON0_SCAN_2] || KB_KeyDown[BUTTON0_SCAN_3])
|
||||
info->button0 = 1;
|
||||
if (KB_KeyDown[BUTTON1_SCAN])
|
||||
info->button1 = 1;
|
||||
if (KB_KeyDown[BUTTON0_SCAN_1] || KB_KeyDown[BUTTON0_SCAN_2] || KB_KeyDown[BUTTON0_SCAN_3])
|
||||
info->button0 = 1;
|
||||
if (KB_KeyDown[BUTTON1_SCAN])
|
||||
info->button1 = 1;
|
||||
|
||||
if (CONTROL_UserInputCleared[1]) {
|
||||
if (!info->button0)
|
||||
CONTROL_UserInputCleared[1] = false;
|
||||
else
|
||||
info->button0 = false;
|
||||
}
|
||||
if (CONTROL_UserInputCleared[2]) {
|
||||
if (!info->button1)
|
||||
CONTROL_UserInputCleared[2] = false;
|
||||
else
|
||||
info->button1 = false;
|
||||
}
|
||||
if (CONTROL_UserInputCleared[1]) {
|
||||
if (!info->button0)
|
||||
CONTROL_UserInputCleared[1] = false;
|
||||
else
|
||||
info->button0 = false;
|
||||
}
|
||||
if (CONTROL_UserInputCleared[2]) {
|
||||
if (!info->button1)
|
||||
CONTROL_UserInputCleared[2] = false;
|
||||
else
|
||||
info->button1 = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CONTROL_ClearUserInput( UserInput *info )
|
||||
{
|
||||
switch (info->dir) {
|
||||
case dir_North:
|
||||
case dir_South:
|
||||
case dir_East:
|
||||
case dir_West:
|
||||
CONTROL_UserInputCleared[0] = true;
|
||||
CONTROL_UserInputDelay = GetTime() + ((ticrate * USERINPUTDELAY) / 1000);
|
||||
switch (info->dir) {
|
||||
case dir_North: KB_KeyDown[sc_UpArrow] = KB_KeyDown[sc_kpad_8] = 0; break;
|
||||
case dir_South: KB_KeyDown[sc_DownArrow] = KB_KeyDown[sc_kpad_2] = 0; break;
|
||||
case dir_East: KB_KeyDown[sc_LeftArrow] = KB_KeyDown[sc_kpad_4] = 0; break;
|
||||
case dir_West: KB_KeyDown[sc_RightArrow] = KB_KeyDown[sc_kpad_6] = 0; break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
if (info->button0) CONTROL_UserInputCleared[1] = true;
|
||||
if (info->button1) CONTROL_UserInputCleared[2] = true;
|
||||
switch (info->dir) {
|
||||
case dir_North:
|
||||
case dir_South:
|
||||
case dir_East:
|
||||
case dir_West:
|
||||
CONTROL_UserInputCleared[0] = true;
|
||||
CONTROL_UserInputDelay = GetTime() + ((ticrate * USERINPUTDELAY) / 1000);
|
||||
switch (info->dir) {
|
||||
case dir_North: KB_KeyDown[sc_UpArrow] = KB_KeyDown[sc_kpad_8] = 0; break;
|
||||
case dir_South: KB_KeyDown[sc_DownArrow] = KB_KeyDown[sc_kpad_2] = 0; break;
|
||||
case dir_East: KB_KeyDown[sc_LeftArrow] = KB_KeyDown[sc_kpad_4] = 0; break;
|
||||
case dir_West: KB_KeyDown[sc_RightArrow] = KB_KeyDown[sc_kpad_6] = 0; break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
if (info->button0) CONTROL_UserInputCleared[1] = true;
|
||||
if (info->button1) CONTROL_UserInputCleared[2] = true;
|
||||
}
|
||||
*/
|
||||
void CONTROL_ClearButton(int32_t whichbutton)
|
||||
|
|
|
@ -32,7 +32,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include "baselayer.h" // for the keyboard stuff
|
||||
|
||||
#include "scancodes.h"
|
||||
|
||||
/*
|
||||
=============================================================================
|
||||
|
||||
|
@ -43,128 +44,6 @@ extern "C" {
|
|||
|
||||
typedef uint8_t kb_scancode;
|
||||
|
||||
#define sc_None 0
|
||||
#define sc_Bad 0xff
|
||||
#define sc_Comma 0x33
|
||||
#define sc_Period 0x34
|
||||
#define sc_Return 0x1c
|
||||
#define sc_Enter sc_Return
|
||||
#define sc_Escape 0x01
|
||||
#define sc_Space 0x39
|
||||
#define sc_BackSpace 0x0e
|
||||
#define sc_Tab 0x0f
|
||||
#define sc_LeftAlt 0x38
|
||||
#define sc_LeftControl 0x1d
|
||||
#define sc_CapsLock 0x3a
|
||||
#define sc_LeftShift 0x2a
|
||||
#define sc_RightShift 0x36
|
||||
#define sc_F1 0x3b
|
||||
#define sc_F2 0x3c
|
||||
#define sc_F3 0x3d
|
||||
#define sc_F4 0x3e
|
||||
#define sc_F5 0x3f
|
||||
#define sc_F6 0x40
|
||||
#define sc_F7 0x41
|
||||
#define sc_F8 0x42
|
||||
#define sc_F9 0x43
|
||||
#define sc_F10 0x44
|
||||
#define sc_F11 0x57
|
||||
#define sc_F12 0x58
|
||||
#define sc_Kpad_Star 0x37
|
||||
#define sc_Pause 0x59
|
||||
#define sc_ScrollLock 0x46
|
||||
#define sc_NumLock 0x45
|
||||
#define sc_Slash 0x35
|
||||
#define sc_SemiColon 0x27
|
||||
#define sc_Quote 0x28
|
||||
#define sc_Tilde 0x29
|
||||
#define sc_BackSlash 0x2b
|
||||
|
||||
#define sc_OpenBracket 0x1a
|
||||
#define sc_CloseBracket 0x1b
|
||||
|
||||
#define sc_1 0x02
|
||||
#define sc_2 0x03
|
||||
#define sc_3 0x04
|
||||
#define sc_4 0x05
|
||||
#define sc_5 0x06
|
||||
#define sc_6 0x07
|
||||
#define sc_7 0x08
|
||||
#define sc_8 0x09
|
||||
#define sc_9 0x0a
|
||||
#define sc_0 0x0b
|
||||
#define sc_Minus 0x0c
|
||||
#define sc_Equals 0x0d
|
||||
#define sc_Plus 0x0d
|
||||
|
||||
#define sc_kpad_1 0x4f
|
||||
#define sc_kpad_2 0x50
|
||||
#define sc_kpad_3 0x51
|
||||
#define sc_kpad_4 0x4b
|
||||
#define sc_kpad_5 0x4c
|
||||
#define sc_kpad_6 0x4d
|
||||
#define sc_kpad_7 0x47
|
||||
#define sc_kpad_8 0x48
|
||||
#define sc_kpad_9 0x49
|
||||
#define sc_kpad_0 0x52
|
||||
#define sc_kpad_Minus 0x4a
|
||||
#define sc_kpad_Plus 0x4e
|
||||
#define sc_kpad_Period 0x53
|
||||
|
||||
#define sc_A 0x1e
|
||||
#define sc_B 0x30
|
||||
#define sc_C 0x2e
|
||||
#define sc_D 0x20
|
||||
#define sc_E 0x12
|
||||
#define sc_F 0x21
|
||||
#define sc_G 0x22
|
||||
#define sc_H 0x23
|
||||
#define sc_I 0x17
|
||||
#define sc_J 0x24
|
||||
#define sc_K 0x25
|
||||
#define sc_L 0x26
|
||||
#define sc_M 0x32
|
||||
#define sc_N 0x31
|
||||
#define sc_O 0x18
|
||||
#define sc_P 0x19
|
||||
#define sc_Q 0x10
|
||||
#define sc_R 0x13
|
||||
#define sc_S 0x1f
|
||||
#define sc_T 0x14
|
||||
#define sc_U 0x16
|
||||
#define sc_V 0x2f
|
||||
#define sc_W 0x11
|
||||
#define sc_X 0x2d
|
||||
#define sc_Y 0x15
|
||||
#define sc_Z 0x2c
|
||||
|
||||
// Extended scan codes
|
||||
|
||||
#define sc_UpArrow 0xc8 //0x5a
|
||||
#define sc_DownArrow 0xd0 //0x6a
|
||||
#define sc_LeftArrow 0xcb //0x6b
|
||||
#define sc_RightArrow 0xcd //0x6c
|
||||
#define sc_Insert 0xd2 //0x5e
|
||||
#define sc_Delete 0xd3 //0x5f
|
||||
#define sc_Home 0xc7 //0x61
|
||||
#define sc_End 0xcf //0x62
|
||||
#define sc_PgUp 0xc9 //0x63
|
||||
#define sc_PgDn 0xd1 //0x64
|
||||
#define sc_RightAlt 0xb8 //0x65
|
||||
#define sc_RightControl 0x9d //0x66
|
||||
#define sc_kpad_Slash 0xb5 //0x67
|
||||
#define sc_kpad_Enter 0x9c //0x68
|
||||
#define sc_PrintScreen 0xb7 //0x69
|
||||
#define sc_LastScanCode 0x6e
|
||||
|
||||
// Ascii scan codes
|
||||
|
||||
#define asc_Enter 13
|
||||
#define asc_Escape 27
|
||||
#define asc_BackSpace 8
|
||||
#define asc_Tab 9
|
||||
#define asc_Space 32
|
||||
|
||||
#define MAXKEYBOARDSCAN 128
|
||||
|
||||
|
||||
|
|
|
@ -511,11 +511,11 @@ const tokenmap_t iter_tokens[] =
|
|||
};
|
||||
|
||||
|
||||
hashtable_t gamevarH = { MAXGAMEVARS>>1, NULL };
|
||||
hashtable_t arrayH = { MAXGAMEARRAYS>>1, NULL };
|
||||
hashtable_t labelH = { 11262>>1, NULL };
|
||||
hashtable_t stateH = { 1264>>1, NULL };
|
||||
hashtable_t keywH = { CON_END>>1, NULL };
|
||||
hashtable_t h_gamevars = { MAXGAMEVARS>>1, NULL };
|
||||
hashtable_t h_arrays = { MAXGAMEARRAYS>>1, NULL };
|
||||
hashtable_t h_labels = { 11262>>1, NULL };
|
||||
hashtable_t h_states = { 1264>>1, NULL };
|
||||
hashtable_t h_keywords = { CON_END>>1, NULL };
|
||||
hashtable_t iterH = { ITER_END, NULL };
|
||||
|
||||
hashtable_t sectorH = { SECTOR_END>>1, NULL };
|
||||
|
@ -527,16 +527,16 @@ static void C_InitHashes()
|
|||
{
|
||||
int32_t i;
|
||||
|
||||
hash_init(&gamevarH);
|
||||
hash_init(&arrayH);
|
||||
hash_init(&labelH);
|
||||
hash_init(&stateH);
|
||||
hash_init(&h_gamevars);
|
||||
hash_init(&h_arrays);
|
||||
hash_init(&h_labels);
|
||||
hash_init(&h_states);
|
||||
|
||||
hash_init(&keywH);
|
||||
hash_init(&h_keywords);
|
||||
for (i=NUMKEYWORDS-1; i>=0; i--)
|
||||
hash_add(&keywH, keyw[i], i);
|
||||
hash_add(&h_keywords, keyw[i], i);
|
||||
for (i=0; i<NUMALTKEYWORDS; i++)
|
||||
hash_add(&keywH, altkeyw[i].token, altkeyw[i].val);
|
||||
hash_add(&h_keywords, altkeyw[i].token, altkeyw[i].val);
|
||||
|
||||
hash_init(§orH);
|
||||
for (i=0; SectorLabels[i].lId >=0; i++)
|
||||
|
@ -759,7 +759,7 @@ static int32_t C_GetKeyword(void)
|
|||
while (isaltok(*temptextptr))
|
||||
tempbuf[i++] = *(temptextptr++);
|
||||
tempbuf[i] = 0;
|
||||
return hash_find(&keywH, tempbuf);
|
||||
return hash_find(&h_keywords, tempbuf);
|
||||
}
|
||||
|
||||
static int32_t C_GetNextKeyword(void) //Returns its code #
|
||||
|
@ -789,7 +789,7 @@ static int32_t C_GetNextKeyword(void) //Returns its code #
|
|||
}
|
||||
tempbuf[l] = 0;
|
||||
|
||||
i = hash_find(&keywH, tempbuf);
|
||||
i = hash_find(&h_keywords, tempbuf);
|
||||
if (i>=0)
|
||||
{
|
||||
if (i == CON_LEFTBRACE || i == CON_RIGHTBRACE || i == CON_NULLOP)
|
||||
|
@ -821,8 +821,8 @@ static int32_t C_GetNextKeyword(void) //Returns its code #
|
|||
return -1;
|
||||
}
|
||||
|
||||
#define GetGamevarID(szGameLabel) hash_find(&gamevarH, szGameLabel)
|
||||
#define GetGamearrayID(szGameLabel) hash_find(&arrayH, szGameLabel)
|
||||
#define GetGamevarID(szGameLabel) hash_find(&h_gamevars, szGameLabel)
|
||||
#define GetGamearrayID(szGameLabel) hash_find(&h_arrays, szGameLabel)
|
||||
|
||||
static void C_GetNextVarType(int32_t type)
|
||||
{
|
||||
|
@ -932,7 +932,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
}
|
||||
|
||||
C_GetNextLabelName();
|
||||
if (hash_find(&keywH, tlabel)>=0)
|
||||
if (hash_find(&h_keywords, tlabel)>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
|
@ -1053,7 +1053,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
if (!type && !cs.labelsOnly)
|
||||
{
|
||||
//try looking for a define instead
|
||||
id = hash_find(&labelH, tlabel);
|
||||
id = hash_find(&h_labels, tlabel);
|
||||
if (id>=0 && labeltype[id]==LABEL_DEFINE)
|
||||
{
|
||||
// if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
|
||||
|
@ -1135,14 +1135,14 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
}
|
||||
tempbuf[l] = 0;
|
||||
|
||||
if (hash_find(&keywH, tempbuf)>=0)
|
||||
if (hash_find(&h_keywords, tempbuf)>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
textptr+=l;
|
||||
}
|
||||
|
||||
i = hash_find(&labelH, tempbuf);
|
||||
i = hash_find(&h_labels, tempbuf);
|
||||
if (i >= 0)
|
||||
{
|
||||
char *el,*gl;
|
||||
|
@ -1365,7 +1365,7 @@ static int32_t C_ParseCommand(void)
|
|||
{
|
||||
C_GetNextLabelName();
|
||||
|
||||
if (hash_find(&keywH, tlabel) >= 0)
|
||||
if (hash_find(&h_keywords, tlabel) >= 0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
|
@ -1373,14 +1373,14 @@ static int32_t C_ParseCommand(void)
|
|||
}
|
||||
|
||||
// Check to see it's already defined
|
||||
i = hash_find(&gamevarH, tlabel);
|
||||
i = hash_find(&h_gamevars, tlabel);
|
||||
if (i>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
if (hash_find(&stateH, tlabel) >= 0)
|
||||
if (hash_find(&h_states, tlabel) >= 0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_LABELINUSE);
|
||||
|
@ -1389,13 +1389,13 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
C_GetNextValue(LABEL_DEFINE);
|
||||
|
||||
i = hash_find(&labelH, tlabel);
|
||||
i = hash_find(&h_labels, tlabel);
|
||||
if (i == -1)
|
||||
{
|
||||
// printf("Defining Definition '%s' to be '%d'\n",label+(g_numLabels*MAXLABELLEN),*(g_scriptPtr-1));
|
||||
// Bmemcpy(label+(g_numLabels*MAXLABELLEN), tlabel, MAXLABELLEN);
|
||||
C_CopyLabel();
|
||||
hash_add(&labelH, label+(g_numLabels*MAXLABELLEN), g_numLabels);
|
||||
hash_add(&h_labels, label+(g_numLabels*MAXLABELLEN), g_numLabels);
|
||||
labeltype[g_numLabels] = LABEL_DEFINE;
|
||||
labelval[g_numLabels++] = *(g_scriptPtr-1);
|
||||
}
|
||||
|
@ -1491,20 +1491,20 @@ static int32_t C_ParseCommand(void)
|
|||
{
|
||||
C_GetNextLabelName();
|
||||
|
||||
if (hash_find(&keywH, tlabel)>=0)
|
||||
if (hash_find(&h_keywords, tlabel)>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (hash_find(&gamevarH, tlabel)>=0)
|
||||
if (hash_find(&h_gamevars, tlabel)>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
j = hash_find(&labelH, tlabel);
|
||||
j = hash_find(&h_labels, tlabel);
|
||||
if (j>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
|
@ -1512,7 +1512,7 @@ static int32_t C_ParseCommand(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
j = hash_find(&stateH, tlabel);
|
||||
j = hash_find(&h_states, tlabel);
|
||||
if (j>=0) // only redefining
|
||||
{
|
||||
cs.currentStateIdx = j;
|
||||
|
@ -1539,7 +1539,7 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
Bmemcpy(statesinfo[j].name, tlabel, MAXLABELLEN);
|
||||
Bsprintf(g_szCurrentBlockName, "%s", tlabel);
|
||||
hash_add(&stateH, tlabel, j);
|
||||
hash_add(&h_states, tlabel, j);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1698,19 +1698,19 @@ static int32_t C_ParseCommand(void)
|
|||
case CON_STATE:
|
||||
C_GetNextLabelName();
|
||||
|
||||
if (hash_find(&keywH, tlabel)>=0)
|
||||
if (hash_find(&h_keywords, tlabel)>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 1;
|
||||
}
|
||||
if (hash_find(&gamevarH, tlabel)>=0)
|
||||
if (hash_find(&h_gamevars, tlabel)>=0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
}
|
||||
|
||||
j = hash_find(&stateH, tlabel);
|
||||
j = hash_find(&h_states, tlabel);
|
||||
if (j>=0)
|
||||
{
|
||||
// if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
|
||||
|
@ -2279,7 +2279,7 @@ repeatcase:
|
|||
//printf("Got Label '%.20s'\n",textptr);
|
||||
// Check to see it's already defined
|
||||
|
||||
if (hash_find(&keywH, tlabel)>=0)
|
||||
if (hash_find(&h_keywords, tlabel)>=0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
|
@ -2320,14 +2320,14 @@ repeatcase:
|
|||
C_GetNextLabelName();
|
||||
//printf("Got Label '%.20s'\n",textptr);
|
||||
// Check to see it's already defined
|
||||
if (hash_find(&keywH, tlabel) >= 0)
|
||||
if (hash_find(&h_keywords, tlabel) >= 0)
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_ISAKEYWORD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hash_find(&gamevarH, tlabel) >= 0)
|
||||
if (hash_find(&h_gamevars, tlabel) >= 0)
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
C_ReportError(WARNING_NAMEMATCHESVAR);
|
||||
|
@ -3124,7 +3124,7 @@ repeatcase:
|
|||
static void C_AddDefinition(const char *lLabel,int32_t lValue, uint8_t lType)
|
||||
{
|
||||
Bstrcpy(label+(g_numLabels*MAXLABELLEN), lLabel);
|
||||
hash_add(&labelH, label+(g_numLabels*MAXLABELLEN), g_numLabels);
|
||||
hash_add(&h_labels, label+(g_numLabels*MAXLABELLEN), g_numLabels);
|
||||
labeltype[g_numLabels] = lType;
|
||||
labelval[g_numLabels++] = lValue;
|
||||
g_numDefaultLabels++;
|
||||
|
|
|
@ -52,7 +52,7 @@ uint8_t aEventEnabled[MAXEVENTS];
|
|||
uint32_t m32_drawlinepat=0xffffffff;
|
||||
|
||||
instype *insptr;
|
||||
int32_t X_DoExecute(int32_t once);
|
||||
int32_t VM_Execute(int32_t once);
|
||||
static instype *x_sortingstateptr;
|
||||
|
||||
#include "m32structures.c"
|
||||
|
@ -107,7 +107,7 @@ void X_Disasm(ofstype beg, int32_t size)
|
|||
initprintf("\n");
|
||||
}
|
||||
|
||||
void X_ScriptInfo(void)
|
||||
void VM_ScriptInfo(void)
|
||||
{
|
||||
if (script)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ void X_ScriptInfo(void)
|
|||
}
|
||||
}
|
||||
|
||||
void X_OnEvent(register int32_t iEventID, register int32_t iActor)
|
||||
void VM_OnEvent(register int32_t iEventID, register int32_t iActor)
|
||||
{
|
||||
if (iEventID < 0 || iEventID >= MAXEVENTS)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ void X_OnEvent(register int32_t iEventID, register int32_t iActor)
|
|||
vm.flags = 0;
|
||||
|
||||
insptr = script + aEventOffsets[iEventID];
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
|
||||
if (vm.flags&VMFLAG_ERROR)
|
||||
{
|
||||
|
@ -197,13 +197,13 @@ static int32_t G_GetAngleDelta(int32_t a,int32_t na)
|
|||
return (na-a);
|
||||
}
|
||||
|
||||
static inline void __fastcall X_DoConditional(register int32_t condition)
|
||||
static inline void __fastcall VM_DoConditional(register int32_t condition)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
// skip 'else' pointer.. and...
|
||||
insptr+=2;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ static inline void __fastcall X_DoConditional(register int32_t condition)
|
|||
// else...
|
||||
// skip 'else' and...
|
||||
insptr+=2;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ static int32_t X_DoSort(const int32_t *lv, const int32_t *rv)
|
|||
m32_sortvar1 = *lv;
|
||||
m32_sortvar2 = *rv;
|
||||
insptr = x_sortingstateptr;
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
return g_iReturnVar;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ static int32_t X_DoSort(const int32_t *lv, const int32_t *rv)
|
|||
continue; \
|
||||
} \
|
||||
|
||||
int32_t X_DoExecute(int32_t once)
|
||||
int32_t VM_Execute(int32_t once)
|
||||
{
|
||||
register int32_t tw = *insptr;
|
||||
|
||||
|
@ -314,7 +314,7 @@ skip_check:
|
|||
|
||||
insptr = script + statesinfo[stateidx].ofs;
|
||||
vm.g_st = 1+MAXEVENTS+stateidx;
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
vm.g_st = o_g_st;
|
||||
vm.flags &= ~VMFLAG_RETURN;
|
||||
vm.flags |= oret;
|
||||
|
@ -378,7 +378,7 @@ skip_check:
|
|||
// fake a 2-d Array
|
||||
insptr = lCodeInsPtr + lpCases[lCheckCase*2+1];
|
||||
//Bsprintf(g_szBuf,"insptr=%d. ", (int32_t)insptr); AddLog(g_szBuf);
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
//AddLog("Done Executing Case");
|
||||
bMatched=1;
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ skip_check:
|
|||
{
|
||||
//AddLog("No Matching Case: Using Default");
|
||||
insptr = lCodeInsPtr + *lpDefault;
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
|
@ -431,7 +431,7 @@ skip_check:
|
|||
return 1;
|
||||
case CON_LEFTBRACE:
|
||||
insptr++;
|
||||
X_DoExecute(0);
|
||||
VM_Execute(0);
|
||||
continue;
|
||||
|
||||
// *** more basic commands
|
||||
|
@ -443,7 +443,7 @@ skip_check:
|
|||
// <varid> <xxxid> <varid>
|
||||
int32_t lVar1=*insptr++, lLabelID=*insptr++, lVar2=*insptr++;
|
||||
|
||||
X_AccessSector((tw==CON_SETSECTOR)|2, lVar1, lLabelID, lVar2);
|
||||
VM_AccessSector((tw==CON_SETSECTOR)|2, lVar1, lLabelID, lVar2);
|
||||
continue;
|
||||
}
|
||||
case CON_SETWALL:
|
||||
|
@ -453,7 +453,7 @@ skip_check:
|
|||
// syntax [gs]etwall[<var>].x <VAR>
|
||||
// <varid> <xxxid> <varid>
|
||||
int32_t lVar1=*insptr++, lLabelID=*insptr++, lVar2=*insptr++;
|
||||
X_AccessWall((tw==CON_SETWALL)|2, lVar1, lLabelID, lVar2);
|
||||
VM_AccessWall((tw==CON_SETWALL)|2, lVar1, lLabelID, lVar2);
|
||||
continue;
|
||||
}
|
||||
case CON_SETSPRITE:
|
||||
|
@ -463,7 +463,7 @@ skip_check:
|
|||
// syntax [gs]etsprite[<var>].x <VAR>
|
||||
// <varid> <xxxid> <varid>
|
||||
int32_t lVar1=*insptr++, lLabelID=*insptr++, lVar2=*insptr++;
|
||||
X_AccessSprite((tw==CON_SETSPRITE)|2, lVar1, lLabelID, lVar2);
|
||||
VM_AccessSprite((tw==CON_SETSPRITE)|2, lVar1, lLabelID, lVar2);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ skip_check:
|
|||
// syntax [gs]ettspr[<var>].x <VAR>
|
||||
// <varid> <xxxid> <varid>
|
||||
int32_t lVar1=*insptr++, lLabelID=*insptr++, lVar2=*insptr++;
|
||||
X_AccessTsprite((tw==CON_SETTSPR)|2|4, lVar1, lLabelID, lVar2);
|
||||
VM_AccessTsprite((tw==CON_SETTSPR)|2|4, lVar1, lLabelID, lVar2);
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
|
@ -484,7 +484,7 @@ skip_check:
|
|||
// syntax [gs]etsprite[<var>].x <VAR>
|
||||
// <varid> <xxxid> <varid>
|
||||
int32_t lVar1=*insptr++, lLabelID=*insptr++, lVar2=*insptr++;
|
||||
X_SetSprite(lVar1, lLabelID, lVar2);
|
||||
VM_SetSprite(lVar1, lLabelID, lVar2);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -494,7 +494,7 @@ skip_check:
|
|||
// syntax [gs]etsprite[<var>].x <VAR>
|
||||
// <varid> <xxxid> <varid>
|
||||
int32_t lVar1=*insptr++, lLabelID=*insptr++, lVar2=*insptr++;
|
||||
X_GetSprite(lVar1, lLabelID, lVar2);
|
||||
VM_GetSprite(lVar1, lLabelID, lVar2);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
@ -918,7 +918,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j &= Gv_GetVarX(*insptr++);
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -928,7 +928,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j |= Gv_GetVarX(*insptr++);
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -938,7 +938,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j ^= Gv_GetVarX(*insptr++);
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -948,7 +948,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
int32_t l = Gv_GetVarX(*insptr++);
|
||||
insptr--;
|
||||
X_DoConditional(j || l);
|
||||
VM_DoConditional(j || l);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -958,7 +958,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
int32_t l = Gv_GetVarX(*insptr++);
|
||||
insptr--;
|
||||
X_DoConditional(j && l);
|
||||
VM_DoConditional(j && l);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -968,7 +968,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j = (j != Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -978,7 +978,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j = (j == Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -988,7 +988,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j = (j > Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -998,7 +998,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j = (j >= Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1008,7 +1008,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j = (j < Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ skip_check:
|
|||
int32_t j = Gv_GetVarX(*insptr++);
|
||||
j = (j <= Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ skip_check:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j == *insptr);
|
||||
VM_DoConditional(j == *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ skip_check:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j != *insptr);
|
||||
VM_DoConditional(j != *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1046,7 +1046,7 @@ skip_check:
|
|||
{
|
||||
insptr=savedinsptr;
|
||||
j = (Gv_GetVarX(*(insptr-1)) != *insptr);
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
while (j && !vm.flags);
|
||||
vm.flags &= ~VMFLAG_BREAK;
|
||||
|
@ -1061,7 +1061,7 @@ skip_check:
|
|||
{
|
||||
insptr=savedinsptr;
|
||||
j = (Gv_GetVarX(*(insptr-1)) < *insptr);
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
while (j && !vm.flags);
|
||||
vm.flags &= ~VMFLAG_BREAK;
|
||||
|
@ -1078,7 +1078,7 @@ skip_check:
|
|||
j = Gv_GetVarX(*(insptr-1));
|
||||
j = (j != Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
while (j && !vm.flags);
|
||||
vm.flags &= ~VMFLAG_BREAK;
|
||||
|
@ -1095,7 +1095,7 @@ skip_check:
|
|||
j = Gv_GetVarX(*(insptr-1));
|
||||
j = (j < Gv_GetVarX(*insptr++));
|
||||
insptr--;
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
while (j && !vm.flags);
|
||||
vm.flags &= ~VMFLAG_BREAK;
|
||||
|
@ -1155,7 +1155,7 @@ skip_check:
|
|||
vm.g_i = jj;
|
||||
vm.g_sp = &sprite[jj];
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_ALLSECTORS:
|
||||
|
@ -1163,7 +1163,7 @@ skip_check:
|
|||
{
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_ALLWALLS:
|
||||
|
@ -1171,7 +1171,7 @@ skip_check:
|
|||
{
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_SELSPRITES:
|
||||
|
@ -1185,7 +1185,7 @@ skip_check:
|
|||
vm.g_i = jj;
|
||||
vm.g_sp = &sprite[jj];
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1195,7 +1195,7 @@ skip_check:
|
|||
jj=highlightsector[ii];
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_SELWALLS:
|
||||
|
@ -1206,7 +1206,7 @@ skip_check:
|
|||
continue;
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_DRAWNSPRITES:
|
||||
|
@ -1215,7 +1215,7 @@ skip_check:
|
|||
vm.g_sp = &tsprite[ii];
|
||||
Gv_SetVarX(var, ii);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_SPRITESOFSECTOR:
|
||||
|
@ -1227,7 +1227,7 @@ skip_check:
|
|||
vm.g_i = jj;
|
||||
vm.g_sp = &sprite[jj];
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_WALLSOFSECTOR:
|
||||
|
@ -1238,7 +1238,7 @@ skip_check:
|
|||
{
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
case ITER_LOOPOFWALL:
|
||||
|
@ -1249,7 +1249,7 @@ skip_check:
|
|||
{
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
jj = wall[jj].point2;
|
||||
}
|
||||
while (jj != parm2 && !vm.flags);
|
||||
|
@ -1259,7 +1259,7 @@ skip_check:
|
|||
{
|
||||
Gv_SetVarX(var, jj);
|
||||
insptr = beg;
|
||||
X_DoExecute(1);
|
||||
VM_Execute(1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -1283,7 +1283,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j & *insptr);
|
||||
VM_DoConditional(j & *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j | *insptr);
|
||||
VM_DoConditional(j | *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j ^ *insptr);
|
||||
VM_DoConditional(j ^ *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1307,7 +1307,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j || *insptr);
|
||||
VM_DoConditional(j || *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j && *insptr);
|
||||
VM_DoConditional(j && *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j > *insptr);
|
||||
VM_DoConditional(j > *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1331,7 +1331,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j >= *insptr);
|
||||
VM_DoConditional(j >= *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1339,7 +1339,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j < *insptr);
|
||||
VM_DoConditional(j < *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1347,12 +1347,12 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
int32_t j=Gv_GetVarX(*insptr++);
|
||||
X_DoConditional(j <= *insptr);
|
||||
VM_DoConditional(j <= *insptr);
|
||||
}
|
||||
continue;
|
||||
|
||||
case CON_IFRND:
|
||||
X_DoConditional(rnd(Gv_GetVarX(*(++insptr))));
|
||||
VM_DoConditional(rnd(Gv_GetVarX(*(++insptr))));
|
||||
continue;
|
||||
|
||||
case CON_IFHITKEY:
|
||||
|
@ -1369,7 +1369,7 @@ badindex:
|
|||
}
|
||||
|
||||
if (tw != CON_RESETKEY)
|
||||
X_DoConditional(keystatus[key]);
|
||||
VM_DoConditional(keystatus[key]);
|
||||
else
|
||||
insptr++;
|
||||
|
||||
|
@ -1384,22 +1384,22 @@ badindex:
|
|||
continue;
|
||||
|
||||
case CON_IFEITHERALT:
|
||||
X_DoConditional(keystatus[KEYSC_LALT]||keystatus[KEYSC_RALT]);
|
||||
VM_DoConditional(keystatus[KEYSC_LALT]||keystatus[KEYSC_RALT]);
|
||||
continue;
|
||||
|
||||
case CON_IFEITHERCTRL:
|
||||
X_DoConditional(keystatus[KEYSC_LCTRL]||keystatus[KEYSC_RCTRL]);
|
||||
VM_DoConditional(keystatus[KEYSC_LCTRL]||keystatus[KEYSC_RCTRL]);
|
||||
continue;
|
||||
|
||||
case CON_IFEITHERSHIFT:
|
||||
X_DoConditional(keystatus[KEYSC_LSHIFT]||keystatus[KEYSC_RSHIFT]);
|
||||
VM_DoConditional(keystatus[KEYSC_LSHIFT]||keystatus[KEYSC_RSHIFT]);
|
||||
continue;
|
||||
|
||||
// vvv CURSPR
|
||||
case CON_IFSPRITEPAL:
|
||||
insptr++;
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(vm.g_sp->pal == Gv_GetVarX(*insptr));
|
||||
VM_DoConditional(vm.g_sp->pal == Gv_GetVarX(*insptr));
|
||||
continue;
|
||||
|
||||
case CON_IFANGDIFFL:
|
||||
|
@ -1408,7 +1408,7 @@ badindex:
|
|||
int32_t j;
|
||||
X_ERROR_INVALIDSP();
|
||||
j = klabs(G_GetAngleDelta(ang, vm.g_sp->ang));
|
||||
X_DoConditional(j <= Gv_GetVarX(*insptr));
|
||||
VM_DoConditional(j <= Gv_GetVarX(*insptr));
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1434,7 +1434,7 @@ badindex:
|
|||
}
|
||||
}
|
||||
}
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1445,24 +1445,24 @@ badindex:
|
|||
X_ERROR_INVALIDSP();
|
||||
j = cansee(vm.g_sp->x,vm.g_sp->y,vm.g_sp->z/*-((krand()&41)<<8)*/,vm.g_sp->sectnum,
|
||||
pos.x, pos.y, pos.z /*-((krand()&41)<<8)*/, cursectnum);
|
||||
X_DoConditional(j);
|
||||
VM_DoConditional(j);
|
||||
}
|
||||
continue;
|
||||
|
||||
case CON_IFONWATER:
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(sector[vm.g_sp->sectnum].lotag == 1 && klabs(vm.g_sp->z-sector[vm.g_sp->sectnum].floorz) < (32<<8));
|
||||
VM_DoConditional(sector[vm.g_sp->sectnum].lotag == 1 && klabs(vm.g_sp->z-sector[vm.g_sp->sectnum].floorz) < (32<<8));
|
||||
continue;
|
||||
|
||||
case CON_IFINWATER:
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(sector[vm.g_sp->sectnum].lotag == 2);
|
||||
VM_DoConditional(sector[vm.g_sp->sectnum].lotag == 2);
|
||||
continue;
|
||||
|
||||
case CON_IFACTOR:
|
||||
insptr++;
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(vm.g_sp->picnum == Gv_GetVarX(*insptr));
|
||||
VM_DoConditional(vm.g_sp->picnum == Gv_GetVarX(*insptr));
|
||||
continue;
|
||||
|
||||
case CON_IFINSIDE:
|
||||
|
@ -1479,20 +1479,20 @@ badindex:
|
|||
continue;
|
||||
}
|
||||
insptr--;
|
||||
X_DoConditional(res);
|
||||
VM_DoConditional(res);
|
||||
}
|
||||
continue;
|
||||
|
||||
case CON_IFOUTSIDE:
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(sector[vm.g_sp->sectnum].ceilingstat&1);
|
||||
VM_DoConditional(sector[vm.g_sp->sectnum].ceilingstat&1);
|
||||
continue;
|
||||
|
||||
case CON_IFPDISTL:
|
||||
insptr++;
|
||||
{
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(dist((spritetype *)&pos, vm.g_sp) < Gv_GetVarX(*insptr));
|
||||
VM_DoConditional(dist((spritetype *)&pos, vm.g_sp) < Gv_GetVarX(*insptr));
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -1500,7 +1500,7 @@ badindex:
|
|||
insptr++;
|
||||
{
|
||||
X_ERROR_INVALIDSP();
|
||||
X_DoConditional(dist((spritetype *)&pos, vm.g_sp) > Gv_GetVarX(*insptr));
|
||||
VM_DoConditional(dist((spritetype *)&pos, vm.g_sp) > Gv_GetVarX(*insptr));
|
||||
}
|
||||
continue;
|
||||
// ^^^
|
||||
|
@ -2582,7 +2582,7 @@ dodefault:
|
|||
insptr++;
|
||||
continue;
|
||||
}
|
||||
X_DoConditional(S_CheckSoundPlaying(vm.g_i,j));
|
||||
VM_DoConditional(S_CheckSoundPlaying(vm.g_i,j));
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -2593,7 +2593,7 @@ dodefault:
|
|||
if (g_sounds[j].SoundOwner[0].i == vm.g_i)
|
||||
break;
|
||||
|
||||
X_DoConditional(j < 0);
|
||||
VM_DoConditional(j < 0);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -2654,7 +2654,7 @@ dodefault:
|
|||
continue;
|
||||
|
||||
default:
|
||||
X_ScriptInfo();
|
||||
VM_ScriptInfo();
|
||||
|
||||
OSD_Printf("\nAn error has occurred in the Mapster32 virtual machine.\n\n"
|
||||
"Please e-mail the file mapster32.log along with every M32 file\n"
|
||||
|
|
|
@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define ACCESS_SPRITEEXT 4
|
||||
|
||||
|
||||
static int32_t __fastcall X_AccessWall(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static int32_t __fastcall VM_AccessWall(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue;
|
||||
int32_t i = (how&ACCESS_USEVARS) ? Gv_GetVarX(lVar1) : lVar1;
|
||||
|
@ -128,7 +128,7 @@ readonly:
|
|||
}
|
||||
|
||||
// how: bitfield: 1=set? 2=vars?
|
||||
static int32_t __fastcall X_AccessSector(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static int32_t __fastcall VM_AccessSector(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue;
|
||||
int32_t i = (how&ACCESS_USEVARS) ? sprite[vm.g_i].sectnum : lVar1;
|
||||
|
@ -245,7 +245,7 @@ readonly:
|
|||
}
|
||||
|
||||
// how: bitfield: 1=set? 2=vars?
|
||||
static int32_t __fastcall X_AccessSprite(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static int32_t __fastcall VM_AccessSprite(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue;
|
||||
register int32_t i = (how&ACCESS_USEVARS) ? vm.g_i : lVar1;
|
||||
|
@ -357,7 +357,7 @@ readonly:
|
|||
}
|
||||
|
||||
// how: bitfield: 1=set? 2=vars? 4=use spriteext[].tspr? (otherwise use tsprite[])
|
||||
static int32_t __fastcall X_AccessTsprite(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
static int32_t __fastcall VM_AccessTsprite(int32_t how, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||
{
|
||||
int32_t lValue;
|
||||
int32_t i = (how&ACCESS_USEVARS) ? vm.g_i : lVar1;
|
||||
|
|
|
@ -63,8 +63,8 @@ static void Gv_Clear(void)
|
|||
aGameArrays[i].dwFlags |= GAMEARRAY_RESET;
|
||||
}
|
||||
g_gameVarCount = g_gameArrayCount = 0;
|
||||
hash_init(&gamevarH);
|
||||
hash_init(&arrayH);
|
||||
hash_init(&h_gamevars);
|
||||
hash_init(&h_arrays);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ int32_t Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32
|
|||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&arrayH, pszLabel);
|
||||
i = hash_find(&h_arrays, pszLabel);
|
||||
if (i>=0 && !(aGameArrays[i].dwFlags & GAMEARRAY_RESET))
|
||||
{
|
||||
// found it it's a duplicate in error
|
||||
|
@ -127,7 +127,7 @@ int32_t Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32
|
|||
aGameArrays[i].dwFlags = dwFlags & ~GAMEARRAY_RESET;
|
||||
|
||||
g_gameArrayCount++;
|
||||
hash_replace(&arrayH, aGameArrays[i].szLabel, i);
|
||||
hash_replace(&h_arrays, aGameArrays[i].szLabel, i);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
i = hash_find(&gamevarH,pszLabel);
|
||||
i = hash_find(&h_gamevars,pszLabel);
|
||||
|
||||
if (i >= 0 && !(aGameVars[i].dwFlags & GAMEVAR_RESET))
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
if (i == g_gameVarCount)
|
||||
{
|
||||
// we're adding a new one.
|
||||
hash_add(&gamevarH, aGameVars[i].szLabel, g_gameVarCount++);
|
||||
hash_add(&h_gamevars, aGameVars[i].szLabel, g_gameVarCount++);
|
||||
}
|
||||
|
||||
if (aGameVars[i].dwFlags & GAMEVAR_PERBLOCK)
|
||||
|
@ -329,14 +329,14 @@ int32_t __fastcall Gv_GetVarX(register int32_t id)
|
|||
switch (id&3)
|
||||
{
|
||||
case 0: //if (id == g_iSpriteVarID)
|
||||
return ((X_AccessSprite(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessSprite(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
case 1: //else if (id == g_iSectorVarID)
|
||||
// if (index == vm.g_i) index = sprite[vm.g_i].sectnum;
|
||||
return ((X_AccessSector(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessSector(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
case 2: //else if (id == g_iWallVarID)
|
||||
return ((X_AccessWall(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessWall(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
case 3:
|
||||
return ((X_AccessTsprite(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
return ((VM_AccessTsprite(0, index, memberid, 0) ^ -negateResult) + negateResult);
|
||||
// default:
|
||||
// OSD_Printf(CON_ERROR "Gv_GetVarX() (special): WTF??\n",g_errorLineNum,keyw[g_tw]);
|
||||
// return -1;
|
||||
|
@ -433,17 +433,17 @@ void __fastcall Gv_SetVarX(register int32_t id, register int32_t lValue)
|
|||
switch (id&3)
|
||||
{
|
||||
case 0: //if (id == g_iSpriteVarID)
|
||||
X_AccessSprite(1, index, memberid, lValue);
|
||||
VM_AccessSprite(1, index, memberid, lValue);
|
||||
return;
|
||||
case 1: //else if (id == g_iSectorVarID)
|
||||
// if (index == vm.g_i) index = sprite[vm.g_i].sectnum;
|
||||
X_AccessSector(1, index, memberid, lValue);
|
||||
VM_AccessSector(1, index, memberid, lValue);
|
||||
return;
|
||||
case 2: //else if (id == g_iWallVarID)
|
||||
X_AccessWall(1, index, memberid, lValue);
|
||||
VM_AccessWall(1, index, memberid, lValue);
|
||||
return;
|
||||
case 3:
|
||||
X_AccessTsprite(1, index, memberid, lValue);
|
||||
VM_AccessTsprite(1, index, memberid, lValue);
|
||||
return;
|
||||
// default:
|
||||
// OSD_Printf(CON_ERROR "Gv_SetVarX(): WTF??\n",g_errorLineNum,keyw[g_tw]);
|
||||
|
|
|
@ -171,13 +171,13 @@
|
|||
#define SHT sprite[i].hitag
|
||||
#define SECT sprite[i].sectnum
|
||||
|
||||
#define T1 ActorExtra[i].temp_data[0]
|
||||
#define T2 ActorExtra[i].temp_data[1]
|
||||
#define T3 ActorExtra[i].temp_data[2]
|
||||
#define T4 ActorExtra[i].temp_data[3]
|
||||
#define T5 ActorExtra[i].temp_data[4]
|
||||
#define T6 ActorExtra[i].temp_data[5]
|
||||
#define T7 ActorExtra[i].temp_data[6]
|
||||
#define T8 ActorExtra[i].temp_data[7]
|
||||
#define T9 ActorExtra[i].temp_data[8]
|
||||
#define T1 actor[i].t_data[0]
|
||||
#define T2 actor[i].t_data[1]
|
||||
#define T3 actor[i].t_data[2]
|
||||
#define T4 actor[i].t_data[3]
|
||||
#define T5 actor[i].t_data[4]
|
||||
#define T6 actor[i].t_data[5]
|
||||
#define T7 actor[i].t_data[6]
|
||||
#define T8 actor[i].t_data[7]
|
||||
#define T9 actor[i].t_data[8]
|
||||
|
||||
|
|
|
@ -562,7 +562,7 @@ void M_DisplayMenus(void)
|
|||
return;
|
||||
}
|
||||
if (apScriptGameEvent[EVENT_DISPLAYMENU])
|
||||
X_OnEvent(EVENT_DISPLAYMENU, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
VM_OnEvent(EVENT_DISPLAYMENU, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
|
||||
g_player[myconnectindex].ps->gm &= (0xff-MODE_TYPE);
|
||||
g_player[myconnectindex].ps->fta = 0;
|
||||
|
@ -837,11 +837,11 @@ void M_DisplayMenus(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
// because stripcolorcodes needs a valid target and tempbuf is used in G_EnterText()
|
||||
// because OSD_StripColors needs a valid target and tempbuf is used in G_EnterText()
|
||||
char dummybuf[64];
|
||||
x = G_EnterText(d-50,37,buf,30,0);
|
||||
|
||||
while (Bstrlen(stripcolorcodes(dummybuf,buf)) > 10)
|
||||
while (Bstrlen(OSD_StripColors(dummybuf,buf)) > 10)
|
||||
{
|
||||
buf[Bstrlen(buf)-1] = '\0';
|
||||
inputloc--;
|
||||
|
@ -2962,7 +2962,7 @@ cheat_for_port_credits:
|
|||
int32_t osdmode = OSD_GetTextMode();
|
||||
if (x==io) osdmode = !osdmode;
|
||||
modval(0,1,(int32_t *)&osdmode,1,probey==io);
|
||||
mgametextpal(d,yy, osdmode? "Plain" : "Sprites", MENUHIGHLIGHT(io), 0);
|
||||
mgametextpal(d,yy, osdmode? "Monochrome" : "Sprites", MENUHIGHLIGHT(io), 0);
|
||||
if (OSD_GetTextMode() != osdmode)
|
||||
OSD_SetTextMode(osdmode);
|
||||
break;
|
||||
|
@ -5370,7 +5370,7 @@ VOLUME_ALL_40x:
|
|||
break;
|
||||
}
|
||||
if (apScriptGameEvent[EVENT_DISPLAYMENUREST])
|
||||
X_OnEvent(EVENT_DISPLAYMENUREST, g_player[myconnectindex].ps->i, myconnectindex, -1);
|
||||
VM_OnEvent(EVENT_DISPLAYMENUREST, g_player[myconnectindex].ps->i, myconnectindex, -1);
|
||||
|
||||
if ((g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ struct dynitem
|
|||
const int16_t vstat;
|
||||
int16_t val;
|
||||
};
|
||||
hashtable_t dynnamesH = {512, NULL};
|
||||
hashtable_t h_names = {512, NULL};
|
||||
|
||||
struct dynitem list[]=
|
||||
{
|
||||
|
@ -1525,21 +1525,21 @@ void G_ProcessDynamicTileMapping(const char *szLabel, int32_t lValue)
|
|||
if (lValue >= MAXTILES || !szLabel)
|
||||
return;
|
||||
|
||||
i = hash_find(&dynnamesH,szLabel);
|
||||
i = hash_find(&h_names,szLabel);
|
||||
if (i>=0) *(list[i].v)=lValue;
|
||||
}
|
||||
|
||||
void inithashnames()
|
||||
{
|
||||
int32_t i;
|
||||
hash_init(&dynnamesH);
|
||||
hash_init(&h_names);
|
||||
for (i=0; list[i].val; i++)
|
||||
hash_add(&dynnamesH,list[i].s,i);
|
||||
hash_add(&h_names,list[i].s,i);
|
||||
}
|
||||
|
||||
void freehashnames()
|
||||
{
|
||||
hash_free(&dynnamesH);
|
||||
hash_free(&h_names);
|
||||
}
|
||||
|
||||
void G_InitDynamicTiles(void)
|
||||
|
@ -1549,6 +1549,7 @@ void G_InitDynamicTiles(void)
|
|||
while (list[i].val)
|
||||
{
|
||||
DynamicTileMap[list[i].val]=list[i].vstat;
|
||||
*(list[i].v) = list[i].vstat;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -556,12 +556,12 @@ static int32_t osdcmd_setvar(const osdfuncparm_t *parm)
|
|||
|
||||
strcpy(varname,parm->parms[1]);
|
||||
varval = Batol(varname);
|
||||
i = hash_find(&gamevarH,varname);
|
||||
i = hash_find(&h_gamevars,varname);
|
||||
if (i >= 0)
|
||||
varval=Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex);
|
||||
|
||||
strcpy(varname,parm->parms[0]);
|
||||
i = hash_find(&gamevarH,varname);
|
||||
i = hash_find(&h_gamevars,varname);
|
||||
if (i >= 0)
|
||||
Gv_SetVar(i, varval, g_player[myconnectindex].ps->i, myconnectindex);
|
||||
return OSDCMD_OK;
|
||||
|
@ -581,7 +581,7 @@ static int32_t osdcmd_addlogvar(const osdfuncparm_t *parm)
|
|||
}
|
||||
|
||||
strcpy(varname,parm->parms[0]);
|
||||
i = hash_find(&gamevarH,varname);
|
||||
i = hash_find(&h_gamevars,varname);
|
||||
if (i >= 0)
|
||||
OSD_Printf("%s = %d\n", varname, Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex));
|
||||
return OSDCMD_OK;
|
||||
|
@ -610,12 +610,12 @@ static int32_t osdcmd_setactorvar(const osdfuncparm_t *parm)
|
|||
varval = Batol(parm->parms[2]);
|
||||
strcpy(varname,parm->parms[2]);
|
||||
varval = Batol(varname);
|
||||
i = hash_find(&gamevarH,varname);
|
||||
i = hash_find(&h_gamevars,varname);
|
||||
if (i >= 0)
|
||||
varval=Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex);
|
||||
|
||||
strcpy(varname,parm->parms[1]);
|
||||
i = hash_find(&gamevarH,varname);
|
||||
i = hash_find(&h_gamevars,varname);
|
||||
if (i >= 0)
|
||||
Gv_SetVar(i, varval, ID, -1);
|
||||
return OSDCMD_OK;
|
||||
|
@ -776,11 +776,11 @@ void onvideomodechange(int32_t newmode)
|
|||
|
||||
while (i < MAXSPRITES)
|
||||
{
|
||||
if (ActorExtra[i].lightptr)
|
||||
if (actor[i].lightptr)
|
||||
{
|
||||
polymer_deletelight(ActorExtra[i].lightId);
|
||||
ActorExtra[i].lightptr = NULL;
|
||||
ActorExtra[i].lightId = -1;
|
||||
polymer_deletelight(actor[i].lightId);
|
||||
actor[i].lightptr = NULL;
|
||||
actor[i].lightId = -1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
@ -804,7 +804,7 @@ static int32_t osdcmd_name(const osdfuncparm_t *parm)
|
|||
|
||||
Bstrcpy(tempbuf,parm->parms[0]);
|
||||
|
||||
while (Bstrlen(stripcolorcodes(namebuf,tempbuf)) > 10)
|
||||
while (Bstrlen(OSD_StripColors(namebuf,tempbuf)) > 10)
|
||||
tempbuf[Bstrlen(tempbuf)-1] = '\0';
|
||||
|
||||
Bstrncpy(szPlayerName,tempbuf,sizeof(szPlayerName)-1);
|
||||
|
@ -1037,8 +1037,12 @@ static int32_t osdcmd_bind(const osdfuncparm_t *parm)
|
|||
Bstrncpy(KeyBindings[ConsoleKeys[i].id].cmd,tempbuf, MAXBINDSTRINGLENGTH-1);
|
||||
|
||||
KeyBindings[ConsoleKeys[i].id].key=ConsoleKeys[i].name;
|
||||
|
||||
CONTROL_MapKey(CONFIG_FunctionNameToNum(tempbuf), ConsoleKeys[i].id, 0);
|
||||
|
||||
if (!OSD_ParsingScript())
|
||||
OSD_Printf("%s\n",parm->raw);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -1374,91 +1378,110 @@ int32_t registerosdcommands(void)
|
|||
|
||||
cvar_t cvars_game[] =
|
||||
{
|
||||
{ "crosshair", "crosshair: enable/disable crosshair", (void*)&ud.crosshair, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "crosshair", "crosshair: enable/disable crosshair", (void*)&ud.crosshair, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "hud_althud", "hud_althud: enable/disable alternate mini-hud", (void*)&ud.althud, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_messagetime", "hud_messagetime: length of time to display multiplayer chat messages", (void*)&ud.msgdisptime, CVAR_INT, 0, 0, 3600 },
|
||||
{ "hud_numbertile", "hud_numbertile: first tile in alt hud number set", (void*)&althud_numbertile, CVAR_INT, 0, 0, MAXTILES-10 },
|
||||
{ "hud_numberpal", "hud_numberpal: pal for alt hud numbers", (void*)&althud_numberpal, CVAR_INT, 0, 0, MAXPALOOKUPS },
|
||||
{ "hud_shadows", "hud_shadows: enable/disable althud shadows", (void*)&althud_shadows, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_flashing", "hud_flashing: enable/disable althud flashing", (void*)&althud_flashing, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_glowingquotes", "hud_glowingquotes: enable/disable \"glowing\" quote text", (void*)&hud_glowingquotes, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_scale","hud_scale: changes the hud scale", (void*)&ud.statusbarscale, CVAR_INT|CVAR_FUNCPTR, 0, 10, 100 },
|
||||
{ "hud_showmapname", "hud_showmapname: enable/disable map name display on load", (void*)&hud_showmapname, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_stats", "hud_stats: enable/disable level statistics display", (void*)&ud.levelstats, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_textscale", "hud_textscale: sets multiplayer chat message size", (void*)&ud.textscale, CVAR_INT, 0, 100, 400 },
|
||||
{ "hud_weaponscale","hud_weaponscale: changes the weapon scale", (void*)&ud.weaponscale, CVAR_INT, 0, 10, 100 },
|
||||
{ "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 2 },
|
||||
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT, 0, 2 },
|
||||
|
||||
{ "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
|
||||
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT, 0, 0, 2 },
|
||||
{ "cl_obituaries", "cl_obituaries: enable/disable multiplayer death messages", (void*)&ud.obituaries, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_democams", "cl_democams: enable/disable demo playback cameras", (void*)&ud.democams, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_obituaries", "cl_obituaries: enable/disable multiplayer death messages", (void*)&ud.obituaries, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_democams", "cl_democams: enable/disable demo playback cameras", (void*)&ud.democams, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_idplayers", "cl_idplayers: enable/disable name display when aiming at opponents", (void*)&ud.idplayers, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_idplayers", "cl_idplayers: enable/disable name display when aiming at opponents", (void*)&ud.idplayers, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_showcoords", "cl_showcoords: show your position in the game world", (void*)&ud.coords, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_showcoords", "cl_showcoords: show your position in the game world", (void*)&ud.coords, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_viewbob", "cl_viewbob: enable/disable player head bobbing", (void*)&ud.viewbob, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_viewbob", "cl_viewbob: enable/disable player head bobbing", (void*)&ud.viewbob, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_weaponsway", "cl_weaponsway: enable/disable player weapon swaying", (void*)&ud.weaponsway, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||
{ "cl_angleinterpolation", "cl_angleinterpolation: enable/disable angle interpolation", (void*)&ud.angleinterpolation, CVAR_INT, 0, 256 },
|
||||
|
||||
{ "cl_weaponsway", "cl_weaponsway: enable/disable player weapon swaying", (void*)&ud.weaponsway, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 0, 3 },
|
||||
{ "cl_angleinterpolation", "cl_angleinterpolation: enable/disable angle interpolation", (void*)&ud.angleinterpolation, CVAR_INT, 0, 0, 256 },
|
||||
{ "crosshairscale","crosshairscale: changes the crosshair scale", (void*)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
||||
|
||||
{ "crosshairscale","crosshairscale: changes the crosshair scale", (void*)&ud.crosshairscale, CVAR_INT, 0, 10, 100 },
|
||||
{ "demorec_diffs","demorec_diffs: enable/disable diff recording in demos",(void*)&demorec_diffs_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demorec_force","demorec_force: enable/disable forced demo recording",(void*)&demorec_force_cvar, CVAR_BOOL|CVAR_NOSAVE, 0, 1 },
|
||||
{ "demorec_difftics","demorec_difftics <number>: sets game tic interval after which a diff is recorded",
|
||||
(void*)&demorec_difftics_cvar, CVAR_INT, 2, 60*(TICRATE/TICSPERFRAME) },
|
||||
{ "demorec_diffcompress","demorec_diffcompress <number>: Compression method for diffs. (0: none, 1: KSLZW)",(void*)&demorec_diffcompress_cvar, CVAR_INT, 0, 1 },
|
||||
{ "demorec_synccompress","demorec_synccompress <number>: Compression method for input. (0: none, 1: KSLZW)",(void*)&demorec_synccompress_cvar, CVAR_INT, 0, 1 },
|
||||
{ "demorec_seeds","demorec_seeds: enable/disable recording of random seed for later sync checking",(void*)&demorec_seeds_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demoplay_diffs","demoplay_diffs: enable/disable application of diffs in demo playback",(void*)&demoplay_diffs, CVAR_BOOL, 0, 1 },
|
||||
{ "demoplay_showsync","demoplay_showsync: enable/disable display of sync status",(void*)&demoplay_showsync, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "in_joystick","in_joystick: enables input from the joystick if it is present",(void*)&ud.config.UseJoystick, CVAR_BOOL|CVAR_FUNCPTR, 0, 0, 1 },
|
||||
{ "in_mouse","in_mouse: enables input from the mouse if it is present",(void*)&ud.config.UseMouse, CVAR_BOOL|CVAR_FUNCPTR, 0, 0, 1 },
|
||||
{ "hud_althud", "hud_althud: enable/disable alternate mini-hud", (void*)&ud.althud, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_messagetime", "hud_messagetime: length of time to display multiplayer chat messages", (void*)&ud.msgdisptime, CVAR_INT, 0, 3600 },
|
||||
{ "hud_numbertile", "hud_numbertile: first tile in alt hud number set", (void*)&althud_numbertile, CVAR_INT, 0, MAXTILES-10 },
|
||||
{ "hud_numberpal", "hud_numberpal: pal for alt hud numbers", (void*)&althud_numberpal, CVAR_INT, 0, MAXPALOOKUPS },
|
||||
{ "hud_shadows", "hud_shadows: enable/disable althud shadows", (void*)&althud_shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_flashing", "hud_flashing: enable/disable althud flashing", (void*)&althud_flashing, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_glowingquotes", "hud_glowingquotes: enable/disable \"glowing\" quote text", (void*)&hud_glowingquotes, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_scale","hud_scale: changes the hud scale", (void*)&ud.statusbarscale, CVAR_INT|CVAR_FUNCPTR, 10, 100 },
|
||||
{ "hud_showmapname", "hud_showmapname: enable/disable map name display on load", (void*)&hud_showmapname, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_stats", "hud_stats: enable/disable level statistics display", (void*)&ud.levelstats, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_textscale", "hud_textscale: sets multiplayer chat message size", (void*)&ud.textscale, CVAR_INT, 100, 400 },
|
||||
{ "hud_weaponscale","hud_weaponscale: changes the weapon scale", (void*)&ud.weaponscale, CVAR_INT, 10, 100 },
|
||||
|
||||
{ "in_mousebias", "in_mousebias: emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time", (void*)&ud.config.MouseBias, CVAR_INT, 0, 0, 32 },
|
||||
{ "in_mousedeadzone", "in_mousedeadzone: amount of mouse movement to filter out", (void*)&ud.config.MouseDeadZone, CVAR_INT, 0, 0, 512 },
|
||||
{ "in_mousesmoothing", "in_mousesmoothing: enable/disable mouse input smoothing", (void*)&ud.config.SmoothInput, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "in_joystick","in_joystick: enables input from the joystick if it is present",(void*)&ud.config.UseJoystick, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "in_mouse","in_mouse: enables input from the mouse if it is present",(void*)&ud.config.UseMouse, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
|
||||
{ "r_drawweapon", "r_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 },
|
||||
{ "osdhightile", "osdhightile: enable/disable hires art replacements for console text", (void*)&osdhightile, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_showfps", "r_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_INT, 0, 0, 2 },
|
||||
{ "r_shadows", "r_shadows: enable/disable sprite and model shadows", (void*)&ud.shadows, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&ud.config.useprecache, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "in_mousebias", "in_mousebias: emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time",
|
||||
(void*)&ud.config.MouseBias, CVAR_INT, 0, 32 },
|
||||
{ "in_mousedeadzone", "in_mousedeadzone: amount of mouse movement to filter out", (void*)&ud.config.MouseDeadZone, CVAR_INT, 0, 512 },
|
||||
{ "in_mousesmoothing", "in_mousesmoothing: enable/disable mouse input smoothing", (void*)&ud.config.SmoothInput, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "r_ambientlight", "r_ambientlight: sets the global map light level",(void*)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 0, 10 },
|
||||
{ "r_maxfps", "r_maxfps: sets a framerate cap",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 0, 1000 },
|
||||
{ "mus_enabled", "mus_enabled: enables/disables music", (void*)&ud.config.MusicToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "mus_volume", "mus_musvolume: controls volume of midi music", (void*)&ud.config.MusicVolume, CVAR_INT, 0, 255 },
|
||||
|
||||
{ "sensitivity","sensitivity <value>: changes the mouse sensitivity", (void*)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 0, 25 },
|
||||
{ "r_drawweapon", "r_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 2 },
|
||||
{ "osdhightile", "osdhightile: enable/disable hires art replacements for console text", (void*)&osdhightile, CVAR_BOOL, 0, 1 },
|
||||
{ "r_showfps", "r_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_INT, 0, 2 },
|
||||
{ "r_shadows", "r_shadows: enable/disable sprite and model shadows", (void*)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "skill","skill <value>: changes the game skill setting", (void*)&ud.player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOMULTI, 0, 0, 5 },
|
||||
{ "r_ambientlight", "r_ambientlight: sets the global map light level",(void*)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "r_maxfps", "r_maxfps: sets a framerate cap",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
|
||||
|
||||
{ "snd_ambience", "snd_ambience: enables/disables ambient sounds", (void*)&ud.config.AmbienceToggle, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "snd_duketalk", "snd_duketalk: enables/disables Duke's speech", (void*)&ud.config.VoiceToggle, CVAR_INT, 0, 0, 5 },
|
||||
{ "snd_fxvolume", "snd_fxvolume: volume of sound effects", (void*)&ud.config.FXVolume, CVAR_INT, 0, 0, 255 },
|
||||
{ "snd_mixrate", "snd_mixrate: sound mixing rate", (void*)&ud.config.MixRate, CVAR_INT, 0, 0, 48000 },
|
||||
{ "snd_musvolume", "snd_musvolume: volume of midi music", (void*)&ud.config.MusicVolume, CVAR_INT, 0, 0, 255 },
|
||||
{ "snd_numbits", "snd_numbits: sound bits", (void*)&ud.config.NumBits, CVAR_INT, 0, 8, 16 },
|
||||
{ "snd_numchannels", "snd_numchannels: the number of sound channels", (void*)&ud.config.NumChannels, CVAR_INT, 0, 0, 2 },
|
||||
{ "snd_numvoices", "snd_numvoices: the number of concurrent sounds", (void*)&ud.config.NumVoices, CVAR_INT, 0, 0, 96 },
|
||||
{ "snd_reversestereo", "snd_reversestereo: reverses the stereo channels", (void*)&ud.config.ReverseStereo, CVAR_BOOL, 0, 0, 16 },
|
||||
{ "vid_gamma","vid_gamma <gamma>: adjusts gamma ramp",(void*)&vid_gamma, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 0, 10 },
|
||||
{ "vid_contrast","vid_contrast <gamma>: adjusts gamma ramp",(void*)&vid_contrast, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 0, 10 },
|
||||
{ "vid_brightness","vid_brightness <gamma>: adjusts gamma ramp",(void*)&vid_brightness, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 0, 10 },
|
||||
{ "sensitivity","sensitivity <value>: changes the mouse sensitivity", (void*)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 25 },
|
||||
|
||||
{ "demorec_diffs","demorec_diffs: enable/disable diff recording in demos",(void*)&demorec_diffs_cvar, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "demorec_force","demorec_force: enable/disable forced demo recording",(void*)&demorec_force_cvar, CVAR_BOOL|CVAR_NOSAVE, 0, 0, 1 },
|
||||
{ "demorec_difftics","demorec_difftics <number>: sets game tic interval after which a diff is recorded",(void*)&demorec_difftics_cvar, CVAR_INT, 0, 2, 60*(TICRATE/TICSPERFRAME) },
|
||||
{ "demorec_diffcompress","demorec_diffcompress <number>: Compression method for diffs. (0: none, 1: KSLZW)",(void*)&demorec_diffcompress_cvar, CVAR_INT, 0, 0, 1 },
|
||||
{ "demorec_synccompress","demorec_synccompress <number>: Compression method for input. (0: none, 1: KSLZW)",(void*)&demorec_synccompress_cvar, CVAR_INT, 0, 0, 1 },
|
||||
{ "demorec_seeds","demorec_seeds: enable/disable recording of random seed for later sync checking",(void*)&demorec_seeds_cvar, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "demoplay_diffs","demoplay_diffs: enable/disable application of diffs in demo playback",(void*)&demoplay_diffs, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "demoplay_showsync","demoplay_showsync: enable/disable display of sync status",(void*)&demoplay_showsync, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "skill","skill <value>: changes the game skill setting", (void*)&ud.player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOMULTI, 0, 5 },
|
||||
|
||||
{ "snd_ambience", "snd_ambience: enables/disables ambient sounds", (void*)&ud.config.AmbienceToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_duketalk", "snd_duketalk: enables/disables Duke's speech", (void*)&ud.config.VoiceToggle, CVAR_INT, 0, 5 },
|
||||
{ "snd_enabled", "snd_enabled: enables/disables sound effects", (void*)&ud.config.SoundToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_fxvolume", "snd_fxvolume: volume of sound effects", (void*)&ud.config.FXVolume, CVAR_INT, 0, 255 },
|
||||
{ "snd_mixrate", "snd_mixrate: sound mixing rate", (void*)&ud.config.MixRate, CVAR_INT, 0, 48000 },
|
||||
{ "snd_numbits", "snd_numbits: sound bits", (void*)&ud.config.NumBits, CVAR_INT, 8, 16 },
|
||||
{ "snd_numchannels", "snd_numchannels: the number of sound channels", (void*)&ud.config.NumChannels, CVAR_INT, 0, 2 },
|
||||
{ "snd_numvoices", "snd_numvoices: the number of concurrent sounds", (void*)&ud.config.NumVoices, CVAR_INT, 0, 96 },
|
||||
{ "snd_reversestereo", "snd_reversestereo: reverses the stereo channels", (void*)&ud.config.ReverseStereo, CVAR_BOOL, 0, 16 },
|
||||
|
||||
{ "team","team <value>: change team in multiplayer", (void*)&ud.team, CVAR_INT|CVAR_FUNCPTR|CVAR_MULTI, 0, 3 },
|
||||
|
||||
{ "vid_gamma","vid_gamma <gamma>: adjusts gamma ramp",(void*)&vid_gamma, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "vid_contrast","vid_contrast <gamma>: adjusts gamma ramp",(void*)&vid_contrast, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "vid_brightness","vid_brightness <gamma>: adjusts gamma ramp",(void*)&vid_brightness, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 10 },
|
||||
};
|
||||
|
||||
osdcmd_cheatsinfo_stat.cheatnum = -1;
|
||||
|
||||
for (i=0; i<sizeof(cvars_game)/sizeof(cvars_game[0]); i++)
|
||||
{
|
||||
OSD_RegisterCvar(&cvars_game[i]);
|
||||
if (cvars_game[i].type & CVAR_FUNCPTR) OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set_game);
|
||||
else if (cvars_game[i].type & CVAR_MULTI) OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set_multi);
|
||||
else OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set);
|
||||
if (OSD_RegisterCvar(&cvars_game[i]))
|
||||
continue;
|
||||
|
||||
switch (cvars_game[i].type & (CVAR_FUNCPTR|CVAR_MULTI))
|
||||
{
|
||||
case CVAR_FUNCPTR:
|
||||
OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set_game);
|
||||
break;
|
||||
case CVAR_MULTI:
|
||||
OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set_multi);
|
||||
break;
|
||||
default:
|
||||
OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (VOLUMEONE)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -337,22 +337,23 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
|
|||
|
||||
if (ud.recstat != 2)
|
||||
{
|
||||
/*Gv_SetVar(g_iReturnVarID,LOADSCREEN, -1, -1);*/
|
||||
aGameVars[g_iReturnVarID].val.lValue = LOADSCREEN;
|
||||
VM_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
|
||||
j = aGameVars[g_iReturnVarID].val.lValue;
|
||||
|
||||
if (!statustext)
|
||||
{
|
||||
//g_player[myconnectindex].ps->palette = palette;
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, palette, 1); // JBF 20040308
|
||||
fadepal(0,0,0, 0,64,7);
|
||||
i = ud.screen_size;
|
||||
ud.screen_size = 0;
|
||||
G_UpdateScreenArea();
|
||||
clearview(0L);
|
||||
}
|
||||
|
||||
/*Gv_SetVar(g_iReturnVarID,LOADSCREEN, -1, -1);*/
|
||||
aGameVars[g_iReturnVarID].val.lValue = LOADSCREEN;
|
||||
X_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
|
||||
j = aGameVars[g_iReturnVarID].val.lValue;
|
||||
rotatesprite(320<<15,200<<15,65536L,0,j > MAXTILES-1?j-MAXTILES:j,0,0,2+8+64,0,0,xdim-1,ydim-1);
|
||||
|
||||
if (j > MAXTILES-1)
|
||||
{
|
||||
nextpage();
|
||||
|
@ -371,6 +372,8 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
|
|||
}
|
||||
|
||||
if (statustext) gametext(160,180,statustext,0,2+8+16);
|
||||
|
||||
if (percent != -1)
|
||||
{
|
||||
int32_t ii = scale(scale(xdim-1,288,320),percent,100);
|
||||
rotatesprite(31<<16,145<<16,65536,0,929,15,0,2+8+16,0,0,ii,ydim-1);
|
||||
|
@ -378,13 +381,12 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
|
|||
rotatesprite(30<<16,144<<16,65536,0,929,0,0,2+8+16,0,0,ii,ydim-1);
|
||||
rotatesprite(158<<16,144<<16,65536,0,929,0,0,2+8+16,0,0,ii,ydim-1);
|
||||
}
|
||||
X_OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
|
||||
VM_OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
nextpage();
|
||||
|
||||
if (!statustext)
|
||||
{
|
||||
fadepal(0,0,0, 63,0,-7);
|
||||
|
||||
KB_FlushKeyboardQueue();
|
||||
ud.screen_size = i;
|
||||
}
|
||||
|
@ -400,7 +402,7 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
|
|||
}
|
||||
/*Gv_SetVar(g_iReturnVarID,LOADSCREEN, -1, -1);*/
|
||||
aGameVars[g_iReturnVarID].val.lValue = LOADSCREEN;
|
||||
X_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
|
||||
VM_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
|
||||
j = aGameVars[g_iReturnVarID].val.lValue;
|
||||
rotatesprite(320<<15,200<<15,65536L,0,j > MAXTILES-1?j-MAXTILES:j,0,0,2+8+64,0,0,xdim-1,ydim-1);
|
||||
if (j > MAXTILES-1)
|
||||
|
@ -410,7 +412,7 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
|
|||
}
|
||||
menutext(160,105,0,0,"LOADING...");
|
||||
if (statustext) gametext(160,180,statustext,0,2+8+16);
|
||||
X_OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
VM_OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
nextpage();
|
||||
}
|
||||
}
|
||||
|
@ -588,9 +590,7 @@ void G_UpdateScreenArea(void)
|
|||
y1 = scale(y1,ydim,200);
|
||||
y2 = scale(y2,ydim,200);
|
||||
|
||||
if (getrendermode() >= 3)
|
||||
setview(x1,y1,x2-1,y2);
|
||||
else setview(x1,y1,x2-1,y2-1);
|
||||
setview(x1,y1,x2-1,y2-(getrendermode() >= 3));
|
||||
|
||||
G_GetCrosshairColor();
|
||||
G_SetCrosshairColor(CrosshairColors.r, CrosshairColors.g, CrosshairColors.b);
|
||||
|
@ -616,7 +616,7 @@ void P_RandomSpawnPoint(int32_t snum)
|
|||
{
|
||||
for (k=0; k<g_numPlayerSprites; k++)
|
||||
{
|
||||
dist = FindDistance2D(g_player[j].ps->posx-g_playerSpawnPoints[k].ox,g_player[j].ps->posy-g_playerSpawnPoints[k].oy);
|
||||
dist = FindDistance2D(g_player[j].ps->pos.x-g_playerSpawnPoints[k].ox,g_player[j].ps->pos.y-g_playerSpawnPoints[k].oy);
|
||||
if (dist < pdist)
|
||||
i = k, pdist = dist;
|
||||
}
|
||||
|
@ -626,9 +626,9 @@ void P_RandomSpawnPoint(int32_t snum)
|
|||
}
|
||||
}
|
||||
|
||||
p->bobposx = p->oposx = p->posx = g_playerSpawnPoints[i].ox;
|
||||
p->bobposy = p->oposy = p->posy = g_playerSpawnPoints[i].oy;
|
||||
p->oposz = p->posz = g_playerSpawnPoints[i].oz;
|
||||
p->bobposx = p->opos.x = p->pos.x = g_playerSpawnPoints[i].ox;
|
||||
p->bobposy = p->opos.y = p->pos.y = g_playerSpawnPoints[i].oy;
|
||||
p->opos.z = p->pos.z = g_playerSpawnPoints[i].oz;
|
||||
p->ang = g_playerSpawnPoints[i].oa;
|
||||
p->cursectnum = g_playerSpawnPoints[i].os;
|
||||
sprite[p->i].cstat = 1+256;
|
||||
|
@ -639,14 +639,14 @@ void P_ResetPlayer(int32_t snum)
|
|||
vec3_t tmpvect;
|
||||
spritetype *sp = &sprite[g_player[snum].ps->i];
|
||||
|
||||
tmpvect.x = g_player[snum].ps->posx;
|
||||
tmpvect.y = g_player[snum].ps->posy;
|
||||
tmpvect.z = g_player[snum].ps->posz+PHEIGHT;
|
||||
tmpvect.x = g_player[snum].ps->pos.x;
|
||||
tmpvect.y = g_player[snum].ps->pos.y;
|
||||
tmpvect.z = g_player[snum].ps->pos.z+PHEIGHT;
|
||||
P_RandomSpawnPoint(snum);
|
||||
sp->x = ActorExtra[g_player[snum].ps->i].bposx = g_player[snum].ps->bobposx = g_player[snum].ps->oposx = g_player[snum].ps->posx;
|
||||
sp->y = ActorExtra[g_player[snum].ps->i].bposy = g_player[snum].ps->bobposy = g_player[snum].ps->oposy =g_player[snum].ps->posy;
|
||||
sp->z = ActorExtra[g_player[snum].ps->i].bposy = g_player[snum].ps->oposz =g_player[snum].ps->posz;
|
||||
updatesector(g_player[snum].ps->posx,g_player[snum].ps->posy,&g_player[snum].ps->cursectnum);
|
||||
sp->x = actor[g_player[snum].ps->i].bposx = g_player[snum].ps->bobposx = g_player[snum].ps->opos.x = g_player[snum].ps->pos.x;
|
||||
sp->y = actor[g_player[snum].ps->i].bposy = g_player[snum].ps->bobposy = g_player[snum].ps->opos.y =g_player[snum].ps->pos.y;
|
||||
sp->z = actor[g_player[snum].ps->i].bposy = g_player[snum].ps->opos.z =g_player[snum].ps->pos.z;
|
||||
updatesector(g_player[snum].ps->pos.x,g_player[snum].ps->pos.y,&g_player[snum].ps->cursectnum);
|
||||
setsprite(g_player[snum].ps->i,&tmpvect);
|
||||
sp->cstat = 257;
|
||||
|
||||
|
@ -668,27 +668,27 @@ void P_ResetPlayer(int32_t snum)
|
|||
g_player[snum].ps->wackedbyactor = -1;
|
||||
g_player[snum].ps->inv_amount[GET_SHIELD] = g_startArmorAmount;
|
||||
g_player[snum].ps->dead_flag = 0;
|
||||
g_player[snum].ps->pals_time = 0;
|
||||
g_player[snum].ps->pals.f = 0;
|
||||
g_player[snum].ps->footprintcount = 0;
|
||||
g_player[snum].ps->weapreccnt = 0;
|
||||
g_player[snum].ps->fta = 0;
|
||||
g_player[snum].ps->ftq = 0;
|
||||
g_player[snum].ps->posxv = g_player[snum].ps->posyv = 0;
|
||||
g_player[snum].ps->posvel.x = g_player[snum].ps->posvel.y = 0;
|
||||
g_player[snum].ps->rotscrnang = 0;
|
||||
g_player[snum].ps->runspeed = g_playerFriction;
|
||||
g_player[snum].ps->falling_counter = 0;
|
||||
|
||||
ActorExtra[g_player[snum].ps->i].extra = -1;
|
||||
ActorExtra[g_player[snum].ps->i].owner = g_player[snum].ps->i;
|
||||
actor[g_player[snum].ps->i].extra = -1;
|
||||
actor[g_player[snum].ps->i].owner = g_player[snum].ps->i;
|
||||
|
||||
ActorExtra[g_player[snum].ps->i].cgg = 0;
|
||||
ActorExtra[g_player[snum].ps->i].movflag = 0;
|
||||
ActorExtra[g_player[snum].ps->i].tempang = 0;
|
||||
ActorExtra[g_player[snum].ps->i].actorstayput = -1;
|
||||
ActorExtra[g_player[snum].ps->i].dispicnum = 0;
|
||||
ActorExtra[g_player[snum].ps->i].owner = g_player[snum].ps->i;
|
||||
actor[g_player[snum].ps->i].cgg = 0;
|
||||
actor[g_player[snum].ps->i].movflag = 0;
|
||||
actor[g_player[snum].ps->i].tempang = 0;
|
||||
actor[g_player[snum].ps->i].actorstayput = -1;
|
||||
actor[g_player[snum].ps->i].dispicnum = 0;
|
||||
actor[g_player[snum].ps->i].owner = g_player[snum].ps->i;
|
||||
|
||||
ActorExtra[g_player[snum].ps->i].temp_data[4] = 0;
|
||||
actor[g_player[snum].ps->i].t_data[4] = 0;
|
||||
|
||||
P_ResetInventory(snum);
|
||||
P_ResetWeapons(snum);
|
||||
|
@ -698,7 +698,7 @@ void P_ResetPlayer(int32_t snum)
|
|||
g_player[snum].ps->movement_lock = 0;
|
||||
|
||||
if (apScriptGameEvent[EVENT_RESETPLAYER])
|
||||
X_OnEvent(EVENT_RESETPLAYER, g_player[snum].ps->i, snum, -1);
|
||||
VM_OnEvent(EVENT_RESETPLAYER, g_player[snum].ps->i, snum, -1);
|
||||
}
|
||||
|
||||
void P_ResetStatus(int32_t snum)
|
||||
|
@ -777,9 +777,9 @@ void P_ResetStatus(int32_t snum)
|
|||
p->newowner =-1;
|
||||
p->jumping_counter = 0;
|
||||
p->hard_landing = 0;
|
||||
p->posxv = 0;
|
||||
p->posyv = 0;
|
||||
p->poszv = 0;
|
||||
p->posvel.x = 0;
|
||||
p->posvel.y = 0;
|
||||
p->posvel.z = 0;
|
||||
fricxv = 0;
|
||||
fricyv = 0;
|
||||
p->somethingonplayer =-1;
|
||||
|
@ -808,7 +808,7 @@ void P_ResetStatus(int32_t snum)
|
|||
p->frag_ps = snum;
|
||||
|
||||
P_UpdateScreenPal(p);
|
||||
X_OnEvent(EVENT_RESETPLAYER, p->i, snum, -1);
|
||||
VM_OnEvent(EVENT_RESETPLAYER, p->i, snum, -1);
|
||||
}
|
||||
|
||||
void P_ResetWeapons(int32_t snum)
|
||||
|
@ -816,24 +816,20 @@ void P_ResetWeapons(int32_t snum)
|
|||
int32_t weapon;
|
||||
DukePlayer_t *p = g_player[snum].ps;
|
||||
|
||||
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++)
|
||||
p->gotweapon[weapon] = 0;
|
||||
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++)
|
||||
p->ammo_amount[weapon] = 0;
|
||||
|
||||
p->weapon_pos = 6;
|
||||
p->kickback_pic = 5;
|
||||
p->curr_weapon = PISTOL_WEAPON;
|
||||
p->gotweapon[PISTOL_WEAPON] = 1;
|
||||
p->gotweapon[KNEE_WEAPON] = 1;
|
||||
p->gotweapon = ((1<<PISTOL_WEAPON) | (1<<KNEE_WEAPON) | (1<<HANDREMOTE_WEAPON));
|
||||
p->ammo_amount[PISTOL_WEAPON] = min(p->max_ammo_amount[PISTOL_WEAPON], 48);
|
||||
p->gotweapon[HANDREMOTE_WEAPON] = 1;
|
||||
p->last_weapon = -1;
|
||||
|
||||
p->show_empty_weapon= 0;
|
||||
p->last_pissed_time = 0;
|
||||
p->holster_weapon = 0;
|
||||
X_OnEvent(EVENT_RESETWEAPONS, p->i, snum, -1);
|
||||
VM_OnEvent(EVENT_RESETWEAPONS, p->i, snum, -1);
|
||||
}
|
||||
|
||||
void P_ResetInventory(int32_t snum)
|
||||
|
@ -850,7 +846,7 @@ void P_ResetInventory(int32_t snum)
|
|||
|
||||
p->inv_amount[GET_SHIELD] = g_startArmorAmount;
|
||||
p->inven_icon = 0;
|
||||
X_OnEvent(EVENT_RESETINVENTORY, p->i, snum, -1);
|
||||
VM_OnEvent(EVENT_RESETINVENTORY, p->i, snum, -1);
|
||||
}
|
||||
|
||||
static void resetprestat(int32_t snum,int32_t g)
|
||||
|
@ -863,7 +859,7 @@ static void resetprestat(int32_t snum,int32_t g)
|
|||
|
||||
p->hbomb_on = 0;
|
||||
p->cheat_phase = 0;
|
||||
p->pals_time = 0;
|
||||
p->pals.f = 0;
|
||||
p->toggle_key_flag = 0;
|
||||
p->secret_rooms = 0;
|
||||
p->max_secret_rooms = 0;
|
||||
|
@ -898,7 +894,8 @@ static void resetprestat(int32_t snum,int32_t g)
|
|||
g_numInterpolations = 0;
|
||||
startofdynamicinterpolations = 0;
|
||||
|
||||
if (((g&MODE_EOL) != MODE_EOL && numplayers < 2 && !g_netServer) || (!(GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && numplayers > 1))
|
||||
if (((g&MODE_EOL) != MODE_EOL && numplayers < 2 && !g_netServer) ||
|
||||
(!(GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && numplayers > 1))
|
||||
{
|
||||
P_ResetWeapons(snum);
|
||||
P_ResetInventory(snum);
|
||||
|
@ -916,9 +913,7 @@ static void resetprestat(int32_t snum,int32_t g)
|
|||
|
||||
static inline void G_SetupBackdrop(int16_t sky)
|
||||
{
|
||||
int16_t i;
|
||||
|
||||
for (i=0; i<MAXPSKYTILES; i++) pskyoff[i]=0;
|
||||
Bmemset(pskyoff, 0, sizeof(pskyoff[0]) * MAXPSKYTILES);
|
||||
|
||||
if (parallaxyscale != 65536L)
|
||||
parallaxyscale = 32768;
|
||||
|
@ -1022,7 +1017,7 @@ static inline void prelevel(char g)
|
|||
nexti = nextspritestat[i];
|
||||
A_ResetVars(i);
|
||||
A_LoadActor(i);
|
||||
X_OnEvent(EVENT_LOADACTOR, i, -1, -1);
|
||||
VM_OnEvent(EVENT_LOADACTOR, i, -1, -1);
|
||||
if (sprite[i].lotag == -1 && (sprite[i].cstat&16))
|
||||
{
|
||||
g_player[0].ps->exitx = SX;
|
||||
|
@ -1117,7 +1112,7 @@ static inline void prelevel(char g)
|
|||
while (j >= 0)
|
||||
{
|
||||
if (sprite[j].lotag == 12 && sprite[j].hitag == SLT)
|
||||
ActorExtra[j].temp_data[0] = 1;
|
||||
actor[j].t_data[0] = 1;
|
||||
j = nextspritestat[j];
|
||||
}
|
||||
}
|
||||
|
@ -1363,20 +1358,20 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
|||
if (aplWeaponWorksLike[i][0]==PISTOL_WEAPON)
|
||||
{
|
||||
p->curr_weapon = i;
|
||||
p->gotweapon[i] = 1;
|
||||
p->gotweapon |= (1<<i);
|
||||
p->ammo_amount[i] = min(p->max_ammo_amount[i], 48);
|
||||
}
|
||||
else if (aplWeaponWorksLike[i][0]==KNEE_WEAPON)
|
||||
p->gotweapon[i] = 1;
|
||||
p->gotweapon |= (1<<i);
|
||||
else if (aplWeaponWorksLike[i][0]==HANDREMOTE_WEAPON)
|
||||
p->gotweapon[i] = 1;
|
||||
p->gotweapon |= (1<<i);
|
||||
}
|
||||
p->last_weapon = -1;
|
||||
}
|
||||
|
||||
display_mirror = 0;
|
||||
|
||||
X_OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
VM_OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
}
|
||||
|
||||
static void resetpspritevars(char g)
|
||||
|
@ -1387,7 +1382,7 @@ static void resetpspritevars(char g)
|
|||
uint8_t aimmode[MAXPLAYERS],autoaim[MAXPLAYERS],weaponswitch[MAXPLAYERS];
|
||||
DukeStatus_t tsbar[MAXPLAYERS];
|
||||
|
||||
A_InsertSprite(g_player[0].ps->cursectnum,g_player[0].ps->posx,g_player[0].ps->posy,g_player[0].ps->posz,
|
||||
A_InsertSprite(g_player[0].ps->cursectnum,g_player[0].ps->pos.x,g_player[0].ps->pos.y,g_player[0].ps->pos.z,
|
||||
APLAYER,0,0,0,g_player[0].ps->ang,0,0,0,10);
|
||||
|
||||
if (ud.recstat != 2)
|
||||
|
@ -1399,11 +1394,9 @@ static void resetpspritevars(char g)
|
|||
if ((g_netServer || ud.multimode > 1) && (GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
||||
{
|
||||
for (j=0; j<MAX_WEAPONS; j++)
|
||||
{
|
||||
tsbar[i].ammo_amount[j] = g_player[i].ps->ammo_amount[j];
|
||||
tsbar[i].gotweapon[j] = g_player[i].ps->gotweapon[j];
|
||||
}
|
||||
|
||||
tsbar[i].gotweapon = g_player[i].ps->gotweapon;
|
||||
Bmemcpy(tsbar[i].inv_amount, g_player[i].ps->inv_amount, sizeof(tsbar[i].inv_amount));
|
||||
tsbar[i].curr_weapon = g_player[i].ps->curr_weapon;
|
||||
tsbar[i].inven_icon = g_player[i].ps->inven_icon;
|
||||
|
@ -1424,10 +1417,9 @@ static void resetpspritevars(char g)
|
|||
if ((g_netServer || ud.multimode > 1) && (GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
||||
{
|
||||
for (j=0; j<MAX_WEAPONS; j++)
|
||||
{
|
||||
g_player[i].ps->ammo_amount[j] = tsbar[i].ammo_amount[j];
|
||||
g_player[i].ps->gotweapon[j] = tsbar[i].gotweapon[j];
|
||||
}
|
||||
|
||||
g_player[i].ps->gotweapon = tsbar[i].gotweapon;
|
||||
g_player[i].ps->curr_weapon = tsbar[i].curr_weapon;
|
||||
g_player[i].ps->inven_icon = tsbar[i].inven_icon;
|
||||
Bmemcpy(g_player[i].ps->inv_amount, tsbar[i].inv_amount, sizeof(tsbar[i].inv_amount));
|
||||
|
@ -1448,12 +1440,6 @@ static void resetpspritevars(char g)
|
|||
if (g_numPlayerSprites == MAXPLAYERS)
|
||||
G_GameExit("\nToo many player sprites (max 16.)");
|
||||
|
||||
/* if (g_numPlayerSprites == 0)
|
||||
{
|
||||
firstx = g_player[0].ps->posx;
|
||||
firsty = g_player[0].ps->posy;
|
||||
}*/
|
||||
|
||||
g_playerSpawnPoints[(uint8_t)g_numPlayerSprites].ox = s->x;
|
||||
g_playerSpawnPoints[(uint8_t)g_numPlayerSprites].oy = s->y;
|
||||
g_playerSpawnPoints[(uint8_t)g_numPlayerSprites].oz = s->z;
|
||||
|
@ -1520,11 +1506,11 @@ static void resetpspritevars(char g)
|
|||
|
||||
g_player[j].ps->i = i;
|
||||
g_player[j].ps->frag_ps = j;
|
||||
ActorExtra[i].owner = i;
|
||||
actor[i].owner = i;
|
||||
|
||||
ActorExtra[i].bposx = g_player[j].ps->bobposx = g_player[j].ps->oposx = g_player[j].ps->posx = s->x;
|
||||
ActorExtra[i].bposy = g_player[j].ps->bobposy = g_player[j].ps->oposy = g_player[j].ps->posy = s->y;
|
||||
ActorExtra[i].bposz = g_player[j].ps->oposz = g_player[j].ps->posz = s->z;
|
||||
actor[i].bposx = g_player[j].ps->bobposx = g_player[j].ps->opos.x = g_player[j].ps->pos.x = s->x;
|
||||
actor[i].bposy = g_player[j].ps->bobposy = g_player[j].ps->opos.y = g_player[j].ps->pos.y = s->y;
|
||||
actor[i].bposz = g_player[j].ps->opos.z = g_player[j].ps->pos.z = s->z;
|
||||
g_player[j].ps->oang = g_player[j].ps->ang = s->ang;
|
||||
|
||||
updatesector(s->x,s->y,&g_player[j].ps->cursectnum);
|
||||
|
@ -1616,7 +1602,7 @@ void clearfifo(void)
|
|||
jump_input = 0;
|
||||
|
||||
movefifoplc = movefifosendplc = predictfifoplc = 0;
|
||||
avgfvel = avgsvel = avgavel = avghorz = avgbits = avgextbits = 0;
|
||||
avg.fvel = avg.svel = avg.avel = avg.horz = avg.bits = avg.extbits = 0;
|
||||
otherminlag = mymaxlag = 0;
|
||||
|
||||
clearbufbyte(&loc,sizeof(input_t),0L);
|
||||
|
@ -1670,6 +1656,36 @@ int32_t G_FindLevelForFilename(const char *fn)
|
|||
return MAXLEVELS*MAXVOLUMES;
|
||||
}
|
||||
|
||||
void G_FadeLoad(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step)
|
||||
{
|
||||
if (step > 0)
|
||||
{
|
||||
for (; start < end; start += step)
|
||||
{
|
||||
if (KB_KeyPressed(sc_Space))
|
||||
{
|
||||
KB_ClearKeyDown(sc_Space);
|
||||
return;
|
||||
}
|
||||
G_FadePalette(r,g,b,start);
|
||||
flushperms();
|
||||
G_DoLoadScreen(" ", -1);
|
||||
|
||||
}
|
||||
}
|
||||
else for (; start >= end; start += step)
|
||||
{
|
||||
if (KB_KeyPressed(sc_Space))
|
||||
{
|
||||
KB_ClearKeyDown(sc_Space);
|
||||
return;
|
||||
}
|
||||
G_FadePalette(r,g,b,start);
|
||||
flushperms();
|
||||
G_DoLoadScreen(" ", -1);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t G_EnterLevel(int32_t g)
|
||||
{
|
||||
int32_t i;
|
||||
|
@ -1755,7 +1771,8 @@ int32_t G_EnterLevel(int32_t g)
|
|||
{
|
||||
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
|
||||
{
|
||||
if (loadboard(boardfilename,0,&g_player[0].ps->posx, &g_player[0].ps->posy, &g_player[0].ps->posz, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)
|
||||
if (loadboard(boardfilename,0,&g_player[0].ps->pos.x, &g_player[0].ps->pos.y,
|
||||
&g_player[0].ps->pos.z, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map '%s' not found!\n",boardfilename);
|
||||
//G_GameExit(tempbuf);
|
||||
|
@ -1825,7 +1842,8 @@ int32_t G_EnterLevel(int32_t g)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (loadboard(MapInfo[(ud.volume_number*MAXLEVELS)+ud.level_number].filename,0,&g_player[0].ps->posx, &g_player[0].ps->posy, &g_player[0].ps->posz, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)
|
||||
else if (loadboard(MapInfo[(ud.volume_number*MAXLEVELS)+ud.level_number].filename,0,&g_player[0].ps->pos.x,
|
||||
&g_player[0].ps->pos.y, &g_player[0].ps->pos.z, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map %s not found!\n",MapInfo[(ud.volume_number*MAXLEVELS)+ud.level_number].filename);
|
||||
//G_GameExit(tempbuf);
|
||||
|
@ -1856,7 +1874,8 @@ int32_t G_EnterLevel(int32_t g)
|
|||
levname[i] = 255;
|
||||
levname[i+1] = 0;
|
||||
|
||||
if (loadboard(levname,1,&g_player[0].ps->posx, &g_player[0].ps->posy, &g_player[0].ps->posz, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)
|
||||
if (loadboard(levname,1,&g_player[0].ps->pos.x, &g_player[0].ps->pos.y,
|
||||
&g_player[0].ps->pos.z, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map '%s' not found!\n",MapInfo[(ud.volume_number*MAXLEVELS)+ud.level_number].filename);
|
||||
//G_GameExit(tempbuf);
|
||||
|
@ -1882,7 +1901,7 @@ int32_t G_EnterLevel(int32_t g)
|
|||
clearbufbyte(gotpic,sizeof(gotpic),0L);
|
||||
clearbufbyte(precachehightile, sizeof(precachehightile), 0l);
|
||||
|
||||
//clearbufbyte(ActorExtra,sizeof(ActorExtra),0l); // JBF 20040531: yes? no?
|
||||
//clearbufbyte(Actor,sizeof(Actor),0l); // JBF 20040531: yes? no?
|
||||
|
||||
prelevel(g);
|
||||
|
||||
|
@ -1892,7 +1911,9 @@ int32_t G_EnterLevel(int32_t g)
|
|||
cachedebug = 0;
|
||||
automapping = 0;
|
||||
|
||||
G_FadeLoad(0,0,0, 63, 0, -7);
|
||||
G_CacheMapData();
|
||||
G_FadeLoad(0,0,0, 0 ,64, 7);
|
||||
|
||||
if (ud.recstat != 2)
|
||||
{
|
||||
|
@ -1929,7 +1950,7 @@ int32_t G_EnterLevel(int32_t g)
|
|||
case FLOORPLASMA__STATIC:
|
||||
P_ResetWeapons(i);
|
||||
P_ResetInventory(i);
|
||||
g_player[i].ps->gotweapon[PISTOL_WEAPON] = 0;
|
||||
g_player[i].ps->gotweapon &= ~(1<<PISTOL_WEAPON);
|
||||
g_player[i].ps->ammo_amount[PISTOL_WEAPON] = 0;
|
||||
g_player[i].ps->curr_weapon = KNEE_WEAPON;
|
||||
g_player[i].ps->kickback_pic = 0;
|
||||
|
@ -1978,8 +1999,9 @@ int32_t G_EnterLevel(int32_t g)
|
|||
// variables are set by pointer...
|
||||
|
||||
Bmemcpy(¤tboardfilename[0],&boardfilename[0],BMAX_PATH);
|
||||
X_OnEvent(EVENT_ENTERLEVEL, -1, -1, -1);
|
||||
OSD_Printf(OSDTEXT_YELLOW "E%dL%d: %s\n",ud.volume_number+1,ud.level_number+1,MapInfo[(ud.volume_number*MAXLEVELS)+ud.level_number].name);
|
||||
VM_OnEvent(EVENT_ENTERLEVEL, -1, -1, -1);
|
||||
OSD_Printf(OSDTEXT_YELLOW "E%dL%d: %s\n",ud.volume_number+1,ud.level_number+1,
|
||||
MapInfo[(ud.volume_number*MAXLEVELS)+ud.level_number].name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
scriptptrs = Brealloc(scriptptrs, MAXSPRITES * sizeof(scriptptrs));
|
||||
|
||||
if (kdfread(&scriptptrs[0],sizeof(scriptptrs),MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
|
||||
if (kdfread(&ActorExtra[0],sizeof(ActorData_t),MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
|
||||
if (kdfread(&actor[0],sizeof(ActorData_t),MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
|
||||
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
if (scriptptrs[i]&1) T2 += j;
|
||||
if (scriptptrs[i]&2) T5 += j;
|
||||
if (scriptptrs[i]&4) T6 += j;
|
||||
ActorExtra[i].projectile = &SpriteProjectile[i];
|
||||
actor[i].projectile = &SpriteProjectile[i];
|
||||
}
|
||||
|
||||
if (kdfread(&lockclock,sizeof(lockclock),1,fil) != 1) goto corrupt;
|
||||
|
@ -595,11 +595,11 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
polymer_loadboard();
|
||||
while (i < MAXSPRITES)
|
||||
{
|
||||
if (ActorExtra[i].lightptr)
|
||||
if (actor[i].lightptr)
|
||||
{
|
||||
polymer_deletelight(ActorExtra[i].lightId);
|
||||
ActorExtra[i].lightptr = NULL;
|
||||
ActorExtra[i].lightId = -1;
|
||||
polymer_deletelight(actor[i].lightId);
|
||||
actor[i].lightptr = NULL;
|
||||
actor[i].lightId = -1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
@ -823,7 +823,7 @@ int32_t G_SavePlayer(int32_t spot)
|
|||
}
|
||||
|
||||
dfwrite(&scriptptrs[0],sizeof(scriptptrs),MAXSPRITES,fil);
|
||||
dfwrite(&ActorExtra[0],sizeof(ActorData_t),MAXSPRITES,fil);
|
||||
dfwrite(&actor[0],sizeof(ActorData_t),MAXSPRITES,fil);
|
||||
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
{
|
||||
|
@ -1482,7 +1482,7 @@ static const dataspec_t svgm_script[] =
|
|||
|
||||
{ DS_SAVEFN, (void *)&sv_preactordatasave, 0, 1 },
|
||||
{ 0, &savegame_bitmap, sizeof(savegame_bitmap), 1 },
|
||||
{ 0, &ActorExtra[0], sizeof(ActorData_t), MAXSPRITES },
|
||||
{ 0, &actor[0], sizeof(ActorData_t), MAXSPRITES },
|
||||
{ DS_SAVEFN|DS_LOADFN, (void *)&sv_postactordata, 0, 1 },
|
||||
|
||||
{ DS_END, 0, 0, 0 }
|
||||
|
@ -1898,8 +1898,8 @@ static void sv_preactordatasave()
|
|||
Bmemset(savegame_bitmap, 0, sizeof(savegame_bitmap));
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
{
|
||||
// ActorExtra[i].lightptr = NULL;
|
||||
// ActorExtra[i].lightId = -1;
|
||||
// Actor[i].lightptr = NULL;
|
||||
// Actor[i].lightId = -1;
|
||||
|
||||
if (sprite[i].statnum==MAXSTATUS || actorscrptr[PN]==NULL) continue;
|
||||
if (T2 >= j && T2 < k) savegame_bitmap[i>>3][0] |= 1<<(i&7), T2 -= j;
|
||||
|
@ -1919,9 +1919,9 @@ static void sv_postactordata()
|
|||
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
{
|
||||
// ActorExtra[i].lightptr = NULL;
|
||||
// ActorExtra[i].lightId = -1;
|
||||
ActorExtra[i].projectile = &SpriteProjectile[i];
|
||||
// Actor[i].lightptr = NULL;
|
||||
// Actor[i].lightId = -1;
|
||||
actor[i].projectile = &SpriteProjectile[i];
|
||||
|
||||
if (sprite[i].statnum==MAXSTATUS || actorscrptr[PN]==NULL) continue;
|
||||
if (savegame_bitmap[i>>3][0]&(1<<(i&7))) T2 += j;
|
||||
|
@ -2294,11 +2294,11 @@ static void postloadplayer2()
|
|||
polymer_loadboard();
|
||||
while (i < MAXSPRITES)
|
||||
{
|
||||
if (ActorExtra[i].lightptr)
|
||||
if (actor[i].lightptr)
|
||||
{
|
||||
polymer_deletelight(ActorExtra[i].lightId);
|
||||
ActorExtra[i].lightptr = NULL;
|
||||
ActorExtra[i].lightId = -1;
|
||||
polymer_deletelight(actor[i].lightId);
|
||||
actor[i].lightptr = NULL;
|
||||
actor[i].lightId = -1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -99,14 +99,14 @@ int32_t G_CheckActivatorMotion(int32_t lotag)
|
|||
{
|
||||
case 11:
|
||||
case 30:
|
||||
if (ActorExtra[j].temp_data[4])
|
||||
if (actor[j].t_data[4])
|
||||
return(1);
|
||||
break;
|
||||
case 20:
|
||||
case 31:
|
||||
case 32:
|
||||
case 18:
|
||||
if (ActorExtra[j].temp_data[0])
|
||||
if (actor[j].t_data[0])
|
||||
return(1);
|
||||
break;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ int32_t __fastcall A_FindPlayer(spritetype *s, int32_t *d)
|
|||
{
|
||||
if ((!g_netServer && ud.multimode < 2))
|
||||
{
|
||||
*d = klabs(g_player[myconnectindex].ps->oposx-s->x) + klabs(g_player[myconnectindex].ps->oposy-s->y) + ((klabs(g_player[myconnectindex].ps->oposz-s->z+(28<<8)))>>4);
|
||||
*d = klabs(g_player[myconnectindex].ps->opos.x-s->x) + klabs(g_player[myconnectindex].ps->opos.y-s->y) + ((klabs(g_player[myconnectindex].ps->opos.z-s->z+(28<<8)))>>4);
|
||||
return myconnectindex;
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ int32_t __fastcall A_FindPlayer(spritetype *s, int32_t *d)
|
|||
|
||||
TRAVERSE_CONNECT(j)
|
||||
{
|
||||
x = klabs(g_player[j].ps->oposx-s->x) + klabs(g_player[j].ps->oposy-s->y) + ((klabs(g_player[j].ps->oposz-s->z+(28<<8)))>>4);
|
||||
x = klabs(g_player[j].ps->opos.x-s->x) + klabs(g_player[j].ps->opos.y-s->y) + ((klabs(g_player[j].ps->opos.z-s->z+(28<<8)))>>4);
|
||||
if (x < closest && sprite[g_player[j].ps->i].extra > 0)
|
||||
{
|
||||
closest_player = j;
|
||||
|
@ -271,7 +271,7 @@ void G_DoSectorAnimations(void)
|
|||
if (animateptr[i] == §or[animatesect[i]].floorz)
|
||||
for (j=headspritesect[dasect]; j>=0; j=nextspritesect[j])
|
||||
if (sprite[j].statnum != 3)
|
||||
ActorExtra[j].bposz = sprite[j].z;
|
||||
actor[j].bposz = sprite[j].z;
|
||||
|
||||
g_animateCount--;
|
||||
animateptr[i] = animateptr[g_animateCount];
|
||||
|
@ -301,25 +301,25 @@ void G_DoSectorAnimations(void)
|
|||
{
|
||||
TRAVERSE_CONNECT(p)
|
||||
if (g_player[p].ps->cursectnum == dasect)
|
||||
if ((sector[dasect].floorz-g_player[p].ps->posz) < (64<<8))
|
||||
if ((sector[dasect].floorz-g_player[p].ps->pos.z) < (64<<8))
|
||||
if (sprite[g_player[p].ps->i].owner >= 0)
|
||||
{
|
||||
g_player[p].ps->posz += v;
|
||||
g_player[p].ps->poszv = 0;
|
||||
g_player[p].ps->pos.z += v;
|
||||
g_player[p].ps->posvel.z = 0;
|
||||
if (p == myconnectindex)
|
||||
{
|
||||
my.z += v;
|
||||
myvel.z = 0;
|
||||
myzbak[0] = g_player[p].ps->posz;
|
||||
myzbak[0] = g_player[p].ps->pos.z;
|
||||
}
|
||||
}
|
||||
|
||||
for (j=headspritesect[dasect]; j>=0; j=nextspritesect[j])
|
||||
if (sprite[j].statnum != 3)
|
||||
{
|
||||
ActorExtra[j].bposz = sprite[j].z;
|
||||
actor[j].bposz = sprite[j].z;
|
||||
sprite[j].z += v;
|
||||
ActorExtra[j].floorz = sector[dasect].floorz+v;
|
||||
actor[j].floorz = sector[dasect].floorz+v;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ int32_t G_ActivateWarpElevators(int32_t s,int32_t d) //Parm = sectoreffectornum
|
|||
{
|
||||
if (SLT == 17)
|
||||
if (SHT == sprite[s].hitag)
|
||||
if ((klabs(sector[sn].floorz-ActorExtra[s].temp_data[2]) > SP) ||
|
||||
if ((klabs(sector[sn].floorz-actor[s].t_data[2]) > SP) ||
|
||||
(sector[SECT].hitag == (sector[sn].hitag-d)))
|
||||
break;
|
||||
i = nextspritestat[i];
|
||||
|
@ -532,8 +532,8 @@ void G_OperateSectors(int32_t sn,int32_t ii)
|
|||
|
||||
case 30:
|
||||
j = sector[sn].hitag;
|
||||
if (ActorExtra[j].tempang == 0 ||
|
||||
ActorExtra[j].tempang == 256)
|
||||
if (actor[j].tempang == 0 ||
|
||||
actor[j].tempang == 256)
|
||||
A_CallSound(sn,ii);
|
||||
if (sprite[j].extra == 1)
|
||||
sprite[j].extra = 3;
|
||||
|
@ -543,8 +543,8 @@ void G_OperateSectors(int32_t sn,int32_t ii)
|
|||
case 31:
|
||||
|
||||
j = sector[sn].hitag;
|
||||
if (ActorExtra[j].temp_data[4] == 0)
|
||||
ActorExtra[j].temp_data[4] = 1;
|
||||
if (actor[j].t_data[4] == 0)
|
||||
actor[j].t_data[4] = 1;
|
||||
|
||||
A_CallSound(sn,ii);
|
||||
break;
|
||||
|
@ -925,8 +925,8 @@ REDODOOR:
|
|||
|
||||
sector[sn].lotag ^= 0x8000;
|
||||
if (sector[sn].lotag&0x8000) //OPENING
|
||||
ActorExtra[j].temp_data[0] = 1;
|
||||
else ActorExtra[j].temp_data[0] = 2;
|
||||
actor[j].t_data[0] = 1;
|
||||
else actor[j].t_data[0] = 2;
|
||||
A_CallSound(sn,ii);
|
||||
break;
|
||||
}
|
||||
|
@ -951,9 +951,9 @@ REDODOOR:
|
|||
l = headspritestat[STAT_EFFECTOR];
|
||||
while (l >= 0)
|
||||
{
|
||||
if ((sprite[l].lotag&0xff)==21 && !ActorExtra[l].temp_data[0] &&
|
||||
if ((sprite[l].lotag&0xff)==21 && !actor[l].t_data[0] &&
|
||||
(sprite[l].hitag) == j)
|
||||
ActorExtra[l].temp_data[0] = 1;
|
||||
actor[l].t_data[0] = 1;
|
||||
l = nextspritestat[l];
|
||||
}
|
||||
A_CallSound(sn,ii);
|
||||
|
@ -1057,7 +1057,7 @@ void G_OperateActivators(int32_t low,int32_t snum)
|
|||
case 31:
|
||||
case 32:
|
||||
case 18:
|
||||
ActorExtra[j].temp_data[0] = 1-ActorExtra[j].temp_data[0];
|
||||
actor[j].t_data[0] = 1-actor[j].t_data[0];
|
||||
A_CallSound(SECT,j);
|
||||
break;
|
||||
}
|
||||
|
@ -1127,8 +1127,8 @@ int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchtype)
|
|||
|
||||
if (switchtype == 1) // A wall sprite
|
||||
{
|
||||
if (ActorExtra[w].lasttransport == totalclock) return 0;
|
||||
ActorExtra[w].lasttransport = totalclock;
|
||||
if (actor[w].lasttransport == totalclock) return 0;
|
||||
actor[w].lasttransport = totalclock;
|
||||
lotag = sprite[w].lotag;
|
||||
if (lotag == 0) return 0;
|
||||
hitag = sprite[w].hitag;
|
||||
|
@ -1147,7 +1147,7 @@ int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchtype)
|
|||
// sx = wall[w].x;
|
||||
// sy = wall[w].y;
|
||||
Bmemcpy(&davector, &wall[w], sizeof(int32_t) * 2);
|
||||
davector.z = g_player[snum].ps->posz;
|
||||
davector.z = g_player[snum].ps->pos.z;
|
||||
picnum = wall[w].picnum;
|
||||
switchpal = wall[w].pal;
|
||||
}
|
||||
|
@ -1529,16 +1529,16 @@ int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchtype)
|
|||
{
|
||||
case 12:
|
||||
sector[sprite[x].sectnum].floorpal = 0;
|
||||
ActorExtra[x].temp_data[0]++;
|
||||
if (ActorExtra[x].temp_data[0] == 2)
|
||||
ActorExtra[x].temp_data[0]++;
|
||||
actor[x].t_data[0]++;
|
||||
if (actor[x].t_data[0] == 2)
|
||||
actor[x].t_data[0]++;
|
||||
|
||||
break;
|
||||
case 24:
|
||||
case 34:
|
||||
case 25:
|
||||
ActorExtra[x].temp_data[4] = !ActorExtra[x].temp_data[4];
|
||||
if (ActorExtra[x].temp_data[4])
|
||||
actor[x].t_data[4] = !actor[x].t_data[4];
|
||||
if (actor[x].t_data[4])
|
||||
P_DoQuote(15,g_player[snum].ps);
|
||||
else P_DoQuote(2,g_player[snum].ps);
|
||||
break;
|
||||
|
@ -1912,7 +1912,7 @@ int32_t Sect_DamageCeiling(int32_t sn)
|
|||
while (j >= 0)
|
||||
{
|
||||
if (sprite[j].hitag == SHT)
|
||||
ActorExtra[j].temp_data[3] = 1;
|
||||
actor[j].t_data[3] = 1;
|
||||
j = nextspritestat[j];
|
||||
}
|
||||
break;
|
||||
|
@ -2160,9 +2160,9 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
|
||||
case FORCESPHERE__STATIC:
|
||||
sprite[i].xrepeat = 0;
|
||||
ActorExtra[OW].temp_data[0] = 32;
|
||||
ActorExtra[OW].temp_data[1] = !ActorExtra[OW].temp_data[1];
|
||||
ActorExtra[OW].temp_data[2] ++;
|
||||
actor[OW].t_data[0] = 32;
|
||||
actor[OW].t_data[1] = !actor[OW].t_data[1];
|
||||
actor[OW].t_data[2] ++;
|
||||
A_Spawn(i,EXPLOSION2);
|
||||
break;
|
||||
|
||||
|
@ -2365,7 +2365,7 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
if (sprite[i].statnum == STAT_ZOMBIEACTOR)
|
||||
{
|
||||
changespritestat(i, STAT_ACTOR);
|
||||
ActorExtra[i].timetosleep = SLEEPTIME;
|
||||
actor[i].timetosleep = SLEEPTIME;
|
||||
}
|
||||
if ((RX < 24 || PN == SHARK) && sprite[sn].picnum == SHRINKSPARK) return;
|
||||
}
|
||||
|
@ -2375,10 +2375,10 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
if (sprite[sn].picnum == FREEZEBLAST && ((PN == APLAYER && sprite[i].pal == 1) || (g_freezerSelfDamage == 0 && sprite[sn].owner == i)))
|
||||
return;
|
||||
|
||||
ActorExtra[i].picnum = sprite[sn].picnum;
|
||||
ActorExtra[i].extra += sprite[sn].extra;
|
||||
ActorExtra[i].ang = sprite[sn].ang;
|
||||
ActorExtra[i].owner = sprite[sn].owner;
|
||||
actor[i].picnum = sprite[sn].picnum;
|
||||
actor[i].extra += sprite[sn].extra;
|
||||
actor[i].ang = sprite[sn].ang;
|
||||
actor[i].owner = sprite[sn].owner;
|
||||
}
|
||||
|
||||
if (sprite[i].statnum == STAT_PLAYER)
|
||||
|
@ -2387,12 +2387,12 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
if (g_player[p].ps->newowner >= 0)
|
||||
{
|
||||
g_player[p].ps->newowner = -1;
|
||||
g_player[p].ps->posx = g_player[p].ps->oposx;
|
||||
g_player[p].ps->posy = g_player[p].ps->oposy;
|
||||
g_player[p].ps->posz = g_player[p].ps->oposz;
|
||||
g_player[p].ps->pos.x = g_player[p].ps->opos.x;
|
||||
g_player[p].ps->pos.y = g_player[p].ps->opos.y;
|
||||
g_player[p].ps->pos.z = g_player[p].ps->opos.z;
|
||||
g_player[p].ps->ang = g_player[p].ps->oang;
|
||||
|
||||
updatesector(g_player[p].ps->posx,g_player[p].ps->posy,&g_player[p].ps->cursectnum);
|
||||
updatesector(g_player[p].ps->pos.x,g_player[p].ps->pos.y,&g_player[p].ps->cursectnum);
|
||||
P_UpdateScreenPal(g_player[p].ps);
|
||||
|
||||
j = headspritestat[STAT_ACTOR];
|
||||
|
@ -2406,7 +2406,7 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
if (RX < 24 && sprite[sn].picnum == SHRINKSPARK)
|
||||
return;
|
||||
|
||||
if (sprite[ActorExtra[i].owner].picnum != APLAYER)
|
||||
if (sprite[actor[i].owner].picnum != APLAYER)
|
||||
if (ud.player_skill >= 3)
|
||||
sprite[sn].extra += (sprite[sn].extra>>1);
|
||||
}
|
||||
|
@ -2490,7 +2490,7 @@ void G_HandleSharedKeys(int32_t snum)
|
|||
if (p->curr_weapon != KNEE_WEAPON || p->kickback_pic == 0)
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_QUICKKICK,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_QUICKKICK,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
p->quick_kick = 14;
|
||||
|
@ -2536,7 +2536,7 @@ void G_HandleSharedKeys(int32_t snum)
|
|||
if (TEST_SYNC_KEY(sb_snum, SK_INVENTORY) && p->newowner == -1) // inventory button generates event for selected item
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_INVENTORY,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_INVENTORY,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
switch (p->inven_icon)
|
||||
|
@ -2563,7 +2563,7 @@ void G_HandleSharedKeys(int32_t snum)
|
|||
if (TEST_SYNC_KEY(sb_snum, SK_NIGHTVISION))
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_USENIGHTVISION,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_USENIGHTVISION,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0
|
||||
&& p->inv_amount[GET_HEATS] > 0)
|
||||
{
|
||||
|
@ -2578,7 +2578,7 @@ void G_HandleSharedKeys(int32_t snum)
|
|||
if (TEST_SYNC_KEY(sb_snum, SK_STEROIDS))
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_USESTEROIDS,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_USESTEROIDS,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
if (p->inv_amount[GET_STEROIDS] == 400)
|
||||
|
@ -2667,14 +2667,14 @@ CHECKINV1:
|
|||
{
|
||||
/*Gv_SetVar(g_iReturnVarID,dainv,g_player[snum].ps->i,snum);*/
|
||||
aGameVars[g_iReturnVarID].val.lValue = dainv;
|
||||
X_OnEvent(EVENT_INVENTORYLEFT,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_INVENTORYLEFT,g_player[snum].ps->i,snum, -1);
|
||||
dainv=aGameVars[g_iReturnVarID].val.lValue;
|
||||
}
|
||||
else if (TEST_SYNC_KEY(sb_snum, SK_INV_RIGHT)) // Inventory_Right
|
||||
{
|
||||
/*Gv_SetVar(g_iReturnVarID,dainv,g_player[snum].ps->i,snum);*/
|
||||
aGameVars[g_iReturnVarID].val.lValue = dainv;
|
||||
X_OnEvent(EVENT_INVENTORYRIGHT,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_INVENTORYRIGHT,g_player[snum].ps->i,snum, -1);
|
||||
dainv=aGameVars[g_iReturnVarID].val.lValue;
|
||||
}
|
||||
|
||||
|
@ -2696,23 +2696,14 @@ CHECKINV1:
|
|||
|
||||
switch (j)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
X_OnEvent(EVENT_WEAPKEY1+j,p->i,snum, -1);
|
||||
default:
|
||||
VM_OnEvent(EVENT_WEAPKEY1+j,p->i,snum, -1);
|
||||
break;
|
||||
case 10:
|
||||
X_OnEvent(EVENT_PREVIOUSWEAPON,p->i,snum, -1);
|
||||
VM_OnEvent(EVENT_PREVIOUSWEAPON,p->i,snum, -1);
|
||||
break;
|
||||
case 11:
|
||||
X_OnEvent(EVENT_NEXTWEAPON,p->i,snum, -1);
|
||||
VM_OnEvent(EVENT_NEXTWEAPON,p->i,snum, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2754,7 +2745,7 @@ CHECKINV1:
|
|||
if (k == -1) k = 9;
|
||||
else if (k == 10) k = 0;
|
||||
|
||||
if (p->gotweapon[k] && p->ammo_amount[k] > 0)
|
||||
if ((p->gotweapon && (1<<k)) && p->ammo_amount[k] > 0)
|
||||
{
|
||||
if (PLUTOPAK) // JBF 20040116: so we don't select grower with v1.3d
|
||||
if (k == SHRINKER_WEAPON && (p->subweapon&(1<<GROW_WEAPON)))
|
||||
|
@ -2763,14 +2754,16 @@ CHECKINV1:
|
|||
break;
|
||||
}
|
||||
else // JBF: grower with no ammo, but shrinker with ammo, switch to shrink
|
||||
if (PLUTOPAK && k == GROW_WEAPON && p->ammo_amount[GROW_WEAPON] == 0 && p->gotweapon[SHRINKER_WEAPON] && p->ammo_amount[SHRINKER_WEAPON] > 0) // JBF 20040116: added PLUTOPAK so we don't select grower with v1.3d
|
||||
if (PLUTOPAK && k == GROW_WEAPON && p->ammo_amount[GROW_WEAPON] == 0 &&
|
||||
(p->gotweapon & (1<<SHRINKER_WEAPON)) && p->ammo_amount[SHRINKER_WEAPON] > 0) // JBF 20040116: added PLUTOPAK so we don't select grower with v1.3d
|
||||
{
|
||||
j = SHRINKER_WEAPON;
|
||||
p->subweapon &= ~(1<<GROW_WEAPON);
|
||||
break;
|
||||
}
|
||||
else // JBF: shrinker with no ammo, but grower with ammo, switch to grow
|
||||
if (PLUTOPAK && k == SHRINKER_WEAPON && p->ammo_amount[SHRINKER_WEAPON] == 0 && p->gotweapon[SHRINKER_WEAPON] && p->ammo_amount[GROW_WEAPON] > 0) // JBF 20040116: added PLUTOPAK so we don't select grower with v1.3d
|
||||
if (PLUTOPAK && k == SHRINKER_WEAPON && p->ammo_amount[SHRINKER_WEAPON] == 0 &&
|
||||
(p->gotweapon & (1<<SHRINKER_WEAPON)) && p->ammo_amount[GROW_WEAPON] > 0) // JBF 20040116: added PLUTOPAK so we don't select grower with v1.3d
|
||||
{
|
||||
j = GROW_WEAPON;
|
||||
p->subweapon |= (1<<GROW_WEAPON);
|
||||
|
@ -2789,7 +2782,7 @@ CHECKINV1:
|
|||
Gv_SetVar(g_iWorksLikeVarID,aplWeaponWorksLike[p->curr_weapon][snum],p->i,snum);
|
||||
Gv_SetVar(g_iWeaponVarID,j, p->i, snum);
|
||||
aGameVars[g_iReturnVarID].val.lValue = j;
|
||||
X_OnEvent(EVENT_SELECTWEAPON,p->i,snum, -1);
|
||||
VM_OnEvent(EVENT_SELECTWEAPON,p->i,snum, -1);
|
||||
j = aGameVars[g_iReturnVarID].val.lValue;
|
||||
if ((int32_t)j != -1 && j <= MAX_WEAPONS)
|
||||
{
|
||||
|
@ -2800,7 +2793,7 @@ CHECKINV1:
|
|||
{
|
||||
if (sprite[k].picnum == HEAVYHBOMB && sprite[k].owner == p->i)
|
||||
{
|
||||
p->gotweapon[HANDBOMB_WEAPON] = 1;
|
||||
p->gotweapon |= (1<<HANDBOMB_WEAPON);
|
||||
j = HANDREMOTE_WEAPON;
|
||||
break;
|
||||
}
|
||||
|
@ -2841,7 +2834,7 @@ CHECKINV1:
|
|||
sb_snum |= BIT(SK_HOLSTER);
|
||||
p->weapon_pos = -9;
|
||||
}
|
||||
else if ((int32_t)j >= 0 && p->gotweapon[j] && (uint32_t)p->curr_weapon != j)
|
||||
else if ((int32_t)j >= 0 && (p->gotweapon & (1<<j)) && (uint32_t)p->curr_weapon != j)
|
||||
switch (j)
|
||||
{
|
||||
case PISTOL_WEAPON:
|
||||
|
@ -2870,7 +2863,7 @@ CHECKINV1:
|
|||
break;
|
||||
case HANDBOMB_WEAPON:
|
||||
case TRIPBOMB_WEAPON:
|
||||
if (p->ammo_amount[j] > 0 && p->gotweapon[j])
|
||||
if (p->ammo_amount[j] > 0 && (p->gotweapon & (1<<j)))
|
||||
P_AddWeapon(p, j);
|
||||
break;
|
||||
}
|
||||
|
@ -2883,7 +2876,7 @@ CHECKINV1:
|
|||
if (p->holoduke_on == -1)
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_HOLODUKEON,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_HOLODUKEON,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
if (p->inv_amount[GET_HOLODUKE] > 0)
|
||||
|
@ -2892,8 +2885,8 @@ CHECKINV1:
|
|||
|
||||
if (p->cursectnum > -1)
|
||||
{
|
||||
p->holoduke_on = i = A_InsertSprite(p->cursectnum,p->posx,p->posy,
|
||||
p->posz+(30<<8),APLAYER,-64,0,0,p->ang,0,0,-1,10);
|
||||
p->holoduke_on = i = A_InsertSprite(p->cursectnum,p->pos.x,p->pos.y,
|
||||
p->pos.z+(30<<8),APLAYER,-64,0,0,p->ang,0,0,-1,10);
|
||||
T4 = T5 = 0;
|
||||
SP = snum;
|
||||
sprite[i].extra = 0;
|
||||
|
@ -2907,7 +2900,7 @@ CHECKINV1:
|
|||
else
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_HOLODUKEOFF,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_HOLODUKEOFF,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
A_PlaySound(TELEPORTER,p->holoduke_on);
|
||||
|
@ -2920,7 +2913,7 @@ CHECKINV1:
|
|||
if (TEST_SYNC_KEY(sb_snum, SK_MEDKIT))
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_USEMEDKIT,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_USEMEDKIT,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
if (p->inv_amount[GET_FIRSTAID] > 0 && sprite[p->i].extra < p->max_player_health)
|
||||
|
@ -2947,7 +2940,7 @@ CHECKINV1:
|
|||
if (TEST_SYNC_KEY(sb_snum, SK_JETPACK) && p->newowner == -1)
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_USEJETPACK,g_player[snum].ps->i,snum, -1);
|
||||
VM_OnEvent(EVENT_USEJETPACK,g_player[snum].ps->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
if (p->inv_amount[GET_JETPACK] > 0)
|
||||
|
@ -2970,7 +2963,7 @@ CHECKINV1:
|
|||
else
|
||||
{
|
||||
p->hard_landing = 0;
|
||||
p->poszv = 0;
|
||||
p->posvel.z = 0;
|
||||
A_PlaySound(DUKE_JETPACK_OFF,p->i);
|
||||
S_StopEnvSound(DUKE_JETPACK_IDLE,p->i);
|
||||
S_StopEnvSound(DUKE_JETPACK_ON,p->i);
|
||||
|
@ -2984,7 +2977,7 @@ CHECKINV1:
|
|||
if (TEST_SYNC_KEY(sb_snum, SK_TURNAROUND) && p->one_eighty_count == 0)
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_TURNAROUND,p->i,snum, -1);
|
||||
VM_OnEvent(EVENT_TURNAROUND,p->i,snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
{
|
||||
p->one_eighty_count = -1024;
|
||||
|
@ -3027,7 +3020,7 @@ static int32_t hitawall(DukePlayer_t *p,int16_t *hitw)
|
|||
|
||||
*hitw = hitinfo.hitwall;
|
||||
|
||||
return (FindDistance2D(hitinfo.pos.x-p->posx,hitinfo.pos.y-p->posy));
|
||||
return (FindDistance2D(hitinfo.pos.x-p->pos.x,hitinfo.pos.y-p->pos.y));
|
||||
}
|
||||
|
||||
|
||||
|
@ -3087,7 +3080,7 @@ void P_CheckSectors(int32_t snum)
|
|||
if (TEST_SYNC_KEY(g_player[snum].sync->bits, SK_OPEN))
|
||||
{
|
||||
aGameVars[g_iReturnVarID].val.lValue = 0;
|
||||
X_OnEvent(EVENT_USE, p->i, snum, -1);
|
||||
VM_OnEvent(EVENT_USE, p->i, snum, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue != 0)
|
||||
g_player[snum].sync->bits &= ~BIT(SK_OPEN);
|
||||
}
|
||||
|
@ -3141,17 +3134,17 @@ void P_CheckSectors(int32_t snum)
|
|||
}
|
||||
|
||||
if (p->newowner >= 0)
|
||||
neartag(p->oposx,p->oposy,p->oposz,sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
neartag(p->opos.x,p->opos.y,p->opos.z,sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
else
|
||||
{
|
||||
neartag(p->posx,p->posy,p->posz,sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
neartag(p->pos.x,p->pos.y,p->pos.z,sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
if (neartagsprite == -1 && neartagwall == -1 && neartagsector == -1)
|
||||
neartag(p->posx,p->posy,p->posz+(8<<8),sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
neartag(p->pos.x,p->pos.y,p->pos.z+(8<<8),sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
if (neartagsprite == -1 && neartagwall == -1 && neartagsector == -1)
|
||||
neartag(p->posx,p->posy,p->posz+(16<<8),sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
neartag(p->pos.x,p->pos.y,p->pos.z+(16<<8),sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,1);
|
||||
if (neartagsprite == -1 && neartagwall == -1 && neartagsector == -1)
|
||||
{
|
||||
neartag(p->posx,p->posy,p->posz+(16<<8),sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,3);
|
||||
neartag(p->pos.x,p->pos.y,p->pos.z+(16<<8),sprite[p->i].sectnum,p->oang,&neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,1280L,3);
|
||||
if (neartagsprite >= 0)
|
||||
{
|
||||
switch (DynamicTileMap[sprite[neartagsprite].picnum])
|
||||
|
@ -3228,30 +3221,28 @@ void P_CheckSectors(int32_t snum)
|
|||
case NUKEBUTTON__STATIC:
|
||||
hitawall(p,&j);
|
||||
if (j >= 0 && wall[j].overpicnum == 0)
|
||||
if (ActorExtra[neartagsprite].temp_data[0] == 0)
|
||||
if (actor[neartagsprite].t_data[0] == 0)
|
||||
{
|
||||
if (ud.noexits && (g_netServer || ud.multimode > 1))
|
||||
{
|
||||
// NUKEBUTTON frags the player
|
||||
ActorExtra[p->i].picnum = NUKEBUTTON;
|
||||
ActorExtra[p->i].extra = 250;
|
||||
actor[p->i].picnum = NUKEBUTTON;
|
||||
actor[p->i].extra = 250;
|
||||
}
|
||||
else
|
||||
{
|
||||
ActorExtra[neartagsprite].temp_data[0] = 1;
|
||||
actor[neartagsprite].t_data[0] = 1;
|
||||
sprite[neartagsprite].owner = p->i;
|
||||
p->buttonpalette = sprite[neartagsprite].pal;
|
||||
if (p->buttonpalette)
|
||||
ud.secretlevel = sprite[neartagsprite].lotag;
|
||||
else ud.secretlevel = 0;
|
||||
ud.secretlevel =
|
||||
(p->buttonpalette = sprite[neartagsprite].pal) ? sprite[neartagsprite].lotag : 0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
case WATERFOUNTAIN__STATIC:
|
||||
if (ActorExtra[neartagsprite].temp_data[0] != 1)
|
||||
if (actor[neartagsprite].t_data[0] != 1)
|
||||
{
|
||||
ActorExtra[neartagsprite].temp_data[0] = 1;
|
||||
actor[neartagsprite].t_data[0] = 1;
|
||||
sprite[neartagsprite].owner = p->i;
|
||||
|
||||
if (sprite[p->i].extra < p->max_player_health)
|
||||
|
@ -3265,10 +3256,10 @@ void P_CheckSectors(int32_t snum)
|
|||
case PLUG__STATIC:
|
||||
A_PlaySound(SHORT_CIRCUIT,p->i);
|
||||
sprite[p->i].extra -= 2+(krand()&3);
|
||||
p->pals[0] = 48;
|
||||
p->pals[1] = 48;
|
||||
p->pals[2] = 64;
|
||||
p->pals_time = 32;
|
||||
p->pals.r = 48;
|
||||
p->pals.g = 48;
|
||||
p->pals.b = 64;
|
||||
p->pals.f = 32;
|
||||
break;
|
||||
|
||||
case VIEWSCREEN__STATIC:
|
||||
|
@ -3304,11 +3295,11 @@ CLEARCAMERAS:
|
|||
|
||||
if (i < 0)
|
||||
{
|
||||
Bmemcpy(p, &p->oposx, sizeof(vec3_t));
|
||||
Bmemcpy(p, &p->opos.x, sizeof(vec3_t));
|
||||
p->ang = p->oang;
|
||||
p->newowner = -1;
|
||||
|
||||
updatesector(p->posx,p->posy,&p->cursectnum);
|
||||
updatesector(p->pos.x,p->pos.y,&p->cursectnum);
|
||||
P_UpdateScreenPal(p);
|
||||
|
||||
|
||||
|
|
|
@ -318,9 +318,12 @@ int32_t S_LoadSound(uint32_t num)
|
|||
}
|
||||
|
||||
g_sounds[num].soundsiz = l = kfilelength(fp);
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
g_soundlocks[num] = 200;
|
||||
|
||||
allocache((intptr_t *)&g_sounds[num].ptr, l, (char *)&g_soundlocks[num]);
|
||||
mutex_unlock(&cachemutex);
|
||||
l = kread(fp, g_sounds[num].ptr , l);
|
||||
kclose(fp);
|
||||
|
||||
|
@ -347,8 +350,10 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
|||
{
|
||||
if (g_sounds[num].num < MAXSOUNDINSTANCES && i >= 0 && i < MAXSPRITES)
|
||||
{
|
||||
while(mutex_lock(&cachemutex));
|
||||
while (j < MAXSOUNDINSTANCES && g_sounds[num].SoundOwner[j].voice > 0)
|
||||
j++;
|
||||
mutex_unlock(&cachemutex);
|
||||
|
||||
if (j >= MAXSOUNDINSTANCES)
|
||||
{
|
||||
|
@ -358,9 +363,12 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
|||
|
||||
if ((voice = S_PlaySound(num)) >= FX_Ok)
|
||||
{
|
||||
while(mutex_lock(&cachemutex));
|
||||
g_sounds[num].SoundOwner[j].i = i;
|
||||
g_sounds[num].num++;
|
||||
return (g_sounds[num].SoundOwner[j].voice = voice);
|
||||
g_sounds[num].SoundOwner[j].voice = voice;
|
||||
mutex_unlock(&cachemutex);
|
||||
return voice;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
@ -439,9 +447,14 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
|||
if (S_LoadSound(num) == 0)
|
||||
return -1;
|
||||
}
|
||||
else if (g_soundlocks[num] < 200)
|
||||
g_soundlocks[num] = 200;
|
||||
else g_soundlocks[num]++;
|
||||
else
|
||||
{
|
||||
while(mutex_lock(&cachemutex));
|
||||
if (g_soundlocks[num] < 200)
|
||||
g_soundlocks[num] = 200;
|
||||
else g_soundlocks[num]++;
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
if (g_sounds[num].m&16) sndist = 0;
|
||||
|
||||
|
@ -450,15 +463,19 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
|||
|
||||
j = 0;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
while (j < MAXSOUNDINSTANCES && g_sounds[num].SoundOwner[j].voice > 0)
|
||||
j++;
|
||||
|
||||
if (j >= MAXSOUNDINSTANCES)
|
||||
{
|
||||
g_soundlocks[num]--;
|
||||
mutex_unlock(&cachemutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mutex_unlock(&cachemutex);
|
||||
|
||||
if (g_sounds[num].m&1)
|
||||
{
|
||||
if (g_sounds[num].num > 0) return -1;
|
||||
|
@ -472,14 +489,19 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
|||
(num * MAXSOUNDINSTANCES) + j);
|
||||
}
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
|
||||
if (voice >= FX_Ok)
|
||||
{
|
||||
g_sounds[num].SoundOwner[j].i = i;
|
||||
g_sounds[num].num++;
|
||||
return (g_sounds[num].SoundOwner[j].voice = voice);
|
||||
g_sounds[num].SoundOwner[j].voice = voice;
|
||||
mutex_unlock(&cachemutex);
|
||||
return voice;
|
||||
}
|
||||
|
||||
g_soundlocks[num]--;
|
||||
mutex_unlock(&cachemutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -508,9 +530,14 @@ int32_t S_PlaySound(int32_t num)
|
|||
if (S_LoadSound(num) == 0)
|
||||
return -1;
|
||||
}
|
||||
else if (g_soundlocks[num] < 200)
|
||||
g_soundlocks[num] = 200;
|
||||
else g_soundlocks[num]++;
|
||||
else
|
||||
{
|
||||
while(mutex_lock(&cachemutex));
|
||||
if (g_soundlocks[num] < 200)
|
||||
g_soundlocks[num] = 200;
|
||||
else g_soundlocks[num]++;
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
voice = (g_sounds[num].m&1) ?
|
||||
FX_PlayLoopedAuto(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
||||
|
@ -519,7 +546,9 @@ int32_t S_PlaySound(int32_t num)
|
|||
|
||||
if (voice < FX_Ok)
|
||||
{
|
||||
while(mutex_lock(&cachemutex));
|
||||
g_soundlocks[num]--;
|
||||
mutex_unlock(&cachemutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -537,12 +566,21 @@ void S_StopSound(int32_t num)
|
|||
if (num < 0 || num > g_maxSoundPos || g_sounds[num].num <= 0)
|
||||
return;
|
||||
|
||||
retry:
|
||||
{
|
||||
int32_t j=MAXSOUNDINSTANCES-1;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
for (; j>=0; j--)
|
||||
{
|
||||
if (g_sounds[num].SoundOwner[j].voice)
|
||||
{
|
||||
mutex_unlock(&cachemutex);
|
||||
FX_StopSound(g_sounds[num].SoundOwner[j].voice);
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -551,16 +589,25 @@ void S_StopEnvSound(int32_t num,int32_t i)
|
|||
if (num < 0 || num > g_maxSoundPos || g_sounds[num].num <= 0)
|
||||
return;
|
||||
|
||||
retry:
|
||||
{
|
||||
int32_t j=MAXSOUNDINSTANCES-1;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
for (; j>=0; j--)
|
||||
{
|
||||
if (g_sounds[num].SoundOwner[j].i == i && g_sounds[num].SoundOwner[j].voice)
|
||||
{
|
||||
mutex_unlock(&cachemutex);
|
||||
FX_StopSound(g_sounds[num].SoundOwner[j].voice);
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
}
|
||||
|
||||
void S_Pan3D(void)
|
||||
void S_Update(void)
|
||||
{
|
||||
vec3_t *s, *c;
|
||||
int32_t sndist,sndang,ca,j,k,i,cs;
|
||||
|
@ -582,6 +629,7 @@ void S_Pan3D(void)
|
|||
|
||||
j = g_maxSoundPos;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
do
|
||||
{
|
||||
for (k=MAXSOUNDINSTANCES-1; k>=0; k--)
|
||||
|
@ -628,10 +676,13 @@ void S_Pan3D(void)
|
|||
if (sndist < ((255-LOUDESTVOLUME)<<6))
|
||||
sndist = ((255-LOUDESTVOLUME)<<6);
|
||||
|
||||
mutex_unlock(&cachemutex);
|
||||
FX_Pan3D(g_sounds[j].SoundOwner[k].voice, sndang>>4, sndist>>6);
|
||||
mutex_lock(&cachemutex);
|
||||
}
|
||||
}
|
||||
while (j--);
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
void S_Callback(uint32_t num)
|
||||
|
@ -639,11 +690,15 @@ void S_Callback(uint32_t num)
|
|||
if ((int32_t)num == MUSIC_ID)
|
||||
return;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
|
||||
// negative index is RTS playback
|
||||
if ((int32_t)num < 0)
|
||||
{
|
||||
|
||||
if (lumplockbyte[-(int32_t)num] >= 200)
|
||||
lumplockbyte[-(int32_t)num]--;
|
||||
mutex_unlock(&cachemutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -655,9 +710,9 @@ void S_Callback(uint32_t num)
|
|||
{
|
||||
int32_t i = g_sounds[num].SoundOwner[j].i;
|
||||
|
||||
// MUSICANDSFX uses temp_data[0] to control restarting the sound
|
||||
// MUSICANDSFX uses t_data[0] to control restarting the sound
|
||||
if (sprite[i].picnum == MUSICANDSFX && sector[sprite[i].sectnum].lotag < 3 && sprite[i].lotag < 999)
|
||||
ActorExtra[i].temp_data[0] = 0;
|
||||
actor[i].t_data[0] = 0;
|
||||
|
||||
g_sounds[num].SoundOwner[j].i = -1;
|
||||
g_sounds[num].SoundOwner[j].voice = 0;
|
||||
|
@ -666,12 +721,14 @@ void S_Callback(uint32_t num)
|
|||
}
|
||||
}
|
||||
g_soundlocks[num]--;
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
void S_ClearSoundLocks(void)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
while(mutex_lock(&cachemutex));
|
||||
for (i=g_maxSoundPos; i >= 0 ; i--)
|
||||
if (g_soundlocks[i] >= 200)
|
||||
g_soundlocks[i] = 199;
|
||||
|
@ -679,6 +736,7 @@ void S_ClearSoundLocks(void)
|
|||
for (i=0; i<11; i++)
|
||||
if (lumplockbyte[i] >= 200)
|
||||
lumplockbyte[i] = 199;
|
||||
mutex_unlock(&cachemutex);
|
||||
}
|
||||
|
||||
int32_t A_CheckSoundPlaying(int32_t i, int32_t num)
|
||||
|
|
|
@ -381,7 +381,7 @@ void S_StopEnvSound(int32_t num,int32_t i)
|
|||
}
|
||||
}
|
||||
|
||||
void S_Pan3D(void)
|
||||
void S_Update(void)
|
||||
{
|
||||
int32_t sndist, sx, sy, sz, cx, cy, cz;
|
||||
int32_t sndang,ca,j,k,i,cs;
|
||||
|
|
|
@ -31,7 +31,7 @@ void S_PlaySound(int32_t);
|
|||
int32_t A_PlaySound(uint32_t num, int32_t i);
|
||||
void S_StopSound(int32_t num);
|
||||
void S_StopEnvSound(int32_t num,int32_t i);
|
||||
void S_Pan3D(void);
|
||||
void S_Update(void);
|
||||
int32_t A_CheckSoundPlaying(int32_t i, int32_t num);
|
||||
int32_t S_CheckSoundPlaying(int32_t i, int32_t num);
|
||||
void S_ClearSoundLocks(void);
|
||||
|
|
Loading…
Reference in a new issue