DrawBattleCrewAmount also works for the top player.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1568 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-02-26 23:13:09 +00:00
parent 478f567c27
commit 3d542c1311
4 changed files with 12 additions and 9 deletions
+2 -1
View File
@@ -75,7 +75,8 @@ extern void OutlineShipStatus (COORD y);
extern void InitShipStatus (STARSHIPPTR StarShipPtr, PRECT pClipRect);
extern void DeltaStatistics (STARSHIPPTR StarShipPtr, SIZE crew_delta,
SIZE energy_delta);
extern void DrawBattleCrewAmount (BOOLEAN CountPlayer);
extern void DrawBattleCrewAmount (STARSHIPPTR StarShipPtr,
BOOLEAN CountPlayer);
#endif /* _BUILD_H */
+2 -1
View File
@@ -21,6 +21,7 @@
#include "battle.h"
#include "displist.h"
#include "units.h"
#include "velocity.h"
#include "libs/gfxlib.h"
@@ -36,7 +37,7 @@
#define TINY_TEXT_HEIGHT 9
#define BATTLE_CREW_X 10
#define BATTLE_CREW_Y 184
#define BATTLE_CREW_Y (64 - SAFE_Y)
#define NORMAL_LIFE 1
+2 -1
View File
@@ -384,7 +384,8 @@ DeltaStatistics (STARSHIPPTR StarShipPtr, SIZE crew_delta, SIZE
GLOBAL_SIS (CrewEnlisted) = 0;
}
DrawBattleCrewAmount ((BOOLEAN)(death_count == 0));
DrawBattleCrewAmount (StarShipPtr,
(BOOLEAN)(death_count == 0));
}
SetContextForeGroundColor (BLACK_COLOR);
+6 -6
View File
@@ -114,7 +114,7 @@ CaptainsWindow (CAPTAIN_STUFFPTR CSPtr, COORD y, ELEMENT_FLAGS
}
void
DrawBattleCrewAmount (BOOLEAN CountPlayer)
DrawBattleCrewAmount (STARSHIPPTR StarShipPtr, BOOLEAN CountPlayer)
{
#define MAX_CREW_DIGITS 3
RECT r;
@@ -124,7 +124,9 @@ DrawBattleCrewAmount (BOOLEAN CountPlayer)
t.baseline.x = BATTLE_CREW_X + 2;
if (optWhichMenu == OPT_PC)
t.baseline.x -= 8;
t.baseline.y = BATTLE_CREW_Y - SAFE_Y;
t.baseline.y = BATTLE_CREW_Y +
((StarShipPtr->RaceDescPtr->ship_info.ship_flags & GOOD_GUY) ?
GOOD_GUY_YOFFS : BAD_GUY_YOFFS);
t.align = ALIGN_LEFT;
t.pStr = buf;
t.CharCount = (COUNT)~0;
@@ -134,9 +136,7 @@ DrawBattleCrewAmount (BOOLEAN CountPlayer)
r.extent.width = 6 * MAX_CREW_DIGITS + 6;
r.extent.height = 5;
wsprintf (buf, "%u",
GLOBAL_SIS (CrewEnlisted)
+ (CountPlayer ? 1 : 0));
wsprintf (buf, "%u", GLOBAL_SIS (CrewEnlisted) + (CountPlayer ? 1 : 0));
SetContextFont (StarConFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08));
@@ -254,7 +254,7 @@ DrawCaptainsWindow (STARSHIPPTR StarShipPtr)
t.align = ALIGN_CENTER;
t.pStr = GLOBAL_SIS (CommanderName);
t.CharCount = (COUNT)~0;
DrawBattleCrewAmount (TRUE);
DrawBattleCrewAmount (StarShipPtr, TRUE);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02));
SetContextFont (TinyFont);
font_DrawText (&t);