Star dumping work.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1838 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+2
-1
@@ -40,7 +40,8 @@ listed below:
|
||||
Outputs information on all stars to a FILE.
|
||||
With the 'flags' variable, the amount of detail can be specified.
|
||||
At this time this function will only work when called from the top of
|
||||
ExploreSolarSys().
|
||||
ExploreSolarSys(). Defining DUMP_STARS in sc2code/uqmdebug.h
|
||||
will make this happen.
|
||||
- the function uio_debugInteractive()
|
||||
This function is not defined in sc2code/uqmdebug.h, but in libs/uio.h.
|
||||
This function can interactively (tty-based) display information on
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "settings.h"
|
||||
#include "setup.h"
|
||||
#include "sounds.h"
|
||||
#include "uqmdebug.h"
|
||||
#include "libs/graphics/drawable.h"
|
||||
#include "libs/graphics/gfx_common.h"
|
||||
#include "libs/mathlib.h"
|
||||
@@ -2085,6 +2086,10 @@ InitCommunication (RESOURCE which_comm)
|
||||
MEM_HANDLE hOldIndex, hIndex;
|
||||
LOCDATAPTR LocDataPtr;
|
||||
|
||||
#ifdef DUMP_STARS
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
last_subtitle = NULL;
|
||||
|
||||
LockMutex (GraphicsLock);
|
||||
|
||||
@@ -1891,15 +1891,16 @@ ExploreSolarSys (void)
|
||||
{
|
||||
SOLARSYS_STATE SolarSysState;
|
||||
|
||||
#if 0
|
||||
#ifdef DUMP_STARS
|
||||
{
|
||||
FILE *out;
|
||||
|
||||
// Write the star and planet info to a file in the current
|
||||
// directory (which currently is the content/ directory).
|
||||
// Write the star and planet info to a file in the current directory.
|
||||
out = fopen("PlanetInfo", "w");
|
||||
if (out == NULL)
|
||||
exit(1);
|
||||
TFB_DEBUG_HALT = 1;
|
||||
// Disable drawing.
|
||||
dumpStars(out, DUMP_PLANETS);
|
||||
fclose(out);
|
||||
fprintf(stdout, "*** Star dump complete. You can terminate the "
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "globdata.h"
|
||||
#include "races.h"
|
||||
#include "setup.h"
|
||||
#include "state.h"
|
||||
#include "libs/misc.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -600,6 +602,8 @@ dumpPlanet (FILE *out, const PLANET_DESC *planet, UWORD flags)
|
||||
|
||||
// For now, only the name is printed. Other data may be added later.
|
||||
pSolarSysState->pBaseDesc = (PLANET_DESC *) planet;
|
||||
//GetPlanetInfo ();
|
||||
//(*pSolarSysState->GenFunc) (GENERATE_ORBITAL);
|
||||
(*pSolarSysState->GenFunc) (GENERATE_NAME);
|
||||
fprintf (out, "- %-37s %s\n", GLOBAL_SIS (PlanetName),
|
||||
planetTypeString (planet->data_index));
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
// Define DUMP_STARS to dump a list of stars to ./PlanetInfo.
|
||||
// The list is generated when a new game is started. Normal
|
||||
// gameplay is not available in this situation.
|
||||
//#define DUMP_STARS
|
||||
|
||||
|
||||
// Called when the debug key (symbol 'Debug' in the keys.cfg) is pressed.
|
||||
extern void debugKeyPressed (void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user