Sa-Matra special case for planetdump.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1850 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-08-01 13:36:48 +00:00
parent a576812969
commit 35435e287f
+17 -6
View File
@@ -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;
}