From 35435e287f9db6179f1ae6a771df60216fe2d29f Mon Sep 17 00:00:00 2001 From: meep-eep Date: Mon, 1 Aug 2005 13:36:48 +0000 Subject: [PATCH] Sa-Matra special case for planetdump. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1850 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/uqmdebug.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/sc2/src/sc2code/uqmdebug.c b/sc2/src/sc2code/uqmdebug.c index c8f30350c..edd273567 100644 --- a/sc2/src/sc2code/uqmdebug.c +++ b/sc2/src/sc2code/uqmdebug.c @@ -73,7 +73,7 @@ debugKeyPressed (void) // Informational: // dumpEvents (stderr); // dumpPlanetTypes(stderr); - // debugHook = dumpUniverseToFile; +// debugHook = dumpUniverseToFile; // This will cause dumpUniverseToFile to be called from the // main loop. Calling it from here would give threading // problems. @@ -773,9 +773,12 @@ dumpMoon (FILE *out, const PLANET_DESC *moon) if (moon->data_index == (BYTE) ~0) { - // StarBase typeStr = "StarBase"; } + else if (moon->data_index == (BYTE) (~0 - 1)) + { + typeStr = "Sa-Matra"; + } else { typeStr = planetTypeString (moon->data_index & ~PLANET_SHIELDED); @@ -789,10 +792,18 @@ dumpMoon (FILE *out, const PLANET_DESC *moon) static void dumpWorld (FILE *out, const PLANET_DESC *world) { - if ((world->data_index == (BYTE) ~0) || - (world->data_index & PLANET_SHIELDED)) - { - // StarBase or slave shielded planet. + if (world->data_index == (BYTE) ~0) { + // StarBase + return; + } + + if (world->data_index == (BYTE)(~0 - 1)) { + // Sa-Matra + return; + } + + if (world->data_index & PLANET_SHIELDED) { + // Slave-shielded planet return; }