Skip to content

Commit

Permalink
Refactor|libdoom: Switched wi_stuff.c to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jun 24, 2014
1 parent 4f1fbb1 commit fe3193f
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 105 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/doom/doom.pro
Expand Up @@ -91,7 +91,7 @@ SOURCES += \
src/p_telept.c \
src/st_stuff.c \
src/tables.c \
src/wi_stuff.c
src/wi_stuff.cpp

win32 {
deng_msvc: QMAKE_LFLAGS += /DEF:\"$$PWD/api/doom.def\"
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/doom/include/wi_stuff.h
@@ -1,7 +1,7 @@
/** @file wi_stuff.h DOOM specific intermission screens.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2013 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2003-2014 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 1993-1996 id Software, Inc.
*
* @par License
Expand Down
@@ -1,26 +1,22 @@
/**\file wi_stuff.c
*\section License
* License: GPL
* Online License Link: http://www.gnu.org/licenses/gpl.html
/** @file wi_stuff.cpp DOOM specific intermission screens.
*
*\author Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
*\author Copyright © 2005-2013 Daniel Swanson <danij@dengine.net>
*\author Copyright © 1993-1996 by id Software, Inc.
* @authors Copyright © 2003-2014 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 1993-1996 id Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
* <small>This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA</small>
*/

#include <assert.h>
Expand All @@ -29,6 +25,7 @@
#include <string.h>

#include "jdoom.h"
#include "wi_stuff.h"

#include "hu_stuff.h"
#include "d_net.h"
Expand Down Expand Up @@ -79,73 +76,73 @@ typedef struct teaminfo_s {
} teaminfo_t;

static Point2Raw locations[][NUMMAPS] = {
{ // Episode 0
{ 185, 164 },
{ 148, 143 },
{ 69, 122 },
{ 209, 102 },
{ 116, 89 },
{ 166, 55 },
{ 71, 56 },
{ 135, 29 },
{ 71, 24 }
{ // Episode 0
( 185, 164 ),
( 148, 143 ),
( 69, 122 ),
( 209, 102 ),
( 116, 89 ),
( 166, 55 ),
( 71, 56 ),
( 135, 29 ),
( 71, 24 )
},
{ // Episode 1
{ 254, 25 },
{ 97, 50 },
{ 188, 64 },
{ 128, 78 },
{ 214, 92 },
{ 133, 130 },
{ 208, 136 },
{ 148, 140 },
{ 235, 158 }
{ // Episode 1
( 254, 25 ),
( 97, 50 ),
( 188, 64 ),
( 128, 78 ),
( 214, 92 ),
( 133, 130 ),
( 208, 136 ),
( 148, 140 ),
( 235, 158 )
},
{ // Episode 2
{ 156, 168 },
{ 48, 154 },
{ 174, 95 },
{ 265, 75 },
{ 130, 48 },
{ 279, 23 },
{ 198, 48 },
{ 140, 25 },
{ 281, 136 }
{ // Episode 2
( 156, 168 ),
( 48, 154 ),
( 174, 95 ),
( 265, 75 ),
( 130, 48 ),
( 279, 23 ),
( 198, 48 ),
( 140, 25 ),
( 281, 136 )
}
};

static wianimdef_t episode0AnimDefs[] = {
{ 0, 11, { 224, 104 }, 3, { "wia00000", "wia00001", "wia00002" } },
{ 0, 11, { 184, 160 }, 3, { "wia00100", "wia00101", "wia00102" } },
{ 0, 11, { 112, 136 }, 3, { "wia00200", "wia00201", "wia00202" } },
{ 0, 11, { 72, 112 }, 3, { "wia00300", "wia00301", "wia00302" } },
{ 0, 11, { 88, 96 }, 3, { "wia00400", "wia00401", "wia00402" } },
{ 0, 11, { 64, 48 }, 3, { "wia00500", "wia00501", "wia00502" } },
{ 0, 11, { 192, 40 }, 3, { "wia00600", "wia00601", "wia00602" } },
{ 0, 11, { 136, 16 }, 3, { "wia00700", "wia00701", "wia00702" } },
{ 0, 11, { 80, 16 }, 3, { "wia00800", "wia00801", "wia00802" } },
{ 0, 11, { 64, 24 }, 3, { "wia00900", "wia00901", "wia00902" } }
{ 0, 11, ( 224, 104 ), 3, { "wia00000", "wia00001", "wia00002" } },
{ 0, 11, ( 184, 160 ), 3, { "wia00100", "wia00101", "wia00102" } },
{ 0, 11, ( 112, 136 ), 3, { "wia00200", "wia00201", "wia00202" } },
{ 0, 11, ( 72, 112 ), 3, { "wia00300", "wia00301", "wia00302" } },
{ 0, 11, ( 88, 96 ), 3, { "wia00400", "wia00401", "wia00402" } },
{ 0, 11, ( 64, 48 ), 3, { "wia00500", "wia00501", "wia00502" } },
{ 0, 11, ( 192, 40 ), 3, { "wia00600", "wia00601", "wia00602" } },
{ 0, 11, ( 136, 16 ), 3, { "wia00700", "wia00701", "wia00702" } },
{ 0, 11, ( 80, 16 ), 3, { "wia00800", "wia00801", "wia00802" } },
{ 0, 11, ( 64, 24 ), 3, { "wia00900", "wia00901", "wia00902" } }
};

static wianimdef_t episode1AnimDefs[] = {
{ 1, 0, { 128, 136 }, 1, { "wia10000" } },
{ 2, 0, { 128, 136 }, 1, { "wia10100" } },
{ 3, 0, { 128, 136 }, 1, { "wia10200" } },
{ 4, 0, { 128, 136 }, 1, { "wia10300" } },
{ 5, 0, { 128, 136 }, 1, { "wia10400" } },
{ 6, 0, { 128, 136 }, 1, { "wia10500" } },
{ 7, 0, { 128, 136 }, 1, { "wia10600" } },
{ 8, 11, { 192, 144 }, 3, { "wia10700", "wia10701", "wia10702" }, ILS_SHOW_NEXTMAP },
{ 8, 0, { 128, 136 }, 1, { "wia10400" } }
{ 1, 0, ( 128, 136 ), 1, { "wia10000" } },
{ 2, 0, ( 128, 136 ), 1, { "wia10100" } },
{ 3, 0, ( 128, 136 ), 1, { "wia10200" } },
{ 4, 0, ( 128, 136 ), 1, { "wia10300" } },
{ 5, 0, ( 128, 136 ), 1, { "wia10400" } },
{ 6, 0, ( 128, 136 ), 1, { "wia10500" } },
{ 7, 0, ( 128, 136 ), 1, { "wia10600" } },
{ 8, 11, ( 192, 144 ), 3, { "wia10700", "wia10701", "wia10702" }, ILS_SHOW_NEXTMAP },
{ 8, 0, ( 128, 136 ), 1, { "wia10400" } }
};

static wianimdef_t episode2AnimDefs[] = {
{ 0, 11, { 104, 168 }, 3, { "wia20000", "wia20001", "wia20002" } },
{ 0, 11, { 40, 136 }, 3, { "wia20100", "wia20101", "wia20102" } },
{ 0, 11, { 160, 96 }, 3, { "wia20200", "wia20201", "wia20202" } },
{ 0, 11, { 104, 80 }, 3, { "wia20300", "wia20301", "wia20302" } },
{ 0, 11, { 120, 32 }, 3, { "wia20400", "wia20401", "wia20402" } },
{ 0, 8, { 40, 0 }, 3, { "wia20500", "wia20501", "wia20502" } }
{ 0, 11, ( 104, 168 ), 3, { "wia20000", "wia20001", "wia20002" } },
{ 0, 11, ( 40, 136 ), 3, { "wia20100", "wia20101", "wia20102" } },
{ 0, 11, ( 160, 96 ), 3, { "wia20200", "wia20201", "wia20202" } },
{ 0, 11, ( 104, 80 ), 3, { "wia20300", "wia20301", "wia20302" } },
{ 0, 11, ( 120, 32 ), 3, { "wia20400", "wia20401", "wia20402" } },
{ 0, 8, ( 40, 0 ), 3, { "wia20500", "wia20501", "wia20502" } }
};

static int animCounts[] = {
Expand Down Expand Up @@ -218,6 +215,14 @@ static patchid_t pFaceDead;
static patchid_t pTeamBackgrounds[NUMTEAMS];
static patchid_t pTeamIcons[NUMTEAMS];

/// @todo Revise API to select a replacement mode according to the usage context
/// and/or domain. Passing an "existing" text string is also a bit awkward... -ds
static inline char const *patchReplacementText(patchid_t patchId, char const *text = 0)
{
return Hu_ChoosePatchReplacement2(patchreplacemode_t(cfg.inludePatchReplaceMode),
patchId, text);
}

void WI_Register(void)
{
cvartemplate_t cvars[] = {
Expand Down Expand Up @@ -256,7 +261,7 @@ static void drawBackground(void)
if(state->frame < 0) continue;

patchId = state->patches[state->frame];
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, patchId), &def->origin, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatch3(patchId, patchReplacementText(patchId), &def->origin, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
}
}
DGL_Disable(DGL_TEXTURE_2D);
Expand Down Expand Up @@ -286,13 +291,13 @@ static void drawFinishedTitle(void)

// Draw <MapName>
patchId = (mapNum < pMapNamesSize? pMapNames[mapNum] : 0);
WI_DrawPatchXY3(patchId, Hu_ChoosePatchReplacement2(cfg.inludePatchReplaceMode, patchId, mapTitle), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(patchId, patchReplacementText(patchId, mapTitle), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);
if(R_GetPatchInfo(patchId, &info))
y += (5 * info.geometry.size.height) / 4;

// Draw "Finished!"
FR_SetColorAndAlpha(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);
WI_DrawPatchXY3(pFinished, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pFinished), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pFinished, patchReplacementText(pFinished), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);

DGL_Disable(DGL_TEXTURE_2D);
}
Expand Down Expand Up @@ -343,7 +348,7 @@ static void drawEnteringTitle(void)
FR_SetColorAndAlpha(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);

// Draw "Entering"
WI_DrawPatchXY3(pEntering, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pEntering), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pEntering, patchReplacementText(pEntering), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);

if(R_GetPatchInfo(pMapNames[wbs->nextMap], &info))
y += (5 * info.geometry.size.height) / 4;
Expand All @@ -352,7 +357,7 @@ static void drawEnteringTitle(void)
mapNum = (wbs->episode * 9) + wbs->nextMap;
patchId = (mapNum < pMapNamesSize? pMapNames[mapNum] : 0);
FR_SetColorAndAlpha(defFontRGB[CR], defFontRGB[CG], defFontRGB[CB], 1);
WI_DrawPatchXY3(patchId, Hu_ChoosePatchReplacement2(cfg.inludePatchReplaceMode, patchId, mapName), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(patchId, patchReplacementText(patchId, mapName), x, y, ALIGN_TOP, 0, DTF_NO_TYPEIN);

DGL_Disable(DGL_TEXTURE_2D);
}
Expand Down Expand Up @@ -385,7 +390,7 @@ static void drawPatchIfFits(patchid_t patchId, const Point2Raw* origin)
assert(origin);
if(patchFits(patchId, origin->x, origin->y))
{
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, patchId), origin, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatch3(patchId, patchReplacementText(patchId), origin, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
}
}

Expand Down Expand Up @@ -512,7 +517,7 @@ static void drawTime(int x, int y, int t)
// "sucks"
if(!R_GetPatchInfo(pSucks, &info)) return;

WI_DrawPatchXY3(pSucks, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pSucks), x - info.geometry.size.width, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pSucks, patchReplacementText(pSucks), x - info.geometry.size.width, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
}

void WI_End(void)
Expand Down Expand Up @@ -592,7 +597,7 @@ static void drawLocationMarks(void)
patchid_t patchId = chooseYouAreHerePatch(origin);
if(0 != patchId)
{
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, patchId), origin, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatch3(patchId, patchReplacementText(patchId), origin, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
}
}

Expand Down Expand Up @@ -719,10 +724,10 @@ static void drawDeathmatchStats(void)
// Draw stat titles (top line).
{ patchinfo_t info;
if(R_GetPatchInfo(pTotal, &info))
WI_DrawPatchXY3(pTotal, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pTotal), DM_TOTALSX - info.geometry.size.width / 2, DM_MATRIXY - WI_SPACINGY + 10, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN); }
WI_DrawPatchXY3(pTotal, patchReplacementText(pTotal), DM_TOTALSX - info.geometry.size.width / 2, DM_MATRIXY - WI_SPACINGY + 10, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN); }

WI_DrawPatchXY3(pKillers, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pKillers), DM_KILLERSX, DM_KILLERSY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pVictims, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pVictims), DM_VICTIMSX, DM_VICTIMSY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pKillers, patchReplacementText(pKillers), DM_KILLERSX, DM_KILLERSY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pVictims, patchReplacementText(pVictims), DM_VICTIMSX, DM_VICTIMSY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);

x = DM_MATRIXX + DM_SPACINGX;
y = DM_MATRIXY;
Expand All @@ -738,14 +743,14 @@ static void drawDeathmatchStats(void)
FR_SetColorAndAlpha(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);

R_GetPatchInfo(patchId, &info);
replacement = Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, patchId);
replacement = patchReplacementText(patchId);
WI_DrawPatchXY3(patchId, replacement, x - info.geometry.size.width / 2, DM_MATRIXY - WI_SPACINGY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(patchId, replacement, DM_MATRIXX - info.geometry.size.width / 2, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);

if(i == inPlayerTeam)
{
WI_DrawPatchXY3(pFaceDead, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pFaceDead), x - info.geometry.size.width / 2, DM_MATRIXY - WI_SPACINGY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pFaceAlive, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pFaceAlive), DM_MATRIXX - info.geometry.size.width / 2, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pFaceDead, patchReplacementText(pFaceDead), x - info.geometry.size.width / 2, DM_MATRIXY - WI_SPACINGY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pFaceAlive, patchReplacementText(pFaceAlive), DM_MATRIXX - info.geometry.size.width / 2, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
}

// If more than 1 member, show the member count.
Expand All @@ -762,7 +767,7 @@ static void drawDeathmatchStats(void)
else
{
patchid_t patchId = pTeamIcons[i];
const char* replacement = Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, patchId);
const char* replacement = patchReplacementText(patchId);
patchinfo_t info;

FR_SetColorAndAlpha(defFontRGB[CR], defFontRGB[CG], defFontRGB[CB], 1);
Expand Down Expand Up @@ -984,14 +989,14 @@ static void drawNetgameStats(void)

// Draw stat titles (top line).
R_GetPatchInfo(pKills, &info);
WI_DrawPatchXY3(pKills, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pKills), ORIGINX + NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pKills, patchReplacementText(pKills), ORIGINX + NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
y = NG_STATSY + info.geometry.size.height;

WI_DrawPatchXY3(pItems, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pItems), ORIGINX + 2 * NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pSecret, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pSecret), ORIGINX + 3 * NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pItems, patchReplacementText(pItems), ORIGINX + 2 * NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pSecret, patchReplacementText(pSecret), ORIGINX + 3 * NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
if(doFrags)
{
WI_DrawPatchXY3(pFrags, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pFrags), ORIGINX + 4 * NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pFrags, patchReplacementText(pFrags), ORIGINX + 4 * NG_SPACINGX, NG_STATSY, ALIGN_TOPRIGHT, 0, DTF_NO_TYPEIN);
}

// Draw stats.
Expand All @@ -1007,7 +1012,7 @@ static void drawNetgameStats(void)

x = ORIGINX;
R_GetPatchInfo(pTeamBackgrounds[i], &info);
WI_DrawPatchXY3(pTeamBackgrounds[i], Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pTeamBackgrounds[i]), x - info.geometry.size.width, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pTeamBackgrounds[i], patchReplacementText(pTeamBackgrounds[i]), x - info.geometry.size.width, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);

// If more than 1 member, show the member count.
if(1 != teamInfo[i].playerCount)
Expand All @@ -1021,7 +1026,7 @@ static void drawNetgameStats(void)
FR_SetColorAndAlpha(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);

if(i == inPlayerTeam)
WI_DrawPatchXY3(pFaceAlive, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pFaceAlive), x - info.geometry.size.width, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pFaceAlive, patchReplacementText(pFaceAlive), x - info.geometry.size.width, y, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
x += NG_SPACINGX;

FR_SetFont(FID(GF_SMALL));
Expand Down Expand Up @@ -1061,13 +1066,13 @@ static void drawSinglePlayerStats(void)
FR_LoadDefaultAttrib();
FR_SetColorAndAlpha(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);

WI_DrawPatchXY3(pKills, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pKills), SP_STATSX, SP_STATSY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pItems, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pItems), SP_STATSX, SP_STATSY + lh, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pSecretSP, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pSecretSP), SP_STATSX, SP_STATSY + 2 * lh, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pTime, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pTime), SP_TIMEX, SP_TIMEY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pKills, patchReplacementText(pKills), SP_STATSX, SP_STATSY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pItems, patchReplacementText(pItems), SP_STATSX, SP_STATSY + lh, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pSecretSP, patchReplacementText(pSecretSP), SP_STATSX, SP_STATSY + 2 * lh, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pTime, patchReplacementText(pTime), SP_TIMEX, SP_TIMEY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
if(wbs->parTime != -1)
{
WI_DrawPatchXY3(pPar, Hu_ChoosePatchReplacement(cfg.inludePatchReplaceMode, pPar), SCREENWIDTH / 2 + SP_TIMEX, SP_TIMEY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
WI_DrawPatchXY3(pPar, patchReplacementText(pPar), SCREENWIDTH / 2 + SP_TIMEX, SP_TIMEY, ALIGN_TOPLEFT, 0, DTF_NO_TYPEIN);
}

FR_SetFont(FID(GF_SMALL));
Expand Down Expand Up @@ -1375,7 +1380,7 @@ void WI_Drawer(void)
/// kludge end.

GL_ConfigureBorderedProjection(&bp, BPF_OVERDRAW_MASK | BPF_OVERDRAW_CLIP,
SCREENWIDTH, SCREENHEIGHT, Get(DD_WINDOW_WIDTH), Get(DD_WINDOW_HEIGHT), cfg.inludeScaleMode);
SCREENWIDTH, SCREENHEIGHT, Get(DD_WINDOW_WIDTH), Get(DD_WINDOW_HEIGHT), scalemode_t(cfg.inludeScaleMode));
GL_BeginBorderedProjection(&bp);

drawBackground();
Expand Down

0 comments on commit fe3193f

Please sign in to comment.