Fixed bug #33; Crossfades are consistent and don't glitch anymore
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@891 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
Changes towards version 0.3:
|
Changes towards version 0.3:
|
||||||
|
- Crossfade code now explicitly caches the screen to transition from, and
|
||||||
|
thus no longer glitches. The code needed a slight rewrite, but this
|
||||||
|
does fix bug #33 -McMartin
|
||||||
- Melee scaling is now trilinear by default, but it's still possible to
|
- Melee scaling is now trilinear by default, but it's still possible to
|
||||||
choose nearest neighbour with --meleescale; fixes #34 -Mika
|
choose nearest neighbour with --meleescale; fixes #34 -Mika
|
||||||
- Minimum scaling extent is now 1,1; fixes mostly small-objects-disappearing
|
- Minimum scaling extent is now 1,1; fixes mostly small-objects-disappearing
|
||||||
|
|||||||
+18
-15
@@ -188,7 +188,7 @@ Battle (void)
|
|||||||
if (num_ships)
|
if (num_ships)
|
||||||
{
|
{
|
||||||
DWORD NextTime;
|
DWORD NextTime;
|
||||||
BOOLEAN first_time;
|
BOOLEAN first_time;
|
||||||
|
|
||||||
GLOBAL (CurrentActivity) |= IN_BATTLE;
|
GLOBAL (CurrentActivity) |= IN_BATTLE;
|
||||||
battle_counter = MAKE_WORD (
|
battle_counter = MAKE_WORD (
|
||||||
@@ -204,27 +204,30 @@ BOOLEAN first_time;
|
|||||||
|
|
||||||
BattleSong (TRUE);
|
BattleSong (TRUE);
|
||||||
NextTime = 0;
|
NextTime = 0;
|
||||||
first_time = (BOOLEAN)(LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE);
|
first_time = (BOOLEAN)(LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
extern UWORD nth_frame;
|
extern UWORD nth_frame;
|
||||||
|
RECT r;
|
||||||
|
|
||||||
BatchGraphics ();
|
if (first_time)
|
||||||
|
{
|
||||||
|
r.corner.x = SIS_ORG_X;
|
||||||
|
r.corner.y = SIS_ORG_Y;
|
||||||
|
r.extent.width = SIS_SCREEN_WIDTH;
|
||||||
|
r.extent.height = SIS_SCREEN_HEIGHT;
|
||||||
|
SetTransitionSource (&r);
|
||||||
|
}
|
||||||
|
BatchGraphics ();
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)
|
||||||
SeedUniverse ();
|
SeedUniverse ();
|
||||||
RedrawQueue (TRUE);
|
RedrawQueue (TRUE);
|
||||||
if (first_time)
|
if (first_time)
|
||||||
{
|
{
|
||||||
RECT r;
|
first_time = FALSE;
|
||||||
|
ScreenTransition (3, &r);
|
||||||
first_time = FALSE;
|
}
|
||||||
r.corner.x = SIS_ORG_X;
|
UnbatchGraphics ();
|
||||||
r.corner.y = SIS_ORG_Y;
|
|
||||||
r.extent.width = SIS_SCREEN_WIDTH;
|
|
||||||
r.extent.height = SIS_SCREEN_HEIGHT;
|
|
||||||
ScreenTransition (3, &r);
|
|
||||||
}
|
|
||||||
UnbatchGraphics ();
|
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
if (nth_frame)
|
if (nth_frame)
|
||||||
TaskSwitch ();
|
TaskSwitch ();
|
||||||
|
|||||||
@@ -1492,7 +1492,9 @@ static BOOLEAN
|
|||||||
DoCommunication (INPUT_STATE InputState, PENCOUNTER_STATE pES)
|
DoCommunication (INPUT_STATE InputState, PENCOUNTER_STATE pES)
|
||||||
{
|
{
|
||||||
if (!(CommData.AlienTransitionDesc.AnimFlags & (TALK_INTRO | TALK_DONE)))
|
if (!(CommData.AlienTransitionDesc.AnimFlags & (TALK_INTRO | TALK_DONE)))
|
||||||
|
{
|
||||||
AlienTalkSegue ((COUNT)~0);
|
AlienTalkSegue ((COUNT)~0);
|
||||||
|
}
|
||||||
|
|
||||||
if (GLOBAL (CurrentActivity) & CHECK_ABORT)
|
if (GLOBAL (CurrentActivity) & CHECK_ABORT)
|
||||||
;
|
;
|
||||||
@@ -1719,7 +1721,8 @@ HailAlien (void)
|
|||||||
r.corner.y = SIS_ORG_Y;
|
r.corner.y = SIS_ORG_Y;
|
||||||
r.extent.width = SIS_SCREEN_WIDTH;
|
r.extent.width = SIS_SCREEN_WIDTH;
|
||||||
|
|
||||||
BatchGraphics ();
|
SetTransitionSource (NULL);
|
||||||
|
BatchGraphics ();
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
|
||||||
{
|
{
|
||||||
r.corner.x = (SCREEN_WIDTH - SIS_SCREEN_WIDTH) >> 1;
|
r.corner.x = (SCREEN_WIDTH - SIS_SCREEN_WIDTH) >> 1;
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ FreeHyperData ();
|
|||||||
TimeIn = GetTimeCounter ();
|
TimeIn = GetTimeCounter ();
|
||||||
for (i = 1; i < NUM_CREDITS; ++i)
|
for (i = 1; i < NUM_CREDITS; ++i)
|
||||||
{
|
{
|
||||||
|
SetTransitionSource (&r);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
s.frame = f[0];
|
s.frame = f[0];
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
|
|||||||
+12
-10
@@ -169,7 +169,7 @@ InitEncounter (void)
|
|||||||
STAMP s;
|
STAMP s;
|
||||||
TEXT t;
|
TEXT t;
|
||||||
extern FRAME planet[];
|
extern FRAME planet[];
|
||||||
MUSIC_REF MR;
|
MUSIC_REF MR;
|
||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
|
|
||||||
@@ -178,17 +178,18 @@ MUSIC_REF MR;
|
|||||||
SetContext (SpaceContext);
|
SetContext (SpaceContext);
|
||||||
SetContextFont (TinyFont);
|
SetContextFont (TinyFont);
|
||||||
|
|
||||||
MR = LoadMusicInstance (REDALERT_MUSIC);
|
MR = LoadMusicInstance (REDALERT_MUSIC);
|
||||||
PlayMusic (MR, FALSE, 1);
|
PlayMusic (MR, FALSE, 1);
|
||||||
SegueFrame = CaptureDrawable (LoadGraphic (SEGUE_PMAP_ANIM));
|
SegueFrame = CaptureDrawable (LoadGraphic (SEGUE_PMAP_ANIM));
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
while (PLRPlaying (MR))
|
while (PLRPlaying (MR))
|
||||||
TaskSwitch ();
|
TaskSwitch ();
|
||||||
StopMusic ();
|
StopMusic ();
|
||||||
DestroyMusic (MR);
|
DestroyMusic (MR);
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
s.origin.x = s.origin.y = 0;
|
s.origin.x = s.origin.y = 0;
|
||||||
|
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|
||||||
SetContextBackGroundColor (BLACK_COLOR);
|
SetContextBackGroundColor (BLACK_COLOR);
|
||||||
@@ -293,6 +294,7 @@ SetSemaphore (GraphicsSem);
|
|||||||
|
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
DestroyDrawable (ReleaseDrawable (SegueFrame));
|
DestroyDrawable (ReleaseDrawable (SegueFrame));
|
||||||
|
ScreenTransition (3, NULL);
|
||||||
|
|
||||||
SetResourceIndex (hOldIndex);
|
SetResourceIndex (hOldIndex);
|
||||||
|
|
||||||
|
|||||||
+32
-37
@@ -909,6 +909,7 @@ DoPickGame (INPUT_STATE InputState, PMENU_STATE pMS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
Restart:
|
Restart:
|
||||||
SetContext (SpaceContext);
|
SetContext (SpaceContext);
|
||||||
@@ -927,20 +928,20 @@ Restart:
|
|||||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
pMS->ModuleFrame = 0;
|
pMS->ModuleFrame = 0;
|
||||||
pMS->CurState = (BYTE)pMS->delta_item;
|
pMS->CurState = (BYTE)pMS->delta_item;
|
||||||
ResumeMusic ();
|
ResumeMusic ();
|
||||||
if (pSolarSysState)
|
if (pSolarSysState)
|
||||||
{
|
{
|
||||||
#define DRAW_REFRESH (1 << 5)
|
#define DRAW_REFRESH (1 << 5)
|
||||||
#define REPAIR_SCAN (1 << 6)
|
#define REPAIR_SCAN (1 << 6)
|
||||||
extern BYTE draw_sys_flags;
|
extern BYTE draw_sys_flags;
|
||||||
|
|
||||||
if (pSolarSysState->MenuState.Initialized < 3)
|
if (pSolarSysState->MenuState.Initialized < 3)
|
||||||
draw_sys_flags |= DRAW_REFRESH;
|
draw_sys_flags |= DRAW_REFRESH;
|
||||||
else if (pSolarSysState->MenuState.Initialized == 4)
|
else if (pSolarSysState->MenuState.Initialized == 4)
|
||||||
draw_sys_flags |= REPAIR_SCAN;
|
draw_sys_flags |= REPAIR_SCAN;
|
||||||
}
|
}
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
else if (InputState & DEVICE_BUTTON1)
|
else if (InputState & DEVICE_BUTTON1)
|
||||||
@@ -980,26 +981,21 @@ RetrySave:
|
|||||||
goto Restart;
|
goto Restart;
|
||||||
}
|
}
|
||||||
ResumeMusic ();
|
ResumeMusic ();
|
||||||
if (pSolarSysState)
|
if (pSolarSysState)
|
||||||
{
|
{
|
||||||
#define DRAW_REFRESH (1 << 5)
|
#define DRAW_REFRESH (1 << 5)
|
||||||
#define REPAIR_SCAN (1 << 6)
|
#define REPAIR_SCAN (1 << 6)
|
||||||
extern BYTE draw_sys_flags;
|
extern BYTE draw_sys_flags;
|
||||||
|
|
||||||
if (pSolarSysState->MenuState.Initialized < 3)
|
if (pSolarSysState->MenuState.Initialized < 3)
|
||||||
draw_sys_flags |= DRAW_REFRESH;
|
draw_sys_flags |= DRAW_REFRESH;
|
||||||
else if (pSolarSysState->MenuState.Initialized == 4)
|
else if (pSolarSysState->MenuState.Initialized == 4)
|
||||||
draw_sys_flags |= REPAIR_SCAN;
|
draw_sys_flags |= REPAIR_SCAN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
extern BOOLEAN
|
extern BOOLEAN LoadGame (COUNT which_game, SUMMARY_DESC *summary_desc);
|
||||||
LoadGame
|
|
||||||
(COUNT
|
|
||||||
which_game,
|
|
||||||
SUMMARY_DESC
|
|
||||||
*summary_desc);
|
|
||||||
|
|
||||||
ConfirmSaveLoad (0);
|
ConfirmSaveLoad (0);
|
||||||
if (LoadGame ((COUNT)pMS->CurState, NULL_PTR))
|
if (LoadGame ((COUNT)pMS->CurState, NULL_PTR))
|
||||||
@@ -1008,7 +1004,7 @@ if (pSolarSysState)
|
|||||||
SetFlashRect (NULL_PTR, (FRAME)0);
|
SetFlashRect (NULL_PTR, (FRAME)0);
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
pMS->ModuleFrame = 0;
|
pMS->ModuleFrame = 0;
|
||||||
pMS->CurState = (BYTE)pMS->delta_item;
|
pMS->CurState = (BYTE)pMS->delta_item;
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
@@ -1029,7 +1025,9 @@ pMS->ModuleFrame = 0;
|
|||||||
|
|
||||||
if (NewState != pMS->CurState)
|
if (NewState != pMS->CurState)
|
||||||
{
|
{
|
||||||
|
RECT r;
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
|
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
if (((SUMMARY_DESC *)pMS->CurString)[NewState].year_index != 0)
|
if (((SUMMARY_DESC *)pMS->CurString)[NewState].year_index != 0)
|
||||||
{
|
{
|
||||||
@@ -1070,26 +1068,22 @@ ChangeGameSelection:
|
|||||||
{
|
{
|
||||||
if (first_time)
|
if (first_time)
|
||||||
{
|
{
|
||||||
RECT r;
|
|
||||||
|
|
||||||
r.corner.x = SIS_ORG_X;
|
r.corner.x = SIS_ORG_X;
|
||||||
r.corner.y = SIS_ORG_Y;
|
r.corner.y = SIS_ORG_Y;
|
||||||
r.extent.width = SIS_SCREEN_WIDTH;
|
r.extent.width = SIS_SCREEN_WIDTH;
|
||||||
r.extent.height = SIS_SCREEN_HEIGHT;
|
r.extent.height = SIS_SCREEN_HEIGHT;
|
||||||
|
|
||||||
ScreenTransition (3, &r);
|
ScreenTransition (3, &r);
|
||||||
}
|
}
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
r.corner.x = 3 + (NewState * 21);
|
||||||
RECT r;
|
r.corner.y = 176;
|
||||||
|
r.extent.width = 18;
|
||||||
r.corner.x = 3 + (NewState * 21);
|
r.extent.height = 18;
|
||||||
r.corner.y = 176;
|
SetFlashRect (&r, (FRAME)0);
|
||||||
r.extent.width = 18;
|
|
||||||
r.extent.height = 18;
|
|
||||||
SetFlashRect (&r, (FRAME)0);
|
|
||||||
}
|
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1153,6 +1147,7 @@ PickGame (PMENU_STATE
|
|||||||
|| !(pSolarSysState
|
|| !(pSolarSysState
|
||||||
&& pSolarSysState->MenuState.Initialized < 3))
|
&& pSolarSysState->MenuState.Initialized < 3))
|
||||||
{
|
{
|
||||||
|
SetTransitionSource (&DlgRect);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
DrawStamp(&DlgStamp);
|
DrawStamp(&DlgStamp);
|
||||||
ScreenTransition (3, &DlgRect);
|
ScreenTransition (3, &DlgRect);
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ void SetGraphicGrabOther (int grab_other);
|
|||||||
void SetGraphicScale (int scale);
|
void SetGraphicScale (int scale);
|
||||||
int GetGraphicScale (void);
|
int GetGraphicScale (void);
|
||||||
void SetGraphicUseOtherExtra (int other);
|
void SetGraphicUseOtherExtra (int other);
|
||||||
|
void SetTransitionSource (PRECT pRect);
|
||||||
void ScreenTransition (int transition, PRECT pRect);
|
void ScreenTransition (int transition, PRECT pRect);
|
||||||
|
|
||||||
extern float FrameRate;
|
extern float FrameRate;
|
||||||
|
|||||||
@@ -114,6 +114,12 @@ transition_task_func (void *data)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SetTransitionSource (PRECT pRect)
|
||||||
|
{
|
||||||
|
TFB_DrawScreen_Copy(pRect, TFB_SCREEN_MAIN, TFB_SCREEN_TRANSITION);
|
||||||
|
}
|
||||||
|
|
||||||
// Status: Implemented
|
// Status: Implemented
|
||||||
void
|
void
|
||||||
ScreenTransition (int TransType, PRECT pRect)
|
ScreenTransition (int TransType, PRECT pRect)
|
||||||
@@ -140,8 +146,6 @@ ScreenTransition (int TransType, PRECT pRect)
|
|||||||
TransitionClipRect.h = ScreenHeight;
|
TransitionClipRect.h = ScreenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_BlitSurface (SDL_Screen, &TransitionClipRect, TransitionScreen, &TransitionClipRect);
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
if (GraphicsDriver == TFB_GFXDRIVER_SDL_OPENGL)
|
if (GraphicsDriver == TFB_GFXDRIVER_SDL_OPENGL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -600,6 +600,7 @@ DoOutfit (INPUT_STATE InputState, PMENU_STATE pMS)
|
|||||||
LoadGraphic (OUTFIT_PMAP_ANIM)
|
LoadGraphic (OUTFIT_PMAP_ANIM)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
DrawSISFrame ();
|
DrawSISFrame ();
|
||||||
SetSemaphore(GraphicsSem);
|
SetSemaphore(GraphicsSem);
|
||||||
|
|||||||
@@ -1515,6 +1515,7 @@ InitPlanetSide (void)
|
|||||||
SetContextClipRect (&r);
|
SetContextClipRect (&r);
|
||||||
SetContextClipping (TRUE);
|
SetContextClipping (TRUE);
|
||||||
|
|
||||||
|
SetTransitionSource (&r);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1856,6 +1857,7 @@ ReturnToOrbit (PRECT pRect)
|
|||||||
OldContext = SetContext (SpaceContext);
|
OldContext = SetContext (SpaceContext);
|
||||||
SetContextClipRect (pRect);
|
SetContextClipRect (pRect);
|
||||||
|
|
||||||
|
SetTransitionSource (pRect);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
DrawStarBackGround (TRUE);
|
DrawStarBackGround (TRUE);
|
||||||
SetContext (ScanContext);
|
SetContext (ScanContext);
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ LoadPlanet (BOOLEAN IsDefined)
|
|||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
|
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
SetTransitionSource (NULL);
|
||||||
if (!(LastActivity & CHECK_LOAD))
|
if (!(LastActivity & CHECK_LOAD))
|
||||||
DrawStarBackGround (TRUE);
|
DrawStarBackGround (TRUE);
|
||||||
|
|
||||||
@@ -176,7 +177,7 @@ LoadPlanet (BOOLEAN IsDefined)
|
|||||||
BatchGraphics();
|
BatchGraphics();
|
||||||
DrawPlanet (SIS_SCREEN_WIDTH - MAP_WIDTH, SIS_SCREEN_HEIGHT - MAP_HEIGHT, 0, 0);
|
DrawPlanet (SIS_SCREEN_WIDTH - MAP_WIDTH, SIS_SCREEN_HEIGHT - MAP_HEIGHT, 0, 0);
|
||||||
UnbatchGraphics();
|
UnbatchGraphics();
|
||||||
ScreenTransition (3, &r);
|
ScreenTransition (3, &r); // How does this work?
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
LoadIntoExtraScreen (&r);
|
LoadIntoExtraScreen (&r);
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|||||||
@@ -268,6 +268,11 @@ DrawStarMap (COUNT race_update, PRECT pClipRect)
|
|||||||
SetFrameHot (Screen,
|
SetFrameHot (Screen,
|
||||||
MAKE_HOT_SPOT (pClipRect->corner.x, pClipRect->corner.y));
|
MAKE_HOT_SPOT (pClipRect->corner.x, pClipRect->corner.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (transition_pending)
|
||||||
|
{
|
||||||
|
SetTransitionSource (NULL);
|
||||||
|
}
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|
||||||
which_space = GET_GAME_STATE (ARILOU_SPACE_SIDE);
|
which_space = GET_GAME_STATE (ARILOU_SPACE_SIDE);
|
||||||
|
|||||||
@@ -490,6 +490,7 @@ ShowPlanet:
|
|||||||
GenerateMoons ();
|
GenerateMoons ();
|
||||||
|
|
||||||
NewWaitPlanet = 0;
|
NewWaitPlanet = 0;
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
SetGraphicGrabOther (1);
|
SetGraphicGrabOther (1);
|
||||||
DrawSystem (pSolarSysState->pBaseDesc->pPrevDesc->radius, TRUE);
|
DrawSystem (pSolarSysState->pBaseDesc->pPrevDesc->radius, TRUE);
|
||||||
@@ -673,7 +674,12 @@ void
|
|||||||
ZoomSystem (void)
|
ZoomSystem (void)
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
|
r.corner.x = SIS_ORG_X;
|
||||||
|
r.corner.y = SIS_ORG_Y;
|
||||||
|
r.extent.width = SIS_SCREEN_WIDTH;
|
||||||
|
r.extent.height = SIS_SCREEN_HEIGHT;
|
||||||
|
|
||||||
|
SetTransitionSource (&r);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
if (pSolarSysState->pBaseDesc == pSolarSysState->MoonDesc)
|
if (pSolarSysState->pBaseDesc == pSolarSysState->MoonDesc)
|
||||||
DrawSystem (pSolarSysState->pBaseDesc->pPrevDesc->radius, TRUE);
|
DrawSystem (pSolarSysState->pBaseDesc->pPrevDesc->radius, TRUE);
|
||||||
@@ -684,10 +690,6 @@ ZoomSystem (void)
|
|||||||
|
|
||||||
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
|
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
|
||||||
}
|
}
|
||||||
r.corner.x = SIS_ORG_X;
|
|
||||||
r.corner.y = SIS_ORG_Y;
|
|
||||||
r.extent.width = SIS_SCREEN_WIDTH;
|
|
||||||
r.extent.height = SIS_SCREEN_HEIGHT;
|
|
||||||
ScreenTransition (3, &r);
|
ScreenTransition (3, &r);
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
LoadIntoExtraScreen (&r);
|
LoadIntoExtraScreen (&r);
|
||||||
@@ -974,9 +976,10 @@ ScaleSystem (void)
|
|||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
|
|
||||||
OldContext = SetContext (SpaceContext);
|
OldContext = SetContext (SpaceContext);
|
||||||
|
GetContextClipRect (&r);
|
||||||
|
SetTransitionSource (&r);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
|
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
|
||||||
GetContextClipRect (&r);
|
|
||||||
ScreenTransition (3, &r);
|
ScreenTransition (3, &r);
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
LoadIntoExtraScreen (&r);
|
LoadIntoExtraScreen (&r);
|
||||||
@@ -1085,8 +1088,8 @@ TheMess:
|
|||||||
if (old_radius)
|
if (old_radius)
|
||||||
ScaleSystem ();
|
ScaleSystem ();
|
||||||
|
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|
||||||
if (!(draw_sys_flags & DRAW_REFRESH)) // don't repair from Extra or draw ship if forcing repair
|
if (!(draw_sys_flags & DRAW_REFRESH)) // don't repair from Extra or draw ship if forcing repair
|
||||||
{
|
{
|
||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
@@ -1405,6 +1408,7 @@ LoadLanderData ();
|
|||||||
|
|
||||||
if (pSolarSysState->MenuState.Initialized == 0)
|
if (pSolarSysState->MenuState.Initialized == 0)
|
||||||
{
|
{
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
draw_sys_flags |= UNBATCH_SYS;
|
draw_sys_flags |= UNBATCH_SYS;
|
||||||
|
|
||||||
|
|||||||
@@ -1205,6 +1205,7 @@ DoShipyard (INPUT_STATE InputState, PMENU_STATE pMS)
|
|||||||
|
|
||||||
pMS->hMusic = LoadMusicInstance (SHIPYARD_MUSIC);
|
pMS->hMusic = LoadMusicInstance (SHIPYARD_MUSIC);
|
||||||
|
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|
||||||
DrawSISFrame ();
|
DrawSISFrame ();
|
||||||
@@ -1237,15 +1238,15 @@ DoShipyard (INPUT_STATE InputState, PMENU_STATE pMS)
|
|||||||
|
|
||||||
SetContextFont (TinyFont);
|
SetContextFont (TinyFont);
|
||||||
|
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
|
|
||||||
r.corner.x = 0;
|
r.corner.x = 0;
|
||||||
r.corner.y = 0;
|
r.corner.y = 0;
|
||||||
r.extent.width = SCREEN_WIDTH;
|
r.extent.width = SCREEN_WIDTH;
|
||||||
r.extent.height = SCREEN_HEIGHT;
|
r.extent.height = SCREEN_HEIGHT;
|
||||||
ScreenTransition (3, &r);
|
ScreenTransition (3, &r);
|
||||||
}
|
}
|
||||||
PlayMusic (pMS->hMusic, TRUE, 1);
|
PlayMusic (pMS->hMusic, TRUE, 1);
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
BeginHangarAnim (pMS);
|
BeginHangarAnim (pMS);
|
||||||
|
|||||||
@@ -314,20 +314,21 @@ s.origin.x = SAFE_X, s.origin.y = SAFE_Y + 4;
|
|||||||
pMS->hMusic = LoadMusicInstance (STARBASE_MUSIC);
|
pMS->hMusic = LoadMusicInstance (STARBASE_MUSIC);
|
||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
|
SetTransitionSource (NULL);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
SetContextBackGroundColor (BLACK_COLOR);
|
SetContextBackGroundColor (BLACK_COLOR);
|
||||||
ClearDrawable ();
|
ClearDrawable ();
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
DrawBaseStateStrings ((STARBASE_STATE)~0, pMS->CurState);
|
DrawBaseStateStrings ((STARBASE_STATE)~0, pMS->CurState);
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
|
|
||||||
r.corner.x = 0;
|
r.corner.x = 0;
|
||||||
r.corner.y = 0;
|
r.corner.y = 0;
|
||||||
r.extent.width = SCREEN_WIDTH;
|
r.extent.width = SCREEN_WIDTH;
|
||||||
r.extent.height = SCREEN_HEIGHT;
|
r.extent.height = SCREEN_HEIGHT;
|
||||||
ScreenTransition (3, &r);
|
ScreenTransition (3, &r);
|
||||||
}
|
}
|
||||||
PlayMusic (pMS->hMusic, TRUE, 1);
|
PlayMusic (pMS->hMusic, TRUE, 1);
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
pMS->flash_task = AssignTask (rotate_starbase, 4096,
|
pMS->flash_task = AssignTask (rotate_starbase, 4096,
|
||||||
|
|||||||
Reference in New Issue
Block a user