Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
SRB2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
244
Issues
244
List
Board
Labels
Milestones
Merge Requests
67
Merge Requests
67
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
STJr
SRB2
Commits
4985d943
Commit
4985d943
authored
Jul 12, 2020
by
James R.
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into cmake-adjustments
parents
8fc41453
6f8dfb6f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
157 changed files
with
1559 additions
and
774 deletions
+1559
-774
CMakeLists.txt
CMakeLists.txt
+4
-1
appveyor.yml
appveyor.yml
+3
-3
SRB2-22.cfg
extras/conf/SRB2-22.cfg
+44
-13
CMakeLists.txt
src/CMakeLists.txt
+2
-1
Makefile
src/Makefile
+2
-4
Makefile.cfg
src/Makefile.cfg
+61
-24
am_map.c
src/am_map.c
+2
-5
lbaselib.c
src/blua/lbaselib.c
+26
-0
liolib.c
src/blua/liolib.c
+15
-10
command.c
src/command.c
+1
-1
config.h.in
src/config.h.in
+4
-2
console.c
src/console.c
+1
-4
d_clisrv.c
src/d_clisrv.c
+0
-0
d_clisrv.h
src/d_clisrv.h
+32
-8
d_main.c
src/d_main.c
+117
-4
d_net.c
src/d_net.c
+7
-3
d_netcmd.c
src/d_netcmd.c
+84
-53
d_netfil.c
src/d_netfil.c
+0
-0
d_netfil.h
src/d_netfil.h
+27
-12
d_player.h
src/d_player.h
+10
-2
dehacked.c
src/dehacked.c
+0
-0
i_system.c
src/djgppdos/i_system.c
+4
-0
i_video.c
src/djgppdos/i_video.c
+3
-0
doomdata.h
src/doomdata.h
+0
-4
doomdef.h
src/doomdef.h
+37
-41
doomstat.h
src/doomstat.h
+31
-4
doomtype.h
src/doomtype.h
+4
-0
i_system.c
src/dummy/i_system.c
+5
-0
f_finale.c
src/f_finale.c
+32
-21
g_demo.c
src/g_demo.c
+0
-0
g_game.c
src/g_game.c
+0
-0
g_game.h
src/g_game.h
+3
-1
g_state.h
src/g_state.h
+2
-1
hw3dsdrv.h
src/hardware/hw3dsdrv.h
+5
-13
hw3sound.c
src/hardware/hw3sound.c
+5
-12
hw3sound.h
src/hardware/hw3sound.h
+5
-13
hw_batching.c
src/hardware/hw_batching.c
+0
-0
hw_batching.h
src/hardware/hw_batching.h
+37
-0
hw_bsp.c
src/hardware/hw_bsp.c
+5
-12
hw_cache.c
src/hardware/hw_cache.c
+0
-0
hw_clip.c
src/hardware/hw_clip.c
+7
-7
hw_clip.h
src/hardware/hw_clip.h
+1
-1
hw_data.h
src/hardware/hw_data.h
+7
-14
hw_defs.h
src/hardware/hw_defs.h
+49
-45
hw_dll.h
src/hardware/hw_dll.h
+7
-16
hw_draw.c
src/hardware/hw_draw.c
+0
-0
hw_drv.h
src/hardware/hw_drv.h
+35
-22
hw_glide.h
src/hardware/hw_glide.h
+5
-37
hw_glob.h
src/hardware/hw_glob.h
+6
-21
hw_light.c
src/hardware/hw_light.c
+34
-42
hw_light.h
src/hardware/hw_light.h
+6
-12
hw_main.c
src/hardware/hw_main.c
+0
-0
hw_main.h
src/hardware/hw_main.h
+37
-21
hw_md2.c
src/hardware/hw_md2.c
+0
-0
hw_md2.h
src/hardware/hw_md2.h
+9
-14
hw_trick.c
src/hardware/hw_trick.c
+0
-0
hws_data.h
src/hardware/hws_data.h
+6
-13
ogl_win.c
src/hardware/r_opengl/ogl_win.c
+21
-21
r_opengl.c
src/hardware/r_opengl/r_opengl.c
+0
-0
r_opengl.h
src/hardware/r_opengl/r_opengl.h
+10
-13
hu_stuff.c
src/hu_stuff.c
+39
-112
hu_stuff.h
src/hu_stuff.h
+1
-1
i_system.h
src/i_system.h
+2
-0
i_tcp.c
src/i_tcp.c
+1
-1
info.c
src/info.c
+0
-0
info.h
src/info.h
+13
-1
en.po
src/locale/en.po
+1
-1
srb2.pot
src/locale/srb2.pot
+1
-1
lua_baselib.c
src/lua_baselib.c
+153
-12
lua_hook.h
src/lua_hook.h
+3
-0
lua_hooklib.c
src/lua_hooklib.c
+0
-0
lua_hudlib.c
src/lua_hudlib.c
+5
-5
lua_infolib.c
src/lua_infolib.c
+261
-0
lua_libs.h
src/lua_libs.h
+2
-0
lua_maplib.c
src/lua_maplib.c
+3
-0
lua_mathlib.c
src/lua_mathlib.c
+7
-7
lua_mobjlib.c
src/lua_mobjlib.c
+25
-7
lua_playerlib.c
src/lua_playerlib.c
+3
-3
lua_script.c
src/lua_script.c
+96
-8
lua_script.h
src/lua_script.h
+7
-3
m_anigif.c
src/m_anigif.c
+24
-3
m_anigif.h
src/m_anigif.h
+1
-1
m_cheat.c
src/m_cheat.c
+17
-12
m_cond.c
src/m_cond.c
+4
-4
m_cond.h
src/m_cond.h
+4
-4
m_fixed.h
src/m_fixed.h
+0
-12
m_menu.c
src/m_menu.c
+0
-0
m_menu.h
src/m_menu.h
+26
-5
m_misc.c
src/m_misc.c
+0
-0
m_misc.h
src/m_misc.h
+0
-0
mserv.c
src/mserv.c
+0
-0
p_enemy.c
src/p_enemy.c
+0
-0
p_floor.c
src/p_floor.c
+0
-0
p_inter.c
src/p_inter.c
+0
-0
p_local.h
src/p_local.h
+0
-0
p_map.c
src/p_map.c
+0
-0
p_maputl.c
src/p_maputl.c
+0
-0
p_mobj.c
src/p_mobj.c
+0
-0
p_mobj.h
src/p_mobj.h
+0
-0
p_polyobj.c
src/p_polyobj.c
+0
-0
p_polyobj.h
src/p_polyobj.h
+0
-0
p_pspr.h
src/p_pspr.h
+0
-0
p_saveg.c
src/p_saveg.c
+0
-0
p_saveg.h
src/p_saveg.h
+0
-0
p_setup.c
src/p_setup.c
+0
-0
p_sight.c
src/p_sight.c
+0
-0
p_slopes.c
src/p_slopes.c
+0
-0
p_slopes.h
src/p_slopes.h
+0
-0
p_spec.c
src/p_spec.c
+0
-0
p_spec.h
src/p_spec.h
+0
-0
p_telept.c
src/p_telept.c
+0
-0
p_tick.c
src/p_tick.c
+0
-0
p_user.c
src/p_user.c
+0
-0
r_bsp.c
src/r_bsp.c
+0
-0
r_data.c
src/r_data.c
+0
-0
r_defs.h
src/r_defs.h
+0
-0
r_draw.c
src/r_draw.c
+0
-0
r_draw.h
src/r_draw.h
+0
-0
r_main.c
src/r_main.c
+0
-0
r_main.h
src/r_main.h
+0
-0
r_plane.c
src/r_plane.c
+0
-0
r_segs.c
src/r_segs.c
+0
-0
r_skins.c
src/r_skins.c
+0
-0
r_skins.h
src/r_skins.h
+0
-0
r_things.c
src/r_things.c
+0
-0
screen.c
src/screen.c
+0
-0
screen.h
src/screen.h
+0
-0
Srb2SDL-vc10.vcxproj
src/sdl/Srb2SDL-vc10.vcxproj
+0
-0
Srb2SDL-vc10.vcxproj.filters
src/sdl/Srb2SDL-vc10.vcxproj.filters
+0
-0
Srb2SDL-vc9.vcproj
src/sdl/Srb2SDL-vc9.vcproj
+0
-0
Srb2SDL.dsp
src/sdl/Srb2SDL.dsp
+0
-0
hwsym_sdl.c
src/sdl/hwsym_sdl.c
+0
-0
i_system.c
src/sdl/i_system.c
+0
-0
i_video.c
src/sdl/i_video.c
+0
-0
project.pbxproj
src/sdl/macosx/Srb2mac.pbproj/project.pbxproj
+0
-0
project.pbxproj
src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
+0
-0
mixer_sound.c
src/sdl/mixer_sound.c
+0
-0
ogl_sdl.c
src/sdl/ogl_sdl.c
+0
-0
sounds.c
src/sounds.c
+0
-0
st_stuff.c
src/st_stuff.c
+0
-0
tables.c
src/tables.c
+0
-0
v_video.c
src/v_video.c
+0
-0
v_video.h
src/v_video.h
+0
-0
version.h
src/version.h
+0
-0
w_wad.c
src/w_wad.c
+0
-0
w_wad.h
src/w_wad.h
+0
-0
Srb2win-vc10.vcxproj
src/win32/Srb2win-vc10.vcxproj
+0
-0
Srb2win-vc10.vcxproj.filters
src/win32/Srb2win-vc10.vcxproj.filters
+0
-0
Srb2win-vc9.vcproj
src/win32/Srb2win-vc9.vcproj
+0
-0
Srb2win.dsp
src/win32/Srb2win.dsp
+0
-0
Srb2win.rc
src/win32/Srb2win.rc
+0
-0
win_dll.c
src/win32/win_dll.c
+0
-0
win_sys.c
src/win32/win_sys.c
+0
-0
win_vid.c
src/win32/win_vid.c
+0
-0
y_inter.c
src/y_inter.c
+0
-0
y_inter.h
src/y_inter.h
+0
-0
z_zone.c
src/z_zone.c
+0
-0
No files found.
CMakeLists.txt
View file @
4985d943
...
...
@@ -12,10 +12,13 @@ if (${SRB2_USE_CCACHE})
endif
()
endif
()
file
(
STRINGS src/version.h SRB2_VERSION
)
string
(
REGEX MATCH
"[0-9]+
\\
.[0-9.]+"
SRB2_VERSION
${
SRB2_VERSION
}
)
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
# Version change is fine.
project
(
SRB2
VERSION
2.2.4
VERSION
${
SRB2_VERSION
}
LANGUAGES C
)
if
(
${
PROJECT_SOURCE_DIR
}
MATCHES
${
PROJECT_BINARY_DIR
}
)
...
...
appveyor.yml
View file @
4985d943
version
:
2.2.
4
.{branch}-{build}
version
:
2.2.
6
.{branch}-{build}
os
:
MinGW
environment
:
...
...
@@ -110,8 +110,8 @@ after_build:
-
set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
-
cmd
:
7z a %BUILD_ARCHIVE% %BUILD_PATH% -xr!.gitignore
-
appveyor PushArtifact %BUILD_ARCHIVE%
-
cmd
:
copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
-
appveyor PushArtifact %BUILDSARCHIVE%
#
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
#
- appveyor PushArtifact %BUILDSARCHIVE%
##############################
# DEPLOYER SCRIPT
##############################
...
...
extras/conf/SRB2-22.cfg
View file @
4985d943
...
...
@@ -750,12 +750,6 @@ linedeftypes
prefix = "(20)";
}
21
{
title = "Explicitly Include Line <disabled>";
prefix = "(21)";
}
22
{
title = "Parameters";
...
...
@@ -766,6 +760,7 @@ linedeftypes
flags128text = "[7] Intangible";
flags256text = "[8] Stopped by pushables";
flags512text = "[9] Render flats";
flags8192text = "[13] Cut cyan flat pixels";
}
30
...
...
@@ -920,6 +915,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Render insides";
flags128text = "[7] Only block non-players";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "195F";
flags643dfloorflagsadd = "7C80";
...
...
@@ -979,6 +975,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Render insides/block non-plr";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "200191F";
flags1283dfloorflagsadd = "7C80";
...
...
@@ -992,6 +989,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Render insides/block non-plr";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "2001917";
flags1283dfloorflagsadd = "7C80";
...
...
@@ -1019,6 +1017,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Render insides/block non-plr";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "400191F";
flags1283dfloorflagsadd = "7C80";
...
...
@@ -1032,6 +1031,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Render insides/block non-plr";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "4001917";
flags1283dfloorflagsadd = "7C80";
...
...
@@ -1077,6 +1077,7 @@ linedeftypes
flags64text = "[6] Use two light levels";
flags512text = "[9] Use target light level";
flags1024text = "[10] Ripple effect";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "9F39";
flags643dfloorflagsadd = "20000";
...
...
@@ -1105,6 +1106,7 @@ linedeftypes
flags64text = "[6] Use two light levels";
flags512text = "[9] Use target light level";
flags1024text = "[10] Ripple effect";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "1F31";
flags643dfloorflagsadd = "20000";
...
...
@@ -1120,6 +1122,7 @@ linedeftypes
flags64text = "[6] Use two light levels";
flags512text = "[9] Use target light level";
flags1024text = "[10] Ripple effect";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "209F39";
flags643dfloorflagsadd = "20000";
...
...
@@ -1134,6 +1137,7 @@ linedeftypes
flags64text = "[6] Use two light levels";
flags512text = "[9] Use target light level";
flags1024text = "[10] Ripple effect";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "201F31";
flags643dfloorflagsadd = "20000";
...
...
@@ -1156,6 +1160,7 @@ linedeftypes
prefix = "(221)";
flags8text = "[3] Slope skew sides";
flags64text = "[6] Cast shadow";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "1B59";
flags643dfloorflagsremove = "40";
...
...
@@ -1279,6 +1284,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Spindash to move";
flags128text = "[7] Only block non-players";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "195F";
}
...
...
@@ -1318,6 +1324,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Spindash, no shadow";
flags128text = "[7] Only block non-players";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "2009D1F";
flags643dfloorflagsadd = "40";
...
...
@@ -1384,6 +1391,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Only block non-players";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "210959F";
flags643dfloorflagsadd = "40";
...
...
@@ -1397,6 +1405,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Only block non-players";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "218959F";
flags643dfloorflagsadd = "40";
...
...
@@ -1535,6 +1544,7 @@ linedeftypes
flags8text = "[3] Slope skew sides";
flags512text = "[9] Shattered by pushables";
flags1024text = "[10] Trigger linedef executor";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "880101D";
}
...
...
@@ -1576,6 +1586,7 @@ linedeftypes
flags128text = "[7] Only block non-players";
flags512text = "[9] Shattered by pushables";
flags1024text = "[10] Trigger linedef executor";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "1080101F";
}
...
...
@@ -1597,6 +1608,7 @@ linedeftypes
prefix = "(258)";
flags8text = "[3] Slope skew sides";
flags32text = "[5] Don't damage bosses";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "959";
}
...
...
@@ -1610,6 +1622,7 @@ linedeftypes
flags128text = "[7] Only block non-players";
flags512text = "[9] Shattered by pushables";
flags1024text = "[10] Trigger linedef executor";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorcustom = true;
}
...
...
@@ -2603,45 +2616,63 @@ linedeftypes
500
{
title = "Scroll
Wall Front Side
Left";
title = "Scroll
Front Wall
Left";
prefix = "(500)";
}
501
{
title = "Scroll
Wall Front Side
Right";
title = "Scroll
Front Wall
Right";
prefix = "(501)";
}
502
{
title = "Scroll
Wall According to Linedef
";
title = "Scroll
Tagged Wall
";
prefix = "(502)";
flags128text = "[7] Use texture offsets";
flags256text = "[8] Scroll back side";
}
503
{
title = "Scroll
Wall According to Linedef
(Accelerative)";
title = "Scroll
Tagged Wall
(Accelerative)";
prefix = "(503)";
flags128text = "[7] Use texture offsets";
flags256text = "[8] Scroll back side";
}
504
{
title = "Scroll
Wall According to Linedef
(Displacement)";
title = "Scroll
Tagged Wall
(Displacement)";
prefix = "(504)";
flags128text = "[7] Use texture offsets";
flags256text = "[8] Scroll back side";
}
505
{
title = "Scroll
Texture
by Front Side Offsets";
title = "Scroll
Front Wall
by Front Side Offsets";
prefix = "(505)";
}
506
{
title = "Scroll
Texture
by Back Side Offsets";
title = "Scroll
Front Wall
by Back Side Offsets";
prefix = "(506)";
}
507
{
title = "Scroll Back Wall by Front Side Offsets";
prefix = "(507)";
}
508
{
title = "Scroll Back Wall by Back Side Offsets";
prefix = "(508)";
}
}
planescroll
...
...
src/CMakeLists.txt
View file @
4985d943
...
...
@@ -448,6 +448,7 @@ 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
...
...
@@ -458,11 +459,11 @@ if(${SRB2_CONFIG_HWRENDER})
${
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/hw_trick.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
...
...
src/Makefile
View file @
4985d943
...
...
@@ -222,12 +222,10 @@ endif
ifdef
NOHW
OPTS
+=
-DNOHW
else
#Hurdler: not really supported and not tested recently
#OPTS+=-DUSE_PALETTED_TEXTURE
OPTS
+=
-DHWRENDER
OBJS
+=
$(OBJDIR)
/hw_bsp.o
$(OBJDIR)
/hw_draw.o
$(OBJDIR)
/hw_light.o
\
$(OBJDIR)
/hw_main.o
$(OBJDIR)
/hw_clip.o
$(OBJDIR)
/hw_md2.o
$(OBJDIR)
/hw_cache.o
$(OBJDIR)
/hw_trick.o
\
$(OBJDIR)
/hw_md2load.o
$(OBJDIR)
/hw_md3load.o
$(OBJDIR)
/hw_model.o
$(OBJDIR)
/u_list.o
$(OBJDIR)
/hw_main.o
$(OBJDIR)
/hw_clip.o
$(OBJDIR)
/hw_md2.o
$(OBJDIR)
/hw_cache.o
\
$(OBJDIR)
/hw_md2load.o
$(OBJDIR)
/hw_md3load.o
$(OBJDIR)
/hw_model.o
$(OBJDIR)
/u_list.o
$(OBJDIR)
/hw_batching.o
endif
ifdef
NOHS
...
...
src/Makefile.cfg
View file @
4985d943
# vim: ft=make
#
# Makefile.cfg for SRB2
#
...
...
@@ -7,6 +8,66 @@
# 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
:=
\
91
\
81 82 83
\
71 72
\
61 62 63 64
\
51 52 53 54
\
40 41 42 43 44 45 46 47 48 49
LATEST_GCC_VERSION
=
9.1
# 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
ifeq
(,$(filter
GCC%,$(.VARIABLES)))
ifneq
(,$(findstring
gcc,$(shell
$(CC)
--version)))
# if it's GCC
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)))
$(info\
Your
compiler
version,
GCC
$(version),
is
not
supported
by
the
Makefile.\
The
Makefile
will
assume
GCC
$(LATEST_GCC_VERSION).)
GCC$(subst
.,,$(LATEST_GCC_VERSION))=1
else
$(info
Detected
GCC
$(version)
(GCC$(v)))
GCC$(v)=1
endif
endif
endif
ifdef
GCC91
GCC83
=
1
endif
...
...
@@ -358,30 +419,6 @@ ifdef ARCHNAME
BIN
:=
$(BIN)
/
$(ARCHNAME)
endif
# 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
OBJDUMP_OPTS
?=
--wide
--source
--line-numbers
LD
=
$(CC)
...
...
src/am_map.c
View file @
4985d943
...
...
@@ -931,11 +931,8 @@ static inline void AM_drawWalls(void)
l
.
b
.
y
=
lines
[
i
].
v2
->
y
>>
FRACTOMAPBITS
;
#define SLOPEPARAMS(slope, end1, end2, normalheight) \
if (slope) { \
end1 = P_GetZAt(slope, lines[i].v1->x, lines[i].v1->y); \
end2 = P_GetZAt(slope, lines[i].v2->x, lines[i].v2->y); \
} else \
end1 = end2 = normalheight;
end1 = P_GetZAt(slope, lines[i].v1->x, lines[i].v1->y, normalheight); \
end2 = P_GetZAt(slope, lines[i].v2->x, lines[i].v2->y, normalheight);
SLOPEPARAMS
(
lines
[
i
].
frontsector
->
f_slope
,
frontf1
,
frontf2
,
lines
[
i
].
frontsector
->
floorheight
)
SLOPEPARAMS
(
lines
[
i
].
frontsector
->
c_slope
,
frontc1
,
frontc2
,
lines
[
i
].
frontsector
->
ceilingheight
)
...
...
src/blua/lbaselib.c
View file @
4985d943
...
...
@@ -11,6 +11,10 @@
#include <stdlib.h>
#include <string.h>
#include "../doomdef.h"
#include "../lua_script.h"
#include "../w_wad.h"
#define lbaselib_c
#define LUA_LIB
...
...
@@ -263,6 +267,27 @@ static int luaB_ipairs (lua_State *L) {
}
// Edited to load PK3 entries instead
static
int
luaB_dofile
(
lua_State
*
L
)
{
const
char
*
filename
=
luaL_checkstring
(
L
,
1
);
char
fullfilename
[
256
];
UINT16
lumpnum
;
int
n
=
lua_gettop
(
L
);
if
(
wadfiles
[
numwadfiles
-
1
]
->
type
!=
RET_PK3
)
luaL_error
(
L
,
"dofile() only works with PK3 files"
);
snprintf
(
fullfilename
,
sizeof
(
fullfilename
),
"Lua/%s"
,
filename
);
lumpnum
=
W_CheckNumForFullNamePK3
(
fullfilename
,
numwadfiles
-
1
,
0
);
if
(
lumpnum
==
INT16_MAX
)
luaL_error
(
L
,
"can't find script "
LUA_QS
,
fullfilename
);
LUA_LoadLump
(
numwadfiles
-
1
,
lumpnum
,
false
);
return
lua_gettop
(
L
)
-
n
;
}
static
int
luaB_assert
(
lua_State
*
L
)
{
luaL_checkany
(
L
,
1
);
if
(
!
lua_toboolean
(
L
,
1
))
...
...
@@ -380,6 +405,7 @@ static const luaL_Reg base_funcs[] = {
{
"assert"
,
luaB_assert
},
{
"collectgarbage"
,
luaB_collectgarbage
},
{
"error"
,
luaB_error
},
{
"dofile"
,
luaB_dofile
},
{
"gcinfo"
,
luaB_gcinfo
},
{
"getfenv"
,
luaB_getfenv
},
{
"getmetatable"
,
luaB_getmetatable
},
...
...
src/blua/liolib.c
View file @
4985d943
...
...
@@ -284,8 +284,16 @@ void Got_LuaFile(UINT8 **cp, INT32 playernum)
// Push the first argument (file handle or nil) on the stack
if
(
success
)
{
char
mode
[
4
];
// Ensure we are opening in binary mode
// (if it's a text file, newlines have been converted already)
strcpy
(
mode
,
luafiletransfers
->
mode
);
if
(
!
strchr
(
mode
,
'b'
))
strcat
(
mode
,
"b"
);
pf
=
newfile
(
gL
);
// Create and push the file handle
*
pf
=
fopen
(
luafiletransfers
->
realfilename
,
luafiletransfers
->
mode
);
// Open the file
*
pf
=
fopen
(
luafiletransfers
->
realfilename
,
mode
);
// Open the file
if
(
!*
pf
)
I_Error
(
"Can't open file
\"
%s
\"\n
"
,
luafiletransfers
->
realfilename
);
// The file SHOULD exist
}
...
...
@@ -313,17 +321,14 @@ void Got_LuaFile(UINT8 **cp, INT32 playernum)
RemoveLuaFileTransfer
();
if
(
server
&&
luafiletransfers
)
if
(
waitingforluafilecommand
)
{
if
(
FIL_FileOK
(
luafiletransfers
->
realfilename
))
SV_PrepareSendLuaFileToNextNode
();
else
{
// Send a net command with 0 as its first byte to indicate the file couldn't be opened
success
=
0
;
SendNetXCmd
(
XD_LUAFILE
,
&
success
,
1
);
}
waitingforluafilecommand
=
false
;
CL_PrepareDownloadLuaFile
();
}
if
(
server
&&
luafiletransfers
)
SV_PrepareSendLuaFile
();
}
...
...
src/command.c
View file @
4985d943
...
...
@@ -1574,7 +1574,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
// send the value of the variable
UINT8
buf
[
128
];
UINT8
*
p
=
buf
;
if
(
!
(
server
||
(
IsPlayerAdmin
(
consoleplayer
))))
if
(
!
(
server
||
(
addedtogame
&&
IsPlayerAdmin
(
consoleplayer
))))
{
CONS_Printf
(
M_GetText
(
"Only the server or admin can change: %s %s
\n
"
),
var
->
name
,
var
->
string
);
return
;
...
...
src/config.h.in
View file @
4985d943
...
...
@@ -30,12 +30,14 @@
* Last updated 2020 / 02 / 22 - v2.2.2 - patch.pk3
* Last updated 2020 / 05 / 10 - v2.2.3 - player.dta & patch.pk3
* Last updated 2020 / 05 / 11 - v2.2.4 - patch.pk3
* Last updated 2020 / 07 / 07 - v2.2.5 - player.dta & patch.pk3
* Last updated 2020 / 07 / 10 - v2.2.6 - player.dta & patch.pk3
*/
#define ASSET_HASH_SRB2_PK3 "0277c9416756627004e83cbb5b2e3e28"
#define ASSET_HASH_ZONES_PK3 "f7e88afb6af7996a834c7d663144bead"
#define ASSET_HASH_PLAYER_DTA "
8a4507ddf9bc0682c09174400f26ad65
"
#define ASSET_HASH_PLAYER_DTA "
49dad7b24634c89728cc3e0b689e12bb
"
#ifdef USE_PATCH_DTA
#define ASSET_HASH_PATCH_PK3 "
bbbf6af3b20349612ee06e0b55979a76
"
#define ASSET_HASH_PATCH_PK3 "
ecf00060f03c76b3e49c6ae3925b627f
"
#endif
#endif
...
...
src/console.c
View file @
4985d943
...
...
@@ -770,7 +770,7 @@ boolean CON_Responder(event_t *ev)
// check for console toggle key
if
(
ev
->
type
!=
ev_console
)
{
if
(
modeattacking
||
metalrecording
)
if
(
modeattacking
||
metalrecording
||
marathonmode
)
return
false
;
if
(
key
==
gamecontrol
[
gc_console
][
0
]
||
key
==
gamecontrol
[
gc_console
][
1
])
...
...
@@ -1649,10 +1649,7 @@ void CON_Drawer(void)
return
;
if
(
needpatchrecache
)
{
W_FlushCachedPatches
();
HU_LoadGraphics
();
}
if
(
con_recalc
)
{
...
...
src/d_clisrv.c
View file @
4985d943
This diff is collapsed.
Click to expand it.
src/d_clisrv.h
View file @
4985d943
...
...
@@ -33,7 +33,8 @@ applications may follow different packet versions.
// be transmitted.
// Networking and tick handling related.
#define BACKUPTICS 96
#define BACKUPTICS 1024
#define CLIENTBACKUPTICS 32
#define MAXTEXTCMD 256
//
// Packet structure
...
...
@@ -75,6 +76,8 @@ typedef enum
// In addition, this packet can't occupy all the available slots.
PT_FILEFRAGMENT
=
PT_CANFAIL
,
// A part of a file.
PT_FILEACK
,
PT_FILERECEIVED
,
PT_TEXTCMD
,
// Extra text commands from the client.
PT_TEXTCMD2
,
// Splitscreen text commands.
...
...
@@ -128,7 +131,7 @@ typedef struct
// this packet is too large
typedef
struct
{
UINT8
starttic
;
tic_t
starttic
;
UINT8
numtics
;
UINT8
numslots
;
// "Slots filled": Highest player number in use plus one.
ticcmd_t
cmds
[
45
];
// Normally [BACKUPTIC][MAXPLAYERS] but too large
...
...
@@ -171,6 +174,9 @@ typedef struct
UINT32
pflags
;
// pflags_t
UINT8
panim
;
// panim_t
INT16
angleturn
;
INT16
oldrelangleturn
;
angle_t
aiming
;
INT32
currentweapon
;
INT32
ringweapons
;
...
...
@@ -188,7 +194,7 @@ typedef struct
SINT8
xtralife
;
SINT8
pity
;
UINT
8
skincolor
;
UINT
16
skincolor
;
INT32
skin
;
UINT32
availabilities
;
// Just in case Lua does something like
...
...
@@ -308,7 +314,7 @@ typedef struct
// 0xFF == not in game; else player skin num
UINT8
playerskins
[
MAXPLAYERS
];
UINT
8
playercolor
[
MAXPLAYERS
];
UINT
16
playercolor
[
MAXPLAYERS
];
UINT32
playeravailabilities
[
MAXPLAYERS
];
UINT8
gametype
;
...
...
@@ -320,13 +326,30 @@ typedef struct
UINT8
varlengthinputs
[
0
];
// Playernames and netvars
}
ATTRPACK
serverconfig_pak
;
typedef
struct
{
typedef
struct
{
UINT8
fileid
;
UINT32
filesize
;
UINT8
iteration
;
UINT32
position
;
UINT16
size
;
UINT8
data
[
0
];
// Size is variable using hardware_MAXPACKETLENGTH
}
ATTRPACK
filetx_pak
;
typedef
struct
{
UINT32
start
;
UINT32
acks
;
}
ATTRPACK
fileacksegment_t
;
typedef
struct
{
UINT8
fileid
;
UINT8
iteration
;
UINT8
numsegments
;
fileacksegment_t
segments
[
0
];
}
ATTRPACK
fileack_pak
;
#ifdef _MSC_VER
#pragma warning(default : 4200)
#endif
...
...
@@ -414,7 +437,7 @@ typedef struct
{
char
name
[
MAXPLAYERNAME
+
1
];
UINT8
skin
;
UINT
8
color
;
UINT
16
color
;
UINT32
pflags
;
UINT32
score
;
UINT8
ctfteam
;
...
...
@@ -442,6 +465,8 @@ typedef struct
UINT8
resynchgot
;
//
UINT8
textcmd
[
MAXTEXTCMD
+
1
];
// 66049 bytes (wut??? 64k??? More like 257 bytes...)
filetx_pak
filetxpak
;
// 139 bytes
fileack_pak
fileack
;
UINT8
filereceived
;
clientconfig_pak
clientcfg
;
// 136 bytes
UINT8
md5sum
[
16
];
serverinfo_pak
serverinfo
;
// 1024 bytes
...
...
@@ -520,7 +545,7 @@ extern consvar_t cv_resynchattempts, cv_blamecfail;
extern
consvar_t
cv_maxsend
,
cv_noticedownload
,
cv_downloadspeed
;
// Used in d_net, the only dependence
tic_t
ExpandTics
(
INT32
low
);
tic_t
ExpandTics
(
INT32
low
,
INT32
node
);
void
D_ClientServerInit
(
void
);
// Initialise the other field
...
...
@@ -534,7 +559,6 @@ void NetUpdate(void);
void
SV_StartSinglePlayerServer
(
void
);
boolean
SV_SpawnServer
(
void
);
void
SV_SpawnPlayer
(
INT32
playernum
,
INT32
x
,
INT32
y
,
angle_t
angle
);
void
SV_StopServer
(
void
);
void
SV_ResetServer
(
void
);
void
CL_AddSplitscreenPlayer
(
void
);
...
...
src/d_main.c
View file @
4985d943
...
...
@@ -93,6 +93,10 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#include "lua_script.h"
// Version numbers for netplay :upside_down_face:
int
VERSION
;
int
SUBVERSION
;
// platform independant focus loss
UINT8
window_notinfocus
=
false
;
...
...
@@ -125,7 +129,11 @@ boolean advancedemo;
INT32
debugload
=
0
;
#endif
UINT16
numskincolors
;
menucolor_t
*
menucolorhead
,
*
menucolortail
;
char
savegamename
[
256
];
char
liveeventbackup
[
256
];
char
srb2home
[
256
]
=
"."
;
char
srb2path
[
256
]
=
"."
;
...
...
@@ -413,6 +421,7 @@ static void D_Display(void)
if
(
!
automapactive
&&
!
dedicated
&&
cv_renderview
.
value
)
{
rs_rendercalltime
=
I_GetTimeMicros
();
if
(
players
[
displayplayer
].
mo
||
players
[
displayplayer
].
playerstate
==
PST_DEAD
)
{
topleft
=
screens
[
0
]
+
viewwindowy
*
vid
.
width
+
viewwindowx
;
...
...
@@ -459,6 +468,7 @@ static void D_Display(void)
if
(
postimgtype2
)
V_DoPostProcessor
(
1
,
postimgtype2
,
postimgparam2
);
}
rs_rendercalltime
=
I_GetTimeMicros
()
-
rs_rendercalltime
;