Fixed lockup in 'save failed' alert box (bug #397), from ghakko
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1074 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
Changes towards version 0.3:
|
Changes towards version 0.3:
|
||||||
|
- Fixed lockup in 'save failed' alert box (bug #397), from ghakko
|
||||||
- Fixed glitch in Pkunk animation (bug #354), from Paxtez
|
- Fixed glitch in Pkunk animation (bug #354), from Paxtez
|
||||||
- Fixed Kohr-Ah final defeat message repeating (bug #426) -Mika
|
- Fixed Kohr-Ah final defeat message repeating (bug #426) -Mika
|
||||||
- Fix for picking up talking pet after Umgah genocide - from Paxtez
|
- Fix for picking up talking pet after Umgah genocide - from Paxtez
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
//Added by Chris
|
//Added by Chris
|
||||||
|
|
||||||
BOOLEAN SaveProblem (void);
|
void SaveProblem (void);
|
||||||
|
|
||||||
//End Added by Chris
|
//End Added by Chris
|
||||||
|
|
||||||
@@ -1046,7 +1046,6 @@ Restart:
|
|||||||
pSD = &((SUMMARY_DESC *)pMS->CurString)[pMS->CurState];
|
pSD = &((SUMMARY_DESC *)pMS->CurString)[pMS->CurState];
|
||||||
if (pMS->delta_item == SAVE_GAME || pSD->year_index)
|
if (pMS->delta_item == SAVE_GAME || pSD->year_index)
|
||||||
{
|
{
|
||||||
RetrySave:
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
if (pMS->delta_item == SAVE_GAME)
|
if (pMS->delta_item == SAVE_GAME)
|
||||||
{
|
{
|
||||||
@@ -1068,8 +1067,7 @@ RetrySave:
|
|||||||
DestroyDrawable (ReleaseDrawable (MsgStamp.frame));
|
DestroyDrawable (ReleaseDrawable (MsgStamp.frame));
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
if (SaveProblem ())
|
SaveProblem ();
|
||||||
goto RetrySave;
|
|
||||||
|
|
||||||
pMS->Initialized = FALSE;
|
pMS->Initialized = FALSE;
|
||||||
NewState = pMS->CurState;
|
NewState = pMS->CurState;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
void ConfirmSaveLoad (STAMP *MsgStamp);
|
void ConfirmSaveLoad (STAMP *MsgStamp);
|
||||||
|
|
||||||
BOOLEAN SaveProblem (void);
|
void SaveProblem (void);
|
||||||
|
|
||||||
void DoShipSpin (COUNT index, MUSIC_REF hMusic);
|
void DoShipSpin (COUNT index, MUSIC_REF hMusic);
|
||||||
|
|
||||||
@@ -1075,7 +1075,6 @@ DoSaveTeam (PMELEE_STATE pMS)
|
|||||||
|
|
||||||
sprintf (file, "%s.mle", pMS->TeamImage[pMS->side].TeamName);
|
sprintf (file, "%s.mle", pMS->TeamImage[pMS->side].TeamName);
|
||||||
|
|
||||||
RetrySave:
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
OldContext = SetContext (ScreenContext);
|
OldContext = SetContext (ScreenContext);
|
||||||
ConfirmSaveLoad (&MsgStamp);
|
ConfirmSaveLoad (&MsgStamp);
|
||||||
@@ -1100,8 +1099,7 @@ RetrySave:
|
|||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
DeleteResFile (meleeDir, file);
|
DeleteResFile (meleeDir, file);
|
||||||
if (SaveProblem ())
|
SaveProblem ();
|
||||||
goto RetrySave;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadTeamList (pMS, file);
|
LoadTeamList (pMS, file);
|
||||||
|
|||||||
+8
-48
@@ -203,75 +203,35 @@ SaveProblemMessage (STAMP *MsgStamp)
|
|||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
void
|
||||||
SaveProblem (void)
|
SaveProblem (void)
|
||||||
{
|
{
|
||||||
BOOLEAN manage;
|
|
||||||
STAMP s;
|
STAMP s;
|
||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
BOOLEAN cont;
|
|
||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
OldContext = SetContext (SpaceContext);
|
OldContext = SetContext (SpaceContext);
|
||||||
|
|
||||||
SaveProblemMessage (&s);
|
SaveProblemMessage (&s);
|
||||||
|
FlushGraphics ();
|
||||||
GLOBAL (CurrentActivity) |= CHECK_ABORT;
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
while (AnyButtonPress (FALSE));
|
while (AnyButtonPress (FALSE));
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
cont = FALSE;
|
TaskSwitch ();
|
||||||
UpdateInputState ();
|
UpdateInputState ();
|
||||||
if (CurrentMenuState.select)
|
} while (!(CurrentMenuState.select || CurrentMenuState.special ||
|
||||||
manage = TRUE;
|
(GLOBAL (CurrentActivity) & CHECK_ABORT)));
|
||||||
else if (CurrentMenuState.special)
|
|
||||||
manage = FALSE;
|
|
||||||
else
|
|
||||||
cont = TRUE;
|
|
||||||
} while (cont);
|
|
||||||
|
|
||||||
GLOBAL (CurrentActivity) &= ~CHECK_ABORT;
|
|
||||||
|
|
||||||
|
SetSemaphore (GraphicsSem);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
SetContext (OldContext);
|
SetContext (OldContext);
|
||||||
DestroyDrawable (ReleaseDrawable (s.frame));
|
DestroyDrawable (ReleaseDrawable (s.frame));
|
||||||
|
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
if (manage)
|
return;
|
||||||
{
|
|
||||||
BYTE clut_buf[1];
|
|
||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
|
||||||
SetFlashRect (NULL_PTR, (FRAME)0);
|
|
||||||
ClearSemaphore (GraphicsSem);
|
|
||||||
|
|
||||||
clut_buf[0] = FadeAllToBlack;
|
|
||||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));
|
|
||||||
FlushColorXForms ();
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
SuspendTasking (); // just in case
|
|
||||||
ManageNVRAM ();
|
|
||||||
ResumeTasking ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
clut_buf[0] = FadeAllToColor;
|
|
||||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));
|
|
||||||
FlushColorXForms ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
CleanNVRAM ();
|
|
||||||
#endif
|
|
||||||
SleepThreadUntil (GetTimeCounter () + (ONE_SECOND / 4));
|
|
||||||
}
|
|
||||||
|
|
||||||
return (manage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
|||||||
Reference in New Issue
Block a user