diff --git a/sc2/src/sc2code/build.h b/sc2/src/sc2code/build.h index 88055319a..cbea2d1c5 100644 --- a/sc2/src/sc2code/build.h +++ b/sc2/src/sc2code/build.h @@ -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 */ diff --git a/sc2/src/sc2code/element.h b/sc2/src/sc2code/element.h index 0027da1c4..b1c767ec4 100644 --- a/sc2/src/sc2code/element.h +++ b/sc2/src/sc2code/element.h @@ -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 diff --git a/sc2/src/sc2code/shipstat.c b/sc2/src/sc2code/shipstat.c index 2a2a5c61c..09c84378b 100644 --- a/sc2/src/sc2code/shipstat.c +++ b/sc2/src/sc2code/shipstat.c @@ -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); diff --git a/sc2/src/sc2code/status.c b/sc2/src/sc2code/status.c index 072853e93..b394e16d4 100644 --- a/sc2/src/sc2code/status.c +++ b/sc2/src/sc2code/status.c @@ -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);