mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
fix RA fade
This commit is contained in:
parent
aabddd69f1
commit
e850d42bc2
5 changed files with 34 additions and 2 deletions
19
src/g_game.c
19
src/g_game.c
|
@ -172,6 +172,7 @@ mapheader_t* mapheaderinfo[NUMMAPS] = {NULL};
|
|||
|
||||
static boolean exitgame = false;
|
||||
static boolean retrying = false;
|
||||
static boolean retryingmodeattack = false;
|
||||
|
||||
UINT8 stagefailed; // Used for GEMS BONUS? Also to see if you beat the stage.
|
||||
|
||||
|
@ -2015,7 +2016,7 @@ boolean G_Responder(event_t *ev)
|
|||
pausedelay = 1+(NEWTICRATE/2);
|
||||
else if (++pausedelay > 1+(NEWTICRATE/2)+(NEWTICRATE/3))
|
||||
{
|
||||
G_SetRetryFlag();
|
||||
G_SetModeAttackRetryFlag();
|
||||
return true;
|
||||
}
|
||||
pausedelay++; // counteract subsequent subtraction this frame
|
||||
|
@ -6925,6 +6926,22 @@ boolean G_GetRetryFlag(void)
|
|||
return retrying;
|
||||
}
|
||||
|
||||
void G_SetModeAttackRetryFlag(void)
|
||||
{
|
||||
retryingmodeattack = true;
|
||||
G_SetRetryFlag();
|
||||
}
|
||||
|
||||
void G_ClearModeAttackRetryFlag(void)
|
||||
{
|
||||
retryingmodeattack = false;
|
||||
}
|
||||
|
||||
boolean G_GetModeAttackRetryFlag(void)
|
||||
{
|
||||
return retryingmodeattack;
|
||||
}
|
||||
|
||||
// Time utility functions
|
||||
INT32 G_TicsToHours(tic_t tics)
|
||||
{
|
||||
|
|
|
@ -225,10 +225,14 @@ void G_AddPlayer(INT32 playernum);
|
|||
void G_SetExitGameFlag(void);
|
||||
void G_ClearExitGameFlag(void);
|
||||
boolean G_GetExitGameFlag(void);
|
||||
|
||||
void G_SetRetryFlag(void);
|
||||
void G_ClearRetryFlag(void);
|
||||
boolean G_GetRetryFlag(void);
|
||||
|
||||
void G_SetModeAttackRetryFlag(void);
|
||||
void G_ClearModeAttackRetryFlag(void);
|
||||
boolean G_GetModeAttackRetryFlag(void);
|
||||
|
||||
void G_LoadGameData(void);
|
||||
void G_LoadGameSettings(void);
|
||||
|
|
|
@ -3535,6 +3535,7 @@ void M_StartControlPanel(void)
|
|||
|
||||
void M_EndModeAttackRun(void)
|
||||
{
|
||||
G_ClearModeAttackRetryFlag();
|
||||
M_ModeAttackEndGame(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -2757,6 +2757,13 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
ranspecialwipe = 1;
|
||||
}
|
||||
|
||||
if (G_GetModeAttackRetryFlag())
|
||||
{
|
||||
if (modeattacking)
|
||||
wipestyleflags |= (WSF_FADEOUT|WSF_TOWHITE);
|
||||
G_ClearModeAttackRetryFlag();
|
||||
}
|
||||
|
||||
// Make sure all sounds are stopped before Z_FreeTags.
|
||||
S_StopSounds();
|
||||
S_ClearSfx();
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "v_video.h"
|
||||
#include "st_stuff.h"
|
||||
#include "hu_stuff.h"
|
||||
#include "f_finale.h"
|
||||
#include "r_draw.h"
|
||||
#include "console.h"
|
||||
|
||||
|
@ -1861,7 +1862,9 @@ void V_DrawFadeScreen(UINT16 color, UINT8 strength)
|
|||
|
||||
{
|
||||
const UINT8 *fadetable = ((color & 0xFF00) // Color is not palette index?
|
||||
? ((UINT8 *)colormaps + strength*256) // Do COLORMAP fade.
|
||||
? ((UINT8 *)(((color & 0x0F00) == 0x0A00) ? fadecolormap // Do fadecolormap fade.
|
||||
: (((color & 0x0F00) == 0x0B00) ? fadecolormap + (256 * FADECOLORMAPROWS) // Do white fadecolormap fade.
|
||||
: colormaps)) + strength*256) // Do COLORMAP fade.
|
||||
: ((UINT8 *)transtables + ((9-strength)<<FF_TRANSSHIFT) + color*256)); // Else, do TRANSMAP** fade.
|
||||
const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height;
|
||||
UINT8 *buf = screens[0];
|
||||
|
|
Loading…
Reference in a new issue