Implemented "iconify window" opcode. This, of course, needs support in the
backend to work, and so far it's only done in the SDL backend. See the new kFeatureIconifyWindow flag. (This is patch #1568775.) svn-id: r24060
This commit is contained in:
parent
42cb69827e
commit
d7b786ea41
5 changed files with 19 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -83,4 +83,3 @@ void OSystem::stopCD() {
|
|||
|
||||
void OSystem::updateCD() {
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue