Lots of debugging stuff. See doc/devel/debug for more info.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1380 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
The file src/sc2code/debug.c and src/sc2code/debug.h contain various
|
||||
debugging functions, which are included in the binary when the game
|
||||
is built in debug mode.
|
||||
These functions can be called from anywhere in the code, though some
|
||||
require the game to be in a specific state.
|
||||
The function debugKeyPressed() in debug.c is called when the debug key
|
||||
is pressed. This function is a suitable place to put various debugging
|
||||
calls.
|
||||
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
|
||||
the uio debug mode (see below) is in the works.
|
||||
|
||||
The most interesting debugging functionality available at the moment is
|
||||
listed below:
|
||||
- the function equipShip()
|
||||
When this function is called, the SIS is equiped with various useful
|
||||
modules (a possible Precursor Bomb is left in place), all
|
||||
fuel tanks and crew pods are filled to the maximum, you are given
|
||||
the maximum number of landers, and all possible lander shields are
|
||||
installed.
|
||||
- the boolean variable instantMove
|
||||
When this variable is set to TRUE, you can select a location on the
|
||||
star map, and your HyperSpace/Quasispace coordinates will immediately
|
||||
be set to them. Your realspace coordinates are not changed, so if you
|
||||
are exploring a solar system, you'll only notice it when you leave to
|
||||
HyperSpace.
|
||||
- the function forwardToNextEvent()
|
||||
Fast forwards the clock until the next event. If TRUE is given as an
|
||||
argument, the HYPERSPACE_ENCOUNTER_EVENTs, which normally happen every
|
||||
day, are skipped.
|
||||
- the function dumpEvents()
|
||||
Outputs information on all scheduled events 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().
|
||||
- uio_debugInteractive()
|
||||
This function is not defined in sc2code/debug.h, but in libs/uio.h.
|
||||
This function can interactively (tty-based) display information on
|
||||
the state of the uio file system, and modifications can be made.
|
||||
|
||||
|
||||
The first version of this document was created by Serge van den Boom,
|
||||
on 2004-05-15.
|
||||
|
||||
+6
-3
@@ -9,8 +9,12 @@ commglue.c Helper functions for communication with aliens.
|
||||
confirm.c Asks for confirmation on exit.
|
||||
credits.c Shows the credits after a victory.
|
||||
cyborg.c Handles combat AI.
|
||||
debug.c Debugging functions.
|
||||
demo.c Code for demo mode and game journal.
|
||||
displist.c
|
||||
displist.c Generic doubly linked list, which can keep its own pool
|
||||
of preallocated link structures.
|
||||
This generic list is used in various places throughout
|
||||
the game source, but without preallocaded link structures.
|
||||
dummy.c
|
||||
encount.c Handles what to do when a player encounters an alien.
|
||||
fmv.c Handles video sequences.
|
||||
@@ -69,12 +73,11 @@ status.c Maintain and draw some information like the captain picture,
|
||||
crew, energy. (also shipstat.c)
|
||||
tactrans.c Code for some additional combat events (explosions, dying,
|
||||
new ship, ion trail, escape).
|
||||
trans.c
|
||||
trans.c Integer variant of atan2().
|
||||
utils.c Various auxiliary utils, code for pausing.
|
||||
velocity.c Velocity computation routines.
|
||||
weapon.c Routines for weapons fire in combat.
|
||||
|
||||
test.c Sound testing program. (to be deleted?)
|
||||
|
||||
build.h
|
||||
clock.h
|
||||
|
||||
Reference in New Issue
Block a user