Skip to content

Commit

Permalink
Refactor: Added a drawTextFlags argument to the WI_DrawPatch family o…
Browse files Browse the repository at this point in the history
…f functions.

Moved the MN_MergeMenuEffectWithDrawTextFlags logic out and made this the
responsibility of the caller.

As of this commit there are no longer any mixups with the handling of the menu
effect flags and non-menu text drawing tasks.
  • Loading branch information
danij-deng committed Jun 12, 2011
1 parent 3e97cfa commit f975ae6
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 58 deletions.
9 changes: 5 additions & 4 deletions doomsday/plugins/common/include/hu_stuff.h
Expand Up @@ -152,6 +152,7 @@ const char* Hu_ChoosePatchReplacement(patchid_t patchId);
* @param y Y-offset to the draw origin.
* @param alignFlags @see alignmentFlags
* @param patchFlags @see drawPatchFlags
* @param textFlags @see drawTextFlags
* @param fontId Used with patch replacement; default font.
* @param r Used with patch replacement; default text color red color component.
* @param g Used with patch replacement; default text color green color component.
Expand All @@ -160,10 +161,10 @@ const char* Hu_ChoosePatchReplacement(patchid_t patchId);
* @param glitter Used with patch replacement; default text glitter strength.
* @param shadow Used with patch replacement; default text shadow strength.
*/
void WI_DrawPatch5(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, fontid_t fontId, float r, float g, float b, float a, float glitter, float shadow);
void WI_DrawPatch4(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, fontid_t fontId, float r, float g, float b, float a);
void WI_DrawPatch3(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, fontid_t fontId);
void WI_DrawPatch2(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags);
void WI_DrawPatch5(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, short textFlags, fontid_t fontId, float r, float g, float b, float a, float glitter, float shadow);
void WI_DrawPatch4(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, short textFlags, fontid_t fontId, float r, float g, float b, float a);
void WI_DrawPatch3(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, short textFlags, fontid_t fontId);
void WI_DrawPatch2(patchid_t patchId, const char* replacement, int x, int y, int alignFlags, int patchFlags, short textFlags);
void WI_DrawPatch(patchid_t patchId, const char* replacement, int x, int y);

/**
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/hu_lib.c
Expand Up @@ -1099,7 +1099,7 @@ void MNText_Drawer(mn_object_t* obj, int x, int y)
replacement = Hu_ChoosePatchReplacement2(*txt->patch, txt->text, true);
}
DGL_Enable(DGL_TEXTURE_2D);
WI_DrawPatch5(*txt->patch, replacement, x, y, ALIGN_TOPLEFT, 0, fontId, color[CR], color[CG], color[CB], color[CA], rs.textGlitter, rs.textShadow);
WI_DrawPatch5(*txt->patch, replacement, x, y, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), fontId, color[CR], color[CG], color[CB], color[CA], rs.textGlitter, rs.textShadow);
DGL_Disable(DGL_TEXTURE_2D);
return;
}
Expand Down Expand Up @@ -1709,7 +1709,7 @@ void MNButton_Drawer(mn_object_t* obj, int x, int y)
replacement = Hu_ChoosePatchReplacement2(*btn->patch, btn->text, true);
}
DGL_Enable(DGL_TEXTURE_2D);
WI_DrawPatch5(*btn->patch, replacement, x, y, ALIGN_TOPLEFT, 0, fontId, color[CR], color[CG], color[CB], color[CA], rs.textGlitter, rs.textShadow);
WI_DrawPatch5(*btn->patch, replacement, x, y, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), fontId, color[CR], color[CG], color[CB], color[CA], rs.textGlitter, rs.textShadow);
DGL_Disable(DGL_TEXTURE_2D);
return;
}
Expand Down
16 changes: 8 additions & 8 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -2832,15 +2832,15 @@ void Hu_MenuDrawMainPage(mn_page_t* page, int x, int y)
#elif __JHERETIC__
DGL_Enable(DGL_TEXTURE_2D);

WI_DrawPatch5(pMainTitle, Hu_ChoosePatchReplacement(pMainTitle), x - 22, y - 56, ALIGN_TOPLEFT, 0, FID(GF_FONTB), 1, 1, 1, mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pMainTitle, Hu_ChoosePatchReplacement(pMainTitle), x - 22, y - 56, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), 1, 1, 1, mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
DGL_Color4f(1, 1, 1, mnRendState->pageAlpha);
GL_DrawPatch(pRotatingSkull[17 - frame], x - 70, y - 46);
GL_DrawPatch(pRotatingSkull[frame], x + 122, y - 46);

DGL_Disable(DGL_TEXTURE_2D);
#elif __JDOOM__ || __JDOOM64__
DGL_Enable(DGL_TEXTURE_2D);
WI_DrawPatch5(pMainTitle, Hu_ChoosePatchReplacement(pMainTitle), x - 3, y - 62, ALIGN_TOPLEFT, 0, FID(GF_FONTB), 1, 1, 1, mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pMainTitle, Hu_ChoosePatchReplacement(pMainTitle), x - 3, y - 62, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), 1, 1, 1, mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
DGL_Disable(DGL_TEXTURE_2D);
#endif
}
Expand Down Expand Up @@ -2951,7 +2951,7 @@ void Hu_MenuDrawEpisodePage(mn_page_t* page, int x, int y)
}
// kludge end.
#else // __JDOOM__
WI_DrawPatch5(pEpisode, Hu_ChoosePatchReplacement2(pEpisode, "{case}Which Episode{scaley=1.25,y=-3}?", true), x + 7, y - 25, ALIGN_TOPLEFT, 0, FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pEpisode, Hu_ChoosePatchReplacement2(pEpisode, "{case}Which Episode{scaley=1.25,y=-3}?", true), x + 7, y - 25, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
#endif

DGL_Disable(DGL_TEXTURE_2D);
Expand All @@ -2963,8 +2963,8 @@ void Hu_MenuDrawSkillPage(mn_page_t* page, int x, int y)
DGL_Enable(DGL_TEXTURE_2D);

#if __JDOOM__ || __JDOOM64__
WI_DrawPatch5(pNewGame, Hu_ChoosePatchReplacement2(pNewGame, "{case}NEW GAME", true), x + 48, y - 49, ALIGN_TOPLEFT, 0, FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pSkill, Hu_ChoosePatchReplacement2(pSkill, "{case}Choose Skill Level:", true), x + 6, y - 25, ALIGN_TOPLEFT, 0, FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pNewGame, Hu_ChoosePatchReplacement2(pNewGame, "{case}NEW GAME", true), x + 48, y - 49, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pSkill, Hu_ChoosePatchReplacement2(pSkill, "{case}Choose Skill Level:", true), x + 6, y - 25, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
#elif __JHEXEN__
DGL_Color4f(cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha);
FR_SetFont(FID(GF_FONTB));
Expand Down Expand Up @@ -3236,7 +3236,7 @@ void Hu_MenuDrawLoadGamePage(mn_page_t* page, int x, int y)
FR_SetFont(FID(GF_FONTB));
MN_DrawText2("Load Game", SCREENWIDTH/2, y-20, ALIGN_TOP, 0);
#else
WI_DrawPatch5(pLoadGame, Hu_ChoosePatchReplacement2(pLoadGame, "{case}Load game", true), x - 8, y - 26, ALIGN_TOPLEFT, 0, FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pLoadGame, Hu_ChoosePatchReplacement2(pLoadGame, "{case}Load game", true), x - 8, y - 26, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
#endif

DGL_Disable(DGL_TEXTURE_2D);
Expand All @@ -3251,7 +3251,7 @@ void Hu_MenuDrawSaveGamePage(mn_page_t* page, int x, int y)
FR_SetFont(FID(GF_FONTB));
MN_DrawText2("Save Game", SCREENWIDTH/2, y-20, ALIGN_TOP, 0);
#else
WI_DrawPatch5(pSaveGame, Hu_ChoosePatchReplacement2(pSaveGame, "{case}Save game", true), x - 8, y - 26, ALIGN_TOPLEFT, 0, FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pSaveGame, Hu_ChoosePatchReplacement2(pSaveGame, "{case}Save game", true), x - 8, y - 26, ALIGN_TOPLEFT, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
#endif

DGL_Disable(DGL_TEXTURE_2D);
Expand All @@ -3275,7 +3275,7 @@ void Hu_MenuDrawOptionsPage(mn_page_t* page, int x, int y)
FR_SetFont(FID(GF_FONTB));
MN_DrawText2("OPTIONS", x + 42, y - 38, ALIGN_TOP, 0);
#else
WI_DrawPatch5(pOptionsTitle, Hu_ChoosePatchReplacement2(pOptionsTitle, "{case}OPTIONS", true), x + 42, y - 20, ALIGN_TOP, 0, FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
WI_DrawPatch5(pOptionsTitle, Hu_ChoosePatchReplacement2(pOptionsTitle, "{case}OPTIONS", true), x + 42, y - 20, ALIGN_TOP, 0, MN_MergeMenuEffectWithDrawTextFlags(0), FID(GF_FONTB), cfg.menuTextColors[0][CR], cfg.menuTextColors[0][CG], cfg.menuTextColors[0][CB], mnRendState->pageAlpha, mnRendState->textGlitter, mnRendState->textShadow);
#endif

DGL_Disable(DGL_TEXTURE_2D);
Expand Down
31 changes: 11 additions & 20 deletions doomsday/plugins/common/src/hu_stuff.c
Expand Up @@ -1206,21 +1206,12 @@ const char* Hu_ChoosePatchReplacement(patchid_t patchId)
}

void WI_DrawPatch5(patchid_t patchId, const char* replacement, int x, int y, int alignFlags,
int patchFlags, fontid_t fontId, float r, float g, float b, float a, float glitter,
float shadow)
int patchFlags, short textFlags, fontid_t fontId, float r, float g, float b, float a,
float glitter, float shadow)
{
if(NULL != replacement && replacement[0])
{
// Use the replacement string.
short textFlags = 0;
/**
* \kludge
* Correct behavior is no-merge but due to the way the state for this is
* managed it means the menu strings do not have text effects applied
* when they should. This should be addressed by redesigning the API for
* patch replacement.
*/
MN_MergeMenuEffectWithDrawTextFlags(textFlags);
FR_DrawText(replacement, x, y, fontId, alignFlags, textFlags, .5f, 0, r, g, b, a, glitter, shadow, false);
return;
}
Expand All @@ -1234,26 +1225,26 @@ void WI_DrawPatch5(patchid_t patchId, const char* replacement, int x, int y, int
}

void WI_DrawPatch4(patchid_t patchId, const char* replacement, int x, int y, int alignFlags,
int patchFlags, fontid_t fontId, float r, float g, float b, float a)
int patchFlags, short textFlags, fontid_t fontId, float r, float g, float b, float a)
{
WI_DrawPatch5(patchId, replacement, x, y, alignFlags, patchFlags, fontId, r, g, b, a, 0, 0);
WI_DrawPatch5(patchId, replacement, x, y, alignFlags, patchFlags, textFlags, fontId, r, g, b, a, 0, 0);
}

void WI_DrawPatch3(patchid_t patchId, const char* replacement, int x, int y, int alignFlags,
int patchFlags, fontid_t fontId)
int patchFlags, short textFlags, fontid_t fontId)
{
WI_DrawPatch4(patchId, replacement, x, y, alignFlags, patchFlags, fontId, 1, 1, 1, 1);
WI_DrawPatch4(patchId, replacement, x, y, alignFlags, patchFlags, textFlags, fontId, 1, 1, 1, 1);
}

void WI_DrawPatch2(patchid_t patchId, const char* replacement, int x, int y, int alignFlags,
int patchFlags)
int patchFlags, short textFlags)
{
WI_DrawPatch3(patchId, replacement, x, y, alignFlags, patchFlags, FID(GF_FONTB));
WI_DrawPatch3(patchId, replacement, x, y, alignFlags, patchFlags, textFlags, FID(GF_FONTB));
}

void WI_DrawPatch(patchid_t patchId, const char* replacement, int x, int y)
{
WI_DrawPatch2(patchId, replacement, x, y, ALIGN_TOPLEFT, 0);
WI_DrawPatch2(patchId, replacement, x, y, ALIGN_TOPLEFT, 0, 0);
}

/**
Expand Down Expand Up @@ -1522,7 +1513,7 @@ void Hu_Drawer(void)

DGL_Enable(DGL_TEXTURE_2D);

WI_DrawPatch3(m_pause, Hu_ChoosePatchReplacement(m_pause), 0, 0, ALIGN_TOP, DPF_NO_OFFSET, FID(GF_FONTB));
WI_DrawPatch3(m_pause, Hu_ChoosePatchReplacement(m_pause), 0, 0, ALIGN_TOP, DPF_NO_OFFSET, 0, FID(GF_FONTB));

DGL_Disable(DGL_TEXTURE_2D);

Expand Down Expand Up @@ -1589,7 +1580,7 @@ static void drawMapTitle(void)

FR_LoadDefaultAttrib();

WI_DrawPatch4(pMapNames[mapnum], Hu_ChoosePatchReplacement2(pMapNames[mapnum], lname, false), 0, 0, ALIGN_TOP, 0, FID(GF_FONTB), 1, 1, 1, alpha);
WI_DrawPatch4(pMapNames[mapnum], Hu_ChoosePatchReplacement2(pMapNames[mapnum], lname, false), 0, 0, ALIGN_TOP, 0, 0, FID(GF_FONTB), 1, 1, 1, alpha);

DGL_Disable(DGL_TEXTURE_2D);

Expand Down
10 changes: 5 additions & 5 deletions doomsday/plugins/jdoom/src/st_stuff.c
Expand Up @@ -1481,7 +1481,7 @@ void SBarFace_Drawer(uiwidget_t* obj, int x, int y)
DGL_Translatef(0, yOffset, 0);
DGL_Enable(DGL_TEXTURE_2D);

WI_DrawPatch4(patchId, Hu_ChoosePatchReplacement(patchId), ORIGINX+ST_FACESX, ORIGINY+ST_FACESY, ALIGN_TOPLEFT, 0, FID(GF_FONTB), 1, 1, 1, iconAlpha);
WI_DrawPatch4(patchId, Hu_ChoosePatchReplacement(patchId), ORIGINX+ST_FACESX, ORIGINY+ST_FACESY, ALIGN_TOPLEFT, 0, 0, FID(GF_FONTB), 1, 1, 1, iconAlpha);

DGL_Disable(DGL_TEXTURE_2D);
DGL_MatrixMode(DGL_MODELVIEW);
Expand Down Expand Up @@ -1578,10 +1578,10 @@ void KeySlot_Drawer(uiwidget_t* obj, int x, int y)
DGL_Translatef(0, yOffset, 0);
DGL_Enable(DGL_TEXTURE_2D);

WI_DrawPatch4(kslt->patchId, Hu_ChoosePatchReplacement(kslt->patchId), loc->x + offset, loc->y + offset, ALIGN_TOPLEFT, 0, FID(GF_FONTB), 1, 1, 1, iconAlpha);
WI_DrawPatch4(kslt->patchId, Hu_ChoosePatchReplacement(kslt->patchId), loc->x + offset, loc->y + offset, ALIGN_TOPLEFT, 0, 0, FID(GF_FONTB), 1, 1, 1, iconAlpha);
if(kslt->patchId2 != 0)
{
WI_DrawPatch4(kslt->patchId2, Hu_ChoosePatchReplacement(kslt->patchId2), loc->x - offset, loc->y - offset, ALIGN_TOPLEFT, 0, FID(GF_FONTB), 1, 1, 1, iconAlpha);
WI_DrawPatch4(kslt->patchId2, Hu_ChoosePatchReplacement(kslt->patchId2), loc->x - offset, loc->y - offset, ALIGN_TOPLEFT, 0, 0, FID(GF_FONTB), 1, 1, 1, iconAlpha);
}

DGL_Disable(DGL_TEXTURE_2D);
Expand Down Expand Up @@ -1714,7 +1714,7 @@ void WeaponSlot_Drawer(uiwidget_t* obj, int x, int y)
DGL_Translatef(0, yOffset, 0);
DGL_Enable(DGL_TEXTURE_2D);

WI_DrawPatch4(wpns->patchId, Hu_ChoosePatchReplacement(wpns->patchId), element->x, element->y, ALIGN_TOPLEFT, 0, 0, 1, 1, 1, textAlpha);
WI_DrawPatch4(wpns->patchId, Hu_ChoosePatchReplacement(wpns->patchId), element->x, element->y, ALIGN_TOPLEFT, 0, 0, 0, 1, 1, 1, textAlpha);

DGL_Disable(DGL_TEXTURE_2D);
DGL_MatrixMode(DGL_MODELVIEW);
Expand Down Expand Up @@ -2842,7 +2842,7 @@ void MapName_Drawer(uiwidget_t* obj, int x, int y)
DGL_Scalef(scale, scale, 1);

DGL_Enable(DGL_TEXTURE_2D);
WI_DrawPatch4(patch, text, 0, 0, ALIGN_BOTTOMLEFT, 0, obj->fontId, cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha);
WI_DrawPatch4(patch, text, 0, 0, ALIGN_BOTTOMLEFT, 0, 0, obj->fontId, cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha);
DGL_Disable(DGL_TEXTURE_2D);

DGL_MatrixMode(DGL_MODELVIEW);
Expand Down
10 changes: 5 additions & 5 deletions doomsday/plugins/jdoom/src/wi_stuff.c
Expand Up @@ -285,12 +285,12 @@ static void drawFinishedTitle(void)
DGL_Enable(DGL_TEXTURE_2D);
// Draw <MapName>
patchId = pMapNames[mapNum];
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));

// Draw "Finished!"
if(R_GetPatchInfo(patchId, &info))
y += (5 * info.height) / 4;
WI_DrawPatch3(pFinished, Hu_ChoosePatchReplacement(pFinished), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(pFinished, Hu_ChoosePatchReplacement(pFinished), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));
DGL_Disable(DGL_TEXTURE_2D);
}

Expand Down Expand Up @@ -328,13 +328,13 @@ static void drawEnteringTitle(void)

DGL_Enable(DGL_TEXTURE_2D);
// Draw "Entering"
WI_DrawPatch3(pEntering, Hu_ChoosePatchReplacement(pEntering), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(pEntering, Hu_ChoosePatchReplacement(pEntering), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));

// Draw map.
if(R_GetPatchInfo(pMapNames[wbs->nextMap], &info))
y += (5 * info.height) / 4;
patchId = pMapNames[(wbs->episode * 8) + wbs->nextMap];
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));
DGL_Disable(DGL_TEXTURE_2D);
}

Expand Down Expand Up @@ -479,7 +479,7 @@ static void drawTime(int x, int y, int t)
patchinfo_t info;
if(!R_GetPatchInfo(pSucks, &info))
return;
WI_DrawPatch4(pSucks, Hu_ChoosePatchReplacement(pSucks), x - info.width, y, ALIGN_TOPLEFT, DTF_NO_EFFECTS, FID(GF_SMALL), defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);
WI_DrawPatch4(pSucks, Hu_ChoosePatchReplacement(pSucks), x - info.width, y, ALIGN_TOPLEFT, 0, DTF_NO_EFFECTS, FID(GF_SMALL), defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom64/src/st_stuff.c
Expand Up @@ -632,7 +632,7 @@ void MapName_Drawer(uiwidget_t* obj, int x, int y)
DGL_Scalef(scale, scale, 1);

DGL_Enable(DGL_TEXTURE_2D);
WI_DrawPatch4(patch, text, 0, 0, ALIGN_BOTTOMLEFT, 0, obj->fontId, cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha);
WI_DrawPatch4(patch, text, 0, 0, ALIGN_BOTTOMLEFT, 0, 0, obj->fontId, cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha);
DGL_Disable(DGL_TEXTURE_2D);

DGL_MatrixMode(DGL_MODELVIEW);
Expand Down
10 changes: 5 additions & 5 deletions doomsday/plugins/jdoom64/src/wi_stuff.c
Expand Up @@ -140,11 +140,11 @@ static void drawFinishedTitle(void)
DGL_Enable(DGL_TEXTURE_2D);
// Draw <MapName>
patchId = pMapNames[mapNum];
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));
if(R_GetPatchInfo(patchId, &info))
y += (5 * info.height) / 4;
// Draw "Finished!"
WI_DrawPatch3(pFinished, Hu_ChoosePatchReplacement(pFinished), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(pFinished, Hu_ChoosePatchReplacement(pFinished), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));
DGL_Disable(DGL_TEXTURE_2D);
}

Expand Down Expand Up @@ -177,13 +177,13 @@ static void drawEnteringTitle(void)

DGL_Enable(DGL_TEXTURE_2D);
// Draw "Entering"
WI_DrawPatch3(pEntering, Hu_ChoosePatchReplacement(pEntering), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(pEntering, Hu_ChoosePatchReplacement(pEntering), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));

// Draw map.
if(R_GetPatchInfo(pMapNames[wbs->nextMap], &info))
y += (5 * info.height) / 4;
patchId = pMapNames[(wbs->episode * 8) + wbs->nextMap];
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, FID(GF_FONTB));
WI_DrawPatch3(patchId, Hu_ChoosePatchReplacement2(patchId, mapName, false), x, y, ALIGN_TOP, 0, 0, FID(GF_FONTB));
DGL_Disable(DGL_TEXTURE_2D);
}

Expand Down Expand Up @@ -232,7 +232,7 @@ static void drawTime(int x, int y, int t)
patchinfo_t info;
if(!R_GetPatchInfo(pSucks, &info))
return;
WI_DrawPatch4(pSucks, Hu_ChoosePatchReplacement(pSucks), x - info.width, y, ALIGN_TOPLEFT, DTF_NO_EFFECTS, FID(GF_SMALL), defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);
WI_DrawPatch4(pSucks, Hu_ChoosePatchReplacement(pSucks), x - info.width, y, ALIGN_TOPLEFT, 0, DTF_NO_EFFECTS, FID(GF_SMALL), defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1);
}
}

Expand Down

0 comments on commit f975ae6

Please sign in to comment.