summaryrefslogtreecommitdiff
path: root/src/hexen/sb_bar.c
diff options
context:
space:
mode:
authorFabian Greffrath2014-12-18 10:59:47 +0100
committerFabian Greffrath2014-12-18 10:59:47 +0100
commite7abef98528ee0746b72f8089e0ad9e7a01e7755 (patch)
treeb98a873f4a4466d4410ecd15603f4b8f7badba82 /src/hexen/sb_bar.c
parentea5f633fe42c7693e30106a306b376ec169a4809 (diff)
downloadchocolate-doom-e7abef98528ee0746b72f8089e0ad9e7a01e7755.tar.gz
chocolate-doom-e7abef98528ee0746b72f8089e0ad9e7a01e7755.tar.bz2
chocolate-doom-e7abef98528ee0746b72f8089e0ad9e7a01e7755.zip
fix some more endianess issues with the width fields in patch_t structs
as pointed out necessary by Ronald Lasmanowicz for his Wii ports
Diffstat (limited to 'src/hexen/sb_bar.c')
-rw-r--r--src/hexen/sb_bar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c
index f79b0009..bcc5b675 100644
--- a/src/hexen/sb_bar.c
+++ b/src/hexen/sb_bar.c
@@ -26,6 +26,7 @@
#include "p_local.h"
#include "s_sound.h"
#include "v_video.h"
+#include "i_swap.h"
// TYPES -------------------------------------------------------------------
@@ -496,19 +497,19 @@ static void DrBNumber(signed int val, int x, int y)
if (val > 99)
{
patch = W_CacheLumpNum(FontBNumBase + val / 100, PU_CACHE);
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2, y, patch);
}
val = val % 100;
xpos += 12;
if (val > 9 || oldval > 99)
{
patch = W_CacheLumpNum(FontBNumBase + val / 10, PU_CACHE);
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2, y, patch);
}
val = val % 10;
xpos += 12;
patch = W_CacheLumpNum(FontBNumBase + val, PU_CACHE);
- V_DrawShadowedPatch(xpos + 6 - patch->width / 2, y, patch);
+ V_DrawShadowedPatch(xpos + 6 - SHORT(patch->width) / 2, y, patch);
}
//==========================================================================