misc code cleanups; from meep
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2403 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+50
-25
@@ -17,36 +17,61 @@
|
|||||||
#define _COLORS_H
|
#define _COLORS_H
|
||||||
|
|
||||||
|
|
||||||
#define BLACK_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00)
|
#define BLACK_COLOR \
|
||||||
#define LTGRAY_COLOR BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x07)
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00)
|
||||||
#define DKGRAY_COLOR BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
#define LTGRAY_COLOR \
|
||||||
#define WHITE_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x07)
|
||||||
|
#define DKGRAY_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
||||||
|
#define WHITE_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
||||||
|
|
||||||
#define NORMAL_ILLUMINATED_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
#define NORMAL_ILLUMINATED_COLOR \
|
||||||
#define NORMAL_SHADOWED_COLOR BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
WHITE_COLOR
|
||||||
#define HIGHLIGHT_ILLUMINATED_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x0A, 0x0A), 0x0C)
|
#define NORMAL_SHADOWED_COLOR \
|
||||||
#define HIGHLIGHT_SHADOWED_COLOR BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
DKGRAY_COLOR
|
||||||
#define MENU_BACKGROUND_COLOR BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x07)
|
#define HIGHLIGHT_ILLUMINATED_COLOR \
|
||||||
#define MENU_FOREGROUND_COLOR BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x0A, 0x0A), 0x0C)
|
||||||
#define MENU_TEXT_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00)
|
#define HIGHLIGHT_SHADOWED_COLOR \
|
||||||
#define MENU_HIGHLIGHT_COLOR BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
||||||
|
#define MENU_BACKGROUND_COLOR \
|
||||||
|
LTGRAY_COLOR
|
||||||
|
#define MENU_FOREGROUND_COLOR \
|
||||||
|
DKGRAY_COLOR
|
||||||
|
#define MENU_TEXT_COLOR \
|
||||||
|
BLACK_COLOR
|
||||||
|
#define MENU_HIGHLIGHT_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
||||||
|
|
||||||
#define STATUS_ILLUMINATED_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
#define STATUS_ILLUMINATED_COLOR \
|
||||||
#define STATUS_SHADOWED_COLOR BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
WHITE_COLOR
|
||||||
#define STATUS_SHAPE_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00)
|
#define STATUS_SHADOWED_COLOR \
|
||||||
#define STATUS_SHAPE_OUTLINE_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
DKGRAY_COLOR
|
||||||
|
#define STATUS_SHAPE_COLOR \
|
||||||
|
BLACK_COLOR
|
||||||
|
#define STATUS_SHAPE_OUTLINE_COLOR \
|
||||||
|
WHITE_COLOR
|
||||||
|
|
||||||
#define CONTROL_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
#define CONTROL_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
||||||
|
|
||||||
#define ALLIANCE_BACKGROUND_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
#define ALLIANCE_BACKGROUND_COLOR \
|
||||||
#define HIERARCHY_BACKGROUND_COLOR BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
||||||
#define ALLIANCE_TEXT_COLOR BUILD_COLOR (MAKE_RGB15 (0x0A, 0x1F, 0x1F), 0x0B)
|
#define HIERARCHY_BACKGROUND_COLOR \
|
||||||
#define HIERARCHY_TEXT_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x0A), 0x0E)
|
BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
||||||
#define ALLIANCE_BOX_HIGHLIGHT_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
#define ALLIANCE_TEXT_COLOR \
|
||||||
#define HIERARCHY_BOX_HIGHLIGHT_COLOR HIERARCHY_BACKGROUND_COLOR
|
BUILD_COLOR (MAKE_RGB15 (0x0A, 0x1F, 0x1F), 0x0B)
|
||||||
|
#define HIERARCHY_TEXT_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x0A), 0x0E)
|
||||||
|
#define ALLIANCE_BOX_HIGHLIGHT_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
||||||
|
#define HIERARCHY_BOX_HIGHLIGHT_COLOR \
|
||||||
|
HIERARCHY_BACKGROUND_COLOR
|
||||||
|
|
||||||
#define MESSAGE_BACKGROUND_COLOR BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
#define MESSAGE_BACKGROUND_COLOR \
|
||||||
#define MESSAGE_TEXT_COLOR BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x0A), 0x0E)
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)
|
||||||
|
#define MESSAGE_TEXT_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x0A), 0x0E)
|
||||||
|
|
||||||
|
|
||||||
#endif /* _COLORS_H */
|
#endif /* _COLORS_H */
|
||||||
|
|||||||
@@ -690,9 +690,7 @@ flag_ship_preprocess (PELEMENT ElementPtr)
|
|||||||
SIZE vdx, vdy, radius;
|
SIZE vdx, vdy, radius;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
|
|
||||||
GetCurrentVelocityComponents (
|
GetCurrentVelocityComponents (&GLOBAL (velocity), &vdx, &vdy);
|
||||||
&GLOBAL (velocity), &vdx, &vdy
|
|
||||||
);
|
|
||||||
|
|
||||||
if (pSolarSysState->pBaseDesc == pSolarSysState->MoonDesc)
|
if (pSolarSysState->pBaseDesc == pSolarSysState->MoonDesc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -301,9 +301,11 @@ GetEncounterStarShip (STARSHIPPTR LastStarShipPtr, COUNT which_player)
|
|||||||
HSTARSHIP hBattleShip;
|
HSTARSHIP hBattleShip;
|
||||||
|
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
|
||||||
|
// Get the next ship from the battle group.
|
||||||
hBattleShip = GetHeadLink (&race_q[which_player]);
|
hBattleShip = GetHeadLink (&race_q[which_player]);
|
||||||
else if (LOBYTE (GLOBAL (CurrentActivity)) == SUPER_MELEE)
|
else if (LOBYTE (GLOBAL (CurrentActivity)) == SUPER_MELEE)
|
||||||
{
|
{
|
||||||
|
// Let the player chose his own ship. (May be a computer player).
|
||||||
hBattleShip = GetMeleeStarShip (LastStarShipPtr, which_player);
|
hBattleShip = GetMeleeStarShip (LastStarShipPtr, which_player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -389,13 +391,11 @@ GetEncounterStarShip (STARSHIPPTR LastStarShipPtr, COUNT which_player)
|
|||||||
if (LastStarShipPtr->special_counter == 0)
|
if (LastStarShipPtr->special_counter == 0)
|
||||||
/* died in the line of duty */
|
/* died in the line of duty */
|
||||||
GLOBAL_SIS (CrewEnlisted) = (COUNT)~0;
|
GLOBAL_SIS (CrewEnlisted) = (COUNT)~0;
|
||||||
#ifndef TESTING
|
|
||||||
else if (GLOBAL_SIS (FuelOnBoard) >
|
else if (GLOBAL_SIS (FuelOnBoard) >
|
||||||
RUN_AWAY_FUEL_COST)
|
RUN_AWAY_FUEL_COST)
|
||||||
GLOBAL_SIS (FuelOnBoard) -= RUN_AWAY_FUEL_COST;
|
GLOBAL_SIS (FuelOnBoard) -= RUN_AWAY_FUEL_COST;
|
||||||
else
|
else
|
||||||
GLOBAL_SIS (FuelOnBoard) = 0;
|
GLOBAL_SIS (FuelOnBoard) = 0;
|
||||||
#endif /* TESTING */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -403,8 +403,7 @@ GetEncounterStarShip (STARSHIPPTR LastStarShipPtr, COUNT which_player)
|
|||||||
if (hBattleShip)
|
if (hBattleShip)
|
||||||
{
|
{
|
||||||
SPtr = LockStarShip (&race_q[which_player], hBattleShip);
|
SPtr = LockStarShip (&race_q[which_player], hBattleShip);
|
||||||
OwnStarShip (SPtr,
|
OwnStarShip (SPtr, SPtr->cur_status_flags,
|
||||||
SPtr->cur_status_flags,
|
|
||||||
SPtr->captains_name_index);
|
SPtr->captains_name_index);
|
||||||
UnlockStarShip (&race_q[which_player], hBattleShip);
|
UnlockStarShip (&race_q[which_player], hBattleShip);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -489,9 +489,7 @@ spawn_ship (STARSHIPPTR StarShipPtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
GetNextStarShip (STARSHIPPTR
|
GetNextStarShip (STARSHIPPTR LastStarShipPtr, COUNT which_side)
|
||||||
LastStarShipPtr,
|
|
||||||
COUNT which_side)
|
|
||||||
{
|
{
|
||||||
HSTARSHIP hBattleShip;
|
HSTARSHIP hBattleShip;
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ SeedRandomNumbers (void)
|
|||||||
{
|
{
|
||||||
DWORD cur_time;
|
DWORD cur_time;
|
||||||
|
|
||||||
TFB_SeedRandom (cur_time = GetTimeCounter ());
|
cur_time = GetTimeCounter ();
|
||||||
|
TFB_SeedRandom (cur_time);
|
||||||
|
|
||||||
return (cur_time);
|
return (cur_time);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user