mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement
This commit is contained in:
commit
50d6208913
236 changed files with 766 additions and 51176 deletions
2
bin/DC/.gitignore
vendored
2
bin/DC/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
5
bin/PS3/Debug/.gitignore
vendored
5
bin/PS3/Debug/.gitignore
vendored
|
@ -1,5 +0,0 @@
|
|||
/*.elf
|
||||
/*.self
|
||||
/*.pkg
|
||||
/*.BIN
|
||||
/pkg
|
5
bin/PS3/Release/.gitignore
vendored
5
bin/PS3/Release/.gitignore
vendored
|
@ -1,5 +0,0 @@
|
|||
/*.elf
|
||||
/*.self
|
||||
/*.pkg
|
||||
/*.BIN
|
||||
/pkg
|
4
bin/PSP/Release/.gitignore
vendored
4
bin/PSP/Release/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
|||
/EBOOT.PBP
|
||||
/PARAM.SFO
|
||||
/SRB2PSP.PBP
|
||||
/SRB2PSP.elf
|
3
bin/Wii/Debug/.gitignore
vendored
3
bin/Wii/Debug/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/*.elf
|
||||
/*.dol
|
||||
/apps
|
3
bin/Wii/Release/.gitignore
vendored
3
bin/Wii/Release/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/*.elf
|
||||
/*.dol
|
||||
/apps
|
2
bin/WinCE/ARMV4Dbg/.gitignore
vendored
2
bin/WinCE/ARMV4Dbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/ARMV4IDbg/.gitignore
vendored
2
bin/WinCE/ARMV4IDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/ARMV4IRel/.gitignore
vendored
2
bin/WinCE/ARMV4IRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/ARMV4Rel/.gitignore
vendored
2
bin/WinCE/ARMV4Rel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/ARMV4TDbg/.gitignore
vendored
2
bin/WinCE/ARMV4TDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/ARMV4TRel/.gitignore
vendored
2
bin/WinCE/ARMV4TRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPS16Dbg/.gitignore
vendored
2
bin/WinCE/MIPS16Dbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPS16Rel/.gitignore
vendored
2
bin/WinCE/MIPS16Rel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSIIDbg/.gitignore
vendored
2
bin/WinCE/MIPSIIDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSIIRel/.gitignore
vendored
2
bin/WinCE/MIPSIIRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSII_FPDbg/.gitignore
vendored
2
bin/WinCE/MIPSII_FPDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSII_FPRel/.gitignore
vendored
2
bin/WinCE/MIPSII_FPRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSIVDbg/.gitignore
vendored
2
bin/WinCE/MIPSIVDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSIVRel/.gitignore
vendored
2
bin/WinCE/MIPSIVRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSIV_FPDbg/.gitignore
vendored
2
bin/WinCE/MIPSIV_FPDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/MIPSIV_FPRel/.gitignore
vendored
2
bin/WinCE/MIPSIV_FPRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/Release/.gitignore
vendored
2
bin/WinCE/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/SH3Dbg/.gitignore
vendored
2
bin/WinCE/SH3Dbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/SH3Rel/.gitignore
vendored
2
bin/WinCE/SH3Rel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/SH4Dbg/.gitignore
vendored
2
bin/WinCE/SH4Dbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/SH4Rel/.gitignore
vendored
2
bin/WinCE/SH4Rel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/X86Dbg/.gitignore
vendored
2
bin/WinCE/X86Dbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/X86Rel/.gitignore
vendored
2
bin/WinCE/X86Rel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/emulatorDbg/.gitignore
vendored
2
bin/WinCE/emulatorDbg/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
bin/WinCE/emulatorRel/.gitignore
vendored
2
bin/WinCE/emulatorRel/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
3
bin/nds/Debug/.gitignore
vendored
3
bin/nds/Debug/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
*.arm9
|
||||
*.elf*
|
||||
*.nds
|
3
bin/nds/Release/.gitignore
vendored
3
bin/nds/Release/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
*.arm9
|
||||
*.elf*
|
||||
*.nds
|
2
objs/DC/SDL/Debug/.gitignore
vendored
2
objs/DC/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/DC/SDL/Release/.gitignore
vendored
2
objs/DC/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/PS3/SDL/Debug/.gitignore
vendored
2
objs/PS3/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/PS3/SDL/Release/.gitignore
vendored
2
objs/PS3/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/PSP/SDL/Release/.gitignore
vendored
2
objs/PSP/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/Wii/SDL/Debug/.gitignore
vendored
2
objs/Wii/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/Wii/SDL/Release/.gitignore
vendored
2
objs/Wii/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/WinCE/SDL/Release/.gitignore
vendored
2
objs/WinCE/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/XBOX/SDL/Debug/.gitignore
vendored
2
objs/XBOX/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/XBOX/SDL/Release/.gitignore
vendored
2
objs/XBOX/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/nds/Debug/.gitignore
vendored
2
objs/nds/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
2
objs/nds/Release/.gitignore
vendored
2
objs/nds/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
204
src/Makefile
204
src/Makefile
|
@ -33,8 +33,6 @@
|
|||
# compile all HW render and 3D sound DLLs for the set
|
||||
# opengl_dll
|
||||
# Pure Mingw only, compile OpenGL HW render DLL
|
||||
# minigl_dll
|
||||
# Pure Mingw only, compile MiniGL HW render DLL
|
||||
# ds3d_dll
|
||||
# Pure Mingw only, compile DirectX DirectSound HW sound DLL
|
||||
# fmod_dll
|
||||
|
@ -91,10 +89,6 @@ D_FILES=$(D_DIR)/srb2.srb \
|
|||
|
||||
PKG_CONFIG?=pkg-config
|
||||
|
||||
ifdef WIILINUX
|
||||
LINUX=1
|
||||
endif
|
||||
|
||||
ifdef PANDORA
|
||||
LINUX=1
|
||||
endif
|
||||
|
@ -108,12 +102,6 @@ ifdef HAIKU
|
|||
SDL=1
|
||||
endif
|
||||
|
||||
ifdef NDS
|
||||
# Include this before the main Makefile.cfg
|
||||
EXENAME?=srb2.elf
|
||||
include nds/Makefile.cfg
|
||||
endif
|
||||
|
||||
include Makefile.cfg
|
||||
|
||||
ifdef DUMMY
|
||||
|
@ -139,32 +127,12 @@ PNG_CFLAGS?=
|
|||
PNG_LDFLAGS?=-lpng
|
||||
endif
|
||||
|
||||
ifdef WIILINUX
|
||||
NONX86=1
|
||||
NOTERMIOS=1
|
||||
NOHW=1
|
||||
CFLAGS+=-DWMINPUT
|
||||
NOTERMIOS=1
|
||||
NOPOSTPROCESSING=1
|
||||
endif
|
||||
|
||||
ifdef PANDORA
|
||||
NONX86=1
|
||||
NOHW=1
|
||||
NOHS=1
|
||||
endif
|
||||
|
||||
ifdef WII
|
||||
NONX86=1
|
||||
NOHW=1
|
||||
NOPOSTPROCESSING=1
|
||||
endif
|
||||
|
||||
ifdef PS3N
|
||||
NONX86=1
|
||||
NOHW=1
|
||||
endif
|
||||
|
||||
ifdef DJGPPDOS
|
||||
include djgppdos/Makefile.cfg
|
||||
endif
|
||||
|
@ -196,26 +164,8 @@ ifdef MACOSX
|
|||
UNIXCOMMON=1
|
||||
endif
|
||||
|
||||
ifdef NDS
|
||||
NOPNG=1
|
||||
NONET=1
|
||||
#NOHW=1
|
||||
NOHS=1
|
||||
NOASM=1
|
||||
NOIPX=1
|
||||
NONX86=1
|
||||
OBJS+=$(OBJDIR)/i_video.o
|
||||
LIBS+=-lm
|
||||
endif
|
||||
|
||||
ifdef SDL
|
||||
#SDL 2.0
|
||||
ifndef SDL12
|
||||
include sdl/Makefile.cfg
|
||||
#SDL 1.2
|
||||
else
|
||||
include sdl12/Makefile.cfg
|
||||
endif #ifndef SDL12
|
||||
endif #ifdef SDL
|
||||
|
||||
ifdef DISTCC
|
||||
|
@ -237,11 +187,7 @@ ifndef ECHO
|
|||
OBJDUMP:=@$(OBJDUMP)
|
||||
STRIP:=@$(STRIP)
|
||||
WINDRES:=@$(WINDRES)
|
||||
CP:=@$(CP)
|
||||
MKDIR:=@$(MKDIR)
|
||||
MKISOFS:=@$(MKISOFS)
|
||||
DD:=@$(DD)
|
||||
NDSTOOL:=@$(NDSTOOL)
|
||||
GZIP:=@$(GZIP)
|
||||
MSGFMT:=@$(MSGFMT)
|
||||
UPX:=@$(UPX)
|
||||
|
@ -259,10 +205,8 @@ endif
|
|||
ifdef NOHW
|
||||
OPTS+=-DNOHW
|
||||
else
|
||||
ifndef DC
|
||||
#Hurdler: not really supported and not tested recently
|
||||
#OPTS+=-DUSE_PALETTED_TEXTURE
|
||||
endif
|
||||
OPTS+=-DHWRENDER
|
||||
OBJS+=$(OBJDIR)/hw_bsp.o $(OBJDIR)/hw_draw.o $(OBJDIR)/hw_light.o \
|
||||
$(OBJDIR)/hw_main.o $(OBJDIR)/hw_clip.o $(OBJDIR)/hw_md2.o $(OBJDIR)/hw_cache.o $(OBJDIR)/hw_trick.o
|
||||
|
@ -368,14 +312,6 @@ else
|
|||
OBJS:=$(OBJDIR)/md5.o $(OBJS)
|
||||
endif
|
||||
|
||||
ifdef FAKEDC
|
||||
OPTS+=-DDC
|
||||
endif
|
||||
|
||||
ifdef FAKEPSP
|
||||
OPTS+=-DPSP
|
||||
endif
|
||||
|
||||
ifdef NOPOSTPROCESSING
|
||||
OPTS+=-DNOPOSTPROCESSING
|
||||
endif
|
||||
|
@ -527,49 +463,20 @@ ifdef DJGPPDOS
|
|||
all: pre-build $(BIN)/$(EXENAME)
|
||||
endif
|
||||
|
||||
ifdef XBOX
|
||||
all: pre-build $(BIN)/$(BINNAME)
|
||||
endif
|
||||
|
||||
ifdef PS3N
|
||||
all: pre-build $(BIN)/$(PKGNAME)
|
||||
endif
|
||||
|
||||
ifdef WII
|
||||
all: pre-build $(BIN)/$(DOLNAME)
|
||||
endif
|
||||
|
||||
ifdef PANDORA
|
||||
all: pre-build $(BIN)/$(PNDNAME)
|
||||
endif
|
||||
|
||||
ifdef PSP
|
||||
all: pre-build $(BIN)/$(BINNAME) post-build
|
||||
endif
|
||||
|
||||
ifdef DC
|
||||
all: pre-build $(BIN)/$(BINNAME) post-build
|
||||
endif
|
||||
|
||||
ifndef DC
|
||||
ifndef PSP
|
||||
ifndef XBOX
|
||||
ifdef MINGW
|
||||
ifndef SDL
|
||||
all: pre-build $(BIN)/$(EXENAME) dll
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SDL
|
||||
all: pre-build $(BIN)/$(EXENAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef NDS
|
||||
all: $(BIN)/$(EXENAME:.elf=.nds)
|
||||
endif
|
||||
|
||||
ifdef DUMMY
|
||||
all: $(BIN)/$(EXENAME)
|
||||
|
@ -623,12 +530,10 @@ endif
|
|||
|
||||
# mac os x lsdlsrb2 does not like objcopy
|
||||
ifndef MACOSX
|
||||
ifndef PSP
|
||||
$(OBJCOPY) $(BIN)/$(EXENAME) $(BIN)/$(DBGNAME)
|
||||
$(OBJCOPY) --strip-debug $(BIN)/$(EXENAME)
|
||||
-$(OBJCOPY) --add-gnu-debuglink=$(BIN)/$(DBGNAME) $(BIN)/$(EXENAME)
|
||||
endif
|
||||
endif
|
||||
ifndef NOUPX
|
||||
-$(UPX) $(UPX_OPTS) $(BIN)/$(EXENAME)
|
||||
endif
|
||||
|
@ -653,7 +558,7 @@ else
|
|||
dll : opengl_dll
|
||||
endif
|
||||
ifdef MINGW
|
||||
all_dll: opengl_dll minigl_dll ds3d_dll fmod_dll openal_dll
|
||||
all_dll: opengl_dll ds3d_dll fmod_dll openal_dll
|
||||
|
||||
opengl_dll: $(BIN)/r_opengl.dll
|
||||
$(BIN)/r_opengl.dll: $(OBJDIR)/ogl_win.o $(OBJDIR)/r_opengl.o
|
||||
|
@ -664,12 +569,6 @@ ifndef NOUPX
|
|||
-$(UPX) $(UPX_OPTS) $@
|
||||
endif
|
||||
|
||||
minigl_dll: $(BIN)/r_minigl.dll
|
||||
$(BIN)/r_minigl.dll: $(OBJDIR)/r_minigl.o
|
||||
-$(MKDIR) $(BIN)
|
||||
@echo Linking R_MiniGL.dll...
|
||||
$(CC) --shared $^ -o $@ -g -Wl,--add-stdcall-alias -lgdi32
|
||||
|
||||
ds3d_dll: $(BIN)/s_ds3d.dll
|
||||
$(BIN)/s_ds3d.dll: $(OBJDIR)/s_ds3d.o
|
||||
@echo Linking S_DS3d.dll...
|
||||
|
@ -748,16 +647,6 @@ endif
|
|||
$(REMOVE) $(OBJDIR)/depend.ped
|
||||
@echo "Created dependency file, depend.dep"
|
||||
|
||||
ifdef DC
|
||||
$(OBJDIR)/v_video.o: v_video.c doomdef.h doomtype.h g_state.h m_swap.h r_local.h \
|
||||
tables.h m_fixed.h screen.h command.h m_bbox.h r_main.h d_player.h \
|
||||
p_pspr.h info.h d_think.h sounds.h p_mobj.h doomdata.h d_ticcmd.h \
|
||||
r_data.h r_defs.h r_state.h r_bsp.h r_segs.h r_plane.h r_sky.h \
|
||||
r_things.h r_draw.h v_video.h hu_stuff.h d_event.h w_wad.h console.h \
|
||||
i_video.h z_zone.h doomstat.h d_clisrv.h d_netcmd.h
|
||||
$(CC) $(CFLAGS) -fno-omit-frame-pointer $(WFLAGS) -c $< -o $@
|
||||
endif
|
||||
|
||||
ifdef VALGRIND
|
||||
$(OBJDIR)/z_zone.o: z_zone.c
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -DHAVE_VALGRIND $(VALGRIND_CFLAGS) -c $< -o $@
|
||||
|
@ -799,70 +688,6 @@ $(OBJDIR)/%.o: %.s
|
|||
$(OBJDIR)/SRB2.res: win32/Srb2win.rc win32/afxres.h win32/resource.h
|
||||
$(WINDRES) -i $< -O rc $(WINDRESFLAGS) --include-dir=win32 -o $@ -O coff
|
||||
|
||||
ifdef DC
|
||||
$(OBJDIR)/romdisk.img:
|
||||
$(KOS_GENROMFS) -f romdisk.img -d ../data -v
|
||||
|
||||
$(OBJDIR)/romdisk.o: romdisk.img
|
||||
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o
|
||||
|
||||
$(OBJDIR)/dchelp.o: $(INTERFACE)/SRB2DC/dchelp.c
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/i_udp.o: $(INTERFACE)/SRB2DC/i_udp.c
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
|
||||
$(BIN)/IP.BIN: $(INTERFACE)/SRB2DC/IP.BIN
|
||||
$(CP) $< $@
|
||||
|
||||
$(BIN)/SRB2DC.cdi.pass1: $(INTERFACE)/SRB2DC/SELFBOOT.BIN
|
||||
$(CP) $< $@
|
||||
|
||||
$(BIN)/$(BINNAME): $(BIN)/$(EXENAME)
|
||||
$(KOS_OBJCOPY) -R .stack -O binary $< $@
|
||||
|
||||
$(BIN)/1ST_READ.BIN: $(BIN)/$(BINNAME) $(BIN)/scramble
|
||||
$(BIN)/scramble $< $@
|
||||
|
||||
$(BIN)/scramble: $(INTERFACE)/SRB2DC/scramble.c
|
||||
-$(MKDIR) $(BIN)
|
||||
$(HOSTCC) $< -o $@
|
||||
|
||||
iso: $(BIN)/SRB2DC.iso
|
||||
cdi: $(BIN)/SRB2DC.cdi
|
||||
|
||||
$(BIN)/SRB2DC.iso.pass1: $(BIN)/1ST_READ.BIN $(BIN)/IP.BIN
|
||||
-$(MKDIR) $(BIN)/cdrom
|
||||
$(CP) $(BIN)/1ST_READ.BIN $(D_FILES) $(BIN)/cdrom
|
||||
$(MKISOFS) -l -r -o $@ $(BIN)/cdrom
|
||||
|
||||
$(BIN)/SRB2DC.iso.pass2: $(BIN)/SRB2DC.iso.pass1
|
||||
$(DD) if=$< of=$@ bs=2048 skip=16 status=noxfer
|
||||
|
||||
$(BIN)/SRB2DC.iso: $(BIN)/SRB2DC.iso.pass2 $(BIN)/IP.BIN
|
||||
@cat $(BIN)/IP.BIN $(BIN)/SRB2DC.iso.pass2 > $@
|
||||
|
||||
$(BIN)/SRB2DC.cdi: $(BIN)/SRB2DC.iso.pass2 $(BIN)/SRB2DC.cdi.pass1 $(BIN)/IP.BIN
|
||||
@cat $(BIN)/SRB2DC.cdi.pass1 $(BIN)/IP.BIN $(BIN)/SRB2DC.iso.pass2 > $@
|
||||
|
||||
post-build: $(BIN)/1ST_READ.BIN
|
||||
endif
|
||||
|
||||
ifdef XBOX
|
||||
$(OBJDIR)/xboxhelp.o: $(INTERFACE)/SRB2XBOX/xboxhelp.c
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
|
||||
$(BIN)/$(BINNAME): $(BIN)/$(EXENAME)
|
||||
$(CXBE) -OUT:"$@" -DUMPINFO:"$(BIN)/SRB2XBOX.cxbe" -TITLE:"Sonic Robo Blast 2" $<
|
||||
endif
|
||||
|
||||
ifdef NDS
|
||||
$(BIN)/$(EXENAME:.elf=.nds): $(BIN)/$(EXENAME:.elf=.arm9)
|
||||
$(NDSTOOL) -c $@ -9 $(BIN)/$(EXENAME:.elf=.arm9)
|
||||
|
||||
%.arm9: %.elf
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
endif
|
||||
|
||||
ifdef MINGW
|
||||
ifndef SDL
|
||||
|
@ -882,14 +707,6 @@ $(OBJDIR)/ogl_win.o: hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h \
|
|||
d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
|
||||
|
||||
$(OBJDIR)/r_minigl.o: hardware/r_minigl/r_minigl.c hardware/r_opengl/r_opengl.h \
|
||||
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
||||
command.h hardware/hw_data.h hardware/hw_glide.h hardware/hw_defs.h \
|
||||
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h am_map.h \
|
||||
d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
|
||||
endif
|
||||
|
||||
ifndef NOHS
|
||||
|
@ -939,25 +756,6 @@ $(OBJDIR)/s_openal.o: hardware/s_openal/s_openal.c hardware/hw3dsdrv.h \
|
|||
hardware/hw_dll.h
|
||||
$(CC) $(M5) -Os -o $(OBJDIR)/s_openal.o -DHW3SOUND -DUNIXCOMMON -shared -nostartfiles -c hardware/s_openal/s_openal.c
|
||||
endif
|
||||
|
||||
ifdef FILTERS
|
||||
$(OBJDIR)/%.o: $(INTERFACE)/filter/%.c
|
||||
@echo $< needs deps
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/filters.o: $(INTERFACE)/filter/filters.c $(INTERFACE)/filter/filters.c \
|
||||
$(INTERFACE)/filter/filters.h
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/hq2x.o: $(INTERFACE)/filter/hq2x.c $(INTERFACE)/filter/hq2x.c \
|
||||
$(INTERFACE)/filter/filters.h
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/lq2x.o: $(INTERFACE)/filter/lq2x.c $(INTERFACE)/filter/lq2x.c \
|
||||
$(INTERFACE)/filter/filters.h $(INTERFACE)/filter/interp.h \
|
||||
$(INTERFACE)/filter/hq2x.h $(INTERFACE)/filter/lq2x.h
|
||||
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
||||
endif
|
||||
endif
|
||||
|
||||
#############################################################
|
||||
|
|
112
src/Makefile.cfg
112
src/Makefile.cfg
|
@ -92,10 +92,6 @@ ifdef GCC295
|
|||
GCC29=1
|
||||
endif
|
||||
|
||||
ifdef DC
|
||||
NOCASTALIGNWARN=1
|
||||
endif
|
||||
|
||||
OLDWFLAGS:=$(WFLAGS)
|
||||
# -W -Wno-unused
|
||||
WFLAGS=-Wall
|
||||
|
@ -156,15 +152,11 @@ endif
|
|||
ifdef GCC40
|
||||
WFLAGS+=-Wold-style-definition
|
||||
endif
|
||||
ifndef XBOX
|
||||
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
|
||||
endif
|
||||
ifdef GCC40
|
||||
WFLAGS+=-Wmissing-field-initializers
|
||||
endif
|
||||
ifndef XBOX
|
||||
WFLAGS+=-Wmissing-noreturn
|
||||
endif
|
||||
#WFLAGS+=-Wmissing-format-attribute
|
||||
#WFLAGS+=-Wno-multichar
|
||||
#WFLAGS+=-Wno-deprecated-declarations
|
||||
|
@ -222,18 +214,11 @@ endif
|
|||
|
||||
|
||||
#indicate platform and what interface use with
|
||||
ifndef WINCE
|
||||
ifndef XBOX
|
||||
ifndef PSP
|
||||
ifndef DC
|
||||
ifndef WII
|
||||
ifndef PS3N
|
||||
ifndef LINUX
|
||||
ifndef FREEBSD
|
||||
ifndef CYGWIN32
|
||||
ifndef MINGW
|
||||
ifndef SDL
|
||||
ifndef NDS
|
||||
ifndef DUMMY
|
||||
DJGPPDOS=1
|
||||
endif
|
||||
|
@ -242,13 +227,6 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#determine the interface directory (where you put all i_*.c)
|
||||
i_cdmus_o=$(OBJDIR)/i_cdmus.o
|
||||
|
@ -266,10 +244,7 @@ else
|
|||
NASM?=nasm
|
||||
endif
|
||||
REMOVE?=rm -f
|
||||
CP?=cp
|
||||
MKDIR?=mkdir -p
|
||||
MKISOFS?=mkisofs
|
||||
DD?=dd
|
||||
GZIP?=gzip
|
||||
GZIP_OPTS?=-9 -f -n
|
||||
GZIP_OPT2=$(GZIP_OPTS) --rsyncable
|
||||
|
@ -336,79 +311,11 @@ ifdef MINGW64
|
|||
OBJDIR:=$(OBJDIR)/Mingw64
|
||||
BIN:=$(BIN)/Mingw64
|
||||
else
|
||||
ifdef WII
|
||||
INTERFACE=sdl12
|
||||
NONX86=1
|
||||
STATIC=1
|
||||
PREFIX?=powerpc-eabi
|
||||
SDL=1
|
||||
SDL12=1
|
||||
SDLMAIN=1
|
||||
OBJDIR:=$(OBJDIR)/Wii
|
||||
BIN:=$(BIN)/Wii
|
||||
NOUPX=1
|
||||
else
|
||||
ifdef PS3N
|
||||
INTERFACE=sdl12
|
||||
NONX86=1
|
||||
STATIC=1
|
||||
PREFIX?=ppu
|
||||
SDL=1
|
||||
SDL12=1
|
||||
# unsure?
|
||||
#SDLMAIN=1
|
||||
# can't compile SDL_mixer for ps3...
|
||||
NOMIXER=1
|
||||
OBJDIR:=$(OBJDIR)/PS3
|
||||
BIN:=$(BIN)/PS3
|
||||
else
|
||||
ifdef MINGW
|
||||
INTERFACE=win32
|
||||
NASMFORMAT=win32
|
||||
OBJDIR:=$(OBJDIR)/Mingw
|
||||
BIN:=$(BIN)/Mingw
|
||||
else
|
||||
ifdef XBOX
|
||||
INTERFACE=sdl12
|
||||
NASMFORMAT=win32
|
||||
PREFIX?=/usr/local/openxdk/bin/i386-pc-xbox
|
||||
SDL=1
|
||||
SDL12=1
|
||||
OBJDIR:=$(OBJDIR)/XBOX
|
||||
BIN:=$(BIN)/XBOX
|
||||
else
|
||||
ifdef PSP
|
||||
INTERFACE=sdl12
|
||||
NONX86=1
|
||||
SDL=1
|
||||
SDL12=1
|
||||
OBJDIR:=$(OBJDIR)/PSP
|
||||
BIN:=$(BIN)/PSP
|
||||
NOUPX=1
|
||||
else
|
||||
ifdef DC
|
||||
INTERFACE=sdl12
|
||||
NONX86=1
|
||||
SDL=1
|
||||
SDL12=1
|
||||
OBJDIR:=$(OBJDIR)/DC
|
||||
BIN:=$(BIN)/DC
|
||||
NOUPX=1
|
||||
else
|
||||
ifdef WINCE
|
||||
INTERFACE=sdl12
|
||||
NONX86=1
|
||||
PREFIX?=arm-wince-pe
|
||||
SDL=1
|
||||
SDL12=1
|
||||
OBJDIR:=$(OBJDIR)/WinCE
|
||||
BIN:=$(BIN)/WinCE
|
||||
else
|
||||
ifdef NDS
|
||||
INTERFACE=nds
|
||||
OBJDIR:=$(OBJDIR)/nds
|
||||
BIN:=$(BIN)/nds
|
||||
NOUPX=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -417,19 +324,6 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef GP2X
|
||||
ifdef SDL
|
||||
SDL12=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ARCHNAME
|
||||
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
|
||||
|
@ -464,13 +358,7 @@ OBJDUMP_OPTS?=--wide --source --line-numbers
|
|||
LD=$(CC)
|
||||
|
||||
ifdef SDL
|
||||
# SDL 2.0
|
||||
ifndef SDL12
|
||||
INTERFACE=sdl
|
||||
# SDL 1.2
|
||||
else
|
||||
INTERFACE=sdl12
|
||||
endif
|
||||
OBJDIR:=$(OBJDIR)/SDL
|
||||
endif
|
||||
|
||||
|
|
|
@ -44,10 +44,6 @@ static const UINT8 NOCLIMBBROWNS = (2*16);
|
|||
static const UINT8 NOCLIMBYELLOWS = (11*16);
|
||||
|
||||
|
||||
#ifdef _NDS
|
||||
#undef BACKGROUND
|
||||
#endif
|
||||
|
||||
// Automap colors
|
||||
#define BACKGROUND DBLACK
|
||||
#define YOURCOLORS DWHITE
|
||||
|
|
|
@ -1236,7 +1236,7 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
|
|||
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -1255,9 +1255,6 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, "Netvar not found with netid %hu\n", netid);
|
||||
return;
|
||||
}
|
||||
#if 0 //defined (GP2X) || defined (PSP)
|
||||
CONS_Printf("Netvar received: %s [netid=%d] value %s\n", cvar->name, netid, svalue);
|
||||
#endif
|
||||
DEBFILE(va("Netvar received: %s [netid=%d] value %s\n", cvar->name, netid, svalue));
|
||||
|
||||
Setvalue(cvar, svalue, stealth);
|
||||
|
@ -1356,7 +1353,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
|||
if (var->flags & CV_NETVAR)
|
||||
{
|
||||
// send the value of the variable
|
||||
XBOXSTATIC UINT8 buf[128];
|
||||
UINT8 buf[128];
|
||||
UINT8 *p = buf;
|
||||
if (!(server || (adminplayer == consoleplayer)))
|
||||
{
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#ifdef _XBOX
|
||||
#include <openxdk/debug.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
|
@ -329,12 +326,7 @@ static void CON_SetupColormaps(void)
|
|||
|
||||
// Setup the console text buffer
|
||||
//
|
||||
// for WII, libogc already has a CON_Init function, we must rename it here
|
||||
#ifdef _WII
|
||||
void CON_InitWii(void)
|
||||
#else
|
||||
void CON_Init(void)
|
||||
#endif
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
|
@ -1032,10 +1024,10 @@ boolean CON_Responder(event_t *ev)
|
|||
// allow people to use keypad in console (good for typing IP addresses) - Calum
|
||||
if (key >= KEY_KEYPAD7 && key <= KEY_KPADDEL)
|
||||
{
|
||||
XBOXSTATIC char keypad_translation[] = {'7','8','9','-',
|
||||
'4','5','6','+',
|
||||
'1','2','3',
|
||||
'0','.'};
|
||||
char keypad_translation[] = {'7','8','9','-',
|
||||
'4','5','6','+',
|
||||
'1','2','3',
|
||||
'0','.'};
|
||||
|
||||
key = keypad_translation[key - KEY_KEYPAD7];
|
||||
}
|
||||
|
@ -1171,7 +1163,7 @@ static void CON_Print(char *msg)
|
|||
|
||||
void CON_LogMessage(const char *msg)
|
||||
{
|
||||
XBOXSTATIC char txt[8192], *t;
|
||||
char txt[8192], *t;
|
||||
const char *p = msg, *e = txt+sizeof (txt)-2;
|
||||
|
||||
for (t = txt; *p != '\0'; p++)
|
||||
|
@ -1207,15 +1199,10 @@ void CONS_Printf(const char *fmt, ...)
|
|||
va_end(argptr);
|
||||
|
||||
// echo console prints to log file
|
||||
#ifndef _arch_dreamcast
|
||||
DEBFILE(txt);
|
||||
#endif
|
||||
|
||||
if (!con_started)
|
||||
{
|
||||
#if defined (_XBOX) && defined (__GNUC__)
|
||||
if (!keyboard_started) debugPrint(txt);
|
||||
#endif
|
||||
#ifdef PC_DOS
|
||||
CON_LogMessage(txt);
|
||||
free(txt);
|
||||
|
@ -1236,7 +1223,7 @@ void CONS_Printf(const char *fmt, ...)
|
|||
// if not in display loop, force screen update
|
||||
if (con_startup)
|
||||
{
|
||||
#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL))
|
||||
#ifdef _WINDOWS
|
||||
static lumpnum_t con_backpic_lumpnum = UINT32_MAX;
|
||||
patch_t *con_backpic;
|
||||
|
||||
|
|
|
@ -13,11 +13,7 @@
|
|||
#include "d_event.h"
|
||||
#include "command.h"
|
||||
|
||||
#ifdef _WII
|
||||
void CON_InitWii(void);
|
||||
#else
|
||||
void CON_Init(void);
|
||||
#endif
|
||||
|
||||
boolean CON_Responder(event_t *ev);
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
/// \file d_clisrv.c
|
||||
/// \brief SRB2 Network game communication and protocol, all OS independent parts.
|
||||
|
||||
#if !defined (UNDER_CE)
|
||||
#include <time.h>
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h> //for unlink
|
||||
#endif
|
||||
|
@ -50,10 +48,6 @@
|
|||
#include "f_finale.h"
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#include "sdl12/SRB2XBOX/xboxhelp.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// NETWORKING
|
||||
//
|
||||
|
@ -393,7 +387,7 @@ static void ExtraDataTicker(void)
|
|||
{
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3];
|
||||
UINT8 buf[3];
|
||||
|
||||
buf[0] = (UINT8)i;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -544,6 +538,7 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
|
|||
rsp->thokitem = (UINT32)LONG(players[i].thokitem); //mobjtype_t
|
||||
rsp->spinitem = (UINT32)LONG(players[i].spinitem); //mobjtype_t
|
||||
rsp->revitem = (UINT32)LONG(players[i].revitem); //mobjtype_t
|
||||
rsp->followitem = (UINT32)LONG(players[i].followitem); //mobjtype_t
|
||||
rsp->actionspd = (fixed_t)LONG(players[i].actionspd);
|
||||
rsp->mindash = (fixed_t)LONG(players[i].mindash);
|
||||
rsp->maxdash = (fixed_t)LONG(players[i].maxdash);
|
||||
|
@ -673,6 +668,7 @@ static void resynch_read_player(resynch_pak *rsp)
|
|||
players[i].thokitem = (UINT32)LONG(rsp->thokitem); //mobjtype_t
|
||||
players[i].spinitem = (UINT32)LONG(rsp->spinitem); //mobjtype_t
|
||||
players[i].revitem = (UINT32)LONG(rsp->revitem); //mobjtype_t
|
||||
players[i].followitem = (UINT32)LONG(rsp->followitem); //mobjtype_t
|
||||
players[i].actionspd = (fixed_t)LONG(rsp->actionspd);
|
||||
players[i].mindash = (fixed_t)LONG(rsp->mindash);
|
||||
players[i].maxdash = (fixed_t)LONG(rsp->maxdash);
|
||||
|
@ -1027,7 +1023,7 @@ static void SV_SendResynch(INT32 node)
|
|||
|
||||
if (resynch_score[node] > (unsigned)cv_resynchattempts.value*250)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)nodetoplayer[node];
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
|
@ -1503,7 +1499,7 @@ static void SV_SavedGame(void)
|
|||
{
|
||||
size_t length;
|
||||
UINT8 *savebuffer;
|
||||
XBOXSTATIC char tmpsave[256];
|
||||
char tmpsave[256];
|
||||
|
||||
if (!cv_dumpconsistency.value)
|
||||
return;
|
||||
|
@ -1545,7 +1541,7 @@ static void CL_LoadReceivedSavegame(void)
|
|||
{
|
||||
UINT8 *savebuffer = NULL;
|
||||
size_t length, decompressedlen;
|
||||
XBOXSTATIC char tmpsave[256];
|
||||
char tmpsave[256];
|
||||
|
||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
|
||||
|
@ -2003,7 +1999,7 @@ static void CL_ConnectToServer(boolean viams)
|
|||
tic_t asksent;
|
||||
#endif
|
||||
#ifdef JOININGAME
|
||||
XBOXSTATIC char tmpsave[256];
|
||||
char tmpsave[256];
|
||||
|
||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
#endif
|
||||
|
@ -2560,7 +2556,7 @@ static void Command_Ban(void)
|
|||
|
||||
if (server || adminplayer == consoleplayer)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
UINT8 *p = buf;
|
||||
const SINT8 pn = nametonum(COM_Argv(1));
|
||||
const INT32 node = playernode[(INT32)pn];
|
||||
|
@ -2626,7 +2622,7 @@ static void Command_Kick(void)
|
|||
|
||||
if (server || adminplayer == consoleplayer)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
UINT8 *p = buf;
|
||||
const SINT8 pn = nametonum(COM_Argv(1));
|
||||
|
||||
|
@ -2675,7 +2671,7 @@ static void Command_Kick(void)
|
|||
static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
||||
{
|
||||
INT32 pnum, msg;
|
||||
XBOXSTATIC char buf[3 + MAX_REASONLENGTH];
|
||||
char buf[3 + MAX_REASONLENGTH];
|
||||
char *reason = buf;
|
||||
|
||||
pnum = READUINT8(*p);
|
||||
|
@ -3066,7 +3062,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal add player command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -3151,7 +3147,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
static boolean SV_AddWaitingPlayers(void)
|
||||
{
|
||||
INT32 node, n, newplayer = false;
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
UINT8 newplayernum = 0;
|
||||
|
||||
// What is the reason for this? Why can't newplayernum always be 0?
|
||||
|
@ -3212,7 +3208,7 @@ void CL_AddSplitscreenPlayer(void)
|
|||
|
||||
void CL_RemoveSplitscreenPlayer(void)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
if (cl_mode != CL_CONNECTED)
|
||||
return;
|
||||
|
@ -3656,11 +3652,10 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
|||
*
|
||||
*/
|
||||
static void HandlePacketFromPlayer(SINT8 node)
|
||||
{FILESTAMP
|
||||
XBOXSTATIC INT32 netconsole;
|
||||
XBOXSTATIC tic_t realend, realstart;
|
||||
XBOXSTATIC UINT8 *pak, *txtpak, numtxtpak;
|
||||
FILESTAMP
|
||||
{
|
||||
INT32 netconsole;
|
||||
tic_t realend, realstart;
|
||||
UINT8 *pak, *txtpak, numtxtpak;
|
||||
|
||||
txtpak = NULL;
|
||||
|
||||
|
@ -3734,7 +3729,7 @@ FILESTAMP
|
|||
if (netcmds[maketic%BACKUPTICS][netconsole].forwardmove > MAXPLMOVE || netcmds[maketic%BACKUPTICS][netconsole].forwardmove < -MAXPLMOVE
|
||||
|| netcmds[maketic%BACKUPTICS][netconsole].sidemove > MAXPLMOVE || netcmds[maketic%BACKUPTICS][netconsole].sidemove < -MAXPLMOVE)
|
||||
{
|
||||
XBOXSTATIC char buf[2];
|
||||
char buf[2];
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal movement value received from node %d\n"), netconsole);
|
||||
//D_Clearticcmd(k);
|
||||
|
||||
|
@ -3777,7 +3772,7 @@ FILESTAMP
|
|||
}
|
||||
else
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3];
|
||||
UINT8 buf[3];
|
||||
|
||||
buf[0] = (UINT8)netconsole;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -3868,7 +3863,7 @@ FILESTAMP
|
|||
nodewaiting[node] = 0;
|
||||
if (netconsole != -1 && playeringame[netconsole])
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)netconsole;
|
||||
if (netbuffer->packettype == PT_NODETIMEOUT)
|
||||
buf[1] = KICK_MSG_TIMEOUT;
|
||||
|
@ -3896,7 +3891,7 @@ FILESTAMP
|
|||
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
|
@ -3921,7 +3916,7 @@ FILESTAMP
|
|||
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
|
@ -3987,7 +3982,7 @@ FILESTAMP
|
|||
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC char buf[2];
|
||||
char buf[2];
|
||||
buf[0] = (char)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
|
@ -4007,7 +4002,7 @@ FILESTAMP
|
|||
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC char buf[2];
|
||||
char buf[2];
|
||||
buf[0] = (char)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
|
@ -4037,7 +4032,7 @@ FILESTAMP
|
|||
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
|
@ -4060,9 +4055,8 @@ FILESTAMP
|
|||
*
|
||||
*/
|
||||
static void GetPackets(void)
|
||||
{FILESTAMP
|
||||
XBOXSTATIC SINT8 node; // The packet sender
|
||||
FILESTAMP
|
||||
{
|
||||
SINT8 node; // The packet sender
|
||||
|
||||
player_joining = false;
|
||||
|
||||
|
@ -4562,7 +4556,7 @@ static inline void PingUpdate(void)
|
|||
{
|
||||
if (playeringame[i] && laggers[i])
|
||||
{
|
||||
XBOXSTATIC char buf[2];
|
||||
char buf[2];
|
||||
|
||||
buf[0] = (char)i;
|
||||
buf[1] = KICK_MSG_PING_HIGH;
|
||||
|
@ -4634,9 +4628,9 @@ void NetUpdate(void)
|
|||
|
||||
if (server)
|
||||
CL_SendClientCmd(); // send it
|
||||
FILESTAMP
|
||||
|
||||
GetPackets(); // get packet from client or from server
|
||||
FILESTAMP
|
||||
|
||||
// client send the command after a receive of the server
|
||||
// the server send before because in single player is beter
|
||||
|
||||
|
|
|
@ -189,6 +189,7 @@ typedef struct
|
|||
UINT32 thokitem; // mobjtype_t
|
||||
UINT32 spinitem; // mobjtype_t
|
||||
UINT32 revitem; // mobjtype_t
|
||||
UINT32 followitem; // mobjtype_t
|
||||
fixed_t actionspd;
|
||||
fixed_t mindash;
|
||||
fixed_t maxdash;
|
||||
|
|
63
src/d_main.c
63
src/d_main.c
|
@ -30,16 +30,12 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
|||
//int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#if !defined (UNDER_CE)
|
||||
#include <time.h>
|
||||
#elif defined (_XBOX)
|
||||
#define NO_TIME
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
#include "am_map.h"
|
||||
|
@ -82,10 +78,6 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
|||
#include "config.h.in"
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#include "sdl12/SRB2XBOX/xboxhelp.h"
|
||||
#endif
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h" // 3D View Rendering
|
||||
#endif
|
||||
|
@ -120,13 +112,8 @@ INT32 postimgparam;
|
|||
postimg_t postimgtype2 = postimg_none;
|
||||
INT32 postimgparam2;
|
||||
|
||||
#ifdef _XBOX
|
||||
boolean nomidimusic = true, nosound = true;
|
||||
boolean nodigimusic = true;
|
||||
#else
|
||||
boolean nomidimusic = false, nosound = false;
|
||||
boolean nodigimusic = false; // No fmod-based music
|
||||
#endif
|
||||
|
||||
// These variables are only true if
|
||||
// the respective sound system is initialized
|
||||
|
@ -140,13 +127,8 @@ boolean advancedemo;
|
|||
INT32 debugload = 0;
|
||||
#endif
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
char srb2home[256] = "/cd";
|
||||
char srb2path[256] = "/cd";
|
||||
#else
|
||||
char srb2home[256] = ".";
|
||||
char srb2path[256] = ".";
|
||||
#endif
|
||||
boolean usehome = true;
|
||||
const char *pandf = "%s" PATHSEP "%s";
|
||||
|
||||
|
@ -816,17 +798,11 @@ static void IdentifyVersion(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if !defined(_WIN32_WCE) && !defined(_PS3)
|
||||
if (getcwd(srb2path, 256) != NULL)
|
||||
srb2waddir = srb2path;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef _arch_dreamcast
|
||||
srb2waddir = "/cd";
|
||||
#else
|
||||
srb2waddir = ".";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -878,11 +854,7 @@ static void IdentifyVersion(void)
|
|||
|
||||
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
||||
{
|
||||
#if defined (DC) && 0
|
||||
const char *musicfile = "music_dc.dta";
|
||||
#else
|
||||
const char *musicfile = "music.dta";
|
||||
#endif
|
||||
const char *musicpath = va(pandf,srb2waddir,musicfile);
|
||||
int ms = W_VerifyNMUSlumps(musicpath); // Don't forget the music!
|
||||
if (ms == 1)
|
||||
|
@ -974,7 +946,7 @@ void D_SRB2Main(void)
|
|||
boolean autostart = false;
|
||||
|
||||
// keep error messages until the final flush(stderr)
|
||||
#if !defined (PC_DOS) && !defined (_WIN32_WCE) && !defined(NOTERMIOS)
|
||||
#if !defined (PC_DOS) && !defined(NOTERMIOS)
|
||||
if (setvbuf(stderr, NULL, _IOFBF, 1000))
|
||||
I_OutputMsg("setvbuf didnt work\n");
|
||||
#endif
|
||||
|
@ -996,11 +968,11 @@ void D_SRB2Main(void)
|
|||
// identify the main IWAD file to use
|
||||
IdentifyVersion();
|
||||
|
||||
#if !defined (_WIN32_WCE) && !defined(NOTERMIOS)
|
||||
#if !defined(NOTERMIOS)
|
||||
setbuf(stdout, NULL); // non-buffered output
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X)
|
||||
#if 0 //defined (_DEBUG)
|
||||
devparm = M_CheckParm("-nodebug") == 0;
|
||||
#else
|
||||
devparm = M_CheckParm("-debug") != 0;
|
||||
|
@ -1026,13 +998,8 @@ void D_SRB2Main(void)
|
|||
|
||||
if (!userhome)
|
||||
{
|
||||
#if ((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__CYGWIN__) && !defined (DC) && !defined (PSP) && !defined(GP2X)
|
||||
#if ((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)
|
||||
I_Error("Please set $HOME to your home directory\n");
|
||||
#elif defined (_WIN32_WCE) && 0
|
||||
if (dedicated)
|
||||
snprintf(configfile, sizeof configfile, "/Storage Card/SRB2DEMO/d"CONFIGFILENAME);
|
||||
else
|
||||
snprintf(configfile, sizeof configfile, "/Storage Card/SRB2DEMO/"CONFIGFILENAME);
|
||||
#else
|
||||
if (dedicated)
|
||||
snprintf(configfile, sizeof configfile, "d"CONFIGFILENAME);
|
||||
|
@ -1069,10 +1036,6 @@ void D_SRB2Main(void)
|
|||
}
|
||||
|
||||
configfile[sizeof configfile - 1] = '\0';
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
strcpy(downloaddir, "/ram"); // the dreamcast's TMP
|
||||
#endif
|
||||
}
|
||||
|
||||
// rand() needs seeded regardless of password
|
||||
|
@ -1206,12 +1169,7 @@ void D_SRB2Main(void)
|
|||
HU_Init();
|
||||
|
||||
COM_Init();
|
||||
// libogc has a CON_Init function, we must rename SRB2's CON_Init in WII/libogc
|
||||
#ifndef _WII
|
||||
CON_Init();
|
||||
#else
|
||||
CON_InitWii();
|
||||
#endif
|
||||
|
||||
D_RegisterServerCommands();
|
||||
D_RegisterClientCommands(); // be sure that this is called before D_CheckNetGame
|
||||
|
@ -1445,26 +1403,19 @@ const char *D_Home(void)
|
|||
#ifdef ANDROID
|
||||
return "/data/data/org.srb2/";
|
||||
#endif
|
||||
#ifdef _arch_dreamcast
|
||||
char VMUHOME[] = "HOME=/vmu/a1";
|
||||
putenv(VMUHOME); //don't use I_PutEnv
|
||||
#endif
|
||||
|
||||
if (M_CheckParm("-home") && M_IsNextParm())
|
||||
userhome = M_GetNextParm();
|
||||
else
|
||||
{
|
||||
#if defined (GP2X)
|
||||
usehome = false; //let use the CWD
|
||||
return NULL;
|
||||
#elif !((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__APPLE__) && !defined(_WIN32_WCE)
|
||||
#if !((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__APPLE__)
|
||||
if (FIL_FileOK(CONFIGFILENAME))
|
||||
usehome = false; // Let's NOT use home
|
||||
else
|
||||
#endif
|
||||
userhome = I_GetEnv("HOME"); //Alam: my new HOME for srb2
|
||||
}
|
||||
#if defined (_WIN32) && !defined(_WIN32_WCE) //Alam: only Win32 have APPDATA and USERPROFILE
|
||||
#ifdef _WIN32 //Alam: only Win32 have APPDATA and USERPROFILE
|
||||
if (!userhome && usehome) //Alam: Still not?
|
||||
{
|
||||
char *testhome = NULL;
|
||||
|
|
|
@ -1359,11 +1359,6 @@ boolean D_CheckNetGame(void)
|
|||
netbuffer = (doomdata_t *)(void *)&doomcom->data;
|
||||
|
||||
#ifdef DEBUGFILE
|
||||
#ifdef _arch_dreamcast
|
||||
//debugfile = stderr;
|
||||
if (debugfile)
|
||||
CONS_Printf(M_GetText("debug output to: %s\n"), "STDERR");
|
||||
#else
|
||||
if (M_CheckParm("-debugfile"))
|
||||
{
|
||||
char filename[21];
|
||||
|
@ -1381,7 +1376,6 @@ boolean D_CheckNetGame(void)
|
|||
else
|
||||
CONS_Alert(CONS_WARNING, M_GetText("cannot debug output to file %s!\n"), filename);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
D_ClientServerInit();
|
||||
|
|
|
@ -244,22 +244,10 @@ INT32 cv_debug;
|
|||
consvar_t cv_usemouse = {"use_mouse", "On", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
#if defined (DC) || defined (_XBOX) || defined (WMINPUT) || defined (_WII) //joystick 1 and 2
|
||||
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usejoystick2 = {"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
||||
#elif defined (PSP) || defined (GP2X) || defined (_NDS) //only one joystick
|
||||
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usejoystick2 = {"use_joystick2", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else //all esle, no joystick
|
||||
consvar_t cv_usejoystick = {"use_joystick", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usejoystick2 = {"use_joystick2", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
#if (defined (LJOYSTICK) || defined (HAVE_SDL))
|
||||
#ifdef LJOYSTICK
|
||||
consvar_t cv_joyport = {"joyport", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -1044,7 +1032,7 @@ static void SetPlayerName(INT32 playernum, char *newname)
|
|||
CONS_Printf(M_GetText("Player %d sent a bad name change\n"), playernum+1);
|
||||
if (server && netgame)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -1124,7 +1112,7 @@ static INT32 snacpending = 0, snac2pending = 0, chmappending = 0;
|
|||
//
|
||||
static void SendNameAndColor(void)
|
||||
{
|
||||
XBOXSTATIC char buf[MAXPLAYERNAME+2];
|
||||
char buf[MAXPLAYERNAME+2];
|
||||
char *p;
|
||||
|
||||
p = buf;
|
||||
|
@ -1405,7 +1393,7 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
|
|||
|
||||
if (kick)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal color change received from %s (team: %d), color: %d)\n"), player_names[playernum], p->ctfteam, p->skincolor);
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
|
@ -1432,7 +1420,7 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
|
|||
|
||||
void SendWeaponPref(void)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[1];
|
||||
UINT8 buf[1];
|
||||
|
||||
buf[0] = 0;
|
||||
if (players[consoleplayer].pflags & PF_FLIPCAM)
|
||||
|
@ -1448,7 +1436,7 @@ void SendWeaponPref(void)
|
|||
|
||||
void SendWeaponPref2(void)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[1];
|
||||
UINT8 buf[1];
|
||||
|
||||
buf[0] = 0;
|
||||
if (players[secondarydisplayplayer].pflags & PF_FLIPCAM)
|
||||
|
@ -1837,7 +1825,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal map change received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -1914,7 +1902,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
|
||||
static void Command_Pause(void)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
UINT8 *cp = buf;
|
||||
|
||||
if (COM_Argc() > 1)
|
||||
|
@ -1950,7 +1938,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal pause command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -1993,7 +1981,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
|
|||
// Command for stuck characters in netgames, griefing, etc.
|
||||
static void Command_Suicide(void)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[4];
|
||||
UINT8 buf[4];
|
||||
UINT8 *cp = buf;
|
||||
|
||||
WRITEINT32(cp, consoleplayer);
|
||||
|
@ -2030,7 +2018,7 @@ static void Got_Suicide(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal suicide command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2099,7 +2087,7 @@ static void Got_Clearscores(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal clear scores command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2452,7 +2440,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2467,7 +2455,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2506,7 +2494,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2559,7 +2547,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
|
||||
if (server && ((NetPacket.packet.newteam < 0 || NetPacket.packet.newteam > 3) || error))
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2710,7 +2698,7 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
|
|||
(void)salt;
|
||||
memset(dest, 0, 16);
|
||||
#else
|
||||
XBOXSTATIC char tmpbuf[256];
|
||||
char tmpbuf[256];
|
||||
const size_t sl = strlen(salt);
|
||||
|
||||
if (len > 256-sl)
|
||||
|
@ -2765,7 +2753,7 @@ static void Command_Login_f(void)
|
|||
// If we have no MD5 support then completely disable XD_LOGIN responses for security.
|
||||
CONS_Alert(CONS_NOTICE, "Remote administration commands are not supported in this build.\n");
|
||||
#else
|
||||
XBOXSTATIC UINT8 finalmd5[16];
|
||||
UINT8 finalmd5[16];
|
||||
const char *pw;
|
||||
|
||||
// If the server uses login, it will effectively just remove admin privileges
|
||||
|
@ -2819,7 +2807,7 @@ static void Got_Login(UINT8 **cp, INT32 playernum)
|
|||
|
||||
static void Command_Verify_f(void)
|
||||
{
|
||||
XBOXSTATIC char buf[8]; // Should be plenty
|
||||
char buf[8]; // Should be plenty
|
||||
char *temp;
|
||||
INT32 playernum;
|
||||
|
||||
|
@ -2856,7 +2844,7 @@ static void Got_Verification(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal verification received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2936,7 +2924,7 @@ static void Got_MotD_f(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal motd change received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -2957,7 +2945,7 @@ static void Got_MotD_f(UINT8 **cp, INT32 playernum)
|
|||
static void Command_RunSOC(void)
|
||||
{
|
||||
const char *fn;
|
||||
XBOXSTATIC char buf[255];
|
||||
char buf[255];
|
||||
size_t length = 0;
|
||||
|
||||
if (COM_Argc() != 2)
|
||||
|
@ -2999,7 +2987,7 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal runsoc command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -3042,7 +3030,7 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum)
|
|||
static void Command_Addfile(void)
|
||||
{
|
||||
const char *fn, *p;
|
||||
XBOXSTATIC char buf[256];
|
||||
char buf[256];
|
||||
char *buf_p = buf;
|
||||
INT32 i;
|
||||
int musiconly; // W_VerifyNMUSlumps isn't boolean
|
||||
|
@ -3142,7 +3130,7 @@ static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum)
|
|||
|
||||
if ((playernum != serverplayer && playernum != adminplayer) || kick)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
||||
|
||||
|
@ -3202,7 +3190,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -3923,7 +3911,7 @@ static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal exitlevel command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
|
|
@ -11,21 +11,14 @@
|
|||
/// \brief Transfer a file using HSendPacket.
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef _WIN32_WCE
|
||||
#ifdef __OS2__
|
||||
#include <sys/types.h>
|
||||
#endif // __OS2__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if !defined (UNDER_CE)
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#if ((defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__)) && !defined (_XBOX)
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#elif !defined (_WIN32_WCE) && !(defined (_XBOX) && !defined (__GNUC__))
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <utime.h>
|
||||
|
@ -34,7 +27,7 @@
|
|||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#elif defined (_WIN32) && !defined (_WIN32_WCE)
|
||||
#elif defined (_WIN32)
|
||||
#include <sys/utime.h>
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
|
@ -931,7 +924,7 @@ size_t nameonlylength(const char *s)
|
|||
|
||||
filestatus_t checkfilemd5(char *filename, const UINT8 *wantedmd5sum)
|
||||
{
|
||||
#if defined (NOMD5) || defined (_arch_dreamcast)
|
||||
#if defined (NOMD5)
|
||||
(void)wantedmd5sum;
|
||||
(void)filename;
|
||||
#else
|
||||
|
@ -966,9 +959,5 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
|||
if (homecheck == FS_FOUND)
|
||||
return filesearch(filename, srb2path, wantedmd5sum, completepath, 10);
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
return filesearch(filename, "/cd", wantedmd5sum, completepath, 10);
|
||||
#else
|
||||
return filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -369,6 +369,8 @@ typedef struct player_s
|
|||
mobjtype_t thokitem; // Object # to spawn for the thok
|
||||
mobjtype_t spinitem; // Object # to spawn for spindash/spinning
|
||||
mobjtype_t revitem; // Object # to spawn for spindash/spinning
|
||||
mobjtype_t followitem; // Object # to spawn for Smiles
|
||||
mobj_t *followmobj; // Smiles all around
|
||||
|
||||
fixed_t actionspd; // Speed of thok/glide/fly
|
||||
fixed_t mindash; // Minimum spindash speed
|
||||
|
|
|
@ -1804,6 +1804,7 @@ static actionpointer_t actionpointers[] =
|
|||
{{A_FlickyHeightCheck}, "A_FLICKYHEIGHTCHECK"},
|
||||
{{A_FlickyFlutter}, "A_FLICKYFLUTTER"},
|
||||
{{A_FlameParticle}, "A_FLAMEPARTICLE"},
|
||||
{{A_FadeOverlay}, "A_FADEOVERLAY"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
|
@ -1884,7 +1885,7 @@ static void readframe(MYFILE *f, INT32 num)
|
|||
{
|
||||
size_t z;
|
||||
boolean found = false;
|
||||
XBOXSTATIC char actiontocompare[32];
|
||||
char actiontocompare[32];
|
||||
|
||||
memset(actiontocompare, 0x00, sizeof(actiontocompare));
|
||||
strlcpy(actiontocompare, word2, sizeof (actiontocompare));
|
||||
|
@ -2831,6 +2832,11 @@ static void readmaincfg(MYFILE *f)
|
|||
bootmap = (INT16)value;
|
||||
//titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "STARTCHAR"))
|
||||
{
|
||||
startchar = (INT16)value;
|
||||
char_on = -1;
|
||||
}
|
||||
else
|
||||
deh_warning("Maincfg: unknown word '%s'", word);
|
||||
}
|
||||
|
@ -3032,7 +3038,7 @@ static void DEH_LoadDehackedFile(MYFILE *f)
|
|||
dbg_line = -1; // start at -1 so the first line is 0.
|
||||
while (!myfeof(f))
|
||||
{
|
||||
XBOXSTATIC char origpos[128];
|
||||
char origpos[128];
|
||||
INT32 size = 0;
|
||||
char *traverse;
|
||||
|
||||
|
@ -3460,15 +3466,12 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAY_MELEE_LANDING",
|
||||
|
||||
// SF_SUPER
|
||||
"S_PLAY_SUPERTRANS1",
|
||||
"S_PLAY_SUPERTRANS2",
|
||||
"S_PLAY_SUPERTRANS3",
|
||||
"S_PLAY_SUPERTRANS4",
|
||||
"S_PLAY_SUPERTRANS5",
|
||||
"S_PLAY_SUPERTRANS6",
|
||||
"S_PLAY_SUPERTRANS7",
|
||||
"S_PLAY_SUPERTRANS8",
|
||||
"S_PLAY_SUPERTRANS9", // This has special significance in the code. If you add more frames, search for it and make the appropriate changes.
|
||||
"S_PLAY_SUPER_TRANS1",
|
||||
"S_PLAY_SUPER_TRANS2",
|
||||
"S_PLAY_SUPER_TRANS3",
|
||||
"S_PLAY_SUPER_TRANS4",
|
||||
"S_PLAY_SUPER_TRANS5",
|
||||
"S_PLAY_SUPER_TRANS6", // This has special significance in the code. If you add more frames, search for it and make the appropriate changes.
|
||||
|
||||
// technically the player goes here but it's an infinite tic state
|
||||
"S_OBJPLACE_DUMMY",
|
||||
|
@ -3484,15 +3487,12 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAY_SIGN",
|
||||
|
||||
// NiGHTS character (uses player sprite)
|
||||
"S_PLAY_NIGHTS_TRANS",
|
||||
"S_PLAY_NIGHTS_TRANS1",
|
||||
"S_PLAY_NIGHTS_TRANS2",
|
||||
"S_PLAY_NIGHTS_TRANS3",
|
||||
"S_PLAY_NIGHTS_TRANS4",
|
||||
"S_PLAY_NIGHTS_TRANS5",
|
||||
"S_PLAY_NIGHTS_TRANS6",
|
||||
"S_PLAY_NIGHTS_TRANS7",
|
||||
"S_PLAY_NIGHTS_TRANS8",
|
||||
"S_PLAY_NIGHTS_TRANS9",
|
||||
|
||||
"S_PLAY_NIGHTS_STAND",
|
||||
"S_PLAY_NIGHTS_FLOAT",
|
||||
|
@ -3527,6 +3527,20 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAY_NIGHTS_FLYC",
|
||||
"S_PLAY_NIGHTS_DRILLC",
|
||||
|
||||
// c:
|
||||
"S_TAILSOVERLAY_STAND",
|
||||
"S_TAILSOVERLAY_0DEGREES",
|
||||
"S_TAILSOVERLAY_PLUS30DEGREES",
|
||||
"S_TAILSOVERLAY_PLUS60DEGREES",
|
||||
"S_TAILSOVERLAY_MINUS30DEGREES",
|
||||
"S_TAILSOVERLAY_MINUS60DEGREES",
|
||||
"S_TAILSOVERLAY_RUN",
|
||||
"S_TAILSOVERLAY_FLY",
|
||||
"S_TAILSOVERLAY_TIRE",
|
||||
"S_TAILSOVERLAY_PAIN",
|
||||
"S_TAILSOVERLAY_GASP",
|
||||
"S_TAILSOVERLAY_EDGE",
|
||||
|
||||
// Blue Crawla
|
||||
"S_POSS_STND",
|
||||
"S_POSS_RUN1",
|
||||
|
@ -5881,6 +5895,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
|
||||
"MT_THOK", // Thok! mobj
|
||||
"MT_PLAYER",
|
||||
"MT_TAILSOVERLAY", // c:
|
||||
|
||||
// Enemies
|
||||
"MT_BLUECRAWLA",
|
||||
|
|
|
@ -28,13 +28,11 @@
|
|||
|
||||
// Use Mixer interface?
|
||||
#ifdef HAVE_MIXER
|
||||
//#if !defined(DC) && !defined(_WIN32_WCE) && !defined(_XBOX) && !defined(GP2X)
|
||||
#define SOUND SOUND_MIXER
|
||||
#define NOHS // No HW3SOUND
|
||||
#ifdef HW3SOUND
|
||||
#undef HW3SOUND
|
||||
#endif
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
// Use generic SDL interface.
|
||||
|
@ -70,7 +68,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32) || defined (_WIN32_WCE)
|
||||
#ifdef _WIN32
|
||||
#define ASMCALL __cdecl
|
||||
#else
|
||||
#define ASMCALL
|
||||
|
@ -87,13 +85,6 @@
|
|||
// warning C4152: nonstandard extension, function/data pointer conversion in expression
|
||||
// warning C4213: nonstandard extension used : cast on l-value
|
||||
|
||||
#if defined (_WIN32_WCE) && defined (DEBUG) && defined (ARM)
|
||||
#if defined (ARMV4) || defined (ARMV4I)
|
||||
//#pragma warning(disable : 1166)
|
||||
// warning LNK1166: cannot adjust code at offset=
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include "doomtype.h"
|
||||
|
||||
|
@ -110,13 +101,11 @@
|
|||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#if !defined (_WIN32_WCE)
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
#if ((defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__)) && !defined (_XBOX)
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
|
@ -381,13 +370,11 @@ enum {
|
|||
};
|
||||
|
||||
// Name of local directory for config files and savegames
|
||||
#if !defined(_arch_dreamcast) && !defined(_WIN32_WCE) && !defined(GP2X) && !defined(_WII) && !defined(_PS3)
|
||||
#if (((defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
||||
#define DEFAULTDIR ".srb2"
|
||||
#else
|
||||
#define DEFAULTDIR "srb2"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "g_state.h"
|
||||
|
||||
|
@ -548,19 +535,15 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
|||
/// Most modifications should probably enable this.
|
||||
//#define SAVEGAME_OTHERVERSIONS
|
||||
|
||||
#if !defined (_NDS) && !defined (_PSP)
|
||||
/// Shuffle's incomplete OpenGL sorting code.
|
||||
#define SHUFFLE // This has nothing to do with sorting, why was it disabled?
|
||||
#endif
|
||||
|
||||
#if !defined (_NDS) && !defined (_PSP)
|
||||
/// Allow the use of the SOC RESETINFO command.
|
||||
/// \note Builds that are tight on memory should disable this.
|
||||
/// This stops the game from storing backups of the states, sprites, and mobjinfo tables.
|
||||
/// Though this info is compressed under normal circumstances, it's still a lot of extra
|
||||
/// memory that never gets touched.
|
||||
#define ALLOW_RESETDATA
|
||||
#endif
|
||||
|
||||
#ifndef NONET
|
||||
/// Display a connection screen on join attempts.
|
||||
|
|
|
@ -17,16 +17,12 @@
|
|||
#ifndef __DOOMTYPE__
|
||||
#define __DOOMTYPE__
|
||||
|
||||
#if (defined (_WIN32) && !defined (_XBOX)) || (defined (_WIN32_WCE) && !defined (__GNUC__))
|
||||
#ifdef _WIN32
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef _NDS
|
||||
#include <nds.h>
|
||||
#endif
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
#ifdef _MSC_VER
|
||||
#define UINT8 unsigned __int8
|
||||
|
@ -51,19 +47,6 @@ typedef long ssize_t;
|
|||
#if ((_MSC_VER <= 1200) && (!defined(PDWORD_PTR)))
|
||||
#define PDWORD_PTR PDWORD
|
||||
#endif
|
||||
#elif defined (_arch_dreamcast) // KOS Dreamcast
|
||||
#include <arch/types.h>
|
||||
|
||||
#define UINT8 unsigned char
|
||||
#define SINT8 signed char
|
||||
|
||||
#define UINT16 uint16
|
||||
#define INT16 int16
|
||||
|
||||
#define INT32 int
|
||||
#define UINT32 unsigned int
|
||||
#define INT64 int64
|
||||
#define UINT64 uint64
|
||||
#elif defined (__DJGPP__)
|
||||
#define UINT8 unsigned char
|
||||
#define SINT8 signed char
|
||||
|
@ -97,15 +80,13 @@ typedef long ssize_t;
|
|||
#define NOIPX
|
||||
#endif
|
||||
|
||||
#if defined (_MSC_VER) || defined (__OS2__)
|
||||
// Microsoft VisualC++
|
||||
#ifdef _MSC_VER
|
||||
// Microsoft VisualC++
|
||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||
#define snprintf _snprintf
|
||||
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define strncasecmp strnicmp
|
||||
#define strcasecmp stricmp
|
||||
|
@ -118,23 +99,12 @@ typedef long ssize_t;
|
|||
#define strncasecmp strnicmp
|
||||
#define strcasecmp strcmpi
|
||||
#endif
|
||||
#ifdef _PSP
|
||||
#include <malloc.h>
|
||||
#elif (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
#undef stricmp
|
||||
#define stricmp(x,y) strcasecmp(x,y)
|
||||
#undef strnicmp
|
||||
#define strnicmp(x,y,n) strncasecmp(x,y,n)
|
||||
#endif
|
||||
#ifdef _WIN32_WCE
|
||||
#ifndef __GNUC__
|
||||
#define stricmp(x,y) _stricmp(x,y)
|
||||
#define strnicmp _strnicmp
|
||||
#endif
|
||||
#define strdup _strdup
|
||||
#define strupr _strupr
|
||||
#define strlwr _strlwr
|
||||
#endif
|
||||
|
||||
#if defined (macintosh) //|| defined (__APPLE__) //skip all boolean/Boolean crap
|
||||
#define true 1
|
||||
|
@ -154,7 +124,7 @@ typedef long ssize_t;
|
|||
#endif
|
||||
#endif //macintosh
|
||||
|
||||
#if defined (PC_DOS) || defined (_WIN32) || defined (_WII) || defined (_PSP) || defined (_arch_dreamcast) || defined (__HAIKU__) || defined(_NDS) || defined(_PS3)
|
||||
#if defined (PC_DOS) || defined (_WIN32) || defined (__HAIKU__)
|
||||
#define HAVE_DOSSTR_FUNCS
|
||||
#endif
|
||||
|
||||
|
@ -186,15 +156,10 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
|||
//faB: clean that up !!
|
||||
#if defined( _MSC_VER) && (_MSC_VER >= 1800) // MSVC 2013 and forward
|
||||
#include "stdbool.h"
|
||||
#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX)
|
||||
#elif defined (_WIN32)
|
||||
#define false FALSE // use windows types
|
||||
#define true TRUE
|
||||
#define boolean BOOL
|
||||
#elif defined(_NDS)
|
||||
#define boolean bool
|
||||
#elif defined(_PS3) // defined(__GNUC__)?
|
||||
#include <stdbool.h> //_bool_true_false_are_defined?
|
||||
#define boolean bool
|
||||
#else
|
||||
typedef enum {false, true} boolean;
|
||||
#endif
|
||||
|
@ -317,10 +282,6 @@ typedef UINT32 tic_t;
|
|||
#define ATTRPACK __attribute__((packed))
|
||||
#endif
|
||||
#define ATTRUNUSED __attribute__((unused))
|
||||
#ifdef _XBOX
|
||||
#define FILESTAMP I_OutputMsg("%s:%d\n",__FILE__,__LINE__);
|
||||
#define XBOXSTATIC static
|
||||
#endif
|
||||
#elif defined (_MSC_VER)
|
||||
#define ATTRNORETURN __declspec(noreturn)
|
||||
#define ATTRINLINE __forceinline
|
||||
|
@ -374,10 +335,4 @@ typedef UINT32 tic_t;
|
|||
#ifndef ATTRNOINLINE
|
||||
#define ATTRNOINLINE
|
||||
#endif
|
||||
#ifndef XBOXSTATIC
|
||||
#define XBOXSTATIC
|
||||
#endif
|
||||
#ifndef FILESTAMP
|
||||
#define FILESTAMP
|
||||
#endif
|
||||
#endif //__DOOMTYPE__
|
||||
|
|
|
@ -16,16 +16,12 @@
|
|||
#ifdef __GNUC__
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#if defined (_WIN32) && !defined (_XBOX)
|
||||
#ifdef _WIN32
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifdef _WIN32_WCE
|
||||
#include "sdl12/SRB2CE/cehelp.h"
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "filesrch.h"
|
||||
|
@ -34,7 +30,7 @@
|
|||
#include "z_zone.h"
|
||||
#include "m_menu.h" // Addons_option_Onchange
|
||||
|
||||
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && defined (_MSC_VER) && !defined (_XBOX)
|
||||
#if defined (_WIN32) && defined (_MSC_VER)
|
||||
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
|
@ -338,81 +334,6 @@ UINT8 refreshdirmenu = 0;
|
|||
size_t packetsizetally = 0;
|
||||
size_t mainwadstally = 0;
|
||||
|
||||
#if defined (_XBOX) && defined (_MSC_VER)
|
||||
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum,
|
||||
boolean completepath, int maxsearchdepth)
|
||||
{
|
||||
//NONE?
|
||||
startpath = filename = NULL;
|
||||
wantedmd5sum = NULL;
|
||||
maxsearchdepth = 0;
|
||||
completepath = false;
|
||||
return FS_NOTFOUND;
|
||||
}
|
||||
|
||||
boolean preparefilemenu(boolean samedepth)
|
||||
{
|
||||
(void)samedepth;
|
||||
return false;
|
||||
}
|
||||
|
||||
#elif defined (_WIN32_WCE)
|
||||
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum,
|
||||
boolean completepath, int maxsearchdepth)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
//NONE?
|
||||
startpath = filename = NULL;
|
||||
wantedmd5sum = NULL;
|
||||
maxsearchdepth = 0;
|
||||
completepath = false;
|
||||
#else
|
||||
WIN32_FIND_DATA dta;
|
||||
HANDLE searchhandle = INVALID_HANDLE_VALUE;
|
||||
const wchar_t wm[4] = L"*.*";
|
||||
|
||||
//if (startpath) SetCurrentDirectory(startpath);
|
||||
if (FIL_ReadFileOK(filename))
|
||||
{
|
||||
// checkfilemd5 returns an FS_* value, either FS_FOUND or FS_MD5SUMBAD
|
||||
return checkfilemd5(filename, wantedmd5sum);
|
||||
}
|
||||
ZeroMemory(&dta,sizeof (dta));
|
||||
if (maxsearchdepth)
|
||||
searchhandle = FindFirstFile(wm,&dta);
|
||||
if (searchhandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
if ((dta.cFileName[0]!='.') && (dta.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
//if (SetCurrentDirectory(dta.cFileName))
|
||||
{ // can fail if we haven't the right
|
||||
filestatus_t found;
|
||||
found = filesearch(filename,NULL,wantedmd5sum,completepath,maxsearchdepth-1);
|
||||
//SetCurrentDirectory("..");
|
||||
if (found == FS_FOUND || found == FS_MD5SUMBAD)
|
||||
{
|
||||
if (completepath)
|
||||
strcatbf(filename,(char *)dta.cFileName,"\\");
|
||||
FindClose(searchhandle);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (FindNextFile(searchhandle,&dta)==0);
|
||||
FindClose(searchhandle);
|
||||
}
|
||||
#endif
|
||||
return FS_NOTFOUND;
|
||||
}
|
||||
|
||||
boolean preparefilemenu(boolean samedepth)
|
||||
{
|
||||
(void)samedepth;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum, boolean completepath, int maxsearchdepth)
|
||||
{
|
||||
filestatus_t retval = FS_NOTFOUND;
|
||||
|
@ -765,4 +686,3 @@ boolean preparefilemenu(boolean samedepth)
|
|||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
126
src/g_game.c
126
src/g_game.c
|
@ -302,43 +302,7 @@ void SendWeaponPref2(void);
|
|||
|
||||
static CV_PossibleValue_t crosshair_cons_t[] = {{0, "Off"}, {1, "Cross"}, {2, "Angle"}, {3, "Point"}, {0, NULL}};
|
||||
static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
||||
#ifdef _WII
|
||||
{1, "LStick.X"}, {2, "LStick.Y"}, {-1, "LStick.X-"}, {-2, "LStick.Y-"},
|
||||
#if JOYAXISSET > 1
|
||||
{3, "RStick.X"}, {4, "RStick.Y"}, {-3, "RStick.X-"}, {-4, "RStick.Y-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 2
|
||||
{5, "RTrigger"}, {6, "LTrigger"}, {-5, "RTrigger-"}, {-6, "LTrigger-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 3
|
||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 4
|
||||
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 4
|
||||
{9, "LAnalog"}, {10, "RAnalog"}, {-9, "LAnalog-"}, {-10, "RAnalog-"},
|
||||
#endif
|
||||
#elif defined (WMINPUT)
|
||||
{1, "LStick.X"}, {2, "LStick.Y"}, {-1, "LStick.X-"}, {-2, "LStick.Y-"},
|
||||
#if JOYAXISSET > 1
|
||||
{3, "RStick.X"}, {4, "RStick.Y"}, {-3, "RStick.X-"}, {-4, "RStick.Y-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 2
|
||||
{5, "NStick.X"}, {6, "NStick.Y"}, {-5, "NStick.X-"}, {-6, "NStick.Y-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 3
|
||||
{7, "LAnalog"}, {8, "RAnalog"}, {-7, "LAnalog-"}, {-8, "RAnalog-"},
|
||||
#endif
|
||||
#else
|
||||
{1, "X-Axis"}, {2, "Y-Axis"}, {-1, "X-Axis-"}, {-2, "Y-Axis-"},
|
||||
#ifdef _arch_dreamcast
|
||||
{3, "R-Trig"}, {4, "L-Trig"}, {-3, "R-Trig-"}, {-4, "L-Trig-"},
|
||||
{5, "Alt X-Axis"}, {6, "Alt Y-Axis"}, {-5, "Alt X-Axis-"}, {-6, "Alt Y-Axis-"},
|
||||
{7, "Triggers"}, {-7,"Triggers-"},
|
||||
#elif defined (_XBOX)
|
||||
{3, "Alt X-Axis"}, {4, "Alt Y-Axis"}, {-3, "Alt X-Axis-"}, {-4, "Alt Y-Axis-"},
|
||||
#else
|
||||
#if JOYAXISSET > 1
|
||||
{3, "Z-Axis"}, {4, "X-Rudder"}, {-3, "Z-Axis-"}, {-4, "X-Rudder-"},
|
||||
#endif
|
||||
|
@ -347,19 +311,11 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
|||
#endif
|
||||
#if JOYAXISSET > 3
|
||||
{7, "U-Axis"}, {8, "V-Axis"}, {-7, "U-Axis-"}, {-8, "V-Axis-"},
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
{0, NULL}};
|
||||
#ifdef _WII
|
||||
#if JOYAXISSET > 5
|
||||
"More Axis Sets"
|
||||
#endif
|
||||
#else
|
||||
#if JOYAXISSET > 4
|
||||
"More Axis Sets"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -371,13 +327,8 @@ consvar_t cv_mousemove = {"mousemove", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, N
|
|||
consvar_t cv_mousemove2 = {"mousemove2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog = {"analog", "Off", CV_CALL, CV_OnOff, Analog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog2 = {"analog2", "Off", CV_CALL, CV_OnOff, Analog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
#ifdef DC
|
||||
consvar_t cv_useranalog = {"useranalog", "On", CV_SAVE|CV_CALL, CV_OnOff, UserAnalog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_useranalog2 = {"useranalog2", "On", CV_SAVE|CV_CALL, CV_OnOff, UserAnalog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_useranalog = {"useranalog", "Off", CV_SAVE|CV_CALL, CV_OnOff, UserAnalog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_useranalog2 = {"useranalog2", "Off", CV_SAVE|CV_CALL, CV_OnOff, UserAnalog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t directionchar_cons_t[] = {{0, "Camera"}, {1, "Movement"}, {0, NULL}};
|
||||
|
||||
|
@ -399,68 +350,19 @@ typedef enum
|
|||
AXISFIRENORMAL,
|
||||
} axis_input_e;
|
||||
|
||||
#if defined (_WII) || defined (WMINPUT)
|
||||
consvar_t cv_turnaxis = {"joyaxis_turn", "LStick.X", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_moveaxis = {"joyaxis_move", "LStick.Y", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_sideaxis = {"joyaxis_side", "RStick.X", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis = {"joyaxis_look", "RStick.Y", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis = {"joyaxis_fire", "LAnalog", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_firenaxis = {"joyaxis_firenormal", "RAnalog", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_turnaxis = {"joyaxis_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#ifdef PSP
|
||||
consvar_t cv_moveaxis = {"joyaxis_move", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_moveaxis = {"joyaxis_move", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
#ifdef _arch_dreamcast
|
||||
consvar_t cv_sideaxis = {"joyaxis_side", "Triggers", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#elif defined (_XBOX)
|
||||
consvar_t cv_sideaxis = {"joyaxis_side", "Alt X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis = {"joyaxis_look", "Alt Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#elif defined (PSP)
|
||||
consvar_t cv_sideaxis = {"joyaxis_side", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_sideaxis = {"joyaxis_side", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
#ifndef _XBOX
|
||||
#ifdef PSP
|
||||
consvar_t cv_lookaxis = {"joyaxis_look", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_lookaxis = {"joyaxis_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
#endif
|
||||
consvar_t cv_fireaxis = {"joyaxis_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_firenaxis = {"joyaxis_firenormal", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
#if defined (_WII) || defined (WMINPUT)
|
||||
consvar_t cv_turnaxis2 = {"joyaxis2_turn", "LStick.X", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_moveaxis2 = {"joyaxis2_move", "LStick.Y", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_sideaxis2 = {"joyaxis2_side", "RStick.X", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis2 = {"joyaxis2_look", "RStick.Y", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis2 = {"joyaxis2_fire", "LAnalog", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_firenaxis2 = {"joyaxis2_firenormal", "RAnalog", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_turnaxis2 = {"joyaxis2_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_moveaxis2 = {"joyaxis2_move", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#ifdef _arch_dreamcast
|
||||
consvar_t cv_sideaxis2 = {"joyaxis2_side", "Triggers", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#elif defined (_XBOX)
|
||||
consvar_t cv_sideaxis2 = {"joyaxis2_side", "Alt X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis2 = {"joyaxis2_look", "Alt Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#elif defined (_PSP)
|
||||
consvar_t cv_sideaxis2 = {"joyaxis2_side", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#else
|
||||
consvar_t cv_sideaxis2 = {"joyaxis2_side", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
#ifndef _XBOX
|
||||
consvar_t cv_lookaxis2 = {"joyaxis2_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
consvar_t cv_fireaxis2 = {"joyaxis2_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_firenaxis2 = {"joyaxis2_firenormal", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
|
||||
#if MAXPLAYERS > 32
|
||||
#error "please update player_name table using the new value for MAXPLAYERS"
|
||||
|
@ -838,14 +740,6 @@ static INT32 JoyAxis(axis_input_e axissel)
|
|||
axisval = -axisval;
|
||||
flp = true;
|
||||
}
|
||||
#ifdef _arch_dreamcast
|
||||
if (axisval == 7) // special case
|
||||
{
|
||||
retaxis = joyxmove[1] - joyymove[1];
|
||||
goto skipDC;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
||||
return 0;
|
||||
|
||||
|
@ -861,10 +755,6 @@ static INT32 JoyAxis(axis_input_e axissel)
|
|||
retaxis = joyymove[axisval];
|
||||
}
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
skipDC:
|
||||
#endif
|
||||
|
||||
if (retaxis < (-JOYAXISRANGE))
|
||||
retaxis = -JOYAXISRANGE;
|
||||
if (retaxis > (+JOYAXISRANGE))
|
||||
|
@ -916,14 +806,7 @@ static INT32 Joy2Axis(axis_input_e axissel)
|
|||
axisval = -axisval;
|
||||
flp = true;
|
||||
}
|
||||
#ifdef _arch_dreamcast
|
||||
if (axisval == 7) // special case
|
||||
{
|
||||
retaxis = joy2xmove[1] - joy2ymove[1];
|
||||
goto skipDC;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
||||
return 0;
|
||||
|
||||
|
@ -939,10 +822,6 @@ static INT32 Joy2Axis(axis_input_e axissel)
|
|||
retaxis = joy2ymove[axisval];
|
||||
}
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
skipDC:
|
||||
#endif
|
||||
|
||||
if (retaxis < (-JOYAXISRANGE))
|
||||
retaxis = -JOYAXISRANGE;
|
||||
if (retaxis > (+JOYAXISRANGE))
|
||||
|
@ -2144,6 +2023,7 @@ void G_PlayerReborn(INT32 player)
|
|||
UINT32 thokitem;
|
||||
UINT32 spinitem;
|
||||
UINT32 revitem;
|
||||
UINT32 followitem;
|
||||
fixed_t actionspd;
|
||||
fixed_t mindash;
|
||||
fixed_t maxdash;
|
||||
|
@ -2215,6 +2095,7 @@ void G_PlayerReborn(INT32 player)
|
|||
thokitem = players[player].thokitem;
|
||||
spinitem = players[player].spinitem;
|
||||
revitem = players[player].revitem;
|
||||
followitem = players[player].followitem;
|
||||
actionspd = players[player].actionspd;
|
||||
mindash = players[player].mindash;
|
||||
maxdash = players[player].maxdash;
|
||||
|
@ -2252,6 +2133,7 @@ void G_PlayerReborn(INT32 player)
|
|||
p->thokitem = thokitem;
|
||||
p->spinitem = spinitem;
|
||||
p->revitem = revitem;
|
||||
p->followitem = followitem;
|
||||
p->actionspd = actionspd;
|
||||
p->mindash = mindash;
|
||||
p->maxdash = maxdash;
|
||||
|
|
618
src/g_input.c
618
src/g_input.c
|
@ -204,11 +204,9 @@ static keyname_t keynames[] =
|
|||
{KEY_SCROLLLOCK, "SCROLLLOCK"},
|
||||
|
||||
// bill gates keys
|
||||
#ifndef _arch_dreamcast
|
||||
{KEY_LEFTWIN, "LEFTWIN"},
|
||||
{KEY_RIGHTWIN, "RIGHTWIN"},
|
||||
{KEY_MENU, "MENU"},
|
||||
#endif
|
||||
|
||||
{KEY_LSHIFT, "LSHIFT"},
|
||||
{KEY_RSHIFT, "RSHIFT"},
|
||||
|
@ -270,140 +268,24 @@ static keyname_t keynames[] =
|
|||
{KEY_MOUSE1+0,"MOUSE1"},
|
||||
{KEY_MOUSE1+1,"MOUSE2"},
|
||||
{KEY_MOUSE1+2,"MOUSE3"},
|
||||
#if !defined (_arch_dreamcast) && !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_MOUSE1+3,"MOUSE4"},
|
||||
{KEY_MOUSE1+4,"MOUSE5"},
|
||||
{KEY_MOUSE1+5,"MOUSE6"},
|
||||
{KEY_MOUSE1+6,"MOUSE7"},
|
||||
{KEY_MOUSE1+7,"MOUSE8"},
|
||||
#endif
|
||||
{KEY_2MOUSE1+0,"SEC_MOUSE2"}, // BP: sorry my mouse handler swap button 1 and 2
|
||||
{KEY_2MOUSE1+1,"SEC_MOUSE1"},
|
||||
{KEY_2MOUSE1+2,"SEC_MOUSE3"},
|
||||
#if !defined (_arch_dreamcast) && !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_2MOUSE1+3,"SEC_MOUSE4"},
|
||||
{KEY_2MOUSE1+4,"SEC_MOUSE5"},
|
||||
{KEY_2MOUSE1+5,"SEC_MOUSE6"},
|
||||
{KEY_2MOUSE1+6,"SEC_MOUSE7"},
|
||||
{KEY_2MOUSE1+7,"SEC_MOUSE8"},
|
||||
#endif
|
||||
{KEY_MOUSEWHEELUP, "Wheel 1 UP"},
|
||||
{KEY_MOUSEWHEELDOWN, "Wheel 1 Down"},
|
||||
{KEY_2MOUSEWHEELUP, "Wheel 2 UP"},
|
||||
{KEY_2MOUSEWHEELDOWN, "Wheel 2 Down"},
|
||||
|
||||
#ifdef DC
|
||||
{KEY_JOY1+0, "JOYC"},
|
||||
{KEY_JOY1+1, "JOYB"},
|
||||
{KEY_JOY1+2, "JOYA"},
|
||||
{KEY_JOY1+3, "JOYS"},
|
||||
{KEY_JOY1+4, "JOYZ"},
|
||||
{KEY_JOY1+5, "JOYY"},
|
||||
{KEY_JOY1+6, "JOYX"},
|
||||
{KEY_JOY1+7, "JOYD"},
|
||||
#elif defined (_XBOX)
|
||||
{KEY_JOY1+0, "JOYA"},
|
||||
{KEY_JOY1+1, "JOYB"},
|
||||
{KEY_JOY1+2, "JOYX"},
|
||||
{KEY_JOY1+3, "JOYY"},
|
||||
{KEY_JOY1+4, "JOYG"},
|
||||
{KEY_JOY1+5, "JOYW"},
|
||||
{KEY_JOY1+6, "JOYL"},
|
||||
{KEY_JOY1+7, "JOYR"},
|
||||
{KEY_JOY1+8, "JOYS"},
|
||||
{KEY_JOY1+9, "JOYN"},
|
||||
{KEY_JOY1+10,"JOYW"},
|
||||
{KEY_JOY1+11,"JOYE"},
|
||||
#define NOMOREJOYBTN_1S
|
||||
#elif defined (_PSP)
|
||||
{KEY_JOY1+0, "TRIANGLE"},
|
||||
{KEY_JOY1+1, "CIRCLE" },
|
||||
{KEY_JOY1+2, "CROSS" },
|
||||
{KEY_JOY1+3, "SQUARE" },
|
||||
{KEY_JOY1+4, "LTRIGGER"},
|
||||
{KEY_JOY1+5, "RTRIGGER"},
|
||||
{KEY_JOY1+6, "SELECT" },
|
||||
{KEY_JOY1+7, "START" },
|
||||
{KEY_JOY1+8, "HOME" },
|
||||
{KEY_JOY1+9, "HOLD" },
|
||||
#define NOMOREJOYBTN_1S
|
||||
#elif defined (GP2X)
|
||||
{KEY_JOY1+0, "JOYA"},
|
||||
{KEY_JOY1+1, "JOYY"},
|
||||
{KEY_JOY1+2, "JOYB"},
|
||||
{KEY_JOY1+3, "JOYX"},
|
||||
{KEY_JOY1+4, "JOYL"},
|
||||
{KEY_JOY1+5, "JOYR"},
|
||||
{KEY_JOY1+6, "JOYVOLUP"},
|
||||
{KEY_JOY1+7, "JOYVOLDOWN"},
|
||||
{KEY_JOY1+8, "JOYSELECT"},
|
||||
#elif defined (_NDS)
|
||||
{KEY_JOY1+0, "JOYA"},
|
||||
{KEY_JOY1+1, "JOYB"},
|
||||
{KEY_JOY1+2, "JOYX"},
|
||||
{KEY_JOY1+3, "JOYY"},
|
||||
{KEY_JOY1+4, "JOYL"},
|
||||
{KEY_JOY1+5, "JOYR"},
|
||||
{KEY_JOY1+6, "JOYSTART"},
|
||||
{KEY_JOY1+7, "JOYSELECT"},
|
||||
#define NOMOREJOYBTN_1S
|
||||
#elif defined (WMINPUT)
|
||||
{KEY_JOY1+0, "JOYB"},
|
||||
{KEY_JOY1+1, "JOYA"},
|
||||
{KEY_JOY1+2, "JOYUP"},
|
||||
{KEY_JOY1+3, "JOYDOWN"},
|
||||
{KEY_JOY1+4, "JOYLEFT"},
|
||||
{KEY_JOY1+5, "JOYRIGHT"},
|
||||
{KEY_JOY1+6, "JOYAA"},
|
||||
{KEY_JOY1+7, "JOYBB"},
|
||||
{KEY_JOY1+8, "JOYCC"},
|
||||
{KEY_JOY1+9, "JOYXX"},
|
||||
{KEY_JOY1+10, "JOYYY"},
|
||||
{KEY_JOY1+11, "JOYZZ"},
|
||||
{KEY_JOY1+12, "JOYL"},
|
||||
{KEY_JOY1+13, "JOYR"},
|
||||
{KEY_JOY1+14, "JOYZL"},
|
||||
{KEY_JOY1+15, "JOYZR"},
|
||||
{KEY_JOY1+16, "JOYSELECT"},
|
||||
{KEY_JOY1+17, "JOYSTART"},
|
||||
{KEY_JOY1+18, "JOYHOME"},
|
||||
{KEY_JOY1+19, "JOYMINUS"},
|
||||
{KEY_JOY1+20, "JOYPLUS"},
|
||||
{KEY_JOY1+21, "JOY_1"},
|
||||
{KEY_JOY1+22, "JOY_2"},
|
||||
{KEY_JOY1+23, "JOY24"},
|
||||
{KEY_JOY1+24, "JOY25"},
|
||||
{KEY_JOY1+25, "JOY26"},
|
||||
{KEY_JOY1+26, "JOY27"},
|
||||
{KEY_JOY1+27, "JOY28"},
|
||||
{KEY_JOY1+28, "JOY29"},
|
||||
{KEY_JOY1+29, "JOY30"},
|
||||
{KEY_JOY1+30, "JOY31"},
|
||||
{KEY_JOY1+31, "JOY32"},
|
||||
#define NOMOREJOYBTN_1S
|
||||
#elif defined (_WII)
|
||||
{KEY_JOY1+0, "JOYA"},
|
||||
{KEY_JOY1+1, "JOYB"},
|
||||
{KEY_JOY1+2, "JOY1"},
|
||||
{KEY_JOY1+3, "JOY2"},
|
||||
{KEY_JOY1+4, "JOYMINUS"},
|
||||
{KEY_JOY1+5, "JOYPLUS"},
|
||||
{KEY_JOY1+6, "JOYHOME"},
|
||||
{KEY_JOY1+7, "JOYZ"},
|
||||
{KEY_JOY1+8, "JOYC"},
|
||||
{KEY_JOY1+9, "JOYA_CC"},
|
||||
{KEY_JOY1+10, "JOYB_CC"},
|
||||
{KEY_JOY1+11, "JOYX"},
|
||||
{KEY_JOY1+12, "JOYY"},
|
||||
{KEY_JOY1+13, "JOYL"},
|
||||
{KEY_JOY1+14, "JOYR"},
|
||||
{KEY_JOY1+15, "JOYZL"},
|
||||
{KEY_JOY1+16, "JOYZR"},
|
||||
{KEY_JOY1+17, "JOYMINUS_CC"},
|
||||
{KEY_JOY1+18, "JOYHPLUS_CC"},
|
||||
{KEY_JOY1+19, "JOYMHOME_CC"},
|
||||
#define NOMOREJOYBTN_1S
|
||||
#else
|
||||
{KEY_JOY1+0, "JOY1"},
|
||||
{KEY_JOY1+1, "JOY2"},
|
||||
{KEY_JOY1+2, "JOY3"},
|
||||
|
@ -413,8 +295,7 @@ static keyname_t keynames[] =
|
|||
{KEY_JOY1+6, "JOY7"},
|
||||
{KEY_JOY1+7, "JOY8"},
|
||||
{KEY_JOY1+8, "JOY9"},
|
||||
#endif
|
||||
#if !defined (_arch_dreamcast) && !defined (NOMOREJOYBTN_1S)
|
||||
#if !defined (NOMOREJOYBTN_1S)
|
||||
// we use up to 32 buttons in DirectInput
|
||||
{KEY_JOY1+9, "JOY10"},
|
||||
{KEY_JOY1+10, "JOY11"},
|
||||
|
@ -445,12 +326,10 @@ static keyname_t keynames[] =
|
|||
{KEY_HAT1+1, "HATDOWN"},
|
||||
{KEY_HAT1+2, "HATLEFT"},
|
||||
{KEY_HAT1+3, "HATRIGHT"},
|
||||
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_HAT1+4, "HATUP2"},
|
||||
{KEY_HAT1+5, "HATDOWN2"},
|
||||
{KEY_HAT1+6, "HATLEFT2"},
|
||||
{KEY_HAT1+7, "HATRIGHT2"},
|
||||
#ifndef _arch_dreamcast
|
||||
{KEY_HAT1+8, "HATUP3"},
|
||||
{KEY_HAT1+9, "HATDOWN3"},
|
||||
{KEY_HAT1+10, "HATLEFT3"},
|
||||
|
@ -459,142 +338,24 @@ static keyname_t keynames[] =
|
|||
{KEY_HAT1+13, "HATDOWN4"},
|
||||
{KEY_HAT1+14, "HATLEFT4"},
|
||||
{KEY_HAT1+15, "HATRIGHT4"},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
{KEY_DBLMOUSE1+0, "DBLMOUSE1"},
|
||||
{KEY_DBLMOUSE1+1, "DBLMOUSE2"},
|
||||
{KEY_DBLMOUSE1+2, "DBLMOUSE3"},
|
||||
#if !defined (_arch_dreamcast) && !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_DBLMOUSE1+3, "DBLMOUSE4"},
|
||||
{KEY_DBLMOUSE1+4, "DBLMOUSE5"},
|
||||
{KEY_DBLMOUSE1+5, "DBLMOUSE6"},
|
||||
{KEY_DBLMOUSE1+6, "DBLMOUSE7"},
|
||||
{KEY_DBLMOUSE1+7, "DBLMOUSE8"},
|
||||
#endif
|
||||
{KEY_DBL2MOUSE1+0, "DBLSEC_MOUSE2"}, // BP: sorry my mouse handler swap button 1 and 2
|
||||
{KEY_DBL2MOUSE1+1, "DBLSEC_MOUSE1"},
|
||||
{KEY_DBL2MOUSE1+2, "DBLSEC_MOUSE3"},
|
||||
#if !defined (_arch_dreamcast) && !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_DBL2MOUSE1+3, "DBLSEC_MOUSE4"},
|
||||
{KEY_DBL2MOUSE1+4, "DBLSEC_MOUSE5"},
|
||||
{KEY_DBL2MOUSE1+5, "DBLSEC_MOUSE6"},
|
||||
{KEY_DBL2MOUSE1+6, "DBLSEC_MOUSE7"},
|
||||
{KEY_DBL2MOUSE1+7, "DBLSEC_MOUSE8"},
|
||||
#endif
|
||||
|
||||
#ifdef DC
|
||||
{KEY_DBLJOY1+0, "DBLJOYC"},
|
||||
{KEY_DBLJOY1+1, "DBLJOYB"},
|
||||
{KEY_DBLJOY1+2, "DBLJOYA"},
|
||||
{KEY_DBLJOY1+3, "DBLJOYS"},
|
||||
{KEY_DBLJOY1+4, "DBLJOYZ"},
|
||||
{KEY_DBLJOY1+5, "DBLJOYY"},
|
||||
{KEY_DBLJOY1+6, "DBLJOYX"},
|
||||
{KEY_DBLJOY1+7, "DBLJOYD"},
|
||||
#elif defined (_XBOX)
|
||||
{KEY_DBLJOY1+0, "DBLJOYA"},
|
||||
{KEY_DBLJOY1+1, "DBLJOYB"},
|
||||
{KEY_DBLJOY1+2, "DBLJOYX"},
|
||||
{KEY_DBLJOY1+3, "DBLJOYY"},
|
||||
{KEY_DBLJOY1+4, "DBLJOYG"},
|
||||
{KEY_DBLJOY1+5, "DBLJOYW"},
|
||||
{KEY_DBLJOY1+6, "DBLJOYL"},
|
||||
{KEY_DBLJOY1+7, "DBLJOYR"},
|
||||
{KEY_DBLJOY1+8, "DBLJOYS"},
|
||||
{KEY_DBLJOY1+9, "DBLJOYN"},
|
||||
{KEY_DBLJOY1+10,"DBLJOYW"},
|
||||
{KEY_DBLJOY1+11,"DBLJOYE"},
|
||||
#define NOMOREJOYBTN_1DBL
|
||||
#elif defined (_PSP)
|
||||
{KEY_DBLJOY1+0, "DBLTRIANGLE"},
|
||||
{KEY_DBLJOY1+1, "DBLCIRCLE" },
|
||||
{KEY_DBLJOY1+2, "DBLCROSS" },
|
||||
{KEY_DBLJOY1+3, "DBLSQUARE" },
|
||||
{KEY_DBLJOY1+4, "DBLLTRIGGER"},
|
||||
{KEY_DBLJOY1+5, "DBLRTRIGGER"},
|
||||
{KEY_DBLJOY1+6, "DBLSELECT" },
|
||||
{KEY_DBLJOY1+7, "DBLSTART" },
|
||||
{KEY_DBLJOY1+8, "DBLHOME" },
|
||||
{KEY_DBLJOY1+9, "DBLHOLD" },
|
||||
#elif defined (GP2X)
|
||||
{KEY_DBLJOY1+0, "DBLJOYA"},
|
||||
{KEY_DBLJOY1+1, "DBLJOYY"},
|
||||
{KEY_DBLJOY1+2, "DBLJOYB"},
|
||||
{KEY_DBLJOY1+3, "DBLJOYX"},
|
||||
{KEY_DBLJOY1+4, "DBLJOYL"},
|
||||
{KEY_DBLJOY1+5, "DBLJOYR"},
|
||||
{KEY_DBLJOY1+6, "DBLJOYVOLUP"},
|
||||
{KEY_DBLJOY1+7, "DBLJOYVOLDOWN"},
|
||||
{KEY_DBLJOY1+8, "DBLJOYSELECT"},
|
||||
#define NOMOREJOYBTN_1DBL
|
||||
#elif defined (_NDS)
|
||||
{KEY_DBLJOY1+0, "DBLJOYA"},
|
||||
{KEY_DBLJOY1+1, "DBLJOYB"},
|
||||
{KEY_DBLJOY1+2, "DBLJOYX"},
|
||||
{KEY_DBLJOY1+3, "DBLJOYY"},
|
||||
{KEY_DBLJOY1+4, "DBLJOYL"},
|
||||
{KEY_DBLJOY1+5, "DBLJOYR"},
|
||||
{KEY_DBLJOY1+6, "DBLJOYSTART"},
|
||||
{KEY_DBLJOY1+7, "DBLJOYSELECT"},
|
||||
#define NOMOREJOYBTN_1DBL
|
||||
#elif defined (WMINPUT)
|
||||
{KEY_DBLJOY1+0, "DBLJOYB"},
|
||||
{KEY_DBLJOY1+1, "DBLJOYA"},
|
||||
{KEY_DBLJOY1+2, "DBLJOYUP"},
|
||||
{KEY_DBLJOY1+3, "DBLJOYDOWN"},
|
||||
{KEY_DBLJOY1+4, "DBLJOYLEFT"},
|
||||
{KEY_DBLJOY1+5, "DBLJOYRIGHT"},
|
||||
{KEY_DBLJOY1+6, "DBLJOYAA"},
|
||||
{KEY_DBLJOY1+7, "DBLJOYBB"},
|
||||
{KEY_DBLJOY1+8, "DBLJOYCC"},
|
||||
{KEY_DBLJOY1+9, "DBLJOYXX"},
|
||||
{KEY_DBLJOY1+10, "DBLJOYYY"},
|
||||
{KEY_DBLJOY1+11, "DBLJOYZZ"},
|
||||
{KEY_DBLJOY1+12, "DBLJOYL"},
|
||||
{KEY_DBLJOY1+13, "DBLJOYR"},
|
||||
{KEY_DBLJOY1+14, "DBLJOYZL"},
|
||||
{KEY_DBLJOY1+15, "DBLJOYZR"},
|
||||
{KEY_DBLJOY1+16, "DBLJOYSELECT"},
|
||||
{KEY_DBLJOY1+17, "DBLJOYSTART"},
|
||||
{KEY_DBLJOY1+18, "DBLJOYHOME"},
|
||||
{KEY_DBLJOY1+19, "DBLJOYMINUS"},
|
||||
{KEY_DBLJOY1+20, "DBLJOYPLUS"},
|
||||
{KEY_DBLJOY1+21, "DBLJOY_1"},
|
||||
{KEY_DBLJOY1+22, "DBLJOY_2"},
|
||||
{KEY_DBLJOY1+23, "DBLJOY24"},
|
||||
{KEY_DBLJOY1+24, "DBLJOY25"},
|
||||
{KEY_DBLJOY1+25, "DBLJOY26"},
|
||||
{KEY_DBLJOY1+26, "DBLJOY27"},
|
||||
{KEY_DBLJOY1+27, "DBLJOY28"},
|
||||
{KEY_DBLJOY1+28, "DBLJOY29"},
|
||||
{KEY_DBLJOY1+29, "DBLJOY30"},
|
||||
{KEY_DBLJOY1+30, "DBLJOY31"},
|
||||
{KEY_DBLJOY1+31, "DBLJOY32"},
|
||||
#define NOMOREJOYBTN_1DBL
|
||||
#elif defined (_WII)
|
||||
{KEY_DBLJOY1+0, "DBLJOYA"},
|
||||
{KEY_DBLJOY1+1, "DBLJOYB"},
|
||||
{KEY_DBLJOY1+2, "DBLJOY1"},
|
||||
{KEY_DBLJOY1+3, "DBLJOY2"},
|
||||
{KEY_DBLJOY1+4, "DBLJOYMINUS"},
|
||||
{KEY_DBLJOY1+5, "DBLJOYPLUS"},
|
||||
{KEY_DBLJOY1+6, "DBLJOYHOME"},
|
||||
{KEY_DBLJOY1+7, "DBLJOYZ"},
|
||||
{KEY_DBLJOY1+8, "DBLJOYC"},
|
||||
{KEY_DBLJOY1+9, "DBLJOYA_CC"},
|
||||
{KEY_DBLJOY1+10, "DBLJOYB_CC"},
|
||||
{KEY_DBLJOY1+11, "DBLJOYX"},
|
||||
{KEY_DBLJOY1+12, "DBLJOYY"},
|
||||
{KEY_DBLJOY1+13, "DBLJOYL"},
|
||||
{KEY_DBLJOY1+14, "DBLJOYR"},
|
||||
{KEY_DBLJOY1+15, "DBLJOYZL"},
|
||||
{KEY_DBLJOY1+16, "DBLJOYZR"},
|
||||
{KEY_DBLJOY1+17, "DBLJOYMINUS_CC"},
|
||||
{KEY_DBLJOY1+18, "DBLJOYHPLUS_CC"},
|
||||
{KEY_DBLJOY1+19, "DBLJOYMHOME_CC"},
|
||||
#define NOMOREJOYBTN_1DBL
|
||||
#else
|
||||
{KEY_DBLJOY1+0, "DBLJOY1"},
|
||||
{KEY_DBLJOY1+1, "DBLJOY2"},
|
||||
{KEY_DBLJOY1+2, "DBLJOY3"},
|
||||
|
@ -603,8 +364,7 @@ static keyname_t keynames[] =
|
|||
{KEY_DBLJOY1+5, "DBLJOY6"},
|
||||
{KEY_DBLJOY1+6, "DBLJOY7"},
|
||||
{KEY_DBLJOY1+7, "DBLJOY8"},
|
||||
#endif
|
||||
#if !defined (_arch_dreamcast) && !defined (NOMOREJOYBTN_1DBL)
|
||||
#if !defined (NOMOREJOYBTN_1DBL)
|
||||
{KEY_DBLJOY1+8, "DBLJOY9"},
|
||||
{KEY_DBLJOY1+9, "DBLJOY10"},
|
||||
{KEY_DBLJOY1+10, "DBLJOY11"},
|
||||
|
@ -634,12 +394,10 @@ static keyname_t keynames[] =
|
|||
{KEY_DBLHAT1+1, "DBLHATDOWN"},
|
||||
{KEY_DBLHAT1+2, "DBLHATLEFT"},
|
||||
{KEY_DBLHAT1+3, "DBLHATRIGHT"},
|
||||
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_DBLHAT1+4, "DBLHATUP2"},
|
||||
{KEY_DBLHAT1+5, "DBLHATDOWN2"},
|
||||
{KEY_DBLHAT1+6, "DBLHATLEFT2"},
|
||||
{KEY_DBLHAT1+7, "DBLHATRIGHT2"},
|
||||
#ifndef _arch_dreamcast
|
||||
{KEY_DBLHAT1+8, "DBLHATUP3"},
|
||||
{KEY_DBLHAT1+9, "DBLHATDOWN3"},
|
||||
{KEY_DBLHAT1+10, "DBLHATLEFT3"},
|
||||
|
@ -648,101 +406,7 @@ static keyname_t keynames[] =
|
|||
{KEY_DBLHAT1+13, "DBLHATDOWN4"},
|
||||
{KEY_DBLHAT1+14, "DBLHATLEFT4"},
|
||||
{KEY_DBLHAT1+15, "DBLHATRIGHT4"},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DC
|
||||
{KEY_2JOY1+0, "SEC_JOYC"},
|
||||
{KEY_2JOY1+1, "SEC_JOYB"},
|
||||
{KEY_2JOY1+2, "SEC_JOYA"},
|
||||
{KEY_2JOY1+3, "SEC_JOYS"},
|
||||
{KEY_2JOY1+4, "SEC_JOYZ"},
|
||||
{KEY_2JOY1+5, "SEC_JOYY"},
|
||||
{KEY_2JOY1+6, "SEC_JOYX"},
|
||||
{KEY_2JOY1+7, "SEC_JOYD"},
|
||||
#elif defined (_XBOX)
|
||||
{KEY_2JOY1+0, "SEC_JOYA"},
|
||||
{KEY_2JOY1+1, "SEC_JOYB"},
|
||||
{KEY_2JOY1+2, "SEC_JOYX"},
|
||||
{KEY_2JOY1+3, "SEC_JOYY"},
|
||||
{KEY_2JOY1+4, "SEC_JOYG"},
|
||||
{KEY_2JOY1+5, "SEC_JOYW"},
|
||||
{KEY_2JOY1+6, "SEC_JOYL"},
|
||||
{KEY_2JOY1+7, "SEC_JOYR"},
|
||||
{KEY_2JOY1+8, "SEC_JOYS"},
|
||||
{KEY_2JOY1+9, "SEC_JOYN"},
|
||||
{KEY_2JOY1+10,"SEC_JOYW"},
|
||||
{KEY_2JOY1+11,"SEC_JOYE"},
|
||||
#define NOMOREJOYBTN_2S
|
||||
#elif defined (_PSP)
|
||||
{KEY_2JOY1+0, "SEC_TRIANGLE"},
|
||||
{KEY_2JOY1+1, "SEC_CIRCLE" },
|
||||
{KEY_2JOY1+2, "SEC_CROSS" },
|
||||
{KEY_2JOY1+3, "SEC_SQUARE" },
|
||||
{KEY_2JOY1+4, "SEC_LTRIGGER"},
|
||||
{KEY_2JOY1+5, "SEC_RTRIGGER"},
|
||||
{KEY_2JOY1+6, "SEC_SELECT" },
|
||||
{KEY_2JOY1+7, "SEC_START" },
|
||||
{KEY_2JOY1+8, "SEC_HOME" },
|
||||
{KEY_2JOY1+9, "SEC_HOLD" },
|
||||
#define NOMOREJOYBTN_2S
|
||||
#elif defined (WMINPUT)
|
||||
{KEY_2JOY1+0, "SEC_JOYB"},
|
||||
{KEY_2JOY1+1, "SEC_JOYA"},
|
||||
{KEY_2JOY1+2, "SEC_JOYUP"},
|
||||
{KEY_2JOY1+3, "SEC_JOYDOWN"},
|
||||
{KEY_2JOY1+4, "SEC_JOYLEFT"},
|
||||
{KEY_2JOY1+5, "SEC_JOYRIGHT"},
|
||||
{KEY_2JOY1+6, "SEC_JOYAA"},
|
||||
{KEY_2JOY1+7, "SEC_JOYBB"},
|
||||
{KEY_2JOY1+8, "SEC_JOYCC"},
|
||||
{KEY_2JOY1+9, "SEC_JOYXX"},
|
||||
{KEY_2JOY1+10, "SEC_JOYYY"},
|
||||
{KEY_2JOY1+11, "SEC_JOYZZ"},
|
||||
{KEY_2JOY1+12, "SEC_JOYL"},
|
||||
{KEY_2JOY1+13, "SEC_JOYR"},
|
||||
{KEY_2JOY1+14, "SEC_JOYZL"},
|
||||
{KEY_2JOY1+15, "SEC_JOYZR"},
|
||||
{KEY_2JOY1+16, "SEC_JOYSELECT"},
|
||||
{KEY_2JOY1+17, "SEC_JOYSTART"},
|
||||
{KEY_2JOY1+18, "SEC_JOYHOME"},
|
||||
{KEY_2JOY1+19, "SEC_JOYMINUS"},
|
||||
{KEY_2JOY1+20, "SEC_JOYPLUS"},
|
||||
{KEY_2JOY1+21, "SEC_JOY_1"},
|
||||
{KEY_2JOY1+22, "SEC_JOY_2"},
|
||||
{KEY_2JOY1+23, "SEC_JOY24"},
|
||||
{KEY_2JOY1+24, "SEC_JOY25"},
|
||||
{KEY_2JOY1+25, "SEC_JOY26"},
|
||||
{KEY_2JOY1+26, "SEC_JOY27"},
|
||||
{KEY_2JOY1+27, "SEC_JOY28"},
|
||||
{KEY_2JOY1+28, "SEC_JOY29"},
|
||||
{KEY_2JOY1+29, "SEC_JOY30"},
|
||||
{KEY_2JOY1+30, "SEC_JOY31"},
|
||||
{KEY_2JOY1+31, "SEC_JOY32"},
|
||||
#define NOMOREJOYBTN_2S
|
||||
#elif defined (_WII)
|
||||
{KEY_2JOY1+0, "SEC_JOYA"},
|
||||
{KEY_2JOY1+1, "SEC_JOYB"},
|
||||
{KEY_2JOY1+2, "SEC_JOY1"},
|
||||
{KEY_2JOY1+3, "SEC_JOY2"},
|
||||
{KEY_2JOY1+4, "SEC_JOYMINUS"},
|
||||
{KEY_2JOY1+5, "SEC_JOYPLUS"},
|
||||
{KEY_2JOY1+6, "SEC_JOYHOME"},
|
||||
{KEY_2JOY1+7, "SEC_JOYZ"},
|
||||
{KEY_2JOY1+8, "SEC_JOYC"},
|
||||
{KEY_2JOY1+9, "SEC_JOYA_CC"},
|
||||
{KEY_2JOY1+10, "SEC_JOYB_CC"},
|
||||
{KEY_2JOY1+11, "SEC_JOYX"},
|
||||
{KEY_2JOY1+12, "SEC_JOYY"},
|
||||
{KEY_2JOY1+13, "SEC_JOYL"},
|
||||
{KEY_2JOY1+14, "SEC_JOYR"},
|
||||
{KEY_2JOY1+15, "SEC_JOYZL"},
|
||||
{KEY_2JOY1+16, "SEC_JOYZR"},
|
||||
{KEY_2JOY1+17, "SEC_JOYMINUS_CC"},
|
||||
{KEY_2JOY1+18, "SEC_JOYHPLUS_CC"},
|
||||
{KEY_2JOY1+19, "SEC_JOYMHOME_CC"},
|
||||
#define NOMOREJOYBTN_2S
|
||||
#else
|
||||
{KEY_2JOY1+0, "SEC_JOY1"},
|
||||
{KEY_2JOY1+1, "SEC_JOY2"},
|
||||
{KEY_2JOY1+2, "SEC_JOY3"},
|
||||
|
@ -751,8 +415,7 @@ static keyname_t keynames[] =
|
|||
{KEY_2JOY1+5, "SEC_JOY6"},
|
||||
{KEY_2JOY1+6, "SEC_JOY7"},
|
||||
{KEY_2JOY1+7, "SEC_JOY8"},
|
||||
#endif
|
||||
#if !defined (_arch_dreamcast) && !defined (NOMOREJOYBTN_2S)
|
||||
#if !defined (NOMOREJOYBTN_2S)
|
||||
// we use up to 32 buttons in DirectInput
|
||||
{KEY_2JOY1+8, "SEC_JOY9"},
|
||||
{KEY_2JOY1+9, "SEC_JOY10"},
|
||||
|
@ -784,12 +447,10 @@ static keyname_t keynames[] =
|
|||
{KEY_2HAT1+1, "SEC_HATDOWN"},
|
||||
{KEY_2HAT1+2, "SEC_HATLEFT"},
|
||||
{KEY_2HAT1+3, "SEC_HATRIGHT"},
|
||||
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_2HAT1+4, "SEC_HATUP2"},
|
||||
{KEY_2HAT1+5, "SEC_HATDOWN2"},
|
||||
{KEY_2HAT1+6, "SEC_HATLEFT2"},
|
||||
{KEY_2HAT1+7, "SEC_HATRIGHT2"},
|
||||
#ifndef _arch_dreamcast
|
||||
{KEY_2HAT1+8, "SEC_HATUP3"},
|
||||
{KEY_2HAT1+9, "SEC_HATDOWN3"},
|
||||
{KEY_2HAT1+10, "SEC_HATLEFT3"},
|
||||
|
@ -798,101 +459,7 @@ static keyname_t keynames[] =
|
|||
{KEY_2HAT1+13, "SEC_HATDOWN4"},
|
||||
{KEY_2HAT1+14, "SEC_HATLEFT4"},
|
||||
{KEY_2HAT1+15, "SEC_HATRIGHT4"},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DC
|
||||
{KEY_DBL2JOY1+0, "DBLSEC_JOYC"},
|
||||
{KEY_DBL2JOY1+1, "DBLSEC_JOYB"},
|
||||
{KEY_DBL2JOY1+2, "DBLSEC_JOYA"},
|
||||
{KEY_DBL2JOY1+3, "DBLSEC_JOYS"},
|
||||
{KEY_DBL2JOY1+4, "DBLSEC_JOYZ"},
|
||||
{KEY_DBL2JOY1+5, "DBLSEC_JOYY"},
|
||||
{KEY_DBL2JOY1+6, "DBLSEC_JOYX"},
|
||||
{KEY_DBL2JOY1+7, "DBLSEC_JOYD"},
|
||||
#elif defined (_XBOX)
|
||||
{KEY_DBL2JOY1+0, "DBLSEC_JOYA"},
|
||||
{KEY_DBL2JOY1+1, "DBLSEC_JOYB"},
|
||||
{KEY_DBL2JOY1+2, "DBLSEC_JOYX"},
|
||||
{KEY_DBL2JOY1+3, "DBLSEC_JOYY"},
|
||||
{KEY_DBL2JOY1+4, "DBLSEC_JOYG"},
|
||||
{KEY_DBL2JOY1+5, "DBLSEC_JOYW"},
|
||||
{KEY_DBL2JOY1+6, "DBLSEC_JOYL"},
|
||||
{KEY_DBL2JOY1+7, "DBLSEC_JOYR"},
|
||||
{KEY_DBL2JOY1+8, "DBLSEC_JOYS"},
|
||||
{KEY_DBL2JOY1+9, "DBLSEC_JOYN"},
|
||||
{KEY_DBL2JOY1+10,"DBLSEC_JOYW"},
|
||||
{KEY_DBL2JOY1+11,"DBLSEC_JOYE"},
|
||||
#define NOMOREJOYBTN_2DBL
|
||||
#elif defined (_PSP)
|
||||
{KEY_DBL2JOY1+0, "DBLSEC_TRIANGLE"},
|
||||
{KEY_DBL2JOY1+1, "DBLSEC_CIRCLE" },
|
||||
{KEY_DBL2JOY1+2, "DBLSEC_CROSS" },
|
||||
{KEY_DBL2JOY1+3, "DBLSEC_SQUARE" },
|
||||
{KEY_DBL2JOY1+4, "DBLSEC_LTRIGGER"},
|
||||
{KEY_DBL2JOY1+5, "DBLSEC_RTRIGGER"},
|
||||
{KEY_DBL2JOY1+6, "DBLSEC_SELECT" },
|
||||
{KEY_DBL2JOY1+7, "DBLSEC_START" },
|
||||
{KEY_DBL2JOY1+8, "DBLSEC_HOME" },
|
||||
{KEY_DBL2JOY1+9, "DBLSEC_HOLD" },
|
||||
#define NOMOREJOYBTN_2DBL
|
||||
#elif defined (WMINPUT)
|
||||
{KEY_DBL2JOY1+0, "DBLSEC_JOYB"},
|
||||
{KEY_DBL2JOY1+1, "DBLSEC_JOYA"},
|
||||
{KEY_DBL2JOY1+2, "DBLSEC_JOYUP"},
|
||||
{KEY_DBL2JOY1+3, "DBLSEC_JOYDOWN"},
|
||||
{KEY_DBL2JOY1+4, "DBLSEC_JOYLEFT"},
|
||||
{KEY_DBL2JOY1+5, "DBLSEC_JOYRIGHT"},
|
||||
{KEY_DBL2JOY1+6, "DBLSEC_JOYAA"},
|
||||
{KEY_DBL2JOY1+7, "DBLSEC_JOYBB"},
|
||||
{KEY_DBL2JOY1+8, "DBLSEC_JOYCC"},
|
||||
{KEY_DBL2JOY1+9, "DBLSEC_JOYXX"},
|
||||
{KEY_DBL2JOY1+10, "DBLSEC_JOYYY"},
|
||||
{KEY_DBL2JOY1+11, "DBLSEC_JOYZZ"},
|
||||
{KEY_DBL2JOY1+12, "DBLSEC_JOYL"},
|
||||
{KEY_DBL2JOY1+13, "DBLSEC_JOYR"},
|
||||
{KEY_DBL2JOY1+14, "DBLSEC_JOYZL"},
|
||||
{KEY_DBL2JOY1+15, "DBLSEC_JOYZR"},
|
||||
{KEY_DBL2JOY1+16, "DBLSEC_JOYSELECT"},
|
||||
{KEY_DBL2JOY1+17, "DBLSEC_JOYSTART"},
|
||||
{KEY_DBL2JOY1+18, "DBLSEC_JOYHOME"},
|
||||
{KEY_DBL2JOY1+19, "DBLSEC_JOYMINUS"},
|
||||
{KEY_DBL2JOY1+20, "DBLSEC_JOYPLUS"},
|
||||
{KEY_DBL2JOY1+21, "DBLSEC_JOY_1"},
|
||||
{KEY_DBL2JOY1+22, "DBLSEC_JOY_2"},
|
||||
{KEY_DBL2JOY1+23, "DBLSEC_JOY24"},
|
||||
{KEY_DBL2JOY1+24, "DBLSEC_JOY25"},
|
||||
{KEY_DBL2JOY1+25, "DBLSEC_JOY26"},
|
||||
{KEY_DBL2JOY1+26, "DBLSEC_JOY27"},
|
||||
{KEY_DBL2JOY1+27, "DBLSEC_JOY28"},
|
||||
{KEY_DBL2JOY1+28, "DBLSEC_JOY29"},
|
||||
{KEY_DBL2JOY1+29, "DBLSEC_JOY30"},
|
||||
{KEY_DBL2JOY1+30, "DBLSEC_JOY31"},
|
||||
{KEY_DBL2JOY1+31, "DBLSEC_JOY32"},
|
||||
#define NOMOREJOYBTN_2SDBL
|
||||
#elif defined (_WII)
|
||||
{KEY_DBL2JOY1+0, "DBLSEC_JOYA"},
|
||||
{KEY_DBL2JOY1+1, "DBLSEC_JOYB"},
|
||||
{KEY_DBL2JOY1+2, "DBLSEC_JOY1"},
|
||||
{KEY_DBL2JOY1+3, "DBLSEC_JOY2"},
|
||||
{KEY_DBL2JOY1+4, "DBLSEC_JOYMINUS"},
|
||||
{KEY_DBL2JOY1+5, "DBLSEC_JOYPLUS"},
|
||||
{KEY_DBL2JOY1+6, "DBLSEC_JOYHOME"},
|
||||
{KEY_DBL2JOY1+7, "DBLSEC_JOYZ"},
|
||||
{KEY_DBL2JOY1+8, "DBLSEC_JOYC"},
|
||||
{KEY_DBL2JOY1+9, "DBLSEC_JOYA_CC"},
|
||||
{KEY_DBL2JOY1+10, "DBLSEC_JOYB_CC"},
|
||||
{KEY_DBL2JOY1+11, "DBLSEC_JOYX"},
|
||||
{KEY_DBL2JOY1+12, "DBLSEC_JOYY"},
|
||||
{KEY_DBL2JOY1+13, "DBLSEC_JOYL"},
|
||||
{KEY_DBL2JOY1+14, "DBLSEC_JOYR"},
|
||||
{KEY_DBL2JOY1+15, "DBLSEC_JOYZL"},
|
||||
{KEY_DBL2JOY1+16, "DBLSEC_JOYZR"},
|
||||
{KEY_DBL2JOY1+17, "DBLSEC_JOYMINUS_CC"},
|
||||
{KEY_DBL2JOY1+18, "DBLSEC_JOYHPLUS_CC"},
|
||||
{KEY_DBL2JOY1+19, "DBLSEC_JOYMHOME_CC"},
|
||||
#define NOMOREJOYBTN_2DBL
|
||||
#else
|
||||
{KEY_DBL2JOY1+0, "DBLSEC_JOY1"},
|
||||
{KEY_DBL2JOY1+1, "DBLSEC_JOY2"},
|
||||
{KEY_DBL2JOY1+2, "DBLSEC_JOY3"},
|
||||
|
@ -901,8 +468,7 @@ static keyname_t keynames[] =
|
|||
{KEY_DBL2JOY1+5, "DBLSEC_JOY6"},
|
||||
{KEY_DBL2JOY1+6, "DBLSEC_JOY7"},
|
||||
{KEY_DBL2JOY1+7, "DBLSEC_JOY8"},
|
||||
#endif
|
||||
#if !defined (_arch_dreamcast) && !defined (NOMOREJOYBTN_2DBL)
|
||||
#if !defined (NOMOREJOYBTN_2DBL)
|
||||
{KEY_DBL2JOY1+8, "DBLSEC_JOY9"},
|
||||
{KEY_DBL2JOY1+9, "DBLSEC_JOY10"},
|
||||
{KEY_DBL2JOY1+10, "DBLSEC_JOY11"},
|
||||
|
@ -932,12 +498,10 @@ static keyname_t keynames[] =
|
|||
{KEY_DBL2HAT1+1, "DBLSEC_HATDOWN"},
|
||||
{KEY_DBL2HAT1+2, "DBLSEC_HATLEFT"},
|
||||
{KEY_DBL2HAT1+3, "DBLSEC_HATRIGHT"},
|
||||
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
|
||||
{KEY_DBL2HAT1+4, "DBLSEC_HATUP2"},
|
||||
{KEY_DBL2HAT1+5, "DBLSEC_HATDOWN2"},
|
||||
{KEY_DBL2HAT1+6, "DBLSEC_HATLEFT2"},
|
||||
{KEY_DBL2HAT1+7, "DBLSEC_HATRIGHT2"},
|
||||
#ifndef _arch_dreamcast
|
||||
{KEY_DBL2HAT1+8, "DBLSEC_HATUP3"},
|
||||
{KEY_DBL2HAT1+9, "DBLSEC_HATDOWN3"},
|
||||
{KEY_DBL2HAT1+10, "DBLSEC_HATLEFT3"},
|
||||
|
@ -946,8 +510,6 @@ static keyname_t keynames[] =
|
|||
{KEY_DBL2HAT1+13, "DBLSEC_HATDOWN4"},
|
||||
{KEY_DBL2HAT1+14, "DBLSEC_HATLEFT4"},
|
||||
{KEY_DBL2HAT1+15, "DBLSEC_HATRIGHT4"},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -1049,105 +611,6 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DC
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_HAT1+0; //Up
|
||||
gamecontrol[gc_forward ][1] = KEY_UPARROW;
|
||||
gamecontrol[gc_backward ][0] = KEY_HAT1+1; //Down
|
||||
gamecontrol[gc_backward ][1] = KEY_DOWNARROW;
|
||||
//gamecontrol[gc_straferight][0] = '[';
|
||||
//gamecontrol[gc_strafeleft ][0] = ']';
|
||||
gamecontrol[gc_turnleft ][0] = KEY_HAT1+2; //Left
|
||||
gamecontrol[gc_turnleft ][1] = KEY_LEFTARROW;
|
||||
gamecontrol[gc_turnright ][0] = KEY_HAT1+3; //Right
|
||||
gamecontrol[gc_turnright ][1] = KEY_RIGHTARROW;
|
||||
gamecontrol[gc_weaponnext ][0] = ']';
|
||||
gamecontrol[gc_weaponprev ][0] = '[';
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+6; //X
|
||||
gamecontrol[gc_fire ][1] = KEY_RCTRL;
|
||||
gamecontrol[gc_firenormal ][0] = KEY_JOY1+5; //Y
|
||||
gamecontrol[gc_firenormal ][1] = ';';
|
||||
gamecontrol[gc_tossflag ][0] = '\'';
|
||||
gamecontrol[gc_use ][0] = KEY_JOY1+1; //B
|
||||
gamecontrol[gc_use ][1] = '.';
|
||||
gamecontrol[gc_camtoggle ][1] = ',';
|
||||
gamecontrol[gc_camreset ][0] = 'c';
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_mouseaiming][0] = 's';
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; //A
|
||||
gamecontrol[gc_jump ][1] = '/';
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_console ][1] = KEY_F5;
|
||||
//gamecontrolbis
|
||||
gamecontrolbis[gc_forward ][0] = KEY_2HAT1+0;
|
||||
gamecontrolbis[gc_forward ][1] = 'w';
|
||||
gamecontrolbis[gc_backward ][0] = KEY_2HAT1+1;
|
||||
gamecontrolbis[gc_backward ][1] = 's';
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2HAT1+2;
|
||||
gamecontrolbis[gc_turnleft ][1] = 'a';
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2HAT1+3;
|
||||
gamecontrolbis[gc_turnright ][1] = 'd';
|
||||
gamecontrolbis[gc_weaponnext][0] = 't';
|
||||
gamecontrolbis[gc_weaponprev][0] = 'r';
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+6; //X
|
||||
gamecontrolbis[gc_firenormal][0] = KEY_2JOY1+5; //Y
|
||||
gamecontrolbis[gc_use ][0] = KEY_2JOY1+1; //B
|
||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+2; //A
|
||||
//gamecontrolbis[gc_straferight][0] = 'x';
|
||||
//gamecontrolbis[gc_strafeleft ][0] = 'z';
|
||||
}
|
||||
#elif defined (_PSP)
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_HAT1+0; // Up
|
||||
gamecontrol[gc_backward ][0] = KEY_HAT1+1; // Down
|
||||
gamecontrol[gc_turnleft ][0] = KEY_HAT1+2; // Left
|
||||
gamecontrol[gc_turnright ][0] = KEY_HAT1+3; // Right
|
||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; // L
|
||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; // R
|
||||
gamecontrol[gc_tossflag ][0] = KEY_JOY1+0; // Triangle
|
||||
gamecontrol[gc_use ][0] = KEY_JOY1+1; // Circle
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_JOY1+6; // Select
|
||||
gamecontrol[gc_camreset ][0] = KEY_JOY1+3; // Square
|
||||
gamecontrol[gc_centerview ][0] = KEY_JOY1+9; // Hold
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+8; // Start
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; // Cross
|
||||
}
|
||||
#elif defined (GP2X)
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+0; //A
|
||||
gamecontrol[gc_forward ][0] = KEY_JOY1+1; //Y
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; //B
|
||||
gamecontrol[gc_use ][0] = KEY_JOY1+3; //X
|
||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
|
||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
|
||||
gamecontrol[gc_lookup ][0] = KEY_JOY1+6; //U
|
||||
gamecontrol[gc_lookdown ][0] = KEY_JOY1+7; //D
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+8; //S
|
||||
}
|
||||
#elif defined (_NDS)
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+2; //X
|
||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+0; //A
|
||||
gamecontrol[gc_use ][0] = KEY_JOY1+3; //Y
|
||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
|
||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
|
||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+6; //Start
|
||||
gamecontrol[gc_weaponnext ][0] = KEY_JOY1+7; //Select
|
||||
}
|
||||
#else
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = 'w';
|
||||
|
@ -1184,80 +647,7 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_jump ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
#ifdef WMINPUT
|
||||
gamecontrol[gc_forward ][0] = KEY_JOY1+02; //UP
|
||||
gamecontrol[gc_backward ][0] = KEY_JOY1+03; //DOWN
|
||||
gamecontrol[gc_turnleft ][0] = KEY_JOY1+04; //LEFT
|
||||
gamecontrol[gc_turnright ][0] = KEY_JOY1+05; //RIGHT
|
||||
gamecontrol[gc_weaponnext ][0] = KEY_JOY1+10; //y
|
||||
gamecontrol[gc_weaponprev ][0] = KEY_JOY1+9; //x
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+12; //L
|
||||
gamecontrol[gc_firenormal ][0] = KEY_JOY1+13; //R
|
||||
gamecontrol[gc_use ][0] = KEY_JOY1+00; //B
|
||||
gamecontrol[gc_use ][1] = KEY_JOY1+07; //b
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+01; //A
|
||||
gamecontrol[gc_jump ][1] = KEY_JOY1+06; //a
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+18; //Home
|
||||
gamecontrolbis[gc_forward ][0] = KEY_2JOY1+02; //UP
|
||||
gamecontrolbis[gc_backward ][0] = KEY_2JOY1+03; //DOWN
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2JOY1+04; //LEFT
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2JOY1+05; //RIGHT
|
||||
gamecontrolbis[gc_weaponnext ][0] = KEY_2JOY1+10; //y
|
||||
gamecontrolbis[gc_weaponprev ][0] = KEY_2JOY1+9; //x
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+12; //L
|
||||
gamecontrolbis[gc_firenormal ][0] = KEY_2JOY1+13; //R
|
||||
gamecontrolbis[gc_use ][0] = KEY_2JOY1+00; //B
|
||||
gamecontrolbis[gc_use ][1] = KEY_2JOY1+07; //b
|
||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+01; //A
|
||||
gamecontrolbis[gc_jump ][1] = KEY_2JOY1+06; //a
|
||||
gamecontrolbis[gc_pause ][0] = KEY_2JOY1+18; //Home
|
||||
#endif
|
||||
#ifdef _WII
|
||||
gamecontrol[gc_forward ][1] = KEY_HAT1+00; //UP
|
||||
gamecontrol[gc_backward ][1] = KEY_HAT1+01; //DOWN
|
||||
gamecontrol[gc_straferight][1] = KEY_JOY1+16; //ZR
|
||||
gamecontrol[gc_strafeleft ][1] = KEY_JOY1+15; //ZL
|
||||
gamecontrol[gc_turnleft ][1] = KEY_HAT1+02; //LEFT
|
||||
gamecontrol[gc_turnright ][1] = KEY_HAT1+03; //RIGHT
|
||||
gamecontrol[gc_weaponnext ][1] = KEY_JOY1+11; //x
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+12; //y
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+01; //B
|
||||
gamecontrol[gc_firenormal ][0] = KEY_JOY1+13; //L
|
||||
gamecontrol[gc_firenormal ][1] = KEY_JOY1+00; //A
|
||||
gamecontrol[gc_tossflag ][1] = KEY_JOY1+17; //Plus CC
|
||||
gamecontrol[gc_use ][0] = KEY_JOY1+9; //a
|
||||
gamecontrol[gc_use ][1] = KEY_JOY1+02; //1
|
||||
gamecontrol[gc_centerview ][1] = KEY_JOY1+14; //R
|
||||
gamecontrol[gc_scores ][0] = KEY_JOY1+04; //Minus
|
||||
gamecontrol[gc_scores ][1] = KEY_JOY1+18; //Minus
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+10; //b
|
||||
gamecontrol[gc_jump ][1] = KEY_JOY1+3; //2
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+06; //Home
|
||||
gamecontrol[gc_pause ][1] = KEY_JOY1+19; //Home
|
||||
gamecontrolbis[gc_forward ][1] = KEY_2HAT1+00; //UP
|
||||
gamecontrolbis[gc_backward ][1] = KEY_2HAT1+01; //DOWN
|
||||
gamecontrolbis[gc_straferight][1] = KEY_2JOY1+16; //ZR
|
||||
gamecontrolbis[gc_strafeleft ][1] = KEY_2JOY1+15; //ZL
|
||||
gamecontrolbis[gc_turnleft ][1] = KEY_2HAT1+02; //LEFT
|
||||
gamecontrolbis[gc_turnright ][1] = KEY_2HAT1+03; //RIGHT
|
||||
gamecontrolbis[gc_weaponnext ][1] = KEY_2JOY1+11; //x
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+12; //y
|
||||
gamecontrolbis[gc_fire ][1] = KEY_2JOY1+01; //B
|
||||
gamecontrolbis[gc_firenormal ][0] = KEY_2JOY1+13; //L
|
||||
gamecontrolbis[gc_firenormal ][1] = KEY_2JOY1+00; //A
|
||||
gamecontrolbis[gc_tossflag ][1] = KEY_2JOY1+17; //Plus CC
|
||||
gamecontrolbis[gc_use ][0] = KEY_2JOY1+9; //a
|
||||
gamecontrolbis[gc_use ][1] = KEY_2JOY1+02; //1
|
||||
gamecontrolbis[gc_centerview ][1] = KEY_2JOY1+14; //R
|
||||
gamecontrolbis[gc_scores ][0] = KEY_2JOY1+04; //Minus
|
||||
gamecontrolbis[gc_scores ][1] = KEY_2JOY1+18; //Minus
|
||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+10; //b
|
||||
gamecontrolbis[gc_jump ][1] = KEY_2JOY1+3; //2
|
||||
gamecontrolbis[gc_pause ][0] = KEY_2JOY1+06; //Home
|
||||
gamecontrolbis[gc_pause ][1] = KEY_2JOY1+19; //Home
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void G_SaveKeySetting(FILE *f)
|
||||
{
|
||||
|
|
|
@ -22,33 +22,10 @@
|
|||
// keys (mousebuttons and joybuttons becomes keys)
|
||||
#define NUMKEYS 256
|
||||
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
#define MOUSEBUTTONS 5
|
||||
#define JOYBUTTONS 8 // 8 buttons
|
||||
#define JOYHATS 2 // 2 hats
|
||||
#define JOYAXISSET 3 // 3 Sets of 2 axises
|
||||
#elif defined (_XBOX)
|
||||
#define MOUSEBUTTONS 5
|
||||
#define JOYBUTTONS 12 // 12 buttons
|
||||
#define JOYHATS 1 // 1 hat
|
||||
#define JOYAXISSET 2 // 2 Sets of 2 axises
|
||||
#elif defined (_PSP)
|
||||
#define MOUSEBUTTONS 3
|
||||
#define JOYBUTTONS 14 // 10 buttons
|
||||
#define JOYHATS 1 // 1 hat
|
||||
#define JOYAXISSET 1 // 1 Set of 2 axises
|
||||
#elif defined (_WII)
|
||||
#define MOUSEBUTTONS 3
|
||||
#define JOYBUTTONS 20 // 20 buttons
|
||||
#define JOYHATS 1 // 1 hat
|
||||
#define JOYAXISSET 5 // 5 Sets of 2 axises
|
||||
#else
|
||||
#define MOUSEBUTTONS 8
|
||||
#define JOYBUTTONS 32 // 32 buttons
|
||||
#define JOYHATS 4 // 4 hats
|
||||
#define JOYAXISSET 4 // 4 Sets of 2 axises
|
||||
#endif
|
||||
|
||||
//
|
||||
// mouse and joystick buttons are handled as 'virtual' keys
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef _HWR_DATA_
|
||||
#define _HWR_DATA_
|
||||
|
||||
#if defined (_WIN32) && !defined (__CYGWIN__) && !defined (_XBOX)
|
||||
#if defined (_WIN32) && !defined (__CYGWIN__)
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
|
|
|
@ -41,14 +41,8 @@ typedef unsigned char FBOOLEAN;
|
|||
// ==========================================================================
|
||||
|
||||
// byte value for paletted graphics, which represent the transparent color
|
||||
#ifdef _NDS
|
||||
// NDS is hardwired to use zero as transparent color
|
||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 0
|
||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 1
|
||||
#else
|
||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255
|
||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130
|
||||
#endif
|
||||
|
||||
// the chroma key color shows on border sprites, set it to black
|
||||
#define HWR_PATCHES_CHROMAKEY_COLORVALUE (0x00000000) //RGBA format as in grSstWinOpen()
|
||||
|
|
|
@ -40,14 +40,14 @@
|
|||
#define EXPORT
|
||||
#endif
|
||||
#endif
|
||||
#if defined (_WIN32) && !defined (_XBOX)
|
||||
#ifdef _WIN32
|
||||
#define HWRAPI(fn) WINAPI fn
|
||||
#else
|
||||
#define HWRAPI(fn) fn
|
||||
#endif
|
||||
#else // _CREATE_DLL_
|
||||
#define EXPORT typedef
|
||||
#if defined (_WIN32) && !defined (_XBOX)
|
||||
#ifdef _WIN32
|
||||
#define HWRAPI(fn) (WINAPI *fn)
|
||||
#else
|
||||
#define HWRAPI(fn) (*fn)
|
||||
|
|
|
@ -5726,12 +5726,8 @@ if (0)
|
|||
HWD.pfnSetSpecialState(HWD_SET_FOG_MODE, 0); // Turn it off
|
||||
}
|
||||
|
||||
#ifndef _NDS
|
||||
if (drawsky)
|
||||
HWR_DrawSkyBackground(player);
|
||||
#else
|
||||
(void)HWR_DrawSkyBackground;
|
||||
#endif
|
||||
|
||||
//Hurdler: it doesn't work in splitscreen mode
|
||||
drawsky = splitscreen;
|
||||
|
@ -5970,12 +5966,8 @@ if (0)
|
|||
HWD.pfnSetSpecialState(HWD_SET_FOG_MODE, 0); // Turn it off
|
||||
}
|
||||
|
||||
#ifndef _NDS
|
||||
if (!skybox && drawsky) // Don't draw the regular sky if there's a skybox
|
||||
HWR_DrawSkyBackground(player);
|
||||
#else
|
||||
(void)HWR_DrawSkyBackground;
|
||||
#endif
|
||||
|
||||
//Hurdler: it doesn't work in splitscreen mode
|
||||
drawsky = splitscreen;
|
||||
|
@ -6225,12 +6217,7 @@ void HWR_Startup(void)
|
|||
}
|
||||
|
||||
if (rendermode == render_opengl)
|
||||
textureformat = patchformat =
|
||||
#ifdef _NDS
|
||||
GR_TEXFMT_P_8;
|
||||
#else
|
||||
GR_RGBA;
|
||||
#endif
|
||||
textureformat = patchformat = GR_RGBA;
|
||||
|
||||
startupdone = true;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ typedef struct snddev_s
|
|||
size_t numsfxs;
|
||||
|
||||
// Windows specific data
|
||||
#if defined (_WIN32) && !defined (_XBOX)
|
||||
#ifdef _WIN32
|
||||
UINT32 cooplevel;
|
||||
HWND hWnd;
|
||||
#endif
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief MiniGL API for Doom Legacy
|
||||
|
||||
|
||||
// tell r_opengl.cpp to compile for MiniGL Drivers
|
||||
#define MINI_GL_COMPATIBILITY
|
||||
|
||||
// tell r_opengl.cpp to compile for ATI Rage Pro OpenGL driver
|
||||
//#define ATI_RAGE_PRO_COMPATIBILITY
|
||||
|
||||
#define DRIVER_STRING "HWRAPI Init(): SRB2 MiniGL renderer"
|
||||
|
||||
// Include this at end
|
||||
#include "../r_opengl/r_opengl.c"
|
||||
#include "../r_opengl/ogl_win.c"
|
||||
|
||||
// That's all ;-)
|
||||
// Just, be sure to do the right changes in r_opengl.cpp
|
|
@ -1,89 +0,0 @@
|
|||
[Project]
|
||||
FileName=r_minigl.dev
|
||||
Name=r_minigl
|
||||
Ver=1
|
||||
IsCpp=1
|
||||
Type=3
|
||||
Compiler=-D_M_IX86=500_@@_-Wall_@@_-D_WINDOWS_@@_-DUSE_WGL_SWAP_@@_-Os_@@_-fomit-frame-pointer_@@_
|
||||
CppCompiler=
|
||||
Includes=
|
||||
Linker=--def ../r_mingw.def_@@_-lgdi32_@@_
|
||||
Libs=
|
||||
UnitCount=4
|
||||
Folders=
|
||||
ObjFiles=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Icon=
|
||||
ExeOutput=C:\srb2demo2
|
||||
ObjectOutput=..\..\..\objs\Mingw\r_minigl
|
||||
OverrideOutput=1
|
||||
OverrideOutputName=r_minigl.dll
|
||||
HostApplication=
|
||||
CommandLine=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=00000000000000000111d0
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
|
||||
[Unit1]
|
||||
FileName=..\r_opengl\ogl_win.c
|
||||
Folder=
|
||||
Compile=0
|
||||
CompileCpp=0
|
||||
Link=0
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=$(CC) -c ogl_win.c -o ../../../objs/Mingw/r_minigl/ogl_win.o $(CFLAGS)
|
||||
|
||||
[Unit2]
|
||||
FileName=..\r_opengl\r_opengl.c
|
||||
Folder=
|
||||
Compile=0
|
||||
CompileCpp=0
|
||||
Link=0
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=$(CC) -c r_opengl.c -o ../../../objs/Mingw/r_minigl/r_opengl.o $(CFLAGS)
|
||||
|
||||
[Unit3]
|
||||
FileName=..\r_opengl\r_opengl.h
|
||||
Folder=
|
||||
Compile=1
|
||||
CompileCpp=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=0.1
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=r_opengl.exe
|
||||
ProductName=r_opengl
|
||||
ProductVersion=0.1
|
||||
AutoIncBuildNr=0
|
||||
|
||||
[Unit4]
|
||||
FileName=r_minigl.c
|
||||
CompileCpp=0
|
||||
Folder=r_minigl
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=$(CC) -c r_minigl.c -o ../../../objs/Mingw/r_minigl/r_minigl.o $(CFLAGS)
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="r_minigl" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=r_minigl - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "r_minigl.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "r_minigl.mak" CFG="r_minigl - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "r_minigl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "r_minigl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "r_minigl - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\..\..\objs\Release"
|
||||
# PROP BASE Intermediate_Dir "..\..\..\objs\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\..\..\bin\VC\Release\r_minigl"
|
||||
# PROP Intermediate_Dir "..\..\..\objs\VC\Release\r_minigl"
|
||||
# PROP Ignore_Export_Lib 1
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "R_MINIGL_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x80c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 user32.lib gdi32.lib /nologo /dll /pdb:"..\..\..\bin\VC\Release\r_minigl.pdb" /machine:I386 /out:"..\..\..\bin\VC\Release\r_minigl.dll"
|
||||
# SUBTRACT LINK32 /pdb:none /debug
|
||||
|
||||
!ELSEIF "$(CFG)" == "r_minigl - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\..\..\objs\Debug"
|
||||
# PROP BASE Intermediate_Dir "..\..\..\objs\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\..\..\bin\VC\Debug\r_minigl"
|
||||
# PROP Intermediate_Dir "..\..\..\objs\VC\Debug\r_minigl"
|
||||
# PROP Ignore_Export_Lib 1
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "R_MINIGL_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "_MBCS" /D "_USRDLL" /D "R_MINIGL_EXPORTS" /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x80c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ouser32.lib gdi32.lib /nologo /dll /pdb:"..\..\..\bin\VC\Debug\r_minigl.pdb" /debug /machine:I386 /out:"..\..\..\bin\VC\Debug\r_minigl.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "r_minigl - Win32 Release"
|
||||
# Name "r_minigl - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_minigl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\r_opengl\r_opengl.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
|
@ -30,10 +30,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#ifndef SHUFFLE
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
#define SHUFFLE
|
||||
#endif
|
||||
#endif
|
||||
#include "r_opengl.h"
|
||||
|
||||
#if defined (HWRENDER) && !defined (NOROPENGL)
|
||||
|
@ -83,9 +81,7 @@ GLint screen_height = 0;
|
|||
GLbyte screen_depth = 0;
|
||||
GLint textureformatGL = 0;
|
||||
GLint maximumAnisotropy = 0;
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
static GLboolean MipMap = GL_FALSE;
|
||||
#endif
|
||||
static GLint min_filter = GL_LINEAR;
|
||||
static GLint mag_filter = GL_LINEAR;
|
||||
static GLint anisotropic_filter = 0;
|
||||
|
@ -94,11 +90,9 @@ static FTransform md2_transform;
|
|||
const GLubyte *gl_extensions = NULL;
|
||||
|
||||
//Hurdler: 04/10/2000: added for the kick ass coronas as Boris wanted;-)
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
static GLdouble modelMatrix[16];
|
||||
static GLdouble projMatrix[16];
|
||||
static GLint viewport[4];
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USE_PALETTED_TEXTURE
|
||||
|
@ -158,9 +152,7 @@ float byteasfloat(UINT8 fbyte)
|
|||
|
||||
static I_Error_t I_Error_GL = NULL;
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
static boolean gl13 = false; // whether we can use opengl 1.3 functions
|
||||
#endif
|
||||
|
||||
|
||||
// -----------------+
|
||||
|
@ -198,14 +190,9 @@ FUNCPRINTF void DBG_Printf(const char *lpFmt, ...)
|
|||
#define pglScissor glScissor
|
||||
#define pglEnable glEnable
|
||||
#define pglDisable glDisable
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
#define pglGetDoublev glGetDoublev
|
||||
#endif
|
||||
//glGetIntegerv
|
||||
//glGetString
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
#define pglHint glHint
|
||||
#endif
|
||||
|
||||
/* Depth Buffer */
|
||||
#define pglClearDepth glClearDepth
|
||||
|
@ -219,11 +206,7 @@ FUNCPRINTF void DBG_Printf(const char *lpFmt, ...)
|
|||
#define pglPushMatrix glPushMatrix
|
||||
#define pglPopMatrix glPopMatrix
|
||||
#define pglLoadIdentity glLoadIdentity
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
#define pglMultMatrixf glMultMatrixf
|
||||
#else
|
||||
#define pglMultMatrixd glMultMatrixd
|
||||
#endif
|
||||
#define pglRotatef glRotatef
|
||||
#define pglScalef glScalef
|
||||
#define pglTranslatef glTranslatef
|
||||
|
@ -261,9 +244,7 @@ FUNCPRINTF void DBG_Printf(const char *lpFmt, ...)
|
|||
#define pglDeleteTextures glDeleteTextures
|
||||
#define pglBindTexture glBindTexture
|
||||
/* texture mapping */ //GL_EXT_copy_texture
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
#define pglCopyTexImage2D glCopyTexImage2D
|
||||
#endif
|
||||
|
||||
#else //!STATIC_OPENGL
|
||||
|
||||
|
@ -290,10 +271,8 @@ typedef void (APIENTRY * PFNglEnable) (GLenum cap);
|
|||
static PFNglEnable pglEnable;
|
||||
typedef void (APIENTRY * PFNglDisable) (GLenum cap);
|
||||
static PFNglDisable pglDisable;
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
typedef void (APIENTRY * PFNglGetDoublev) (GLenum pname, GLdouble *params);
|
||||
static PFNglGetDoublev pglGetDoublev;
|
||||
#endif
|
||||
//glGetIntegerv
|
||||
//glGetString
|
||||
|
||||
|
@ -318,13 +297,8 @@ typedef void (APIENTRY * PFNglPopMatrix) (void);
|
|||
static PFNglPopMatrix pglPopMatrix;
|
||||
typedef void (APIENTRY * PFNglLoadIdentity) (void);
|
||||
static PFNglLoadIdentity pglLoadIdentity;
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
typedef void (APIENTRY * PFNglMultMatrixf) (const GLfloat *m);
|
||||
static PFNglMultMatrixf pglMultMatrixf;
|
||||
#else
|
||||
typedef void (APIENTRY * PFNglMultMatrixd) (const GLdouble *m);
|
||||
static PFNglMultMatrixd pglMultMatrixd;
|
||||
#endif
|
||||
typedef void (APIENTRY * PFNglRotatef) (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
static PFNglRotatef pglRotatef;
|
||||
typedef void (APIENTRY * PFNglScalef) (GLfloat x, GLfloat y, GLfloat z);
|
||||
|
@ -392,15 +366,12 @@ static PFNglCopyTexImage2D pglCopyTexImage2D;
|
|||
typedef GLint (APIENTRY * PFNgluBuild2DMipmaps) (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
|
||||
static PFNgluBuild2DMipmaps pgluBuild2DMipmaps;
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
/* 1.3 functions for multitexturing */
|
||||
typedef void (APIENTRY *PFNglActiveTexture) (GLenum);
|
||||
static PFNglActiveTexture pglActiveTexture;
|
||||
typedef void (APIENTRY *PFNglMultiTexCoord2f) (GLenum, GLfloat, GLfloat);
|
||||
static PFNglMultiTexCoord2f pglMultiTexCoord2f;
|
||||
#endif
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
/* 1.2 Parms */
|
||||
/* GL_CLAMP_TO_EDGE_EXT */
|
||||
#ifndef GL_CLAMP_TO_EDGE
|
||||
|
@ -421,14 +392,6 @@ static PFNglMultiTexCoord2f pglMultiTexCoord2f;
|
|||
#define GL_TEXTURE1 0x84C1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
#undef GL_CLAMP_TO_EDGE
|
||||
#undef GL_TEXTURE_MIN_LOD
|
||||
#undef GL_TEXTURE_MAX_LOD
|
||||
#endif
|
||||
|
||||
boolean SetupGLfunc(void)
|
||||
{
|
||||
#ifndef STATIC_OPENGL
|
||||
|
@ -451,9 +414,7 @@ boolean SetupGLfunc(void)
|
|||
GETOPENGLFUNC(pglScissor , glScissor)
|
||||
GETOPENGLFUNC(pglEnable , glEnable)
|
||||
GETOPENGLFUNC(pglDisable , glDisable)
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
GETOPENGLFUNC(pglGetDoublev , glGetDoublev)
|
||||
#endif
|
||||
GETOPENGLFUNC(pglGetIntegerv , glGetIntegerv)
|
||||
GETOPENGLFUNC(pglGetString , glGetString)
|
||||
|
||||
|
@ -467,11 +428,7 @@ boolean SetupGLfunc(void)
|
|||
GETOPENGLFUNC(pglPushMatrix , glPushMatrix)
|
||||
GETOPENGLFUNC(pglPopMatrix , glPopMatrix)
|
||||
GETOPENGLFUNC(pglLoadIdentity , glLoadIdentity)
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
GETOPENGLFUNC(pglMultMatrixf , glMultMatrixf)
|
||||
#else
|
||||
GETOPENGLFUNC(pglMultMatrixd , glMultMatrixd)
|
||||
#endif
|
||||
GETOPENGLFUNC(pglRotatef , glRotatef)
|
||||
GETOPENGLFUNC(pglScalef , glScalef)
|
||||
GETOPENGLFUNC(pglTranslatef , glTranslatef)
|
||||
|
@ -515,9 +472,6 @@ boolean SetupGLfunc(void)
|
|||
// This has to be done after the context is created so the version number can be obtained
|
||||
boolean SetupGLFunc13(void)
|
||||
{
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
return false;
|
||||
#else
|
||||
const GLubyte *version = pglGetString(GL_VERSION);
|
||||
int glmajor, glminor;
|
||||
|
||||
|
@ -553,7 +507,6 @@ boolean SetupGLFunc13(void)
|
|||
else
|
||||
DBG_Printf("GL_ARB_multitexture support: disabled\n");
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
|
@ -571,11 +524,7 @@ static void SetNoTexture(void)
|
|||
|
||||
static void GLPerspective(GLdouble fovy, GLdouble aspect)
|
||||
{
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
GLfloat m[4][4] =
|
||||
#else
|
||||
GLdouble m[4][4] =
|
||||
#endif
|
||||
{
|
||||
{ 1.0f, 0.0f, 0.0f, 0.0f},
|
||||
{ 0.0f, 1.0f, 0.0f, 0.0f},
|
||||
|
@ -598,14 +547,9 @@ static void GLPerspective(GLdouble fovy, GLdouble aspect)
|
|||
m[1][1] = cotangent;
|
||||
m[2][2] = -(zFar + zNear) / deltaZ;
|
||||
m[3][2] = -2.0f * zNear * zFar / deltaZ;
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
pglMultMatrixf(&m[0][0]);
|
||||
#else
|
||||
pglMultMatrixd(&m[0][0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
static void GLProject(GLdouble objX, GLdouble objY, GLdouble objZ,
|
||||
GLdouble* winX, GLdouble* winY, GLdouble* winZ)
|
||||
{
|
||||
|
@ -645,7 +589,6 @@ static void GLProject(GLdouble objX, GLdouble objY, GLdouble objZ,
|
|||
*winY=in[1];
|
||||
*winZ=in[2];
|
||||
}
|
||||
#endif
|
||||
|
||||
// -----------------+
|
||||
// SetModelView :
|
||||
|
@ -672,10 +615,8 @@ void SetModelView(GLint w, GLint h)
|
|||
//pglScalef(1.0f, 320.0f/200.0f, 1.0f); // gr_scalefrustum (ORIGINAL_ASPECT)
|
||||
|
||||
// added for new coronas' code (without depth buffer)
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglGetIntegerv(GL_VIEWPORT, viewport);
|
||||
pglGetDoublev(GL_PROJECTION_MATRIX, projMatrix);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -700,17 +641,13 @@ void SetStates(void)
|
|||
//pglShadeModel(GL_FLAT);
|
||||
|
||||
pglEnable(GL_TEXTURE_2D); // two-dimensional texturing
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
|
||||
pglAlphaFunc(GL_NOTEQUAL, 0.0f);
|
||||
#endif
|
||||
//pglBlendFunc(GL_ONE, GL_ZERO); // copy pixel to frame buffer (opaque)
|
||||
pglEnable(GL_BLEND); // enable color blending
|
||||
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
#endif
|
||||
|
||||
//pglDisable(GL_DITHER); // faB: ??? (undocumented in OpenGL 1.1)
|
||||
// Hurdler: yes, it is!
|
||||
|
@ -735,9 +672,7 @@ void SetStates(void)
|
|||
//tex_downloaded = NOTEXTURE_NUM;
|
||||
//pglTexImage2D(GL_TEXTURE_2D, 0, 4, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, Data);
|
||||
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglPolygonOffset(-1.0f, -1.0f);
|
||||
#endif
|
||||
|
||||
//pglEnable(GL_CULL_FACE);
|
||||
//pglCullFace(GL_FRONT);
|
||||
|
@ -758,9 +693,7 @@ void SetStates(void)
|
|||
// bp : when no t&l :)
|
||||
pglLoadIdentity();
|
||||
pglScalef(1.0f, 1.0f, -1.0f);
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix); // added for new coronas' code (without depth buffer)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -863,14 +796,6 @@ EXPORT void HWRAPI(ClearMipMapCache) (void)
|
|||
EXPORT void HWRAPI(ReadRect) (INT32 x, INT32 y, INT32 width, INT32 height,
|
||||
INT32 dst_stride, UINT16 * dst_data)
|
||||
{
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
(void)x;
|
||||
(void)y;
|
||||
(void)width;
|
||||
(void)height;
|
||||
(void)dst_stride;
|
||||
(void)dst_data;
|
||||
#else
|
||||
INT32 i;
|
||||
// DBG_Printf ("ReadRect()\n");
|
||||
if (dst_stride == width*3)
|
||||
|
@ -912,7 +837,6 @@ EXPORT void HWRAPI(ReadRect) (INT32 x, INT32 y, INT32 width, INT32 height,
|
|||
}
|
||||
free(image);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -933,10 +857,8 @@ EXPORT void HWRAPI(GClipRect) (INT32 minx, INT32 miny, INT32 maxx, INT32 maxy, f
|
|||
pglMatrixMode(GL_MODELVIEW);
|
||||
|
||||
// added for new coronas' code (without depth buffer)
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglGetIntegerv(GL_VIEWPORT, viewport);
|
||||
pglGetDoublev(GL_PROJECTION_MATRIX, projMatrix);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -983,12 +905,6 @@ EXPORT void HWRAPI(Draw2DLine) (F2DCoord * v1,
|
|||
GLRGBAFloat c;
|
||||
|
||||
// DBG_Printf ("DrawLine() (%f %f %f) %d\n", v1->x, -v1->y, -v1->z, v1->argb);
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
GLfloat px1, px2, px3, px4;
|
||||
GLfloat py1, py2, py3, py4;
|
||||
GLfloat dx, dy;
|
||||
GLfloat angle;
|
||||
#endif
|
||||
|
||||
// BP: we should reflect the new state in our variable
|
||||
//SetBlend(PF_Modulated|PF_NoTexture);
|
||||
|
@ -1000,33 +916,11 @@ EXPORT void HWRAPI(Draw2DLine) (F2DCoord * v1,
|
|||
c.blue = byte2float[Color.s.blue];
|
||||
c.alpha = byte2float[Color.s.alpha];
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglColor4fv(&c.red); // is in RGBA float format
|
||||
pglBegin(GL_LINES);
|
||||
pglVertex3f(v1->x, -v1->y, 1.0f);
|
||||
pglVertex3f(v2->x, -v2->y, 1.0f);
|
||||
pglEnd();
|
||||
#else
|
||||
if (v2->x != v1->x)
|
||||
angle = (float)atan((v2->y-v1->y)/(v2->x-v1->x));
|
||||
else
|
||||
angle = N_PI_DEMI;
|
||||
dx = (float)sin(angle) / (float)screen_width;
|
||||
dy = (float)cos(angle) / (float)screen_height;
|
||||
|
||||
px1 = v1->x - dx; py1 = v1->y + dy;
|
||||
px2 = v2->x - dx; py2 = v2->y + dy;
|
||||
px3 = v2->x + dx; py3 = v2->y - dy;
|
||||
px4 = v1->x + dx; py4 = v1->y - dy;
|
||||
|
||||
pglColor4f(c.red, c.green, c.blue, c.alpha);
|
||||
pglBegin(GL_TRIANGLE_FAN);
|
||||
pglVertex3f(px1, -py1, 1);
|
||||
pglVertex3f(px2, -py2, 1);
|
||||
pglVertex3f(px3, -py3, 1);
|
||||
pglVertex3f(px4, -py4, 1);
|
||||
pglEnd();
|
||||
#endif
|
||||
|
||||
pglEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
@ -1034,9 +928,7 @@ EXPORT void HWRAPI(Draw2DLine) (F2DCoord * v1,
|
|||
static void Clamp2D(GLenum pname)
|
||||
{
|
||||
pglTexParameteri(GL_TEXTURE_2D, pname, GL_CLAMP); // fallback clamp
|
||||
#ifdef GL_CLAMP_TO_EDGE
|
||||
pglTexParameteri(GL_TEXTURE_2D, pname, GL_CLAMP_TO_EDGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1063,11 +955,7 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
|
|||
pglBlendFunc(GL_SRC_ALPHA, GL_ZERO); // 0 alpha = holes in texture
|
||||
break;
|
||||
case PF_Additive & PF_Blending:
|
||||
#ifdef ATI_RAGE_PRO_COMPATIBILITY
|
||||
pglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // alpha = level of transparency
|
||||
#else
|
||||
pglBlendFunc(GL_SRC_ALPHA, GL_ONE); // src * alpha + dest
|
||||
#endif
|
||||
break;
|
||||
case PF_Environment & PF_Blending:
|
||||
pglBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
@ -1083,7 +971,6 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
if (Xor & PF_NoAlphaTest)
|
||||
{
|
||||
if (PolyFlags & PF_NoAlphaTest)
|
||||
|
@ -1099,7 +986,7 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
|
|||
else
|
||||
pglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Xor&PF_NoDepthTest)
|
||||
{
|
||||
if (PolyFlags & PF_NoDepthTest)
|
||||
|
@ -1126,10 +1013,6 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
|
|||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
}
|
||||
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
if (Xor&PF_Modulated && !(PolyFlags & PF_Modulated))
|
||||
pglColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
#else
|
||||
if (Xor&PF_Modulated)
|
||||
{
|
||||
#if defined (__unix__) || defined (UNIXCOMMON)
|
||||
|
@ -1149,7 +1032,6 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
|
|||
pglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Xor & PF_Occlude) // depth test but (no) depth write
|
||||
{
|
||||
|
@ -1203,11 +1085,7 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
else
|
||||
{
|
||||
// Download a mipmap
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
static GLushort tex[2048*2048];
|
||||
#else
|
||||
static RGBA_t tex[2048*2048];
|
||||
#endif
|
||||
const GLvoid *ptex = tex;
|
||||
INT32 w, h;
|
||||
|
||||
|
@ -1222,106 +1100,9 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
!(pTexInfo->flags & TF_CHROMAKEYED))
|
||||
{
|
||||
// do nothing here.
|
||||
// Not a problem with MiniGL since we don't use paletted texture
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
if ((pTexInfo->grInfo.format == GR_TEXFMT_P_8) ||
|
||||
(pTexInfo->grInfo.format == GR_TEXFMT_AP_88))
|
||||
{
|
||||
const GLubyte *pImgData = (const GLubyte *)pTexInfo->grInfo.data;
|
||||
INT32 i, j;
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
{
|
||||
if ((*pImgData == HWR_PATCHES_CHROMAKEY_COLORINDEX) &&
|
||||
(pTexInfo->flags & TF_CHROMAKEYED))
|
||||
{
|
||||
tex[w*j+i] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pTexInfo->grInfo.format == GR_TEXFMT_AP_88 && !(pTexInfo->flags & TF_CHROMAKEYED))
|
||||
tex[w*j+i] = 0;
|
||||
else
|
||||
tex[w*j+i] = (myPaletteData[*pImgData].s.alpha>>4)<<12;
|
||||
|
||||
tex[w*j+i] |= (myPaletteData[*pImgData].s.red >>4)<<8;
|
||||
tex[w*j+i] |= (myPaletteData[*pImgData].s.green>>4)<<4;
|
||||
tex[w*j+i] |= (myPaletteData[*pImgData].s.blue >>4);
|
||||
}
|
||||
|
||||
pImgData++;
|
||||
|
||||
if (pTexInfo->grInfo.format == GR_TEXFMT_AP_88)
|
||||
{
|
||||
if (!(pTexInfo->flags & TF_CHROMAKEYED))
|
||||
tex[w*j+i] |= ((*pImgData)>>4)<<12;
|
||||
pImgData++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pTexInfo->grInfo.format == GR_RGBA)
|
||||
{
|
||||
// corona test : passed as ARGB 8888, which is not in glide formats
|
||||
// Hurdler: not used for coronas anymore, just for dynamic lighting
|
||||
const RGBA_t *pImgData = (const RGBA_t *)pTexInfo->grInfo.data;
|
||||
INT32 i, j;
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
{
|
||||
tex[w*j+i] = (pImgData->s.alpha>>4)<<12;
|
||||
tex[w*j+i] |= (pImgData->s.red >>4)<<8;
|
||||
tex[w*j+i] |= (pImgData->s.green>>4)<<4;
|
||||
tex[w*j+i] |= (pImgData->s.blue >>4);
|
||||
pImgData++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pTexInfo->grInfo.format == GR_TEXFMT_ALPHA_INTENSITY_88)
|
||||
{
|
||||
const GLubyte *pImgData = (const GLubyte *)pTexInfo->grInfo.data;
|
||||
INT32 i, j;
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
{
|
||||
const GLubyte sID = (*pImgData)>>4;
|
||||
tex[w*j+i] = sID<<8 | sID<<4 | sID;
|
||||
pImgData++;
|
||||
tex[w*j+i] |= ((*pImgData)>>4)<<12;
|
||||
pImgData++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pTexInfo->grInfo.format == GR_TEXFMT_ALPHA_8) // Used for fade masks
|
||||
{
|
||||
const GLubyte *pImgData = (const GLubyte *)pTexInfo->grInfo.data;
|
||||
INT32 i, j;
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
{
|
||||
tex[w*j+i] = (pImgData>>4)<<12;
|
||||
tex[w*j+i] |= (255>>4)<<8;
|
||||
tex[w*j+i] |= (255>>4)<<4;
|
||||
tex[w*j+i] |= (255>>4);
|
||||
pImgData++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
DBG_Printf ("SetTexture(bad format) %ld\n", pTexInfo->grInfo.format);
|
||||
#else
|
||||
if ((pTexInfo->grInfo.format == GR_TEXFMT_P_8) ||
|
||||
(pTexInfo->grInfo.format == GR_TEXFMT_AP_88))
|
||||
{
|
||||
|
@ -1403,7 +1184,6 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
}
|
||||
else
|
||||
DBG_Printf ("SetTexture(bad format) %ld\n", pTexInfo->grInfo.format);
|
||||
#endif
|
||||
|
||||
pTexInfo->downloaded = NextTexAvail++;
|
||||
tex_downloaded = pTexInfo->downloaded;
|
||||
|
@ -1412,18 +1192,6 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, mag_filter);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min_filter);
|
||||
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
pglTexImage2D(GL_TEXTURE_2D, 0, GL_ARGB4444, w, h, 0, GL_ARGB4444, GL_UNSIGNED_BYTE, ptex);
|
||||
#else
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
//if (pTexInfo->grInfo.format == GR_TEXFMT_ALPHA_INTENSITY_88)
|
||||
//pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
//else
|
||||
if (MipMap)
|
||||
pgluBuild2DMipmaps(GL_TEXTURE_2D, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
else
|
||||
pglTexImage2D(GL_TEXTURE_2D, 0, 4, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
#else
|
||||
#ifdef USE_PALETTED_TEXTURE
|
||||
//Hurdler: not really supported and not tested recently
|
||||
if (glColorTableEXT &&
|
||||
|
@ -1441,15 +1209,11 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
if (MipMap)
|
||||
{
|
||||
pgluBuild2DMipmaps(GL_TEXTURE_2D, GL_LUMINANCE_ALPHA, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
#ifdef GL_TEXTURE_MIN_LOD
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0);
|
||||
#endif
|
||||
#ifdef GL_TEXTURE_MAX_LOD
|
||||
if (pTexInfo->flags & TF_TRANSPARENT)
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff
|
||||
else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4);
|
||||
#endif
|
||||
//pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_LINEAR_MIPMAP_LINEAR);
|
||||
}
|
||||
else
|
||||
|
@ -1461,15 +1225,11 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
if (MipMap)
|
||||
{
|
||||
pgluBuild2DMipmaps(GL_TEXTURE_2D, GL_ALPHA, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
#ifdef GL_TEXTURE_MIN_LOD
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0);
|
||||
#endif
|
||||
#ifdef GL_TEXTURE_MAX_LOD
|
||||
if (pTexInfo->flags & TF_TRANSPARENT)
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff
|
||||
else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4);
|
||||
#endif
|
||||
//pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_LINEAR_MIPMAP_LINEAR);
|
||||
}
|
||||
else
|
||||
|
@ -1481,21 +1241,15 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
{
|
||||
pgluBuild2DMipmaps(GL_TEXTURE_2D, textureformatGL, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
// Control the mipmap level of detail
|
||||
#ifdef GL_TEXTURE_MIN_LOD
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0); // the lower the number, the higer the detail
|
||||
#endif
|
||||
#ifdef GL_TEXTURE_MAX_LOD
|
||||
if (pTexInfo->flags & TF_TRANSPARENT)
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff
|
||||
else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 5);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
pglTexImage2D(GL_TEXTURE_2D, 0, textureformatGL, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (pTexInfo->flags & TF_WRAPX)
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
|
@ -1519,19 +1273,6 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
|||
else // initialisation de la liste
|
||||
gr_cachetail = gr_cachehead = pTexInfo;
|
||||
}
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
switch (pTexInfo->flags)
|
||||
{
|
||||
case 0 :
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
break;
|
||||
default:
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1545,18 +1286,11 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf,
|
|||
FBITFIELD PolyFlags)
|
||||
{
|
||||
FUINT i;
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
FUINT j;
|
||||
#endif
|
||||
GLRGBAFloat c = {0,0,0,0};
|
||||
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
if (PolyFlags & PF_Corona)
|
||||
PolyFlags &= ~PF_NoDepthTest;
|
||||
#else
|
||||
if ((PolyFlags & PF_Corona) && (oglflags & GLF_NOZBUFREAD))
|
||||
PolyFlags &= ~(PF_NoDepthTest|PF_Corona);
|
||||
#endif
|
||||
|
||||
SetBlend(PolyFlags); //TODO: inline (#pragma..)
|
||||
|
||||
|
@ -1578,16 +1312,11 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf,
|
|||
c.alpha = byte2float[pSurf->FlatColor.s.alpha];
|
||||
}
|
||||
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
pglColor4f(c.red, c.green, c.blue, c.alpha);
|
||||
#else
|
||||
pglColor4fv(&c.red); // is in RGBA float format
|
||||
#endif
|
||||
}
|
||||
|
||||
// this test is added for new coronas' code (without depth buffer)
|
||||
// I think I should do a separate function for drawing coronas, so it will be a little faster
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
if (PolyFlags & PF_Corona) // check to see if we need to draw the corona
|
||||
{
|
||||
//rem: all 8 (or 8.0f) values are hard coded: it can be changed to a higher value
|
||||
|
@ -1634,7 +1363,6 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf,
|
|||
c.alpha *= scalef; // change the alpha value (it seems better than changing the size of the corona)
|
||||
pglColor4fv(&c.red);
|
||||
}
|
||||
#endif
|
||||
if (PolyFlags & PF_MD2)
|
||||
return;
|
||||
|
||||
|
@ -1728,41 +1456,15 @@ EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value)
|
|||
break;
|
||||
|
||||
case HWD_SET_POLYGON_SMOOTH:
|
||||
#ifdef KOS_GL_COMPATIBILITY // GL_POLYGON_SMOOTH_HINT
|
||||
if (Value)
|
||||
pglHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);
|
||||
else
|
||||
pglHint(GL_POLYGON_SMOOTH_HINT,GL_FASTEST);
|
||||
#else
|
||||
if (Value)
|
||||
pglEnable(GL_POLYGON_SMOOTH);
|
||||
else
|
||||
pglDisable(GL_POLYGON_SMOOTH);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case HWD_SET_TEXTUREFILTERMODE:
|
||||
switch (Value)
|
||||
{
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
case HWD_SET_TEXTUREFILTER_TRILINEAR:
|
||||
case HWD_SET_TEXTUREFILTER_BILINEAR:
|
||||
min_filter = mag_filter = GL_FILTER_BILINEAR;
|
||||
break;
|
||||
case HWD_SET_TEXTUREFILTER_POINTSAMPLED:
|
||||
min_filter = mag_filter = GL_FILTER_NONE;
|
||||
case HWD_SET_TEXTUREFILTER_MIXED1:
|
||||
min_filter = GL_FILTER_NONE;
|
||||
mag_filter = GL_LINEAR;
|
||||
case HWD_SET_TEXTUREFILTER_MIXED2:
|
||||
min_filter = GL_LINEAR;
|
||||
mag_filter = GL_FILTER_NONE;
|
||||
break;
|
||||
case HWD_SET_TEXTUREFILTER_MIXED3:
|
||||
min_filter = GL_FILTER_BILINEAR;
|
||||
mag_filter = GL_FILTER_NONE;
|
||||
break;
|
||||
#elif !defined (MINI_GL_COMPATIBILITY)
|
||||
case HWD_SET_TEXTUREFILTER_TRILINEAR:
|
||||
min_filter = GL_LINEAR_MIPMAP_LINEAR;
|
||||
mag_filter = GL_LINEAR;
|
||||
|
@ -1791,14 +1493,9 @@ EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value)
|
|||
mag_filter = GL_NEAREST;
|
||||
MipMap = GL_TRUE;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
min_filter = mag_filter = GL_FILTER_NONE;
|
||||
#else
|
||||
mag_filter = GL_LINEAR;
|
||||
min_filter = GL_NEAREST;
|
||||
#endif
|
||||
}
|
||||
if (!pgluBuild2DMipmaps)
|
||||
{
|
||||
|
@ -1831,9 +1528,7 @@ static void DrawMD2Ex(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration
|
|||
float scalex = scale, scaley = scale, scalez = scale;
|
||||
|
||||
// Because Otherwise, scaling the screen negatively vertically breaks the lighting
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
GLfloat LightPos[] = {0.0f, 1.0f, 0.0f, 0.0f};
|
||||
#endif
|
||||
|
||||
if (duration == 0)
|
||||
duration = 1;
|
||||
|
@ -1885,9 +1580,7 @@ static void DrawMD2Ex(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration
|
|||
pglCullFace(GL_BACK);
|
||||
}
|
||||
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglLightfv(GL_LIGHT0, GL_POSITION, LightPos);
|
||||
#endif
|
||||
|
||||
pglShadeModel(GL_SMOOTH);
|
||||
if (color)
|
||||
|
@ -2029,9 +1722,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
GLPerspective(53.13l, 2*ASPECT_RATIO); // 53.13 = 2*atan(0.5)
|
||||
else
|
||||
GLPerspective(stransform->fovxangle, ASPECT_RATIO);
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglGetDoublev(GL_PROJECTION_MATRIX, projMatrix); // added for new coronas' code (without depth buffer)
|
||||
#endif
|
||||
pglMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
else
|
||||
|
@ -2045,15 +1736,11 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
else
|
||||
//Hurdler: is "fov" correct?
|
||||
GLPerspective(fov, ASPECT_RATIO);
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglGetDoublev(GL_PROJECTION_MATRIX, projMatrix); // added for new coronas' code (without depth buffer)
|
||||
#endif
|
||||
pglMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
pglGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix); // added for new coronas' code (without depth buffer)
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT INT32 HWRAPI(GetTextureUsed) (void)
|
||||
|
@ -2149,18 +1836,11 @@ EXPORT void HWRAPI(StartScreenWipe) (void)
|
|||
|
||||
// Create screen texture
|
||||
pglBindTexture(GL_TEXTURE_2D, startScreenWipe);
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_FILTER_NONE);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_FILTER_NONE);
|
||||
#else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
#endif
|
||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||
#endif
|
||||
|
||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||
}
|
||||
|
@ -2178,18 +1858,11 @@ EXPORT void HWRAPI(EndScreenWipe)(void)
|
|||
|
||||
// Create screen texture
|
||||
pglBindTexture(GL_TEXTURE_2D, endScreenWipe);
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_FILTER_NONE);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_FILTER_NONE);
|
||||
#else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
#endif
|
||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||
#endif
|
||||
|
||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||
}
|
||||
|
@ -2242,9 +1915,7 @@ EXPORT void HWRAPI(DoScreenWipe)(float alpha)
|
|||
INT32 texsize = 2048;
|
||||
float xfix, yfix;
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
INT32 fademaskdownloaded = tex_downloaded; // the fade mask that has been set
|
||||
#endif
|
||||
|
||||
// Use a power of two texture, dammit
|
||||
if(screen_width <= 1024)
|
||||
|
@ -2284,7 +1955,6 @@ EXPORT void HWRAPI(DoScreenWipe)(float alpha)
|
|||
|
||||
SetBlend(PF_Modulated|PF_Translucent|PF_NoDepthTest|PF_Clip|PF_NoZClip);
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
if (gl13)
|
||||
{
|
||||
// Draw the end screen that fades in
|
||||
|
@ -2327,31 +1997,28 @@ EXPORT void HWRAPI(DoScreenWipe)(float alpha)
|
|||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
// Draw the end screen that fades in
|
||||
pglBindTexture(GL_TEXTURE_2D, endScreenWipe);
|
||||
pglBegin(GL_QUADS);
|
||||
pglColor4f(1.0f, 1.0f, 1.0f, alpha);
|
||||
// Draw the end screen that fades in
|
||||
pglBindTexture(GL_TEXTURE_2D, endScreenWipe);
|
||||
pglBegin(GL_QUADS);
|
||||
pglColor4f(1.0f, 1.0f, 1.0f, alpha);
|
||||
|
||||
// Bottom left
|
||||
pglTexCoord2f(0.0f, 0.0f);
|
||||
pglVertex3f(-1.0f, -1.0f, 1.0f);
|
||||
// Bottom left
|
||||
pglTexCoord2f(0.0f, 0.0f);
|
||||
pglVertex3f(-1.0f, -1.0f, 1.0f);
|
||||
|
||||
// Top left
|
||||
pglTexCoord2f(0.0f, yfix);
|
||||
pglVertex3f(-1.0f, 1.0f, 1.0f);
|
||||
// Top left
|
||||
pglTexCoord2f(0.0f, yfix);
|
||||
pglVertex3f(-1.0f, 1.0f, 1.0f);
|
||||
|
||||
// Top right
|
||||
pglTexCoord2f(xfix, yfix);
|
||||
pglVertex3f(1.0f, 1.0f, 1.0f);
|
||||
// Top right
|
||||
pglTexCoord2f(xfix, yfix);
|
||||
pglVertex3f(1.0f, 1.0f, 1.0f);
|
||||
|
||||
// Bottom right
|
||||
pglTexCoord2f(xfix, 0.0f);
|
||||
pglVertex3f(1.0f, -1.0f, 1.0f);
|
||||
pglEnd();
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
// Bottom right
|
||||
pglTexCoord2f(xfix, 0.0f);
|
||||
pglVertex3f(1.0f, -1.0f, 1.0f);
|
||||
pglEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||
}
|
||||
|
@ -2370,18 +2037,11 @@ EXPORT void HWRAPI(MakeScreenTexture) (void)
|
|||
|
||||
// Create screen texture
|
||||
pglBindTexture(GL_TEXTURE_2D, screentexture);
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_FILTER_NONE);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_FILTER_NONE);
|
||||
#else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
#endif
|
||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||
#endif
|
||||
|
||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||
}
|
||||
|
@ -2398,18 +2058,11 @@ EXPORT void HWRAPI(MakeScreenFinalTexture) (void)
|
|||
|
||||
// Create screen texture
|
||||
pglBindTexture(GL_TEXTURE_2D, finalScreenTexture);
|
||||
#ifdef KOS_GL_COMPATIBILITY
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_FILTER_NONE);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_FILTER_NONE);
|
||||
#else
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
#endif
|
||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||
#ifndef KOS_GL_COMPATIBILITY
|
||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||
#endif
|
||||
|
||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||
|
||||
|
|
|
@ -37,13 +37,11 @@
|
|||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
#ifdef STATIC_OPENGL // Because of the 1.3 functions, you'll need GLext to compile it if static
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _CREATE_DLL_ // necessary for Unix AND Windows
|
||||
#include "../../doomdef.h"
|
||||
|
|
|
@ -328,7 +328,7 @@ void HU_Start(void)
|
|||
*/
|
||||
static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags)
|
||||
{
|
||||
XBOXSTATIC char buf[254];
|
||||
char buf[254];
|
||||
size_t numwords, ix;
|
||||
char *msg = &buf[2];
|
||||
const size_t msgspace = sizeof buf - 2;
|
||||
|
@ -473,7 +473,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -493,7 +493,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal say command received from %s containing invalid characters\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC char buf[2];
|
||||
char buf[2];
|
||||
|
||||
buf[0] = (char)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
|
@ -1180,7 +1180,7 @@ void HU_Erase(void)
|
|||
// IN-LEVEL MULTIPLAYER RANKINGS
|
||||
//======================================================================
|
||||
|
||||
#define supercheckdef ((players[tab[i].num].powers[pw_super] && players[tab[i].num].mo && (players[tab[i].num].mo->state < &states[S_PLAY_SUPER_TRANS] || players[tab[i].num].mo->state > &states[S_PLAY_SUPER_TRANS9])) || (players[tab[i].num].powers[pw_carry] == CR_NIGHTSMODE && skins[players[tab[i].num].skin].flags & SF_SUPER))
|
||||
#define supercheckdef ((players[tab[i].num].powers[pw_super] && players[tab[i].num].mo && (players[tab[i].num].mo->state < &states[S_PLAY_SUPER_TRANS1] || players[tab[i].num].mo->state >= &states[S_PLAY_SUPER_TRANS6])) || (players[tab[i].num].powers[pw_carry] == CR_NIGHTSMODE && skins[players[tab[i].num].skin].flags & SF_SUPER))
|
||||
#define greycheckdef ((players[tab[i].num].mo && players[tab[i].num].mo->health <= 0) || players[tab[i].num].spectator)
|
||||
|
||||
//
|
||||
|
|
|
@ -20,17 +20,11 @@
|
|||
#else
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#elif !defined (__DJGPP__) && !defined(_WII)
|
||||
#elif !defined (__DJGPP__)
|
||||
#include <sys/socket.h>
|
||||
#ifndef _NDS
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef _PS3
|
||||
#include <net/netdb.h>
|
||||
#elif ! defined (_arch_dreamcast)
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "i_addrinfo.h"
|
||||
|
||||
|
@ -262,9 +256,6 @@ int I_getaddrinfo(const char *node, const char *service,
|
|||
for (i = 0, j = 0; i < ailen; i++, j++)
|
||||
{
|
||||
ai = *res+i;
|
||||
#ifdef _PS3
|
||||
addr[i].sin_len = famsize;
|
||||
#endif
|
||||
addr[i].sin_port = htons((UINT16)sockport);
|
||||
if (nodename)
|
||||
{
|
||||
|
|
|
@ -39,17 +39,7 @@
|
|||
#define EAI_NONAME -2
|
||||
#endif
|
||||
|
||||
#ifdef _PS3 // PSL1GHT v2
|
||||
struct my_addrinfo {
|
||||
int ai_flags;
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
size_t ai_addrlen;
|
||||
struct sockaddr *ai_addr;
|
||||
struct my_addrinfo *ai_next;
|
||||
};
|
||||
#elif defined (_WIN32) // already use the stub for Win32
|
||||
#ifdef _WIN32 // already use the stub for Win32
|
||||
// w32api, ws2tcpip.h, r1.12
|
||||
struct my_addrinfo {
|
||||
int ai_flags;
|
||||
|
|
68
src/i_tcp.c
68
src/i_tcp.c
|
@ -18,20 +18,12 @@
|
|||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef __OS2__
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#endif // __OS2__
|
||||
|
||||
#ifdef _PS3
|
||||
#define NO_IPV6 // PSL1GHT v2 do not have IPv6 support
|
||||
#endif
|
||||
|
||||
#ifndef NO_IPV6
|
||||
#define HAVE_IPV6
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32) || defined (_WIN32_WCE)
|
||||
#ifdef _WIN32
|
||||
#define USE_WINSOCK
|
||||
#if defined (_WIN64) || defined (HAVE_IPV6)
|
||||
#define USE_WINSOCK2
|
||||
|
@ -40,12 +32,6 @@
|
|||
#endif
|
||||
#endif //WIN32 OS
|
||||
|
||||
#ifdef _XBOX // XBox have on WinSock API?
|
||||
#undef USE_WINSOCK
|
||||
#undef USE_WINSOCK1
|
||||
#undef USE_WINSOCK2
|
||||
#endif
|
||||
|
||||
#ifdef USE_WINSOCK2
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
@ -61,17 +47,12 @@
|
|||
#else
|
||||
#ifdef USE_WINSOCK1
|
||||
#include <winsock.h>
|
||||
#elif !defined (SCOUW2) && !defined (SCOUW7) && !defined (__OS2__)
|
||||
#ifdef HAVE_LWIP
|
||||
#include <lwip/inet.h>
|
||||
#elif !defined (USE_WINSOCK)
|
||||
#elif !defined (SCOUW2) && !defined (SCOUW7)
|
||||
#ifndef USE_WINSOCK
|
||||
#include <arpa/inet.h>
|
||||
#endif //normal BSD API
|
||||
|
||||
#ifdef HAVE_LWIP
|
||||
#include <lwip/sockets.h>
|
||||
#define ioctl lwip_ioctl
|
||||
#elif !defined (USE_WINSOCK) //!HAVE_LWIP
|
||||
#ifndef USE_WINSOCK
|
||||
#ifdef __APPLE_CC__
|
||||
#ifndef _BSD_SOCKLEN_T_
|
||||
#define _BSD_SOCKLEN_T_
|
||||
|
@ -81,14 +62,7 @@
|
|||
#include <netinet/in.h>
|
||||
#endif //normal BSD API
|
||||
|
||||
#if defined(_arch_dreamcast) && !defined(HAVE_LWIP)
|
||||
#include <kos/net.h>
|
||||
#elif defined(HAVE_LWIP)
|
||||
#include <lwip/lwip.h>
|
||||
#elif defined (_PS3)
|
||||
#include <net/select.h>
|
||||
#include <net/net.h>
|
||||
#elif !defined(USE_WINSOCK) //!HAVE_LWIP
|
||||
#ifndef USE_WINSOCK
|
||||
#include <netdb.h>
|
||||
#include <sys/ioctl.h>
|
||||
#endif //normal BSD API
|
||||
|
@ -96,10 +70,6 @@
|
|||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
#include "sdl12/SRB2DC/dchelp.h"
|
||||
#endif
|
||||
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
#include <sys/time.h>
|
||||
#endif // UNIXCOMMON
|
||||
|
@ -190,11 +160,6 @@ static UINT8 UPNP_support = TRUE;
|
|||
// winsock stuff (in winsock a socket is not a file)
|
||||
#define ioctl ioctlsocket
|
||||
#define close closesocket
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#include "sdl12/SRB2CE/cehelp.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "i_addrinfo.h"
|
||||
|
@ -205,9 +170,7 @@ static UINT8 UPNP_support = TRUE;
|
|||
#define SELECTTEST
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_LWIP)
|
||||
#define SELECTTEST
|
||||
#elif !defined( _arch_dreamcast)
|
||||
#else
|
||||
#define SELECTTEST
|
||||
#endif
|
||||
|
||||
|
@ -218,7 +181,7 @@ typedef SOCKET SOCKET_TYPE;
|
|||
#define BADSOCKET INVALID_SOCKET
|
||||
#define ERRSOCKET (SOCKET_ERROR)
|
||||
#else
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (__APPLE__) || defined (__HAIKU__) || defined(_PS3)
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (__APPLE__) || defined (__HAIKU__)
|
||||
typedef int SOCKET_TYPE;
|
||||
#else
|
||||
typedef unsigned long SOCKET_TYPE;
|
||||
|
@ -1165,12 +1128,6 @@ boolean I_InitTcpDriver(void)
|
|||
CONS_Debug(DBG_NETPLAY, "WinSock description: %s\n",WSAData.szDescription);
|
||||
CONS_Debug(DBG_NETPLAY, "WinSock System Status: %s\n",WSAData.szSystemStatus);
|
||||
#endif
|
||||
#ifdef HAVE_LWIP
|
||||
lwip_kos_init();
|
||||
#elif defined(_arch_dreamcast)
|
||||
//return;
|
||||
net_init();
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
#ifdef WATTCP // Alam_GBC: survive bootp, dhcp, rarp and wattcp/pktdrv from failing to load
|
||||
survive_eth = 1; // would be needed to not exit if pkt_eth_init() fails
|
||||
|
@ -1223,9 +1180,6 @@ boolean I_InitTcpDriver(void)
|
|||
CONS_Debug(DBG_NETPLAY, "No TCP/IP driver detected\n");
|
||||
#endif // libsocket
|
||||
#endif // __DJGPP__
|
||||
#ifdef _PS3
|
||||
netInitialize();
|
||||
#endif
|
||||
#ifndef __DJGPP__
|
||||
init_tcp_driver = true;
|
||||
#endif
|
||||
|
@ -1274,11 +1228,6 @@ void I_ShutdownTcpDriver(void)
|
|||
WS_addrinfocleanup();
|
||||
WSACleanup();
|
||||
#endif
|
||||
#ifdef HAVE_LWIP
|
||||
lwip_kos_shutdown();
|
||||
#elif defined(_arch_dreamcast)
|
||||
net_shutdown();
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
#ifdef WATTCP // wattcp
|
||||
//_outch = NULL;
|
||||
|
@ -1287,9 +1236,6 @@ void I_ShutdownTcpDriver(void)
|
|||
__lsck_uninit();
|
||||
#endif // libsocket
|
||||
#endif // __DJGPP__
|
||||
#ifdef _PS3
|
||||
netDeinitialize();
|
||||
#endif
|
||||
CONS_Printf("shut down\n");
|
||||
init_tcp_driver = false;
|
||||
#endif
|
||||
|
|
119
src/info.c
119
src/info.c
|
@ -479,6 +479,19 @@ char spr2names[NUMPLAYERSPRITES][5] =
|
|||
"DRLB",
|
||||
"DRLC",
|
||||
|
||||
"TAL0",
|
||||
"TAL1",
|
||||
"TAL2",
|
||||
"TAL3",
|
||||
"TAL4",
|
||||
"TAL5",
|
||||
"TAL6",
|
||||
"TAL7",
|
||||
"TAL8",
|
||||
"TAL9",
|
||||
"TALA",
|
||||
"TALB",
|
||||
|
||||
"SIGN",
|
||||
"LIFE"
|
||||
};
|
||||
|
@ -562,8 +575,21 @@ playersprite_t spr2defaults[NUMPLAYERSPRITES] = {
|
|||
SPR2_NGTB, // SPR2_DRLB,
|
||||
SPR2_NGTC, // SPR2_DRLC,
|
||||
|
||||
0, // SPR2_TAL0,
|
||||
SPR2_TAL0, // SPR2_TAL1,
|
||||
SPR2_TAL1, // SPR2_TAL2,
|
||||
SPR2_TAL2, // SPR2_TAL3,
|
||||
SPR2_TAL1, // SPR2_TAL4,
|
||||
SPR2_TAL4, // SPR2_TAL5,
|
||||
SPR2_TAL0, // SPR2_TAL6,
|
||||
SPR2_TAL3, // SPR2_TAL7,
|
||||
SPR2_TAL7, // SPR2_TAL8,
|
||||
SPR2_TAL0, // SPR2_TAL9,
|
||||
SPR2_TAL9, // SPR2_TALA,
|
||||
SPR2_TAL0, // SPR2_TALB,
|
||||
|
||||
0, // SPR2_SIGN,
|
||||
0, // SPR2_LIFE
|
||||
0, // SPR2_LIFE,
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
@ -644,15 +670,12 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_MLEL, 35, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_MELEE_LANDING
|
||||
|
||||
// SF_SUPER
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS2}, // S_PLAY_SUPER_TRANS
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3}, // S_PLAY_SUPER_TRANS2
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4}, // S_PLAY_SUPER_TRANS3
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS5}, // S_PLAY_SUPER_TRANS4
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS6}, // S_PLAY_SUPER_TRANS5
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS7}, // S_PLAY_SUPER_TRANS6
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS8}, // S_PLAY_SUPER_TRANS7
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS9}, // S_PLAY_SUPER_TRANS8
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 16, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_SUPER_TRANS9
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS2}, // S_PLAY_SUPER_TRANS1
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3}, // S_PLAY_SUPER_TRANS2
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4}, // S_PLAY_SUPER_TRANS3
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS5}, // S_PLAY_SUPER_TRANS4
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS6}, // S_PLAY_SUPER_TRANS5
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 20, {A_FadeOverlay}, 0, 0, S_PLAY_FALL}, // S_PLAY_SUPER_TRANS6
|
||||
|
||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY}, //S_OBJPLACE_DUMMY
|
||||
|
||||
|
@ -667,15 +690,12 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_SIGN, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN
|
||||
|
||||
// NiGHTS Player, transforming
|
||||
{SPR_PLAY, SPR2_TRNS, 4, {A_Scream}, 0, 0, S_PLAY_NIGHTS_TRANS2}, // S_PLAY_NIGHTS_TRANS
|
||||
{SPR_PLAY, SPR2_TRNS, 4, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS3}, // S_PLAY_NIGHTS_TRANS2
|
||||
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 4, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS4}, // S_PLAY_NIGHTS_TRANS3
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS5}, // S_PLAY_NIGHTS_TRANS4
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS6}, // S_PLAY_NIGHTS_TRANS5
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS7}, // S_PLAY_NIGHTS_TRANS6
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS8}, // S_PLAY_NIGHTS_TRANS7
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS9}, // S_PLAY_NIGHTS_TRANS8
|
||||
{SPR_PLAY, SPR2_TRNS, 16, {NULL}, 0, 0, S_PLAY_NIGHTS_FLOAT}, // S_PLAY_NIGHTS_TRANS9
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS2}, // S_PLAY_NIGHTS_TRANS1
|
||||
{SPR_PLAY, SPR2_TRNS, 3, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS3}, // S_PLAY_NIGHTS_TRANS2
|
||||
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS4}, // S_PLAY_NIGHTS_TRANS3
|
||||
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS5}, // S_PLAY_NIGHTS_TRANS4
|
||||
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS6}, // S_PLAY_NIGHTS_TRANS5
|
||||
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 25, {A_FadeOverlay}, 4, 0, S_PLAY_NIGHTS_FLOAT}, // S_PLAY_NIGHTS_TRANS5
|
||||
|
||||
// NiGHTS Player, stand, float, pain, pull and attack
|
||||
{SPR_PLAY, SPR2_NSTD, 7, {NULL}, 0, 0, S_PLAY_NIGHTS_STAND}, // S_PLAY_NIGHTS_STAND
|
||||
|
@ -712,6 +732,20 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_NGTC, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLYC}, // S_PLAY_NIGHTS_FLYC
|
||||
{SPR_PLAY, SPR2_DRLC, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILLC}, // S_PLAY_NIGHTS_DRILLC
|
||||
|
||||
// c:
|
||||
{SPR_PLAY, SPR2_TAL0|FF_SPR2MIDSTART, 5, {NULL}, 0, 0, S_TAILSOVERLAY_STAND}, // S_TAILSOVERLAY_STAND
|
||||
{SPR_PLAY, SPR2_TAL1|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_0DEGREES}, // S_TAILSOVERLAY_0DEGREES
|
||||
{SPR_PLAY, SPR2_TAL2|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_PLUS30DEGREES}, // S_TAILSOVERLAY_PLUS30DEGREES
|
||||
{SPR_PLAY, SPR2_TAL3|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_PLUS60DEGREES}, // S_TAILSOVERLAY_PLUS60DEGREES
|
||||
{SPR_PLAY, SPR2_TAL4|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_MINUS30DEGREES}, // S_TAILSOVERLAY_MINUS30DEGREES
|
||||
{SPR_PLAY, SPR2_TAL5|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_MINUS60DEGREES}, // S_TAILSOVERLAY_MINUS60DEGREES
|
||||
{SPR_PLAY, SPR2_TAL6|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_RUN}, // S_TAILSOVERLAY_RUN
|
||||
{SPR_PLAY, SPR2_TAL7|FF_SPR2MIDSTART, 4, {NULL}, 0, 0, S_TAILSOVERLAY_FLY}, // S_TAILSOVERLAY_FLY
|
||||
{SPR_PLAY, SPR2_TAL8|FF_SPR2MIDSTART, 4, {NULL}, 0, 0, S_TAILSOVERLAY_TIRE}, // S_TAILSOVERLAY_TIRE
|
||||
{SPR_PLAY, SPR2_TAL9|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_PAIN}, // S_TAILSOVERLAY_PAIN
|
||||
{SPR_PLAY, SPR2_TALA|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_GASP}, // S_TAILSOVERLAY_GASP
|
||||
{SPR_PLAY, SPR2_TALB , 35, {NULL}, 0, 0, S_TAILSOVERLAY_EDGE}, // S_TAILSOVERLAY_EDGE
|
||||
|
||||
// Blue Crawla
|
||||
{SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND
|
||||
{SPR_POSS, 0, 3, {A_Chase}, 0, 0, S_POSS_RUN2}, // S_POSS_RUN1
|
||||
|
@ -3235,6 +3269,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
(statenum_t)MT_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_TAILSOVERLAY
|
||||
-1, // doomednum
|
||||
S_INVISIBLE, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
8, // speed
|
||||
16*FRACUNIT, // radius
|
||||
48*FRACUNIT, // height
|
||||
2, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BLUECRAWLA
|
||||
100, // doomednum
|
||||
S_POSS_STND, // spawnstate
|
||||
|
@ -11703,7 +11764,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_ELEMENTAL, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11730,7 +11791,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_ATTRACT, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11757,7 +11818,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_FORCE, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11784,7 +11845,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_ARMAGEDDON, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11811,7 +11872,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_WHIRLWIND, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11838,7 +11899,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_PITY, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11865,7 +11926,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_FLAMEAURA, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
-2, // display offset
|
||||
-4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11892,7 +11953,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_BUBBLEWRAP, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
2, // display offset
|
||||
4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -11919,7 +11980,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_THUNDERCOIN, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
-2, // display offset
|
||||
-4, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -14957,7 +15018,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
48*FRACUNIT, // height
|
||||
0, // display offset
|
||||
1, // display offset
|
||||
1000, // mass
|
||||
8, // damage
|
||||
sfx_None, // activesound
|
||||
|
|
40
src/info.h
40
src/info.h
|
@ -216,6 +216,7 @@ void A_FlickyCheck();
|
|||
void A_FlickyHeightCheck();
|
||||
void A_FlickyFlutter();
|
||||
void A_FlameParticle();
|
||||
void A_FadeOverlay();
|
||||
|
||||
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
|
||||
#define NUMMOBJFREESLOTS 256
|
||||
|
@ -685,6 +686,20 @@ typedef enum playersprite
|
|||
SPR2_DRLB,
|
||||
SPR2_DRLC,
|
||||
|
||||
// c:
|
||||
SPR2_TAL0,
|
||||
SPR2_TAL1,
|
||||
SPR2_TAL2,
|
||||
SPR2_TAL3,
|
||||
SPR2_TAL4,
|
||||
SPR2_TAL5,
|
||||
SPR2_TAL6,
|
||||
SPR2_TAL7,
|
||||
SPR2_TAL8,
|
||||
SPR2_TAL9,
|
||||
SPR2_TALA,
|
||||
SPR2_TALB,
|
||||
|
||||
SPR2_SIGN, // end sign head
|
||||
SPR2_LIFE, // life monitor icon
|
||||
|
||||
|
@ -763,15 +778,12 @@ typedef enum state
|
|||
S_PLAY_MELEE_LANDING,
|
||||
|
||||
// SF_SUPER
|
||||
S_PLAY_SUPER_TRANS,
|
||||
S_PLAY_SUPER_TRANS1,
|
||||
S_PLAY_SUPER_TRANS2,
|
||||
S_PLAY_SUPER_TRANS3,
|
||||
S_PLAY_SUPER_TRANS4,
|
||||
S_PLAY_SUPER_TRANS5,
|
||||
S_PLAY_SUPER_TRANS6,
|
||||
S_PLAY_SUPER_TRANS7,
|
||||
S_PLAY_SUPER_TRANS8,
|
||||
S_PLAY_SUPER_TRANS9,
|
||||
|
||||
// technically the player goes here but it's an infinite tic state
|
||||
S_OBJPLACE_DUMMY,
|
||||
|
@ -787,15 +799,12 @@ typedef enum state
|
|||
S_PLAY_SIGN,
|
||||
|
||||
// NiGHTS character (uses player sprite)
|
||||
S_PLAY_NIGHTS_TRANS,
|
||||
S_PLAY_NIGHTS_TRANS1,
|
||||
S_PLAY_NIGHTS_TRANS2,
|
||||
S_PLAY_NIGHTS_TRANS3,
|
||||
S_PLAY_NIGHTS_TRANS4,
|
||||
S_PLAY_NIGHTS_TRANS5,
|
||||
S_PLAY_NIGHTS_TRANS6,
|
||||
S_PLAY_NIGHTS_TRANS7,
|
||||
S_PLAY_NIGHTS_TRANS8,
|
||||
S_PLAY_NIGHTS_TRANS9,
|
||||
|
||||
S_PLAY_NIGHTS_STAND,
|
||||
S_PLAY_NIGHTS_FLOAT,
|
||||
|
@ -830,6 +839,20 @@ typedef enum state
|
|||
S_PLAY_NIGHTS_FLYC,
|
||||
S_PLAY_NIGHTS_DRILLC,
|
||||
|
||||
// c:
|
||||
S_TAILSOVERLAY_STAND,
|
||||
S_TAILSOVERLAY_0DEGREES,
|
||||
S_TAILSOVERLAY_PLUS30DEGREES,
|
||||
S_TAILSOVERLAY_PLUS60DEGREES,
|
||||
S_TAILSOVERLAY_MINUS30DEGREES,
|
||||
S_TAILSOVERLAY_MINUS60DEGREES,
|
||||
S_TAILSOVERLAY_RUN,
|
||||
S_TAILSOVERLAY_FLY,
|
||||
S_TAILSOVERLAY_TIRE,
|
||||
S_TAILSOVERLAY_PAIN,
|
||||
S_TAILSOVERLAY_GASP,
|
||||
S_TAILSOVERLAY_EDGE,
|
||||
|
||||
// Blue Crawla
|
||||
S_POSS_STND,
|
||||
S_POSS_RUN1,
|
||||
|
@ -3206,6 +3229,7 @@ typedef enum mobj_type
|
|||
|
||||
MT_THOK, // Thok! mobj
|
||||
MT_PLAYER,
|
||||
MT_TAILSOVERLAY, // c:
|
||||
|
||||
// Enemies
|
||||
MT_BLUECRAWLA,
|
||||
|
|
|
@ -89,7 +89,7 @@ deny:
|
|||
CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
XBOXSTATIC UINT8 bufn[2];
|
||||
UINT8 bufn[2];
|
||||
|
||||
bufn[0] = (UINT8)playernum;
|
||||
bufn[1] = KICK_MSG_CON_FAIL;
|
||||
|
|
|
@ -47,6 +47,7 @@ enum hook {
|
|||
hook_ShieldSpecial,
|
||||
hook_MobjMoveBlocked,
|
||||
hook_MapThingSpawn,
|
||||
hook_FollowMobj,
|
||||
|
||||
hook_MAX // last hook
|
||||
};
|
||||
|
@ -85,5 +86,6 @@ boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source, UINT8
|
|||
#define LUAh_ShieldSpecial(player) LUAh_PlayerHook(player, hook_ShieldSpecial) // Hook for shield abilities
|
||||
#define LUAh_MobjMoveBlocked(mo) LUAh_MobjHook(mo, hook_MobjMoveBlocked) // Hook for P_XYMovement (when movement is blocked)
|
||||
boolean LUAh_MapThingSpawn(mobj_t *mo, mapthing_t *mthing); // Hook for P_SpawnMapThing by mobj type
|
||||
boolean LUAh_FollowMobj(player_t *player, mobj_t *mo); // Hook for P_PlayerAfterThink Smiles mobj-following
|
||||
|
||||
#endif
|
||||
|
|
|
@ -58,6 +58,7 @@ const char *const hookNames[hook_MAX+1] = {
|
|||
"ShieldSpecial",
|
||||
"MobjMoveBlocked",
|
||||
"MapThingSpawn",
|
||||
"FollowMobj",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -197,6 +198,7 @@ static int lib_addHook(lua_State *L)
|
|||
case hook_SpinSpecial:
|
||||
case hook_JumpSpinSpecial:
|
||||
case hook_PlayerSpawn:
|
||||
case hook_FollowMobj:
|
||||
lastp = &playerhooks;
|
||||
break;
|
||||
case hook_LinedefExecute:
|
||||
|
@ -1138,4 +1140,42 @@ boolean LUAh_MapThingSpawn(mobj_t *mo, mapthing_t *mthing)
|
|||
return hooked;
|
||||
}
|
||||
|
||||
// Hook for P_PlayerAfterThink Smiles mobj-following
|
||||
boolean LUAh_FollowMobj(player_t *player, mobj_t *mobj)
|
||||
{
|
||||
hook_p hookp;
|
||||
boolean hooked = false;
|
||||
if (!gL || !(hooksAvailable[hook_FollowMobj/8] & (1<<(hook_FollowMobj%8))))
|
||||
return 0;
|
||||
|
||||
lua_settop(gL, 0);
|
||||
|
||||
for (hookp = playerhooks; hookp; hookp = hookp->next)
|
||||
if (hookp->type == hook_FollowMobj)
|
||||
{
|
||||
if (lua_gettop(gL) == 0)
|
||||
{
|
||||
LUA_PushUserdata(gL, player, META_PLAYER);
|
||||
LUA_PushUserdata(gL, mobj, META_MOBJ);
|
||||
}
|
||||
lua_pushfstring(gL, FMT_HOOKID, hookp->id);
|
||||
lua_gettable(gL, LUA_REGISTRYINDEX);
|
||||
lua_pushvalue(gL, -3);
|
||||
lua_pushvalue(gL, -3);
|
||||
if (lua_pcall(gL, 2, 1, 0)) {
|
||||
if (!hookp->error || cv_debug & DBG_LUA)
|
||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
||||
lua_pop(gL, 1);
|
||||
hookp->error = true;
|
||||
continue;
|
||||
}
|
||||
if (lua_toboolean(gL, -1))
|
||||
hooked = true;
|
||||
lua_pop(gL, 1);
|
||||
}
|
||||
|
||||
lua_settop(gL, 0);
|
||||
return hooked;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -174,6 +174,10 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->spinitem);
|
||||
else if (fastcmp(field,"revitem"))
|
||||
lua_pushinteger(L, plr->revitem);
|
||||
else if (fastcmp(field,"followitem"))
|
||||
lua_pushinteger(L, plr->followitem);
|
||||
else if (fastcmp(field,"followmobj"))
|
||||
LUA_PushUserdata(L, plr->followmobj, META_MOBJ);
|
||||
else if (fastcmp(field,"actionspd"))
|
||||
lua_pushfixed(L, plr->actionspd);
|
||||
else if (fastcmp(field,"mindash"))
|
||||
|
@ -441,6 +445,10 @@ static int player_set(lua_State *L)
|
|||
plr->spinitem = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"revitem"))
|
||||
plr->revitem = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"followitem"))
|
||||
plr->followitem = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"followmobj"))
|
||||
plr->followmobj = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
|
||||
else if (fastcmp(field,"actionspd"))
|
||||
plr->actionspd = (INT32)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"mindash"))
|
||||
|
|
|
@ -35,6 +35,7 @@ enum skin {
|
|||
skin_thokitem,
|
||||
skin_spinitem,
|
||||
skin_revitem,
|
||||
skin_followitem,
|
||||
skin_actionspd,
|
||||
skin_mindash,
|
||||
skin_maxdash,
|
||||
|
@ -73,6 +74,7 @@ static const char *const skin_opt[] = {
|
|||
"thokitem",
|
||||
"spinitem",
|
||||
"revitem",
|
||||
"followitem",
|
||||
"actionspd",
|
||||
"mindash",
|
||||
"maxdash",
|
||||
|
@ -162,6 +164,9 @@ static int skin_get(lua_State *L)
|
|||
case skin_revitem:
|
||||
lua_pushinteger(L, skin->revitem);
|
||||
break;
|
||||
case skin_followitem:
|
||||
lua_pushinteger(L, skin->followitem);
|
||||
break;
|
||||
case skin_actionspd:
|
||||
lua_pushfixed(L, skin->actionspd);
|
||||
break;
|
||||
|
|
|
@ -119,9 +119,7 @@
|
|||
/*****************************************************************************/
|
||||
/* nothing should be changed below */
|
||||
|
||||
#ifndef _NDS
|
||||
typedef unsigned char u8;
|
||||
#endif
|
||||
|
||||
typedef const u8 *LZF_STATE[1 << (HLOG)];
|
||||
|
||||
|
@ -159,7 +157,7 @@ typedef const u8 *LZF_STATE[1 << (HLOG)];
|
|||
* lzfP.h ends here. lzf_d.c follows.
|
||||
*/
|
||||
|
||||
#if AVOID_ERRNO || defined(_WIN32_WCE)
|
||||
#if AVOID_ERRNO
|
||||
# define SET_ERRNO(n)
|
||||
#else
|
||||
# include <errno.h>
|
||||
|
|
|
@ -123,12 +123,7 @@ void M_PushSpecialParameters(void)
|
|||
}
|
||||
|
||||
/// \brief max args
|
||||
|
||||
#if defined (_arch_dreamcast) || defined (_XBOX) || defined (_WII)
|
||||
#define MAXARGVS 1
|
||||
#else
|
||||
#define MAXARGVS 256
|
||||
#endif
|
||||
|
||||
/** \brief the M_FindResponseFile function
|
||||
Find a response file
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
// Was this just for the #define USEASM?
|
||||
//#ifdef _WIN32_WCE
|
||||
//#include "sdl12/SRB2CE/cehelp.h"
|
||||
//#endif
|
||||
|
||||
/*!
|
||||
\brief bits of the fraction
|
||||
*/
|
||||
|
|
17
src/m_menu.c
17
src/m_menu.c
|
@ -152,7 +152,7 @@ description_t description[32] =
|
|||
{false, "???", "", "", 0, 0},
|
||||
{false, "???", "", "", 0, 0}
|
||||
};
|
||||
static INT16 char_on = 0;
|
||||
INT16 char_on = -1, startchar = 1;
|
||||
static char *char_notes = NULL;
|
||||
static fixed_t char_scroll = 0;
|
||||
|
||||
|
@ -2435,7 +2435,6 @@ boolean M_Responder(event_t *ev)
|
|||
itemOn = 0;
|
||||
return true;
|
||||
|
||||
#ifndef DC
|
||||
case KEY_F5: // Video Mode
|
||||
if (modeattacking)
|
||||
return true;
|
||||
|
@ -2443,7 +2442,6 @@ boolean M_Responder(event_t *ev)
|
|||
M_Options(0);
|
||||
M_VideoModeMenu(0);
|
||||
return true;
|
||||
#endif
|
||||
|
||||
case KEY_F6: // Empty
|
||||
return true;
|
||||
|
@ -2831,9 +2829,8 @@ void M_ClearMenus(boolean callexitmenufunc)
|
|||
if (currentMenu->quitroutine && callexitmenufunc && !currentMenu->quitroutine())
|
||||
return; // we can't quit this menu (also used to set parameter from the menu)
|
||||
|
||||
#ifndef DC // Save the config file. I'm sick of crashing the game later and losing all my changes!
|
||||
// Save the config file. I'm sick of crashing the game later and losing all my changes!
|
||||
COM_BufAddText(va("saveconfig \"%s\" -silent\n", configfile));
|
||||
#endif //Alam: But not on the Dreamcast's VMUs
|
||||
|
||||
if (currentMenu == &MessageDef) // Oh sod off!
|
||||
currentMenu = &MainDef; // Not like it matters
|
||||
|
@ -6743,7 +6740,15 @@ static void M_SetupChoosePlayer(INT32 choice)
|
|||
SP_PlayerDef.prevMenu = currentMenu;
|
||||
M_SetupNextMenu(&SP_PlayerDef);
|
||||
if (!allowed)
|
||||
{
|
||||
char_on = firstvalid;
|
||||
if (startchar > 0 && startchar < 32)
|
||||
{
|
||||
INT16 workchar = startchar;
|
||||
while (workchar--)
|
||||
char_on = description[char_on].next;
|
||||
}
|
||||
}
|
||||
char_scroll = 0; // finish scrolling the menu
|
||||
Z_Free(char_notes);
|
||||
char_notes = V_WordWrap(0, 21*8, V_ALLOWLOWERCASE, description[char_on].notes);
|
||||
|
@ -8466,7 +8471,7 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
}
|
||||
else if (choice >= 199 && choice <= 211 && choice != 202 && choice != 206) //numpad too!
|
||||
{
|
||||
XBOXSTATIC char keypad_translation[] = {'7','8','9','-','4','5','6','+','1','2','3','0','.'};
|
||||
char keypad_translation[] = {'7','8','9','-','4','5','6','+','1','2','3','0','.'};
|
||||
choice = keypad_translation[choice - 199];
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_ip[l] = (char)choice;
|
||||
|
|
|
@ -232,6 +232,7 @@ extern CV_PossibleValue_t gametype_cons_t[];
|
|||
|
||||
extern INT16 startmap;
|
||||
extern INT32 ultimate_selectable;
|
||||
extern INT16 char_on, startchar;
|
||||
|
||||
#define MAXSAVEGAMES 31 //note: last save game is "no save"
|
||||
#define NOSAVESLOT 0 //slot where Play Without Saving appears
|
||||
|
|
|
@ -58,7 +58,7 @@ typedef off_t off64_t;
|
|||
|
||||
#if defined (_WIN32)
|
||||
#define PRIdS "Iu"
|
||||
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
|
||||
#elif defined (DJGPP)
|
||||
#define PRIdS "u"
|
||||
#else
|
||||
#define PRIdS "zu"
|
||||
|
@ -67,12 +67,10 @@ typedef off_t off64_t;
|
|||
#ifdef HAVE_PNG
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _WII
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _LFS64_LARGEFILE
|
||||
#define _LFS64_LARGEFILE
|
||||
|
@ -191,7 +189,7 @@ INT32 M_MapNumber(char first, char second)
|
|||
// ==========================================================================
|
||||
|
||||
// some libcs has no access function, make our own
|
||||
#if defined (_WIN32_WCE) || defined (_XBOX) || defined (_WII) || defined (_PS3)
|
||||
#if defined (_WIN32_WCE)
|
||||
int access(const char *path, int amode)
|
||||
{
|
||||
int accesshandle = -1;
|
||||
|
|
|
@ -40,13 +40,7 @@ void M_SaveFrame(void);
|
|||
void M_StopMovie(void);
|
||||
|
||||
// the file where game vars and settings are saved
|
||||
#ifdef DC
|
||||
#define CONFIGFILENAME "srb2dc.cfg"
|
||||
#elif defined (PSP)
|
||||
#define CONFIGFILENAME "srb2psp.cfg"
|
||||
#else
|
||||
#define CONFIGFILENAME "config.cfg"
|
||||
#endif
|
||||
|
||||
INT32 M_MapNumber(char first, char second);
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#ifndef _WIN32_WCE
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4127)
|
||||
#endif
|
||||
|
@ -30,7 +28,7 @@
|
|||
#include <stdlib.h>
|
||||
#else
|
||||
#ifndef HAVE_MEMCPY
|
||||
#if !((defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
||||
#if !(defined (_WIN32) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
||||
#define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||
#endif
|
||||
#endif
|
||||
|
|
41
src/mserv.c
41
src/mserv.c
|
@ -16,9 +16,7 @@
|
|||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#if !defined (UNDER_CE)
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#if (defined (NOMD5) || defined (NOMSERV)) && !defined (NONET)
|
||||
#define NONET
|
||||
|
@ -30,7 +28,7 @@
|
|||
#define HAVE_IPV6
|
||||
#endif
|
||||
|
||||
#if (defined (_WIN32) || defined (_WIN32_WCE)) && !defined (_XBOX)
|
||||
#ifdef _WIN32
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#ifdef HAVE_IPV6
|
||||
#include <ws2tcpip.h>
|
||||
|
@ -38,16 +36,6 @@
|
|||
#include <winsock.h> // socket(),...
|
||||
#endif //!HAVE_IPV6
|
||||
#else
|
||||
#ifdef __OS2__
|
||||
#include <sys/types.h>
|
||||
#endif // __OS2__
|
||||
|
||||
#ifdef HAVE_LWIP
|
||||
#include <lwip/inet.h>
|
||||
#include <kos/net.h>
|
||||
#include <lwip/lwip.h>
|
||||
#define ioctl lwip_ioctl
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#ifdef __APPLE_CC__
|
||||
#ifndef _BSD_SOCKLEN_T_
|
||||
|
@ -56,25 +44,12 @@
|
|||
#endif
|
||||
#include <sys/socket.h> // socket(),...
|
||||
#include <netinet/in.h> // sockaddr_in
|
||||
#ifdef _PS3
|
||||
#include <net/select.h>
|
||||
#elif !defined(_arch_dreamcast)
|
||||
#include <netdb.h> // getaddrinfo(),...
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
#include "sdl12/SRB2DC/dchelp.h"
|
||||
#endif
|
||||
|
||||
#include <sys/time.h> // timeval,... (TIMEOUT)
|
||||
#include <errno.h>
|
||||
#endif // _WIN32/_WIN32_WCE
|
||||
|
||||
#ifdef __OS2__
|
||||
#include <errno.h>
|
||||
#endif // __OS2__
|
||||
#endif // _WIN32
|
||||
#endif // !NONET
|
||||
|
||||
#include "doomstat.h"
|
||||
|
@ -91,10 +66,6 @@
|
|||
#include "m_argv.h" // Alam is going to kill me <3
|
||||
#include "m_misc.h" // GetRevisionString()
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#include "sdl12/SRB2CE/cehelp.h"
|
||||
#endif
|
||||
|
||||
#include "i_addrinfo.h"
|
||||
|
||||
// ================================ DEFINITIONS ===============================
|
||||
|
@ -183,13 +154,13 @@ typedef struct
|
|||
#endif
|
||||
|
||||
// win32 or djgpp
|
||||
#if defined (_WIN32) || defined (_WIN32_WCE) || defined (__DJGPP__)
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#define ioctl ioctlsocket
|
||||
#define close closesocket
|
||||
#ifdef WATTCP
|
||||
#define strerror strerror_s
|
||||
#endif
|
||||
#if defined (_WIN32) || defined (_WIN32_WCE)
|
||||
#ifdef _WIN32
|
||||
#undef errno
|
||||
#define errno h_errno // some very strange things happen when not using h_error
|
||||
#endif
|
||||
|
@ -215,12 +186,12 @@ static enum { MSCS_NONE, MSCS_WAITING, MSCS_REGISTERED, MSCS_FAILED } con_state
|
|||
static INT32 msnode = -1;
|
||||
UINT16 current_port = 0;
|
||||
|
||||
#if (defined (_WIN32) || defined (_WIN32_WCE) || defined (_WIN32)) && !defined (NONET)
|
||||
#if defined (_WIN32) && !defined (NONET)
|
||||
typedef SOCKET SOCKET_TYPE;
|
||||
#define BADSOCKET INVALID_SOCKET
|
||||
#define ERRSOCKET (SOCKET_ERROR)
|
||||
#else
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (__APPLE__) || defined (__HAIKU__) || defined (_PS3)
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (__APPLE__) || defined (__HAIKU__)
|
||||
typedef int SOCKET_TYPE;
|
||||
#else
|
||||
typedef unsigned long SOCKET_TYPE;
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
# Adapted in part from devkitPRO makefiles.
|
||||
|
||||
NOMD5=1
|
||||
|
||||
# Check if DEVKITARM is set in the environment. If so, continue with compilation.
|
||||
.SUFFIXES:
|
||||
|
||||
ifeq ($(strip $(DEVKITARM)),)
|
||||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
|
||||
endif
|
||||
|
||||
# use absolute paths because changing PATH variable breaks distcc
|
||||
PREFIX := $(DEVKITARM)/bin/arm-eabi
|
||||
NDSTOOL := $(DEVKITARM)/bin/ndstool
|
||||
|
||||
# Disable same warning flags
|
||||
WFLAGS+=-Wno-inline -Wno-cast-align
|
||||
WFLAGS+=-Wno-shadow -Wno-char-subscripts
|
||||
WFLAGS+=-Wno-declaration-after-statement
|
||||
WFLAGS+=-Wno-old-style-definition
|
||||
WFLAGS+=-Wno-undef
|
||||
WFLAGS+=-Wno-unsuffixed-float-constants
|
||||
|
||||
ifndef NOHW
|
||||
OBJS+=$(OBJDIR)/r_nds3d.o
|
||||
endif
|
||||
|
||||
ARCH = -mthumb -mthumb-interwork
|
||||
LDFLAGS += -L$(DEVKITPRO)/libnds/lib -specs=ds_arm9.specs -g $(ARCH) -mno-fpu
|
||||
LIBS += -lfat -lnds9
|
||||
CFLAGS += -D_NDS -DARM9 -I$(DEVKITPRO)/libnds/include $(ARCH) -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math
|
|
@ -1,37 +0,0 @@
|
|||
#include "../command.h"
|
||||
#include "../s_sound.h"
|
||||
#include "../i_sound.h"
|
||||
|
||||
//
|
||||
// CD MUSIC I/O
|
||||
//
|
||||
|
||||
UINT8 cdaudio_started = 0;
|
||||
|
||||
consvar_t cd_volume = {"cd_volume","31",CV_SAVE,soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cdUpdate = {"cd_update","1",CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
|
||||
void I_InitCD(void){}
|
||||
|
||||
void I_StopCD(void){}
|
||||
|
||||
void I_PauseCD(void){}
|
||||
|
||||
void I_ResumeCD(void){}
|
||||
|
||||
void I_ShutdownCD(void){}
|
||||
|
||||
void I_UpdateCD(void){}
|
||||
|
||||
void I_PlayCD(UINT8 track, UINT8 looping)
|
||||
{
|
||||
(void)track;
|
||||
(void)looping;
|
||||
}
|
||||
|
||||
boolean I_SetVolumeCD(int volume)
|
||||
{
|
||||
(void)volume;
|
||||
return false;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#include "../doomdef.h"
|
||||
#include "../d_main.h"
|
||||
#include "../m_argv.h"
|
||||
#include "../i_system.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
myargc = argc;
|
||||
myargv = argv; /// \todo pull out path to exe from this string
|
||||
|
||||
CONS_Printf("I_StartupSystem...");
|
||||
I_StartupSystem();
|
||||
|
||||
// startup SRB2
|
||||
CONS_Printf("Setting up SRB2...\n");
|
||||
D_SRB2Main();
|
||||
CONS_Printf("Entering main game loop...\n");
|
||||
// never return
|
||||
D_SRB2Loop();
|
||||
|
||||
// return to OS
|
||||
#ifndef __GNUC__
|
||||
return 0;
|
||||
#endif
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
#include "../i_net.h"
|
||||
|
||||
boolean I_InitNetwork(void)
|
||||
{
|
||||
return false;
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
#include "../i_sound.h"
|
||||
|
||||
UINT8 sound_started = 0;
|
||||
|
||||
void *I_GetSfx(sfxinfo_t *sfx)
|
||||
{
|
||||
(void)sfx;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void I_FreeSfx(sfxinfo_t *sfx)
|
||||
{
|
||||
(void)sfx;
|
||||
}
|
||||
|
||||
void I_StartupSound(void){}
|
||||
|
||||
void I_ShutdownSound(void){}
|
||||
|
||||
//
|
||||
// SFX I/O
|
||||
//
|
||||
|
||||
INT32 I_StartSound(sfxenum_t id, INT32 vol, INT32 sep, INT32 pitch, INT32 priority)
|
||||
{
|
||||
(void)id;
|
||||
(void)vol;
|
||||
(void)sep;
|
||||
(void)pitch;
|
||||
(void)priority;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void I_StopSound(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
INT32 I_SoundIsPlaying(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
return false;
|
||||
}
|
||||
|
||||
void I_UpdateSoundParams(INT32 handle, INT32 vol, INT32 sep, INT32 pitch)
|
||||
{
|
||||
(void)handle;
|
||||
(void)vol;
|
||||
(void)sep;
|
||||
(void)pitch;
|
||||
}
|
||||
|
||||
void I_SetSfxVolume(INT32 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
//
|
||||
// MUSIC I/O
|
||||
//
|
||||
UINT8 music_started = 0;
|
||||
|
||||
void I_InitMusic(void){}
|
||||
|
||||
void I_ShutdownMusic(void){}
|
||||
|
||||
void I_PauseSong(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
void I_ResumeSong(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
//
|
||||
// MIDI I/O
|
||||
//
|
||||
|
||||
UINT8 midimusic_started = 0;
|
||||
|
||||
void I_InitMIDIMusic(void){}
|
||||
|
||||
void I_ShutdownMIDIMusic(void){}
|
||||
|
||||
void I_SetMIDIMusicVolume(INT32 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
INT32 I_RegisterSong(void *data, size_t len)
|
||||
{
|
||||
(void)data;
|
||||
(void)len;
|
||||
return -1;
|
||||
}
|
||||
|
||||
boolean I_PlaySong(INT32 handle, INT32 looping)
|
||||
{
|
||||
(void)handle;
|
||||
(void)looping;
|
||||
return false;
|
||||
}
|
||||
|
||||
void I_StopSong(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
void I_UnRegisterSong(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
//
|
||||
// DIGMUSIC I/O
|
||||
//
|
||||
|
||||
UINT8 digmusic_started = 0;
|
||||
|
||||
void I_InitDigMusic(void){}
|
||||
|
||||
void I_ShutdownDigMusic(void){}
|
||||
|
||||
boolean I_StartDigSong(const char *musicname, INT32 looping)
|
||||
{
|
||||
(void)musicname;
|
||||
(void)looping;
|
||||
return false;
|
||||
}
|
||||
|
||||
void I_StopDigSong(void){}
|
||||
|
||||
void I_SetDigMusicVolume(INT32 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
(void)speed;
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_SetSongTrack(int track)
|
||||
{
|
||||
(void)track;
|
||||
return false;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue