mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Fix TV and splash on res change
This commit is contained in:
@@ -706,13 +706,3 @@ short AddDynamicObject (short what, Rect *where, objectType *who,
|
|||||||
|
|
||||||
return dynIndex;
|
return dynIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffsetDynamics(SInt16 h, SInt16 v)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < numDynamics; i++)
|
|
||||||
{
|
|
||||||
dynaType &dinah = dinahs[i];
|
|
||||||
//QOffsetRect(&dinah.dest, h, v);
|
|
||||||
//QOffsetRect(&dinah.whole, h, v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -426,6 +426,25 @@ void HandleHighLevelEvent (EventRecord *theEvent)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------- HandleSplashResolutionChange
|
||||||
|
void HandleSplashResolutionChange(void)
|
||||||
|
{
|
||||||
|
FlushResolutionChange();
|
||||||
|
|
||||||
|
RecomputeInterfaceRects();
|
||||||
|
RecreateOffscreens();
|
||||||
|
CloseMainWindow();
|
||||||
|
OpenMainWindow();
|
||||||
|
|
||||||
|
UpdateMainWindow();
|
||||||
|
|
||||||
|
//ResetLocale(true);
|
||||||
|
//InitScoreboardMap();
|
||||||
|
//RefreshScoreboard(wasScoreboardTitleMode);
|
||||||
|
//DumpScreenOn(&justRoomsRect);
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- HandleIdleTask
|
//-------------------------------------------------------------- HandleIdleTask
|
||||||
// Handle some processing during event lulls.
|
// Handle some processing during event lulls.
|
||||||
|
|
||||||
@@ -443,6 +462,14 @@ void HandleIdleTask (void)
|
|||||||
newRoomNow = false;
|
newRoomNow = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (theMode == kSplashMode)
|
||||||
|
{
|
||||||
|
if (thisMac.isResolutionDirty)
|
||||||
|
{
|
||||||
|
HandleSplashResolutionChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- HandleEvent
|
//-------------------------------------------------------------- HandleEvent
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ void ZeroDinahs (void);
|
|||||||
void ZeroDinahsNotInRoom (SInt16);
|
void ZeroDinahsNotInRoom (SInt16);
|
||||||
|
|
||||||
SInt16 AddDynamicObject(SInt16 what, Rect *where, objectType *who, SInt16 room, SInt16 index, Boolean isOn, Boolean keepExisting);
|
SInt16 AddDynamicObject(SInt16 what, Rect *where, objectType *who, SInt16 room, SInt16 index, Boolean isOn, Boolean keepExisting);
|
||||||
void OffsetDynamics(SInt16 h, SInt16 v);
|
|
||||||
|
|
||||||
void DoGameOver (void); // --- GameOver.c
|
void DoGameOver (void); // --- GameOver.c
|
||||||
void FlagGameOver (void);
|
void FlagGameOver (void);
|
||||||
|
|||||||
@@ -698,8 +698,7 @@ void DrawARoomsObjects (short neighbor, Boolean redraw)
|
|||||||
if (SectRect(&itsRect, &testRect, &whoCares))
|
if (SectRect(&itsRect, &testRect, &whoCares))
|
||||||
{
|
{
|
||||||
#ifdef COMPILEQT
|
#ifdef COMPILEQT
|
||||||
if ((thisMac.hasQT) && (hasMovie) && (neighbor == kCentralRoom) &&
|
if ((thisMac.hasQT) && (hasMovie) && (neighbor == kCentralRoom))
|
||||||
(!tvInRoom))
|
|
||||||
{
|
{
|
||||||
whoCares = tvScreen1;
|
whoCares = tvScreen1;
|
||||||
ZeroRectCorner(&whoCares);
|
ZeroRectCorner(&whoCares);
|
||||||
@@ -708,6 +707,8 @@ void DrawARoomsObjects (short neighbor, Boolean redraw)
|
|||||||
CenterRectInRect(&movieRect, &whoCares);
|
CenterRectInRect(&movieRect, &whoCares);
|
||||||
theMovie.m_renderRect = movieRect;
|
theMovie.m_renderRect = movieRect;
|
||||||
theMovie.m_constrainRect = whoCares;
|
theMovie.m_constrainRect = whoCares;
|
||||||
|
|
||||||
|
if (!tvInRoom)
|
||||||
tvOn = thisObject.data.g.state;
|
tvOn = thisObject.data.g.state;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -366,12 +366,8 @@ void SetHouseToSavedRoom (void)
|
|||||||
|
|
||||||
//-------------------------------------------------------------- HandleGameResolutionChange
|
//-------------------------------------------------------------- HandleGameResolutionChange
|
||||||
|
|
||||||
extern DrawSurface *backSrcMap;
|
|
||||||
void HandleGameResolutionChange(void)
|
void HandleGameResolutionChange(void)
|
||||||
{
|
{
|
||||||
short prevPlayOriginH = playOriginH;
|
|
||||||
short prevPlayOriginV = playOriginV;
|
|
||||||
|
|
||||||
FlushResolutionChange();
|
FlushResolutionChange();
|
||||||
|
|
||||||
RecomputeInterfaceRects();
|
RecomputeInterfaceRects();
|
||||||
@@ -382,8 +378,6 @@ void HandleGameResolutionChange(void)
|
|||||||
if (hasMovie)
|
if (hasMovie)
|
||||||
theMovie.m_surface = &mainWindow->m_surface;
|
theMovie.m_surface = &mainWindow->m_surface;
|
||||||
|
|
||||||
OffsetDynamics(playOriginH - prevPlayOriginH, playOriginV - prevPlayOriginV);
|
|
||||||
|
|
||||||
ResetLocale(true);
|
ResetLocale(true);
|
||||||
InitScoreboardMap();
|
InitScoreboardMap();
|
||||||
RefreshScoreboard(wasScoreboardTitleMode);
|
RefreshScoreboard(wasScoreboardTitleMode);
|
||||||
|
|||||||
Reference in New Issue
Block a user