shithub: choc

Download patch

ref: 8c643f65caa91c8ec5b2750c72dfd6bda1eecf5b
parent: b6ba5eb89afe488f66407562ff57da596e7c841e
parent: 66205bbff120062dea6bb519e6ec2461c3c85901
author: Fabian Greffrath <[email protected]>
date: Mon Dec 29 03:05:44 EST 2014

Merge pull request #492 from derek57/patch-2

No. 1: even more endianness fixes by myself (Ronald Lasmanowicz)

--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -1004,7 +1004,7 @@
     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)
     {
@@ -1011,7 +1011,7 @@
         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 @@
         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 @@
     }
     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 @@
         {
             p = W_CacheLumpNum(FontBLump + c - 33, PU_CACHE);
             V_DrawShadowedPatch(x, y, p);
-            x += p->width - 1;
+            x += SHORT(p->width) - 1;
         }
     }
 }