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
265
Issues
265
List
Board
Labels
Milestones
Merge Requests
68
Merge Requests
68
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
STJr
SRB2
Commits
b642682d
Commit
b642682d
authored
Dec 16, 2020
by
Nev3r
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'next' of
https://git.do.srb2.org/STJr/SRB2
into lua-tag-iterator
# Conflicts: # src/doomtype.h
parents
d0f3a6d7
98e67871
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
74 changed files
with
1024 additions
and
886 deletions
+1024
-886
Makefile
src/Makefile
+1
-89
Makefile.cfg
src/Makefile.cfg
+2
-2
lcode.c
src/blua/lcode.c
+12
-19
console.c
src/console.c
+39
-21
d_clisrv.c
src/d_clisrv.c
+26
-23
d_main.c
src/d_main.c
+8
-12
d_netcmd.c
src/d_netcmd.c
+12
-13
d_netcmd.h
src/d_netcmd.h
+0
-2
d_player.h
src/d_player.h
+3
-1
deh_tables.c
src/deh_tables.c
+40
-4
dehacked.c
src/dehacked.c
+6
-0
doomdef.h
src/doomdef.h
+0
-3
doomtype.h
src/doomtype.h
+4
-0
f_finale.c
src/f_finale.c
+2
-0
g_demo.c
src/g_demo.c
+0
-2
g_game.c
src/g_game.c
+27
-2
g_game.h
src/g_game.h
+0
-2
hw_batching.c
src/hardware/hw_batching.c
+4
-4
hw_batching.h
src/hardware/hw_batching.h
+1
-1
hw_cache.c
src/hardware/hw_cache.c
+59
-14
hw_data.h
src/hardware/hw_data.h
+11
-2
hw_draw.c
src/hardware/hw_draw.c
+2
-2
hw_light.c
src/hardware/hw_light.c
+1
-0
hw_main.c
src/hardware/hw_main.c
+21
-21
hw_main.h
src/hardware/hw_main.h
+7
-7
hw_md2.c
src/hardware/hw_md2.c
+14
-3
i_system.h
src/i_system.h
+7
-1
i_tcp.c
src/i_tcp.c
+120
-126
info.c
src/info.c
+22
-18
info.h
src/info.h
+8
-4
lua_baselib.c
src/lua_baselib.c
+2
-0
lua_hook.h
src/lua_hook.h
+2
-5
lua_hooklib.c
src/lua_hooklib.c
+7
-9
lua_hudlib.c
src/lua_hudlib.c
+4
-2
lua_libs.h
src/lua_libs.h
+2
-0
lua_maplib.c
src/lua_maplib.c
+2
-0
lua_mathlib.c
src/lua_mathlib.c
+12
-0
lua_playerlib.c
src/lua_playerlib.c
+8
-0
lua_skinlib.c
src/lua_skinlib.c
+62
-5
m_anigif.c
src/m_anigif.c
+7
-7
m_menu.c
src/m_menu.c
+16
-24
m_misc.c
src/m_misc.c
+29
-7
m_misc.h
src/m_misc.h
+1
-1
m_perfstats.c
src/m_perfstats.c
+0
-0
m_perfstats.h
src/m_perfstats.h
+7
-7
p_enemy.c
src/p_enemy.c
+9
-1
p_floor.c
src/p_floor.c
+0
-2
p_inter.c
src/p_inter.c
+7
-3
p_local.h
src/p_local.h
+1
-2
p_map.c
src/p_map.c
+19
-11
p_mobj.c
src/p_mobj.c
+67
-53
p_saveg.c
src/p_saveg.c
+10
-36
p_setup.c
src/p_setup.c
+17
-17
p_spec.c
src/p_spec.c
+14
-8
p_tick.c
src/p_tick.c
+9
-9
p_user.c
src/p_user.c
+53
-40
r_draw.h
src/r_draw.h
+11
-7
r_main.c
src/r_main.c
+20
-20
r_main.h
src/r_main.h
+9
-9
r_picformats.c
src/r_picformats.c
+5
-4
r_plane.c
src/r_plane.c
+5
-5
r_segs.c
src/r_segs.c
+3
-3
r_skins.c
src/r_skins.c
+4
-0
r_textures.c
src/r_textures.c
+1
-1
s_sound.c
src/s_sound.c
+2
-2
i_system.c
src/sdl/i_system.c
+18
-115
i_video.c
src/sdl/i_video.c
+1
-2
mixer_sound.c
src/sdl/mixer_sound.c
+4
-0
st_stuff.c
src/st_stuff.c
+0
-2
w_wad.c
src/w_wad.c
+103
-30
w_wad.h
src/w_wad.h
+1
-1
Makefile.cfg
src/win32/Makefile.cfg
+1
-30
y_inter.c
src/y_inter.c
+4
-2
z_zone.c
src/z_zone.c
+6
-6
No files found.
src/Makefile
View file @
b642682d
...
...
@@ -13,8 +13,7 @@
# -DHAVE_SDL -> use for the SDL interface
#
# Sets:
# Compile the DirectX/Mingw version with 'make MINGW=1'
# Compile the SDL/Mingw version with 'make MINGW=1 SDL=1'
# Compile the SDL/Mingw version with 'make MINGW=1'
# Compile the SDL/Linux version with 'make LINUX=1'
# Compile the SDL/Solaris version with 'make SOLARIS=1'
# Compile the SDL/FreeBSD version with 'gmake FREEBSD=1'
...
...
@@ -103,7 +102,6 @@ ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
# go for a 32-bit sdl mingw exe by default
MINGW
=
1
SDL
=
1
WINDOWSHELL
=
1
else
# if you on the *nix
...
...
@@ -568,12 +566,6 @@ all: pre-build $(BIN)/$(PNDNAME)
endif
ifdef
MINGW
ifndef
SDL
all
:
pre-build $(BIN)/$(EXENAME) dll
endif
endif
ifdef
SDL
all
:
pre-build $(BIN)/$(EXENAME)
endif
...
...
@@ -653,57 +645,6 @@ endif
$(OBJDIR)
:
-
$(MKDIR)
$(OBJDIR)
ifndef
SDL
ifdef
NOHW
dll
:
else
dll
:
opengl_dll
endif
ifdef
MINGW
all_dll
:
opengl_dll ds3d_dll fmod_dll openal_dll
opengl_dll
:
$(BIN)/r_opengl.dll
$(BIN)/r_opengl.dll
:
$(OBJDIR)/ogl_win.o $(OBJDIR)/r_opengl.o
-
$(MKDIR)
$(BIN)
@
echo
Linking R_OpenGL.dll...
$(CC)
--shared
$^
-o
$@
-g
-Wl
,--add-stdcall-alias
-lgdi32
-static-libgcc
ifndef
NOUPX
-$(UPX)
$(UPX_OPTS)
$@
endif
ds3d_dll
:
$(BIN)/s_ds3d.dll
$(BIN)/s_ds3d.dll
:
$(OBJDIR)/s_ds3d.o
@
echo
Linking S_DS3d.dll...
$(CC)
--shared
$^
-o
$@
-g
-Wl
,--add-stdcall-alias
-ldsound
-luuid
fmod_dll
:
$(BIN)/s_fmod.dll
$(BIN)/s_fmod.dll
:
$(OBJDIR)/s_fmod.o
-
$(MKDIR)
$(BIN)
@
echo
Linking S_FMOD.dll...
$(CC)
--shared
$^
-o
$@
-g
-Wl
,--add-stdcall-alias
-lfmod
openal_dll
:
$(BIN)/s_openal.dll
$(BIN)/s_openal.dll
:
$(OBJDIR)/s_openal.o
-
$(MKDIR)
$(BIN)
@
echo
Linking S_OpenAL.dll...
$(CC)
--shared
$^
-o
$@
-g
-Wl
,--add-stdcall-alias
-lopenal32
else
all_dll
:
fmod_so openal_so
fmod_so
:
$(BIN)/s_fmod.so
$(BIN)/s_fmod.so
:
$(OBJDIR)/s_fmod.o
-
$(MKDIR)
$(BIN)
@
echo
Linking S_FMOD.so...
$(CC)
--shared
$^
-o
$@
-g
--nostartfiles
-lm
-lfmod
openal_so
:
$(BIN)/s_openal.so
$(BIN)/s_openal.so
:
$(OBJDIR)/s_openal.o
-
$(MKDIR)
$(BIN)
@
echo
Linking S_OpenAL.so...
$(CC)
--shared
$^
-o
$@
-g
--nostartfiles
-lm
-lopenal
endif
else
ifdef
SDL
ifdef
MINGW
$(OBJDIR)/r_opengl.o
:
hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
\
...
...
@@ -728,8 +669,6 @@ $(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
endif
endif
endif
#dependecy made by gcc itself !
$(OBJS)
:
ifndef
DUMMY
...
...
@@ -804,33 +743,6 @@ $(OBJDIR)/SRB2.res: win32/Srb2win.rc win32/afxres.h win32/resource.h
$(WINDRES)
-i
$<
-O
rc
$(WINDRESFLAGS)
--include-dir
=
win32
-o
$@
-O
coff
ifdef
MINGW
ifndef
SDL
ifndef
NOHW
$(OBJDIR)/r_opengl.o
:
hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
\
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h
\
command.h hardware/hw_data.h hardware/hw_defs.h
\
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h
\
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h
\
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h
\
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(echoName)
$(CC)
$(CFLAGS)
$(WFLAGS)
-D_WINDOWS
-mwindows
-c
$<
-o
$@
$(OBJDIR)/ogl_win.o
:
hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h
\
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h
\
command.h hardware/hw_data.h hardware/hw_defs.h
\
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h
\
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h
\
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h
\
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(echoName)
$(CC)
$(CFLAGS)
$(WFLAGS)
-D_WINDOWS
-mwindows
-c
$<
-o
$@
endif
endif
endif
ifdef
SDL
ifdef
MINGW
...
...
src/Makefile.cfg
View file @
b642682d
...
...
@@ -420,14 +420,14 @@ ifdef CYGWIN32
BIN
:=
$(BIN)
/Cygwin
else
ifdef
MINGW64
INTERFACE
=
win32
#NASMFORMAT=win64
SDL
=
1
OBJDIR
:=
$(OBJDIR)
/Mingw64
BIN
:=
$(BIN)
/Mingw64
else
ifdef
MINGW
INTERFACE
=
win32
NASMFORMAT
=
win32
SDL
=
1
OBJDIR
:=
$(OBJDIR)
/Mingw
BIN
:=
$(BIN)
/Mingw
endif
...
...
src/blua/lcode.c
View file @
b642682d
...
...
@@ -686,6 +686,15 @@ static void codearith (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2) {
}
static
void
codeunaryarith
(
FuncState
*
fs
,
OpCode
op
,
expdesc
*
e
)
{
expdesc
e2
;
e2
.
t
=
e2
.
f
=
NO_JUMP
;
e2
.
k
=
VKNUM
;
e2
.
u
.
nval
=
0
;
if
(
op
==
OP_LEN
||
!
isnumeral
(
e
))
luaK_exp2anyreg
(
fs
,
e
);
/* cannot operate on non-numeric constants */
codearith
(
fs
,
op
,
e
,
&
e2
);
}
static
void
codecomp
(
FuncState
*
fs
,
OpCode
op
,
int
cond
,
expdesc
*
e1
,
expdesc
*
e2
)
{
int
o1
=
luaK_exp2RK
(
fs
,
e1
);
...
...
@@ -703,27 +712,11 @@ static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,
void
luaK_prefix
(
FuncState
*
fs
,
UnOpr
op
,
expdesc
*
e
)
{
expdesc
e2
;
e2
.
t
=
e2
.
f
=
NO_JUMP
;
e2
.
k
=
VKNUM
;
e2
.
u
.
nval
=
0
;
switch
(
op
)
{
case
OPR_MINUS
:
{
if
(
!
isnumeral
(
e
))
luaK_exp2anyreg
(
fs
,
e
);
/* cannot operate on non-numeric constants */
codearith
(
fs
,
OP_UNM
,
e
,
&
e2
);
break
;
}
case
OPR_BNOT
:
{
if
(
e
->
k
==
VK
)
luaK_exp2anyreg
(
fs
,
e
);
/* cannot operate on non-numeric constants */
codearith
(
fs
,
OP_BNOT
,
e
,
&
e2
);
break
;
}
case
OPR_MINUS
:
codeunaryarith
(
fs
,
OP_UNM
,
e
);
break
;
case
OPR_BNOT
:
codeunaryarith
(
fs
,
OP_BNOT
,
e
);
break
;
case
OPR_NOT
:
codenot
(
fs
,
e
);
break
;
case
OPR_LEN
:
{
luaK_exp2anyreg
(
fs
,
e
);
/* cannot operate on constants */
codearith
(
fs
,
OP_LEN
,
e
,
&
e2
);
break
;
}
case
OPR_LEN
:
codeunaryarith
(
fs
,
OP_LEN
,
e
);
break
;
default:
lua_assert
(
0
);
}
}
...
...
src/console.c
View file @
b642682d
...
...
@@ -360,30 +360,48 @@ static void CON_SetupColormaps(void)
for
(
i
=
0
;
i
<
(
256
*
15
);
i
++
,
++
memorysrc
)
*
memorysrc
=
(
UINT8
)(
i
&
0xFF
);
// remap each color to itself...
#define colset(map, a, b, c) \
map[1] = (UINT8)a;\
map[3] = (UINT8)b;\
map[9] = (UINT8)c
colset
(
magentamap
,
177
,
178
,
184
);
colset
(
yellowmap
,
82
,
73
,
66
);
colset
(
lgreenmap
,
97
,
98
,
106
);
colset
(
bluemap
,
146
,
147
,
155
);
colset
(
redmap
,
210
,
32
,
39
);
colset
(
graymap
,
6
,
8
,
14
);
colset
(
orangemap
,
51
,
52
,
57
);
colset
(
skymap
,
129
,
130
,
133
);
colset
(
purplemap
,
160
,
161
,
163
);
colset
(
aquamap
,
120
,
121
,
123
);
colset
(
peridotmap
,
88
,
188
,
190
);
colset
(
azuremap
,
144
,
145
,
170
);
colset
(
brownmap
,
219
,
221
,
224
);
colset
(
rosymap
,
200
,
201
,
203
);
colset
(
invertmap
,
27
,
26
,
22
);
invertmap
[
26
]
=
(
UINT8
)
3
;
#define colset(map, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \
map[0x0] = (UINT8)a;\
map[0x1] = (UINT8)b;\
map[0x2] = (UINT8)c;\
map[0x3] = (UINT8)d;\
map[0x4] = (UINT8)e;\
map[0x5] = (UINT8)f;\
map[0x6] = (UINT8)g;\
map[0x7] = (UINT8)h;\
map[0x8] = (UINT8)i;\
map[0x9] = (UINT8)j;\
map[0xA] = (UINT8)k;\
map[0xB] = (UINT8)l;\
map[0xC] = (UINT8)m;\
map[0xD] = (UINT8)n;\
map[0xE] = (UINT8)o;\
map[0xF] = (UINT8)p;
// Tried to keep the colors vanilla while adding some shades in between them ~SonicX8000
// 0x1 0x3 0x9 0xF
colset
(
magentamap
,
177
,
177
,
178
,
178
,
178
,
180
,
180
,
180
,
182
,
182
,
182
,
182
,
184
,
184
,
184
,
185
);
colset
(
yellowmap
,
82
,
82
,
73
,
73
,
73
,
64
,
64
,
64
,
66
,
66
,
66
,
66
,
67
,
67
,
67
,
68
);
colset
(
lgreenmap
,
96
,
96
,
98
,
98
,
98
,
101
,
101
,
101
,
104
,
104
,
104
,
104
,
106
,
106
,
106
,
107
);
colset
(
bluemap
,
146
,
146
,
147
,
147
,
147
,
149
,
149
,
149
,
152
,
152
,
152
,
152
,
155
,
155
,
155
,
157
);
colset
(
redmap
,
32
,
32
,
33
,
33
,
33
,
35
,
35
,
35
,
39
,
39
,
39
,
39
,
42
,
42
,
42
,
44
);
colset
(
graymap
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
);
colset
(
orangemap
,
50
,
50
,
52
,
52
,
52
,
54
,
54
,
54
,
56
,
56
,
56
,
56
,
59
,
59
,
59
,
60
);
colset
(
skymap
,
129
,
129
,
130
,
130
,
130
,
131
,
131
,
131
,
133
,
133
,
133
,
133
,
135
,
135
,
135
,
136
);
colset
(
purplemap
,
160
,
160
,
161
,
161
,
161
,
162
,
162
,
162
,
163
,
163
,
163
,
163
,
164
,
164
,
164
,
165
);
colset
(
aquamap
,
120
,
120
,
121
,
121
,
121
,
122
,
122
,
122
,
123
,
123
,
123
,
123
,
124
,
124
,
124
,
125
);
colset
(
peridotmap
,
72
,
72
,
188
,
188
,
189
,
189
,
189
,
189
,
190
,
190
,
190
,
190
,
191
,
191
,
191
,
94
);
colset
(
azuremap
,
144
,
144
,
145
,
145
,
145
,
146
,
146
,
146
,
170
,
170
,
170
,
170
,
171
,
171
,
171
,
172
);
colset
(
brownmap
,
219
,
219
,
221
,
221
,
221
,
222
,
222
,
222
,
224
,
224
,
224
,
224
,
227
,
227
,
227
,
229
);
colset
(
rosymap
,
200
,
200
,
201
,
201
,
201
,
202
,
202
,
202
,
203
,
203
,
203
,
203
,
204
,
204
,
204
,
205
);
#undef colset
// Yeah just straight up invert it like a normal person
for
(
i
=
0x00
;
i
<=
0x1F
;
i
++
)
invertmap
[
0x1F
-
i
]
=
i
;
// Init back colormap
CON_SetupBackColormap
();
}
...
...
src/d_clisrv.c
View file @
b642682d
...
...
@@ -1595,9 +1595,7 @@ static void CL_ReloadReceivedSavegame(void)
for
(
i
=
0
;
i
<
MAXPLAYERS
;
i
++
)
{
#ifdef HAVE_BLUA
LUA_InvalidatePlayer
(
&
players
[
i
]);
#endif
sprintf
(
player_names
[
i
],
"Player %d"
,
i
+
1
);
}
...
...
@@ -2260,11 +2258,15 @@ void D_SaveBan(void)
size_t
i
;
banreason_t
*
reasonlist
=
reasonhead
;
const
char
*
address
,
*
mask
;
const
char
*
path
=
va
(
"%s"
PATHSEP
"%s"
,
srb2home
,
"ban.txt"
);
if
(
!
reasonhead
)
{
remove
(
path
);
return
;
}
f
=
fopen
(
va
(
"%s"
PATHSEP
"%s"
,
srb2home
,
"ban.txt"
)
,
"w"
);
f
=
fopen
(
path
,
"w"
);
if
(
!
f
)
{
...
...
@@ -2308,16 +2310,14 @@ static void Ban_Add(const char *reason)
reasontail
=
reasonlist
;
}
static
void
Command_ClearBans
(
void
)
static
void
Ban_Clear
(
void
)
{
banreason_t
*
temp
;
if
(
!
I_ClearBans
)
return
;
I_ClearBans
();
D_SaveBan
();
reasontail
=
NULL
;
while
(
reasonhead
)
{
temp
=
reasonhead
->
next
;
...
...
@@ -2327,6 +2327,15 @@ static void Command_ClearBans(void)
}
}
static
void
Command_ClearBans
(
void
)
{
if
(
!
I_ClearBans
)
return
;
Ban_Clear
();
D_SaveBan
();
}
static
void
Ban_Load_File
(
boolean
warning
)
{
FILE
*
f
;
...
...
@@ -2334,6 +2343,9 @@ static void Ban_Load_File(boolean warning)
const
char
*
address
,
*
mask
;
char
buffer
[
MAX_WADPATH
];
if
(
!
I_ClearBans
)
return
;
f
=
fopen
(
va
(
"%s"
PATHSEP
"%s"
,
srb2home
,
"ban.txt"
),
"r"
);
if
(
!
f
)
...
...
@@ -2343,13 +2355,7 @@ static void Ban_Load_File(boolean warning)
return
;
}
if
(
I_ClearBans
)
Command_ClearBans
();
else
{
fclose
(
f
);
return
;
}
Ban_Clear
();
for
(
i
=
0
;
fgets
(
buffer
,
(
int
)
sizeof
(
buffer
),
f
);
i
++
)
{
...
...
@@ -3026,8 +3032,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
if
(
pnum
==
consoleplayer
)
{
if
(
Playing
())
LUAh_GameQuit
();
LUAh_GameQuit
(
false
);
#ifdef DUMPCONSISTENCY
if
(
msg
==
KICK_MSG_CON_FAIL
)
SV_SavedGame
();
#endif
...
...
@@ -3727,8 +3732,7 @@ static void HandleConnect(SINT8 node)
static
void
HandleShutdown
(
SINT8
node
)
{
(
void
)
node
;
if
(
Playing
())
LUAh_GameQuit
();
LUAh_GameQuit
(
false
);
D_QuitNetGame
();
CL_Reset
();
D_StartTitle
();
...
...
@@ -3743,8 +3747,7 @@ static void HandleShutdown(SINT8 node)
static
void
HandleTimeout
(
SINT8
node
)
{
(
void
)
node
;
if
(
Playing
())
LUAh_GameQuit
();
LUAh_GameQuit
(
false
);
D_QuitNetGame
();
CL_Reset
();
D_StartTitle
();
...
...
@@ -4847,14 +4850,14 @@ void TryRunTics(tic_t realtics)
{
DEBFILE
(
va
(
"============ Running tic %d (local %d)
\n
"
,
gametic
,
localgametic
));
ps_tictime
=
I_Get
TimeMicros
();
ps_tictime
=
I_Get
PreciseTime
();
G_Ticker
((
gametic
%
NEWTICRATERATIO
)
==
0
);
ExtraDataTicker
();
gametic
++
;
consistancy
[
gametic
%
BACKUPTICS
]
=
Consistancy
();
ps_tictime
=
I_Get
TimeMicros
()
-
ps_tictime
;
ps_tictime
=
I_Get
PreciseTime
()
-
ps_tictime
;
// Leave a certain amount of tics present in the net buffer as long as we've ran at least one tic this frame.
if
(
client
&&
gamestate
==
GS_LEVEL
&&
leveltime
>
3
&&
neededtic
<=
gametic
+
cv_netticbuffer
.
value
)
...
...
src/d_main.c
View file @
b642682d
...
...
@@ -413,7 +413,7 @@ static void D_Display(void)
if
(
!
automapactive
&&
!
dedicated
&&
cv_renderview
.
value
)
{
ps_rendercalltime
=
I_Get
TimeMicros
();
ps_rendercalltime
=
I_Get
PreciseTime
();
if
(
players
[
displayplayer
].
mo
||
players
[
displayplayer
].
playerstate
==
PST_DEAD
)
{
topleft
=
screens
[
0
]
+
viewwindowy
*
vid
.
width
+
viewwindowx
;
...
...
@@ -460,7 +460,7 @@ static void D_Display(void)
if
(
postimgtype2
)
V_DoPostProcessor
(
1
,
postimgtype2
,
postimgparam2
);
}
ps_rendercalltime
=
I_Get
TimeMicros
()
-
ps_rendercalltime
;
ps_rendercalltime
=
I_Get
PreciseTime
()
-
ps_rendercalltime
;
}
if
(
lastdraw
)
...
...
@@ -474,7 +474,7 @@ static void D_Display(void)
lastdraw
=
false
;
}
ps_uitime
=
I_Get
TimeMicros
();
ps_uitime
=
I_Get
PreciseTime
();
if
(
gamestate
==
GS_LEVEL
)
{
...
...
@@ -487,7 +487,7 @@ static void D_Display(void)
}
else
{
ps_uitime
=
I_Get
TimeMicros
();
ps_uitime
=
I_Get
PreciseTime
();
}
}
...
...
@@ -529,7 +529,7 @@ static void D_Display(void)
CON_Drawer
();
ps_uitime
=
I_Get
TimeMicros
()
-
ps_uitime
;
ps_uitime
=
I_Get
PreciseTime
()
-
ps_uitime
;
//
// wipe update
...
...
@@ -615,9 +615,9 @@ static void D_Display(void)
M_DrawPerfStats
();
}
ps_swaptime
=
I_Get
TimeMicros
();
ps_swaptime
=
I_Get
PreciseTime
();
I_FinishUpdate
();
// page flip or blit buffer
ps_swaptime
=
I_Get
TimeMicros
()
-
ps_swaptime
;
ps_swaptime
=
I_Get
PreciseTime
()
-
ps_swaptime
;
}
}
...
...
@@ -998,7 +998,7 @@ static void IdentifyVersion(void)
#define MUSICTEST(str) \
{\
const char *musicpath = va(pandf,srb2waddir,str);\
int ms = W_VerifyNMUSlumps(musicpath); \
int ms = W_VerifyNMUSlumps(musicpath
, false
); \
if (ms == 1) \
D_AddFile(startupwadfiles, musicpath); \
else if (ms == 0) \
...
...
@@ -1187,11 +1187,7 @@ void D_SRB2Main(void)
const
char
*
s
=
M_GetNextParm
();
if
(
s
)
// Check for NULL?
{
if
(
!
W_VerifyNMUSlumps
(
s
))
G_SetGameModified
(
true
);
D_AddFile
(
startuppwads
,
s
);
}
}
}
}
...
...
src/d_netcmd.c
View file @
b642682d
...
...
@@ -214,11 +214,9 @@ consvar_t cv_respawntime = CVAR_INIT ("respawndelay", "3", CV_SAVE|CV_NETVAR|CV_
consvar_t
cv_competitionboxes
=
CVAR_INIT
(
"competitionboxes"
,
"Mystery"
,
CV_SAVE
|
CV_NETVAR
|
CV_CHEAT
,
competitionboxes_cons_t
,
NULL
);
#ifdef SEENAMES
static
CV_PossibleValue_t
seenames_cons_t
[]
=
{{
0
,
"Off"
},
{
1
,
"Colorless"
},
{
2
,
"Team"
},
{
3
,
"Ally/Foe"
},
{
0
,
NULL
}};
consvar_t
cv_seenames
=
CVAR_INIT
(
"seenames"
,
"Ally/Foe"
,
CV_SAVE
,
seenames_cons_t
,
0
);
consvar_t
cv_allowseenames
=
CVAR_INIT
(
"allowseenames"
,
"Yes"
,
CV_SAVE
|
CV_NETVAR
,
CV_YesNo
,
NULL
);
#endif
// names
consvar_t
cv_playername
=
CVAR_INIT
(
"name"
,
"Sonic"
,
CV_SAVE
|
CV_CALL
|
CV_NOINIT
,
NULL
,
Name_OnChange
);
...
...
@@ -597,9 +595,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar
(
&
cv_pingtimeout
);
CV_RegisterVar
(
&
cv_showping
);
#ifdef SEENAMES
CV_RegisterVar
(
&
cv_allowseenames
);
#endif
CV_RegisterVar
(
&
cv_allowseenames
);
CV_RegisterVar
(
&
cv_dummyconsvar
);
}
...
...
@@ -670,6 +666,7 @@ void D_RegisterClientCommands(void)
CV_RegisterVar
(
&
cv_zlib_strategya
);
CV_RegisterVar
(
&
cv_zlib_window_bitsa
);
CV_RegisterVar
(
&
cv_apng_delay
);
CV_RegisterVar
(
&
cv_apng_downscale
);
// GIF variables
CV_RegisterVar
(
&
cv_gif_optimize
);
CV_RegisterVar
(
&
cv_gif_downscale
);
...
...
@@ -690,9 +687,7 @@ void D_RegisterClientCommands(void)
CV_RegisterVar
(
&
cv_defaultplayercolor2
);
CV_RegisterVar
(
&
cv_defaultskin2
);
#ifdef SEENAMES
CV_RegisterVar
(
&
cv_seenames
);
#endif
CV_RegisterVar
(
&
cv_rollingdemos
);
CV_RegisterVar
(
&
cv_netstat
);
CV_RegisterVar
(
&
cv_netticbuffer
);
...
...
@@ -878,7 +873,7 @@ void D_RegisterClientCommands(void)
// CV_RegisterVar(&cv_snapto);
CV_RegisterVar
(
&
cv_freedemocamera
);
// add cheat commands
COM_AddCommand
(
"noclip"
,
Command_CheatNoClip_f
);
COM_AddCommand
(
"god"
,
Command_CheatGod_f
);
...
...
@@ -3294,7 +3289,13 @@ static void Command_Addfile(void)
if
(
!
isprint
(
fn
[
i
])
||
fn
[
i
]
==
';'
)
return
;
musiconly
=
W_VerifyNMUSlumps
(
fn
);
musiconly
=
W_VerifyNMUSlumps
(
fn
,
false
);
if
(
musiconly
==
-
1
)
{
addedfiles
[
numfilesadded
++
]
=
fn
;
continue
;
}
if
(
!
musiconly
)
{
...
...
@@ -3606,8 +3607,7 @@ static void Command_Playintro_f(void)
*/
FUNCNORETURN
static
ATTRNORETURN
void
Command_Quit_f
(
void
)
{
if
(
Playing
())
LUAh_GameQuit
();
LUAh_GameQuit
(
true
);
I_Quit
();
}
...
...
@@ -4269,8 +4269,7 @@ void Command_ExitGame_f(void)
{
INT32
i
;
if
(
Playing
())
LUAh_GameQuit
();
LUAh_GameQuit
(
false
);
D_QuitNetGame
();
CL_Reset
();
...
...
src/d_netcmd.h
View file @
b642682d
...
...
@@ -31,9 +31,7 @@ extern consvar_t cv_defaultskin;
extern
consvar_t
cv_defaultplayercolor2
;
extern
consvar_t
cv_defaultskin2
;
#ifdef SEENAMES
extern
consvar_t
cv_seenames
,
cv_allowseenames
;
#endif
extern
consvar_t
cv_usemouse
;
extern
consvar_t
cv_usejoystick
;
extern
consvar_t
cv_usejoystick2
;
...
...
src/d_player.h
View file @
b642682d
...
...
@@ -51,7 +51,9 @@ typedef enum
SF_NONIGHTSSUPER
=
1
<<
15
,
// Disable super colors for NiGHTS (if you have SF_SUPER)
SF_NOSUPERSPRITES
=
1
<<
16
,
// Don't use super sprites while super
SF_NOSUPERJUMPBOOST
=
1
<<
17
,
// Disable the jump boost given while super (i.e. Knuckles)
SF_CANBUSTWALLS
=
1
<<
18
,
// Can naturally bust walls on contact? (i.e. Knuckles)
SF_CANBUSTWALLS
=
1
<<
18
,
// Can naturally bust walls on contact? (i.e. Knuckles)
SF_NOSHIELDABILITY
=
1
<<
19
,
// Disable shield abilities
// free up to and including 1<<31
}
skinflags_t
;
...
...
src/deh_tables.c
View file @
b642682d
...
...
@@ -1522,6 +1522,13 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
"S_SPINFIRE5"
,
"S_SPINFIRE6"
,
"S_TEAM_SPINFIRE1"
,
"S_TEAM_SPINFIRE2"
,
"S_TEAM_SPINFIRE3"
,
"S_TEAM_SPINFIRE4"
,
"S_TEAM_SPINFIRE5"
,
"S_TEAM_SPINFIRE6"
,
// Spikes
"S_SPIKE1"
,
"S_SPIKE2"
,
...
...
@@ -3478,9 +3485,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
"S_BLUEBRICKDEBRIS"
,
"S_YELLOWBRICKDEBRIS"
,
#ifdef SEENAMES
"S_NAMECHECK"
,
#endif
};
// RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1",
...
...
@@ -4260,9 +4265,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
"MT_BLUEBRICKDEBRIS"
,
"MT_YELLOWBRICKDEBRIS"
,
#ifdef SEENAMES
"MT_NAMECHECK"
,
#endif
};
const
char
*
const
MOBJFLAG_LIST
[]
=
{
...
...
@@ -4331,6 +4334,7 @@ const char *const MOBJFLAG2_LIST[] = {
"AMBUSH"
,
// Alternate behaviour typically set by MTF_AMBUSH
"LINKDRAW"
,
// Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
"SHIELD"
,
// Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use)
"SPLAT"
,
// Object is a splat
NULL
};
...
...
@@ -4794,6 +4798,7 @@ struct int_const_s const INT_CONST[] = {
// fixed_t constants, from m_fixed.h
{
"FRACUNIT"
,
FRACUNIT
},
{
"FU"
,
FRACUNIT
},
{
"FRACBITS"
,
FRACBITS
},
// doomdef.h constants
...
...
@@ -4871,6 +4876,36 @@ struct int_const_s const INT_CONST[] = {
{
"tr_trans90"
,
tr_trans90
},
{
"NUMTRANSMAPS"
,
NUMTRANSMAPS
},
// Alpha styles (blend modes)
{
"AST_COPY"
,
AST_COPY
},
{
"AST_TRANSLUCENT"
,
AST_TRANSLUCENT
},
{
"AST_ADD"
,
AST_ADD
},
{
"AST_SUBTRACT"
,
AST_SUBTRACT
},
{
"AST_REVERSESUBTRACT"
,
AST_REVERSESUBTRACT
},
{
"AST_MODULATE"
,
AST_MODULATE
},
{
"AST_OVERLAY"
,
AST_OVERLAY
},
// Render flags
{
"RF_HORIZONTALFLIP"
,
RF_HORIZONTALFLIP
},
{
"RF_VERTICALFLIP"
,
RF_VERTICALFLIP
},
{
"RF_ABSOLUTEOFFSETS"
,
RF_ABSOLUTEOFFSETS
},
{
"RF_FLIPOFFSETS"
,
RF_FLIPOFFSETS
},
{
"RF_SPLATMASK"
,
RF_SPLATMASK
},
{
"RF_SLOPESPLAT"
,
RF_SLOPESPLAT
},
{
"RF_OBJECTSLOPESPLAT"
,
RF_OBJECTSLOPESPLAT
},
{
"RF_NOSPLATBILLBOARD"
,
RF_NOSPLATBILLBOARD
},
{
"RF_NOSPLATROLLANGLE"
,
RF_NOSPLATROLLANGLE
},
{
"RF_BLENDMASK"
,
RF_BLENDMASK
},
{
"RF_FULLBRIGHT"
,
RF_FULLBRIGHT
},
{
"RF_FULLDARK"
,
RF_FULLDARK
},
{
"RF_NOCOLORMAPS"
,
RF_NOCOLORMAPS
},
{
"RF_SPRITETYPEMASK"
,
RF_SPRITETYPEMASK
},
{
"RF_PAPERSPRITE"
,
RF_PAPERSPRITE
},
{
"RF_FLOORSPRITE"
,
RF_FLOORSPRITE
},
{
"RF_SHADOWDRAW"
,
RF_SHADOWDRAW
},
{
"RF_SHADOWEFFECTS"
,
RF_SHADOWEFFECTS
},
{
"RF_DROPSHADOW"
,
RF_DROPSHADOW
},
// Level flags
{
"LF_SCRIPTISFILE"
,
LF_SCRIPTISFILE
},
{
"LF_SPEEDMUSIC"
,
LF_SPEEDMUSIC
},
...
...
@@ -4987,6 +5022,7 @@ struct int_const_s const INT_CONST[] = {
{
"SF_NOSUPERSPRITES"
,
SF_NOSUPERSPRITES
},
{
"SF_NOSUPERJUMPBOOST"
,
SF_NOSUPERJUMPBOOST
},
{
"SF_CANBUSTWALLS"
,
SF_CANBUSTWALLS
},
{
"SF_NOSHIELDABILITY"
,
SF_NOSHIELDABILITY
},
// Dashmode constants
{
"DASHMODE_THRESHOLD"
,
DASHMODE_THRESHOLD
},
...
...
src/dehacked.c
View file @
b642682d
...
...
@@ -59,6 +59,12 @@ ATTRINLINE static FUNCINLINE char myfget_color(MYFILE *f)
if
(
c
>=
'0'
&&
c
<=
'9'
)
return
0x80
+
(
c
-
'0'
);
c
=
tolower
(
c
);
if
(
c
>=
'a'
&&
c
<=
'f'
)
return
0x80
+
10
+
(
c
-
'a'
);
return
0x80
;
// Unhandled -- default to no color
}
...
...
src/doomdef.h
View file @
b642682d
...
...
@@ -582,9 +582,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// Dumps the contents of a network save game upon consistency failure for debugging.
//#define DUMPCONSISTENCY
/// See name of player in your crosshair
#define SEENAMES
/// Who put weights on my recycler? ... Inuyasha did.
/// \note XMOD port.
//#define WEIGHTEDRECYCLER
...
...
src/doomtype.h
View file @
b642682d
...
...
@@ -401,4 +401,8 @@ unset_bit_array (bitarray_t * const array, const int value)
array
[
value
>>
3
]
&=
~
(
1
<<
(
value
&
7
));
}
#ifdef HAVE_SDL
typedef
UINT64
precise_t
;
#endif
#endif //__DOOMTYPE__
src/f_finale.c
View file @
b642682d
...
...
@@ -1074,6 +1074,7 @@ static const char *credits[] = {
"
\1
Programming"
,
"Alam
\"
GBC
\"
Arias"
,
"Logan
\"
GBA
\"
Arias"
,
"Zolton
\"
Zippy_Zolton
\"
Auburn"
,
"Colette
\"
fickleheart
\"
Bordelon"
,
"Andrew
\"
orospakr
\"
Clunis"
,
"Sally
\"
TehRealSalt
\"
Cochenour"
,
...
...
@@ -1104,6 +1105,7 @@ static const char *credits[] = {
"Sean
\"
Sryder13
\"
Ryder"
,
"Ehab
\"
Wolfy
\"
Saeed"
,
"Tasos
\"
tatokis
\"
Sahanidis"
,
// Corrected C FixedMul, making 64-bit builds netplay compatible
"Riku
\"
Ors
\"
Salminen"
,
// Demo consistency improvements
"Jonas
\"
MascaraSnake
\"
Sauer"
,
"Wessel
\"
sphere
\"
Smit"
,
"
\"
SSNTails
\"
"
,
...
...
src/g_demo.c