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:
Meep-Eep
2007-05-05 17:09:58 +00:00
parent 0da7b72867
commit 52c92d448f
4 changed files with 11 additions and 2 deletions
+1
View File
@@ -24,6 +24,7 @@
#include "libs/mathlib.h"
// Allocate a new STARSHIP and put it in the queue.
HSTARSHIP
Build (QUEUE *pQueue, DWORD RaceResIndex, COUNT which_player, BYTE
captains_name_index)
+3 -2
View File
@@ -304,8 +304,9 @@ UninitShips (void)
if (LOBYTE (GLOBAL (CurrentActivity)) != IN_ENCOUNTER)
{
ReinitQueue (&race_q[0]);
ReinitQueue (&race_q[1]);
// Remove any ships left from the race queue.
for (i = 0; i < NUM_PLAYERS; i++)
ReinitQueue (&race_q[i]);
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
FreeHyperspace ();
+5
View File
@@ -2062,12 +2062,14 @@ BuildAndDrawShipList (MELEE_STATE *pMS)
GetFrameRect (s.frame, &r);
t.baseline.x = r.extent.width >> 1;
t.baseline.y = r.extent.height - NAME_AREA_HEIGHT + 4;
r.corner.x += 2;
r.corner.y += 2;
r.extent.width -= (2 * 2) + (ICON_WIDTH + 2) + 1;
r.extent.height -= (2 * 2) + NAME_AREA_HEIGHT;
SetContextForeGroundColor (PICK_BG_COLOR);
DrawFilledRectangle (&r);
r.corner.x += 2;
r.extent.width += (ICON_WIDTH + 2) - (2 * 2);
r.corner.y += r.extent.height;
@@ -2092,6 +2094,8 @@ BuildAndDrawShipList (MELEE_STATE *pMS)
SetContextForeGroundColor (PICKSHIP_TEAM_START_VALUE_COLOR);
font_DrawText (&t);
assert (CountLinks(&race_q[side]) == 0);
for (index = 0; index < MELEE_FLEET_SIZE; index++)
{
BYTE StarShip;
@@ -2112,6 +2116,7 @@ BuildAndDrawShipList (MELEE_STATE *pMS)
hBuiltShip = Build (&race_q[side], StarShipPtr->RaceResIndex,
1 << side, NameCaptain (&race_q[side], StarShipPtr));
// Draw the icon.
row = GetShipRow (index);
col = GetShipColumn (index);
s.origin.x = 4 + ((ICON_WIDTH + 2) * col);
+2
View File
@@ -189,8 +189,10 @@ readyForBattleEnd (COUNT side)
#if DEMO_MODE
// In Demo mode, the saved journal should be replayed with frame
// accuracy. PLRPlaying () isn't consistent enough.
(void) side;
return true;
#else /* !DEMO_MODE */
(void) side;
return !PLRPlaying ((MUSIC_REF)~0);
#endif /* !DEMO_MODE */
#else /* defined (NETPLAY) */