mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-musicfuncs
# Conflicts: # src/dehacked.c
This commit is contained in:
commit
d9bc621d17
15 changed files with 57 additions and 18 deletions
|
@ -232,7 +232,7 @@ set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL
|
|||
set(SRB2_CONFIG_HAVE_OPENMPT ON CACHE BOOL
|
||||
"Enable OpenMPT support.")
|
||||
set(SRB2_CONFIG_HAVE_CURL ON CACHE BOOL
|
||||
"Enable curl support, used for downloading files via HTTP.")
|
||||
"Enable curl support.")
|
||||
set(SRB2_CONFIG_HAVE_THREADS ON CACHE BOOL
|
||||
"Enable multithreading support.")
|
||||
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||
|
@ -458,7 +458,7 @@ endif()
|
|||
if(${SRB2_CONFIG_HAVE_CURL})
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
set(CURL_FOUND ON)
|
||||
set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/curl)
|
||||
set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/curl/include)
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
set(CURL_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/curl/lib64 -lcurl")
|
||||
else() # 32-bit
|
||||
|
@ -552,6 +552,7 @@ if(${SRB2_CONFIG_USEASM})
|
|||
endif()
|
||||
set(SRB2_USEASM ON)
|
||||
add_definitions(-DUSEASM)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mfpmath=sse")
|
||||
else()
|
||||
set(SRB2_USEASM OFF)
|
||||
add_definitions(-DNONX86 -DNORUSEASM)
|
||||
|
|
|
@ -277,7 +277,7 @@ OPTS += -DCOMPVERSION
|
|||
|
||||
ifndef NONX86
|
||||
ifndef GCC29
|
||||
ARCHOPTS?=-march=pentium
|
||||
ARCHOPTS?=-msse3 -mfpmath=sse
|
||||
else
|
||||
ARCHOPTS?=-mpentium
|
||||
endif
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "lua_script.h"
|
||||
#include "lua_hook.h"
|
||||
#include "d_clisrv.h"
|
||||
#include "g_state.h" // gamestate_t (for lua)
|
||||
|
||||
#include "m_cond.h"
|
||||
|
||||
|
@ -5179,6 +5180,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_TAILSOVERLAY_PAIN",
|
||||
"S_TAILSOVERLAY_GASP",
|
||||
"S_TAILSOVERLAY_EDGE",
|
||||
"S_TAILSOVERLAY_DASH",
|
||||
|
||||
// [:
|
||||
"S_JETFUMEFLASH",
|
||||
|
@ -10122,6 +10124,22 @@ struct {
|
|||
{"MU_MOD_EX", MU_MOD_EX},
|
||||
{"MU_MID_EX", MU_MID_EX},
|
||||
|
||||
// gamestates
|
||||
{"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_ENDING",GS_ENDING},
|
||||
{"GS_CUTSCENE",GS_CUTSCENE},
|
||||
{"GS_DEDICATEDSERVER",GS_DEDICATEDSERVER},
|
||||
{"GS_WAITINGPLAYERS",GS_WAITINGPLAYERS},
|
||||
|
||||
{NULL,0}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -584,6 +584,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
|
|||
"TAL9",
|
||||
"TALA",
|
||||
"TALB",
|
||||
"TALC",
|
||||
|
||||
"CNT1",
|
||||
"CNT2",
|
||||
|
@ -661,6 +662,7 @@ playersprite_t spr2defaults[NUMPLAYERSPRITES] = {
|
|||
SPR2_TAL0, // SPR2_TAL9,
|
||||
SPR2_TAL9, // SPR2_TALA,
|
||||
SPR2_TAL0, // SPR2_TALB,
|
||||
SPR2_TAL6, // SPR2_TALC,
|
||||
|
||||
SPR2_WAIT, // SPR2_CNT1,
|
||||
SPR2_FALL, // SPR2_CNT2,
|
||||
|
@ -801,6 +803,7 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_TAL9|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_PAIN}, // S_TAILSOVERLAY_PAIN
|
||||
{SPR_PLAY, SPR2_TALA|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_GASP}, // S_TAILSOVERLAY_GASP
|
||||
{SPR_PLAY, SPR2_TALB , 35, {NULL}, 0, 0, S_TAILSOVERLAY_EDGE}, // S_TAILSOVERLAY_EDGE
|
||||
{SPR_PLAY, SPR2_TALC|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_DASH}, // S_TAILSOVERLAY_DASH
|
||||
|
||||
// [:
|
||||
{SPR_JETF, 3|FF_ANIMATE|FF_FULLBRIGHT, 2, {NULL}, 1, 1, S_JETFUME1}, // S_JETFUMEFLASH
|
||||
|
|
|
@ -856,6 +856,7 @@ typedef enum playersprite
|
|||
SPR2_TAL9,
|
||||
SPR2_TALA,
|
||||
SPR2_TALB,
|
||||
SPR2_TALC,
|
||||
|
||||
SPR2_CNT1, // continue disappointment
|
||||
SPR2_CNT2, // continue lift
|
||||
|
@ -997,6 +998,7 @@ typedef enum state
|
|||
S_TAILSOVERLAY_PAIN,
|
||||
S_TAILSOVERLAY_GASP,
|
||||
S_TAILSOVERLAY_EDGE,
|
||||
S_TAILSOVERLAY_DASH,
|
||||
|
||||
// [:
|
||||
S_JETFUMEFLASH,
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "lua_hook.h"
|
||||
|
||||
#include "doomstat.h"
|
||||
#include "g_state.h"
|
||||
|
||||
lua_State *gL = NULL;
|
||||
|
||||
|
@ -361,6 +362,9 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
|||
} else if (fastcmp(word, "token")) {
|
||||
lua_pushinteger(L, token);
|
||||
return 1;
|
||||
} else if (fastcmp(word, "gamestate")) {
|
||||
lua_pushinteger(L, gamestate);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1440,14 +1440,21 @@ void Command_Writethings_f(void)
|
|||
|
||||
void Command_ObjectPlace_f(void)
|
||||
{
|
||||
size_t thingarg;
|
||||
size_t silent;
|
||||
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
REQUIRE_NOULTIMATE;
|
||||
|
||||
G_SetGameModified(multiplayer);
|
||||
|
||||
silent = COM_CheckParm("-silent");
|
||||
|
||||
thingarg = 2 - ( silent != 1 );
|
||||
|
||||
// Entering objectplace?
|
||||
if (!objectplacing || COM_Argc() > 1)
|
||||
if (!objectplacing || thingarg < COM_Argc())
|
||||
{
|
||||
if (!objectplacing)
|
||||
{
|
||||
|
@ -1456,7 +1463,7 @@ void Command_ObjectPlace_f(void)
|
|||
if (players[0].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
return;
|
||||
|
||||
if (!COM_CheckParm("-silent"))
|
||||
if (! silent)
|
||||
{
|
||||
HU_SetCEchoFlags(V_RETURN8|V_MONOSPACE|V_AUTOFADEOUT);
|
||||
HU_SetCEchoDuration(10);
|
||||
|
@ -1507,9 +1514,9 @@ void Command_ObjectPlace_f(void)
|
|||
op_oldstate = (statenum_t)(players[0].mo->state-states);
|
||||
}
|
||||
|
||||
if (COM_Argc() > 1)
|
||||
if (thingarg < COM_Argc())
|
||||
{
|
||||
UINT16 mapthingnum = atoi(COM_Argv(1));
|
||||
UINT16 mapthingnum = atoi(COM_Argv(thingarg));
|
||||
mobjtype_t type = P_GetMobjtype(mapthingnum);
|
||||
if (type == MT_UNKNOWN)
|
||||
CONS_Printf(M_GetText("No mobj type delegated to thing type %d.\n"), mapthingnum);
|
||||
|
|
|
@ -8246,7 +8246,7 @@ static void M_CacheLoadGameData(void)
|
|||
|
||||
static void M_DrawLoadGameData(void)
|
||||
{
|
||||
INT32 i, savetodraw, x, y, hsep = 90;
|
||||
INT32 i, prev_i = 1, savetodraw, x, y, hsep = 90;
|
||||
skin_t *charskin = NULL;
|
||||
|
||||
if (vid.width != BASEVIDWIDTH*vid.dupx)
|
||||
|
@ -8255,8 +8255,9 @@ static void M_DrawLoadGameData(void)
|
|||
if (needpatchrecache)
|
||||
M_CacheLoadGameData();
|
||||
|
||||
for (i = -2; i <= 2; i++)
|
||||
for (i = 2; prev_i; i = -(i + ((UINT32)i >> 31))) // draws from outwards in; 2, -2, 1, -1, 0
|
||||
{
|
||||
prev_i = i;
|
||||
savetodraw = (saveSlotSelected + i + numsaves)%numsaves;
|
||||
x = (BASEVIDWIDTH/2 - 42 + loadgamescroll) + (i*hsep);
|
||||
y = 33 + 9;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2401,6 +2401,10 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype
|
|||
seg->angle = R_PointToAngle2(v1->x, v1->y, v2->x, v2->y);
|
||||
if (seg->linedef)
|
||||
segs[i].offset = FixedHypot(v1->x - seg->linedef->v1->x, v1->y - seg->linedef->v1->y);
|
||||
seg->length = P_SegLength(seg);
|
||||
#ifdef HWRENDER
|
||||
seg->flength = (rendermode == render_opengl) ? P_SegLengthFloat(seg) : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -2029,6 +2029,7 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
|
|||
ghost->colorized = mobj->colorized; // alternatively, "true" for sonic advance style colourisation
|
||||
|
||||
ghost->angle = (mobj->player ? mobj->player->drawangle : mobj->angle);
|
||||
ghost->rollangle = mobj->rollangle;
|
||||
ghost->sprite = mobj->sprite;
|
||||
ghost->sprite2 = mobj->sprite2;
|
||||
ghost->frame = mobj->frame;
|
||||
|
@ -11206,6 +11207,8 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
chosenstate = S_TAILSOVERLAY_GASP;
|
||||
else if (player->mo->state-states == S_PLAY_EDGE)
|
||||
chosenstate = S_TAILSOVERLAY_EDGE;
|
||||
else if (player->panim == PA_DASH)
|
||||
chosenstate = S_TAILSOVERLAY_DASH;
|
||||
else if (player->panim == PA_RUN)
|
||||
chosenstate = S_TAILSOVERLAY_RUN;
|
||||
else if (player->panim == PA_WALK)
|
||||
|
|
|
@ -272,7 +272,7 @@ if(${SDL2_FOUND})
|
|||
endif()
|
||||
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE
|
||||
-DDDIRECTFULLSCREEN -DHAVE_SDL
|
||||
-DDIRECTFULLSCREEN -DHAVE_SDL
|
||||
)
|
||||
|
||||
## strip debug symbols into separate file when using gcc.
|
||||
|
|
Loading…
Reference in a new issue