mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-23 05:51:58 +00:00
Merge remote-tracking branch 'origin/master' into jelly-racers
This commit is contained in:
commit
5b86a70db2
172 changed files with 7285 additions and 7698 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -13,11 +13,11 @@ Win32_LIB_ASM_Release
|
|||
*.dgb
|
||||
*.debug
|
||||
*.debug.txt
|
||||
/bin/VC10/
|
||||
/objs/VC10/
|
||||
*.user
|
||||
*.db
|
||||
*.opendb
|
||||
/.vs
|
||||
/debian
|
||||
/assets/debian
|
||||
/make
|
||||
/bin
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# Enable CCache early
|
||||
set(SRB2_USE_CCACHE OFF CACHE BOOL "Use CCache")
|
||||
|
|
@ -34,12 +34,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
|||
|
||||
### Useful functions
|
||||
|
||||
# Prepend sources with current source directory
|
||||
function(prepend_sources SOURCE_FILES)
|
||||
foreach(SOURCE_FILE ${${SOURCE_FILES}})
|
||||
set(MODIFIED ${MODIFIED} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE})
|
||||
endforeach()
|
||||
set(${SOURCE_FILES} ${MODIFIED} PARENT_SCOPE)
|
||||
# Add sources from Sourcefile
|
||||
function(target_sourcefile type)
|
||||
file(STRINGS Sourcefile list
|
||||
REGEX "[-0-9A-Za-z_]+\.${type}")
|
||||
target_sources(SRB2SDL2 PRIVATE ${list})
|
||||
endfunction()
|
||||
|
||||
# Macro to add OSX framework
|
||||
|
|
|
|||
32
appveyor.yml
32
appveyor.yml
|
|
@ -2,15 +2,11 @@ version: 2.0.{branch}-{build}
|
|||
os: MinGW
|
||||
|
||||
environment:
|
||||
CC: ccache
|
||||
CCACHE_CC: i686-w64-mingw32-gcc
|
||||
CCACHE_CC_64: x86_64-w64-mingw32-gcc
|
||||
CC: i686-w64-mingw32-gcc
|
||||
WINDRES: windres
|
||||
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
|
||||
MINGW_SDK: c:\msys64\mingw32
|
||||
# c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
|
||||
MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
|
||||
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
|
||||
CFLAGS: -Wno-implicit-fallthrough
|
||||
NASM_ZIP: nasm-2.12.01
|
||||
NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip
|
||||
UPX_ZIP: upx391w
|
||||
|
|
@ -19,8 +15,6 @@ environment:
|
|||
CCACHE_URL: http://alam.srb2.org/ccache.exe
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_DIR: C:\Users\appveyor\.ccache
|
||||
# Disable UPX by default. The user can override this in their Appveyor project settings
|
||||
NOUPX: 1
|
||||
##############################
|
||||
# DEPLOYER VARIABLES
|
||||
# DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
|
||||
|
|
@ -53,11 +47,6 @@ cache:
|
|||
- C:\Users\appveyor\srb2_cache
|
||||
|
||||
install:
|
||||
- if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
|
||||
- if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
|
||||
- if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
|
||||
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
|
||||
|
||||
- if not exist "%NASM_ZIP%.zip" appveyor DownloadFile "%NASM_URL%" -FileName "%NASM_ZIP%.zip"
|
||||
- 7z x -y "%NASM_ZIP%.zip" -o%TMP% >null
|
||||
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%NASM_ZIP%" "%MINGW_SDK%\bin" nasm.exe || exit 0
|
||||
|
|
@ -72,39 +61,27 @@ install:
|
|||
|
||||
configuration:
|
||||
- SDL
|
||||
- SDL64
|
||||
|
||||
before_build:
|
||||
- set "Path=%MINGW_SDK%\bin;%Path%"
|
||||
- if [%X86_64%] == [1] ( x86_64-w64-mingw32-gcc --version ) else ( i686-w64-mingw32-gcc --version )
|
||||
- mingw32-make --version
|
||||
- if not [%X86_64%] == [1] ( nasm -v )
|
||||
- nasm -v
|
||||
- if not [%NOUPX%] == [1] ( upx -V )
|
||||
- ccache -V
|
||||
- ccache -s
|
||||
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
|
||||
- if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" )
|
||||
- cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt
|
||||
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
|
||||
# for pull requests, take the owner's name only, if this isn't the same repo of course
|
||||
- set "REPO=%APPVEYOR_REPO_BRANCH%"
|
||||
- if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [] ( if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a-%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" ) )
|
||||
- set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
|
||||
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%"
|
||||
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
|
||||
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
|
||||
- set "SRB2_MFLAGS=-C src NOECHOFILENAMES=1 CCACHE=1 EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
|
||||
|
||||
build_script:
|
||||
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
|
||||
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
|
||||
|
||||
after_build:
|
||||
- if [%X86_64%] == [1] (
|
||||
set "BUILD_PATH=bin\Mingw64\Release"
|
||||
) else (
|
||||
set "BUILD_PATH=bin\Mingw\Release"
|
||||
)
|
||||
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
|
||||
- ccache -s
|
||||
- set BUILD_ARCHIVE=%REPO%-%GITSHORT%-%CONFIGURATION%.7z
|
||||
- set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
|
||||
|
|
@ -139,3 +116,4 @@ test: off
|
|||
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'))
|
||||
# vim: et ts=1
|
||||
|
|
|
|||
2
bin/FreeBSD/Debug/.gitignore
vendored
2
bin/FreeBSD/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
bin/FreeBSD/Release/.gitignore
vendored
2
bin/FreeBSD/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
1
bin/Linux/Debug/.gitignore
vendored
1
bin/Linux/Debug/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/lsdlsrb2
|
||||
3
bin/Linux/Release/.gitignore
vendored
3
bin/Linux/Release/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
/lsdlsrb2
|
||||
/pnd
|
||||
/*.mo
|
||||
1
bin/Linux64/Debug/.gitignore
vendored
1
bin/Linux64/Debug/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/lsdlsrb2
|
||||
1
bin/Linux64/Release/.gitignore
vendored
1
bin/Linux64/Release/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/lsdlsrb2
|
||||
4
bin/Mingw/Debug/.gitignore
vendored
4
bin/Mingw/Debug/.gitignore
vendored
|
|
@ -1,4 +0,0 @@
|
|||
*.exe
|
||||
*.mo
|
||||
r_opengl.dll
|
||||
*.bat
|
||||
4
bin/Mingw/Release/.gitignore
vendored
4
bin/Mingw/Release/.gitignore
vendored
|
|
@ -1,4 +0,0 @@
|
|||
*.exe
|
||||
*.mo
|
||||
r_opengl.dll
|
||||
*.bat
|
||||
3
bin/Mingw64/Debug/.gitignore
vendored
3
bin/Mingw64/Debug/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
/srb2sdl.exe
|
||||
/srb2win.exe
|
||||
/r_opengl.dll
|
||||
3
bin/Mingw64/Release/.gitignore
vendored
3
bin/Mingw64/Release/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
/srb2sdl.exe
|
||||
/srb2win.exe
|
||||
/r_opengl.dll
|
||||
2
bin/SDL/Debug/.gitignore
vendored
2
bin/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
bin/SDL/Release/.gitignore
vendored
2
bin/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
bin/VC/.gitignore
vendored
2
bin/VC/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/Release
|
||||
/Debug
|
||||
2
bin/VC9/.gitignore
vendored
2
bin/VC9/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/Win32
|
||||
/x64
|
||||
2
bin/dummy/.gitignore
vendored
2
bin/dummy/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/.gitignore
vendored
2
dep/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
#All folders
|
||||
*.d
|
||||
2
dep/FreeBSD/SDL/Debug/.gitignore
vendored
2
dep/FreeBSD/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/FreeBSD/SDL/Release/.gitignore
vendored
2
dep/FreeBSD/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Linux/SDL/Debug/.gitignore
vendored
2
dep/Linux/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Linux/SDL/Release/.gitignore
vendored
2
dep/Linux/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Linux64/SDL/Debug/.gitignore
vendored
2
dep/Linux64/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Linux64/SDL/Release/.gitignore
vendored
2
dep/Linux64/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/MasterClient/.gitignore
vendored
2
dep/MasterClient/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/MasterServer/.gitignore
vendored
2
dep/MasterServer/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw/Debug/.gitignore
vendored
2
dep/Mingw/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw/Release/.gitignore
vendored
2
dep/Mingw/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw/SDL/Debug/.gitignore
vendored
2
dep/Mingw/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw/SDL/Release/.gitignore
vendored
2
dep/Mingw/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw64/Debug/.gitignore
vendored
2
dep/Mingw64/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw64/Release/.gitignore
vendored
2
dep/Mingw64/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw64/SDL/Debug/.gitignore
vendored
2
dep/Mingw64/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/Mingw64/SDL/Release/.gitignore
vendored
2
dep/Mingw64/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/SDL/Release/.gitignore
vendored
2
dep/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/VC/.gitignore
vendored
2
dep/VC/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/VC9/.gitignore
vendored
2
dep/VC9/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/cygwin/Debug/.gitignore
vendored
2
dep/cygwin/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/cygwin/Release/.gitignore
vendored
2
dep/cygwin/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
dep/dummy/.gitignore
vendored
2
dep/dummy/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
8
objs/.gitignore
vendored
8
objs/.gitignore
vendored
|
|
@ -1,8 +0,0 @@
|
|||
#All folders
|
||||
SRB2.res
|
||||
depend.dep
|
||||
depend.ped
|
||||
*.o
|
||||
#VC9 folder only
|
||||
/VC9/Win32
|
||||
/VC9/x64
|
||||
2
objs/FreeBSD/SDL/Debug/.gitignore
vendored
2
objs/FreeBSD/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/FreeBSD/SDL/Release/.gitignore
vendored
2
objs/FreeBSD/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Linux/SDL/Debug/.gitignore
vendored
2
objs/Linux/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Linux/SDL/Release/.gitignore
vendored
2
objs/Linux/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Linux64/SDL/Debug/.gitignore
vendored
2
objs/Linux64/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Linux64/SDL/Release/.gitignore
vendored
2
objs/Linux64/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/MasterClient/.gitignore
vendored
2
objs/MasterClient/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/MasterServer/.gitignore
vendored
2
objs/MasterServer/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw/Debug/.gitignore
vendored
2
objs/Mingw/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw/Release/.gitignore
vendored
2
objs/Mingw/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw/SDL/Debug/.gitignore
vendored
2
objs/Mingw/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw/SDL/Release/.gitignore
vendored
2
objs/Mingw/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw64/Debug/.gitignore
vendored
2
objs/Mingw64/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw64/Release/.gitignore
vendored
2
objs/Mingw64/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw64/SDL/Debug/.gitignore
vendored
2
objs/Mingw64/SDL/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/Mingw64/SDL/Release/.gitignore
vendored
2
objs/Mingw64/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/SDL/Release/.gitignore
vendored
2
objs/SDL/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/VC/.gitignore
vendored
2
objs/VC/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/VC9/.gitignore
vendored
2
objs/VC9/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/cygwin/Debug/.gitignore
vendored
2
objs/cygwin/Debug/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/cygwin/Release/.gitignore
vendored
2
objs/cygwin/Release/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
2
objs/dummy/.gitignore
vendored
2
objs/dummy/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
# DON'T REMOVE
|
||||
# This keeps the folder from disappearing
|
||||
|
|
@ -1,269 +1,14 @@
|
|||
# SRB2 Core
|
||||
|
||||
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32)
|
||||
|
||||
# Core sources
|
||||
set(SRB2_CORE_SOURCES
|
||||
am_map.c
|
||||
command.c
|
||||
comptime.c
|
||||
console.c
|
||||
d_clisrv.c
|
||||
d_main.c
|
||||
d_net.c
|
||||
d_netcmd.c
|
||||
d_netfil.c
|
||||
dehacked.c
|
||||
deh_soc.c
|
||||
deh_lua.c
|
||||
deh_tables.c
|
||||
f_finale.c
|
||||
f_wipe.c
|
||||
filesrch.c
|
||||
g_demo.c
|
||||
g_game.c
|
||||
g_input.c
|
||||
g_splitscreen.c
|
||||
font.c
|
||||
hu_stuff.c
|
||||
i_tcp.c
|
||||
info.c
|
||||
lzf.c
|
||||
m_aatree.c
|
||||
m_anigif.c
|
||||
m_argv.c
|
||||
m_bbox.c
|
||||
m_cheat.c
|
||||
m_cond.c
|
||||
m_fixed.c
|
||||
m_menu.c
|
||||
m_misc.c
|
||||
m_perfstats.c
|
||||
m_queue.c
|
||||
m_random.c
|
||||
md5.c
|
||||
mserv.c
|
||||
http-mserv.c
|
||||
s_sound.c
|
||||
screen.c
|
||||
sounds.c
|
||||
st_stuff.c
|
||||
#string.c
|
||||
tables.c
|
||||
v_video.c
|
||||
w_wad.c
|
||||
y_inter.c
|
||||
z_zone.c
|
||||
)
|
||||
target_sourcefile(c)
|
||||
target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in)
|
||||
|
||||
set(SRB2_CORE_HEADERS
|
||||
am_map.h
|
||||
byteptr.h
|
||||
command.h
|
||||
console.h
|
||||
d_clisrv.h
|
||||
d_event.h
|
||||
d_main.h
|
||||
d_net.h
|
||||
d_netcmd.h
|
||||
d_netfil.h
|
||||
d_player.h
|
||||
d_think.h
|
||||
d_ticcmd.h
|
||||
dehacked.h
|
||||
deh_soc.h
|
||||
deh_lua.h
|
||||
deh_tables.h
|
||||
doomdata.h
|
||||
doomdef.h
|
||||
doomstat.h
|
||||
doomtype.h
|
||||
endian.h
|
||||
f_finale.h
|
||||
fastcmp.h
|
||||
filesrch.h
|
||||
g_demo.h
|
||||
g_game.h
|
||||
g_input.h
|
||||
g_state.h
|
||||
font.h
|
||||
hu_stuff.h
|
||||
i_joy.h
|
||||
i_net.h
|
||||
i_sound.h
|
||||
i_system.h
|
||||
i_tcp.h
|
||||
i_video.h
|
||||
info.h
|
||||
keys.h
|
||||
lzf.h
|
||||
m_aatree.h
|
||||
m_anigif.h
|
||||
m_argv.h
|
||||
m_bbox.h
|
||||
m_cheat.h
|
||||
m_cond.h
|
||||
m_dllist.h
|
||||
m_fixed.h
|
||||
m_menu.h
|
||||
m_misc.h
|
||||
m_perfstats.h
|
||||
m_queue.h
|
||||
m_random.h
|
||||
m_swap.h
|
||||
md5.h
|
||||
mserv.h
|
||||
p5prof.h
|
||||
s_sound.h
|
||||
screen.h
|
||||
sounds.h
|
||||
st_stuff.h
|
||||
tables.h
|
||||
v_video.h
|
||||
w_wad.h
|
||||
y_inter.h
|
||||
z_zone.h
|
||||
|
||||
config.h.in
|
||||
)
|
||||
|
||||
set(SRB2_CORE_RENDER_SOURCES
|
||||
r_bsp.c
|
||||
r_data.c
|
||||
r_draw.c
|
||||
r_main.c
|
||||
r_plane.c
|
||||
r_segs.c
|
||||
r_skins.c
|
||||
r_sky.c
|
||||
r_splats.c
|
||||
r_things.c
|
||||
r_textures.c
|
||||
r_patch.c
|
||||
r_patchrotation.c
|
||||
r_picformats.c
|
||||
r_portal.c
|
||||
|
||||
r_bsp.h
|
||||
r_data.h
|
||||
r_defs.h
|
||||
r_draw.h
|
||||
r_local.h
|
||||
r_main.h
|
||||
r_plane.h
|
||||
r_segs.h
|
||||
r_skins.h
|
||||
r_sky.h
|
||||
r_splats.h
|
||||
r_state.h
|
||||
r_things.h
|
||||
r_textures.h
|
||||
r_patch.h
|
||||
r_patchrotation.h
|
||||
r_picformats.h
|
||||
r_portal.h
|
||||
)
|
||||
|
||||
set(SRB2_CORE_GAME_SOURCES
|
||||
p_ceilng.c
|
||||
p_enemy.c
|
||||
p_floor.c
|
||||
p_inter.c
|
||||
p_lights.c
|
||||
p_map.c
|
||||
p_maputl.c
|
||||
p_mobj.c
|
||||
p_polyobj.c
|
||||
p_saveg.c
|
||||
p_setup.c
|
||||
p_sight.c
|
||||
p_slopes.c
|
||||
p_spec.c
|
||||
p_telept.c
|
||||
p_tick.c
|
||||
p_user.c
|
||||
taglist.c
|
||||
|
||||
k_race.c
|
||||
k_battle.c
|
||||
k_bheap.c
|
||||
k_collide.c
|
||||
k_kart.c
|
||||
k_pathfind.c
|
||||
k_pwrlv.c
|
||||
k_waypoint.c
|
||||
k_color.c
|
||||
k_bot.c
|
||||
k_botitem.c
|
||||
k_botsearch.c
|
||||
k_respawn.c
|
||||
k_grandprix.c
|
||||
k_hud.c
|
||||
|
||||
p_local.h
|
||||
p_maputl.h
|
||||
p_mobj.h
|
||||
p_polyobj.h
|
||||
p_pspr.h
|
||||
p_saveg.h
|
||||
p_setup.h
|
||||
p_slopes.h
|
||||
p_spec.h
|
||||
p_tick.h
|
||||
taglist.h
|
||||
|
||||
k_race.h
|
||||
k_battle.h
|
||||
k_bheap.h
|
||||
k_collide.h
|
||||
k_kart.h
|
||||
k_pathfind.h
|
||||
k_pwrlv.h
|
||||
k_waypoint.h
|
||||
k_color.h
|
||||
k_bot.h
|
||||
k_respawn.h
|
||||
k_grandprix.h
|
||||
k_hud.h
|
||||
)
|
||||
|
||||
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c)
|
||||
endif()
|
||||
|
||||
prepend_sources(SRB2_CORE_SOURCES)
|
||||
prepend_sources(SRB2_CORE_HEADERS)
|
||||
prepend_sources(SRB2_CORE_RENDER_SOURCES)
|
||||
prepend_sources(SRB2_CORE_GAME_SOURCES)
|
||||
|
||||
set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
|
||||
source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES})
|
||||
source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES})
|
||||
|
||||
|
||||
set(SRB2_ASM_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vid_copy.s
|
||||
)
|
||||
|
||||
set(SRB2_NASM_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tmap_mmx.nas
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tmap.nas
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND SRB2_NASM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tmap_vc.nas)
|
||||
endif()
|
||||
|
||||
set(SRB2_NASM_OBJECTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tmap_mmx.obj
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tmap.obj
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND SRB2_NASM_OBJECTS ${CMAKE_CURRENT_BINARY_DIR}/tmap_vc.obj)
|
||||
endif()
|
||||
|
||||
source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES})
|
||||
set(SRB2_ASM_SOURCES vid_copy.s)
|
||||
|
||||
set(SRB2_NASM_SOURCES tmap_mmx.nas tmap.nas)
|
||||
|
||||
### Configuration
|
||||
set(SRB2_CONFIG_HAVE_PNG ON CACHE BOOL
|
||||
|
|
@ -303,92 +48,7 @@ if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
|
|||
"Use SRB2Kart's internal copies of required dependencies (SDL2, PNG, zlib, GME, OpenMPT, cURL).")
|
||||
endif()
|
||||
|
||||
set(SRB2_LUA_SOURCES
|
||||
lua_baselib.c
|
||||
lua_blockmaplib.c
|
||||
lua_consolelib.c
|
||||
lua_hooklib.c
|
||||
lua_hudlib.c
|
||||
lua_infolib.c
|
||||
lua_maplib.c
|
||||
lua_taglib.c
|
||||
lua_mathlib.c
|
||||
lua_mobjlib.c
|
||||
lua_playerlib.c
|
||||
lua_polyobjlib.c
|
||||
lua_script.c
|
||||
lua_skinlib.c
|
||||
lua_thinkerlib.c
|
||||
)
|
||||
set(SRB2_LUA_HEADERS
|
||||
lua_hook.h
|
||||
lua_hud.h
|
||||
lua_libs.h
|
||||
lua_script.h
|
||||
)
|
||||
|
||||
prepend_sources(SRB2_LUA_SOURCES)
|
||||
prepend_sources(SRB2_LUA_HEADERS)
|
||||
|
||||
source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS})
|
||||
|
||||
set(SRB2_BLUA_SOURCES
|
||||
blua/lapi.c
|
||||
blua/lauxlib.c
|
||||
blua/lbaselib.c
|
||||
blua/lcode.c
|
||||
blua/ldebug.c
|
||||
blua/ldo.c
|
||||
blua/ldump.c
|
||||
blua/lfunc.c
|
||||
blua/lgc.c
|
||||
blua/linit.c
|
||||
blua/liolib.c
|
||||
blua/llex.c
|
||||
blua/lmem.c
|
||||
blua/lobject.c
|
||||
blua/lopcodes.c
|
||||
blua/lparser.c
|
||||
blua/lstate.c
|
||||
blua/lstring.c
|
||||
blua/lstrlib.c
|
||||
blua/ltable.c
|
||||
blua/ltablib.c
|
||||
blua/ltm.c
|
||||
blua/lundump.c
|
||||
blua/lvm.c
|
||||
blua/lzio.c
|
||||
)
|
||||
set(SRB2_BLUA_HEADERS
|
||||
blua/lapi.h
|
||||
blua/lauxlib.h
|
||||
blua/lcode.h
|
||||
blua/ldebug.h
|
||||
blua/ldo.h
|
||||
blua/lfunc.h
|
||||
blua/lgc.h
|
||||
blua/llex.h
|
||||
blua/llimits.h
|
||||
blua/lmem.h
|
||||
blua/lobject.h
|
||||
blua/lopcodes.h
|
||||
blua/lparser.h
|
||||
blua/lstate.h
|
||||
blua/lstring.h
|
||||
blua/ltable.h
|
||||
blua/ltm.h
|
||||
blua/lua.h
|
||||
blua/luaconf.h
|
||||
blua/lualib.h
|
||||
blua/lundump.h
|
||||
blua/lvm.h
|
||||
blua/lzio.h
|
||||
)
|
||||
|
||||
prepend_sources(SRB2_BLUA_SOURCES)
|
||||
prepend_sources(SRB2_BLUA_HEADERS)
|
||||
|
||||
source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS})
|
||||
add_subdirectory(blua)
|
||||
|
||||
if(${SRB2_CONFIG_HAVE_GME})
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
|
|
@ -404,7 +64,7 @@ if(${SRB2_CONFIG_HAVE_GME})
|
|||
endif()
|
||||
if(${GME_FOUND})
|
||||
set(SRB2_HAVE_GME ON)
|
||||
add_definitions(-DHAVE_LIBGME)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_GME)
|
||||
else()
|
||||
message(WARNING "You have specified that GME is available but it was not found.")
|
||||
endif()
|
||||
|
|
@ -424,7 +84,7 @@ if(${SRB2_CONFIG_HAVE_OPENMPT})
|
|||
endif()
|
||||
if(${OPENMPT_FOUND})
|
||||
set(SRB2_HAVE_OPENMPT ON)
|
||||
add_definitions(-DHAVE_OPENMPT)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_OPENMPT)
|
||||
else()
|
||||
message(WARNING "You have specified that OpenMPT is available but it was not found.")
|
||||
endif()
|
||||
|
|
@ -447,8 +107,7 @@ if(${SRB2_CONFIG_HAVE_MIXERX})
|
|||
endif()
|
||||
if(${MIXERX_FOUND})
|
||||
set(SRB2_HAVE_MIXERX ON)
|
||||
set(SRB2_SDL2_SOUNDIMPL mixer_sound.c)
|
||||
add_definitions(-DHAVE_MIXERX)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXERX)
|
||||
else()
|
||||
message(WARNING "You have specified that SDL Mixer X is available but it was not found.")
|
||||
endif()
|
||||
|
|
@ -469,13 +128,9 @@ if(${SRB2_CONFIG_HAVE_DISCORDRPC})
|
|||
endif()
|
||||
if(${DISCORDRPC_FOUND})
|
||||
set(SRB2_HAVE_DISCORDRPC ON)
|
||||
add_definitions(-DHAVE_DISCORDRPC)
|
||||
add_definitions(-DUSE_STUN)
|
||||
set(SRB2_DISCORDRPC_SOURCES discord.c stun.c)
|
||||
set(SRB2_DISCORDRPC_HEADERS discord.h stun.h)
|
||||
prepend_sources(SRB2_DISCORDRPC_SOURCES)
|
||||
prepend_sources(SRB2_DISCORDRPC_HEADERS)
|
||||
source_group("Discord Rich Presence" FILES ${SRB2_DISCORDRPC_SOURCES} ${SRB2_DISCORDRPC_HEADERS})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_DISCORDRPC)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DUSE_STUN)
|
||||
target_sources(SRB2SDL2 PRIVATE discord.c stun.c)
|
||||
else()
|
||||
message(WARNING "You have specified that Discord Rich Presence is available but it was not found.")
|
||||
endif()
|
||||
|
|
@ -495,7 +150,7 @@ if(${SRB2_CONFIG_HAVE_ZLIB})
|
|||
endif()
|
||||
if(${ZLIB_FOUND})
|
||||
set(SRB2_HAVE_ZLIB ON)
|
||||
add_definitions(-DHAVE_ZLIB)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_ZLIB)
|
||||
else()
|
||||
message(WARNING "You have specified that ZLIB is available but it was not found. SRB2Kart may not compile correctly.")
|
||||
endif()
|
||||
|
|
@ -516,14 +171,9 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
|
|||
endif()
|
||||
if(${PNG_FOUND})
|
||||
set(SRB2_HAVE_PNG ON)
|
||||
add_definitions(-DHAVE_PNG)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE)
|
||||
set(SRB2_PNG_SOURCES apng.c)
|
||||
set(SRB2_PNG_HEADERS apng.h)
|
||||
prepend_sources(SRB2_PNG_SOURCES)
|
||||
prepend_sources(SRB2_PNG_HEADERS)
|
||||
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}
|
||||
${SRB2_PNG_SOURCES} ${SRB2_PNG_HEADERS})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_PNG)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE)
|
||||
target_sources(SRB2SDL2 PRIVATE apng.c)
|
||||
else()
|
||||
message(WARNING "You have specified that PNG is available but it was not found. SRB2Kart may not compile correctly.")
|
||||
endif()
|
||||
|
|
@ -544,7 +194,7 @@ if(${SRB2_CONFIG_HAVE_CURL})
|
|||
endif()
|
||||
if(${CURL_FOUND})
|
||||
set(SRB2_HAVE_CURL ON)
|
||||
add_definitions(-DHAVE_CURL)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_CURL)
|
||||
else()
|
||||
message(WARNING "You have specified that CURL is available but it was not found. SRB2Kart may not compile correctly.")
|
||||
endif()
|
||||
|
|
@ -552,59 +202,19 @@ endif()
|
|||
|
||||
if(${SRB2_CONFIG_HAVE_THREADS})
|
||||
set(SRB2_HAVE_THREADS ON)
|
||||
set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/i_threads.h)
|
||||
add_definitions(-DHAVE_THREADS)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HWRENDER})
|
||||
add_definitions(-DHWRENDER)
|
||||
set(SRB2_HWRENDER_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_batching.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_bsp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_draw.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2load.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md3load.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_model.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/u_list.c
|
||||
)
|
||||
|
||||
set (SRB2_HWRENDER_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_batching.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_data.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_defs.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_dll.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_drv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glob.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2load.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md3load.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_model.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/u_list.h
|
||||
)
|
||||
|
||||
set(SRB2_R_OPENGL_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.c
|
||||
)
|
||||
|
||||
set(SRB2_R_OPENGL_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.h
|
||||
)
|
||||
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER)
|
||||
add_subdirectory(hardware)
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL})
|
||||
find_package(OpenGL)
|
||||
if(${OPENGL_FOUND})
|
||||
add_definitions(-DHWRENDER)
|
||||
add_definitions(-DSTATIC_OPENGL)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DSTATIC_OPENGL)
|
||||
else()
|
||||
message(WARNING "You have specified static opengl but opengl was not found. Not setting HWRENDER.")
|
||||
endif()
|
||||
|
|
@ -625,12 +235,16 @@ if(${SRB2_CONFIG_USEASM})
|
|||
set(CMAKE_ASM_NASM_FLAGS "${SRB2_ASM_FLAGS}" CACHE STRING "Flags used by the assembler during all build types.")
|
||||
enable_language(ASM_NASM)
|
||||
endif()
|
||||
|
||||
set(SRB2_USEASM ON)
|
||||
add_definitions(-DUSEASM)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DUSEASM)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mfpmath=sse")
|
||||
|
||||
target_sources(SRB2SDL2 PRIVATE ${SRB2_ASM_SOURCES}
|
||||
${SRB2_NASM_SOURCES})
|
||||
else()
|
||||
set(SRB2_USEASM OFF)
|
||||
add_definitions(-DNONX86 -DNORUSEASM)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DNONX86 -DNORUSEASM)
|
||||
endif()
|
||||
|
||||
# Targets
|
||||
|
|
@ -666,7 +280,9 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
|
||||
endif()
|
||||
|
||||
add_definitions(-DCMAKECONFIG)
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-trigraphs)
|
||||
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DCMAKECONFIG)
|
||||
|
||||
#add_library(SRB2Core STATIC
|
||||
# ${SRB2_CORE_SOURCES}
|
||||
|
|
|
|||
1137
src/Makefile
1137
src/Makefile
File diff suppressed because it is too large
Load diff
482
src/Makefile.cfg
482
src/Makefile.cfg
|
|
@ -1,482 +0,0 @@
|
|||
# vim: ft=make
|
||||
#
|
||||
# Makefile.cfg for SRB2
|
||||
#
|
||||
|
||||
#
|
||||
# GNU compiler & tools' flags
|
||||
# and other things
|
||||
#
|
||||
|
||||
# See the following variable don't start with 'GCC'. This is
|
||||
# to avoid a false positive with the version detection...
|
||||
|
||||
SUPPORTED_GCC_VERSIONS:=\
|
||||
101 102\
|
||||
91 92 93\
|
||||
81 82 83 84\
|
||||
71 72 73 74 75\
|
||||
61 62 63 64\
|
||||
51 52 53 54 55\
|
||||
40 41 42 43 44 45 46 47 48 49
|
||||
|
||||
LATEST_GCC_VERSION=10.2
|
||||
|
||||
# gcc or g++
|
||||
ifdef PREFIX
|
||||
CC=$(PREFIX)-gcc
|
||||
CXX=$(PREFIX)-g++
|
||||
OBJCOPY=$(PREFIX)-objcopy
|
||||
OBJDUMP=$(PREFIX)-objdump
|
||||
STRIP=$(PREFIX)-strip
|
||||
WINDRES=$(PREFIX)-windres
|
||||
else
|
||||
OBJCOPY=objcopy
|
||||
OBJDUMP=objdump
|
||||
STRIP=strip
|
||||
WINDRES=windres
|
||||
endif
|
||||
|
||||
# because Apple screws with us on this
|
||||
# need to get bintools from homebrew
|
||||
ifdef MACOSX
|
||||
CC=clang
|
||||
CXX=clang
|
||||
OBJCOPY=gobjcopy
|
||||
OBJDUMP=gobjdump
|
||||
endif
|
||||
|
||||
# Automatically set version flag, but not if one was manually set
|
||||
# And don't bother if this is a clean only run
|
||||
ifeq (,$(filter GCC% CLEANONLY,$(.VARIABLES)))
|
||||
version:=$(shell $(CC) --version)
|
||||
# check if this is in fact GCC
|
||||
ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version))))
|
||||
version:=$(shell $(CC) -dumpversion)
|
||||
|
||||
# Turn version into words of major, minor
|
||||
v:=$(subst ., ,$(version))
|
||||
# concat. major minor
|
||||
v:=$(word 1,$(v))$(word 2,$(v))
|
||||
|
||||
# If this version is not in the list, default to the latest supported
|
||||
ifeq (,$(filter $(v),$(SUPPORTED_GCC_VERSIONS)))
|
||||
define line =
|
||||
Your compiler version, GCC $(version), is not supported by the Makefile.
|
||||
The Makefile will assume GCC $(LATEST_GCC_VERSION).))
|
||||
endef
|
||||
$(call print,$(line))
|
||||
GCC$(subst .,,$(LATEST_GCC_VERSION))=1
|
||||
else
|
||||
$(call print,Detected GCC $(version) (GCC$(v)))
|
||||
GCC$(v)=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef GCC102
|
||||
GCC101=1
|
||||
endif
|
||||
|
||||
ifdef GCC101
|
||||
GCC93=1
|
||||
endif
|
||||
|
||||
ifdef GCC93
|
||||
GCC92=1
|
||||
endif
|
||||
|
||||
ifdef GCC92
|
||||
GCC91=1
|
||||
endif
|
||||
|
||||
ifdef GCC91
|
||||
GCC84=1
|
||||
endif
|
||||
|
||||
ifdef GCC84
|
||||
GCC83=1
|
||||
endif
|
||||
|
||||
ifdef GCC83
|
||||
GCC82=1
|
||||
endif
|
||||
|
||||
ifdef GCC82
|
||||
GCC81=1
|
||||
endif
|
||||
|
||||
ifdef GCC81
|
||||
GCC75=1
|
||||
endif
|
||||
|
||||
ifdef GCC75
|
||||
GCC74=1
|
||||
endif
|
||||
|
||||
ifdef GCC74
|
||||
GCC73=1
|
||||
endif
|
||||
|
||||
ifdef GCC73
|
||||
GCC72=1
|
||||
endif
|
||||
|
||||
ifdef GCC72
|
||||
GCC71=1
|
||||
endif
|
||||
|
||||
ifdef GCC71
|
||||
GCC64=1
|
||||
endif
|
||||
|
||||
ifdef GCC64
|
||||
GCC63=1
|
||||
endif
|
||||
|
||||
ifdef GCC63
|
||||
GCC62=1
|
||||
endif
|
||||
|
||||
ifdef GCC62
|
||||
GCC61=1
|
||||
endif
|
||||
|
||||
ifdef GCC61
|
||||
GCC55=1
|
||||
endif
|
||||
|
||||
ifdef GCC55
|
||||
GCC54=1
|
||||
endif
|
||||
|
||||
ifdef GCC54
|
||||
GCC53=1
|
||||
endif
|
||||
|
||||
ifdef GCC53
|
||||
GCC52=1
|
||||
endif
|
||||
|
||||
ifdef GCC52
|
||||
GCC51=1
|
||||
endif
|
||||
|
||||
ifdef GCC51
|
||||
GCC49=1
|
||||
endif
|
||||
|
||||
ifdef GCC49
|
||||
GCC48=1
|
||||
endif
|
||||
|
||||
ifdef GCC48
|
||||
GCC47=1
|
||||
endif
|
||||
|
||||
ifdef GCC47
|
||||
GCC46=1
|
||||
endif
|
||||
|
||||
ifdef GCC46
|
||||
GCC45=1
|
||||
endif
|
||||
|
||||
ifdef GCC45
|
||||
GCC44=1
|
||||
endif
|
||||
|
||||
ifdef GCC44
|
||||
GCC43=1
|
||||
endif
|
||||
|
||||
ifdef GCC43
|
||||
GCC42=1
|
||||
endif
|
||||
|
||||
ifdef GCC42
|
||||
GCC41=1
|
||||
endif
|
||||
|
||||
ifdef GCC41
|
||||
GCC40=1
|
||||
VCHELP=1
|
||||
endif
|
||||
|
||||
ifdef GCC295
|
||||
GCC29=1
|
||||
endif
|
||||
|
||||
OLDWFLAGS:=$(WFLAGS)
|
||||
# -W -Wno-unused
|
||||
WFLAGS=-Wall
|
||||
ifndef GCC295
|
||||
#WFLAGS+=-Wno-packed
|
||||
endif
|
||||
ifndef RELAXWARNINGS
|
||||
WFLAGS+=-W
|
||||
#WFLAGS+=-Wno-sign-compare
|
||||
ifndef GCC295
|
||||
WFLAGS+=-Wno-div-by-zero
|
||||
endif
|
||||
#WFLAGS+=-Wsystem-headers
|
||||
WFLAGS+=-Wfloat-equal
|
||||
#WFLAGS+=-Wtraditional
|
||||
ifdef VCHELP
|
||||
WFLAGS+=-Wdeclaration-after-statement
|
||||
WFLAGS+=-Wno-error=declaration-after-statement
|
||||
endif
|
||||
WFLAGS+=-Wundef
|
||||
ifndef GCC295
|
||||
WFLAGS+=-Wendif-labels
|
||||
endif
|
||||
ifdef GCC40
|
||||
WFLAGS+=-std=gnu89
|
||||
endif
|
||||
ifdef GCC41
|
||||
WFLAGS+=-Wshadow
|
||||
endif
|
||||
#WFLAGS+=-Wlarger-than-%len%
|
||||
WFLAGS+=-Wpointer-arith -Wbad-function-cast
|
||||
ifdef GCC45
|
||||
#WFLAGS+=-Wc++-compat
|
||||
endif
|
||||
WFLAGS+=-Wcast-qual
|
||||
ifndef NOCASTALIGNWARN
|
||||
WFLAGS+=-Wcast-align
|
||||
endif
|
||||
WFLAGS+=-Wwrite-strings
|
||||
ifndef ERRORMODE
|
||||
#WFLAGS+=-Wconversion
|
||||
ifdef GCC43
|
||||
#WFLAGS+=-Wno-sign-conversion
|
||||
endif
|
||||
endif
|
||||
WFLAGS+=-Wsign-compare
|
||||
ifdef GCC91
|
||||
WFLAGS+=-Wno-error=address-of-packed-member
|
||||
endif
|
||||
ifdef GCC45
|
||||
WFLAGS+=-Wlogical-op
|
||||
endif
|
||||
WFLAGS+=-Waggregate-return
|
||||
ifdef HAIKU
|
||||
ifdef GCC41
|
||||
#WFLAGS+=-Wno-attributes
|
||||
endif
|
||||
endif
|
||||
#WFLAGS+=-Wstrict-prototypes
|
||||
ifdef GCC40
|
||||
WFLAGS+=-Wold-style-definition
|
||||
endif
|
||||
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
|
||||
ifdef GCC40
|
||||
WFLAGS+=-Wmissing-field-initializers
|
||||
endif
|
||||
WFLAGS+=-Wmissing-noreturn
|
||||
#WFLAGS+=-Wmissing-format-attribute
|
||||
#WFLAGS+=-Wno-multichar
|
||||
#WFLAGS+=-Wno-deprecated-declarations
|
||||
#WFLAGS+=-Wpacked
|
||||
#WFLAGS+=-Wpadded
|
||||
#WFLAGS+=-Wredundant-decls
|
||||
WFLAGS+=-Wnested-externs
|
||||
#WFLAGS+=-Wunreachable-code
|
||||
WFLAGS+=-Winline
|
||||
ifdef GCC43
|
||||
WFLAGS+=-funit-at-a-time
|
||||
WFLAGS+=-Wlogical-op
|
||||
endif
|
||||
ifndef GCC295
|
||||
WFLAGS+=-Wdisabled-optimization
|
||||
endif
|
||||
endif
|
||||
WFLAGS+=-Wformat-y2k
|
||||
ifdef GCC71
|
||||
WFLAGS+=-Wno-error=format-overflow=2
|
||||
endif
|
||||
WFLAGS+=-Wformat-security
|
||||
ifndef GCC29
|
||||
#WFLAGS+=-Winit-self
|
||||
endif
|
||||
ifdef GCC46
|
||||
WFLAGS+=-Wno-suggest-attribute=noreturn
|
||||
endif
|
||||
|
||||
ifdef NOLDWARNING
|
||||
LDFLAGS+=-Wl,--as-needed
|
||||
endif
|
||||
|
||||
ifdef ERRORMODE
|
||||
WFLAGS+=-Werror
|
||||
endif
|
||||
|
||||
WFLAGS+=$(OLDWFLAGS)
|
||||
|
||||
ifdef GCC43
|
||||
#WFLAGS+=-Wno-error=clobbered
|
||||
endif
|
||||
ifdef GCC44
|
||||
WFLAGS+=-Wno-error=array-bounds
|
||||
endif
|
||||
ifdef GCC46
|
||||
WFLAGS+=-Wno-error=suggest-attribute=noreturn
|
||||
endif
|
||||
ifdef GCC54
|
||||
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
|
||||
endif
|
||||
ifdef GCC61
|
||||
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
|
||||
endif
|
||||
ifdef GCC71
|
||||
WFLAGS+=-Wimplicit-fallthrough=4
|
||||
WFLAGS+=-Wno-format-truncation
|
||||
endif
|
||||
ifdef GCC81
|
||||
WFLAGS+=-Wno-error=format-overflow
|
||||
WFLAGS+=-Wno-error=stringop-truncation
|
||||
WFLAGS+=-Wno-error=stringop-overflow
|
||||
WFLAGS+=-Wno-format-overflow
|
||||
WFLAGS+=-Wno-stringop-truncation
|
||||
WFLAGS+=-Wno-stringop-overflow
|
||||
WFLAGS+=-Wno-error=multistatement-macros
|
||||
endif
|
||||
|
||||
|
||||
#indicate platform and what interface use with
|
||||
ifndef LINUX
|
||||
ifndef FREEBSD
|
||||
ifndef CYGWIN32
|
||||
ifndef MINGW
|
||||
ifndef MINGW64
|
||||
ifndef SDL
|
||||
ifndef DUMMY
|
||||
$(error No interface or platform flag defined)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#determine the interface directory (where you put all i_*.c)
|
||||
i_net_o=$(OBJDIR)/i_net.o
|
||||
i_system_o=$(OBJDIR)/i_system.o
|
||||
i_sound_o=$(OBJDIR)/i_sound.o
|
||||
i_main_o=$(OBJDIR)/i_main.o
|
||||
#set OBJDIR and BIN's starting place
|
||||
OBJDIR=../objs
|
||||
BIN=../bin
|
||||
DEPDIR=../dep
|
||||
#Nasm ASM and rm
|
||||
ifdef YASM
|
||||
NASM?=yasm
|
||||
else
|
||||
NASM?=nasm
|
||||
endif
|
||||
REMOVE?=rm -f
|
||||
MKDIR?=mkdir -p
|
||||
GZIP?=gzip
|
||||
GZIP_OPTS?=-9 -f -n
|
||||
GZIP_OPT2=$(GZIP_OPTS) --rsyncable
|
||||
UPX?=upx
|
||||
UPX_OPTS?=--best --preserve-build-id
|
||||
ifndef ECHO
|
||||
UPX_OPTS+=-q
|
||||
endif
|
||||
|
||||
#Interface Setup
|
||||
ifdef DUMMY
|
||||
INTERFACE=dummy
|
||||
OBJDIR:=$(OBJDIR)/dummy
|
||||
BIN:=$(BIN)/dummy
|
||||
DEPDIR:=$(DEPDIR)/dummy
|
||||
else
|
||||
ifdef LINUX
|
||||
NASMFORMAT=elf -DLINUX
|
||||
SDL=1
|
||||
ifdef LINUX64
|
||||
OBJDIR:=$(OBJDIR)/Linux64
|
||||
BIN:=$(BIN)/Linux64
|
||||
DEPDIR:=$(DEPDIR)/Linux64
|
||||
else
|
||||
OBJDIR:=$(OBJDIR)/Linux
|
||||
BIN:=$(BIN)/Linux
|
||||
DEPDIR:=$(DEPDIR)/Linux
|
||||
endif
|
||||
else
|
||||
ifdef FREEBSD
|
||||
INTERFACE=sdl
|
||||
NASMFORMAT=elf -DLINUX
|
||||
SDL=1
|
||||
|
||||
OBJDIR:=$(OBJDIR)/FreeBSD
|
||||
BIN:=$(BIN)/FreeBSD
|
||||
DEPDIR:=$(DEPDIR)/Linux
|
||||
else
|
||||
ifdef SOLARIS
|
||||
INTERFACE=sdl
|
||||
NASMFORMAT=elf -DLINUX
|
||||
SDL=1
|
||||
|
||||
OBJDIR:=$(OBJDIR)/Solaris
|
||||
BIN:=$(BIN)/Solaris
|
||||
DEPDIR:=$(DEPDIR)/Solaris
|
||||
else
|
||||
ifdef CYGWIN32
|
||||
INTERFACE=sdl
|
||||
NASMFORMAT=win32
|
||||
SDL=1
|
||||
|
||||
OBJDIR:=$(OBJDIR)/cygwin
|
||||
BIN:=$(BIN)/Cygwin
|
||||
DEPDIR:=$(DEPDIR)/Cygwin
|
||||
else
|
||||
ifdef MINGW64
|
||||
#NASMFORMAT=win64
|
||||
SDL=1
|
||||
OBJDIR:=$(OBJDIR)/Mingw64
|
||||
BIN:=$(BIN)/Mingw64
|
||||
DEPDIR:=$(DEPDIR)/Mingw64
|
||||
else
|
||||
ifdef MINGW
|
||||
NASMFORMAT=win32
|
||||
SDL=1
|
||||
OBJDIR:=$(OBJDIR)/Mingw
|
||||
BIN:=$(BIN)/Mingw
|
||||
DEPDIR:=$(DEPDIR)/Mingw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ARCHNAME
|
||||
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
|
||||
BIN:=$(BIN)/$(ARCHNAME)
|
||||
DEPDIR:=$(DEPDIR)/$(ARCHNAME)
|
||||
endif
|
||||
|
||||
OBJDUMP_OPTS?=--wide --source --line-numbers
|
||||
LD=$(CC)
|
||||
|
||||
ifdef SDL
|
||||
INTERFACE=sdl
|
||||
OBJDIR:=$(OBJDIR)/SDL
|
||||
DEPDIR:=$(DEPDIR)/SDL
|
||||
endif
|
||||
|
||||
ifndef DUMMY
|
||||
ifdef DEBUGMODE
|
||||
OBJDIR:=$(OBJDIR)/Debug
|
||||
BIN:=$(BIN)/Debug
|
||||
DEPDIR:=$(DEPDIR)/Debug
|
||||
else
|
||||
OBJDIR:=$(OBJDIR)/Release
|
||||
BIN:=$(BIN)/Release
|
||||
DEPDIR:=$(DEPDIR)/Release
|
||||
endif
|
||||
endif
|
||||
107
src/Makefile.d/detect.mk
Normal file
107
src/Makefile.d/detect.mk
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
#
|
||||
# Detect the host system and compiler version.
|
||||
#
|
||||
|
||||
# Previously featured:\
|
||||
PANDORA\
|
||||
HAIKU\
|
||||
DUMMY\
|
||||
DJGPPDOS\
|
||||
SOLARIS\
|
||||
MACOSX\
|
||||
|
||||
all_systems:=\
|
||||
LINUX64\
|
||||
MINGW64\
|
||||
MINGW\
|
||||
UNIX\
|
||||
LINUX\
|
||||
FREEBSD\
|
||||
SDL\
|
||||
|
||||
# check for user specified system
|
||||
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
||||
ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
|
||||
|
||||
_m=Detected a Windows system,\
|
||||
compiling for 32-bit MinGW SDL...)
|
||||
$(call Print,$(_m))
|
||||
|
||||
# go for a 32-bit sdl mingw exe by default
|
||||
MINGW:=1
|
||||
|
||||
else # if you on the *nix
|
||||
|
||||
system:=$(shell uname -s)
|
||||
|
||||
ifeq ($(system),Linux)
|
||||
new_system:=LINUX
|
||||
else
|
||||
|
||||
$(error \
|
||||
Could not automatically detect your system,\
|
||||
try specifying a system manually)
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(shell getconf LONG_BIT),64)
|
||||
system+=64-bit
|
||||
new_system:=$(new_system)64
|
||||
endif
|
||||
|
||||
$(call Print,Detected $(system) ($(new_system))...)
|
||||
$(new_system):=1
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
# This must have high to low order.
|
||||
gcc_versions:=\
|
||||
102 101\
|
||||
93 92 91\
|
||||
84 83 82 81\
|
||||
75 74 73 72 71\
|
||||
64 63 62 61\
|
||||
55 54 53 52 51\
|
||||
49 48 47 46 45 44 43 42 41 40
|
||||
|
||||
latest_gcc_version:=10.2
|
||||
|
||||
# Automatically set version flag, but not if one was
|
||||
# manually set. And don't bother if this is a clean only
|
||||
# run.
|
||||
ifeq (,$(call Wildvar,GCC% destructive))
|
||||
|
||||
# can't use $(CC) --version here since that uses argv[0] to display the name
|
||||
# also gcc outputs the information to stderr, so I had to do 2>&1
|
||||
# this program really doesn't like identifying itself
|
||||
version:=$(shell $(CC) -v 2>&1)
|
||||
|
||||
# check if this is in fact GCC
|
||||
ifneq (,$(findstring gcc version,$(version)))
|
||||
|
||||
# in stark contrast to the name, gcc will give me a nicely formatted version number for free
|
||||
version:=$(shell $(CC) -dumpfullversion)
|
||||
|
||||
# Turn version into words of major, minor
|
||||
v:=$(subst ., ,$(version))
|
||||
# concat. major minor
|
||||
v:=$(word 1,$(v))$(word 2,$(v))
|
||||
|
||||
# If this version is not in the list,
|
||||
# default to the latest supported
|
||||
ifeq (,$(filter $(v),$(gcc_versions)))
|
||||
define line =
|
||||
Your compiler version, GCC $(version), \
|
||||
is not supported by the Makefile.
|
||||
The Makefile will assume GCC $(latest_gcc_version).
|
||||
endef
|
||||
$(call Print,$(line))
|
||||
GCC$(subst .,,$(latest_gcc_version)):=1
|
||||
else
|
||||
$(call Print,Detected GCC $(version) (GCC$(v)))
|
||||
GCC$(v):=1
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
84
src/Makefile.d/features.mk
Normal file
84
src/Makefile.d/features.mk
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
#
|
||||
# Makefile for feature flags.
|
||||
#
|
||||
|
||||
passthru_opts+=\
|
||||
NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
|
||||
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||
HAVE_MINIUPNPC\
|
||||
HAVE_DISCORDRPC TESTERS DEVELOP
|
||||
|
||||
# build with debugging information
|
||||
ifdef DEBUGMODE
|
||||
MOBJCONSISTANCY=1
|
||||
PACKETDROP=1
|
||||
opts+=-DPARANOIA -DRANGECHECK
|
||||
endif
|
||||
|
||||
ifndef NOHW
|
||||
opts+=-DHWRENDER
|
||||
sources+=$(call List,hardware/Sourcefile)
|
||||
endif
|
||||
|
||||
ifndef NOASM
|
||||
ifndef NONX86
|
||||
sources+=tmap.nas tmap_mmx.nas
|
||||
opts+=-DUSEASM
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NOMD5
|
||||
sources+=md5.c
|
||||
endif
|
||||
|
||||
ifndef NOZLIB
|
||||
ifndef NOPNG
|
||||
ifdef PNG_PKGCONFIG
|
||||
$(eval $(call Use_pkg_config,PNG_PKGCONFIG))
|
||||
else
|
||||
PNG_CONFIG?=$(call Prefix,libpng-config)
|
||||
$(eval $(call Configure,PNG,$(PNG_CONFIG) \
|
||||
$(if $(PNG_STATIC),--static),,--ldflags))
|
||||
endif
|
||||
ifdef LINUX
|
||||
opts+=-D_LARGFILE64_SOURCE
|
||||
endif
|
||||
opts+=-DHAVE_PNG
|
||||
sources+=apng.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
ifndef NOCURL
|
||||
CURLCONFIG?=curl-config
|
||||
$(eval $(call Configure,CURL,$(CURLCONFIG)))
|
||||
opts+=-DHAVE_CURL
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef HAVE_MINIUPNPC
|
||||
libs+=-lminiupnpc
|
||||
endif
|
||||
|
||||
ifdef HAVE_DISCORDRPC
|
||||
$(eval $(call Propogate_flags,DISCORDRPC))
|
||||
libs+=-ldiscord-rpc
|
||||
opts+=-DUSE_STUN
|
||||
sources+=discord.c stun.c
|
||||
endif
|
||||
|
||||
# (Valgrind is a memory debugger.)
|
||||
ifdef VALGRIND
|
||||
VALGRIND_PKGCONFIG?=valgrind
|
||||
$(eval $(call Use_pkg_config,VALGRIND))
|
||||
ZDEBUG=1
|
||||
opts+=-DHAVE_VALGRIND
|
||||
endif
|
||||
|
||||
default_packages:=\
|
||||
GME/libgme/LIBGME\
|
||||
OPENMPT/libopenmpt/LIBOPENMPT\
|
||||
ZLIB/zlib\
|
||||
|
||||
$(foreach p,$(default_packages),\
|
||||
$(eval $(call Check_pkg_config,$(p))))
|
||||
40
src/Makefile.d/nix.mk
Normal file
40
src/Makefile.d/nix.mk
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# Makefile options for unices (linux, bsd...)
|
||||
#
|
||||
|
||||
EXENAME?=lsdl2srb2kart
|
||||
|
||||
opts+=-DUNIXCOMMON -DLUA_USE_POSIX
|
||||
libs+=-lm
|
||||
|
||||
ifndef nasm_format
|
||||
nasm_format:=elf -DLINUX
|
||||
endif
|
||||
|
||||
ifndef NOHW
|
||||
opts+=-I/usr/X11R6/include
|
||||
libs+=-L/usr/X11R6/lib
|
||||
endif
|
||||
|
||||
SDL=1
|
||||
|
||||
# In common usage.
|
||||
ifdef LINUX
|
||||
libs+=-lrt
|
||||
passthru_opts+=NOTERMIOS
|
||||
endif
|
||||
|
||||
# Tested by Steel, as of release 2.2.8.
|
||||
ifdef FREEBSD
|
||||
opts+=-I/usr/X11R6/include -DLINUX -DFREEBSD
|
||||
libs+=-L/usr/X11R6/lib -lipx -lkvm
|
||||
endif
|
||||
|
||||
# FIXME: UNTESTED
|
||||
#ifdef SOLARIS
|
||||
#NOIPX=1
|
||||
#NOASM=1
|
||||
#opts+=-I/usr/local/include -I/opt/sfw/include \
|
||||
# -DSOLARIS -DINADDR_NONE=INADDR_ANY -DBSD_COMP
|
||||
#libs+=-L/opt/sfw/lib -lsocket -lnsl
|
||||
#endif
|
||||
16
src/Makefile.d/old.mk
Normal file
16
src/Makefile.d/old.mk
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# Warn about old build directories and offer to purge.
|
||||
#
|
||||
|
||||
_old:=$(wildcard $(addprefix ../bin/,FreeBSD Linux \
|
||||
Linux64 Mingw Mingw64 SDL dummy) ../objs ../dep)
|
||||
|
||||
ifdef _old
|
||||
$(foreach v,$(_old),$(info $(abspath $(v))))
|
||||
$(info )
|
||||
$(info These directories are no longer\
|
||||
required and should be removed.)
|
||||
$(info You may remove them manually or\
|
||||
by using 'make distclean')
|
||||
$(error )
|
||||
endif
|
||||
69
src/Makefile.d/platform.mk
Normal file
69
src/Makefile.d/platform.mk
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#
|
||||
# Platform specific options.
|
||||
#
|
||||
|
||||
PKG_CONFIG?=pkg-config
|
||||
|
||||
ifdef WINDOWSHELL
|
||||
rmrf=-2>NUL DEL /S /Q
|
||||
mkdir=-2>NUL MD
|
||||
cat=TYPE
|
||||
else
|
||||
rmrf=rm -rf
|
||||
mkdir=mkdir -p
|
||||
cat=cat
|
||||
endif
|
||||
|
||||
ifdef LINUX64
|
||||
LINUX=1
|
||||
endif
|
||||
|
||||
ifdef MINGW64
|
||||
MINGW=1
|
||||
endif
|
||||
|
||||
ifdef LINUX
|
||||
UNIX=1
|
||||
ifdef LINUX64
|
||||
NONX86=1
|
||||
# LINUX64 does not imply X86_64=1;
|
||||
# could mean ARM64 or Itanium
|
||||
platform=linux/64
|
||||
else
|
||||
platform=linux
|
||||
endif
|
||||
else ifdef FREEBSD
|
||||
UNIX=1
|
||||
platform=freebsd
|
||||
else ifdef SOLARIS # FIXME: UNTESTED
|
||||
UNIX=1
|
||||
platform=solaris
|
||||
else ifdef CYGWIN32 # FIXME: UNTESTED
|
||||
nasm_format=win32
|
||||
platform=cygwin
|
||||
else ifdef MINGW
|
||||
ifdef MINGW64
|
||||
NONX86=1
|
||||
NOASM=1
|
||||
# MINGW64 should not necessarily imply X86_64=1,
|
||||
# but we make that assumption elsewhere
|
||||
# Once that changes, remove this
|
||||
X86_64=1
|
||||
platform=mingw/64
|
||||
else
|
||||
platform=mingw
|
||||
endif
|
||||
include Makefile.d/win32.mk
|
||||
endif
|
||||
|
||||
ifdef platform
|
||||
makedir:=$(makedir)/$(platform)
|
||||
endif
|
||||
|
||||
ifdef UNIX
|
||||
include Makefile.d/nix.mk
|
||||
endif
|
||||
|
||||
ifdef SDL
|
||||
include Makefile.d/sdl.mk
|
||||
endif
|
||||
79
src/Makefile.d/sdl.mk
Normal file
79
src/Makefile.d/sdl.mk
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
#
|
||||
# Makefile options for SDL2 backend.
|
||||
#
|
||||
|
||||
#
|
||||
# SDL...., *looks at Alam*, THIS IS A MESS!
|
||||
#
|
||||
# ...a little bird flexes its muscles...
|
||||
#
|
||||
|
||||
makedir:=$(makedir)/SDL
|
||||
|
||||
sources+=$(call List,sdl/Sourcefile)
|
||||
opts+=-DDIRECTFULLSCREEN -DHAVE_SDL
|
||||
|
||||
# FIXME: UNTESTED
|
||||
#ifdef PANDORA
|
||||
#include sdl/SRB2Pandora/Makefile.cfg
|
||||
#endif #ifdef PANDORA
|
||||
|
||||
# FIXME: UNTESTED
|
||||
#ifdef CYGWIN32
|
||||
#include sdl/MakeCYG.cfg
|
||||
#endif #ifdef CYGWIN32
|
||||
|
||||
ifndef NOHW
|
||||
sources+=sdl/ogl_sdl.c
|
||||
endif
|
||||
|
||||
ifdef NOMIXER
|
||||
sources+=sdl/sdl_sound.c
|
||||
else
|
||||
opts+=-DHAVE_MIXER
|
||||
sources+=sdl/mixer_sound.c
|
||||
|
||||
ifdef HAVE_MIXERX
|
||||
opts+=-DHAVE_MIXERX
|
||||
libs+=-lSDL2_mixer_ext
|
||||
else
|
||||
libs+=-lSDL2_mixer
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NOTHREADS
|
||||
opts+=-DHAVE_THREADS
|
||||
sources+=sdl/i_threads.c
|
||||
endif
|
||||
|
||||
ifdef SDL_PKGCONFIG
|
||||
$(eval $(call Use_pkg_config,SDL))
|
||||
else
|
||||
SDL_CONFIG?=$(call Prefix,sdl2-config)
|
||||
SDL_CFLAGS?=$(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LDFLAGS?=$(shell $(SDL_CONFIG) \
|
||||
$(if $(STATIC),--static-libs,--libs))
|
||||
$(eval $(call Propogate_flags,SDL))
|
||||
endif
|
||||
|
||||
# use the x86 asm code
|
||||
ifndef CYGWIN32
|
||||
ifndef NOASM
|
||||
USEASM=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MINGW
|
||||
ifndef NOSDLMAIN
|
||||
SDLMAIN=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SDLMAIN
|
||||
opts+=-DSDLMAIN
|
||||
else
|
||||
ifdef MINGW
|
||||
opts+=-Umain
|
||||
libs+=-mconsole
|
||||
endif
|
||||
endif
|
||||
93
src/Makefile.d/util.mk
Normal file
93
src/Makefile.d/util.mk
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
#
|
||||
# Utility macros for the rest of the Makefiles.
|
||||
#
|
||||
|
||||
Ifnot=$(if $(1),$(3),$(2))
|
||||
Ifndef=$(call Ifnot,$($(1)),$(2),$(3))
|
||||
|
||||
# Match and expand a list of variables by pattern.
|
||||
Wildvar=$(foreach v,$(filter $(1),$(.VARIABLES)),$($(v)))
|
||||
|
||||
# Read a list of words from file and prepend each with the
|
||||
# directory of the file.
|
||||
_cat=$(shell $(cat) $(call Windows_path,$(1)))
|
||||
List=$(addprefix $(dir $(1)),$(call _cat,$(1)))
|
||||
|
||||
# Convert path separators to backslash on Windows.
|
||||
Windows_path=$(if $(WINDOWSHELL),$(subst /,\,$(1)),$(1))
|
||||
|
||||
define Propogate_flags =
|
||||
opts+=$$($(1)_CFLAGS)
|
||||
libs+=$$($(1)_LDFLAGS)
|
||||
endef
|
||||
|
||||
# Set library's _CFLAGS and _LDFLAGS from some command.
|
||||
# Automatically propogates the flags too.
|
||||
# 1: variable prefix (e.g. CURL)
|
||||
# 2: start of command (e.g. curl-config)
|
||||
# --- optional ----
|
||||
# 3: CFLAGS command arguments, default '--cflags'
|
||||
# 4: LDFLAGS command arguments, default '--libs'
|
||||
# 5: common command arguments at the end of command
|
||||
define Configure =
|
||||
$(1)_CFLAGS?=$$(shell $(2) $(or $(3),--cflags) $(5))
|
||||
$(1)_LDFLAGS?=$$(shell $(2) $(or $(4),--libs) $(5))
|
||||
$(call Propogate_flags,$(1))
|
||||
endef
|
||||
|
||||
# Configure library with pkg-config. The package name is
|
||||
# taken from a _PKGCONFIG variable.
|
||||
# 1: variable prefix
|
||||
#
|
||||
# LIBGME_PKGCONFIG=libgme
|
||||
# $(eval $(call Use_pkg_config,LIBGME))
|
||||
define Use_pkg_config =
|
||||
$(call Configure,$(1),$(PKG_CONFIG),,,$($(1)_PKGCONFIG))
|
||||
endef
|
||||
|
||||
# Check disabling flag and configure package in one step
|
||||
# according to delimited argument.
|
||||
# (There is only one argument, but it split by slash.)
|
||||
# 1/: short form library name (uppercase). This is
|
||||
# prefixed with 'NO' and 'HAVE_'. E.g. NOGME, HAVE_GME
|
||||
# /2: package name (e.g. libgme)
|
||||
# /3: variable prefix
|
||||
#
|
||||
# The following example would check if NOGME is not
|
||||
# defined before attempting to define LIBGME_CFLAGS and
|
||||
# LIBGME_LDFLAGS as with Use_pkg_config.
|
||||
#
|
||||
# $(eval $(call Check_pkg_config,GME/libgme/LIBGME))
|
||||
define Check_pkg_config =
|
||||
_p:=$(subst /, ,$(1))
|
||||
_v1:=$$(word 1,$$(_p))
|
||||
_v2:=$$(or $$(word 3,$$(_p)),$$(_v1))
|
||||
ifndef NO$$(_v1)
|
||||
$$(_v2)_PKGCONFIG?=$$(word 2,$$(_p))
|
||||
$$(eval $$(call Use_pkg_config,$$(_v2)))
|
||||
opts+=-DHAVE_$$(_v1)
|
||||
endif
|
||||
endef
|
||||
|
||||
# $(call Prefix,gcc)
|
||||
Prefix=$(if $(PREFIX),$(PREFIX)-)$(1)
|
||||
|
||||
Echo=
|
||||
Echo_name=
|
||||
Print=
|
||||
|
||||
ifndef SILENT
|
||||
Echo=@echo $(1)
|
||||
ifndef ECHO
|
||||
ifndef NOECHOFILENAMES
|
||||
Echo_name=$(call Echo,-- $(1) ...)
|
||||
endif
|
||||
endif
|
||||
ifndef MAKE_RESTARTS
|
||||
ifndef destructive
|
||||
Print=$(info $(1))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
.=$(call Ifndef,ECHO,@)
|
||||
181
src/Makefile.d/versions.mk
Normal file
181
src/Makefile.d/versions.mk
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
#
|
||||
# Flags to put a sock in GCC!
|
||||
#
|
||||
|
||||
# See the versions list in detect.mk
|
||||
# This will define all version flags going backward.
|
||||
# Yes, it's magic.
|
||||
define _predecessor =
|
||||
ifdef GCC$(firstword $(1))
|
||||
GCC$(lastword $(1)):=1
|
||||
endif
|
||||
endef
|
||||
_n:=$(words $(gcc_versions))
|
||||
$(foreach v,$(join $(wordlist 2,$(_n),- $(gcc_versions)),\
|
||||
$(addprefix =,$(wordlist 2,$(_n),$(gcc_versions)))),\
|
||||
$(and $(findstring =,$(v)),\
|
||||
$(eval $(call _predecessor,$(subst =, ,$(v))))))
|
||||
|
||||
# -W -Wno-unused
|
||||
WFLAGS:=-Wall -Wno-trigraphs
|
||||
ifndef GCC295
|
||||
#WFLAGS+=-Wno-packed
|
||||
endif
|
||||
ifndef RELAXWARNINGS
|
||||
WFLAGS+=-W
|
||||
#WFLAGS+=-Wno-sign-compare
|
||||
ifndef GCC295
|
||||
WFLAGS+=-Wno-div-by-zero
|
||||
endif
|
||||
#WFLAGS+=-Wsystem-headers
|
||||
WFLAGS+=-Wfloat-equal
|
||||
#WFLAGS+=-Wtraditional
|
||||
WFLAGS+=-Wundef
|
||||
ifndef GCC295
|
||||
WFLAGS+=-Wendif-labels
|
||||
endif
|
||||
ifdef GCC40
|
||||
WFLAGS+=-std=gnu89
|
||||
endif
|
||||
ifdef GCC41
|
||||
WFLAGS+=-Wdeclaration-after-statement
|
||||
WFLAGS+=-Wno-error=declaration-after-statement
|
||||
WFLAGS+=-Wshadow
|
||||
endif
|
||||
#WFLAGS+=-Wlarger-than-%len%
|
||||
WFLAGS+=-Wpointer-arith -Wbad-function-cast
|
||||
ifdef GCC45
|
||||
#WFLAGS+=-Wc++-compat
|
||||
endif
|
||||
WFLAGS+=-Wcast-qual
|
||||
ifndef NOCASTALIGNWARN
|
||||
WFLAGS+=-Wcast-align
|
||||
endif
|
||||
WFLAGS+=-Wwrite-strings
|
||||
ifndef ERRORMODE
|
||||
#WFLAGS+=-Wconversion
|
||||
ifdef GCC43
|
||||
#WFLAGS+=-Wno-sign-conversion
|
||||
endif
|
||||
endif
|
||||
WFLAGS+=-Wsign-compare
|
||||
ifdef GCC91
|
||||
WFLAGS+=-Wno-error=address-of-packed-member
|
||||
endif
|
||||
ifdef GCC45
|
||||
WFLAGS+=-Wlogical-op
|
||||
endif
|
||||
WFLAGS+=-Waggregate-return
|
||||
ifdef HAIKU
|
||||
ifdef GCC41
|
||||
#WFLAGS+=-Wno-attributes
|
||||
endif
|
||||
endif
|
||||
#WFLAGS+=-Wstrict-prototypes
|
||||
ifdef GCC40
|
||||
WFLAGS+=-Wold-style-definition
|
||||
endif
|
||||
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
|
||||
ifdef GCC40
|
||||
WFLAGS+=-Wmissing-field-initializers
|
||||
endif
|
||||
WFLAGS+=-Wmissing-noreturn
|
||||
#WFLAGS+=-Wmissing-format-attribute
|
||||
#WFLAGS+=-Wno-multichar
|
||||
#WFLAGS+=-Wno-deprecated-declarations
|
||||
#WFLAGS+=-Wpacked
|
||||
#WFLAGS+=-Wpadded
|
||||
#WFLAGS+=-Wredundant-decls
|
||||
WFLAGS+=-Wnested-externs
|
||||
#WFLAGS+=-Wunreachable-code
|
||||
WFLAGS+=-Winline
|
||||
ifdef GCC43
|
||||
WFLAGS+=-funit-at-a-time
|
||||
WFLAGS+=-Wlogical-op
|
||||
endif
|
||||
ifndef GCC295
|
||||
WFLAGS+=-Wdisabled-optimization
|
||||
endif
|
||||
endif
|
||||
WFLAGS+=-Wformat-y2k
|
||||
ifdef GCC71
|
||||
WFLAGS+=-Wno-error=format-overflow=2
|
||||
endif
|
||||
WFLAGS+=-Wformat-security
|
||||
ifndef GCC29
|
||||
#WFLAGS+=-Winit-self
|
||||
endif
|
||||
ifdef GCC46
|
||||
WFLAGS+=-Wno-suggest-attribute=noreturn
|
||||
endif
|
||||
|
||||
ifdef NOLDWARNING
|
||||
LDFLAGS+=-Wl,--as-needed
|
||||
endif
|
||||
|
||||
ifdef ERRORMODE
|
||||
WFLAGS+=-Werror
|
||||
endif
|
||||
|
||||
ifdef GCC43
|
||||
#WFLAGS+=-Wno-error=clobbered
|
||||
endif
|
||||
ifdef GCC44
|
||||
WFLAGS+=-Wno-error=array-bounds
|
||||
endif
|
||||
ifdef GCC46
|
||||
WFLAGS+=-Wno-error=suggest-attribute=noreturn
|
||||
endif
|
||||
ifdef GCC54
|
||||
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
|
||||
endif
|
||||
ifdef GCC61
|
||||
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
|
||||
endif
|
||||
ifdef GCC71
|
||||
WFLAGS+=-Wimplicit-fallthrough=4
|
||||
WFLAGS+=-Wno-format-truncation
|
||||
endif
|
||||
ifdef GCC81
|
||||
WFLAGS+=-Wno-error=format-overflow
|
||||
WFLAGS+=-Wno-error=stringop-truncation
|
||||
WFLAGS+=-Wno-error=stringop-overflow
|
||||
WFLAGS+=-Wno-format-overflow
|
||||
WFLAGS+=-Wno-stringop-truncation
|
||||
WFLAGS+=-Wno-stringop-overflow
|
||||
WFLAGS+=-Wno-error=multistatement-macros
|
||||
endif
|
||||
|
||||
ifdef NONX86
|
||||
ifdef X86_64 # yeah that SEEMS contradictory
|
||||
opts+=-march=nocona
|
||||
endif
|
||||
else
|
||||
ifndef GCC29
|
||||
opts+=-msse3 -mfpmath=sse
|
||||
else
|
||||
opts+=-mpentium
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef DEBUGMODE
|
||||
ifdef GCC48
|
||||
opts+=-Og
|
||||
else
|
||||
opts+=O0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef VALGRIND
|
||||
ifdef GCC46
|
||||
WFLAGS+=-Wno-error=unused-but-set-variable
|
||||
WFLAGS+=-Wno-unused-but-set-variable
|
||||
endif
|
||||
endif
|
||||
|
||||
# Lua
|
||||
ifdef GCC43
|
||||
ifndef GCC44
|
||||
WFLAGS+=-Wno-logical-op
|
||||
endif
|
||||
endif
|
||||
117
src/Makefile.d/win32.mk
Normal file
117
src/Makefile.d/win32.mk
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
#
|
||||
# Mingw, if you don't know, that's Win32/Win64
|
||||
#
|
||||
|
||||
ifndef MINGW64
|
||||
EXENAME?=srb2kart.exe
|
||||
else
|
||||
EXENAME?=srb2kart64.exe
|
||||
endif
|
||||
|
||||
sources+=win32/Srb2win.rc
|
||||
opts+=-DSTDC_HEADERS
|
||||
libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
|
||||
|
||||
nasm_format:=win32
|
||||
|
||||
SDL=1
|
||||
|
||||
ifndef NOHW
|
||||
opts+=-DUSE_WGL_SWAP
|
||||
endif
|
||||
|
||||
ifdef MINGW64
|
||||
libs+=-lws2_32
|
||||
else
|
||||
ifdef NO_IPV6
|
||||
libs+=-lwsock32
|
||||
else
|
||||
libs+=-lws2_32
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef MINGW64
|
||||
opts+=-I../libs/drmingw/include
|
||||
libs+=-L../libs/drmingw/lib/win32 -lmgwhelp -lexchndl
|
||||
endif
|
||||
|
||||
ifndef MINGW64
|
||||
libs+=-Wl,--large-address-aware
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
ifndef MINGW64 # miniupnc is broken with MINGW64
|
||||
opts+=-I../libs -DSTATIC_MINIUPNPC
|
||||
libs+=-L../libs/miniupnpc/mingw$(32) -lws2_32 -liphlpapi
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NO_DISCORDRPC
|
||||
HAVE_DISCORDRPC=1
|
||||
endif
|
||||
|
||||
ifndef MINGW64
|
||||
32=32
|
||||
x86=x86
|
||||
i686=i686
|
||||
else
|
||||
32=64
|
||||
x86=x86_64
|
||||
i686=x86_64
|
||||
endif
|
||||
|
||||
mingw:=$(i686)-w64-mingw32
|
||||
|
||||
define _set =
|
||||
$(1)_CFLAGS?=$($(1)_opts)
|
||||
$(1)_LDFLAGS?=$($(1)_libs)
|
||||
endef
|
||||
|
||||
lib:=../libs/gme
|
||||
LIBGME_opts:=-I$(lib)/include
|
||||
LIBGME_libs:=-L$(lib)/win$(32) -lgme
|
||||
$(eval $(call _set,LIBGME))
|
||||
|
||||
lib:=../libs/libopenmpt
|
||||
LIBOPENMPT_opts:=-I$(lib)/inc
|
||||
LIBOPENMPT_libs:=-L$(lib)/lib/$(x86)/mingw -lopenmpt
|
||||
$(eval $(call _set,LIBOPENMPT))
|
||||
|
||||
ifndef NOMIXERX
|
||||
HAVE_MIXERX=1
|
||||
lib:=../libs/SDLMixerX/$(mingw)
|
||||
else
|
||||
lib:=../libs/SDL2_mixer/$(mingw)
|
||||
endif
|
||||
|
||||
mixer_opts:=-I$(lib)/include/SDL2
|
||||
mixer_libs:=-L$(lib)/lib
|
||||
|
||||
lib:=../libs/SDL2/$(mingw)
|
||||
SDL_opts:=-I$(lib)/include/SDL2\
|
||||
$(mixer_opts) -Dmain=SDL_main
|
||||
SDL_libs:=-L$(lib)/lib $(mixer_libs)\
|
||||
-lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||
$(eval $(call _set,SDL))
|
||||
|
||||
lib:=../libs/zlib
|
||||
ZLIB_opts:=-I$(lib)
|
||||
ZLIB_libs:=-L$(lib)/win32 -lz$(32)
|
||||
$(eval $(call _set,ZLIB))
|
||||
|
||||
ifndef PNG_CONFIG
|
||||
lib:=../libs/libpng-src
|
||||
PNG_opts:=-I$(lib)
|
||||
PNG_libs:=-L$(lib)/projects -lpng$(32)
|
||||
$(eval $(call _set,PNG))
|
||||
endif
|
||||
|
||||
lib:=../libs/curl
|
||||
CURL_opts:=-I$(lib)/include
|
||||
CURL_libs:=-L$(lib)/lib$(32) -lcurl
|
||||
$(eval $(call _set,CURL))
|
||||
|
||||
lib:=../libs/discord-rpc/win$(32)-dynamic
|
||||
DISCORDRPC_opts:=-I$(lib)/include
|
||||
DISCORDRPC_libs:=-L$(lib)/lib
|
||||
$(eval $(call _set,DISCORDRPC))
|
||||
112
src/Sourcefile
Normal file
112
src/Sourcefile
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
string.c
|
||||
d_main.c
|
||||
d_clisrv.c
|
||||
d_net.c
|
||||
d_netfil.c
|
||||
d_netcmd.c
|
||||
dehacked.c
|
||||
deh_soc.c
|
||||
deh_lua.c
|
||||
deh_tables.c
|
||||
z_zone.c
|
||||
f_finale.c
|
||||
f_wipe.c
|
||||
g_demo.c
|
||||
g_game.c
|
||||
g_input.c
|
||||
g_splitscreen.c
|
||||
am_map.c
|
||||
command.c
|
||||
console.c
|
||||
font.c
|
||||
hu_stuff.c
|
||||
y_inter.c
|
||||
st_stuff.c
|
||||
m_aatree.c
|
||||
m_anigif.c
|
||||
m_argv.c
|
||||
m_bbox.c
|
||||
m_cheat.c
|
||||
m_cond.c
|
||||
m_fixed.c
|
||||
m_menu.c
|
||||
m_misc.c
|
||||
m_perfstats.c
|
||||
m_random.c
|
||||
m_queue.c
|
||||
info.c
|
||||
p_ceilng.c
|
||||
p_enemy.c
|
||||
p_floor.c
|
||||
p_inter.c
|
||||
p_lights.c
|
||||
p_map.c
|
||||
p_maputl.c
|
||||
p_mobj.c
|
||||
p_polyobj.c
|
||||
p_saveg.c
|
||||
p_setup.c
|
||||
p_sight.c
|
||||
p_spec.c
|
||||
p_telept.c
|
||||
p_tick.c
|
||||
p_user.c
|
||||
p_slopes.c
|
||||
tables.c
|
||||
r_bsp.c
|
||||
r_data.c
|
||||
r_draw.c
|
||||
r_main.c
|
||||
r_plane.c
|
||||
r_segs.c
|
||||
r_skins.c
|
||||
r_sky.c
|
||||
r_splats.c
|
||||
r_things.c
|
||||
r_textures.c
|
||||
r_patch.c
|
||||
r_patchrotation.c
|
||||
r_picformats.c
|
||||
r_portal.c
|
||||
screen.c
|
||||
taglist.c
|
||||
v_video.c
|
||||
s_sound.c
|
||||
sounds.c
|
||||
w_wad.c
|
||||
filesrch.c
|
||||
mserv.c
|
||||
http-mserv.c
|
||||
i_tcp.c
|
||||
lzf.c
|
||||
vid_copy.s
|
||||
lua_script.c
|
||||
lua_baselib.c
|
||||
lua_mathlib.c
|
||||
lua_hooklib.c
|
||||
lua_consolelib.c
|
||||
lua_infolib.c
|
||||
lua_mobjlib.c
|
||||
lua_playerlib.c
|
||||
lua_skinlib.c
|
||||
lua_thinkerlib.c
|
||||
lua_maplib.c
|
||||
lua_taglib.c
|
||||
lua_polyobjlib.c
|
||||
lua_blockmaplib.c
|
||||
lua_hudlib.c
|
||||
k_kart.c
|
||||
k_respawn.c
|
||||
k_collide.c
|
||||
k_color.c
|
||||
k_race.c
|
||||
k_battle.c
|
||||
k_pwrlv.c
|
||||
k_waypoint.c
|
||||
k_pathfind.c
|
||||
k_bheap.c
|
||||
k_bot.c
|
||||
k_botitem.c
|
||||
k_botsearch.c
|
||||
k_grandprix.c
|
||||
k_hud.c
|
||||
1
src/blua/CMakeLists.txt
Normal file
1
src/blua/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
target_sourcefile(c)
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
ifdef UNIXCOMMON
|
||||
LUA_CFLAGS+=-DLUA_USE_POSIX
|
||||
endif
|
||||
ifdef LINUX
|
||||
LUA_CFLAGS+=-DLUA_USE_POSIX
|
||||
endif
|
||||
ifdef GCC43
|
||||
ifndef GCC44
|
||||
WFLAGS+=-Wno-logical-op
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJS:=$(OBJS) \
|
||||
$(OBJDIR)/lapi.o \
|
||||
$(OBJDIR)/lbaselib.o \
|
||||
$(OBJDIR)/ldo.o \
|
||||
$(OBJDIR)/lfunc.o \
|
||||
$(OBJDIR)/linit.o \
|
||||
$(OBJDIR)/liolib.o \
|
||||
$(OBJDIR)/llex.o \
|
||||
$(OBJDIR)/lmem.o \
|
||||
$(OBJDIR)/lobject.o \
|
||||
$(OBJDIR)/lstate.o \
|
||||
$(OBJDIR)/lstrlib.o \
|
||||
$(OBJDIR)/ltablib.o \
|
||||
$(OBJDIR)/lundump.o \
|
||||
$(OBJDIR)/lzio.o \
|
||||
$(OBJDIR)/lauxlib.o \
|
||||
$(OBJDIR)/lcode.o \
|
||||
$(OBJDIR)/ldebug.o \
|
||||
$(OBJDIR)/ldump.o \
|
||||
$(OBJDIR)/lgc.o \
|
||||
$(OBJDIR)/lopcodes.o \
|
||||
$(OBJDIR)/lparser.o \
|
||||
$(OBJDIR)/lstring.o \
|
||||
$(OBJDIR)/ltable.o \
|
||||
$(OBJDIR)/ltm.o \
|
||||
$(OBJDIR)/lvm.o \
|
||||
$(OBJDIR)/lua_script.o \
|
||||
$(OBJDIR)/lua_baselib.o \
|
||||
$(OBJDIR)/lua_mathlib.o \
|
||||
$(OBJDIR)/lua_hooklib.o \
|
||||
$(OBJDIR)/lua_consolelib.o \
|
||||
$(OBJDIR)/lua_infolib.o \
|
||||
$(OBJDIR)/lua_mobjlib.o \
|
||||
$(OBJDIR)/lua_playerlib.o \
|
||||
$(OBJDIR)/lua_skinlib.o \
|
||||
$(OBJDIR)/lua_thinkerlib.o \
|
||||
$(OBJDIR)/lua_maplib.o \
|
||||
$(OBJDIR)/lua_taglib.o \
|
||||
$(OBJDIR)/lua_polyobjlib.o \
|
||||
$(OBJDIR)/lua_blockmaplib.o \
|
||||
$(OBJDIR)/lua_hudlib.o
|
||||
25
src/blua/Sourcefile
Normal file
25
src/blua/Sourcefile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
lapi.c
|
||||
lbaselib.c
|
||||
ldo.c
|
||||
lfunc.c
|
||||
linit.c
|
||||
liolib.c
|
||||
llex.c
|
||||
lmem.c
|
||||
lobject.c
|
||||
lstate.c
|
||||
lstrlib.c
|
||||
ltablib.c
|
||||
lundump.c
|
||||
lzio.c
|
||||
lauxlib.c
|
||||
lcode.c
|
||||
ldebug.c
|
||||
ldump.c
|
||||
lgc.c
|
||||
lopcodes.c
|
||||
lparser.c
|
||||
lstring.c
|
||||
ltable.c
|
||||
ltm.c
|
||||
lvm.c
|
||||
|
|
@ -1051,15 +1051,6 @@ static void SV_SendPlayerInfo(INT32 node)
|
|||
|
||||
// Extra data
|
||||
netbuffer->u.playerinfo[i].data = 0; //players[i].skincolor;
|
||||
|
||||
if (players[i].pflags & PF_TAGIT)
|
||||
netbuffer->u.playerinfo[i].data |= 0x20;
|
||||
|
||||
if (players[i].gotflag)
|
||||
netbuffer->u.playerinfo[i].data |= 0x40;
|
||||
|
||||
if (players[i].powers[pw_super])
|
||||
netbuffer->u.playerinfo[i].data |= 0x80;
|
||||
}
|
||||
|
||||
HSendPacket(node, false, 0, sizeof(plrinfo) * MSCOMPAT_MAXPLAYERS);
|
||||
|
|
@ -1347,7 +1338,7 @@ static void CL_ReloadReceivedSavegame(void)
|
|||
neededtic = gametic;
|
||||
maketic = neededtic;
|
||||
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
P_ForceLocalAngle(&players[displayplayers[i]], players[displayplayers[i]].angleturn);
|
||||
}
|
||||
|
|
@ -2384,7 +2375,7 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
|||
LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting
|
||||
|
||||
// don't look through someone's view who isn't there
|
||||
if (playernum == displayplayers[0])
|
||||
if (playernum == displayplayers[0] && !demo.playback)
|
||||
{
|
||||
// Call ViewpointSwitch hooks here.
|
||||
// The viewpoint was forcibly changed.
|
||||
|
|
@ -2413,9 +2404,6 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
|||
RemoveAdminPlayer(playernum); // don't stay admin after you're gone
|
||||
}
|
||||
|
||||
if (playernum == displayplayers[0] && !demo.playback)
|
||||
displayplayers[0] = consoleplayer; // don't look through someone's view who isn't there
|
||||
|
||||
LUA_InvalidatePlayer(&players[playernum]);
|
||||
|
||||
K_CheckBumpers();
|
||||
|
|
@ -4790,7 +4778,7 @@ static INT16 Consistancy(void)
|
|||
{
|
||||
ret += players[i].mo->x;
|
||||
ret -= players[i].mo->y;
|
||||
ret += players[i].kartstuff[k_itemtype]; // powers[pw_shield]
|
||||
ret += players[i].itemtype;
|
||||
ret *= i+1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
22
src/d_main.c
22
src/d_main.c
|
|
@ -615,16 +615,6 @@ static void D_Display(void)
|
|||
{
|
||||
F_WipeEndScreen();
|
||||
|
||||
// Funny.
|
||||
if (WipeStageTitle && st_overlay)
|
||||
{
|
||||
lt_ticker--;
|
||||
lt_lasttic = lt_ticker;
|
||||
ST_preLevelTitleCardDrawer();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
||||
F_WipeStartScreen();
|
||||
}
|
||||
|
||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN, "FADEMAP0", true, false);
|
||||
}
|
||||
|
||||
|
|
@ -1057,15 +1047,6 @@ static void IdentifyVersion(void)
|
|||
D_AddFile(startupiwads, va(pandf,srb2waddir,"patch.pk3"));
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// TODO: pk3 doesn't support music replacement IIRC
|
||||
// music barely benefits from the compression anyway
|
||||
// would be nice for the folders, though
|
||||
D_AddFile(startupiwads, va(pandf,srb2waddir,"sounds.pk3"));
|
||||
D_AddFile(startupiwads, va(pandf,srb2waddir,"music.pk3"));
|
||||
|
||||
#else
|
||||
|
||||
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
||||
|
||||
#define MUSICTEST(str) \
|
||||
|
|
@ -1078,12 +1059,11 @@ static void IdentifyVersion(void)
|
|||
I_Error("File "str" has been modified with non-music/sound lumps"); \
|
||||
}
|
||||
|
||||
MUSICTEST("sounds.wad")
|
||||
MUSICTEST("sounds.pk3")
|
||||
MUSICTEST("music.pk3")
|
||||
|
||||
#undef MUSICTEST
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,6 @@ void D_RegisterClientCommands(void)
|
|||
// add cheat commands
|
||||
COM_AddCommand("noclip", Command_CheatNoClip_f);
|
||||
COM_AddCommand("god", Command_CheatGod_f);
|
||||
COM_AddCommand("notarget", Command_CheatNoTarget_f);
|
||||
COM_AddCommand("setrings", Command_Setrings_f);
|
||||
COM_AddCommand("setlives", Command_Setlives_f);
|
||||
COM_AddCommand("devmode", Command_Devmode_f);
|
||||
|
|
@ -1418,7 +1417,7 @@ static void SendNameAndColor(UINT8 n)
|
|||
|
||||
player->skincolor = cv_playercolor[n].value;
|
||||
|
||||
if (player->mo && !player->powers[pw_dye])
|
||||
if (player->mo && !player->dye)
|
||||
player->mo->color = player->skincolor;
|
||||
|
||||
// Update follower for local games:
|
||||
|
|
@ -1879,7 +1878,7 @@ static INT32 FindPlayerByPlace(INT32 place)
|
|||
for (playernum = 0; playernum < MAXPLAYERS; ++playernum)
|
||||
if (playeringame[playernum])
|
||||
{
|
||||
if (players[playernum].kartstuff[k_position] == place)
|
||||
if (players[playernum].position == place)
|
||||
{
|
||||
return playernum;
|
||||
}
|
||||
|
|
@ -1903,7 +1902,7 @@ static void GetViewablePlayerPlaceRange(INT32 *first, INT32 *last)
|
|||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
if (G_CouldView(i))
|
||||
{
|
||||
place = players[i].kartstuff[k_position];
|
||||
place = players[i].position;
|
||||
if (place < (*first))
|
||||
(*first) = place;
|
||||
if (place > (*last))
|
||||
|
|
@ -2974,7 +2973,7 @@ static void Command_Respawn(void)
|
|||
}
|
||||
|
||||
// todo: this probably isnt necessary anymore with v2
|
||||
if (players[consoleplayer].mo && (P_PlayerInPain(&players[consoleplayer]) || spbplace == players[consoleplayer].kartstuff[k_position])) // KART: Nice try, but no, you won't be cheesing spb anymore (x2)
|
||||
if (players[consoleplayer].mo && (P_PlayerInPain(&players[consoleplayer]) || spbplace == players[consoleplayer].position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2)
|
||||
{
|
||||
CONS_Printf(M_GetText("Nice try.\n"));
|
||||
return;
|
||||
|
|
@ -2989,7 +2988,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum)
|
|||
INT32 respawnplayer = READINT32(*cp);
|
||||
|
||||
// You can't respawn someone else. Nice try, there.
|
||||
if (respawnplayer != playernum || P_PlayerInPain(&players[respawnplayer]) || spbplace == players[respawnplayer].kartstuff[k_position]) // srb2kart: "|| (!(gametyperules & GTR_CIRCUIT))"
|
||||
if (respawnplayer != playernum || P_PlayerInPain(&players[respawnplayer]) || spbplace == players[respawnplayer].position) // srb2kart: "|| (!(gametyperules & GTR_CIRCUIT))"
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
|
|
@ -3144,7 +3143,7 @@ static void HandleTeamChangeCommand(UINT8 localplayer)
|
|||
if (players[g_localplayers[localplayer]].spectator)
|
||||
error = !(NetPacket.packet.newteam || (players[g_localplayers[localplayer]].pflags & PF_WANTSTOJOIN)); // :lancer:
|
||||
else if (G_GametypeHasTeams())
|
||||
error = (NetPacket.packet.newteam == (unsigned)players[g_localplayers[localplayer]].ctfteam);
|
||||
error = (NetPacket.packet.newteam == players[g_localplayers[localplayer]].ctfteam);
|
||||
else if (G_GametypeHasSpectators() && !players[g_localplayers[localplayer]].spectator)
|
||||
error = (NetPacket.packet.newteam == 3);
|
||||
#ifdef PARANOIA
|
||||
|
|
@ -3260,7 +3259,7 @@ static void Command_ServerTeamChange_f(void)
|
|||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (NetPacket.packet.newteam == (unsigned)players[NetPacket.packet.playernum].ctfteam ||
|
||||
if (NetPacket.packet.newteam == players[NetPacket.packet.playernum].ctfteam ||
|
||||
(players[NetPacket.packet.playernum].spectator && !NetPacket.packet.newteam))
|
||||
error = true;
|
||||
}
|
||||
|
|
@ -3437,7 +3436,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
displayplayers[0] = consoleplayer;
|
||||
}
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
/*if (G_GametypeHasTeams())
|
||||
{
|
||||
if (NetPacket.packet.newteam)
|
||||
{
|
||||
|
|
@ -3445,10 +3444,10 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (playernum == g_localplayers[i]) //CTF and Team Match colors.
|
||||
CV_SetValue(&cv_playercolor[i], NetPacket.packet.newteam + 5);
|
||||
CV_SetValue(&cv_playercolor[i], NetPacket.packet.newteam + 5); - -this calculation is totally wrong
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (gamestate != GS_LEVEL)
|
||||
return;
|
||||
|
|
@ -3460,7 +3459,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
{
|
||||
if (gametyperules & GTR_BUMPERS) // SRB2kart
|
||||
{
|
||||
players[playernum].marescore = 0;
|
||||
players[playernum].roundscore = 0;
|
||||
K_CalculateBattleWanted();
|
||||
}
|
||||
|
||||
|
|
@ -4861,8 +4860,6 @@ static void Got_GiveItemcmd(UINT8 **cp, INT32 playernum)
|
|||
int item;
|
||||
int amt;
|
||||
|
||||
INT32 *kartstuff;
|
||||
|
||||
item = READSINT8 (*cp);
|
||||
amt = READUINT8 (*cp);
|
||||
|
||||
|
|
@ -4879,10 +4876,8 @@ static void Got_GiveItemcmd(UINT8 **cp, INT32 playernum)
|
|||
return;
|
||||
}
|
||||
|
||||
kartstuff = players[playernum].kartstuff;
|
||||
|
||||
kartstuff[k_itemtype] = item;
|
||||
kartstuff[k_itemamount] = amt;
|
||||
players[playernum].itemtype = item;
|
||||
players[playernum].itemamount = amt;
|
||||
}
|
||||
|
||||
/** Prints the number of displayplayers[0].
|
||||
|
|
|
|||
|
|
@ -1299,16 +1299,18 @@ void PT_FileFragment(void)
|
|||
filename = va("%s", file->filename);
|
||||
nameonly(filename);
|
||||
|
||||
if (!(strcmp(filename, "main.kart")
|
||||
&& strcmp(filename, "gfx.pk3")
|
||||
&& strcmp(filename, "textures.pk3")
|
||||
&& strcmp(filename, "chars.pk3")
|
||||
&& strcmp(filename, "maps.wad")
|
||||
&& strcmp(filename, "patch.pk3")
|
||||
&& strcmp(filename, "sounds.wad")
|
||||
&& strcmp(filename, "music.wad")
|
||||
))
|
||||
if (!strcmp(filename, "main.kart")
|
||||
|| !strcmp(filename, "gfx.pk3")
|
||||
|| !strcmp(filename, "textures.pk3")
|
||||
|| !strcmp(filename, "chars.pk3")
|
||||
|| !strcmp(filename, "maps.pk3")
|
||||
|| !strcmp(filename, "patch.pk3")
|
||||
|| !strcmp(filename, "sounds.pk3")
|
||||
|| !strcmp(filename, "music.pk3")
|
||||
)
|
||||
{
|
||||
I_Error("Tried to download \"%s\"", filename);
|
||||
}
|
||||
|
||||
filename = file->filename;
|
||||
|
||||
|
|
|
|||
534
src/d_player.h
534
src/d_player.h
|
|
@ -58,54 +58,48 @@ typedef enum
|
|||
//
|
||||
typedef enum
|
||||
{
|
||||
PF_FAULT = 1,
|
||||
|
||||
// Cheats
|
||||
PF_GODMODE = 1<<4,
|
||||
PF_NOCLIP = 1<<5,
|
||||
PF_INVIS = 1<<6,
|
||||
|
||||
// True if button down last tic.
|
||||
PF_ATTACKDOWN = 1<<7,
|
||||
PF_ACCELDOWN = 1<<8,
|
||||
PF_BRAKEDOWN = 1<<9,
|
||||
PF_WPNDOWN = 1<<10, // unused
|
||||
PF_ATTACKDOWN = 1,
|
||||
PF_ACCELDOWN = 1<<1,
|
||||
PF_BRAKEDOWN = 1<<2,
|
||||
PF_LOOKDOWN = 1<<3,
|
||||
|
||||
// Unmoving states
|
||||
PF_STASIS = 1<<11, // Player is not allowed to move
|
||||
PF_JUMPSTASIS = 1<<12, // unused
|
||||
// Accessibility and cheats
|
||||
PF_KICKSTARTACCEL = 1<<4, // Is accelerate in kickstart mode?
|
||||
PF_GODMODE = 1<<5,
|
||||
PF_NOCLIP = 1<<6,
|
||||
|
||||
// SRB2Kart: Spectator that wants to join
|
||||
PF_WANTSTOJOIN = 1<<13,
|
||||
PF_WANTSTOJOIN = 1<<7, // Spectator that wants to join
|
||||
|
||||
// Character action status
|
||||
PF_STARTJUMP = 1<<14, // unused
|
||||
PF_JUMPED = 1<<15, // unused
|
||||
PF_NOJUMPDAMAGE = 1<<16, // unused
|
||||
PF_SPINNING = 1<<17, // unused
|
||||
PF_STARTDASH = 1<<18, // unused
|
||||
PF_THOKKED = 1<<19, // unused
|
||||
PF_SHIELDABILITY = 1<<20, // unused
|
||||
PF_GLIDING = 1<<21, // unused
|
||||
PF_BOUNCING = 1<<22, // unused
|
||||
PF_STASIS = 1<<8, // Player is not allowed to move
|
||||
PF_FAULT = 1<<9, // F A U L T
|
||||
PF_ELIMINATED = 1<<10, // Battle-style elimination, no extra penalty
|
||||
PF_NOCONTEST = 1<<11, // Did not finish (last place explosion)
|
||||
PF_LOSTLIFE = 1<<12, // Do not lose life more than once
|
||||
|
||||
// Sliding (usually in water) like Labyrinth/Oil Ocean
|
||||
PF_SLIDING = 1<<23,
|
||||
PF_RINGLOCK = 1<<13, // Prevent picking up rings while SPB is locked on
|
||||
|
||||
// NiGHTS stuff
|
||||
PF_TRANSFERTOCLOSEST = 1<<24, // unused
|
||||
PF_DRILLING = 1<<25, // unused
|
||||
// The following four flags are mutually exclusive, although they can also all be off at the same time. If we ever run out of pflags, eventually turn them into a seperate five(+) mode UINT8..?
|
||||
PF_USERINGS = 1<<14, // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
||||
PF_ITEMOUT = 1<<15, // Are you holding an item out?
|
||||
PF_EGGMANOUT = 1<<16, // Eggman mark held, separate from PF_ITEMOUT so it doesn't stop you from getting items
|
||||
PF_HOLDREADY = 1<<17, // Hold button-style item is ready to activate
|
||||
|
||||
// Gametype-specific stuff
|
||||
PF_GAMETYPEOVER = 1<<26, // Race time over
|
||||
PF_TAGIT = 1<<27, // unused
|
||||
PF_DRIFTINPUT = 1<<18, // Drifting!
|
||||
PF_GETSPARKS = 1<<19, // Can get sparks
|
||||
PF_DRIFTEND = 1<<20, // Drift has ended, used to adjust character angle after drift
|
||||
PF_BRAKEDRIFT = 1<<21, // Helper for brake-drift spark spawning
|
||||
|
||||
/*** misc ***/
|
||||
PF_KICKSTARTACCEL = 1<<28, // Accessibility feature - is accelerate in kickstart mode?
|
||||
PF_CANCARRY = 1<<29, // unused
|
||||
PF_HITFINISHLINE = 1<<30, // Already hit the finish line this tic
|
||||
PF_AIRFAILSAFE = 1<<22, // Whenever or not try the air boost
|
||||
PF_TRICKDELAY = 1<<23, // Prevent tricks until control stick is neutral
|
||||
|
||||
// up to 1<<31 is free, but try to hit unused stuff first
|
||||
PF_TUMBLELASTBOUNCE = 1<<24, // One more time for the funny
|
||||
PF_TUMBLESOUND = 1<<25, // Don't play more than once
|
||||
|
||||
PF_HITFINISHLINE = 1<<26, // Already hit the finish line this tic
|
||||
PF_WRONGWAY = 1<<27, // Moving the wrong way with respect to waypoints?
|
||||
|
||||
// up to 1<<31 is free
|
||||
} pflags_t;
|
||||
|
||||
typedef enum
|
||||
|
|
@ -119,104 +113,13 @@ typedef enum
|
|||
PA_HURT
|
||||
} panim_t;
|
||||
|
||||
//
|
||||
// All of the base srb2 shields are either a single constant,
|
||||
// or use damagetype-protecting flags applied to a constant,
|
||||
// or are the force shield (which does everything weirdly).
|
||||
//
|
||||
// Base flags by themselves aren't used so modders can make
|
||||
// abstract, ability-less shields should they so choose.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
SH_NONE = 0,
|
||||
|
||||
// Shield flags
|
||||
SH_PROTECTFIRE = 0x400,
|
||||
SH_PROTECTWATER = 0x800,
|
||||
SH_PROTECTELECTRIC = 0x1000,
|
||||
SH_PROTECTSPIKE = 0x2000, // cactus shield one day? thanks, subarashii
|
||||
//SH_PROTECTNUKE = 0x4000, // intentionally no hardcoded defense against nukes
|
||||
|
||||
// Indivisible shields
|
||||
SH_PITY = 1, // the world's most basic shield ever, given to players who suck at Match
|
||||
SH_WHIRLWIND,
|
||||
SH_ARMAGEDDON,
|
||||
SH_PINK, // PITY IN PINK!
|
||||
|
||||
// Normal shields that use flags
|
||||
SH_ATTRACT = SH_PITY|SH_PROTECTELECTRIC,
|
||||
SH_ELEMENTAL = SH_PITY|SH_PROTECTFIRE|SH_PROTECTWATER,
|
||||
|
||||
// Sonic 3 shields
|
||||
SH_FLAMEAURA = SH_PITY|SH_PROTECTFIRE,
|
||||
SH_BUBBLEWRAP = SH_PITY|SH_PROTECTWATER,
|
||||
SH_THUNDERCOIN = SH_WHIRLWIND|SH_PROTECTELECTRIC,
|
||||
|
||||
// The force shield uses the lower 8 bits to count how many extra hits are left.
|
||||
SH_FORCE = 0x100,
|
||||
SH_FORCEHP = 0xFF, // to be used as a bitmask only
|
||||
|
||||
// Mostly for use with Mario mode.
|
||||
SH_FIREFLOWER = 0x200,
|
||||
|
||||
SH_STACK = SH_FIREFLOWER, // second-layer shields
|
||||
SH_NOSTACK = ~SH_STACK
|
||||
} shieldtype_t; // pw_shield
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CR_NONE = 0,
|
||||
// Specific level gimmicks.
|
||||
CR_SLIDING,
|
||||
CR_ZOOMTUBE,
|
||||
} carrytype_t; // pw_carry
|
||||
|
||||
// Player powers. (don't edit this comment)
|
||||
typedef enum
|
||||
{
|
||||
pw_invulnerability,
|
||||
pw_sneakers,
|
||||
pw_flashing,
|
||||
pw_shield,
|
||||
pw_carry,
|
||||
pw_tailsfly, // tails flying
|
||||
pw_underwater, // underwater timer
|
||||
pw_spacetime, // In space, no one can hear you spin!
|
||||
pw_extralife, // Extra Life timer
|
||||
pw_pushing,
|
||||
pw_justsprung,
|
||||
pw_noautobrake,
|
||||
|
||||
pw_super, // Are you super?
|
||||
pw_gravityboots, // gravity boots
|
||||
|
||||
// Weapon ammunition
|
||||
pw_infinityring,
|
||||
pw_automaticring,
|
||||
pw_bouncering,
|
||||
pw_scatterring,
|
||||
pw_grenadering,
|
||||
pw_explosionring,
|
||||
pw_railring,
|
||||
|
||||
// Power Stones
|
||||
pw_emeralds, // stored like global 'emeralds' variable
|
||||
|
||||
// NiGHTS powerups
|
||||
pw_nights_superloop,
|
||||
pw_nights_helper,
|
||||
pw_nights_linkfreeze,
|
||||
|
||||
pw_nocontrol, //for linedef exec 427
|
||||
|
||||
pw_dye, // for dyes
|
||||
|
||||
pw_justlaunched, // Launched off a slope this tic (0=none, 1=standard launch, 2=half-pipe launch)
|
||||
|
||||
pw_ignorelatch, // Don't grab onto CR_GENERIC, add 32768 (powers[pw_ignorelatch] & 1<<15) to avoid ALL not-NiGHTS CR_ types
|
||||
|
||||
NUMPOWERS
|
||||
} powertype_t;
|
||||
} carrytype_t; // carry
|
||||
|
||||
/*
|
||||
To use: #define FOREACH( name, number )
|
||||
|
|
@ -295,109 +198,12 @@ typedef enum
|
|||
#undef KSPIN_TYPE
|
||||
} kartspinoutflags_t;
|
||||
|
||||
//{ SRB2kart - kartstuff
|
||||
typedef enum
|
||||
{
|
||||
// TODO: Kill this giant array. Add them as actual player_t variables, or condense related timers into their own, smaller arrays.
|
||||
// Basic gameplay things
|
||||
k_position, // Used for Kart positions, mostly for deterministic stuff
|
||||
k_oldposition, // Used for taunting when you pass someone
|
||||
k_positiondelay, // Used for position number, so it can grow when passing/being passed
|
||||
|
||||
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||
k_instashield, // Instashield no-damage animation timer
|
||||
|
||||
k_floorboost, // Prevents Sneaker sounds for a breif duration when triggered by a floor panel
|
||||
k_spinouttype, // Determines the mode of spinout/wipeout, see kartspinoutflags_t
|
||||
|
||||
k_drift, // Drifting Left or Right, plus a bigger counter = sharper turn
|
||||
k_driftend, // Drift has ended, used to adjust character angle after drift
|
||||
k_driftcharge, // Charge your drift so you can release a burst of speed
|
||||
k_driftboost, // Boost you get from drifting
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race
|
||||
k_startboost, // Boost you get from start of race or respawn drop dash
|
||||
k_rings, // Number of held rings
|
||||
k_pickuprings, // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
|
||||
k_userings, // Have to be not holding the item button to change from using rings to using items (or vice versa), to prevent some weirdness with the button
|
||||
k_ringdelay, // 3 tic delay between every ring usage
|
||||
k_ringboost, // Ring boost timer
|
||||
k_ringlock, // Prevent picking up rings while SPB is locked on
|
||||
k_sparkleanim, // Angle offset for ring sparkle animation
|
||||
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
|
||||
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
||||
k_brakestop, // Wait until you've made a complete stop for a few tics before letting brake go in reverse.
|
||||
k_spindash, // Spindash charge timer
|
||||
k_spindashspeed, // Spindash release speed
|
||||
k_spindashboost, // Spindash release boost timer
|
||||
k_waterskip, // Water skipping counter
|
||||
k_dashpadcooldown, // Separate the vanilla SA-style dash pads from using pw_flashing
|
||||
k_numboosts, // Count of how many boosts are being stacked, for after image spawning
|
||||
k_boostpower, // Base boost value, for offroad
|
||||
k_speedboost, // Boost value smoothing for max speed
|
||||
k_accelboost, // Boost value smoothing for acceleration
|
||||
k_handleboost, // Boost value smoothing for handling
|
||||
k_draftpower, // Drafting power (from 0 to FRACUNIT), doubles your top speed & acceleration at max
|
||||
k_draftleeway, // Leniency timer before removing draft power
|
||||
k_lastdraft, // Last player being drafted
|
||||
k_boostangle, // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
|
||||
k_aizdriftstrat, // Let go of your drift while boosting? Helper for the SICK STRATZ you have just unlocked
|
||||
k_brakedrift, // Helper for brake-drift spark spawning
|
||||
|
||||
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
|
||||
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
|
||||
|
||||
// Item held stuff
|
||||
k_itemtype, // KITEM_ constant for item number
|
||||
k_itemamount, // Amount of said item
|
||||
k_itemheld, // Are you holding an item?
|
||||
k_holdready, // Hold button-style item is ready to activate
|
||||
|
||||
// Some items use timers for their duration or effects
|
||||
k_curshield, // 0 = no shield, 1 = thunder shield
|
||||
k_hyudorotimer, // Duration of the Hyudoro offroad effect itself
|
||||
k_stealingtimer, // You are stealing an item, this is your timer
|
||||
k_stolentimer, // You are being stolen from, this is your timer
|
||||
k_superring, // Spawn rings on top of you every tic!
|
||||
k_sneakertimer, // Duration of a Sneaker Boost (from Sneakers or level boosters)
|
||||
k_numsneakers, // Number of stacked sneaker effects
|
||||
k_growshrinktimer, // > 0 = Big, < 0 = small
|
||||
k_squishedtimer, // Squished frame timer
|
||||
k_rocketsneakertimer, // Rocket Sneaker duration timer
|
||||
k_invincibilitytimer, // Invincibility timer
|
||||
k_bubblecool, // Bubble Shield use cooldown
|
||||
k_bubbleblowup, // Bubble Shield usage blowup
|
||||
k_flamedash, // Flame Shield dash power
|
||||
k_flamemeter, // Flame Shield dash meter left
|
||||
k_flamelength, // Flame Shield dash meter, number of segments
|
||||
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
|
||||
k_eggmanexplode, // Fake item recieved, explode in a few seconds
|
||||
k_eggmanblame, // Fake item recieved, who set this fake
|
||||
k_lastjawztarget, // Last person you target with jawz, for playing the target switch sfx
|
||||
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
k_wipeoutslow, // Timer before you slowdown when getting wiped out
|
||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||
k_comebacktimer, // Battle mode, how long before you become a bomb after death
|
||||
k_sadtimer, // How long you've been sad
|
||||
|
||||
// Battle Mode vars
|
||||
k_bumper, // Number of bumpers left
|
||||
k_comebackpoints, // Number of times you've bombed or gave an item to someone; once it's 3 it gets set back to 0 and you're given a bumper
|
||||
k_comebackmode, // 0 = bomb, 1 = item
|
||||
k_wanted, // Timer for determining WANTED status, lowers when hitting people, prevents the game turning into Camp Lazlo
|
||||
|
||||
// v1.0.2+ vars
|
||||
k_getsparks, // Disable drift sparks at low speed, JUST enough to give acceleration the actual headstart above speed
|
||||
k_jawztargetdelay, // Delay for Jawz target switching, to make it less twitchy
|
||||
k_spectatewait, // How long have you been waiting as a spectator
|
||||
k_tiregrease, // Reduced friction timer after hitting a horizontal spring
|
||||
k_springstars, // Spawn stars around a player when they hit a spring
|
||||
k_springcolor, // Color of spring stars
|
||||
k_killfield, // How long have you been in the kill field, stay in too long and lose a bumper
|
||||
k_wrongway, // Display WRONG WAY on screen
|
||||
|
||||
NUMKARTSTUFF
|
||||
} kartstufftype_t;
|
||||
TRIP_NONE,
|
||||
TRIP_PASSED,
|
||||
TRIP_BLOCKED,
|
||||
} tripwirestate_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -433,15 +239,19 @@ typedef enum
|
|||
khud_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
|
||||
khud_yougotem, // "You Got Em" gfx when hitting someone as a karma player via a method that gets you back in the game instantly
|
||||
|
||||
// Tricks
|
||||
khud_trickcool,
|
||||
|
||||
NUMKARTHUD
|
||||
} karthudtype_t;
|
||||
|
||||
// QUICKLY GET RING TOTAL, INCLUDING RINGS CURRENTLY IN THE PICKUP ANIMATION
|
||||
#define RINGTOTAL(p) (p->rings + p->kartstuff[k_pickuprings])
|
||||
#define RINGTOTAL(p) (p->rings + p->pickuprings)
|
||||
|
||||
// CONSTANTS FOR TRICK PANELS
|
||||
#define TRICKMOMZRAMP (30)
|
||||
#define TRICKLAG (9)
|
||||
#define TRICKDELAY (TICRATE/4)
|
||||
|
||||
#define TUMBLEBOUNCES 3
|
||||
|
||||
|
|
@ -453,13 +263,14 @@ typedef enum
|
|||
// player_t struct for all respawn variables
|
||||
typedef struct respawnvars_s
|
||||
{
|
||||
UINT8 state; // 0: not respawning, 1: heading towards respawn point, 2: about to drop
|
||||
UINT8 state; // see RESPAWNST_ constants in k_respawn.h
|
||||
waypoint_t *wp; // Waypoint that we're going towards, NULL if the position isn't linked to one
|
||||
fixed_t pointx; // Respawn position coords to go towards
|
||||
fixed_t pointy;
|
||||
fixed_t pointz;
|
||||
boolean flip; // Flip upside down or not
|
||||
tic_t timer; // Time left on respawn animation once you're there
|
||||
tic_t airtimer; // Time spent in the air before respawning
|
||||
UINT32 distanceleft; // How far along the course to respawn you
|
||||
tic_t dropdash; // Drop Dash charge timer
|
||||
} respawnvars_t;
|
||||
|
|
@ -475,6 +286,8 @@ typedef struct botvars_s
|
|||
tic_t itemconfirm; // When high enough, they will use their item
|
||||
|
||||
SINT8 turnconfirm; // Confirm turn direction
|
||||
|
||||
tic_t spindashconfirm; // When high enough, they will try spindashing
|
||||
} botvars_t;
|
||||
|
||||
// ========================================================================
|
||||
|
|
@ -513,37 +326,6 @@ typedef struct player_s
|
|||
// fun thing for player sprite
|
||||
angle_t drawangle;
|
||||
|
||||
// player's ring count
|
||||
INT16 rings;
|
||||
INT16 spheres;
|
||||
|
||||
// Power ups. invinc and invis are tic counters.
|
||||
UINT16 powers[NUMPOWERS];
|
||||
|
||||
// SRB2kart stuff
|
||||
INT32 kartstuff[NUMKARTSTUFF];
|
||||
INT32 karthud[NUMKARTHUD];
|
||||
|
||||
UINT32 distancetofinish;
|
||||
waypoint_t *nextwaypoint;
|
||||
respawnvars_t respawn; // Respawn info
|
||||
tic_t airtime; // Keep track of how long you've been in the air
|
||||
boolean driftInput; // Whenever or not try drifting.
|
||||
boolean airFailsafe; // Whenever or not try the air boost
|
||||
INT32 aizDriftTilt;
|
||||
INT32 aizDriftTurn;
|
||||
|
||||
UINT8 trickpanel; // Trick panel state
|
||||
boolean trickdelay; // Prevent tricks until control stick is neutral
|
||||
fixed_t trickmomx;
|
||||
fixed_t trickmomy;
|
||||
fixed_t trickmomz; // Instead of stupid auxiliary variables let's... just make some ourselves.
|
||||
|
||||
UINT8 bumpers;
|
||||
INT16 karmadelay;
|
||||
boolean eliminated;
|
||||
|
||||
|
||||
// Bit flags.
|
||||
// See pflags_t, above.
|
||||
pflags_t pflags;
|
||||
|
|
@ -561,10 +343,6 @@ typedef struct player_s
|
|||
INT32 skin;
|
||||
UINT32 availabilities;
|
||||
|
||||
UINT32 score; // player score
|
||||
fixed_t dashspeed; // dashing speed
|
||||
|
||||
// SRB2kart
|
||||
UINT8 kartspeed; // Kart speed stat between 1 and 9
|
||||
UINT8 kartweight; // Kart weight stat between 1 and 9
|
||||
|
||||
|
|
@ -573,45 +351,147 @@ typedef struct player_s
|
|||
UINT16 followercolor; // Kart: Used to store the follower colour the player wishes to use
|
||||
mobj_t *follower; // Kart: This is the follower object we have. (If any)
|
||||
|
||||
UINT8 tumbleBounces;
|
||||
UINT16 tumbleHeight;
|
||||
boolean tumbleLastBounce;
|
||||
boolean tumbleSound;
|
||||
|
||||
SINT8 glanceDir; // Direction the player is trying to look backwards in
|
||||
|
||||
//
|
||||
|
||||
UINT32 charflags; // Extra abilities/settings for skins (combinable stuff)
|
||||
// See SF_ flags
|
||||
|
||||
mobjtype_t followitem; // Object # to spawn for Smiles
|
||||
mobj_t *followmobj; // Smiles all around
|
||||
|
||||
UINT32 score; // player score
|
||||
|
||||
UINT16 nocontrol; //for linedef exec 427
|
||||
UINT8 carry;
|
||||
UINT16 dye;
|
||||
|
||||
// SRB2kart stuff
|
||||
INT32 karthud[NUMKARTHUD];
|
||||
|
||||
// Basic gameplay things
|
||||
UINT8 position; // Used for Kart positions, mostly for deterministic stuff
|
||||
UINT8 oldposition; // Used for taunting when you pass someone
|
||||
UINT8 positiondelay; // Used for position number, so it can grow when passing/being passed
|
||||
UINT32 distancetofinish;
|
||||
waypoint_t *nextwaypoint;
|
||||
respawnvars_t respawn; // Respawn info
|
||||
tic_t airtime; // Keep track of how long you've been in the air
|
||||
UINT8 startboost; // (0 to 125) - Boost you get from start of race or respawn drop dash
|
||||
|
||||
UINT16 flashing;
|
||||
UINT16 spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
UINT8 spinouttype; // Determines the mode of spinout/wipeout, see kartspinoutflags_t
|
||||
UINT8 instashield; // Instashield no-damage animation timer
|
||||
UINT8 wipeoutslow; // Timer before you slowdown when getting wiped out
|
||||
UINT8 justbumped; // Prevent players from endlessly bumping into each other
|
||||
UINT8 tumbleBounces;
|
||||
UINT16 tumbleHeight; // In *mobjscaled* fracunits, or mfu, not raw fu
|
||||
|
||||
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
|
||||
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
|
||||
UINT8 driftboost; // (0 to 125) - Boost you get from drifting
|
||||
UINT8 strongdriftboost; // (0 to 125) - While active, boost from drifting gives a stronger speed increase
|
||||
|
||||
SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
|
||||
INT32 aizdrifttilt;
|
||||
INT32 aizdriftturn;
|
||||
|
||||
fixed_t offroad; // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
||||
UINT8 waterskip; // Water skipping counter
|
||||
|
||||
UINT16 tiregrease; // Reduced friction timer after hitting a spring
|
||||
UINT16 springstars; // Spawn stars around a player when they hit a spring
|
||||
UINT16 springcolor; // Color of spring stars
|
||||
UINT8 dashpadcooldown; // Separate the vanilla SA-style dash pads from using flashing
|
||||
|
||||
UINT16 spindash; // Spindash charge timer
|
||||
fixed_t spindashspeed; // Spindash release speed
|
||||
UINT8 spindashboost; // Spindash release boost timer
|
||||
|
||||
UINT8 numboosts; // Count of how many boosts are being stacked, for after image spawning
|
||||
fixed_t boostpower; // Base boost value, for offroad
|
||||
fixed_t speedboost; // Boost value smoothing for max speed
|
||||
fixed_t accelboost; // Boost value smoothing for acceleration
|
||||
fixed_t handleboost; // Boost value smoothing for handling
|
||||
angle_t boostangle; // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
|
||||
|
||||
fixed_t draftpower; // (0 to FRACUNIT) - Drafting power, doubles your top speed & acceleration at max
|
||||
UINT16 draftleeway; // Leniency timer before removing draft power
|
||||
SINT8 lastdraft; // (-1 to 15) - Last player being drafted
|
||||
|
||||
UINT16 itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem")
|
||||
UINT8 roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark)
|
||||
|
||||
// Item held stuff
|
||||
SINT8 itemtype; // KITEM_ constant for item number
|
||||
UINT8 itemamount; // Amount of said item
|
||||
SINT8 throwdir; // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||
|
||||
UINT8 sadtimer; // How long you've been sad
|
||||
|
||||
// player's ring count
|
||||
SINT8 rings;
|
||||
UINT8 pickuprings; // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
|
||||
UINT8 ringdelay; // (0 to 3) - 3 tic delay between every ring usage
|
||||
UINT16 ringboost; // Ring boost timer
|
||||
UINT8 sparkleanim; // (0 to 19) - Angle offset for ring sparkle animation
|
||||
UINT16 superring; // Spawn rings on top of you every tic!
|
||||
|
||||
UINT8 curshield; // see kartshields_t
|
||||
UINT8 bubblecool; // Bubble Shield use cooldown
|
||||
UINT8 bubbleblowup; // Bubble Shield usage blowup
|
||||
UINT16 flamedash; // Flame Shield dash power
|
||||
UINT16 flamemeter; // Flame Shield dash meter left
|
||||
UINT8 flamelength; // Flame Shield dash meter, number of segments
|
||||
|
||||
UINT16 hyudorotimer; // Duration of the Hyudoro offroad effect itself
|
||||
SINT8 stealingtimer; // if >0 you are stealing, if <0 you are being stolen from
|
||||
|
||||
UINT16 sneakertimer; // Duration of a Sneaker Boost (from Sneakers or level boosters)
|
||||
UINT8 numsneakers; // Number of stacked sneaker effects
|
||||
UINT8 floorboost; // (0 to 3) - Prevents Sneaker sounds for a brief duration when triggered by a floor panel
|
||||
|
||||
INT16 growshrinktimer; // > 0 = Big, < 0 = small
|
||||
UINT16 rocketsneakertimer; // Rocket Sneaker duration timer
|
||||
UINT16 invincibilitytimer; // Invincibility timer
|
||||
|
||||
UINT8 eggmanexplode; // Fake item recieved, explode in a few seconds
|
||||
SINT8 eggmanblame; // (-1 to 15) - Fake item recieved, who set this fake
|
||||
|
||||
UINT8 bananadrag; // After a second of holding a banana behind you, you start to slow down
|
||||
|
||||
SINT8 lastjawztarget; // (-1 to 15) - Last person you target with jawz, for playing the target switch sfx
|
||||
UINT8 jawztargetdelay; // (0 to 5) - Delay for Jawz target switching, to make it less twitchy
|
||||
|
||||
UINT8 trickpanel; // Trick panel state
|
||||
UINT8 tricktime; // Increases while you're tricking. You can't input any trick until it's reached a certain threshold
|
||||
fixed_t trickboostpower; // Save the rough speed multiplier. Used for upwards tricks.
|
||||
UINT8 trickboostdecay; // used to know how long you've waited
|
||||
UINT8 trickboost; // Trick boost. This one is weird and has variable speed. Dear god.
|
||||
|
||||
|
||||
UINT32 roundscore; // battle score this round
|
||||
UINT8 emeralds;
|
||||
UINT8 bumpers;
|
||||
INT16 karmadelay;
|
||||
tic_t overtimekarma; // time to live in overtime comeback
|
||||
INT16 spheres;
|
||||
|
||||
SINT8 glanceDir; // Direction the player is trying to look backwards in
|
||||
|
||||
UINT8 tripWireState; // see tripwirestate_t
|
||||
|
||||
//
|
||||
|
||||
SINT8 lives;
|
||||
boolean lostlife;
|
||||
SINT8 continues; // continues that player has acquired
|
||||
|
||||
SINT8 xtralife; // Ring Extra Life counter
|
||||
UINT8 gotcontinue; // Got continue from this stage?
|
||||
|
||||
fixed_t speed; // Player's speed (distance formula of MOMX and MOMY values)
|
||||
fixed_t lastspeed;
|
||||
fixed_t lastmomz;
|
||||
UINT8 secondjump; // Jump counter
|
||||
|
||||
UINT8 fly1; // Tails flying
|
||||
UINT8 scoreadd; // Used for multiple enemy attack bonus
|
||||
tic_t glidetime; // Glide counter for thrust
|
||||
UINT8 climbing; // Climbing on the wall
|
||||
INT32 deadtimer; // End game if game over lasts too long
|
||||
tic_t exiting; // Exitlevel timer
|
||||
|
||||
UINT8 homing; // Are you homing?
|
||||
tic_t dashmode; // counter for dashmode ability
|
||||
|
||||
tic_t skidtime; // Skid timer
|
||||
|
||||
////////////////////////////
|
||||
// Conveyor Belt Movement //
|
||||
////////////////////////////
|
||||
|
|
@ -620,73 +500,18 @@ typedef struct player_s
|
|||
fixed_t rmomx; // "Real" momx (momx - cmomx)
|
||||
fixed_t rmomy; // "Real" momy (momy - cmomy)
|
||||
|
||||
/////////////////////
|
||||
// Race Mode Stuff //
|
||||
/////////////////////
|
||||
INT16 numboxes; // Number of item boxes obtained for Race Mode
|
||||
INT16 totalring; // Total number of rings obtained for Race Mode
|
||||
INT16 totalring; // Total number of rings obtained for GP
|
||||
tic_t realtime; // integer replacement for leveltime
|
||||
UINT8 laps; // Number of laps (optional)
|
||||
INT32 starpostnum; // The number of the last starpost you hit
|
||||
|
||||
////////////////////
|
||||
// CTF Mode Stuff //
|
||||
////////////////////
|
||||
INT32 ctfteam; // 0 == Spectator, 1 == Red, 2 == Blue
|
||||
UINT16 gotflag; // 1 == Red, 2 == Blue Do you have the flag?
|
||||
UINT8 ctfteam; // 0 == Spectator, 1 == Red, 2 == Blue
|
||||
|
||||
INT32 weapondelay; // Delay (if any) to fire the weapon again
|
||||
INT32 tossdelay; // Delay (if any) to toss a flag/emeralds again
|
||||
|
||||
/////////////////
|
||||
// NiGHTS Stuff//
|
||||
/////////////////
|
||||
angle_t angle_pos;
|
||||
angle_t old_angle_pos;
|
||||
|
||||
mobj_t *axis1;
|
||||
mobj_t *axis2;
|
||||
tic_t bumpertime; // Currently being bounced by MT_NIGHTSBUMPER
|
||||
INT32 flyangle;
|
||||
tic_t drilltimer;
|
||||
INT32 linkcount;
|
||||
tic_t linktimer;
|
||||
INT32 anotherflyangle;
|
||||
tic_t nightstime; // How long you can fly as NiGHTS.
|
||||
INT32 drillmeter;
|
||||
UINT8 drilldelay;
|
||||
boolean bonustime; // Capsule destroyed, now it's bonus time!
|
||||
mobj_t *capsule; // Go inside the capsule
|
||||
mobj_t *drone; // Move center to the drone
|
||||
fixed_t oldscale; // Pre-Nightserize scale
|
||||
UINT8 mare; // Current mare
|
||||
UINT8 marelap; // Current mare lap
|
||||
UINT8 marebonuslap; // Current mare lap starting from bonus time
|
||||
|
||||
// Statistical purposes.
|
||||
tic_t marebegunat; // Leveltime when mare begun
|
||||
tic_t startedtime; // Time which you started this mare with.
|
||||
tic_t finishedtime; // Time it took you to finish the mare (used for display)
|
||||
tic_t lapbegunat; // Leveltime when lap begun
|
||||
tic_t lapstartedtime; // Time which you started this lap with.
|
||||
INT16 finishedspheres; // The spheres you had left upon finishing the mare
|
||||
INT16 finishedrings; // The rings/stars you had left upon finishing the mare
|
||||
UINT32 marescore; // score for this nights stage
|
||||
UINT32 lastmarescore; // score for the last mare
|
||||
UINT32 totalmarescore; // score for all mares
|
||||
UINT8 lastmare; // previous mare
|
||||
UINT8 lastmarelap; // previous mare lap
|
||||
UINT8 lastmarebonuslap; // previous mare bonus lap
|
||||
UINT8 totalmarelap; // total mare lap
|
||||
UINT8 totalmarebonuslap; // total mare bonus lap
|
||||
INT32 maxlink; // maximum link obtained
|
||||
UINT8 texttimer; // nights_texttime should not be local
|
||||
UINT8 textvar; // which line of NiGHTS text to show -- let's not use cheap hacks
|
||||
UINT8 checkskip; // Skipping checkpoints? Oh no no no
|
||||
|
||||
INT16 lastsidehit, lastlinehit;
|
||||
|
||||
tic_t losstime;
|
||||
UINT8 timeshit; // That's TIMES HIT, not TIME SHIT, you doofus!
|
||||
//UINT8 timeshit; // That's TIMES HIT, not TIME SHIT, you doofus! -- in memoriam
|
||||
|
||||
INT32 onconveyor; // You are on a conveyor belt if nonzero
|
||||
|
||||
|
|
@ -695,6 +520,7 @@ typedef struct player_s
|
|||
angle_t awayviewaiming; // Used for cut-away view
|
||||
|
||||
boolean spectator;
|
||||
tic_t spectatewait; // reimplementable as UINT8 queue - How long have you been waiting as a spectator
|
||||
|
||||
boolean bot;
|
||||
botvars_t botvars;
|
||||
|
|
@ -709,15 +535,13 @@ typedef struct player_s
|
|||
|
||||
UINT8 kickstartaccel;
|
||||
|
||||
UINT8 stairjank;
|
||||
|
||||
#ifdef HWRENDER
|
||||
fixed_t fovadd; // adjust FOV for hw rendering
|
||||
#endif
|
||||
} player_t;
|
||||
|
||||
// Values for dashmode
|
||||
#define DASHMODE_THRESHOLD (3*TICRATE)
|
||||
#define DASHMODE_MAX (DASHMODE_THRESHOLD + 3)
|
||||
|
||||
// Value for infinite lives
|
||||
#define INFLIVES 0x7F
|
||||
|
||||
|
|
|
|||
|
|
@ -445,42 +445,6 @@ static inline int lib_getenum(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
#endif
|
||||
else if (!mathlib && fastncmp("pw_",word,3)) {
|
||||
p = word+3;
|
||||
for (i = 0; i < NUMPOWERS; i++)
|
||||
if (fasticmp(p, POWERS_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (mathlib && fastncmp("PW_",word,3)) { // SOCs are ALL CAPS!
|
||||
p = word+3;
|
||||
for (i = 0; i < NUMPOWERS; i++)
|
||||
if (fastcmp(p, POWERS_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return luaL_error(L, "power '%s' could not be found.\n", word);
|
||||
}
|
||||
else if (!mathlib && fastncmp("k_",word,2)) {
|
||||
p = word+2;
|
||||
for (i = 0; i < NUMKARTSTUFF; i++)
|
||||
if (fasticmp(p, KARTSTUFF_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (mathlib && fastncmp("K_",word,2)) { // SOCs are ALL CAPS!
|
||||
p = word+2;
|
||||
for (i = 0; i < NUMKARTSTUFF; i++)
|
||||
if (fastcmp(p, KARTSTUFF_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return luaL_error(L, "kartstuff '%s' could not be found.\n", word);
|
||||
}
|
||||
else if (!mathlib && fastncmp("khud_",word,5)) {
|
||||
p = word+5;
|
||||
for (i = 0; i < NUMKARTHUD; i++)
|
||||
|
|
|
|||
|
|
@ -2683,6 +2683,10 @@ void readsound(MYFILE *f, INT32 num)
|
|||
{
|
||||
S_sfx[num].pitch = value;
|
||||
}
|
||||
else if (fastcmp(word, "VOLUME"))
|
||||
{
|
||||
S_sfx[num].volume = value;
|
||||
}
|
||||
else if (fastcmp(word, "CAPTION") || fastcmp(word, "DESCRIPTION"))
|
||||
{
|
||||
deh_strlcpy(S_sfx[num].caption, word2,
|
||||
|
|
@ -3556,10 +3560,6 @@ void readmaincfg(MYFILE *f)
|
|||
{
|
||||
maxXtraLife = (UINT8)get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "USECONTINUES"))
|
||||
{
|
||||
useContinues = (UINT8)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
}
|
||||
|
||||
else if (fastcmp(word, "GAMEDATA"))
|
||||
{
|
||||
|
|
@ -4337,20 +4337,6 @@ menutype_t get_menutype(const char *word)
|
|||
return i;
|
||||
deh_warning("Couldn't find gametype named 'GT_%s'",word);
|
||||
return GT_COOP;
|
||||
}
|
||||
|
||||
static powertype_t get_power(const char *word)
|
||||
{ // Returns the value of pw_ enumerations
|
||||
powertype_t i;
|
||||
if (*word >= '0' && *word <= '9')
|
||||
return atoi(word);
|
||||
if (fastncmp("PW_",word,3))
|
||||
word += 3; // take off the pw_
|
||||
for (i = 0; i < NUMPOWERS; i++)
|
||||
if (fastcmp(word, POWERS_LIST[i]))
|
||||
return i;
|
||||
deh_warning("Couldn't find power named 'pw_%s'",word);
|
||||
return pw_invulnerability;
|
||||
}*/
|
||||
|
||||
/// \todo Make ANY of this completely over-the-top math craziness obey the order of operations.
|
||||
|
|
|
|||
275
src/deh_tables.c
275
src/deh_tables.c
|
|
@ -85,18 +85,13 @@ actionpointer_t actionpointers[] =
|
|||
{{A_FaceTracer}, "A_FACETRACER"},
|
||||
{{A_Scream}, "A_SCREAM"},
|
||||
{{A_BossDeath}, "A_BOSSDEATH"},
|
||||
{{A_CustomPower}, "A_CUSTOMPOWER"},
|
||||
{{A_RingBox}, "A_RINGBOX"},
|
||||
{{A_Invincibility}, "A_INVINCIBILITY"},
|
||||
{{A_SuperSneakers}, "A_SUPERSNEAKERS"},
|
||||
{{A_BunnyHop}, "A_BUNNYHOP"},
|
||||
{{A_BubbleSpawn}, "A_BUBBLESPAWN"},
|
||||
{{A_FanBubbleSpawn}, "A_FANBUBBLESPAWN"},
|
||||
{{A_BubbleRise}, "A_BUBBLERISE"},
|
||||
{{A_BubbleCheck}, "A_BUBBLECHECK"},
|
||||
{{A_AwardScore}, "A_AWARDSCORE"},
|
||||
{{A_GiveShield}, "A_GIVESHIELD"},
|
||||
{{A_GravityBox}, "A_GRAVITYBOX"},
|
||||
{{A_ScoreRise}, "A_SCORERISE"},
|
||||
{{A_AttractChase}, "A_ATTRACTCHASE"},
|
||||
{{A_DropMine}, "A_DROPMINE"},
|
||||
|
|
@ -339,6 +334,7 @@ actionpointer_t actionpointers[] =
|
|||
{{A_ReaperThinker}, "A_REAPERTHINKER"},
|
||||
{{A_FlameShieldPaper}, "A_FLAMESHIELDPAPER"},
|
||||
{{A_InvincSparkleRotate}, "A_INVINCSPARKLEROTATE"},
|
||||
{{A_SpawnItemCapsuleParts}, "A_SPAWNITEMCAPSULEPARTS"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
|
|
@ -3489,6 +3485,15 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
|
||||
"S_ITEMICON",
|
||||
|
||||
// Item capsules
|
||||
"S_ITEMCAPSULE",
|
||||
"S_ITEMCAPSULE_TOP_SIDE",
|
||||
"S_ITEMCAPSULE_BOTTOM_SIDE_AIR",
|
||||
"S_ITEMCAPSULE_BOTTOM_SIDE_GROUND",
|
||||
"S_ITEMCAPSULE_TOP",
|
||||
"S_ITEMCAPSULE_BOTTOM",
|
||||
"S_ITEMCAPSULE_INSIDE",
|
||||
|
||||
// Signpost sparkles
|
||||
"S_SIGNSPARK1",
|
||||
"S_SIGNSPARK2",
|
||||
|
|
@ -3527,6 +3532,10 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_DRIFTWARNSPARK3",
|
||||
"S_DRIFTWARNSPARK4",
|
||||
|
||||
// Drift electricity
|
||||
"S_DRIFTELECTRICITY",
|
||||
"S_DRIFTELECTRICSPARK",
|
||||
|
||||
// Fast lines
|
||||
"S_FASTLINE1",
|
||||
"S_FASTLINE2",
|
||||
|
|
@ -4584,6 +4593,11 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_RINGSPARKS14",
|
||||
"S_RINGSPARKS15",
|
||||
|
||||
"S_GAINAX_TINY",
|
||||
"S_GAINAX_HUGE",
|
||||
"S_GAINAX_MID1",
|
||||
"S_GAINAX_MID2",
|
||||
|
||||
"S_DRAFTDUST1",
|
||||
"S_DRAFTDUST2",
|
||||
"S_DRAFTDUST3",
|
||||
|
|
@ -4650,6 +4664,12 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_DEBTSPIKEC",
|
||||
"S_DEBTSPIKED",
|
||||
"S_DEBTSPIKEE",
|
||||
|
||||
// Sparks when driving on stairs
|
||||
"S_JANKSPARK1",
|
||||
"S_JANKSPARK2",
|
||||
"S_JANKSPARK3",
|
||||
"S_JANKSPARK4",
|
||||
};
|
||||
|
||||
// RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1",
|
||||
|
|
@ -5433,6 +5453,8 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_RANDOMITEM",
|
||||
"MT_RANDOMITEMPOP",
|
||||
"MT_FLOATINGITEM",
|
||||
"MT_ITEMCAPSULE",
|
||||
"MT_ITEMCAPSULE_PART",
|
||||
|
||||
"MT_SIGNSPARKLE",
|
||||
|
||||
|
|
@ -5451,6 +5473,9 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_DRIFTSPARK",
|
||||
"MT_BRAKEDRIFT",
|
||||
"MT_DRIFTDUST",
|
||||
"MT_DRIFTELECTRICITY",
|
||||
"MT_DRIFTELECTRICSPARK",
|
||||
"MT_JANKSPARK",
|
||||
|
||||
"MT_ROCKETSNEAKER", // Rocket sneakers
|
||||
|
||||
|
|
@ -5710,6 +5735,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
|
||||
"MT_KARMAFIREWORK",
|
||||
"MT_RINGSPARKS",
|
||||
"MT_GAINAX",
|
||||
"MT_DRAFTDUST",
|
||||
"MT_SPBDUST",
|
||||
"MT_TIREGREASE",
|
||||
|
|
@ -5828,56 +5854,46 @@ const char *const MAPTHINGFLAG_LIST[4] = {
|
|||
};
|
||||
|
||||
const char *const PLAYERFLAG_LIST[] = {
|
||||
"FAULT",
|
||||
"ANALOGMODE", // Analog mode?
|
||||
"DIRECTIONCHAR", // Directional character sprites?
|
||||
"AUTOBRAKE", // Autobrake?
|
||||
|
||||
// Cheats
|
||||
"GODMODE",
|
||||
"NOCLIP",
|
||||
"INVIS",
|
||||
|
||||
// True if button down last tic.
|
||||
"ATTACKDOWN",
|
||||
"ACCELDOWN",
|
||||
"BRAKEDOWN",
|
||||
"WPNDOWN",
|
||||
"LOOKDOWN",
|
||||
|
||||
// Accessibility and cheats
|
||||
"KICKSTARTACCEL", // Is accelerate in kickstart mode?
|
||||
"GODMODE",
|
||||
"NOCLIP",
|
||||
|
||||
"WANTSTOJOIN", // Spectator that wants to join
|
||||
|
||||
// Unmoving states
|
||||
"STASIS", // Player is not allowed to move
|
||||
"JUMPSTASIS", // and that includes jumping.
|
||||
"FAULT", // F A U L T
|
||||
"ELIMINATED", // Battle-style elimination, no extra penalty
|
||||
"NOCONTEST", // Did not finish (last place explosion)
|
||||
"LOSTLIFE", // Do not lose life more than once
|
||||
|
||||
// SRB2Kart: spectator that wants to join
|
||||
"WANTSTOJOIN",
|
||||
"RINGLOCK", // Prevent picking up rings while SPB is locked on
|
||||
|
||||
// Character action status
|
||||
"STARTJUMP",
|
||||
"JUMPED",
|
||||
"NOJUMPDAMAGE",
|
||||
"SPINNING",
|
||||
"STARTDASH",
|
||||
"THOKKED",
|
||||
"SHIELDABILITY",
|
||||
"GLIDING",
|
||||
"BOUNCING",
|
||||
// The following four flags are mutually exclusive, although they can also all be off at the same time. If we ever run out of pflags, eventually turn them into a seperate five(+) mode UINT8..?
|
||||
"USERINGS", // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
||||
"ITEMOUT", // Are you holding an item out?
|
||||
"EGGMANOUT", // Eggman mark held, separate from PF_ITEMOUT so it doesn't stop you from getting items
|
||||
"HOLDREADY", // Hold button-style item is ready to activate
|
||||
|
||||
// Sliding (usually in water) like Labyrinth/Oil Ocean
|
||||
"SLIDING",
|
||||
"DRIFTINPUT", // Drifting!
|
||||
"GETSPARKS", // Can get sparks
|
||||
"DRIFTEND", // Drift has ended, used to adjust character angle after drift
|
||||
"BRAKEDRIFT", // Helper for brake-drift spark spawning
|
||||
|
||||
// NiGHTS stuff
|
||||
"TRANSFERTOCLOSEST",
|
||||
"DRILLING",
|
||||
"AIRFAILSAFE", // Whenever or not try the air boost
|
||||
"TRICKDELAY", // Prevent tricks until control stick is neutral
|
||||
|
||||
// Gametype-specific stuff
|
||||
"GAMETYPEOVER", // Race time over
|
||||
"TAGIT",
|
||||
"TUMBLELASTBOUNCE", // One more time for the funny
|
||||
"TUMBLESOUND", // Don't play more than once
|
||||
|
||||
/*** misc ***/
|
||||
"FORCESTRAFE", // Accessibility feature - is accelerate in kickstart mode?
|
||||
"CANCARRY",
|
||||
"HITFINISHLINE", // Already hit the finish line this tic
|
||||
|
||||
"WRONGWAY", // Moving the wrong way with respect to waypoints?
|
||||
NULL // stop loop here.
|
||||
};
|
||||
|
||||
|
|
@ -6105,145 +6121,6 @@ const char *COLOR_ENUMS[] = {
|
|||
"CHAOSEMERALD7"
|
||||
};
|
||||
|
||||
const char *const POWERS_LIST[] = {
|
||||
"INVULNERABILITY",
|
||||
"SNEAKERS",
|
||||
"FLASHING",
|
||||
"SHIELD",
|
||||
"CARRY",
|
||||
"TAILSFLY", // tails flying
|
||||
"UNDERWATER", // underwater timer
|
||||
"SPACETIME", // In space, no one can hear you spin!
|
||||
"EXTRALIFE", // Extra Life timer
|
||||
"PUSHING",
|
||||
"JUSTSPRUNG",
|
||||
"NOAUTOBRAKE",
|
||||
|
||||
"SUPER", // Are you super?
|
||||
"GRAVITYBOOTS", // gravity boots
|
||||
|
||||
// Weapon ammunition
|
||||
"INFINITYRING",
|
||||
"AUTOMATICRING",
|
||||
"BOUNCERING",
|
||||
"SCATTERRING",
|
||||
"GRENADERING",
|
||||
"EXPLOSIONRING",
|
||||
"RAILRING",
|
||||
|
||||
// Power Stones
|
||||
"EMERALDS", // stored like global 'emeralds' variable
|
||||
|
||||
// NiGHTS powerups
|
||||
"NIGHTS_SUPERLOOP",
|
||||
"NIGHTS_HELPER",
|
||||
"NIGHTS_LINKFREEZE",
|
||||
|
||||
//for linedef exec 427
|
||||
"NOCONTROL",
|
||||
|
||||
//for dyes
|
||||
"DYE",
|
||||
|
||||
"JUSTLAUNCHED",
|
||||
|
||||
"IGNORELATCH"
|
||||
};
|
||||
|
||||
const char *const KARTSTUFF_LIST[] = {
|
||||
"POSITION",
|
||||
"OLDPOSITION",
|
||||
"POSITIONDELAY",
|
||||
|
||||
"THROWDIR",
|
||||
"INSTASHIELD",
|
||||
|
||||
"FLOORBOOST",
|
||||
"SPINOUTTYPE",
|
||||
|
||||
"DRIFT",
|
||||
"DRIFTEND",
|
||||
"DRIFTCHARGE",
|
||||
"DRIFTBOOST",
|
||||
"BOOSTCHARGE",
|
||||
"STARTBOOST",
|
||||
"RINGS",
|
||||
"PICKUPRINGS",
|
||||
"USERINGS",
|
||||
"RINGDELAY",
|
||||
"RINGBOOST",
|
||||
"RINGLOCK",
|
||||
"SPARKLEANIM",
|
||||
"JMP",
|
||||
"OFFROAD",
|
||||
"BRAKESTOP",
|
||||
"SPINDASH",
|
||||
"SPINDASHSPEED",
|
||||
"SPINDASHBOOST",
|
||||
"WATERSKIP",
|
||||
"DASHPADCOOLDOWN",
|
||||
"NUMBOOSTS",
|
||||
"BOOSTPOWER",
|
||||
"SPEEDBOOST",
|
||||
"ACCELBOOST",
|
||||
"HANDLEBOOST",
|
||||
"DRAFTPOWER",
|
||||
"DRAFTLEEWAY",
|
||||
"LASTDRAFT",
|
||||
"BOOSTANGLE",
|
||||
"AIZDRIFTSTRAT",
|
||||
"BRAKEDRIFT",
|
||||
|
||||
"ITEMROULETTE",
|
||||
"ROULETTETYPE",
|
||||
|
||||
"ITEMTYPE",
|
||||
"ITEMAMOUNT",
|
||||
"ITEMHELD",
|
||||
"HOLDREADY",
|
||||
|
||||
"CURSHIELD",
|
||||
"HYUDOROTIMER",
|
||||
"STEALINGTIMER",
|
||||
"STOLENTIMER",
|
||||
"SUPERRING",
|
||||
"SNEAKERTIMER",
|
||||
"NUMSNEAKERS",
|
||||
"GROWSHRINKTIMER",
|
||||
"SQUISHEDTIMER",
|
||||
"ROCKETSNEAKERTIMER",
|
||||
"INVINCIBILITYTIMER",
|
||||
"BUBBLECOOL",
|
||||
"BUBBLEBLOWUP",
|
||||
"FLAMEDASH",
|
||||
"FLAMEMETER",
|
||||
"FLAMELENGTH",
|
||||
"EGGMANHELD",
|
||||
"EGGMANEXPLODE",
|
||||
"EGGMANBLAME",
|
||||
"LASTJAWZTARGET",
|
||||
"BANANADRAG",
|
||||
"SPINOUTTIMER",
|
||||
"WIPEOUTSLOW",
|
||||
"JUSTBUMPED",
|
||||
"COMEBACKTIMER",
|
||||
"SADTIMER",
|
||||
|
||||
"BUMPER",
|
||||
"COMEBACKPOINTS",
|
||||
"COMEBACKMODE",
|
||||
"WANTED",
|
||||
|
||||
"GETSPARKS",
|
||||
"JAWZTARGETDELAY",
|
||||
"SPECTATEWAIT",
|
||||
"TIREGREASE",
|
||||
"SPRINGSTARS",
|
||||
"SPRINGCOLOR",
|
||||
"KILLFIELD",
|
||||
"WRONGWAY"
|
||||
};
|
||||
|
||||
const char *const KARTHUD_LIST[] = {
|
||||
"ITEMBLINK",
|
||||
"ITEMBLINKMODE",
|
||||
|
|
@ -6605,33 +6482,6 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"PRECIP_STORM_NORAIN",PRECIP_STORM_NORAIN},
|
||||
{"PRECIP_STORM_NOSTRIKES",PRECIP_STORM_NOSTRIKES},
|
||||
|
||||
// Shields
|
||||
{"SH_NONE",SH_NONE},
|
||||
// Shield flags
|
||||
{"SH_PROTECTFIRE",SH_PROTECTFIRE},
|
||||
{"SH_PROTECTWATER",SH_PROTECTWATER},
|
||||
{"SH_PROTECTELECTRIC",SH_PROTECTELECTRIC},
|
||||
{"SH_PROTECTSPIKE",SH_PROTECTSPIKE},
|
||||
// Indivisible shields
|
||||
{"SH_PITY",SH_PITY},
|
||||
{"SH_WHIRLWIND",SH_WHIRLWIND},
|
||||
{"SH_ARMAGEDDON",SH_ARMAGEDDON},
|
||||
{"SH_PINK",SH_PINK},
|
||||
// normal shields that use flags
|
||||
{"SH_ATTRACT",SH_ATTRACT},
|
||||
{"SH_ELEMENTAL",SH_ELEMENTAL},
|
||||
// Sonic 3 shields
|
||||
{"SH_FLAMEAURA",SH_FLAMEAURA},
|
||||
{"SH_BUBBLEWRAP",SH_BUBBLEWRAP},
|
||||
{"SH_THUNDERCOIN",SH_THUNDERCOIN},
|
||||
// The force shield uses the lower 8 bits to count how many extra hits are left.
|
||||
{"SH_FORCE",SH_FORCE},
|
||||
{"SH_FORCEHP",SH_FORCEHP}, // to be used as a bitmask only
|
||||
// Mostly for use with Mario mode.
|
||||
{"SH_FIREFLOWER",SH_FIREFLOWER},
|
||||
{"SH_STACK",SH_STACK},
|
||||
{"SH_NOSTACK",SH_NOSTACK},
|
||||
|
||||
// Carrying
|
||||
{"CR_NONE",CR_NONE},
|
||||
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
|
||||
|
|
@ -6640,10 +6490,6 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"SF_HIRES",SF_HIRES},
|
||||
{"SF_MACHINE",SF_MACHINE},
|
||||
|
||||
// Dashmode constants
|
||||
{"DASHMODE_THRESHOLD",DASHMODE_THRESHOLD},
|
||||
{"DASHMODE_MAX",DASHMODE_MAX},
|
||||
|
||||
// Sound flags
|
||||
{"SF_TOTALLYSINGLE",SF_TOTALLYSINGLE},
|
||||
{"SF_NOMULTIPLESOUND",SF_NOMULTIPLESOUND},
|
||||
|
|
@ -6999,6 +6845,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"TC_RAINBOW",TC_RAINBOW},
|
||||
{"TC_BLINK",TC_BLINK},
|
||||
{"TC_DASHMODE",TC_DASHMODE},
|
||||
{"TC_HITLAG",TC_HITLAG},
|
||||
|
||||
// marathonmode flags
|
||||
{"MA_INIT",MA_INIT},
|
||||
|
|
@ -7079,7 +6926,6 @@ void DEH_TableCheck(void)
|
|||
#if defined(_DEBUG) || defined(PARANOIA)
|
||||
const size_t dehstates = sizeof(STATE_LIST)/sizeof(const char*);
|
||||
const size_t dehmobjs = sizeof(MOBJTYPE_LIST)/sizeof(const char*);
|
||||
const size_t dehpowers = sizeof(POWERS_LIST)/sizeof(const char*);
|
||||
const size_t dehcolors = sizeof(COLOR_ENUMS)/sizeof(const char*);
|
||||
|
||||
if (dehstates != S_FIRSTFREESLOT)
|
||||
|
|
@ -7088,9 +6934,6 @@ void DEH_TableCheck(void)
|
|||
if (dehmobjs != MT_FIRSTFREESLOT)
|
||||
I_Error("You forgot to update the Dehacked mobjtype list, you dolt!\n(%d mobj types defined, versus %s in the Dehacked list)\n", MT_FIRSTFREESLOT, sizeu1(dehmobjs));
|
||||
|
||||
if (dehpowers != NUMPOWERS)
|
||||
I_Error("You forgot to update the Dehacked powers list, you dolt!\n(%d powers defined, versus %s in the Dehacked list)\n", NUMPOWERS, sizeu1(dehpowers));
|
||||
|
||||
if (dehcolors != SKINCOLOR_FIRSTFREESLOT)
|
||||
I_Error("You forgot to update the Dehacked colors list, you dolt!\n(%d colors defined, versus %s in the Dehacked list)\n", SKINCOLOR_FIRSTFREESLOT, sizeu1(dehcolors));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ extern const char *const GAMETYPERULE_LIST[];
|
|||
extern const char *const ML_LIST[16]; // Linedef flags
|
||||
extern const char *COLOR_ENUMS[];
|
||||
extern const char *const POWERS_LIST[];
|
||||
extern const char *const KARTSTUFF_LIST[];
|
||||
extern const char *const KARTHUD_LIST[];
|
||||
extern const char *const HUDITEMS_LIST[];
|
||||
extern const char *const MENUTYPES_LIST[];
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ typedef struct
|
|||
extern mapheader_t* mapheaderinfo[NUMMAPS];
|
||||
|
||||
// This could support more, but is that a good idea?
|
||||
// Keep in mind that it may encourage people making overly long cups just because they "can", and would be a waste of memory.
|
||||
// Keep in mind that it may encourage people making overly long cups just because they "can", and would be a waste of memory.
|
||||
#define MAXLEVELLIST 5
|
||||
|
||||
typedef struct cupheader_s
|
||||
|
|
@ -465,7 +465,7 @@ enum GameTypeRules
|
|||
GTR_BUMPERS = 1<<3, // Enables the bumper health system
|
||||
GTR_SPHERES = 1<<4, // Replaces rings with blue spheres
|
||||
GTR_PAPERITEMS = 1<<5, // Replaces item boxes with paper item spawners
|
||||
GTR_WANTED = 1<<6, // Enables the wanted anti-camping system
|
||||
GTR_WANTED = 1<<6, // unused
|
||||
GTR_KARMA = 1<<7, // Enables the Karma system if you're out of bumpers
|
||||
GTR_ITEMARROWS = 1<<8, // Show item box arrows above players
|
||||
GTR_CAPSULES = 1<<9, // Enables the wanted anti-camping system
|
||||
|
|
@ -655,8 +655,6 @@ extern UINT8 useBlackRock;
|
|||
|
||||
extern UINT8 use1upSound;
|
||||
extern UINT8 maxXtraLife; // Max extra lives from rings
|
||||
extern UINT8 useContinues;
|
||||
#define continuesInSession (!multiplayer && (ultimatemode || (useContinues && !marathonmode) || (!modeattacking && !(cursaveslot > 0))))
|
||||
|
||||
extern mobj_t *hunt1, *hunt2, *hunt3; // Emerald hunt locations
|
||||
|
||||
|
|
|
|||
|
|
@ -2909,7 +2909,7 @@ void F_TextPromptDrawer(void)
|
|||
}
|
||||
|
||||
#define nocontrolallowed(j) {\
|
||||
players[j].powers[pw_nocontrol] = 1;\
|
||||
players[j].nocontrol = 1;\
|
||||
if (players[j].mo)\
|
||||
{\
|
||||
if (players[j].mo->state == states+S_KART_STILL && players[j].mo->tics != -1)\
|
||||
|
|
@ -2980,7 +2980,7 @@ void F_TextPromptTicker(void)
|
|||
{
|
||||
UINT8 j;
|
||||
|
||||
players[i].powers[pw_nocontrol] = 1;
|
||||
players[i].nocontrol = 1;
|
||||
|
||||
// Both players' controls are locked,
|
||||
// But only the triggering player can advance the prompt.
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ extern INT32 lastwipetic;
|
|||
|
||||
// Don't know where else to place this constant
|
||||
// But this file seems appropriate
|
||||
#define PRELEVELTIME 24 // frames in tics
|
||||
#define PRELEVELTIME TICRATE // frames in tics
|
||||
|
||||
void F_WipeStartScreen(void);
|
||||
void F_WipeEndScreen(void);
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ void F_WipeStageTitle(void)
|
|||
if ((WipeStageTitle) && G_IsTitleCardAvailable())
|
||||
{
|
||||
ST_runTitleCard();
|
||||
ST_drawWipeTitleCard();
|
||||
ST_drawTitleCard();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
57
src/g_demo.c
57
src/g_demo.c
|
|
@ -347,6 +347,7 @@ void G_ReadDemoExtraData(void)
|
|||
players[p].pflags &= ~(PF_KICKSTARTACCEL);
|
||||
if (extradata & 1)
|
||||
players[p].pflags |= PF_KICKSTARTACCEL;
|
||||
//CONS_Printf("weaponpref is %d for player %d\n", extradata, p);
|
||||
}
|
||||
|
||||
p = READUINT8(demo_p);
|
||||
|
|
@ -505,7 +506,7 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
|
|||
if (ziptic & ZT_LATENCY)
|
||||
oldcmd[playernum].latency = READUINT8(demo_p);
|
||||
if (ziptic & ZT_FLAGS)
|
||||
oldcmd[playernum].latency = READUINT8(demo_p);
|
||||
oldcmd[playernum].flags = READUINT8(demo_p);
|
||||
|
||||
G_CopyTiccmd(cmd, &oldcmd[playernum], 1);
|
||||
|
||||
|
|
@ -620,7 +621,7 @@ void G_GhostAddHit(INT32 playernum, mobj_t *victim)
|
|||
ghostext[playernum].flags |= EZT_HIT;
|
||||
ghostext[playernum].hits++;
|
||||
ghostext[playernum].hitlist = Z_Realloc(ghostext[playernum].hitlist, ghostext[playernum].hits * sizeof(mobj_t *), PU_LEVEL, NULL);
|
||||
ghostext[playernum].hitlist[ghostext[playernum].hits-1] = victim;
|
||||
P_SetTarget(ghostext[playernum].hitlist + (ghostext[playernum].hits-1), victim);
|
||||
}
|
||||
|
||||
void G_WriteAllGhostTics(void)
|
||||
|
|
@ -748,15 +749,15 @@ void G_WriteGhostTic(mobj_t *ghost, INT32 playernum)
|
|||
}
|
||||
|
||||
if (ghost->player && (
|
||||
ghostext[playernum].kartitem != ghost->player->kartstuff[k_itemtype] ||
|
||||
ghostext[playernum].kartamount != ghost->player->kartstuff[k_itemamount] ||
|
||||
ghostext[playernum].kartbumpers != ghost->player->kartstuff[k_bumper]
|
||||
ghostext[playernum].kartitem != ghost->player->itemtype ||
|
||||
ghostext[playernum].kartamount != ghost->player->itemamount ||
|
||||
ghostext[playernum].kartbumpers != ghost->player->bumpers
|
||||
))
|
||||
{
|
||||
ghostext[playernum].flags |= EZT_KART;
|
||||
ghostext[playernum].kartitem = ghost->player->kartstuff[k_itemtype];
|
||||
ghostext[playernum].kartamount = ghost->player->kartstuff[k_itemamount];
|
||||
ghostext[playernum].kartbumpers = ghost->player->kartstuff[k_bumper];
|
||||
ghostext[playernum].kartitem = ghost->player->itemtype;
|
||||
ghostext[playernum].kartamount = ghost->player->itemamount;
|
||||
ghostext[playernum].kartbumpers = ghost->player->bumpers;
|
||||
}
|
||||
|
||||
if (ghostext[playernum].flags)
|
||||
|
|
@ -792,6 +793,7 @@ void G_WriteGhostTic(mobj_t *ghost, INT32 playernum)
|
|||
WRITEFIXED(demo_p,mo->y);
|
||||
WRITEFIXED(demo_p,mo->z);
|
||||
WRITEANGLE(demo_p,mo->angle);
|
||||
P_SetTarget(ghostext[playernum].hitlist+i, NULL);
|
||||
}
|
||||
Z_Free(ghostext[playernum].hitlist);
|
||||
ghostext[playernum].hits = 0;
|
||||
|
|
@ -1035,17 +1037,17 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
else
|
||||
ghostext[playernum].desyncframes = 0;
|
||||
|
||||
if (players[playernum].kartstuff[k_itemtype] != ghostext[playernum].kartitem
|
||||
|| players[playernum].kartstuff[k_itemamount] != ghostext[playernum].kartamount
|
||||
|| players[playernum].kartstuff[k_bumper] != ghostext[playernum].kartbumpers)
|
||||
if (players[playernum].itemtype != ghostext[playernum].kartitem
|
||||
|| players[playernum].itemamount != ghostext[playernum].kartamount
|
||||
|| players[playernum].bumpers != ghostext[playernum].kartbumpers)
|
||||
{
|
||||
if (demosynced)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
|
||||
demosynced = false;
|
||||
|
||||
players[playernum].kartstuff[k_itemtype] = ghostext[playernum].kartitem;
|
||||
players[playernum].kartstuff[k_itemamount] = ghostext[playernum].kartamount;
|
||||
players[playernum].kartstuff[k_bumper] = ghostext[playernum].kartbumpers;
|
||||
players[playernum].itemtype = ghostext[playernum].kartitem;
|
||||
players[playernum].itemamount = ghostext[playernum].kartamount;
|
||||
players[playernum].bumpers = ghostext[playernum].kartbumpers;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1402,7 +1404,7 @@ void G_StoreRewindInfo(void)
|
|||
void G_PreviewRewind(tic_t previewtime)
|
||||
{
|
||||
SINT8 i;
|
||||
size_t j;
|
||||
//size_t j;
|
||||
fixed_t tweenvalue = 0;
|
||||
rewindinfo_t *info = rewindhead, *next_info = rewindhead;
|
||||
|
||||
|
|
@ -1461,8 +1463,9 @@ void G_PreviewRewind(tic_t previewtime)
|
|||
players[i].mo->hitlag = info->playerinfo[i].mobj.hitlag;
|
||||
|
||||
players[i].realtime = info->playerinfo[i].player.realtime;
|
||||
for (j = 0; j < NUMKARTSTUFF; j++)
|
||||
players[i].kartstuff[j] = info->playerinfo[i].player.kartstuff[j];
|
||||
// Genuinely CANNOT be fucked. I can redo lua and I can redo netsaves but I draw the line at this abysmal hack.
|
||||
/*for (j = 0; j < NUMKARTSTUFF; j++)
|
||||
players[i].kartstuff[j] = info->playerinfo[i].player.kartstuff[j];*/
|
||||
}
|
||||
|
||||
for (i = splitscreen; i >= 0; i--)
|
||||
|
|
@ -2655,7 +2658,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
UINT32 randseed;
|
||||
char msg[1024];
|
||||
|
||||
boolean spectator;
|
||||
boolean spectator, kickstart;
|
||||
UINT8 slots[MAXPLAYERS], kartspeed[MAXPLAYERS], kartweight[MAXPLAYERS], numslots = 0;
|
||||
|
||||
#if defined(SKIPERRORS) && !defined(DEVELOP)
|
||||
|
|
@ -2924,16 +2927,8 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
|
||||
while (p != 0xFF)
|
||||
{
|
||||
players[p].pflags &= ~PF_KICKSTARTACCEL;
|
||||
if (p & DEMO_KICKSTART)
|
||||
if ((spectator = (p & DEMO_SPECTATOR)))
|
||||
{
|
||||
players[p].pflags |= PF_KICKSTARTACCEL;
|
||||
p &= ~DEMO_KICKSTART;
|
||||
}
|
||||
spectator = false;
|
||||
if (p & DEMO_SPECTATOR)
|
||||
{
|
||||
spectator = true;
|
||||
p &= ~DEMO_SPECTATOR;
|
||||
|
||||
if (modeattacking)
|
||||
|
|
@ -2948,6 +2943,10 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((kickstart = (p & DEMO_KICKSTART)))
|
||||
p &= ~DEMO_KICKSTART;
|
||||
|
||||
slots[numslots] = p; numslots++;
|
||||
|
||||
if (modeattacking && numslots > 1)
|
||||
|
|
@ -2967,6 +2966,10 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
|
||||
playeringame[p] = true;
|
||||
players[p].spectator = spectator;
|
||||
if (kickstart)
|
||||
players[p].pflags |= PF_KICKSTARTACCEL;
|
||||
else
|
||||
players[p].pflags &= ~PF_KICKSTARTACCEL;
|
||||
|
||||
// Name
|
||||
M_Memcpy(player_names[p],demo_p,16);
|
||||
|
|
|
|||
187
src/g_game.c
187
src/g_game.c
|
|
@ -270,7 +270,6 @@ INT32 flameseg = TICRATE/4;
|
|||
|
||||
UINT8 use1upSound = 0;
|
||||
UINT8 maxXtraLife = 2; // Max extra lives from rings
|
||||
UINT8 useContinues = 0; // Set to 1 to enable continues outside of no-save scenarioes
|
||||
|
||||
UINT8 introtoplay;
|
||||
UINT8 creditscutscene;
|
||||
|
|
@ -545,7 +544,7 @@ static void G_UpdateRecordReplays(void)
|
|||
if (!mainrecords[gamemap-1])
|
||||
G_AllocMainRecordData(gamemap-1);
|
||||
|
||||
if (players[consoleplayer].pflags & PF_GAMETYPEOVER)
|
||||
if (players[consoleplayer].pflags & PF_NOCONTEST)
|
||||
{
|
||||
players[consoleplayer].realtime = UINT32_MAX;
|
||||
}
|
||||
|
|
@ -1112,7 +1111,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
|
||||
cmd->forwardmove += (SINT8)forward;
|
||||
|
||||
cmd->latency = (leveltime & 0xFF); // Send leveltime when this tic was generated to the server for control lag calculations
|
||||
cmd->flags = 0;
|
||||
|
||||
if (chat_on || CON_Ready())
|
||||
|
|
@ -1138,6 +1136,10 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
if (addedtogame && gamestate == GS_LEVEL)
|
||||
{
|
||||
LUAh_PlayerCmd(player, cmd);
|
||||
|
||||
// Send leveltime when this tic was generated to the server for control lag calculations.
|
||||
// Only do this when in a level. Also do this after the hook, so that it can't overwrite this.
|
||||
cmd->latency = (leveltime & 0xFF);
|
||||
}
|
||||
|
||||
if (cmd->forwardmove > MAXPLMOVE)
|
||||
|
|
@ -1261,7 +1263,7 @@ void G_DoLoadLevel(boolean resetplayer)
|
|||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (camera[i].chase)
|
||||
P_ResetCamera(&players[g_localplayers[i]], &camera[i]);
|
||||
P_ResetCamera(&players[displayplayers[i]], &camera[i]);
|
||||
}
|
||||
|
||||
// clear cmd building stuff
|
||||
|
|
@ -1299,7 +1301,7 @@ void G_StartTitleCard(void)
|
|||
ST_startTitleCard();
|
||||
|
||||
// start the title card
|
||||
WipeStageTitle = false; //(!titlemapinaction); -- temporary until titlecards are reworked
|
||||
WipeStageTitle = (!titlemapinaction);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -1308,26 +1310,27 @@ void G_StartTitleCard(void)
|
|||
void G_PreLevelTitleCard(void)
|
||||
{
|
||||
#ifndef NOWIPE
|
||||
tic_t strtime = I_GetTime();
|
||||
tic_t endtime = strtime + (PRELEVELTIME*NEWTICRATERATIO);
|
||||
tic_t nowtime = strtime;
|
||||
tic_t lasttime = strtime;
|
||||
while (nowtime < endtime)
|
||||
{
|
||||
// draw loop
|
||||
while (!((nowtime = I_GetTime()) - lasttime))
|
||||
I_Sleep();
|
||||
lasttime = nowtime;
|
||||
tic_t strtime = I_GetTime();
|
||||
tic_t endtime = strtime + (PRELEVELTIME*NEWTICRATERATIO);
|
||||
tic_t nowtime = strtime;
|
||||
tic_t lasttime = strtime;
|
||||
while (nowtime < endtime)
|
||||
{
|
||||
// draw loop
|
||||
ST_runTitleCard();
|
||||
ST_preLevelTitleCardDrawer();
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
NetKeepAlive(); // Prevent timeouts
|
||||
|
||||
ST_runTitleCard();
|
||||
ST_preLevelTitleCardDrawer();
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
if (moviemode)
|
||||
M_SaveFrame();
|
||||
if (takescreenshot) // Only take screenshots after drawing.
|
||||
M_DoScreenShot();
|
||||
|
||||
if (moviemode)
|
||||
M_SaveFrame();
|
||||
if (takescreenshot) // Only take screenshots after drawing.
|
||||
M_DoScreenShot();
|
||||
}
|
||||
while (!((nowtime = I_GetTime()) - lasttime))
|
||||
I_Sleep();
|
||||
lasttime = nowtime;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -1617,7 +1620,7 @@ boolean G_CouldView(INT32 playernum)
|
|||
// SRB2Kart: Only go through players who are actually playing
|
||||
if (player->exiting)
|
||||
return false;
|
||||
if (( player->pflags & PF_GAMETYPEOVER ))
|
||||
if (( player->pflags & PF_NOCONTEST ))
|
||||
return false;
|
||||
|
||||
// I don't know if we want this actually, but I'll humor the suggestion anyway
|
||||
|
|
@ -2033,9 +2036,6 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
|
||||
p = &players[player];
|
||||
|
||||
memset(p->powers, 0, sizeof (p->powers));
|
||||
memset(p->kartstuff, 0, sizeof (p->kartstuff)); // SRB2kart
|
||||
|
||||
p->mo->renderflags &= ~(RF_TRANSMASK|RF_BRIGHTMASK); // cancel invisibility
|
||||
P_FlashPal(p, 0, 0); // Resets
|
||||
|
||||
|
|
@ -2064,10 +2064,8 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||
{
|
||||
player_t *p;
|
||||
INT32 score, marescore;
|
||||
INT32 score, roundscore;
|
||||
INT32 lives;
|
||||
boolean lostlife;
|
||||
INT32 continues;
|
||||
|
||||
UINT8 kartspeed;
|
||||
UINT8 kartweight;
|
||||
|
|
@ -2082,15 +2080,12 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
|
||||
INT32 pflags;
|
||||
|
||||
INT32 ctfteam;
|
||||
UINT8 ctfteam;
|
||||
|
||||
INT32 starpostnum;
|
||||
INT32 exiting;
|
||||
tic_t dashmode;
|
||||
INT16 numboxes;
|
||||
INT16 totalring;
|
||||
UINT8 laps;
|
||||
UINT8 mare;
|
||||
UINT16 skincolor;
|
||||
INT32 skin;
|
||||
UINT32 availabilities;
|
||||
|
|
@ -2121,20 +2116,14 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
INT32 roulettetype;
|
||||
INT32 growshrinktimer;
|
||||
INT32 bumper;
|
||||
INT32 wanted;
|
||||
boolean songcredit = false;
|
||||
boolean eliminated;
|
||||
UINT16 nocontrol;
|
||||
INT32 khudfault;
|
||||
INT32 kickstartaccel;
|
||||
|
||||
score = players[player].score;
|
||||
marescore = players[player].marescore;
|
||||
lives = players[player].lives;
|
||||
lostlife = players[player].lostlife;
|
||||
continues = players[player].continues;
|
||||
ctfteam = players[player].ctfteam;
|
||||
exiting = players[player].exiting;
|
||||
|
||||
jointime = players[player].jointime;
|
||||
quittime = players[player].quittime;
|
||||
|
|
@ -2142,21 +2131,9 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
splitscreenindex = players[player].splitscreenindex;
|
||||
spectator = players[player].spectator;
|
||||
|
||||
pflags = (players[player].pflags & (PF_WANTSTOJOIN|PF_GAMETYPEOVER|PF_FAULT|PF_KICKSTARTACCEL));
|
||||
|
||||
steering = players[player].steering;
|
||||
playerangleturn = players[player].angleturn;
|
||||
|
||||
// As long as we're not in multiplayer, carry over cheatcodes from map to map
|
||||
if (!(netgame || multiplayer))
|
||||
pflags |= (players[player].pflags & (PF_GODMODE|PF_NOCLIP|PF_INVIS));
|
||||
|
||||
dashmode = players[player].dashmode;
|
||||
|
||||
numboxes = players[player].numboxes;
|
||||
laps = players[player].laps;
|
||||
totalring = players[player].totalring;
|
||||
|
||||
skincolor = players[player].skincolor;
|
||||
skin = players[player].skin;
|
||||
|
||||
|
|
@ -2164,7 +2141,6 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
kartspeed = players[player].kartspeed;
|
||||
kartweight = players[player].kartweight;
|
||||
|
||||
follower = players[player].follower;
|
||||
followerready = players[player].followerready;
|
||||
followercolor = players[player].followercolor;
|
||||
followerskin = players[player].followerskin;
|
||||
|
|
@ -2173,20 +2149,18 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
|
||||
charflags = players[player].charflags;
|
||||
|
||||
starpostnum = players[player].starpostnum;
|
||||
followitem = players[player].followitem;
|
||||
|
||||
mare = players[player].mare;
|
||||
bot = players[player].bot;
|
||||
botdifficulty = players[player].botvars.difficulty;
|
||||
|
||||
botdiffincrease = players[player].botvars.diffincrease;
|
||||
botrival = players[player].botvars.rival;
|
||||
|
||||
xtralife = players[player].xtralife;
|
||||
pflags = (players[player].pflags & (PF_WANTSTOJOIN|PF_KICKSTARTACCEL));
|
||||
|
||||
// SRB2kart
|
||||
if (betweenmaps || leveltime < starttime)
|
||||
if (betweenmaps || leveltime < introtime)
|
||||
{
|
||||
itemroulette = 0;
|
||||
roulettetype = 0;
|
||||
|
|
@ -2196,47 +2170,64 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
bumper = ((gametyperules & GTR_BUMPERS) ? K_StartingBumperCount() : 0);
|
||||
rings = ((gametyperules & GTR_SPHERES) ? 0 : 5);
|
||||
spheres = 0;
|
||||
eliminated = false;
|
||||
wanted = 0;
|
||||
kickstartaccel = 0;
|
||||
khudfault = nocontrol = 0;
|
||||
laps = 0;
|
||||
totalring = 0;
|
||||
roundscore = 0;
|
||||
exiting = 0;
|
||||
starpostnum = 0;
|
||||
xtralife = 0;
|
||||
|
||||
follower = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemroulette = (players[player].kartstuff[k_itemroulette] > 0 ? 1 : 0);
|
||||
roulettetype = players[player].kartstuff[k_roulettetype];
|
||||
itemroulette = (players[player].itemroulette > 0 ? 1 : 0);
|
||||
roulettetype = players[player].roulettetype;
|
||||
|
||||
if (players[player].kartstuff[k_itemheld])
|
||||
if (players[player].pflags & PF_ITEMOUT)
|
||||
{
|
||||
itemtype = 0;
|
||||
itemamount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemtype = players[player].kartstuff[k_itemtype];
|
||||
itemamount = players[player].kartstuff[k_itemamount];
|
||||
itemtype = players[player].itemtype;
|
||||
itemamount = players[player].itemamount;
|
||||
}
|
||||
|
||||
// Keep Shrink status, remove Grow status
|
||||
if (players[player].kartstuff[k_growshrinktimer] < 0)
|
||||
growshrinktimer = players[player].kartstuff[k_growshrinktimer];
|
||||
if (players[player].growshrinktimer < 0)
|
||||
growshrinktimer = players[player].growshrinktimer;
|
||||
else
|
||||
growshrinktimer = 0;
|
||||
|
||||
bumper = players[player].bumpers;
|
||||
rings = players[player].rings;
|
||||
spheres = players[player].spheres;
|
||||
eliminated = players[player].eliminated;
|
||||
wanted = players[player].kartstuff[k_wanted];
|
||||
kickstartaccel = players[player].kickstartaccel;
|
||||
|
||||
khudfault = players[player].karthud[khud_fault];
|
||||
nocontrol = players[player].nocontrol;
|
||||
|
||||
laps = players[player].laps;
|
||||
totalring = players[player].totalring;
|
||||
roundscore = players[player].roundscore;
|
||||
exiting = players[player].exiting;
|
||||
starpostnum = players[player].starpostnum;
|
||||
|
||||
xtralife = players[player].xtralife;
|
||||
|
||||
follower = players[player].follower;
|
||||
|
||||
pflags |= (players[player].pflags & (PF_STASIS|PF_ELIMINATED|PF_NOCONTEST|PF_FAULT|PF_LOSTLIFE));
|
||||
}
|
||||
|
||||
if (!betweenmaps)
|
||||
{
|
||||
khudfault = players[player].karthud[khud_fault];
|
||||
nocontrol = players[player].powers[pw_nocontrol];
|
||||
}
|
||||
else
|
||||
khudfault = nocontrol = 0;
|
||||
// As long as we're not in multiplayer, carry over cheatcodes from map to map
|
||||
if (!(netgame || multiplayer))
|
||||
pflags |= (players[player].pflags & (PF_GODMODE|PF_NOCLIP));
|
||||
|
||||
|
||||
// Obliterate follower from existence
|
||||
P_SetTarget(&players[player].follower, NULL);
|
||||
|
|
@ -2247,10 +2238,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
memset(p, 0, sizeof (*p));
|
||||
|
||||
p->score = score;
|
||||
p->marescore = marescore;
|
||||
p->roundscore = roundscore;
|
||||
p->lives = lives;
|
||||
p->lostlife = lostlife;
|
||||
p->continues = continues;
|
||||
p->pflags = pflags;
|
||||
p->ctfteam = ctfteam;
|
||||
p->jointime = jointime;
|
||||
|
|
@ -2273,13 +2262,9 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
p->starpostnum = starpostnum;
|
||||
p->exiting = exiting;
|
||||
|
||||
p->dashmode = dashmode;
|
||||
|
||||
p->numboxes = numboxes;
|
||||
p->laps = laps;
|
||||
p->totalring = totalring;
|
||||
|
||||
p->mare = mare;
|
||||
p->bot = bot;
|
||||
p->botvars.difficulty = botdifficulty;
|
||||
p->rings = rings;
|
||||
|
|
@ -2289,20 +2274,20 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
p->xtralife = xtralife;
|
||||
|
||||
// SRB2kart
|
||||
p->kartstuff[k_itemroulette] = itemroulette;
|
||||
p->kartstuff[k_roulettetype] = roulettetype;
|
||||
p->kartstuff[k_itemtype] = itemtype;
|
||||
p->kartstuff[k_itemamount] = itemamount;
|
||||
p->kartstuff[k_growshrinktimer] = growshrinktimer;
|
||||
p->itemroulette = itemroulette;
|
||||
p->roulettetype = roulettetype;
|
||||
p->itemtype = itemtype;
|
||||
p->itemamount = itemamount;
|
||||
p->growshrinktimer = growshrinktimer;
|
||||
p->bumpers = bumper;
|
||||
p->karmadelay = comebacktime;
|
||||
p->eliminated = eliminated;
|
||||
p->kartstuff[k_wanted] = wanted;
|
||||
p->kartstuff[k_eggmanblame] = -1;
|
||||
p->kartstuff[k_lastdraft] = -1;
|
||||
p->overtimekarma = 0;
|
||||
p->eggmanblame = -1;
|
||||
p->lastdraft = -1;
|
||||
p->karthud[khud_fault] = khudfault;
|
||||
p->powers[pw_nocontrol] = nocontrol;
|
||||
p->nocontrol = nocontrol;
|
||||
p->kickstartaccel = kickstartaccel;
|
||||
p->tripWireState = TRIP_NONE;
|
||||
|
||||
memcpy(&p->respawn, &respawn, sizeof (p->respawn));
|
||||
|
||||
|
|
@ -2866,7 +2851,7 @@ UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
|||
// Race
|
||||
GTR_CIRCUIT|GTR_BOTS,
|
||||
// Battle
|
||||
GTR_SPHERES|GTR_BUMPERS|GTR_PAPERITEMS|GTR_WANTED|GTR_KARMA|GTR_ITEMARROWS|GTR_CAPSULES|GTR_BATTLESTARTS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME
|
||||
GTR_SPHERES|GTR_BUMPERS|GTR_PAPERITEMS|GTR_KARMA|GTR_ITEMARROWS|GTR_CAPSULES|GTR_BATTLESTARTS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -3476,7 +3461,7 @@ static void G_DoCompleted(void)
|
|||
if (playeringame[i])
|
||||
{
|
||||
// SRB2Kart: exitlevel shouldn't get you the points
|
||||
if (!players[i].exiting && !(players[i].pflags & PF_GAMETYPEOVER))
|
||||
if (!players[i].exiting && !(players[i].pflags & PF_NOCONTEST))
|
||||
{
|
||||
if (players[i].bot)
|
||||
{
|
||||
|
|
@ -3484,7 +3469,7 @@ static void G_DoCompleted(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
players[i].pflags |= PF_GAMETYPEOVER;
|
||||
players[i].pflags |= PF_NOCONTEST;
|
||||
|
||||
if (P_IsLocalPlayer(&players[i]))
|
||||
{
|
||||
|
|
@ -3798,8 +3783,8 @@ static void G_DoContinued(void)
|
|||
I_Assert(!netgame && !multiplayer);
|
||||
I_Assert(pl->continues > 0);
|
||||
|
||||
if (pl->continues)
|
||||
pl->continues--;
|
||||
/*if (pl->continues)
|
||||
pl->continues--;*/
|
||||
|
||||
// Reset score
|
||||
pl->score = 0;
|
||||
|
|
@ -4467,16 +4452,12 @@ void G_InitNew(UINT8 pencoremode, const char *mapname, boolean resetplayer, bool
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
players[i].playerstate = PST_REBORN;
|
||||
players[i].starpostnum = 0;
|
||||
memset(&players[i].respawn, 0, sizeof (players[i].respawn));
|
||||
|
||||
// The latter two should clear by themselves, but just in case
|
||||
players[i].pflags &= ~(PF_GAMETYPEOVER|PF_STASIS|PF_FAULT);
|
||||
|
||||
// Clear cheatcodes too, just in case.
|
||||
players[i].pflags &= ~(PF_GODMODE|PF_NOCLIP|PF_INVIS);
|
||||
players[i].pflags &= ~(PF_GODMODE|PF_NOCLIP);
|
||||
|
||||
players[i].marescore = 0;
|
||||
players[i].roundscore = 0;
|
||||
|
||||
if (resetplayer && !(multiplayer && demo.playback)) // SRB2Kart
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ G_ResetSplitscreen (INT32 playernum)
|
|||
displayplayers[i] = g_localplayers[i];
|
||||
P_ResetCamera(&players[displayplayers[i]], &camera[i]);
|
||||
}
|
||||
|
||||
while (i < MAXSPLITSCREENPLAYERS)
|
||||
{
|
||||
displayplayers[i] = consoleplayer;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
|||
1
src/hardware/CMakeLists.txt
Normal file
1
src/hardware/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
target_sourcefile(c)
|
||||
13
src/hardware/Sourcefile
Normal file
13
src/hardware/Sourcefile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
hw_bsp.c
|
||||
hw_draw.c
|
||||
hw_light.c
|
||||
hw_main.c
|
||||
hw_clip.c
|
||||
hw_md2.c
|
||||
hw_cache.c
|
||||
hw_md2load.c
|
||||
hw_md3load.c
|
||||
hw_model.c
|
||||
u_list.c
|
||||
hw_batching.c
|
||||
r_opengl/r_opengl.c
|
||||
|
|
@ -1478,7 +1478,8 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
transnum_t transtable = R_GetLinedefTransTable(gl_linedef);
|
||||
if (transtable == NUMTRANSMAPS)
|
||||
transtable = 0;
|
||||
if (gl_linedef->special == 910)
|
||||
if (gl_linedef->special == 910 ||
|
||||
P_IsLineTripWire(gl_linedef))
|
||||
blend = AST_ADD;
|
||||
else if (gl_linedef->special == 911)
|
||||
blend = AST_SUBTRACT;
|
||||
|
|
@ -3643,7 +3644,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale)
|
|||
pslope_t *groundslope;
|
||||
|
||||
// hitlag vibrating
|
||||
if (thing->hitlag > 0)
|
||||
if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
fixed_t mul = thing->hitlag * (FRACUNIT / 10);
|
||||
|
||||
|
|
@ -4085,8 +4086,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||
gpatch = spr->gpatch;
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
if (!(spr->mobj->flags2 & MF2_DEBRIS) && (spr->mobj->sprite != SPR_PLAY ||
|
||||
(spr->mobj->player && spr->mobj->player->powers[pw_super])))
|
||||
if (!(spr->mobj->flags2 & MF2_DEBRIS) && (spr->mobj->sprite != SPR_PLAY))
|
||||
HWR_DL_AddLight(spr, gpatch);
|
||||
#endif
|
||||
|
||||
|
|
@ -5063,7 +5063,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
return;
|
||||
|
||||
// hitlag vibrating
|
||||
if (thing->hitlag > 0)
|
||||
if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
fixed_t mul = thing->hitlag * (FRACUNIT / 10);
|
||||
|
||||
|
|
@ -5402,7 +5402,11 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
vis->mobj = thing;
|
||||
|
||||
//Hurdler: 25/04/2000: now support colormap in hardware mode
|
||||
if ((vis->mobj->flags & (MF_ENEMY|MF_BOSS)) && (vis->mobj->flags2 & MF2_FRET) && !(vis->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash"
|
||||
if (vis->mobj->hitlag > 0 && (vis->mobj->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
vis->colormap = R_GetTranslationColormap(TC_HITLAG, 0, GTC_CACHE);
|
||||
}
|
||||
else if ((vis->mobj->flags & (MF_ENEMY|MF_BOSS)) && (vis->mobj->flags2 & MF2_FRET) && !(vis->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash"
|
||||
{
|
||||
if (vis->mobj->type == MT_CYBRAKDEMON || vis->mobj->colorized)
|
||||
vis->colormap = R_GetTranslationColormap(TC_ALLWHITE, 0, GTC_CACHE);
|
||||
|
|
|
|||
|
|
@ -819,7 +819,12 @@ static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMi
|
|||
|
||||
while (size--)
|
||||
{
|
||||
if (skinnum == TC_BOSS)
|
||||
if (skinnum == TC_HITLAG)
|
||||
{
|
||||
cur->s.red = cur->s.green = cur->s.blue = K_HitlagColorValue(*image);
|
||||
cur->s.alpha = image->s.alpha;
|
||||
}
|
||||
else if (skinnum == TC_BOSS)
|
||||
{
|
||||
// Turn everything below a certain threshold white
|
||||
if ((image->s.red == image->s.green) && (image->s.green == image->s.blue) && image->s.blue < 127)
|
||||
|
|
@ -1367,7 +1372,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
float finalscale;
|
||||
|
||||
// hitlag vibrating
|
||||
if (spr->mobj->hitlag > 0)
|
||||
if (spr->mobj->hitlag > 0 && (spr->mobj->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
fixed_t mul = spr->mobj->hitlag * (FRACUNIT / 10);
|
||||
|
||||
|
|
@ -1486,7 +1491,11 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
{
|
||||
INT32 skinnum = TC_DEFAULT;
|
||||
|
||||
if ((spr->mobj->flags & (MF_ENEMY|MF_BOSS)) && (spr->mobj->flags2 & MF2_FRET) && !(spr->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash"
|
||||
if (spr->mobj->hitlag > 0 && (spr->mobj->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
skinnum = TC_HITLAG;
|
||||
}
|
||||
else if ((spr->mobj->flags & (MF_ENEMY|MF_BOSS)) && (spr->mobj->flags2 & MF2_FRET) && !(spr->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash"
|
||||
{
|
||||
if (spr->mobj->type == MT_CYBRAKDEMON || spr->mobj->colorized)
|
||||
skinnum = TC_ALLWHITE;
|
||||
|
|
@ -1565,7 +1574,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
&& (spr->mobj->frame & FF_ANIMATE
|
||||
|| (spr->mobj->state->nextstate != S_NULL
|
||||
&& states[spr->mobj->state->nextstate].sprite == SPR_PLAY
|
||||
&& ((P_GetSkinSprite2(spr->mobj->skin, (((spr->mobj->player && spr->mobj->player->powers[pw_super]) ? FF_SPR2SUPER : 0)|states[spr->mobj->state->nextstate].frame) & FF_FRAMEMASK, spr->mobj->player) == spr->mobj->sprite2)))))
|
||||
&& ((P_GetSkinSprite2(spr->mobj->skin, (states[spr->mobj->state->nextstate].frame) & FF_FRAMEMASK, spr->mobj->player) == spr->mobj->sprite2)))))
|
||||
{
|
||||
nextFrame = (spr->mobj->frame & FF_FRAMEMASK) + 1;
|
||||
if (nextFrame >= mod)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue