From e239f4bbd4976e317b2266f390765e7f14833d19 Mon Sep 17 00:00:00 2001 From: danij Date: Mon, 13 Jun 2011 23:52:58 +0100 Subject: [PATCH] Refactor: Removed distinction between text blocks and text fragments at font renderer API level. This distinction need only exist within the engine. --- doomsday/engine/api/dd_fontrenderer.h | 22 ---- doomsday/engine/api/doomsday.def | 22 ++-- doomsday/engine/portable/src/con_busy.c | 6 +- doomsday/engine/portable/src/con_main.c | 2 +- doomsday/engine/portable/src/edit_bias.c | 12 +-- doomsday/engine/portable/src/gl_font.c | 107 ++------------------ doomsday/engine/portable/src/net_main.c | 2 +- doomsday/engine/portable/src/p_bmap.c | 8 +- doomsday/engine/portable/src/rend_console.c | 12 +-- doomsday/engine/portable/src/s_sfx.c | 12 +-- doomsday/engine/portable/src/ui_main.c | 16 +-- doomsday/engine/portable/src/ui_panel.c | 4 +- doomsday/plugins/common/src/hu_inventory.c | 4 +- doomsday/plugins/common/src/hu_lib.c | 14 +-- doomsday/plugins/common/src/hu_menu.c | 4 +- doomsday/plugins/common/src/hu_msg.c | 2 +- doomsday/plugins/common/src/hu_stuff.c | 22 ++-- doomsday/plugins/common/src/m_ctrl.c | 12 +-- doomsday/plugins/jdoom/src/st_stuff.c | 52 +++++----- doomsday/plugins/jdoom/src/wi_stuff.c | 18 ++-- doomsday/plugins/jdoom64/src/st_stuff.c | 20 ++-- doomsday/plugins/jdoom64/src/wi_stuff.c | 18 ++-- doomsday/plugins/jheretic/src/in_lude.c | 44 ++++---- doomsday/plugins/jheretic/src/st_stuff.c | 56 +++++----- doomsday/plugins/jhexen/src/in_lude.c | 8 +- doomsday/plugins/jhexen/src/st_stuff.c | 62 ++++++------ 26 files changed, 219 insertions(+), 342 deletions(-) diff --git a/doomsday/engine/api/dd_fontrenderer.h b/doomsday/engine/api/dd_fontrenderer.h index 5f54868c41..61801c124d 100644 --- a/doomsday/engine/api/dd_fontrenderer.h +++ b/doomsday/engine/api/dd_fontrenderer.h @@ -159,28 +159,6 @@ void FR_TextDimensions(int* width, int* height, const char* text); int FR_TextWidth(const char* text); int FR_TextHeight(const char* text); -/** - * Text fragments (a single line of unformatted text): - */ - -/** - * Draw a text fragment. - * - * @param fragment Fragment of text to be drawn. - * @param x X origin/offset at which to begin drawing. - * @param y Y origin/offset at which to begin drawing. - * @param alignFlags @see alignmentFlags - * @param flags @see drawTextFlags - */ -void FR_DrawTextFragment3(const char* fragment, int x, int y, int alignFlags, short flags); -void FR_DrawTextFragment2(const char* fragment, int x, int y, int alignFlags); -void FR_DrawTextFragment(const char* fragment, int x, int y); - -// Utility routines: -void FR_TextFragmentDimensions(int* width, int* height, const char* fragment); -int FR_TextFragmentWidth(const char* fragment); -int FR_TextFragmentHeight(const char* fragment); - /** * Single characters: */ diff --git a/doomsday/engine/api/doomsday.def b/doomsday/engine/api/doomsday.def index 035f8561ad..36320c4cdf 100644 --- a/doomsday/engine/api/doomsday.def +++ b/doomsday/engine/api/doomsday.def @@ -1,6 +1,6 @@ ; Doomsday Engine API (Routines exported from Doomsday.exe). ; -; Highest ordinal is currently: --> 524 <-- +; Highest ordinal is currently: --> 518 <-- ; Other free ordinals: 65 NAME "DOOMSDAY" @@ -523,21 +523,13 @@ EXPORTS FR_DrawText2 @205 NONAME FR_DrawText3 @206 NONAME - FR_TextFragmentDimensions @513 NONAME - FR_TextFragmentWidth @514 NONAME - FR_TextFragmentHeight @515 NONAME + FR_DrawChar @513 NONAME + FR_DrawChar2 @514 NONAME + FR_DrawChar3 @515 NONAME - FR_DrawTextFragment @516 NONAME - FR_DrawTextFragment2 @517 NONAME - FR_DrawTextFragment3 @518 NONAME - - FR_DrawChar @519 NONAME - FR_DrawChar2 @520 NONAME - FR_DrawChar3 @521 NONAME - - FR_CharDimensions @522 NONAME - FR_CharWidth @523 NONAME - FR_CharHeight @524 NONAME + FR_CharDimensions @516 NONAME + FR_CharWidth @517 NONAME + FR_CharHeight @518 NONAME ; Audio. S_MapChange @225 NONAME diff --git a/doomsday/engine/portable/src/con_busy.c b/doomsday/engine/portable/src/con_busy.c index c338378db3..64affb6802 100644 --- a/doomsday/engine/portable/src/con_busy.c +++ b/doomsday/engine/portable/src/con_busy.c @@ -281,7 +281,7 @@ static void Con_BusyLoadTextures(void) if(0 != (busyFont = FR_LoadSystemFont(fonts[fontIdx].name, fonts[fontIdx].path))) { FR_SetFont(busyFont); - busyFontHgt = FR_TextFragmentHeight("A"); + busyFontHgt = FR_TextHeight("A"); } } } @@ -507,7 +507,7 @@ static void Con_BusyDrawIndicator(float x, float y, float radius, float pos) FR_SetFont(busyFont); FR_LoadDefaultAttrib(); glColor4f(1.f, 1.f, 1.f, .66f); - FR_DrawTextFragment3(busyTaskName, x+radius, y, ALIGN_LEFT, DTF_ONLY_SHADOW); + FR_DrawText3(busyTaskName, x+radius, y, ALIGN_LEFT, DTF_ONLY_SHADOW); } glDisable(GL_TEXTURE_2D); @@ -636,7 +636,7 @@ void Con_BusyDrawConsoleOutput(void) color = 1 - (color - LINE_COUNT); glColor4f(1.f, 1.f, 1.f, color); - FR_DrawTextFragment3(line->text, theWindow->width/2, y, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3(line->text, theWindow->width/2, y, ALIGN_TOP, DTF_ONLY_SHADOW); } glDisable(GL_TEXTURE_2D); diff --git a/doomsday/engine/portable/src/con_main.c b/doomsday/engine/portable/src/con_main.c index 7a0dbf7b98..66b1770039 100644 --- a/doomsday/engine/portable/src/con_main.c +++ b/doomsday/engine/portable/src/con_main.c @@ -231,7 +231,7 @@ static void resizeHistoryBuffer(void) FR_SetFont(consoleFont); FR_LoadDefaultAttrib(); // Do we need to update the console history buffer max line length? - if(0 != (cw = FR_TextFragmentWidth("A"))) + if(0 != (cw = FR_TextWidth("A"))) { maxLength = MIN_OF(theWindow->width / cw - 2, 250); } diff --git a/doomsday/engine/portable/src/edit_bias.c b/doomsday/engine/portable/src/edit_bias.c index 3ba729e757..c9166a40a7 100644 --- a/doomsday/engine/portable/src/edit_bias.c +++ b/doomsday/engine/portable/src/edit_bias.c @@ -664,8 +664,8 @@ static void SBE_InfoBox(source_t* s, int rightX, char* title, float alpha) FR_SetFont(glFontFixed); FR_LoadDefaultAttrib(); - w = 16 + FR_TextFragmentWidth("R:0.000 G:0.000 B:0.000"); - th = FR_TextFragmentHeight("Info"); + w = 16 + FR_TextWidth("R:0.000 G:0.000 B:0.000"); + th = FR_TextHeight("Info"); h = 16 + th * 6; x = theWindow->width - 10 - w - rightX; @@ -757,7 +757,7 @@ static void SBE_DrawLevelGauge(int x, int y, int height) FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); FR_SetShadowStrength(UI_SHADOW_STRENGTH); - off = FR_TextFragmentWidth("000"); + off = FR_TextWidth("000"); glBegin(GL_LINES); glColor4f(1, 1, 1, .5f); @@ -834,8 +834,8 @@ void SBE_DrawHUD(void) FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); FR_SetShadowStrength(UI_SHADOW_STRENGTH); - w = FR_TextFragmentWidth(buf) + 16; - h = FR_TextFragmentHeight(buf) + 16; + w = FR_TextWidth(buf) + 16; + h = FR_TextHeight(buf) + 16; y = theWindow->height - 10 - h; SBE_DrawBox(10, y, w, h, 0); UI_TextOutEx2(buf, 18, y + h / 2, UI_Color(UIC_TITLE), alpha, ALIGN_LEFT, DTF_ONLY_SHADOW); @@ -854,7 +854,7 @@ void SBE_DrawHUD(void) { int x; FR_SetFont(glFontFixed); - x = FR_TextFragmentWidth("0") * 26; + x = FR_TextWidth("0") * 26; SBE_InfoBox(s, x, "Grabbed", alpha); } diff --git a/doomsday/engine/portable/src/gl_font.c b/doomsday/engine/portable/src/gl_font.c index 05de39b174..c30bcdf295 100644 --- a/doomsday/engine/portable/src/gl_font.c +++ b/doomsday/engine/portable/src/gl_font.c @@ -580,68 +580,6 @@ int FR_CharHeight(unsigned char ch) return 0; } -void FR_TextFragmentDimensions(int* width, int* height, const char* text) -{ - if(!inited) - Con_Error("FR_TextFragmentDimensions: Font renderer has not yet been initialized."); - if(!width && !height) - return; - if(width) - *width = FR_TextFragmentWidth(text); - if(height) - *height = FR_TextFragmentHeight(text); -} - -int FR_TextFragmentWidth(const char* text) -{ - size_t i, len; - int width = 0; - const char* ch; - unsigned char c; - - if(!inited) - Con_Error("FR_TextFragmentWidth: Font renderer has not yet been initialized."); - - if(fr.fontIdx == -1 || !text) - return 0; - - // Just add them together. - len = strlen(text); - i = 0; - ch = text; - while(i++ < len && (c = *ch++) != 0 && c != '\n') - width += FR_CharWidth(c); - - return (int) (width + currentAttributes()->tracking * (len-1)); -} - -int FR_TextFragmentHeight(const char* text) -{ - const char* ch; - unsigned char c; - int height = 0; - size_t len; - uint i; - - if(!inited) - Con_Error("FR_TextFragmentHeight: Font renderer has not yet been initialized."); - - if(fr.fontIdx == -1 || !text) - return 0; - - // Find the greatest height. - i = 0; - height = 0; - len = strlen(text); - ch = text; - while(i++ < len && (c = *ch++) != 0 && c != '\n') - { - height = MAX_OF(height, FR_CharHeight(c)); - } - - return topToAscent(fonts[fr.fontIdx]) + height; -} - int FR_SingleLineHeight(const char* text) { if(!inited) @@ -687,14 +625,14 @@ static void drawTextFragment(const char* string, int x, int y, int alignFlags, const char* ch; if(alignFlags & ALIGN_RIGHT) - x -= FR_TextFragmentWidth(string); + x -= FR_TextWidth(string); else if(!(alignFlags & ALIGN_LEFT)) - x -= FR_TextFragmentWidth(string)/2; + x -= FR_TextWidth(string)/2; if(alignFlags & ALIGN_BOTTOM) - y -= FR_TextFragmentHeight(string); + y -= FR_TextHeight(string); else if(!(alignFlags & ALIGN_TOP)) - y -= FR_TextFragmentHeight(string)/2; + y -= FR_TextHeight(string)/2; if(!(noTypein && noShadow && noGlitter)) glGetFloatv(GL_CURRENT_COLOR, origColor); @@ -854,37 +792,6 @@ static void drawTextFragment(const char* string, int x, int y, int alignFlags, } } -void FR_DrawTextFragment3(const char* string, int x, int y, int alignFlags, short textFlags) -{ - if(!inited) - Con_Error("Bitmap font system not yet initialized."); - if(!string || !string[0]) - { -/*#if _DEBUG - Con_Message("Warning: Attempt drawTextFragment with invalid/empty string.\n"); -#endif*/ - return; - } - if(fr.fontIdx == -1) - { -#if _DEBUG - Con_Message("Warning: Attempt drawTextFragment without a current font.\n"); -#endif - return; - } - drawTextFragment(string, x, y, alignFlags, textFlags, DEFAULT_INITIALCOUNT); -} - -void FR_DrawTextFragment2(const char* string, int x, int y, int alignFlags) -{ - FR_DrawTextFragment3(string, x, y, alignFlags, DEFAULT_DRAWFLAGS); -} - -void FR_DrawTextFragment(const char* string, int x, int y) -{ - FR_DrawTextFragment2(string, x, y, DEFAULT_ALIGNFLAGS); -} - void FR_DrawChar3(unsigned char ch, int x, int y, int alignFlags, short textFlags) { bitmapfont_t* cf; @@ -1393,7 +1300,7 @@ void FR_DrawText3(const char* text, int x, int y, int alignFlags, short textFlag // We'll take care of horizontal positioning of the fragment so align left. fragmentAlignFlags = (alignFlags & ~(ALIGN_RIGHT)) | ALIGN_LEFT; if(alignFlags & ALIGN_RIGHT) - alignx = -FR_TextFragmentWidth(fragment) * state.scaleX; + alignx = -FR_TextWidth(fragment) * state.scaleX; } // Setup the scaling. @@ -1426,12 +1333,12 @@ void FR_DrawText3(const char* text, int x, int y, int alignFlags, short textFlag // Advance the current position? if(!newline) { - cx += (float) FR_TextFragmentWidth(fragment) * state.scaleX; + cx += (float) FR_TextWidth(fragment) * state.scaleX; } else { if(strlen(fragment) > 0) - lastLineHeight = FR_TextFragmentHeight(fragment); + lastLineHeight = FR_TextHeight(fragment); cx = (float) x; cy += (float) lastLineHeight * (1+FR_Leading()); diff --git a/doomsday/engine/portable/src/net_main.c b/doomsday/engine/portable/src/net_main.c index 633e6e2c9f..28390f82c6 100644 --- a/doomsday/engine/portable/src/net_main.c +++ b/doomsday/engine/portable/src/net_main.c @@ -903,7 +903,7 @@ void Net_DrawDemoOverlay(void) FR_SetFont(glFontFixed); FR_LoadDefaultAttrib(); glColor3f(1, 1, 1); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); glDisable(GL_TEXTURE_2D); diff --git a/doomsday/engine/portable/src/p_bmap.c b/doomsday/engine/portable/src/p_bmap.c index ef883474e2..87c645b53e 100644 --- a/doomsday/engine/portable/src/p_bmap.c +++ b/doomsday/engine/portable/src/p_bmap.c @@ -1155,8 +1155,8 @@ static void drawInfoBox(int x, int y, long blockIdx, uint blockX, FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); FR_SetShadowStrength(UI_SHADOW_STRENGTH); - w = FR_TextFragmentWidth(buf) + 16; - h = FR_TextFragmentHeight(buf) + 16; + w = FR_TextWidth(buf) + 16; + h = FR_TextHeight(buf) + 16; x -= w / 2; UI_GradientEx(x, y, w, h, 6, UI_Color(UIC_BG_MEDIUM), UI_Color(UIC_BG_LIGHT), .5f, .5f); UI_DrawRectEx(x, y, w, h, 6, false, UI_Color(UIC_BRD_HI), NULL, .5f, -1); @@ -1174,8 +1174,8 @@ static void drawInfoBox2(float minX, float minY, float maxX, float maxY, FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); FR_SetShadowStrength(UI_SHADOW_STRENGTH); - w = 16 + FR_TextFragmentWidth("(+000.0,+000.0)(+000.0,+000.0)"); - th = FR_TextFragmentHeight("a"); + w = 16 + FR_TextWidth("(+000.0,+000.0)(+000.0,+000.0)"); + th = FR_TextHeight("a"); h = th * 4 + 16; x = theWindow->width - 10 - w; diff --git a/doomsday/engine/portable/src/rend_console.c b/doomsday/engine/portable/src/rend_console.c index 5db7a153a6..fa6c56f8f7 100644 --- a/doomsday/engine/portable/src/rend_console.c +++ b/doomsday/engine/portable/src/rend_console.c @@ -425,7 +425,7 @@ void Rend_ConsoleFPS(int x, int y) FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); FR_SetShadowStrength(UI_SHADOW_STRENGTH); - w = FR_TextFragmentWidth(buf) + 16; + w = FR_TextWidth(buf) + 16; h = FR_SingleLineHeight(buf) + 16; glEnable(GL_TEXTURE_2D); @@ -468,7 +468,7 @@ static void drawConsoleTitleBar(float alpha) UI_TextOutEx2(consoleTitle, border, height / 2, UI_Color(UIC_TITLE), alpha, ALIGN_LEFT, DTF_ONLY_SHADOW); if(secondaryTitleText[0]) { - width = FR_TextFragmentWidth(consoleTitle) + FR_TextFragmentWidth(" "); + width = FR_TextWidth(consoleTitle) + FR_TextWidth(" "); FR_SetFont(glFontVariable[GLFS_LIGHT]); UI_TextOutEx2(secondaryTitleText, border + width, height / 2, UI_Color(UIC_TEXT), .33f * alpha, ALIGN_LEFT, DTF_ONLY_SHADOW); @@ -567,7 +567,7 @@ static void drawSideText(const char* text, int line, float alpha) } glColor4f(CcolYellow[0], CcolYellow[1], CcolYellow[2], alpha * .75f); - FR_DrawTextFragment3(text, ssw - 3, y / scale[1], ALIGN_TOPRIGHT, DTF_NO_TYPEIN|DTF_NO_GLITTER|(!consoleTextShadow?DTF_NO_SHADOW:0)); + FR_DrawText3(text, ssw - 3, y / scale[1], ALIGN_TOPRIGHT, DTF_NO_TYPEIN|DTF_NO_GLITTER|(!consoleTextShadow?DTF_NO_SHADOW:0)); } } } @@ -691,7 +691,7 @@ static void drawConsole(float consoleAlpha) // Set the color. if(BitmapFont_Flags(cfont) & BFF_IS_MONOCHROME) consoleSetColor(line->flags, consoleAlpha); - FR_DrawTextFragment3(buff, XORIGIN + PADDING + xOffset, + FR_DrawText3(buff, XORIGIN + PADDING + xOffset, YORIGIN + y / scale[1], alignFlags, textFlags); } @@ -719,7 +719,7 @@ static void drawConsole(float consoleAlpha) else glColor4f(1, 1, 1, consoleAlpha); - FR_DrawTextFragment3(buff, XORIGIN + PADDING, YORIGIN + y / scale[1], ALIGN_TOPLEFT, DTF_NO_TYPEIN|DTF_NO_GLITTER|(!consoleTextShadow?DTF_NO_SHADOW:0)); + FR_DrawText3(buff, XORIGIN + PADDING, YORIGIN + y / scale[1], ALIGN_TOPLEFT, DTF_NO_TYPEIN|DTF_NO_GLITTER|(!consoleTextShadow?DTF_NO_SHADOW:0)); glDisable(GL_TEXTURE_2D); @@ -733,7 +733,7 @@ static void drawConsole(float consoleAlpha) // Where is the cursor? memset(temp, 0, sizeof(temp)); strncpy(temp, buff, MIN_OF(LOCALBUFFSIZE -1/*prompt length*/ -1/*vis clamp*/, cmdCursor+1)); - xOffset = FR_TextFragmentWidth(temp); + xOffset = FR_TextWidth(temp); if(Con_InputMode()) { height = fontScaledY; diff --git a/doomsday/engine/portable/src/s_sfx.c b/doomsday/engine/portable/src/s_sfx.c index 2af7495dce..6835a321ff 100644 --- a/doomsday/engine/portable/src/s_sfx.c +++ b/doomsday/engine/portable/src/s_sfx.c @@ -1222,22 +1222,22 @@ void Sfx_DebugInfo(void) FR_SetFont(glFontFixed); FR_LoadDefaultAttrib(); - lh = FR_TextFragmentHeight("W") - 3; + lh = FR_TextHeight("W") - 3; if(!sfxAvail) { - FR_DrawTextFragment3("Sfx disabled", 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3("Sfx disabled", 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); glDisable(GL_TEXTURE_2D); return; } if(refMonitor) - FR_DrawTextFragment3("!", 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3("!", 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); // Sample cache information. Sfx_GetCacheInfo(&cachesize, &ccnt); sprintf(buf, "Cached:%i (%i)", cachesize, ccnt); glColor3f(1, 1, 1); - FR_DrawTextFragment3(buf, 10, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 10, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); // Print a line of info about each channel. for(i = 0, ch = channels; i < numChannels; ++i, ch++) @@ -1252,7 +1252,7 @@ void Sfx_DebugInfo(void) !(ch->flags & SFXCF_NO_ATTENUATION) ? 'A' : '.', ch->emitter ? 'E' : '.', ch->volume, ch->frequency, ch->startTime, ch->buffer ? ch->buffer->endTime : 0); - FR_DrawTextFragment3(buf, 5, lh * (1 + i * 2), ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 5, lh * (1 + i * 2), ALIGN_TOPLEFT, DTF_NO_EFFECTS); if(!ch->buffer) continue; @@ -1267,7 +1267,7 @@ void Sfx_DebugInfo(void) id : "", ch->buffer->sample ? ch->buffer->sample->size : 0, ch->buffer->bytes, ch->buffer->rate / 1000, ch->buffer->length, ch->buffer->cursor, ch->buffer->written); - FR_DrawTextFragment3(buf, 5, lh * (2 + i * 2), ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 5, lh * (2 + i * 2), ALIGN_TOPLEFT, DTF_NO_EFFECTS); } glDisable(GL_TEXTURE_2D); diff --git a/doomsday/engine/portable/src/ui_main.c b/doomsday/engine/portable/src/ui_main.c index 44bd74b83b..dc913b3930 100644 --- a/doomsday/engine/portable/src/ui_main.c +++ b/doomsday/engine/portable/src/ui_main.c @@ -160,7 +160,7 @@ void UI_PageInit(boolean halttime, boolean tckui, boolean tckframe, boolean drwg // Change font. FR_SetFont(glFontVariable[GLFS_NORMAL]); - uiFontHgt = FR_TextFragmentHeight("W"); + uiFontHgt = FR_TextHeight("W"); // Should the mouse cursor be visible? uiShowMouse = !ArgExists("-nomouse"); @@ -1114,7 +1114,7 @@ void UIEdit_Drawer(ui_object_t* ob) memset(buf, 0, sizeof(buf)); // Does all of it fit in the box? - textWidth = FR_TextFragmentWidth(ob->text); + textWidth = FR_TextWidth(ob->text); if(textWidth > 0 && (unsigned) textWidth > maxw) { // No, it doesn't fit. if(!act) @@ -1625,7 +1625,7 @@ void UISlider_Drawer(ui_object_t* ob) FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); FR_SetShadowStrength(UI_SHADOW_STRENGTH); - UI_TextOutEx2(buf, x + (dat->value < (dat->min + dat->max) / 2 ? inwidth - butw - UI_BAR_BORDER - FR_TextFragmentWidth(buf) : butw + UI_BAR_BORDER), y + inheight / 2, UI_Color(UIC_TEXT), alpha, ALIGN_LEFT, DTF_ONLY_SHADOW); + UI_TextOutEx2(buf, x + (dat->value < (dat->min + dat->max) / 2 ? inwidth - butw - UI_BAR_BORDER - FR_TextWidth(buf) : butw + UI_BAR_BORDER), y + inheight / 2, UI_Color(UIC_TEXT), alpha, ALIGN_LEFT, DTF_ONLY_SHADOW); glDisable(GL_TEXTURE_2D); } @@ -1660,7 +1660,7 @@ void UI_InitColumns(ui_object_t* ob) strncpy(temp, ptr, endptr - ptr); else strcpy(temp, ptr); - w = FR_TextFragmentWidth(temp); + w = FR_TextWidth(temp); if(w > width[c]) width[c] = w; if(!endptr) @@ -1881,7 +1881,7 @@ void UI_TextOutEx2(const char* text, int x, int y, ui_color_t* color, float alph alpha *= uiAlpha; if(alpha <= 0) return; UI_SetColorA(color, alpha); - FR_DrawTextFragment3(text, x, y, alignFlags, textFlags); + FR_DrawText3(text, x, y, alignFlags, textFlags); } void UI_TextOutEx(const char* text, int x, int y, ui_color_t* color, float alpha) @@ -1915,7 +1915,7 @@ int UI_TextOutWrapEx(const char* text, int x, int y, int w, int h, ui_color_t* c *wp++ = c; // Hyphens should be included in the word. // Time to print the word. *wp = 0; - len = FR_TextFragmentWidth(word); + len = FR_TextWidth(word); if(tx + len > x + w) // Doesn't fit? { tx = x; @@ -1924,7 +1924,7 @@ int UI_TextOutWrapEx(const char* text, int x, int y, int w, int h, ui_color_t* c // Can't print any more? (always print the 1st line) if(ty + linehgt > y + h && ty != y) return ty; - FR_DrawTextFragment(word, tx, ty); + FR_DrawText(word, tx, ty); tx += len; wp = word; // React to delimiter. @@ -1934,7 +1934,7 @@ int UI_TextOutWrapEx(const char* text, int x, int y, int w, int h, ui_color_t* c return ty; // All of the text has been printed. case ' ': - tx += FR_TextFragmentWidth(" "); + tx += FR_TextWidth(" "); break; case '\n': diff --git a/doomsday/engine/portable/src/ui_panel.c b/doomsday/engine/portable/src/ui_panel.c index 04e19a1651..3a08043c44 100644 --- a/doomsday/engine/portable/src/ui_panel.c +++ b/doomsday/engine/portable/src/ui_panel.c @@ -1037,8 +1037,8 @@ int CP_LabelText(char *label, char *text, int x, int y, int w, int h, float alph FR_LoadDefaultAttrib(); FR_SetShadowOffset(UI_SHADOW_OFFSET, UI_SHADOW_OFFSET); UI_SetColorA(UI_Color(UIC_TEXT), .5f * alpha * UI_Alpha()); - FR_DrawTextFragment(label, x, y); - ind = FR_TextFragmentWidth(label); + FR_DrawText(label, x, y); + ind = FR_TextWidth(label); return UI_TextOutWrapEx(text, x + ind, y, w - ind, h, UI_Color(UIC_TEXT), alpha); } diff --git a/doomsday/plugins/common/src/hu_inventory.c b/doomsday/plugins/common/src/hu_inventory.c index 77096a2edb..79e5b4b46f 100644 --- a/doomsday/plugins/common/src/hu_inventory.c +++ b/doomsday/plugins/common/src/hu_inventory.c @@ -396,7 +396,7 @@ Draw_BeginZoom(invScale, x, y + ST_INVENTORYHEIGHT); char buf[20]; DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], slot == selected? textAlpha : textAlpha / 2); dd_snprintf(buf, 20, "%i", count); - FR_DrawTextFragment3(buf, posX + ST_INVCOUNTOFFX, y + ST_INVCOUNTOFFY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, posX + ST_INVCOUNTOFFX, y + ST_INVCOUNTOFFY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } } @@ -492,7 +492,7 @@ void Hu_InventoryDraw2(int player, int x, int y, float alpha) char buf[20]; DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], alpha); dd_snprintf(buf, 20, "%i", count); - FR_DrawTextFragment3(buf, x + slot * ST_INVSLOTWIDTH + ST_INVCOUNTOFFX, y + ST_INVCOUNTOFFY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x + slot * ST_INVSLOTWIDTH + ST_INVCOUNTOFFX, y + ST_INVCOUNTOFFY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } } diff --git a/doomsday/plugins/common/src/hu_lib.c b/doomsday/plugins/common/src/hu_lib.c index f92f3393e6..e8cc3e85b0 100644 --- a/doomsday/plugins/common/src/hu_lib.c +++ b/doomsday/plugins/common/src/hu_lib.c @@ -568,7 +568,7 @@ short MN_MergeMenuEffectWithDrawTextFlags(short f) void MN_DrawText2(const char* string, int x, int y, int alignFlags, short textFlags) { if(NULL == string || !string[0]) return; - FR_DrawTextFragment3(string, x, y, alignFlags, MN_MergeMenuEffectWithDrawTextFlags(textFlags)); + FR_DrawText3(string, x, y, alignFlags, MN_MergeMenuEffectWithDrawTextFlags(textFlags)); } void MN_DrawText(const char* string, int x, int y) @@ -1124,7 +1124,7 @@ void MNText_UpdateDimensions(mn_object_t* obj, mn_page_t* page) return; } FR_SetFont(MNPage_PredefinedFont(page, obj->_pageFontIdx)); - FR_TextFragmentDimensions(&obj->_dimensions.width, &obj->_dimensions.height, txt->text); + FR_TextDimensions(&obj->_dimensions.width, &obj->_dimensions.height, txt->text); } } @@ -1434,7 +1434,7 @@ void MNList_Drawer(mn_object_t* obj, int x, int y) } MN_DrawText(item->text, x, y); - y += FR_TextFragmentHeight(item->text) * (1+MNDATA_LIST_LEADING); + y += FR_TextHeight(item->text) * (1+MNDATA_LIST_LEADING); } while(++i < list->count && i < list->first + list->numvis); DGL_Disable(DGL_TEXTURE_2D); @@ -1656,7 +1656,7 @@ void MNList_UpdateDimensions(mn_object_t* obj, mn_page_t* page) { mndata_listitem_t* item = &((mndata_listitem_t*)list->items)[i]; int w, h; - FR_TextFragmentDimensions(&w, &h, item->text); + FR_TextDimensions(&w, &h, item->text); if(w > obj->_dimensions.width) obj->_dimensions.width = w; obj->_dimensions.height += h; @@ -1673,7 +1673,7 @@ void MNList_InlineUpdateDimensions(mn_object_t* obj, mn_page_t* page) mndata_list_t* list = (mndata_list_t*)obj->_typedata; mndata_listitem_t* item = ((mndata_listitem_t*) list->items) + list->selection; FR_SetFont(MNPage_PredefinedFont(page, obj->_pageFontIdx)); - FR_TextFragmentDimensions(&obj->_dimensions.width, &obj->_dimensions.height, item->text); + FR_TextDimensions(&obj->_dimensions.width, &obj->_dimensions.height, item->text); } } @@ -1819,7 +1819,7 @@ void MNButton_UpdateDimensions(mn_object_t* obj, mn_page_t* page) } FR_SetFont(MNPage_PredefinedFont(page, obj->_pageFontIdx)); - FR_TextFragmentDimensions(&obj->_dimensions.width, &obj->_dimensions.height, text); + FR_TextDimensions(&obj->_dimensions.width, &obj->_dimensions.height, text); } } @@ -2350,7 +2350,7 @@ void MNSlider_TextualValueUpdateDimensions(mn_object_t* obj, mn_page_t* page) sldr->data2, sldr->data3, sldr->data4, sldr->data5, 40, textualValue); FR_SetFont(fontId); - FR_TextFragmentDimensions(&obj->_dimensions.width, &obj->_dimensions.height, str); + FR_TextDimensions(&obj->_dimensions.width, &obj->_dimensions.height, str); } } diff --git a/doomsday/plugins/common/src/hu_menu.c b/doomsday/plugins/common/src/hu_menu.c index e14e05a2ba..fccc3bae40 100644 --- a/doomsday/plugins/common/src/hu_menu.c +++ b/doomsday/plugins/common/src/hu_menu.c @@ -1904,7 +1904,7 @@ void Hu_MenuInitEpisodeMenu(void) obj->_pageFontIdx = MENU_FONT2; FR_SetFont(FID(MNPage_PredefinedFont(&EpisodeMenu, obj->_pageFontIdx))); FR_LoadDefaultAttrib(); - w = FR_TextFragmentWidth(text); + w = FR_TextWidth(text); if(w > maxw) maxw = w; obj++; @@ -2035,7 +2035,7 @@ void Hu_MenuInit(void) MNObject_SetShortcut(obj, text[0]); FR_SetFont(MNPage_PredefinedFont(&SkillMenu, MNObject_Font(obj))); FR_LoadDefaultAttrib(); - w = FR_TextFragmentWidth(text); + w = FR_TextWidth(text); if(w > maxw) maxw = w; } diff --git a/doomsday/plugins/common/src/hu_msg.c b/doomsday/plugins/common/src/hu_msg.c index c9b677df5e..fa757d190b 100644 --- a/doomsday/plugins/common/src/hu_msg.c +++ b/doomsday/plugins/common/src/hu_msg.c @@ -215,7 +215,7 @@ static void drawMessage(void) // An additional blank line between the message and response prompt. y += FR_CharHeight('A') * (1+LEADING); - FR_DrawTextFragment3(questionString, x, y, ALIGN_TOP, textFlags); + FR_DrawText3(questionString, x, y, ALIGN_TOP, textFlags); DGL_Disable(DGL_TEXTURE_2D); #undef LEADING diff --git a/doomsday/plugins/common/src/hu_stuff.c b/doomsday/plugins/common/src/hu_stuff.c index 26446b3c04..5fb6d0b4eb 100644 --- a/doomsday/plugins/common/src/hu_stuff.c +++ b/doomsday/plugins/common/src/hu_stuff.c @@ -360,7 +360,7 @@ void HU_DrawText(const char* str, float x, float y, float scale, DGL_Translatef(-x, -y, 0); DGL_Color4f(r, g, b, a); - FR_DrawTextFragment3(str, x, y, alignFlags, textFlags); + FR_DrawText3(str, x, y, alignFlags, textFlags); DGL_MatrixMode(DGL_MODELVIEW); DGL_PopMatrix(); @@ -559,7 +559,7 @@ static void drawTable(float x, float ly, float width, float height, if(columns[n].flags & CF_FIXEDWIDTH) { - colW[n] = FR_TextFragmentWidth(columns[n].label) + CELL_PADDING * 2; + colW[n] = FR_TextWidth(columns[n].label) + CELL_PADDING * 2; fixedWidth += colW[n]; } } @@ -756,14 +756,14 @@ static void drawMapMetaData(float x, float y, float alpha) DGL_Color4f(1, 1, 1, alpha); // Map name: - FR_DrawTextFragment("map: ", x, y + 16); - FR_DrawTextFragment(lname, x += FR_TextFragmentWidth("map: "), y + 16); + FR_DrawText("map: ", x, y + 16); + FR_DrawText(lname, x += FR_TextWidth("map: "), y + 16); x += 8; // Game mode: - FR_DrawTextFragment("gamemode: ", x += FR_TextFragmentWidth(lname), y + 16); - FR_DrawTextFragment(P_GetGameModeName(), x += FR_TextFragmentWidth("gamemode: "), y + 16); + FR_DrawText("gamemode: ", x += FR_TextWidth(lname), y + 16); + FR_DrawText(P_GetGameModeName(), x += FR_TextWidth("gamemode: "), y + 16); } /** @@ -827,7 +827,7 @@ void HU_DrawScoreBoard(int player) DGL_Color4f(1, 0, 0, hud->scoreAlpha); FR_SetFont(FID(GF_FONTB)); FR_LoadDefaultAttrib(); - FR_DrawTextFragment3("ranking", x + width / 2, y + LINE_BORDER, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3("ranking", x + width / 2, y + LINE_BORDER, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTA)); drawMapMetaData(x, y + 16, hud->scoreAlpha); @@ -1111,10 +1111,10 @@ void M_DrawTextFragmentShadowed(const char* string, int x, int y, int alignFlags short textFlags, float r, float g, float b, float a) { DGL_Color4f(0, 0, 0, a * .4f); - FR_DrawTextFragment3(string, x+2, y+2, alignFlags, textFlags); + FR_DrawText3(string, x+2, y+2, alignFlags, textFlags); DGL_Color4f(r, g, b, a); - FR_DrawTextFragment3(string, x, y, alignFlags, textFlags); + FR_DrawText3(string, x, y, alignFlags, textFlags); } const char* Hu_FindPatchReplacementString(patchid_t patchId, int flags) @@ -1598,7 +1598,7 @@ static void drawMapTitle(void) FR_SetFont(FID(GF_FONTB)); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], alpha); - FR_DrawTextFragment3(lname, 0, 0, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3(lname, 0, 0, ALIGN_TOP, DTF_ONLY_SHADOW); DGL_Disable(DGL_TEXTURE_2D); y += 20; @@ -1611,7 +1611,7 @@ static void drawMapTitle(void) FR_SetFont(FID(GF_FONTA)); DGL_Color4f(.5f, .5f, .5f, alpha); - FR_DrawTextFragment3(lauthor, 0, y, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3(lauthor, 0, y, ALIGN_TOP, DTF_ONLY_SHADOW); DGL_Disable(DGL_TEXTURE_2D); } diff --git a/doomsday/plugins/common/src/m_ctrl.c b/doomsday/plugins/common/src/m_ctrl.c index 9450fd377b..5da1478df9 100644 --- a/doomsday/plugins/common/src/m_ctrl.c +++ b/doomsday/plugins/common/src/m_ctrl.c @@ -402,7 +402,7 @@ static void drawSmallText(const char* string, int x, int y, float alpha) { int height; - height = FR_TextFragmentHeight(string); + height = FR_TextHeight(string); DGL_MatrixMode(DGL_MODELVIEW); DGL_PushMatrix(); @@ -412,7 +412,7 @@ static void drawSmallText(const char* string, int x, int y, float alpha) DGL_Translatef(-x, -y - height/2, 0); DGL_Color4f(1, 1, 1, alpha); - FR_DrawTextFragment3(string, x, y, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(string, x, y, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_MatrixMode(DGL_MODELVIEW); DGL_PopMatrix(); @@ -438,8 +438,8 @@ static void drawBinding(bindingitertype_t type, int bid, const char* name, if(type == MIBT_KEY) { - width = FR_TextFragmentWidth(name); - height = FR_TextFragmentHeight(name); + width = FR_TextWidth(name); + height = FR_TextHeight(name); DGL_SetNoMaterial(); DGL_DrawRectColor(d->x, d->y, width*SMALL_SCALE + 2, height, bgRGB[0], bgRGB[1], bgRGB[2], d->alpha * .6f); @@ -456,8 +456,8 @@ static void drawBinding(bindingitertype_t type, int bid, const char* name, sprintf(temp, "%s%c%s", type == MIBT_MOUSE? "mouse" : "joy", isInverse? '-' : '+', name); - width = FR_TextFragmentWidth(temp); - height = FR_TextFragmentHeight(temp); + width = FR_TextWidth(temp); + height = FR_TextHeight(temp); DGL_Enable(DGL_TEXTURE_2D); drawSmallText(temp, d->x, d->y, d->alpha); diff --git a/doomsday/plugins/jdoom/src/st_stuff.c b/doomsday/plugins/jdoom/src/st_stuff.c index 725f5ee22c..9293bbda95 100644 --- a/doomsday/plugins/jdoom/src/st_stuff.c +++ b/doomsday/plugins/jdoom/src/st_stuff.c @@ -981,7 +981,7 @@ void SBarReadyAmmo_Drawer(uiwidget_t* obj, int x, int y) DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); @@ -1013,7 +1013,7 @@ void SBarReadyAmmo_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", ammo->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1075,7 +1075,7 @@ void Ammo_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB3[CR], defFontRGB3[CG], defFontRGB3[CB], textAlpha); - FR_DrawTextFragment3(buf, ORIGINX+loc->x, ORIGINY+loc->y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, ORIGINX+loc->x, ORIGINY+loc->y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1159,7 +1159,7 @@ void MaxAmmo_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB3[CR], defFontRGB3[CG], defFontRGB3[CB], textAlpha); - FR_DrawTextFragment3(buf, ORIGINX+loc->x, ORIGINY+loc->y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, ORIGINX+loc->x, ORIGINY+loc->y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1236,7 +1236,7 @@ void SBarHealth_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); FR_DrawChar('%', X, Y); DGL_Disable(DGL_TEXTURE_2D); @@ -1269,8 +1269,8 @@ void SBarHealth_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", hlth->value); FR_SetFont(obj->fontId); - obj->dimensions.width = (FR_TextFragmentWidth(buf) + FR_CharWidth('%')) * cfg.statusbarScale; - obj->dimensions.height = MAX_OF(FR_TextFragmentHeight(buf), FR_CharHeight('%')) * cfg.statusbarScale; + obj->dimensions.width = (FR_TextWidth(buf) + FR_CharWidth('%')) * cfg.statusbarScale; + obj->dimensions.height = MAX_OF(FR_TextHeight(buf), FR_CharHeight('%')) * cfg.statusbarScale; } } @@ -1322,7 +1322,7 @@ void SBarArmor_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); FR_DrawChar('%', X, Y); DGL_Disable(DGL_TEXTURE_2D); @@ -1355,8 +1355,8 @@ void SBarArmor_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", armor->value); FR_SetFont(obj->fontId); - obj->dimensions.width = (FR_TextFragmentWidth(buf) + FR_CharWidth('%')) * cfg.statusbarScale; - obj->dimensions.height = MAX_OF(FR_TextFragmentHeight(buf), FR_CharHeight('%')) * cfg.statusbarScale; + obj->dimensions.width = (FR_TextWidth(buf) + FR_CharWidth('%')) * cfg.statusbarScale; + obj->dimensions.height = MAX_OF(FR_TextHeight(buf), FR_CharHeight('%')) * cfg.statusbarScale; } } @@ -1414,7 +1414,7 @@ void SBarFrags_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1447,7 +1447,7 @@ void SBarFrags_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", frags->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1902,7 +1902,7 @@ void Frags_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1931,7 +1931,7 @@ void Frags_UpdateDimensions(uiwidget_t* obj) sprintf(buf, "FRAGS:%i", frags->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -1962,7 +1962,7 @@ void Health_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1989,7 +1989,7 @@ void Health_UpdateDimensions(uiwidget_t* obj) sprintf(buf, "%i%%", hlth->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2067,7 +2067,7 @@ void ReadyAmmo_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2096,7 +2096,7 @@ void ReadyAmmo_UpdateDimensions(uiwidget_t* obj) sprintf(buf, "%i", ammo->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2275,7 +2275,7 @@ void Armor_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2305,7 +2305,7 @@ void Armor_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i%%", armor->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2578,7 +2578,7 @@ void Kills_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2620,7 +2620,7 @@ void Kills_UpdateDimensions(uiwidget_t* obj) } FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudCheatCounterScale; obj->dimensions.height *= cfg.hudCheatCounterScale; } @@ -2677,7 +2677,7 @@ void Items_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2719,7 +2719,7 @@ void Items_UpdateDimensions(uiwidget_t* obj) } FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudCheatCounterScale; obj->dimensions.height *= cfg.hudCheatCounterScale; } @@ -2764,7 +2764,7 @@ void Secrets_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2818,7 +2818,7 @@ void Secrets_UpdateDimensions(uiwidget_t* obj) } FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudCheatCounterScale; obj->dimensions.height *= cfg.hudCheatCounterScale; } diff --git a/doomsday/plugins/jdoom/src/wi_stuff.c b/doomsday/plugins/jdoom/src/wi_stuff.c index 6c108c5579..15be5dbff9 100644 --- a/doomsday/plugins/jdoom/src/wi_stuff.c +++ b/doomsday/plugins/jdoom/src/wi_stuff.c @@ -444,7 +444,7 @@ static void drawPercent(int x, int y, int p) dd_snprintf(buf, 20, "%i", p); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1); FR_DrawChar('%', x, y); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } /** @@ -467,10 +467,10 @@ static void drawTime(int x, int y, int t) if(minutes > 0) { dd_snprintf(buf, 20, "%d", minutes); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } dd_snprintf(buf, 20, "%02d", seconds); - FR_DrawTextFragment(buf, x+FR_CharWidth(':'), y); + FR_DrawText(buf, x+FR_CharWidth(':'), y); return; } @@ -710,8 +710,8 @@ static void drawDeathmatchStats(void) FR_SetTracking(0); DGL_Color4f(1, 1, 1, 1); - FR_DrawTextFragment(tmp, x - info.width / 2 + 1, DM_MATRIXY - WI_SPACINGY + info.height - 8); - FR_DrawTextFragment(tmp, DM_MATRIXX - info.width / 2 + 1, y + info.height - 8); + FR_DrawText(tmp, x - info.width / 2 + 1, DM_MATRIXY - WI_SPACINGY + info.height - 8); + FR_DrawText(tmp, DM_MATRIXX - info.width / 2 + 1, y + info.height - 8); } } else @@ -746,12 +746,12 @@ static void drawDeathmatchStats(void) if(teamInfo[j].playerCount > 0) { dd_snprintf(buf, 20, "%i", dmFrags[i][j]); - FR_DrawTextFragment3(buf, x + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } x += DM_SPACINGX; } dd_snprintf(buf, 20, "%i", dmTotals[i]); - FR_DrawTextFragment3(buf, DM_TOTALSX + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, DM_TOTALSX + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } y += WI_SPACINGY; @@ -967,7 +967,7 @@ static void drawNetgameStats(void) sprintf(tmp, "%i", teamInfo[i].playerCount); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(1, 1, 1, 1); - FR_DrawTextFragment(tmp, x - info.width + 1, y + info.height - 8); + FR_DrawText(tmp, x - info.width + 1, y + info.height - 8); } if(i == inPlayerTeam) @@ -988,7 +988,7 @@ static void drawNetgameStats(void) { char buf[20]; dd_snprintf(buf, 20, "%i", cntFrags[i]); - FR_DrawTextFragment3(buf, x, y + 10, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y + 10, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } y += WI_SPACINGY; diff --git a/doomsday/plugins/jdoom64/src/st_stuff.c b/doomsday/plugins/jdoom64/src/st_stuff.c index a80ed4f055..85d68b2b36 100644 --- a/doomsday/plugins/jdoom64/src/st_stuff.c +++ b/doomsday/plugins/jdoom64/src/st_stuff.c @@ -366,7 +366,7 @@ static void drawWidgets(hudstate_t* hud) DGL_Color4f(1, 1, 1, hud->alpha); - FR_DrawTextFragment3(buf, ST_FRAGSX, ST_FRAGSY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, ST_FRAGSX, ST_FRAGSY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); } @@ -478,7 +478,7 @@ void ST_doFullscreenStuff(int player) FR_SetFont(FID(GF_FONTA)); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textalpha); - FR_DrawTextFragment3(buf, HUDBORDERX, i, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, HUDBORDERX, i, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); } @@ -499,19 +499,19 @@ void ST_doFullscreenStuff(int player) FR_SetFont(FID(GF_FONTA)); DGL_Color4f(1, 1, 1, iconalpha); - pos = FR_TextFragmentWidth(buf)/2; - FR_DrawTextFragment3(buf, HUDBORDERX, h_height - HUDBORDERY - 4, ALIGN_BOTTOM, DTF_NO_EFFECTS); + pos = FR_TextWidth(buf)/2; + FR_DrawText3(buf, HUDBORDERX, h_height - HUDBORDERY - 4, ALIGN_BOTTOM, DTF_NO_EFFECTS); sprintf(buf, "%i", plr->health); FR_SetFont(FID(GF_FONTB)); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textalpha); - FR_DrawTextFragment3(buf, HUDBORDERX + pos, h_height - HUDBORDERY, ALIGN_BOTTOM, DTF_NO_EFFECTS); + FR_DrawText3(buf, HUDBORDERX + pos, h_height - HUDBORDERY, ALIGN_BOTTOM, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); oldPos = pos; - pos = HUDBORDERX * 2 + FR_TextFragmentWidth(buf); + pos = HUDBORDERX * 2 + FR_TextWidth(buf); } // Keys | use a bit of extra scale. @@ -583,7 +583,7 @@ Draw_EndZoom(); FR_SetFont(FID(GF_FONTB)); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textalpha); - FR_DrawTextFragment3(buf, pos, h_height - HUDBORDERY, ALIGN_TOP, DTF_NO_EFFECTS); + FR_DrawText3(buf, pos, h_height - HUDBORDERY, ALIGN_TOP, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); break; @@ -598,13 +598,13 @@ Draw_EndZoom(); DGL_Enable(DGL_TEXTURE_2D); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(1, 1, 1, iconalpha); - w = FR_TextFragmentWidth(buf); - FR_DrawTextFragment3(buf, h_width - HUDBORDERX, h_height - HUDBORDERY - 4, ALIGN_BOTTOMRIGHT, DTF_NO_EFFECTS); + w = FR_TextWidth(buf); + FR_DrawText3(buf, h_width - HUDBORDERX, h_height - HUDBORDERY - 4, ALIGN_BOTTOMRIGHT, DTF_NO_EFFECTS); sprintf(buf, "%i", plr->armorPoints); FR_SetFont(FID(GF_FONTB)); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textalpha); - FR_DrawTextFragment3(buf, h_width - (w/2) - HUDBORDERX, h_height - HUDBORDERY, ALIGN_BOTTOMRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, h_width - (w/2) - HUDBORDERX, h_height - HUDBORDERY, ALIGN_BOTTOMRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); } diff --git a/doomsday/plugins/jdoom64/src/wi_stuff.c b/doomsday/plugins/jdoom64/src/wi_stuff.c index 05e747cec6..ecc728f4d3 100644 --- a/doomsday/plugins/jdoom64/src/wi_stuff.c +++ b/doomsday/plugins/jdoom64/src/wi_stuff.c @@ -197,7 +197,7 @@ static void drawPercent(int x, int y, int p) DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], 1); FR_DrawChar('%', x, y); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } /** @@ -220,10 +220,10 @@ static void drawTime(int x, int y, int t) if(minutes > 0) { dd_snprintf(buf, 20, "%d", minutes); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } dd_snprintf(buf, 20, "%02d", seconds); - FR_DrawTextFragment(buf, x+FR_CharWidth(':'), y); + FR_DrawText(buf, x+FR_CharWidth(':'), y); return; } @@ -406,8 +406,8 @@ static void drawDeathmatchStats(void) FR_SetFont(FID(GF_FONTA)); DGL_Color4f(1, 1, 1, 1); - FR_DrawTextFragment(tmp, x - info.width / 2 + 1, DM_MATRIXY - WI_SPACINGY + info.height - 8); - FR_DrawTextFragment(tmp, DM_MATRIXX - info.width / 2 + 1, y + info.height - 8); + FR_DrawText(tmp, x - info.width / 2 + 1, DM_MATRIXY - WI_SPACINGY + info.height - 8); + FR_DrawText(tmp, DM_MATRIXX - info.width / 2 + 1, y + info.height - 8); } } else @@ -440,12 +440,12 @@ static void drawDeathmatchStats(void) if(teamInfo[j].playerCount > 0) { dd_snprintf(buf, 20, "%i", dmFrags[i][j]); - FR_DrawTextFragment3(buf, x + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } x += DM_SPACINGX; } dd_snprintf(buf, 20, "%i", dmTotals[i]); - FR_DrawTextFragment3(buf, DM_TOTALSX + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, DM_TOTALSX + w, y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } y += WI_SPACINGY; @@ -657,7 +657,7 @@ static void drawNetgameStats(void) sprintf(tmp, "%i", teamInfo[i].playerCount); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(1, 1, 1, 1); - FR_DrawTextFragment(tmp, x - info.width + 1, y + info.height - 8); + FR_DrawText(tmp, x - info.width + 1, y + info.height - 8); } //if(i == inPlayerTeam) @@ -678,7 +678,7 @@ static void drawNetgameStats(void) { char buf[20]; dd_snprintf(buf, 20, "%i", cntFrags[i]); - FR_DrawTextFragment3(buf, x, y + 10, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y + 10, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } y += WI_SPACINGY; diff --git a/doomsday/plugins/jheretic/src/in_lude.c b/doomsday/plugins/jheretic/src/in_lude.c index ff91a863b8..b428a0e2ba 100644 --- a/doomsday/plugins/jheretic/src/in_lude.c +++ b/doomsday/plugins/jheretic/src/in_lude.c @@ -176,7 +176,7 @@ void IN_DrawTime(int x, int y, int h, int m, int s, float r, float g, float b, f dd_snprintf(buf, 20, "%02d", s); M_DrawTextFragmentShadowed(buf, x, y, ALIGN_TOPRIGHT, 0, r, g, b, a); - x -= FR_TextFragmentWidth(buf) + FR_Tracking() * 3; + x -= FR_TextWidth(buf) + FR_Tracking() * 3; M_DrawTextFragmentShadowed(":", x, y, ALIGN_TOPRIGHT, 0, r, g, b, a); x -= FR_CharWidth(':') + 3; @@ -184,7 +184,7 @@ void IN_DrawTime(int x, int y, int h, int m, int s, float r, float g, float b, f { dd_snprintf(buf, 20, "%02d", m); M_DrawTextFragmentShadowed(buf, x, y, ALIGN_TOPRIGHT, 0, r, g, b, a); - x -= FR_TextFragmentWidth(buf) + FR_Tracking() * 3; + x -= FR_TextWidth(buf) + FR_Tracking() * 3; } if(h) @@ -662,11 +662,11 @@ void IN_DrawOldLevel(void) FR_LoadDefaultAttrib(); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment3(P_GetShortMapName(wbs->episode, wbs->currentMap), 160, 3, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3(P_GetShortMapName(wbs->episode, wbs->currentMap), 160, 3, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(defFontRGB3[0], defFontRGB3[1],defFontRGB3[2], 1); - FR_DrawTextFragment3("FINISHED", 160, 25, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3("FINISHED", 160, 25, ALIGN_TOP, DTF_ONLY_SHADOW); if(wbs->currentMap == 8) { @@ -712,11 +712,11 @@ void IN_DrawYAH(void) FR_SetFont(FID(GF_FONTA)); FR_LoadDefaultAttrib(); DGL_Color4f(defFontRGB3[0], defFontRGB3[1], defFontRGB3[2], 1); - FR_DrawTextFragment3("NOW ENTERING:", 160, 10, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3("NOW ENTERING:", 160, 10, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTB)); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment3(P_GetShortMapName(wbs->episode, wbs->nextMap), 160, 20, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3(P_GetShortMapName(wbs->episode, wbs->nextMap), 160, 20, ALIGN_TOP, DTF_ONLY_SHADOW); DGL_Color4f(1, 1, 1, 1); for(i = 0; i < wbs->nextMap; ++i) @@ -748,15 +748,15 @@ void IN_DrawSingleStats(void) FR_LoadDefaultAttrib(); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment("KILLS", 50, 65); - FR_DrawTextFragment("ITEMS", 50, 90); - FR_DrawTextFragment("SECRETS", 50, 115); - FR_DrawTextFragment3(P_GetShortMapName(wbs->episode, wbs->currentMap), 160, 3, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText("KILLS", 50, 65); + FR_DrawText("ITEMS", 50, 90); + FR_DrawText("SECRETS", 50, 115); + FR_DrawText3(P_GetShortMapName(wbs->episode, wbs->currentMap), 160, 3, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(defFontRGB3[0], defFontRGB3[1], defFontRGB3[2], 1); - FR_DrawTextFragment3("FINISHED", 160, 25, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3("FINISHED", 160, 25, ALIGN_TOP, DTF_ONLY_SHADOW); DGL_Disable(DGL_TEXTURE_2D); @@ -847,7 +847,7 @@ void IN_DrawSingleStats(void) FR_SetFont(FID(GF_FONTB)); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment("TIME", 85, 160); + FR_DrawText("TIME", 85, 160); IN_DrawTime(284, 160, hours, minutes, seconds, defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); @@ -859,11 +859,11 @@ void IN_DrawSingleStats(void) FR_SetFont(FID(GF_FONTA)); DGL_Color4f(defFontRGB3[0], defFontRGB3[1], defFontRGB3[2], 1); - FR_DrawTextFragment3("NOW ENTERING:", SCREENWIDTH/2, 160, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3("NOW ENTERING:", SCREENWIDTH/2, 160, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTB)); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment3(P_GetShortMapName(wbs->episode, wbs->nextMap), 160, 170, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3(P_GetShortMapName(wbs->episode, wbs->nextMap), 160, 170, ALIGN_TOP, DTF_ONLY_SHADOW); DGL_Disable(DGL_TEXTURE_2D); @@ -887,14 +887,14 @@ void IN_DrawCoopStats(void) FR_LoadDefaultAttrib(); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment("KILLS", 95, 35); - FR_DrawTextFragment("BONUS", 155, 35); - FR_DrawTextFragment("SECRET", 232, 35); - FR_DrawTextFragment3(P_GetShortMapName(wbs->episode, wbs->currentMap), SCREENWIDTH/2, 3, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText("KILLS", 95, 35); + FR_DrawText("BONUS", 155, 35); + FR_DrawText("SECRET", 232, 35); + FR_DrawText3(P_GetShortMapName(wbs->episode, wbs->currentMap), SCREENWIDTH/2, 3, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(defFontRGB3[0], defFontRGB3[1], defFontRGB3[2], 1); - FR_DrawTextFragment3("FINISHED", SCREENWIDTH/2, 25, ALIGN_TOP, DTF_ONLY_SHADOW); + FR_DrawText3("FINISHED", SCREENWIDTH/2, 25, ALIGN_TOP, DTF_ONLY_SHADOW); FR_SetFont(FID(GF_FONTB)); FR_SetTracking(TRACKING); @@ -958,15 +958,15 @@ void IN_DrawDMStats(void) FR_SetFont(FID(GF_FONTB)); FR_LoadDefaultAttrib(); DGL_Color4f(defFontRGB[0], defFontRGB[1], defFontRGB[2], 1); - FR_DrawTextFragment("TOTAL", 265, 30); + FR_DrawText("TOTAL", 265, 30); FR_SetFont(FID(GF_FONTA)); DGL_Color4f(defFontRGB3[0], defFontRGB3[1], defFontRGB3[2], 1); - FR_DrawTextFragment("VICTIMS", 140, 8); + FR_DrawText("VICTIMS", 140, 8); for(i = 0; i < 7; ++i) { - FR_DrawTextFragment(killersText[i], 10, 80 + 9 * i); + FR_DrawText(killersText[i], 10, 80 + 9 * i); } DGL_Disable(DGL_TEXTURE_2D); diff --git a/doomsday/plugins/jheretic/src/st_stuff.c b/doomsday/plugins/jheretic/src/st_stuff.c index 7fd8d389e5..7a46434158 100644 --- a/doomsday/plugins/jheretic/src/st_stuff.c +++ b/doomsday/plugins/jheretic/src/st_stuff.c @@ -844,7 +844,7 @@ void SBarFrags_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -881,7 +881,7 @@ void SBarFrags_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", frags->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -939,7 +939,7 @@ void SBarHealth_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -977,7 +977,7 @@ void SBarHealth_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", hlth->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1036,7 +1036,7 @@ void SBarArmor_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1074,7 +1074,7 @@ void SBarArmor_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", armor->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1228,7 +1228,7 @@ void SBarReadyAmmo_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], iconAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1266,7 +1266,7 @@ void SBarReadyAmmo_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", ammo->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1452,7 +1452,7 @@ void SBarReadyItem_Drawer(uiwidget_t* obj, int xOffset, int yOffset) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, ORIGINX+ST_INVITEMCX, ORIGINY+ST_INVITEMCY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, ORIGINX+ST_INVITEMCX, ORIGINY+ST_INVITEMCY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } } @@ -1713,7 +1713,7 @@ void Tome_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, 0, 25 + 2, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 25 + 2, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); @@ -1759,10 +1759,10 @@ void Tome_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", tome->countdownSeconds); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - w = FR_TextFragmentWidth(buf); + w = FR_TextWidth(buf); if(w > obj->dimensions.width) obj->dimensions.width += w; - obj->dimensions.height += FR_TextFragmentHeight(buf) + 2; + obj->dimensions.height += FR_TextHeight(buf) + 2; #undef TRACKING } @@ -1909,7 +1909,7 @@ void ReadyAmmo_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, 0, -2, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, -2, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1942,7 +1942,7 @@ void ReadyAmmo_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", ammo->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -1979,10 +1979,10 @@ void Health_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(0, 0, 0, textAlpha * .4f); - FR_DrawTextFragment3(buf, 2, 1, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 2, 1, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, -1, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, -1, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2014,7 +2014,7 @@ void Health_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 5, "%i", health); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2051,7 +2051,7 @@ void Armor_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, -1, -11, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, -1, -11, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2084,7 +2084,7 @@ void Armor_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", armor->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2240,7 +2240,7 @@ void Frags_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2274,7 +2274,7 @@ void Frags_UpdateDimensions(uiwidget_t* obj) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2337,7 +2337,7 @@ void ReadyItem_Drawer(uiwidget_t* obj, int x, int y) FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); dd_snprintf(buf, 20, "%i", count); - FR_DrawTextFragment3(buf, -1, -7, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, -1, -7, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); } } @@ -2478,7 +2478,7 @@ void Kills_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2518,7 +2518,7 @@ void Kills_UpdateDimensions(uiwidget_t* obj) } FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudCheatCounterScale; obj->dimensions.height *= cfg.hudCheatCounterScale; } @@ -2573,7 +2573,7 @@ void Items_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2613,7 +2613,7 @@ void Items_UpdateDimensions(uiwidget_t* obj) } FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudCheatCounterScale; obj->dimensions.height *= cfg.hudCheatCounterScale; } @@ -2668,7 +2668,7 @@ void Secrets_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2708,7 +2708,7 @@ void Secrets_UpdateDimensions(uiwidget_t* obj) } FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudCheatCounterScale; obj->dimensions.height *= cfg.hudCheatCounterScale; } diff --git a/doomsday/plugins/jhexen/src/in_lude.c b/doomsday/plugins/jhexen/src/in_lude.c index f19c86b3d9..6c1601ba0a 100644 --- a/doomsday/plugins/jhexen/src/in_lude.c +++ b/doomsday/plugins/jhexen/src/in_lude.c @@ -432,12 +432,12 @@ static void drawDeathTally(void) if(bold) { DGL_Color4f(1, 0.7f, 0.3f, 1); - FR_DrawTextFragment3("--", x, y, ALIGN_TOP, DTF_NO_EFFECTS); + FR_DrawText3("--", x, y, ALIGN_TOP, DTF_NO_EFFECTS); } else { DGL_Color4f(1, 1, 1, 1); - FR_DrawTextFragment("--", x, y); + FR_DrawText("--", x, y); } } } @@ -465,7 +465,7 @@ static void drawNumber(int val, int x, int y, int wrapThresh) } DGL_Color4f(1, 1, 1, 1); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOP, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOP, DTF_NO_EFFECTS); } static void drawNumberBold(int val, int x, int y, int wrapThresh) @@ -478,5 +478,5 @@ static void drawNumberBold(int val, int x, int y, int wrapThresh) } DGL_Color4f(1, 0.7f, 0.3f, 1); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOP, DTF_NO_EFFECTS); + FR_DrawText3(buf, x, y, ALIGN_TOP, DTF_NO_EFFECTS); } diff --git a/doomsday/plugins/jhexen/src/st_stuff.c b/doomsday/plugins/jhexen/src/st_stuff.c index c1d7364b85..fc3389f007 100644 --- a/doomsday/plugins/jhexen/src/st_stuff.c +++ b/doomsday/plugins/jhexen/src/st_stuff.c @@ -1437,7 +1437,7 @@ void SBarFrags_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1474,7 +1474,7 @@ void SBarFrags_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", frags->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1533,7 +1533,7 @@ void SBarHealth_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1571,7 +1571,7 @@ void SBarHealth_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", hlth->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1634,7 +1634,7 @@ void SBarArmor_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1672,7 +1672,7 @@ void SBarArmor_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", armor->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1728,7 +1728,7 @@ void SBarBlueMana_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1762,7 +1762,7 @@ void SBarBlueMana_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", mana->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1817,7 +1817,7 @@ void SBarGreenMana_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, X, Y, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1851,7 +1851,7 @@ void SBarGreenMana_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", mana->value); FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.statusbarScale; obj->dimensions.height *= cfg.statusbarScale; } @@ -1945,7 +1945,7 @@ void SBarReadyItem_Drawer(uiwidget_t* obj, int xOffset, int yOffset) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); dd_snprintf(buf, 20, "%i", count); - FR_DrawTextFragment3(buf, ORIGINX+ST_INVITEMCX, ORIGINY+ST_INVITEMCY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, ORIGINX+ST_INVITEMCX, ORIGINY+ST_INVITEMCY, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } } @@ -2453,7 +2453,7 @@ void Health_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(cfg.hudColor[0], cfg.hudColor[1], cfg.hudColor[2], textAlpha); - FR_DrawTextFragment3(buf, -1, -1, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, -1, -1, ALIGN_BOTTOMLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2488,7 +2488,7 @@ void Health_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2580,7 +2580,7 @@ void BlueMana_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2613,7 +2613,7 @@ void BlueMana_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", mana->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2704,7 +2704,7 @@ void GreenMana_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, 0, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2738,7 +2738,7 @@ void GreenMana_UpdateDimensions(uiwidget_t* obj) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2776,7 +2776,7 @@ void Frags_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); - FR_DrawTextFragment3(buf, 0, -13, ALIGN_TOPLEFT, DTF_NO_EFFECTS); + FR_DrawText3(buf, 0, -13, ALIGN_TOPLEFT, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -2810,7 +2810,7 @@ void Frags_UpdateDimensions(uiwidget_t* obj) dd_snprintf(buf, 20, "%i", frags->value); FR_SetFont(obj->fontId); FR_SetTracking(TRACKING); - FR_TextFragmentDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); + FR_TextDimensions(&obj->dimensions.width, &obj->dimensions.height, buf); obj->dimensions.width *= cfg.hudScale; obj->dimensions.height *= cfg.hudScale; } @@ -2875,7 +2875,7 @@ void ReadyItem_Drawer(uiwidget_t* obj, int x, int y) FR_SetFont(obj->fontId); DGL_Color4f(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); dd_snprintf(buf, 20, "%i", count); - FR_DrawTextFragment3(buf, -2, -7, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); + FR_DrawText3(buf, -2, -7, ALIGN_TOPRIGHT, DTF_NO_EFFECTS); } } @@ -2999,8 +2999,8 @@ void WorldTimer_Drawer(uiwidget_t* obj, int xOffset, int yOffset) return; FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&counterWidth, &lineHeight, "00"); - spacerWidth = FR_TextFragmentWidth(" : "); + FR_TextDimensions(&counterWidth, &lineHeight, "00"); + spacerWidth = FR_TextWidth(" : "); DGL_MatrixMode(DGL_MODELVIEW); DGL_PushMatrix(); @@ -3013,19 +3013,19 @@ void WorldTimer_Drawer(uiwidget_t* obj, int xOffset, int yOffset) x = ORIGINX; y = ORIGINY; dd_snprintf(buf, 20, "%.2d", time->seconds); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DRAWFLAGS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DRAWFLAGS); x -= counterWidth + spacerWidth; FR_DrawChar3(':', x + spacerWidth/2, y, ALIGN_TOP, DRAWFLAGS); dd_snprintf(buf, 20, "%.2d", time->minutes); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DRAWFLAGS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DRAWFLAGS); x -= counterWidth + spacerWidth; FR_DrawChar3(':', x + spacerWidth/2, y, ALIGN_TOP, DRAWFLAGS); dd_snprintf(buf, 20, "%.2d", time->hours); - FR_DrawTextFragment3(buf, x, y, ALIGN_TOPRIGHT, DRAWFLAGS); + FR_DrawText3(buf, x, y, ALIGN_TOPRIGHT, DRAWFLAGS); x -= counterWidth; y += lineHeight; @@ -3033,15 +3033,15 @@ void WorldTimer_Drawer(uiwidget_t* obj, int xOffset, int yOffset) { y += lineHeight * LEADING; dd_snprintf(buf, 20, "%.2d %s", time->days, time->days == 1? "day" : "days"); - FR_DrawTextFragment3(buf, ORIGINX, y, ALIGN_TOPRIGHT, DRAWFLAGS); + FR_DrawText3(buf, ORIGINX, y, ALIGN_TOPRIGHT, DRAWFLAGS); y += lineHeight; if(time->days >= 5) { y += lineHeight * LEADING; strncpy(buf, "You Freak!!!", 20); - FR_DrawTextFragment3(buf, ORIGINX, y, ALIGN_TOPRIGHT, DRAWFLAGS); - x = -MAX_OF(abs(x), FR_TextFragmentWidth(buf)); + FR_DrawText3(buf, ORIGINX, y, ALIGN_TOPRIGHT, DRAWFLAGS); + x = -MAX_OF(abs(x), FR_TextWidth(buf)); y += lineHeight; } } @@ -3075,8 +3075,8 @@ void WorldTimer_UpdateDimensions(uiwidget_t* obj) return; FR_SetFont(obj->fontId); - FR_TextFragmentDimensions(&counterWidth, &lineHeight, "00"); - spacerWidth = FR_TextFragmentWidth(" : "); + FR_TextDimensions(&counterWidth, &lineHeight, "00"); + spacerWidth = FR_TextWidth(" : "); x = ORIGINX; y = ORIGINY; @@ -3100,7 +3100,7 @@ void WorldTimer_UpdateDimensions(uiwidget_t* obj) { y += lineHeight * LEADING; strncpy(buf, "You Freak!!!", 20); - x = -MAX_OF(abs(x), FR_TextFragmentWidth(buf)); + x = -MAX_OF(abs(x), FR_TextWidth(buf)); y += lineHeight; } }