cleanups, comments
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2751 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include "libs/mathlib.h"
|
#include "libs/mathlib.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Allocate a new STARSHIP and put it in the queue.
|
||||||
HSTARSHIP
|
HSTARSHIP
|
||||||
Build (QUEUE *pQueue, DWORD RaceResIndex, COUNT which_player, BYTE
|
Build (QUEUE *pQueue, DWORD RaceResIndex, COUNT which_player, BYTE
|
||||||
captains_name_index)
|
captains_name_index)
|
||||||
|
|||||||
@@ -304,8 +304,9 @@ UninitShips (void)
|
|||||||
|
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) != IN_ENCOUNTER)
|
if (LOBYTE (GLOBAL (CurrentActivity)) != IN_ENCOUNTER)
|
||||||
{
|
{
|
||||||
ReinitQueue (&race_q[0]);
|
// Remove any ships left from the race queue.
|
||||||
ReinitQueue (&race_q[1]);
|
for (i = 0; i < NUM_PLAYERS; i++)
|
||||||
|
ReinitQueue (&race_q[i]);
|
||||||
|
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
|
||||||
FreeHyperspace ();
|
FreeHyperspace ();
|
||||||
|
|||||||
@@ -2062,12 +2062,14 @@ BuildAndDrawShipList (MELEE_STATE *pMS)
|
|||||||
GetFrameRect (s.frame, &r);
|
GetFrameRect (s.frame, &r);
|
||||||
t.baseline.x = r.extent.width >> 1;
|
t.baseline.x = r.extent.width >> 1;
|
||||||
t.baseline.y = r.extent.height - NAME_AREA_HEIGHT + 4;
|
t.baseline.y = r.extent.height - NAME_AREA_HEIGHT + 4;
|
||||||
|
|
||||||
r.corner.x += 2;
|
r.corner.x += 2;
|
||||||
r.corner.y += 2;
|
r.corner.y += 2;
|
||||||
r.extent.width -= (2 * 2) + (ICON_WIDTH + 2) + 1;
|
r.extent.width -= (2 * 2) + (ICON_WIDTH + 2) + 1;
|
||||||
r.extent.height -= (2 * 2) + NAME_AREA_HEIGHT;
|
r.extent.height -= (2 * 2) + NAME_AREA_HEIGHT;
|
||||||
SetContextForeGroundColor (PICK_BG_COLOR);
|
SetContextForeGroundColor (PICK_BG_COLOR);
|
||||||
DrawFilledRectangle (&r);
|
DrawFilledRectangle (&r);
|
||||||
|
|
||||||
r.corner.x += 2;
|
r.corner.x += 2;
|
||||||
r.extent.width += (ICON_WIDTH + 2) - (2 * 2);
|
r.extent.width += (ICON_WIDTH + 2) - (2 * 2);
|
||||||
r.corner.y += r.extent.height;
|
r.corner.y += r.extent.height;
|
||||||
@@ -2092,6 +2094,8 @@ BuildAndDrawShipList (MELEE_STATE *pMS)
|
|||||||
SetContextForeGroundColor (PICKSHIP_TEAM_START_VALUE_COLOR);
|
SetContextForeGroundColor (PICKSHIP_TEAM_START_VALUE_COLOR);
|
||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
|
|
||||||
|
assert (CountLinks(&race_q[side]) == 0);
|
||||||
|
|
||||||
for (index = 0; index < MELEE_FLEET_SIZE; index++)
|
for (index = 0; index < MELEE_FLEET_SIZE; index++)
|
||||||
{
|
{
|
||||||
BYTE StarShip;
|
BYTE StarShip;
|
||||||
@@ -2112,6 +2116,7 @@ BuildAndDrawShipList (MELEE_STATE *pMS)
|
|||||||
hBuiltShip = Build (&race_q[side], StarShipPtr->RaceResIndex,
|
hBuiltShip = Build (&race_q[side], StarShipPtr->RaceResIndex,
|
||||||
1 << side, NameCaptain (&race_q[side], StarShipPtr));
|
1 << side, NameCaptain (&race_q[side], StarShipPtr));
|
||||||
|
|
||||||
|
// Draw the icon.
|
||||||
row = GetShipRow (index);
|
row = GetShipRow (index);
|
||||||
col = GetShipColumn (index);
|
col = GetShipColumn (index);
|
||||||
s.origin.x = 4 + ((ICON_WIDTH + 2) * col);
|
s.origin.x = 4 + ((ICON_WIDTH + 2) * col);
|
||||||
|
|||||||
@@ -189,8 +189,10 @@ readyForBattleEnd (COUNT side)
|
|||||||
#if DEMO_MODE
|
#if DEMO_MODE
|
||||||
// In Demo mode, the saved journal should be replayed with frame
|
// In Demo mode, the saved journal should be replayed with frame
|
||||||
// accuracy. PLRPlaying () isn't consistent enough.
|
// accuracy. PLRPlaying () isn't consistent enough.
|
||||||
|
(void) side;
|
||||||
return true;
|
return true;
|
||||||
#else /* !DEMO_MODE */
|
#else /* !DEMO_MODE */
|
||||||
|
(void) side;
|
||||||
return !PLRPlaying ((MUSIC_REF)~0);
|
return !PLRPlaying ((MUSIC_REF)~0);
|
||||||
#endif /* !DEMO_MODE */
|
#endif /* !DEMO_MODE */
|
||||||
#else /* defined (NETPLAY) */
|
#else /* defined (NETPLAY) */
|
||||||
|
|||||||
Reference in New Issue
Block a user