Remove pMenuState references from Shipyard
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3310 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+14
-16
@@ -101,7 +101,7 @@ animatePowerLines (MENU_STATE *pMS)
|
||||
|
||||
#ifdef WANT_SHIP_SPINS
|
||||
static void
|
||||
SpinStarShip (HFLEETINFO hStarShip)
|
||||
SpinStarShip (MENU_STATE *pMS, HFLEETINFO hStarShip)
|
||||
{
|
||||
int Index;
|
||||
FLEET_INFO *FleetPtr;
|
||||
@@ -113,7 +113,7 @@ SpinStarShip (HFLEETINFO hStarShip)
|
||||
if (Index >= 0 && Index < NUM_MELEE_SHIPS)
|
||||
{
|
||||
UnlockMutex (GraphicsLock);
|
||||
DoShipSpin (Index, pMenuState->hMusic);
|
||||
DoShipSpin (Index, pMS->hMusic);
|
||||
LockMutex (GraphicsLock);
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ GetAvailableRaceFromIndex (BYTE Index)
|
||||
}
|
||||
|
||||
static void
|
||||
DrawRaceStrings (BYTE NewRaceItem)
|
||||
DrawRaceStrings (MENU_STATE *pMS, BYTE NewRaceItem)
|
||||
{
|
||||
RECT r;
|
||||
STAMP s;
|
||||
@@ -209,8 +209,7 @@ DrawRaceStrings (BYTE NewRaceItem)
|
||||
hStarShip = GetAvailableRaceFromIndex (NewRaceItem);
|
||||
NewRaceItem = GetIndexFromStarShip (&GLOBAL (avail_race_q),
|
||||
hStarShip);
|
||||
s.frame = SetAbsFrameIndex (pMenuState->ModuleFrame,
|
||||
3 + NewRaceItem);
|
||||
s.frame = SetAbsFrameIndex (pMS->ModuleFrame, 3 + NewRaceItem);
|
||||
DrawStamp (&s);
|
||||
FleetPtr = LockFleetInfo (&GLOBAL (avail_race_q), hStarShip);
|
||||
s.frame = FleetPtr->melee_icon;
|
||||
@@ -286,7 +285,8 @@ ShowShipCrew (SHIP_FRAGMENT *StarShipPtr, RECT *pRect)
|
||||
}
|
||||
|
||||
static void
|
||||
ShowCombatShip (COUNT which_window, SHIP_FRAGMENT *YankedStarShipPtr)
|
||||
ShowCombatShip (MENU_STATE *pMS, COUNT which_window,
|
||||
SHIP_FRAGMENT *YankedStarShipPtr)
|
||||
{
|
||||
COUNT i, num_ships;
|
||||
HSHIPFRAG hStarShip, hNextShip;
|
||||
@@ -308,8 +308,7 @@ ShowCombatShip (COUNT which_window, SHIP_FRAGMENT *YankedStarShipPtr)
|
||||
pship_win_info->rtdoor_s.origin.x = (SHIP_WIN_WIDTH >> 1);
|
||||
pship_win_info->lfdoor_s.origin.y = 0;
|
||||
pship_win_info->rtdoor_s.origin.y = 0;
|
||||
pship_win_info->lfdoor_s.frame =
|
||||
IncFrameIndex (pMenuState->ModuleFrame);
|
||||
pship_win_info->lfdoor_s.frame = IncFrameIndex (pMS->ModuleFrame);
|
||||
pship_win_info->rtdoor_s.frame =
|
||||
IncFrameIndex (pship_win_info->lfdoor_s.frame);
|
||||
|
||||
@@ -369,8 +368,7 @@ ShowCombatShip (COUNT which_window, SHIP_FRAGMENT *YankedStarShipPtr)
|
||||
pship_win_info->rtdoor_s.origin.x = 1;
|
||||
pship_win_info->lfdoor_s.origin.y = 0;
|
||||
pship_win_info->rtdoor_s.origin.y = 0;
|
||||
pship_win_info->lfdoor_s.frame =
|
||||
IncFrameIndex (pMenuState->ModuleFrame);
|
||||
pship_win_info->lfdoor_s.frame = IncFrameIndex (pMS->ModuleFrame);
|
||||
pship_win_info->rtdoor_s.frame =
|
||||
IncFrameIndex (pship_win_info->lfdoor_s.frame);
|
||||
|
||||
@@ -678,7 +676,7 @@ DoModifyShips (MENU_STATE *pMS)
|
||||
OldContext = SetContext (ScreenContext);
|
||||
GetContextClipRect (&OldClipRect);
|
||||
|
||||
SpinStarShip (hSpinShip);
|
||||
SpinStarShip (pMS, hSpinShip);
|
||||
|
||||
SetContextClipRect (&OldClipRect);
|
||||
SetContext (OldContext);
|
||||
@@ -708,7 +706,7 @@ DoModifyShips (MENU_STATE *pMS)
|
||||
if (!(pMS->delta_item & MODIFY_CREW_FLAG))
|
||||
{
|
||||
pMS->delta_item = MODIFY_CREW_FLAG;
|
||||
DrawRaceStrings (0);
|
||||
DrawRaceStrings (pMS, 0);
|
||||
return TRUE;
|
||||
}
|
||||
else if (cancel)
|
||||
@@ -730,7 +728,7 @@ DoModifyShips (MENU_STATE *pMS)
|
||||
&& CloneShipFragment (Index,
|
||||
&GLOBAL (built_ship_q), 1))
|
||||
{
|
||||
ShowCombatShip (pMS->CurState, NULL);
|
||||
ShowCombatShip (pMS, pMS->CurState, NULL);
|
||||
//Reset flash rectangle
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect (SFR_MENU_3DO);
|
||||
@@ -775,7 +773,7 @@ DoModifyShips (MENU_STATE *pMS)
|
||||
|
||||
if (NewState != LOBYTE (pMS->delta_item))
|
||||
{
|
||||
DrawRaceStrings (NewState);
|
||||
DrawRaceStrings (pMS, NewState);
|
||||
pMS->delta_item = NewState | MODIFY_CREW_FLAG;
|
||||
}
|
||||
|
||||
@@ -795,7 +793,7 @@ DoModifyShips (MENU_STATE *pMS)
|
||||
{
|
||||
SetFlashRect (NULL);
|
||||
UnlockMutex (GraphicsLock);
|
||||
ShowCombatShip (pMS->CurState, StarShipPtr);
|
||||
ShowCombatShip (pMS, pMS->CurState, StarShipPtr);
|
||||
LockMutex (GraphicsLock);
|
||||
UnlockShipFrag (&GLOBAL (built_ship_q),
|
||||
hStarShip);
|
||||
@@ -1231,7 +1229,7 @@ DoShipyard (MENU_STATE *pMS)
|
||||
|
||||
PlayMusic (pMS->hMusic, TRUE, 1);
|
||||
|
||||
ShowCombatShip ((COUNT)~0, NULL);
|
||||
ShowCombatShip (pMS, (COUNT)~0, NULL);
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect (SFR_MENU_3DO);
|
||||
UnlockMutex (GraphicsLock);
|
||||
|
||||
Reference in New Issue
Block a user