git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1842 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-07-13 21:00:22 +00:00
parent 0f630a078f
commit 164f771a6b
3 changed files with 20 additions and 17 deletions
+9 -6
View File
@@ -6,6 +6,11 @@ require the game to be in a specific state.
The function debugKeyPressed() in uqmdebug.c is called when the debug key
is pressed. This function is a suitable place to put various debugging
calls.
There is also a global variable 'debugHook', which can be set to a function
to be called the next iteration of the main game loop (which will occur
when the current activity (IP, HyperSpace, Communication, Battle) changes.
By setting this, a function can be called from the main loop, thereby
eliminating threading issues that may otherwise arrise.
The debug key can be specified in keys.cfg by adding a line with a text
similar to "Debug: key F11".
An interactive way to access various debugging code, similar to
@@ -36,12 +41,10 @@ listed below:
Outputs information on all scheduled events to a FILE.
- the function dumpPlanetTypes()
Outputs information on all planet types to a FILE.
- the function dumpStars()
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(). Defining DUMP_STARS in sc2code/uqmdebug.h
will make this happen.
- the function dumpUniverseToFile()
Outputs information on the universe to "./PlanetInfo". This function
should only be called from debugHook, as threading issues would otherwise
arrise.
- 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
+4 -4
View File
@@ -87,13 +87,13 @@ Pre: pSolarSysState->SysInfo is filled in by a GENERATE_ORBITAL call
This function determines the properties of one mineral deposit, energy node,
or life form on a planet or moon. On entry the caller sets
pSolarSysState->CurNode to the index of the requested item. This function
will then fill in SysInfoPtr->PlanetInfo.CurPt,
SysInfoPtr->PlanetInfo.CurType, and in the case of minerals also
SysInfoPtr->PlanetInfo.CurDensity.
will then fill in pSolarSysState->SysInfo.PlanetInfo.CurPt,
pSolarSysState->SysInfo.PlanetInfo.CurType, and in the case of minerals also
pSolarSysState->SysInfo.PlanetInfo.CurDensity.
In case pSolarSysState->CurNode is set to a value larger than or equal to
the number of items of the requested kind ((COUNT) ~0 in practice), it is
set to the real number of nodes. In this case the CurXXX fields of
pSolarSysState->PlanetInfo are set to the values corresponding to
pSolarSysState->SysInfo.PlanetInfo are set to the values corresponding to
the largest valid CurNode index, but should probably be considered to be
undefined.
These functions may also change the game state, cause the lander