Compare commits
295 commits
457527d77a
...
30e0b3ead4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30e0b3ead4 | ||
|
|
da5a45a932 | ||
|
|
bf7abee652 | ||
|
|
d3f261b0d3 | ||
|
|
6b5a9cdd1e | ||
|
|
6a8bfca4e8 | ||
|
|
208a75e6e8 | ||
|
|
a544be6b84 | ||
|
|
1164c5d569 | ||
|
|
9fcc9fa2b5 | ||
|
|
1dd0151434 | ||
|
|
e2a3b1f3bb | ||
|
|
ad387b52a8 | ||
|
|
ee68cc2b87 | ||
|
|
6ae4e6f7ac | ||
|
|
ce1217878b | ||
|
|
76dc7ccef3 | ||
|
|
ba2aecd0a1 | ||
|
|
583d34e98f | ||
|
|
24ab3fa171 | ||
|
|
8bcfa6bb58 | ||
|
|
3cac6d57e6 | ||
|
|
b75120cf96 | ||
|
|
5fb122ee44 | ||
|
|
56f08d2a28 | ||
|
|
11e862a583 | ||
|
|
3de68e55a0 | ||
|
|
1d2909c1a5 | ||
|
|
6d6c0f54a5 | ||
|
|
2f539c1564 | ||
|
|
1118b67932 | ||
|
|
06f5f8cb86 | ||
|
|
e244c3ece4 | ||
|
|
0f893e239a | ||
|
|
7a7f6440c8 | ||
|
|
3b29eb4dce | ||
|
|
43815ab18c | ||
|
|
143f6f880a | ||
|
|
792bb65e9e | ||
|
|
1d31cefa0e | ||
|
|
4b97ce1485 | ||
|
|
e4d6cf3a5f | ||
|
|
2592c805c3 | ||
|
|
2d2a04b4d3 | ||
|
|
580f2da4bf | ||
|
|
712e2c6dd7 | ||
|
|
6fcda4e2a6 | ||
|
|
aa39635f31 | ||
|
|
3f2006590b | ||
|
|
c4e034c5be | ||
|
|
8293951ce1 | ||
|
|
50584c2d5e | ||
|
|
3b168b2b55 | ||
|
|
b21f70854e | ||
|
|
eb5c5c0041 | ||
|
|
19b8ec4414 | ||
|
|
e62684d113 | ||
|
|
ec648f4202 | ||
|
|
49b825f3cf | ||
|
|
c87fb9f6ec | ||
|
|
d68214a470 | ||
|
|
9aa61253ff | ||
|
|
8826b627a6 | ||
|
|
0ae015ba25 | ||
|
|
8f03e233dd | ||
|
|
d94fa42ec8 | ||
|
|
1155b50cfc | ||
|
|
1292ad2325 | ||
|
|
868c9c9a87 | ||
|
|
b051e142c1 | ||
|
|
ad2761f365 | ||
|
|
c9b16e1301 | ||
|
|
0b1324aed3 | ||
|
|
9ee65fc0e7 | ||
|
|
47a5ed9b4b | ||
|
|
ab672ff2f3 | ||
|
|
cb2bbf5145 | ||
|
|
245426b816 | ||
|
|
3f890fa251 | ||
|
|
bac259341c | ||
|
|
76614086c6 | ||
|
|
ccd79ca432 | ||
|
|
6b2770f608 | ||
|
|
2cdf420226 | ||
|
|
58e5f7a896 | ||
|
|
0ee5f77586 | ||
|
|
f41bb9f776 | ||
|
|
68ddb7e06b | ||
|
|
760fc6fbb8 | ||
|
|
17106089d6 | ||
|
|
a3bd999c11 | ||
|
|
71c4734b5e | ||
|
|
5b72c8d30c | ||
|
|
fa31b0759f | ||
|
|
1df46f732b | ||
|
|
2a0aba3980 | ||
|
|
c412841f3a | ||
|
|
0f4425df4d | ||
|
|
9c89b02bad | ||
|
|
63c244b381 | ||
|
|
6bd5159e83 | ||
|
|
af6e43dcd8 | ||
|
|
e2edae253f | ||
|
|
b73533c943 | ||
|
|
b90a29bde0 | ||
|
|
feb4819b72 | ||
|
|
894b1f05c9 | ||
|
|
0bf360a82e | ||
|
|
d502c04698 | ||
|
|
adaba91738 | ||
|
|
a7a16687d0 | ||
|
|
cead26d308 | ||
|
|
09da09d2fd | ||
|
|
d940c25818 | ||
|
|
dd76faae4f | ||
|
|
1d71681637 | ||
|
|
bb9a8c42d7 | ||
|
|
ed37cbc871 | ||
|
|
c01a9d9bde | ||
|
|
04b65c70c4 | ||
|
|
8bbd7dca46 | ||
|
|
3290da1e86 | ||
|
|
de02aa13fd | ||
|
|
2f84779d41 | ||
|
|
73490f9480 | ||
|
|
9d244dd89d | ||
|
|
c3351ce47c | ||
|
|
3c07f1c406 | ||
|
|
285aeee849 | ||
|
|
c95225d382 | ||
|
|
8770ddbf82 | ||
|
|
b0057bee1e | ||
|
|
107b822f54 | ||
|
|
2be0f7baa9 | ||
|
|
ee0ef71dfa | ||
|
|
545bdbb97b | ||
|
|
f004b36dbb | ||
|
|
b91f4c4133 | ||
|
|
7c214d8730 | ||
|
|
82221e947f | ||
|
|
74ad3c0065 | ||
|
|
4eeb3a5d2a | ||
|
|
fd4e128641 | ||
|
|
51e530f861 | ||
|
|
47d16f3243 | ||
|
|
b2b37df918 | ||
|
|
d9bfb3c192 | ||
|
|
969c161d3f | ||
|
|
af4f28cb2f | ||
|
|
efba636d96 | ||
|
|
207e5011dc | ||
|
|
b81fcaf7c7 | ||
|
|
7c31ca0483 | ||
|
|
cac6bbdd41 | ||
|
|
5e15f7a68a | ||
|
|
1e05aa8308 | ||
|
|
c07ccf475f | ||
|
|
f2acaab98b | ||
|
|
4603a24628 | ||
|
|
99056a47fa | ||
|
|
6788db93b4 | ||
|
|
27ea5021b4 | ||
|
|
83bf2d59c5 | ||
|
|
005f2989f7 | ||
|
|
0c1891aa36 | ||
|
|
6983e6bcd3 | ||
|
|
e456d59c0e | ||
|
|
e2524356da | ||
|
|
6ac11da6e4 | ||
|
|
7acf64fba8 | ||
|
|
0a5038c189 | ||
|
|
f72475b557 | ||
|
|
0c89c85aae | ||
|
|
76daf2f0e0 | ||
|
|
92c59ddbcb | ||
|
|
d6299d8394 | ||
|
|
be35926843 | ||
|
|
7ea321de32 | ||
|
|
8721883013 | ||
|
|
45170bb65c | ||
|
|
b2b0ec19d6 | ||
|
|
7c6838c98e | ||
|
|
c8ef0fb705 | ||
|
|
f30d472ad2 | ||
|
|
5df0ddde31 | ||
|
|
258912b685 | ||
|
|
1fb300d355 | ||
|
|
76fc2b21d7 | ||
|
|
24715a611d | ||
|
|
286dfc7a43 | ||
|
|
39295111e0 | ||
|
|
e1905d85cf | ||
|
|
4c93f0eae7 | ||
|
|
e450f21ddf | ||
|
|
02fa20bc11 | ||
|
|
8e94a8c9fd | ||
|
|
11e29d5afa | ||
|
|
7226fd120e | ||
|
|
edae0b45ad | ||
|
|
91636209ff | ||
|
|
24de618653 | ||
|
|
ea07280348 | ||
|
|
146ac557ba | ||
|
|
d37b987acb | ||
|
|
5aaa72e10a | ||
|
|
36fdc9a37d | ||
|
|
e987c96651 | ||
|
|
2ff383a248 | ||
|
|
3fbacbbca2 | ||
|
|
7aae6775e6 | ||
|
|
684ded7647 | ||
|
|
4a3ae30984 | ||
|
|
4ffd4621e4 | ||
|
|
ffde1365a5 | ||
|
|
d4f0336ede | ||
|
|
6fa3c4f751 | ||
|
|
3da0b4ce0c | ||
|
|
02196b622c | ||
|
|
fec3c19bd0 | ||
|
|
927f30e51f | ||
|
|
e5f8c4c990 | ||
|
|
2c5c65062c | ||
|
|
6bdcd0f608 | ||
|
|
e7f8d1102b | ||
|
|
35c4239078 | ||
|
|
884c8c7387 | ||
|
|
b019271cc0 | ||
|
|
4be55967f4 | ||
|
|
6b8144134d | ||
|
|
3ec3320774 | ||
|
|
3a98364bf8 | ||
|
|
1c4c734cfb | ||
|
|
e66cc9c5be | ||
|
|
a87d76ed13 | ||
|
|
a3367858b8 | ||
|
|
83cfe66219 | ||
|
|
b7bdd2ff6f | ||
|
|
ef7d5ec03f | ||
|
|
af4cb5573b | ||
|
|
44666c339a | ||
|
|
d34a40601c | ||
|
|
018c008f79 | ||
|
|
1d600210fa | ||
|
|
875f1d44b2 | ||
|
|
2830abb7d0 | ||
|
|
7534f7de3b | ||
|
|
eb90f3bece | ||
|
|
17b799bb01 | ||
|
|
db66b00ec0 | ||
|
|
f64b79260e | ||
|
|
3f34bc68d3 | ||
|
|
271eaeef6f | ||
|
|
7852dfbf3a | ||
|
|
666b9f4582 | ||
|
|
23fb99cc9e | ||
|
|
99d44c9954 | ||
|
|
ca7caf3dd5 | ||
|
|
205d1401f6 | ||
|
|
11b9cd993d | ||
|
|
e340a7f1e6 | ||
|
|
955da518ca | ||
|
|
8ded7ad542 | ||
|
|
d96c16b157 | ||
|
|
38495d4449 | ||
|
|
e8bafe7fc5 | ||
|
|
1947eb6277 | ||
|
|
3eff2ef292 | ||
|
|
30e63490cd | ||
|
|
de5434ea23 | ||
|
|
1553224270 | ||
|
|
3d475504e3 | ||
|
|
e276709d0c | ||
|
|
614506381d | ||
|
|
f30ddcfad2 | ||
|
|
6a122b0600 | ||
|
|
fd48ecd4ca | ||
|
|
41e3d9b285 | ||
|
|
f14e5f2f56 | ||
|
|
7c712836f3 | ||
|
|
56edab2480 | ||
|
|
acb2cb752e | ||
|
|
2252c16acb | ||
|
|
d18ebe8827 | ||
|
|
df30f44c35 | ||
|
|
e9d764eaa6 | ||
|
|
1a0285d193 | ||
|
|
e6dc870b2b | ||
|
|
5a0a889cd1 | ||
|
|
8288eaf733 | ||
|
|
a8b8510188 | ||
|
|
12dfdd2f11 | ||
|
|
e680b12eac | ||
|
|
308d2efb31 | ||
|
|
231b067af1 | ||
|
|
c3fe4fb71e |
888 changed files with 95764 additions and 86567 deletions
|
|
@ -1639,9 +1639,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
https://www.libsdl.org/projects/SDL_mixer/
|
||||
|
||||
- zlib
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
https://zlib.net
|
||||
- zlib-ng
|
||||
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
|
||||
https://github.com/zlib-ng/zlib-ng
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ This is still in active development and things are going to change. If you find
|
|||
- Many features ported from Saturn
|
||||
|
||||
## Optional Gameplay Features
|
||||
- Rings (Based on how they were in v2 Indev)
|
||||
- New items (Such as the Flame Shield and the Bubble Shield)
|
||||
- Rings (Based on how they were in v2 Indev and then further rebalanced)
|
||||
- New items (Such as the as a rebalanced Flame Shield and a rebalanced Bubble Shield)
|
||||
- 4 tier drifts (Blue, Red, Purple, Rainbow)
|
||||
- Boost Stacking
|
||||
- Boost Chaining
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ if(("${CMAKE_COMPILER_IS_GNUCC}" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND
|
|||
target_link_options(SRB2SDL2 PRIVATE "-Wl,--disable-dynamicbase")
|
||||
if("${SRB2_CONFIG_STATIC_STDLIB}")
|
||||
# On MinGW with internal libraries, link the standard library statically
|
||||
target_link_options(SRB2SDL2 PRIVATE -Wl,--add-stdcall-alias -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
if(CMAKE_LINKER_TYPE STREQUAL "LLD")
|
||||
target_link_options(SRB2SDL2 PRIVATE -Wl, -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
else()
|
||||
target_link_options(SRB2SDL2 PRIVATE -Wl,--add-stdcall-alias -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
endif()
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE Threads::Threads)
|
||||
|
|
@ -25,10 +29,10 @@ target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in)
|
|||
### Configuration
|
||||
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
|
||||
"Compile a development build of SRB2Kart.")
|
||||
|
||||
|
||||
set(SRB2_CONFIG_SKIP_COMPTIME OFF CACHE BOOL
|
||||
"Skip Comptime rebuild.")
|
||||
|
||||
|
||||
if(NOT SRB2_CONFIG_SKIP_COMPTIME)
|
||||
# This updates the modification time for comptime.c at the
|
||||
# end of building so when the build system is ran next time,
|
||||
|
|
@ -55,7 +59,10 @@ add_custom_target(_SRB2_reconf ALL
|
|||
)
|
||||
add_dependencies(SRB2SDL2 _SRB2_reconf)
|
||||
|
||||
|
||||
if(SRB2_CONFIG_ASAN)
|
||||
target_compile_options(SRB2SDL2 PRIVATE -fsanitize=address)
|
||||
target_link_options(SRB2SDL2 PRIVATE -fsanitize=address)
|
||||
endif()
|
||||
|
||||
add_subdirectory(blua)
|
||||
add_subdirectory(blan)
|
||||
|
|
@ -117,11 +124,13 @@ target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)
|
|||
if(${SRB2_CONFIG_HAVE_ZLIB})
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
set(ZLIB_FOUND ON)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_COMPAT ON)
|
||||
set(WITH_GTEST OFF)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib-ng)
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
set(ZLIB_LIBRARIES "-L${CMAKE_SOURCE_DIR}/thirdparty/zlib/win32 -lz64")
|
||||
set(ZLIB_LIBRARIES "-L${CMAKE_SOURCE_DIR}/thirdparty/zlib-ng/win32 -lz64")
|
||||
else() # 32-bit
|
||||
set(ZLIB_LIBRARIES "-L${CMAKE_SOURCE_DIR}/thirdparty/zlib/win32 -lz32")
|
||||
set(ZLIB_LIBRARIES "-L${CMAKE_SOURCE_DIR}/thirdparty/zlib-ng/win32 -lz32")
|
||||
endif()
|
||||
else()
|
||||
find_package(ZLIB)
|
||||
|
|
@ -210,7 +219,11 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STRE
|
|||
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
||||
endif()
|
||||
|
||||
target_compile_options(SRB2SDL2 PRIVATE -O3)
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
|
||||
else()
|
||||
target_compile_options(SRB2SDL2 PRIVATE -O3)
|
||||
endif()
|
||||
|
||||
# Compiler warnings configuration
|
||||
target_compile_options(SRB2SDL2 PRIVATE
|
||||
|
|
@ -237,7 +250,7 @@ target_compile_options(SRB2SDL2 PRIVATE
|
|||
-Wnested-externs
|
||||
-Wformat-y2k
|
||||
-Wformat-security
|
||||
|
||||
|
||||
$<$<VERSION_LESS:$<C_COMPILER_VERSION>,2.9.5>:
|
||||
-Wno-div-by-zero
|
||||
-Wendif-labels
|
||||
|
|
@ -328,6 +341,11 @@ target_compile_options(SRB2SDL2 PRIVATE
|
|||
$<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:MSVC>>:
|
||||
/Wv:19.20.27004.0
|
||||
>
|
||||
|
||||
# GNU
|
||||
$<$<C_COMPILER_ID:GNU>:
|
||||
-fmax-errors=5
|
||||
>
|
||||
)
|
||||
if(SRB2_CONFIG_ERRORMODE)
|
||||
target_compile_options(SRB2SDL2 PRIVATE
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ k_bheap.c
|
|||
k_bot.cpp
|
||||
k_botitem.cpp
|
||||
k_botsearch.cpp
|
||||
k_cluster.cpp
|
||||
k_grandprix.c
|
||||
k_boss.c
|
||||
k_hud.c
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@
|
|||
// Thread classes.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#include "Thread.hpp"
|
||||
|
||||
#include "Array.hpp"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@
|
|||
// Thread execution.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#include "Thread.hpp"
|
||||
|
||||
#include "Array.hpp"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -37,6 +37,15 @@
|
|||
// Allow scripters to write files of these types to SRB2's folder
|
||||
static const char *whitelist[] = {
|
||||
".bmp",
|
||||
".png",
|
||||
|
||||
".obj",
|
||||
|
||||
".json",
|
||||
".yaml",
|
||||
".xml",
|
||||
".csv",
|
||||
".soc",
|
||||
".cfg",
|
||||
".csv",
|
||||
".dat",
|
||||
|
|
@ -176,7 +185,7 @@ void MakePathDirs(char *path)
|
|||
}
|
||||
|
||||
|
||||
static int CheckFileName(lua_State *L, const char *filename)
|
||||
static int CheckFileName(lua_State* L, const char* filename, boolean extensioncheck)
|
||||
{
|
||||
int length = strlen(filename);
|
||||
boolean pass = false;
|
||||
|
|
@ -188,12 +197,21 @@ static int CheckFileName(lua_State *L, const char *filename)
|
|||
return pushresult(L,0,filename);
|
||||
}
|
||||
|
||||
for (i = 0; i < (sizeof (whitelist) / sizeof(const char *)); i++)
|
||||
if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
|
||||
{
|
||||
pass = true;
|
||||
break;
|
||||
}
|
||||
if (extensioncheck)
|
||||
{
|
||||
for (i = 0; i < (sizeof(whitelist) / sizeof(const char*)); i++)
|
||||
if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
|
||||
{
|
||||
pass = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
|
||||
if (strstr(filename, "./")
|
||||
|| strstr(filename, "..") || strchr(filename, ':')
|
||||
|| filename[0] == '/'
|
||||
|
|
@ -214,7 +232,10 @@ static int io_openlocal (lua_State *L) {
|
|||
luafiletransfer_t *filetransfer;
|
||||
int checkresult;
|
||||
|
||||
checkresult = CheckFileName(L, filename);
|
||||
// Decision was made for normal reading (binary + text) to have no whitelist restrictions
|
||||
boolean readcheck = (strchr(mode, 'w') != NULL) || (strchr(mode, 'a') != NULL) || (strchr(mode, '+') != NULL);
|
||||
|
||||
checkresult = CheckFileName(L, filename, readcheck);
|
||||
if (checkresult)
|
||||
return checkresult;
|
||||
|
||||
|
|
@ -240,11 +261,10 @@ static int io_open (lua_State *L) {
|
|||
const char *mode = luaL_optstring(L, 2, "r");
|
||||
int checkresult;
|
||||
|
||||
checkresult = CheckFileName(L, filename);
|
||||
checkresult = CheckFileName(L, filename, false);
|
||||
if (checkresult)
|
||||
return checkresult;
|
||||
|
||||
|
||||
if (lua_isfunction(L,3))
|
||||
{
|
||||
luaL_checktype(L, 3, LUA_TFUNCTION);
|
||||
|
|
|
|||
122
src/command.c
122
src/command.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -57,6 +57,7 @@ static void COM_Toggle_f(void);
|
|||
static void COM_Add_f(void);
|
||||
static void COM_Choose_f(void);
|
||||
static void COM_ChooseWeighted_f(void);
|
||||
static void COM_Reset_f(void);
|
||||
|
||||
static void CV_EnforceExecVersion(void);
|
||||
|
||||
|
|
@ -64,8 +65,8 @@ static boolean CV_Command(void);
|
|||
consvar_t *CV_FindVar(const char *name);
|
||||
static const char *CV_StringValue(const char *var_name);
|
||||
|
||||
static consvar_t *consvar_vars; // list of registered console variables
|
||||
static UINT16 consvar_number_of_netids = 0;
|
||||
consvar_t *consvar_vars; // list of registered console variables
|
||||
UINT16 consvar_number_of_netids = 0;
|
||||
|
||||
static char com_token[1024];
|
||||
static char *COM_Parse(char *data);
|
||||
|
|
@ -84,9 +85,12 @@ CV_PossibleValue_t kartspeed_cons_t[] = {
|
|||
{KARTSPEED_EASY, "Easy"},
|
||||
{KARTSPEED_NORMAL, "Normal"},
|
||||
{KARTSPEED_HARD, "Hard"},
|
||||
{KARTSPEED_EXPERT, "Expert"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_resetnetvars = CVAR_INIT ("resetnetvars", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
// Filter consvars by EXECVERSION
|
||||
// First implementation is 2 (1.0.2), so earlier configs default at 1 (1.0.0)
|
||||
// Also set CV_HIDEN during runtime, after config is loaded
|
||||
|
|
@ -354,6 +358,7 @@ void COM_Init(void)
|
|||
COM_AddCommand("add", COM_Add_f);
|
||||
COM_AddCommand("choose", COM_Choose_f);
|
||||
COM_AddCommand("chooseweighted", COM_ChooseWeighted_f);
|
||||
COM_AddCommand("reset", COM_Reset_f);
|
||||
RegisterNetXCmd(XD_NETVAR, Got_NetVar);
|
||||
}
|
||||
|
||||
|
|
@ -1219,6 +1224,36 @@ static void COM_ChooseWeighted_f(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void COM_Reset_f(void)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (COM_Argc() < 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("reset <cvar1> [cvar2] [...]: Resets a cvar to its default value\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 1; i < COM_Argc(); ++i)
|
||||
{
|
||||
consvar_t *cvar = CV_FindVar(COM_Argv(i));
|
||||
|
||||
if (!cvar)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("%s is not a cvar\n"), COM_Argv(i));
|
||||
continue;
|
||||
}
|
||||
|
||||
CV_Set(cvar, cvar->defaultvalue);
|
||||
|
||||
// Sometimes a cvar cannot be changed, e.g. CV_NETVAR without admin privilege.
|
||||
if (!stricmp(cvar->string, cvar->defaultvalue))
|
||||
{
|
||||
CONS_Printf("%s = %s\n", cvar->name, cvar->string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// VARIABLE SIZE BUFFERS
|
||||
// =========================================================================
|
||||
|
|
@ -1842,7 +1877,7 @@ void CV_SaveVars(UINT8 **p, boolean in_demo)
|
|||
static void CV_LoadVars(UINT8 **p,
|
||||
consvar_t *(*got)(UINT8 **p, char **ret_value, boolean *ret_stealth))
|
||||
{
|
||||
const boolean store = (client || demo.playback);
|
||||
const boolean store = cv_resetnetvars.value && (client || demo.playback);
|
||||
|
||||
consvar_t *cvar;
|
||||
UINT16 count;
|
||||
|
|
@ -1884,6 +1919,12 @@ void CV_RevertNetVars(void)
|
|||
{
|
||||
consvar_t * cvar;
|
||||
|
||||
if (!cv_resetnetvars.value)
|
||||
{
|
||||
// Sorry bud, not today.
|
||||
return;
|
||||
}
|
||||
|
||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||
{
|
||||
if (cvar->revert.v.string != NULL)
|
||||
|
|
@ -2108,19 +2149,28 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
if (!increment)
|
||||
return;
|
||||
|
||||
if (var == &cv_forceskin) // Special handling.
|
||||
if (var == &cv_forceskin || var == &cv_chooseskin) // Special handling.
|
||||
{
|
||||
INT32 oldvalue = var->value;
|
||||
INT32 min = var == &cv_forceskin ? -1 : 0;
|
||||
newvalue = oldvalue;
|
||||
do
|
||||
{
|
||||
newvalue += increment;
|
||||
if (newvalue < -1)
|
||||
newvalue = (numskins - 1);
|
||||
if (newvalue < min)
|
||||
newvalue = numskins-1;
|
||||
else if (newvalue >= numskins)
|
||||
newvalue = -1;
|
||||
} while ((oldvalue != newvalue)
|
||||
&& !(R_SkinUsable(-1, newvalue)));
|
||||
newvalue = min;
|
||||
} while (oldvalue != newvalue && !R_SkinUsable(-1, newvalue));
|
||||
}
|
||||
else if (var == &cv_playercolor[0] || var == &cv_playercolor[1] || var == &cv_playercolor[2] || var == &cv_playercolor[3] || var == &cv_dummycolor)
|
||||
{
|
||||
// Special case for the playercolor variable, used only directly from the menu
|
||||
newvalue = var->value;
|
||||
if (increment > 0) // Going up!
|
||||
newvalue = M_GetColorAfter(newvalue);
|
||||
else if (increment < 0) // Going down!
|
||||
newvalue = M_GetColorBefore(newvalue);
|
||||
}
|
||||
else
|
||||
newvalue = var->value + increment;
|
||||
|
|
@ -2184,59 +2234,9 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
if (var->PossibleValue[max].value == var->value)
|
||||
currentindice = max;
|
||||
|
||||
// The following options will NOT handle netsyncing.
|
||||
if (var == &cv_chooseskin)
|
||||
{
|
||||
// Special case for the chooseskin variable, used only directly from the menu
|
||||
newvalue = var->value - 1;
|
||||
do
|
||||
{
|
||||
if (increment > 0) // Going up!
|
||||
{
|
||||
newvalue++;
|
||||
if (newvalue == MAXSKINS)
|
||||
newvalue = 0;
|
||||
}
|
||||
else if (increment < 0) // Going down!
|
||||
{
|
||||
newvalue--;
|
||||
if (newvalue == -1)
|
||||
newvalue = MAXSKINS-1;
|
||||
}
|
||||
} while (var->PossibleValue[newvalue].strvalue == NULL);
|
||||
|
||||
var->value = newvalue + 1;
|
||||
var->string = var->PossibleValue[newvalue].strvalue;
|
||||
var->func();
|
||||
return;
|
||||
}
|
||||
else if (var == &cv_playercolor[0] || var == &cv_playercolor[1] || var == &cv_playercolor[2] || var == &cv_playercolor[3])
|
||||
{
|
||||
// Special case for the playercolor variable, used only directly from the menu
|
||||
if (increment > 0) // Going up!
|
||||
{
|
||||
newvalue = var->value + 1;
|
||||
if (newvalue > numskincolors-1)
|
||||
newvalue = 1;
|
||||
var->value = newvalue;
|
||||
var->string = var->PossibleValue[var->value].strvalue;
|
||||
var->func();
|
||||
return;
|
||||
}
|
||||
else if (increment < 0) // Going down!
|
||||
{
|
||||
newvalue = var->value - 1;
|
||||
if (newvalue < 1)
|
||||
newvalue = numskincolors-1;
|
||||
var->value = newvalue;
|
||||
var->string = var->PossibleValue[var->value].strvalue;
|
||||
var->func();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((var == &cv_kartspeed || var == &cv_kartbattlespeed) && !M_SecretUnlocked(SECRET_HARDSPEED))
|
||||
{
|
||||
max = (M_SecretUnlocked(SECRET_HARDSPEED) ? 4 : 3);
|
||||
max = (M_SecretUnlocked(SECRET_HARDSPEED) ? 5 : 3);
|
||||
}
|
||||
#ifdef PARANOIA
|
||||
if (currentindice == -1)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -168,6 +168,9 @@ struct consvar_t //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NULL
|
|||
#define CVAR_INIT( ... ) \
|
||||
{ __VA_ARGS__, 0, NULL, NULL, {0, {NULL}}, 0U, (char)0, NULL }
|
||||
|
||||
extern consvar_t *consvar_vars; // list of registered console variables
|
||||
extern UINT16 consvar_number_of_netids;
|
||||
|
||||
extern CV_PossibleValue_t CV_OnOff[];
|
||||
extern CV_PossibleValue_t CV_YesNo[];
|
||||
extern CV_PossibleValue_t CV_Signed[];
|
||||
|
|
@ -179,11 +182,18 @@ extern CV_PossibleValue_t CV_Natural[];
|
|||
#define KARTSPEED_EASY 0
|
||||
#define KARTSPEED_NORMAL 1
|
||||
#define KARTSPEED_HARD 2
|
||||
#define KARTGP_MASTER 3 // Not a speed setting, gives the hardest speed with maxed out bots
|
||||
#define KARTSPEED_EXPERT 3
|
||||
#define KARTGP_MASTER 4 // Not a speed setting, gives hard speed with maxed out bots
|
||||
#define KARTGP_NIGHTMARE 5 // Not a speed setting, gives expert speed with maxed out bots
|
||||
extern CV_PossibleValue_t kartspeed_cons_t[];
|
||||
// Invincibility types.
|
||||
#define KARTINVIN_LEGACY 0
|
||||
#define KARTINVIN_ALTERN 1
|
||||
|
||||
extern consvar_t cv_execversion;
|
||||
|
||||
extern consvar_t cv_resetnetvars;
|
||||
|
||||
void CV_InitFilterVar(void);
|
||||
void CV_ToggleExecVersion(boolean enable);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
310
src/d_clisrv.c
310
src/d_clisrv.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -93,6 +93,7 @@ INT32 serverplayer = 0;
|
|||
char motd[254], server_context[8]; // Message of the Day, Unique Context (even without Mumble support)
|
||||
|
||||
UINT8 playerconsole[MAXPLAYERS];
|
||||
plrinfo playerinfo[MAXPLAYERS];
|
||||
|
||||
// Server specific vars
|
||||
UINT8 playernode[MAXPLAYERS];
|
||||
|
|
@ -112,11 +113,11 @@ static tic_t joindelay = 0;
|
|||
UINT16 pingmeasurecount = 1;
|
||||
UINT32 realpingtable[MAXPLAYERS]; //the base table of ping where an average will be sent to everyone.
|
||||
UINT32 playerpingtable[MAXPLAYERS]; //table of player latency values.
|
||||
UINT32 playerpacketlosstable[MAXPLAYERS];
|
||||
UINT32 playerdelaytable[MAXPLAYERS]; // mindelay values.
|
||||
|
||||
static tic_t lowest_lag;
|
||||
boolean server_lagless;
|
||||
static CV_PossibleValue_t mindelay_cons_t[] = {{0, "MIN"}, {30, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_mindelay = CVAR_INIT ("mindelay", "0", CV_SAVE, mindelay_cons_t, NULL);
|
||||
|
||||
SINT8 nodetoplayer[MAXNETNODES];
|
||||
SINT8 nodetoplayer2[MAXNETNODES]; // say the numplayer for this node if any (splitscreen)
|
||||
|
|
@ -124,6 +125,7 @@ SINT8 nodetoplayer3[MAXNETNODES]; // say the numplayer for this node if any (spl
|
|||
SINT8 nodetoplayer4[MAXNETNODES]; // say the numplayer for this node if any (splitscreen == 3)
|
||||
UINT8 playerpernode[MAXNETNODES]; // used specialy for splitscreen
|
||||
boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
|
||||
boolean receivedplayerinfo = false;
|
||||
|
||||
tic_t servermaxping = 20; // server's max delay, in frames. Defaults to 20
|
||||
static tic_t nettics[MAXNETNODES]; // what tic the client have received
|
||||
|
|
@ -154,6 +156,8 @@ static boolean cl_redownloadinggamestate = false;
|
|||
static UINT8 localtextcmd[MAXSPLITSCREENPLAYERS][MAXTEXTCMD];
|
||||
static tic_t neededtic;
|
||||
SINT8 servernode = 0; // the number of the server node
|
||||
SINT8 joinnode = 0; // used for CL_VIEWSERVER
|
||||
|
||||
char connectedservername[MAXSERVERNAME+1];
|
||||
/// \brief do we accept new players?
|
||||
/// \todo WORK!
|
||||
|
|
@ -185,7 +189,7 @@ ticcmd_t netcmds[BACKUPTICS][MAXPLAYERS];
|
|||
static textcmdtic_t *textcmds[TEXTCMD_HASH_SIZE] = {NULL};
|
||||
|
||||
|
||||
consvar_t cv_showjoinaddress = CVAR_INIT ("showjoinaddress", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL);
|
||||
consvar_t cv_showjoinaddress = CVAR_INIT ("showjoinaddress", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
static CV_PossibleValue_t playbackspeed_cons_t[] = {{1, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_playbackspeed = CVAR_INIT ("playbackspeed", "1", 0, playbackspeed_cons_t, NULL);
|
||||
|
|
@ -541,27 +545,6 @@ void ReadLmpExtraData(UINT8 **demo_pointer, INT32 playernum)
|
|||
|
||||
static INT16 Consistancy(void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CL_SEARCHING,
|
||||
CL_CHECKFILES,
|
||||
CL_DOWNLOADFILES,
|
||||
CL_DOWNLOADFAILED,
|
||||
CL_ASKJOIN,
|
||||
CL_LOADFILES,
|
||||
CL_SETUPFILES,
|
||||
CL_WAITJOINRESPONSE,
|
||||
CL_DOWNLOADSAVEGAME,
|
||||
CL_CONNECTED,
|
||||
CL_ABORTED,
|
||||
CL_ASKFULLFILELIST,
|
||||
CL_CONFIRMCONNECT,
|
||||
#ifdef HAVE_CURL
|
||||
CL_PREPAREHTTPFILES,
|
||||
CL_DOWNLOADHTTPFILES,
|
||||
#endif
|
||||
} cl_mode_t;
|
||||
|
||||
static void GetPackets(void);
|
||||
|
||||
static cl_mode_t cl_mode = CL_SEARCHING;
|
||||
|
|
@ -572,6 +555,28 @@ char http_source[MAX_MIRROR_LENGTH];
|
|||
|
||||
static UINT16 cl_lastcheckedfilecount = 0; // used for full file list
|
||||
|
||||
void ChangeServMusic(const char* musname, boolean fallback, boolean keepPos)
|
||||
{
|
||||
if (S_MusicExists(musname))
|
||||
if (keepPos)
|
||||
S_ChangeMusicEx(musname,0,true, S_GetMusicPosition(), 0,0);
|
||||
else
|
||||
S_ChangeMusicInternal(musname,true);
|
||||
else if (fallback)
|
||||
S_ChangeMusicInternal("BLANCD",true);
|
||||
}
|
||||
|
||||
// Let external code read and modify this stuff.
|
||||
INT32 GetClientMode(void)
|
||||
{
|
||||
return cl_mode;
|
||||
}
|
||||
|
||||
void ChangeClientMode(INT32 mode)
|
||||
{
|
||||
cl_mode = mode;
|
||||
}
|
||||
|
||||
//
|
||||
// CL_DrawConnectionStatus
|
||||
//
|
||||
|
|
@ -589,6 +594,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
#ifdef HAVE_CURL
|
||||
&& cl_mode != CL_DOWNLOADHTTPFILES
|
||||
#endif
|
||||
&& cl_mode != CL_VIEWSERVER
|
||||
)
|
||||
{
|
||||
INT32 i, animtime = ((ccstime / 4) & 15) + 16;
|
||||
|
|
@ -703,6 +709,14 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24, MENUCAPS|V_20TRANS|V_MONOSPACE,
|
||||
va(" %2u/%2u Files",loadcompletednum,fileneedednum));
|
||||
}
|
||||
else if (cl_mode == CL_VIEWSERVER)
|
||||
{
|
||||
if (receivedplayerinfo && !menustack[0])
|
||||
{
|
||||
M_StartControlPanel();
|
||||
M_EnterMenu(MN_VIEWSERVER, true, 0);
|
||||
}
|
||||
}
|
||||
else if (lastfilenum != -1)
|
||||
{
|
||||
INT32 dldlength;
|
||||
|
|
@ -970,7 +984,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
|||
{
|
||||
//strncpy(netbuffer->u.serverinfo.maptitle, (char *)mapheaderinfo[gamemap-1]->lvlttl, sizeof netbuffer->u.serverinfo.maptitle);
|
||||
// set up the levelstring
|
||||
if (netbuffer->u.serverinfo.iszone || (mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||
if (!netbuffer->u.serverinfo.iszone || (mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||
{
|
||||
if (mapheaderinfo[gamemap-1]->actnum[0])
|
||||
snprintf(netbuffer->u.serverinfo.maptitle,
|
||||
|
|
@ -1043,20 +1057,16 @@ static void SV_SendPlayerInfo(INT32 node)
|
|||
|
||||
for (i = 0; i < MSCOMPAT_MAXPLAYERS; i++)
|
||||
{
|
||||
if (i >= MAXPLAYERS)
|
||||
{
|
||||
netbuffer->u.playerinfo[i].num = 255; // Master Server compat
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!playeringame[i])
|
||||
if (i >= MAXPLAYERS || playernode[i] == UINT8_MAX || !playeringame[i])
|
||||
{
|
||||
netbuffer->u.playerinfo[i].num = 255; // This slot is empty.
|
||||
continue;
|
||||
}
|
||||
|
||||
netbuffer->u.playerinfo[i].num = i;
|
||||
strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
||||
memset(netbuffer->u.playerinfo[i].name, 0x00, sizeof(netbuffer->u.playerinfo[i].name));
|
||||
memcpy(netbuffer->u.playerinfo[i].name, player_names[i], sizeof(player_names[i]));
|
||||
|
||||
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
||||
|
||||
//fetch IP address
|
||||
|
|
@ -1080,11 +1090,7 @@ static void SV_SendPlayerInfo(INT32 node)
|
|||
|
||||
netbuffer->u.playerinfo[i].score = LONG(players[i].score);
|
||||
netbuffer->u.playerinfo[i].timeinserver = SHORT((UINT16)(players[i].jointime / TICRATE));
|
||||
netbuffer->u.playerinfo[i].skin = (UINT16)(players[i].skin
|
||||
#ifdef DEVELOP // it's safe to do this only because PLAYERINFO isn't read by the game itself
|
||||
% 3
|
||||
#endif
|
||||
);
|
||||
netbuffer->u.playerinfo[i].skin = (UINT16)(players[i].skin);
|
||||
|
||||
// Extra data
|
||||
netbuffer->u.playerinfo[i].data = 0; //players[i].skincolor;
|
||||
|
|
@ -1357,8 +1363,7 @@ static void CL_ReloadReceivedSavegame(void)
|
|||
|
||||
CL_LoadReceivedSavegame(true);
|
||||
|
||||
if (neededtic < gametic)
|
||||
neededtic = gametic;
|
||||
neededtic = max(neededtic, gametic);
|
||||
maketic = neededtic;
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
|
|
@ -1412,6 +1417,7 @@ static void SL_ClearServerList(INT32 connectedserver)
|
|||
serverlist[i].node = 0;
|
||||
}
|
||||
serverlistcount = 0;
|
||||
M_UpdateNumServerPages();
|
||||
}
|
||||
|
||||
static UINT32 SL_SearchServer(INT32 node)
|
||||
|
|
@ -1452,6 +1458,7 @@ static void SL_InsertServer(serverinfo_pak* info, SINT8 node)
|
|||
return;/* that's a different mod */
|
||||
|
||||
i = serverlistcount++;
|
||||
M_UpdateNumServerPages();
|
||||
}
|
||||
|
||||
serverlist[i].info = *info;
|
||||
|
|
@ -1603,6 +1610,7 @@ static boolean CL_FinishedFileList(void)
|
|||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), M_ConfirmConnect, MM_EVENTHANDLER);
|
||||
cl_mode = CL_CONFIRMCONNECT;
|
||||
ChangeServMusic(SERVMUS_2, true,true);
|
||||
}
|
||||
else
|
||||
cl_mode = CL_LOADFILES;
|
||||
|
|
@ -1672,6 +1680,7 @@ static boolean CL_FinishedFileList(void)
|
|||
|
||||
Z_Free(downloadsize);
|
||||
cl_mode = CL_CONFIRMCONNECT;
|
||||
ChangeServMusic(SERVMUS_2, true,true);
|
||||
}
|
||||
#ifdef HAVE_CURL
|
||||
else
|
||||
|
|
@ -1771,7 +1780,8 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
|||
return true;
|
||||
}
|
||||
|
||||
cl_mode = CL_CHECKFILES;
|
||||
cl_mode = cv_serverinfoscreen.value ? CL_VIEWSERVER : CL_CHECKFILES;
|
||||
ChangeServMusic(SERVMUS_1, true,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1816,7 +1826,10 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
|
||||
case CL_ASKFULLFILELIST:
|
||||
if (cl_lastcheckedfilecount == UINT16_MAX) // All files retrieved
|
||||
cl_mode = CL_CHECKFILES;
|
||||
{
|
||||
cl_mode = cv_serverinfoscreen.value ? CL_VIEWSERVER : CL_CHECKFILES;
|
||||
ChangeServMusic(SERVMUS_1, true,false);
|
||||
}
|
||||
else if (fileneedednum != cl_lastcheckedfilecount || I_GetTime() >= *asksent)
|
||||
{
|
||||
if (CL_AskFileList(fileneedednum))
|
||||
|
|
@ -1916,18 +1929,19 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
}
|
||||
break;
|
||||
case CL_ASKJOIN:
|
||||
if (firstconnectattempttime + NEWTICRATE*300 < I_GetTime() && !server)
|
||||
if (cv_connectawaittime.value && firstconnectattempttime + NEWTICRATE*60*cv_connectawaittime.value < I_GetTime() && !server)
|
||||
{
|
||||
CONS_Printf(M_GetText("5 minute wait time exceeded.\n"));
|
||||
CONS_Printf("%d minute wait time exceeded.\n", cv_connectawaittime.value);
|
||||
CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
|
||||
D_QuitNetGame();
|
||||
CL_Reset();
|
||||
D_StartTitle();
|
||||
M_StartMessage(M_GetText(
|
||||
"5 minute wait time exceeded.\n"
|
||||
M_StartMessage(va(
|
||||
"%d minute wait time exceeded.\n"
|
||||
"You may retry connection.\n"
|
||||
"\n"
|
||||
"Press ESC\n"
|
||||
"Press ESC\n",
|
||||
cv_connectawaittime.value
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2002,8 +2016,15 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
else
|
||||
continue;
|
||||
|
||||
if (key == KEY_ESCAPE || G_ControlBoundToKey(0, gc_brake, key, true))
|
||||
cl_mode = CL_ABORTED;
|
||||
if (cl_mode == CL_VIEWSERVER && menustack[0])
|
||||
{
|
||||
M_Responder(ev);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (key == KEY_ESCAPE || G_ControlBoundToKey(0, gc_brake, key, true))
|
||||
cl_mode = CL_ABORTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2031,6 +2052,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
{
|
||||
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_DOWNLOADSAVEGAME)
|
||||
{
|
||||
F_MenuPresTicker(true); // title sky
|
||||
F_TitleScreenTicker(true);
|
||||
F_TitleScreenDrawer();
|
||||
}
|
||||
|
|
@ -2073,6 +2095,7 @@ static void CL_ConnectToServer(void)
|
|||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
|
||||
lastfilenum = -1;
|
||||
receivedplayerinfo = false;
|
||||
|
||||
cl_mode = CL_SEARCHING;
|
||||
|
||||
|
|
@ -3325,7 +3348,7 @@ static CV_PossibleValue_t maxplayers_cons_t[] = {{2, "MIN"}, {MAXPLAYERS, "MAX"}
|
|||
consvar_t cv_maxplayers = CVAR_INIT ("maxplayers", "8", CV_SAVE|CV_CALL, maxplayers_cons_t, Joinable_OnChange);
|
||||
|
||||
static CV_PossibleValue_t joindelay_cons_t[] = {{1, "MIN"}, {3600, "MAX"}, {0, "Off"}, {0, NULL}};
|
||||
consvar_t cv_joindelay = CVAR_INIT ("joindelay", "10", CV_SAVE|CV_NETVAR, joindelay_cons_t, NULL);
|
||||
consvar_t cv_joindelay = CVAR_INIT ("joindelay", "10", CV_SAVE, joindelay_cons_t, NULL);
|
||||
|
||||
// Here for dedicated servers
|
||||
static CV_PossibleValue_t discordinvites_cons_t[] = {{0, "Admins Only"}, {1, "Everyone"}, {0, NULL}};
|
||||
|
|
@ -3333,17 +3356,22 @@ consvar_t cv_discordinvites = CVAR_INIT ("discordinvites", "Everyone", CV_SAVE|C
|
|||
|
||||
static CV_PossibleValue_t resynchattempts_cons_t[] = {{1, "MIN"}, {20, "MAX"}, {0, "No"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_resynchattempts = CVAR_INIT ("resynchattempts", "2", CV_SAVE|CV_NETVAR, resynchattempts_cons_t, NULL);
|
||||
consvar_t cv_blamecfail = CVAR_INIT ("blamecfail", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL);
|
||||
consvar_t cv_resynchattempts = CVAR_INIT ("resynchattempts", "2", CV_SAVE, resynchattempts_cons_t, NULL);
|
||||
consvar_t cv_blamecfail = CVAR_INIT ("blamecfail", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
// max file size to send to a player (in kilobytes)
|
||||
static CV_PossibleValue_t maxsend_cons_t[] = {{0, "MIN"}, {51200, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_maxsend = CVAR_INIT ("maxsend", "51200", CV_SAVE|CV_NETVAR, maxsend_cons_t, NULL);
|
||||
consvar_t cv_noticedownload = CVAR_INIT ("noticedownload", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL);
|
||||
consvar_t cv_maxsend = CVAR_INIT ("maxsend", "51200", CV_SAVE, maxsend_cons_t, NULL);
|
||||
consvar_t cv_noticedownload = CVAR_INIT ("noticedownload", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
// Speed of file downloading (in packets per tic)
|
||||
static CV_PossibleValue_t downloadspeed_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_downloadspeed = CVAR_INIT ("downloadspeed", "32", CV_SAVE|CV_NETVAR, downloadspeed_cons_t, NULL);
|
||||
consvar_t cv_downloadspeed = CVAR_INIT ("downloadspeed", "32", CV_SAVE, downloadspeed_cons_t, NULL);
|
||||
|
||||
static CV_PossibleValue_t connectawaittime_cons_t[] = {{1, "MIN"}, {60, "MAX"}, {0, "Inf"}, {0, NULL}};
|
||||
consvar_t cv_connectawaittime = CVAR_INIT ("connectawaittime", "5", CV_SAVE, connectawaittime_cons_t, NULL);
|
||||
|
||||
consvar_t cv_serverinfoscreen = CVAR_INIT ("serverinfoscreen", "On", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
static void Got_AddPlayer(UINT8 **p, INT32 playernum);
|
||||
static void Got_RemovePlayer(UINT8 **p, INT32 playernum);
|
||||
|
|
@ -3465,6 +3493,8 @@ void SV_ResetServer(void)
|
|||
pingmeasurecount = 1;
|
||||
memset(realpingtable, 0, sizeof realpingtable);
|
||||
memset(playerpingtable, 0, sizeof playerpingtable);
|
||||
memset(playerpacketlosstable, 0, sizeof playerpacketlosstable);
|
||||
memset(playerdelaytable, 0, sizeof playerdelaytable);
|
||||
|
||||
ClearAdminPlayers();
|
||||
Schedule_Clear();
|
||||
|
|
@ -4270,6 +4300,16 @@ static void HandleServerInfo(SINT8 node)
|
|||
SL_InsertServer(&netbuffer->u.serverinfo, node);
|
||||
}
|
||||
|
||||
static void HandlePlayerInfo(SINT8 node)
|
||||
{
|
||||
(void)node;
|
||||
for (INT32 i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
playerinfo[i] = netbuffer->u.playerinfo[i];
|
||||
}
|
||||
receivedplayerinfo = true;
|
||||
}
|
||||
|
||||
static void PT_WillResendGamestate(void)
|
||||
{
|
||||
char tmpsave[256];
|
||||
|
|
@ -4331,31 +4371,7 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
|||
switch (netbuffer->packettype)
|
||||
{
|
||||
case PT_ASKINFOVIAMS:
|
||||
#if 0
|
||||
if (server && serverrunning)
|
||||
{
|
||||
INT32 clientnode;
|
||||
if (ms_RoomId < 0) // ignore if we're not actually on the MS right now
|
||||
{
|
||||
Net_CloseConnection(node); // and yes, close connection
|
||||
return;
|
||||
}
|
||||
clientnode = I_NetMakeNode(netbuffer->u.msaskinfo.clientaddr);
|
||||
if (clientnode != -1)
|
||||
{
|
||||
SV_SendServerInfo(clientnode, (tic_t)LONG(netbuffer->u.msaskinfo.time));
|
||||
SV_SendPlayerInfo(clientnode); // Send extra info
|
||||
Net_CloseConnection(clientnode);
|
||||
// Don't close connection to MS...
|
||||
}
|
||||
else
|
||||
Net_CloseConnection(node); // ...unless the IP address is not valid
|
||||
}
|
||||
else
|
||||
Net_CloseConnection(node); // you're not supposed to get it, so ignore it
|
||||
#else
|
||||
Net_CloseConnection(node);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case PT_TELLFILESNEEDED:
|
||||
|
|
@ -4536,6 +4552,10 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
|||
case PT_CLIENTCMD:
|
||||
break; // This is not an "unknown packet"
|
||||
|
||||
case PT_PLAYERINFO:
|
||||
HandlePlayerInfo(node);
|
||||
break;
|
||||
|
||||
case PT_SERVERTICS:
|
||||
// Do not remove my own server (we have just get a out of order packet)
|
||||
if (node == servernode)
|
||||
|
|
@ -4659,7 +4679,8 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
// If we already received a ticcmd for this tic, just submit it for the next one.
|
||||
tic_t faketic = maketic;
|
||||
|
||||
if (!!(netcmds[maketic % BACKUPTICS][netconsole].flags & TICCMD_RECEIVED))
|
||||
if ((!!(netcmds[maketic % BACKUPTICS][netconsole].flags & TICCMD_RECEIVED))
|
||||
&& (maketic - firstticstosend < BACKUPTICS - 1))
|
||||
faketic++;
|
||||
|
||||
// Copy ticcmd
|
||||
|
|
@ -4941,8 +4962,8 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
txtpak = (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots
|
||||
* netbuffer->u.serverpak.numtics];
|
||||
|
||||
if (realend > gametic + BACKUPTICS)
|
||||
realend = gametic + BACKUPTICS;
|
||||
if (realend > gametic + CLIENTBACKUPTICS)
|
||||
realend = gametic + CLIENTBACKUPTICS;
|
||||
cl_packetmissed = realstart > neededtic;
|
||||
|
||||
if (realstart <= neededtic && realend > neededtic)
|
||||
|
|
@ -4999,10 +5020,16 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
{
|
||||
UINT8 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i])
|
||||
playerpingtable[i] = (tic_t)netbuffer->u.pingtable[i];
|
||||
{
|
||||
playerpingtable[i] = (tic_t)netbuffer->u.netinfo.pingtable[i];
|
||||
playerpacketlosstable[i] = netbuffer->u.netinfo.packetloss[i];
|
||||
playerdelaytable[i] = netbuffer->u.netinfo.delay[i];
|
||||
}
|
||||
}
|
||||
|
||||
servermaxping = (tic_t)netbuffer->u.pingtable[MAXPLAYERS];
|
||||
servermaxping = (tic_t)netbuffer->u.netinfo.pingtable[MAXPLAYERS];
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -5084,9 +5111,6 @@ static void GetPackets(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (netbuffer->packettype == PT_PLAYERINFO)
|
||||
continue; // We do nothing with PLAYERINFO, that's for the MS browser.
|
||||
|
||||
// Packet received from someone already playing
|
||||
if (nodeingame[node])
|
||||
HandlePacketFromPlayer(node);
|
||||
|
|
@ -5387,11 +5411,8 @@ static void SV_SendTics(void)
|
|||
if (nodeingame[n])
|
||||
{
|
||||
// assert supposedtics[n]>=nettics[n]
|
||||
realfirsttic = supposedtics[n];
|
||||
lasttictosend = maketic;
|
||||
|
||||
if (lasttictosend - nettics[n] >= BACKUPTICS)
|
||||
lasttictosend = nettics[n] + BACKUPTICS-1;
|
||||
realfirsttic = max(supposedtics[n], firstticstosend);
|
||||
lasttictosend = min(maketic, nettics[n] + CLIENTBACKUPTICS);
|
||||
|
||||
if (realfirsttic >= lasttictosend)
|
||||
{
|
||||
|
|
@ -5407,8 +5428,8 @@ static void SV_SendTics(void)
|
|||
continue;
|
||||
DEBFILE(va("Sent %d anyway\n", realfirsttic));
|
||||
}
|
||||
if (realfirsttic < firstticstosend)
|
||||
realfirsttic = firstticstosend;
|
||||
|
||||
realfirsttic = max(realfirsttic, firstticstosend);
|
||||
|
||||
// compute the length of the packet and cut it if too large
|
||||
packsize = BASESERVERTICSSIZE;
|
||||
|
|
@ -5482,7 +5503,8 @@ static void SV_SendTics(void)
|
|||
supposedtics[n] = lasttictosend-doomcom->extratics;
|
||||
else
|
||||
supposedtics[n] = lasttictosend;
|
||||
if (supposedtics[n] < nettics[n]) supposedtics[n] = nettics[n];
|
||||
|
||||
supposedtics[n] = max(supposedtics[n], nettics[n]);
|
||||
}
|
||||
// node 0 is me!
|
||||
supposedtics[0] = maketic;
|
||||
|
|
@ -5531,6 +5553,8 @@ static void SV_Maketic(void)
|
|||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
packetloss[i][maketic%PACKETMEASUREWINDOW] = false;
|
||||
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
|
||||
|
|
@ -5558,6 +5582,9 @@ static void SV_Maketic(void)
|
|||
*ticcmd = *prevticcmd;
|
||||
ticcmd->flags &= ~TICCMD_RECEIVED;
|
||||
}
|
||||
|
||||
// packetloss[i][leveltime%PACKETMEASUREWINDOW] = (cmd->flags & TICCMD_RECEIVED) ? false : true;
|
||||
packetloss[i][maketic%PACKETMEASUREWINDOW] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5630,7 +5657,6 @@ boolean TryRunTics(tic_t realtics)
|
|||
if (ticking)
|
||||
{
|
||||
{
|
||||
boolean tickInterp = true;
|
||||
|
||||
// run the count * tics
|
||||
while (neededtic > gametic)
|
||||
|
|
@ -5659,19 +5685,8 @@ boolean TryRunTics(tic_t realtics)
|
|||
P_PostLoadLevel();
|
||||
}
|
||||
|
||||
boolean run = (gametic % NEWTICRATERATIO) == 0;
|
||||
|
||||
if (run && tickInterp)
|
||||
{
|
||||
// Update old view state BEFORE ticking so resetting
|
||||
// the old interpolation state from game logic works.
|
||||
R_UpdateViewInterpolation();
|
||||
tickInterp = false; // do not update again in sped-up tics
|
||||
}
|
||||
|
||||
G_Ticker(run);
|
||||
G_Ticker((gametic % NEWTICRATERATIO) == 0);
|
||||
}
|
||||
|
||||
if (Playing() && netgame && (gametic % TICRATE == 0))
|
||||
{
|
||||
Schedule_Run();
|
||||
|
|
@ -5710,7 +5725,7 @@ static INT32 pingtimeout[MAXPLAYERS];
|
|||
|
||||
static inline void PingUpdate(void)
|
||||
{
|
||||
INT32 i;
|
||||
INT32 i, j;
|
||||
boolean laggers[MAXPLAYERS];
|
||||
UINT8 numlaggers = 0;
|
||||
memset(laggers, 0, sizeof(boolean) * MAXPLAYERS);
|
||||
|
|
@ -5767,20 +5782,30 @@ static inline void PingUpdate(void)
|
|||
{
|
||||
//CONS_Printf("player %d - total pings: %d\n", i, realpingtable[i]);
|
||||
|
||||
netbuffer->u.pingtable[i] = realpingtable[i] / pingmeasurecount;
|
||||
netbuffer->u.netinfo.pingtable[i] = realpingtable[i] / pingmeasurecount;
|
||||
//server takes a snapshot of the real ping for display.
|
||||
//otherwise, pings fluctuate a lot and would be odd to look at.
|
||||
playerpingtable[i] = realpingtable[i] / pingmeasurecount;
|
||||
realpingtable[i] = 0; //Reset each as we go.
|
||||
|
||||
UINT32 lost = 0;
|
||||
for (j = 0; j < PACKETMEASUREWINDOW; j++)
|
||||
{
|
||||
if (packetloss[i][j])
|
||||
lost++;
|
||||
}
|
||||
|
||||
netbuffer->u.netinfo.packetloss[i] = lost;
|
||||
netbuffer->u.netinfo.delay[i] = playerdelaytable[i];
|
||||
}
|
||||
|
||||
// send the server's maxping as last element of our ping table. This is useful to let us know when we're about to get kicked.
|
||||
netbuffer->u.pingtable[MAXPLAYERS] = cv_maxping.value;
|
||||
netbuffer->u.netinfo.pingtable[MAXPLAYERS] = cv_maxping.value;
|
||||
|
||||
//send out our ping packets
|
||||
for (i = 0; i < MAXNETNODES; i++)
|
||||
if (nodeingame[i])
|
||||
HSendPacket(i, true, 0, sizeof(INT32) * (MAXPLAYERS+1));
|
||||
HSendPacket(i, true, 0, sizeof(netinfo_pak));
|
||||
|
||||
pingmeasurecount = 0; //Reset count
|
||||
}
|
||||
|
|
@ -5796,7 +5821,7 @@ static void UpdatePingTable(void)
|
|||
|
||||
if (server)
|
||||
{
|
||||
if (Playing() && !(gametime % 35)) // update once per second.
|
||||
if (Playing() && !(gametime % 8)) // Value chosen based on _my vibes man_
|
||||
PingUpdate();
|
||||
|
||||
fastest = 0;
|
||||
|
|
@ -5806,55 +5831,42 @@ static void UpdatePingTable(void)
|
|||
{
|
||||
if (playeringame[i] && playernode[i] > 0)
|
||||
{
|
||||
if (! server_lagless && playernode[i] > 0 && !players[i].spectator)
|
||||
{
|
||||
lag = GetLag(playernode[i]);
|
||||
realpingtable[i] += lag;
|
||||
// TicsToMilliseconds can't handle pings over 1000ms lol
|
||||
realpingtable[i] += GetLag(playernode[i]);
|
||||
|
||||
if (!players[i].spectator)
|
||||
{
|
||||
lag = playerpingtable[i];
|
||||
if (! fastest || lag < fastest)
|
||||
fastest = lag;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TicsToMilliseconds can't handle pings over 1000ms lol
|
||||
realpingtable[i] += GetLag(playernode[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't gentleman below your mindelay
|
||||
if (fastest < (tic_t)cv_mindelay.value)
|
||||
fastest = (tic_t)cv_mindelay.value;
|
||||
|
||||
pingmeasurecount++;
|
||||
|
||||
if (server_lagless)
|
||||
lowest_lag = 0;
|
||||
else
|
||||
{
|
||||
lowest_lag = fastest;
|
||||
|
||||
if (fastest)
|
||||
lag = fastest;
|
||||
else
|
||||
lag = GetLag(0);
|
||||
// Don't gentleman below your mindelay
|
||||
if (lowest_lag < (tic_t)cv_mindelay.value)
|
||||
lowest_lag = (tic_t)cv_mindelay.value;
|
||||
|
||||
lag = ( realpingtable[0] + lag );
|
||||
pingmeasurecount++;
|
||||
|
||||
switch (playerpernode[0])
|
||||
{
|
||||
case 4:
|
||||
realpingtable[nodetoplayer4[0]] = lag;
|
||||
/*FALLTHRU*/
|
||||
case 3:
|
||||
realpingtable[nodetoplayer3[0]] = lag;
|
||||
/*FALLTHRU*/
|
||||
case 2:
|
||||
realpingtable[nodetoplayer2[0]] = lag;
|
||||
/*FALLTHRU*/
|
||||
case 1:
|
||||
realpingtable[nodetoplayer[0]] = lag;
|
||||
}
|
||||
switch (playerpernode[0])
|
||||
{
|
||||
case 4:
|
||||
playerdelaytable[nodetoplayer4[0]] = lowest_lag;
|
||||
/*FALLTHRU*/
|
||||
case 3:
|
||||
playerdelaytable[nodetoplayer3[0]] = lowest_lag;
|
||||
/*FALLTHRU*/
|
||||
case 2:
|
||||
playerdelaytable[nodetoplayer2[0]] = lowest_lag;
|
||||
/*FALLTHRU*/
|
||||
case 1:
|
||||
playerdelaytable[nodetoplayer[0]] = lowest_lag;
|
||||
}
|
||||
}
|
||||
else // We're a client, handle mindelay on the way out.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -43,6 +43,7 @@ applications may follow different packet versions.
|
|||
|
||||
// Networking and tick handling related.
|
||||
#define BACKUPTICS 512 // more than enough for most timeouts....
|
||||
#define CLIENTBACKUPTICS 32
|
||||
#define MAXTEXTCMD 512
|
||||
|
||||
// No. of tics your controls can be delayed by.
|
||||
|
|
@ -342,6 +343,13 @@ struct filesneededconfig_pak
|
|||
UINT8 files[MAXFILENEEDED]; // is filled with writexxx (byteptr.h)
|
||||
} ATTRPACK;
|
||||
|
||||
struct netinfo_pak
|
||||
{
|
||||
UINT32 pingtable[MAXPLAYERS+1];
|
||||
UINT32 packetloss[MAXPLAYERS+1];
|
||||
UINT32 delay[MAXPLAYERS+1];
|
||||
} ATTRPACK;
|
||||
|
||||
//
|
||||
// Network packet data
|
||||
//
|
||||
|
|
@ -375,7 +383,7 @@ struct doomdata_t
|
|||
plrconfig playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?)
|
||||
INT32 filesneedednum; // 4 bytes
|
||||
filesneededconfig_pak filesneededcfg; // ??? bytes
|
||||
UINT32 pingtable[MAXPLAYERS+1]; // 68 bytes
|
||||
netinfo_pak netinfo; // Don't believe their lies
|
||||
} u; // This is needed to pack diff packet types data together
|
||||
} ATTRPACK;
|
||||
|
||||
|
|
@ -403,6 +411,10 @@ extern consvar_t cv_kicktime;
|
|||
extern consvar_t cv_showjoinaddress;
|
||||
extern consvar_t cv_playbackspeed;
|
||||
|
||||
extern consvar_t cv_connectawaittime;
|
||||
extern consvar_t cv_serverinfoscreen;
|
||||
|
||||
|
||||
#define BASEPACKETSIZE offsetof(doomdata_t, u)
|
||||
#define FILETXHEADER offsetof(filetx_pak, data)
|
||||
#define BASESERVERTICSSIZE offsetof(doomdata_t, u.serverpak.cmds[0])
|
||||
|
|
@ -446,6 +458,8 @@ extern tic_t jointimeout;
|
|||
extern UINT16 pingmeasurecount;
|
||||
extern UINT32 realpingtable[MAXPLAYERS];
|
||||
extern UINT32 playerpingtable[MAXPLAYERS];
|
||||
extern UINT32 playerpacketlosstable[MAXPLAYERS];
|
||||
extern UINT32 playerdelaytable[MAXPLAYERS];
|
||||
extern tic_t servermaxping;
|
||||
|
||||
extern boolean server_lagless;
|
||||
|
|
@ -471,6 +485,28 @@ void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_
|
|||
#define SendNetXCmd(id, param, nparam) SendNetXCmdForPlayer(0, id, param, nparam) // Shortcut for P1
|
||||
void SendKick(UINT8 playernum, UINT8 msg);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CL_SEARCHING,
|
||||
CL_CHECKFILES,
|
||||
CL_DOWNLOADFILES,
|
||||
CL_DOWNLOADFAILED,
|
||||
CL_ASKJOIN,
|
||||
CL_LOADFILES,
|
||||
CL_SETUPFILES,
|
||||
CL_WAITJOINRESPONSE,
|
||||
CL_DOWNLOADSAVEGAME,
|
||||
CL_CONNECTED,
|
||||
CL_ABORTED,
|
||||
CL_ASKFULLFILELIST,
|
||||
CL_CONFIRMCONNECT,
|
||||
CL_VIEWSERVER,
|
||||
#ifdef HAVE_CURL
|
||||
CL_PREPAREHTTPFILES,
|
||||
CL_DOWNLOADHTTPFILES,
|
||||
#endif
|
||||
} cl_mode_t;
|
||||
|
||||
// Create any new ticcmds and broadcast to other players.
|
||||
void NetKeepAlive(void);
|
||||
void NetUpdate(void);
|
||||
|
|
@ -530,6 +566,16 @@ extern char motd[254], server_context[8];
|
|||
extern UINT8 playernode[MAXPLAYERS];
|
||||
/* consoleplayer of this player (splitscreen) */
|
||||
extern UINT8 playerconsole[MAXPLAYERS];
|
||||
extern plrinfo playerinfo[MAXPLAYERS];
|
||||
extern SINT8 joinnode;
|
||||
|
||||
#define SERVMUS_1 "SRVMS1"
|
||||
#define SERVMUS_2 "SRVMS2"
|
||||
|
||||
void ChangeServMusic(const char* musname, boolean fallback, boolean keepPos);
|
||||
|
||||
INT32 GetClientMode(void);
|
||||
void ChangeClientMode(INT32 mode);
|
||||
|
||||
INT32 D_NumPlayers(void);
|
||||
boolean D_IsPlayerHumanAndGaming(INT32 player_number);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -86,8 +86,8 @@
|
|||
#define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291
|
||||
#define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b
|
||||
#define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9
|
||||
#define ASSET_HASH_MAIN_PK3 0x41568cadaf608e27
|
||||
#define ASSET_HASH_MAPPATCH_PK3 0x36ef622b54d98871
|
||||
#define ASSET_HASH_MAIN_PK3 0x4bc55baaa1e5719e
|
||||
#define ASSET_HASH_MAPPATCH_PK3 0xb6597d7c9f236846
|
||||
#define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461
|
||||
#ifdef USE_PATCH_FILE
|
||||
#define ASSET_HASH_PATCH_PK3 0x0000000000000000
|
||||
|
|
@ -457,19 +457,20 @@ static bool D_Display(void)
|
|||
if (gamestate == GS_TITLESCREEN && wipegamestate != GS_INTRO)
|
||||
wipedefindex = wipe_timeattack_toblack;
|
||||
|
||||
if (wipetypepre < 0)
|
||||
if (wipetypepre < 0 || !F_WipeExists(wipetypepre))
|
||||
wipetypepre = wipedefs[wipedefindex];
|
||||
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
// Fade to black first
|
||||
if (!(gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction)) // fades to black on its own timing, always
|
||||
if ((wipegamestate == FORCEWIPE ||
|
||||
!(gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction))) // fades to black on its own timing, always
|
||||
&& wipetypepre != UINT8_MAX)
|
||||
{
|
||||
F_WipeStartScreen();
|
||||
F_WipeColorFill(31);
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipetypepre, gamestate != GS_TIMEATTACK);
|
||||
F_RunWipe(wipetypepre, gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN);
|
||||
ranwipe = true;
|
||||
}
|
||||
|
||||
|
|
@ -483,7 +484,7 @@ static bool D_Display(void)
|
|||
}
|
||||
else //dedicated servers
|
||||
{
|
||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN);
|
||||
ranwipe = true;
|
||||
wipegamestate = gamestate;
|
||||
}
|
||||
|
|
@ -557,20 +558,12 @@ static bool D_Display(void)
|
|||
HU_Drawer();
|
||||
break;
|
||||
|
||||
case GS_GAMEEND:
|
||||
F_GameEndDrawer();
|
||||
break;
|
||||
|
||||
case GS_EVALUATION:
|
||||
F_GameEvaluationDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
case GS_CONTINUING:
|
||||
//F_ContinueDrawer();
|
||||
break;
|
||||
|
||||
case GS_CREDITS:
|
||||
F_CreditDrawer();
|
||||
HU_Erase();
|
||||
|
|
@ -671,14 +664,14 @@ static bool D_Display(void)
|
|||
// and input during wipe tends to mess things up
|
||||
wipedefindex += WIPEFINALSHIFT;
|
||||
|
||||
if (wipetypepost < 0)
|
||||
if (wipetypepost < 0 || !F_WipeExists(wipetypepost))
|
||||
wipetypepost = wipedefs[wipedefindex];
|
||||
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
F_WipeEndScreen();
|
||||
|
||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN);
|
||||
F_RunWipe(wipetypepost, gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN);
|
||||
ranwipe = true;
|
||||
}
|
||||
|
||||
|
|
@ -900,7 +893,9 @@ void D_SRB2Loop(void)
|
|||
{
|
||||
renderdeltatics = FLOAT_TO_FIXED(deltatics);
|
||||
|
||||
if (!(paused || P_AutoPause()) && !hu_stopped)
|
||||
const boolean lagging = ((deltatics >= 1.0) || hu_stopped);
|
||||
|
||||
if (!(paused || P_AutoPause()) && !lagging)
|
||||
{
|
||||
rendertimefrac = g_time.timefrac;
|
||||
}
|
||||
|
|
@ -909,7 +904,14 @@ void D_SRB2Loop(void)
|
|||
rendertimefrac = FRACUNIT;
|
||||
}
|
||||
|
||||
rendertimefrac_unpaused = g_time.timefrac;
|
||||
if (!lagging)
|
||||
{
|
||||
rendertimefrac_unpaused = g_time.timefrac;
|
||||
}
|
||||
else
|
||||
{
|
||||
rendertimefrac_unpaused = FRACUNIT;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -918,9 +920,24 @@ void D_SRB2Loop(void)
|
|||
rendertimefrac_unpaused = FRACUNIT;
|
||||
}
|
||||
|
||||
if ((interp || doDisplay) && !frameskip)
|
||||
if (interp || doDisplay)
|
||||
{
|
||||
ranwipe = D_Display();
|
||||
if (!frameskip)
|
||||
{
|
||||
ranwipe = D_Display();
|
||||
}
|
||||
else if (frameskip)
|
||||
{
|
||||
// always update console and hud
|
||||
// otherwise it may take minutes to open it
|
||||
CON_Drawer();
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
ST_Drawer();
|
||||
HU_Drawer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Only take screenshots after drawing.
|
||||
|
|
@ -949,7 +966,7 @@ void D_SRB2Loop(void)
|
|||
// Fully completed frame made.
|
||||
finishprecise = I_GetPreciseTime();
|
||||
|
||||
// Use the time before sleep for frameskip calculations:
|
||||
// Use the time before sleep for frameskip calculations:
|
||||
// post-sleep time is literally being intentionally wasted
|
||||
deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision();
|
||||
deltatics = deltasecs * NEWTICRATE;
|
||||
|
|
@ -1062,7 +1079,7 @@ void D_StartTitle(void)
|
|||
//demosequence = -1;
|
||||
G_SetGametype(GT_RACE); // SRB2kart
|
||||
paused = false;
|
||||
F_InitMenuPresValues();
|
||||
F_InitMenuPresValues(true);
|
||||
|
||||
// clear cmd building stuff
|
||||
memset(gamekeydown, 0, sizeof(gamekeydown));
|
||||
|
|
@ -1245,7 +1262,7 @@ void D_SRB2Main(void)
|
|||
{
|
||||
INT32 p;
|
||||
|
||||
INT32 pstartmap = 0;
|
||||
INT32 pstartmap = 1;
|
||||
boolean autostart = false;
|
||||
|
||||
/* break the version string into version numbers, for netplay */
|
||||
|
|
@ -1428,12 +1445,9 @@ void D_SRB2Main(void)
|
|||
// adapt tables to SRB2's needs, including extra slots for dehacked file support
|
||||
P_ResetData(15);
|
||||
|
||||
// initiate menu metadata before SOCcing them
|
||||
M_InitMenuPresTables();
|
||||
|
||||
// init title screen display params
|
||||
if (M_GetUrlProtocolArg() || M_CheckParm("-connect"))
|
||||
F_InitMenuPresValues();
|
||||
F_InitMenuPresValues(true);
|
||||
|
||||
//---------------------------------------------------- READY TIME
|
||||
// we need to check for dedicated before initialization of some subsystems
|
||||
|
|
@ -1445,10 +1459,6 @@ void D_SRB2Main(void)
|
|||
// Setup default unlockable conditions
|
||||
M_SetupDefaultConditionSets();
|
||||
|
||||
// Setup character tables
|
||||
// Have to be done here before files are loaded
|
||||
M_InitCharacterTables();
|
||||
|
||||
D_RegisterServerCommands();
|
||||
D_RegisterClientCommands(); // be sure that this is called before D_CheckNetGame
|
||||
R_RegisterEngineStuff();
|
||||
|
|
@ -1548,11 +1558,11 @@ void D_SRB2Main(void)
|
|||
I_Error("modifiedgame set during startup!");
|
||||
|
||||
CONS_Printf("W_InitMultipleFiles(): Adding external PWADs.\n");
|
||||
|
||||
|
||||
// HACK: Refer to https://git.do.srb2.org/KartKrew/RingRacers/-/merge_requests/29#note_61574
|
||||
partadd_earliestfile = numwadfiles;
|
||||
W_InitMultipleFiles(startuppwads, true);
|
||||
|
||||
|
||||
// Only search for pwad maps and reload graphics if we actually have a pwad added
|
||||
if (startuppwads[0] != NULL)
|
||||
{
|
||||
|
|
@ -1638,6 +1648,7 @@ void D_SRB2Main(void)
|
|||
I_StartupSound();
|
||||
I_InitMusic();
|
||||
S_InitSfxChannels(cv_soundvolume.value);
|
||||
S_InitMusicVolume();
|
||||
}
|
||||
CON_SetLoadingProgress(LOADED_SINITSFXCHANNELS);
|
||||
|
||||
|
|
@ -1682,7 +1693,7 @@ void D_SRB2Main(void)
|
|||
// Start up a "minor" grand prix session
|
||||
memset(&grandprixinfo, 0, sizeof(struct grandprixinfo));
|
||||
|
||||
grandprixinfo.gamespeed = KARTSPEED_NORMAL;
|
||||
grandprixinfo.gamespeed = KARTSPEED_HARD;
|
||||
grandprixinfo.encore = false;
|
||||
grandprixinfo.masterbots = false;
|
||||
|
||||
|
|
@ -1840,11 +1851,16 @@ void D_SRB2Main(void)
|
|||
const char *sskill = M_GetNextParm();
|
||||
|
||||
const char *masterstr = "Master";
|
||||
const char *nightmarestr = "NIGHTMARE";
|
||||
|
||||
if (!strcasecmp(masterstr, sskill))
|
||||
{
|
||||
newskill = KARTGP_MASTER;
|
||||
}
|
||||
else if (!strcasecmp(nightmarestr, sskill))
|
||||
{
|
||||
newskill = KARTGP_NIGHTMARE;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (j = 0; kartspeed_cons_t[j].strvalue; j++)
|
||||
|
|
@ -1859,7 +1875,7 @@ void D_SRB2Main(void)
|
|||
if (!kartspeed_cons_t[j].strvalue) // reached end of the list with no match
|
||||
{
|
||||
j = atoi(sskill); // assume they gave us a skill number, which is okay too
|
||||
if (j >= KARTSPEED_EASY && j <= KARTGP_MASTER)
|
||||
if (j >= KARTSPEED_EASY && j <= KARTGP_NIGHTMARE)
|
||||
newskill = (INT16)j;
|
||||
}
|
||||
}
|
||||
|
|
@ -1871,6 +1887,11 @@ void D_SRB2Main(void)
|
|||
grandprixinfo.masterbots = true;
|
||||
newskill = KARTSPEED_HARD;
|
||||
}
|
||||
else if (newskill == KARTGP_NIGHTMARE)
|
||||
{
|
||||
grandprixinfo.masterbots = true;
|
||||
newskill = KARTSPEED_EXPERT;
|
||||
}
|
||||
|
||||
grandprixinfo.gamespeed = newskill;
|
||||
}
|
||||
|
|
@ -1878,6 +1899,10 @@ void D_SRB2Main(void)
|
|||
{
|
||||
newskill = KARTSPEED_HARD;
|
||||
}
|
||||
else if (newskill == KARTGP_NIGHTMARE)
|
||||
{
|
||||
newskill = KARTSPEED_EXPERT;
|
||||
}
|
||||
|
||||
if (newskill != -1)
|
||||
CV_SetValue(&cv_kartspeed, newskill);
|
||||
|
|
@ -1901,7 +1926,7 @@ void D_SRB2Main(void)
|
|||
}
|
||||
else if (M_CheckParm("-skipintro"))
|
||||
{
|
||||
F_InitMenuPresValues();
|
||||
F_InitMenuPresValues(true);
|
||||
F_StartTitleScreen();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
34
src/d_net.c
34
src/d_net.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -105,6 +105,8 @@ static INT32 retransmit = 0, duppacket = 0;
|
|||
static INT32 sendackpacket = 0, getackpacket = 0;
|
||||
INT32 ticruned = 0, ticmiss = 0;
|
||||
|
||||
boolean packetloss[MAXPLAYERS][PACKETMEASUREWINDOW];
|
||||
|
||||
// globals
|
||||
INT32 getbps, sendbps;
|
||||
float lostpercent, duppercent, gamelostpercent;
|
||||
|
|
@ -324,11 +326,18 @@ static void RemoveAck(INT32 i)
|
|||
Net_CloseConnection(node);
|
||||
}
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GPACK_OK = 0,
|
||||
GPACK_DUPLICATE,
|
||||
GPACK_OUTOFORDER,
|
||||
} goodpacket_e;
|
||||
|
||||
// We have got a packet, proceed the ack request and ack return
|
||||
static boolean Processackpak(void)
|
||||
static int Processackpak(void)
|
||||
{
|
||||
INT32 i;
|
||||
boolean goodpacket = true;
|
||||
int goodpacket = GPACK_OK;
|
||||
netnode_t *node = &nodes[doomcom->remotenode];
|
||||
|
||||
// Received an ack return, so remove the ack in the list
|
||||
|
|
@ -353,7 +362,7 @@ static boolean Processackpak(void)
|
|||
{
|
||||
DEBFILE(va("Discard(1) ack %d (duplicated)\n", ack));
|
||||
duppacket++;
|
||||
goodpacket = false; // Discard packet (duplicate)
|
||||
goodpacket = GPACK_DUPLICATE; // Discard packet (duplicate)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -363,10 +372,10 @@ static boolean Processackpak(void)
|
|||
{
|
||||
DEBFILE(va("Discard(2) ack %d (duplicated)\n", ack));
|
||||
duppacket++;
|
||||
goodpacket = false; // Discard packet (duplicate)
|
||||
goodpacket = GPACK_DUPLICATE; // Discard packet (duplicate)
|
||||
break;
|
||||
}
|
||||
if (goodpacket)
|
||||
if (goodpacket == GPACK_OK)
|
||||
{
|
||||
// Is a good packet so increment the acknowledge number,
|
||||
// Then search for a "hole" in the queue
|
||||
|
|
@ -427,12 +436,13 @@ static boolean Processackpak(void)
|
|||
else // Buffer full discard packet, sender will resend it
|
||||
{ // We can admit the packet but we will not detect the duplication after :(
|
||||
DEBFILE("no more freeackret\n");
|
||||
goodpacket = false;
|
||||
goodpacket = GPACK_OUTOFORDER;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// return values: 0 = ok, 1 = duplicate, 2 = out of order
|
||||
return goodpacket;
|
||||
}
|
||||
|
||||
|
|
@ -1125,6 +1135,7 @@ boolean HGetPacket(void)
|
|||
while(true)
|
||||
{
|
||||
//nodejustjoined = I_NetGet();
|
||||
int goodpacket;
|
||||
I_NetGet();
|
||||
|
||||
if (doomcom->remotenode == -1) // No packet received
|
||||
|
|
@ -1170,8 +1181,15 @@ boolean HGetPacket(void)
|
|||
}*/
|
||||
|
||||
// Proceed the ack and ackreturn field
|
||||
if (!Processackpak())
|
||||
goodpacket = Processackpak();
|
||||
if (goodpacket != GPACK_OK)
|
||||
{
|
||||
// resend the ACK in case the previous ACK didn't reach the client.
|
||||
// prevents the client's netbuffer from locking up.
|
||||
if (goodpacket == GPACK_DUPLICATE)
|
||||
Net_SendAcks(doomcom->remotenode);
|
||||
continue; // discarded (duplicated)
|
||||
}
|
||||
|
||||
// A packet with just ackreturn
|
||||
if (netbuffer->packettype == PT_NOTHING)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -22,6 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
// Max computers in a game
|
||||
// 127 is probably as high as this can go, because
|
||||
// SINT8 is used for nodes sometimes >:(
|
||||
|
|
@ -40,6 +42,9 @@ boolean Net_GetNetStat(void);
|
|||
extern INT32 getbytes;
|
||||
extern INT64 sendbytes; // Realtime updated
|
||||
|
||||
#define PACKETMEASUREWINDOW (TICRATE*2)
|
||||
extern boolean packetloss[MAXPLAYERS][PACKETMEASUREWINDOW];
|
||||
|
||||
extern SINT8 nodetoplayer[MAXNETNODES];
|
||||
extern SINT8 nodetoplayer2[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen)
|
||||
extern SINT8 nodetoplayer3[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen == 2)
|
||||
|
|
|
|||
176
src/d_netcmd.c
176
src/d_netcmd.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -153,7 +153,9 @@ static void KartPurpleDrift_OnChange(void);
|
|||
static void KartStacking_OnChange(void);
|
||||
static void KartChaining_OnChange(void);
|
||||
static void KartSlipdash_OnChange(void);
|
||||
static void KartSlopeBoost_OnChange(void);
|
||||
static void KartItemBreaker_OnChange(void);
|
||||
static void KartInvinType_OnChange(void);
|
||||
|
||||
static void Schedule_OnChange(void);
|
||||
|
||||
|
|
@ -457,20 +459,23 @@ consvar_t cv_kartstacking_accelstack = CVAR_INIT ("kartstacking_accelstack", "Of
|
|||
consvar_t cv_kartstacking_sneaker_easyspeedboost = CVAR_INIT ("vanillaboost_sneaker_easyspeedboost", "0.8317", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_sneaker_normalspeedboost = CVAR_INIT ("vanillaboost_sneaker_normalspeedboost", "0.5", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_sneaker_hardspeedboost = CVAR_INIT ("vanillaboost_sneaker_hardspeedboost", "0.2756", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_sneaker_expertspeedboost = CVAR_INIT ("vanillaboost_sneaker_expertspeedboost", "0.25", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_sneaker_accelboost = CVAR_INIT ("vanillaboost_sneaker_accelboost", "8.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_sneaker_maxgrade = CVAR_INIT ("vanillaboost_sneaker_maxgrade", "3", CV_NETVAR|CV_CHEAT, CV_Natural, NULL);
|
||||
consvar_t cv_kartstacking_sneaker_stackable = CVAR_INIT ("vanillaboost_sneaker_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartstacking_invincibility_speedboost = CVAR_INIT ("vanillaboost_invincibility_speedboost", "0.375", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_invincibility_accelboost = CVAR_INIT ("vanillaboost_invincibility_accelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_invincibility_legacyspeedboost = CVAR_INIT ("vanillaboost_invincibility_legacyspeedboost", "0.375", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_invincibility_legacyaccelboost = CVAR_INIT ("vanillaboost_invincibility_legacyaccelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_invincibility_alternatespeedboost = CVAR_INIT ("vanillaboost_invincibility_alternatespeedboost", "0.68", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_invincibility_alternateaccelboost = CVAR_INIT ("vanillaboost_invincibility_alternateaccelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_invincibility_stackable = CVAR_INIT ("vanillaboost_invincibility_stackable", "Off", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartstacking_grow_speedboost = CVAR_INIT ("vanillaboost_grow_speedboost", "0.2", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_grow_accelboost = CVAR_INIT ("vanillaboost_grow_accelboost", "0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_grow_stackable = CVAR_INIT ("vanillaboost_grow_stackable", "Off", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartstacking_flame_speedval = CVAR_INIT ("vanillaboost_flame_speedval", "0.85", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_flame_accelboost = CVAR_INIT ("vanillaboost_flame_accelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_flame_speedval = CVAR_INIT ("vanillaboost_flame_speedval", "0.90", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_flame_accelboost = CVAR_INIT ("vanillaboost_flame_accelboost", "6.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_flame_stackable = CVAR_INIT ("vanillaboost_flame_stackable", "Off", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartstacking_start_speedboost = CVAR_INIT ("vanillaboost_start_speedboost", "0.25", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
|
|
@ -483,7 +488,14 @@ consvar_t cv_kartstacking_drift_stackable = CVAR_INIT ("vanillaboost_drift_stack
|
|||
|
||||
consvar_t cv_kartstacking_ring_speedboost = CVAR_INIT ("vanillaboost_ring_speedboost", "0.2", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_ring_accelboost = CVAR_INIT ("vanillaboost_ring_accelboost", "4.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_ring_stackable = CVAR_INIT ("vanillaboost_ring_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||
consvar_t cv_kartstacking_ring_stackable = CVAR_INIT ("vanillaboost_ring_stackable", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartstacking_slope_decay = CVAR_INIT ("vanillaboost_slope_decay", "0.004", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_slope_brakemod = CVAR_INIT ("vanillaboost_slope_brakemod", "0.01", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_slope_speedboost_max = CVAR_INIT ("vanillaboost_slope_speedboost_max", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_slope_speedboost_cap = CVAR_INIT ("vanillaboost_slope_speedboost_cap", "1.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_slope_accelboost = CVAR_INIT ("vanillaboost_slope_accelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_slope_stackable = CVAR_INIT ("vanillaboost_slope_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartchaining = CVAR_INIT ("kartchaining", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartChaining_OnChange);
|
||||
consvar_t cv_kartchainingoffroad = CVAR_INIT ("kartchaining_chainoffroad", "No", CV_NETVAR, CV_YesNo, NULL);
|
||||
|
|
@ -502,6 +514,21 @@ consvar_t cv_kartbumpspring = CVAR_INIT ("kartbumpspring", "No", CV_NETVAR, CV_Y
|
|||
|
||||
consvar_t cv_kartslipdash = CVAR_INIT ("kartslipdash", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartSlipdash_OnChange);
|
||||
|
||||
consvar_t cv_kartslopeboost = CVAR_INIT ("kartslopeboost", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartSlopeBoost_OnChange);
|
||||
|
||||
// Invincibility modifiers
|
||||
static CV_PossibleValue_t invintype_cons_t[] = {{0, "Legacy"}, {1, "Alternative"}, {0, NULL}};
|
||||
consvar_t cv_kartinvintype = CVAR_INIT ("kartinvintype", "Legacy", CV_NETVAR|CV_CALL, invintype_cons_t, KartInvinType_OnChange);
|
||||
|
||||
// How far the player must be from the cluster to begin frequently rolling Invincibility.
|
||||
static CV_PossibleValue_t invindist_cons_t[] = {{1, "MIN"}, {32000, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartinvindist = CVAR_INIT ("kartinvindist", "8400", CV_NETVAR|CV_CHEAT, invindist_cons_t, NULL);
|
||||
|
||||
consvar_t cv_kartinvindistmul = CVAR_INIT ("kartinvindistmul", "0.54", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
|
||||
consvar_t cv_kartinvin_maxtime = CVAR_INIT ("kartinvin_maxtime", "35.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartinvin_midtime = CVAR_INIT ("kartinvin_midtime", "23.333", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
|
||||
static CV_PossibleValue_t kartdebugitem_cons_t[] =
|
||||
{
|
||||
#define FOREACH( name, n ) { n, #name }
|
||||
|
|
@ -509,9 +536,10 @@ static CV_PossibleValue_t kartdebugitem_cons_t[] =
|
|||
#undef FOREACH
|
||||
{0}
|
||||
};
|
||||
consvar_t cv_kartdebugitem = CVAR_INIT ("kartdebugitem", "0", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, kartdebugitem_cons_t, NULL);
|
||||
consvar_t cv_kartdebugitem = CVAR_INIT ("kartdebugitem", "NONE", CV_NETVAR|CV_CHEAT, kartdebugitem_cons_t, NULL);
|
||||
static CV_PossibleValue_t kartdebugamount_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartdebugamount = CVAR_INIT ("kartdebugamount", "1", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, kartdebugamount_cons_t, NULL);
|
||||
consvar_t cv_kartdebugamount = CVAR_INIT ("kartdebugamount", "1", CV_NETVAR|CV_CHEAT, kartdebugamount_cons_t, NULL);
|
||||
consvar_t cv_kartdebugshrink = CVAR_INIT ("kartdebugshrink", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
|
||||
#ifdef DEVELOP
|
||||
#define VALUE "Yes"
|
||||
#else
|
||||
|
|
@ -519,24 +547,26 @@ consvar_t cv_kartdebugamount = CVAR_INIT ("kartdebugamount", "1", CV_NETVAR|CV_C
|
|||
#endif
|
||||
#undef VALUE
|
||||
|
||||
consvar_t cv_kartdebugdistribution = CVAR_INIT ("kartdebugdistribution", "Off", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebughuddrop = CVAR_INIT ("kartdebughuddrop", "Off", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugdistribution = CVAR_INIT ("kartdebugdistribution", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebughuddrop = CVAR_INIT ("kartdebughuddrop", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
|
||||
static CV_PossibleValue_t kartdebugwaypoint_cons_t[] = {{0, "Off"}, {1, "Forwards"}, {2, "Backwards"}, {0, NULL}};
|
||||
consvar_t cv_kartdebugwaypoints = CVAR_INIT ("kartdebugwaypoints", "Off", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, kartdebugwaypoint_cons_t, NULL);
|
||||
consvar_t cv_kartdebuglap = CVAR_INIT ("kartdebuglap", "Off", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, kartdebugwaypoint_cons_t, NULL);
|
||||
consvar_t cv_kartdebugbot = CVAR_INIT ("kartdebugbot", "Off", CV_NETVAR|CV_CHEAT|CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugwaypoints = CVAR_INIT ("kartdebugwaypoints", "Off", CV_NETVAR|CV_CHEAT, kartdebugwaypoint_cons_t, NULL);
|
||||
consvar_t cv_kartdebuglap = CVAR_INIT ("kartdebuglap", "Off", CV_NETVAR|CV_CHEAT, kartdebugwaypoint_cons_t, NULL);
|
||||
consvar_t cv_kartdebugbot = CVAR_INIT ("kartdebugbot", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugcluster = CVAR_INIT ("kartdebugcluster", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
|
||||
|
||||
consvar_t cv_kartdebugcheckpoint = CVAR_INIT ("kartdebugcheckpoint", "Off", CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugnodes = CVAR_INIT ("kartdebugnodes", "Off", CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugcolorize = CVAR_INIT ("kartdebugcolorize", "Off", CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugdirector = CVAR_INIT ("kartdebugdirector", "Off", CV_NOSHOWHELP, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugcheckpoint = CVAR_INIT ("kartdebugcheckpoint", "Off", 0, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugnodes = CVAR_INIT ("kartdebugnodes", "Off", 0, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugcolorize = CVAR_INIT ("kartdebugcolorize", "Off", 0, CV_OnOff, NULL);
|
||||
consvar_t cv_kartdebugdirector = CVAR_INIT ("kartdebugdirector", "Off", 0, CV_OnOff, NULL);
|
||||
|
||||
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_votetime = CVAR_INIT ("votetime", "20", CV_NETVAR, votetime_cons_t, NULL);
|
||||
|
||||
consvar_t cv_gravity = CVAR_INIT ("gravity", "0.8", CV_RESTRICT|CV_FLOAT|CV_CALL, NULL, Gravity_OnChange); // change DEFAULT_GRAVITY if you change this
|
||||
|
||||
consvar_t cv_soundtest = CVAR_INIT ("soundtest", "0", CV_CALL, NULL, SoundTest_OnChange);
|
||||
static CV_PossibleValue_t soundtest_cons_t[] = {{0, "MIN"}, {NUMSFX, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_soundtest = CVAR_INIT ("soundtest", "0", CV_CALL, soundtest_cons_t, SoundTest_OnChange);
|
||||
|
||||
static CV_PossibleValue_t minitimelimit_cons_t[] = {{15, "MIN"}, {9999, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_countdowntime = CVAR_INIT ("countdowntime", "30", CV_NETVAR|CV_CHEAT, minitimelimit_cons_t, NULL);
|
||||
|
|
@ -583,7 +613,7 @@ consvar_t cv_maxping = CVAR_INIT ("maxdelay", "20", CV_SAVE, CV_Unsigned, NULL);
|
|||
consvar_t cv_lagless = CVAR_INIT ("lagless", "On", CV_SAVE|CV_NETVAR|CV_CALL, CV_OnOff, Lagless_OnChange);
|
||||
|
||||
static CV_PossibleValue_t pingtimeout_cons_t[] = {{8, "MIN"}, {120, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_pingtimeout = CVAR_INIT ("maxdelaytimeout", "10", CV_SAVE|CV_NETVAR, pingtimeout_cons_t, NULL);
|
||||
consvar_t cv_pingtimeout = CVAR_INIT ("maxdelaytimeout", "10", CV_SAVE, pingtimeout_cons_t, NULL);
|
||||
|
||||
// show your ping on the HUD next to framerate. Defaults to warning only (shows up if your ping is > maxping)
|
||||
static CV_PossibleValue_t showping_cons_t[] = {{0, "Off"}, {1, "Always"}, {2, "Warning"}, {0, NULL}};
|
||||
|
|
@ -1005,6 +1035,8 @@ void D_RegisterClientCommands(void)
|
|||
COM_AddCommand("timedemo", Command_Timedemo_f);
|
||||
COM_AddCommand("stopdemo", Command_Stopdemo_f);
|
||||
COM_AddCommand("playintro", Command_Playintro_f);
|
||||
CV_RegisterVar(&cv_resyncdemo);
|
||||
CV_RegisterVar(&cv_resetnetvars);
|
||||
|
||||
COM_AddCommand("resetcamera", Command_ResetCamera_f);
|
||||
|
||||
|
|
@ -1169,6 +1201,7 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_renderview);
|
||||
CV_RegisterVar(&cv_vhseffect);
|
||||
CV_RegisterVar(&cv_shittyscreen);
|
||||
CV_RegisterVar(&cv_votebgscaling);
|
||||
CV_RegisterVar(&cv_renderer);
|
||||
CV_RegisterVar(&cv_scr_depth);
|
||||
CV_RegisterVar(&cv_scr_width);
|
||||
|
|
@ -1227,6 +1260,9 @@ void D_RegisterClientCommands(void)
|
|||
|
||||
COM_AddCommand("listskins", Command_ListSkins);
|
||||
|
||||
CV_RegisterVar(&cv_connectawaittime);
|
||||
CV_RegisterVar(&cv_serverinfoscreen);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1608,7 +1644,7 @@ static void SendNameAndColor(UINT8 n)
|
|||
const INT32 playernum = g_localplayers[n];
|
||||
player_t *player = &players[playernum];
|
||||
|
||||
char buf[MAXPLAYERNAME+9];
|
||||
char buf[MAXPLAYERNAME+12];
|
||||
char *p;
|
||||
|
||||
if (splitscreen < n)
|
||||
|
|
@ -1883,7 +1919,11 @@ void WeaponPref_Send(UINT8 ssplayer)
|
|||
if (cv_flipcam[ssplayer].value)
|
||||
prefs |= WP_FLIPCAM;
|
||||
|
||||
SendNetXCmdForPlayer(ssplayer, XD_WEAPONPREF, &prefs, 1);
|
||||
UINT8 buf[2];
|
||||
buf[0] = prefs;
|
||||
buf[1] = cv_mindelay.value;
|
||||
|
||||
SendNetXCmdForPlayer(ssplayer, XD_WEAPONPREF, buf, sizeof buf);
|
||||
}
|
||||
|
||||
void WeaponPref_Save(UINT8 **cp, INT32 playernum)
|
||||
|
|
@ -1934,6 +1974,13 @@ static void Got_WeaponPref(UINT8 **cp,INT32 playernum)
|
|||
{
|
||||
WeaponPref_Parse(cp, playernum);
|
||||
|
||||
UINT8 mindelay = READUINT8(*cp);
|
||||
if (server)
|
||||
{
|
||||
for (UINT8 i = 0; i < G_LocalSplitscreenPartySize(playernum); ++i)
|
||||
playerdelaytable[G_LocalSplitscreenPartyMember(playernum, i)] = mindelay;
|
||||
}
|
||||
|
||||
// SEE ALSO g_demo.c
|
||||
demo_extradata[playernum] |= DXD_WEAPONPREF;
|
||||
}
|
||||
|
|
@ -2812,11 +2859,11 @@ void D_SetupVote(void)
|
|||
hellpick = 1;
|
||||
|
||||
if (i == 2) // sometimes a different gametype
|
||||
m = G_RandMap(G_TOLFlag(secondgt), prevmap, ((secondgt != gametype) ? 2 : 0), 0, true, votebuffer);
|
||||
m = G_RandMap(G_TOLFlag(secondgt), prevmap, ((secondgt != gametype) ? 2 : 0), 0, votebuffer);
|
||||
else if (i >= VOTEROWS) // unknown-random and formerly force-unknown MAP HELL
|
||||
m = G_RandMap(G_TOLFlag(gt), prevmap, 0, hellpick, (i < VOTEROWSADDSONE), votebuffer);
|
||||
m = G_RandMap(G_TOLFlag(gt), prevmap, 0, hellpick, votebuffer);
|
||||
else
|
||||
m = G_RandMap(G_TOLFlag(gt), prevmap, 0, 0, true, votebuffer);
|
||||
m = G_RandMap(G_TOLFlag(gt), prevmap, 0, 0, votebuffer);
|
||||
if (i < VOTEROWS)
|
||||
votebuffer[min(i, 2)] = m; // min() is a dumb workaround for gcc 4.4 array-bounds error
|
||||
WRITEUINT16(p, m);
|
||||
|
|
@ -3136,6 +3183,7 @@ static void Command_Map_f(void)
|
|||
if (option_skill)
|
||||
{
|
||||
const char *masterstr = "Master";
|
||||
const char *nightmarestr = "NIGHTMARE";
|
||||
const char *skillname = COM_Argv(option_skill + 1);
|
||||
INT32 newskill = -1;
|
||||
INT32 j;
|
||||
|
|
@ -3144,6 +3192,10 @@ static void Command_Map_f(void)
|
|||
{
|
||||
newskill = KARTGP_MASTER;
|
||||
}
|
||||
else if (!strcasecmp(nightmarestr, skillname))
|
||||
{
|
||||
newskill = KARTGP_NIGHTMARE;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (j = 0; kartspeed_cons_t[j].strvalue; j++)
|
||||
|
|
@ -3158,7 +3210,7 @@ static void Command_Map_f(void)
|
|||
if (!kartspeed_cons_t[j].strvalue) // reached end of the list with no match
|
||||
{
|
||||
INT32 num = atoi(COM_Argv(option_skill + 1)); // assume they gave us a skill number, which is okay too
|
||||
if (num >= KARTSPEED_EASY && num <= KARTGP_MASTER)
|
||||
if (num >= KARTSPEED_EASY && num <= KARTGP_NIGHTMARE)
|
||||
newskill = (INT16)num;
|
||||
}
|
||||
}
|
||||
|
|
@ -3170,6 +3222,11 @@ static void Command_Map_f(void)
|
|||
grandprixinfo.gamespeed = KARTSPEED_HARD;
|
||||
grandprixinfo.masterbots = true;
|
||||
}
|
||||
else if (newskill == KARTGP_NIGHTMARE)
|
||||
{
|
||||
grandprixinfo.gamespeed = KARTSPEED_EXPERT;
|
||||
grandprixinfo.masterbots = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
grandprixinfo.gamespeed = newskill;
|
||||
|
|
@ -3341,7 +3398,7 @@ static void Command_RandomMap(void)
|
|||
oldmapnum = -1;
|
||||
}
|
||||
|
||||
newmapnum = G_RandMap(G_TOLFlag(newgametype), oldmapnum, 0, 0, false, NULL) + 1;
|
||||
newmapnum = G_RandMap(G_TOLFlag(newgametype), oldmapnum, 0, 0, NULL) + 1;
|
||||
D_MapChange(newmapnum, newgametype, newencoremode, newresetplayers, 0, false, false);
|
||||
}
|
||||
|
||||
|
|
@ -3386,7 +3443,7 @@ static void Command_Pause(void)
|
|||
}
|
||||
else if (modeattacking) // in time attack, pausing restarts the map
|
||||
{
|
||||
M_ModeAttackRetry(0); // directly call from m_menu;
|
||||
MR_ModeAttackRetry(0); // directly call from m_menu;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -6107,7 +6164,17 @@ static void Command_Cheats_f(void)
|
|||
|
||||
if (CV_CheatsEnabled())
|
||||
{
|
||||
consvar_t *cvar;
|
||||
CONS_Printf(M_GetText("At least one CHEAT-marked variable has been changed -- Cheats are enabled.\n"));
|
||||
|
||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||
{
|
||||
if ((cvar->flags & CV_CHEAT) && strcmp(cvar->defaultvalue, cvar->string))
|
||||
{
|
||||
CONS_Printf("%s: Default Value: %s Current Value:%s\n", cvar->name, cvar->defaultvalue, cvar->string);
|
||||
}
|
||||
}
|
||||
|
||||
if (server || (IsPlayerAdmin(consoleplayer)))
|
||||
CONS_Printf(M_GetText("Type CHEATS OFF to reset all cheat variables to default.\n"));
|
||||
}
|
||||
|
|
@ -7030,7 +7097,7 @@ static void KartFrantic_OnChange(void)
|
|||
|
||||
static void KartSpeed_OnChange(void)
|
||||
{
|
||||
if (!M_SecretUnlocked(SECRET_HARDSPEED) && cv_kartspeed.value == KARTSPEED_HARD)
|
||||
if (!M_SecretUnlocked(SECRET_HARDSPEED) && (cv_kartspeed.value == KARTSPEED_HARD || cv_kartspeed.value == KARTSPEED_EXPERT))
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't earned this yet.\n"));
|
||||
CV_StealthSet(&cv_kartspeed, cv_kartspeed.defaultvalue);
|
||||
|
|
@ -7055,7 +7122,7 @@ static void KartSpeed_OnChange(void)
|
|||
|
||||
static void KartBattleSpeed_OnChange(void)
|
||||
{
|
||||
if (!M_SecretUnlocked(SECRET_HARDSPEED) && cv_kartbattlespeed.value == KARTSPEED_HARD)
|
||||
if (!M_SecretUnlocked(SECRET_HARDSPEED) && ((cv_kartbattlespeed.value == KARTSPEED_HARD) || (cv_kartbattlespeed.value == KARTSPEED_EXPERT)))
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't earned this yet.\n"));
|
||||
CV_StealthSet(&cv_kartspeed, cv_kartspeed.defaultvalue);
|
||||
|
|
@ -7265,6 +7332,39 @@ static void KartSlipdash_OnChange(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void KartSlopeBoost_OnChange(void)
|
||||
{
|
||||
if (K_CanChangeRules() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!K_SlopeBoostActive() && cv_kartslopeboost.value)
|
||||
{
|
||||
if (leveltime < starttime)
|
||||
{
|
||||
slopeboostactive = true;
|
||||
CONS_Printf(M_GetText("Slopeboost has been turned \"On\".\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Printf(M_GetText("Slopeboost will be turned \"On\" Next Round.\n"));
|
||||
}
|
||||
}
|
||||
else if (K_SlopeBoostActive() && !cv_kartslopeboost.value)
|
||||
{
|
||||
if (leveltime < starttime)
|
||||
{
|
||||
slopeboostactive = false;
|
||||
CONS_Printf(M_GetText("Slopeboost has been turned \"Off\".\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Printf(M_GetText("Slopeboost will be turned \"Off\" next round.\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void KartItemBreaker_OnChange(void)
|
||||
{
|
||||
if (K_CanChangeRules() == false)
|
||||
|
|
@ -7287,6 +7387,24 @@ static void KartItemBreaker_OnChange(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void KartInvinType_OnChange(void)
|
||||
{
|
||||
if (K_CanChangeRules() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (leveltime < starttime)
|
||||
{
|
||||
CONS_Printf(M_GetText("Invincibility type has been changed to \"%s\".\n"), cv_kartinvintype.string);
|
||||
invintype = (UINT8)cv_kartinvintype.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Printf(M_GetText("Invincibility type will be changed to \"%s\" next round.\n"), cv_kartinvintype.string);
|
||||
}
|
||||
}
|
||||
|
||||
static void Schedule_OnChange(void)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -133,12 +133,15 @@ extern consvar_t cv_kartstacking_accelstack;
|
|||
extern consvar_t cv_kartstacking_sneaker_easyspeedboost;
|
||||
extern consvar_t cv_kartstacking_sneaker_normalspeedboost;
|
||||
extern consvar_t cv_kartstacking_sneaker_hardspeedboost;
|
||||
extern consvar_t cv_kartstacking_sneaker_expertspeedboost;
|
||||
extern consvar_t cv_kartstacking_sneaker_accelboost;
|
||||
extern consvar_t cv_kartstacking_sneaker_maxgrade;
|
||||
extern consvar_t cv_kartstacking_sneaker_stackable;
|
||||
|
||||
extern consvar_t cv_kartstacking_invincibility_speedboost;
|
||||
extern consvar_t cv_kartstacking_invincibility_accelboost;
|
||||
extern consvar_t cv_kartstacking_invincibility_legacyspeedboost;
|
||||
extern consvar_t cv_kartstacking_invincibility_legacyaccelboost;
|
||||
extern consvar_t cv_kartstacking_invincibility_alternatespeedboost;
|
||||
extern consvar_t cv_kartstacking_invincibility_alternateaccelboost;
|
||||
extern consvar_t cv_kartstacking_invincibility_stackable;
|
||||
|
||||
extern consvar_t cv_kartstacking_flame_speedval;
|
||||
|
|
@ -161,6 +164,13 @@ extern consvar_t cv_kartstacking_ring_speedboost;
|
|||
extern consvar_t cv_kartstacking_ring_accelboost;
|
||||
extern consvar_t cv_kartstacking_ring_stackable;
|
||||
|
||||
extern consvar_t cv_kartstacking_slope_decay;
|
||||
extern consvar_t cv_kartstacking_slope_brakemod;
|
||||
extern consvar_t cv_kartstacking_slope_speedboost_max;
|
||||
extern consvar_t cv_kartstacking_slope_speedboost_cap;
|
||||
extern consvar_t cv_kartstacking_slope_accelboost;
|
||||
extern consvar_t cv_kartstacking_slope_stackable;
|
||||
|
||||
extern consvar_t cv_kartchaining;
|
||||
extern consvar_t cv_kartchainingoffroad;
|
||||
|
||||
|
|
@ -170,14 +180,21 @@ extern consvar_t cv_kartpurpledrift;
|
|||
extern consvar_t cv_kartbumpspark;
|
||||
extern consvar_t cv_kartbumpspring;
|
||||
extern consvar_t cv_kartslipdash;
|
||||
extern consvar_t cv_kartslopeboost;
|
||||
extern consvar_t cv_kartinvintype;
|
||||
extern consvar_t cv_kartinvindist;
|
||||
extern consvar_t cv_kartinvindistmul;
|
||||
extern consvar_t cv_kartinvin_maxtime;
|
||||
extern consvar_t cv_kartinvin_midtime;
|
||||
|
||||
extern consvar_t cv_encorevotes;
|
||||
|
||||
extern consvar_t cv_votetime;
|
||||
|
||||
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugdistribution, cv_kartdebughuddrop;
|
||||
extern consvar_t cv_kartdebugshrink;
|
||||
extern consvar_t cv_kartdebugcheckpoint, cv_kartdebugnodes, cv_kartdebugcolorize, cv_kartdebugdirector;
|
||||
extern consvar_t cv_kartdebugwaypoints, cv_kartdebuglap, cv_kartdebugbot;
|
||||
extern consvar_t cv_kartdebugwaypoints, cv_kartdebuglap, cv_kartdebugbot, cv_kartdebugcluster;
|
||||
|
||||
extern consvar_t cv_itemfinder;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -110,6 +110,8 @@ typedef enum
|
|||
PF_SHRINKME = 1<<25, // "Shrink me" cheat preference
|
||||
PF_SHRINKACTIVE = 1<<26, // "Shrink me" cheat is in effect. (Can't be disabled mid-race)
|
||||
|
||||
PF_JUSTFLIPPED = 1<<27, // Just got flipped over, handle the bump interaction.
|
||||
|
||||
// up to 1<<29 is free
|
||||
PF_ATTACKDOWN = 1<<30, // For lua compat, don't use!
|
||||
PF_SLIDING = 1<<31, // For lua compat, don't use!
|
||||
|
|
@ -605,6 +607,7 @@ struct player_t
|
|||
UINT8 positiondelay; // Used for position number, so it can grow when passing/being passed
|
||||
UINT32 distancetofinish;
|
||||
UINT32 distancetofinishprev;
|
||||
UINT32 distancefromcluster;
|
||||
waypoint_t *currentwaypoint;
|
||||
waypoint_t *nextwaypoint;
|
||||
UINT16 bigwaypointgap;
|
||||
|
|
@ -619,12 +622,17 @@ struct player_t
|
|||
UINT16 flashing;
|
||||
UINT16 spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
UINT8 spinouttype; // Determines the mode of spinout/wipeout, see kartspinoutflags_t
|
||||
|
||||
UINT16 flipovertimer; // Flipped over by a player using Invincibility.
|
||||
angle_t flipoverangle; // Movement angle for a flipped-over player.
|
||||
|
||||
UINT8 instashield; // Instashield no-damage animation timer
|
||||
UINT8 wipeoutslow; // Timer before you slowdown when getting wiped out
|
||||
UINT8 justbumped; // Prevent players from endlessly bumping into each other
|
||||
boolean noclip; // Fix Grow breaking the "noclip" cheat. Also applies noclip as a bonus.
|
||||
|
||||
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
|
||||
SINT8 driftlock; // Prevents you from using drift angle for x tics. Used for zipper fix.
|
||||
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
|
||||
UINT8 driftboost; // (0 to 125) - Boost you get from drifting
|
||||
tic_t driftsparkGrowTimer;
|
||||
|
|
@ -675,6 +683,7 @@ struct player_t
|
|||
UINT8 pickuprings; // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
|
||||
UINT8 ringdelay; // (0 to 3) - 3 tic delay between every ring usage
|
||||
UINT16 ringboost; // Ring boost timer
|
||||
UINT16 ringtime; // The current Ring boost timer if it wasn't capped. Used for spam prevention measures.
|
||||
UINT16 superring; // Spawn rings on top of you every tic!
|
||||
UINT8 nextringaward; // When should we spawn our next superring ring?
|
||||
UINT8 ringvolume; // When consuming lots of rings, lower the sound a little.
|
||||
|
|
@ -698,12 +707,21 @@ struct player_t
|
|||
UINT16 chaintimer; // Stores current chain timer length.
|
||||
|
||||
UINT8 boostcharge; // Charge during race start
|
||||
|
||||
fixed_t slopeboost; // Handle slopeboost speed
|
||||
fixed_t prevslopeboost; // Last frame slopeboost speed
|
||||
fixed_t slopeaccel; // Handle slopeboost accel
|
||||
|
||||
INT16 growshrinktimer; // > 0 = Big, < 0 = small
|
||||
INT16 growcancel; // Duration of grow canceling
|
||||
INT16 squishedtimer; // Duration of being squished
|
||||
UINT16 rocketsneakertimer; // Rocket Sneaker duration timer
|
||||
UINT16 invincibilitytimer; // Invincibility timer
|
||||
INT16 growshrinktimer; // > 0 = Big, < 0 = small
|
||||
INT16 growcancel; // Duration of grow canceling
|
||||
INT16 squishedtimer; // Duration of being squished
|
||||
|
||||
UINT16 rocketsneakertimer; // Rocket Sneaker duration timer
|
||||
|
||||
UINT16 invincibilitytimer; // Invincibility timer
|
||||
UINT16 maxinvincibilitytime; // (Alternate) Initial time for Invincibility, used for the item bar.
|
||||
UINT16 invincibilitybottleneck; // (Alternate) Prevents breakaways by gradienting towards a heavier decrement.
|
||||
INT16 invincibilitycancel; // (Alternate) Duration of Invincibility canceling.
|
||||
|
||||
UINT8 eggmanexplode; // Fake item recieved, explode in a few seconds
|
||||
SINT8 eggmanblame; // (-1 to 15) - Fake item recieved, who set this fake
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAXPREDICTTICS 30
|
||||
#define MAXPREDICTTICS 12
|
||||
|
||||
// Button/action code definitions.
|
||||
typedef enum
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
630
src/deh_soc.c
630
src/deh_soc.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -190,200 +190,6 @@ void clear_levels(void)
|
|||
COM_BufAddText("exitgame"); // Command_ExitGame_f() but delayed
|
||||
}
|
||||
|
||||
static boolean findFreeSlot(INT32 *num)
|
||||
{
|
||||
// Send the character select entry to a free slot.
|
||||
while (*num < MAXSKINS && (description[*num].used))
|
||||
*num = *num+1;
|
||||
|
||||
// No more free slots. :(
|
||||
if (*num >= MAXSKINS)
|
||||
return false;
|
||||
|
||||
// Redesign your logo. (See M_DrawSetupChoosePlayerMenu in m_menu.c...)
|
||||
description[*num].picname[0] = '\0';
|
||||
description[*num].nametag[0] = '\0';
|
||||
description[*num].displayname[0] = '\0';
|
||||
description[*num].oppositecolor = SKINCOLOR_NONE;
|
||||
description[*num].tagtextcolor = SKINCOLOR_NONE;
|
||||
description[*num].tagoutlinecolor = SKINCOLOR_NONE;
|
||||
|
||||
// Found one! ^_^
|
||||
return (description[*num].used = true);
|
||||
}
|
||||
|
||||
// Reads a player.
|
||||
// For modifying the character select screen
|
||||
void readPlayer(MYFILE *f, INT32 num)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
char *word;
|
||||
char *word2;
|
||||
char *displayname = ZZ_Alloc(MAXLINELEN+1);
|
||||
INT32 i;
|
||||
boolean slotfound = false;
|
||||
|
||||
#define SLOTFOUND \
|
||||
if (!slotfound && (slotfound = findFreeSlot(&num)) == false) \
|
||||
goto done;
|
||||
|
||||
displayname[MAXLINELEN] = '\0';
|
||||
|
||||
do
|
||||
{
|
||||
if (myfgets(s, MAXLINELEN, f))
|
||||
{
|
||||
if (s[0] == '\n')
|
||||
break;
|
||||
|
||||
for (i = 0; i < MAXLINELEN-3; i++)
|
||||
{
|
||||
char *tmp;
|
||||
if (s[i] == '=')
|
||||
{
|
||||
tmp = &s[i+2];
|
||||
strncpy(displayname, tmp, SKINNAMESIZE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
word = strtok(s, " ");
|
||||
if (word)
|
||||
strupr(word);
|
||||
else
|
||||
break;
|
||||
|
||||
if (fastcmp(word, "PLAYERTEXT"))
|
||||
{
|
||||
char *playertext = NULL;
|
||||
|
||||
SLOTFOUND
|
||||
|
||||
for (i = 0; i < MAXLINELEN-3; i++)
|
||||
{
|
||||
if (s[i] == '=')
|
||||
{
|
||||
playertext = &s[i+2];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (playertext)
|
||||
{
|
||||
strcpy(description[num].notes, playertext);
|
||||
strcat(description[num].notes, myhashfgets(playertext, sizeof (description[num].notes), f));
|
||||
}
|
||||
else
|
||||
strcpy(description[num].notes, "");
|
||||
|
||||
// For some reason, cutting the string did not work above. Most likely due to strcpy or strcat...
|
||||
// It works down here, though.
|
||||
{
|
||||
INT32 numline = 0;
|
||||
for (i = 0; (size_t)i < sizeof(description[num].notes)-1; i++)
|
||||
{
|
||||
if (numline < 20 && description[num].notes[i] == '\n')
|
||||
numline++;
|
||||
|
||||
if (numline >= 20 || description[num].notes[i] == '\0' || description[num].notes[i] == '#')
|
||||
break;
|
||||
}
|
||||
}
|
||||
description[num].notes[strlen(description[num].notes)-1] = '\0';
|
||||
description[num].notes[i] = '\0';
|
||||
continue;
|
||||
}
|
||||
|
||||
word2 = strtok(NULL, " = ");
|
||||
if (word2)
|
||||
strupr(word2);
|
||||
else
|
||||
break;
|
||||
|
||||
if (word2[strlen(word2)-1] == '\n')
|
||||
word2[strlen(word2)-1] = '\0';
|
||||
i = atoi(word2);
|
||||
|
||||
if (fastcmp(word, "PICNAME"))
|
||||
{
|
||||
SLOTFOUND
|
||||
strncpy(description[num].picname, word2, 8);
|
||||
}
|
||||
// new character select
|
||||
else if (fastcmp(word, "DISPLAYNAME"))
|
||||
{
|
||||
SLOTFOUND
|
||||
// replace '#' with line breaks
|
||||
// (also remove any '\n')
|
||||
{
|
||||
char *cur = NULL;
|
||||
|
||||
// remove '\n'
|
||||
cur = strchr(displayname, '\n');
|
||||
if (cur)
|
||||
*cur = '\0';
|
||||
|
||||
// turn '#' into '\n'
|
||||
cur = strchr(displayname, '#');
|
||||
while (cur)
|
||||
{
|
||||
*cur = '\n';
|
||||
cur = strchr(cur, '#');
|
||||
}
|
||||
}
|
||||
// copy final string
|
||||
strncpy(description[num].displayname, displayname, SKINNAMESIZE);
|
||||
}
|
||||
else if (fastcmp(word, "OPPOSITECOLOR") || fastcmp(word, "OPPOSITECOLOUR"))
|
||||
{
|
||||
SLOTFOUND
|
||||
description[num].oppositecolor = (UINT16)get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "NAMETAG") || fastcmp(word, "TAGNAME"))
|
||||
{
|
||||
SLOTFOUND
|
||||
strncpy(description[num].nametag, word2, 8);
|
||||
}
|
||||
else if (fastcmp(word, "TAGTEXTCOLOR") || fastcmp(word, "TAGTEXTCOLOUR"))
|
||||
{
|
||||
SLOTFOUND
|
||||
description[num].tagtextcolor = (UINT16)get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "TAGOUTLINECOLOR") || fastcmp(word, "TAGOUTLINECOLOUR"))
|
||||
{
|
||||
SLOTFOUND
|
||||
description[num].tagoutlinecolor = (UINT16)get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "STATUS"))
|
||||
{
|
||||
/*
|
||||
You MAY disable previous entries if you so desire...
|
||||
But try to enable something that's already enabled and you will be sent to a free slot.
|
||||
|
||||
Because of this, you are allowed to edit any previous entries you like, but only if you
|
||||
signal that you are purposely doing so by disabling and then reenabling the slot.
|
||||
*/
|
||||
if (i && !slotfound && (slotfound = findFreeSlot(&num)) == false)
|
||||
goto done;
|
||||
|
||||
description[num].used = (!!i);
|
||||
}
|
||||
else if (fastcmp(word, "SKINNAME"))
|
||||
{
|
||||
// Send to free slot.
|
||||
SLOTFOUND
|
||||
strlcpy(description[num].skinname, word2, sizeof description[num].skinname);
|
||||
strlwr(description[num].skinname);
|
||||
}
|
||||
else
|
||||
deh_warning("readPlayer %d: unknown word '%s'", num, word);
|
||||
}
|
||||
} while (!myfeof(f)); // finish when the line is empty
|
||||
#undef SLOTFOUND
|
||||
done:
|
||||
Z_Free(displayname);
|
||||
Z_Free(s);
|
||||
}
|
||||
|
||||
// TODO: Figure out how to do undolines for this....
|
||||
// TODO: Warnings for running out of freeslots
|
||||
void readfreeslots(MYFILE *f)
|
||||
|
|
@ -1280,8 +1086,13 @@ void readlevelheader(MYFILE *f, char * name)
|
|||
deh_strlcpy(mapheaderinfo[num]->skytexture, word2,
|
||||
sizeof(mapheaderinfo[num]->skytexture), va("Level header %d: sky texture", num));
|
||||
else if (fastcmp(word, "SKYNUM"))
|
||||
deh_strlcpy(mapheaderinfo[num]->skytexture, va("SKY%s", word2),
|
||||
{
|
||||
char namebuf[9];
|
||||
|
||||
sprintf(namebuf, "SKY%.5s", word2);
|
||||
deh_strlcpy(mapheaderinfo[num]->skytexture, namebuf,
|
||||
sizeof(mapheaderinfo[num]->skytexture), va("Level header %d: sky texture", num));
|
||||
}
|
||||
else if (fastcmp(word, "PRECUTSCENENUM"))
|
||||
mapheaderinfo[num]->precutscenenum = (UINT8)i;
|
||||
else if (fastcmp(word, "CUTSCENENUM"))
|
||||
|
|
@ -2038,8 +1849,6 @@ static struct { const char *name; consvar_t *var; } HIDDENVARS[] = {
|
|||
{ "DUMMYGPCUP", &cv_dummygpcup },
|
||||
{ "NEXTMAP", &cv_nextmap },
|
||||
{ "NEWGAMETYPE", &cv_newgametype },
|
||||
{ "DUMMYRINGS", &cv_dummyrings },
|
||||
{ "DUMMYLIVES", &cv_dummylives },
|
||||
{ "DUMMYMENUPLAYER", &cv_dummymenuplayer },
|
||||
{ "DUMMYTEAM", &cv_dummyteam },
|
||||
{ "DUMMYSPECTATE", &cv_dummyspectate },
|
||||
|
|
@ -2049,11 +1858,57 @@ static struct { const char *name; consvar_t *var; } HIDDENVARS[] = {
|
|||
{ "DUMMYATTACKINGCHAINING", &cv_dummyattackingchaining },
|
||||
{ "DUMMYATTACKINGSLIPDASH", &cv_dummyattackingslipdash },
|
||||
{ "DUMMYATTACKINGPURPLEDRIFT", &cv_dummyattackingpurpledrift },
|
||||
{ "DUMMYATTACKINGSLOPEBOOST", &cv_dummyattackingslopeboost },
|
||||
{ "DUMMYSTAFF", &cv_dummystaff },
|
||||
{ "DUMMYMULTIPLAYER", &cv_dummymultiplayer },
|
||||
{ "DUMMYIP", &cv_dummyip },
|
||||
{ "DUMMYNAME", &cv_dummyname },
|
||||
{ "DUMMYFOLLOWER", &cv_dummyfollower },
|
||||
{ "DUMMYCOLOR", &cv_dummycolor },
|
||||
{ "DUMMYSERVERPAGE", &cv_dummyserverpage },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
#define WARN(str, ...) deh_warning("MenuItem " ITEMNAMEFMT ": " str, menuitem->itemname, __VA_ARGS__)
|
||||
#define WARN0(str) deh_warning("MenuItem " ITEMNAMEFMT ": " str, menuitem->itemname)
|
||||
// parses an item style in the form of "<font>-SMALL-<align>-<highlight>-STICKER"
|
||||
// each component is optional, and the style cannot be written in arbitrary order
|
||||
// returns IT_HIDDEN if style is invalid
|
||||
static menuitemflags_t parsestyle(const char *p)
|
||||
{
|
||||
menuitemflags_t style = 0;
|
||||
|
||||
// yeah yeah, macro hell, but it's more economical than 100 entries in a table
|
||||
#define STYLE(string, flag) \
|
||||
(!strncmp(p, string, sizeof(string)-1)) { \
|
||||
style |= flag; \
|
||||
p += sizeof(string)-1; \
|
||||
if (*p == '\0') return style; \
|
||||
if (*p++ != '-') return IT_HIDDEN; \
|
||||
}
|
||||
|
||||
if STYLE("THIN2", ITF_THIN2)
|
||||
else if STYLE("THIN", ITF_THIN)
|
||||
else if STYLE("HEADER", ITF_HEADER|ITH_HIGHLIGHT)
|
||||
else if STYLE("PATCH", ITF_PATCH)
|
||||
else if STYLE("MAPTHUMBNAIL", ITF_THUMBNAIL)
|
||||
else if STYLE("FILL", ITF_FILL)
|
||||
|
||||
if STYLE("SMALL", IT_SMALL)
|
||||
|
||||
if STYLE("CENTER", IT_CENTER)
|
||||
else if STYLE("RIGHT", IT_RIGHT)
|
||||
|
||||
if STYLE("HIGHLIGHT", ITH_HIGHLIGHT)
|
||||
else if STYLE("RECOMMENDEDHIGHLIGHT", ITH_RECOMMEND)
|
||||
else if STYLE("WARNINGHIGHLIGHT", ITH_WARNING)
|
||||
|
||||
if STYLE("STICKER", IT_STICKER)
|
||||
|
||||
return IT_HIDDEN;
|
||||
#undef STYLE
|
||||
}
|
||||
|
||||
#define WARN(str, ...) deh_warning("MenuItem %s: " str, strbuf_get(menunames, menuitem->info.nameofs), __VA_ARGS__)
|
||||
#define WARN0(str) deh_warning("MenuItem %s: " str, strbuf_get(menunames, menuitem->info.nameofs))
|
||||
static void readmenuitem(MYFILE *f, menuitem_t *menuitem)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
|
|
@ -2061,9 +1916,7 @@ static void readmenuitem(MYFILE *f, menuitem_t *menuitem)
|
|||
char *word2;
|
||||
char *tmp;
|
||||
|
||||
UINT16 status = 0;
|
||||
boolean actionset = false;
|
||||
boolean textset = false;
|
||||
menuitemflags_t status = 0;
|
||||
|
||||
// taking quite possibly the only opportunity i'll ever get
|
||||
// to avoid three tabs of indentation...
|
||||
|
|
@ -2095,58 +1948,71 @@ static void readmenuitem(MYFILE *f, menuitem_t *menuitem)
|
|||
word2 = tmp += 2;
|
||||
//strupr(word2);
|
||||
|
||||
if (fastcmp(word, "PATCH"))
|
||||
if (fastcmp(word, "X"))
|
||||
{
|
||||
menuitem->patch = Z_StrDup(word2);
|
||||
menuitem->x = get_number(word2);
|
||||
}
|
||||
else if (fastncmp(word, "TEXT", 4))
|
||||
else if (fastcmp(word, "OFSX"))
|
||||
{
|
||||
UINT16 flags = IT_STRING;
|
||||
if (fastcmp(word+4, "HEADER"))
|
||||
flags = IT_HEADER;
|
||||
else if (fastcmp(word+4, "SECRET"))
|
||||
flags = IT_SECRET;
|
||||
else if (fastcmp(word+4, "WHITE"))
|
||||
flags = IT_WHITESTRING;
|
||||
else if (fastcmp(word+4, "DISABLED"))
|
||||
flags = IT_DISABLED;
|
||||
else if (fastcmp(word+4, "2"))
|
||||
flags = IT_STRING2;
|
||||
else if (word[4])
|
||||
{
|
||||
WARN("unknown word '%s'", word);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (textset)
|
||||
{
|
||||
WARN0("text already set!");
|
||||
continue;
|
||||
}
|
||||
textset = true;
|
||||
status |= flags;
|
||||
menuitem->x = get_number(word2);
|
||||
status |= IT_OFSX;
|
||||
}
|
||||
else if (fastcmp(word, "Y"))
|
||||
{
|
||||
menuitem->y = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "OFSY"))
|
||||
{
|
||||
menuitem->y = get_number(word2);
|
||||
status |= IT_OFSY;
|
||||
}
|
||||
else if (fastcmp(word, "OVERLAY"))
|
||||
{
|
||||
status |= IT_OVERLAY;
|
||||
}
|
||||
else if (fastcmp(word, "TEMPOFFSET"))
|
||||
{
|
||||
status |= IT_TEMPORARY;
|
||||
}
|
||||
else if (fastcmp(word, "ARGUMENT"))
|
||||
{
|
||||
menuitem->argument = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "TEXT"))
|
||||
{
|
||||
if (menuitem->text)
|
||||
Z_Free(menuitem->text);
|
||||
menuitem->text = Z_StrDup(word2);
|
||||
}
|
||||
else if (fastncmp(word, "CVAR", 4))
|
||||
else if (fastcmp(word, "PATCH"))
|
||||
{
|
||||
UINT16 flags = IT_CVAR;
|
||||
if (fastcmp(word+4, "SLIDER"))
|
||||
flags |= IT_CV_SLIDER;
|
||||
else if (fastcmp(word+4, "STRING"))
|
||||
flags |= IT_CV_STRING;
|
||||
else if (fastcmp(word+4, "INTEGER"))
|
||||
flags |= IT_CV_INTEGERSTEP;
|
||||
else if (word[4])
|
||||
if (menuitem->patch)
|
||||
Z_Free(menuitem->patch);
|
||||
menuitem->patch = Z_StrDup(word2);
|
||||
}
|
||||
else if (fastcmp(word, "TOOLTIP"))
|
||||
{
|
||||
if (menuitem->tooltip)
|
||||
Z_Free(menuitem->tooltip);
|
||||
menuitem->tooltip = Z_StrDup(word2);
|
||||
}
|
||||
else if (fastcmp(word, "STYLE"))
|
||||
{
|
||||
menuitemflags_t style = 0;
|
||||
if (status & IT_STYLE)
|
||||
{
|
||||
WARN("unknown word '%s'", word);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (actionset)
|
||||
{
|
||||
WARN0("action already set!");
|
||||
WARN0("style already set!");
|
||||
continue;
|
||||
}
|
||||
strupr(word2);
|
||||
style = parsestyle(word2);
|
||||
if (style == IT_HIDDEN)
|
||||
WARN("unknown style '%s'", word2);
|
||||
else
|
||||
status |= style;
|
||||
}
|
||||
else if (fastcmp(word, "CVAR") || fastcmp(word, "SLIDER"))
|
||||
{
|
||||
consvar_t *cvar = CV_FindVar(word2);
|
||||
if (!cvar)
|
||||
for (size_t i = 0; HIDDENVARS[i].name; i++)
|
||||
|
|
@ -2160,79 +2026,49 @@ static void readmenuitem(MYFILE *f, menuitem_t *menuitem)
|
|||
WARN("unable to find cvar '%s'", word2);
|
||||
continue;
|
||||
}
|
||||
actionset = true;
|
||||
status |= flags;
|
||||
menuitem->itemaction.cvar = cvar;
|
||||
status |= IT_INTERACT;
|
||||
if (word[0] == 'S')
|
||||
status |= IT_SLIDER;
|
||||
menuitem->cvar = cvar;
|
||||
}
|
||||
else if (fastcmp(word, "SUBMENU"))
|
||||
{
|
||||
if (actionset)
|
||||
{
|
||||
WARN0("action already set!");
|
||||
continue;
|
||||
}
|
||||
menutype_t mn = get_menutype(word2);
|
||||
if (mn == MAXMENUTYPES)
|
||||
{
|
||||
WARN("unknown menu '%s'", word2);
|
||||
continue;
|
||||
}
|
||||
actionset = true;
|
||||
status |= IT_SUBMENU;
|
||||
menuitem->itemaction.submenu = mn;
|
||||
status |= IT_INTERACT;
|
||||
menuitem->submenu = mn;
|
||||
}
|
||||
else if (fastncmp(word, "CALL", 4) || fastcmp(word, "KEYHANDLER") || fastcmp(word, "ARROWS"))
|
||||
else if (fastcmp(word, "CALL") || fastcmp(word, "ARROWS"))
|
||||
{
|
||||
UINT16 flags;
|
||||
if (word[0] == 'C')
|
||||
{
|
||||
flags = IT_CALL;
|
||||
if (fastcmp(word+4, "NOTMODIFIED"))
|
||||
flags |= IT_CALL_NOTMODIFIED;
|
||||
else if (word[4])
|
||||
{
|
||||
WARN("unknown word '%s'", word);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (word[0] == 'K')
|
||||
flags = IT_KEYHANDLER;
|
||||
else if (word[0] == 'A')
|
||||
flags = IT_ARROWS;
|
||||
else
|
||||
I_Error("bruh"); // i should probably just make "CALL" the stem for all of these
|
||||
|
||||
if (actionset)
|
||||
{
|
||||
WARN0("action already set!");
|
||||
continue;
|
||||
}
|
||||
void (*routine)(INT32) = get_menuroutine(word2);
|
||||
menufunc_f *routine = get_menuroutine(word2);
|
||||
if (!routine)
|
||||
{
|
||||
WARN("unknown call routine '%s'", word2);
|
||||
continue;
|
||||
}
|
||||
actionset = true;
|
||||
status |= flags;
|
||||
menuitem->itemaction.routine = routine;
|
||||
}
|
||||
else if (fastcmp(word, "ALPHAKEY") || fastcmp(word, "Y"))
|
||||
{
|
||||
menuitem->alphaKey = get_number(word2);
|
||||
status |= IT_INTERACT;
|
||||
if (word[0] == 'A')
|
||||
status |= IT_ARROWS;
|
||||
menuitem->routine = routine;
|
||||
}
|
||||
else
|
||||
WARN("unknown word '%s'", word);
|
||||
}
|
||||
while (!myfeof(f)); // finish when the line is empty
|
||||
|
||||
menuitem->status = status;
|
||||
if (status)
|
||||
menuitem->status = status;
|
||||
Z_Free(s);
|
||||
}
|
||||
#undef WARN
|
||||
#undef WARN0
|
||||
|
||||
#define WARN(str, ...) deh_warning("Menu %s: " str, DEH_MenutypeName(num), __VA_ARGS__)
|
||||
#define WARN0(str) deh_warning("Menu %s: " str, DEH_MenutypeName(num))
|
||||
void readmenu(MYFILE *f, INT32 num)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
|
|
@ -2269,30 +2105,23 @@ void readmenu(MYFILE *f, INT32 num)
|
|||
{
|
||||
// ...or get the word after the space. yay special syntax!
|
||||
word2 = strchr(s, ' ');
|
||||
if (word2)
|
||||
if (!word2 || *word2 == '\0' || word2[1] == ' ') // trailing space(s) after MenuItem doesn't count
|
||||
{
|
||||
*word2++ = '\0';
|
||||
if (*word2 == '\0' || *word2 == ' ') // trailing space(s) after MenuItem doesn't count
|
||||
word2 = NULL;
|
||||
else
|
||||
strupr(word2);
|
||||
WARN0("missing name for menuitem");
|
||||
continue;
|
||||
}
|
||||
*word2++ = '\0';
|
||||
strupr(word2);
|
||||
strupr(word);
|
||||
|
||||
if (fastcmp(word, "MENUITEM"))
|
||||
{
|
||||
if (word2 && strlen(word2) > ITEMNAMELEN)
|
||||
{
|
||||
WARN("item name %s is too long (max %d characters)", word2, ITEMNAMELEN);
|
||||
continue;
|
||||
}
|
||||
menuitem_t *item = word2 ? M_CheckMenuItem(num, word2) : NULL;
|
||||
menuitem_t *item = M_CheckMenuItem(num, word2);
|
||||
if (item == NULL)
|
||||
{
|
||||
menudef->menuitems = Z_Realloc(menudef->menuitems, sizeof(menuitem_t)*(menudef->numitems+1), PU_STATIC, NULL);
|
||||
item = menudef->menuitems + menudef->numitems++;
|
||||
strncpy(item->itemname, word2 ? word2 : "", ITEMNAMELEN);
|
||||
item->text = "";
|
||||
DEH_Link(word2, &item->info, &menunames);
|
||||
}
|
||||
readmenuitem(f, item);
|
||||
}
|
||||
|
|
@ -2310,152 +2139,154 @@ void readmenu(MYFILE *f, INT32 num)
|
|||
|
||||
if (fastcmp(word, "BACKGROUNDNAME"))
|
||||
{
|
||||
strncpy(menupres[num].bgname, word2, 8);
|
||||
strncpy(menudefs[num].bgname, word2, 8);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "HIDEBACKGROUND"))
|
||||
{
|
||||
menupres[num].bghide = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].bghide = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "BACKGROUNDCOLOR"))
|
||||
{
|
||||
menupres[num].bgcolor = get_number(word2);
|
||||
menudefs[num].bgcolor = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "HIDETITLEPICS") || fastcmp(word, "HIDEPICS") || fastcmp(word, "TITLEPICSHIDE"))
|
||||
{
|
||||
// true by default, except MM_MAIN
|
||||
menupres[num].hidetitlepics = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].hidetitlepics = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSMODE"))
|
||||
{
|
||||
if (fastcmp(word2, "USER"))
|
||||
menupres[num].ttmode = TTMODE_USER;
|
||||
menudefs[num].ttmode = TTMODE_USER;
|
||||
else if (fastcmp(word2, "HIDE") || fastcmp(word2, "HIDDEN") || fastcmp(word2, "NONE"))
|
||||
{
|
||||
menupres[num].ttmode = TTMODE_USER;
|
||||
menupres[num].ttname[0] = 0;
|
||||
menupres[num].hidetitlepics = true;
|
||||
menudefs[num].ttmode = TTMODE_USER;
|
||||
menudefs[num].ttname[0] = 0;
|
||||
menudefs[num].hidetitlepics = true;
|
||||
}
|
||||
else if (fastcmp(word2, "KART"))
|
||||
menupres[num].ttmode = TTMODE_KART;
|
||||
menudefs[num].ttmode = TTMODE_KART;
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSSCALE"))
|
||||
{
|
||||
// Don't handle Alacroix special case here; see Maincfg section.
|
||||
menupres[num].ttscale = max(1, min(8, (UINT8)get_number(word2)));
|
||||
menudefs[num].ttscale = max(1, min(8, (UINT8)get_number(word2)));
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSNAME"))
|
||||
{
|
||||
strncpy(menupres[num].ttname, word2, 9);
|
||||
strncpy(menudefs[num].ttname, word2, 9);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSX"))
|
||||
{
|
||||
menupres[num].ttx = (INT16)get_number(word2);
|
||||
menudefs[num].ttx = (INT16)get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSY"))
|
||||
{
|
||||
menupres[num].tty = (INT16)get_number(word2);
|
||||
menudefs[num].tty = (INT16)get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSLOOP"))
|
||||
{
|
||||
menupres[num].ttloop = (INT16)get_number(word2);
|
||||
menudefs[num].ttloop = (INT16)get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSTICS"))
|
||||
{
|
||||
menupres[num].tttics = (UINT16)get_number(word2);
|
||||
menudefs[num].tttics = (UINT16)get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLESCROLLSPEED") || fastcmp(word, "TITLESCROLLXSPEED")
|
||||
|| fastcmp(word, "SCROLLSPEED") || fastcmp(word, "SCROLLXSPEED"))
|
||||
{
|
||||
menupres[num].titlescrollxspeed = get_number(word2);
|
||||
menudefs[num].titlescrollxspeed = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLESCROLLYSPEED") || fastcmp(word, "SCROLLYSPEED"))
|
||||
{
|
||||
menupres[num].titlescrollyspeed = get_number(word2);
|
||||
menudefs[num].titlescrollyspeed = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "MUSIC"))
|
||||
{
|
||||
strncpy(menupres[num].musname, word2, 7);
|
||||
menupres[num].musname[6] = 0;
|
||||
strncpy(menudefs[num].musname, word2, 7);
|
||||
menudefs[num].musname[6] = 0;
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "MUSICTRACK"))
|
||||
{
|
||||
menupres[num].mustrack = ((UINT16)value - 1);
|
||||
menudefs[num].mustrack = ((UINT16)value - 1);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "MUSICLOOP"))
|
||||
{
|
||||
// true by default except MM_MAIN
|
||||
menupres[num].muslooping = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].muslooping = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "NOMUSIC"))
|
||||
{
|
||||
menupres[num].musstop = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].musstop = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "IGNOREMUSIC"))
|
||||
{
|
||||
menupres[num].musignore = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].musignore = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "FADESTRENGTH"))
|
||||
{
|
||||
// one-based, <= 0 means use default value. 1-32
|
||||
menupres[num].fadestrength = get_number(word2)-1;
|
||||
menudefs[num].fadestrength = (get_number(word2) - 1) % 32;
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "NOENTERBUBBLE"))
|
||||
{
|
||||
menupres[num].enterbubble = !(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].enterbubble = !(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "NOEXITBUBBLE"))
|
||||
{
|
||||
menupres[num].exitbubble = !(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
menudefs[num].exitbubble = !(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "ENTERTAG"))
|
||||
{
|
||||
menupres[num].entertag = get_number(word2);
|
||||
menudefs[num].entertag = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "EXITTAG"))
|
||||
{
|
||||
menupres[num].exittag = get_number(word2);
|
||||
menudefs[num].exittag = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "ENTERWIPE"))
|
||||
{
|
||||
menupres[num].enterwipe = get_number(word2);
|
||||
menudefs[num].enterwipe = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "EXITWIPE"))
|
||||
{
|
||||
menupres[num].exitwipe = get_number(word2);
|
||||
menudefs[num].exitwipe = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
// MENUDEF STARTS HERE
|
||||
else if (fastcmp(word, "HEADERPIC"))
|
||||
{
|
||||
if (menudef->headerpic)
|
||||
Z_Free(menudef->headerpic);
|
||||
menudef->headerpic = Z_StrDup(word2);
|
||||
}
|
||||
else if (fastcmp(word, "DRAWROUTINE"))
|
||||
{
|
||||
void (*drawer)(void) = get_menudrawer(word2);
|
||||
menudrawer_f *drawer = get_menudrawer(word2);
|
||||
if (drawer == NULL)
|
||||
{
|
||||
WARN("unknown draw routine '%s'", word2);
|
||||
|
|
@ -2465,15 +2296,37 @@ void readmenu(MYFILE *f, INT32 num)
|
|||
}
|
||||
else if (fastcmp(word, "X"))
|
||||
{
|
||||
menudef->x = value;
|
||||
menudef->x = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "Y"))
|
||||
{
|
||||
menudef->y = value;
|
||||
menudef->y = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "SCROLLHEIGHT"))
|
||||
{
|
||||
menudef->scrollheight = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "CURSOROFFSET"))
|
||||
{
|
||||
menudef->cursoroffset = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "LINEHEIGHT"))
|
||||
{
|
||||
menudef->lineheight = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "ENTERROUTINE"))
|
||||
{
|
||||
menufunc_f *routine = get_menuroutine(word2);
|
||||
if (!routine)
|
||||
{
|
||||
WARN("unknown enter routine '%s'", word2);
|
||||
continue;
|
||||
}
|
||||
menudef->enterroutine = routine;
|
||||
}
|
||||
else if (fastcmp(word, "QUITROUTINE"))
|
||||
{
|
||||
void (*routine)(INT32) = get_menuroutine(word2);
|
||||
menufunc_f *routine = get_menuroutine(word2);
|
||||
if (!routine)
|
||||
{
|
||||
WARN("unknown quit routine '%s'", word2);
|
||||
|
|
@ -2481,14 +2334,29 @@ void readmenu(MYFILE *f, INT32 num)
|
|||
}
|
||||
menudef->quitroutine = routine;
|
||||
}
|
||||
else if (fastcmp(word, "KEYHANDLER"))
|
||||
{
|
||||
menufunc_f *routine = get_menuroutine(word2);
|
||||
if (!routine)
|
||||
{
|
||||
WARN("unknown key handler '%s'", word2);
|
||||
continue;
|
||||
}
|
||||
menudef->keyhandler = routine;
|
||||
}
|
||||
else
|
||||
WARN("unknown word '%s'", word);
|
||||
}
|
||||
} while (!myfeof(f)); // finish when the line is empty
|
||||
|
||||
// default line height
|
||||
if (!menudef->lineheight)
|
||||
menudef->lineheight = 8;
|
||||
|
||||
Z_Free(s);
|
||||
}
|
||||
#undef WARN
|
||||
#undef WARN0
|
||||
|
||||
void readframe(MYFILE *f, INT32 num)
|
||||
{
|
||||
|
|
@ -3342,6 +3210,47 @@ void readmaincfg(MYFILE *f)
|
|||
{
|
||||
ammoremovaltics = get_number(word2);
|
||||
}
|
||||
// BlanKart: Easy ways to set these for balance purposes
|
||||
else if (fastcmp(word, "HYUDOROTIME"))
|
||||
{
|
||||
hyudorotime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "STEALTIME"))
|
||||
{
|
||||
stealtime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "WATERPANELTIME"))
|
||||
{
|
||||
waterpaneltime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "SNEAKERTIME"))
|
||||
{
|
||||
sneakertime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "BUBBLETIME"))
|
||||
{
|
||||
bubbletime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "COMEBACKTIME"))
|
||||
{
|
||||
comebacktime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "GREASETICS"))
|
||||
{
|
||||
greasetics = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "WIPEOUTSLOWTIME"))
|
||||
{
|
||||
wipeoutslowtime = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "WANTEDREDUCE"))
|
||||
{
|
||||
wantedreduce = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "WANTEDFREQUENCY"))
|
||||
{
|
||||
wantedfrequency = get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "INTROTOPLAY"))
|
||||
{
|
||||
introtoplay = (UINT8)get_number(word2);
|
||||
|
|
@ -3357,10 +3266,6 @@ void readmaincfg(MYFILE *f)
|
|||
if (creditscutscene > 128)
|
||||
creditscutscene = 128;
|
||||
}
|
||||
else if (fastcmp(word, "USEBLACKROCK"))
|
||||
{
|
||||
useBlackRock = (UINT8)(value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
}
|
||||
else if (fastcmp(word, "LOOPTITLE"))
|
||||
{
|
||||
looptitle = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
|
|
@ -3585,14 +3490,6 @@ void readwipes(MYFILE *f)
|
|||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_voting_final;
|
||||
}
|
||||
else if (fastncmp(word, "CONTINUING_", 11))
|
||||
{
|
||||
pword = word + 11;
|
||||
if (fastcmp(pword, "TOBLACK"))
|
||||
wipeoffset = wipe_continuing_toblack;
|
||||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_continuing_final;
|
||||
}
|
||||
else if (fastncmp(word, "TITLESCREEN_", 12))
|
||||
{
|
||||
pword = word + 12;
|
||||
|
|
@ -3627,14 +3524,6 @@ void readwipes(MYFILE *f)
|
|||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_evaluation_final;
|
||||
}
|
||||
else if (fastncmp(word, "GAMEEND_", 8))
|
||||
{
|
||||
pword = word + 8;
|
||||
if (fastcmp(pword, "TOBLACK"))
|
||||
wipeoffset = wipe_gameend_toblack;
|
||||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_gameend_final;
|
||||
}
|
||||
else if (fastncmp(word, "ENCORE_", 7))
|
||||
{
|
||||
pword = word + 7;
|
||||
|
|
@ -4215,7 +4104,7 @@ menutype_t get_menutype(const char *word)
|
|||
return i;
|
||||
}
|
||||
|
||||
void (*get_menuroutine(const char *word))(INT32)
|
||||
menufunc_f *get_menuroutine(const char *word)
|
||||
{ // Returns the value of MR_ enumerations
|
||||
size_t i;
|
||||
if (fastncmp("MR_",word,3))
|
||||
|
|
@ -4227,7 +4116,7 @@ void (*get_menuroutine(const char *word))(INT32)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void (*get_menudrawer(const char *word))(void)
|
||||
menudrawer_f *get_menudrawer(const char *word)
|
||||
{ // Returns the value of MD_ enumerations
|
||||
size_t i;
|
||||
if (fastncmp("MD_",word,3))
|
||||
|
|
@ -4254,18 +4143,19 @@ void (*get_menudrawer(const char *word))(void)
|
|||
}*/
|
||||
|
||||
preciptype_t get_precip(const char *word)
|
||||
{ // Returns the value of PRECIP_ enumerations
|
||||
preciptype_t i;
|
||||
{
|
||||
// Returns the value of PRECIP_ enumerations
|
||||
if (*word >= '0' && *word <= '9')
|
||||
return atoi(word);
|
||||
if (fastncmp("PRECIP_",word,4))
|
||||
word += 7; // take off the PRECIP_
|
||||
for (i = 0; i < MAXPRECIP; i++)
|
||||
if (fastncmp("PRECIP_",word,7))
|
||||
{
|
||||
if (precipprops[i].name == NULL)
|
||||
break;
|
||||
if (fasticmp(word, precipprops[i].name))
|
||||
return i;
|
||||
fixed_t eval = LUA_EvalMath(word);
|
||||
|
||||
if (eval)
|
||||
return eval;
|
||||
|
||||
if (fasticmp("PRECIP_NONE",word))
|
||||
return PRECIP_NONE;
|
||||
}
|
||||
deh_warning("Couldn't find weather type named 'PRECIP_%s'",word);
|
||||
return PRECIP_NONE;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -57,8 +57,8 @@ spritenum_t get_sprite(const char *word);
|
|||
playersprite_t get_sprite2(const char *word);
|
||||
sfxenum_t get_sfx(const char *word);
|
||||
menutype_t get_menutype(const char *word);
|
||||
void (*get_menuroutine(const char *word))(INT32);
|
||||
void (*get_menudrawer(const char *word))(void);
|
||||
menufunc_f *get_menuroutine(const char *word);
|
||||
menudrawer_f *get_menudrawer(const char *word);
|
||||
//INT16 get_gametype(const char *word);
|
||||
//powertype_t get_power(const char *word);
|
||||
skincolornum_t get_skincolor(const char *word);
|
||||
|
|
@ -84,7 +84,6 @@ void readlight(MYFILE *f, INT32 num);
|
|||
void readskincolor(MYFILE *f, INT32 num, boolean mainfile);
|
||||
void readthing(MYFILE *f, INT32 num);
|
||||
void readfreeslots(MYFILE *f);
|
||||
void readPlayer(MYFILE *f, INT32 num);
|
||||
void clear_levels(void);
|
||||
void clear_conditionsets(void);
|
||||
|
||||
|
|
|
|||
229
src/deh_tables.c
229
src/deh_tables.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -257,7 +257,7 @@ const char *const MOBJFLAG2_LIST[] = {
|
|||
"JUSTATTACKED", // can be pushed by other moving mobjs
|
||||
"FIRING", // turret fire
|
||||
"SUPERFIRE", // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
||||
"\x01", // free: 1<<20 (name un-matchable)
|
||||
"DONTSYNC", // Prevents this mobj from triggering stuff or being sent. Used for sync safety on toggle effects.
|
||||
"STRONGBOX", // Flag used for "strong" random monitors.
|
||||
"OBJECTFLIP", // Flag for objects that always have flipped gravity.
|
||||
"SKULLFLY", // Special handling: skull in flight.
|
||||
|
|
@ -392,7 +392,7 @@ const char *const GAMETYPERULE_LIST[] = {
|
|||
"\x01",
|
||||
"LIVES",
|
||||
"SPECIALBOTS",
|
||||
"FREEROAM",
|
||||
"NOCOUNTDOWN",
|
||||
"ENCORE",
|
||||
NULL
|
||||
};
|
||||
|
|
@ -674,133 +674,110 @@ const char *const HUDITEMS_LIST[] = {
|
|||
};
|
||||
|
||||
struct menu_routine_s const MENU_ROUTINES[] = {
|
||||
{ "SINGLEPLAYERMENU", &M_SinglePlayerMenu },
|
||||
{ "OPTIONS", &M_Options },
|
||||
{ "ADDONS", &M_Addons },
|
||||
{ "QUITSRB2", &M_QuitSRB2 },
|
||||
{ "STATISTICS", &M_Statistics },
|
||||
{ "HANDLELEVELSTATS", &M_HandleLevelStats },
|
||||
{ "REPLAYHUT", &M_ReplayHut },
|
||||
{ "QUITREPLAYHUT", &M_QuitReplayHut },
|
||||
{ "HANDLEREPLAYHUTLIST", &M_HandleReplayHutList },
|
||||
{ "GRANDPRIXTEMP", &M_GrandPrixTemp },
|
||||
{ "TIMEATTACK", &M_TimeAttack },
|
||||
{ "ITEMBREAKER", &M_ItemBreaker },
|
||||
{ "STARTGRANDPRIX", &M_StartGrandPrix },
|
||||
{ "QUITTIMEATTACKMENU", &M_QuitTimeAttackMenu },
|
||||
{ "CHOOSETIMEATTACK", &M_ChooseTimeAttack },
|
||||
{ "SETGUESTREPLAY", &M_SetGuestReplay },
|
||||
{ "REPLAYTIMEATTACK", &M_ReplayTimeAttack },
|
||||
{ "SRB2KARTPRESET", &M_SRB2KartPreset },
|
||||
{ "TECHPRESET", &M_TechPreset },
|
||||
{ "BLANKARTPRESET", &M_BlanKartPreset },
|
||||
{ "HANDLESTAFFREPLAY", &M_HandleStaffReplay },
|
||||
{ "SETUPMULTIHANDLER", &M_SetupMultiHandler },
|
||||
{ "HANDLESETUPMULTIPLAYER", &M_HandleSetupMultiPlayer },
|
||||
{ "QUITMULTIPLAYERMENU", &M_QuitMultiPlayerMenu },
|
||||
{ "STARTSERVERMENU", &M_StartServerMenu },
|
||||
{ "STARTOFFLINESERVERMENU", &M_StartOfflineServerMenu },
|
||||
{ "STARTSERVER", &M_StartServer },
|
||||
{ "CONNECTMENUMODCHECKS", &M_ConnectMenuModChecks },
|
||||
{ "HANDLECONNECTIP", &M_HandleConnectIP },
|
||||
{ "CANCELCONNECT", &M_CancelConnect },
|
||||
{ "SETUP1PCONTROLSMENU", &M_Setup1PControlsMenu },
|
||||
{ "SETUP2PCONTROLSMENU", &M_Setup2PControlsMenu },
|
||||
{ "SETUP3PCONTROLSMENU", &M_Setup3PControlsMenu },
|
||||
{ "SETUP4PCONTROLSMENU", &M_Setup4PControlsMenu },
|
||||
{ "HANDLESERVERPAGE", &M_HandleServerPage },
|
||||
{ "REFRESH", &M_Refresh },
|
||||
{ "CONNECT", &M_Connect },
|
||||
{ "VIDEOMODEMENU", &M_VideoModeMenu },
|
||||
{ "SINGLEPLAYERMENU", &MR_SinglePlayerMenu },
|
||||
{ "OPTIONS", &MR_Options },
|
||||
{ "ADDONS", &MR_Addons },
|
||||
{ "QUITADDONS", &MR_QuitAddons },
|
||||
{ "QUITSRB2", &MR_QuitSRB2 },
|
||||
{ "STATISTICS", &MR_Statistics },
|
||||
{ "HANDLELEVELSTATS", &MR_HandleLevelStats },
|
||||
{ "REPLAYHUT", &MR_ReplayHut },
|
||||
{ "QUITREPLAYHUT", &MR_QuitReplayHut },
|
||||
{ "HANDLEREPLAYHUTLIST", &MR_HandleReplayHutList },
|
||||
{ "GRANDPRIXTEMP", &MR_GrandPrixTemp },
|
||||
{ "TIMEATTACK", &MR_TimeAttack },
|
||||
{ "STARTGRANDPRIX", &MR_StartGrandPrix },
|
||||
{ "QUITTIMEATTACKMENU", &MR_QuitTimeAttackMenu },
|
||||
{ "CHOOSETIMEATTACK", &MR_ChooseTimeAttack },
|
||||
{ "SETGUESTREPLAY", &MR_SetGuestReplay },
|
||||
{ "REPLAYTIMEATTACK", &MR_ReplayTimeAttack },
|
||||
{ "TIMEATTACKPRESET", &MR_TimeAttackPreset },
|
||||
{ "REPLAYSTAFF", &MR_ReplayStaff },
|
||||
{ "CONNECTIP", &MR_ConnectIP },
|
||||
{ "QUITMULTIPLAYERMENU", &MR_QuitMultiPlayerMenu },
|
||||
{ "STARTSERVERMENU", &MR_StartServerMenu },
|
||||
{ "STARTSERVER", &MR_StartServer },
|
||||
{ "CONNECTMENUMODCHECKS", &MR_ConnectMenuModChecks },
|
||||
{ "CANCELCONNECT", &MR_CancelConnect },
|
||||
{ "SETUPCONTROLSMENU", &MR_SetupControlsMenu },
|
||||
{ "HANDLECONTROLSMENU", &MR_HandleControlsMenu },
|
||||
{ "REFRESH", &MR_Refresh },
|
||||
{ "CONNECT", &MR_Connect },
|
||||
{ "VIDEOMODEMENU", &MR_VideoModeMenu },
|
||||
#ifdef HWRENDER
|
||||
{ "OPENGLOPTIONSMENU", &M_OpenGLOptionsMenu },
|
||||
{ "OPENGLOPTIONSMENU", &MR_OpenGLOptionsMenu },
|
||||
#endif
|
||||
{ "HANDLEVIDEOMODE", &M_HandleVideoMode },
|
||||
{ "HANDLESOUNDTEST", &M_HandleSoundTest },
|
||||
{ "MUSICTEST", &M_MusicTest },
|
||||
{ "SCREENSHOTOPTIONS", &M_ScreenshotOptions },
|
||||
{ "ADDONSOPTIONS", &M_AddonsOptions },
|
||||
{ "ERASEDATA", &M_EraseData },
|
||||
{ "MANUAL", &M_Manual },
|
||||
{ "CREDITS", &M_Credits },
|
||||
{ "BLANCREDITS", &M_BlanCredits },
|
||||
{ "HANDLEADDONS", &M_HandleAddons },
|
||||
{ "SELECTABLECLEARMENUS", &M_SelectableClearMenus },
|
||||
{ "MODEATTACKRETRY", &M_ModeAttackRetry },
|
||||
{ "MODEATTACKENDGAME", &M_ModeAttackEndGame },
|
||||
{ "PANDORASBOX", &M_PandorasBox },
|
||||
{ "EMBLEMHINTS", &M_EmblemHints },
|
||||
{ "RETRY", &M_Retry },
|
||||
{ "ENDGAME", &M_EndGame },
|
||||
{ "MAPCHANGE", &M_MapChange },
|
||||
{ "SETUPMULTIPLAYER", &M_SetupMultiPlayer },
|
||||
{ "SETUPMULTIPLAYER2", &M_SetupMultiPlayer2 },
|
||||
{ "SETUPMULTIPLAYER3", &M_SetupMultiPlayer3 },
|
||||
{ "SETUPMULTIPLAYER4", &M_SetupMultiPlayer4 },
|
||||
{ "CONFIRMSPECTATE", &M_ConfirmSpectate },
|
||||
{ "CONFIRMENTERGAME", &M_ConfirmEnterGame },
|
||||
{ "EXITPANDORASBOX", &M_ExitPandorasBox },
|
||||
{ "GETALLEMERALDS", &M_GetAllEmeralds },
|
||||
{ "DESTROYROBOTS", &M_DestroyRobots },
|
||||
{ "ULTIMATECHEAT", &M_UltimateCheat },
|
||||
{ "CONFIRMTEAMSCRAMBLE", &M_ConfirmTeamScramble },
|
||||
{ "CONFIRMTEAMCHANGE", &M_ConfirmTeamChange },
|
||||
{ "CONFIRMSPECTATECHANGE", &M_ConfirmSpectateChange },
|
||||
{ "CHANGELEVEL", &M_ChangeLevel },
|
||||
{ "HUTSTARTREPLAY", &M_HutStartReplay },
|
||||
{ "PLAYBACKREWIND", &M_PlaybackRewind },
|
||||
{ "PLAYBACKPAUSE", &M_PlaybackPause },
|
||||
{ "PLAYBACKFASTFORWARD", &M_PlaybackFastForward },
|
||||
{ "PLAYBACKADVANCE", &M_PlaybackAdvance },
|
||||
{ "PLAYBACKSETVIEWS", &M_PlaybackSetViews },
|
||||
{ "PLAYBACKADJUSTVIEW", &M_PlaybackAdjustView },
|
||||
{ "PLAYBACKTOGGLEFREECAM", &M_PlaybackToggleFreecam },
|
||||
{ "PLAYBACKQUIT", &M_PlaybackQuit },
|
||||
{ "HANDLEIMAGEDEF", &M_HandleImageDef },
|
||||
{ "HANDLEMUSICTEST", &M_HandleMusicTest },
|
||||
{ "SETUP1PJOYSTICKMENU", &M_Setup1PJoystickMenu },
|
||||
{ "SETUP2PJOYSTICKMENU", &M_Setup2PJoystickMenu },
|
||||
{ "SETUP3PJOYSTICKMENU", &M_Setup3PJoystickMenu },
|
||||
{ "SETUP4PJOYSTICKMENU", &M_Setup4PJoystickMenu },
|
||||
{ "RESETCONTROLS", &M_ResetControls },
|
||||
{ "CHANGECONTROL", &M_ChangeControl },
|
||||
{ "ASSIGNJOYSTICK", &M_AssignJoystick },
|
||||
{ "HANDLEMONITORTOGGLES", &M_HandleMonitorToggles },
|
||||
{ "RESTARTAUDIO", &M_RestartAudio },
|
||||
{ "HANDLEVIDEOMODE", &MR_HandleVideoMode },
|
||||
{ "PLAYSOUND", &MR_PlaySound },
|
||||
{ "MUSICTEST", &MR_MusicTest },
|
||||
{ "QUITMUSICTEST", &MR_QuitMusicTest },
|
||||
{ "SCREENSHOTOPTIONS", &MR_ScreenshotOptions },
|
||||
{ "ADDONSOPTIONS", &MR_AddonsOptions },
|
||||
{ "ERASEDATA", &MR_EraseData },
|
||||
{ "CREDITS", &MR_Credits },
|
||||
{ "BLANCREDITS", &MR_BlanCredits },
|
||||
{ "HANDLEADDONS", &MR_HandleAddons },
|
||||
{ "SELECTABLECLEARMENUS", &MR_SelectableClearMenus },
|
||||
{ "GOBACK", &MR_GoBack },
|
||||
{ "MODEATTACKRETRY", &MR_ModeAttackRetry },
|
||||
{ "MODEATTACKENDGAME", &MR_ModeAttackEndGame },
|
||||
{ "RETRY", &MR_Retry },
|
||||
{ "ENDGAME", &MR_EndGame },
|
||||
{ "MAPCHANGE", &MR_MapChange },
|
||||
{ "SETUPMULTIPLAYER", &MR_SetupMultiPlayer },
|
||||
{ "CONFIRMSPECTATE", &MR_ConfirmSpectate },
|
||||
{ "CONFIRMENTERGAME", &MR_ConfirmEnterGame },
|
||||
{ "CONFIRMTEAMSCRAMBLE", &MR_ConfirmTeamScramble },
|
||||
{ "CONFIRMTEAMCHANGE", &MR_ConfirmTeamChange },
|
||||
{ "CONFIRMSPECTATECHANGE", &MR_ConfirmSpectateChange },
|
||||
{ "CHANGELEVEL", &MR_ChangeLevel },
|
||||
{ "HUTSTARTREPLAY", &MR_HutStartReplay },
|
||||
{ "PLAYBACKREWIND", &MR_PlaybackRewind },
|
||||
{ "PLAYBACKPAUSE", &MR_PlaybackPause },
|
||||
{ "PLAYBACKFASTFORWARD", &MR_PlaybackFastForward },
|
||||
{ "PLAYBACKADVANCE", &MR_PlaybackAdvance },
|
||||
{ "PLAYBACKSETVIEWS", &MR_PlaybackSetViews },
|
||||
{ "PLAYBACKADJUSTVIEW", &MR_PlaybackAdjustView },
|
||||
{ "PLAYBACKTOGGLEFREECAM", &MR_PlaybackToggleFreecam },
|
||||
{ "PLAYBACKQUIT", &MR_PlaybackQuit },
|
||||
{ "HANDLEIMAGEDEF", &MR_HandleImageDef },
|
||||
{ "HANDLEMUSICTEST", &MR_HandleMusicTest },
|
||||
{ "SETUPJOYSTICKMENU", &MR_SetupJoystickMenu },
|
||||
{ "RESETCONTROLS", &MR_ResetControls },
|
||||
{ "CHANGECONTROL", &MR_ChangeControl },
|
||||
{ "ASSIGNJOYSTICK", &MR_AssignJoystick },
|
||||
{ "HANDLEMONITORTOGGLES", &MR_HandleMonitorToggles },
|
||||
{ "RESTARTAUDIO", &MR_RestartAudio },
|
||||
{ "ENTERVIEWSERVER", &MR_EnterViewServer },
|
||||
{ "QUITVIEWSERVER", &MR_QuitViewServer },
|
||||
{ "HANDLEVIEWSERVER", &MR_HandleViewServer },
|
||||
{ "CAMERASETUP", &MR_CameraSetup },
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
{ "HANDLEDISCORDREQUESTS", &M_HandleDiscordRequests },
|
||||
{ "HANDLEDISCORDREQUESTS", &MR_HandleDiscordRequests },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
struct menu_drawer_s const MENU_DRAWERS[] = {
|
||||
{ "DRAWGENERICMENU", &M_DrawGenericMenu },
|
||||
{ "DRAWGENERICSCROLLMENU", &M_DrawGenericScrollMenu },
|
||||
{ "DRAWCENTEREDMENU", &M_DrawCenteredMenu },
|
||||
{ "DRAWPAUSEMENU", &M_DrawPauseMenu },
|
||||
{ "DRAWCHECKLIST", &M_DrawChecklist },
|
||||
{ "DRAWLEVELSTATS", &M_DrawLevelStats },
|
||||
{ "DRAWREPLAYHUT", &M_DrawReplayHut },
|
||||
{ "DRAWTIMEATTACKMENU", &M_DrawTimeAttackMenu },
|
||||
{ "DRAWMPMAINMENU", &M_DrawMPMainMenu },
|
||||
{ "DRAWSETUPMULTIPLAYERMENU", &M_DrawSetupMultiPlayerMenu },
|
||||
{ "DRAWSERVERMENU", &M_DrawServerMenu },
|
||||
{ "DRAWVIDEOMENU", &M_DrawVideoMenu },
|
||||
{ "DRAWVIDEOMODE", &M_DrawVideoMode },
|
||||
{ "DRAWSKYROOM", &M_DrawSkyRoom },
|
||||
{ "DRAWHUDOPTIONS", &M_DrawHUDOptions },
|
||||
{ "DRAWADDONS", &M_DrawAddons },
|
||||
{ "DRAWEMBLEMHINTS", &M_DrawEmblemHints },
|
||||
{ "DRAWREPLAYSTARTMENU", &M_DrawReplayStartMenu },
|
||||
{ "DRAWPLAYBACKMENU", &M_DrawPlaybackMenu },
|
||||
{ "DRAWIMAGEDEF", &M_DrawImageDef },
|
||||
{ "DRAWMUSICTEST", &M_DrawMusicTest },
|
||||
{ "DRAWCONTROL", &M_DrawControl },
|
||||
{ "DRAWJOYSTICK", &M_DrawJoystick },
|
||||
{ "DRAWMONITORTOGGLES", &M_DrawMonitorToggles },
|
||||
{ "DRAWCONNECTMENU", &M_DrawConnectMenu },
|
||||
{ "DRAWGENERICMENU", &MD_DrawGenericMenu },
|
||||
{ "DRAWCHECKLIST", &MD_DrawChecklist },
|
||||
{ "DRAWLEVELSTATS", &MD_DrawLevelStats },
|
||||
{ "DRAWREPLAYHUT", &MD_DrawReplayHut },
|
||||
{ "DRAWTIMEATTACKMENU", &MD_DrawTimeAttackMenu },
|
||||
{ "DRAWMPMAINMENU", &MD_DrawMPMainMenu },
|
||||
{ "DRAWSETUPMULTIPLAYERMENU", &MD_DrawSetupMultiPlayerMenu },
|
||||
{ "DRAWVIDEOMODE", &MD_DrawVideoMode },
|
||||
{ "DRAWADDONS", &MD_DrawAddons },
|
||||
{ "DRAWREPLAYSTARTMENU", &MD_DrawReplayStartMenu },
|
||||
{ "DRAWPLAYBACKMENU", &MD_DrawPlaybackMenu },
|
||||
{ "DRAWIMAGEDEF", &MD_DrawImageDef },
|
||||
{ "DRAWMUSICTEST", &MD_DrawMusicTest },
|
||||
{ "DRAWJOYSTICK", &MD_DrawJoystick },
|
||||
{ "DRAWMONITORTOGGLES", &MD_DrawMonitorToggles },
|
||||
{ "DRAWCONNECTMENU", &MD_DrawConnectMenu },
|
||||
{ "DRAWVIEWSERVER", &MD_DrawViewServer },
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
{ "DRAWDISCORDREQUESTS", &M_DrawDiscordRequests },
|
||||
{ "DRAWDISCORDREQUESTS", &MD_DrawDiscordRequests },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
@ -1062,6 +1039,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"DMG_SQUISH",DMG_SQUISH},
|
||||
{"DMG_VOLTAGE",DMG_VOLTAGE},
|
||||
{"DMG_KARMA",DMG_KARMA},
|
||||
{"DMG_FLIPOVER",DMG_FLIPOVER},
|
||||
//// Death types
|
||||
{"DMG_INSTAKILL",DMG_INSTAKILL},
|
||||
{"DMG_DEATHPIT",DMG_DEATHPIT},
|
||||
|
|
@ -1429,12 +1407,10 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"GS_NULL",GS_NULL},
|
||||
{"GS_LEVEL",GS_LEVEL},
|
||||
{"GS_INTERMISSION",GS_INTERMISSION},
|
||||
{"GS_CONTINUING",GS_CONTINUING},
|
||||
{"GS_TITLESCREEN",GS_TITLESCREEN},
|
||||
{"GS_TIMEATTACK",GS_TIMEATTACK},
|
||||
{"GS_CREDITS",GS_CREDITS},
|
||||
{"GS_EVALUATION",GS_EVALUATION},
|
||||
{"GS_GAMEEND",GS_GAMEEND},
|
||||
{"GS_INTRO",GS_INTRO},
|
||||
{"GS_CUTSCENE",GS_CUTSCENE},
|
||||
{"GS_DEDICATEDSERVER",GS_DEDICATEDSERVER},
|
||||
|
|
@ -1547,6 +1523,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"KARTSPEED_EASY", KARTSPEED_EASY},
|
||||
{"KARTSPEED_NORMAL", KARTSPEED_NORMAL},
|
||||
{"KARTSPEED_HARD", KARTSPEED_HARD},
|
||||
{"KARTSPEED_EXPERT", KARTSPEED_EXPERT},
|
||||
|
||||
// Custom client features exposed to lua
|
||||
{"FEATURE_INTERMISSIONHUD",1}, // This is to trick kart luas that look for this since its already here.
|
||||
|
|
@ -1587,5 +1564,11 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"TRF_REMAP",TRF_REMAP},
|
||||
{"TRF_BYPASSBOOST", TRF_BYPASSBOOST},
|
||||
|
||||
// facepatches
|
||||
{"FACE_RANK", FACE_RANK},
|
||||
{"FACE_WANTED", FACE_WANTED},
|
||||
{"FACE_MINIMAP", FACE_MINIMAP},
|
||||
{"NUMFACES", NUMFACES},
|
||||
|
||||
{NULL,0}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -59,12 +59,12 @@ struct actionpointer_t
|
|||
|
||||
struct menu_routine_s {
|
||||
const char *name;
|
||||
void (*routine)(INT32);
|
||||
menufunc_f *routine;
|
||||
};
|
||||
|
||||
struct menu_drawer_s {
|
||||
const char *name;
|
||||
void (*drawer)(void);
|
||||
menudrawer_f *drawer;
|
||||
};
|
||||
|
||||
struct int_const_s {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -176,6 +176,34 @@ static void ignorelines(MYFILE *f)
|
|||
Z_Free(s);
|
||||
}
|
||||
|
||||
static void ignoremenulines(MYFILE *f)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
char *tmp;
|
||||
do
|
||||
{
|
||||
if (myfgets(s, MAXLINELEN, f))
|
||||
{
|
||||
if (s[0] == '\n')
|
||||
break;
|
||||
|
||||
// First remove trailing newline, if there is one
|
||||
tmp = strchr(s, '\n');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
|
||||
tmp = strchr(s, '#');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
if (s == tmp)
|
||||
continue; // Skip comment lines, but don't break.
|
||||
|
||||
ignorelines(f);
|
||||
}
|
||||
} while (!myfeof(f));
|
||||
Z_Free(s);
|
||||
}
|
||||
|
||||
void DEH_Link(const char *name, dehinfo_t *info, strbuf_t **buf)
|
||||
{
|
||||
info->namehash = HASH32(name, strlen(name));
|
||||
|
|
@ -407,15 +435,6 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
readfollower(f);
|
||||
continue;
|
||||
}
|
||||
// sigh... menu hack
|
||||
else if (fastcmp(word, "DISCORDONLY"))
|
||||
{
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
continue;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
word2 = strtok(NULL, " ");
|
||||
if (word2) {
|
||||
|
|
@ -427,18 +446,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
else
|
||||
i = 0;
|
||||
|
||||
if (fastcmp(word, "CHARACTER"))
|
||||
{
|
||||
if (i >= 0 && i < 32)
|
||||
readPlayer(f, i);
|
||||
else
|
||||
{
|
||||
deh_warning("Character %d out of range (0 - 31)", i);
|
||||
ignorelines(f);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (fastcmp(word, "EMBLEM"))
|
||||
if (fastcmp(word, "EMBLEM"))
|
||||
{
|
||||
if (!mainfile && !gamedataadded)
|
||||
{
|
||||
|
|
@ -645,7 +653,10 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
else if (fastcmp(word, "MENU"))
|
||||
{
|
||||
if (dedicated)
|
||||
{
|
||||
ignoremenulines(f);
|
||||
continue; // dedis don't need menus, silly!
|
||||
}
|
||||
|
||||
if (i == 0 && word2[0] != '0') // If word2 isn't a number
|
||||
i = get_menutype(word2); // find a huditem by name
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2 KART
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2018-2020 by Sally "TehRealSalt" Cochenour.
|
||||
// Copyright (C) 2018-2020 by Kart Krew.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2 KART
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2018-2020 by Sally "TehRealSalt" Cochenour.
|
||||
// Copyright (C) 2018-2020 by Kart Krew.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -104,6 +104,7 @@ extern "C" {
|
|||
// Special Hashing.
|
||||
//#define NOMD5
|
||||
//#define NOFILEHASH
|
||||
//#define NOVERIFYIWADS
|
||||
|
||||
// Uncheck this to compile debugging code
|
||||
//#define RANGECHECK
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -508,7 +508,7 @@ enum GameTypeRules
|
|||
GTR_SPECIALBOTS = 1<<21, // Bot difficulty gets stronger between rounds, and the rival system is enabled.
|
||||
|
||||
// Misc
|
||||
GTR_FREEROAM = 1<<22, // Disables Countdown timer and control lock at the start of levels.
|
||||
GTR_NOCOUNTDOWN = 1<<22, // Disables Countdown timer and control lock at the start of levels.
|
||||
GTR_ENCORE = 1<<23, // Enable Encore mode.
|
||||
|
||||
// free: to and including 1<<31
|
||||
|
|
@ -609,6 +609,7 @@ extern tic_t battleexittime;
|
|||
extern INT32 hyudorotime;
|
||||
extern INT32 stealtime;
|
||||
extern INT32 sneakertime;
|
||||
extern INT32 waterpaneltime;
|
||||
extern INT32 itemtime;
|
||||
extern INT32 bubbletime;
|
||||
extern INT32 comebacktime;
|
||||
|
|
@ -620,7 +621,6 @@ extern INT32 wantedfrequency;
|
|||
|
||||
extern UINT8 introtoplay;
|
||||
extern UINT8 creditscutscene;
|
||||
extern UINT8 useBlackRock;
|
||||
|
||||
extern UINT8 use1upSound;
|
||||
extern UINT8 maxXtraLife; // Max extra lives from rings
|
||||
|
|
@ -662,6 +662,7 @@ extern INT32 cheats;
|
|||
// SRB2kart
|
||||
extern UINT8 numlaps;
|
||||
extern UINT8 gamespeed;
|
||||
extern UINT8 invintype;
|
||||
extern boolean franticitems;
|
||||
extern boolean encoremode, prevencoremode;
|
||||
extern boolean comeback;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -163,7 +163,7 @@ extern "C" {
|
|||
#ifndef _WIN32
|
||||
typedef int32_t boolean;
|
||||
#else
|
||||
#define BOOL boolean
|
||||
#define boolean BOOL
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2014-2020 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
139
src/f_finale.c
139
src/f_finale.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -337,16 +337,16 @@ static void F_IntroDrawScene(void)
|
|||
{
|
||||
background = W_CachePatchName("KARTKREW", PU_CACHE);
|
||||
highres = true;
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 0);
|
||||
}
|
||||
|
||||
if (intro_scenenum == 1)
|
||||
{
|
||||
background = W_CachePatchName("BLANKART", PU_CACHE);
|
||||
highres = false;
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
}
|
||||
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 0);
|
||||
|
||||
if (background)
|
||||
{
|
||||
if (highres)
|
||||
|
|
@ -465,7 +465,9 @@ void F_IntroTicker(void)
|
|||
}
|
||||
if (finalecount == 80)
|
||||
{
|
||||
sfxenum_t rsound = skins[1].soundsid[SKSKWIN];
|
||||
char chars[5][10] = {"tails", "chao", "aiai", "sakura"};
|
||||
SINT8 random = M_RandomRange(0, 3);
|
||||
sfxenum_t rsound = skins[R_SkinAvailable(chars[random])].soundsid[SKSKWIN];
|
||||
S_StartSound(NULL, sfx_flgcap);
|
||||
S_StartSound(NULL, rsound);
|
||||
}
|
||||
|
|
@ -478,7 +480,7 @@ void F_IntroTicker(void)
|
|||
// check for skipping
|
||||
if (keypressed)
|
||||
keypressed = false;
|
||||
|
||||
|
||||
if (animtimer > 0)
|
||||
animtimer--;
|
||||
}
|
||||
|
|
@ -912,24 +914,54 @@ static const char *blancredits[] = {
|
|||
"\1Support Programming",
|
||||
"\"hayaunderscore\" aka \"DeltaKaynx\"",
|
||||
"\"WumboSpasm\"",
|
||||
"\"Anonimous\"",
|
||||
"\"Anonimus\"",
|
||||
"",
|
||||
"\1Item Programming",
|
||||
"\"NepDisk\"",
|
||||
"\"Anonimus\"",
|
||||
"",
|
||||
"\1External Programming",
|
||||
"\"Hanicef\"",
|
||||
"\"Lactozilla\"",
|
||||
"\"xyzzy\"",
|
||||
"\"SuperJustinBros\"",
|
||||
"SRB2Classic Team",
|
||||
"\"luigi budd\"",
|
||||
"",
|
||||
"\1Ring Racers Programming",
|
||||
"Kart Krew Dev",
|
||||
"\"JugadorXEI\"",
|
||||
"\"Kimberly\"",
|
||||
"",
|
||||
"\1Item Design",
|
||||
"\"NepDisk\"",
|
||||
"\"Anonimus\"",
|
||||
"\"Denny\" aka \"shephoron\"",
|
||||
"",
|
||||
"\1Design Support",
|
||||
"\"Rim Jobless\"",
|
||||
"\"luna\"",
|
||||
"\"Denny\" aka \"shephoron\"",
|
||||
"\"White Mage (guy who picked up controller)\"",
|
||||
"",
|
||||
"\1New Graphics Creation",
|
||||
"\"Spee\"",
|
||||
"\"Jin\"",
|
||||
"\"NepDisk\"",
|
||||
"",
|
||||
"\1Testing",
|
||||
"\"NepDisk\"",
|
||||
"\"Alug\"",
|
||||
"\"Indev\"",
|
||||
"\"GenericHeroGuy\"",
|
||||
"\"Sunflower\" aka \"AnimeSonic\"",
|
||||
"\"JonUD\"",
|
||||
"\"luna\"",
|
||||
"\"swift\"",
|
||||
"\"Denny\" aka \"shephoron\"",
|
||||
"\"Rim Jobless\"",
|
||||
"\"White Mage (guy who picked up controller)\"",
|
||||
"",
|
||||
"\1Special Thanks",
|
||||
"\"Sunflower\" aka \"AnimeSonic\"",
|
||||
"Sunflower's Garden",
|
||||
|
|
@ -1067,13 +1099,6 @@ void F_BlanCreditTicker(void)
|
|||
|
||||
void F_StartGameEvaluation(void)
|
||||
{
|
||||
// Credits option in secrets menu
|
||||
if (cursaveslot == -2)
|
||||
{
|
||||
F_StartGameEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
G_SetGamestate(GS_EVALUATION);
|
||||
|
||||
// Just in case they're open ... somehow
|
||||
|
|
@ -1084,6 +1109,9 @@ void F_StartGameEvaluation(void)
|
|||
CON_ToggleOff();
|
||||
|
||||
finalecount = 0;
|
||||
|
||||
G_SetGamestate(GS_TITLESCREEN);
|
||||
S_StopMusic();
|
||||
}
|
||||
|
||||
void F_GameEvaluationDrawer(void)
|
||||
|
|
@ -1093,12 +1121,6 @@ void F_GameEvaluationDrawer(void)
|
|||
|
||||
void F_GameEvaluationTicker(void)
|
||||
{
|
||||
if (++finalecount > 10*TICRATE)
|
||||
{
|
||||
F_StartGameEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
if (finalecount == 5*TICRATE)
|
||||
{
|
||||
if (netgame || multiplayer) // modify this when we finally allow unlocking stuff in 2P
|
||||
|
|
@ -1127,51 +1149,18 @@ void F_GameEvaluationTicker(void)
|
|||
}
|
||||
}
|
||||
|
||||
// ==========
|
||||
// GAME END
|
||||
// ==========
|
||||
void F_StartGameEnd(void)
|
||||
{
|
||||
G_SetGamestate(GS_GAMEEND);
|
||||
|
||||
gameaction = ga_nothing;
|
||||
paused = false;
|
||||
CON_ToggleOff();
|
||||
S_StopSounds();
|
||||
|
||||
// In case menus are still up?!!
|
||||
M_ClearMenus(true);
|
||||
|
||||
timetonext = TICRATE;
|
||||
}
|
||||
|
||||
//
|
||||
// F_GameEndDrawer
|
||||
//
|
||||
void F_GameEndDrawer(void)
|
||||
{
|
||||
// this function does nothing
|
||||
}
|
||||
|
||||
//
|
||||
// F_GameEndTicker
|
||||
//
|
||||
void F_GameEndTicker(void)
|
||||
{
|
||||
if (timetonext > 0)
|
||||
timetonext--;
|
||||
else
|
||||
D_StartTitle();
|
||||
}
|
||||
|
||||
|
||||
// ==============
|
||||
// TITLE SCREEN
|
||||
// ==============
|
||||
|
||||
void F_InitMenuPresValues(void)
|
||||
void F_InitMenuPresValues(boolean title)
|
||||
{
|
||||
menuanimtimer = 0;
|
||||
if (title)
|
||||
{
|
||||
menuanimtimer = 0;
|
||||
LUA_HUD_DestroyDrawList(luahuddrawlist_title);
|
||||
luahuddrawlist_title = LUA_HUD_CreateDrawList();
|
||||
}
|
||||
|
||||
// Set defaults for presentation values
|
||||
strncpy(curbgname, "TITLESKY", 9);
|
||||
|
|
@ -1179,7 +1168,7 @@ void F_InitMenuPresValues(void)
|
|||
curbgcolor = -1;
|
||||
curbgxspeed = titlescrollxspeed;
|
||||
curbgyspeed = titlescrollyspeed;
|
||||
curbghide = false;
|
||||
curbghide = true;
|
||||
|
||||
curhidepics = hidetitlepics;
|
||||
curttmode = ttmode;
|
||||
|
|
@ -1191,12 +1180,9 @@ void F_InitMenuPresValues(void)
|
|||
curtttics = tttics;
|
||||
|
||||
// Find current presentation values
|
||||
//M_SetMenuCurBackground((gamestate == GS_TIMEATTACK) ? "RECATTBG" : "TITLESKY");
|
||||
//M_SetMenuCurFadeValue(16);
|
||||
//M_SetMenuCurTitlePics();
|
||||
|
||||
LUA_HUD_DestroyDrawList(luahuddrawlist_title);
|
||||
luahuddrawlist_title = LUA_HUD_CreateDrawList();
|
||||
M_SetMenuCurBackground();
|
||||
M_SetMenuCurFadeValue();
|
||||
M_SetMenuCurTitlePics();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -1325,7 +1311,7 @@ void F_StartTitleScreen(void)
|
|||
{
|
||||
ttuser_count = 0;
|
||||
finalecount = 0;
|
||||
wipetypepost = menupres[MN_MAIN].enterwipe;
|
||||
wipetypepost = menudefs[MN_MAIN].enterwipe;
|
||||
}
|
||||
else
|
||||
wipegamestate = GS_TITLESCREEN;
|
||||
|
|
@ -1378,8 +1364,8 @@ void F_StartTitleScreen(void)
|
|||
camera[0].height = 0;
|
||||
|
||||
// Run enter linedef exec for MN_MAIN, since this is where we start
|
||||
if (menupres[MN_MAIN].entertag)
|
||||
P_LinedefExecute(menupres[MN_MAIN].entertag, players[displayplayers[0]].mo, NULL);
|
||||
if (menudefs[MN_MAIN].entertag)
|
||||
P_LinedefExecute(menudefs[MN_MAIN].entertag, players[displayplayers[0]].mo, NULL);
|
||||
|
||||
wipegamestate = prevwipegamestate;
|
||||
}
|
||||
|
|
@ -1447,7 +1433,7 @@ void F_TitleScreenDrawer(void)
|
|||
if (finalecount >= 20)
|
||||
V_DrawSmallScaledPatch(84, 87, 0, ttkart);
|
||||
else if (finalecount >= 10)
|
||||
V_DrawSciencePatch((84<<FRACBITS) - 18*(((20 - finalecount)<<FRACBITS) - rendertimefrac), 87<<FRACBITS, 0, ttkart, FRACUNIT/2);
|
||||
V_DrawSciencePatch((84<<FRACBITS) - 18*(((20 - finalecount)<<FRACBITS) - R_GetMenuUncap()), 87<<FRACBITS, 0, ttkart, FRACUNIT/2);
|
||||
}
|
||||
else if (finalecount < 52)
|
||||
{
|
||||
|
|
@ -1463,8 +1449,8 @@ void F_TitleScreenDrawer(void)
|
|||
|
||||
F_TitleBGScroll(5);
|
||||
|
||||
V_DrawSciencePatch(0, -40*FixedDiv(((finalecount % 70)<<FRACBITS) + rendertimefrac, 70<<FRACBITS), V_SNAPTOTOP|V_SNAPTOLEFT, ttcheckers, FRACUNIT);
|
||||
V_DrawSciencePatch(280<<FRACBITS, -(40<<FRACBITS) + 40*FixedDiv(((finalecount % 70)<<FRACBITS) + rendertimefrac, 70<<FRACBITS), V_SNAPTOTOP|V_SNAPTORIGHT, ttcheckers, FRACUNIT);
|
||||
V_DrawSciencePatch(0, -40*FixedDiv(((finalecount % 70)<<FRACBITS) + R_GetMenuUncap(), 70<<FRACBITS), V_SNAPTOTOP|V_SNAPTOLEFT, ttcheckers, FRACUNIT);
|
||||
V_DrawSciencePatch(280<<FRACBITS, -(40<<FRACBITS) + 40*FixedDiv(((finalecount % 70)<<FRACBITS) + R_GetMenuUncap(), 70<<FRACBITS), V_SNAPTOTOP|V_SNAPTORIGHT, ttcheckers, FRACUNIT);
|
||||
|
||||
if (transval)
|
||||
V_DrawFadeScreen(0, 10 - transval);
|
||||
|
|
@ -1529,8 +1515,6 @@ void F_MenuPresTicker(boolean run)
|
|||
// (no longer) De-Demo'd Title Screen
|
||||
void F_TitleScreenTicker(boolean run)
|
||||
{
|
||||
F_MenuPresTicker(true); // title sky
|
||||
|
||||
if (run)
|
||||
{
|
||||
finalecount++;
|
||||
|
|
@ -1542,10 +1526,7 @@ void F_TitleScreenTicker(boolean run)
|
|||
else if (finalecount == 50)
|
||||
{
|
||||
// Now start the music
|
||||
if (menupres[MN_MAIN].musname[0])
|
||||
S_ChangeMusic(menupres[MN_MAIN].musname, menupres[MN_MAIN].mustrack, menupres[MN_MAIN].muslooping);
|
||||
else
|
||||
S_ChangeMusicInternal("titles", looptitle);
|
||||
M_ChangeMenuMusic();
|
||||
S_StartSound(NULL, sfx_s23c);
|
||||
}
|
||||
}
|
||||
|
|
@ -1645,7 +1626,7 @@ void F_TitleScreenTicker(boolean run)
|
|||
// prevent console spam if failed
|
||||
demoIdleLeft = demoIdleTime;
|
||||
|
||||
mapnum = G_RandMap(TOL_RACE, -2, 2, 0, false, NULL);
|
||||
mapnum = G_RandMap(TOL_RACE, -2, 2, 0, NULL);
|
||||
if (mapnum == 0) // gotta have ONE
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -26,6 +26,9 @@ extern "C" {
|
|||
//
|
||||
// FINALE
|
||||
//
|
||||
// HACK for menu fading while titlemapinaction; skips the level check
|
||||
#define FORCEWIPE -2
|
||||
|
||||
|
||||
// Called by main loop.
|
||||
boolean F_IntroResponder(event_t *ev);
|
||||
|
|
@ -33,7 +36,6 @@ boolean F_CutsceneResponder(event_t *ev);
|
|||
boolean F_CreditResponder(event_t *ev);
|
||||
|
||||
// Called by main loop.
|
||||
void F_GameEndTicker(void);
|
||||
void F_IntroTicker(void);
|
||||
void F_TitleScreenTicker(boolean run);
|
||||
void F_CutsceneTicker(void);
|
||||
|
|
@ -41,7 +43,6 @@ void F_TitleDemoTicker(void);
|
|||
void F_TextPromptTicker(void);
|
||||
|
||||
// Called by main loop.
|
||||
void F_GameEndDrawer(void);
|
||||
void F_IntroDrawer(void);
|
||||
void F_TitleScreenDrawer(void);
|
||||
void F_SkyScroll(INT32 scrollxspeed, INT32 scrollyspeed, const char *patchname);
|
||||
|
|
@ -73,7 +74,6 @@ void F_EndTextPrompt(boolean forceexec, boolean noexec);
|
|||
boolean F_GetPromptHideHudAll(void);
|
||||
boolean F_GetPromptHideHud(fixed_t y);
|
||||
|
||||
void F_StartGameEnd(void);
|
||||
void F_StartIntro(void);
|
||||
void F_StartTitleScreen(void);
|
||||
void F_StartCredits(void);
|
||||
|
|
@ -134,7 +134,7 @@ extern UINT16 curtttics;
|
|||
|
||||
#define TITLEBACKGROUNDACTIVE (curfadevalue >= 0 || curbgname[0])
|
||||
|
||||
void F_InitMenuPresValues(void);
|
||||
void F_InitMenuPresValues(boolean title);
|
||||
void F_MenuPresTicker(boolean run);
|
||||
|
||||
//
|
||||
|
|
@ -153,6 +153,8 @@ extern INT32 lastwipetic;
|
|||
void F_WipeStartScreen(void);
|
||||
void F_WipeEndScreen(void);
|
||||
void F_RunWipe(UINT8 wipetype, boolean drawMenu);
|
||||
tic_t F_GetWipeLength(UINT8 wipetype);
|
||||
boolean F_WipeExists(UINT8 wipetype);
|
||||
void F_WipeStageTitle(void);
|
||||
#define F_WipeColorFill(c) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, c)
|
||||
|
||||
|
|
@ -164,12 +166,10 @@ enum
|
|||
wipe_level_toblack,
|
||||
wipe_intermission_toblack,
|
||||
wipe_voting_toblack,
|
||||
wipe_continuing_toblack,
|
||||
wipe_titlescreen_toblack,
|
||||
wipe_timeattack_toblack,
|
||||
wipe_credits_toblack,
|
||||
wipe_evaluation_toblack,
|
||||
wipe_gameend_toblack,
|
||||
wipe_intro_toblack,
|
||||
wipe_ending_toblack,
|
||||
wipe_cutscene_toblack,
|
||||
|
|
@ -182,12 +182,10 @@ enum
|
|||
wipe_level_final,
|
||||
wipe_intermission_final,
|
||||
wipe_voting_final,
|
||||
wipe_continuing_final,
|
||||
wipe_titlescreen_final,
|
||||
wipe_timeattack_final,
|
||||
wipe_credits_final,
|
||||
wipe_evaluation_final,
|
||||
wipe_gameend_final,
|
||||
wipe_intro_final,
|
||||
wipe_ending_final,
|
||||
wipe_cutscene_final,
|
||||
|
|
|
|||
55
src/f_wipe.c
55
src/f_wipe.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -56,12 +56,10 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
0, // wipe_level_toblack
|
||||
0, // wipe_intermission_toblack
|
||||
0, // wipe_voting_toblack,
|
||||
0, // wipe_continuing_toblack
|
||||
0, // wipe_titlescreen_toblack
|
||||
0, // wipe_timeattack_toblack
|
||||
99, // wipe_credits_toblack
|
||||
0, // wipe_evaluation_toblack
|
||||
0, // wipe_gameend_toblack
|
||||
UINT8_MAX, // wipe_intro_toblack (hardcoded)
|
||||
99, // wipe_ending_toblack (hardcoded)
|
||||
99, // wipe_cutscene_toblack (hardcoded)
|
||||
|
|
@ -72,12 +70,10 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
UINT8_MAX, // wipe_level_final
|
||||
0, // wipe_intermission_final
|
||||
0, // wipe_voting_final
|
||||
0, // wipe_continuing_final
|
||||
0, // wipe_titlescreen_final
|
||||
0, // wipe_timeattack_final
|
||||
99, // wipe_credits_final
|
||||
0, // wipe_evaluation_final
|
||||
0, // wipe_gameend_final
|
||||
99, // wipe_intro_final (hardcoded)
|
||||
99, // wipe_ending_final (hardcoded)
|
||||
99 // wipe_cutscene_final (hardcoded)
|
||||
|
|
@ -423,3 +419,52 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
|||
WipeInAction = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Returns tic length of wipe
|
||||
* One lump equals one tic
|
||||
*/
|
||||
tic_t F_GetWipeLength(UINT8 wipetype)
|
||||
{
|
||||
#ifdef NOWIPE
|
||||
(void)wipetype;
|
||||
return 0;
|
||||
#else
|
||||
static char lumpname[10] = "FADEmmss";
|
||||
lumpnum_t lumpnum;
|
||||
UINT8 wipeframe;
|
||||
|
||||
if (wipetype > 99)
|
||||
return 0;
|
||||
|
||||
for (wipeframe = 0; wipeframe < 100; wipeframe++)
|
||||
{
|
||||
sprintf(&lumpname[4], "%.2hu%.2hu", (UINT16)wipetype, (UINT16)wipeframe);
|
||||
|
||||
lumpnum = W_CheckNumForName(lumpname);
|
||||
if (lumpnum == LUMPERROR)
|
||||
return --wipeframe;
|
||||
}
|
||||
return --wipeframe;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Does the specified wipe exist?
|
||||
*/
|
||||
boolean F_WipeExists(UINT8 wipetype)
|
||||
{
|
||||
#ifdef NOWIPE
|
||||
(void)wipetype;
|
||||
return false;
|
||||
#else
|
||||
static char lumpname[10] = "FADEmm00";
|
||||
lumpnum_t lumpnum;
|
||||
|
||||
if (wipetype > 99)
|
||||
return false;
|
||||
|
||||
sprintf(&lumpname[4], "%.2hu00", (UINT16)wipetype);
|
||||
|
||||
lumpnum = W_CheckNumForName(lumpname);
|
||||
return !(lumpnum == LUMPERROR);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
// Copyright (C) 2019 by Kart Krew.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
// Copyright (C) 2019 by Kart Krew.
|
||||
|
|
|
|||
18
src/g_demo.c
18
src/g_demo.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -62,6 +62,7 @@ static CV_PossibleValue_t netdemosyncquality_cons_t[] = {{1, "MIN"}, {35, "MAX"}
|
|||
consvar_t cv_netdemosyncquality = CVAR_INIT ("netdemo_syncquality", "1", CV_SAVE, netdemosyncquality_cons_t, NULL);
|
||||
|
||||
consvar_t cv_netdemosize = CVAR_INIT ("netdemo_size", "6", CV_SAVE, CV_Natural, NULL);
|
||||
consvar_t cv_resyncdemo = CVAR_INIT("resyncdemo", "On", 0, CV_OnOff, NULL);
|
||||
|
||||
boolean nodrawers; // for comparative timing purposes
|
||||
boolean noblit; // for comparative timing purposes
|
||||
|
|
@ -1167,11 +1168,14 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
CONS_Alert(CONS_WARNING, "Demo playback has desynced (player %s)!\n", player_names[playernum]);
|
||||
demosynced = false;
|
||||
|
||||
P_UnsetThingPosition(testmo);
|
||||
testmo->x = oldghost[playernum].x;
|
||||
testmo->y = oldghost[playernum].y;
|
||||
P_SetThingPosition(testmo);
|
||||
testmo->z = oldghost[playernum].z;
|
||||
if (cv_resyncdemo.value)
|
||||
{
|
||||
P_UnsetThingPosition(testmo);
|
||||
testmo->x = oldghost[playernum].x;
|
||||
testmo->y = oldghost[playernum].y;
|
||||
P_SetThingPosition(testmo);
|
||||
testmo->z = oldghost[playernum].z;
|
||||
}
|
||||
|
||||
if (abs(testmo->z - testmo->floorz) < 4*FRACUNIT)
|
||||
testmo->z = testmo->floorz; // Sync players to the ground when they're likely supposed to be there...
|
||||
|
|
@ -4026,7 +4030,7 @@ boolean G_CheckDemoStatus(void)
|
|||
if (timedemo_quit)
|
||||
COM_ImmedExecute("quit");
|
||||
else if (modeattacking)
|
||||
M_ModeAttackEndGame(0);
|
||||
MR_ModeAttackEndGame(0);
|
||||
else
|
||||
D_StartTitle();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -29,6 +29,7 @@ extern UINT8 *demo_p;
|
|||
// ======================================
|
||||
|
||||
extern consvar_t cv_recordmultiplayerdemos, cv_netdemosyncquality, cv_netdemosize;
|
||||
extern consvar_t cv_resyncdemo;
|
||||
|
||||
extern tic_t demostarttime;
|
||||
|
||||
|
|
|
|||
120
src/g_game.c
120
src/g_game.c
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -240,9 +240,10 @@ tic_t battleexittime = 8*TICRATE;
|
|||
INT32 hyudorotime = 7*TICRATE;
|
||||
INT32 stealtime = TICRATE/2;
|
||||
INT32 sneakertime = TICRATE + (TICRATE/3);
|
||||
INT32 waterpaneltime = TICRATE*2;
|
||||
INT32 itemtime = 8*TICRATE;
|
||||
INT32 bubbletime = TICRATE/2;
|
||||
INT32 comebacktime = 3*TICRATE;
|
||||
INT32 comebacktime = 10*TICRATE;
|
||||
INT32 bumptime = 6;
|
||||
INT32 greasetics = 3*TICRATE;
|
||||
INT32 wipeoutslowtime = 20;
|
||||
|
|
@ -254,7 +255,6 @@ UINT8 maxXtraLife = 2; // Max extra lives from rings
|
|||
|
||||
UINT8 introtoplay;
|
||||
UINT8 creditscutscene;
|
||||
UINT8 useBlackRock = 1;
|
||||
|
||||
// Emerald locations
|
||||
mobj_t *hunt1;
|
||||
|
|
@ -282,6 +282,7 @@ INT32 cheats; //for multiplayer cheat commands
|
|||
// Cvars that we don't want changed mid-game
|
||||
UINT8 numlaps; // Removed from Cvar hell
|
||||
UINT8 gamespeed; // Game's current speed (or difficulty, or cc, or etc); 0 for easy, 1 for normal, 2 for hard
|
||||
UINT8 invintype; // How Invincibility functions. 0 for Legacy/Vanilla, 1 for Alternative.
|
||||
boolean encoremode = false; // Encore Mode currently enabled?
|
||||
boolean prevencoremode;
|
||||
boolean franticitems; // Frantic items currently enabled?
|
||||
|
|
@ -423,6 +424,9 @@ consvar_t cv_resetspecialmusic = CVAR_INIT ("resetspecialmusic", "Yes", CV_SAVE,
|
|||
|
||||
consvar_t cv_resume = CVAR_INIT ("resume", "Yes", CV_SAVE, CV_YesNo, NULL);
|
||||
|
||||
static CV_PossibleValue_t mindelay_cons_t[] = {{0, "MIN"}, {30, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_mindelay = CVAR_INIT ("mindelay", "0", CV_SAVE|CV_CALL, mindelay_cons_t, weaponPrefChange);
|
||||
|
||||
consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS] = {
|
||||
CVAR_INIT ("kickstartaccel", "Off", CV_SAVE|CV_CALL, CV_OnOff, weaponPrefChange),
|
||||
CVAR_INIT ("kickstartaccel2", "Off", CV_SAVE|CV_CALL, CV_OnOff, weaponPrefChange2),
|
||||
|
|
@ -466,14 +470,15 @@ SINT8 G_RecordPresetIndex(void)
|
|||
boolean chaining = cv_dummyattackingchaining.value;
|
||||
boolean slipdash = cv_dummyattackingslipdash.value;
|
||||
boolean purpledrift = cv_dummyattackingpurpledrift.value;
|
||||
boolean slopeboost = cv_dummyattackingslopeboost.value;
|
||||
|
||||
if (!rings && !stacking && !chaining && !slipdash && !purpledrift)
|
||||
if (!rings && !stacking && !chaining && !slipdash && !purpledrift && !slopeboost)
|
||||
return RP_KART;
|
||||
|
||||
if (stacking && chaining && !rings && !slipdash && !purpledrift)
|
||||
if (stacking && chaining && slopeboost && !rings && !slipdash && !purpledrift)
|
||||
return RP_TECH;
|
||||
|
||||
if (rings && stacking && chaining && slipdash && purpledrift)
|
||||
if (rings && stacking && chaining && slipdash && purpledrift && slopeboost)
|
||||
return RP_BLAN;
|
||||
|
||||
return RP_CUST;
|
||||
|
|
@ -592,14 +597,14 @@ static void G_UpdateRecordReplays(void)
|
|||
parts = M_PathParts(gpath);
|
||||
M_MkdirEachUntil(gpath, parts - 4, parts - 1, 0755);
|
||||
|
||||
snprintf(lastdemo, 255, "%s-%s-%s-last.lmp", gpath, cv_chooseskin.string, gamemode);
|
||||
snprintf(lastdemo, 255, "%s-%s-%s-last.lmp", gpath, skins[cv_chooseskin.value].name, gamemode);
|
||||
|
||||
if (FIL_FileExists(lastdemo))
|
||||
{
|
||||
UINT8 *buf;
|
||||
size_t len = FIL_ReadFile(lastdemo, &buf);
|
||||
|
||||
snprintf(bestdemo, 255, "%s-%s-%s-time-best.lmp", gpath, cv_chooseskin.string, gamemode);
|
||||
snprintf(bestdemo, 255, "%s-%s-%s-time-best.lmp", gpath, skins[cv_chooseskin.value].name, gamemode);
|
||||
if (!FIL_FileExists(bestdemo) || G_CmpDemoTime(bestdemo, lastdemo) & 1)
|
||||
{ // Better time, save this demo.
|
||||
if (FIL_FileExists(bestdemo))
|
||||
|
|
@ -610,7 +615,7 @@ static void G_UpdateRecordReplays(void)
|
|||
|
||||
if (modeattacking == ATTACKING_TIME)
|
||||
{
|
||||
snprintf(bestdemo, 255, "%s-%s-%s-lap-best.lmp", gpath, cv_chooseskin.string, gamemode);
|
||||
snprintf(bestdemo, 255, "%s-%s-%s-lap-best.lmp", gpath, skins[cv_chooseskin.value].name, gamemode);
|
||||
if (!FIL_FileExists(bestdemo) || G_CmpDemoTime(bestdemo, lastdemo) & (1<<1))
|
||||
{ // Better lap time, save this demo.
|
||||
if (FIL_FileExists(bestdemo))
|
||||
|
|
@ -702,7 +707,7 @@ void G_SetGameModified(boolean silent, boolean major)
|
|||
|
||||
// If in record attack recording, cancel it.
|
||||
if (modeattacking)
|
||||
M_ModeAttackEndGame(0);
|
||||
MR_ModeAttackEndGame(0);
|
||||
else if (marathonmode)
|
||||
Command_ExitGame_f();
|
||||
}
|
||||
|
|
@ -768,6 +773,47 @@ INT32 G_MapNumber(const char * name)
|
|||
#endif
|
||||
}
|
||||
|
||||
/** Returns the map number from level title.
|
||||
*
|
||||
* \param name Map name;
|
||||
* \return Map number.
|
||||
* \sa G_BuildMapName, nextmapspecial_t
|
||||
*/
|
||||
INT32 G_LevelTitleToMapNum(const char * leveltitle)
|
||||
{
|
||||
INT32 map;
|
||||
char levelname[48];
|
||||
|
||||
for (map = 0; map < nummapheaders; ++map)
|
||||
{
|
||||
sprintf(levelname, "%s", mapheaderinfo[map]->lvlttl);
|
||||
if (!strcasecmp(leveltitle, levelname))
|
||||
{
|
||||
return map;
|
||||
}
|
||||
|
||||
sprintf(levelname, "%s %s", mapheaderinfo[map]->lvlttl, mapheaderinfo[map]->actnum);
|
||||
if (!strcasecmp(leveltitle, levelname))
|
||||
{
|
||||
return map;
|
||||
}
|
||||
|
||||
sprintf(levelname, "%s %s", mapheaderinfo[map]->lvlttl, mapheaderinfo[map]->zonttl);
|
||||
if (!strcasecmp(leveltitle, levelname))
|
||||
{
|
||||
return map;
|
||||
}
|
||||
|
||||
sprintf(levelname, "%s %s %s", mapheaderinfo[map]->lvlttl, mapheaderinfo[map]->zonttl, mapheaderinfo[map]->actnum);
|
||||
if (!strcasecmp(leveltitle, levelname))
|
||||
{
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
return INT32_MIN;
|
||||
}
|
||||
|
||||
// convert kart map number to native map number
|
||||
INT16 G_KartMapToNative(INT16 mapnum)
|
||||
{
|
||||
|
|
@ -1004,14 +1050,12 @@ static void G_HandleAxisDeadZone(UINT8 splitnum, joystickvector2_t *joystickvect
|
|||
INT32 localaiming[MAXSPLITSCREENPLAYERS];
|
||||
angle_t localangle[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
// Turning was removed from G_BuildTiccmd to prevent easy client hacking.
|
||||
// This brings back the camera prediction that was lost.
|
||||
static void G_DoAnglePrediction(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer, player_t *player)
|
||||
static void G_DoCameraTurn(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer, player_t *player)
|
||||
{
|
||||
UINT8 viewnum = G_PartyPosition(g_localplayers[ssplayer-1]);
|
||||
|
||||
if (player->mo)
|
||||
cmd->angle = K_GetKartTurnValue(player, cmd->turning);
|
||||
cmd->angle = K_GetKartTurnValue(player, cmd->angle);
|
||||
|
||||
cmd->angle *= realtics;
|
||||
|
||||
|
|
@ -1111,6 +1155,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
if (joystickvector.xaxis != 0)
|
||||
{
|
||||
cmd->turning -= (tspeed * KART_FULLTURN) / JOYAXISRANGE;
|
||||
cmd->angle -= (tspeed * KART_FULLTURN) / JOYAXISRANGE;
|
||||
side += (joystickvector.xaxis * 4) / JOYAXISRANGE;
|
||||
}
|
||||
|
||||
|
|
@ -1119,6 +1164,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
{
|
||||
INT32 mousex = gamekeydown[0][KEY_MOUSEMOVE+3] - gamekeydown[0][KEY_MOUSEMOVE+2];
|
||||
cmd->turning -= (mousex * 8) * (encoremode ? -1 : 1);
|
||||
cmd->angle -= (mousex * 8) * (encoremode ? -1 : 1);
|
||||
}
|
||||
|
||||
if (spectating || objectplacing) // SRB2Kart: spectators need special controls
|
||||
|
|
@ -1275,12 +1321,17 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
else if (cmd->turning < -KART_FULLTURN)
|
||||
cmd->turning = -KART_FULLTURN;
|
||||
|
||||
if (cmd->angle > KART_FULLTURN)
|
||||
cmd->angle = KART_FULLTURN;
|
||||
else if (cmd->angle < -KART_FULLTURN)
|
||||
cmd->angle = -KART_FULLTURN;
|
||||
|
||||
if (cmd->throwdir > KART_FULLTURN)
|
||||
cmd->throwdir = KART_FULLTURN;
|
||||
else if (cmd->throwdir < -KART_FULLTURN)
|
||||
cmd->throwdir = -KART_FULLTURN;
|
||||
|
||||
G_DoAnglePrediction(cmd, realtics, ssplayer, player);
|
||||
G_DoCameraTurn(cmd, realtics, ssplayer, player);
|
||||
|
||||
// Reset away view if a command is given.
|
||||
if ((cmd->forwardmove || cmd->sidemove || cmd->buttons)
|
||||
|
|
@ -1605,15 +1656,6 @@ boolean G_Responder(event_t *ev)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
else if (gamestate == GS_CONTINUING)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Demo End
|
||||
else if (gamestate == GS_GAMEEND)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_EVALUATION)
|
||||
if (HU_Responder(ev))
|
||||
{
|
||||
|
|
@ -2224,20 +2266,12 @@ void G_Ticker(boolean run)
|
|||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_GAMEEND:
|
||||
if (run)
|
||||
F_GameEndTicker();
|
||||
break;
|
||||
|
||||
case GS_EVALUATION:
|
||||
if (run)
|
||||
F_GameEvaluationTicker();
|
||||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_CONTINUING:
|
||||
break;
|
||||
|
||||
case GS_CREDITS:
|
||||
if (run)
|
||||
F_CreditTicker();
|
||||
|
|
@ -2254,6 +2288,7 @@ void G_Ticker(boolean run)
|
|||
if (titlemapinaction)
|
||||
P_Ticker(run);
|
||||
|
||||
F_MenuPresTicker(run);
|
||||
F_TitleScreenTicker(run);
|
||||
break;
|
||||
|
||||
|
|
@ -2548,7 +2583,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
starpostnum = players[player].starpostnum;
|
||||
starposttime = players[player].starposttime;
|
||||
prevcheck = players[player].prevcheck;
|
||||
prevcheck = players[player].nextcheck;
|
||||
nextcheck = players[player].nextcheck;
|
||||
lastsafelap = players[player].lastsafelap;
|
||||
lastsafestarpost = players[player].lastsafestarpost;
|
||||
bigwaypointgap = players[player].bigwaypointgap;
|
||||
|
|
@ -3753,11 +3788,11 @@ static INT32 TOLMaps(UINT8 pgametype)
|
|||
* has those flags.
|
||||
* \author Graue <graue@oceanbase.org>
|
||||
*/
|
||||
static INT16 *okmaps = NULL;
|
||||
INT16 G_RandMap(UINT32 tolflags, INT16 pprevmap, UINT8 ignorebuffer, UINT8 maphell, boolean callagainsoon, INT16 *extbuffer)
|
||||
INT16 G_RandMap(UINT32 tolflags, INT16 pprevmap, UINT8 ignorebuffer, UINT8 maphell, INT16 *extbuffer)
|
||||
{
|
||||
UINT32 numokmaps = 0;
|
||||
INT16 ix, bufx;
|
||||
INT16 *okmaps = NULL;
|
||||
UINT16 extbufsize = 0;
|
||||
boolean usehellmaps; // Only consider Hell maps in this pick
|
||||
|
||||
|
|
@ -3899,12 +3934,9 @@ tryagain:
|
|||
ix = okmaps[M_RandomKey(numokmaps)];
|
||||
}
|
||||
|
||||
if (!callagainsoon)
|
||||
{
|
||||
//CONS_Printf("(freeing okmaps)\n");
|
||||
Z_Free(okmaps);
|
||||
okmaps = NULL;
|
||||
}
|
||||
//CONS_Printf("(freeing okmaps)\n");
|
||||
Z_Free(okmaps);
|
||||
okmaps = NULL;
|
||||
|
||||
return ix;
|
||||
}
|
||||
|
|
@ -4171,7 +4203,7 @@ static INT16 G_GetNextMap(boolean advancemap)
|
|||
}
|
||||
else if (cv_advancemap.value == 2) // Go to random map.
|
||||
{
|
||||
newmap = G_RandMap(G_TOLFlag(gametype), curmap, 0, 0, false, NULL);
|
||||
newmap = G_RandMap(G_TOLFlag(gametype), curmap, 0, 0, NULL);
|
||||
}
|
||||
else if (nextmap >= NEXTMAP_SPECIAL) // Loop back around
|
||||
{
|
||||
|
|
@ -4299,7 +4331,7 @@ void G_AfterIntermission(void)
|
|||
G_StopDemo();
|
||||
|
||||
if (demo.inreplayhut)
|
||||
M_ReplayHut(0);
|
||||
M_EnterMenu(MN_MISC_REPLAYHUT, true, 0);
|
||||
else
|
||||
D_StartTitle();
|
||||
|
||||
|
|
@ -4310,7 +4342,7 @@ void G_AfterIntermission(void)
|
|||
|
||||
if (modeattacking) // End the run.
|
||||
{
|
||||
M_ModeAttackEndGame(0);
|
||||
MR_ModeAttackEndGame(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -100,6 +100,7 @@ void weaponPrefChange4(void);
|
|||
|
||||
const char *G_BuildMapName(INT32 map);
|
||||
INT32 G_MapNumber(const char *mapname);
|
||||
INT32 G_LevelTitleToMapNum(const char * leveltitle);
|
||||
INT16 G_KartMapToNative(INT16 mapnum);
|
||||
INT16 G_NativeMapToKart(INT16 mapnum);
|
||||
|
||||
|
|
@ -274,7 +275,7 @@ FUNCMATH INT32 G_TicsToMilliseconds(tic_t tics);
|
|||
UINT32 G_TOLFlag(INT32 pgametype);
|
||||
INT16 G_GetFirstMapOfGametype(UINT8 pgametype);
|
||||
|
||||
INT16 G_RandMap(UINT32 tolflags, INT16 pprevmap, UINT8 ignorebuffer, UINT8 maphell, boolean callagainsoon, INT16 *extbuffer);
|
||||
INT16 G_RandMap(UINT32 tolflags, INT16 pprevmap, UINT8 ignorebuffer, UINT8 maphell, INT16 *extbuffer);
|
||||
void G_AddMapToBuffer(INT16 map);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -28,14 +28,12 @@ typedef enum
|
|||
GS_LEVEL, // Playing, in a level.
|
||||
GS_INTERMISSION, // Gazing at the intermission screen.
|
||||
GS_VOTING, // SRB2Kart: MP voting screen
|
||||
GS_CONTINUING, // continue screen
|
||||
|
||||
GS_TITLESCREEN, // title screen
|
||||
GS_TIMEATTACK, // time attack menu
|
||||
|
||||
GS_CREDITS, // credit sequence
|
||||
GS_EVALUATION, // Evaluation at the end of a game.
|
||||
GS_GAMEEND, // game end sequence - "did you get all those chaos emeralds?"
|
||||
|
||||
// Hardcoded fades or other fading methods
|
||||
GS_INTRO, // introduction
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2001 by DooM Legacy Team.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2001 by DooM Legacy Team.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2001 by DooM Legacy Team.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
#include "../r_draw.h"
|
||||
#include "../r_patch.h"
|
||||
#include "../r_main.h"
|
||||
#include "../r_bsp.h"
|
||||
#include "../r_picformats.h"
|
||||
#include "../p_setup.h"
|
||||
#include "../p_setup.h" // levelflats
|
||||
|
|
@ -743,7 +744,7 @@ void HWR_FreeMapTextures(void)
|
|||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < gl_numtextures; i++)
|
||||
for (i = 0; i < gl_numtextures*2; i++)
|
||||
{
|
||||
FreeMapTexture(&gl_textures[i]);
|
||||
FreeMapTexture(&gl_flats[i]);
|
||||
|
|
@ -764,10 +765,9 @@ void HWR_FreeMapTextures(void)
|
|||
static void HWR_PrecacheLevelFlats(void)
|
||||
{
|
||||
levelflat_t levelflat;
|
||||
size_t i;
|
||||
size_t i, j;
|
||||
|
||||
// special case for encore
|
||||
#ifdef GLENCORE
|
||||
if (encoremode)
|
||||
{
|
||||
// go through all sectors to determine if it should be remapped for encore
|
||||
|
|
@ -784,17 +784,16 @@ static void HWR_PrecacheLevelFlats(void)
|
|||
// gotta check sector floor and ceiling
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
const boolean ceiling = (j == 1);
|
||||
const boolean ceiling = (j == 0);
|
||||
INT32 pic = ceiling ? sec->ceilingpic : sec->floorpic;
|
||||
|
||||
levelflat = levelflats[pic];
|
||||
|
||||
HWR_GetLevelFlat(&levelflat, R_NoEncore(sec, ceiling));
|
||||
HWR_GetLevelFlat(&levelflat, R_NoEncore(sec, &levelflat, ceiling));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// on non encore we have it simple
|
||||
// just load every flat in the level
|
||||
|
|
@ -820,11 +819,7 @@ static void HWR_PrecacheLevelTextures(void)
|
|||
for (i = 0; i < numlines; i++)
|
||||
{
|
||||
line_t *line = &lines[i];
|
||||
#ifdef GLENCORE
|
||||
const int noencoremap = ((line->flags & ML_TFERLINE) ? 2 : 1);
|
||||
#else
|
||||
const int noencoremap = 1;
|
||||
#endif
|
||||
|
||||
// line checked already?
|
||||
if (line->validcount == validcount)
|
||||
|
|
@ -874,7 +869,7 @@ static void HWR_PrecacheLevelTextures(void)
|
|||
HWR_GetTexture(anim->basepic+h, false);
|
||||
}
|
||||
}
|
||||
#ifdef GLENCORE
|
||||
|
||||
if (texpresent & 2)
|
||||
{
|
||||
for (h = 1; h < anim->numpics; h++)
|
||||
|
|
@ -882,7 +877,6 @@ static void HWR_PrecacheLevelTextures(void)
|
|||
HWR_GetTexture(anim->basepic+h, true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Sky texture is always present.
|
||||
|
|
@ -901,12 +895,11 @@ static void HWR_PrecacheLevelTextures(void)
|
|||
{
|
||||
HWR_GetTexture(i, false);
|
||||
}
|
||||
#ifdef GLENCORE
|
||||
|
||||
if (texpresent & 2)
|
||||
{
|
||||
HWR_GetTexture(i, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
free(texturepresent);
|
||||
}
|
||||
|
|
@ -999,8 +992,8 @@ void HWR_LoadMapTextures(size_t pnumtextures)
|
|||
HWR_FreeMapTextures();
|
||||
|
||||
gl_numtextures = pnumtextures;
|
||||
gl_textures = calloc(gl_numtextures, sizeof(*gl_textures));
|
||||
gl_flats = calloc(gl_numtextures, sizeof(*gl_flats));
|
||||
gl_textures = calloc(gl_numtextures, sizeof (*gl_textures)*2); // *2 - 1 for encore-remapped texture and another for noencore texture (unused when not in encore)
|
||||
gl_flats = calloc(gl_numtextures, sizeof(*gl_flats)*2);
|
||||
|
||||
if (gl_textures == NULL || gl_flats == NULL)
|
||||
I_Error("HWR_LoadMapTextures: ran out of memory for OpenGL textures");
|
||||
|
|
@ -1032,11 +1025,7 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencoremap)
|
|||
I_Error("HWR_GetTexture: tex >= numtextures\n");
|
||||
#endif
|
||||
|
||||
#ifdef GLENCORE
|
||||
grtex = &gr_textures[tex*2 + (encoremap && !noencore ? 0 : 1)];
|
||||
#else
|
||||
grtex = &gl_textures[tex];
|
||||
#endif
|
||||
grtex = &gl_textures[tex*2 + (encoremap && !noencoremap ? 0 : 1)];
|
||||
|
||||
// Generate texture if missing from the cache
|
||||
if (!grtex->mipmap.data && !grtex->mipmap.downloaded)
|
||||
|
|
@ -1187,11 +1176,7 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef GLENCORE
|
||||
GLMapTexture_t *grtex = &gr_flats[texturenum*2 + (encoremap && !noencore ? 0 : 1)];
|
||||
#else
|
||||
GLMapTexture_t *grtex = &gl_flats[texturenum];
|
||||
#endif
|
||||
GLMapTexture_t *grtex = &gl_flats[texturenum*2 + (encoremap && !noencoremap ? 0 : 1)];
|
||||
GLMipmap_t *grMipmap = &grtex->mipmap;
|
||||
|
||||
if (!grMipmap->data && !grMipmap->downloaded)
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle)
|
|||
// but at least it doesn't overestimate too much...
|
||||
clipfov = atan(1 / projMatrix[0]) * 360 / M_PI; // use the actual view of the scene
|
||||
floatangle = 2.0f + (45.0f + (tilt / 1.9f)) * clipfov / 90.0f;
|
||||
if (floatangle >= ANGLE_180)
|
||||
if (floatangle >= 180.0)
|
||||
return 0xffffffff;
|
||||
a1 = (angle_t)(ANG1 * (int)floatangle);
|
||||
return a1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2005 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -1116,9 +1116,11 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT32
|
|||
void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FBITFIELD flags;
|
||||
FSurfaceInfo Surf;
|
||||
float fx, fy, fw, fh;
|
||||
UINT8 alphalevel = ((color & V_ALPHAMASK) >> V_ALPHASHIFT);
|
||||
UINT8 blendmode = ((color & V_BLENDMASK) >> V_BLENDSHIFT);
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
|
|
@ -1198,6 +1200,8 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
|
||||
Surf.PolyColor = V_GetColor(color);
|
||||
|
||||
flags = HWR_GetBlendModeFlag(blendmode+1)|PF_Modulated|PF_NoDepthTest|PF_NoTexture;
|
||||
|
||||
if (alphalevel)
|
||||
{
|
||||
if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF
|
||||
|
|
@ -1208,7 +1212,7 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
}
|
||||
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4,
|
||||
PF_Modulated|PF_NoTexture|PF_NoDepthTest|PF_Translucent);
|
||||
flags);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PNG
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -295,7 +295,7 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col
|
|||
}
|
||||
|
||||
// Clamp the light level, since it can sometimes go out of the 0-255 range from animations
|
||||
light_level = min(max(light_level, 0), 255);
|
||||
light_level = min(max(light_level, cv_glsecbright.value), 255);
|
||||
|
||||
V_CubeApply(&tint_color.s.red, &tint_color.s.green, &tint_color.s.blue);
|
||||
V_CubeApply(&fade_color.s.red, &fade_color.s.green, &fade_color.s.blue);
|
||||
|
|
@ -1527,31 +1527,6 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[1].y = FIXED_TO_FLOAT(l);
|
||||
}
|
||||
|
||||
// set alpha for transparent walls
|
||||
// ooops ! this do not work at all because render order we should render it in backtofront order
|
||||
if (gl_linedef->blendmode && gl_linedef->blendmode != AST_FOG)
|
||||
{
|
||||
if (gl_linedef->alpha >= 0 && gl_linedef->alpha < FRACUNIT)
|
||||
blendmode = HWR_SurfaceBlend(gl_linedef->blendmode, R_GetLinedefTransTable(gl_linedef->alpha), &Surf);
|
||||
else
|
||||
blendmode = HWR_GetBlendModeFlag(gl_linedef->blendmode);
|
||||
}
|
||||
else if (gl_linedef->alpha >= 0 && gl_linedef->alpha < FRACUNIT)
|
||||
blendmode = HWR_TranstableToAlpha(R_GetLinedefTransTable(gl_linedef->alpha), &Surf);
|
||||
else
|
||||
blendmode = PF_Masked;
|
||||
|
||||
if (gl_curline->polyseg && gl_curline->polyseg->translucency > 0)
|
||||
{
|
||||
if (gl_curline->polyseg->translucency >= NUMTRANSMAPS) // wall not drawn
|
||||
{
|
||||
Surf.PolyColor.s.alpha = 0x00; // This shouldn't draw anything regardless of blendmode
|
||||
blendmode = PF_Masked;
|
||||
}
|
||||
else
|
||||
blendmode = HWR_TranstableToAlpha(gl_curline->polyseg->translucency, &Surf);
|
||||
}
|
||||
|
||||
// Render midtextures on two-sided lines with a z-buffer offset.
|
||||
// This will cause the midtexture appear on top, if a FOF overlaps with it.
|
||||
blendmode |= PF_Decal;
|
||||
|
|
@ -1731,7 +1706,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
||||
continue;
|
||||
if (rover->fofflags & FOF_INVERTSIDES && (mapnamespace == MNS_SRB2KART || !(rover->fofflags & FOF_ALLSIDES)))
|
||||
if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES)
|
||||
continue;
|
||||
|
||||
SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight)
|
||||
|
|
@ -1891,7 +1866,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
||||
continue;
|
||||
if (!(rover->fofflags & FOF_ALLSIDES || (mapnamespace != MNS_SRB2KART && rover->fofflags & FOF_INVERTSIDES)))
|
||||
if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES))
|
||||
continue;
|
||||
|
||||
SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight)
|
||||
|
|
@ -2239,7 +2214,7 @@ static void HWR_AddLine(seg_t * line)
|
|||
angle2 = R_PointToAngle64(v2x, v2y);
|
||||
|
||||
// PrBoom: Back side, i.e. backface culling - read: endAngle >= startAngle!
|
||||
if (angle2 - angle1 < ANGLE_180 || !gl_curline->linedef)
|
||||
if (angle2 - angle1 < ANGLE_180)
|
||||
return;
|
||||
|
||||
// PrBoom: use REAL clipping math YAYYYYYYY!!!
|
||||
|
|
@ -2749,7 +2724,7 @@ static void HWR_Subsector(size_t num)
|
|||
|
||||
if (centerHeight <= locCeilingHeight &&
|
||||
centerHeight >= locFloorHeight &&
|
||||
((dup_viewz < cullHeight && ((mapnamespace != MNS_SRB2KART && rover->fofflags & FOF_BOTHPLANES) || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
((dup_viewz < cullHeight && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(dup_viewz > cullHeight && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
|
|
@ -2797,7 +2772,7 @@ static void HWR_Subsector(size_t num)
|
|||
|
||||
if (centerHeight >= locFloorHeight &&
|
||||
centerHeight <= locCeilingHeight &&
|
||||
((dup_viewz > cullHeight && ((mapnamespace != MNS_SRB2KART && rover->fofflags & FOF_BOTHPLANES) || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
((dup_viewz > cullHeight && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(dup_viewz < cullHeight && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
|
|
@ -3410,7 +3385,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
|
|||
}
|
||||
|
||||
// push it toward the camera to mitigate floor-clipping sprites
|
||||
if (!R_ThingIsPaperSprite(spr->mobj)) // but not for papersprites
|
||||
if (!R_ThingIsPaperSprite(spr->mobj) && !(spr->mobj->terrain && spr->mobj->terrain->floorClip)) // but not for papersprites or for floorclip
|
||||
{
|
||||
// Let dispoffset work first since this adjust each vertex
|
||||
HWR_RotateSpritePolyToAim(spr, baseWallVerts, false);
|
||||
|
|
@ -3465,6 +3440,11 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
|
|||
return; // cap
|
||||
|
||||
blend = HWR_SurfaceBlend(blendmode, trans, &Surf);
|
||||
|
||||
// if sprite has PF_ALWAYSONTOP, draw on top of everything.
|
||||
if (cv_debugrender_spriteclip.value || spr->mobj->renderflags & RF_ALWAYSONTOP)
|
||||
blend |= PF_NoDepthTest;
|
||||
|
||||
if (!trans && !blendmode)
|
||||
{
|
||||
// BP: i agree that is little better in environement but it don't
|
||||
|
|
@ -3869,7 +3849,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||
float sprdist = 0.0f, distfact = 0.0f;
|
||||
size_t i;
|
||||
|
||||
if (!splat && !R_ThingIsPaperSprite(spr->mobj))
|
||||
if (!splat && !R_ThingIsPaperSprite(spr->mobj) && !(spr->mobj->terrain && spr->mobj->terrain->floorClip))
|
||||
{
|
||||
// Let dispoffset work first since this adjust each vertex
|
||||
HWR_RotateSpritePolyToAim(spr, wallVerts, false);
|
||||
|
|
@ -3962,6 +3942,11 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||
return; // cap
|
||||
|
||||
blend = HWR_SurfaceBlend(blendmode, trans, &Surf);
|
||||
|
||||
// if sprite has PF_ALWAYSONTOP, draw on top of everything.
|
||||
if (cv_debugrender_spriteclip.value || spr->mobj->renderflags & RF_ALWAYSONTOP)
|
||||
blend |= PF_NoDepthTest;
|
||||
|
||||
if (!trans && !blendmode)
|
||||
{
|
||||
// BP: i agree that is little better in environement but it don't
|
||||
|
|
@ -4894,7 +4879,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
spr_topoffset = spritecachedinfo[lumpoff].topoffset;
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
spriterotangle = R_SpriteRotationAngle(thing, NULL);
|
||||
spriterotangle = R_SpriteRotationAngle(thing, NULL, &interp);
|
||||
|
||||
if (spriterotangle != 0
|
||||
&& !(splat && !(thing->renderflags & RF_NOSPLATROLLANGLE)))
|
||||
|
|
@ -5016,6 +5001,9 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
x1 = tr_x + x1 * rightcos;
|
||||
x2 = tr_x - x2 * rightcos;
|
||||
|
||||
if (thing->terrain && thing->terrain->floorClip)
|
||||
spr_topoffset -= thing->terrain->floorClip;
|
||||
|
||||
if (vflip)
|
||||
{
|
||||
gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale);
|
||||
|
|
@ -6152,10 +6140,12 @@ static CV_PossibleValue_t glfiltermode_cons_t[]= {{HWD_SET_TEXTUREFILTER_POINTSA
|
|||
{HWD_SET_TEXTUREFILTER_MIXED3, "Nearest_Mipmap"},
|
||||
{0, NULL}};
|
||||
CV_PossibleValue_t glanisotropicmode_cons_t[] = {{1, "MIN"}, {16, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t glsecbright_cons_t[] = {{0, "MIN"}, {255, "MAX"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_glshaders = CVAR_INIT ("gr_shaders", "On", CV_SAVE, glshaders_cons_t, NULL);
|
||||
consvar_t cv_glallowshaders = CVAR_INIT ("gr_allowclientshaders", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||
consvar_t cv_fovchange = CVAR_INIT ("gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
consvar_t cv_glsecbright = CVAR_INIT("gr_secbright", "0", CV_SAVE, glsecbright_cons_t, NULL);
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
consvar_t cv_gldynamiclighting = CVAR_INIT ("gr_dynamiclighting", "On", CV_SAVE, CV_OnOff, NULL);
|
||||
|
|
@ -6217,6 +6207,7 @@ void HWR_AddCommands(void)
|
|||
CV_RegisterVar(&cv_glspritebillboarding);
|
||||
CV_RegisterVar(&cv_glshearing);
|
||||
CV_RegisterVar(&cv_glshaders);
|
||||
CV_RegisterVar(&cv_glsecbright);
|
||||
CV_RegisterVar(&cv_glallowshaders);
|
||||
|
||||
CV_RegisterVar(&cv_glfiltermode);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -99,6 +99,7 @@ extern consvar_t cv_glcoronasize;
|
|||
#endif
|
||||
|
||||
extern consvar_t cv_glshaders, cv_glallowshaders;
|
||||
extern consvar_t cv_glsecbright;
|
||||
extern consvar_t cv_glmodels;
|
||||
|
||||
// SRB2Kart: We don't like these options.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
@ -96,14 +96,14 @@ static void md2_freeModel (model_t *model)
|
|||
// load model
|
||||
//
|
||||
// Hurdler: the current path is the Legacy.exe path
|
||||
static model_t *md2_readModel(const char *filename)
|
||||
static model_t *md2_readModel(const char *filename, modeltype_t modeltype)
|
||||
{
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
if (FIL_FileExists(va("%s"PATHSEP"%s", srb2home, filename)))
|
||||
return LoadModel(va("%s"PATHSEP"%s", srb2home, filename), PU_STATIC);
|
||||
return LoadModel(va("%s"PATHSEP"%s", srb2home, filename), PU_STATIC, modeltype);
|
||||
|
||||
if (FIL_FileExists(va("%s"PATHSEP"%s", srb2path, filename)))
|
||||
return LoadModel(va("%s"PATHSEP"%s", srb2path, filename), PU_STATIC);
|
||||
return LoadModel(va("%s"PATHSEP"%s", srb2path, filename), PU_STATIC, modeltype);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -577,11 +577,13 @@ addskinmodel:
|
|||
{
|
||||
if (stricmp(skinname, skins[s].name) == 0)
|
||||
{
|
||||
boolean iscompatskin = wadfiles[skins[s].wadnum]->compatmode;
|
||||
md2_playermodels[s].skin = s;
|
||||
md2_playermodels[s].scale = scale;
|
||||
md2_playermodels[s].offset = offset;
|
||||
md2_playermodels[s].notfound = false;
|
||||
strcpy(md2_playermodels[s].filename, filename);
|
||||
CONS_Printf("Added 3D model for skin '%s' %s\n", skins[s].name, iscompatskin ? "in compatibility mode" : "");
|
||||
goto modelfound;
|
||||
}
|
||||
}
|
||||
|
|
@ -641,11 +643,13 @@ void HWR_AddPlayerModel(int skin) // For skins that were added after startup
|
|||
|
||||
if (stricmp(skinname, skins[skin].name) == 0)
|
||||
{
|
||||
boolean iscompatskin = wadfiles[skins[skin].wadnum]->compatmode;
|
||||
md2_playermodels[skin].skin = skin;
|
||||
md2_playermodels[skin].scale = scale;
|
||||
md2_playermodels[skin].offset = offset;
|
||||
md2_playermodels[skin].notfound = false;
|
||||
strcpy(md2_playermodels[skin].filename, filename);
|
||||
CONS_Printf("Added 3D model for skin '%s' %s\n", skins[skin].name, iscompatskin ? "in compatibility mode" : "");
|
||||
goto playermodelfound;
|
||||
}
|
||||
}
|
||||
|
|
@ -1391,6 +1395,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
spriteframe_t *sprframe;
|
||||
INT32 mod;
|
||||
interpmobjstate_t interp;
|
||||
modeltype_t modeltype = MODELTYPE_SPRITE;
|
||||
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
{
|
||||
|
|
@ -1439,6 +1444,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
{
|
||||
md2 = &md2_playermodels[(skin_t*)spr->mobj->skin-skins];
|
||||
md2->skin = (skin_t*)spr->mobj->skin-skins;
|
||||
modeltype = wadfiles[((skin_t*)spr->mobj->skin)->wadnum]->compatmode ? MODELTYPE_OLDPLAYER : MODELTYPE_PLAYER;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1481,7 +1487,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
{
|
||||
//CONS_Debug(DBG_RENDER, "Loading model... (%s)", sprnames[spr->mobj->sprite]);
|
||||
sprintf(filename, "models/%s", md2->filename);
|
||||
md2->model = md2_readModel(filename);
|
||||
md2->model = md2_readModel(filename, modeltype);
|
||||
|
||||
if (md2->model)
|
||||
{
|
||||
|
|
@ -1657,8 +1663,12 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
p.angley = FIXED_TO_FLOAT(anglef);
|
||||
}
|
||||
|
||||
// drift frame unrotation hack...
|
||||
if (modeltype == MODELTYPE_OLDPLAYER && (spr2 == SPR2_DRRN || spr2 == SPR2_DRLN))
|
||||
p.angley += spr2 == SPR2_DRRN ? 45.0f : -45.0f;
|
||||
|
||||
{
|
||||
fixed_t anglef = AngleFixed(R_ModelRotationAngle(spr->mobj, NULL));
|
||||
fixed_t anglef = AngleFixed(R_SpriteRotationAngle(spr->mobj, NULL, &interp));
|
||||
|
||||
p.rollangle = 0.0f;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "../doomtype.h"
|
||||
#include "../info.h"
|
||||
#include "../z_zone.h"
|
||||
#include "../r_skins.h"
|
||||
#include "hw_model.h"
|
||||
#include "hw_md2load.h"
|
||||
#include "hw_md3load.h"
|
||||
|
|
@ -145,7 +146,7 @@ tag_t *GetTagByName(model_t *model, char *name, int frame)
|
|||
// convert it to the
|
||||
// internal format.
|
||||
//
|
||||
model_t *LoadModel(const char *filename, int ztag)
|
||||
model_t *LoadModel(const char *filename, int ztag, modeltype_t modeltype)
|
||||
{
|
||||
model_t *model;
|
||||
|
||||
|
|
@ -198,7 +199,7 @@ model_t *LoadModel(const char *filename, int ztag)
|
|||
|
||||
Optimize(model);
|
||||
GeneratePolygonNormals(model, ztag);
|
||||
LoadModelSprite2(model);
|
||||
LoadModelSprite2(model, modeltype);
|
||||
if (!model->spr2frames)
|
||||
LoadModelInterpolationSettings(model);
|
||||
|
||||
|
|
@ -241,7 +242,7 @@ void HWR_ReloadModels(void)
|
|||
for (s = 0; s < MAXSKINS; s++)
|
||||
{
|
||||
if (md2_playermodels[s].model)
|
||||
LoadModelSprite2(md2_playermodels[s].model);
|
||||
LoadModelSprite2(md2_playermodels[s].model, wadfiles[skins[s].wadnum]->compatmode ? MODELTYPE_OLDPLAYER : MODELTYPE_PLAYER);
|
||||
}
|
||||
|
||||
for (i = 0; i < NUMSPRITES; i++)
|
||||
|
|
@ -255,7 +256,7 @@ void LoadModelInterpolationSettings(model_t *model)
|
|||
{
|
||||
INT32 i;
|
||||
INT32 numframes = model->meshes[0].numFrames;
|
||||
char *framename = model->framenames;
|
||||
const char *framename = model->framenames;
|
||||
|
||||
if (!framename)
|
||||
return;
|
||||
|
|
@ -264,7 +265,7 @@ void LoadModelInterpolationSettings(model_t *model)
|
|||
memcpy(&interpolation_flag, framename + offset, 2); \
|
||||
model->interpolate[i] = (!memcmp(interpolation_flag, MODEL_INTERPOLATION_FLAG, 2));
|
||||
|
||||
for (i = 0; i < numframes; i++)
|
||||
for (i = 0; i < numframes; i++, framename += 16)
|
||||
{
|
||||
int offset = (strlen(framename) - 4);
|
||||
char interpolation_flag[3];
|
||||
|
|
@ -283,87 +284,84 @@ void LoadModelInterpolationSettings(model_t *model)
|
|||
offset--;
|
||||
GET_OFFSET;
|
||||
}
|
||||
|
||||
framename += 16;
|
||||
}
|
||||
|
||||
#undef GET_OFFSET
|
||||
}
|
||||
|
||||
void LoadModelSprite2(model_t *model)
|
||||
void LoadModelSprite2(model_t *model, modeltype_t modeltype)
|
||||
{
|
||||
INT32 i;
|
||||
modelspr2frames_t *spr2frames = NULL;
|
||||
INT32 numframes = model->meshes[0].numFrames;
|
||||
char *framename = model->framenames;
|
||||
const char *framename = model->framenames;
|
||||
|
||||
if (modeltype != MODELTYPE_PLAYER && modeltype != MODELTYPE_OLDPLAYER)
|
||||
return;
|
||||
|
||||
if (!framename)
|
||||
return;
|
||||
|
||||
for (i = 0; i < numframes; i++)
|
||||
for (i = 0; i < numframes; i++, framename += 16)
|
||||
{
|
||||
char prefix[6];
|
||||
char name[5];
|
||||
char interpolation_flag[3];
|
||||
char framechars[4];
|
||||
UINT8 frame = 0;
|
||||
const char *name;
|
||||
const char *framechars;
|
||||
UINT8 frame;
|
||||
UINT8 spr2idx;
|
||||
boolean interpolate = false;
|
||||
boolean interpolate;
|
||||
boolean super;
|
||||
|
||||
memset(&prefix, 0x00, 6);
|
||||
memset(&name, 0x00, 5);
|
||||
memset(&interpolation_flag, 0x00, 3);
|
||||
memset(&framechars, 0x00, 4);
|
||||
|
||||
if (strlen(framename) >= 9)
|
||||
if (modeltype == MODELTYPE_OLDPLAYER)
|
||||
{
|
||||
boolean super;
|
||||
char *modelframename = framename;
|
||||
memcpy(&prefix, modelframename, 5);
|
||||
modelframename += 5;
|
||||
memcpy(&name, modelframename, 4);
|
||||
modelframename += 4;
|
||||
// Oh look
|
||||
memcpy(&interpolation_flag, modelframename, 2);
|
||||
if (!memcmp(interpolation_flag, MODEL_INTERPOLATION_FLAG, 2))
|
||||
{
|
||||
interpolate = true;
|
||||
modelframename += 2;
|
||||
}
|
||||
memcpy(&framechars, modelframename, 3);
|
||||
size_t j;
|
||||
spr2idx = SPR2_KART;
|
||||
if (!spr2frames)
|
||||
spr2frames = (modelspr2frames_t*)Z_Calloc(sizeof(modelspr2frames_t)*NUMPLAYERSPRITES*2, PU_STATIC, NULL);
|
||||
|
||||
if ((super = (!memcmp(prefix, "SUPER", 5))) || (!memcmp(prefix, "SPR2_", 5)))
|
||||
{
|
||||
spr2idx = 0;
|
||||
while (spr2idx < free_spr2)
|
||||
// i don't care, just iterate the whole array for every model frame
|
||||
for (j = 0; j < sizeof(kart2spr2)/sizeof(*kart2spr2); j++)
|
||||
if (kart2spr2[j][0] == i)
|
||||
{
|
||||
if (!memcmp(spr2names[spr2idx], name, 4))
|
||||
{
|
||||
if (!spr2frames)
|
||||
spr2frames = (modelspr2frames_t*)Z_Calloc(sizeof(modelspr2frames_t)*NUMPLAYERSPRITES*2, PU_STATIC, NULL);
|
||||
if (super)
|
||||
spr2idx |= FF_SPR2SUPER;
|
||||
if (framechars[0])
|
||||
{
|
||||
frame = atoi(framechars);
|
||||
if (spr2frames[spr2idx].numframes < frame+1)
|
||||
spr2frames[spr2idx].numframes = frame+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame = spr2frames[spr2idx].numframes;
|
||||
spr2frames[spr2idx].numframes++;
|
||||
}
|
||||
spr2frames[spr2idx].frames[frame] = i;
|
||||
spr2frames[spr2idx].interpolate = interpolate;
|
||||
break;
|
||||
}
|
||||
spr2idx++;
|
||||
spr2idx = kart2spr2[j][1];
|
||||
spr2frames[spr2idx].frames[spr2frames[spr2idx].numframes++] = i;
|
||||
}
|
||||
}
|
||||
if (spr2idx == SPR2_KART) // excess frame?
|
||||
spr2frames[spr2idx].frames[spr2frames[spr2idx].numframes++] = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
framename += 16;
|
||||
if (strlen(framename) < 9 || !((super = !memcmp(framename, "SUPER", 5)) || !memcmp(framename, "SPR2_", 5)))
|
||||
continue;
|
||||
|
||||
name = framename + 5;
|
||||
// Oh look
|
||||
interpolate = !memcmp(framename + 9, MODEL_INTERPOLATION_FLAG, 2);
|
||||
framechars = framename + (interpolate ? 11 : 9);
|
||||
|
||||
for (spr2idx = 0; spr2idx < free_spr2; spr2idx++)
|
||||
if (!memcmp(spr2names[spr2idx], name, 4))
|
||||
break;
|
||||
if (spr2idx == free_spr2)
|
||||
continue; // not found
|
||||
|
||||
if (!spr2frames)
|
||||
spr2frames = (modelspr2frames_t*)Z_Calloc(sizeof(modelspr2frames_t)*NUMPLAYERSPRITES*2, PU_STATIC, NULL);
|
||||
if (super)
|
||||
spr2idx |= FF_SPR2SUPER;
|
||||
|
||||
if (framechars[0])
|
||||
{
|
||||
frame = atoi(framechars);
|
||||
if (spr2frames[spr2idx].numframes < frame+1)
|
||||
spr2frames[spr2idx].numframes = frame+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame = spr2frames[spr2idx].numframes;
|
||||
spr2frames[spr2idx].numframes++;
|
||||
}
|
||||
spr2frames[spr2idx].frames[frame] = i;
|
||||
spr2frames[spr2idx].interpolate = interpolate;
|
||||
}
|
||||
|
||||
if (model->spr2frames)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,13 @@ typedef struct
|
|||
boolean interpolate;
|
||||
} modelspr2frames_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MODELTYPE_SPRITE,
|
||||
MODELTYPE_PLAYER, // this model uses sprite2!
|
||||
MODELTYPE_OLDPLAYER, // regular sprite translated to sprite2
|
||||
} modeltype_t;
|
||||
|
||||
typedef struct model_s
|
||||
{
|
||||
int maxNumFrames;
|
||||
|
|
@ -104,9 +111,10 @@ typedef struct model_s
|
|||
|
||||
char *mdlFilename;
|
||||
boolean unloaded;
|
||||
modeltype_t modeltype;
|
||||
|
||||
char *framenames;
|
||||
boolean interpolate[256];
|
||||
UINT8 interpolate[256];
|
||||
modelspr2frames_t *spr2frames;
|
||||
|
||||
// the max_s and max_t values that the uvs are currently adjusted to
|
||||
|
|
@ -125,11 +133,11 @@ extern model_t *modelHead;
|
|||
void HWR_ReloadModels(void);
|
||||
|
||||
tag_t *GetTagByName(model_t *model, char *name, int frame);
|
||||
model_t *LoadModel(const char *filename, int ztag);
|
||||
model_t *LoadModel(const char *filename, int ztag, modeltype_t modeltype);
|
||||
void UnloadModel(model_t *model);
|
||||
void Optimize(model_t *model);
|
||||
void LoadModelInterpolationSettings(model_t *model);
|
||||
void LoadModelSprite2(model_t *model);
|
||||
void LoadModelSprite2(model_t *model, modeltype_t modeltype);
|
||||
void GenerateVertexNormals(model_t *model);
|
||||
void GeneratePolygonNormals(model_t *model, int ztag);
|
||||
void CreateVBOTiny(mesh_t *mesh, tinyframe_t *frame);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2005 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2020 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2020 by James R.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -922,7 +922,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
|
||||
// Handles key input and string input
|
||||
//
|
||||
static inline boolean HU_keyInChatString(char *s, char ch)
|
||||
/*static inline boolean HU_keyInChatString(char *s, char ch)
|
||||
{
|
||||
size_t l;
|
||||
|
||||
|
|
@ -983,7 +983,7 @@ static inline boolean HU_keyInChatString(char *s, char ch)
|
|||
return false; // did not eat key
|
||||
|
||||
return true; // ate the key
|
||||
}
|
||||
}*/
|
||||
|
||||
//
|
||||
//
|
||||
|
|
@ -2142,7 +2142,6 @@ void HU_Drawer(void)
|
|||
if (!( Playing() || demo.playback )
|
||||
|| gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE
|
||||
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
||||
|| gamestate == GS_GAMEEND
|
||||
|| gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS
|
||||
|| gamestate == GS_BLANCREDITS
|
||||
) // SRB2kart
|
||||
|
|
@ -2310,14 +2309,27 @@ Ping_gfx_color (int lag)
|
|||
return SKINCOLOR_MAGENTA;
|
||||
}
|
||||
|
||||
static int
|
||||
PL_gfx_color (int pl)
|
||||
{
|
||||
if (pl <= 2)
|
||||
return 72;
|
||||
else if (pl <= 4)
|
||||
return 54;
|
||||
else if (pl <= 6)
|
||||
return 35;
|
||||
else
|
||||
return 181;
|
||||
}
|
||||
|
||||
static const UINT8 *
|
||||
Ping_gfx_colormap (UINT32 lag, boolean gentleman)
|
||||
Ping_gfx_colormap (UINT32 ping, boolean gentleman)
|
||||
{
|
||||
const UINT8 *colormap = NULL;
|
||||
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, Ping_gfx_color(lag), GTC_CACHE);
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, Ping_gfx_color(ping), GTC_CACHE);
|
||||
|
||||
if (servermaxping && lag > servermaxping && hu_tick < 4)
|
||||
if (servermaxping && ping > servermaxping && hu_tick < 4)
|
||||
{
|
||||
// flash ping red if too high
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_RASPBERRY, GTC_CACHE);
|
||||
|
|
@ -2330,41 +2342,52 @@ Ping_gfx_colormap (UINT32 lag, boolean gentleman)
|
|||
return colormap;
|
||||
}
|
||||
|
||||
//
|
||||
// HU_drawPing
|
||||
//
|
||||
void HU_drawPing(INT32 x, INT32 y, UINT32 lag, INT32 flags, boolean offline)
|
||||
static UINT32
|
||||
Ping_conversion (UINT32 lag)
|
||||
{
|
||||
INT32 measureid = cv_pingmeasurement.value ? 1 : 0;
|
||||
INT32 gfxnum; // gfx to draw
|
||||
boolean drawlocal = (offline && cv_mindelay.value && lag <= (tic_t)cv_mindelay.value);
|
||||
|
||||
if (!server && lag <= (tic_t)cv_mindelay.value)
|
||||
{
|
||||
lag = cv_mindelay.value;
|
||||
drawlocal = true;
|
||||
}
|
||||
|
||||
gfxnum = Ping_gfx_num(lag);
|
||||
|
||||
if (measureid == 1)
|
||||
V_DrawScaledPatch(x+11 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]);
|
||||
|
||||
V_DrawScaledPatch(x+2, y, flags, pinggfx[gfxnum]);
|
||||
|
||||
if (cv_pingmeasurement.value)
|
||||
{
|
||||
lag = (INT32)(lag * (1000.00f / TICRATE));
|
||||
}
|
||||
|
||||
x = V_DrawPingNum(x + (measureid == 1 ? 11 - pingmeasure[measureid]->width : 10), y+9, flags, lag, Ping_gfx_colormap(lag,drawlocal));
|
||||
return lag;
|
||||
}
|
||||
|
||||
//
|
||||
// HU_drawPing
|
||||
//
|
||||
void HU_drawPing(INT32 x, INT32 y, UINT32 ping, UINT32 mindelay, UINT32 pl, INT32 flags)
|
||||
{
|
||||
INT32 measureid = cv_pingmeasurement.value ? 1 : 0;
|
||||
INT32 gfxnum; // gfx to draw
|
||||
UINT32 lag = max(ping, mindelay);
|
||||
|
||||
gfxnum = Ping_gfx_num(ping);
|
||||
|
||||
if (pl)
|
||||
{
|
||||
V_DrawFill(
|
||||
-pinggfx[gfxnum]->leftoffset + x + 2 - 1,
|
||||
-pinggfx[gfxnum]->topoffset + y - 1,
|
||||
pinggfx[gfxnum]->width + 2,
|
||||
pinggfx[gfxnum]->height + 2,
|
||||
PL_gfx_color(pl) | flags
|
||||
);
|
||||
}
|
||||
|
||||
if (measureid == 1)
|
||||
V_DrawScaledPatch(x+11 - pingmeasure[measureid]->width, y+11, flags, pingmeasure[measureid]);
|
||||
|
||||
V_DrawScaledPatch(x+2, y, flags, pinggfx[gfxnum]);
|
||||
|
||||
x = V_DrawPingNum(x + (measureid == 1 ? 11 - pingmeasure[measureid]->width : 10), y+11, flags, Ping_conversion(lag), Ping_gfx_colormap(ping, ping <= lag));
|
||||
|
||||
if (measureid == 0)
|
||||
V_DrawScaledPatch(x+1 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]);
|
||||
V_DrawScaledPatch(x+1 - pingmeasure[measureid]->width, y+11, flags, pingmeasure[measureid]);
|
||||
}
|
||||
|
||||
void
|
||||
HU_drawMiniPing (INT32 x, INT32 y, UINT32 lag, INT32 flags)
|
||||
HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, UINT32 lag, INT32 flags)
|
||||
{
|
||||
patch_t *patch;
|
||||
INT32 w = BASEVIDWIDTH;
|
||||
|
|
@ -2377,16 +2400,10 @@ HU_drawMiniPing (INT32 x, INT32 y, UINT32 lag, INT32 flags)
|
|||
w /= 2;
|
||||
}
|
||||
|
||||
// This looks kinda dumb, but basically:
|
||||
// Servers with mindelay set modify the ping table.
|
||||
// Clients with mindelay unset don't, because they can't.
|
||||
// Both are affected by mindelay, but a client's lag value is pre-adjustment.
|
||||
if (server && cv_mindelay.value && (tic_t)cv_mindelay.value <= lag)
|
||||
patch = pinglocal[1];
|
||||
else if (!server && cv_mindelay.value && (tic_t)cv_mindelay.value >= lag)
|
||||
patch = pinglocal[1];
|
||||
if (ping <= lag)
|
||||
patch = pinglocal[1]; // stone shoe
|
||||
else
|
||||
patch = mping[Ping_gfx_num(lag)];
|
||||
patch = mping[Ping_gfx_num(ping)];
|
||||
|
||||
if (( flags & V_SNAPTORIGHT ))
|
||||
x += ( w - SHORT (patch->width) );
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -132,8 +132,8 @@ void HU_Drawer(void);
|
|||
char HU_dequeueChatChar(void);
|
||||
void HU_Erase(void);
|
||||
void HU_clearChatChars(void);
|
||||
void HU_drawPing(INT32 x, INT32 y, UINT32 ping, INT32 flags, boolean offline); // Lat': Ping drawer for scoreboard.
|
||||
void HU_drawMiniPing(INT32 x, INT32 y, UINT32 ping, INT32 flags);
|
||||
void HU_drawPing(INT32 x, INT32 y, UINT32 ping, UINT32 mindelay, UINT32 pl, INT32 flags);
|
||||
void HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, UINT32 lag, INT32 flags);
|
||||
|
||||
INT32 HU_CreateTeamScoresTbl(playersort_t *tab, UINT32 dmtotals[]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2020 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2020 by Sonic Team Junior.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2020 by James R.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
@ -220,8 +220,9 @@ void P_ResetData(INT32 flags)
|
|||
if (init)
|
||||
{
|
||||
memset(menudefs, 0, sizeof(menudefs));
|
||||
M_InitMenuPresTables();
|
||||
for (i = 0; i < MAXMENUTYPES; i++)
|
||||
menudefs[i].drawroutine = M_DrawGenericMenu;
|
||||
menudefs[i].drawroutine = MD_DrawGenericMenu;
|
||||
|
||||
nummenutypes = MN_FIRSTFREESLOT;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
|
|
|
|||
|
|
@ -42,10 +42,7 @@ _(OP_GAMEHUD)
|
|||
_(OP_OFFSET)
|
||||
|
||||
_(OP_CAMERA)
|
||||
_(OP_P1CAMERA)
|
||||
_(OP_P2CAMERA)
|
||||
_(OP_P3CAMERA)
|
||||
_(OP_P4CAMERA)
|
||||
_(OP_CAMERASETUP)
|
||||
|
||||
_(OP_GAME)
|
||||
_(OP_BLANKARTGAME)
|
||||
|
|
@ -72,13 +69,12 @@ _(SP_LEVELSTATS)
|
|||
_(SR_UNLOCKCHECKLIST)
|
||||
_(MISC_REPLAYHUT)
|
||||
_(MISC_REPLAYSTART)
|
||||
_(SR_PANDORA)
|
||||
_(SR_EMBLEMHINT)
|
||||
|
||||
// Addons (Part of MISC, but let's make it our own)
|
||||
_(AD_MAIN)
|
||||
|
||||
// MISC
|
||||
_(VIEWSERVER)
|
||||
_(HELP)
|
||||
_(SPAUSE)
|
||||
_(MPAUSE)
|
||||
|
|
|
|||
|
|
@ -843,9 +843,6 @@ _(requst)
|
|||
_(syfail)
|
||||
_(itfree)
|
||||
_(dbgsal)
|
||||
_(typri1)
|
||||
_(typri2)
|
||||
_(eggspr)
|
||||
|
||||
// Chaining Sound
|
||||
_(bstchn)
|
||||
|
|
@ -853,6 +850,9 @@ _(bstchn)
|
|||
// Low Ring Sound
|
||||
_(ringlw)
|
||||
|
||||
// Flip Over Sound
|
||||
_(flipos)
|
||||
|
||||
// Shout message sound effect
|
||||
_(sysmsg)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2 KART
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2018-2020 by Sean "Sryder" Ryder
|
||||
// Copyright (C) 2018-2020 by Kart Krew
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SONIC ROBO BLAST 2 KART
|
||||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2018-2020 by Sean "Sryder" Ryder
|
||||
// Copyright (C) 2018-2020 by Kart Krew
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue