From ddadb068fea4f182189d2eeaf711b2c968a31fdb Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Wed, 27 Feb 2013 14:36:56 +0000
Subject: [PATCH] [Change] Compressed the debug messages.

---
 src/faction.c |  2 +-
 src/outfit.c  |  5 +++--
 src/ship.c    |  4 ++--
 src/space.c   | 19 ++++++++++++-------
 4 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/src/faction.c b/src/faction.c
index 8168352..7c5a540 100644
--- a/src/faction.c
+++ b/src/faction.c
@@ -266,7 +266,7 @@ int factions_load(void) {
   free(buf);
   xmlCleanupParser();
 
-  DEBUG("Loaded %d faction%c", nfactions, (nfactions==1)?' ':'s');
+  DEBUG("Loaded %d Faction%s", nfactions, (nfactions==1) ?"": "s");
 
   return 0;
 }
diff --git a/src/outfit.c b/src/outfit.c
index 02193d3..318888a 100644
--- a/src/outfit.c
+++ b/src/outfit.c
@@ -280,8 +280,6 @@ static Outfit* outfit_parse(const xmlNodePtr parent) {
   MELEMENT(tmp->type==0, 			"type");
 #undef MELEMENT
 
-  DEBUG("Loaded outfit '%s' of type '%s'", tmp->name, outfit_getType(tmp));
-
   return tmp;
 }
 
@@ -319,6 +317,9 @@ int outfit_load(void) {
   xmlFreeDoc(doc);
   free(buf);
   xmlCleanupParser();
+	
+	DEBUG("Loaded %d outfit%s", outfits, (outfits==1) ? "" : "s");
+
   return 0;
 }
 
diff --git a/src/ship.c b/src/ship.c
index 3fc2254..a83e934 100644
--- a/src/ship.c
+++ b/src/ship.c
@@ -166,9 +166,7 @@ static Ship* ship_parse(xmlNodePtr parent) {
   MELEMENT(tmp->cap_weapon==0,   		"cap_weapon");
 #undef MELEMENT
 
-  DEBUG("Loaded ship '%s'", tmp->name);
   return tmp;
-  
 }
 
 int ships_load(void) {
@@ -205,6 +203,8 @@ int ships_load(void) {
   free(buf);
   xmlCleanupParser();
 
+	DEBUG("Loaded %d ship%s", ships, (ships==1) ? "" : "s");
+
   return 0;
 }
 
diff --git a/src/space.c b/src/space.c
index a95110e..3685be7 100644
--- a/src/space.c
+++ b/src/space.c
@@ -36,9 +36,10 @@
 #define FLAG_ASTEROIDSSET   (1<<2)
 #define FLAG_INTEFERENCESET (1<<3)
 
-StarSystem* systems = NULL;
-static int nsystems = 0;
-StarSystem* cur_system = NULL; // Current star system.
+StarSystem* systems = NULL; 		// Star system stack.
+static int nsystems = 0;				// Number of star systems.
+static int nplanets = 0;				// Total number of loaded planets - A little silly.
+StarSystem* cur_system = NULL; 	// Current star system.
 
 // Current stardate in nice format.
 char* stardate = "Stardate";
@@ -50,9 +51,9 @@ typedef struct Star_ {
   double brightness;
 } Star;
 
-static Star* stars = NULL; // Star array.
-static int nstars = 0; // Total stars.
-static int mstars = 0;
+static Star* stars = NULL; 	// Star array.
+static int nstars = 0; 			// Total stars.
+static int mstars = 0;			// Memory stars are taking.
 
 // Intern
 static Planet* planet_get(const char* name);
@@ -390,6 +391,7 @@ static StarSystem* system_parse(const xmlNodePtr parent) {
       cur = node->children;
       do {
         if(xml_isNode(cur, "planet")) {
+					nplanets++; // Increase planet counter.
           planet = planet_get(xml_get(cur));
           planet = planet_get((const char*)cur->children->content);
           tmp->planets = realloc(tmp->planets, sizeof(Planet)*(++tmp->nplanets));
@@ -430,7 +432,6 @@ static StarSystem* system_parse(const xmlNodePtr parent) {
   MELEMENT(flags&FLAG_ASTEROIDSSET, "asteroids"); // Can be 0.
   MELEMENT(flags&FLAG_INTEFERENCESET, "inteference");
 #undef MELEMENT
-  DEBUG("Loaded Star System '%s' with %d Planet%c", tmp->name, tmp->nplanets, (tmp->nplanets == 1) ? ' ' : 's');
 
   return tmp;
 }
@@ -517,6 +518,10 @@ int space_load(void) {
   free(buf);
   xmlCleanupParser();
 
+	DEBUG("Loaded %d star system%s with %d planet%s",
+				nsystems, (nsystems==1) ? "" : "s",
+				nplanets, (nplanets==1) ? "" : "s");
+
   return 0;
 }