Add full ("secret"/MKDS) credits
This commit is contained in:
parent
a67cd7ff02
commit
832d31d4bc
16 changed files with 1684 additions and 9 deletions
|
|
@ -12,6 +12,7 @@ deh_lua.c
|
|||
deh_tables.c
|
||||
z_zone.c
|
||||
f_finale.c
|
||||
f_dscredits.cpp
|
||||
f_wipe.c
|
||||
g_demo.c
|
||||
g_game.c
|
||||
|
|
|
|||
|
|
@ -1630,7 +1630,7 @@ void CON_Drawer(void)
|
|||
if (con_curlines > 0)
|
||||
CON_DrawConsole();
|
||||
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS || gamestate == GS_BLANCREDITS
|
||||
|| gamestate == GS_VOTING || gamestate == GS_EVALUATION || gamestate == GS_WAITINGPLAYERS)
|
||||
|| gamestate == GS_SECRETCREDITS || gamestate == GS_VOTING || gamestate == GS_EVALUATION || gamestate == GS_WAITINGPLAYERS)
|
||||
CON_DrawHudlines();
|
||||
|
||||
Unlock_state();
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "console.h"
|
||||
#include "d_net.h"
|
||||
#include "f_finale.h"
|
||||
#include "f_dscredits.hpp"
|
||||
#include "g_game.h"
|
||||
#include "hu_stuff.h"
|
||||
#include "m_emotes.h"
|
||||
|
|
@ -87,7 +88,7 @@
|
|||
#define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291
|
||||
#define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b
|
||||
#define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9
|
||||
#define ASSET_HASH_MAIN_PK3 0x492465f56dce7a0c
|
||||
#define ASSET_HASH_MAIN_PK3 0x0cbfdd972b69f6ef
|
||||
#define ASSET_HASH_MAPPATCH_PK3 0x3a82d44f1514d7f1
|
||||
#define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461
|
||||
#ifdef USE_PATCH_FILE
|
||||
|
|
@ -582,6 +583,12 @@ static void D_Display(void)
|
|||
HU_Drawer();
|
||||
break;
|
||||
|
||||
case GS_SECRETCREDITS:
|
||||
F_SecretCreditsDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
case GS_WAITINGPLAYERS:
|
||||
// The clientconnect drawer is independent...
|
||||
if (netgame)
|
||||
|
|
|
|||
|
|
@ -5585,7 +5585,7 @@ static void Command_ExitLevel_f(void)
|
|||
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||
else if (!(server || (IsPlayerAdmin(consoleplayer))))
|
||||
CONS_Printf(M_GetText("Only the server or a remote admin can use this.\n"));
|
||||
else if (( gamestate != GS_LEVEL && gamestate != GS_CREDITS && gamestate != GS_BLANCREDITS ) || demo.playback)
|
||||
else if (( gamestate != GS_LEVEL && gamestate != GS_CREDITS && gamestate != GS_BLANCREDITS && gamestate != GS_SECRETCREDITS ) || demo.playback)
|
||||
CONS_Printf(M_GetText("You must be in a level to use this.\n"));
|
||||
else
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
|
|
|
|||
|
|
@ -717,6 +717,7 @@ struct menu_routine_s const MENU_ROUTINES[] = {
|
|||
{ "ERASEDATA", &MR_EraseData },
|
||||
{ "CREDITS", &MR_Credits },
|
||||
{ "BLANCREDITS", &MR_BlanCredits },
|
||||
{ "SECRETCREDITS", &MR_SecretCredits },
|
||||
{ "HANDLEADDONS", &MR_HandleAddons },
|
||||
{ "SELECTABLECLEARMENUS", &MR_SelectableClearMenus },
|
||||
{ "GOBACK", &MR_GoBack },
|
||||
|
|
@ -1418,6 +1419,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"GS_DEDICATEDSERVER",GS_DEDICATEDSERVER},
|
||||
{"GS_WAITINGPLAYERS",GS_WAITINGPLAYERS},
|
||||
{"GS_BLANCREDITS",GS_BLANCREDITS},
|
||||
{"GS_SECRETCREDITS",GS_SECRETCREDITS},
|
||||
|
||||
// Game controls
|
||||
{"GC_NULL",gc_null},
|
||||
|
|
|
|||
|
|
@ -346,6 +346,9 @@ typedef UINT32 lumpnum_t; // 16 : 16 unsigned long (wad num: lump num)
|
|||
typedef UINT32 tic_t;
|
||||
#define INFTICS UINT32_MAX
|
||||
|
||||
typedef UINT64 longtic_t;
|
||||
#define INFLONGTICS UINT64_MAX
|
||||
|
||||
#include "endian.h" // This is needed to make sure the below macro acts correctly in big endian builds
|
||||
|
||||
#ifdef SRB2_BIG_ENDIAN
|
||||
|
|
|
|||
1517
src/f_dscredits.cpp
Normal file
1517
src/f_dscredits.cpp
Normal file
File diff suppressed because it is too large
Load diff
74
src/f_dscredits.hpp
Normal file
74
src/f_dscredits.hpp
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2025 by Vivian "toastergrl" Grannell.
|
||||
// Copyright (C) 2025 by Kart Krew.
|
||||
// Copyright (C) 2025 by "Anonimus".
|
||||
// Copyright (C) 2025 Blankart Team.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file k_dscredits.hpp
|
||||
/// \brief (Mostly) secret MKDS credits :)
|
||||
|
||||
#ifndef __F_DSCREDITS__
|
||||
#define __F_DSCREDITS__
|
||||
|
||||
#include "doomdef.h"
|
||||
#include "m_fixed.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAXDSOBJECTS (MAXPLAYERS + (48 - MAXPLAYERS))
|
||||
#define DSOBJOFFSCREEN 48
|
||||
|
||||
#define FRAMETOSEC (FRACUNIT / TICRATE)
|
||||
|
||||
#define CREDITSDELAY (TICRATE / 2)
|
||||
|
||||
// "Special" players, such as us, our rival, and the various unique characters in Act 2.
|
||||
#define DSUNIQUEPLAYERS 3
|
||||
|
||||
extern longtic_t creditstimings[];
|
||||
|
||||
typedef struct dscredits_s {
|
||||
longtic_t ticker;
|
||||
tic_t delaytoplayer;
|
||||
tic_t delaytobg;
|
||||
UINT16 creditsscene; // "Scene" number of credits, iterated by 1 for each timing.
|
||||
struct dscreditsobj_s
|
||||
{
|
||||
boolean active;
|
||||
boolean player; // Are we a player?
|
||||
UINT16 skin;
|
||||
UINT16 color;
|
||||
patch_t *patch; // Patch.
|
||||
INT32 position[2]; // Position
|
||||
fixed_t scale; // Scale
|
||||
INT32 speed[2]; // Speed
|
||||
|
||||
INT64 movestop; // Stops our movement after
|
||||
INT64 movestart; // Restarts our movement
|
||||
INT32 movestartspd[2]; // Speed to apply on movestart
|
||||
|
||||
UINT8 glance; // They look at one another as they drive
|
||||
boolean spinout; // Spinning out?
|
||||
} creditsobj[MAXDSOBJECTS + DSUNIQUEPLAYERS];
|
||||
|
||||
} dscredits_t;
|
||||
|
||||
extern dscredits_t dscredits;
|
||||
|
||||
extern tic_t dscreditsticks;
|
||||
|
||||
void F_SecretCreditsTicker(void);
|
||||
void F_SecretCreditsDrawer(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __F_DSCREDITS__
|
||||
|
|
@ -875,7 +875,7 @@ boolean F_CreditResponder(event_t *event)
|
|||
// BLANCREDITS
|
||||
// ============
|
||||
|
||||
static const char *blancredits[] = {
|
||||
const char *blancredits[] = {
|
||||
"\1BlanKart",
|
||||
"\1Credits",
|
||||
"",
|
||||
|
|
@ -1009,6 +1009,33 @@ void F_BlanStartCredits(void)
|
|||
timetonext = 2*TICRATE;
|
||||
}
|
||||
|
||||
void F_StartSecretCredits(void)
|
||||
{
|
||||
G_SetGamestate(GS_SECRETCREDITS);
|
||||
|
||||
// Just in case they're open ... somehow
|
||||
M_ClearMenus(true);
|
||||
|
||||
if (creditscutscene)
|
||||
{
|
||||
F_StartCustomCutscene(creditscutscene - 1, false, false);
|
||||
return;
|
||||
}
|
||||
|
||||
gameaction = ga_nothing;
|
||||
paused = false;
|
||||
CON_ToggleOff();
|
||||
S_StopMusic();
|
||||
S_StopSounds();
|
||||
|
||||
//S_ChangeMusicInternal("BLNCDS", true);
|
||||
//S_ShowMusicCredit(0, 5*TICRATE, 0);
|
||||
|
||||
finalecount = 0;
|
||||
animtimer = 0;
|
||||
timetonext = 2*TICRATE;
|
||||
}
|
||||
|
||||
static void F_DrawDiagCubes(void)
|
||||
{
|
||||
INT32 j;
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ void F_StartTitleScreen(void);
|
|||
void F_CacheTitleScreen(void);
|
||||
void F_StartCredits(void);
|
||||
void F_BlanStartCredits(void);
|
||||
void F_StartSecretCredits(void);
|
||||
|
||||
extern INT32 finalecount;
|
||||
extern INT32 titlescrollxspeed;
|
||||
|
|
@ -100,7 +101,7 @@ extern INT16 tty;
|
|||
extern INT16 ttloop;
|
||||
extern UINT16 tttics;
|
||||
extern boolean ttavailable[6];
|
||||
|
||||
extern const char *blancredits[];
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
|
|||
26
src/g_game.c
26
src/g_game.c
|
|
@ -1626,6 +1626,24 @@ boolean G_Responder(event_t *ev)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
else if (gamestate == GS_SECRETCREDITS)
|
||||
{
|
||||
if (HU_Responder(ev))
|
||||
{
|
||||
hu_keystrokes = true;
|
||||
return true; // chat ate the event
|
||||
}
|
||||
|
||||
if (F_CreditResponder(ev))
|
||||
{
|
||||
// Skip credits for everyone
|
||||
if (! netgame)
|
||||
F_StartGameEvaluation();
|
||||
else if (server || IsPlayerAdmin(consoleplayer))
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_EVALUATION)
|
||||
if (HU_Responder(ev))
|
||||
{
|
||||
|
|
@ -2260,6 +2278,12 @@ void G_Ticker(boolean run)
|
|||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_SECRETCREDITS:
|
||||
if (run)
|
||||
F_SecretCreditsTicker();
|
||||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_TITLESCREEN:
|
||||
if (titlemapinaction)
|
||||
P_Ticker(run);
|
||||
|
|
@ -3292,7 +3316,7 @@ void G_FinishExitLevel(void)
|
|||
|
||||
// Don't save demos immediately here! Let standings write first
|
||||
}
|
||||
else if (gamestate == GS_CREDITS || gamestate == GS_BLANCREDITS)
|
||||
else if (gamestate == GS_CREDITS || gamestate == GS_BLANCREDITS || gamestate == GS_SECRETCREDITS)
|
||||
{
|
||||
F_StartGameEvaluation();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ typedef enum
|
|||
|
||||
// New
|
||||
GS_BLANCREDITS, // BlanKart: Credits for BlanKart
|
||||
GS_SECRETCREDITS, // BlanKart: Secret/full credits
|
||||
} gamestate_t;
|
||||
|
||||
typedef enum
|
||||
|
|
|
|||
|
|
@ -2118,7 +2118,7 @@ void HU_Drawer(void)
|
|||
|| gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE
|
||||
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
||||
|| gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS
|
||||
|| gamestate == GS_BLANCREDITS
|
||||
|| gamestate == GS_BLANCREDITS || gamestate == GS_SECRETCREDITS
|
||||
) // SRB2kart
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ _(OP_DISCORD)
|
|||
#endif
|
||||
|
||||
_(OP_CUSTOM)
|
||||
_(OP_EXTRACREDITS)
|
||||
|
||||
// Extras
|
||||
_(SR_MAIN)
|
||||
|
|
|
|||
20
src/m_menu.c
20
src/m_menu.c
|
|
@ -52,6 +52,7 @@
|
|||
#include "p_local.h"
|
||||
#include "p_setup.h"
|
||||
#include "f_finale.h"
|
||||
#include "f_dscredits.hpp" // BlanKart: Secret credits
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h"
|
||||
|
|
@ -1302,7 +1303,7 @@ boolean M_Responder(event_t *ev)
|
|||
if (dedicated || (demo.playback && demo.title)
|
||||
|| gamestate == GS_INTRO || gamestate == GS_CUTSCENE
|
||||
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
||||
|| gamestate == GS_BLANCREDITS
|
||||
|| gamestate == GS_BLANCREDITS || gamestate == GS_SECRETCREDITS
|
||||
)
|
||||
return false;
|
||||
|
||||
|
|
@ -4657,7 +4658,10 @@ INT32 MR_Options(INT32 choice)
|
|||
|
||||
// no credits or data erasing in-game/during replays
|
||||
M_SetItemDisabled(MN_OP_MAIN, "KARTCREDITS", gamecheck);
|
||||
M_SetItemDisabled(MN_OP_MAIN, "BLANCREDITS", gamecheck);
|
||||
M_SetItemDisabled(MN_OP_MAIN, "EXTRAREDITS", gamecheck);
|
||||
//M_SetItemDisabled(MN_OP_MAIN, "BLANCREDITS", gamecheck);
|
||||
//M_SetItemDisabled(MN_OP_MAIN, "SECRETCREDS", gamecheck);
|
||||
|
||||
M_SetItemDisabled(MN_OP_DATA, "ERASE", gamecheck);
|
||||
|
||||
M_SetItemSecret(MN_OP_GAME, "ENCORE", !M_SecretUnlocked(SECRET_ENCORE));
|
||||
|
|
@ -5177,6 +5181,18 @@ INT32 MR_BlanCredits(INT32 choice)
|
|||
return true;
|
||||
}
|
||||
|
||||
INT32 MR_SecretCredits(INT32 choice)
|
||||
{
|
||||
// Reset ticks here before anything else.
|
||||
dscreditsticks = 0;
|
||||
|
||||
(void)choice;
|
||||
cursaveslot = -2;
|
||||
M_ClearMenus(true);
|
||||
F_StartSecretCredits();
|
||||
return true;
|
||||
}
|
||||
|
||||
// ==================
|
||||
// SINGLE PLAYER MENU
|
||||
// ==================
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ INT32 MR_AddonsOptions(INT32 choice);
|
|||
INT32 MR_EraseData(INT32 arg);
|
||||
INT32 MR_Credits(INT32 choice);
|
||||
INT32 MR_BlanCredits(INT32 choice);
|
||||
INT32 MR_SecretCredits(INT32 choice);
|
||||
INT32 MR_HandleAddons(INT32 choice);
|
||||
INT32 MR_SelectableClearMenus(INT32 choice);
|
||||
INT32 MR_GoBack(INT32 choice);
|
||||
|
|
|
|||
Loading…
Reference in a new issue