changeset 8:bbc901af24fb

More cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 15 Mar 2013 05:12:26 +0200
parents 4c1d187d0cf6
children 84d7bc7dfaeb
files 3x666.c
diffstat 1 files changed, 36 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/3x666.c	Fri Mar 15 05:03:26 2013 +0200
+++ b/3x666.c	Fri Mar 15 05:12:26 2013 +0200
@@ -144,9 +144,9 @@
 ***/
 
 #if (BUFH < BUFW)
-#define maxR (BUFH>>1)
+#    define maxR (BUFH>>1)
 #else
-#define maxR (BUFW>>1)
+#    define maxR (BUFW>>1)
 #endif
 
 struct
@@ -295,7 +295,8 @@
 /* This table was ripped (and reduced and rudely integerized) from the
    Maube tracker by K .. keep on the good work man! ;) */
 
-const int noterate[3 * 12] = {
+const int noterate[3 * 12] =
+{
     1000, 1059, 1122, 1189, 1259, 1334,
     1414, 1498, 1587, 1681, 1781, 1887,
 
@@ -309,7 +310,8 @@
 /*	64 bytes of pure musical power ;)
 	Originally composed with Scream Tracker.  */
 
-const char basstrak[32] = {
+const char basstrak[32] =
+{
     12, 0, 24, 12,
     12, 24, 12, 24,
     12, 0, 24, 12,
@@ -320,7 +322,8 @@
     15, 27, 17, 29
 };
 
-const char melody[32] = {
+const char melody[32] =
+{
     24, 12, 19, 15,
     24, 0, 19, 0,
     24, 12, 19, 15,
@@ -457,9 +460,9 @@
             delta = 0;
         if (r == 4)
             ismelody = 1;
-        if ((r == 6) || (r == 10))
+        if (r == 6 || r == 10)
             delta = 5;
-        if ((r == 7) || (r == 11))
+        if (r == 7 || r == 11)
             silend = 1;
         if (r == 8)
             delta = silend = 0;
@@ -522,7 +525,8 @@
         else
             phinext = 12;
     }
-    else if (phiwsty == 2)
+    else
+    if (phiwsty == 2)
     {
         char nx[] = { 5, 10, 7, 3, 11 };
         philast = rand() & 1;
@@ -532,13 +536,15 @@
             phiword = "I";
         phinext = nx[rand() % 5];
     }
-    else if (phiwsty == 3)
+    else
+    if (phiwsty == 3)
     {
         char *w[] = { "DON'T", "CAN'T", "WON'T", "COULDN'T" };
         phiword = w[rand() % 4];
         phinext = 7 + (rand() & 4);
     }
-    else if (phiwsty == 4)
+    else
+    if (phiwsty == 4)
     {
         if (rand() & 1)
             phiword = "YOU";
@@ -551,7 +557,8 @@
         else
             phinext = 11;
     }
-    else if (phiwsty == 5)
+    else
+    if (phiwsty == 5)
     {
         if (philast)
             phiword = "AM";
@@ -562,9 +569,11 @@
         else
             phinext = 12 + (rand() & 1);
     }
-    else if (phiwsty == 6)
+    else
+    if (phiwsty == 6)
     {
-        char *w[] = { "FALLING", "THINKING", "DREAMING", "CRYING",
+        char *w[] = {
+            "FALLING", "THINKING", "DREAMING", "CRYING",
             "LYING", "REACHING", "BREATHING", "BURNING", "RUNNING"
         };
         phiword = w[rand() % 9];
@@ -575,7 +584,8 @@
         else
             phinext = 13;
     }
-    else if (phiwsty == 7)
+    else
+    if (phiwsty == 7)
     {
         char nx[] = { 8, 4, 12 };
         if (rand() & 1)
@@ -584,12 +594,14 @@
             phiword = "WANT";
         phinext = nx[rand() % 3];
     }
-    else if (phiwsty == 8)
+    else
+    if (phiwsty == 8)
     {
         phiword = "TO";
         phinext = 11;
     }
-    else if (phiwsty == 9)
+    else
+    if (phiwsty == 9)
     {
         char *w[] = { "DOWN", "OFF", "OUT", "UP", "ABOUT" };
         phiword = w[rand() % 5];
@@ -598,7 +610,8 @@
         else
             phinext = 12 + (rand() & 1);
     }
-    else if (phiwsty == 10)
+    else
+    if (phiwsty == 10)
     {
         char *w[] = { "CAN", "COULD", "WOULD", "MAY", "MIGHT" };
         phiword = w[rand() % 5];
@@ -607,7 +620,8 @@
         else
             phinext = 12;
     }
-    else if (phiwsty == 11)
+    else
+    if (phiwsty == 11)
     {
         char *w[] = { "SEE", "HEAR", "FEEL", "THINK" };
         phiword = w[rand() % 4];
@@ -616,13 +630,15 @@
         else
             phinext = rand() & 4;
     }
-    else if (phiwsty == 12)
+    else
+    if (phiwsty == 12)
     {
         char *w[] = { "WHAT", "SOMETHING", "NOTHING", "THINGS", "WHATEVER" };
         phiword = w[rand() % 5];
         phinext = 2;
     }
-    else if (phiwsty == 13)
+    else
+    if (phiwsty == 13)
     {
         phiword = "THE";
         phinext = 14;
@@ -770,7 +786,6 @@
 {
     vec3d joo;
     const int U = BUFW / 40;
-
     int flagz = 0;
     const short *dez = dezign;
     char *phiword = NULL, *dizainword = NULL;