2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
2020-02-19 22:08:45 +00:00
|
|
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// 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 f_finale.h
|
|
|
|
/// \brief Title screen, intro, game evaluation, and credits.
|
|
|
|
/// Also includes protos for screen wipe functions.
|
|
|
|
|
|
|
|
#ifndef __F_FINALE__
|
|
|
|
#define __F_FINALE__
|
|
|
|
|
|
|
|
#include "doomtype.h"
|
|
|
|
#include "d_event.h"
|
2018-11-03 21:13:44 +00:00
|
|
|
#include "p_mobj.h"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// FINALE
|
|
|
|
//
|
|
|
|
|
|
|
|
// Called by main loop.
|
|
|
|
boolean F_IntroResponder(event_t *ev);
|
|
|
|
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);
|
|
|
|
void F_TitleDemoTicker(void);
|
2018-11-03 14:54:30 +00:00
|
|
|
void F_TextPromptTicker(void);
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
// Called by main loop.
|
2018-11-08 16:26:55 +00:00
|
|
|
void F_GameEndDrawer(void);
|
2014-03-15 16:59:03 +00:00
|
|
|
void F_IntroDrawer(void);
|
|
|
|
void F_TitleScreenDrawer(void);
|
2018-11-25 20:08:12 +00:00
|
|
|
void F_SkyScroll(INT32 scrollxspeed, INT32 scrollyspeed, const char *patchname);
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
void F_GameEvaluationDrawer(void);
|
|
|
|
void F_StartGameEvaluation(void);
|
|
|
|
void F_GameEvaluationTicker(void);
|
|
|
|
|
A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)
Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-27 23:32:57 +00:00
|
|
|
void F_EndingTicker(void);
|
|
|
|
void F_EndingDrawer(void);
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
void F_CreditTicker(void);
|
|
|
|
void F_CreditDrawer(void);
|
|
|
|
|
|
|
|
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer);
|
|
|
|
void F_CutsceneDrawer(void);
|
|
|
|
void F_EndCutScene(void);
|
|
|
|
|
2018-11-03 18:43:19 +00:00
|
|
|
void F_StartTextPrompt(INT32 promptnum, INT32 pagenum, mobj_t *mo, UINT16 postexectag, boolean blockcontrols, boolean freezerealtime);
|
2018-11-13 05:13:36 +00:00
|
|
|
void F_GetPromptPageByNamedTag(const char *tag, INT32 *promptnum, INT32 *pagenum);
|
2018-11-03 14:54:30 +00:00
|
|
|
void F_TextPromptDrawer(void);
|
2018-11-05 03:22:47 +00:00
|
|
|
void F_EndTextPrompt(boolean forceexec, boolean noexec);
|
2018-11-10 06:00:18 +00:00
|
|
|
boolean F_GetPromptHideHudAll(void);
|
|
|
|
boolean F_GetPromptHideHud(fixed_t y);
|
2018-11-03 14:54:30 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
void F_StartGameEnd(void);
|
|
|
|
void F_StartIntro(void);
|
|
|
|
void F_StartTitleScreen(void);
|
A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)
Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-27 23:32:57 +00:00
|
|
|
void F_StartEnding(void);
|
2014-03-15 16:59:03 +00:00
|
|
|
void F_StartCredits(void);
|
|
|
|
|
|
|
|
boolean F_ContinueResponder(event_t *event);
|
|
|
|
void F_StartContinue(void);
|
|
|
|
void F_ContinueTicker(void);
|
|
|
|
void F_ContinueDrawer(void);
|
|
|
|
|
2019-11-14 12:52:34 +00:00
|
|
|
extern INT32 finalecount;
|
2018-11-16 19:34:28 +00:00
|
|
|
extern INT32 titlescrollxspeed;
|
|
|
|
extern INT32 titlescrollyspeed;
|
2017-05-09 10:09:58 +00:00
|
|
|
|
2019-08-13 02:12:20 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2019-11-07 21:42:54 +00:00
|
|
|
TTMODE_NONE = 0,
|
2019-08-13 02:12:20 +00:00
|
|
|
TTMODE_OLD,
|
|
|
|
TTMODE_ALACROIX,
|
|
|
|
TTMODE_USER
|
|
|
|
} ttmode_enum;
|
|
|
|
|
2019-11-03 15:29:42 +00:00
|
|
|
#define TTMAX_ALACROIX 30 // max frames for SONIC typeface, plus one for NULL terminating entry
|
2019-08-13 02:12:20 +00:00
|
|
|
#define TTMAX_USER 100
|
|
|
|
|
|
|
|
extern ttmode_enum ttmode;
|
|
|
|
extern UINT8 ttscale;
|
|
|
|
// ttmode user vars
|
|
|
|
extern char ttname[9];
|
|
|
|
extern INT16 ttx;
|
|
|
|
extern INT16 tty;
|
|
|
|
extern INT16 ttloop;
|
|
|
|
extern UINT16 tttics;
|
2019-11-03 19:20:49 +00:00
|
|
|
extern boolean ttavailable[6];
|
|
|
|
|
2019-08-13 02:12:20 +00:00
|
|
|
|
2017-05-09 10:09:58 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
TITLEMAP_OFF = 0,
|
|
|
|
TITLEMAP_LOADING,
|
|
|
|
TITLEMAP_RUNNING
|
|
|
|
} titlemap_enum;
|
|
|
|
|
2018-11-25 20:08:12 +00:00
|
|
|
// Current menu parameters
|
|
|
|
|
2018-11-18 06:53:18 +00:00
|
|
|
extern mobj_t *titlemapcameraref;
|
2019-08-09 03:44:28 +00:00
|
|
|
extern char curbgname[9];
|
2018-11-25 20:08:12 +00:00
|
|
|
extern SINT8 curfadevalue;
|
|
|
|
extern INT32 curbgcolor;
|
|
|
|
extern INT32 curbgxspeed;
|
|
|
|
extern INT32 curbgyspeed;
|
|
|
|
extern boolean curbghide;
|
2019-08-19 17:43:48 +00:00
|
|
|
extern boolean hidetitlemap;
|
2018-11-25 20:08:12 +00:00
|
|
|
|
2019-08-13 02:12:20 +00:00
|
|
|
extern boolean curhidepics;
|
|
|
|
extern ttmode_enum curttmode;
|
|
|
|
extern UINT8 curttscale;
|
|
|
|
// ttmode user vars
|
|
|
|
extern char curttname[9];
|
|
|
|
extern INT16 curttx;
|
|
|
|
extern INT16 curtty;
|
|
|
|
extern INT16 curttloop;
|
|
|
|
extern UINT16 curtttics;
|
|
|
|
|
2018-11-25 20:08:12 +00:00
|
|
|
#define TITLEBACKGROUNDACTIVE (curfadevalue >= 0 || curbgname[0])
|
|
|
|
|
|
|
|
void F_InitMenuPresValues(void);
|
|
|
|
void F_MenuPresTicker(boolean run);
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// WIPE
|
|
|
|
//
|
2018-11-17 21:32:30 +00:00
|
|
|
// HACK for menu fading while titlemapinaction; skips the level check
|
2018-11-26 00:03:22 +00:00
|
|
|
#define FORCEWIPE -3
|
2018-11-26 00:31:22 +00:00
|
|
|
#define FORCEWIPEOFF -2
|
2018-11-17 21:32:30 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
extern boolean WipeInAction;
|
2019-11-18 14:39:54 +00:00
|
|
|
extern boolean WipeStageTitle;
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2019-09-10 02:31:48 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
WIPESTYLE_NORMAL,
|
2019-12-04 22:25:39 +00:00
|
|
|
WIPESTYLE_COLORMAP
|
2019-09-10 02:31:48 +00:00
|
|
|
} wipestyle_t;
|
|
|
|
extern wipestyle_t wipestyle;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2019-11-22 20:44:42 +00:00
|
|
|
WSF_FADEOUT = 1,
|
|
|
|
WSF_FADEIN = 1<<1,
|
|
|
|
WSF_TOWHITE = 1<<2,
|
|
|
|
WSF_CROSSFADE = 1<<3,
|
2019-09-10 02:31:48 +00:00
|
|
|
} wipestyleflags_t;
|
|
|
|
extern wipestyleflags_t wipestyleflags;
|
|
|
|
|
2019-12-04 22:25:39 +00:00
|
|
|
// Even my function names are borderline
|
|
|
|
boolean F_ShouldColormapFade(void);
|
|
|
|
boolean F_TryColormapFade(UINT8 wipecolor);
|
|
|
|
void F_DecideWipeStyle(void);
|
|
|
|
|
2019-09-10 19:54:40 +00:00
|
|
|
#define FADECOLORMAPDIV 8
|
|
|
|
#define FADECOLORMAPROWS (256/FADECOLORMAPDIV)
|
|
|
|
|
2019-11-05 15:28:01 +00:00
|
|
|
#define FADEREDFACTOR 15
|
|
|
|
#define FADEGREENFACTOR 15
|
2019-09-10 19:54:40 +00:00
|
|
|
#define FADEBLUEFACTOR 10
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
extern INT32 lastwipetic;
|
|
|
|
|
2019-11-18 14:39:54 +00:00
|
|
|
// Don't know where else to place this constant
|
|
|
|
// But this file seems appropriate
|
|
|
|
#define PRELEVELTIME 24 // frames in tics
|
2019-11-15 00:31:20 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
void F_WipeStartScreen(void);
|
|
|
|
void F_WipeEndScreen(void);
|
|
|
|
void F_RunWipe(UINT8 wipetype, boolean drawMenu);
|
2019-11-15 22:36:25 +00:00
|
|
|
void F_WipeStageTitle(void);
|
2019-11-18 23:07:37 +00:00
|
|
|
#define F_WipeColorFill(c) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, c)
|
2018-11-17 21:32:30 +00:00
|
|
|
tic_t F_GetWipeLength(UINT8 wipetype);
|
|
|
|
boolean F_WipeExists(UINT8 wipetype);
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
wipe_credits_intermediate, // makes a good 0 I guess.
|
|
|
|
|
|
|
|
wipe_level_toblack,
|
|
|
|
wipe_intermission_toblack,
|
|
|
|
wipe_continuing_toblack,
|
|
|
|
wipe_titlescreen_toblack,
|
|
|
|
wipe_timeattack_toblack,
|
|
|
|
wipe_credits_toblack,
|
|
|
|
wipe_evaluation_toblack,
|
|
|
|
wipe_gameend_toblack,
|
|
|
|
wipe_intro_toblack,
|
A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)
Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-27 23:32:57 +00:00
|
|
|
wipe_ending_toblack,
|
2014-03-15 16:59:03 +00:00
|
|
|
wipe_cutscene_toblack,
|
|
|
|
|
|
|
|
// custom intermissions
|
|
|
|
wipe_specinter_toblack,
|
|
|
|
wipe_multinter_toblack,
|
2016-01-05 13:03:00 +00:00
|
|
|
wipe_speclevel_towhite,
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
wipe_level_final,
|
|
|
|
wipe_intermission_final,
|
|
|
|
wipe_continuing_final,
|
|
|
|
wipe_titlescreen_final,
|
|
|
|
wipe_timeattack_final,
|
|
|
|
wipe_credits_final,
|
|
|
|
wipe_evaluation_final,
|
|
|
|
wipe_gameend_final,
|
|
|
|
wipe_intro_final,
|
A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)
Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-27 23:32:57 +00:00
|
|
|
wipe_ending_final,
|
2014-03-15 16:59:03 +00:00
|
|
|
wipe_cutscene_final,
|
|
|
|
|
|
|
|
// custom intermissions
|
|
|
|
wipe_specinter_final,
|
|
|
|
wipe_multinter_final,
|
|
|
|
|
A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)
Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-27 23:32:57 +00:00
|
|
|
NUMWIPEDEFS,
|
|
|
|
WIPEFINALSHIFT = (wipe_level_final-wipe_level_toblack)
|
2014-03-15 16:59:03 +00:00
|
|
|
};
|
|
|
|
extern UINT8 wipedefs[NUMWIPEDEFS];
|
|
|
|
|
|
|
|
#endif
|