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);
|
DrawPlanet (0, 0, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
DrawScannedObjects (TRUE);
|
DrawScannedObjects (TRUE);
|
||||||
{
|
drawPlanetCursor (pMenuState, FALSE);
|
||||||
#define FLASH_INDEX 105
|
|
||||||
STAMP s;
|
|
||||||
|
|
||||||
s.origin = pMenuState->flash_rect0.corner;
|
|
||||||
s.frame = SetAbsFrameIndex (MiscDataFrame, FLASH_INDEX);
|
|
||||||
DrawStamp (&s);
|
|
||||||
}
|
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
|
|
||||||
SetContext (OldContext);
|
SetContext (OldContext);
|
||||||
@@ -1378,8 +1371,7 @@ ScrollPlanetSide (SIZE dx, SIZE dy, SIZE CountDown)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pMenuState->flash_rect0.corner.x = new_pt.x >> MAG_SHIFT;
|
setPlanetCursorLoc (pMenuState, new_pt);
|
||||||
pMenuState->flash_rect0.corner.y = new_pt.y >> MAG_SHIFT;
|
|
||||||
RepairScan ();
|
RepairScan ();
|
||||||
|
|
||||||
if (lander_flags & KILL_CREW)
|
if (lander_flags & KILL_CREW)
|
||||||
@@ -1552,19 +1544,8 @@ InitPlanetSide (void)
|
|||||||
else if (pt.y >= (MAP_HEIGHT << MAG_SHIFT))
|
else if (pt.y >= (MAP_HEIGHT << MAG_SHIFT))
|
||||||
pt.y = (MAP_HEIGHT << MAG_SHIFT) - 1;
|
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;
|
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);
|
SetContext (SpaceContext);
|
||||||
SetContextFont (TinyFont);
|
SetContextFont (TinyFont);
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ InitPageCell:
|
|||||||
void
|
void
|
||||||
DoDiscoveryReport (SOUND ReadOutSounds)
|
DoDiscoveryReport (SOUND ReadOutSounds)
|
||||||
{
|
{
|
||||||
POINT old_curs;
|
|
||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -252,15 +251,6 @@ DoDiscoveryReport (SOUND ReadOutSounds)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#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);
|
OldContext = SetContext (ScanContext);
|
||||||
{
|
{
|
||||||
FONT OldFont;
|
FONT OldFont;
|
||||||
@@ -296,9 +286,6 @@ DoDiscoveryReport (SOUND ReadOutSounds)
|
|||||||
while (AnyButtonPress (TRUE))
|
while (AnyButtonPress (TRUE))
|
||||||
TaskSwitch ();
|
TaskSwitch ();
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
|
|
||||||
if (pMenuState)
|
|
||||||
pMenuState->flash_rect0.corner = old_curs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ restorePlanetLocationImage (MENU_STATE *pMS)
|
|||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled)
|
drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled)
|
||||||
{
|
{
|
||||||
STAMP s;
|
STAMP s;
|
||||||
@@ -550,15 +550,21 @@ drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled)
|
|||||||
DrawStamp (&s);
|
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
|
static void
|
||||||
SetPlanetLoc (MENU_STATE *pMS, POINT new_pt)
|
SetPlanetLoc (MENU_STATE *pMS, POINT new_pt)
|
||||||
{
|
{
|
||||||
pSolarSysState->MenuState.first_item = new_pt;
|
pSolarSysState->MenuState.first_item = new_pt;
|
||||||
|
|
||||||
// Set the new flash location
|
// Set the new flash location
|
||||||
new_pt.x >>= MAG_SHIFT;
|
setPlanetCursorLoc (pMS, new_pt);
|
||||||
new_pt.y >>= MAG_SHIFT;
|
|
||||||
pMS->flash_rect0.corner = new_pt;
|
|
||||||
|
|
||||||
SetContext (ScanContext);
|
SetContext (ScanContext);
|
||||||
restorePlanetLocationImage (pMS);
|
restorePlanetLocationImage (pMS);
|
||||||
@@ -634,10 +640,7 @@ PickPlanetSide (MENU_STATE *pMS)
|
|||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
SetContext (ScanContext);
|
SetContext (ScanContext);
|
||||||
// Set the current flash location
|
// Set the current flash location
|
||||||
pMS->flash_rect0.corner.x =
|
setPlanetCursorLoc (pMS, pSolarSysState->MenuState.first_item);
|
||||||
pSolarSysState->MenuState.first_item.x >> MAG_SHIFT;
|
|
||||||
pMS->flash_rect0.corner.y =
|
|
||||||
pSolarSysState->MenuState.first_item.y >> MAG_SHIFT;
|
|
||||||
savePlanetLocationImage (pMS);
|
savePlanetLocationImage (pMS);
|
||||||
|
|
||||||
SetFlashRect (NULL);
|
SetFlashRect (NULL);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#define _SCAN_H
|
#define _SCAN_H
|
||||||
|
|
||||||
#include "libs/gfxlib.h"
|
#include "libs/gfxlib.h"
|
||||||
|
#include "../menustat.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -45,5 +46,8 @@ typedef struct
|
|||||||
extern void RepairBackRect (RECT *pRect);
|
extern void RepairBackRect (RECT *pRect);
|
||||||
extern void GeneratePlanetSide (void);
|
extern void GeneratePlanetSide (void);
|
||||||
|
|
||||||
|
extern void drawPlanetCursor (MENU_STATE *pMS, BOOLEAN filled);
|
||||||
|
extern void setPlanetCursorLoc (MENU_STATE *pMS, POINT new_pt);
|
||||||
|
|
||||||
#endif /* _SCAN_H */
|
#endif /* _SCAN_H */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user