Full-game access to 3do ship spins.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2712 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.7:
|
Changes towards version 0.7:
|
||||||
|
- Support for 3do "ship spin" videos (TODO: Update with bug # and proper
|
||||||
|
credits)
|
||||||
- Major refactoring of input configuration to use the resource system
|
- Major refactoring of input configuration to use the resource system
|
||||||
instead of custom files (bugs #961 and #949) - Michael
|
instead of custom files (bugs #961 and #949) - Michael
|
||||||
- Added ability to remove entries from ALists - Michael
|
- Added ability to remove entries from ALists - Michael
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
#include "libs/inplib.h"
|
#include "libs/inplib.h"
|
||||||
|
|
||||||
|
static void BeginHangarAnim (MENU_STATE *pMS);
|
||||||
|
static void EndHangarAnim (MENU_STATE *pMS);
|
||||||
|
|
||||||
#ifdef USE_3DO_HANGAR
|
#ifdef USE_3DO_HANGAR
|
||||||
// 3DO 4x3 hangar layout
|
// 3DO 4x3 hangar layout
|
||||||
@@ -66,10 +68,6 @@ static const COORD hangar_x_coords[HANGAR_SHIPS_ROW] =
|
|||||||
#define HANGAR_ROWS (HANGAR_SHIPS / HANGAR_SHIPS_ROW)
|
#define HANGAR_ROWS (HANGAR_SHIPS / HANGAR_SHIPS_ROW)
|
||||||
#define HANGAR_ANIM_RATE 15 // fps
|
#define HANGAR_ANIM_RATE 15 // fps
|
||||||
|
|
||||||
/* This is a temporary stopgap to disable shipspin attempts here until
|
|
||||||
they actually work */
|
|
||||||
#undef WANT_SHIP_SPINS
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SHIPYARD_CREW,
|
SHIPYARD_CREW,
|
||||||
@@ -149,7 +147,11 @@ SpinStarShip (HSTARSHIP hStarShip)
|
|||||||
UnlockStarShip (&master_q, hStarShip);
|
UnlockStarShip (&master_q, hStarShip);
|
||||||
|
|
||||||
if (Index < NUM_MELEE_SHIPS)
|
if (Index < NUM_MELEE_SHIPS)
|
||||||
|
{
|
||||||
|
UnlockMutex (GraphicsLock);
|
||||||
DoShipSpin (Index, pMenuState->hMusic);
|
DoShipSpin (Index, pMenuState->hMusic);
|
||||||
|
LockMutex (GraphicsLock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -689,16 +691,44 @@ DoModifyShips (MENU_STATE *pMS)
|
|||||||
{
|
{
|
||||||
HSTARSHIP hSpinShip;
|
HSTARSHIP hSpinShip;
|
||||||
|
|
||||||
if ((hSpinShip = hStarShip)
|
if ((special && (((hStarShip == 0
|
||||||
|| (HINIBBLE (pMS->CurState) == 0
|
&& HINIBBLE (pMS->CurState) == 0)
|
||||||
&& (hSpinShip = GetAvailableRaceFromIndex (
|
&& (pMS->delta_item & MODIFY_CREW_FLAG))
|
||||||
LOBYTE (pMS->delta_item)))))
|
|| ((hStarShip != 0 &&
|
||||||
|
HINIBBLE (pMS->CurState) == 0)
|
||||||
|
&& !(pMS->delta_item & MODIFY_CREW_FLAG))))
|
||||||
|
&& ((hSpinShip = hStarShip)
|
||||||
|
|| (HINIBBLE (pMS->CurState) == 0
|
||||||
|
&& (hSpinShip = GetAvailableRaceFromIndex (
|
||||||
|
LOBYTE (pMS->delta_item))))))
|
||||||
{
|
{
|
||||||
|
CONTEXT OldContext;
|
||||||
|
RECT OldClipRect;
|
||||||
|
RECT flash_r;
|
||||||
SetFlashRect (NULL, (FRAME)0);
|
SetFlashRect (NULL, (FRAME)0);
|
||||||
|
EndHangarAnim (pMS);
|
||||||
|
|
||||||
|
OldContext = SetContext (ScreenContext);
|
||||||
|
GetContextClipRect (&OldClipRect);
|
||||||
|
|
||||||
SpinStarShip (hSpinShip);
|
SpinStarShip (hSpinShip);
|
||||||
|
|
||||||
|
SetContextClipRect (&OldClipRect);
|
||||||
|
SetContext (OldContext);
|
||||||
|
|
||||||
|
BeginHangarAnim (pMS);
|
||||||
|
SetContext (SpaceContext);
|
||||||
|
|
||||||
if (hStarShip)
|
if (hStarShip)
|
||||||
goto ChangeFlashRect;
|
goto ChangeFlashRect;
|
||||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
|
||||||
|
GetContextClipRect (&flash_r);
|
||||||
|
GetContextClipRect (&flash_r);
|
||||||
|
flash_r.corner.x = RADAR_X - flash_r.corner.x;
|
||||||
|
flash_r.corner.y = RADAR_Y - flash_r.corner.y;
|
||||||
|
flash_r.extent.width = RADAR_WIDTH;
|
||||||
|
flash_r.extent.height = RADAR_HEIGHT;
|
||||||
|
SetFlashRect (&flash_r, (FRAME)0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user