shithub: choc

Download patch

ref: 4e5e16c15fc1e820649e82d49d684bb5e964a27d
parent: ba8400b38d8264fe28ec03f772348b288a6ed075
author: derek57 <derek57@users.noreply.github.com>
date: Mon Dec 22 12:31:47 EST 2014

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.

--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -353,7 +353,7 @@
     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;
@@ -360,12 +360,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);
 }
 
 //---------------------------------------------------------------------------