changeset 18:ea16e1b51284

Rename function.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 15 Mar 2013 20:26:35 +0200
parents 972054c118f9
children 16efabca7e04
files 3x666.c
diffstat 1 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/3x666.c	Fri Mar 15 20:25:59 2013 +0200
+++ b/3x666.c	Fri Mar 15 20:26:35 2013 +0200
@@ -120,7 +120,7 @@
 ascii chars 32..90, 16 bits per char unpacked -> 114 bytes for the whole
 font ;) let's credit karl/nooon for the original idea. */
 
-void drawseg(int y, int x, int w, int h)
+void txtDrawSegment(int y, int x, int w, int h)
 {
     /* clip clip clip */
     if (x + w > SET_VID_BUFW)
@@ -148,7 +148,7 @@
     }
 }
 
-void drawchar(int x, int y, int c, int xunit, int yunit)
+void txtDrawChar(int x, int y, int c, int xunit, int yunit)
 {
     x -= xunit * 2;
     y -= yunit * 3;
@@ -158,9 +158,9 @@
             break;
 
         if (c & 1)
-            drawseg(y, x + 1, xunit * 2 - 2, yunit);
+            txtDrawSegment(y, x + 1, xunit * 2 - 2, yunit);
         if (c & 2)
-            drawseg(y, x + 1 + xunit * 2, xunit * 2 - 2, yunit);
+            txtDrawSegment(y, x + 1 + xunit * 2, xunit * 2 - 2, yunit);
         y++;
 
         c >>= 2;
@@ -168,11 +168,11 @@
             break;
 
         if (c & 1)
-            drawseg(y, x, xunit, yunit * 3 - 2);
+            txtDrawSegment(y, x, xunit, yunit * 3 - 2);
         if (c & 2)
-            drawseg(y, x + ((xunit * 3) >> 1), xunit, yunit * 3 - 2);
+            txtDrawSegment(y, x + ((xunit * 3) >> 1), xunit, yunit * 3 - 2);
         if (c & 4)
-            drawseg(y, x + xunit * 3, xunit, yunit * 3 - 2);
+            txtDrawSegment(y, x + xunit * 3, xunit, yunit * 3 - 2);
 
         y += yunit * 2;
         c >>= 3;
@@ -186,7 +186,7 @@
     {
         if (*str >= 32)
         {
-            drawchar(x, y, phont[*str - 32], SET_VID_BUFW / 50, SET_VID_BUFW / 80);
+            txtDrawChar(x, y, phont[*str - 32], SET_VID_BUFW / 50, SET_VID_BUFW / 80);
             x += SET_VID_BUFW / 10;
         }
         else
@@ -204,7 +204,7 @@
     int x = (SET_VID_BUFW >> 1) - (strlen(str) + 1) * 3 * SET_VID_BUFW / 80;
     while (*str)
     {
-        drawchar(x, SET_VID_BUFH >> 1, phont[*str++ - 32], SET_VID_BUFW / 50, SET_VID_BUFW / 80);
+        txtDrawChar(x, SET_VID_BUFH >> 1, phont[*str++ - 32], SET_VID_BUFW / 50, SET_VID_BUFW / 80);
         x += SET_VID_BUFW / 10;
     }
 }
@@ -567,7 +567,6 @@
 }
 
 
-
 static void engineAudioCallback(void *userdata, Uint8 *stream, int len)
 {
     (void) userdata;
@@ -597,7 +596,7 @@
 
     for (i = 0; i < CHPSCR + 1; i++)
     {
-        drawchar(x, (SET_VID_BUFH * 3) / 4, phont[*c++ - 32], SET_VID_BUFW / (6 * CHPSCR), h);
+        txtDrawChar(x, (SET_VID_BUFH * 3) / 4, phont[*c++ - 32], SET_VID_BUFW / (6 * CHPSCR), h);
         x += SET_VID_BUFW / CHPSCR;
     }
 }
@@ -837,7 +836,7 @@
         else
         if (y >= 0 - (SET_VID_BUFH / 8) && y < SET_VID_BUFH)
         {
-            drawchar(x, y, phont[*s - 32], SET_VID_BUFW / 60, SET_VID_BUFH / 60);
+            txtDrawChar(x, y, phont[*s - 32], SET_VID_BUFW / 60, SET_VID_BUFH / 60);
             x += SET_VID_BUFW / 13;
         }
         s++;
@@ -1041,13 +1040,13 @@
 
         if (flagz & OCSALOGO)
         {
-            drawchar(U * 6, U * 4, phont['O' - 32], U + U * sin(qt * 0.10 + 3),
+            txtDrawChar(U * 6, U * 4, phont['O' - 32], U + U * sin(qt * 0.10 + 3),
                      U);
-            drawchar(U * 14, U * 4, phont['C' - 32], U,
+            txtDrawChar(U * 14, U * 4, phont['C' - 32], U,
                      U + U * sin(qt * 0.11 + 3));
-            drawchar(U * 22, U * 4, phont['S' - 32], U,
+            txtDrawChar(U * 22, U * 4, phont['S' - 32], U,
                      U + U * sin(qt * 0.12 + 3));
-            drawchar(U * 30, U * 4, phont['A' - 32],
+            txtDrawChar(U * 30, U * 4, phont['A' - 32],
                      U + U * sin(qt * 0.13 + 3), U);
         }
 
@@ -1090,17 +1089,17 @@
 
             if (n > 600)
             {
-                drawchar(U * 12 + dis, (SET_VID_BUFH >> 1) + dis + U * 6,
+                txtDrawChar(U * 12 + dis, (SET_VID_BUFH >> 1) + dis + U * 6,
                          phont['X' - 32], U, U);
-                drawchar(U * 22 + dis, (SET_VID_BUFH >> 1) + dis + U * 6,
+                txtDrawChar(U * 22 + dis, (SET_VID_BUFH >> 1) + dis + U * 6,
                          phont['3' - 32], U, U);
             }
 
-            drawchar(U * 28 + dis, SET_VID_BUFH >> 1, phont[16 + (n % 10)], U, U);
+            txtDrawChar(U * 28 + dis, SET_VID_BUFH >> 1, phont[16 + (n % 10)], U, U);
             n /= 10;
-            drawchar(U * 18 + dis, SET_VID_BUFH >> 1, phont[16 + (n % 10)], U, U);
+            txtDrawChar(U * 18 + dis, SET_VID_BUFH >> 1, phont[16 + (n % 10)], U, U);
             n /= 10;
-            drawchar(U * 8 + dis, SET_VID_BUFH >> 1, phont[16 + (n % 10)], U, U);
+            txtDrawChar(U * 8 + dis, SET_VID_BUFH >> 1, phont[16 + (n % 10)], U, U);
             n /= 10;
         }