mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge remote-tracking branch 'origin/master' into getmobjzmovement
This commit is contained in:
commit
e14af65d52
183 changed files with 6589 additions and 4437 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
|
||||
|
|
@ -119,8 +118,9 @@ set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
|
|||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(assets)
|
||||
|
||||
if(NOT ${SRB2_CONFIG_DEV_BUILD})
|
||||
add_subdirectory(assets)
|
||||
endif()
|
||||
|
||||
## config.h generation
|
||||
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
||||
|
|
|
|||
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
|
||||
|
|
@ -296,6 +41,8 @@ set(SRB2_CONFIG_YASM OFF CACHE BOOL
|
|||
"Use YASM in place of NASM.")
|
||||
set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
|
||||
"Use statically linked OpenGL. NOT RECOMMENDED.")
|
||||
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
|
||||
"Compile a development build of SRB2Kart.")
|
||||
|
||||
### use internal libraries?
|
||||
if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
|
||||
|
|
@ -303,92 +50,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 +66,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 +86,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 +109,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 +130,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 +152,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 +173,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 +196,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 +204,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 +237,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 +282,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
|
||||
endif()
|
||||
|
||||
add_definitions(-DCMAKECONFIG)
|
||||
if(${SRB2_CONFIG_DEV_BUILD})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DDEVELOP)
|
||||
endif()
|
||||
|
||||
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))
|
||||
114
src/Sourcefile
Normal file
114
src/Sourcefile
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
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_fps.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
|
||||
k_brightmap.c
|
||||
|
|
@ -88,6 +88,12 @@ tic_t I_GetTime(void)
|
|||
return (since_start*TICRATE)/1000000;
|
||||
}
|
||||
|
||||
fixed_t I_GetTimeFrac(void)
|
||||
{
|
||||
//stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
void I_Sleep(void){}
|
||||
|
||||
void I_GetEvent(void){}
|
||||
|
|
|
|||
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
|
||||
|
|
@ -1916,6 +1916,8 @@ void CON_SetLoadingProgress(con_loadprogress_t newStep)
|
|||
if (con_startup_loadprogress < LOADED_ISTARTUPGRAPHICS) // rendering not possible?
|
||||
return;
|
||||
CON_DrawLoadBar(); // here we display the console text
|
||||
I_OsPolling();
|
||||
I_UpdateNoBlit();
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
}
|
||||
|
||||
|
|
|
|||
112
src/d_clisrv.c
112
src/d_clisrv.c
|
|
@ -141,7 +141,7 @@ UINT8 adminpassmd5[16];
|
|||
boolean adminpasswordset = false;
|
||||
|
||||
// Client specific
|
||||
static ticcmd_t localcmds[MAXSPLITSCREENPLAYERS];
|
||||
static ticcmd_t localcmds[MAXSPLITSCREENPLAYERS][MAXGENTLEMENDELAY];
|
||||
static boolean cl_packetmissed;
|
||||
// here it is for the secondary local player (splitscreen)
|
||||
static UINT8 mynode; // my address pointofview server
|
||||
|
|
@ -440,10 +440,15 @@ static void D_Clearticcmd(tic_t tic)
|
|||
|
||||
void D_ResetTiccmds(void)
|
||||
{
|
||||
INT32 i;
|
||||
INT32 i, j;
|
||||
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
memset(&localcmds[i], 0, sizeof(ticcmd_t));
|
||||
{
|
||||
for (j = 0; j < MAXGENTLEMENDELAY; j++)
|
||||
{
|
||||
memset(&localcmds[i][j], 0, sizeof(ticcmd_t));
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the net command list
|
||||
for (i = 0; i < TEXTCMD_HASH_SIZE; i++)
|
||||
|
|
@ -790,10 +795,14 @@ static boolean CL_SendJoin(void)
|
|||
sizeof netbuffer->u.clientcfg.application);
|
||||
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
CleanupPlayerName(g_localplayers[i], cv_playername[i].zstring);
|
||||
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
// the MAXPLAYERS addition is necessary to communicate that g_localplayers is not yet safe to reference
|
||||
CleanupPlayerName(MAXPLAYERS+i, cv_playername[i].zstring);
|
||||
strncpy(netbuffer->u.clientcfg.names[i], cv_playername[i].zstring, MAXPLAYERNAME);
|
||||
}
|
||||
// privacy shield for the local players not joining this session
|
||||
for (; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
strncpy(netbuffer->u.clientcfg.names[i], va("Player %c", 'A' + i), MAXPLAYERNAME);
|
||||
|
||||
return HSendPacket(servernode, false, 0, sizeof (clientconfig_pak));
|
||||
}
|
||||
|
|
@ -1329,7 +1338,7 @@ static void CL_ReloadReceivedSavegame(void)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
LUA_InvalidatePlayer(&players[i]);
|
||||
sprintf(player_names[i], "Player %d", i + 1);
|
||||
sprintf(player_names[i], "Player %c", 'A' + i);
|
||||
}
|
||||
|
||||
CL_LoadReceivedSavegame(true);
|
||||
|
|
@ -2390,12 +2399,13 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
|||
|
||||
// remove avatar of player
|
||||
playeringame[playernum] = false;
|
||||
demo_extradata[playernum] |= DXD_PLAYSTATE;
|
||||
playernode[playernum] = UINT8_MAX;
|
||||
while (!playeringame[doomcom->numslots-1] && doomcom->numslots > 1)
|
||||
doomcom->numslots--;
|
||||
|
||||
// Reset the name
|
||||
sprintf(player_names[playernum], "Player %d", playernum+1);
|
||||
sprintf(player_names[playernum], "Player %c", 'A' + playernum);
|
||||
|
||||
player_name_changes[playernum] = 0;
|
||||
|
||||
|
|
@ -3207,7 +3217,7 @@ void SV_ResetServer(void)
|
|||
playeringame[i] = false;
|
||||
playernode[i] = UINT8_MAX;
|
||||
memset(playeraddress[i], 0, sizeof(*playeraddress));
|
||||
sprintf(player_names[i], "Player %d", i + 1);
|
||||
sprintf(player_names[i], "Player %c", 'A' + i);
|
||||
adminplayers[i] = -1; // Populate the entire adminplayers array with -1.
|
||||
K_ClearClientPowerLevels();
|
||||
splitscreen_invitations[i] = -1;
|
||||
|
|
@ -3406,7 +3416,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
|
||||
P_ForceLocalAngle(newplayer, newplayer->angleturn);
|
||||
|
||||
D_SendPlayerConfig();
|
||||
D_SendPlayerConfig(splitscreenplayer);
|
||||
addedtogame = true;
|
||||
|
||||
if (rejoined)
|
||||
|
|
@ -3552,14 +3562,13 @@ static void Got_AddBot(UINT8 **p, INT32 playernum)
|
|||
LUAh_PlayerJoin(newplayernum);
|
||||
}
|
||||
|
||||
static boolean SV_AddWaitingPlayers(const char *name, const char *name2, const char *name3, const char *name4)
|
||||
static boolean SV_AddWaitingPlayers(SINT8 node, const char *name, const char *name2, const char *name3, const char *name4)
|
||||
{
|
||||
INT32 node, n, newplayer = false;
|
||||
INT32 n, newplayernum;
|
||||
UINT8 buf[4 + MAXPLAYERNAME];
|
||||
UINT8 *buf_p = buf;
|
||||
INT32 newplayernum;
|
||||
boolean newplayer = false;
|
||||
|
||||
for (node = 0; node < MAXNETNODES; node++)
|
||||
{
|
||||
// splitscreen can allow 2+ players in one node
|
||||
for (; nodewaiting[node] > 0; nodewaiting[node]--)
|
||||
|
|
@ -3678,6 +3687,7 @@ boolean SV_SpawnServer(void)
|
|||
I_Error("What do you think you're doing?");
|
||||
return false;
|
||||
#else
|
||||
boolean result = false;
|
||||
if (demo.playback)
|
||||
G_StopDemo(); // reset engine parameter
|
||||
if (metalplayback)
|
||||
|
|
@ -3704,7 +3714,14 @@ boolean SV_SpawnServer(void)
|
|||
else doomcom->numslots = 1;
|
||||
}
|
||||
|
||||
return SV_AddWaitingPlayers(cv_playername[0].zstring, cv_playername[1].zstring, cv_playername[2].zstring, cv_playername[3].zstring);
|
||||
// strictly speaking, i'm not convinced the following is necessary
|
||||
// but I'm not confident enough to remove it entirely in case it breaks something
|
||||
{
|
||||
SINT8 node = 0;
|
||||
for (; node < MAXNETNODES; node++)
|
||||
result |= SV_AddWaitingPlayers(node, cv_playername[0].zstring, cv_playername[1].zstring, cv_playername[2].zstring, cv_playername[3].zstring);
|
||||
}
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -3876,7 +3893,7 @@ static void HandleConnect(SINT8 node)
|
|||
SV_SendSaveGame(node, false); // send a complete game state
|
||||
DEBFILE("send savegame\n");
|
||||
}
|
||||
SV_AddWaitingPlayers(names[0], names[1], names[2], names[3]);
|
||||
SV_AddWaitingPlayers(node, names[0], names[1], names[2], names[3]);
|
||||
joindelay += cv_joindelay.value * TICRATE;
|
||||
player_joining = true;
|
||||
}
|
||||
|
|
@ -4934,12 +4951,6 @@ static void CL_SendClientCmd(void)
|
|||
size_t packetsize = 0;
|
||||
boolean mis = false;
|
||||
|
||||
if (lowest_lag && ( gametic % lowest_lag ))
|
||||
{
|
||||
cl_packetmissed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
netbuffer->packettype = PT_CLIENTCMD;
|
||||
|
||||
if (cl_packetmissed)
|
||||
|
|
@ -4960,27 +4971,35 @@ static void CL_SendClientCmd(void)
|
|||
}
|
||||
else if (gamestate != GS_NULL && (addedtogame || dedicated))
|
||||
{
|
||||
UINT8 lagDelay = 0;
|
||||
|
||||
if (lowest_lag > 0)
|
||||
{
|
||||
// Gentlemens' ping.
|
||||
lagDelay = min(lowest_lag, MAXGENTLEMENDELAY);
|
||||
}
|
||||
|
||||
packetsize = sizeof (clientcmd_pak);
|
||||
G_MoveTiccmd(&netbuffer->u.clientpak.cmd, &localcmds[0], 1);
|
||||
netbuffer->u.clientpak.consistancy = SHORT(consistancy[gametic%TICQUEUE]);
|
||||
G_MoveTiccmd(&netbuffer->u.clientpak.cmd, &localcmds[0][lagDelay], 1);
|
||||
netbuffer->u.clientpak.consistancy = SHORT(consistancy[gametic % TICQUEUE]);
|
||||
|
||||
if (splitscreen) // Send a special packet with 2 cmd for splitscreen
|
||||
{
|
||||
netbuffer->packettype = (mis ? PT_CLIENT2MIS : PT_CLIENT2CMD);
|
||||
packetsize = sizeof (client2cmd_pak);
|
||||
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds[1], 1);
|
||||
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds[1][lagDelay], 1);
|
||||
|
||||
if (splitscreen > 1)
|
||||
{
|
||||
netbuffer->packettype = (mis ? PT_CLIENT3MIS : PT_CLIENT3CMD);
|
||||
packetsize = sizeof (client3cmd_pak);
|
||||
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds[2], 1);
|
||||
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds[2][lagDelay], 1);
|
||||
|
||||
if (splitscreen > 2)
|
||||
{
|
||||
netbuffer->packettype = (mis ? PT_CLIENT4MIS : PT_CLIENT4CMD);
|
||||
packetsize = sizeof (client4cmd_pak);
|
||||
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds[3], 1);
|
||||
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds[3][lagDelay], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5143,8 +5162,23 @@ static void SV_SendTics(void)
|
|||
//
|
||||
// TryRunTics
|
||||
//
|
||||
static void CreateNewLocalCMD(UINT8 p, INT32 realtics)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
for (i = MAXGENTLEMENDELAY-1; i > 0; i--)
|
||||
{
|
||||
G_MoveTiccmd(&localcmds[p][i], &localcmds[p][i-1], 1);
|
||||
}
|
||||
|
||||
G_BuildTiccmd(&localcmds[p][0], realtics, p+1);
|
||||
localcmds[p][0].flags |= TICCMD_RECEIVED;
|
||||
}
|
||||
|
||||
static void Local_Maketic(INT32 realtics)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
I_OsPolling(); // I_Getevent
|
||||
D_ProcessEvents(); // menu responder, cons responder,
|
||||
// game responder calls HU_Responder, AM_Responder,
|
||||
|
|
@ -5153,25 +5187,9 @@ static void Local_Maketic(INT32 realtics)
|
|||
if (!dedicated) rendergametic = gametic;
|
||||
|
||||
// translate inputs (keyboard/mouse/joystick) into game controls
|
||||
G_BuildTiccmd(&localcmds[0], realtics, 1);
|
||||
localcmds[0].flags |= TICCMD_RECEIVED;
|
||||
|
||||
if (splitscreen)
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
G_BuildTiccmd(&localcmds[1], realtics, 2);
|
||||
localcmds[1].flags |= TICCMD_RECEIVED;
|
||||
|
||||
if (splitscreen > 1)
|
||||
{
|
||||
G_BuildTiccmd(&localcmds[2], realtics, 3);
|
||||
localcmds[2].flags |= TICCMD_RECEIVED;
|
||||
|
||||
if (splitscreen > 2)
|
||||
{
|
||||
G_BuildTiccmd(&localcmds[3], realtics, 4);
|
||||
localcmds[3].flags |= TICCMD_RECEIVED;
|
||||
}
|
||||
}
|
||||
CreateNewLocalCMD(i, realtics);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5264,11 +5282,13 @@ void TryRunTics(tic_t realtics)
|
|||
|
||||
if (neededtic > gametic)
|
||||
{
|
||||
if (realtics)
|
||||
hu_stopped = false;
|
||||
}
|
||||
|
||||
if (player_joining)
|
||||
{
|
||||
if (realtics)
|
||||
hu_stopped = true;
|
||||
return;
|
||||
}
|
||||
|
|
@ -5288,6 +5308,7 @@ void TryRunTics(tic_t realtics)
|
|||
while (neededtic > gametic)
|
||||
{
|
||||
DEBFILE(va("============ Running tic %d (local %d)\n", gametic, localgametic));
|
||||
prev_tics = I_GetTime();
|
||||
|
||||
ps_tictime = I_GetPreciseTime();
|
||||
|
||||
|
|
@ -5306,6 +5327,7 @@ void TryRunTics(tic_t realtics)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (realtics)
|
||||
hu_stopped = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,15 @@ applications may follow different packet versions.
|
|||
// Networking and tick handling related.
|
||||
#define TICQUEUE 512 // more than enough for most timeouts....
|
||||
#define MAXTEXTCMD 256
|
||||
|
||||
// No. of tics your controls can be delayed by.
|
||||
|
||||
// TODO: Instead of storing a ton of extra cmds for gentlemens' delay,
|
||||
// keep them in a linked-list, with timestamps to discard everything that's older than already sent.
|
||||
// That will support any amount of lag, and be less wasteful for clients who don't use it.
|
||||
// This just works as a quick implementation.
|
||||
#define MAXGENTLEMENDELAY TICRATE
|
||||
|
||||
//
|
||||
// Packet structure
|
||||
//
|
||||
|
|
|
|||
37
src/d_main.c
37
src/d_main.c
|
|
@ -63,6 +63,7 @@
|
|||
#include "deh_tables.h" // Dehacked list test
|
||||
#include "m_cond.h" // condition initialization
|
||||
#include "fastcmp.h"
|
||||
#include "r_fps.h" // Frame interpolation/uncapped
|
||||
#include "keys.h"
|
||||
#include "filesrch.h" // refreshdirmenu
|
||||
#include "g_input.h" // tutorial mode control scheming
|
||||
|
|
@ -755,7 +756,7 @@ void D_SRB2Loop(void)
|
|||
debugload--;
|
||||
#endif
|
||||
|
||||
if (!realtics && !singletics)
|
||||
if (!realtics && !singletics && cv_frameinterpolation.value != 1)
|
||||
{
|
||||
I_Sleep();
|
||||
continue;
|
||||
|
|
@ -773,13 +774,37 @@ void D_SRB2Loop(void)
|
|||
// process tics (but maybe not if realtic == 0)
|
||||
TryRunTics(realtics);
|
||||
|
||||
if (cv_frameinterpolation.value == 1 && !(paused || P_AutoPause() || hu_stopped))
|
||||
{
|
||||
fixed_t entertimefrac = I_GetTimeFrac();
|
||||
// renderdeltatics is a bit awkard to evaluate, since the system time interface is whole tic-based
|
||||
renderdeltatics = realtics * FRACUNIT;
|
||||
if (entertimefrac > rendertimefrac)
|
||||
renderdeltatics += entertimefrac - rendertimefrac;
|
||||
else
|
||||
renderdeltatics -= rendertimefrac - entertimefrac;
|
||||
|
||||
rendertimefrac = entertimefrac;
|
||||
}
|
||||
else
|
||||
{
|
||||
rendertimefrac = FRACUNIT;
|
||||
renderdeltatics = realtics * FRACUNIT;
|
||||
}
|
||||
|
||||
if (cv_frameinterpolation.value == 1)
|
||||
{
|
||||
D_Display();
|
||||
}
|
||||
|
||||
if (lastdraw || singletics || gametic > rendergametic)
|
||||
{
|
||||
rendergametic = gametic;
|
||||
rendertimeout = entertic+TICRATE/17;
|
||||
|
||||
// Update display, next frame, with current state.
|
||||
D_Display();
|
||||
// (Only display if not already done for frame interp)
|
||||
cv_frameinterpolation.value == 0 ? D_Display() : 0;
|
||||
|
||||
if (moviemode)
|
||||
M_SaveFrame();
|
||||
|
|
@ -788,7 +813,8 @@ void D_SRB2Loop(void)
|
|||
}
|
||||
else if (rendertimeout < entertic) // in case the server hang or netsplit
|
||||
{
|
||||
D_Display();
|
||||
// (Only display if not already done for frame interp)
|
||||
cv_frameinterpolation.value == 0 ? D_Display() : 0;
|
||||
|
||||
if (moviemode)
|
||||
M_SaveFrame();
|
||||
|
|
@ -1391,6 +1417,9 @@ void D_SRB2Main(void)
|
|||
// setup loading screen
|
||||
SCR_Startup();
|
||||
|
||||
// Do this in background; lots of number crunching
|
||||
R_InitTranslucencyTables();
|
||||
|
||||
CON_SetLoadingProgress(LOADED_ISTARTUPGRAPHICS);
|
||||
|
||||
CONS_Printf("HU_Init()...\n");
|
||||
|
|
@ -1639,6 +1668,8 @@ void D_SRB2Main(void)
|
|||
// as having been modified for the first game.
|
||||
M_PushSpecialParameters(); // push all "+" parameter at the command buffer
|
||||
|
||||
COM_BufExecute(); // ensure the command buffer gets executed before the map starts (+skin)
|
||||
|
||||
strncpy(connectedservername, cv_servername.string, MAXSERVERNAME);
|
||||
|
||||
if (M_CheckParm("-gametype") && M_IsNextParm())
|
||||
|
|
|
|||
|
|
@ -222,8 +222,6 @@ static void Command_KartGiveItem_f(void);
|
|||
// CLIENT VARIABLES
|
||||
// =========================================================================
|
||||
|
||||
void SendWeaponPref(UINT8 n);
|
||||
|
||||
static CV_PossibleValue_t usemouse_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Force"}, {0, NULL}};
|
||||
|
||||
#ifdef LJOYSTICK
|
||||
|
|
@ -768,15 +766,21 @@ void D_RegisterClientCommands(void)
|
|||
|
||||
for (i = 0; i < MAXSKINCOLORS; i++)
|
||||
{
|
||||
Color_cons_t[i].value = Followercolor_cons_t[i].value = i;
|
||||
Color_cons_t[i].strvalue = Followercolor_cons_t[i].strvalue = skincolors[i].name;
|
||||
Color_cons_t[i].value = i;
|
||||
Color_cons_t[i].strvalue = skincolors[i].name;
|
||||
}
|
||||
|
||||
Followercolor_cons_t[MAXSKINCOLORS].value = MAXSKINCOLORS;
|
||||
Followercolor_cons_t[MAXSKINCOLORS].strvalue = "Match"; // Add "Match" option, which will make the follower color match the player's
|
||||
for (i = 2; i < MAXSKINCOLORS; i++)
|
||||
{
|
||||
Followercolor_cons_t[i].value = i-2;
|
||||
Followercolor_cons_t[i].strvalue = skincolors[i-2].name;
|
||||
}
|
||||
|
||||
Followercolor_cons_t[MAXSKINCOLORS+1].value = MAXSKINCOLORS+1;
|
||||
Followercolor_cons_t[MAXSKINCOLORS+1].strvalue = "Opposite"; // Add "Opposite" option, ...which is like "Match", but for coloropposite.
|
||||
Followercolor_cons_t[1].value = -1;
|
||||
Followercolor_cons_t[1].strvalue = "Match"; // Add "Match" option, which will make the follower color match the player's
|
||||
|
||||
Followercolor_cons_t[0].value = -2;
|
||||
Followercolor_cons_t[0].strvalue = "Opposite"; // Add "Opposite" option, ...which is like "Match", but for coloropposite.
|
||||
|
||||
Color_cons_t[MAXSKINCOLORS].value = Followercolor_cons_t[MAXSKINCOLORS+2].value = 0;
|
||||
Color_cons_t[MAXSKINCOLORS].strvalue = Followercolor_cons_t[MAXSKINCOLORS+2].strvalue = NULL;
|
||||
|
|
@ -1110,6 +1114,7 @@ boolean EnsurePlayerNameIsGood(char *name, INT32 playernum)
|
|||
* is restored to what it was before.
|
||||
*
|
||||
* We assume that if playernum is in ::g_localplayers
|
||||
* (unless clientjoin is true, a necessary evil)
|
||||
* the console variable ::cv_playername[n] is
|
||||
* already set to newname. However, the player name table is assumed to
|
||||
* contain the old name.
|
||||
|
|
@ -1128,6 +1133,10 @@ void CleanupPlayerName(INT32 playernum, const char *newname)
|
|||
char *tmpname = NULL;
|
||||
INT32 i;
|
||||
boolean namefailed = true;
|
||||
boolean clientjoin = !!(playernum >= MAXPLAYERS);
|
||||
|
||||
if (clientjoin)
|
||||
playernum -= MAXPLAYERS;
|
||||
|
||||
buf = Z_StrDup(newname);
|
||||
|
||||
|
|
@ -1185,6 +1194,8 @@ void CleanupPlayerName(INT32 playernum, const char *newname)
|
|||
}
|
||||
|
||||
// no stealing another player's name
|
||||
if (!clientjoin)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (i != playernum && playeringame[i]
|
||||
|
|
@ -1196,6 +1207,7 @@ void CleanupPlayerName(INT32 playernum, const char *newname)
|
|||
|
||||
if (i < MAXPLAYERS)
|
||||
break;
|
||||
}
|
||||
|
||||
// name is okay then
|
||||
namefailed = false;
|
||||
|
|
@ -1206,6 +1218,10 @@ void CleanupPlayerName(INT32 playernum, const char *newname)
|
|||
|
||||
// set consvars whether namefailed or not, because even if it succeeded,
|
||||
// spaces may have been removed
|
||||
if (clientjoin)
|
||||
CV_StealthSet(&cv_playername[playernum], tmpname);
|
||||
else
|
||||
{
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (playernum == g_localplayers[i])
|
||||
|
|
@ -1219,6 +1235,7 @@ void CleanupPlayerName(INT32 playernum, const char *newname)
|
|||
{
|
||||
I_Assert(((void)"CleanupPlayerName used on non-local player", 0));
|
||||
}
|
||||
}
|
||||
|
||||
Z_Free(buf);
|
||||
}
|
||||
|
|
@ -1398,7 +1415,9 @@ static void SendNameAndColor(UINT8 n)
|
|||
|
||||
if (!strcmp(cv_playername[n].string, player_names[playernum])
|
||||
&& cv_playercolor[n].value == player->skincolor
|
||||
&& !strcmp(cv_skin[n].string, skins[player->skin].name))
|
||||
&& !strcmp(cv_skin[n].string, skins[player->skin].name)
|
||||
&& cv_follower[n].value == player->followerskin
|
||||
&& cv_followercolor[n].value == player->followercolor)
|
||||
return;
|
||||
|
||||
player->availabilities = R_GetSkinAvailabilities();
|
||||
|
|
@ -1811,19 +1830,15 @@ static void Got_LeaveParty(UINT8 **cp,INT32 playernum)
|
|||
}
|
||||
}
|
||||
|
||||
void D_SendPlayerConfig(void)
|
||||
void D_SendPlayerConfig(UINT8 n)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
UINT8 buf[4];
|
||||
UINT8 *p = buf;
|
||||
|
||||
SendNameAndColor(i);
|
||||
SendWeaponPref(i);
|
||||
SendNameAndColor(n);
|
||||
SendWeaponPref(n);
|
||||
|
||||
if (i == 0)
|
||||
if (n == 0)
|
||||
{
|
||||
// Send it over
|
||||
WRITEUINT16(p, vspowerlevel[PWRLV_RACE]);
|
||||
|
|
@ -1836,8 +1851,7 @@ void D_SendPlayerConfig(void)
|
|||
WRITEUINT16(p, 0);
|
||||
}
|
||||
|
||||
SendNetXCmdForPlayer(i, XD_POWERLEVEL, buf, p-buf);
|
||||
}
|
||||
SendNetXCmdForPlayer(n, XD_POWERLEVEL, buf, p-buf);
|
||||
}
|
||||
|
||||
// Only works for displayplayer, sorry!
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ void D_RegisterServerCommands(void);
|
|||
void D_RegisterClientCommands(void);
|
||||
void CleanupPlayerName(INT32 playernum, const char *newname);
|
||||
boolean EnsurePlayerNameIsGood(char *name, INT32 playernum);
|
||||
void D_SendPlayerConfig(void);
|
||||
void SendWeaponPref(UINT8 n);
|
||||
void D_SendPlayerConfig(UINT8 n);
|
||||
void Command_ExitGame_f(void);
|
||||
void Command_Retry_f(void);
|
||||
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
|
||||
|
|
|
|||
|
|
@ -161,10 +161,16 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
|
|||
char wadfilename[MAX_WADPATH] = "";
|
||||
UINT8 filestatus;
|
||||
|
||||
for (i = mainwads+1; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
|
||||
#ifdef DEVELOP
|
||||
i = 0;
|
||||
#else
|
||||
i = mainwads + 1;
|
||||
#endif
|
||||
|
||||
for (; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
|
||||
{
|
||||
// If it has only music/sound lumps, don't put it in the list
|
||||
if (!wadfiles[i]->important)
|
||||
if (i > mainwads && !wadfiles[i]->important)
|
||||
continue;
|
||||
|
||||
if (firstfile)
|
||||
|
|
@ -276,11 +282,16 @@ boolean CL_CheckDownloadable(void)
|
|||
}
|
||||
|
||||
// Downloading locally disabled
|
||||
#if 0
|
||||
if (!dlstatus && M_CheckParm("-nodownload"))
|
||||
dlstatus = 3;
|
||||
|
||||
if (!dlstatus)
|
||||
return true;
|
||||
#else
|
||||
if (!dlstatus)
|
||||
dlstatus = 3;
|
||||
#endif
|
||||
|
||||
// not downloadable, put reason in console
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("You need additional files to connect to this server:\n"));
|
||||
|
|
@ -489,7 +500,12 @@ INT32 CL_CheckFiles(void)
|
|||
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
|
||||
|
||||
// Check in already loaded files
|
||||
for (j = mainwads+1; wadfiles[j]; j++)
|
||||
#ifdef DEVELOP
|
||||
j = 0;
|
||||
#else
|
||||
j = mainwads + 1;
|
||||
#endif
|
||||
for (; wadfiles[j]; j++)
|
||||
{
|
||||
nameonly(strcpy(wadfilename, wadfiles[j]->filename));
|
||||
if (!stricmp(wadfilename, fileneeded[i].filename) &&
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ typedef enum
|
|||
PF_ATTACKDOWN = 1,
|
||||
PF_ACCELDOWN = 1<<1,
|
||||
PF_BRAKEDOWN = 1<<2,
|
||||
PF_WPNDOWN = 1<<3, // reserved - gonna turn this into lookback when i'm done with all the major reengineering
|
||||
PF_LOOKDOWN = 1<<3,
|
||||
|
||||
// Accessibility and cheats
|
||||
PF_KICKSTARTACCEL = 1<<4, // Is accelerate in kickstart mode?
|
||||
|
|
@ -198,11 +198,18 @@ typedef enum
|
|||
#undef KSPIN_TYPE
|
||||
} kartspinoutflags_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TRIP_NONE,
|
||||
TRIP_PASSED,
|
||||
TRIP_BLOCKED,
|
||||
} tripwirestate_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// Unsynced, HUD or clientsided effects
|
||||
// Item box
|
||||
khud_itemblink, // Item flashing after roulette, prevents Hyudoro stealing AND serves as a mashing indicator
|
||||
khud_itemblink, // Item flashing after roulette, serves as a mashing indicator
|
||||
khud_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items)
|
||||
|
||||
// Rings
|
||||
|
|
@ -263,6 +270,7 @@ typedef struct respawnvars_s
|
|||
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;
|
||||
|
|
@ -304,6 +312,7 @@ typedef struct player_s
|
|||
fixed_t bob;
|
||||
|
||||
angle_t viewrollangle;
|
||||
angle_t old_viewrollangle;
|
||||
// camera tilt
|
||||
// TODO: expose to lua
|
||||
angle_t tilt;
|
||||
|
|
@ -317,6 +326,7 @@ typedef struct player_s
|
|||
|
||||
// fun thing for player sprite
|
||||
angle_t drawangle;
|
||||
angle_t old_drawangle; // interp
|
||||
|
||||
// Bit flags.
|
||||
// See pflags_t, above.
|
||||
|
|
@ -375,7 +385,7 @@ typedef struct player_s
|
|||
UINT8 wipeoutslow; // Timer before you slowdown when getting wiped out
|
||||
UINT8 justbumped; // Prevent players from endlessly bumping into each other
|
||||
UINT8 tumbleBounces;
|
||||
UINT16 tumbleHeight;
|
||||
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
|
||||
|
|
@ -386,10 +396,12 @@ typedef struct player_s
|
|||
INT32 aizdrifttilt;
|
||||
INT32 aizdriftturn;
|
||||
|
||||
INT32 underwatertilt;
|
||||
|
||||
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 horizontal spring
|
||||
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
|
||||
|
|
@ -455,9 +467,6 @@ typedef struct player_s
|
|||
|
||||
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 trickmomx;
|
||||
fixed_t trickmomy;
|
||||
fixed_t trickmomz;
|
||||
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.
|
||||
|
|
@ -467,10 +476,13 @@ typedef struct player_s
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ actionpointer_t actionpointers[] =
|
|||
{{A_SPBChase}, "A_SPBCHASE"},
|
||||
{{A_SSMineSearch}, "A_SSMINESEARCH"},
|
||||
{{A_SSMineExplode}, "A_SSMINEEXPLODE"},
|
||||
{{A_LandMineExplode}, "A_LANDMINEEXPLODE"},
|
||||
{{A_BallhogExplode}, "A_BALLHOGEXPLODE"},
|
||||
{{A_LightningFollowPlayer}, "A_LIGHTNINGFOLLOWPLAYER"},
|
||||
{{A_FZBoomFlash}, "A_FZBOOMFLASH"},
|
||||
|
|
@ -334,7 +335,6 @@ actionpointer_t actionpointers[] =
|
|||
{{A_ReaperThinker}, "A_REAPERTHINKER"},
|
||||
{{A_FlameShieldPaper}, "A_FLAMESHIELDPAPER"},
|
||||
{{A_InvincSparkleRotate}, "A_INVINCSPARKLEROTATE"},
|
||||
{{A_SpawnItemCapsuleParts}, "A_SPAWNITEMCAPSULEPARTS"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
|
|
@ -3476,6 +3476,21 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_RANDOMITEM12",
|
||||
"S_DEADRANDOMITEM",
|
||||
|
||||
// Sphere Box (for Battle)
|
||||
"S_SPHEREBOX1",
|
||||
"S_SPHEREBOX2",
|
||||
"S_SPHEREBOX3",
|
||||
"S_SPHEREBOX4",
|
||||
"S_SPHEREBOX5",
|
||||
"S_SPHEREBOX6",
|
||||
"S_SPHEREBOX7",
|
||||
"S_SPHEREBOX8",
|
||||
"S_SPHEREBOX9",
|
||||
"S_SPHEREBOX10",
|
||||
"S_SPHEREBOX11",
|
||||
"S_SPHEREBOX12",
|
||||
"S_DEADSPHEREBOX",
|
||||
|
||||
// Random Item Pop
|
||||
"S_RANDOMITEMPOP1",
|
||||
"S_RANDOMITEMPOP2",
|
||||
|
|
@ -3490,9 +3505,9 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_ITEMCAPSULE_TOP_SIDE",
|
||||
"S_ITEMCAPSULE_BOTTOM_SIDE_AIR",
|
||||
"S_ITEMCAPSULE_BOTTOM_SIDE_GROUND",
|
||||
"S_ITEMCAPSULE_TOP",
|
||||
"S_ITEMCAPSULE_BOTTOM",
|
||||
"S_ITEMCAPSULE_INSIDE",
|
||||
//"S_ITEMCAPSULE_TOP",
|
||||
//"S_ITEMCAPSULE_BOTTOM",
|
||||
//"S_ITEMCAPSULE_INSIDE",
|
||||
|
||||
// Signpost sparkles
|
||||
"S_SIGNSPARK1",
|
||||
|
|
@ -4593,6 +4608,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",
|
||||
|
|
@ -5730,6 +5750,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",
|
||||
|
|
@ -5852,7 +5873,7 @@ const char *const PLAYERFLAG_LIST[] = {
|
|||
"ATTACKDOWN",
|
||||
"ACCELDOWN",
|
||||
"BRAKEDOWN",
|
||||
"WPNDOWN", // reserved - gonna turn this into lookback when i'm done with all the major reengineering
|
||||
"LOOKDOWN",
|
||||
|
||||
// Accessibility and cheats
|
||||
"KICKSTARTACCEL", // Is accelerate in kickstart mode?
|
||||
|
|
@ -6839,6 +6860,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},
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ tic_t I_GetTime(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int I_GetTimeMicros(void)
|
||||
fixed_t I_GetTimeFrac(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,8 +108,12 @@ static patch_t *ttcheckers; // *vroom* KART
|
|||
static patch_t *ttkflash; // flash screen
|
||||
*/
|
||||
|
||||
#define NOWAY
|
||||
|
||||
#ifdef NOWAY
|
||||
static patch_t *driver[2]; // Driving character on the waiting screen
|
||||
static UINT8 *waitcolormap; // colormap for the spinning character
|
||||
#endif
|
||||
|
||||
// ttmode user
|
||||
static patch_t *ttuser[TTMAX_USER];
|
||||
|
|
@ -2188,14 +2192,17 @@ void F_TitleDemoTicker(void)
|
|||
|
||||
void F_StartWaitingPlayers(void)
|
||||
{
|
||||
#ifdef NOWAY
|
||||
INT32 i;
|
||||
INT32 randskin;
|
||||
spritedef_t *sprdef;
|
||||
spriteframe_t *sprframe;
|
||||
#endif
|
||||
|
||||
wipegamestate = GS_TITLESCREEN; // technically wiping from title screen
|
||||
finalecount = 0;
|
||||
|
||||
#ifdef NOWAY
|
||||
randskin = M_RandomKey(numskins);
|
||||
|
||||
if (waitcolormap)
|
||||
|
|
@ -2208,8 +2215,9 @@ void F_StartWaitingPlayers(void)
|
|||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
sprframe = &sprdef->spriteframes[i];
|
||||
driver[i] = W_CachePatchNum(sprframe->lumppat[0], PU_LEVEL);
|
||||
driver[i] = W_CachePatchNum(sprframe->lumppat[0], PU_CACHE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void F_WaitingPlayersTicker(void)
|
||||
|
|
@ -2226,14 +2234,17 @@ void F_WaitingPlayersTicker(void)
|
|||
|
||||
void F_WaitingPlayersDrawer(void)
|
||||
{
|
||||
#ifdef NOWAY
|
||||
UINT32 frame = (finalecount % 8) / 4; // The game only tics every other frame while waitingplayers
|
||||
INT32 flags = V_FLIP;
|
||||
#endif
|
||||
const char *waittext1 = "You will join";
|
||||
const char *waittext2 = "the next race...";
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
V_DrawCreditString((160 - (V_CreditStringWidth(waittext1)>>1))<<FRACBITS, 48<<FRACBITS, 0, waittext1);
|
||||
V_DrawCreditString((160 - (V_CreditStringWidth(waittext2)>>1))<<FRACBITS, 64<<FRACBITS, 0, waittext2);
|
||||
V_DrawFixedPatch((160<<FRACBITS) - driver[frame]->width / 2, 150<<FRACBITS, 1<<FRACBITS, flags, driver[frame], waitcolormap);
|
||||
#ifdef NOWAY
|
||||
V_DrawFixedPatch((160<<FRACBITS) - driver[frame]->width / 2, 150<<FRACBITS, 1<<FRACBITS, V_FLIP, driver[frame], waitcolormap);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ==================
|
||||
|
|
|
|||
13
src/f_wipe.c
13
src/f_wipe.c
|
|
@ -299,16 +299,23 @@ static void F_DoWipe(fademask_t *fademask, lighttable_t *fadecolormap, boolean r
|
|||
e = e_base + relativepos;
|
||||
draw_rowstogo = draw_rowend - draw_rowstart;
|
||||
|
||||
while (draw_rowstogo--)
|
||||
if (fadecolormap)
|
||||
{
|
||||
if (fadecolormap != NULL)
|
||||
if (reverse)
|
||||
s = e;
|
||||
while (draw_rowstogo--)
|
||||
*w++ = fadecolormap[ ( m << 8 ) + *s++ ];
|
||||
}
|
||||
else while (draw_rowstogo--)
|
||||
{
|
||||
/*if (fadecolormap != NULL)
|
||||
{
|
||||
if (reverse)
|
||||
*w++ = fadecolormap[ ( m << 8 ) + *e++ ];
|
||||
else
|
||||
*w++ = fadecolormap[ ( m << 8 ) + *s++ ];
|
||||
}
|
||||
else
|
||||
else*/
|
||||
*w++ = transtbl[ ( *e++ << 8 ) + *s++ ];
|
||||
}
|
||||
|
||||
|
|
|
|||
54
src/g_demo.c
54
src/g_demo.c
|
|
@ -112,6 +112,10 @@ demoghost *ghosts = NULL;
|
|||
#define DF_BREAKTHECAPSULES 0x04 // This demo is from Break the Capsules and contains its final completion time!
|
||||
#define DF_ATTACKMASK 0x06 // This demo is from ??? attack and contains ???
|
||||
|
||||
// 0x08 free
|
||||
|
||||
#define DF_NONETMP 0x10 // multiplayer but not netgame
|
||||
|
||||
#define DF_LUAVARS 0x20 // this demo contains extra lua vars
|
||||
|
||||
#define DF_ATTACKSHIFT 1
|
||||
|
|
@ -304,11 +308,12 @@ void G_ReadDemoExtraData(void)
|
|||
}
|
||||
if (extradata & DXD_PLAYSTATE)
|
||||
{
|
||||
extradata = READUINT8(demo_p);
|
||||
i = READUINT8(demo_p);
|
||||
|
||||
switch (extradata) {
|
||||
switch (i) {
|
||||
case DXD_PST_PLAYING:
|
||||
players[p].pflags |= PF_WANTSTOJOIN; // fuck you
|
||||
//CONS_Printf("player %s is despectating on tic %d\n", player_names[p], leveltime);
|
||||
break;
|
||||
|
||||
case DXD_PST_SPECTATING:
|
||||
|
|
@ -319,9 +324,11 @@ void G_ReadDemoExtraData(void)
|
|||
playeringame[p] = true;
|
||||
G_AddPlayer(p);
|
||||
players[p].spectator = true;
|
||||
//CONS_Printf("player %s is joining server on tic %d\n", player_names[p], leveltime);
|
||||
}
|
||||
else
|
||||
{
|
||||
//CONS_Printf("player %s is spectating on tic %d\n", player_names[p], leveltime);
|
||||
players[p].spectator = true;
|
||||
if (players[p].mo)
|
||||
P_DamageMobj(players[p].mo, NULL, NULL, 1, DMG_INSTAKILL);
|
||||
|
|
@ -343,11 +350,11 @@ void G_ReadDemoExtraData(void)
|
|||
}
|
||||
if (extradata & DXD_WEAPONPREF)
|
||||
{
|
||||
extradata = READUINT8(demo_p);
|
||||
i = READUINT8(demo_p);
|
||||
players[p].pflags &= ~(PF_KICKSTARTACCEL);
|
||||
if (extradata & 1)
|
||||
if (i & 1)
|
||||
players[p].pflags |= PF_KICKSTARTACCEL;
|
||||
//CONS_Printf("weaponpref is %d for player %d\n", extradata, p);
|
||||
//CONS_Printf("weaponpref is %d for player %d\n", i, p);
|
||||
}
|
||||
|
||||
p = READUINT8(demo_p);
|
||||
|
|
@ -366,7 +373,7 @@ void G_ReadDemoExtraData(void)
|
|||
P_SetRandSeed(rng);
|
||||
|
||||
if (demosynced)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced (RNG)!\n"));
|
||||
demosynced = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -493,6 +500,7 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
|
|||
|
||||
if (!demo_p || !demo.deferstart)
|
||||
return;
|
||||
|
||||
ziptic = READUINT8(demo_p);
|
||||
|
||||
if (ziptic & ZT_FWD)
|
||||
|
|
@ -530,7 +538,7 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
|
|||
|
||||
if (cmd->forwardmove != oldcmd[playernum].forwardmove)
|
||||
{
|
||||
WRITEUINT8(demo_p,cmd->forwardmove);
|
||||
WRITESINT8(demo_p,cmd->forwardmove);
|
||||
oldcmd[playernum].forwardmove = cmd->forwardmove;
|
||||
ziptic |= ZT_FWD;
|
||||
}
|
||||
|
|
@ -621,7 +629,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)
|
||||
|
|
@ -793,6 +801,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;
|
||||
|
|
@ -862,7 +871,12 @@ void G_WriteGhostTic(mobj_t *ghost, INT32 playernum)
|
|||
|
||||
void G_ConsAllGhostTics(void)
|
||||
{
|
||||
UINT8 p = READUINT8(demo_p);
|
||||
UINT8 p;
|
||||
|
||||
if (!demo_p || !demo.deferstart)
|
||||
return;
|
||||
|
||||
p = READUINT8(demo_p);
|
||||
|
||||
while (p != 0xFF)
|
||||
{
|
||||
|
|
@ -887,8 +901,6 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
mobj_t *testmo;
|
||||
UINT32 syncleeway;
|
||||
|
||||
if (!demo_p || !demo.deferstart)
|
||||
return;
|
||||
if (!(demoflags & DF_GHOST))
|
||||
return; // No ghost data to use.
|
||||
|
||||
|
|
@ -965,7 +977,7 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
if (th != &thlist[THINK_MOBJ] && mobj->health != health) // Wasn't damaged?! This is desync! Fix it!
|
||||
{
|
||||
if (demosynced)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced (health)!\n"));
|
||||
demosynced = false;
|
||||
P_DamageMobj(mobj, players[0].mo, players[0].mo, 1, DMG_NORMAL);
|
||||
}
|
||||
|
|
@ -1018,7 +1030,7 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
if (ghostext[playernum].desyncframes >= 2)
|
||||
{
|
||||
if (demosynced)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
|
||||
CONS_Alert(CONS_WARNING, "Demo playback has desynced (player %s)!\n", player_names[playernum]);
|
||||
demosynced = false;
|
||||
|
||||
P_UnsetThingPosition(testmo);
|
||||
|
|
@ -1041,7 +1053,7 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
|| players[playernum].bumpers != ghostext[playernum].kartbumpers)
|
||||
{
|
||||
if (demosynced)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced (item/bumpers)!\n"));
|
||||
demosynced = false;
|
||||
|
||||
players[playernum].itemtype = ghostext[playernum].kartitem;
|
||||
|
|
@ -1579,7 +1591,7 @@ void G_ReadMetalTic(mobj_t *metal)
|
|||
oldmetal.x = READFIXED(metal_p);
|
||||
oldmetal.y = READFIXED(metal_p);
|
||||
oldmetal.z = READFIXED(metal_p);
|
||||
P_TeleportMove(metal, oldmetal.x, oldmetal.y, oldmetal.z);
|
||||
P_MoveOrigin(metal, oldmetal.x, oldmetal.y, oldmetal.z);
|
||||
oldmetal.x = metal->x;
|
||||
oldmetal.y = metal->y;
|
||||
oldmetal.z = metal->z;
|
||||
|
|
@ -1920,6 +1932,9 @@ void G_BeginRecording(void)
|
|||
demo_p = demobuffer;
|
||||
demoflags = DF_GHOST|(multiplayer ? DF_MULTIPLAYER : (modeattacking<<DF_ATTACKSHIFT));
|
||||
|
||||
if (multiplayer && !netgame)
|
||||
demoflags |= DF_NONETMP;
|
||||
|
||||
if (encoremode)
|
||||
demoflags |= DF_ENCORE;
|
||||
|
||||
|
|
@ -2778,6 +2793,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
|
||||
demoflags = READUINT8(demo_p);
|
||||
gametype = READUINT8(demo_p);
|
||||
G_SetGametype(gametype);
|
||||
|
||||
if (demo.title) // Titledemos should always play and ought to always be compatible with whatever wadlist is running.
|
||||
G_SkipDemoExtraFiles(&demo_p);
|
||||
|
|
@ -2837,6 +2853,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
|
||||
modeattacking = (demoflags & DF_ATTACKMASK)>>DF_ATTACKSHIFT;
|
||||
multiplayer = !!(demoflags & DF_MULTIPLAYER);
|
||||
demo.netgame = (multiplayer && !(demoflags & DF_NONETMP));
|
||||
CON_ToggleOff();
|
||||
|
||||
hu_demotime = UINT32_MAX;
|
||||
|
|
@ -2926,7 +2943,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
|
||||
while (p != 0xFF)
|
||||
{
|
||||
if ((spectator = (p & DEMO_SPECTATOR)))
|
||||
if ((spectator = !!(p & DEMO_SPECTATOR)))
|
||||
{
|
||||
p &= ~DEMO_SPECTATOR;
|
||||
|
||||
|
|
@ -2974,6 +2991,11 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
M_Memcpy(player_names[p],demo_p,16);
|
||||
demo_p += 16;
|
||||
|
||||
/*if (players[p].spectator)
|
||||
{
|
||||
CONS_Printf("player %s is spectator at start\n", player_names[p]);
|
||||
}*/
|
||||
|
||||
// Skin
|
||||
M_Memcpy(skin,demo_p,16);
|
||||
demo_p += 16;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ struct demovars_s {
|
|||
boolean inreplayhut; // Go back to replayhut after demos
|
||||
boolean quitafterplaying; // quit after playing a demo from cmdline
|
||||
boolean deferstart; // don't start playing demo right away
|
||||
boolean netgame; // multiplayer netgame
|
||||
|
||||
tic_t savebutton; // Used to determine when the local player can choose to save the replay while the race is still going
|
||||
enum {
|
||||
|
|
|
|||
21
src/g_game.c
21
src/g_game.c
|
|
@ -45,8 +45,8 @@
|
|||
#include "y_inter.h"
|
||||
#include "v_video.h"
|
||||
#include "lua_hook.h"
|
||||
#include "k_bot.h"
|
||||
#include "m_cond.h" // condition sets
|
||||
#include "r_fps.h" // frame interpolation/uncapped
|
||||
#include "lua_hud.h"
|
||||
|
||||
// SRB2kart
|
||||
|
|
@ -56,6 +56,7 @@
|
|||
#include "k_color.h"
|
||||
#include "k_respawn.h"
|
||||
#include "k_grandprix.h"
|
||||
#include "k_bot.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
|
|
@ -345,7 +346,6 @@ static void kickstartaccel_OnChange(void);
|
|||
static void kickstartaccel2_OnChange(void);
|
||||
static void kickstartaccel3_OnChange(void);
|
||||
static void kickstartaccel4_OnChange(void);
|
||||
void SendWeaponPref(UINT8 n);
|
||||
|
||||
static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
||||
{1, "X-Axis"}, {2, "Y-Axis"}, {-1, "X-Axis-"}, {-2, "Y-Axis-"},
|
||||
|
|
@ -1920,6 +1920,8 @@ void G_Ticker(boolean run)
|
|||
F_TextPromptTicker();
|
||||
AM_Ticker();
|
||||
HU_Ticker();
|
||||
R_UpdateViewInterpolation();
|
||||
|
||||
break;
|
||||
|
||||
case GS_INTERMISSION:
|
||||
|
|
@ -1976,7 +1978,12 @@ void G_Ticker(boolean run)
|
|||
break;
|
||||
|
||||
case GS_TITLESCREEN:
|
||||
if (titlemapinaction) P_Ticker(run);
|
||||
if (titlemapinaction)
|
||||
{
|
||||
P_Ticker(run);
|
||||
R_UpdateViewInterpolation();
|
||||
}
|
||||
|
||||
F_TitleScreenTicker(run);
|
||||
break;
|
||||
|
||||
|
|
@ -2281,11 +2288,13 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
p->growshrinktimer = growshrinktimer;
|
||||
p->bumpers = bumper;
|
||||
p->karmadelay = comebacktime;
|
||||
p->overtimekarma = 0;
|
||||
p->eggmanblame = -1;
|
||||
p->lastdraft = -1;
|
||||
p->karthud[khud_fault] = khudfault;
|
||||
p->nocontrol = nocontrol;
|
||||
p->kickstartaccel = kickstartaccel;
|
||||
p->tripWireState = TRIP_NONE;
|
||||
|
||||
memcpy(&p->respawn, &respawn, sizeof (p->respawn));
|
||||
|
||||
|
|
@ -2550,7 +2559,7 @@ mapthing_t *G_FindRaceStart(INT32 playernum)
|
|||
if (j == i)
|
||||
continue;
|
||||
|
||||
if (netgame && cv_kartusepwrlv.value)
|
||||
if ((netgame || (demo.playback && demo.netgame)) && cv_kartusepwrlv.value)
|
||||
{
|
||||
if (clientpowerlevels[j][PWRLV_RACE] == clientpowerlevels[i][PWRLV_RACE])
|
||||
num++;
|
||||
|
|
@ -2571,7 +2580,7 @@ mapthing_t *G_FindRaceStart(INT32 playernum)
|
|||
pos++;
|
||||
else
|
||||
{
|
||||
if (netgame && cv_kartusepwrlv.value)
|
||||
if ((netgame || (demo.playback && demo.netgame)) && cv_kartusepwrlv.value)
|
||||
{
|
||||
if (clientpowerlevels[i][PWRLV_RACE] > clientpowerlevels[playernum][PWRLV_RACE])
|
||||
pos++;
|
||||
|
|
@ -3111,7 +3120,7 @@ boolean G_GametypeHasTeams(void)
|
|||
//
|
||||
boolean G_GametypeHasSpectators(void)
|
||||
{
|
||||
return (netgame || (multiplayer && demo.playback));
|
||||
return (netgame || (multiplayer && demo.netgame));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
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
|
||||
|
|
@ -452,7 +452,9 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
|
|||
UINT8 *pdata;
|
||||
INT32 blockwidth, blockheight, blocksize;
|
||||
|
||||
#ifdef GLENCORE
|
||||
UINT8 *colormap = colormaps;
|
||||
#endif
|
||||
|
||||
INT32 i;
|
||||
boolean skyspecial = false; //poor hack for Legacy large skies..
|
||||
|
|
@ -477,12 +479,14 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
|
|||
grtex->mipmap.height = (UINT16)texture->height;
|
||||
grtex->mipmap.format = textureformat;
|
||||
|
||||
#ifdef GLENCORE
|
||||
if (encoremap)
|
||||
colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
grtex->mipmap.colormap = Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grtex->mipmap.colormap->source = colormap;
|
||||
M_Memcpy(grtex->mipmap.colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
#endif
|
||||
|
||||
blockwidth = texture->width;
|
||||
blockheight = texture->height;
|
||||
|
|
@ -891,7 +895,9 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
|||
GLMipmap_t *grmip;
|
||||
patch_t *patch;
|
||||
|
||||
#ifdef GLENCORE
|
||||
UINT8 *colormap = colormaps;
|
||||
#endif
|
||||
|
||||
if (flatlumpnum == LUMPERROR)
|
||||
return;
|
||||
|
|
@ -899,12 +905,16 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
|||
patch = HWR_GetCachedGLPatch(flatlumpnum);
|
||||
grmip = ((GLPatch_t *)Patch_AllocateHardwarePatch(patch))->mipmap;
|
||||
|
||||
#ifdef GLENCORE
|
||||
if (!noencoremap && encoremap)
|
||||
colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
grmip->colormap = Z_Calloc(sizeof(*grmip->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grmip->colormap->source = colormap;
|
||||
M_Memcpy(grmip->colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
#else
|
||||
(void)noencoremap;
|
||||
#endif
|
||||
|
||||
if (!grmip->downloaded && !grmip->data)
|
||||
HWR_CacheFlat(grmip, flatlumpnum);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue