summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderek572014-12-22 17:29:44 +0100
committerderek572014-12-22 17:29:44 +0100
commit66205bbff120062dea6bb519e6ec2461c3c85901 (patch)
treee2671bc56429669a7d5291323d08a8f2b67c1c05
parentba8400b38d8264fe28ec03f772348b288a6ed075 (diff)
downloadchocolate-doom-66205bbff120062dea6bb519e6ec2461c3c85901.tar.gz
chocolate-doom-66205bbff120062dea6bb519e6ec2461c3c85901.tar.bz2
chocolate-doom-66205bbff120062dea6bb519e6ec2461c3c85901.zip
even more endianness fixes by myself (Ronald Lasmanowicz)
I figured this out while porting Chocolate to the Nintendo Wii and also had to change these lines of code.
-rw-r--r--src/heretic/in_lude.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/heretic/in_lude.c b/src/heretic/in_lude.c
index 2314a52b..e6fc1b13 100644
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -1004,14 +1004,14 @@ void IN_DrawNumber(int val, int x, int y, int digits)
if (digits == 4)
{
patch = FontBNumbers[val / 1000];
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2 - 12, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2 - 12, y, patch);
}
if (digits > 2)
{
if (realdigits > 2)
{
patch = FontBNumbers[val / 100];
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2, y, patch);
}
xpos += 12;
}
@@ -1021,7 +1021,7 @@ void IN_DrawNumber(int val, int x, int y, int digits)
if (val > 9)
{
patch = FontBNumbers[val / 10];
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2, y, patch);
}
else if (digits == 2 || oldval > 99)
{
@@ -1031,11 +1031,11 @@ void IN_DrawNumber(int val, int x, int y, int digits)
}
val = val % 10;
patch = FontBNumbers[val];
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2, y, patch);
if (neg)
{
patch = FontBNegative;
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2 - 12 * (realdigits),
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2 - 12 * (realdigits),
y, patch);
}
}
@@ -1061,7 +1061,7 @@ void IN_DrTextB(char *text, int x, int y)
{
p = W_CacheLumpNum(FontBLump + c - 33, PU_CACHE);
V_DrawShadowedPatch(x, y, p);
- x += p->width - 1;
+ x += SHORT(p->width) - 1;
}
}
}