Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal into unslot-music
# Conflicts: # src/dehacked.c # src/f_finale.c # src/lua_baselib.c # src/lua_maplib.c # src/m_menu.c # src/p_enemy.c # src/p_inter.c # src/p_setup.c # src/p_user.c # src/s_sound.c # src/y_inter.c
This commit is contained in:
commit
e0f5312d13
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -29,4 +29,6 @@
|
||||||
/libs/zlib/nintendods/README -whitespace
|
/libs/zlib/nintendods/README -whitespace
|
||||||
/libs/zlib/watcom/watcom_f.mak -crlf -whitespace
|
/libs/zlib/watcom/watcom_f.mak -crlf -whitespace
|
||||||
/libs/zlib/watcom/watcom_l.mak -crlf -whitespace
|
/libs/zlib/watcom/watcom_l.mak -crlf -whitespace
|
||||||
|
#Appveyor
|
||||||
|
/appveyor.yml -crlf -whitespace
|
||||||
# Other
|
# Other
|
||||||
|
|
33
.travis.yml
Normal file
33
.travis.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
language: c
|
||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
env:
|
||||||
|
- CFLAGS=-Wno-absolute-value -Werror
|
||||||
|
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/srb2_cache
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libsdl2-mixer-dev
|
||||||
|
- libpng-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
- libgme-dev
|
||||||
|
- p7zip-full
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- mkdir $HOME/srb2_cache
|
||||||
|
- wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2114-assets.7z -O $HOME/srb2_cache/SRB2-v2114-assets.7z
|
||||||
|
- 7z x $HOME/srb2_cache/SRB2-v2114-assets.7z -oassets
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- cmake ..
|
||||||
|
|
||||||
|
script: make
|
|
@ -28,7 +28,7 @@ macro(add_framework fwname appname)
|
||||||
${CMAKE_OSX_SYSROOT}/Library
|
${CMAKE_OSX_SYSROOT}/Library
|
||||||
/System/Library
|
/System/Library
|
||||||
/Library
|
/Library
|
||||||
PATH_SUFFIXES Frameworks
|
ATH_SUFFIXES Frameworks
|
||||||
NO_DEFAULT_PATH)
|
NO_DEFAULT_PATH)
|
||||||
if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
|
if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
|
||||||
MESSAGE(ERROR ": Framework ${fwname} not found")
|
MESSAGE(ERROR ": Framework ${fwname} not found")
|
||||||
|
@ -80,9 +80,6 @@ endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES "Darwin")
|
if(${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||||
add_definitions(-DMACOSX)
|
add_definitions(-DMACOSX)
|
||||||
if(${CMAKE_C_COMPILER_ID} MATCHES "Clang")
|
|
||||||
set(CLANG ON)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
71
appveyor.yml
Normal file
71
appveyor.yml
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
version: 2.1.14.{branch}-{build}
|
||||||
|
os: MinGW
|
||||||
|
|
||||||
|
environment:
|
||||||
|
CC: i686-w64-mingw32-gcc
|
||||||
|
WINDRES: windres
|
||||||
|
MINGW_SDK: c:\msys64\mingw32
|
||||||
|
SDL2_URL: http://libsdl.org/release/SDL2-devel-2.0.4-mingw.tar.gz
|
||||||
|
SDL2_ARCHIVE: SDL2-devel-2.0.4-mingw.tar
|
||||||
|
SDL2_MOVE: SDL2-2.0.4\i686-w64-mingw32
|
||||||
|
SDL2_MIXER_URL: https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.1-mingw.tar.gz
|
||||||
|
SDL2_MIXER_ARCHIVE: SDL2_mixer-devel-2.0.1-mingw.tar
|
||||||
|
SDL2_MIXER_MOVE: SDL2_mixer-2.0.1\i686-w64-mingw32
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- SDL2-devel-2.0.4-mingw.tar.gz
|
||||||
|
- SDL2_mixer-devel-2.0.1-mingw.tar.gz
|
||||||
|
|
||||||
|
install:
|
||||||
|
#Download SDL2
|
||||||
|
- if not exist "%SDL2_ARCHIVE%.gz" appveyor DownloadFile "%SDL2_URL%" -FileName "%SDL2_ARCHIVE%.gz"
|
||||||
|
- 7z x -y "%SDL2_ARCHIVE%.gz" -o%TMP% >null
|
||||||
|
- 7z x -y "%TMP%\%SDL2_ARCHIVE%" -o%TMP% >null
|
||||||
|
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs %TMP%\%SDL2_MOVE% %MINGW_SDK% || exit 0
|
||||||
|
- ps: (Get-Content ([System.Environment]::ExpandEnvironmentVariables("%TMP%\%SDL2_MOVE%\bin\sdl2-config"))) | ForEach-Object { $_ -replace "/usr/local/cross-tools/i686-w64-mingw32", ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%")) } | Set-Content ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%\bin\sdl2-config"))
|
||||||
|
- ps: (Get-Content ([System.Environment]::ExpandEnvironmentVariables("%TMP%\%SDL2_MOVE%\lib\cmake\SDL2\sdl2-config.cmake"))) | ForEach-Object { $_ -replace "/usr/local/cross-tools/i686-w64-mingw32", ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%")) } | Set-Content ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%\lib\cmake\SDL2\sdl2-config.cmake"))
|
||||||
|
- ps: (Get-Content ([System.Environment]::ExpandEnvironmentVariables("%TMP%\%SDL2_MOVE%\lib\pkgconfig\sdl2.pc"))) | ForEach-Object { $_ -replace "/usr/local/cross-tools/i686-w64-mingw32", ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%")) } | Set-Content ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%\lib\pkgconfig\sdl2.pc"))
|
||||||
|
#Download SDL2_Mixer
|
||||||
|
- if not exist "%SDL2_MIXER_ARCHIVE%.gz" appveyor DownloadFile "%SDL2_MIXER_URL%" -FileName "%SDL2_MIXER_ARCHIVE%.gz"
|
||||||
|
- 7z x -y "%SDL2_MIXER_ARCHIVE%.gz" -o%TMP% >null
|
||||||
|
- 7z x -y "%TMP%\%SDL2_MIXER_ARCHIVE%" -o%TMP% >null
|
||||||
|
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs %TMP%\%SDL2_MIXER_MOVE% %MINGW_SDK% || exit 0
|
||||||
|
- ps: (Get-Content ([System.Environment]::ExpandEnvironmentVariables("%TMP%\%SDL2_MIXER_MOVE%\lib\pkgconfig\SDL2_mixer.pc")))| ForEach-Object { $_ -replace "/usr/local/cross-tools/i686-w64-mingw32", ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%")) } | Set-Content ([System.Environment]::ExpandEnvironmentVariables("%MINGW_SDK%\lib\pkgconfig\SDL2_mixer.pc"))
|
||||||
|
|
||||||
|
before_build:
|
||||||
|
- set SDL_PKGCONFIG=%MINGW_SDK%\lib\pkgconfig\sdl2.pc
|
||||||
|
- set Path=%MINGW_SDK%\bin;%Path%
|
||||||
|
- i686-w64-mingw32-gcc --version
|
||||||
|
- mingw32-make --version
|
||||||
|
- set SRB2_MFLAGS=-C src MINGW=1 WARNINGMODE=1 NOASM=1 NOUPX=1 GCC53=1
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- cmd: mingw32-make.exe %SRB2_MFLAGS% SDL=1 clean
|
||||||
|
- cmd: mingw32-make.exe %SRB2_MFLAGS% SDL=1 ERRORMODE=1
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
- cmd: git rev-parse --short %APPVEYOR_REPO_COMMIT%>%TMP%/gitshort.txt
|
||||||
|
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
|
||||||
|
- set BUILD_ARCHIVE=%APPVEYOR_REPO_BRANCH%-%GITSHORT%.7z
|
||||||
|
- cmd: 7z a %BUILD_ARCHIVE% bin\Mingw\Release -xr!.gitignore
|
||||||
|
- appveyor PushArtifact %BUILD_ARCHIVE%
|
||||||
|
|
||||||
|
test: off
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
- provider: FTP
|
||||||
|
protocol: ftps
|
||||||
|
host:
|
||||||
|
secure: NsLJEPIBvmwCOj8Tg8RoRQ==
|
||||||
|
username:
|
||||||
|
secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA=
|
||||||
|
password:
|
||||||
|
secure: Hbn6Uy3lT0YZ88yFJ3aW4w==
|
||||||
|
folder: appveyor
|
||||||
|
application:
|
||||||
|
active_mode: false
|
||||||
|
|
||||||
|
|
||||||
|
on_finish:
|
||||||
|
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
|
||||||
|
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
12
assets/debian/changelog
Normal file
12
assets/debian/changelog
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
srb2-data (2.1.14~1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Updated for SRB2 v2.1.14
|
||||||
|
|
||||||
|
-- Alam Arias <alam+debian@srb2.org> Sat, 6 Jan 2016 11:00:00 -0500
|
||||||
|
|
||||||
|
|
||||||
|
srb2-data (2.0.6-2) maverick; urgency=high
|
||||||
|
|
||||||
|
* Initial proper release..
|
||||||
|
|
||||||
|
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Sat, 29 Jan 2011 01:18:42 +1300
|
|
@ -37,7 +37,7 @@ RM := rm -rf
|
||||||
DIR := $(shell pwd)
|
DIR := $(shell pwd)
|
||||||
|
|
||||||
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
|
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
|
||||||
DATAFILES := drill.dta music.dta soar.dta zones.dta player.dta rings.wpn srb2.wad
|
DATAFILES := srb2.srb zones.dta player.dta rings.dta music.dta
|
||||||
|
|
||||||
DATADIR := usr/games/SRB2
|
DATADIR := usr/games/SRB2
|
||||||
RESOURCEDIR := .
|
RESOURCEDIR := .
|
||||||
|
@ -48,7 +48,7 @@ build:
|
||||||
# This will need to be updated every time SRB2 official version is
|
# This will need to be updated every time SRB2 official version is
|
||||||
# Copy data files to their install locations, and add data files to include-binaries
|
# Copy data files to their install locations, and add data files to include-binaries
|
||||||
for file in $(DATAFILES); do \
|
for file in $(DATAFILES); do \
|
||||||
$(WGET) http://alam.srb2.org/SRB2/2.0.6-Final/Resources/$$file; \
|
$(WGET) http://alam.srb2.org/SRB2/2.1.14-Final/Resources/$$file; \
|
||||||
if test "$$file" = "srb2.wad"; then \
|
if test "$$file" = "srb2.wad"; then \
|
||||||
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/srb2.srb; \
|
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/srb2.srb; \
|
||||||
else \
|
else \
|
1
assets/debian/source/format
Normal file
1
assets/debian/source/format
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3.0 (native)
|
|
@ -1,5 +0,0 @@
|
||||||
srb2-data (2.0.6-2) maverick; urgency=high
|
|
||||||
|
|
||||||
* Initial proper release..
|
|
||||||
|
|
||||||
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Sat, 29 Jan 2011 01:18:42 +1300
|
|
|
@ -1 +0,0 @@
|
||||||
3.0 (quilt)
|
|
|
@ -6,6 +6,7 @@ copy nul: /b +%1\comptime.c tmp.$$$ > nul
|
||||||
move tmp.$$$ %1\comptime.c > nul
|
move tmp.$$$ %1\comptime.c > nul
|
||||||
|
|
||||||
if exist .git goto gitrev
|
if exist .git goto gitrev
|
||||||
|
if exist ..\.git goto gitrev
|
||||||
if exist .svn goto svnrev
|
if exist .svn goto svnrev
|
||||||
goto filwri
|
goto filwri
|
||||||
|
|
||||||
|
|
14
debian/control
vendored
14
debian/control
vendored
|
@ -4,13 +4,19 @@ Source: srb2
|
||||||
Section: games
|
Section: games
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Callum Dickinson <gcfreak_ag20@hotmail.com>
|
Maintainer: Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||||
Build-Depends: debhelper (>= 7.0.50~), libsdl1.2-dev (>= 1.2.7), libsdl-mixer1.2-dev (>= 1.2.7), libpng12-dev (>= 1.2.7), libglu1-dev | libglu-dev, libosmesa6-dev | libgl-dev, nasm [i386]
|
Build-Depends: debhelper (>= 7.0.50~),
|
||||||
|
libsdl2-dev,
|
||||||
|
libsdl2-mixer-dev,
|
||||||
|
libpng12-dev (>= 1.2.7),
|
||||||
|
libglu1-dev | libglu-dev,
|
||||||
|
libosmesa6-dev | libgl-dev,
|
||||||
|
nasm [i386]
|
||||||
Standards-Version: 3.8.4
|
Standards-Version: 3.8.4
|
||||||
Homepage: http://www.srb2.org
|
Homepage: http://www.srb2.org
|
||||||
|
|
||||||
Package: srb2
|
Package: srb2
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.0.6)
|
Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14)
|
||||||
Description: A cross-platform 3D Sonic fangame
|
Description: A cross-platform 3D Sonic fangame
|
||||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||||
fangame built using a modified version of the Doom Legacy
|
fangame built using a modified version of the Doom Legacy
|
||||||
|
@ -22,8 +28,8 @@ Description: A cross-platform 3D Sonic fangame
|
||||||
|
|
||||||
Package: srb2-dbg
|
Package: srb2-dbg
|
||||||
Architecture: any
|
Architecture: any
|
||||||
# FIXME: should be Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.0.6), srb2 but dh_shlibdeps is being an asshat
|
# FIXME: should be Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
|
||||||
Depends: libc6, ${misc:Depends}, srb2-data (= 2.0.6), srb2
|
Depends: libc6, ${misc:Depends}, srb2-data (= 2.1.14), srb2
|
||||||
Description: A cross-platform 3D Sonic fangame
|
Description: A cross-platform 3D Sonic fangame
|
||||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||||
fangame built using a modified version of the Doom Legacy
|
fangame built using a modified version of the Doom Legacy
|
||||||
|
|
17
debian/rules
vendored
17
debian/rules
vendored
|
@ -59,16 +59,18 @@ DBGNAME = debug/$(EXENAME)
|
||||||
|
|
||||||
PKGDIR = usr/games
|
PKGDIR = usr/games
|
||||||
DBGDIR = usr/lib/debug/$(PKGDIR)
|
DBGDIR = usr/lib/debug/$(PKGDIR)
|
||||||
|
PIXMAPS_DIR = usr/share/pixmaps
|
||||||
|
DESKTOP_DIR = usr/share/applications
|
||||||
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
|
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
|
||||||
OS = LINUX=1
|
OS = LINUX=1
|
||||||
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
|
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
|
||||||
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) SDL_PKGCONFIG=sdl PNG_PKGCONFIG=libpng NOOBJDUMP=1
|
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng NOOBJDUMP=1
|
||||||
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
|
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
|
||||||
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
|
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
|
||||||
# FIXME pkg-config dir hacks
|
# FIXME pkg-config dir hacks
|
||||||
export PKG_CONFIG_LIBDIR = /usr/$(CROSS_COMPILE_HOST)/lib/pkgconfig
|
export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
|
||||||
BINDIR := $(DIR)/bin/Linux/Release
|
BINDIR := $(DIR)/bin/Linux/Release
|
||||||
LDFLAGS += "-Wl,-rpath=/usr/$(CROSS_COMPILE_HOST)/lib/"
|
LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(MKDIR) $(BINDIR)/debug
|
$(MKDIR) $(BINDIR)/debug
|
||||||
|
@ -80,14 +82,23 @@ binary-indep:
|
||||||
echo "no need to do any arch-independent stuff"
|
echo "no need to do any arch-independent stuff"
|
||||||
|
|
||||||
binary-arch:
|
binary-arch:
|
||||||
|
# create ddirs
|
||||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DBGDIR)
|
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DBGDIR)
|
||||||
|
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DESKTOP_DIR)
|
||||||
|
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(PIXMAPS_DIR)
|
||||||
|
# install main binaries
|
||||||
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
|
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
|
||||||
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
|
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
|
||||||
|
# Install desktop file and banner image
|
||||||
|
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps
|
||||||
|
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications
|
||||||
# add compiled binaries to include-binaries
|
# add compiled binaries to include-binaries
|
||||||
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
||||||
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
||||||
# Generate install folder files
|
# Generate install folder files
|
||||||
echo $(PKGDIR) > $(DIR)/debian/$(PACKAGE).install
|
echo $(PKGDIR) > $(DIR)/debian/$(PACKAGE).install
|
||||||
|
echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||||
|
echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||||
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
|
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
|
||||||
|
|
||||||
binary: binary-arch
|
binary: binary-arch
|
||||||
|
|
10
debian/srb2.desktop
vendored
Normal file
10
debian/srb2.desktop
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Sonic Robo Blast 2
|
||||||
|
Comment=A free 3D Sonic the Hedgehog fan-game built using a modified ver. of the Doom Legacy source port
|
||||||
|
Encoding=UTF-8
|
||||||
|
Exec=srb2
|
||||||
|
Icon=/usr/share/pixmaps/srb2.png
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
StartupNotify=false
|
||||||
|
Categories=Application;Game;
|
|
@ -168,7 +168,7 @@ set(SRB2_CORE_GAME_SOURCES
|
||||||
p_tick.h
|
p_tick.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT CLANG)
|
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||||
set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c)
|
set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -406,10 +406,14 @@ endif()
|
||||||
|
|
||||||
# Compatibility flag with later versions of GCC
|
# Compatibility flag with later versions of GCC
|
||||||
# We should really fix our code to not need this
|
# We should really fix our code to not need this
|
||||||
if(NOT CLANG AND NOT MSVC)
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields)
|
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(-DCMAKECONFIG)
|
add_definitions(-DCMAKECONFIG)
|
||||||
|
|
||||||
#add_library(SRB2Core STATIC
|
#add_library(SRB2Core STATIC
|
||||||
|
|
|
@ -7,6 +7,22 @@
|
||||||
# and other things
|
# and other things
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifdef GCC53
|
||||||
|
GCC52=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GCC52
|
||||||
|
GCC51=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GCC51
|
||||||
|
GCC49=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GCC49
|
||||||
|
GCC48=1
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef GCC48
|
ifdef GCC48
|
||||||
GCC47=1
|
GCC47=1
|
||||||
endif
|
endif
|
||||||
|
@ -139,6 +155,10 @@ WFLAGS+=-Wformat-security
|
||||||
ifndef GCC29
|
ifndef GCC29
|
||||||
#WFLAGS+=-Winit-self
|
#WFLAGS+=-Winit-self
|
||||||
endif
|
endif
|
||||||
|
ifdef GCC46
|
||||||
|
WFLAGS+=-Wno-suggest-attribute=noreturn
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef MINGW
|
ifndef MINGW
|
||||||
ifdef GCC45
|
ifdef GCC45
|
||||||
WFLAGS+=-Wunsuffixed-float-constants
|
WFLAGS+=-Wunsuffixed-float-constants
|
||||||
|
@ -155,6 +175,7 @@ ifdef GCC43
|
||||||
endif
|
endif
|
||||||
WFLAGS+=$(OLDWFLAGS)
|
WFLAGS+=$(OLDWFLAGS)
|
||||||
|
|
||||||
|
|
||||||
#indicate platform and what interface use with
|
#indicate platform and what interface use with
|
||||||
ifndef WINCE
|
ifndef WINCE
|
||||||
ifndef XBOX
|
ifndef XBOX
|
||||||
|
|
|
@ -49,7 +49,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||||
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||||
{
|
{
|
||||||
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
||||||
cmd->angleturn = abs(tails->angle - sonic->angle)>>16;
|
cmd->angleturn = abs((tails->angle - sonic->angle))>>16;
|
||||||
if (sonic->angle < tails->angle)
|
if (sonic->angle < tails->angle)
|
||||||
cmd->angleturn = -cmd->angleturn;
|
cmd->angleturn = -cmd->angleturn;
|
||||||
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
||||||
|
|
|
@ -202,7 +202,7 @@ static void CONS_Bind_f(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
key = G_KeyStringtoNum(COM_Argv(1));
|
key = G_KeyStringtoNum(COM_Argv(1));
|
||||||
if (!key)
|
if (key <= 0 || key >= NUMINPUTS)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
|
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
|
||||||
return;
|
return;
|
||||||
|
@ -310,7 +310,7 @@ static void CON_SetupBackColormap(void)
|
||||||
yellowmap[9] = (UINT8)66;
|
yellowmap[9] = (UINT8)66;
|
||||||
purplemap[3] = (UINT8)184;
|
purplemap[3] = (UINT8)184;
|
||||||
purplemap[9] = (UINT8)186;
|
purplemap[9] = (UINT8)186;
|
||||||
lgreenmap[3] = (UINT8)102;
|
lgreenmap[3] = (UINT8)98;
|
||||||
lgreenmap[9] = (UINT8)106;
|
lgreenmap[9] = (UINT8)106;
|
||||||
bluemap[3] = (UINT8)147;
|
bluemap[3] = (UINT8)147;
|
||||||
bluemap[9] = (UINT8)158;
|
bluemap[9] = (UINT8)158;
|
||||||
|
@ -1472,4 +1472,3 @@ void CON_Drawer(void)
|
||||||
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS)
|
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS)
|
||||||
CON_DrawHudlines();
|
CON_DrawHudlines();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
738
src/dehacked.c
738
src/dehacked.c
|
@ -65,6 +65,9 @@ static mobjtype_t get_mobjtype(const char *word);
|
||||||
static statenum_t get_state(const char *word);
|
static statenum_t get_state(const char *word);
|
||||||
static spritenum_t get_sprite(const char *word);
|
static spritenum_t get_sprite(const char *word);
|
||||||
static sfxenum_t get_sfx(const char *word);
|
static sfxenum_t get_sfx(const char *word);
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
static UINT16 get_mus(const char *word, UINT8 dehacked_mode);
|
||||||
|
#endif
|
||||||
static hudnum_t get_huditem(const char *word);
|
static hudnum_t get_huditem(const char *word);
|
||||||
#ifndef HAVE_BLUA
|
#ifndef HAVE_BLUA
|
||||||
static powertype_t get_power(const char *word);
|
static powertype_t get_power(const char *word);
|
||||||
|
@ -1173,22 +1176,19 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
||||||
sizeof(mapheaderinfo[num-1]->musname), va("Level header %d: music", num));
|
sizeof(mapheaderinfo[num-1]->musname), va("Level header %d: music", num));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
else if (fastcmp(word, "MUSICSLOT"))
|
else if (fastcmp(word, "MUSICSLOT"))
|
||||||
{ // Backwards compatibility?
|
{ // Backwards compatibility?
|
||||||
// Convert to map number
|
i = get_mus(word2, true);
|
||||||
if (word2[0] >= 'A' && word2[0] <= 'Z' && word2[2] == '\0')
|
if (i && i <= 1035)
|
||||||
i = M_MapNumber(word2[0], word2[1]);
|
snprintf(mapheaderinfo[num-1]->musname, 7, "%sM", G_BuildMapName(i));
|
||||||
|
else if (i && i <= 1050)
|
||||||
if (!i)
|
strncpy(mapheaderinfo[num-1]->musname, compat_special_music_slots[i - 1036], 7);
|
||||||
|
else
|
||||||
mapheaderinfo[num-1]->musname[0] = 0; // becomes empty string
|
mapheaderinfo[num-1]->musname[0] = 0; // becomes empty string
|
||||||
else if (i > 1035)
|
|
||||||
deh_warning("Level header %d: musicslot out of range (0 - 1035)\n", num);
|
|
||||||
else // it's just a number
|
|
||||||
{
|
|
||||||
snprintf(mapheaderinfo[num-1]->musname, 7, va("%sM", G_BuildMapName(i)));
|
|
||||||
mapheaderinfo[num-1]->musname[6] = 0;
|
mapheaderinfo[num-1]->musname[6] = 0;
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
else if (fastcmp(word, "MUSICTRACK"))
|
else if (fastcmp(word, "MUSICTRACK"))
|
||||||
mapheaderinfo[num-1]->mustrack = ((UINT16)i - 1);
|
mapheaderinfo[num-1]->mustrack = ((UINT16)i - 1);
|
||||||
else if (fastcmp(word, "FORCECHARACTER"))
|
else if (fastcmp(word, "FORCECHARACTER"))
|
||||||
|
@ -1463,6 +1463,20 @@ static void readcutscenescene(MYFILE *f, INT32 num, INT32 scenenum)
|
||||||
strncpy(cutscenes[num]->scene[scenenum].musswitch, word2, 7);
|
strncpy(cutscenes[num]->scene[scenenum].musswitch, word2, 7);
|
||||||
cutscenes[num]->scene[scenenum].musswitch[6] = 0;
|
cutscenes[num]->scene[scenenum].musswitch[6] = 0;
|
||||||
}
|
}
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
else if (fastcmp(word, "MUSICSLOT"))
|
||||||
|
{
|
||||||
|
DEH_WriteUndoline(word, cutscenes[num]->scene[scenenum].musswitch, UNDO_NONE);
|
||||||
|
i = get_mus(word2, true);
|
||||||
|
if (i && i <= 1035)
|
||||||
|
snprintf(cutscenes[num]->scene[scenenum].musswitch, 7, "%sM", G_BuildMapName(i));
|
||||||
|
else if (i && i <= 1050)
|
||||||
|
strncpy(cutscenes[num]->scene[scenenum].musswitch, compat_special_music_slots[i - 1036], 7);
|
||||||
|
else
|
||||||
|
cutscenes[num]->scene[scenenum].musswitch[0] = 0; // becomes empty string
|
||||||
|
cutscenes[num]->scene[scenenum].musswitch[6] = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if (fastcmp(word, "MUSICTRACK"))
|
else if (fastcmp(word, "MUSICTRACK"))
|
||||||
{
|
{
|
||||||
DEH_WriteUndoline(word, va("%u", cutscenes[num]->scene[scenenum].musswitchflags), UNDO_NONE);
|
DEH_WriteUndoline(word, va("%u", cutscenes[num]->scene[scenenum].musswitchflags), UNDO_NONE);
|
||||||
|
@ -3207,6 +3221,12 @@ static void readwipes(MYFILE *f)
|
||||||
else if (fastcmp(pword, "FINAL"))
|
else if (fastcmp(pword, "FINAL"))
|
||||||
wipeoffset = wipe_gameend_final;
|
wipeoffset = wipe_gameend_final;
|
||||||
}
|
}
|
||||||
|
else if (fastncmp(word, "SPECLEVEL_", 10))
|
||||||
|
{
|
||||||
|
pword = word + 10;
|
||||||
|
if (fastcmp(pword, "TOWHITE"))
|
||||||
|
wipeoffset = wipe_speclevel_towhite;
|
||||||
|
}
|
||||||
|
|
||||||
if (wipeoffset < 0)
|
if (wipeoffset < 0)
|
||||||
{
|
{
|
||||||
|
@ -3214,9 +3234,11 @@ static void readwipes(MYFILE *f)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == UINT8_MAX // Cannot disable non-toblack wipes (or the level toblack wipe)
|
if (value == UINT8_MAX
|
||||||
&& (wipeoffset <= wipe_level_toblack || wipeoffset >= wipe_level_final))
|
&& (wipeoffset <= wipe_level_toblack || wipeoffset >= wipe_speclevel_towhite))
|
||||||
{
|
{
|
||||||
|
// Cannot disable non-toblack wipes
|
||||||
|
// (or the level toblack wipe, or the special towhite wipe)
|
||||||
deh_warning("Wipes: can't disable wipe of type '%s'", word);
|
deh_warning("Wipes: can't disable wipe of type '%s'", word);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -4606,30 +4628,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_MSSHIELD_F12",
|
"S_MSSHIELD_F12",
|
||||||
|
|
||||||
// Ring
|
// Ring
|
||||||
"S_RING1",
|
"S_RING",
|
||||||
"S_RING2",
|
|
||||||
"S_RING3",
|
|
||||||
"S_RING4",
|
|
||||||
"S_RING5",
|
|
||||||
"S_RING6",
|
|
||||||
"S_RING7",
|
|
||||||
"S_RING8",
|
|
||||||
"S_RING9",
|
|
||||||
"S_RING10",
|
|
||||||
"S_RING11",
|
|
||||||
"S_RING12",
|
|
||||||
"S_RING13",
|
|
||||||
"S_RING14",
|
|
||||||
"S_RING15",
|
|
||||||
"S_RING16",
|
|
||||||
"S_RING17",
|
|
||||||
"S_RING18",
|
|
||||||
"S_RING19",
|
|
||||||
"S_RING20",
|
|
||||||
"S_RING21",
|
|
||||||
"S_RING22",
|
|
||||||
"S_RING23",
|
|
||||||
"S_RING24",
|
|
||||||
|
|
||||||
// Blue Sphere for special stages
|
// Blue Sphere for special stages
|
||||||
"S_BLUEBALL",
|
"S_BLUEBALL",
|
||||||
|
@ -4645,39 +4644,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_GRAVWELLRED3",
|
"S_GRAVWELLRED3",
|
||||||
|
|
||||||
// Individual Team Rings
|
// Individual Team Rings
|
||||||
"S_TEAMRING1",
|
"S_TEAMRING",
|
||||||
"S_TEAMRING2",
|
|
||||||
"S_TEAMRING3",
|
|
||||||
"S_TEAMRING4",
|
|
||||||
"S_TEAMRING5",
|
|
||||||
"S_TEAMRING6",
|
|
||||||
"S_TEAMRING7",
|
|
||||||
"S_TEAMRING8",
|
|
||||||
"S_TEAMRING9",
|
|
||||||
"S_TEAMRING10",
|
|
||||||
"S_TEAMRING11",
|
|
||||||
"S_TEAMRING12",
|
|
||||||
"S_TEAMRING13",
|
|
||||||
"S_TEAMRING14",
|
|
||||||
"S_TEAMRING15",
|
|
||||||
"S_TEAMRING16",
|
|
||||||
"S_TEAMRING17",
|
|
||||||
"S_TEAMRING18",
|
|
||||||
"S_TEAMRING19",
|
|
||||||
"S_TEAMRING20",
|
|
||||||
"S_TEAMRING21",
|
|
||||||
"S_TEAMRING22",
|
|
||||||
"S_TEAMRING23",
|
|
||||||
"S_TEAMRING24",
|
|
||||||
|
|
||||||
// Special Stage Token
|
// Special Stage Token
|
||||||
"S_EMMY1",
|
"S_EMMY",
|
||||||
"S_EMMY2",
|
|
||||||
"S_EMMY3",
|
|
||||||
"S_EMMY4",
|
|
||||||
"S_EMMY5",
|
|
||||||
"S_EMMY6",
|
|
||||||
"S_EMMY7",
|
|
||||||
|
|
||||||
// Special Stage Token
|
// Special Stage Token
|
||||||
"S_TOKEN",
|
"S_TOKEN",
|
||||||
|
@ -4831,40 +4801,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_SPIKED2",
|
"S_SPIKED2",
|
||||||
|
|
||||||
// Starpost
|
// Starpost
|
||||||
"S_STARPOST1",
|
"S_STARPOST_IDLE",
|
||||||
"S_STARPOST2",
|
"S_STARPOST_FLASH",
|
||||||
"S_STARPOST3",
|
"S_STARPOST_SPIN",
|
||||||
"S_STARPOST4",
|
|
||||||
"S_STARPOST5",
|
|
||||||
"S_STARPOST6",
|
|
||||||
"S_STARPOST7",
|
|
||||||
"S_STARPOST8",
|
|
||||||
"S_STARPOST9",
|
|
||||||
"S_STARPOST10",
|
|
||||||
"S_STARPOST11",
|
|
||||||
"S_STARPOST12",
|
|
||||||
"S_STARPOST13",
|
|
||||||
"S_STARPOST14",
|
|
||||||
"S_STARPOST15",
|
|
||||||
"S_STARPOST16",
|
|
||||||
"S_STARPOST17",
|
|
||||||
"S_STARPOST18",
|
|
||||||
"S_STARPOST19",
|
|
||||||
"S_STARPOST20",
|
|
||||||
"S_STARPOST21",
|
|
||||||
"S_STARPOST22",
|
|
||||||
"S_STARPOST23",
|
|
||||||
"S_STARPOST24",
|
|
||||||
"S_STARPOST25",
|
|
||||||
"S_STARPOST26",
|
|
||||||
"S_STARPOST27",
|
|
||||||
"S_STARPOST28",
|
|
||||||
"S_STARPOST29",
|
|
||||||
"S_STARPOST30",
|
|
||||||
"S_STARPOST31",
|
|
||||||
"S_STARPOST32",
|
|
||||||
"S_STARPOST33",
|
|
||||||
"S_STARPOST34",
|
|
||||||
|
|
||||||
// Big floating mine
|
// Big floating mine
|
||||||
"S_BIGMINE1",
|
"S_BIGMINE1",
|
||||||
|
@ -5472,38 +5411,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_PITY10",
|
"S_PITY10",
|
||||||
|
|
||||||
// Invincibility Sparkles
|
// Invincibility Sparkles
|
||||||
"S_IVSP1",
|
"S_IVSP",
|
||||||
"S_IVSP2",
|
|
||||||
"S_IVSP3",
|
|
||||||
"S_IVSP4",
|
|
||||||
"S_IVSP5",
|
|
||||||
"S_IVSP6",
|
|
||||||
"S_IVSP7",
|
|
||||||
"S_IVSP8",
|
|
||||||
"S_IVSP9",
|
|
||||||
"S_IVSP10",
|
|
||||||
"S_IVSP11",
|
|
||||||
"S_IVSP12",
|
|
||||||
"S_IVSP13",
|
|
||||||
"S_IVSP14",
|
|
||||||
"S_IVSP15",
|
|
||||||
"S_IVSP16",
|
|
||||||
"S_IVSP17",
|
|
||||||
"S_IVSP18",
|
|
||||||
"S_IVSP19",
|
|
||||||
"S_IVSP20",
|
|
||||||
"S_IVSP21",
|
|
||||||
"S_IVSP22",
|
|
||||||
"S_IVSP23",
|
|
||||||
"S_IVSP24",
|
|
||||||
"S_IVSP25",
|
|
||||||
"S_IVSP26",
|
|
||||||
"S_IVSP27",
|
|
||||||
"S_IVSP28",
|
|
||||||
"S_IVSP29",
|
|
||||||
"S_IVSP30",
|
|
||||||
"S_IVSP31",
|
|
||||||
"S_IVSP32",
|
|
||||||
|
|
||||||
// Super Sonic Spark
|
// Super Sonic Spark
|
||||||
"S_SSPK1",
|
"S_SSPK1",
|
||||||
|
@ -5690,283 +5598,17 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_RRNG6",
|
"S_RRNG6",
|
||||||
"S_RRNG7",
|
"S_RRNG7",
|
||||||
|
|
||||||
// Bounce Ring
|
// Weapon Ring Ammo
|
||||||
"S_BOUNCERING1",
|
"S_BOUNCERINGAMMO",
|
||||||
"S_BOUNCERING2",
|
"S_RAILRINGAMMO",
|
||||||
"S_BOUNCERING3",
|
"S_INFINITYRINGAMMO",
|
||||||
"S_BOUNCERING4",
|
"S_AUTOMATICRINGAMMO",
|
||||||
"S_BOUNCERING5",
|
"S_EXPLOSIONRINGAMMO",
|
||||||
"S_BOUNCERING6",
|
"S_SCATTERRINGAMMO",
|
||||||
"S_BOUNCERING7",
|
"S_GRENADERINGAMMO",
|
||||||
"S_BOUNCERING8",
|
|
||||||
"S_BOUNCERING9",
|
|
||||||
"S_BOUNCERING10",
|
|
||||||
"S_BOUNCERING11",
|
|
||||||
"S_BOUNCERING12",
|
|
||||||
"S_BOUNCERING13",
|
|
||||||
"S_BOUNCERING14",
|
|
||||||
"S_BOUNCERING15",
|
|
||||||
"S_BOUNCERING16",
|
|
||||||
"S_BOUNCERING17",
|
|
||||||
"S_BOUNCERING18",
|
|
||||||
"S_BOUNCERING19",
|
|
||||||
"S_BOUNCERING20",
|
|
||||||
"S_BOUNCERING21",
|
|
||||||
"S_BOUNCERING22",
|
|
||||||
"S_BOUNCERING23",
|
|
||||||
"S_BOUNCERING24",
|
|
||||||
"S_BOUNCERING25",
|
|
||||||
"S_BOUNCERING26",
|
|
||||||
"S_BOUNCERING27",
|
|
||||||
"S_BOUNCERING28",
|
|
||||||
"S_BOUNCERING29",
|
|
||||||
"S_BOUNCERING30",
|
|
||||||
"S_BOUNCERING31",
|
|
||||||
"S_BOUNCERING32",
|
|
||||||
"S_BOUNCERING33",
|
|
||||||
"S_BOUNCERING34",
|
|
||||||
"S_BOUNCERING35",
|
|
||||||
|
|
||||||
// Rail Ring
|
|
||||||
"S_RAILRING1",
|
|
||||||
"S_RAILRING2",
|
|
||||||
"S_RAILRING3",
|
|
||||||
"S_RAILRING4",
|
|
||||||
"S_RAILRING5",
|
|
||||||
"S_RAILRING6",
|
|
||||||
"S_RAILRING7",
|
|
||||||
"S_RAILRING8",
|
|
||||||
"S_RAILRING9",
|
|
||||||
"S_RAILRING10",
|
|
||||||
"S_RAILRING11",
|
|
||||||
"S_RAILRING12",
|
|
||||||
"S_RAILRING13",
|
|
||||||
"S_RAILRING14",
|
|
||||||
"S_RAILRING15",
|
|
||||||
"S_RAILRING16",
|
|
||||||
"S_RAILRING17",
|
|
||||||
"S_RAILRING18",
|
|
||||||
"S_RAILRING19",
|
|
||||||
"S_RAILRING20",
|
|
||||||
"S_RAILRING21",
|
|
||||||
"S_RAILRING22",
|
|
||||||
"S_RAILRING23",
|
|
||||||
"S_RAILRING24",
|
|
||||||
"S_RAILRING25",
|
|
||||||
"S_RAILRING26",
|
|
||||||
"S_RAILRING27",
|
|
||||||
"S_RAILRING28",
|
|
||||||
"S_RAILRING29",
|
|
||||||
"S_RAILRING30",
|
|
||||||
"S_RAILRING31",
|
|
||||||
"S_RAILRING32",
|
|
||||||
"S_RAILRING33",
|
|
||||||
"S_RAILRING34",
|
|
||||||
"S_RAILRING35",
|
|
||||||
|
|
||||||
// Infinity ring
|
|
||||||
"S_INFINITYRING1",
|
|
||||||
"S_INFINITYRING2",
|
|
||||||
"S_INFINITYRING3",
|
|
||||||
"S_INFINITYRING4",
|
|
||||||
"S_INFINITYRING5",
|
|
||||||
"S_INFINITYRING6",
|
|
||||||
"S_INFINITYRING7",
|
|
||||||
"S_INFINITYRING8",
|
|
||||||
"S_INFINITYRING9",
|
|
||||||
"S_INFINITYRING10",
|
|
||||||
"S_INFINITYRING11",
|
|
||||||
"S_INFINITYRING12",
|
|
||||||
"S_INFINITYRING13",
|
|
||||||
"S_INFINITYRING14",
|
|
||||||
"S_INFINITYRING15",
|
|
||||||
"S_INFINITYRING16",
|
|
||||||
"S_INFINITYRING17",
|
|
||||||
"S_INFINITYRING18",
|
|
||||||
"S_INFINITYRING19",
|
|
||||||
"S_INFINITYRING20",
|
|
||||||
"S_INFINITYRING21",
|
|
||||||
"S_INFINITYRING22",
|
|
||||||
"S_INFINITYRING23",
|
|
||||||
"S_INFINITYRING24",
|
|
||||||
"S_INFINITYRING25",
|
|
||||||
"S_INFINITYRING26",
|
|
||||||
"S_INFINITYRING27",
|
|
||||||
"S_INFINITYRING28",
|
|
||||||
"S_INFINITYRING29",
|
|
||||||
"S_INFINITYRING30",
|
|
||||||
"S_INFINITYRING31",
|
|
||||||
"S_INFINITYRING32",
|
|
||||||
"S_INFINITYRING33",
|
|
||||||
"S_INFINITYRING34",
|
|
||||||
"S_INFINITYRING35",
|
|
||||||
|
|
||||||
// Automatic Ring
|
|
||||||
"S_AUTOMATICRING1",
|
|
||||||
"S_AUTOMATICRING2",
|
|
||||||
"S_AUTOMATICRING3",
|
|
||||||
"S_AUTOMATICRING4",
|
|
||||||
"S_AUTOMATICRING5",
|
|
||||||
"S_AUTOMATICRING6",
|
|
||||||
"S_AUTOMATICRING7",
|
|
||||||
"S_AUTOMATICRING8",
|
|
||||||
"S_AUTOMATICRING9",
|
|
||||||
"S_AUTOMATICRING10",
|
|
||||||
"S_AUTOMATICRING11",
|
|
||||||
"S_AUTOMATICRING12",
|
|
||||||
"S_AUTOMATICRING13",
|
|
||||||
"S_AUTOMATICRING14",
|
|
||||||
"S_AUTOMATICRING15",
|
|
||||||
"S_AUTOMATICRING16",
|
|
||||||
"S_AUTOMATICRING17",
|
|
||||||
"S_AUTOMATICRING18",
|
|
||||||
"S_AUTOMATICRING19",
|
|
||||||
"S_AUTOMATICRING20",
|
|
||||||
"S_AUTOMATICRING21",
|
|
||||||
"S_AUTOMATICRING22",
|
|
||||||
"S_AUTOMATICRING23",
|
|
||||||
"S_AUTOMATICRING24",
|
|
||||||
"S_AUTOMATICRING25",
|
|
||||||
"S_AUTOMATICRING26",
|
|
||||||
"S_AUTOMATICRING27",
|
|
||||||
"S_AUTOMATICRING28",
|
|
||||||
"S_AUTOMATICRING29",
|
|
||||||
"S_AUTOMATICRING30",
|
|
||||||
"S_AUTOMATICRING31",
|
|
||||||
"S_AUTOMATICRING32",
|
|
||||||
"S_AUTOMATICRING33",
|
|
||||||
"S_AUTOMATICRING34",
|
|
||||||
"S_AUTOMATICRING35",
|
|
||||||
|
|
||||||
// Explosion Ring
|
|
||||||
"S_EXPLOSIONRING1",
|
|
||||||
"S_EXPLOSIONRING2",
|
|
||||||
"S_EXPLOSIONRING3",
|
|
||||||
"S_EXPLOSIONRING4",
|
|
||||||
"S_EXPLOSIONRING5",
|
|
||||||
"S_EXPLOSIONRING6",
|
|
||||||
"S_EXPLOSIONRING7",
|
|
||||||
"S_EXPLOSIONRING8",
|
|
||||||
"S_EXPLOSIONRING9",
|
|
||||||
"S_EXPLOSIONRING10",
|
|
||||||
"S_EXPLOSIONRING11",
|
|
||||||
"S_EXPLOSIONRING12",
|
|
||||||
"S_EXPLOSIONRING13",
|
|
||||||
"S_EXPLOSIONRING14",
|
|
||||||
"S_EXPLOSIONRING15",
|
|
||||||
"S_EXPLOSIONRING16",
|
|
||||||
"S_EXPLOSIONRING17",
|
|
||||||
"S_EXPLOSIONRING18",
|
|
||||||
"S_EXPLOSIONRING19",
|
|
||||||
"S_EXPLOSIONRING20",
|
|
||||||
"S_EXPLOSIONRING21",
|
|
||||||
"S_EXPLOSIONRING22",
|
|
||||||
"S_EXPLOSIONRING23",
|
|
||||||
"S_EXPLOSIONRING24",
|
|
||||||
"S_EXPLOSIONRING25",
|
|
||||||
"S_EXPLOSIONRING26",
|
|
||||||
"S_EXPLOSIONRING27",
|
|
||||||
"S_EXPLOSIONRING28",
|
|
||||||
"S_EXPLOSIONRING29",
|
|
||||||
"S_EXPLOSIONRING30",
|
|
||||||
"S_EXPLOSIONRING31",
|
|
||||||
"S_EXPLOSIONRING32",
|
|
||||||
"S_EXPLOSIONRING33",
|
|
||||||
"S_EXPLOSIONRING34",
|
|
||||||
"S_EXPLOSIONRING35",
|
|
||||||
|
|
||||||
// Scatter Ring
|
|
||||||
"S_SCATTERRING1",
|
|
||||||
"S_SCATTERRING2",
|
|
||||||
"S_SCATTERRING3",
|
|
||||||
"S_SCATTERRING4",
|
|
||||||
"S_SCATTERRING5",
|
|
||||||
"S_SCATTERRING6",
|
|
||||||
"S_SCATTERRING7",
|
|
||||||
"S_SCATTERRING8",
|
|
||||||
"S_SCATTERRING9",
|
|
||||||
"S_SCATTERRING10",
|
|
||||||
"S_SCATTERRING11",
|
|
||||||
"S_SCATTERRING12",
|
|
||||||
"S_SCATTERRING13",
|
|
||||||
"S_SCATTERRING14",
|
|
||||||
"S_SCATTERRING15",
|
|
||||||
"S_SCATTERRING16",
|
|
||||||
"S_SCATTERRING17",
|
|
||||||
"S_SCATTERRING18",
|
|
||||||
"S_SCATTERRING19",
|
|
||||||
"S_SCATTERRING20",
|
|
||||||
"S_SCATTERRING21",
|
|
||||||
"S_SCATTERRING22",
|
|
||||||
"S_SCATTERRING23",
|
|
||||||
"S_SCATTERRING24",
|
|
||||||
"S_SCATTERRING25",
|
|
||||||
"S_SCATTERRING26",
|
|
||||||
"S_SCATTERRING27",
|
|
||||||
"S_SCATTERRING28",
|
|
||||||
"S_SCATTERRING29",
|
|
||||||
"S_SCATTERRING30",
|
|
||||||
"S_SCATTERRING31",
|
|
||||||
"S_SCATTERRING32",
|
|
||||||
"S_SCATTERRING33",
|
|
||||||
"S_SCATTERRING34",
|
|
||||||
"S_SCATTERRING35",
|
|
||||||
|
|
||||||
// Grenade Ring
|
|
||||||
"S_GRENADERING1",
|
|
||||||
"S_GRENADERING2",
|
|
||||||
"S_GRENADERING3",
|
|
||||||
"S_GRENADERING4",
|
|
||||||
"S_GRENADERING5",
|
|
||||||
"S_GRENADERING6",
|
|
||||||
"S_GRENADERING7",
|
|
||||||
"S_GRENADERING8",
|
|
||||||
"S_GRENADERING9",
|
|
||||||
"S_GRENADERING10",
|
|
||||||
"S_GRENADERING11",
|
|
||||||
"S_GRENADERING12",
|
|
||||||
"S_GRENADERING13",
|
|
||||||
"S_GRENADERING14",
|
|
||||||
"S_GRENADERING15",
|
|
||||||
"S_GRENADERING16",
|
|
||||||
"S_GRENADERING17",
|
|
||||||
"S_GRENADERING18",
|
|
||||||
"S_GRENADERING19",
|
|
||||||
"S_GRENADERING20",
|
|
||||||
"S_GRENADERING21",
|
|
||||||
"S_GRENADERING22",
|
|
||||||
"S_GRENADERING23",
|
|
||||||
"S_GRENADERING24",
|
|
||||||
"S_GRENADERING25",
|
|
||||||
"S_GRENADERING26",
|
|
||||||
"S_GRENADERING27",
|
|
||||||
"S_GRENADERING28",
|
|
||||||
"S_GRENADERING29",
|
|
||||||
"S_GRENADERING30",
|
|
||||||
"S_GRENADERING31",
|
|
||||||
"S_GRENADERING32",
|
|
||||||
"S_GRENADERING33",
|
|
||||||
"S_GRENADERING34",
|
|
||||||
"S_GRENADERING35",
|
|
||||||
|
|
||||||
// Weapon pickup
|
// Weapon pickup
|
||||||
"S_BOUNCEPICKUP1",
|
"S_BOUNCEPICKUP",
|
||||||
"S_BOUNCEPICKUP2",
|
|
||||||
"S_BOUNCEPICKUP3",
|
|
||||||
"S_BOUNCEPICKUP4",
|
|
||||||
"S_BOUNCEPICKUP5",
|
|
||||||
"S_BOUNCEPICKUP6",
|
|
||||||
"S_BOUNCEPICKUP7",
|
|
||||||
"S_BOUNCEPICKUP8",
|
|
||||||
"S_BOUNCEPICKUP9",
|
|
||||||
"S_BOUNCEPICKUP10",
|
|
||||||
"S_BOUNCEPICKUP11",
|
|
||||||
"S_BOUNCEPICKUP12",
|
|
||||||
"S_BOUNCEPICKUP13",
|
|
||||||
"S_BOUNCEPICKUP14",
|
|
||||||
"S_BOUNCEPICKUP15",
|
|
||||||
"S_BOUNCEPICKUP16",
|
|
||||||
|
|
||||||
"S_BOUNCEPICKUPFADE1",
|
"S_BOUNCEPICKUPFADE1",
|
||||||
"S_BOUNCEPICKUPFADE2",
|
"S_BOUNCEPICKUPFADE2",
|
||||||
"S_BOUNCEPICKUPFADE3",
|
"S_BOUNCEPICKUPFADE3",
|
||||||
|
@ -5976,23 +5618,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_BOUNCEPICKUPFADE7",
|
"S_BOUNCEPICKUPFADE7",
|
||||||
"S_BOUNCEPICKUPFADE8",
|
"S_BOUNCEPICKUPFADE8",
|
||||||
|
|
||||||
"S_RAILPICKUP1",
|
"S_RAILPICKUP",
|
||||||
"S_RAILPICKUP2",
|
|
||||||
"S_RAILPICKUP3",
|
|
||||||
"S_RAILPICKUP4",
|
|
||||||
"S_RAILPICKUP5",
|
|
||||||
"S_RAILPICKUP6",
|
|
||||||
"S_RAILPICKUP7",
|
|
||||||
"S_RAILPICKUP8",
|
|
||||||
"S_RAILPICKUP9",
|
|
||||||
"S_RAILPICKUP10",
|
|
||||||
"S_RAILPICKUP11",
|
|
||||||
"S_RAILPICKUP12",
|
|
||||||
"S_RAILPICKUP13",
|
|
||||||
"S_RAILPICKUP14",
|
|
||||||
"S_RAILPICKUP15",
|
|
||||||
"S_RAILPICKUP16",
|
|
||||||
|
|
||||||
"S_RAILPICKUPFADE1",
|
"S_RAILPICKUPFADE1",
|
||||||
"S_RAILPICKUPFADE2",
|
"S_RAILPICKUPFADE2",
|
||||||
"S_RAILPICKUPFADE3",
|
"S_RAILPICKUPFADE3",
|
||||||
|
@ -6002,23 +5628,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_RAILPICKUPFADE7",
|
"S_RAILPICKUPFADE7",
|
||||||
"S_RAILPICKUPFADE8",
|
"S_RAILPICKUPFADE8",
|
||||||
|
|
||||||
"S_AUTOPICKUP1",
|
"S_AUTOPICKUP",
|
||||||
"S_AUTOPICKUP2",
|
|
||||||
"S_AUTOPICKUP3",
|
|
||||||
"S_AUTOPICKUP4",
|
|
||||||
"S_AUTOPICKUP5",
|
|
||||||
"S_AUTOPICKUP6",
|
|
||||||
"S_AUTOPICKUP7",
|
|
||||||
"S_AUTOPICKUP8",
|
|
||||||
"S_AUTOPICKUP9",
|
|
||||||
"S_AUTOPICKUP10",
|
|
||||||
"S_AUTOPICKUP11",
|
|
||||||
"S_AUTOPICKUP12",
|
|
||||||
"S_AUTOPICKUP13",
|
|
||||||
"S_AUTOPICKUP14",
|
|
||||||
"S_AUTOPICKUP15",
|
|
||||||
"S_AUTOPICKUP16",
|
|
||||||
|
|
||||||
"S_AUTOPICKUPFADE1",
|
"S_AUTOPICKUPFADE1",
|
||||||
"S_AUTOPICKUPFADE2",
|
"S_AUTOPICKUPFADE2",
|
||||||
"S_AUTOPICKUPFADE3",
|
"S_AUTOPICKUPFADE3",
|
||||||
|
@ -6028,23 +5638,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_AUTOPICKUPFADE7",
|
"S_AUTOPICKUPFADE7",
|
||||||
"S_AUTOPICKUPFADE8",
|
"S_AUTOPICKUPFADE8",
|
||||||
|
|
||||||
"S_EXPLODEPICKUP1",
|
"S_EXPLODEPICKUP",
|
||||||
"S_EXPLODEPICKUP2",
|
|
||||||
"S_EXPLODEPICKUP3",
|
|
||||||
"S_EXPLODEPICKUP4",
|
|
||||||
"S_EXPLODEPICKUP5",
|
|
||||||
"S_EXPLODEPICKUP6",
|
|
||||||
"S_EXPLODEPICKUP7",
|
|
||||||
"S_EXPLODEPICKUP8",
|
|
||||||
"S_EXPLODEPICKUP9",
|
|
||||||
"S_EXPLODEPICKUP10",
|
|
||||||
"S_EXPLODEPICKUP11",
|
|
||||||
"S_EXPLODEPICKUP12",
|
|
||||||
"S_EXPLODEPICKUP13",
|
|
||||||
"S_EXPLODEPICKUP14",
|
|
||||||
"S_EXPLODEPICKUP15",
|
|
||||||
"S_EXPLODEPICKUP16",
|
|
||||||
|
|
||||||
"S_EXPLODEPICKUPFADE1",
|
"S_EXPLODEPICKUPFADE1",
|
||||||
"S_EXPLODEPICKUPFADE2",
|
"S_EXPLODEPICKUPFADE2",
|
||||||
"S_EXPLODEPICKUPFADE3",
|
"S_EXPLODEPICKUPFADE3",
|
||||||
|
@ -6054,23 +5648,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_EXPLODEPICKUPFADE7",
|
"S_EXPLODEPICKUPFADE7",
|
||||||
"S_EXPLODEPICKUPFADE8",
|
"S_EXPLODEPICKUPFADE8",
|
||||||
|
|
||||||
"S_SCATTERPICKUP1",
|
"S_SCATTERPICKUP",
|
||||||
"S_SCATTERPICKUP2",
|
|
||||||
"S_SCATTERPICKUP3",
|
|
||||||
"S_SCATTERPICKUP4",
|
|
||||||
"S_SCATTERPICKUP5",
|
|
||||||
"S_SCATTERPICKUP6",
|
|
||||||
"S_SCATTERPICKUP7",
|
|
||||||
"S_SCATTERPICKUP8",
|
|
||||||
"S_SCATTERPICKUP9",
|
|
||||||
"S_SCATTERPICKUP10",
|
|
||||||
"S_SCATTERPICKUP11",
|
|
||||||
"S_SCATTERPICKUP12",
|
|
||||||
"S_SCATTERPICKUP13",
|
|
||||||
"S_SCATTERPICKUP14",
|
|
||||||
"S_SCATTERPICKUP15",
|
|
||||||
"S_SCATTERPICKUP16",
|
|
||||||
|
|
||||||
"S_SCATTERPICKUPFADE1",
|
"S_SCATTERPICKUPFADE1",
|
||||||
"S_SCATTERPICKUPFADE2",
|
"S_SCATTERPICKUPFADE2",
|
||||||
"S_SCATTERPICKUPFADE3",
|
"S_SCATTERPICKUPFADE3",
|
||||||
|
@ -6080,23 +5658,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_SCATTERPICKUPFADE7",
|
"S_SCATTERPICKUPFADE7",
|
||||||
"S_SCATTERPICKUPFADE8",
|
"S_SCATTERPICKUPFADE8",
|
||||||
|
|
||||||
"S_GRENADEPICKUP1",
|
"S_GRENADEPICKUP",
|
||||||
"S_GRENADEPICKUP2",
|
|
||||||
"S_GRENADEPICKUP3",
|
|
||||||
"S_GRENADEPICKUP4",
|
|
||||||
"S_GRENADEPICKUP5",
|
|
||||||
"S_GRENADEPICKUP6",
|
|
||||||
"S_GRENADEPICKUP7",
|
|
||||||
"S_GRENADEPICKUP8",
|
|
||||||
"S_GRENADEPICKUP9",
|
|
||||||
"S_GRENADEPICKUP10",
|
|
||||||
"S_GRENADEPICKUP11",
|
|
||||||
"S_GRENADEPICKUP12",
|
|
||||||
"S_GRENADEPICKUP13",
|
|
||||||
"S_GRENADEPICKUP14",
|
|
||||||
"S_GRENADEPICKUP15",
|
|
||||||
"S_GRENADEPICKUP16",
|
|
||||||
|
|
||||||
"S_GRENADEPICKUPFADE1",
|
"S_GRENADEPICKUPFADE1",
|
||||||
"S_GRENADEPICKUPFADE2",
|
"S_GRENADEPICKUPFADE2",
|
||||||
"S_GRENADEPICKUPFADE3",
|
"S_GRENADEPICKUPFADE3",
|
||||||
|
@ -6477,101 +6039,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
|
|
||||||
"S_ROCKSPAWN",
|
"S_ROCKSPAWN",
|
||||||
|
|
||||||
"S_ROCKCRUMBLEA1",
|
"S_ROCKCRUMBLEA",
|
||||||
"S_ROCKCRUMBLEA2",
|
"S_ROCKCRUMBLEB",
|
||||||
"S_ROCKCRUMBLEA3",
|
"S_ROCKCRUMBLEC",
|
||||||
"S_ROCKCRUMBLEA4",
|
"S_ROCKCRUMBLED",
|
||||||
"S_ROCKCRUMBLEA5",
|
"S_ROCKCRUMBLEE",
|
||||||
|
"S_ROCKCRUMBLEF",
|
||||||
"S_ROCKCRUMBLEB1",
|
"S_ROCKCRUMBLEG",
|
||||||
"S_ROCKCRUMBLEB2",
|
"S_ROCKCRUMBLEH",
|
||||||
"S_ROCKCRUMBLEB3",
|
"S_ROCKCRUMBLEI",
|
||||||
"S_ROCKCRUMBLEB4",
|
"S_ROCKCRUMBLEJ",
|
||||||
"S_ROCKCRUMBLEB5",
|
"S_ROCKCRUMBLEK",
|
||||||
|
"S_ROCKCRUMBLEL",
|
||||||
"S_ROCKCRUMBLEC1",
|
"S_ROCKCRUMBLEM",
|
||||||
"S_ROCKCRUMBLEC2",
|
"S_ROCKCRUMBLEN",
|
||||||
"S_ROCKCRUMBLEC3",
|
"S_ROCKCRUMBLEO",
|
||||||
"S_ROCKCRUMBLEC4",
|
"S_ROCKCRUMBLEP",
|
||||||
"S_ROCKCRUMBLEC5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLED1",
|
|
||||||
"S_ROCKCRUMBLED2",
|
|
||||||
"S_ROCKCRUMBLED3",
|
|
||||||
"S_ROCKCRUMBLED4",
|
|
||||||
"S_ROCKCRUMBLED5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEE1",
|
|
||||||
"S_ROCKCRUMBLEE2",
|
|
||||||
"S_ROCKCRUMBLEE3",
|
|
||||||
"S_ROCKCRUMBLEE4",
|
|
||||||
"S_ROCKCRUMBLEE5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEF1",
|
|
||||||
"S_ROCKCRUMBLEF2",
|
|
||||||
"S_ROCKCRUMBLEF3",
|
|
||||||
"S_ROCKCRUMBLEF4",
|
|
||||||
"S_ROCKCRUMBLEF5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEG1",
|
|
||||||
"S_ROCKCRUMBLEG2",
|
|
||||||
"S_ROCKCRUMBLEG3",
|
|
||||||
"S_ROCKCRUMBLEG4",
|
|
||||||
"S_ROCKCRUMBLEG5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEH1",
|
|
||||||
"S_ROCKCRUMBLEH2",
|
|
||||||
"S_ROCKCRUMBLEH3",
|
|
||||||
"S_ROCKCRUMBLEH4",
|
|
||||||
"S_ROCKCRUMBLEH5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEI1",
|
|
||||||
"S_ROCKCRUMBLEI2",
|
|
||||||
"S_ROCKCRUMBLEI3",
|
|
||||||
"S_ROCKCRUMBLEI4",
|
|
||||||
"S_ROCKCRUMBLEI5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEJ1",
|
|
||||||
"S_ROCKCRUMBLEJ2",
|
|
||||||
"S_ROCKCRUMBLEJ3",
|
|
||||||
"S_ROCKCRUMBLEJ4",
|
|
||||||
"S_ROCKCRUMBLEJ5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEK1",
|
|
||||||
"S_ROCKCRUMBLEK2",
|
|
||||||
"S_ROCKCRUMBLEK3",
|
|
||||||
"S_ROCKCRUMBLEK4",
|
|
||||||
"S_ROCKCRUMBLEK5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEL1",
|
|
||||||
"S_ROCKCRUMBLEL2",
|
|
||||||
"S_ROCKCRUMBLEL3",
|
|
||||||
"S_ROCKCRUMBLEL4",
|
|
||||||
"S_ROCKCRUMBLEL5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEM1",
|
|
||||||
"S_ROCKCRUMBLEM2",
|
|
||||||
"S_ROCKCRUMBLEM3",
|
|
||||||
"S_ROCKCRUMBLEM4",
|
|
||||||
"S_ROCKCRUMBLEM5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEN1",
|
|
||||||
"S_ROCKCRUMBLEN2",
|
|
||||||
"S_ROCKCRUMBLEN3",
|
|
||||||
"S_ROCKCRUMBLEN4",
|
|
||||||
"S_ROCKCRUMBLEN5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEO1",
|
|
||||||
"S_ROCKCRUMBLEO2",
|
|
||||||
"S_ROCKCRUMBLEO3",
|
|
||||||
"S_ROCKCRUMBLEO4",
|
|
||||||
"S_ROCKCRUMBLEO5",
|
|
||||||
|
|
||||||
"S_ROCKCRUMBLEP1",
|
|
||||||
"S_ROCKCRUMBLEP2",
|
|
||||||
"S_ROCKCRUMBLEP3",
|
|
||||||
"S_ROCKCRUMBLEP4",
|
|
||||||
"S_ROCKCRUMBLEP5",
|
|
||||||
|
|
||||||
"S_SRB1_CRAWLA1",
|
"S_SRB1_CRAWLA1",
|
||||||
"S_SRB1_CRAWLA2",
|
"S_SRB1_CRAWLA2",
|
||||||
|
@ -7494,6 +6977,8 @@ struct {
|
||||||
{"PUSHACCEL",PUSHACCEL},
|
{"PUSHACCEL",PUSHACCEL},
|
||||||
{"MODID",MODID}, // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into.
|
{"MODID",MODID}, // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into.
|
||||||
{"CODEBASE",CODEBASE}, // or what release of SRB2 this is.
|
{"CODEBASE",CODEBASE}, // or what release of SRB2 this is.
|
||||||
|
{"VERSION",VERSION}, // Grab the game's version!
|
||||||
|
{"SUBVERSION",SUBVERSION}, // more precise version number
|
||||||
|
|
||||||
// Special linedef executor tag numbers!
|
// Special linedef executor tag numbers!
|
||||||
{"LE_PINCHPHASE",LE_PINCHPHASE}, // A boss entered pinch phase (and, in most cases, is preparing their pinch phase attack!)
|
{"LE_PINCHPHASE",LE_PINCHPHASE}, // A boss entered pinch phase (and, in most cases, is preparing their pinch phase attack!)
|
||||||
|
@ -7506,6 +6991,7 @@ struct {
|
||||||
|
|
||||||
// Frame settings
|
// Frame settings
|
||||||
{"FF_FRAMEMASK",FF_FRAMEMASK},
|
{"FF_FRAMEMASK",FF_FRAMEMASK},
|
||||||
|
{"FF_ANIMATE",FF_ANIMATE},
|
||||||
{"FF_FULLBRIGHT",FF_FULLBRIGHT},
|
{"FF_FULLBRIGHT",FF_FULLBRIGHT},
|
||||||
{"FF_TRANSMASK",FF_TRANSMASK},
|
{"FF_TRANSMASK",FF_TRANSMASK},
|
||||||
{"FF_TRANSSHIFT",FF_TRANSSHIFT},
|
{"FF_TRANSSHIFT",FF_TRANSSHIFT},
|
||||||
|
@ -7984,6 +7470,46 @@ static sfxenum_t get_sfx(const char *word)
|
||||||
return sfx_None;
|
return sfx_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
static UINT16 get_mus(const char *word, UINT8 dehacked_mode)
|
||||||
|
{ // Returns the value of MUS_ enumerations
|
||||||
|
UINT16 i;
|
||||||
|
char lumptmp[4];
|
||||||
|
|
||||||
|
if (*word >= '0' && *word <= '9')
|
||||||
|
return atoi(word);
|
||||||
|
if (!word[2] && toupper(word[0]) >= 'A' && toupper(word[0]) <= 'Z')
|
||||||
|
return (UINT16)M_MapNumber(word[0], word[1]);
|
||||||
|
|
||||||
|
if (fastncmp("MUS_",word,4))
|
||||||
|
word += 4; // take off the MUS_
|
||||||
|
else if (fastncmp("O_",word,2) || fastncmp("D_",word,2))
|
||||||
|
word += 2; // take off the O_ or D_
|
||||||
|
|
||||||
|
strncpy(lumptmp, word, 4);
|
||||||
|
lumptmp[3] = 0;
|
||||||
|
if (fasticmp("MAP",lumptmp))
|
||||||
|
{
|
||||||
|
word += 3;
|
||||||
|
if (toupper(word[0]) >= 'A' && toupper(word[0]) <= 'Z')
|
||||||
|
return (UINT16)M_MapNumber(word[0], word[1]);
|
||||||
|
else if ((i = atoi(word)))
|
||||||
|
return i;
|
||||||
|
|
||||||
|
word -= 3;
|
||||||
|
if (dehacked_mode)
|
||||||
|
deh_warning("Couldn't find music named 'MUS_%s'",word);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
for (i = 0; compat_special_music_slots[i][0]; ++i)
|
||||||
|
if (fasticmp(word, compat_special_music_slots[i]))
|
||||||
|
return i + 1036;
|
||||||
|
if (dehacked_mode)
|
||||||
|
deh_warning("Couldn't find music named 'MUS_%s'",word);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static hudnum_t get_huditem(const char *word)
|
static hudnum_t get_huditem(const char *word)
|
||||||
{ // Returns the value of HUD_ enumerations
|
{ // Returns the value of HUD_ enumerations
|
||||||
hudnum_t i;
|
hudnum_t i;
|
||||||
|
@ -8182,6 +7708,13 @@ static fixed_t find_const(const char **rword)
|
||||||
free(word);
|
free(word);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
else if (fastncmp("MUS_",word,4) || fastncmp("O_",word,2)) {
|
||||||
|
r = get_mus(word, true);
|
||||||
|
free(word);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if (fastncmp("PW_",word,3)) {
|
else if (fastncmp("PW_",word,3)) {
|
||||||
r = get_power(word);
|
r = get_power(word);
|
||||||
free(word);
|
free(word);
|
||||||
|
@ -8572,6 +8105,29 @@ static inline int lib_getenum(lua_State *L)
|
||||||
if (mathlib) return luaL_error(L, "sfx '%s' could not be found.\n", word);
|
if (mathlib) return luaL_error(L, "sfx '%s' could not be found.\n", word);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
else if (!mathlib && fastncmp("mus_",word,4)) {
|
||||||
|
p = word+4;
|
||||||
|
if ((i = get_mus(p, false)) == 0)
|
||||||
|
return 0;
|
||||||
|
lua_pushinteger(L, i);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (mathlib && fastncmp("MUS_",word,4)) { // SOCs are ALL CAPS!
|
||||||
|
p = word+4;
|
||||||
|
if ((i = get_mus(p, false)) == 0)
|
||||||
|
return luaL_error(L, "music '%s' could not be found.\n", word);
|
||||||
|
lua_pushinteger(L, i);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (mathlib && (fastncmp("O_",word,2) || fastncmp("D_",word,2))) {
|
||||||
|
p = word+2;
|
||||||
|
if ((i = get_mus(p, false)) == 0)
|
||||||
|
return luaL_error(L, "music '%s' could not be found.\n", word);
|
||||||
|
lua_pushinteger(L, i);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if (!mathlib && fastncmp("pw_",word,3)) {
|
else if (!mathlib && fastncmp("pw_",word,3)) {
|
||||||
p = word+3;
|
p = word+3;
|
||||||
for (i = 0; i < NUMPOWERS; i++)
|
for (i = 0; i < NUMPOWERS; i++)
|
||||||
|
@ -8745,6 +8301,9 @@ static inline int lib_getenum(lua_State *L)
|
||||||
} else if (fastcmp(word,"gravity")) {
|
} else if (fastcmp(word,"gravity")) {
|
||||||
lua_pushinteger(L, gravity);
|
lua_pushinteger(L, gravity);
|
||||||
return 1;
|
return 1;
|
||||||
|
} else if (fastcmp(word,"VERSIONSTRING")) {
|
||||||
|
lua_pushstring(L, VERSIONSTRING);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -8799,4 +8358,3 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAVE_BLUA
|
#endif // HAVE_BLUA
|
||||||
|
|
||||||
|
|
|
@ -210,13 +210,6 @@ extern FILE *logstream;
|
||||||
// Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
|
// Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
|
||||||
#define MODVERSION 20
|
#define MODVERSION 20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// some tests, enable or disable it if it run or not
|
|
||||||
#define SPLITSCREEN
|
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
// The maximum number of players, multiplayer/networking.
|
// The maximum number of players, multiplayer/networking.
|
||||||
|
@ -356,11 +349,7 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...) FUNCDEBUG;
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
|
|
||||||
// Things that used to be in dstrings.h
|
// Things that used to be in dstrings.h
|
||||||
#define DEVMAPS "devmaps"
|
|
||||||
#define DEVDATA "devdata"
|
|
||||||
|
|
||||||
#define SAVEGAMENAME "srb2sav"
|
#define SAVEGAMENAME "srb2sav"
|
||||||
|
|
||||||
char savegamename[256];
|
char savegamename[256];
|
||||||
|
|
||||||
// m_misc.h
|
// m_misc.h
|
||||||
|
@ -505,5 +494,8 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||||
/// Experimental tweaks to analog mode. (Needs a lot of work before it's ready for primetime.)
|
/// Experimental tweaks to analog mode. (Needs a lot of work before it's ready for primetime.)
|
||||||
//#define REDSANALOG
|
//#define REDSANALOG
|
||||||
|
|
||||||
#endif // __DOOMDEF__
|
/// Backwards compatibility with musicslots.
|
||||||
|
/// \note You should leave this enabled unless you're working with a future SRB2 version.
|
||||||
|
#define MUSICSLOT_COMPATIBILITY
|
||||||
|
|
||||||
|
#endif // __DOOMDEF__
|
||||||
|
|
|
@ -603,7 +603,7 @@ static void F_IntroDrawScene(void)
|
||||||
|
|
||||||
if (finalecount-84 < 58) { // Pure Fat is driving up!
|
if (finalecount-84 < 58) { // Pure Fat is driving up!
|
||||||
int ftime = (finalecount-84);
|
int ftime = (finalecount-84);
|
||||||
x = (-189<<FRACBITS) + (FixedMul((6<<FRACBITS)+FRACUNIT/3, ftime<<FRACBITS) - FixedMul((6<<FRACBITS)+FRACUNIT/3, FixedDiv(FixedMul(ftime<<FRACBITS, ftime<<FRACBITS), 120<<FRACBITS)));
|
x = (-189*FRACUNIT) + (FixedMul((6<<FRACBITS)+FRACUNIT/3, ftime<<FRACBITS) - FixedMul((6<<FRACBITS)+FRACUNIT/3, FixedDiv(FixedMul(ftime<<FRACBITS, ftime<<FRACBITS), 120<<FRACBITS)));
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(417<<FRACBITS, aspect);
|
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(417<<FRACBITS, aspect);
|
||||||
// Draw the body
|
// Draw the body
|
||||||
V_DrawSciencePatch(x, y, V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT1", PU_CACHE)), aspect);
|
V_DrawSciencePatch(x, y, V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT1", PU_CACHE)), aspect);
|
||||||
|
@ -977,6 +977,7 @@ static const char *credits[] = {
|
||||||
"\"Monster\" Iestyn Jealous",
|
"\"Monster\" Iestyn Jealous",
|
||||||
"Ronald \"Furyhunter\" Kinard", // The SDL2 port
|
"Ronald \"Furyhunter\" Kinard", // The SDL2 port
|
||||||
"John \"JTE\" Muniz",
|
"John \"JTE\" Muniz",
|
||||||
|
"Ehab \"Wolfy\" Saeed",
|
||||||
"\"SSNTails\"",
|
"\"SSNTails\"",
|
||||||
"Matthew \"Inuyasha\" Walsh",
|
"Matthew \"Inuyasha\" Walsh",
|
||||||
"",
|
"",
|
||||||
|
@ -985,6 +986,7 @@ static const char *credits[] = {
|
||||||
"\"chi.miru\"", // Red's secret weapon, the REAL reason slopes exist (also helped port drawing code from ZDoom)
|
"\"chi.miru\"", // Red's secret weapon, the REAL reason slopes exist (also helped port drawing code from ZDoom)
|
||||||
"Andrew \"orospakr\" Clunis",
|
"Andrew \"orospakr\" Clunis",
|
||||||
"Gregor \"Oogaland\" Dick",
|
"Gregor \"Oogaland\" Dick",
|
||||||
|
"Vivian \"toaster\" Grannell",
|
||||||
"Julio \"Chaos Zero 64\" Guir",
|
"Julio \"Chaos Zero 64\" Guir",
|
||||||
"\"Kalaron\"", // Coded some of Sryder13's collection of OpenGL fixes, especially fog
|
"\"Kalaron\"", // Coded some of Sryder13's collection of OpenGL fixes, especially fog
|
||||||
"Matthew \"Shuffle\" Marsalko",
|
"Matthew \"Shuffle\" Marsalko",
|
||||||
|
@ -1000,6 +1002,7 @@ static const char *credits[] = {
|
||||||
"Jim \"MotorRoach\" DeMello",
|
"Jim \"MotorRoach\" DeMello",
|
||||||
"Desmond \"Blade\" DesJardins",
|
"Desmond \"Blade\" DesJardins",
|
||||||
"Sherman \"CoatRack\" DesJardins",
|
"Sherman \"CoatRack\" DesJardins",
|
||||||
|
"Vivian \"toaster\" Grannell",
|
||||||
"Andrew \"Senku Niola\" Moran",
|
"Andrew \"Senku Niola\" Moran",
|
||||||
"David \"Instant Sonic\" Spencer Jr.",
|
"David \"Instant Sonic\" Spencer Jr.",
|
||||||
"\"SSNTails\"",
|
"\"SSNTails\"",
|
||||||
|
@ -1020,7 +1023,7 @@ static const char *credits[] = {
|
||||||
"\"Monster\" Iestyn Jealous",
|
"\"Monster\" Iestyn Jealous",
|
||||||
"Jarel \"Arrow\" Jones",
|
"Jarel \"Arrow\" Jones",
|
||||||
"Stefan \"Stuf\" Rimalia",
|
"Stefan \"Stuf\" Rimalia",
|
||||||
"Shane Strife",
|
"Shane Mychal Sexton",
|
||||||
"\"Spazzo\"",
|
"\"Spazzo\"",
|
||||||
"David \"Big Wave Dave\" Spencer Sr.",
|
"David \"Big Wave Dave\" Spencer Sr.",
|
||||||
"David \"Instant Sonic\" Spencer Jr.",
|
"David \"Instant Sonic\" Spencer Jr.",
|
||||||
|
@ -1033,6 +1036,7 @@ static const char *credits[] = {
|
||||||
"Sherman \"CoatRack\" DesJardins",
|
"Sherman \"CoatRack\" DesJardins",
|
||||||
"Ben \"Mystic\" Geyer",
|
"Ben \"Mystic\" Geyer",
|
||||||
"Nathan \"Jazz\" Giroux",
|
"Nathan \"Jazz\" Giroux",
|
||||||
|
"Vivian \"toaster\" Grannell",
|
||||||
"Dan \"Blitzzo\" Hagerstrand",
|
"Dan \"Blitzzo\" Hagerstrand",
|
||||||
"Kepa \"Nev3r\" Iceta",
|
"Kepa \"Nev3r\" Iceta",
|
||||||
"Thomas \"Shadow Hog\" Igoe",
|
"Thomas \"Shadow Hog\" Igoe",
|
||||||
|
@ -1069,7 +1073,7 @@ static const char *credits[] = {
|
||||||
"iD Software",
|
"iD Software",
|
||||||
"Alex \"MistaED\" Fuller",
|
"Alex \"MistaED\" Fuller",
|
||||||
"FreeDoom Project", // Used some of the mancubus and rocket launcher sprites for Brak
|
"FreeDoom Project", // Used some of the mancubus and rocket launcher sprites for Brak
|
||||||
"Randy Heit (<!>)", // For his MSPaint <!> sprite that we nicked
|
"Randi Heit (<!>)", // For their MSPaint <!> sprite that we nicked
|
||||||
"",
|
"",
|
||||||
"\1Produced By",
|
"\1Produced By",
|
||||||
"Sonic Team Junior",
|
"Sonic Team Junior",
|
||||||
|
|
|
@ -90,6 +90,7 @@ enum
|
||||||
// custom intermissions
|
// custom intermissions
|
||||||
wipe_specinter_toblack,
|
wipe_specinter_toblack,
|
||||||
wipe_multinter_toblack,
|
wipe_multinter_toblack,
|
||||||
|
wipe_speclevel_towhite,
|
||||||
|
|
||||||
wipe_level_final,
|
wipe_level_final,
|
||||||
wipe_intermission_final,
|
wipe_intermission_final,
|
||||||
|
@ -108,7 +109,7 @@ enum
|
||||||
|
|
||||||
NUMWIPEDEFS
|
NUMWIPEDEFS
|
||||||
};
|
};
|
||||||
#define WIPEFINALSHIFT 12
|
#define WIPEFINALSHIFT 13
|
||||||
extern UINT8 wipedefs[NUMWIPEDEFS];
|
extern UINT8 wipedefs[NUMWIPEDEFS];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,6 +58,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
||||||
|
|
||||||
0, // wipe_specinter_toblack
|
0, // wipe_specinter_toblack
|
||||||
0, // wipe_multinter_toblack
|
0, // wipe_multinter_toblack
|
||||||
|
0, // wipe_speclevel_towhite
|
||||||
|
|
||||||
0, // wipe_level_final
|
0, // wipe_level_final
|
||||||
0, // wipe_intermission_final
|
0, // wipe_intermission_final
|
||||||
|
|
|
@ -4340,10 +4340,8 @@ void G_GhostTicker(void)
|
||||||
switch(g->color)
|
switch(g->color)
|
||||||
{
|
{
|
||||||
case GHC_SUPER: // Super Sonic (P_DoSuperStuff)
|
case GHC_SUPER: // Super Sonic (P_DoSuperStuff)
|
||||||
if (leveltime % 9 < 5)
|
g->mo->color = SKINCOLOR_SUPER1;
|
||||||
g->mo->color = SKINCOLOR_SUPER1 + leveltime % 9;
|
g->mo->color += abs( ( ( leveltime >> 1 ) % 9) - 4);
|
||||||
else
|
|
||||||
g->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9;
|
|
||||||
break;
|
break;
|
||||||
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
|
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
|
||||||
g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS);
|
g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS);
|
||||||
|
@ -5587,7 +5585,7 @@ boolean G_CheckDemoStatus(void)
|
||||||
free(demobuffer);
|
free(demobuffer);
|
||||||
demorecording = false;
|
demorecording = false;
|
||||||
|
|
||||||
if (!modeattacking == ATTACKING_RECORD)
|
if (modeattacking != ATTACKING_RECORD)
|
||||||
{
|
{
|
||||||
if (saved)
|
if (saved)
|
||||||
CONS_Printf(M_GetText("Demo %s recorded\n"), demoname);
|
CONS_Printf(M_GetText("Demo %s recorded\n"), demoname);
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include "g_input.h"
|
#include "g_input.h"
|
||||||
#include "keys.h"
|
#include "keys.h"
|
||||||
#include "hu_stuff.h" // need HUFONT start & end
|
#include "hu_stuff.h" // need HUFONT start & end
|
||||||
#include "keys.h"
|
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
|
|
||||||
|
@ -1042,13 +1041,13 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
||||||
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
||||||
return keystr[0];
|
return keystr[0];
|
||||||
|
|
||||||
|
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
||||||
|
return atoi(&keystr[3]);
|
||||||
|
|
||||||
for (j = 0; j < NUMKEYNAMES; j++)
|
for (j = 0; j < NUMKEYNAMES; j++)
|
||||||
if (!stricmp(keynames[j].name, keystr))
|
if (!stricmp(keynames[j].name, keystr))
|
||||||
return keynames[j].keynum;
|
return keynames[j].keynum;
|
||||||
|
|
||||||
if (strlen(keystr) > 3)
|
|
||||||
return atoi(&keystr[3]);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -229,4 +229,3 @@ enum hwdfiltermode
|
||||||
|
|
||||||
|
|
||||||
#endif //_HWR_DEFS_
|
#endif //_HWR_DEFS_
|
||||||
|
|
||||||
|
|
|
@ -2856,7 +2856,6 @@ static void HWR_AddPolyObjectPlanes(void)
|
||||||
// : Draw one or more line segments.
|
// : Draw one or more line segments.
|
||||||
// Notes : Sets gr_cursectorlight to the light of the parent sector, to modulate wall textures
|
// Notes : Sets gr_cursectorlight to the light of the parent sector, to modulate wall textures
|
||||||
// -----------------+
|
// -----------------+
|
||||||
static lumpnum_t doomwaterflat; //set by R_InitFlats hack
|
|
||||||
static void HWR_Subsector(size_t num)
|
static void HWR_Subsector(size_t num)
|
||||||
{
|
{
|
||||||
INT16 count;
|
INT16 count;
|
||||||
|
@ -2867,7 +2866,6 @@ static void HWR_Subsector(size_t num)
|
||||||
INT32 ceilinglightlevel;
|
INT32 ceilinglightlevel;
|
||||||
INT32 locFloorHeight, locCeilingHeight;
|
INT32 locFloorHeight, locCeilingHeight;
|
||||||
INT32 light = 0;
|
INT32 light = 0;
|
||||||
fixed_t wh;
|
|
||||||
extracolormap_t *floorcolormap;
|
extracolormap_t *floorcolormap;
|
||||||
extracolormap_t *ceilingcolormap;
|
extracolormap_t *ceilingcolormap;
|
||||||
|
|
||||||
|
@ -3193,26 +3191,6 @@ static void HWR_Subsector(size_t num)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//20/08/99: Changed by Hurdler (taken from faB's code)
|
|
||||||
#ifdef DOPLANES
|
|
||||||
// -------------------- WATER IN DEV. TEST ------------------------
|
|
||||||
//dck hack : use abs(tag) for waterheight
|
|
||||||
//ilag : Since we changed to UINT16 for sector tags, simulate INT16
|
|
||||||
if (gr_frontsector->tag > 32767)
|
|
||||||
{
|
|
||||||
wh = ((65535-gr_frontsector->tag) <<FRACBITS) + (FRACUNIT/2);
|
|
||||||
if (wh > gr_frontsector->floorheight &&
|
|
||||||
wh < gr_frontsector->ceilingheight)
|
|
||||||
{
|
|
||||||
HWR_GetFlat(doomwaterflat);
|
|
||||||
HWR_RenderPlane(gr_frontsector,
|
|
||||||
&extrasubsectors[num], wh, PF_Translucent,
|
|
||||||
gr_frontsector->lightlevel, doomwaterflat,
|
|
||||||
NULL, 255, false, gr_frontsector->lightlist[light].extra_colormap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// -------------------- WATER IN DEV. TEST ------------------------
|
|
||||||
#endif
|
|
||||||
sub->validcount = validcount;
|
sub->validcount = validcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5499,11 +5477,6 @@ void HWR_Startup(void)
|
||||||
HWR_AddEngineCommands();
|
HWR_AddEngineCommands();
|
||||||
HWR_InitTextureCache();
|
HWR_InitTextureCache();
|
||||||
|
|
||||||
// for test water translucent surface
|
|
||||||
doomwaterflat = W_CheckNumForName("FWATER1");
|
|
||||||
if (doomwaterflat == LUMPERROR) // if FWATER1 not found (in doom shareware)
|
|
||||||
doomwaterflat = W_GetNumForName("WATER0");
|
|
||||||
|
|
||||||
HWR_InitMD2();
|
HWR_InitMD2();
|
||||||
|
|
||||||
#ifdef ALAM_LIGHTING
|
#ifdef ALAM_LIGHTING
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "../r_things.h"
|
#include "../r_things.h"
|
||||||
|
|
||||||
#include "hw_main.h"
|
#include "hw_main.h"
|
||||||
|
#include "../v_video.h"
|
||||||
#ifdef HAVE_PNG
|
#ifdef HAVE_PNG
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
@ -881,6 +882,59 @@ static void md2_loadTexture(md2_t *model)
|
||||||
HWR_UnlockCachedPatch(grpatch);
|
HWR_UnlockCachedPatch(grpatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -----------------+
|
||||||
|
// md2_loadBlendTexture : Download a pcx or png texture for blending MD2 models
|
||||||
|
// -----------------+
|
||||||
|
static void md2_loadBlendTexture(md2_t *model)
|
||||||
|
{
|
||||||
|
GLPatch_t *grpatch;
|
||||||
|
char *filename = Z_Malloc(strlen(model->filename)+7, PU_STATIC, NULL);
|
||||||
|
strcpy(filename, model->filename);
|
||||||
|
|
||||||
|
FIL_ForceExtension(filename, "_blend.png");
|
||||||
|
|
||||||
|
if (model->blendgrpatch)
|
||||||
|
{
|
||||||
|
grpatch = model->blendgrpatch;
|
||||||
|
Z_Free(grpatch->mipmap.grInfo.data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
grpatch = Z_Calloc(sizeof *grpatch, PU_HWRPATCHINFO,
|
||||||
|
&(model->blendgrpatch));
|
||||||
|
|
||||||
|
if (!grpatch->mipmap.downloaded && !grpatch->mipmap.grInfo.data)
|
||||||
|
{
|
||||||
|
int w = 0, h = 0;
|
||||||
|
#ifdef HAVE_PNG
|
||||||
|
grpatch->mipmap.grInfo.format = PNG_Load(filename, &w, &h, grpatch);
|
||||||
|
if (grpatch->mipmap.grInfo.format == 0)
|
||||||
|
#endif
|
||||||
|
grpatch->mipmap.grInfo.format = PCX_Load(filename, &w, &h, grpatch);
|
||||||
|
if (grpatch->mipmap.grInfo.format == 0)
|
||||||
|
{
|
||||||
|
Z_Free(filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
grpatch->mipmap.downloaded = 0;
|
||||||
|
grpatch->mipmap.flags = 0;
|
||||||
|
|
||||||
|
grpatch->width = (INT16)w;
|
||||||
|
grpatch->height = (INT16)h;
|
||||||
|
grpatch->mipmap.width = (UINT16)w;
|
||||||
|
grpatch->mipmap.height = (UINT16)h;
|
||||||
|
|
||||||
|
// not correct!
|
||||||
|
grpatch->mipmap.grInfo.smallLodLog2 = GR_LOD_LOG2_256;
|
||||||
|
grpatch->mipmap.grInfo.largeLodLog2 = GR_LOD_LOG2_256;
|
||||||
|
grpatch->mipmap.grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
||||||
|
}
|
||||||
|
HWD.pfnSetTexture(&grpatch->mipmap); // We do need to do this so that it can be cleared and knows to recreate it when necessary
|
||||||
|
HWR_UnlockCachedPatch(grpatch);
|
||||||
|
|
||||||
|
Z_Free(filename);
|
||||||
|
}
|
||||||
|
|
||||||
// Don't spam the console, or the OS with fopen requests!
|
// Don't spam the console, or the OS with fopen requests!
|
||||||
static boolean nomd2s = false;
|
static boolean nomd2s = false;
|
||||||
|
|
||||||
|
@ -1050,6 +1104,238 @@ spritemd2found:
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, GLMipmap_t *grmip, skincolors_t color)
|
||||||
|
{
|
||||||
|
UINT16 w = gpatch->width, h = gpatch->height;
|
||||||
|
UINT32 size = w*h;
|
||||||
|
RGBA_t *image, *blendimage, *cur, blendcolor;
|
||||||
|
|
||||||
|
if (grmip->width == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
grmip->width = gpatch->width;
|
||||||
|
grmip->height = gpatch->height;
|
||||||
|
|
||||||
|
// no wrap around, no chroma key
|
||||||
|
grmip->flags = 0;
|
||||||
|
// setup the texture info
|
||||||
|
grmip->grInfo.format = GR_RGBA;
|
||||||
|
}
|
||||||
|
|
||||||
|
Z_Free(grmip->grInfo.data);
|
||||||
|
grmip->grInfo.data = NULL;
|
||||||
|
|
||||||
|
cur = Z_Malloc(size*4, PU_HWRCACHE, &grmip->grInfo.data);
|
||||||
|
memset(cur, 0x00, size*4);
|
||||||
|
|
||||||
|
image = gpatch->mipmap.grInfo.data;
|
||||||
|
blendimage = blendgpatch->mipmap.grInfo.data;
|
||||||
|
|
||||||
|
switch (color)
|
||||||
|
{
|
||||||
|
case SKINCOLOR_WHITE:
|
||||||
|
blendcolor = V_GetColor(3);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_SILVER:
|
||||||
|
blendcolor = V_GetColor(10);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_GREY:
|
||||||
|
blendcolor = V_GetColor(15);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_BLACK:
|
||||||
|
blendcolor = V_GetColor(27);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_BEIGE:
|
||||||
|
blendcolor = V_GetColor(247);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_PEACH:
|
||||||
|
blendcolor = V_GetColor(218);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_BROWN:
|
||||||
|
blendcolor = V_GetColor(234);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_RED:
|
||||||
|
blendcolor = V_GetColor(38);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_CRIMSON:
|
||||||
|
blendcolor = V_GetColor(45);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_ORANGE:
|
||||||
|
blendcolor = V_GetColor(54);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_RUST:
|
||||||
|
blendcolor = V_GetColor(60);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_GOLD:
|
||||||
|
blendcolor = V_GetColor(67);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_YELLOW:
|
||||||
|
blendcolor = V_GetColor(73);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_TAN:
|
||||||
|
blendcolor = V_GetColor(85);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_MOSS:
|
||||||
|
blendcolor = V_GetColor(92);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_PERIDOT:
|
||||||
|
blendcolor = V_GetColor(188);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_GREEN:
|
||||||
|
blendcolor = V_GetColor(101);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_EMERALD:
|
||||||
|
blendcolor = V_GetColor(112);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_AQUA:
|
||||||
|
blendcolor = V_GetColor(122);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_TEAL:
|
||||||
|
blendcolor = V_GetColor(141);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_CYAN:
|
||||||
|
blendcolor = V_GetColor(131);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_BLUE:
|
||||||
|
blendcolor = V_GetColor(152);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_AZURE:
|
||||||
|
blendcolor = V_GetColor(171);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_PASTEL:
|
||||||
|
blendcolor = V_GetColor(161);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_PURPLE:
|
||||||
|
blendcolor = V_GetColor(165);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_LAVENDER:
|
||||||
|
blendcolor = V_GetColor(195);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_MAGENTA:
|
||||||
|
blendcolor = V_GetColor(183);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_PINK:
|
||||||
|
blendcolor = V_GetColor(211);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_ROSY:
|
||||||
|
blendcolor = V_GetColor(202);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_SUPER1:
|
||||||
|
blendcolor = V_GetColor(80);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_SUPER2:
|
||||||
|
blendcolor = V_GetColor(83);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_SUPER3:
|
||||||
|
blendcolor = V_GetColor(73);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_SUPER4:
|
||||||
|
blendcolor = V_GetColor(64);
|
||||||
|
break;
|
||||||
|
case SKINCOLOR_SUPER5:
|
||||||
|
blendcolor = V_GetColor(67);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_TSUPER1:
|
||||||
|
case SKINCOLOR_TSUPER2:
|
||||||
|
case SKINCOLOR_TSUPER3:
|
||||||
|
case SKINCOLOR_TSUPER4:
|
||||||
|
case SKINCOLOR_TSUPER5:
|
||||||
|
case SKINCOLOR_KSUPER1:
|
||||||
|
case SKINCOLOR_KSUPER2:
|
||||||
|
case SKINCOLOR_KSUPER3:
|
||||||
|
case SKINCOLOR_KSUPER4:
|
||||||
|
case SKINCOLOR_KSUPER5:
|
||||||
|
default:
|
||||||
|
blendcolor = V_GetColor(255);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (size--)
|
||||||
|
{
|
||||||
|
if (blendimage->s.alpha == 0)
|
||||||
|
{
|
||||||
|
// Don't bother with blending the pixel if the alpha of the blend pixel is 0
|
||||||
|
cur->rgba = image->rgba;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
INT32 tempcolor;
|
||||||
|
INT16 tempmult, tempalpha;
|
||||||
|
tempalpha = -(abs(blendimage->s.red-127)-127)*2;
|
||||||
|
if (tempalpha > 255)
|
||||||
|
tempalpha = 255;
|
||||||
|
else if (tempalpha < 0)
|
||||||
|
tempalpha = 0;
|
||||||
|
|
||||||
|
tempmult = (blendimage->s.red-127)*2;
|
||||||
|
if (tempmult > 255)
|
||||||
|
tempmult = 255;
|
||||||
|
else if (tempmult < 0)
|
||||||
|
tempmult = 0;
|
||||||
|
|
||||||
|
tempcolor = (image->s.red*(255-blendimage->s.alpha))/255 + ((tempmult + ((tempalpha*blendcolor.s.red)/255)) * blendimage->s.alpha)/255;
|
||||||
|
cur->s.red = (UINT8)tempcolor;
|
||||||
|
tempcolor = (image->s.green*(255-blendimage->s.alpha))/255 + ((tempmult + ((tempalpha*blendcolor.s.green)/255)) * blendimage->s.alpha)/255;
|
||||||
|
cur->s.green = (UINT8)tempcolor;
|
||||||
|
tempcolor = (image->s.blue*(255-blendimage->s.alpha))/255 + ((tempmult + ((tempalpha*blendcolor.s.blue)/255)) * blendimage->s.alpha)/255;
|
||||||
|
cur->s.blue = (UINT8)tempcolor;
|
||||||
|
cur->s.alpha = image->s.alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
cur++; image++; blendimage++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HWR_GetBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, const UINT8 *colormap, skincolors_t color)
|
||||||
|
{
|
||||||
|
// mostly copied from HWR_GetMappedPatch, hence the similarities and comment
|
||||||
|
GLMipmap_t *grmip, *newmip;
|
||||||
|
|
||||||
|
if (colormap == colormaps || colormap == NULL)
|
||||||
|
{
|
||||||
|
// Don't do any blending
|
||||||
|
HWD.pfnSetTexture(&gpatch->mipmap);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// search for the mimmap
|
||||||
|
// skip the first (no colormap translated)
|
||||||
|
for (grmip = &gpatch->mipmap; grmip->nextcolormap; )
|
||||||
|
{
|
||||||
|
grmip = grmip->nextcolormap;
|
||||||
|
if (grmip->colormap == colormap)
|
||||||
|
{
|
||||||
|
if (grmip->downloaded && grmip->grInfo.data)
|
||||||
|
{
|
||||||
|
HWD.pfnSetTexture(grmip); // found the colormap, set it to the correct texture
|
||||||
|
Z_ChangeTag(grmip->grInfo.data, PU_HWRCACHE_UNLOCKED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If here, the blended texture has not been created
|
||||||
|
// So we create it
|
||||||
|
|
||||||
|
//BP: WARNING: don't free it manually without clearing the cache of harware renderer
|
||||||
|
// (it have a liste of mipmap)
|
||||||
|
// this malloc is cleared in HWR_FreeTextureCache
|
||||||
|
// (...) unfortunately z_malloc fragment alot the memory :(so malloc is better
|
||||||
|
newmip = calloc(1, sizeof (*newmip));
|
||||||
|
if (newmip == NULL)
|
||||||
|
I_Error("%s: Out of memory", "HWR_GetMappedPatch");
|
||||||
|
grmip->nextcolormap = newmip;
|
||||||
|
newmip->colormap = colormap;
|
||||||
|
|
||||||
|
HWR_CreateBlendedTexture(gpatch, blendgpatch, newmip, color);
|
||||||
|
|
||||||
|
HWD.pfnSetTexture(newmip);
|
||||||
|
Z_ChangeTag(newmip->grInfo.data, PU_HWRCACHE_UNLOCKED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// -----------------+
|
// -----------------+
|
||||||
// HWR_DrawMD2 : Draw MD2
|
// HWR_DrawMD2 : Draw MD2
|
||||||
|
@ -1180,14 +1466,26 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
||||||
gpatch = md2->grpatch;
|
gpatch = md2->grpatch;
|
||||||
if (!gpatch || !gpatch->mipmap.grInfo.format || !gpatch->mipmap.downloaded)
|
if (!gpatch || !gpatch->mipmap.grInfo.format || !gpatch->mipmap.downloaded)
|
||||||
md2_loadTexture(md2);
|
md2_loadTexture(md2);
|
||||||
|
|
||||||
gpatch = md2->grpatch; // Load it again, because it isn't being loaded into gpatch after md2_loadtexture...
|
gpatch = md2->grpatch; // Load it again, because it isn't being loaded into gpatch after md2_loadtexture...
|
||||||
|
|
||||||
|
if ((gpatch && gpatch->mipmap.grInfo.format) // don't load the blend texture if the base texture isn't available
|
||||||
|
&& (!md2->blendgrpatch || !((GLPatch_t *)md2->blendgrpatch)->mipmap.grInfo.format || !((GLPatch_t *)md2->blendgrpatch)->mipmap.downloaded))
|
||||||
|
md2_loadBlendTexture(md2);
|
||||||
|
|
||||||
if (gpatch && gpatch->mipmap.grInfo.format) // else if meant that if a texture couldn't be loaded, it would just end up using something else's texture
|
if (gpatch && gpatch->mipmap.grInfo.format) // else if meant that if a texture couldn't be loaded, it would just end up using something else's texture
|
||||||
|
{
|
||||||
|
if ((skincolors_t)spr->mobj->color != SKINCOLOR_NONE &&
|
||||||
|
md2->blendgrpatch && ((GLPatch_t *)md2->blendgrpatch)->mipmap.grInfo.format
|
||||||
|
&& gpatch->width == ((GLPatch_t *)md2->blendgrpatch)->width && gpatch->height == ((GLPatch_t *)md2->blendgrpatch)->height)
|
||||||
|
{
|
||||||
|
HWR_GetBlendedTexture(gpatch, (GLPatch_t *)md2->blendgrpatch, spr->colormap, (skincolors_t)spr->mobj->color);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// This is safe, since we know the texture has been downloaded
|
// This is safe, since we know the texture has been downloaded
|
||||||
HWD.pfnSetTexture(&gpatch->mipmap);
|
HWD.pfnSetTexture(&gpatch->mipmap);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Sprite
|
// Sprite
|
||||||
|
@ -1195,17 +1493,38 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
||||||
HWR_GetMappedPatch(gpatch, spr->colormap);
|
HWR_GetMappedPatch(gpatch, spr->colormap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spr->mobj->frame & FF_ANIMATE)
|
||||||
|
{
|
||||||
|
// set duration and tics to be the correct values for FF_ANIMATE states
|
||||||
|
durs = spr->mobj->state->var2;
|
||||||
|
tics = spr->mobj->anim_duration;
|
||||||
|
}
|
||||||
|
|
||||||
//FIXME: this is not yet correct
|
//FIXME: this is not yet correct
|
||||||
frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
||||||
buff = md2->model->glCommandBuffer;
|
buff = md2->model->glCommandBuffer;
|
||||||
curr = &md2->model->frames[frame];
|
curr = &md2->model->frames[frame];
|
||||||
if (cv_grmd2.value == 1
|
if (cv_grmd2.value == 1)
|
||||||
&& spr->mobj->state->nextstate != S_NULL && states[spr->mobj->state->nextstate].sprite != SPR_NULL
|
{
|
||||||
|
// frames are handled differently for states with FF_ANIMATE, so get the next frame differently for the interpolation
|
||||||
|
if (spr->mobj->frame & FF_ANIMATE)
|
||||||
|
{
|
||||||
|
UINT32 nextframe = (spr->mobj->frame & FF_FRAMEMASK) + 1;
|
||||||
|
if (nextframe >= (UINT32)spr->mobj->state->var1)
|
||||||
|
nextframe = (spr->mobj->state->frame & FF_FRAMEMASK);
|
||||||
|
nextframe %= md2->model->header.numFrames;
|
||||||
|
next = &md2->model->frames[nextframe];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (spr->mobj->state->nextstate != S_NULL && states[spr->mobj->state->nextstate].sprite != SPR_NULL
|
||||||
&& !(spr->mobj->player && spr->mobj->state->nextstate == S_PLAY_WAIT && spr->mobj->state == &states[S_PLAY_STND]))
|
&& !(spr->mobj->player && spr->mobj->state->nextstate == S_PLAY_WAIT && spr->mobj->state == &states[S_PLAY_STND]))
|
||||||
{
|
{
|
||||||
const INT32 nextframe = (states[spr->mobj->state->nextstate].frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
const UINT32 nextframe = (states[spr->mobj->state->nextstate].frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
||||||
next = &md2->model->frames[nextframe];
|
next = &md2->model->frames[nextframe];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Hurdler: it seems there is still a small problem with mobj angle
|
//Hurdler: it seems there is still a small problem with mobj angle
|
||||||
p.x = FIXED_TO_FLOAT(spr->mobj->x);
|
p.x = FIXED_TO_FLOAT(spr->mobj->x);
|
||||||
|
|
|
@ -120,6 +120,7 @@ typedef struct
|
||||||
float offset;
|
float offset;
|
||||||
md2_model_t *model;
|
md2_model_t *model;
|
||||||
void *grpatch;
|
void *grpatch;
|
||||||
|
void *blendgrpatch;
|
||||||
boolean notfound;
|
boolean notfound;
|
||||||
INT32 skin;
|
INT32 skin;
|
||||||
} md2_t;
|
} md2_t;
|
||||||
|
|
|
@ -2371,7 +2371,7 @@ EXPORT void HWRAPI(MakeScreenTexture) (void)
|
||||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||||
#ifndef KOS_GL_COMPATIBILITY
|
#ifndef KOS_GL_COMPATIBILITY
|
||||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0);
|
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||||
|
@ -2399,7 +2399,7 @@ EXPORT void HWRAPI(MakeScreenFinalTexture) (void)
|
||||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||||
#ifndef KOS_GL_COMPATIBILITY
|
#ifndef KOS_GL_COMPATIBILITY
|
||||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0);
|
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||||
|
|
788
src/info.c
788
src/info.c
File diff suppressed because it is too large
Load diff
613
src/info.h
613
src/info.h
|
@ -1479,30 +1479,7 @@ typedef enum state
|
||||||
S_MSSHIELD_F12,
|
S_MSSHIELD_F12,
|
||||||
|
|
||||||
// Ring
|
// Ring
|
||||||
S_RING1,
|
S_RING,
|
||||||
S_RING2,
|
|
||||||
S_RING3,
|
|
||||||
S_RING4,
|
|
||||||
S_RING5,
|
|
||||||
S_RING6,
|
|
||||||
S_RING7,
|
|
||||||
S_RING8,
|
|
||||||
S_RING9,
|
|
||||||
S_RING10,
|
|
||||||
S_RING11,
|
|
||||||
S_RING12,
|
|
||||||
S_RING13,
|
|
||||||
S_RING14,
|
|
||||||
S_RING15,
|
|
||||||
S_RING16,
|
|
||||||
S_RING17,
|
|
||||||
S_RING18,
|
|
||||||
S_RING19,
|
|
||||||
S_RING20,
|
|
||||||
S_RING21,
|
|
||||||
S_RING22,
|
|
||||||
S_RING23,
|
|
||||||
S_RING24,
|
|
||||||
|
|
||||||
// Blue Sphere for special stages
|
// Blue Sphere for special stages
|
||||||
S_BLUEBALL,
|
S_BLUEBALL,
|
||||||
|
@ -1518,39 +1495,10 @@ typedef enum state
|
||||||
S_GRAVWELLRED3,
|
S_GRAVWELLRED3,
|
||||||
|
|
||||||
// Individual Team Rings
|
// Individual Team Rings
|
||||||
S_TEAMRING1,
|
S_TEAMRING,
|
||||||
S_TEAMRING2,
|
|
||||||
S_TEAMRING3,
|
|
||||||
S_TEAMRING4,
|
|
||||||
S_TEAMRING5,
|
|
||||||
S_TEAMRING6,
|
|
||||||
S_TEAMRING7,
|
|
||||||
S_TEAMRING8,
|
|
||||||
S_TEAMRING9,
|
|
||||||
S_TEAMRING10,
|
|
||||||
S_TEAMRING11,
|
|
||||||
S_TEAMRING12,
|
|
||||||
S_TEAMRING13,
|
|
||||||
S_TEAMRING14,
|
|
||||||
S_TEAMRING15,
|
|
||||||
S_TEAMRING16,
|
|
||||||
S_TEAMRING17,
|
|
||||||
S_TEAMRING18,
|
|
||||||
S_TEAMRING19,
|
|
||||||
S_TEAMRING20,
|
|
||||||
S_TEAMRING21,
|
|
||||||
S_TEAMRING22,
|
|
||||||
S_TEAMRING23,
|
|
||||||
S_TEAMRING24,
|
|
||||||
|
|
||||||
// Special Stage Token
|
// Special Stage Token
|
||||||
S_EMMY1,
|
S_EMMY,
|
||||||
S_EMMY2,
|
|
||||||
S_EMMY3,
|
|
||||||
S_EMMY4,
|
|
||||||
S_EMMY5,
|
|
||||||
S_EMMY6,
|
|
||||||
S_EMMY7,
|
|
||||||
|
|
||||||
// Special Stage Token
|
// Special Stage Token
|
||||||
S_TOKEN,
|
S_TOKEN,
|
||||||
|
@ -1704,40 +1652,9 @@ typedef enum state
|
||||||
S_SPIKED2,
|
S_SPIKED2,
|
||||||
|
|
||||||
// Starpost
|
// Starpost
|
||||||
S_STARPOST1,
|
S_STARPOST_IDLE,
|
||||||
S_STARPOST2,
|
S_STARPOST_FLASH,
|
||||||
S_STARPOST3,
|
S_STARPOST_SPIN,
|
||||||
S_STARPOST4,
|
|
||||||
S_STARPOST5,
|
|
||||||
S_STARPOST6,
|
|
||||||
S_STARPOST7,
|
|
||||||
S_STARPOST8,
|
|
||||||
S_STARPOST9,
|
|
||||||
S_STARPOST10,
|
|
||||||
S_STARPOST11,
|
|
||||||
S_STARPOST12,
|
|
||||||
S_STARPOST13,
|
|
||||||
S_STARPOST14,
|
|
||||||
S_STARPOST15,
|
|
||||||
S_STARPOST16,
|
|
||||||
S_STARPOST17,
|
|
||||||
S_STARPOST18,
|
|
||||||
S_STARPOST19,
|
|
||||||
S_STARPOST20,
|
|
||||||
S_STARPOST21,
|
|
||||||
S_STARPOST22,
|
|
||||||
S_STARPOST23,
|
|
||||||
S_STARPOST24,
|
|
||||||
S_STARPOST25,
|
|
||||||
S_STARPOST26,
|
|
||||||
S_STARPOST27,
|
|
||||||
S_STARPOST28,
|
|
||||||
S_STARPOST29,
|
|
||||||
S_STARPOST30,
|
|
||||||
S_STARPOST31,
|
|
||||||
S_STARPOST32,
|
|
||||||
S_STARPOST33,
|
|
||||||
S_STARPOST34,
|
|
||||||
|
|
||||||
// Big floating mine
|
// Big floating mine
|
||||||
S_BIGMINE1,
|
S_BIGMINE1,
|
||||||
|
@ -2345,38 +2262,7 @@ typedef enum state
|
||||||
S_PITY10,
|
S_PITY10,
|
||||||
|
|
||||||
// Invincibility Sparkles
|
// Invincibility Sparkles
|
||||||
S_IVSP1,
|
S_IVSP,
|
||||||
S_IVSP2,
|
|
||||||
S_IVSP3,
|
|
||||||
S_IVSP4,
|
|
||||||
S_IVSP5,
|
|
||||||
S_IVSP6,
|
|
||||||
S_IVSP7,
|
|
||||||
S_IVSP8,
|
|
||||||
S_IVSP9,
|
|
||||||
S_IVSP10,
|
|
||||||
S_IVSP11,
|
|
||||||
S_IVSP12,
|
|
||||||
S_IVSP13,
|
|
||||||
S_IVSP14,
|
|
||||||
S_IVSP15,
|
|
||||||
S_IVSP16,
|
|
||||||
S_IVSP17,
|
|
||||||
S_IVSP18,
|
|
||||||
S_IVSP19,
|
|
||||||
S_IVSP20,
|
|
||||||
S_IVSP21,
|
|
||||||
S_IVSP22,
|
|
||||||
S_IVSP23,
|
|
||||||
S_IVSP24,
|
|
||||||
S_IVSP25,
|
|
||||||
S_IVSP26,
|
|
||||||
S_IVSP27,
|
|
||||||
S_IVSP28,
|
|
||||||
S_IVSP29,
|
|
||||||
S_IVSP30,
|
|
||||||
S_IVSP31,
|
|
||||||
S_IVSP32,
|
|
||||||
|
|
||||||
// Super Sonic Spark
|
// Super Sonic Spark
|
||||||
S_SSPK1,
|
S_SSPK1,
|
||||||
|
@ -2563,283 +2449,17 @@ typedef enum state
|
||||||
S_RRNG6,
|
S_RRNG6,
|
||||||
S_RRNG7,
|
S_RRNG7,
|
||||||
|
|
||||||
// Bounce Ring
|
// Weapon Ring Ammo
|
||||||
S_BOUNCERING1,
|
S_BOUNCERINGAMMO,
|
||||||
S_BOUNCERING2,
|
S_RAILRINGAMMO,
|
||||||
S_BOUNCERING3,
|
S_INFINITYRINGAMMO,
|
||||||
S_BOUNCERING4,
|
S_AUTOMATICRINGAMMO,
|
||||||
S_BOUNCERING5,
|
S_EXPLOSIONRINGAMMO,
|
||||||
S_BOUNCERING6,
|
S_SCATTERRINGAMMO,
|
||||||
S_BOUNCERING7,
|
S_GRENADERINGAMMO,
|
||||||
S_BOUNCERING8,
|
|
||||||
S_BOUNCERING9,
|
|
||||||
S_BOUNCERING10,
|
|
||||||
S_BOUNCERING11,
|
|
||||||
S_BOUNCERING12,
|
|
||||||
S_BOUNCERING13,
|
|
||||||
S_BOUNCERING14,
|
|
||||||
S_BOUNCERING15,
|
|
||||||
S_BOUNCERING16,
|
|
||||||
S_BOUNCERING17,
|
|
||||||
S_BOUNCERING18,
|
|
||||||
S_BOUNCERING19,
|
|
||||||
S_BOUNCERING20,
|
|
||||||
S_BOUNCERING21,
|
|
||||||
S_BOUNCERING22,
|
|
||||||
S_BOUNCERING23,
|
|
||||||
S_BOUNCERING24,
|
|
||||||
S_BOUNCERING25,
|
|
||||||
S_BOUNCERING26,
|
|
||||||
S_BOUNCERING27,
|
|
||||||
S_BOUNCERING28,
|
|
||||||
S_BOUNCERING29,
|
|
||||||
S_BOUNCERING30,
|
|
||||||
S_BOUNCERING31,
|
|
||||||
S_BOUNCERING32,
|
|
||||||
S_BOUNCERING33,
|
|
||||||
S_BOUNCERING34,
|
|
||||||
S_BOUNCERING35,
|
|
||||||
|
|
||||||
// Rail Ring
|
|
||||||
S_RAILRING1,
|
|
||||||
S_RAILRING2,
|
|
||||||
S_RAILRING3,
|
|
||||||
S_RAILRING4,
|
|
||||||
S_RAILRING5,
|
|
||||||
S_RAILRING6,
|
|
||||||
S_RAILRING7,
|
|
||||||
S_RAILRING8,
|
|
||||||
S_RAILRING9,
|
|
||||||
S_RAILRING10,
|
|
||||||
S_RAILRING11,
|
|
||||||
S_RAILRING12,
|
|
||||||
S_RAILRING13,
|
|
||||||
S_RAILRING14,
|
|
||||||
S_RAILRING15,
|
|
||||||
S_RAILRING16,
|
|
||||||
S_RAILRING17,
|
|
||||||
S_RAILRING18,
|
|
||||||
S_RAILRING19,
|
|
||||||
S_RAILRING20,
|
|
||||||
S_RAILRING21,
|
|
||||||
S_RAILRING22,
|
|
||||||
S_RAILRING23,
|
|
||||||
S_RAILRING24,
|
|
||||||
S_RAILRING25,
|
|
||||||
S_RAILRING26,
|
|
||||||
S_RAILRING27,
|
|
||||||
S_RAILRING28,
|
|
||||||
S_RAILRING29,
|
|
||||||
S_RAILRING30,
|
|
||||||
S_RAILRING31,
|
|
||||||
S_RAILRING32,
|
|
||||||
S_RAILRING33,
|
|
||||||
S_RAILRING34,
|
|
||||||
S_RAILRING35,
|
|
||||||
|
|
||||||
// Infinity Ring
|
|
||||||
S_INFINITYRING1,
|
|
||||||
S_INFINITYRING2,
|
|
||||||
S_INFINITYRING3,
|
|
||||||
S_INFINITYRING4,
|
|
||||||
S_INFINITYRING5,
|
|
||||||
S_INFINITYRING6,
|
|
||||||
S_INFINITYRING7,
|
|
||||||
S_INFINITYRING8,
|
|
||||||
S_INFINITYRING9,
|
|
||||||
S_INFINITYRING10,
|
|
||||||
S_INFINITYRING11,
|
|
||||||
S_INFINITYRING12,
|
|
||||||
S_INFINITYRING13,
|
|
||||||
S_INFINITYRING14,
|
|
||||||
S_INFINITYRING15,
|
|
||||||
S_INFINITYRING16,
|
|
||||||
S_INFINITYRING17,
|
|
||||||
S_INFINITYRING18,
|
|
||||||
S_INFINITYRING19,
|
|
||||||
S_INFINITYRING20,
|
|
||||||
S_INFINITYRING21,
|
|
||||||
S_INFINITYRING22,
|
|
||||||
S_INFINITYRING23,
|
|
||||||
S_INFINITYRING24,
|
|
||||||
S_INFINITYRING25,
|
|
||||||
S_INFINITYRING26,
|
|
||||||
S_INFINITYRING27,
|
|
||||||
S_INFINITYRING28,
|
|
||||||
S_INFINITYRING29,
|
|
||||||
S_INFINITYRING30,
|
|
||||||
S_INFINITYRING31,
|
|
||||||
S_INFINITYRING32,
|
|
||||||
S_INFINITYRING33,
|
|
||||||
S_INFINITYRING34,
|
|
||||||
S_INFINITYRING35,
|
|
||||||
|
|
||||||
// Automatic Ring
|
|
||||||
S_AUTOMATICRING1,
|
|
||||||
S_AUTOMATICRING2,
|
|
||||||
S_AUTOMATICRING3,
|
|
||||||
S_AUTOMATICRING4,
|
|
||||||
S_AUTOMATICRING5,
|
|
||||||
S_AUTOMATICRING6,
|
|
||||||
S_AUTOMATICRING7,
|
|
||||||
S_AUTOMATICRING8,
|
|
||||||
S_AUTOMATICRING9,
|
|
||||||
S_AUTOMATICRING10,
|
|
||||||
S_AUTOMATICRING11,
|
|
||||||
S_AUTOMATICRING12,
|
|
||||||
S_AUTOMATICRING13,
|
|
||||||
S_AUTOMATICRING14,
|
|
||||||
S_AUTOMATICRING15,
|
|
||||||
S_AUTOMATICRING16,
|
|
||||||
S_AUTOMATICRING17,
|
|
||||||
S_AUTOMATICRING18,
|
|
||||||
S_AUTOMATICRING19,
|
|
||||||
S_AUTOMATICRING20,
|
|
||||||
S_AUTOMATICRING21,
|
|
||||||
S_AUTOMATICRING22,
|
|
||||||
S_AUTOMATICRING23,
|
|
||||||
S_AUTOMATICRING24,
|
|
||||||
S_AUTOMATICRING25,
|
|
||||||
S_AUTOMATICRING26,
|
|
||||||
S_AUTOMATICRING27,
|
|
||||||
S_AUTOMATICRING28,
|
|
||||||
S_AUTOMATICRING29,
|
|
||||||
S_AUTOMATICRING30,
|
|
||||||
S_AUTOMATICRING31,
|
|
||||||
S_AUTOMATICRING32,
|
|
||||||
S_AUTOMATICRING33,
|
|
||||||
S_AUTOMATICRING34,
|
|
||||||
S_AUTOMATICRING35,
|
|
||||||
|
|
||||||
// Explosion Ring
|
|
||||||
S_EXPLOSIONRING1,
|
|
||||||
S_EXPLOSIONRING2,
|
|
||||||
S_EXPLOSIONRING3,
|
|
||||||
S_EXPLOSIONRING4,
|
|
||||||
S_EXPLOSIONRING5,
|
|
||||||
S_EXPLOSIONRING6,
|
|
||||||
S_EXPLOSIONRING7,
|
|
||||||
S_EXPLOSIONRING8,
|
|
||||||
S_EXPLOSIONRING9,
|
|
||||||
S_EXPLOSIONRING10,
|
|
||||||
S_EXPLOSIONRING11,
|
|
||||||
S_EXPLOSIONRING12,
|
|
||||||
S_EXPLOSIONRING13,
|
|
||||||
S_EXPLOSIONRING14,
|
|
||||||
S_EXPLOSIONRING15,
|
|
||||||
S_EXPLOSIONRING16,
|
|
||||||
S_EXPLOSIONRING17,
|
|
||||||
S_EXPLOSIONRING18,
|
|
||||||
S_EXPLOSIONRING19,
|
|
||||||
S_EXPLOSIONRING20,
|
|
||||||
S_EXPLOSIONRING21,
|
|
||||||
S_EXPLOSIONRING22,
|
|
||||||
S_EXPLOSIONRING23,
|
|
||||||
S_EXPLOSIONRING24,
|
|
||||||
S_EXPLOSIONRING25,
|
|
||||||
S_EXPLOSIONRING26,
|
|
||||||
S_EXPLOSIONRING27,
|
|
||||||
S_EXPLOSIONRING28,
|
|
||||||
S_EXPLOSIONRING29,
|
|
||||||
S_EXPLOSIONRING30,
|
|
||||||
S_EXPLOSIONRING31,
|
|
||||||
S_EXPLOSIONRING32,
|
|
||||||
S_EXPLOSIONRING33,
|
|
||||||
S_EXPLOSIONRING34,
|
|
||||||
S_EXPLOSIONRING35,
|
|
||||||
|
|
||||||
// Scatter Ring
|
|
||||||
S_SCATTERRING1,
|
|
||||||
S_SCATTERRING2,
|
|
||||||
S_SCATTERRING3,
|
|
||||||
S_SCATTERRING4,
|
|
||||||
S_SCATTERRING5,
|
|
||||||
S_SCATTERRING6,
|
|
||||||
S_SCATTERRING7,
|
|
||||||
S_SCATTERRING8,
|
|
||||||
S_SCATTERRING9,
|
|
||||||
S_SCATTERRING10,
|
|
||||||
S_SCATTERRING11,
|
|
||||||
S_SCATTERRING12,
|
|
||||||
S_SCATTERRING13,
|
|
||||||
S_SCATTERRING14,
|
|
||||||
S_SCATTERRING15,
|
|
||||||
S_SCATTERRING16,
|
|
||||||
S_SCATTERRING17,
|
|
||||||
S_SCATTERRING18,
|
|
||||||
S_SCATTERRING19,
|
|
||||||
S_SCATTERRING20,
|
|
||||||
S_SCATTERRING21,
|
|
||||||
S_SCATTERRING22,
|
|
||||||
S_SCATTERRING23,
|
|
||||||
S_SCATTERRING24,
|
|
||||||
S_SCATTERRING25,
|
|
||||||
S_SCATTERRING26,
|
|
||||||
S_SCATTERRING27,
|
|
||||||
S_SCATTERRING28,
|
|
||||||
S_SCATTERRING29,
|
|
||||||
S_SCATTERRING30,
|
|
||||||
S_SCATTERRING31,
|
|
||||||
S_SCATTERRING32,
|
|
||||||
S_SCATTERRING33,
|
|
||||||
S_SCATTERRING34,
|
|
||||||
S_SCATTERRING35,
|
|
||||||
|
|
||||||
// Grenade Ring
|
|
||||||
S_GRENADERING1,
|
|
||||||
S_GRENADERING2,
|
|
||||||
S_GRENADERING3,
|
|
||||||
S_GRENADERING4,
|
|
||||||
S_GRENADERING5,
|
|
||||||
S_GRENADERING6,
|
|
||||||
S_GRENADERING7,
|
|
||||||
S_GRENADERING8,
|
|
||||||
S_GRENADERING9,
|
|
||||||
S_GRENADERING10,
|
|
||||||
S_GRENADERING11,
|
|
||||||
S_GRENADERING12,
|
|
||||||
S_GRENADERING13,
|
|
||||||
S_GRENADERING14,
|
|
||||||
S_GRENADERING15,
|
|
||||||
S_GRENADERING16,
|
|
||||||
S_GRENADERING17,
|
|
||||||
S_GRENADERING18,
|
|
||||||
S_GRENADERING19,
|
|
||||||
S_GRENADERING20,
|
|
||||||
S_GRENADERING21,
|
|
||||||
S_GRENADERING22,
|
|
||||||
S_GRENADERING23,
|
|
||||||
S_GRENADERING24,
|
|
||||||
S_GRENADERING25,
|
|
||||||
S_GRENADERING26,
|
|
||||||
S_GRENADERING27,
|
|
||||||
S_GRENADERING28,
|
|
||||||
S_GRENADERING29,
|
|
||||||
S_GRENADERING30,
|
|
||||||
S_GRENADERING31,
|
|
||||||
S_GRENADERING32,
|
|
||||||
S_GRENADERING33,
|
|
||||||
S_GRENADERING34,
|
|
||||||
S_GRENADERING35,
|
|
||||||
|
|
||||||
// Weapon pickup
|
// Weapon pickup
|
||||||
S_BOUNCEPICKUP1,
|
S_BOUNCEPICKUP,
|
||||||
S_BOUNCEPICKUP2,
|
|
||||||
S_BOUNCEPICKUP3,
|
|
||||||
S_BOUNCEPICKUP4,
|
|
||||||
S_BOUNCEPICKUP5,
|
|
||||||
S_BOUNCEPICKUP6,
|
|
||||||
S_BOUNCEPICKUP7,
|
|
||||||
S_BOUNCEPICKUP8,
|
|
||||||
S_BOUNCEPICKUP9,
|
|
||||||
S_BOUNCEPICKUP10,
|
|
||||||
S_BOUNCEPICKUP11,
|
|
||||||
S_BOUNCEPICKUP12,
|
|
||||||
S_BOUNCEPICKUP13,
|
|
||||||
S_BOUNCEPICKUP14,
|
|
||||||
S_BOUNCEPICKUP15,
|
|
||||||
S_BOUNCEPICKUP16,
|
|
||||||
|
|
||||||
S_BOUNCEPICKUPFADE1,
|
S_BOUNCEPICKUPFADE1,
|
||||||
S_BOUNCEPICKUPFADE2,
|
S_BOUNCEPICKUPFADE2,
|
||||||
S_BOUNCEPICKUPFADE3,
|
S_BOUNCEPICKUPFADE3,
|
||||||
|
@ -2849,23 +2469,7 @@ typedef enum state
|
||||||
S_BOUNCEPICKUPFADE7,
|
S_BOUNCEPICKUPFADE7,
|
||||||
S_BOUNCEPICKUPFADE8,
|
S_BOUNCEPICKUPFADE8,
|
||||||
|
|
||||||
S_RAILPICKUP1,
|
S_RAILPICKUP,
|
||||||
S_RAILPICKUP2,
|
|
||||||
S_RAILPICKUP3,
|
|
||||||
S_RAILPICKUP4,
|
|
||||||
S_RAILPICKUP5,
|
|
||||||
S_RAILPICKUP6,
|
|
||||||
S_RAILPICKUP7,
|
|
||||||
S_RAILPICKUP8,
|
|
||||||
S_RAILPICKUP9,
|
|
||||||
S_RAILPICKUP10,
|
|
||||||
S_RAILPICKUP11,
|
|
||||||
S_RAILPICKUP12,
|
|
||||||
S_RAILPICKUP13,
|
|
||||||
S_RAILPICKUP14,
|
|
||||||
S_RAILPICKUP15,
|
|
||||||
S_RAILPICKUP16,
|
|
||||||
|
|
||||||
S_RAILPICKUPFADE1,
|
S_RAILPICKUPFADE1,
|
||||||
S_RAILPICKUPFADE2,
|
S_RAILPICKUPFADE2,
|
||||||
S_RAILPICKUPFADE3,
|
S_RAILPICKUPFADE3,
|
||||||
|
@ -2875,23 +2479,7 @@ typedef enum state
|
||||||
S_RAILPICKUPFADE7,
|
S_RAILPICKUPFADE7,
|
||||||
S_RAILPICKUPFADE8,
|
S_RAILPICKUPFADE8,
|
||||||
|
|
||||||
S_AUTOPICKUP1,
|
S_AUTOPICKUP,
|
||||||
S_AUTOPICKUP2,
|
|
||||||
S_AUTOPICKUP3,
|
|
||||||
S_AUTOPICKUP4,
|
|
||||||
S_AUTOPICKUP5,
|
|
||||||
S_AUTOPICKUP6,
|
|
||||||
S_AUTOPICKUP7,
|
|
||||||
S_AUTOPICKUP8,
|
|
||||||
S_AUTOPICKUP9,
|
|
||||||
S_AUTOPICKUP10,
|
|
||||||
S_AUTOPICKUP11,
|
|
||||||
S_AUTOPICKUP12,
|
|
||||||
S_AUTOPICKUP13,
|
|
||||||
S_AUTOPICKUP14,
|
|
||||||
S_AUTOPICKUP15,
|
|
||||||
S_AUTOPICKUP16,
|
|
||||||
|
|
||||||
S_AUTOPICKUPFADE1,
|
S_AUTOPICKUPFADE1,
|
||||||
S_AUTOPICKUPFADE2,
|
S_AUTOPICKUPFADE2,
|
||||||
S_AUTOPICKUPFADE3,
|
S_AUTOPICKUPFADE3,
|
||||||
|
@ -2901,23 +2489,7 @@ typedef enum state
|
||||||
S_AUTOPICKUPFADE7,
|
S_AUTOPICKUPFADE7,
|
||||||
S_AUTOPICKUPFADE8,
|
S_AUTOPICKUPFADE8,
|
||||||
|
|
||||||
S_EXPLODEPICKUP1,
|
S_EXPLODEPICKUP,
|
||||||
S_EXPLODEPICKUP2,
|
|
||||||
S_EXPLODEPICKUP3,
|
|
||||||
S_EXPLODEPICKUP4,
|
|
||||||
S_EXPLODEPICKUP5,
|
|
||||||
S_EXPLODEPICKUP6,
|
|
||||||
S_EXPLODEPICKUP7,
|
|
||||||
S_EXPLODEPICKUP8,
|
|
||||||
S_EXPLODEPICKUP9,
|
|
||||||
S_EXPLODEPICKUP10,
|
|
||||||
S_EXPLODEPICKUP11,
|
|
||||||
S_EXPLODEPICKUP12,
|
|
||||||
S_EXPLODEPICKUP13,
|
|
||||||
S_EXPLODEPICKUP14,
|
|
||||||
S_EXPLODEPICKUP15,
|
|
||||||
S_EXPLODEPICKUP16,
|
|
||||||
|
|
||||||
S_EXPLODEPICKUPFADE1,
|
S_EXPLODEPICKUPFADE1,
|
||||||
S_EXPLODEPICKUPFADE2,
|
S_EXPLODEPICKUPFADE2,
|
||||||
S_EXPLODEPICKUPFADE3,
|
S_EXPLODEPICKUPFADE3,
|
||||||
|
@ -2927,23 +2499,7 @@ typedef enum state
|
||||||
S_EXPLODEPICKUPFADE7,
|
S_EXPLODEPICKUPFADE7,
|
||||||
S_EXPLODEPICKUPFADE8,
|
S_EXPLODEPICKUPFADE8,
|
||||||
|
|
||||||
S_SCATTERPICKUP1,
|
S_SCATTERPICKUP,
|
||||||
S_SCATTERPICKUP2,
|
|
||||||
S_SCATTERPICKUP3,
|
|
||||||
S_SCATTERPICKUP4,
|
|
||||||
S_SCATTERPICKUP5,
|
|
||||||
S_SCATTERPICKUP6,
|
|
||||||
S_SCATTERPICKUP7,
|
|
||||||
S_SCATTERPICKUP8,
|
|
||||||
S_SCATTERPICKUP9,
|
|
||||||
S_SCATTERPICKUP10,
|
|
||||||
S_SCATTERPICKUP11,
|
|
||||||
S_SCATTERPICKUP12,
|
|
||||||
S_SCATTERPICKUP13,
|
|
||||||
S_SCATTERPICKUP14,
|
|
||||||
S_SCATTERPICKUP15,
|
|
||||||
S_SCATTERPICKUP16,
|
|
||||||
|
|
||||||
S_SCATTERPICKUPFADE1,
|
S_SCATTERPICKUPFADE1,
|
||||||
S_SCATTERPICKUPFADE2,
|
S_SCATTERPICKUPFADE2,
|
||||||
S_SCATTERPICKUPFADE3,
|
S_SCATTERPICKUPFADE3,
|
||||||
|
@ -2953,23 +2509,7 @@ typedef enum state
|
||||||
S_SCATTERPICKUPFADE7,
|
S_SCATTERPICKUPFADE7,
|
||||||
S_SCATTERPICKUPFADE8,
|
S_SCATTERPICKUPFADE8,
|
||||||
|
|
||||||
S_GRENADEPICKUP1,
|
S_GRENADEPICKUP,
|
||||||
S_GRENADEPICKUP2,
|
|
||||||
S_GRENADEPICKUP3,
|
|
||||||
S_GRENADEPICKUP4,
|
|
||||||
S_GRENADEPICKUP5,
|
|
||||||
S_GRENADEPICKUP6,
|
|
||||||
S_GRENADEPICKUP7,
|
|
||||||
S_GRENADEPICKUP8,
|
|
||||||
S_GRENADEPICKUP9,
|
|
||||||
S_GRENADEPICKUP10,
|
|
||||||
S_GRENADEPICKUP11,
|
|
||||||
S_GRENADEPICKUP12,
|
|
||||||
S_GRENADEPICKUP13,
|
|
||||||
S_GRENADEPICKUP14,
|
|
||||||
S_GRENADEPICKUP15,
|
|
||||||
S_GRENADEPICKUP16,
|
|
||||||
|
|
||||||
S_GRENADEPICKUPFADE1,
|
S_GRENADEPICKUPFADE1,
|
||||||
S_GRENADEPICKUPFADE2,
|
S_GRENADEPICKUPFADE2,
|
||||||
S_GRENADEPICKUPFADE3,
|
S_GRENADEPICKUPFADE3,
|
||||||
|
@ -3350,101 +2890,22 @@ typedef enum state
|
||||||
|
|
||||||
S_ROCKSPAWN,
|
S_ROCKSPAWN,
|
||||||
|
|
||||||
S_ROCKCRUMBLEA1,
|
S_ROCKCRUMBLEA,
|
||||||
S_ROCKCRUMBLEA2,
|
S_ROCKCRUMBLEB,
|
||||||
S_ROCKCRUMBLEA3,
|
S_ROCKCRUMBLEC,
|
||||||
S_ROCKCRUMBLEA4,
|
S_ROCKCRUMBLED,
|
||||||
S_ROCKCRUMBLEA5,
|
S_ROCKCRUMBLEE,
|
||||||
|
S_ROCKCRUMBLEF,
|
||||||
S_ROCKCRUMBLEB1,
|
S_ROCKCRUMBLEG,
|
||||||
S_ROCKCRUMBLEB2,
|
S_ROCKCRUMBLEH,
|
||||||
S_ROCKCRUMBLEB3,
|
S_ROCKCRUMBLEI,
|
||||||
S_ROCKCRUMBLEB4,
|
S_ROCKCRUMBLEJ,
|
||||||
S_ROCKCRUMBLEB5,
|
S_ROCKCRUMBLEK,
|
||||||
|
S_ROCKCRUMBLEL,
|
||||||
S_ROCKCRUMBLEC1,
|
S_ROCKCRUMBLEM,
|
||||||
S_ROCKCRUMBLEC2,
|
S_ROCKCRUMBLEN,
|
||||||
S_ROCKCRUMBLEC3,
|
S_ROCKCRUMBLEO,
|
||||||
S_ROCKCRUMBLEC4,
|
S_ROCKCRUMBLEP,
|
||||||
S_ROCKCRUMBLEC5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLED1,
|
|
||||||
S_ROCKCRUMBLED2,
|
|
||||||
S_ROCKCRUMBLED3,
|
|
||||||
S_ROCKCRUMBLED4,
|
|
||||||
S_ROCKCRUMBLED5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEE1,
|
|
||||||
S_ROCKCRUMBLEE2,
|
|
||||||
S_ROCKCRUMBLEE3,
|
|
||||||
S_ROCKCRUMBLEE4,
|
|
||||||
S_ROCKCRUMBLEE5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEF1,
|
|
||||||
S_ROCKCRUMBLEF2,
|
|
||||||
S_ROCKCRUMBLEF3,
|
|
||||||
S_ROCKCRUMBLEF4,
|
|
||||||
S_ROCKCRUMBLEF5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEG1,
|
|
||||||
S_ROCKCRUMBLEG2,
|
|
||||||
S_ROCKCRUMBLEG3,
|
|
||||||
S_ROCKCRUMBLEG4,
|
|
||||||
S_ROCKCRUMBLEG5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEH1,
|
|
||||||
S_ROCKCRUMBLEH2,
|
|
||||||
S_ROCKCRUMBLEH3,
|
|
||||||
S_ROCKCRUMBLEH4,
|
|
||||||
S_ROCKCRUMBLEH5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEI1,
|
|
||||||
S_ROCKCRUMBLEI2,
|
|
||||||
S_ROCKCRUMBLEI3,
|
|
||||||
S_ROCKCRUMBLEI4,
|
|
||||||
S_ROCKCRUMBLEI5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEJ1,
|
|
||||||
S_ROCKCRUMBLEJ2,
|
|
||||||
S_ROCKCRUMBLEJ3,
|
|
||||||
S_ROCKCRUMBLEJ4,
|
|
||||||
S_ROCKCRUMBLEJ5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEK1,
|
|
||||||
S_ROCKCRUMBLEK2,
|
|
||||||
S_ROCKCRUMBLEK3,
|
|
||||||
S_ROCKCRUMBLEK4,
|
|
||||||
S_ROCKCRUMBLEK5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEL1,
|
|
||||||
S_ROCKCRUMBLEL2,
|
|
||||||
S_ROCKCRUMBLEL3,
|
|
||||||
S_ROCKCRUMBLEL4,
|
|
||||||
S_ROCKCRUMBLEL5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEM1,
|
|
||||||
S_ROCKCRUMBLEM2,
|
|
||||||
S_ROCKCRUMBLEM3,
|
|
||||||
S_ROCKCRUMBLEM4,
|
|
||||||
S_ROCKCRUMBLEM5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEN1,
|
|
||||||
S_ROCKCRUMBLEN2,
|
|
||||||
S_ROCKCRUMBLEN3,
|
|
||||||
S_ROCKCRUMBLEN4,
|
|
||||||
S_ROCKCRUMBLEN5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEO1,
|
|
||||||
S_ROCKCRUMBLEO2,
|
|
||||||
S_ROCKCRUMBLEO3,
|
|
||||||
S_ROCKCRUMBLEO4,
|
|
||||||
S_ROCKCRUMBLEO5,
|
|
||||||
|
|
||||||
S_ROCKCRUMBLEP1,
|
|
||||||
S_ROCKCRUMBLEP2,
|
|
||||||
S_ROCKCRUMBLEP3,
|
|
||||||
S_ROCKCRUMBLEP4,
|
|
||||||
S_ROCKCRUMBLEP5,
|
|
||||||
|
|
||||||
S_SRB1_CRAWLA1,
|
S_SRB1_CRAWLA1,
|
||||||
S_SRB1_CRAWLA2,
|
S_SRB1_CRAWLA2,
|
||||||
|
|
|
@ -1640,17 +1640,59 @@ static int lib_sStopSound(lua_State *L)
|
||||||
|
|
||||||
static int lib_sChangeMusic(lua_State *L)
|
static int lib_sChangeMusic(lua_State *L)
|
||||||
{
|
{
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
const char *music_name;
|
||||||
|
UINT32 music_num;
|
||||||
|
char music_compat_name[7];
|
||||||
|
|
||||||
|
boolean looping;
|
||||||
|
player_t *player = NULL;
|
||||||
|
UINT16 music_flags = 0;
|
||||||
|
NOHUD
|
||||||
|
|
||||||
|
if (lua_isnumber(L, 1))
|
||||||
|
{
|
||||||
|
music_num = (UINT32)luaL_checkinteger(L, 1);
|
||||||
|
music_flags = (UINT16)(music_num & 0x0000FFFF);
|
||||||
|
if (music_flags && music_flags <= 1035)
|
||||||
|
snprintf(music_compat_name, 7, "%sM", G_BuildMapName((INT32)music_flags));
|
||||||
|
else if (music_flags && music_flags <= 1050)
|
||||||
|
strncpy(music_compat_name, compat_special_music_slots[music_flags - 1036], 7);
|
||||||
|
else
|
||||||
|
music_compat_name[0] = 0; // becomes empty string
|
||||||
|
music_compat_name[6] = 0;
|
||||||
|
music_name = (const char *)&music_compat_name;
|
||||||
|
music_flags = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
music_num = 0;
|
||||||
|
music_name = luaL_checkstring(L, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
looping = (boolean)lua_opttrueboolean(L, 2);
|
||||||
|
|
||||||
|
#else
|
||||||
const char *music_name = luaL_checkstring(L, 1);
|
const char *music_name = luaL_checkstring(L, 1);
|
||||||
boolean looping = (boolean)lua_opttrueboolean(L, 2);
|
boolean looping = (boolean)lua_opttrueboolean(L, 2);
|
||||||
player_t *player = NULL;
|
player_t *player = NULL;
|
||||||
UINT16 music_flags = 0;
|
UINT16 music_flags = 0;
|
||||||
NOHUD
|
NOHUD
|
||||||
|
|
||||||
|
#endif
|
||||||
if (!lua_isnone(L, 3) && lua_isuserdata(L, 3))
|
if (!lua_isnone(L, 3) && lua_isuserdata(L, 3))
|
||||||
{
|
{
|
||||||
player = *((player_t **)luaL_checkudata(L, 3, META_PLAYER));
|
player = *((player_t **)luaL_checkudata(L, 3, META_PLAYER));
|
||||||
if (!player)
|
if (!player)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
if (music_num)
|
||||||
|
music_flags = (UINT16)((music_num & 0x7FFF0000) >> 16);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
|
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
|
||||||
|
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
|
|
|
@ -768,4 +768,33 @@ boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source)
|
||||||
return hooked;
|
return hooked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LUAh_NetArchiveHook(lua_CFunction archFunc)
|
||||||
|
{
|
||||||
|
hook_p hookp;
|
||||||
|
|
||||||
|
if (!gL || !(hooksAvailable[hook_NetVars/8] & (1<<(hook_NetVars%8))))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// stack: tables
|
||||||
|
I_Assert(lua_gettop(gL) > 0);
|
||||||
|
I_Assert(lua_istable(gL, -1));
|
||||||
|
|
||||||
|
// tables becomes an upvalue of archFunc
|
||||||
|
lua_pushvalue(gL, -1);
|
||||||
|
lua_pushcclosure(gL, archFunc, 1);
|
||||||
|
// stack: tables, archFunc
|
||||||
|
|
||||||
|
for (hookp = roothook; hookp; hookp = hookp->next)
|
||||||
|
if (hookp->type == hook_NetVars)
|
||||||
|
{
|
||||||
|
lua_pushfstring(gL, FMT_HOOKID, hookp->id);
|
||||||
|
lua_gettable(gL, LUA_REGISTRYINDEX);
|
||||||
|
lua_pushvalue(gL, -2); // archFunc
|
||||||
|
LUA_Call(gL, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_pop(gL, 1); // pop archFunc
|
||||||
|
// stack: tables
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1111,9 +1111,13 @@ static int ffloor_set(lua_State *L)
|
||||||
case ffloor_bottompic:
|
case ffloor_bottompic:
|
||||||
*ffloor->bottompic = P_AddLevelFlatRuntime(luaL_checkstring(L, 3));
|
*ffloor->bottompic = P_AddLevelFlatRuntime(luaL_checkstring(L, 3));
|
||||||
break;
|
break;
|
||||||
case ffloor_flags:
|
case ffloor_flags: {
|
||||||
|
ffloortype_e oldflags = ffloor->flags; // store FOF's old flags
|
||||||
ffloor->flags = luaL_checkinteger(L, 3);
|
ffloor->flags = luaL_checkinteger(L, 3);
|
||||||
|
if (ffloor->flags != oldflags)
|
||||||
|
ffloor->target->moved = true; // reset target sector's lightlist
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case ffloor_alpha:
|
case ffloor_alpha:
|
||||||
ffloor->alpha = (INT32)luaL_checkinteger(L, 3);
|
ffloor->alpha = (INT32)luaL_checkinteger(L, 3);
|
||||||
break;
|
break;
|
||||||
|
@ -1157,14 +1161,11 @@ static int mapheaderinfo_get(lua_State *L)
|
||||||
{
|
{
|
||||||
mapheader_t *header = *((mapheader_t **)luaL_checkudata(L, 1, META_MAPHEADER));
|
mapheader_t *header = *((mapheader_t **)luaL_checkudata(L, 1, META_MAPHEADER));
|
||||||
const char *field = luaL_checkstring(L, 2);
|
const char *field = luaL_checkstring(L, 2);
|
||||||
//INT16 i;
|
INT16 i;
|
||||||
if (fastcmp(field,"lvlttl")) {
|
if (fastcmp(field,"lvlttl"))
|
||||||
//for (i = 0; i < 21; i++)
|
lua_pushstring(L, header->lvlttl);
|
||||||
// if (!header->lvlttl[i])
|
else if (fastcmp(field,"subttl"))
|
||||||
// break;
|
lua_pushstring(L, header->subttl);
|
||||||
lua_pushlstring(L, header->lvlttl, 21);
|
|
||||||
} else if (fastcmp(field,"subttl"))
|
|
||||||
lua_pushlstring(L, header->subttl, 32);
|
|
||||||
else if (fastcmp(field,"actnum"))
|
else if (fastcmp(field,"actnum"))
|
||||||
lua_pushinteger(L, header->actnum);
|
lua_pushinteger(L, header->actnum);
|
||||||
else if (fastcmp(field,"typeoflevel"))
|
else if (fastcmp(field,"typeoflevel"))
|
||||||
|
@ -1172,11 +1173,11 @@ static int mapheaderinfo_get(lua_State *L)
|
||||||
else if (fastcmp(field,"nextlevel"))
|
else if (fastcmp(field,"nextlevel"))
|
||||||
lua_pushinteger(L, header->nextlevel);
|
lua_pushinteger(L, header->nextlevel);
|
||||||
else if (fastcmp(field,"musname"))
|
else if (fastcmp(field,"musname"))
|
||||||
lua_pushlstring(L, header->musname, 6);
|
lua_pushstring(L, header->musname);
|
||||||
else if (fastcmp(field,"mustrack"))
|
else if (fastcmp(field,"mustrack"))
|
||||||
lua_pushinteger(L, header->mustrack);
|
lua_pushinteger(L, header->mustrack);
|
||||||
else if (fastcmp(field,"forcecharacter"))
|
else if (fastcmp(field,"forcecharacter"))
|
||||||
lua_pushlstring(L, header->forcecharacter, 16);
|
lua_pushstring(L, header->forcecharacter);
|
||||||
else if (fastcmp(field,"weather"))
|
else if (fastcmp(field,"weather"))
|
||||||
lua_pushinteger(L, header->weather);
|
lua_pushinteger(L, header->weather);
|
||||||
else if (fastcmp(field,"skynum"))
|
else if (fastcmp(field,"skynum"))
|
||||||
|
@ -1187,12 +1188,15 @@ static int mapheaderinfo_get(lua_State *L)
|
||||||
lua_pushinteger(L, header->skybox_scaley);
|
lua_pushinteger(L, header->skybox_scaley);
|
||||||
else if (fastcmp(field,"skybox_scalez"))
|
else if (fastcmp(field,"skybox_scalez"))
|
||||||
lua_pushinteger(L, header->skybox_scalez);
|
lua_pushinteger(L, header->skybox_scalez);
|
||||||
else if (fastcmp(field,"interscreen"))
|
else if (fastcmp(field,"interscreen")) {
|
||||||
lua_pushlstring(L, header->interscreen, 8);
|
for (i = 0; i < 8; i++)
|
||||||
else if (fastcmp(field,"runsoc"))
|
if (!header->interscreen[i])
|
||||||
lua_pushlstring(L, header->runsoc, 32);
|
break;
|
||||||
|
lua_pushlstring(L, header->interscreen, i);
|
||||||
|
} else if (fastcmp(field,"runsoc"))
|
||||||
|
lua_pushstring(L, header->runsoc);
|
||||||
else if (fastcmp(field,"scriptname"))
|
else if (fastcmp(field,"scriptname"))
|
||||||
lua_pushlstring(L, header->scriptname, 32);
|
lua_pushstring(L, header->scriptname);
|
||||||
else if (fastcmp(field,"precutscenenum"))
|
else if (fastcmp(field,"precutscenenum"))
|
||||||
lua_pushinteger(L, header->precutscenenum);
|
lua_pushinteger(L, header->precutscenenum);
|
||||||
else if (fastcmp(field,"cutscenenum"))
|
else if (fastcmp(field,"cutscenenum"))
|
||||||
|
@ -1217,11 +1221,11 @@ static int mapheaderinfo_get(lua_State *L)
|
||||||
else {
|
else {
|
||||||
// Read custom vars now
|
// Read custom vars now
|
||||||
// (note: don't include the "LUA." in your lua scripts!)
|
// (note: don't include the "LUA." in your lua scripts!)
|
||||||
UINT8 i = 0;
|
UINT8 j = 0;
|
||||||
for (;i < header->numCustomOptions && !fastcmp(field, header->customopts[i].option); ++i);
|
for (;j < header->numCustomOptions && !fastcmp(field, header->customopts[j].option); ++j);
|
||||||
|
|
||||||
if(i < header->numCustomOptions)
|
if(j < header->numCustomOptions)
|
||||||
lua_pushlstring(L, header->customopts[i].value, 255);
|
lua_pushstring(L, header->customopts[j].value);
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ static int lib_all7emeralds(lua_State *L)
|
||||||
// Returns both color and frame numbers!
|
// Returns both color and frame numbers!
|
||||||
static int lib_coloropposite(lua_State *L)
|
static int lib_coloropposite(lua_State *L)
|
||||||
{
|
{
|
||||||
int colornum = ((int)luaL_checkinteger(L, 1)) & MAXSKINCOLORS;
|
int colornum = ((int)luaL_checkinteger(L, 1)) % MAXSKINCOLORS;
|
||||||
lua_pushinteger(L, Color_Opposite[colornum*2]); // push color
|
lua_pushinteger(L, Color_Opposite[colornum*2]); // push color
|
||||||
lua_pushinteger(L, Color_Opposite[colornum*2+1]); // push frame
|
lua_pushinteger(L, Color_Opposite[colornum*2+1]); // push frame
|
||||||
return 2;
|
return 2;
|
||||||
|
|
|
@ -34,6 +34,7 @@ enum mobj_e {
|
||||||
mobj_angle,
|
mobj_angle,
|
||||||
mobj_sprite,
|
mobj_sprite,
|
||||||
mobj_frame,
|
mobj_frame,
|
||||||
|
mobj_anim_duration,
|
||||||
mobj_touching_sectorlist,
|
mobj_touching_sectorlist,
|
||||||
mobj_subsector,
|
mobj_subsector,
|
||||||
mobj_floorz,
|
mobj_floorz,
|
||||||
|
@ -92,6 +93,7 @@ static const char *const mobj_opt[] = {
|
||||||
"angle",
|
"angle",
|
||||||
"sprite",
|
"sprite",
|
||||||
"frame",
|
"frame",
|
||||||
|
"anim_duration",
|
||||||
"touching_sectorlist",
|
"touching_sectorlist",
|
||||||
"subsector",
|
"subsector",
|
||||||
"floorz",
|
"floorz",
|
||||||
|
@ -187,6 +189,9 @@ static int mobj_get(lua_State *L)
|
||||||
case mobj_frame:
|
case mobj_frame:
|
||||||
lua_pushinteger(L, mo->frame);
|
lua_pushinteger(L, mo->frame);
|
||||||
break;
|
break;
|
||||||
|
case mobj_anim_duration:
|
||||||
|
lua_pushinteger(L, mo->anim_duration);
|
||||||
|
break;
|
||||||
case mobj_touching_sectorlist:
|
case mobj_touching_sectorlist:
|
||||||
return UNIMPLEMENTED;
|
return UNIMPLEMENTED;
|
||||||
case mobj_subsector:
|
case mobj_subsector:
|
||||||
|
@ -406,6 +411,9 @@ static int mobj_set(lua_State *L)
|
||||||
case mobj_frame:
|
case mobj_frame:
|
||||||
mo->frame = (UINT32)luaL_checkinteger(L, 3);
|
mo->frame = (UINT32)luaL_checkinteger(L, 3);
|
||||||
break;
|
break;
|
||||||
|
case mobj_anim_duration:
|
||||||
|
mo->anim_duration = (UINT16)luaL_checkinteger(L, 3);
|
||||||
|
break;
|
||||||
case mobj_touching_sectorlist:
|
case mobj_touching_sectorlist:
|
||||||
return UNIMPLEMENTED;
|
return UNIMPLEMENTED;
|
||||||
case mobj_subsector:
|
case mobj_subsector:
|
||||||
|
|
|
@ -915,30 +915,6 @@ static void UnArchiveTables(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void NetArchiveHook(lua_CFunction archFunc)
|
|
||||||
{
|
|
||||||
int TABLESINDEX;
|
|
||||||
|
|
||||||
if (!gL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
TABLESINDEX = lua_gettop(gL);
|
|
||||||
lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
|
|
||||||
I_Assert(lua_istable(gL, -1));
|
|
||||||
lua_rawgeti(gL, -1, hook_NetVars);
|
|
||||||
lua_remove(gL, -2);
|
|
||||||
I_Assert(lua_istable(gL, -1));
|
|
||||||
|
|
||||||
lua_pushvalue(gL, TABLESINDEX);
|
|
||||||
lua_pushcclosure(gL, archFunc, 1);
|
|
||||||
lua_pushnil(gL);
|
|
||||||
while (lua_next(gL, -3) != 0) {
|
|
||||||
lua_pushvalue(gL, -3); // function
|
|
||||||
LUA_Call(gL, 1);
|
|
||||||
}
|
|
||||||
lua_pop(gL, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LUA_Step(void)
|
void LUA_Step(void)
|
||||||
{
|
{
|
||||||
if (!gL)
|
if (!gL)
|
||||||
|
@ -972,7 +948,7 @@ void LUA_Archive(void)
|
||||||
}
|
}
|
||||||
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
||||||
|
|
||||||
NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
|
LUAh_NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
|
||||||
ArchiveTables();
|
ArchiveTables();
|
||||||
|
|
||||||
if (gL)
|
if (gL)
|
||||||
|
@ -1003,7 +979,7 @@ void LUA_UnArchive(void)
|
||||||
UnArchiveExtVars(th); // apply variables
|
UnArchiveExtVars(th); // apply variables
|
||||||
} while(mobjnum != UINT32_MAX); // repeat until end of mobjs marker.
|
} while(mobjnum != UINT32_MAX); // repeat until end of mobjs marker.
|
||||||
|
|
||||||
NetArchiveHook(NetUnArchive); // call the NetArchive hook in unarchive mode
|
LUAh_NetArchiveHook(NetUnArchive); // call the NetArchive hook in unarchive mode
|
||||||
UnArchiveTables();
|
UnArchiveTables();
|
||||||
|
|
||||||
if (gL)
|
if (gL)
|
||||||
|
|
|
@ -55,6 +55,7 @@ void Got_Luacmd(UINT8 **cp, INT32 playernum); // lua_consolelib.c
|
||||||
void LUA_CVarChanged(const char *name); // lua_consolelib.c
|
void LUA_CVarChanged(const char *name); // lua_consolelib.c
|
||||||
int Lua_optoption(lua_State *L, int narg,
|
int Lua_optoption(lua_State *L, int narg,
|
||||||
const char *def, const char *const lst[]);
|
const char *def, const char *const lst[]);
|
||||||
|
void LUAh_NetArchiveHook(lua_CFunction archFunc);
|
||||||
|
|
||||||
// Console wrapper
|
// Console wrapper
|
||||||
void COM_Lua_f(void);
|
void COM_Lua_f(void);
|
||||||
|
|
|
@ -108,7 +108,7 @@ static UINT8 cheatf_devmode(void)
|
||||||
G_SetGameModified(false);
|
G_SetGameModified(false);
|
||||||
for (i = 0; i < MAXUNLOCKABLES; i++)
|
for (i = 0; i < MAXUNLOCKABLES; i++)
|
||||||
unlockables[i].unlocked = true;
|
unlockables[i].unlocked = true;
|
||||||
devparm = TRUE;
|
devparm = true;
|
||||||
cv_debug |= 0x8000;
|
cv_debug |= 0x8000;
|
||||||
|
|
||||||
// Refresh secrets menu existing.
|
// Refresh secrets menu existing.
|
||||||
|
@ -880,12 +880,33 @@ static boolean OP_HeightOkay(player_t *player, UINT8 ceiling)
|
||||||
|
|
||||||
static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean ceiling)
|
static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean ceiling)
|
||||||
{
|
{
|
||||||
mapthing_t *mt;
|
mapthing_t *mt = mapthings;
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
LUA_InvalidateMapthings();
|
LUA_InvalidateMapthings();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mapthings = Z_Realloc(mapthings, ++nummapthings * sizeof (*mapthings), PU_LEVEL, NULL);
|
mapthings = Z_Realloc(mapthings, ++nummapthings * sizeof (*mapthings), PU_LEVEL, NULL);
|
||||||
|
|
||||||
|
// as Z_Realloc can relocate mapthings, quickly go through thinker list and correct
|
||||||
|
// the spawnpoints of any objects that have them to the new location
|
||||||
|
if (mt != mapthings)
|
||||||
|
{
|
||||||
|
thinker_t *th;
|
||||||
|
mobj_t *mo;
|
||||||
|
|
||||||
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
|
{
|
||||||
|
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
mo = (mobj_t *)th;
|
||||||
|
// get offset from mt, which points to old mapthings, then add new location
|
||||||
|
if (mo->spawnpoint)
|
||||||
|
mo->spawnpoint = (mo->spawnpoint - mt) + mapthings;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mt = (mapthings+nummapthings-1);
|
mt = (mapthings+nummapthings-1);
|
||||||
|
|
||||||
mt->type = type;
|
mt->type = type;
|
||||||
|
|
|
@ -6074,7 +6074,7 @@ static void M_RoomMenu(INT32 choice)
|
||||||
|
|
||||||
for (i = 0; room_list[i].header.buffer[0]; i++)
|
for (i = 0; room_list[i].header.buffer[0]; i++)
|
||||||
{
|
{
|
||||||
if(room_list[i].name != '\0')
|
if(*room_list[i].name != '\0')
|
||||||
{
|
{
|
||||||
MP_RoomMenu[i+1].text = room_list[i].name;
|
MP_RoomMenu[i+1].text = room_list[i].name;
|
||||||
roomIds[i] = room_list[i].id;
|
roomIds[i] = room_list[i].id;
|
||||||
|
@ -7409,4 +7409,3 @@ static void M_HandleFogColor(INT32 choice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -677,7 +677,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
|
||||||
else
|
else
|
||||||
snprintf(maptext, 8, "Unknown");
|
snprintf(maptext, 8, "Unknown");
|
||||||
|
|
||||||
if (gamestate == GS_LEVEL && mapheaderinfo[gamemap-1]->lvlttl)
|
if (gamestate == GS_LEVEL && mapheaderinfo[gamemap-1]->lvlttl[0] != '\0')
|
||||||
snprintf(lvlttltext, 48, "%s%s%s",
|
snprintf(lvlttltext, 48, "%s%s%s",
|
||||||
mapheaderinfo[gamemap-1]->lvlttl,
|
mapheaderinfo[gamemap-1]->lvlttl,
|
||||||
(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE",
|
(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE",
|
||||||
|
|
|
@ -6358,7 +6358,7 @@ void A_Boss2PogoTarget(mobj_t *actor)
|
||||||
|
|
||||||
if (actor->info->missilestate) // spawn the pogo stick collision box
|
if (actor->info->missilestate) // spawn the pogo stick collision box
|
||||||
{
|
{
|
||||||
mobj_t *pogo = P_SpawnMobj(actor->x, actor->y, actor->z - mobjinfo[actor->info->missilestate].height, actor->info->missilestate);
|
mobj_t *pogo = P_SpawnMobj(actor->x, actor->y, actor->z - mobjinfo[actor->info->missilestate].height, (mobjtype_t)actor->info->missilestate);
|
||||||
pogo->target = actor;
|
pogo->target = actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1339,6 +1339,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
player->pflags |= PF_ITEMHANG;
|
player->pflags |= PF_ITEMHANG;
|
||||||
|
|
||||||
|
// Can't jump first frame
|
||||||
|
player->pflags |= PF_JUMPSTASIS;
|
||||||
return;
|
return;
|
||||||
case MT_BIGMINE:
|
case MT_BIGMINE:
|
||||||
case MT_BIGAIRMINE:
|
case MT_BIGAIRMINE:
|
||||||
|
|
|
@ -212,6 +212,7 @@ void P_RemoveSavegameMobj(mobj_t *th);
|
||||||
boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state);
|
boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state);
|
||||||
boolean P_SetMobjState(mobj_t *mobj, statenum_t state);
|
boolean P_SetMobjState(mobj_t *mobj, statenum_t state);
|
||||||
void P_RunShields(void);
|
void P_RunShields(void);
|
||||||
|
void P_RunOverlays(void);
|
||||||
void P_MobjThinker(mobj_t *mobj);
|
void P_MobjThinker(mobj_t *mobj);
|
||||||
boolean P_RailThinker(mobj_t *mobj);
|
boolean P_RailThinker(mobj_t *mobj);
|
||||||
void P_PushableThinker(mobj_t *mobj);
|
void P_PushableThinker(mobj_t *mobj);
|
||||||
|
|
|
@ -503,7 +503,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true; // overhead
|
return true; // overhead
|
||||||
if (thing->z + thing->height < tmthing->z)
|
if (thing->z + thing->height < tmthing->z)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
if (tmthing->player && tmthing->flags & MF_SHOOTABLE)
|
if (tmthing->player && tmthing->flags & MF_SHOOTABLE && thing->health > 0)
|
||||||
{
|
{
|
||||||
UINT8 damagetype = 0;
|
UINT8 damagetype = 0;
|
||||||
if (thing->flags & MF_FIRE) // BURN!
|
if (thing->flags & MF_FIRE) // BURN!
|
||||||
|
@ -519,7 +519,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true; // overhead
|
return true; // overhead
|
||||||
if (tmthing->z + tmthing->height < thing->z)
|
if (tmthing->z + tmthing->height < thing->z)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
if (thing->player && thing->flags & MF_SHOOTABLE)
|
if (thing->player && thing->flags & MF_SHOOTABLE && tmthing->health > 0)
|
||||||
{
|
{
|
||||||
UINT8 damagetype = 0;
|
UINT8 damagetype = 0;
|
||||||
if (tmthing->flags & MF_FIRE) // BURN!
|
if (tmthing->flags & MF_FIRE) // BURN!
|
||||||
|
@ -2646,8 +2646,8 @@ isblocking:
|
||||||
|
|
||||||
climbangle += (ANGLE_90 * (whichside ? -1 : 1));
|
climbangle += (ANGLE_90 * (whichside ? -1 : 1));
|
||||||
|
|
||||||
if (((!slidemo->player->climbing && abs(slidemo->angle - ANGLE_90 - climbline) < ANGLE_45)
|
if (((!slidemo->player->climbing && abs((slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45)
|
||||||
|| (slidemo->player->climbing == 1 && abs(slidemo->angle - climbline) < ANGLE_135))
|
|| (slidemo->player->climbing == 1 && abs((slidemo->angle - climbline)) < ANGLE_135))
|
||||||
&& P_IsClimbingValid(slidemo->player, climbangle))
|
&& P_IsClimbingValid(slidemo->player, climbangle))
|
||||||
{
|
{
|
||||||
slidemo->angle = climbangle;
|
slidemo->angle = climbangle;
|
||||||
|
|
159
src/p_mobj.c
159
src/p_mobj.c
|
@ -79,11 +79,31 @@ void P_AddCachedAction(mobj_t *mobj, INT32 statenum)
|
||||||
actioncachehead.prev = newaction;
|
actioncachehead.prev = newaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_CycleStateAnimation
|
||||||
|
//
|
||||||
|
FUNCINLINE static ATTRINLINE void P_CycleStateAnimation(mobj_t *mobj)
|
||||||
|
{
|
||||||
|
// var2 determines delay between animation frames
|
||||||
|
if (!(mobj->frame & FF_ANIMATE) || --mobj->anim_duration != 0)
|
||||||
|
return;
|
||||||
|
mobj->anim_duration = (UINT16)mobj->state->var2;
|
||||||
|
|
||||||
|
// compare the current sprite frame to the one we started from
|
||||||
|
// if more than var1 away from it, swap back to the original
|
||||||
|
// else just advance by one
|
||||||
|
if (((++mobj->frame) & FF_FRAMEMASK) - (mobj->state->frame & FF_FRAMEMASK) > (UINT32)mobj->state->var1)
|
||||||
|
mobj->frame = (mobj->state->frame & FF_FRAMEMASK) | (mobj->frame & ~FF_FRAMEMASK);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_CycleMobjState
|
// P_CycleMobjState
|
||||||
//
|
//
|
||||||
static void P_CycleMobjState(mobj_t *mobj)
|
static void P_CycleMobjState(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
|
// state animations
|
||||||
|
P_CycleStateAnimation(mobj);
|
||||||
|
|
||||||
// cycle through states,
|
// cycle through states,
|
||||||
// calling action functions at transitions
|
// calling action functions at transitions
|
||||||
if (mobj->tics != -1)
|
if (mobj->tics != -1)
|
||||||
|
@ -102,6 +122,9 @@ static void P_CycleMobjState(mobj_t *mobj)
|
||||||
//
|
//
|
||||||
static void P_CyclePlayerMobjState(mobj_t *mobj)
|
static void P_CyclePlayerMobjState(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
|
// state animations
|
||||||
|
P_CycleStateAnimation(mobj);
|
||||||
|
|
||||||
// cycle through states,
|
// cycle through states,
|
||||||
// calling action functions at transitions
|
// calling action functions at transitions
|
||||||
if (mobj->tics != -1)
|
if (mobj->tics != -1)
|
||||||
|
@ -307,6 +330,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
||||||
boolean noalt = false;
|
boolean noalt = false;
|
||||||
UINT8 spr2 = st->frame & FF_FRAMEMASK;
|
UINT8 spr2 = st->frame & FF_FRAMEMASK;
|
||||||
UINT16 frame = (mobj->frame & FF_FRAMEMASK)+1;
|
UINT16 frame = (mobj->frame & FF_FRAMEMASK)+1;
|
||||||
|
mobj->anim_duration = (UINT16)st->var2; // only used if FF_ANIMATE is set
|
||||||
|
|
||||||
while (((skin_t *)mobj->skin)->sprites[spr2].numframes <= 0
|
while (((skin_t *)mobj->skin)->sprites[spr2].numframes <= 0
|
||||||
&& spr2 != SPR2_STND)
|
&& spr2 != SPR2_STND)
|
||||||
|
@ -497,6 +521,7 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state)
|
||||||
st = &states[state];
|
st = &states[state];
|
||||||
mobj->state = st;
|
mobj->state = st;
|
||||||
mobj->tics = st->tics;
|
mobj->tics = st->tics;
|
||||||
|
mobj->anim_duration = (UINT16)st->var2; // only used if FF_ANIMATE is set
|
||||||
|
|
||||||
// Player animations
|
// Player animations
|
||||||
if (st->sprite == SPR_PLAY)
|
if (st->sprite == SPR_PLAY)
|
||||||
|
@ -574,6 +599,8 @@ boolean P_SetMobjStateNF(mobj_t *mobj, statenum_t state)
|
||||||
mobj->tics = st->tics;
|
mobj->tics = st->tics;
|
||||||
mobj->sprite = st->sprite;
|
mobj->sprite = st->sprite;
|
||||||
mobj->frame = st->frame;
|
mobj->frame = st->frame;
|
||||||
|
mobj->anim_duration = (UINT16)st->var2; // only used if FF_ANIMATE is set
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,6 +618,8 @@ static boolean P_SetPrecipMobjState(precipmobj_t *mobj, statenum_t state)
|
||||||
mobj->tics = st->tics;
|
mobj->tics = st->tics;
|
||||||
mobj->sprite = st->sprite;
|
mobj->sprite = st->sprite;
|
||||||
mobj->frame = st->frame;
|
mobj->frame = st->frame;
|
||||||
|
mobj->anim_duration = (UINT16)st->var2; // only used if FF_ANIMATE is set
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3891,6 +3920,8 @@ void P_NullPrecipThinker(precipmobj_t *mobj)
|
||||||
|
|
||||||
void P_SnowThinker(precipmobj_t *mobj)
|
void P_SnowThinker(precipmobj_t *mobj)
|
||||||
{
|
{
|
||||||
|
P_CycleStateAnimation((mobj_t *)mobj);
|
||||||
|
|
||||||
// adjust height
|
// adjust height
|
||||||
if ((mobj->z += mobj->momz) <= mobj->floorz)
|
if ((mobj->z += mobj->momz) <= mobj->floorz)
|
||||||
mobj->z = mobj->ceilingz;
|
mobj->z = mobj->ceilingz;
|
||||||
|
@ -3898,6 +3929,8 @@ void P_SnowThinker(precipmobj_t *mobj)
|
||||||
|
|
||||||
void P_RainThinker(precipmobj_t *mobj)
|
void P_RainThinker(precipmobj_t *mobj)
|
||||||
{
|
{
|
||||||
|
P_CycleStateAnimation((mobj_t *)mobj);
|
||||||
|
|
||||||
if (mobj->state != &states[S_RAIN1])
|
if (mobj->state != &states[S_RAIN1])
|
||||||
{
|
{
|
||||||
// cycle through states,
|
// cycle through states,
|
||||||
|
@ -6008,8 +6041,6 @@ INT32 numshields = 0;
|
||||||
void P_RunShields(void)
|
void P_RunShields(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
mobj_t *mo, *next;
|
|
||||||
fixed_t destx,desty,zoffs;
|
|
||||||
|
|
||||||
// run shields
|
// run shields
|
||||||
for (i = 0; i < numshields; i++)
|
for (i = 0; i < numshields; i++)
|
||||||
|
@ -6018,60 +6049,6 @@ void P_RunShields(void)
|
||||||
P_SetTarget(&shields[i], NULL);
|
P_SetTarget(&shields[i], NULL);
|
||||||
}
|
}
|
||||||
numshields = 0;
|
numshields = 0;
|
||||||
|
|
||||||
// run overlays
|
|
||||||
next = NULL;
|
|
||||||
for (mo = overlaycap; mo; mo = next)
|
|
||||||
{
|
|
||||||
I_Assert(!P_MobjWasRemoved(mo));
|
|
||||||
|
|
||||||
// grab next in chain, then unset the chain target
|
|
||||||
next = mo->hnext;
|
|
||||||
P_SetTarget(&mo->hnext, NULL);
|
|
||||||
|
|
||||||
if (!mo->target)
|
|
||||||
continue;
|
|
||||||
if (!splitscreen /*&& rendermode != render_soft*/)
|
|
||||||
{
|
|
||||||
angle_t viewingangle;
|
|
||||||
|
|
||||||
if (players[displayplayer].awayviewtics)
|
|
||||||
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y);
|
|
||||||
else if (!camera.chase && players[displayplayer].mo)
|
|
||||||
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].mo->x, players[displayplayer].mo->y);
|
|
||||||
else
|
|
||||||
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, camera.x, camera.y);
|
|
||||||
|
|
||||||
if (mo->state->var1)
|
|
||||||
viewingangle += ANGLE_180;
|
|
||||||
destx = mo->target->x + P_ReturnThrustX(mo->target, viewingangle, FixedMul(FRACUNIT/4, mo->scale));
|
|
||||||
desty = mo->target->y + P_ReturnThrustY(mo->target, viewingangle, FixedMul(FRACUNIT/4, mo->scale));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
destx = mo->target->x;
|
|
||||||
desty = mo->target->y;
|
|
||||||
}
|
|
||||||
|
|
||||||
mo->eflags = (mo->eflags & ~MFE_VERTICALFLIP) | (mo->target->eflags & MFE_VERTICALFLIP);
|
|
||||||
mo->scale = mo->destscale = mo->target->scale;
|
|
||||||
zoffs = FixedMul(((signed)mo->state->var2)*FRACUNIT, mo->scale);
|
|
||||||
mo->angle = mo->target->angle;
|
|
||||||
|
|
||||||
P_UnsetThingPosition(mo);
|
|
||||||
mo->x = destx;
|
|
||||||
mo->y = desty;
|
|
||||||
if (mo->eflags & MFE_VERTICALFLIP)
|
|
||||||
mo->z = (mo->target->z + mo->target->height - mo->height) - zoffs;
|
|
||||||
else
|
|
||||||
mo->z = mo->target->z + zoffs;
|
|
||||||
if (mo->state->var1)
|
|
||||||
P_SetUnderlayPosition(mo);
|
|
||||||
else
|
|
||||||
P_SetThingPosition(mo);
|
|
||||||
P_CheckPosition(mo, mo->x, mo->y);
|
|
||||||
}
|
|
||||||
P_SetTarget(&overlaycap, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean P_AddShield(mobj_t *thing)
|
static boolean P_AddShield(mobj_t *thing)
|
||||||
|
@ -6108,6 +6085,71 @@ static boolean P_AddShield(mobj_t *thing)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void P_RunOverlays(void)
|
||||||
|
{
|
||||||
|
// run overlays
|
||||||
|
mobj_t *mo, *next = NULL;
|
||||||
|
fixed_t destx,desty,zoffs;
|
||||||
|
|
||||||
|
for (mo = overlaycap; mo; mo = next)
|
||||||
|
{
|
||||||
|
I_Assert(!P_MobjWasRemoved(mo));
|
||||||
|
|
||||||
|
// grab next in chain, then unset the chain target
|
||||||
|
next = mo->hnext;
|
||||||
|
P_SetTarget(&mo->hnext, NULL);
|
||||||
|
|
||||||
|
if (!mo->target)
|
||||||
|
continue;
|
||||||
|
if (!splitscreen /*&& rendermode != render_soft*/)
|
||||||
|
{
|
||||||
|
angle_t viewingangle;
|
||||||
|
|
||||||
|
if (players[displayplayer].awayviewtics)
|
||||||
|
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y);
|
||||||
|
else if (!camera.chase && players[displayplayer].mo)
|
||||||
|
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].mo->x, players[displayplayer].mo->y);
|
||||||
|
else
|
||||||
|
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, camera.x, camera.y);
|
||||||
|
|
||||||
|
if (!(mo->state->frame & FF_ANIMATE) && mo->state->var1)
|
||||||
|
viewingangle += ANGLE_180;
|
||||||
|
destx = mo->target->x + P_ReturnThrustX(mo->target, viewingangle, FixedMul(FRACUNIT/4, mo->scale));
|
||||||
|
desty = mo->target->y + P_ReturnThrustY(mo->target, viewingangle, FixedMul(FRACUNIT/4, mo->scale));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
destx = mo->target->x;
|
||||||
|
desty = mo->target->y;
|
||||||
|
}
|
||||||
|
|
||||||
|
mo->eflags = (mo->eflags & ~MFE_VERTICALFLIP) | (mo->target->eflags & MFE_VERTICALFLIP);
|
||||||
|
mo->scale = mo->destscale = mo->target->scale;
|
||||||
|
mo->angle = mo->target->angle;
|
||||||
|
|
||||||
|
if (!(mo->state->frame & FF_ANIMATE))
|
||||||
|
zoffs = FixedMul(((signed)mo->state->var2)*FRACUNIT, mo->scale);
|
||||||
|
// if you're using FF_ANIMATE on an overlay,
|
||||||
|
// then you're on your own.
|
||||||
|
else
|
||||||
|
zoffs = 0;
|
||||||
|
|
||||||
|
P_UnsetThingPosition(mo);
|
||||||
|
mo->x = destx;
|
||||||
|
mo->y = desty;
|
||||||
|
if (mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
mo->z = (mo->target->z + mo->target->height - mo->height) - zoffs;
|
||||||
|
else
|
||||||
|
mo->z = mo->target->z + zoffs;
|
||||||
|
if (mo->state->var1)
|
||||||
|
P_SetUnderlayPosition(mo);
|
||||||
|
else
|
||||||
|
P_SetThingPosition(mo);
|
||||||
|
P_CheckPosition(mo, mo->x, mo->y);
|
||||||
|
}
|
||||||
|
P_SetTarget(&overlaycap, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
// Called only when MT_OVERLAY thinks.
|
// Called only when MT_OVERLAY thinks.
|
||||||
static void P_AddOverlay(mobj_t *thing)
|
static void P_AddOverlay(mobj_t *thing)
|
||||||
{
|
{
|
||||||
|
@ -7677,6 +7719,8 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
mobj->tics = st->tics;
|
mobj->tics = st->tics;
|
||||||
mobj->sprite = st->sprite;
|
mobj->sprite = st->sprite;
|
||||||
mobj->frame = st->frame; // FF_FRAMEMASK for frame, and other bits..
|
mobj->frame = st->frame; // FF_FRAMEMASK for frame, and other bits..
|
||||||
|
mobj->anim_duration = (UINT16)st->var2; // only used if FF_ANIMATE is set
|
||||||
|
|
||||||
mobj->friction = ORIG_FRICTION;
|
mobj->friction = ORIG_FRICTION;
|
||||||
|
|
||||||
mobj->movefactor = ORIG_FRICTION_FACTOR;
|
mobj->movefactor = ORIG_FRICTION_FACTOR;
|
||||||
|
@ -7902,6 +7946,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype
|
||||||
mobj->tics = st->tics;
|
mobj->tics = st->tics;
|
||||||
mobj->sprite = st->sprite;
|
mobj->sprite = st->sprite;
|
||||||
mobj->frame = st->frame; // FF_FRAMEMASK for frame, and other bits..
|
mobj->frame = st->frame; // FF_FRAMEMASK for frame, and other bits..
|
||||||
|
mobj->anim_duration = (UINT16)st->var2; // only used if FF_ANIMATE is set
|
||||||
|
|
||||||
// set subsector and/or block links
|
// set subsector and/or block links
|
||||||
P_SetPrecipitationThingPosition(mobj);
|
P_SetPrecipitationThingPosition(mobj);
|
||||||
|
@ -9871,7 +9916,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
// Diagonal rings (handles both types)
|
// Diagonal rings (handles both types)
|
||||||
else if (mthing->type == 602 || mthing->type == 603) // Diagonal rings (5)
|
else if (mthing->type == 602 || mthing->type == 603) // Diagonal rings (5)
|
||||||
{
|
{
|
||||||
angle_t angle = ANGLE_45 * (mthing->angle/45);
|
angle_t angle = FixedAngle(mthing->angle*FRACUNIT);
|
||||||
mobjtype_t ringthing = MT_RING;
|
mobjtype_t ringthing = MT_RING;
|
||||||
INT32 iterations = 5;
|
INT32 iterations = 5;
|
||||||
if (mthing->type == 603)
|
if (mthing->type == 603)
|
||||||
|
|
|
@ -271,6 +271,7 @@ typedef struct mobj_s
|
||||||
spritenum_t sprite; // used to find patch_t and flip value
|
spritenum_t sprite; // used to find patch_t and flip value
|
||||||
UINT32 frame; // frame number, plus bits see p_pspr.h
|
UINT32 frame; // frame number, plus bits see p_pspr.h
|
||||||
UINT8 sprite2; // player sprites
|
UINT8 sprite2; // player sprites
|
||||||
|
UINT16 anim_duration; // for FF_ANIMATE states
|
||||||
|
|
||||||
struct msecnode_s *touching_sectorlist; // a linked list of sectors where this object appears
|
struct msecnode_s *touching_sectorlist; // a linked list of sectors where this object appears
|
||||||
|
|
||||||
|
@ -384,7 +385,8 @@ typedef struct precipmobj_s
|
||||||
// More drawing info: to determine current sprite.
|
// More drawing info: to determine current sprite.
|
||||||
angle_t angle; // orientation
|
angle_t angle; // orientation
|
||||||
spritenum_t sprite; // used to find patch_t and flip value
|
spritenum_t sprite; // used to find patch_t and flip value
|
||||||
INT32 frame; // frame number, plus bits see p_pspr.h
|
UINT32 frame; // frame number, plus bits see p_pspr.h
|
||||||
|
UINT16 anim_duration; // for FF_ANIMATE states
|
||||||
|
|
||||||
struct mprecipsecnode_s *touching_sectorlist; // a linked list of sectors where this object appears
|
struct mprecipsecnode_s *touching_sectorlist; // a linked list of sectors where this object appears
|
||||||
|
|
||||||
|
|
|
@ -442,6 +442,8 @@ newseg:
|
||||||
// seg's ending vertex.
|
// seg's ending vertex.
|
||||||
for (i = 0; i < numsegs; ++i)
|
for (i = 0; i < numsegs; ++i)
|
||||||
{
|
{
|
||||||
|
if (segs[i].side != 0) // needs to be frontfacing
|
||||||
|
continue;
|
||||||
if (segs[i].v1->x == seg->v2->x && segs[i].v1->y == seg->v2->y)
|
if (segs[i].v1->x == seg->v2->x && segs[i].v1->y == seg->v2->y)
|
||||||
{
|
{
|
||||||
// Make sure you didn't already add this seg...
|
// Make sure you didn't already add this seg...
|
||||||
|
@ -610,6 +612,9 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
|
||||||
INT32 poflags = POF_SOLID|POF_TESTHEIGHT|POF_RENDERSIDES;
|
INT32 poflags = POF_SOLID|POF_TESTHEIGHT|POF_RENDERSIDES;
|
||||||
INT32 parentID = 0, potrans = 0;
|
INT32 parentID = 0, potrans = 0;
|
||||||
|
|
||||||
|
if (seg->side != 0) // needs to be frontfacing
|
||||||
|
continue;
|
||||||
|
|
||||||
if (seg->linedef->special != POLYOBJ_START_LINE)
|
if (seg->linedef->special != POLYOBJ_START_LINE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// \brief Frame flags: only the frame number
|
/// \brief Frame flags: only the frame number
|
||||||
#define FF_FRAMEMASK 0x7fff
|
#define FF_FRAMEMASK 0x3fff
|
||||||
|
/// \brief Frame flags: Simple stateless animation
|
||||||
|
#define FF_ANIMATE 0x4000
|
||||||
/// \brief Frame flags: frame always appears full bright
|
/// \brief Frame flags: frame always appears full bright
|
||||||
#define FF_FULLBRIGHT 0x8000 //
|
#define FF_FULLBRIGHT 0x8000
|
||||||
/// \brief Frame flags: 0 = no trans(opaque), 1-15 = transl. table
|
/// \brief Frame flags: 0 = no trans(opaque), 1-15 = transl. table
|
||||||
#define FF_TRANSMASK 0xf0000
|
#define FF_TRANSMASK 0xf0000
|
||||||
/// \brief shift for FF_TRANSMASK
|
/// \brief shift for FF_TRANSMASK
|
||||||
|
|
|
@ -1060,6 +1060,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
||||||
diff |= MD_SPRITE;
|
diff |= MD_SPRITE;
|
||||||
if (mobj->frame != mobj->state->frame)
|
if (mobj->frame != mobj->state->frame)
|
||||||
diff |= MD_FRAME;
|
diff |= MD_FRAME;
|
||||||
|
if (mobj->anim_duration != (UINT16)mobj->state->var2)
|
||||||
|
diff |= MD_FRAME;
|
||||||
if (mobj->eflags)
|
if (mobj->eflags)
|
||||||
diff |= MD_EFLAGS;
|
diff |= MD_EFLAGS;
|
||||||
if (mobj->player)
|
if (mobj->player)
|
||||||
|
@ -1183,7 +1185,10 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
||||||
WRITEUINT8(save_p, mobj->sprite2);
|
WRITEUINT8(save_p, mobj->sprite2);
|
||||||
}
|
}
|
||||||
if (diff & MD_FRAME)
|
if (diff & MD_FRAME)
|
||||||
|
{
|
||||||
WRITEUINT32(save_p, mobj->frame);
|
WRITEUINT32(save_p, mobj->frame);
|
||||||
|
WRITEUINT16(save_p, mobj->anim_duration);
|
||||||
|
}
|
||||||
if (diff & MD_EFLAGS)
|
if (diff & MD_EFLAGS)
|
||||||
WRITEUINT16(save_p, mobj->eflags);
|
WRITEUINT16(save_p, mobj->eflags);
|
||||||
if (diff & MD_PLAYER)
|
if (diff & MD_PLAYER)
|
||||||
|
@ -2015,9 +2020,15 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
||||||
mobj->sprite2 = mobj->state->frame&FF_FRAMEMASK;
|
mobj->sprite2 = mobj->state->frame&FF_FRAMEMASK;
|
||||||
}
|
}
|
||||||
if (diff & MD_FRAME)
|
if (diff & MD_FRAME)
|
||||||
|
{
|
||||||
mobj->frame = READUINT32(save_p);
|
mobj->frame = READUINT32(save_p);
|
||||||
|
mobj->anim_duration = READUINT16(save_p);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
mobj->frame = mobj->state->frame;
|
mobj->frame = mobj->state->frame;
|
||||||
|
mobj->anim_duration = (UINT16)mobj->state->var2;
|
||||||
|
}
|
||||||
if (diff & MD_EFLAGS)
|
if (diff & MD_EFLAGS)
|
||||||
mobj->eflags = READUINT16(save_p);
|
mobj->eflags = READUINT16(save_p);
|
||||||
if (diff & MD_PLAYER)
|
if (diff & MD_PLAYER)
|
||||||
|
|
|
@ -181,7 +181,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
||||||
DEH_WriteUndoline("NEXTLEVEL", va("%d", mapheaderinfo[num]->nextlevel), UNDO_NONE);
|
DEH_WriteUndoline("NEXTLEVEL", va("%d", mapheaderinfo[num]->nextlevel), UNDO_NONE);
|
||||||
mapheaderinfo[num]->nextlevel = (INT16)(i + 1);
|
mapheaderinfo[num]->nextlevel = (INT16)(i + 1);
|
||||||
DEH_WriteUndoline("MUSIC", mapheaderinfo[num]->musname, UNDO_NONE);
|
DEH_WriteUndoline("MUSIC", mapheaderinfo[num]->musname, UNDO_NONE);
|
||||||
snprintf(mapheaderinfo[num]->musname, 7, va("%sM", G_BuildMapName(i)));
|
snprintf(mapheaderinfo[num]->musname, 7, "%sM", G_BuildMapName(i));
|
||||||
mapheaderinfo[num]->musname[6] = 0;
|
mapheaderinfo[num]->musname[6] = 0;
|
||||||
DEH_WriteUndoline("MUSICTRACK", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE);
|
DEH_WriteUndoline("MUSICTRACK", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE);
|
||||||
mapheaderinfo[num]->mustrack = 0;
|
mapheaderinfo[num]->mustrack = 0;
|
||||||
|
@ -2386,7 +2386,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
// use gamemap to get map number.
|
// use gamemap to get map number.
|
||||||
// 99% of the things already did, so.
|
// 99% of the things already did, so.
|
||||||
// Map header should always be in place at this point
|
// Map header should always be in place at this point
|
||||||
INT32 i, loadprecip = 1;
|
INT32 i, loadprecip = 1, ranspecialwipe = 0;
|
||||||
INT32 loademblems = 1;
|
INT32 loademblems = 1;
|
||||||
INT32 fromnetsave = 0;
|
INT32 fromnetsave = 0;
|
||||||
boolean loadedbm = false;
|
boolean loadedbm = false;
|
||||||
|
@ -2459,6 +2459,28 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
// will be set by player think.
|
// will be set by player think.
|
||||||
players[consoleplayer].viewz = 1;
|
players[consoleplayer].viewz = 1;
|
||||||
|
|
||||||
|
// Special stage fade to white
|
||||||
|
// This is handled BEFORE sounds are stopped.
|
||||||
|
if (rendermode != render_none && G_IsSpecialStage(gamemap))
|
||||||
|
{
|
||||||
|
tic_t starttime = I_GetTime();
|
||||||
|
tic_t endtime = starttime + (3*TICRATE)/2;
|
||||||
|
|
||||||
|
S_StartSound(NULL, sfx_s3kaf);
|
||||||
|
|
||||||
|
F_WipeStartScreen();
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 0);
|
||||||
|
|
||||||
|
F_WipeEndScreen();
|
||||||
|
F_RunWipe(wipedefs[wipe_speclevel_towhite], false);
|
||||||
|
|
||||||
|
// Hold on white for extra effect.
|
||||||
|
while (I_GetTime() < endtime)
|
||||||
|
I_Sleep();
|
||||||
|
|
||||||
|
ranspecialwipe = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure all sounds are stopped before Z_FreeTags.
|
// Make sure all sounds are stopped before Z_FreeTags.
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
S_ClearSfx();
|
S_ClearSfx();
|
||||||
|
@ -2468,16 +2490,20 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
S_Start();
|
S_Start();
|
||||||
|
|
||||||
// Let's fade to black here
|
// Let's fade to black here
|
||||||
if (rendermode != render_none)
|
// But only if we didn't do the special stage wipe
|
||||||
|
if (rendermode != render_none && !ranspecialwipe)
|
||||||
{
|
{
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
||||||
|
}
|
||||||
|
|
||||||
// Don't include these in the fade!
|
// Print "SPEEDING OFF TO [ZONE] [ACT 1]..."
|
||||||
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
|
// Don't include these in the fade!
|
||||||
char tx[64];
|
char tx[64];
|
||||||
V_DrawSmallString(1, 191, V_ALLOWLOWERCASE, M_GetText("Speeding off to..."));
|
V_DrawSmallString(1, 191, V_ALLOWLOWERCASE, M_GetText("Speeding off to..."));
|
||||||
snprintf(tx, 63, "%s%s%s",
|
snprintf(tx, 63, "%s%s%s",
|
||||||
|
@ -2487,7 +2513,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
V_DrawSmallString(1, 195, V_ALLOWLOWERCASE, tx);
|
V_DrawSmallString(1, 195, V_ALLOWLOWERCASE, tx);
|
||||||
I_UpdateNoVsync();
|
I_UpdateNoVsync();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
LUA_InvalidateLevel();
|
LUA_InvalidateLevel();
|
||||||
|
@ -2784,7 +2809,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
|
|
||||||
// Remove the loading shit from the screen
|
// Remove the loading shit from the screen
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (ranspecialwipe) ? 0 : 31);
|
||||||
|
|
||||||
if (precache || dedicated)
|
if (precache || dedicated)
|
||||||
R_PrecacheLevel();
|
R_PrecacheLevel();
|
||||||
|
|
11
src/p_spec.c
11
src/p_spec.c
|
@ -3038,6 +3038,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
INT16 foftag = (INT16)(sides[line->sidenum[0]].rowoffset>>FRACBITS);
|
INT16 foftag = (INT16)(sides[line->sidenum[0]].rowoffset>>FRACBITS);
|
||||||
sector_t *sec; // Sector that the FOF is visible (or not visible) in
|
sector_t *sec; // Sector that the FOF is visible (or not visible) in
|
||||||
ffloor_t *rover; // FOF to vanish/un-vanish
|
ffloor_t *rover; // FOF to vanish/un-vanish
|
||||||
|
ffloortype_e oldflags; // store FOF's old flags
|
||||||
|
|
||||||
for (secnum = -1; (secnum = P_FindSectorFromTag(sectag, secnum)) >= 0 ;)
|
for (secnum = -1; (secnum = P_FindSectorFromTag(sectag, secnum)) >= 0 ;)
|
||||||
{
|
{
|
||||||
|
@ -3061,11 +3062,17 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oldflags = rover->flags;
|
||||||
|
|
||||||
// Abracadabra!
|
// Abracadabra!
|
||||||
if (line->flags & ML_NOCLIMB)
|
if (line->flags & ML_NOCLIMB)
|
||||||
rover->flags |= FF_EXISTS;
|
rover->flags |= FF_EXISTS;
|
||||||
else
|
else
|
||||||
rover->flags &= ~FF_EXISTS;
|
rover->flags &= ~FF_EXISTS;
|
||||||
|
|
||||||
|
// if flags changed, reset sector's light list
|
||||||
|
if (rover->flags != oldflags)
|
||||||
|
sec->moved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4670,11 +4677,11 @@ void P_UpdateSpecials(void)
|
||||||
// ANIMATE TEXTURES
|
// ANIMATE TEXTURES
|
||||||
for (anim = anims; anim < lastanim; anim++)
|
for (anim = anims; anim < lastanim; anim++)
|
||||||
{
|
{
|
||||||
for (i = anim->basepic; i < anim->basepic + anim->numpics; i++)
|
for (i = 0; i < anim->numpics; i++)
|
||||||
{
|
{
|
||||||
pic = anim->basepic + ((leveltime/anim->speed + i) % anim->numpics);
|
pic = anim->basepic + ((leveltime/anim->speed + i) % anim->numpics);
|
||||||
if (anim->istexture)
|
if (anim->istexture)
|
||||||
texturetranslation[i] = pic;
|
texturetranslation[anim->basepic+i] = pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -631,6 +631,7 @@ void P_Ticker(boolean run)
|
||||||
|
|
||||||
// Run shield positioning
|
// Run shield positioning
|
||||||
P_RunShields();
|
P_RunShields();
|
||||||
|
P_RunOverlays();
|
||||||
|
|
||||||
P_UpdateSpecials();
|
P_UpdateSpecials();
|
||||||
P_RespawnSpecials();
|
P_RespawnSpecials();
|
||||||
|
@ -742,6 +743,7 @@ void P_PreTicker(INT32 frames)
|
||||||
|
|
||||||
// Run shield positioning
|
// Run shield positioning
|
||||||
P_RunShields();
|
P_RunShields();
|
||||||
|
P_RunOverlays();
|
||||||
|
|
||||||
P_UpdateSpecials();
|
P_UpdateSpecials();
|
||||||
P_RespawnSpecials();
|
P_RespawnSpecials();
|
||||||
|
|
38
src/p_user.c
38
src/p_user.c
|
@ -52,9 +52,6 @@
|
||||||
#include "hardware/hw_main.h"
|
#include "hardware/hw_main.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Index of the special effects (INVUL inverse) map.
|
|
||||||
#define INVERSECOLORMAP 32
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void P_NukeAllPlayers(player_t *player);
|
static void P_NukeAllPlayers(player_t *player);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3440,27 +3437,14 @@ static void P_DoSuperStuff(player_t *player)
|
||||||
player->mo->health--;
|
player->mo->health--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// future todo: a skin option for this, and possibly more colors
|
||||||
switch (player->skin)
|
switch (player->skin)
|
||||||
{
|
{
|
||||||
case 1: // Golden orange supertails.
|
case 1: /* Tails */ player->mo->color = SKINCOLOR_TSUPER1; break;
|
||||||
if (leveltime % 9 < 5)
|
case 2: /* Knux */ player->mo->color = SKINCOLOR_KSUPER1; break;
|
||||||
player->mo->color = SKINCOLOR_TSUPER1 + leveltime % 9;
|
default: /* everyone */ player->mo->color = SKINCOLOR_SUPER1; break;
|
||||||
else
|
|
||||||
player->mo->color = SKINCOLOR_TSUPER1 + 9 - leveltime % 9;
|
|
||||||
break;
|
|
||||||
case 2: // Pink superknux.
|
|
||||||
if (leveltime % 9 < 5)
|
|
||||||
player->mo->color = SKINCOLOR_KSUPER1 + leveltime % 9;
|
|
||||||
else
|
|
||||||
player->mo->color = SKINCOLOR_KSUPER1 + 9 - leveltime % 9;
|
|
||||||
break;
|
|
||||||
default: // Yousa yellow now!
|
|
||||||
if (leveltime % 9 < 5)
|
|
||||||
player->mo->color = SKINCOLOR_SUPER1 + leveltime % 9;
|
|
||||||
else
|
|
||||||
player->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
player->mo->color += abs( ( ( leveltime >> 1 ) % 9) - 4);
|
||||||
|
|
||||||
if ((cmd->forwardmove != 0 || cmd->sidemove != 0 || player->pflags & (PF_CARRIED|PF_ROPEHANG|PF_ITEMHANG|PF_MACESPIN))
|
if ((cmd->forwardmove != 0 || cmd->sidemove != 0 || player->pflags & (PF_CARRIED|PF_ROPEHANG|PF_ITEMHANG|PF_MACESPIN))
|
||||||
&& !(leveltime % TICRATE) && (player->mo->momx || player->mo->momy))
|
&& !(leveltime % TICRATE) && (player->mo->momx || player->mo->momy))
|
||||||
|
@ -6366,8 +6350,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
if (!(player->powers[pw_nocontrol] & (1<<15)))
|
if (!(player->powers[pw_nocontrol] & (1<<15)))
|
||||||
player->pflags |= PF_JUMPSTASIS;
|
player->pflags |= PF_JUMPSTASIS;
|
||||||
}
|
}
|
||||||
else
|
// note: don't unset stasis here
|
||||||
player->pflags &= ~PF_FULLSTASIS;
|
|
||||||
|
|
||||||
if (!player->spectator && G_TagGametype())
|
if (!player->spectator && G_TagGametype())
|
||||||
{
|
{
|
||||||
|
@ -7996,9 +7979,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
if (player == &players[consoleplayer])
|
if (player == &players[consoleplayer])
|
||||||
{
|
{
|
||||||
if (focusangle >= localangle)
|
if (focusangle >= localangle)
|
||||||
localangle += abs(focusangle - localangle)>>5;
|
localangle += abs((focusangle - localangle))>>5;
|
||||||
else
|
else
|
||||||
localangle -= abs(focusangle - localangle)>>5;
|
localangle -= abs((focusangle - localangle))>>5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (P_AnalogMove(player)) // Analog
|
else if (P_AnalogMove(player)) // Analog
|
||||||
|
@ -8958,6 +8941,11 @@ void P_PlayerThink(player_t *player)
|
||||||
if (!player->mo)
|
if (!player->mo)
|
||||||
return; // P_MovePlayer removed player->mo.
|
return; // P_MovePlayer removed player->mo.
|
||||||
|
|
||||||
|
// Unset statis flags after moving.
|
||||||
|
// In other words, if you manually set stasis via code,
|
||||||
|
// it lasts for one tic.
|
||||||
|
player->pflags &= ~PF_FULLSTASIS;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
#ifdef POLYOBJECTS
|
||||||
if (player->onconveyor == 1)
|
if (player->onconveyor == 1)
|
||||||
player->cmomy = player->cmomx = 0;
|
player->cmomy = player->cmomx = 0;
|
||||||
|
|
|
@ -32,7 +32,6 @@ sector_t *backsector;
|
||||||
// 896 drawsegs! So too bad here's a limit removal a-la-Boom
|
// 896 drawsegs! So too bad here's a limit removal a-la-Boom
|
||||||
drawseg_t *drawsegs = NULL;
|
drawseg_t *drawsegs = NULL;
|
||||||
drawseg_t *ds_p = NULL;
|
drawseg_t *ds_p = NULL;
|
||||||
drawseg_t *firstnewseg = NULL;
|
|
||||||
|
|
||||||
// indicates doors closed wrt automap bugfix:
|
// indicates doors closed wrt automap bugfix:
|
||||||
INT32 doorclosed;
|
INT32 doorclosed;
|
||||||
|
|
|
@ -30,7 +30,6 @@ extern INT32 checkcoord[12][4];
|
||||||
|
|
||||||
extern drawseg_t *drawsegs;
|
extern drawseg_t *drawsegs;
|
||||||
extern drawseg_t *ds_p;
|
extern drawseg_t *ds_p;
|
||||||
extern drawseg_t *firstnewseg;
|
|
||||||
extern INT32 doorclosed;
|
extern INT32 doorclosed;
|
||||||
|
|
||||||
typedef void (*drawfunc_t)(INT32 start, INT32 stop);
|
typedef void (*drawfunc_t)(INT32 start, INT32 stop);
|
||||||
|
|
|
@ -957,4 +957,3 @@ void R_DrawViewBorder(void)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
#include "r_draw16.c"
|
#include "r_draw16.c"
|
||||||
|
|
||||||
|
|
|
@ -1388,4 +1388,3 @@ void R_DrawColumnShadowed_8(void)
|
||||||
if (dc_yl <= realyh)
|
if (dc_yl <= realyh)
|
||||||
walldrawerfunc(); // R_DrawWallColumn_8 for the appropriate architecture
|
walldrawerfunc(); // R_DrawWallColumn_8 for the appropriate architecture
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1486,13 +1486,11 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
if (ds_p == drawsegs+maxdrawsegs)
|
if (ds_p == drawsegs+maxdrawsegs)
|
||||||
{
|
{
|
||||||
size_t pos = ds_p - drawsegs;
|
size_t pos = ds_p - drawsegs;
|
||||||
size_t pos2 = firstnewseg - drawsegs;
|
|
||||||
size_t newmax = maxdrawsegs ? maxdrawsegs*2 : 128;
|
size_t newmax = maxdrawsegs ? maxdrawsegs*2 : 128;
|
||||||
if (firstseg)
|
if (firstseg)
|
||||||
firstseg = (drawseg_t *)(firstseg - drawsegs);
|
firstseg = (drawseg_t *)(firstseg - drawsegs);
|
||||||
drawsegs = Z_Realloc(drawsegs, newmax*sizeof (*drawsegs), PU_STATIC, NULL);
|
drawsegs = Z_Realloc(drawsegs, newmax*sizeof (*drawsegs), PU_STATIC, NULL);
|
||||||
ds_p = drawsegs + pos;
|
ds_p = drawsegs + pos;
|
||||||
firstnewseg = drawsegs + pos2;
|
|
||||||
maxdrawsegs = newmax;
|
maxdrawsegs = newmax;
|
||||||
if (firstseg)
|
if (firstseg)
|
||||||
firstseg = drawsegs + (size_t)firstseg;
|
firstseg = drawsegs + (size_t)firstseg;
|
||||||
|
|
|
@ -1105,7 +1105,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
{
|
{
|
||||||
sprdef = &((skin_t *)thing->skin)->sprites[thing->sprite2];
|
sprdef = &((skin_t *)thing->skin)->sprites[thing->sprite2];
|
||||||
if (rot >= sprdef->numframes) {
|
if (rot >= sprdef->numframes) {
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("R_ProjectSprite: invalid skins[\"%s\"].sprites[SPR2_%s] frame %d\n"), ((skin_t *)thing->skin)->name, spr2names[thing->sprite2], rot);
|
CONS_Alert(CONS_ERROR, M_GetText("R_ProjectSprite: invalid skins[\"%s\"].sprites[SPR2_%s] frame %s\n"), ((skin_t *)thing->skin)->name, spr2names[thing->sprite2], sizeu5(rot));
|
||||||
thing->sprite = states[S_UNKNOWN].sprite;
|
thing->sprite = states[S_UNKNOWN].sprite;
|
||||||
thing->frame = states[S_UNKNOWN].frame;
|
thing->frame = states[S_UNKNOWN].frame;
|
||||||
sprdef = &sprites[thing->sprite];
|
sprdef = &sprites[thing->sprite];
|
||||||
|
|
|
@ -1155,6 +1155,28 @@ void S_StartSoundName(void *mo, const char *soundname)
|
||||||
/// Music
|
/// Music
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
const char *compat_special_music_slots[16] =
|
||||||
|
{
|
||||||
|
"titles", // 1036 title screen
|
||||||
|
"read_m", // 1037 intro
|
||||||
|
"lclear", // 1038 level clear
|
||||||
|
"invinc", // 1039 invincibility
|
||||||
|
"shoes", // 1040 super sneakers
|
||||||
|
"minvnc", // 1041 Mario invincibility
|
||||||
|
"drown", // 1042 drowning
|
||||||
|
"gmover", // 1043 game over
|
||||||
|
"xtlife", // 1044 extra life
|
||||||
|
"contsc", // 1045 continue screen
|
||||||
|
"supers", // 1046 Super Sonic
|
||||||
|
"chrsel", // 1047 character select
|
||||||
|
"credit", // 1048 credits
|
||||||
|
"racent", // 1049 Race Results
|
||||||
|
"stjr", // 1050 Sonic Team Jr. Presents
|
||||||
|
""
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#define music_playing (music_name[0]) // String is empty if no music is playing
|
#define music_playing (music_name[0]) // String is empty if no music is playing
|
||||||
|
|
||||||
static char music_name[7]; // up to 6-character name
|
static char music_name[7]; // up to 6-character name
|
||||||
|
|
|
@ -139,4 +139,10 @@ void S_StopSoundByNum(sfxenum_t sfxnum);
|
||||||
#define S_StartScreamSound S_StartSound
|
#define S_StartScreamSound S_StartSound
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
|
// For compatibility with code/scripts relying on older versions
|
||||||
|
// This is a list of all the "special" slot names and their associated numbers
|
||||||
|
const char *compat_special_music_slots[16];
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -117,7 +117,7 @@ if(${SDL2_FOUND})
|
||||||
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES})
|
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES})
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
||||||
|
|
||||||
if(CLANG)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
|
||||||
add_framework(CoreFoundation SRB2SDL2)
|
add_framework(CoreFoundation SRB2SDL2)
|
||||||
add_framework(SDL2 SRB2SDL2)
|
add_framework(SDL2 SRB2SDL2)
|
||||||
add_framework(SDL2_mixer SRB2SDL2)
|
add_framework(SDL2_mixer SRB2SDL2)
|
||||||
|
@ -224,7 +224,7 @@ if(${SDL2_FOUND})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#### Installation ####
|
#### Installation ####
|
||||||
if (CLANG)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
install(TARGETS SRB2SDL2
|
install(TARGETS SRB2SDL2
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
)
|
)
|
||||||
|
@ -265,7 +265,7 @@ if(${SDL2_FOUND})
|
||||||
|
|
||||||
|
|
||||||
# Mac bundle fixup
|
# Mac bundle fixup
|
||||||
if(CLANG)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
install(CODE "
|
install(CODE "
|
||||||
include(BundleUtilities)
|
include(BundleUtilities)
|
||||||
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\"
|
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\"
|
||||||
|
|
|
@ -119,6 +119,12 @@ ifdef SDL_NET
|
||||||
SDL_LDFLAGS+=-lSDL2_net
|
SDL_LDFLAGS+=-lSDL2_net
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef MINGW
|
||||||
|
ifndef NOSDLMAIN
|
||||||
|
SDLMAIN=1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef SDLMAIN
|
ifdef SDLMAIN
|
||||||
OPTS+=-DSDLMAIN
|
OPTS+=-DSDLMAIN
|
||||||
else
|
else
|
||||||
|
|
|
@ -55,6 +55,10 @@ PSP_MAIN_THREAD_STACK_SIZE_KB(256);
|
||||||
#include "i_ttf.h"
|
#include "i_ttf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined (_WIN32) && !defined (main)
|
||||||
|
//#define SDLMAIN
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SDLMAIN
|
#ifdef SDLMAIN
|
||||||
#include "SDL_main.h"
|
#include "SDL_main.h"
|
||||||
#elif defined(FORCESDLMAIN)
|
#elif defined(FORCESDLMAIN)
|
||||||
|
@ -132,7 +136,6 @@ static inline VOID MakeCodeWritable(VOID)
|
||||||
|
|
||||||
\return int
|
\return int
|
||||||
*/
|
*/
|
||||||
FUNCNORETURN
|
|
||||||
#if defined (_XBOX) && defined (__GNUC__)
|
#if defined (_XBOX) && defined (__GNUC__)
|
||||||
void XBoxStartup()
|
void XBoxStartup()
|
||||||
{
|
{
|
||||||
|
@ -141,8 +144,10 @@ void XBoxStartup()
|
||||||
myargv = NULL;
|
myargv = NULL;
|
||||||
#else
|
#else
|
||||||
#ifdef FORCESDLMAIN
|
#ifdef FORCESDLMAIN
|
||||||
|
FUNCNORETURN
|
||||||
int SDL_main(int argc, char **argv)
|
int SDL_main(int argc, char **argv)
|
||||||
#else
|
#else
|
||||||
|
FUNCNORETURN
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,9 +45,6 @@ typedef DWORD (WINAPI *p_timeGetTime) (void);
|
||||||
typedef UINT (WINAPI *p_timeEndPeriod) (UINT);
|
typedef UINT (WINAPI *p_timeEndPeriod) (UINT);
|
||||||
typedef HANDLE (WINAPI *p_OpenFileMappingA) (DWORD, BOOL, LPCSTR);
|
typedef HANDLE (WINAPI *p_OpenFileMappingA) (DWORD, BOOL, LPCSTR);
|
||||||
typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
||||||
typedef HANDLE (WINAPI *p_GetCurrentProcess) (VOID);
|
|
||||||
typedef BOOL (WINAPI *p_GetProcessAffinityMask) (HANDLE, PDWORD_PTR, PDWORD_PTR);
|
|
||||||
typedef BOOL (WINAPI *p_SetProcessAffinityMask) (HANDLE, DWORD_PTR);
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -2779,7 +2776,6 @@ static const char *locateWad(void)
|
||||||
{
|
{
|
||||||
return returnWadPath;
|
return returnWadPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// examine default dirs
|
// examine default dirs
|
||||||
|
@ -3070,52 +3066,6 @@ const CPUInfoFlags *I_CPUInfo(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
|
// note CPUAFFINITY code used to reside here
|
||||||
static void CPUAffinity_OnChange(void);
|
void I_RegisterSysCommands(void) {}
|
||||||
static consvar_t cv_cpuaffinity = {"cpuaffinity", "-1", CV_SAVE | CV_CALL, NULL, CPUAffinity_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
static p_GetCurrentProcess pfnGetCurrentProcess = NULL;
|
|
||||||
static p_GetProcessAffinityMask pfnGetProcessAffinityMask = NULL;
|
|
||||||
static p_SetProcessAffinityMask pfnSetProcessAffinityMask = NULL;
|
|
||||||
|
|
||||||
static inline VOID GetAffinityFuncs(VOID)
|
|
||||||
{
|
|
||||||
HMODULE h = GetModuleHandleA("kernel32.dll");
|
|
||||||
pfnGetCurrentProcess = (p_GetCurrentProcess)GetProcAddress(h, "GetCurrentProcess");
|
|
||||||
pfnGetProcessAffinityMask = (p_GetProcessAffinityMask)GetProcAddress(h, "GetProcessAffinityMask");
|
|
||||||
pfnSetProcessAffinityMask = (p_SetProcessAffinityMask)GetProcAddress(h, "SetProcessAffinityMask");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void CPUAffinity_OnChange(void)
|
|
||||||
{
|
|
||||||
DWORD_PTR dwProcMask, dwSysMask;
|
|
||||||
HANDLE selfpid;
|
|
||||||
|
|
||||||
if (!pfnGetCurrentProcess || !pfnGetProcessAffinityMask || !pfnSetProcessAffinityMask)
|
|
||||||
return;
|
|
||||||
else
|
|
||||||
selfpid = pfnGetCurrentProcess();
|
|
||||||
|
|
||||||
pfnGetProcessAffinityMask(selfpid, &dwProcMask, &dwSysMask);
|
|
||||||
|
|
||||||
/* If resulting mask is zero, don't change anything and fall back to
|
|
||||||
* actual mask.
|
|
||||||
*/
|
|
||||||
if(dwSysMask & cv_cpuaffinity.value)
|
|
||||||
{
|
|
||||||
pfnSetProcessAffinityMask(selfpid, dwSysMask & cv_cpuaffinity.value);
|
|
||||||
CV_StealthSetValue(&cv_cpuaffinity, (INT32)(dwSysMask & cv_cpuaffinity.value));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
CV_StealthSetValue(&cv_cpuaffinity, (INT32)dwProcMask);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void I_RegisterSysCommands(void)
|
|
||||||
{
|
|
||||||
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
|
|
||||||
GetAffinityFuncs();
|
|
||||||
CV_RegisterVar(&cv_cpuaffinity);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1701,22 +1701,12 @@ void I_StartupGraphics(void)
|
||||||
keyboard_started = true;
|
keyboard_started = true;
|
||||||
|
|
||||||
#if !defined(HAVE_TTF)
|
#if !defined(HAVE_TTF)
|
||||||
#ifdef _WIN32 // Initialize Audio as well, otherwise Win32's DirectX can not use audio
|
// Previously audio was init here for questionable reasons?
|
||||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0)
|
|
||||||
#else //SDL_OpenAudio will do SDL_InitSubSystem(SDL_INIT_AUDIO)
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
|
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
|
||||||
if (SDL_WasInit(SDL_INIT_AUDIO)==0)
|
|
||||||
CONS_Printf(M_GetText("Couldn't initialize SDL's Audio System with Video System: %s\n"), SDL_GetError());
|
|
||||||
if (SDL_WasInit(SDL_INIT_VIDEO)==0)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Couldn't initialize SDL's Video System: %s\n"), SDL_GetError());
|
CONS_Printf(M_GetText("Couldn't initialize SDL's Video System: %s\n"), SDL_GetError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
char vd[100]; //stack space for video name
|
char vd[100]; //stack space for video name
|
||||||
|
|
|
@ -77,7 +77,16 @@ static INT32 current_track;
|
||||||
void I_StartupSound(void)
|
void I_StartupSound(void)
|
||||||
{
|
{
|
||||||
I_Assert(!sound_started);
|
I_Assert(!sound_started);
|
||||||
sound_started = true;
|
|
||||||
|
// EE inits audio first so we're following along.
|
||||||
|
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
||||||
|
CONS_Printf("SDL Audio already started\n");
|
||||||
|
else if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "Error initializing SDL Audio: %s\n", SDL_GetError());
|
||||||
|
// call to start audio failed -- we do not have it
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
midimode = false;
|
midimode = false;
|
||||||
music = NULL;
|
music = NULL;
|
||||||
|
@ -86,19 +95,31 @@ void I_StartupSound(void)
|
||||||
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
||||||
Mix_Init(MIX_INIT_FLAC|MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
|
Mix_Init(MIX_INIT_FLAC|MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
|
||||||
#endif
|
#endif
|
||||||
Mix_OpenAudio(44100, AUDIO_S16LSB, 2, 2048);
|
|
||||||
|
if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 2048) < 0)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "Error starting SDL_Mixer: %s\n", Mix_GetError());
|
||||||
|
// call to start audio failed -- we do not have it
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sound_started = true;
|
||||||
Mix_AllocateChannels(256);
|
Mix_AllocateChannels(256);
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_ShutdownSound(void)
|
void I_ShutdownSound(void)
|
||||||
{
|
{
|
||||||
I_Assert(sound_started);
|
if (!sound_started)
|
||||||
|
return; // not an error condition
|
||||||
sound_started = false;
|
sound_started = false;
|
||||||
|
|
||||||
Mix_CloseAudio();
|
Mix_CloseAudio();
|
||||||
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
||||||
Mix_Quit();
|
Mix_Quit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||||
|
|
||||||
#ifdef HAVE_LIBGME
|
#ifdef HAVE_LIBGME
|
||||||
if (gme)
|
if (gme)
|
||||||
gme_delete(gme);
|
gme_delete(gme);
|
||||||
|
|
|
@ -1213,6 +1213,16 @@ void I_StartupSound(void)
|
||||||
// Configure sound device
|
// Configure sound device
|
||||||
CONS_Printf("I_StartupSound:\n");
|
CONS_Printf("I_StartupSound:\n");
|
||||||
|
|
||||||
|
// EE inits audio first so we're following along.
|
||||||
|
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
||||||
|
CONS_Printf("SDL Audio already started\n");
|
||||||
|
else if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "Error initializing SDL Audio: %s\n", SDL_GetError());
|
||||||
|
// call to start audio failed -- we do not have it
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Open the audio device
|
// Open the audio device
|
||||||
if (M_CheckParm ("-freq") && M_IsNextParm())
|
if (M_CheckParm ("-freq") && M_IsNextParm())
|
||||||
{
|
{
|
||||||
|
|
|
@ -3656,7 +3656,7 @@ const CPUInfoFlags *I_CPUInfo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CPUAffinity_OnChange(void);
|
static void CPUAffinity_OnChange(void);
|
||||||
static consvar_t cv_cpuaffinity = {"cpuaffinity", "1", CV_SAVE | CV_CALL, NULL, CPUAffinity_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
static consvar_t cv_cpuaffinity = {"cpuaffinity", "-1", CV_CALL, NULL, CPUAffinity_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
typedef HANDLE (WINAPI *p_GetCurrentProcess) (VOID);
|
typedef HANDLE (WINAPI *p_GetCurrentProcess) (VOID);
|
||||||
static p_GetCurrentProcess pfnGetCurrentProcess = NULL;
|
static p_GetCurrentProcess pfnGetCurrentProcess = NULL;
|
||||||
|
|
Loading…
Reference in a new issue