Remove some hacks not needed anymore after flash planet location task's retirement
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3294 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1206,14 +1206,7 @@ RepairScan (void)
|
||||
DrawPlanet (0, 0, 0, 0);
|
||||
#endif
|
||||
DrawScannedObjects (TRUE);
|
||||
{
|
||||
#define FLASH_INDEX 105
|
||||
STAMP s;
|
||||
|
||||
s.origin = pMenuState->flash_rect0.corner;
|
||||
s.frame = SetAbsFrameIndex (MiscDataFrame, FLASH_INDEX);
|
||||
DrawStamp (&s);
|
||||
}
|
||||
drawPlanetCursor (pMenuState, FALSE);
|
||||
UnbatchGraphics ();
|
||||
|
||||
SetContext (OldContext);
|
||||
@@ -1378,8 +1371,7 @@ ScrollPlanetSide (SIZE dx, SIZE dy, SIZE CountDown)
|
||||
}
|
||||
}
|
||||
|
||||
pMenuState->flash_rect0.corner.x = new_pt.x >> MAG_SHIFT;
|
||||
pMenuState->flash_rect0.corner.y = new_pt.y >> MAG_SHIFT;
|
||||
setPlanetCursorLoc (pMenuState, new_pt);
|
||||
RepairScan ();
|
||||
|
||||
if (lander_flags & KILL_CREW)
|
||||
@@ -1552,19 +1544,8 @@ InitPlanetSide (void)
|
||||
else if (pt.y >= (MAP_HEIGHT << MAG_SHIFT))
|
||||
pt.y = (MAP_HEIGHT << MAG_SHIFT) - 1;
|
||||
|
||||
// Put this back in as our original menu choice.
|
||||
// Set the planet location
|
||||
pSolarSysState->MenuState.first_item = pt;
|
||||
|
||||
#ifdef NEVER
|
||||
SetContext (ScanContext);
|
||||
s.origin = pMenuState->flash_rect0.corner;
|
||||
s.origin.x -= (FLASH_WIDTH >> 1);
|
||||
s.origin.y -= (FLASH_HEIGHT >> 1);
|
||||
s.frame = pMenuState->flash_frame0;
|
||||
DrawStamp (&s);
|
||||
#endif /* NEVER */
|
||||
|
||||
pMenuState->flash_rect0.corner = pt;
|
||||
SetContext (SpaceContext);
|
||||
SetContextFont (TinyFont);
|
||||
|
||||
|
||||
@@ -244,7 +244,6 @@ InitPageCell:
|
||||
void
|
||||
DoDiscoveryReport (SOUND ReadOutSounds)
|
||||
{
|
||||
POINT old_curs;
|
||||
CONTEXT OldContext;
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -252,15 +251,6 @@ DoDiscoveryReport (SOUND ReadOutSounds)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (pMenuState)
|
||||
{
|
||||
old_curs = pMenuState->flash_rect0.corner;
|
||||
|
||||
/* Disable cursor: */
|
||||
pMenuState->flash_rect0.corner.x = -1000;
|
||||
pMenuState->flash_rect0.corner.y = -1000;
|
||||
}
|
||||
|
||||
OldContext = SetContext (ScanContext);
|
||||
{
|
||||
FONT OldFont;
|
||||
@@ -296,9 +286,6 @@ DoDiscoveryReport (SOUND ReadOutSounds)
|
||||
while (AnyButtonPress (TRUE))
|
||||
TaskSwitch ();
|
||||
LockMutex (GraphicsLock);
|
||||
|
||||
if (pMenuState)
|
||||
pMenuState->flash_rect0.corner = old_curs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ restorePlanetLocationImage (MENU_STATE *pMS)
|
||||
DrawStamp (&s);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled)
|
||||
{
|
||||
STAMP s;
|
||||
@@ -550,15 +550,21 @@ drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled)
|
||||
DrawStamp (&s);
|
||||
}
|
||||
|
||||
void
|
||||
setPlanetCursorLoc (MENU_STATE *pMS, POINT new_pt)
|
||||
{
|
||||
new_pt.x >>= MAG_SHIFT;
|
||||
new_pt.y >>= MAG_SHIFT;
|
||||
pMS->flash_rect0.corner = new_pt;
|
||||
}
|
||||
|
||||
static void
|
||||
SetPlanetLoc (MENU_STATE *pMS, POINT new_pt)
|
||||
{
|
||||
pSolarSysState->MenuState.first_item = new_pt;
|
||||
|
||||
// Set the new flash location
|
||||
new_pt.x >>= MAG_SHIFT;
|
||||
new_pt.y >>= MAG_SHIFT;
|
||||
pMS->flash_rect0.corner = new_pt;
|
||||
setPlanetCursorLoc (pMS, new_pt);
|
||||
|
||||
SetContext (ScanContext);
|
||||
restorePlanetLocationImage (pMS);
|
||||
@@ -634,10 +640,7 @@ PickPlanetSide (MENU_STATE *pMS)
|
||||
LockMutex (GraphicsLock);
|
||||
SetContext (ScanContext);
|
||||
// Set the current flash location
|
||||
pMS->flash_rect0.corner.x =
|
||||
pSolarSysState->MenuState.first_item.x >> MAG_SHIFT;
|
||||
pMS->flash_rect0.corner.y =
|
||||
pSolarSysState->MenuState.first_item.y >> MAG_SHIFT;
|
||||
setPlanetCursorLoc (pMS, pSolarSysState->MenuState.first_item);
|
||||
savePlanetLocationImage (pMS);
|
||||
|
||||
SetFlashRect (NULL);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define _SCAN_H
|
||||
|
||||
#include "libs/gfxlib.h"
|
||||
#include "../menustat.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
@@ -45,5 +46,8 @@ typedef struct
|
||||
extern void RepairBackRect (RECT *pRect);
|
||||
extern void GeneratePlanetSide (void);
|
||||
|
||||
extern void drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled);
|
||||
extern void setPlanetCursorLoc (MENU_STATE *pMS, POINT new_pt);
|
||||
|
||||
#endif /* _SCAN_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user