diff options
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 7 | ||||
-rw-r--r-- | common/system.cpp | 1 | ||||
-rw-r--r-- | common/system.h | 7 | ||||
-rw-r--r-- | engines/agos/agos.h | 2 | ||||
-rw-r--r-- | engines/agos/items.cpp | 8 |
5 files changed, 19 insertions, 6 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index ca00349020..5f76d21c9d 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -227,7 +227,8 @@ bool OSystem_SDL::hasFeature(Feature f) { (f == kFeatureFullscreenMode) || (f == kFeatureAspectRatioCorrection) || (f == kFeatureAutoComputeDirtyRects) || - (f == kFeatureCursorHasPalette); + (f == kFeatureCursorHasPalette) || + (f == kFeatureIconifyWindow); } void OSystem_SDL::setFeatureState(Feature f, bool enable) { @@ -244,6 +245,10 @@ void OSystem_SDL::setFeatureState(Feature f, bool enable) { else _modeFlags &= ~DF_WANT_RECT_OPTIM; break; + case kFeatureIconifyWindow: + if (enable) + SDL_WM_IconifyWindow(); + break; default: break; } diff --git a/common/system.cpp b/common/system.cpp index 22bbb9aba4..614dff6199 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -83,4 +83,3 @@ void OSystem::stopCD() { void OSystem::updateCD() { } - diff --git a/common/system.h b/common/system.h index 91ea05b928..9508520cc1 100644 --- a/common/system.h +++ b/common/system.h @@ -128,7 +128,12 @@ public: * This should only be set if it offers at least 3-4 bits of accuracy, * as opposed to a single alpha bit. */ - kFeatureOverlaySupportsAlpha + kFeatureOverlaySupportsAlpha, + + /** + * Set to true to iconify the window. + */ + kFeatureIconifyWindow }; /** diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 8f0aba39c2..1f11c69690 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1088,7 +1088,7 @@ public: void o3_b3NotZero(); // Opcodes, Puzzle Pack only - void o4_opcode30(); + void o4_iconifyWindow(); void o4_restoreOopsPosition(); void o4_checkTiles(); void o4_loadMouseImage(); diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 95925669c6..5953abd45e 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -435,7 +435,7 @@ void AGOSEngine::setupPuzzleOpcodes(OpcodeProc *op) { setupAGOSOpcodes(op); op[23] = &AGOSEngine::o3_chance; - op[30] = &AGOSEngine::o4_opcode30; + op[30] = &AGOSEngine::o4_iconifyWindow; op[32] = &AGOSEngine::o4_restoreOopsPosition; op[37] = &AGOSEngine::o4_checkTiles; op[38] = &AGOSEngine::o4_loadMouseImage; @@ -2440,9 +2440,13 @@ void AGOSEngine::o3_b3NotZero() { // Puzzle Pack Opcodes // ----------------------------------------------------------------------- -void AGOSEngine::o4_opcode30() { +void AGOSEngine::o4_iconifyWindow() { // 30 getNextItemPtr(); + if (_clockStopped != 0) + _gameTime += time(NULL) - _clockStopped; + _clockStopped = 0; + _system->setFeatureState(OSystem::kFeatureIconifyWindow, true); } void AGOSEngine::o4_restoreOopsPosition() { |