From 191bd8ec4150dbb15e7585b7142ff03e41f9a4ff Mon Sep 17 00:00:00 2001 From: yellowtd Date: Sat, 11 Mar 2017 19:01:16 -0500 Subject: [PATCH] indentation sucks and so do datatypes --- src/d_main.c | 32 +++++++++++++++----------------- src/doomstat.h | 8 ++++---- src/g_game.c | 13 ++----------- src/p_setup.c | 2 +- 4 files changed, 22 insertions(+), 33 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 7694f6683..3dbcf5bf7 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -483,23 +483,21 @@ static void D_Display(void) if (rendermode != render_none) { // miru: we can use the mapheaderinfo to change the forced wipe the instant the map loads - if (!mapheaderinfo[gamemap-1]->postlevelwipe) - { - F_WipeEndScreen(); - F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); - } - else - { - if (mapheaderinfo[gamemap-1]->postlevelwipe < 100) - { - F_WipeStartScreen(); - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, mapheaderinfo[gamemap-1]->wipecolor); - F_WipeEndScreen(); - F_RunWipe(mapheaderinfo[gamemap-1]->postlevelwipe, gamestate != GS_TIMEATTACK); - } - } - //F_WipeEndScreen(); - //F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); + if (!mapheaderinfo[gamemap-1]->postlevelwipe) + { + F_WipeEndScreen(); + F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); + } + else + { + if (mapheaderinfo[gamemap-1]->postlevelwipe < 100) + { + F_WipeStartScreen(); + V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, mapheaderinfo[gamemap-1]->wipecolor); + F_WipeEndScreen(); + F_RunWipe(mapheaderinfo[gamemap-1]->postlevelwipe, gamestate != GS_TIMEATTACK); + } + } } } diff --git a/src/doomstat.h b/src/doomstat.h index f5bbb692f..e8b59109c 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -248,10 +248,10 @@ typedef struct UINT8 numGradedMares; ///< Internal. For grade support. nightsgrades_t *grades; ///< NiGHTS grades. Allocated dynamically for space reasons. Be careful. - // miru: to use custom mapheaderinfo options, we need to add them to the struct first - INT16 levelwipe; - INT16 postlevelwipe; - INT16 wipecolor; + // miru: to use custom mapheaderinfo options, we need to add them to the struct first + UINT8 levelwipe; + UINT8 postlevelwipe; + UINT8 wipecolor; // Lua stuff. // (This is not ifdeffed so the map header structure can stay identical, just in case.) diff --git a/src/g_game.c b/src/g_game.c index f8034bd24..b148d9801 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1623,17 +1623,8 @@ void G_DoLoadLevel(boolean resetplayer) levelstarttic = gametic; // for time calculation - // miru: postlevelwipe - just in case - if (!mapheaderinfo[gamemap-1]->postlevelwipe) - { - if (wipegamestate == GS_LEVEL) - wipegamestate = -1; // force a wipe - } - else - { - if (wipegamestate == GS_LEVEL) - wipegamestate = -1; // force a wipe - } + if (wipegamestate == GS_LEVEL) + wipegamestate = -1; // force a wipe if (gamestate == GS_INTERMISSION) Y_EndIntermission(); diff --git a/src/p_setup.c b/src/p_setup.c index f8edbd74b..4193f45ed 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -229,7 +229,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i) mapheaderinfo[num]->levelwipe = 0; DEH_WriteUndoline("POSTLEVELWIPE", va("%d", mapheaderinfo[num]->postlevelwipe), UNDO_NONE); mapheaderinfo[num]->postlevelwipe = 0; - DEH_WriteUndoline("WIPECOLOR", va("%d", mapheaderinfo[num]->wipecolor), UNDO_NONE); + DEH_WriteUndoline("WIPECOLOR", va("%d", mapheaderinfo[num]->wipecolor), UNDO_NONE); mapheaderinfo[num]->wipecolor = 31; // TODO grades support for delfile (pfft yeah right)