Update hw_main.c

This commit is contained in:
Jaime Passos 2019-11-05 12:31:50 -03:00
parent 5ebb90cdd6
commit 044d3fd325

View file

@ -6999,7 +6999,7 @@ static char wipelumpname[9];
static lumpnum_t wipelumpnum; static lumpnum_t wipelumpnum;
// puts wipe lumpname in wipename[9] // puts wipe lumpname in wipename[9]
static boolean check_wipe(UINT8 wipenum, UINT8 scrnnum) static boolean HWR_WipeCheck(UINT8 wipenum, UINT8 scrnnum)
{ {
size_t lsize; size_t lsize;
@ -7030,7 +7030,7 @@ static boolean check_wipe(UINT8 wipenum, UINT8 scrnnum)
void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum) void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum)
{ {
if (!check_wipe(wipenum, scrnnum)) if (!HWR_WipeCheck(wipenum, scrnnum))
return; return;
HWR_GetFadeMask(wipelumpnum); HWR_GetFadeMask(wipelumpnum);
@ -7043,20 +7043,13 @@ void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum)
void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum) void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum)
{ {
if (!check_wipe(wipenum, scrnnum)) // It does the same thing
return; HWR_DoWipe(wipenum, scrnnum);
HWR_GetFadeMask(wipelumpnum);
HWD.pfnDoScreenWipe(HWRWipeCounter);
HWRWipeCounter += 0.05f; // increase opacity of end screen
if (HWRWipeCounter > 1.0f)
HWRWipeCounter = 1.0f;
} }
void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill) void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill)
{ {
if (!check_wipe(wipenum, scrnnum)) if (!HWR_WipeCheck(wipenum, scrnnum))
return; return;
HWR_EndScreenWipe(); HWR_EndScreenWipe();