mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Remove dead copy protection and watcom support code, fix structure alignment and packing issues preventing Polymer from working with MSVC, enable link time code generation (whole program optimization) for MSVC builds, fix most warnings showing up in MSVC with /w2, add pulsating dynamic lights when holding the shrinker or expander
git-svn-id: https://svn.eduke32.com/eduke32@1454 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
623ea7b303
commit
3aaab4b63d
53 changed files with 270 additions and 2950 deletions
|
@ -71,8 +71,9 @@ ifeq (4,$(GCC_MAJOR))
|
|||
endif
|
||||
|
||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
|
||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -D_FORTIFY_SOURCE=2 \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
|
||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -D_FORTIFY_SOURCE=2 \
|
||||
-fjump-tables -fno-stack-protector
|
||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=-lm
|
||||
|
|
|
@ -18,8 +18,8 @@ flags_cl= /Od /Zi
|
|||
flags_link=/DEBUG
|
||||
!else
|
||||
# release options
|
||||
flags_cl=/Ox
|
||||
flags_link=/RELEASE
|
||||
flags_cl=/Ox /GL /arch:SSE
|
||||
flags_link=/RELEASE /LTCG
|
||||
!endif
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ LINK=link /nologo /opt:ref
|
|||
MT=mt
|
||||
CFLAGS= /MT /J /nologo $(flags_cl) \
|
||||
/I$(INC) /I$(EINC)\ /I$(SRC)\jmact /I$(SRC)\jaudiolib /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" \
|
||||
/DNOCOPYPROTECT /D "_CRT_SECURE_NO_DEPRECATE" -W2 $(ENGINEOPTS) \
|
||||
/DNOCOPYPROTECT /D "_CRT_SECURE_NO_DEPRECATE" /W2 $(ENGINEOPTS) \
|
||||
/I$(DXROOT)\include" /DRENDERTYPEWIN=1
|
||||
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \
|
||||
/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
# EDuke32 Makefile for Watcom Make
|
||||
|
||||
SRC=source
|
||||
OBJ=obj
|
||||
EROOT=..\build
|
||||
EINC=$(EROOT)\include
|
||||
EOBJ=eobj
|
||||
INC=$(SRC)
|
||||
o=obj
|
||||
|
||||
ENGINELIB=engine.lib
|
||||
EDITORLIB=build.lib
|
||||
|
||||
!ifdef __LOADDLL__
|
||||
! loaddll wcc386 wccd386
|
||||
!endif
|
||||
|
||||
DXROOT=c:\sdks\msc\dx7
|
||||
|
||||
ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL
|
||||
|
||||
CC=wcc386
|
||||
CXX=wpp386
|
||||
CFLAGS= -zq -5r -s -orb -fp5 -d2 -db &
|
||||
-i=$(INC) -i=$(EINC) -i=$(SRC)\jmact -i=$(SRC)\jaudiolib -i=$(DXROOT)\include &
|
||||
-dRENDERTYPEWIN=1 -dNOCOPYPROTECT $(ENGINEOPTS)
|
||||
LIBS=wsock32.lib dxguid.lib winmm.lib #opengl32.lib
|
||||
WASMFLAGS=-d1
|
||||
EXESUFFIX=.exe
|
||||
|
||||
JMACTOBJ=$(OBJ)\util_lib.$o &
|
||||
$(OBJ)\file_lib.$o &
|
||||
$(OBJ)\control.$o &
|
||||
$(OBJ)\keyboard.$o &
|
||||
$(OBJ)\mouse.$o &
|
||||
$(OBJ)\mathutil.$o &
|
||||
$(OBJ)\scriplib.$o
|
||||
|
||||
JAUDIOLIB_FX_STUB=$(OBJ)\jaudiolib_fxstub.$o
|
||||
JAUDIOLIB_MUSIC_STUB=$(OBJ)\jaudiolib_musicstub.$o
|
||||
JAUDIOLIB_FX=$(OBJ)\mv_mix.$o &
|
||||
$(OBJ)\mv_mix16.$o &
|
||||
$(OBJ)\mvreverb.$o &
|
||||
$(OBJ)\pitch.$o &
|
||||
$(OBJ)\multivoc.$o &
|
||||
$(OBJ)\openal.$o &
|
||||
$(OBJ)\ll_man.$o &
|
||||
$(OBJ)\fx_man.$o &
|
||||
$(OBJ)\dsoundout.$o
|
||||
JAUDIOLIB_MUSIC=$(OBJ)\midi.$o &
|
||||
$(OBJ)\mpu401.$o &
|
||||
$(OBJ)\music.$o
|
||||
#JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC) $(JAUDIOLIB_FX) $(OBJ)\sounds.$o
|
||||
#JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC_STUB) $(JAUDIOLIB_FX_STUB) $(OBJ)\sounds.$o
|
||||
|
||||
GAMEOBJS=$(OBJ)\game.$o &
|
||||
$(OBJ)\actors.$o &
|
||||
$(OBJ)\anim.$o &
|
||||
$(OBJ)\gamedef.$o &
|
||||
$(OBJ)\gameexec.$o &
|
||||
$(OBJ)\gamestructures.$o &
|
||||
$(OBJ)\gamevars.$o &
|
||||
$(OBJ)\global.$o &
|
||||
$(OBJ)\menus.$o &
|
||||
$(OBJ)\namesdyn.$o &
|
||||
$(OBJ)\player.$o &
|
||||
$(OBJ)\premap.$o &
|
||||
$(OBJ)\savegame.$o &
|
||||
$(OBJ)\sector.$o &
|
||||
$(OBJ)\rts.$o &
|
||||
$(OBJ)\config.$o &
|
||||
$(OBJ)\animlib.$o &
|
||||
$(OBJ)\testcd.$o &
|
||||
$(OBJ)\osdfuncs.$o &
|
||||
$(OBJ)\osdcmds.$o &
|
||||
$(OBJ)\winbits.$o &
|
||||
$(OBJ)\startwin.game.$o &
|
||||
$(JMACTOBJ) &
|
||||
$(JAUDIOLIBOBJ)
|
||||
|
||||
EDITOROBJS=$(OBJ)\astub.$o
|
||||
|
||||
# RULES
|
||||
.EXTENSIONS: .wasm .res .rc
|
||||
|
||||
.wasm: $(SRC)\
|
||||
.wasm: $(SRC)\jaudiolib
|
||||
.c: $(SRC)\
|
||||
.cpp: $(SRC)\
|
||||
.c: $(SRC)\jmact
|
||||
.c: $(SRC)\jaudiolib
|
||||
.c: $(SRC)\util
|
||||
.rc: $(SRC)\misc
|
||||
|
||||
.wasm.$o:
|
||||
wasm $(WASMFLAGS) -fo=$(OBJ)\.$o $[@
|
||||
|
||||
.c.$o:
|
||||
$(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
|
||||
.cpp.$o:
|
||||
$(CXX) $(CFLAGS) -fo=$(OBJ)\.$o $[@
|
||||
|
||||
.rc.res:
|
||||
wrc -i=$(EINC) -i=$(SRC) -fo=$^*.res -r $[@
|
||||
|
||||
|
||||
# TARGETS
|
||||
all: eduke32$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
|
||||
%null
|
||||
|
||||
eduke32$(EXESUFFIX): $(GAMEOBJS) $(OBJ)\gameres.res $(EOBJ)\$(ENGINELIB)
|
||||
wlink NAME $@ &
|
||||
SYSTEM WIN95 &
|
||||
DEBUG ALL &
|
||||
FILE { $(GAMEOBJS) $(ENGINEOBJS) } &
|
||||
RESOURCE $(OBJ)\gameres.res &
|
||||
LIBPATH $(DXROOT)\lib &
|
||||
LIBPATH $(EOBJ) &
|
||||
LIBRARY { $(ENGINELIB) $(LIBS) }
|
||||
|
||||
mapster32$(EXESUFFIX): $(EDITOROBJS) $(OBJ)\buildres.res $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB)
|
||||
wlink NAME $@ &
|
||||
SYSTEM WIN95 &
|
||||
DEBUG ALL &
|
||||
FILE { $(EDITOROBJS) } &
|
||||
RESOURCE $(OBJ)\buildres.res &
|
||||
LIBPATH $(DXROOT)\lib &
|
||||
LIBPATH $(EOBJ) &
|
||||
LIBRARY { $(LIBS) $(ENGINELIB) $(EDITORLIB) }
|
||||
|
||||
!include Makefile.deps
|
||||
|
||||
cwd=$+ $(%cwd) $-
|
||||
enginelib editorlib: .SYMBOLIC
|
||||
-mkdir $(EOBJ)
|
||||
%write $(EOBJ)\overrides.mak OBJ=$(cwd)\$(EOBJ)
|
||||
%write $(EOBJ)\overrides.mak CFLAGS=$(ENGINEOPTS)
|
||||
cd $(EROOT)
|
||||
wmake -f Makefile.watcom OVERRIDES=$(cwd)\$(EOBJ)\overrides.mak $@
|
||||
cd $(cwd)
|
||||
|
||||
$(EOBJ)\$(EDITORLIB): editorlib .SYMBOLIC
|
||||
$(EOBJ)\$(ENGINELIB): enginelib .SYMBOLIC
|
||||
|
||||
# PHONIES
|
||||
clean: .SYMBOLIC
|
||||
-del /q $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
|
||||
|
||||
veryclean: clean .SYMBOLIC
|
||||
-del /q $(EOBJ)\*
|
|
@ -102,6 +102,7 @@ endif
|
|||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
||||
-DKSFORBUILD -I$(INC) -D_FORTIFY_SOURCE=2 \
|
||||
-fjump-tables -fno-stack-protector
|
||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=
|
||||
|
|
|
@ -34,10 +34,12 @@ TARGETOPTS=/DNOASM
|
|||
# debugging options
|
||||
flags_cl=/Od /Zi
|
||||
flags_link=/DEBUG
|
||||
flags_lib=
|
||||
!else
|
||||
# release options
|
||||
flags_cl=/Ox
|
||||
flags_link=/RELEASE
|
||||
flags_cl=/Ox /GL /arch:SSE
|
||||
flags_link=/RELEASE /LTCG
|
||||
flags_lib=/LTCG
|
||||
!endif
|
||||
|
||||
CC=cl
|
||||
|
@ -119,11 +121,11 @@ utils: $(UTILS) ;
|
|||
|
||||
enginelib: $(OBJ)\$(ENGINELIB) ;
|
||||
$(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
|
||||
lib /out:$@ /nologo $**
|
||||
lib $(flags_lib) /out:$@ /nologo $**
|
||||
|
||||
editorlib: $(OBJ)\$(EDITORLIB) ;
|
||||
$(OBJ)\$(EDITORLIB): $(EDITOROBJS)
|
||||
lib /out:$@ /nologo $**
|
||||
lib $(flags_lib) /out:$@ /nologo $**
|
||||
|
||||
# the tools
|
||||
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
# Build Makefile for Watcom Make
|
||||
|
||||
!ifdef OVERRIDES
|
||||
!include $(OVERRIDES)
|
||||
!endif
|
||||
|
||||
SRC=src
|
||||
!ifndef OBJ
|
||||
OBJ=obj.watcom
|
||||
!endif
|
||||
INC=include
|
||||
!ifndef CFLAGS
|
||||
CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dKSFORBUILD
|
||||
!endif
|
||||
|
||||
o=obj
|
||||
res=res
|
||||
asm=wasm
|
||||
|
||||
ENGINELIB=engine.lib
|
||||
EDITORLIB=build.lib
|
||||
|
||||
DXROOT=c:\sdks\directx\dx7
|
||||
|
||||
!ifdef __LOADDLL__
|
||||
! loaddll wcc386 wccd386
|
||||
! loaddll wpp386 wppd386
|
||||
!endif
|
||||
|
||||
# -d these to enable certain features of the port's compile process
|
||||
# NOASM When defined, uses C code instead assembly code
|
||||
TARGETOPTS=#-dNOASM
|
||||
|
||||
CC=wcc386
|
||||
CXX=wpp386
|
||||
AS=wasm
|
||||
RC=wrc
|
||||
CFLAGS+= -zq -5r -s -orb -fp5 $(TARGETOPTS) -d2 -dRENDERTYPEWIN=1 &
|
||||
-i=$(INC) -i=$(SRC) -i=$(DXROOT)\include -i=..\jfaud\inc
|
||||
LIBS=dxguid.lib wsock32.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib
|
||||
ASFLAGS=# -d1
|
||||
EXESUFFIX=.exe
|
||||
|
||||
ENGINEOBJS=$(OBJ)\a.$o &
|
||||
$(OBJ)\baselayer.$o &
|
||||
$(OBJ)\cache1d.$o &
|
||||
$(OBJ)\compat.$o &
|
||||
$(OBJ)\crc32.$o &
|
||||
$(OBJ)\defs.$o &
|
||||
$(OBJ)\engine.$o &
|
||||
$(OBJ)\glbuild.$o &
|
||||
$(OBJ)\kplib.$o &
|
||||
$(OBJ)\lzf_c.$o &
|
||||
$(OBJ)\lzf_d.$o &
|
||||
$(OBJ)\lzwnew.$o &
|
||||
$(OBJ)\md4.$o &
|
||||
$(OBJ)\mmulti.$o &
|
||||
$(OBJ)\osd.$o &
|
||||
$(OBJ)\pragmas.$o &
|
||||
$(OBJ)\scriptfile.$o &
|
||||
$(OBJ)\winlayer.$o
|
||||
|
||||
EDITOROBJS=$(OBJ)\build.$o &
|
||||
$(OBJ)\config.$o &
|
||||
$(OBJ)\startwin.editor.$o
|
||||
|
||||
# RULES
|
||||
.EXTENSIONS: .wasm .res .rc
|
||||
|
||||
.wasm: $(SRC)
|
||||
.c: $(SRC)
|
||||
.cpp: $(SRC)
|
||||
.c: $(SRC)\util
|
||||
.rc: $(SRC)\misc
|
||||
|
||||
.wasm.$o:
|
||||
$(AS) $(ASFLAGS) -fo=$(OBJ)\.$o $[@
|
||||
|
||||
.c.$o:
|
||||
$(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
|
||||
|
||||
.rc.$(res):
|
||||
$(RC) -i=$(SRC) -i=$(INC) -fo=$^*.$(res) -r $[@
|
||||
|
||||
# TARGETS
|
||||
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX)
|
||||
|
||||
all: .SYMBOLIC
|
||||
%null
|
||||
|
||||
utils: $(UTILS) .SYMBOLIC
|
||||
%null
|
||||
|
||||
enginelib: $(OBJ)\$(ENGINELIB) .SYMBOLIC
|
||||
%null
|
||||
|
||||
$(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
|
||||
%create $(OBJ)\$(ENGINELIB).tmp
|
||||
for %i in ($(ENGINEOBJS)) do %append $(OBJ)\$(ENGINELIB).tmp +%i
|
||||
wlib -b -n $^* @$(OBJ)\$(ENGINELIB).tmp
|
||||
erase $(OBJ)\$(ENGINELIB).tmp
|
||||
|
||||
editorlib: $(OBJ)\$(EDITORLIB) .SYMBOLIC
|
||||
%null
|
||||
|
||||
$(OBJ)\$(EDITORLIB): $(EDITOROBJS)
|
||||
%create $(OBJ)\$(EDITORLIB).tmp
|
||||
for %i in ($(EDITOROBJS)) do %append $(OBJ)\$(EDITORLIB).tmp +%i
|
||||
wlib -b -n $^* @$(OBJ)\$(EDITORLIB).tmp
|
||||
erase $(OBJ)\$(EDITORLIB).tmp
|
||||
|
||||
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o
|
||||
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
||||
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o
|
||||
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
||||
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
|
||||
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
||||
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
|
||||
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
||||
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
|
||||
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
||||
|
||||
# DEPENDENCIES
|
||||
!include Makefile.deps
|
||||
|
||||
# PHONIES
|
||||
clean: .SYMBOLIC
|
||||
-erase /q $(OBJ)\* $(UTILS) *.err
|
||||
|
|
@ -8,94 +8,7 @@
|
|||
|
||||
#include "compat.h"
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||
|
||||
extern int32_t mmxoverlay();
|
||||
#pragma aux mmxoverlay modify [eax ebx ecx edx];
|
||||
extern int32_t sethlinesizes(int32_t,int32_t,int32_t);
|
||||
#pragma aux sethlinesizes parm [eax][ebx][ecx];
|
||||
extern int32_t setpalookupaddress(char *);
|
||||
#pragma aux setpalookupaddress parm [eax];
|
||||
extern int32_t setuphlineasm4(int32_t,int32_t);
|
||||
#pragma aux setuphlineasm4 parm [eax][ebx];
|
||||
extern int32_t hlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux hlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setuprhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux setuprhlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t rhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux rhlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setuprmhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux setuprmhlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t rmhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux rmhlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setupqrhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux setupqrhlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t qrhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux qrhlineasm4 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setvlinebpl(int32_t);
|
||||
#pragma aux setvlinebpl parm [eax];
|
||||
extern int32_t fixtransluscence(int32_t);
|
||||
#pragma aux fixtransluscence parm [eax];
|
||||
extern int32_t prevlineasm1(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux prevlineasm1 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t vlineasm1(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux vlineasm1 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setuptvlineasm(int32_t);
|
||||
#pragma aux setuptvlineasm parm [eax];
|
||||
extern int32_t tvlineasm1(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux tvlineasm1 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setuptvlineasm2(int32_t,int32_t,int32_t);
|
||||
#pragma aux setuptvlineasm2 parm [eax][ebx][ecx];
|
||||
extern int32_t tvlineasm2(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux tvlineasm2 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t mvlineasm1(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux mvlineasm1 parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t setupvlineasm(int32_t);
|
||||
#pragma aux setupvlineasm parm [eax];
|
||||
extern int32_t vlineasm4(int32_t,int32_t);
|
||||
#pragma aux vlineasm4 parm [ecx][edi] modify [eax ebx ecx edx esi edi];
|
||||
extern int32_t setupmvlineasm(int32_t);
|
||||
#pragma aux setupmvlineasm parm [eax];
|
||||
extern int32_t mvlineasm4(int32_t,int32_t);
|
||||
#pragma aux mvlineasm4 parm [ecx][edi] modify [eax ebx ecx edx esi edi];
|
||||
extern void setupspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux setupspritevline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern void spritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux spritevline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern void msetupspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux msetupspritevline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern void mspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux mspritevline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern void tsetupspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux tsetupspritevline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern void tspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux tspritevline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t mhline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux mhline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t mhlineskipmodify(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux mhlineskipmodify parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t msethlineshift(int32_t,int32_t);
|
||||
#pragma aux msethlineshift parm [eax][ebx];
|
||||
extern int32_t thline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux thline parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t thlineskipmodify(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux thlineskipmodify parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t tsethlineshift(int32_t,int32_t);
|
||||
#pragma aux tsethlineshift parm [eax][ebx];
|
||||
extern int32_t setupslopevlin(int32_t,int32_t,int32_t);
|
||||
#pragma aux setupslopevlin parm [eax][ebx][ecx] modify [edx];
|
||||
extern int32_t slopevlin(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux slopevlin parm [eax][ebx][ecx][edx][esi][edi];
|
||||
extern int32_t settransnormal();
|
||||
#pragma aux settransnormal parm;
|
||||
extern int32_t settransreverse();
|
||||
#pragma aux settransreverse parm;
|
||||
extern int32_t setupdrawslab(int32_t,int32_t);
|
||||
#pragma aux setupdrawslab parm [eax][ebx];
|
||||
extern int32_t drawslab(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
|
||||
#pragma aux drawslab parm [eax][ebx][ecx][edx][esi][edi];
|
||||
|
||||
#elif defined(__GNUC__) && defined(__i386__) && !defined(NOASM) // __WATCOMC__
|
||||
#if defined(__GNUC__) && defined(__i386__) && !defined(NOASM)
|
||||
|
||||
#if defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__SYLLABLE__)
|
||||
#define __cdecl
|
||||
|
|
|
@ -63,6 +63,7 @@ struct glinfo {
|
|||
char sm4;
|
||||
char dumped;
|
||||
};
|
||||
|
||||
extern struct glinfo glinfo;
|
||||
extern void setvsync(int32_t sync);
|
||||
#endif
|
||||
|
|
|
@ -67,19 +67,7 @@ extern "C" {
|
|||
# define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define BPACK __attribute__ ((packed))
|
||||
#else
|
||||
#define BPACK
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#pragma pack(push,1);
|
||||
#endif
|
||||
#pragma pack(push,1)
|
||||
|
||||
//ceilingstat/floorstat:
|
||||
// bit 0: 1 = parallaxing, 0 = not "P"
|
||||
|
@ -97,7 +85,7 @@ extern "C" {
|
|||
// bits 9-15: reserved
|
||||
|
||||
//40 bytes
|
||||
typedef struct BPACK
|
||||
typedef struct
|
||||
{
|
||||
int16_t wallptr, wallnum;
|
||||
int32_t ceilingz, floorz;
|
||||
|
@ -126,7 +114,7 @@ typedef struct BPACK
|
|||
// bits 10-15: reserved
|
||||
|
||||
//32 bytes
|
||||
typedef struct BPACK
|
||||
typedef struct
|
||||
{
|
||||
int32_t x, y;
|
||||
int16_t point2, nextwall, nextsector, cstat;
|
||||
|
@ -154,7 +142,7 @@ typedef struct BPACK
|
|||
// bit 15: 1 = Invisible sprite, 0 = not invisible
|
||||
|
||||
//44 bytes
|
||||
typedef struct BPACK
|
||||
typedef struct
|
||||
{
|
||||
int32_t x, y, z;
|
||||
int16_t cstat, picnum;
|
||||
|
@ -167,7 +155,7 @@ typedef struct BPACK
|
|||
int16_t lotag, hitag, extra;
|
||||
} spritetype;
|
||||
|
||||
typedef struct BPACK {
|
||||
typedef struct {
|
||||
uint32_t mdanimtims;
|
||||
int16_t mdanimcur;
|
||||
int16_t angoff;
|
||||
|
@ -180,7 +168,7 @@ typedef struct BPACK {
|
|||
spritetype *tspr;
|
||||
} spriteext_t;
|
||||
|
||||
typedef struct BPACK {
|
||||
typedef struct {
|
||||
float smoothduration;
|
||||
int16_t mdcurframe, mdoldframe;
|
||||
int16_t mdsmooth;
|
||||
|
@ -418,10 +406,12 @@ OTHER VARIABLES:
|
|||
you call the loadboard function.
|
||||
***************************************************************************/
|
||||
|
||||
typedef struct BPACK {
|
||||
typedef struct {
|
||||
int32_t x, y, z;
|
||||
} vec3_t;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct {
|
||||
vec3_t pos;
|
||||
int16_t hitsprite, hitwall, hitsect;
|
||||
|
@ -702,16 +692,6 @@ void hash_add(hashtable_t *t, const char *s, int32_t key);
|
|||
# include "polymer.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#undef BPACK
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -53,21 +53,7 @@
|
|||
// library will need to wrap these functions with suitable emulations.
|
||||
#define __compat_h_macrodef__
|
||||
|
||||
#if defined(__WATCOMC__) && ((__WATCOMC__ -0) < 1230)
|
||||
# define SCREWED_UP_CPP
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifdef SCREWED_UP_CPP
|
||||
// Old OpenWatcoms need some help
|
||||
# include "watcomhax/cstdarg"
|
||||
# ifdef __compat_h_macrodef__
|
||||
# include "watcomhax/cstdio"
|
||||
# include "watcomhax/cstring"
|
||||
# include "watcomhax/cstdlib"
|
||||
# include "watcomhax/ctime"
|
||||
# endif
|
||||
# else
|
||||
# include <cstdarg>
|
||||
# ifdef __compat_h_macrodef__
|
||||
# include <cstdio>
|
||||
|
@ -75,7 +61,6 @@
|
|||
# include <cstdlib>
|
||||
# include <ctime>
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
@ -103,12 +88,7 @@
|
|||
# include <efence.h>
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
# define inline __inline
|
||||
# define int64 __int64
|
||||
# define uint64 unsigned __int64
|
||||
# define longlong(x) x##i64
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
# define inline __inline
|
||||
# define int64 __int64
|
||||
# define uint64 unsigned __int64
|
||||
|
@ -215,8 +195,6 @@ extern "C" {
|
|||
// inline asm using bswap/xchg
|
||||
# elif defined(__GNUC__)
|
||||
// inline asm using bswap/xchg
|
||||
# elif defined(__WATCOMC__)
|
||||
// inline asm using bswap/xchg
|
||||
# endif
|
||||
#elif defined B_ENDIAN_C_INLINE
|
||||
static inline uint16_t B_SWAP16(uint16_t s) { return (s>>8)|(s<<8); }
|
||||
|
@ -224,6 +202,62 @@ static inline uint32_t B_SWAP32(uint32_t l) { return ((l>>8)&0xff00)|((l&0xff0
|
|||
static inline uint64 B_SWAP64(uint64 l) { return (l>>56)|((l>>40)&0xff00)|((l>>24)&0xff0000)|((l>>8)&0xff000000)|((l&255)<<56)|((l&0xff00)<<40)|((l&0xff0000)<<24)|((l&0xff000000)<<8); }
|
||||
#endif
|
||||
|
||||
#if defined(USE_MSC_PRAGMAS)
|
||||
static inline void ftol(float f, int32_t *a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov eax, a
|
||||
fld f
|
||||
fistp dword ptr [eax]
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dtol(double d, int32_t *a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov eax, a
|
||||
fld d
|
||||
fistp dword ptr [eax]
|
||||
}
|
||||
}
|
||||
#elif defined(USE_GCC_PRAGMAS)
|
||||
|
||||
static inline void ftol(float f, int32_t *a)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
#if 0 //(__GNUC__ >= 3)
|
||||
"flds %1; fistpl %0;"
|
||||
#else
|
||||
"flds %1; fistpl (%0);"
|
||||
#endif
|
||||
: "=r"(a) : "m"(f) : "memory","cc");
|
||||
}
|
||||
|
||||
static inline void dtol(double d, int32_t *a)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
#if 0 //(__GNUC__ >= 3)
|
||||
"fldl %1; fistpl %0;"
|
||||
#else
|
||||
"fldl %1; fistpl (%0);"
|
||||
#endif
|
||||
: "=r"(a) : "m"(d) : "memory","cc");
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void ftol(float f, int32_t *a)
|
||||
{
|
||||
*a = (int32_t)f;
|
||||
}
|
||||
|
||||
static inline void dtol(double d, int32_t *a)
|
||||
{
|
||||
*a = (int32_t)d;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if B_LITTLE_ENDIAN == 1
|
||||
# define B_LITTLE64(x) (x)
|
||||
# define B_BIG64(x) B_SWAP64(x)
|
||||
|
@ -374,18 +408,27 @@ int32_t Bclosedir(BDIR *dir);
|
|||
# define Bfread fread
|
||||
# define Bfwrite fwrite
|
||||
# define Bfprintf fprintf
|
||||
# define Bstrdup strdup
|
||||
# if defined(_MSC_VER)
|
||||
# define Bstrdup _strdup
|
||||
# else
|
||||
# define Bstrdup strdup
|
||||
# endif
|
||||
# define Bstrcpy strcpy
|
||||
# define Bstrncpy strncpy
|
||||
# define Bstrcmp strcmp
|
||||
# define Bstrncmp strncmp
|
||||
# if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__QNX__)
|
||||
# if defined(_MSC_VER)
|
||||
# define Bstrcasecmp _stricmp
|
||||
# define Bstrncasecmp _strnicmp
|
||||
# else
|
||||
# if defined(__QNX__)
|
||||
# define Bstrcasecmp stricmp
|
||||
# define Bstrncasecmp strnicmp
|
||||
# else
|
||||
# define Bstrcasecmp strcasecmp
|
||||
# define Bstrncasecmp strncasecmp
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_WIN32)
|
||||
# define Bstrlwr strlwr
|
||||
# define Bstrupr strupr
|
||||
|
|
|
@ -241,5 +241,4 @@ void voxfree(voxmodel_t *m);
|
|||
voxmodel_t *voxload(const char *filnam);
|
||||
int32_t voxdraw(voxmodel_t *m, spritetype *tspr);
|
||||
|
||||
|
||||
#endif // !_mdsprite_h_
|
||||
|
|
|
@ -138,7 +138,7 @@ Useful for when you have nedmalloc in a DLL you're about to unload.
|
|||
If you call ANY nedmalloc functions after calling this you will
|
||||
get a fatal exception!
|
||||
*/
|
||||
EXTSPEC void neddestroysyspool() THROWSPEC;
|
||||
EXTSPEC void neddestroysyspool(void) THROWSPEC;
|
||||
|
||||
/* These are the pool functions */
|
||||
struct nedpool_t;
|
||||
|
|
|
@ -130,8 +130,8 @@ static inline void fogcalc(const int32_t shade, const int32_t vis, const int32_t
|
|||
float f = ((shade*shade)*0.125f);
|
||||
|
||||
if (shade < 0) f = -f;
|
||||
if (vis > 239) f = gvisibility*((vis-240+f)/(klabs(vis-256)));
|
||||
else f = gvisibility*(vis+16+f);
|
||||
if (vis > 239) f = (float)(gvisibility*((vis-240+f)/(klabs(vis-256))));
|
||||
else f = (float)(gvisibility*(vis+16+f));
|
||||
|
||||
fogresult = clamp(f, 0.01f, 10.f);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
#include <errno.h>
|
|
@ -1,2 +0,0 @@
|
|||
#include <math.h>
|
||||
#define M_PI 3.14159265358979323846
|
|
@ -1 +0,0 @@
|
|||
#include <stdarg.h>
|
|
@ -1 +0,0 @@
|
|||
#include <stdio.h>
|
|
@ -1 +0,0 @@
|
|||
#include <stdlib.h>
|
|
@ -1 +0,0 @@
|
|||
#include <string.h>
|
|
@ -1 +0,0 @@
|
|||
#include <time.h>
|
|
@ -34,9 +34,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
# include <direct.h>
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <dirent.h>
|
||||
|
|
|
@ -125,97 +125,7 @@ extern char textfont[2048], smalltextfont[2048];
|
|||
static char kensmessage[128];
|
||||
char *engineerrstr = "No error";
|
||||
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||
|
||||
//
|
||||
// Watcom Inline Assembly Routines
|
||||
//
|
||||
|
||||
#pragma aux nsqrtasm =\
|
||||
"test eax, 0xff000000",\
|
||||
"mov ebx, eax",\
|
||||
"jnz short over24",\
|
||||
"shr ebx, 12",\
|
||||
"mov cx, word ptr shlookup[ebx*2]",\
|
||||
"jmp short under24",\
|
||||
"over24: shr ebx, 24",\
|
||||
"mov cx, word ptr shlookup[ebx*2+8192]",\
|
||||
"under24: shr eax, cl",\
|
||||
"mov cl, ch",\
|
||||
"mov ax, word ptr sqrtable[eax*2]",\
|
||||
"shr eax, cl",\
|
||||
parm nomemory [eax]\
|
||||
modify exact [eax ebx ecx]
|
||||
uint32_t nsqrtasm(uint32_t);
|
||||
|
||||
#pragma aux msqrtasm =\
|
||||
"mov eax, 0x40000000",\
|
||||
"mov ebx, 0x20000000",\
|
||||
"begit: cmp ecx, eax",\
|
||||
"jl skip",\
|
||||
"sub ecx, eax",\
|
||||
"lea eax, [eax+ebx*4]",\
|
||||
"skip: sub eax, ebx",\
|
||||
"shr eax, 1",\
|
||||
"shr ebx, 2",\
|
||||
"jnz begit",\
|
||||
"cmp ecx, eax",\
|
||||
"sbb eax, -1",\
|
||||
"shr eax, 1",\
|
||||
parm nomemory [ecx]\
|
||||
modify exact [eax ebx ecx]
|
||||
int32_t msqrtasm(uint32_t);
|
||||
|
||||
//0x007ff000 is (11<<13), 0x3f800000 is (127<<23)
|
||||
#pragma aux krecipasm =\
|
||||
"mov fpuasm, eax",\
|
||||
"fild dword ptr fpuasm",\
|
||||
"add eax, eax",\
|
||||
"fstp dword ptr fpuasm",\
|
||||
"sbb ebx, ebx",\
|
||||
"mov eax, fpuasm",\
|
||||
"mov ecx, eax",\
|
||||
"and eax, 0x007ff000",\
|
||||
"shr eax, 10",\
|
||||
"sub ecx, 0x3f800000",\
|
||||
"shr ecx, 23",\
|
||||
"mov eax, dword ptr reciptable[eax]",\
|
||||
"sar eax, cl",\
|
||||
"xor eax, ebx",\
|
||||
parm [eax]\
|
||||
modify exact [eax ebx ecx]
|
||||
int32_t krecipasm(int32_t);
|
||||
|
||||
#pragma aux getclipmask =\
|
||||
"sar eax, 31",\
|
||||
"add ebx, ebx",\
|
||||
"adc eax, eax",\
|
||||
"add ecx, ecx",\
|
||||
"adc eax, eax",\
|
||||
"add edx, edx",\
|
||||
"adc eax, eax",\
|
||||
"mov ebx, eax",\
|
||||
"shl ebx, 4",\
|
||||
"or al, 0xf0",\
|
||||
"xor eax, ebx",\
|
||||
parm [eax][ebx][ecx][edx]\
|
||||
modify exact [eax ebx ecx edx]
|
||||
int32_t getclipmask(int32_t,int32_t,int32_t,int32_t);
|
||||
|
||||
#pragma aux getkensmessagecrc =\
|
||||
"xor eax, eax",\
|
||||
"mov ecx, 32",\
|
||||
"beg: mov edx, dword ptr [ebx+ecx*4-4]",\
|
||||
"ror edx, cl",\
|
||||
"adc eax, edx",\
|
||||
"bswap eax",\
|
||||
"loop short beg",\
|
||||
parm [ebx]\
|
||||
modify exact [eax ebx ecx edx]
|
||||
int32_t getkensmessagecrc(int32_t);
|
||||
|
||||
#elif defined(_MSC_VER) && !defined(NOASM) // __WATCOMC__
|
||||
#if defined(_MSC_VER) && !defined(NOASM)
|
||||
|
||||
//
|
||||
// Microsoft C Inline Assembly Routines
|
||||
|
@ -6848,20 +6758,8 @@ int32_t loadboard(char *filename, char fromwhere, int32_t *daposx, int32_t *dapo
|
|||
//
|
||||
// loadboardv5/6
|
||||
//
|
||||
#ifdef __GNUC__
|
||||
#define BPACK __attribute__ ((packed))
|
||||
#else
|
||||
#define BPACK
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#pragma pack(push,1);
|
||||
#endif
|
||||
struct BPACK sectortypev5
|
||||
#pragma pack(push,1)
|
||||
struct sectortypev5
|
||||
{
|
||||
uint16_t wallptr, wallnum;
|
||||
int16_t ceilingpicnum, floorpicnum;
|
||||
|
@ -6876,7 +6774,7 @@ struct BPACK sectortypev5
|
|||
int16_t lotag, hitag;
|
||||
int16_t extra;
|
||||
};
|
||||
struct BPACK walltypev5
|
||||
struct walltypev5
|
||||
{
|
||||
int32_t x, y;
|
||||
int16_t point2;
|
||||
|
@ -6889,7 +6787,7 @@ struct BPACK walltypev5
|
|||
int16_t lotag, hitag;
|
||||
int16_t extra;
|
||||
};
|
||||
struct BPACK spritetypev5
|
||||
struct spritetypev5
|
||||
{
|
||||
int32_t x, y, z;
|
||||
char cstat;
|
||||
|
@ -6900,7 +6798,7 @@ struct BPACK spritetypev5
|
|||
int16_t lotag, hitag;
|
||||
int16_t extra;
|
||||
};
|
||||
struct BPACK sectortypev6
|
||||
struct sectortypev6
|
||||
{
|
||||
uint16_t wallptr, wallnum;
|
||||
int16_t ceilingpicnum, floorpicnum;
|
||||
|
@ -6914,7 +6812,7 @@ struct BPACK sectortypev6
|
|||
char visibility;
|
||||
int16_t lotag, hitag, extra;
|
||||
};
|
||||
struct BPACK walltypev6
|
||||
struct walltypev6
|
||||
{
|
||||
int32_t x, y;
|
||||
int16_t point2, nextsector, nextwall;
|
||||
|
@ -6925,7 +6823,7 @@ struct BPACK walltypev6
|
|||
char xrepeat, yrepeat, xpanning, ypanning;
|
||||
int16_t lotag, hitag, extra;
|
||||
};
|
||||
struct BPACK spritetypev6
|
||||
struct spritetypev6
|
||||
{
|
||||
int32_t x, y, z;
|
||||
int16_t cstat;
|
||||
|
@ -6937,15 +6835,7 @@ struct BPACK spritetypev6
|
|||
int16_t sectnum, statnum;
|
||||
int16_t lotag, hitag, extra;
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#undef BPACK
|
||||
|
||||
static int16_t sectorofwallv5(int16_t theline)
|
||||
{
|
||||
|
|
|
@ -60,24 +60,7 @@ int32_t animateoffs(int16_t tilenum, int16_t fakevar);
|
|||
extern int32_t indrawroomsandmasks;
|
||||
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||
|
||||
#pragma aux setgotpic =\
|
||||
"mov ebx, eax",\
|
||||
"cmp byte ptr walock[eax], 200",\
|
||||
"jae skipit",\
|
||||
"mov byte ptr walock[eax], 199",\
|
||||
"skipit: shr eax, 3",\
|
||||
"and ebx, 7",\
|
||||
"mov dl, byte ptr gotpic[eax]",\
|
||||
"mov bl, byte ptr pow2char[ebx]",\
|
||||
"or dl, bl",\
|
||||
"mov byte ptr gotpic[eax], dl",\
|
||||
parm [eax]\
|
||||
modify exact [eax ebx ecx edx]
|
||||
void setgotpic(int32_t);
|
||||
|
||||
#elif defined(_MSC_VER) && !defined(NOASM) // __WATCOMC__
|
||||
#if defined(_MSC_VER) && !defined(NOASM)
|
||||
|
||||
static inline void setgotpic(int32_t a)
|
||||
{
|
||||
|
|
|
@ -190,59 +190,7 @@ static int32_t gotcmov = -2, abstab10[1024] ASMNAME("abstab10");
|
|||
static int32_t qhufval0[1<<LOGQHUFSIZ0], qhufval1[1<<LOGQHUFSIZ1];
|
||||
static uint8_t qhufbit0[1<<LOGQHUFSIZ0], qhufbit1[1<<LOGQHUFSIZ1];
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||
|
||||
int32_t bswap(int32_t);
|
||||
#pragma aux bswap =\
|
||||
".586"\
|
||||
"bswap eax"\
|
||||
parm [eax]\
|
||||
modify nomemory exact [eax]\
|
||||
value [eax]
|
||||
|
||||
int32_t bitrev(int32_t, int32_t);
|
||||
#pragma aux bitrev =\
|
||||
"xor eax, eax"\
|
||||
"beg: shr ebx, 1"\
|
||||
"adc eax, eax"\
|
||||
"dec ecx"\
|
||||
"jnz short beg"\
|
||||
parm [ebx][ecx]\
|
||||
modify nomemory exact [eax ebx ecx]\
|
||||
value [eax]
|
||||
|
||||
int32_t testflag(int32_t);
|
||||
#pragma aux testflag =\
|
||||
"pushfd"\
|
||||
"pop eax"\
|
||||
"mov ebx, eax"\
|
||||
"xor eax, ecx"\
|
||||
"push eax"\
|
||||
"popfd"\
|
||||
"pushfd"\
|
||||
"pop eax"\
|
||||
"xor eax, ebx"\
|
||||
"mov eax, 1"\
|
||||
"jne menostinx"\
|
||||
"xor eax, eax"\
|
||||
"menostinx:"\
|
||||
parm nomemory [ecx]\
|
||||
modify exact [eax ebx]\
|
||||
value [eax]
|
||||
|
||||
void cpuid(int32_t, int32_t *);
|
||||
#pragma aux cpuid =\
|
||||
".586"\
|
||||
"cpuid"\
|
||||
"mov dword ptr [esi], eax"\
|
||||
"mov dword ptr [esi+4], ebx"\
|
||||
"mov dword ptr [esi+8], ecx"\
|
||||
"mov dword ptr [esi+12], edx"\
|
||||
parm [eax][esi]\
|
||||
modify exact [eax ebx ecx edx]\
|
||||
value
|
||||
|
||||
#elif defined(_MSC_VER) && !defined(NOASM)
|
||||
#if defined(_MSC_VER) && !defined(NOASM)
|
||||
|
||||
static _inline uint32_t bswap(uint32_t a)
|
||||
{
|
||||
|
@ -577,73 +525,7 @@ static int32_t Paeth(int32_t a, int32_t b, int32_t c)
|
|||
if (pb <= pc) return(b); else return(c);
|
||||
}
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||
|
||||
//NOTE: cmov now has correctly ordered registers (thx to bug fix in 11.0c!)
|
||||
int32_t Paeth686(int32_t, int32_t, int32_t);
|
||||
#pragma aux Paeth686 =\
|
||||
".686"\
|
||||
"mov edx, ecx"\
|
||||
"sub edx, eax"\
|
||||
"sub edx, ebx"\
|
||||
"lea edx, abstab10[edx*4+2048]"\
|
||||
"mov esi, [ebx*4+edx]"\
|
||||
"mov edi, [ecx*4+edx]"\
|
||||
"cmp edi, esi"\
|
||||
"cmovge edi, esi"\
|
||||
"cmovge ecx, ebx"\
|
||||
"cmp edi, [eax*4+edx]"\
|
||||
"cmovge ecx, eax"\
|
||||
parm nomemory [eax][ebx][ecx]\
|
||||
modify exact [ecx edx esi edi]\
|
||||
value [ecx]
|
||||
|
||||
//Note: "cmove eax,?" may be faster than "jne ?:and eax,?" but who cares
|
||||
void rgbhlineasm(int32_t, int32_t, int32_t, int32_t);
|
||||
#pragma aux rgbhlineasm =\
|
||||
"sub ecx, edx"\
|
||||
"jle short endit"\
|
||||
"add edx, offset olinbuf"\
|
||||
"cmp dword ptr trnsrgb, 0"\
|
||||
"jz short begit2"\
|
||||
"begit: mov eax, dword ptr [ecx+edx]"\
|
||||
"or eax, 0xff000000"\
|
||||
"cmp eax, dword ptr trnsrgb"\
|
||||
"jne short skipit"\
|
||||
"and eax, 0xffffff"\
|
||||
"skipit: sub ecx, 3"\
|
||||
"mov [edi], eax"\
|
||||
"lea edi, [edi+ebx]"\
|
||||
"jnz short begit"\
|
||||
"jmp short endit"\
|
||||
"begit2: mov eax, dword ptr [ecx+edx]"\
|
||||
"or eax, 0xff000000"\
|
||||
"sub ecx, 3"\
|
||||
"mov [edi], eax"\
|
||||
"lea edi, [edi+ebx]"\
|
||||
"jnz short begit2"\
|
||||
"endit:"\
|
||||
parm [ecx][edx][edi][ebx]\
|
||||
modify exact [eax ecx edi]\
|
||||
value
|
||||
|
||||
void pal8hlineasm(int32_t, int32_t, int32_t, int32_t);
|
||||
#pragma aux pal8hlineasm =\
|
||||
"sub ecx, edx"\
|
||||
"jle short endit"\
|
||||
"add edx, offset olinbuf"\
|
||||
"begit: movzx eax, byte ptr [ecx+edx]"\
|
||||
"mov eax, dword ptr palcol[eax*4]"\
|
||||
"dec ecx"\
|
||||
"mov [edi], eax"\
|
||||
"lea edi, [edi+ebx]"\
|
||||
"jnz short begit"\
|
||||
"endit:"\
|
||||
parm [ecx][edx][edi][ebx]\
|
||||
modify exact [eax ecx edi]\
|
||||
value
|
||||
|
||||
#elif defined(_MSC_VER) && !defined(NOASM)
|
||||
#if defined(_MSC_VER) && !defined(NOASM)
|
||||
|
||||
static _inline int32_t Paeth686(int32_t a, int32_t b, int32_t c)
|
||||
{
|
||||
|
@ -1256,23 +1138,7 @@ static int32_t lcomphvsamp0, lcomphsampshift0, lcompvsampshift0;
|
|||
static int32_t colclip[1024], colclipup8[1024], colclipup16[1024];
|
||||
/*static uint8_t pow2char[8] = {1,2,4,8,16,32,64,128};*/
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||
|
||||
int32_t mulshr24(int32_t, int32_t);
|
||||
#pragma aux mulshr24 =\
|
||||
"imul edx"\
|
||||
"shrd eax, edx, 24"\
|
||||
parm nomemory [eax][edx]\
|
||||
modify exact [eax edx]
|
||||
|
||||
int32_t mulshr32(int32_t, int32_t);
|
||||
#pragma aux mulshr32 =\
|
||||
"imul edx"\
|
||||
parm nomemory [eax][edx]\
|
||||
modify exact [eax edx]\
|
||||
value [edx]
|
||||
|
||||
#elif defined(_MSC_VER) && !defined(NOASM)
|
||||
#if defined(_MSC_VER) && !defined(NOASM)
|
||||
|
||||
static _inline int32_t mulshr24(int32_t a, int32_t d)
|
||||
{
|
||||
|
|
|
@ -807,7 +807,7 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
|
|||
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,glfiltermodes[gltexfiltermode].mag);
|
||||
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,glfiltermodes[gltexfiltermode].min);
|
||||
if (glinfo.maxanisotropy > 1.0)
|
||||
bglTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,glanisotropy);
|
||||
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,glanisotropy);
|
||||
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
|
||||
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
|
||||
|
||||
|
@ -906,7 +906,7 @@ void updateanimation(md2model_t *m, spritetype *tspr)
|
|||
}
|
||||
|
||||
if (spritesmooth[tspr->owner].mdsmooth)
|
||||
fps = (1.0f / (float)(tile2model[Ptile2tile(tspr->picnum,lpal)].smoothduration)) * 66;
|
||||
ftol((1.0f / (float)(tile2model[Ptile2tile(tspr->picnum,lpal)].smoothduration)) * 66.f, &fps);
|
||||
else
|
||||
fps = anim->fpssc;
|
||||
|
||||
|
@ -1160,9 +1160,9 @@ static md2model_t *md2load(int32_t fil, const char *filnam)
|
|||
}
|
||||
else
|
||||
{
|
||||
s->xyzn[(k*s->numverts) + (i*3) + j].x = ((f->verts[m->tris[i].v[j]].v[0] * f->mul.x) + f->add.x) * 64;
|
||||
s->xyzn[(k*s->numverts) + (i*3) + j].y = ((f->verts[m->tris[i].v[j]].v[1] * f->mul.y) + f->add.y) * 64;
|
||||
s->xyzn[(k*s->numverts) + (i*3) + j].z = ((f->verts[m->tris[i].v[j]].v[2] * f->mul.z) + f->add.z) * 64;
|
||||
s->xyzn[(k*s->numverts) + (i*3) + j].x = (int16_t)(((f->verts[m->tris[i].v[j]].v[0] * f->mul.x) + f->add.x) * 64.f);
|
||||
s->xyzn[(k*s->numverts) + (i*3) + j].y = (int16_t)(((f->verts[m->tris[i].v[j]].v[1] * f->mul.y) + f->add.y) * 64.f);
|
||||
s->xyzn[(k*s->numverts) + (i*3) + j].z = (int16_t)(((f->verts[m->tris[i].v[j]].v[2] * f->mul.z) + f->add.z) * 64.f);
|
||||
}
|
||||
|
||||
k++;
|
||||
|
@ -1260,7 +1260,7 @@ static md3model_t *md3load(int32_t fil)
|
|||
md3surf_t *s;
|
||||
|
||||
m = (md3model_t *)nedpcalloc(model_data_pool, 1,sizeof(md3model_t)); if (!m) return(0);
|
||||
m->mdnum = 3; m->texid = 0; m->scale = .01;
|
||||
m->mdnum = 3; m->texid = 0; m->scale = .01f;
|
||||
|
||||
m->muladdframes = NULL;
|
||||
|
||||
|
@ -1607,7 +1607,7 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
|
|||
|
||||
|
||||
// Parkar: Moved up to be able to use k0 for the y-flipping code
|
||||
k0 = tspr->z;
|
||||
k0 = (float)tspr->z;
|
||||
if ((globalorientation&128) && !((globalorientation&48)==32)) k0 += (float)((tilesizy[tspr->picnum]*tspr->yrepeat)<<1);
|
||||
|
||||
// Parkar: Changed to use the same method as centeroriented sprites
|
||||
|
@ -1625,7 +1625,7 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
|
|||
m0.z *= f; m1.z *= f; a0.z *= f;
|
||||
|
||||
// floor aligned
|
||||
k1 = tspr->y;
|
||||
k1 = (float)tspr->y;
|
||||
if ((globalorientation&48)==32)
|
||||
{
|
||||
m0.z = -m0.z; m1.z = -m1.z; a0.z = -a0.z;
|
||||
|
@ -1695,15 +1695,15 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
|
|||
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
||||
if (hictinting[MAXPALOOKUPS-1].r != 255 || hictinting[MAXPALOOKUPS-1].g != 255 || hictinting[MAXPALOOKUPS-1].b != 255)
|
||||
{
|
||||
pc[0] *= (float)hictinting[MAXPALOOKUPS-1].r / 255.0;
|
||||
pc[1] *= (float)hictinting[MAXPALOOKUPS-1].g / 255.0;
|
||||
pc[2] *= (float)hictinting[MAXPALOOKUPS-1].b / 255.0;
|
||||
pc[0] *= (float)hictinting[MAXPALOOKUPS-1].r / 255.0f;
|
||||
pc[1] *= (float)hictinting[MAXPALOOKUPS-1].g / 255.0f;
|
||||
pc[2] *= (float)hictinting[MAXPALOOKUPS-1].b / 255.0f;
|
||||
}
|
||||
}
|
||||
else globalnoeffect=1;
|
||||
}
|
||||
|
||||
if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66; else pc[3] = 0.33; }
|
||||
if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66f; else pc[3] = 0.33f; }
|
||||
else pc[3] = 1.0;
|
||||
if (m->usesalpha) //Sprites with alpha in texture
|
||||
{
|
||||
|
@ -1732,15 +1732,15 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
|
|||
if (spriteext[tspr->owner].pitch || spriteext[tspr->owner].roll || m->head.flags == 1337)
|
||||
{
|
||||
if (spriteext[tspr->owner].xoff)
|
||||
a0.x = (int32_t)(spriteext[tspr->owner].xoff / (2560 * (m0.x+m1.x)));
|
||||
a0.x = (float)(spriteext[tspr->owner].xoff / (2560 * (m0.x+m1.x)));
|
||||
else
|
||||
a0.x = 0;
|
||||
if (spriteext[tspr->owner].yoff)
|
||||
a0.y = (int32_t)(spriteext[tspr->owner].yoff / (2560 * (m0.x+m1.x)));
|
||||
a0.y = (float)(spriteext[tspr->owner].yoff / (2560 * (m0.x+m1.x)));
|
||||
else
|
||||
a0.y = 0;
|
||||
if ((spriteext[tspr->owner].zoff) && !(tspr->cstat&1024))
|
||||
a0.z = (int32_t)(spriteext[tspr->owner].zoff / (655360 * (m0.z+m1.z)));
|
||||
a0.z = (float)(spriteext[tspr->owner].zoff / (655360 * (m0.z+m1.z)));
|
||||
else
|
||||
a0.z = 0;
|
||||
k0 = (float)sintable[(spriteext[tspr->owner].pitch+512)&2047] / 16384.0;
|
||||
|
@ -2820,7 +2820,7 @@ int32_t voxdraw(voxmodel_t *m, spritetype *tspr)
|
|||
f = ((float)tspr->yrepeat)/64.0*m->bscale;
|
||||
m0.z *= f; a0.z *= f;
|
||||
|
||||
k0 = tspr->z;
|
||||
k0 = (float)tspr->z;
|
||||
if (globalorientation&128) k0 += (float)((tilesizy[tspr->picnum]*tspr->yrepeat)<<1);
|
||||
|
||||
f = (65536.0*512.0)/((float)xdimen*viewingrange);
|
||||
|
@ -2870,7 +2870,7 @@ int32_t voxdraw(voxmodel_t *m, spritetype *tspr)
|
|||
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
||||
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
||||
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
||||
if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66; else pc[3] = 0.33; }
|
||||
if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66f; else pc[3] = 0.33f; }
|
||||
else pc[3] = 1.0;
|
||||
if (tspr->cstat&2/* && (!peelcompiling)*/) bglEnable(GL_BLEND); //else bglDisable(GL_BLEND);
|
||||
//------------
|
||||
|
|
|
@ -679,7 +679,7 @@ void neddestroypool(nedpool *p) THROWSPEC
|
|||
if (TLSFREE(p->mycache)) abort();
|
||||
nedpfree(0, p);
|
||||
}
|
||||
void neddestroysyspool() THROWSPEC
|
||||
void neddestroysyspool(void) THROWSPEC
|
||||
{
|
||||
nedpool *p=&syspool;
|
||||
int n;
|
||||
|
|
|
@ -13,7 +13,7 @@ int32_t pr_shadows = 1;
|
|||
int32_t pr_shadowcount = 5;
|
||||
int32_t pr_shadowdetail = 4;
|
||||
int32_t pr_shadowfiltering = 1;
|
||||
int32_t pr_maxlightpasses = 5;
|
||||
int32_t pr_maxlightpasses = 10;
|
||||
int32_t pr_maxlightpriority = PR_MAXLIGHTPRIORITY;
|
||||
int32_t pr_fov = 426; // appears to be the classic setting.
|
||||
int32_t pr_billboardingmode = 1;
|
||||
|
|
|
@ -104,7 +104,7 @@ static double dxb1[MAXWALLSB], dxb2[MAXWALLSB];
|
|||
#define LINTERPSIZ 4 //log2 of interpolation size. 4:pretty fast&acceptable quality, 0:best quality/slow!
|
||||
#define DEPTHDEBUG 0 //1:render distance instead of texture, for debugging only!, 0:default
|
||||
|
||||
float shadescale = 1.050;
|
||||
float shadescale = 1.050f;
|
||||
|
||||
double gyxscale, gxyaspect, gviewxrange, ghalfx, grhalfxdown10, grhalfxdown10x, ghoriz;
|
||||
double gcosang, gsinang, gcosang2, gsinang2;
|
||||
|
@ -195,71 +195,6 @@ static char ptempbuf[MAXWALLSB<<1];
|
|||
int32_t r_parallaxskyclamping = 1;
|
||||
int32_t r_parallaxskypanning = 0;
|
||||
|
||||
#if defined(USE_MSC_PRAGMAS)
|
||||
static inline void ftol(float f, int32_t *a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov eax, a
|
||||
fld f
|
||||
fistp dword ptr [eax]
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dtol(double d, int32_t *a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov eax, a
|
||||
fld d
|
||||
fistp dword ptr [eax]
|
||||
}
|
||||
}
|
||||
#elif defined(USE_WATCOM_PRAGMAS)
|
||||
|
||||
#pragma aux ftol =\
|
||||
"fistp dword ptr [eax]",\
|
||||
parm [eax 8087]
|
||||
#pragma aux dtol =\
|
||||
"fistp dword ptr [eax]",\
|
||||
parm [eax 8087]
|
||||
|
||||
#elif defined(USE_GCC_PRAGMAS)
|
||||
|
||||
static inline void ftol(float f, int32_t *a)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
#if 0 //(__GNUC__ >= 3)
|
||||
"flds %1; fistpl %0;"
|
||||
#else
|
||||
"flds %1; fistpl (%0);"
|
||||
#endif
|
||||
: "=r"(a) : "m"(f) : "memory","cc");
|
||||
}
|
||||
|
||||
static inline void dtol(double d, int32_t *a)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
#if 0 //(__GNUC__ >= 3)
|
||||
"fldl %1; fistpl %0;"
|
||||
#else
|
||||
"fldl %1; fistpl (%0);"
|
||||
#endif
|
||||
: "=r"(a) : "m"(d) : "memory","cc");
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void ftol(float f, int32_t *a)
|
||||
{
|
||||
*a = (int32_t)f;
|
||||
}
|
||||
|
||||
static inline void dtol(double d, int32_t *a)
|
||||
{
|
||||
*a = (int32_t)d;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int32_t imod(int32_t a, int32_t b)
|
||||
{
|
||||
if (a >= 0) return(a%b);
|
||||
|
@ -954,10 +889,10 @@ void resizeglcheck()
|
|||
ratio += 4.f*(-gshang-0.7f);
|
||||
}
|
||||
|
||||
glox1 = windowx1; gloy1 = windowy1;
|
||||
glox2 = windowx2; gloy2 = windowy2;
|
||||
glox1 = (float)windowx1; gloy1 = (float)windowy1;
|
||||
glox2 = (float)windowx2; gloy2 = (float)windowy2;
|
||||
|
||||
fovcorrect = glprojectionhacks?(glwidescreen?0:(((windowx2-windowx1+1) * ratio) - (windowx2-windowx1+1))):0;
|
||||
fovcorrect = (int32_t)(glprojectionhacks?(glwidescreen?0:(((windowx2-windowx1+1) * ratio) - (windowx2-windowx1+1))):0);
|
||||
|
||||
bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
|
||||
|
||||
|
@ -2104,13 +2039,13 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method)
|
|||
{
|
||||
default:
|
||||
case 0:
|
||||
pc[3] = 1.0; break;
|
||||
pc[3] = 1.0f; break;
|
||||
case 1:
|
||||
pc[3] = 1.0; break;
|
||||
pc[3] = 1.0f; break;
|
||||
case 2:
|
||||
pc[3] = 0.66; break;
|
||||
pc[3] = 0.66f; break;
|
||||
case 3:
|
||||
pc[3] = 0.33; break;
|
||||
pc[3] = 0.33f; break;
|
||||
}
|
||||
// tinting happens only to hightile textures, and only if the texture we're
|
||||
// rendering isn't for the same palette as what we asked for
|
||||
|
@ -2784,7 +2719,7 @@ void domost(float x0, float y0, float x1, float y1)
|
|||
if (x0 < x1)
|
||||
{
|
||||
dir = 1; //clip dmost (floor)
|
||||
y0 -= .01; y1 -= .01;
|
||||
y0 -= .01f; y1 -= .01f;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3866,7 +3801,7 @@ static void polymost_drawalls(int32_t bunch)
|
|||
i = (1<<(picsiz[globalpicnum]>>4)); if (i < tilesizy[globalpicnum]) i <<= 1;
|
||||
|
||||
ypan = wal->ypanning;
|
||||
yoffs=(i-tilesizy[globalpicnum])*(255./i);
|
||||
ftol((i-tilesizy[globalpicnum])*(255.f/i),&yoffs);
|
||||
if (wal->cstat&4)
|
||||
{
|
||||
if (ypan>256-yoffs)
|
||||
|
@ -3923,7 +3858,7 @@ static void polymost_drawalls(int32_t bunch)
|
|||
i = (1<<(picsiz[globalpicnum]>>4)); if (i < tilesizy[globalpicnum]) i <<= 1;
|
||||
|
||||
ypan = nwal->ypanning;
|
||||
yoffs=(i-tilesizy[globalpicnum])*(255./i);
|
||||
ftol((i-tilesizy[globalpicnum])*(255.f/i),&yoffs);
|
||||
if (!(nwal->cstat&4))
|
||||
{
|
||||
if (ypan>256-yoffs)
|
||||
|
@ -3978,7 +3913,7 @@ static void polymost_drawalls(int32_t bunch)
|
|||
i = (1<<(picsiz[globalpicnum]>>4)); if (i < tilesizy[globalpicnum]) i <<= 1;
|
||||
|
||||
ypan = wal->ypanning;
|
||||
yoffs=(i-tilesizy[globalpicnum])*(255./i);
|
||||
ftol((i-tilesizy[globalpicnum])*(255.f/i),&yoffs);
|
||||
if (!(wal->cstat&4))
|
||||
{
|
||||
if (ypan>256-yoffs)
|
||||
|
@ -4970,10 +4905,10 @@ void polymost_drawsprite(int32_t snum)
|
|||
i = (tspr->ang&2047);
|
||||
c = sintable[(i+512)&2047]/65536.0;
|
||||
s = sintable[i]/65536.0;
|
||||
x0 = ((tsizx>>1)-xoff)*tspr->xrepeat;
|
||||
y0 = ((tsizy>>1)-yoff)*tspr->yrepeat;
|
||||
x1 = ((tsizx>>1)+xoff)*tspr->xrepeat;
|
||||
y1 = ((tsizy>>1)+yoff)*tspr->yrepeat;
|
||||
x0 = (float)((tsizx>>1)-xoff)*tspr->xrepeat;
|
||||
y0 = (float)((tsizy>>1)-yoff)*tspr->yrepeat;
|
||||
x1 = (float)((tsizx>>1)+xoff)*tspr->xrepeat;
|
||||
y1 = (float)((tsizy>>1)+yoff)*tspr->yrepeat;
|
||||
|
||||
//Project 3D to 2D
|
||||
for (j=0; j<4; j++)
|
||||
|
@ -5188,7 +5123,7 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
|
|||
m[2][2] = 1.0; m[2][3] = (float)ydimen*(ratioratio >= 1.6?1.2:1);
|
||||
m[3][2] =-1.0;
|
||||
}
|
||||
else { m[0][0] = m[2][3] = 1.0; m[1][1] = ((float)xdim)/((float)ydim); m[2][2] = 1.0001; m[3][2] = 1-m[2][2]; }
|
||||
else { m[0][0] = m[2][3] = 1.0f; m[1][1] = ((float)xdim)/((float)ydim); m[2][2] = 1.0001f; m[3][2] = 1-m[2][2]; }
|
||||
bglLoadMatrixf(&m[0][0]);
|
||||
bglMatrixMode(GL_MODELVIEW);
|
||||
bglLoadIdentity();
|
||||
|
@ -5255,7 +5190,7 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
|
|||
bglViewport(0,0,xdim,ydim); glox1 = -1; //Force fullscreen (glox1=-1 forces it to restore)
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
memset(m,0,sizeof(m));
|
||||
m[0][0] = m[2][3] = 1.0; m[1][1] = ((float)xdim)/((float)ydim); m[2][2] = 1.0001; m[3][2] = 1-m[2][2];
|
||||
m[0][0] = m[2][3] = 1.0f; m[1][1] = ((float)xdim)/((float)ydim); m[2][2] = 1.0001f; m[3][2] = 1-m[2][2];
|
||||
bglPushMatrix(); bglLoadMatrixf(&m[0][0]);
|
||||
bglMatrixMode(GL_MODELVIEW);
|
||||
bglLoadIdentity();
|
||||
|
@ -5599,11 +5534,11 @@ void polymost_fillpolygon(int32_t npoints)
|
|||
{
|
||||
case 0:
|
||||
case 1:
|
||||
a = 1.0; bglDisable(GL_BLEND); break;
|
||||
a = 1.0f; bglDisable(GL_BLEND); break;
|
||||
case 2:
|
||||
a = 0.66; bglEnable(GL_BLEND); break;
|
||||
a = 0.66f; bglEnable(GL_BLEND); break;
|
||||
case 3:
|
||||
a = 0.33; bglEnable(GL_BLEND); break;
|
||||
a = 0.33f; bglEnable(GL_BLEND); break;
|
||||
}
|
||||
bglColor4f(f,f,f,a);
|
||||
|
||||
|
|
|
@ -163,13 +163,7 @@ void copybufreverse(void *S, void *D, int32_t c)
|
|||
);
|
||||
}
|
||||
|
||||
#elif defined(__WATCOMC__) && !defined(NOASM) // __GNUC__ && __i386__
|
||||
|
||||
//
|
||||
// Watcom C Inline Assembler version
|
||||
//
|
||||
|
||||
#elif defined(_MSC_VER) && !defined(NOASM) // __WATCOMC__
|
||||
#elif defined(_MSC_VER) && !defined(NOASM) // __GNUC__ && __i386__
|
||||
|
||||
//
|
||||
// Microsoft C Inline Assembler version
|
||||
|
|
|
@ -252,10 +252,6 @@
|
|||
RelativePath=".\build\src\dynamicgtk.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\build\src\enet_mmulti.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\build\src\engine.c"
|
||||
>
|
||||
|
|
|
@ -66,7 +66,11 @@ int32_t spnoclip=1;
|
|||
// Sound in Mapster32
|
||||
static char defaultgamecon[BMAX_PATH] = "game.con";
|
||||
static char *gamecon = defaultgamecon;
|
||||
|
||||
#pragma pack(push,1)
|
||||
sound_t g_sounds[MAXSOUNDS];
|
||||
#pragma pack(pop)
|
||||
|
||||
static int16_t g_definedsndnum[MAXSOUNDS]; // maps parse order index to g_sounds index
|
||||
static int16_t g_sndnum[MAXSOUNDS]; // maps current order index to g_sounds index
|
||||
int32_t g_numsounds = 0;
|
||||
|
@ -95,7 +99,7 @@ static int32_t mouseaction=0, mouseax=0, mouseay=0;
|
|||
static int32_t repeatcountx, repeatcounty;
|
||||
static int32_t infobox=3; // bit0: current window, bit1: mouse pointer, the variable should be renamed
|
||||
|
||||
extern char mskip;
|
||||
extern int32_t mskip;
|
||||
extern int16_t capturecount;
|
||||
extern int32_t editorgridextent; // in engine.c
|
||||
extern char game_executable[BMAX_PATH];
|
||||
|
@ -10163,7 +10167,7 @@ void ExtAnalyzeSprites(void)
|
|||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b;
|
||||
}
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = (256-(SS+128))<<1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius * 0.75;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = (int16_t)(gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius * 0.75f);
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].minshade = sprite[i].xoffset;
|
||||
|
|
|
@ -708,7 +708,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "Detail",&ud.detail);
|
||||
|
||||
{
|
||||
extern int32_t g_frameDelay;
|
||||
extern uint32_t g_frameDelay;
|
||||
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "MaxFPS",&r_maxfps);
|
||||
r_maxfps = max(0,min(1000,r_maxfps));
|
||||
|
|
|
@ -258,6 +258,8 @@ enum DukeWeapon_t {
|
|||
#define deletesprite A_DeleteSprite
|
||||
void A_DeleteSprite(int32_t s);
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
typedef struct {
|
||||
uint32_t bits;
|
||||
int16_t fvel, svel;
|
||||
|
@ -535,7 +537,7 @@ typedef struct {
|
|||
int16_t ang, oldang, angdir, angdif;
|
||||
} spriteinterpolate;
|
||||
|
||||
spriteinterpolate sprpos[MAXSPRITES];
|
||||
// spriteinterpolate sprpos[MAXSPRITES];
|
||||
|
||||
typedef struct {
|
||||
int32_t bposx,bposy,bposz;
|
||||
|
@ -1102,6 +1104,8 @@ enum DukePacket_t
|
|||
PACKET_QUIT = 255 // should match mmulti I think
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -63,7 +63,7 @@ int32_t g_scriptSanityChecks = 1;
|
|||
#define TIMERUPDATESIZ 32
|
||||
|
||||
int32_t g_cameraDistance = 0, g_cameraClock = 0;
|
||||
static int32_t qe,cp;
|
||||
static int32_t qe;
|
||||
static int32_t g_commandSetup = 0;
|
||||
int32_t g_noSetup = 0;
|
||||
static int32_t g_noAutoLoad = 0;
|
||||
|
@ -1082,12 +1082,6 @@ void faketimerhandler(void)
|
|||
|
||||
Net_GetPackets();
|
||||
|
||||
// if (getoutputcirclesize() >= 16) return;
|
||||
|
||||
// for (i=connecthead;i>=0;i=connectpoint2[i])
|
||||
// if (i != myconnectindex)
|
||||
// if (g_player[i].movefifoend < g_player[myconnectindex].movefifoend-200) return;
|
||||
|
||||
if (g_player[myconnectindex].movefifoend - movefifoplc >= 100)
|
||||
return;
|
||||
|
||||
|
@ -1099,6 +1093,7 @@ void faketimerhandler(void)
|
|||
avghorz += loc.horz;
|
||||
avgbits |= loc.bits;
|
||||
avgextbits |= loc.extbits;
|
||||
|
||||
if (g_player[myconnectindex].movefifoend&(g_movesPerPacket-1))
|
||||
{
|
||||
copybufbyte(&inputfifo[(g_player[myconnectindex].movefifoend-1)&(MOVEFIFOSIZ-1)][myconnectindex],
|
||||
|
@ -1106,6 +1101,7 @@ void faketimerhandler(void)
|
|||
g_player[myconnectindex].movefifoend++;
|
||||
return;
|
||||
}
|
||||
|
||||
nsyn = &inputfifo[g_player[myconnectindex].movefifoend&(MOVEFIFOSIZ-1)][myconnectindex];
|
||||
nsyn[0].fvel = avgfvel/g_movesPerPacket;
|
||||
nsyn[0].svel = avgsvel/g_movesPerPacket;
|
||||
|
@ -1139,6 +1135,7 @@ void faketimerhandler(void)
|
|||
g_player[i].myminlag = min(g_player[i].myminlag,k);
|
||||
mymaxlag = max(mymaxlag,k);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (((g_player[myconnectindex].movefifoend - 1) & (TIMERUPDATESIZ - 1)) == 0)
|
||||
{
|
||||
|
@ -1165,44 +1162,6 @@ void faketimerhandler(void)
|
|||
j = 1;
|
||||
|
||||
//Fix timers and buffer/jitter value
|
||||
#if 0
|
||||
if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0)
|
||||
{
|
||||
if (myconnectindex == connecthead)
|
||||
{
|
||||
for (i = connectpoint2[connecthead]; i >= 0; i = connectpoint2[i])
|
||||
packbuf[j++] = min(max(g_player[i].myminlag, -128), 127);
|
||||
}
|
||||
else
|
||||
{
|
||||
i = g_player[connecthead].myminlag - otherminlag;
|
||||
if (klabs(i) > 2)
|
||||
{
|
||||
////DSPRINTF(ds,"lag correction: %d,%d,%d",i,Player[connecthead].myminlag,otherminlag);
|
||||
//MONO_PRINT(ds);
|
||||
|
||||
if (klabs(i) > 8)
|
||||
{
|
||||
if (i < 0)
|
||||
i++;
|
||||
i >>= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i < 0)
|
||||
i = -1;
|
||||
if (i > 0)
|
||||
i = 1;
|
||||
}
|
||||
totalclock -= TICSPERFRAME * i;
|
||||
otherminlag += i;
|
||||
}
|
||||
}
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
g_player[i].myminlag = 0x7fffffff;
|
||||
}
|
||||
#else
|
||||
if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0)
|
||||
{
|
||||
if (myconnectindex != connecthead)
|
||||
|
@ -1215,15 +1174,16 @@ void faketimerhandler(void)
|
|||
totalclock -= TICSPERFRAME*i;
|
||||
g_player[connecthead].myminlag -= i; otherminlag += i;
|
||||
}
|
||||
|
||||
if (myconnectindex == connecthead)
|
||||
else
|
||||
{
|
||||
for (i=connectpoint2[connecthead]; i>=0; i=connectpoint2[i])
|
||||
packbuf[j++] = min(max(g_player[i].myminlag,-128),127);
|
||||
}
|
||||
|
||||
for (i=connecthead; i>=0; i=connectpoint2[i])
|
||||
TRAVERSE_CONNECT(i)
|
||||
g_player[i].myminlag = 0x7fffffff;
|
||||
}
|
||||
#endif
|
||||
|
||||
osyn = (input_t *)&inputfifo[(g_player[myconnectindex].movefifoend-2)&(MOVEFIFOSIZ-1)][myconnectindex];
|
||||
nsyn = (input_t *)&inputfifo[(g_player[myconnectindex].movefifoend-1)&(MOVEFIFOSIZ-1)][myconnectindex];
|
||||
|
||||
|
@ -1257,8 +1217,8 @@ void faketimerhandler(void)
|
|||
packbuf[j++] = (uint8_t)nsyn[0].horz;
|
||||
packbuf[k] |= 128;
|
||||
}
|
||||
// k++;
|
||||
packbuf[++k] = 0;
|
||||
|
||||
if (nsyn[0].extbits != osyn[0].extbits) packbuf[j++] = nsyn[0].extbits, packbuf[k] |= 1;
|
||||
/* if ((nsyn[0].extbits^osyn[0].extbits)&0x000000ff) packbuf[j++] = (nsyn[0].extbits&255), packbuf[k] |= 1;
|
||||
if ((nsyn[0].extbits^osyn[0].extbits)&0x0000ff00) packbuf[j++] = ((nsyn[0].extbits>>8)&255), packbuf[k] |= 2;
|
||||
|
@ -1284,30 +1244,16 @@ void faketimerhandler(void)
|
|||
//Fix timers and buffer/jitter value
|
||||
if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0)
|
||||
{
|
||||
i = g_player[connecthead].myminlag - otherminlag;
|
||||
if (klabs(i) > 2)
|
||||
{
|
||||
if (klabs(i) > 8)
|
||||
{
|
||||
if (i < 0)
|
||||
i++;
|
||||
i >>= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i < 0)
|
||||
i = -1;
|
||||
if (i > 0)
|
||||
i = 1;
|
||||
}
|
||||
totalclock -= TICSPERFRAME * i;
|
||||
otherminlag += i;
|
||||
}
|
||||
i = g_player[connecthead].myminlag-otherminlag;
|
||||
if (klabs(i) > 8) i >>= 1;
|
||||
else if (klabs(i) > 2) i = ksgn(i);
|
||||
else i = 0;
|
||||
|
||||
totalclock -= TICSPERFRAME*i;
|
||||
g_player[connecthead].myminlag -= i; otherminlag += i;
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
{
|
||||
g_player[i].myminlag = 0x7fffffff;
|
||||
}
|
||||
}
|
||||
|
||||
packbuf[0] = PACKET_SLAVE_TO_MASTER;
|
||||
|
@ -1396,8 +1342,10 @@ void faketimerhandler(void)
|
|||
}
|
||||
|
||||
k = j;
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
j += g_player[i].playerquitflag + g_player[i].playerquitflag;
|
||||
j += g_player[i].playerquitflag + g_player[i].playerquitflag;
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
{
|
||||
if (g_player[i].playerquitflag == 0) continue;
|
||||
|
@ -2847,7 +2795,7 @@ void G_GameExit(const char *t)
|
|||
if (frecfilep) fclose(frecfilep);
|
||||
} // JBF: fixes crash on demo playback
|
||||
|
||||
if (!qe && !cp)
|
||||
if (!qe)
|
||||
{
|
||||
if (playerswhenstarted > 1 && g_player[myconnectindex].ps->gm&MODE_GAME && GTFLAGS(GAMETYPE_SCORESHEET) && *t == ' ')
|
||||
{
|
||||
|
@ -4227,30 +4175,6 @@ void G_SE40(int32_t smoothratio)
|
|||
k = nextspritesect[k];
|
||||
}
|
||||
}
|
||||
/*
|
||||
else // viewing from bottom
|
||||
{
|
||||
int32_t k = headspritesect[sprite[sp->yvel].sectnum];
|
||||
|
||||
while (k != -1)
|
||||
{
|
||||
if (sprite[k].picnum != SECTOREFFECTOR && (sprite[k].z >= sprite[sp->yvel].z))
|
||||
{
|
||||
Bmemcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)&sprite[k],sizeof(spritetype));
|
||||
|
||||
tsprite[spritesortcnt].x -= (sprite[sp->yvel].x-sp->x);
|
||||
tsprite[spritesortcnt].y -= (sprite[sp->yvel].y-sp->y);
|
||||
tsprite[spritesortcnt].z = tsprite[spritesortcnt].z - sprite[sp->yvel].z + ActorExtra[ror_sprite].ceilingz;
|
||||
tsprite[spritesortcnt].sectnum = sp->sectnum;
|
||||
tsprite[spritesortcnt].owner = k;
|
||||
|
||||
//OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z);
|
||||
spritesortcnt++;
|
||||
}
|
||||
k = nextspritesect[k];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
G_DoSpriteAnimations(ud.camerax,ud.cameray,ud.cameraang,smoothratio);
|
||||
drawmasks();
|
||||
|
@ -4540,7 +4464,7 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
|||
tsprite[spritesortcnt].sectnum = sprite[sp->yvel].sectnum;
|
||||
tsprite[spritesortcnt].owner = k;
|
||||
|
||||
OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z);
|
||||
//OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z);
|
||||
spritesortcnt++;
|
||||
}
|
||||
k = nextspritesect[k];
|
||||
|
@ -4721,7 +4645,7 @@ int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int3
|
|||
|
||||
ActorExtra[i].flags = 0;
|
||||
|
||||
sprpos[i].ang = sprpos[i].oldang = sprite[i].ang;
|
||||
// sprpos[i].ang = sprpos[i].oldang = sprite[i].ang;
|
||||
|
||||
if (actorscrptr[s_pn])
|
||||
{
|
||||
|
@ -4808,7 +4732,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
|
||||
ActorExtra[i].flags = 0;
|
||||
|
||||
sprpos[i].ang = sprpos[i].oldang = sprite[i].ang;
|
||||
// sprpos[i].ang = sprpos[i].oldang = sprite[i].ang;
|
||||
|
||||
if (PN != SPEAKER && PN != LETTER && PN != DUCK && PN != TARGET && PN != TRIPBOMB && PN != VIEWSCREEN && PN != VIEWSCREEN2 && (CS&48))
|
||||
if (!(PN >= CRACK1 && PN <= CRACK4))
|
||||
|
@ -6689,9 +6613,8 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
|
||||
ror_sprite = -1;
|
||||
|
||||
for (j=spritesortcnt-1; j>=0; j--) //Between drawrooms() and drawmasks()
|
||||
for (j=spritesortcnt-1; j>=0; j--)
|
||||
{
|
||||
//is the perfect time to animate sprites
|
||||
t = &tsprite[j];
|
||||
i = t->owner;
|
||||
s = &sprite[i];
|
||||
|
@ -6816,7 +6739,7 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
//is the perfect time to animate sprites
|
||||
t = &tsprite[j];
|
||||
i = t->owner;
|
||||
s = &sprite[i];
|
||||
s = (i < 0 ? &tsprite[j] : &sprite[i]);
|
||||
|
||||
switch (DynamicTileMap[s->picnum])
|
||||
{
|
||||
|
@ -7016,22 +6939,18 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
t->picnum = GROWSPARK+((totalclock>>4)&3);
|
||||
break;
|
||||
case RPG__STATIC:
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 &&
|
||||
!(spriteext[i].flags & SPREXT_NOTMD))
|
||||
{
|
||||
int32_t v = getangle(t->xvel, t->zvel>>4);
|
||||
|
||||
if (v > 1023)
|
||||
v -= 2048;
|
||||
spriteext[i].pitch = v;
|
||||
spriteext[i].pitch = (v > 1023 ? v-2048 : v);
|
||||
t->cstat &= ~4;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
k = getangle(s->x-x,s->y-y);
|
||||
k = (((s->ang+3072+128-k)&2047)/170);
|
||||
k = (((s->ang+3072+128-getangle(s->x-x,s->y-y))&2047)/170);
|
||||
if (k > 6)
|
||||
{
|
||||
k = 12-k;
|
||||
|
@ -7050,10 +6969,7 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
k = getangle(s->x-x,s->y-y);
|
||||
if (T1 < 4)
|
||||
k = (((s->ang+3072+128-k)&2047)/170);
|
||||
else k = (((s->ang+3072+128-k)&2047)/170);
|
||||
k = (((s->ang+3072+128-getangle(s->x-x,s->y-y))&2047)/170);
|
||||
|
||||
if (k>6)
|
||||
{
|
||||
|
@ -7751,7 +7667,7 @@ int8_t cheatbuf[MAXCHEATLEN],cheatbuflen;
|
|||
|
||||
static void G_DoCheats(void)
|
||||
{
|
||||
int16_t ch, i, j, k=0, weapon;
|
||||
int32_t ch, i, j, k=0, weapon;
|
||||
static int32_t z=0;
|
||||
char consolecheat = 0; // JBF 20030914
|
||||
|
||||
|
@ -7789,7 +7705,7 @@ static void G_DoCheats(void)
|
|||
return;
|
||||
}
|
||||
|
||||
cheatbuf[cheatbuflen++] = ch;
|
||||
cheatbuf[cheatbuflen++] = (int8_t)ch;
|
||||
cheatbuf[cheatbuflen] = 0;
|
||||
// KB_ClearKeysDown();
|
||||
|
||||
|
@ -9489,7 +9405,7 @@ static void G_AddPath(const char *buffer)
|
|||
{
|
||||
struct strllist *s;
|
||||
s = (struct strllist *)Bcalloc(1,sizeof(struct strllist));
|
||||
s->str = strdup(buffer);
|
||||
s->str = Bstrdup(buffer);
|
||||
|
||||
if (CommandPaths)
|
||||
{
|
||||
|
@ -10237,6 +10153,7 @@ static void G_DisplayLogo(void)
|
|||
clearview(0L);
|
||||
}
|
||||
|
||||
/*
|
||||
static void loadtmb(void)
|
||||
{
|
||||
char tmb[8000];
|
||||
|
@ -10249,6 +10166,7 @@ static void loadtmb(void)
|
|||
MUSIC_RegisterTimbreBank(tmb);
|
||||
kclose(fil);
|
||||
}
|
||||
*/
|
||||
|
||||
extern void C_FreeHashes();
|
||||
|
||||
|
@ -10825,30 +10743,6 @@ void G_UpdatePlayerFromMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
char testcd(char *fn, int32_t testsiz);
|
||||
|
||||
// JBF: various hacks here
|
||||
static void copyprotect(void)
|
||||
{
|
||||
// FILE *fp;
|
||||
// char idfile[256];
|
||||
|
||||
cp = 0;
|
||||
|
||||
#ifdef NOCOPYPROTECT
|
||||
return;
|
||||
#endif
|
||||
if (VOLUMEONE) return;
|
||||
|
||||
if (testcd(IDFILENAME, IDFSIZE))
|
||||
{
|
||||
cp = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void G_BackToMenu(void)
|
||||
{
|
||||
boardfilename[0] = 0;
|
||||
|
@ -11350,11 +11244,6 @@ CLEAN_DIRECTORY:
|
|||
kclose(i);
|
||||
}
|
||||
|
||||
#if 0
|
||||
copyprotect();
|
||||
if (cp) return;
|
||||
#endif
|
||||
|
||||
if (netparamcount > 0) _buildargc = (argc -= netparamcount+1); // crop off the net parameters
|
||||
|
||||
// gotta set the proper title after we compile the CONs if this is the full version
|
||||
|
@ -11362,20 +11251,11 @@ CLEAN_DIRECTORY:
|
|||
Bsprintf(tempbuf,"%s - " APPNAME,duke3dgrpstring);
|
||||
wm_setapptitle(tempbuf);
|
||||
|
||||
|
||||
// initprintf("\n");
|
||||
|
||||
if (g_scriptDebug)
|
||||
initprintf("CON debugging activated (level %d).\n",g_scriptDebug);
|
||||
|
||||
RegisterShutdownFunction(G_Shutdown);
|
||||
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
initprintf("Distribution of shareware Duke Nukem 3D is restricted in certain ways.\n");
|
||||
initprintf("Please read LICENSE.DOC for more details.\n");
|
||||
}
|
||||
|
||||
G_Startup(); // a bunch of stuff including compiling cons
|
||||
|
||||
if (numplayers > 1)
|
||||
|
@ -11406,19 +11286,11 @@ CLEAN_DIRECTORY:
|
|||
initprintf("Definitions file '%s' loaded.\n",duke3ddef);
|
||||
loaddefinitions_game(duke3ddef, FALSE);
|
||||
}
|
||||
// initprintf("numplayers=%i\n",numplayers);
|
||||
|
||||
Net_SendVersion();
|
||||
Net_SendPlayerName();
|
||||
|
||||
#if 0
|
||||
if (cp == 1 && numplayers < 2)
|
||||
G_GameExit("Please put the Duke Nukem 3D Atomic Edition CD in the CD-ROM drive.");
|
||||
#endif
|
||||
|
||||
if (numplayers > 1)
|
||||
{
|
||||
mmulti_sendlogon();
|
||||
Net_SendVersion();
|
||||
Net_SendPlayerName();
|
||||
Net_SendPlayerOptions();
|
||||
Net_SendWeaponChoice();
|
||||
Net_SendUserMapName();
|
||||
|
@ -11479,7 +11351,7 @@ CLEAN_DIRECTORY:
|
|||
|
||||
initprintf("Initializing OSD...\n");
|
||||
|
||||
Bsprintf(tempbuf,HEAD2 " %s",s_buildDate);
|
||||
Bsprintf(tempbuf, HEAD2 " %s", s_buildDate);
|
||||
OSD_SetVersionString(tempbuf, 10,0);
|
||||
registerosdcommands();
|
||||
|
||||
|
@ -11488,6 +11360,7 @@ CLEAN_DIRECTORY:
|
|||
uninitengine();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
G_SetupGameButtons();
|
||||
CONFIG_SetupMouse();
|
||||
CONFIG_SetupJoystick();
|
||||
|
@ -11554,11 +11427,9 @@ CLEAN_DIRECTORY:
|
|||
|
||||
setbrightness(ud.brightness>>2,&g_player[myconnectindex].ps->palette[0],0);
|
||||
|
||||
initprintf("Initializing music...\n");
|
||||
S_MusicStartup();
|
||||
initprintf("Initializing sound...\n");
|
||||
S_SoundStartup();
|
||||
loadtmb();
|
||||
// loadtmb();
|
||||
|
||||
if (ud.warp_on > 1 && ud.multimode < 2)
|
||||
{
|
||||
|
@ -11574,8 +11445,6 @@ CLEAN_DIRECTORY:
|
|||
ud.warp_on = 0;
|
||||
}
|
||||
|
||||
// if(KB_KeyPressed( sc_Escape ) ) G_GameExit(" ");
|
||||
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
|
@ -11642,16 +11511,13 @@ MAIN_LOOP_RESTART:
|
|||
ud.warp_on = 0;
|
||||
KB_KeyDown[sc_Pause] = 0; // JBF: I hate the pause key
|
||||
|
||||
while (!(g_player[myconnectindex].ps->gm&MODE_END)) //The whole loop!!!!!!!!!!!!!!!!!!
|
||||
do //main loop
|
||||
{
|
||||
if (handleevents())
|
||||
if (handleevents() && quitevent)
|
||||
{
|
||||
// JBF
|
||||
if (quitevent)
|
||||
{
|
||||
KB_KeyDown[sc_Escape] = 1;
|
||||
quitevent = 0;
|
||||
}
|
||||
KB_KeyDown[sc_Escape] = 1;
|
||||
quitevent = 0;
|
||||
}
|
||||
|
||||
AudioUpdate();
|
||||
|
@ -11661,11 +11527,11 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
OSD_DispatchQueued();
|
||||
|
||||
if (ud.recstat == 2 || ud.multimode > 1 || (ud.show_help == 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU))
|
||||
if (g_player[myconnectindex].ps->gm&MODE_GAME)
|
||||
if (G_MoveLoop()) continue;
|
||||
if (((ud.show_help == 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || ud.multimode > 1) &&
|
||||
(g_player[myconnectindex].ps->gm&MODE_GAME) && G_MoveLoop())
|
||||
continue;
|
||||
|
||||
if (g_player[myconnectindex].ps->gm&MODE_EOL || g_player[myconnectindex].ps->gm&MODE_RESTART)
|
||||
if (g_player[myconnectindex].ps->gm & (MODE_EOL|MODE_RESTART))
|
||||
{
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, palette, 0);
|
||||
P_UpdateScreenPal(g_player[myconnectindex].ps);
|
||||
|
@ -11691,9 +11557,7 @@ MAIN_LOOP_RESTART:
|
|||
if (ud.multimode < 2)
|
||||
{
|
||||
if (!VOLUMEALL)
|
||||
{
|
||||
G_DoOrderScreen();
|
||||
}
|
||||
g_player[myconnectindex].ps->gm = MODE_MENU;
|
||||
ChangeToMenu(0);
|
||||
probey = 0;
|
||||
|
@ -11761,7 +11625,6 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
if (debug_on) G_ShowCacheLocks();
|
||||
|
||||
// checksync();
|
||||
Net_DisplaySyncMsg();
|
||||
|
||||
if (VOLUMEONE)
|
||||
|
@ -11780,6 +11643,7 @@ MAIN_LOOP_RESTART:
|
|||
while (!(g_player[myconnectindex].ps->gm&MODE_MENU) && ready2send && totalclock >= ototalclock+TICSPERFRAME)
|
||||
faketimerhandler();
|
||||
}
|
||||
while (!(g_player[myconnectindex].ps->gm&MODE_END));
|
||||
|
||||
G_GameExit(" ");
|
||||
}
|
||||
|
|
|
@ -5925,6 +5925,7 @@ static void C_AddDefaultDefinitions(void)
|
|||
C_AddDefinition("PROJ_YREPEAT",PROJ_YREPEAT,LABEL_DEFINE);
|
||||
}
|
||||
|
||||
#pragma pack(push,1)
|
||||
static void C_InitProjectiles(void)
|
||||
{
|
||||
int32_t i;
|
||||
|
@ -5949,6 +5950,7 @@ static void C_InitProjectiles(void)
|
|||
|
||||
Bmemcpy(&DefaultProjectileData[0], &ProjectileData[0], sizeof(ProjectileData));
|
||||
}
|
||||
#pragma pack(pop)
|
||||
|
||||
extern int32_t g_numObituaries;
|
||||
extern int32_t g_numSelfObituaries;
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090701";
|
||||
const char *s_buildDate = "20090708";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
@ -56,7 +56,12 @@ int16_t g_mirrorWall[64], g_mirrorSector[64], g_mirrorCount;
|
|||
|
||||
int32_t g_currentMenu;
|
||||
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
map_t MapInfo[(MAXVOLUMES+1)*MAXLEVELS]; // +1 volume for "intro", "briefing" music
|
||||
sound_t g_sounds[ MAXSOUNDS ];
|
||||
#pragma pack(pop)
|
||||
|
||||
char EpisodeNames[MAXVOLUMES][33] = { "L.A. MELTDOWN", "LUNAR APOCALYPSE", "SHRAPNEL CITY" };
|
||||
char SkillNames[5][33] = { "PIECE OF CAKE", "LET'S ROCK", "COME GET SOME", "DAMN I'M GOOD" };
|
||||
|
@ -80,8 +85,6 @@ char g_numVolumes = 3;
|
|||
int32_t g_timerTicsPerSecond=TICRATE;
|
||||
//fx_device device;
|
||||
|
||||
sound_t g_sounds[ MAXSOUNDS ];
|
||||
|
||||
char g_numPlayerSprites,g_loadFromGroupOnly=0,g_earthquakeTime;
|
||||
|
||||
int32_t playerswhenstarted;
|
||||
|
|
|
@ -228,25 +228,7 @@ static void MV_CalcPanTable(void);
|
|||
|
||||
static void ClearBuffer_DW(void *ptr, int32_t data, int32_t length);
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
|
||||
#pragma aux MV_Mix8BitMono parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix8BitStereo parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix16BitMono parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix16BitStereo parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix16BitMono16 parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix8BitMono16 parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix8BitStereo16 parm [eax] [edx] [ebx] [ecx]
|
||||
#pragma aux MV_Mix16BitStereo16 parm [eax] [edx] [ebx] [ecx]
|
||||
|
||||
#pragma aux MV_16BitReverb parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
|
||||
#pragma aux MV_8BitReverb parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
|
||||
#pragma aux MV_16BitReverbFast parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
|
||||
#pragma aux MV_8BitReverbFast parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
|
||||
|
||||
#define CDEC
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
#define CDEC _cdecl
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "compat.h"
|
||||
#include "winlayer.h"
|
||||
|
||||
#if defined(__WATCOMC__) || defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
#define __EXPORT__
|
||||
#endif
|
||||
|
||||
#if (defined __WATCOMC__)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
static __inline uint16_t _swap16(uint16_t D)
|
||||
{
|
||||
#if PLATFORM_MACOSX
|
||||
|
|
|
@ -37,7 +37,7 @@ Adapted to work with JonoF's port by James Bentler (bentler@cs.umn.edu)
|
|||
#include "duke3d.h"
|
||||
#include "cache1d.h"
|
||||
|
||||
#if (!defined __WATCOMC__)
|
||||
#ifndef _MSC_VER
|
||||
#define cdecl
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "sdlayer.h"
|
||||
|
||||
#if defined(__WATCOMC__) || defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,23 +37,11 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# ifndef PACKED
|
||||
# define PACKED __attribute__ ((packed))
|
||||
# endif
|
||||
#else
|
||||
# define PACKED
|
||||
# ifdef _MSC_VER
|
||||
# pragma pack(1)
|
||||
# endif
|
||||
# ifdef __WATCOMC__
|
||||
# pragma pack(push,1);
|
||||
# endif
|
||||
#endif
|
||||
# pragma pack(push,1)
|
||||
|
||||
// structure declarations for deluxe animate large page files */
|
||||
|
||||
typedef struct PACKED
|
||||
typedef struct
|
||||
{
|
||||
uint32_t id; // 4 character ID == "LPF " */
|
||||
uint16_t maxLps; // max # largePages allowed. 256 FOR NOW. */
|
||||
|
@ -89,7 +77,7 @@ typedef struct PACKED
|
|||
} lpfileheader;
|
||||
|
||||
// this is the format of a large page structure
|
||||
typedef struct PACKED
|
||||
typedef struct
|
||||
{
|
||||
uint16_t baseRecord; // Number of first record in this large page.
|
||||
uint16_t nRecords; // Number of records in lp.
|
||||
|
@ -98,13 +86,7 @@ typedef struct PACKED
|
|||
uint16_t nBytes; // Total number of bytes of contents, excluding header.
|
||||
} lp_descriptor;
|
||||
|
||||
#undef PACKED
|
||||
#ifdef _MSC_VER
|
||||
# pragma pack()
|
||||
#endif
|
||||
#ifdef __WATCOMC__
|
||||
# pragma pack(pop);
|
||||
#endif
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -69,15 +69,15 @@ void CONTROL_GetMouseDelta(void)
|
|||
{
|
||||
static int32_t lastx = 0, lasty = 0;
|
||||
|
||||
CONTROL_MouseAxes[0].analog = (((x + lastx) / 2.0f) * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (((y + lasty) / 2.0f) * 4.0f * CONTROL_MouseSensitivity) * 2.0f;
|
||||
CONTROL_MouseAxes[0].analog = (int32_t)(((x + lastx) / 2.0f) * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (int32_t)((((y + lasty) / 2.0f) * 4.0f * CONTROL_MouseSensitivity) * 2.0f);
|
||||
lastx = x;
|
||||
lasty = y;
|
||||
return;
|
||||
}
|
||||
|
||||
CONTROL_MouseAxes[0].analog = (x * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (y * 4.0f * CONTROL_MouseSensitivity) * 2.0f;
|
||||
CONTROL_MouseAxes[0].analog = (int32_t)(x * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (int32_t)((y * 4.0f * CONTROL_MouseSensitivity) * 2.0f);
|
||||
}
|
||||
|
||||
int32_t CONTROL_StartMouse(void)
|
||||
|
|
|
@ -43,11 +43,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
static script_t *scriptfiles[MAXSCRIPTFILES];
|
||||
|
||||
|
||||
|
|
|
@ -4627,9 +4627,7 @@ cheat_for_port_credits:
|
|||
S_SoundShutdown();
|
||||
S_MusicShutdown();
|
||||
|
||||
initprintf("Initializing music...\n");
|
||||
S_MusicStartup();
|
||||
initprintf("Initializing sound...\n");
|
||||
S_SoundStartup();
|
||||
|
||||
FX_StopAllSounds();
|
||||
|
|
|
@ -38,7 +38,7 @@ float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
|
|||
extern int32_t althud_numbertile, althud_numberpal, althud_shadows, althud_flashing, hud_glowingquotes;
|
||||
extern int32_t hud_showmapname;
|
||||
extern int32_t r_maxfps;
|
||||
extern int32_t g_frameDelay;
|
||||
extern uint32_t g_frameDelay;
|
||||
|
||||
static inline int32_t osdcmd_quit(const osdfuncparm_t *parm)
|
||||
{
|
||||
|
@ -416,9 +416,7 @@ static int32_t osdcmd_restartsound(const osdfuncparm_t *parm)
|
|||
S_SoundShutdown();
|
||||
S_MusicShutdown();
|
||||
|
||||
initprintf("Initializing music...\n");
|
||||
S_MusicStartup();
|
||||
initprintf("Initializing sound...\n");
|
||||
S_SoundStartup();
|
||||
|
||||
FX_StopAllSounds();
|
||||
|
|
|
@ -4456,12 +4456,12 @@ void P_ProcessInput(int32_t snum)
|
|||
{
|
||||
if (p->on_ground == 1)
|
||||
{
|
||||
/*
|
||||
if (p->dummyplayersprite == -1)
|
||||
p->dummyplayersprite =
|
||||
A_Spawn(pi,PLAYERONWATER);
|
||||
sprite[p->dummyplayersprite].pal = sprite[p->i].pal;
|
||||
*/
|
||||
if (p->dummyplayersprite == -1)
|
||||
p->dummyplayersprite =
|
||||
A_Spawn(pi,PLAYERONWATER);
|
||||
sprite[p->dummyplayersprite].pal = sprite[p->i].pal;
|
||||
sprite[p->dummyplayersprite].cstat |= 32768;
|
||||
|
||||
p->footprintcount = 6;
|
||||
if (sector[p->cursectnum].floorpicnum == FLOORSLIME)
|
||||
p->footprintpal = 8;
|
||||
|
@ -5184,8 +5184,25 @@ SHOOTINCODE:
|
|||
}
|
||||
|
||||
if (aplWeaponFlags[p->curr_weapon][snum] & WEAPON_GLOWS)
|
||||
{
|
||||
p->random_club_frame += 64; // Glowing
|
||||
|
||||
if (p->kickback_pic == 0)
|
||||
{
|
||||
spritetype *s = &sprite[p->i];
|
||||
int32_t x = ((sintable[(s->ang+512)&2047])>>7), y = ((sintable[(s->ang)&2047])>>7);
|
||||
int32_t r = 1024+(sintable[p->random_club_frame&2047]>>3);
|
||||
|
||||
s->x += x;
|
||||
s->y += y;
|
||||
G_AddGameLight(0, p->i, PHEIGHT, max(r, 0), aplWeaponFlashColor[p->curr_weapon][snum],PR_LIGHT_PRIO_HIGH_GAME);
|
||||
ActorExtra[p->i].lightcount = 2;
|
||||
s->x -= x;
|
||||
s->y -= y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// this is a hack for WEAPON_FIREEVERYOTHER
|
||||
if (ActorExtra[p->i].temp_data[7])
|
||||
{
|
||||
|
|
|
@ -57,6 +57,8 @@ void S_SoundStartup(void)
|
|||
// if they chose None lets return
|
||||
if (ud.config.FXDevice < 0) return;
|
||||
|
||||
initprintf("Initializing sound...\n");
|
||||
|
||||
RETRY:
|
||||
status = FX_Init(ud.config.FXDevice, ud.config.NumVoices, ud.config.NumChannels, ud.config.NumBits, ud.config.MixRate);
|
||||
if (status == FX_Ok)
|
||||
|
@ -130,6 +132,8 @@ void S_MusicStartup(void)
|
|||
if (ud.config.MusicDevice < 0)
|
||||
return;
|
||||
|
||||
initprintf("Initializing music...\n");
|
||||
|
||||
status = MUSIC_Init(ud.config.MusicDevice, 0);
|
||||
|
||||
if (status == MUSIC_Ok)
|
||||
|
|
|
@ -52,7 +52,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define MUSICANDSFX 5
|
||||
|
||||
static char SM32_havesound = 0;
|
||||
|
||||
#pragma pack(push,1)
|
||||
extern sound_t g_sounds[MAXSOUNDS];
|
||||
#pragma pack(pop)
|
||||
|
||||
char SoundToggle = 1;
|
||||
int32_t NumVoices = 32;
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "build.h"
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
/// vvv sound structs from duke3d.h
|
||||
typedef struct {
|
||||
int32_t voice;
|
||||
|
@ -32,6 +34,8 @@ int32_t A_CheckSoundPlaying(int32_t i, int32_t num);
|
|||
int32_t S_CheckSoundPlaying(int32_t i, int32_t num);
|
||||
void S_ClearSoundLocks(void);
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#define MAXSOUNDS 2560
|
||||
|
||||
#endif
|
||||
|
|
|
@ -136,6 +136,7 @@ static void PopulateForm(int32_t pgs)
|
|||
|
||||
if (pgs & POPULATE_CONFIG)
|
||||
{
|
||||
/*
|
||||
struct audioenumdev *d;
|
||||
char *n;
|
||||
|
||||
|
@ -164,16 +165,13 @@ static void PopulateForm(int32_t pgs)
|
|||
d = d->next;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED));
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCAUTOLOAD), (!(settings.flags & 4) ? BST_CHECKED : BST_UNCHECKED));
|
||||
/*
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), (settings.usemouse ? BST_CHECKED : BST_UNCHECKED));
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), (settings.usejoy ? BST_CHECKED : BST_UNCHECKED));
|
||||
*/
|
||||
|
||||
{
|
||||
char *s[] = { "Keyboard only", "Keyboard and mouse", "Keyboard and joystick", "All supported devices" };
|
||||
static const char *s[] = { "Keyboard only", "Keyboard and mouse", "Keyboard and joystick", "All supported devices" };
|
||||
|
||||
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCINPUT);
|
||||
|
||||
|
@ -198,7 +196,7 @@ static void PopulateForm(int32_t pgs)
|
|||
{
|
||||
struct grpfile *fg;
|
||||
int32_t i, j;
|
||||
char buf[128+BMAX_PATH];
|
||||
char buf[1024];
|
||||
|
||||
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCDATA);
|
||||
|
||||
|
|
Loading…
Reference in a new issue