Give the player some escort ships when the debug button is pressed.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2928 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2008-03-01 19:29:06 +00:00
parent b3dcf06737
commit 67035d8b33
2 changed files with 46 additions and 0 deletions
+43
View File
@@ -18,6 +18,7 @@
#include "uqmdebug.h"
#include "build.h"
#include "colors.h"
#include "clock.h"
#include "encount.h"
@@ -63,6 +64,23 @@ debugKeyPressed (void)
{
// State modifying:
equipShip ();
// Give the player the ships you can't ally with under normal
// conditions.
clearEscorts ();
ActivateStarShip (ARILOU_SHIP, 1);
ActivateStarShip (PKUNK_SHIP, 1);
ActivateStarShip (VUX_SHIP, 1);
ActivateStarShip (YEHAT_SHIP, 1);
ActivateStarShip (MELNORME_SHIP, 1);
ActivateStarShip (DRUUGE_SHIP, 1);
ActivateStarShip (ILWRATH_SHIP, 1);
ActivateStarShip (MYCON_SHIP, 1);
ActivateStarShip (SLYLANDRO_SHIP, 1);
ActivateStarShip (UMGAH_SHIP, 1);
ActivateStarShip (URQUAN_SHIP, 1);
ActivateStarShip (BLACK_URQUAN_SHIP, 1);
resetCrewBattle ();
resetEnergyBattle ();
instantMove = !instantMove;
@@ -329,6 +347,31 @@ equipShip (void)
////////////////////////////////////////////////////////////////////////////
void
clearEscorts (void)
{
HSHIPFRAG hStarShip, hNextShip;
for (hStarShip = GetHeadLink (&GLOBAL (built_ship_q));
hStarShip; hStarShip = hNextShip)
{
SHIP_FRAGMENT *StarShipPtr;
StarShipPtr = LockShipFrag (&GLOBAL (built_ship_q), hStarShip);
hNextShip = _GetSuccLink (StarShipPtr);
UnlockShipFrag (&GLOBAL (built_ship_q), hStarShip);
RemoveQueue (&GLOBAL (built_ship_q), hStarShip);
FreeShipFrag (&GLOBAL (built_ship_q), hStarShip);
}
LockMutex (GraphicsLock);
DeltaSISGauges (UNDEFINED_DELTA, UNDEFINED_DELTA, UNDEFINED_DELTA);
UnlockMutex (GraphicsLock);
}
////////////////////////////////////////////////////////////////////////////
#if 0
// Not needed anymore, but could be useful in the future.
+3
View File
@@ -50,6 +50,9 @@ const char *eventName (BYTE func_index);
// Give the flagship a decent equipment for debugging.
void equipShip (void);
// Remove all escort ships.
void clearEscorts (void);
// Show all active spheres of influence.
void showSpheres (void);