Skip to content

Commit

Permalink
Fixed: Missing stats from the jHeretic intermission.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Jun 1, 2009
1 parent cdfd576 commit fa616eb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions doomsday/plugins/common/include/hu_stuff.h
Expand Up @@ -120,7 +120,7 @@ void M_WriteText3(int x, int y, const char *string,
void HUlib_drawTextLine2(int x, int y, const char* string,
size_t len, gamefontid_t font,
boolean drawcursor);
void M_DrawChar(int x, int y, int ch, gamefontid_t font);
void M_DrawChar(int x, int y, unsigned char ch, gamefontid_t font);
#if __JHERETIC__ || __JHEXEN__
void Hu_DrawSmallNum(int val, int numDigits, int x, int y,
float alpha);
Expand All @@ -130,7 +130,7 @@ void HU_DrawBNumber(signed int val, int x, int y, float red,
float green, float blue, float alpha);
void IN_DrawNumber(int val, int x, int y, int digits, float r, float g,
float b, float a);
void IN_DrawShadowChar(int x, int y, int ch, gamefontid_t font);
void IN_DrawShadowChar(int x, int y, unsigned char ch, gamefontid_t font);
#endif
#if __JHEXEN__
void DrBNumber(int val, int x, int y, float red, float green, float blue,
Expand Down
34 changes: 17 additions & 17 deletions doomsday/plugins/common/src/hu_stuff.c
Expand Up @@ -2085,7 +2085,7 @@ void M_LetterFlash(int x, int y, int w, int h, int bright, float r, float g,
DGL_BlendMode(BM_NORMAL);
}

void M_DrawChar(int x, int y, int ch, gamefontid_t font)
void M_DrawChar(int x, int y, unsigned char ch, gamefontid_t font)
{
lumpnum_t lump;

Expand Down Expand Up @@ -2139,7 +2139,7 @@ void HU_DrawBNumber(signed int val, int x, int y, float red,

if(val > 99)
{
patch = &gFonts[GF_FONTB].chars[15 + val / 100].patch;
patch = &gFonts[GF_FONTB].chars['0' + val / 100].patch;

GL_DrawPatchLitAlpha(xpos + 8 - patch->width / 2, y +2, 0, alpha * .4f,
patch->lump);
Expand All @@ -2152,7 +2152,7 @@ void HU_DrawBNumber(signed int val, int x, int y, float red,
xpos += 12;
if(val > 9 || oldval > 99)
{
patch = &gFonts[GF_FONTB].chars[15 + val / 10].patch;
patch = &gFonts[GF_FONTB].chars['0' + val / 10].patch;

GL_DrawPatchLitAlpha(xpos + 8 - patch->width / 2, y +2, 0, alpha * .4f,
patch->lump);
Expand All @@ -2163,7 +2163,7 @@ void HU_DrawBNumber(signed int val, int x, int y, float red,

val = val % 10;
xpos += 12;
patch = &gFonts[GF_FONTB].chars[15 + val].patch;
patch = &gFonts[GF_FONTB].chars['0' + val].patch;

GL_DrawPatchLitAlpha(xpos + 8 - patch->width / 2, y +2, 0, alpha * .4f,
patch->lump);
Expand All @@ -2174,7 +2174,7 @@ void HU_DrawBNumber(signed int val, int x, int y, float red,
#endif

#if __JHERETIC__
void IN_DrawShadowChar(int x, int y, int ch, gamefontid_t font)
void IN_DrawShadowChar(int x, int y, unsigned char ch, gamefontid_t font)
{
GL_DrawPatchLitAlpha(x+2, y+2, 0, .4f,
gFonts[font].chars[ch].patch.lump);
Expand Down Expand Up @@ -2248,18 +2248,18 @@ void IN_DrawNumber(int val, int x, int y, int digits, float r, float g,

if(digits == 4)
{
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars[val / 1000].patch.width / 2 - 12, y + 2, 0, .4f, gFonts[GF_FONTB].chars[15+val / 1000].patch.lump);
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars['0' + val / 1000].patch.width / 2 - 12, y + 2, 0, .4f, gFonts[GF_FONTB].chars['0' + val / 1000].patch.lump);
DGL_Color4f(r, g, b, a);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars[val / 1000].patch.width / 2 - 12, y, gFonts[GF_FONTB].chars[15+val / 1000].patch.lump);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars['0' + val / 1000].patch.width / 2 - 12, y, gFonts[GF_FONTB].chars['0' + val / 1000].patch.lump);
}

if(digits > 2)
{
if(realdigits > 2)
{
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars[val / 100].patch.width / 2, y+2, 0, .4f, gFonts[GF_FONTB].chars[15+val / 100].patch.lump);
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars['0' + val / 100].patch.width / 2, y+2, 0, .4f, gFonts[GF_FONTB].chars['0' + val / 100].patch.lump);
DGL_Color4f(r, g, b, a);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars[val / 100].patch.width / 2, y, gFonts[GF_FONTB].chars[15+val / 100].patch.lump);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars['0' + val / 100].patch.width / 2, y, gFonts[GF_FONTB].chars['0' + val / 100].patch.lump);
}
xpos += 12;
}
Expand All @@ -2269,28 +2269,28 @@ void IN_DrawNumber(int val, int x, int y, int digits, float r, float g,
{
if(val > 9)
{
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars[val / 10].patch.width / 2, y+2, 0, .4f, gFonts[GF_FONTB].chars[15+val / 10].patch.lump);
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars['0' + val / 10].patch.width / 2, y+2, 0, .4f, gFonts[GF_FONTB].chars['0' + val / 10].patch.lump);
DGL_Color4f(r, g, b, a);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars[val / 10].patch.width / 2, y, gFonts[GF_FONTB].chars[15+val / 10].patch.lump);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars['0' + val / 10].patch.width / 2, y, gFonts[GF_FONTB].chars['0' + val / 10].patch.lump);
}
else if(digits == 2 || oldval > 99)
{
GL_DrawPatchLitAlpha(xpos+2, y+2, 0, .4f, gFonts[GF_FONTB].chars[15].patch.lump);
GL_DrawPatchLitAlpha(xpos+2, y+2, 0, .4f, gFonts[GF_FONTB].chars['0'].patch.lump);
DGL_Color4f(r, g, b, a);
GL_DrawPatch_CS(xpos, y, gFonts[GF_FONTB].chars[15].patch.lump);
GL_DrawPatch_CS(xpos, y, gFonts[GF_FONTB].chars['0'].patch.lump);
}
xpos += 12;
}

val = val % 10;
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars[val].patch.width / 2, y+2, 0, .4f, gFonts[GF_FONTB].chars[15+val].patch.lump);
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars['0' + val].patch.width / 2, y+2, 0, .4f, gFonts[GF_FONTB].chars['0' + val].patch.lump);
DGL_Color4f(r, g, b, a);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars[val].patch.width / 2, y, gFonts[GF_FONTB].chars[15+val].patch.lump);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars['0' + val].patch.width / 2, y, gFonts[GF_FONTB].chars['0' + val].patch.lump);
if(neg)
{
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars[13].patch.width / 2 - 12 * (realdigits), y+2, 0, .4f, gFonts[GF_FONTB].chars[13].patch.lump);
GL_DrawPatchLitAlpha(xpos + 8 - gFonts[GF_FONTB].chars['-'].patch.width / 2 - 12 * (realdigits), y+2, 0, .4f, gFonts[GF_FONTB].chars['-'].patch.lump);
DGL_Color4f(r, g, b, a);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars[13].patch.width / 2 - 12 * (realdigits), y, gFonts[GF_FONTB].chars[13].patch.lump);
GL_DrawPatch_CS(xpos + 6 - gFonts[GF_FONTB].chars['-'].patch.width / 2 - 12 * (realdigits), y, gFonts[GF_FONTB].chars['-'].patch.lump);
}
}
#endif
Expand Down
12 changes: 6 additions & 6 deletions doomsday/plugins/jheretic/src/in_lude.c
Expand Up @@ -677,7 +677,7 @@ void IN_DrawSingleStats(void)

IN_DrawNumber(players[CONSOLEPLAYER].killCount, 200, 65, 3,
defFontRGB[0], defFontRGB[1], defFontRGB[2], 1);
IN_DrawShadowChar(248, 65, 14, GF_FONTB);
IN_DrawShadowChar(248, 65, '/', GF_FONTB);
IN_DrawNumber(totalKills, 248, 65, 3, defFontRGB[0], defFontRGB[1],
defFontRGB[2], 1);

Expand All @@ -692,7 +692,7 @@ void IN_DrawSingleStats(void)

IN_DrawNumber(players[CONSOLEPLAYER].itemCount, 200, 90, 3,
defFontRGB[0], defFontRGB[1], defFontRGB[2], 1);
IN_DrawShadowChar(248, 90, 14, GF_FONTB);
IN_DrawShadowChar(248, 90, '/', GF_FONTB);
IN_DrawNumber(totalItems, 248, 90, 3, defFontRGB[0], defFontRGB[1],
defFontRGB[2], 1);

Expand All @@ -707,7 +707,7 @@ void IN_DrawSingleStats(void)

IN_DrawNumber(players[CONSOLEPLAYER].secretCount, 200, 115, 3,
defFontRGB[0], defFontRGB[1], defFontRGB[2], 1);
IN_DrawShadowChar(248, 115, 14, GF_FONTB);
IN_DrawShadowChar(248, 115, '/', GF_FONTB);
IN_DrawNumber(totalSecret, 248, 115, 3, defFontRGB[0], defFontRGB[1],
defFontRGB[2], 1);

Expand Down Expand Up @@ -794,14 +794,14 @@ void IN_DrawCoopStats(void)

IN_DrawNumber(killPercent[i], 85, ypos + 10, 3, defFontRGB[0],
defFontRGB[1], defFontRGB[2], 1);
IN_DrawShadowChar(121, ypos + 10, 5, GF_FONTB);
IN_DrawShadowChar(121, ypos + 10, '%', GF_FONTB);
IN_DrawNumber(bonusPercent[i], 160, ypos + 10, 3, defFontRGB[0],
defFontRGB[1], defFontRGB[2], 1);

IN_DrawShadowChar(196, ypos + 10, 5, GF_FONTB);
IN_DrawShadowChar(196, ypos + 10, '%', GF_FONTB);
IN_DrawNumber(secretPercent[i], 237, ypos + 10, 3,
defFontRGB[0], defFontRGB[1], defFontRGB[2], 1);
IN_DrawShadowChar(273, ypos + 10, 5, GF_FONTB);
IN_DrawShadowChar(273, ypos + 10, '%', GF_FONTB);
ypos += 37;
}
}
Expand Down

0 comments on commit fa616eb

Please sign in to comment.