changeset 85:dd99c66ed169

More cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Sep 2011 18:19:59 +0300
parents c518e08d5961
children e573dd2ea3f0
files src/imgspect.cc src/things.cc src/yadex.cc
diffstat 3 files changed, 20 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/imgspect.cc	Mon Sep 26 18:17:57 2011 +0300
+++ b/src/imgspect.cc	Mon Sep 26 18:19:59 2011 +0300
@@ -40,6 +40,7 @@
     int x, y;
     u8 grey;
 
+    // FIXME this is gross
     if (cfg.GameId == IWAD_DOOM1 || cfg.GameId == IWAD_DOOM2)
         grey = 104;
     else if (cfg.GameId == IWAD_HERETIC)
--- a/src/things.cc	Mon Sep 26 18:17:57 2011 +0300
+++ b/src/things.cc	Mon Sep 26 18:19:59 2011 +0300
@@ -106,7 +106,7 @@
         things_table[n].sprite = CUR_THINGDEF->sprite;
     }
 
-// Sort the table by increasing thing type
+    // Sort the table by increasing thing type
     qsort(things_table, nthings, sizeof *things_table, things_table_cmp);
 
 #if 0
@@ -298,29 +298,22 @@
  */
 const char *GetAngleName(int angle)
 {
-    static char buf[30];
+    static char buf[32];
 
     switch (angle)
     {
-    case 0:
-        return "East";
-    case 45:
-        return "North-east";
-    case 90:
-        return "North";
-    case 135:
-        return "North-west";
-    case 180:
-        return "West";
-    case 225:
-        return "South-west";
-    case 270:
-        return "South";
-    case 315:
-        return "South-east";
+    case 0:   return "East";
+    case 45:  return "North-east";
+    case 90:  return "North";
+    case 135: return "North-west";
+    case 180: return "West";
+    case 225: return "South-west";
+    case 270: return "South";
+    case 315: return "South-east";
+    default:
+              sprintf(buf, "ILLEGAL (%d)", angle);
+              return buf;
     }
-    sprintf(buf, "ILLEGAL (%d)", angle);
-    return buf;
 }
 
 
@@ -331,9 +324,9 @@
 const char *GetWhenName(int when)
 {
     static char buf[16 + 3 + 1];
-// "N" is a Boom extension ("not in deathmatch")
-// "C" is a Boom extension ("not in cooperative")
-// "F" is an MBF extension ("friendly")
+    // "N" is a Boom extension ("not in deathmatch")
+    // "C" is a Boom extension ("not in cooperative")
+    // "F" is an MBF extension ("friendly")
     const char *flag_chars = "????" "????" "FCNM" "D431";
     int n;
 
--- a/src/yadex.cc	Mon Sep 26 18:17:57 2011 +0300
+++ b/src/yadex.cc	Mon Sep 26 18:19:59 2011 +0300
@@ -348,14 +348,14 @@
     /* sanity check */
     CloseUnusedWadFiles();
 
-    // BRANCH 1 : benchmarking (-b)
+    /* BRANCH 1 : benchmarking (-b) */
     if (cfg.bench != NULL)
     {
         benchmark(cfg.bench);
         return 0;                // Exit successfully
     }
 
-// BRANCH 2 : normal use ("yadex:" prompt)
+    /* BRANCH 2 : normal use ("yadex:" prompt) */
     else
     {
         if (cfg.welcome_message)
@@ -380,7 +380,7 @@
         MainLoop();
     }
 
-/* that's all, folks! */
+    /* that's all, folks! */
     CloseWadFiles();
     FreeGameDefs();
     LogMessage(": The end!\n\n\n");