Ticket #8575: agos-iconify.diff

File agos-iconify.diff, 2.6 KB (added by eriktorbjorn, 14 years ago)

Patch against current SVN

  • engines/agos/agos.h

     
    10761076        void o3_b3NotZero();
    10771077
    10781078        // Opcodes, Puzzle Pack only
    1079         void o4_opcode30();
     1079        void o4_iconifyWindow();
    10801080        void o4_restoreOopsPosition();
    10811081        void o4_checkTiles();
    10821082        void o4_loadMouseImage();
  • engines/agos/items.cpp

     
    434434        setupAGOSOpcodes(op);
    435435
    436436        op[23] = &AGOSEngine::o3_chance;
    437         op[30] = &AGOSEngine::o4_opcode30;
     437        op[30] = &AGOSEngine::o4_iconifyWindow;
    438438        op[32] = &AGOSEngine::o4_restoreOopsPosition;
    439439        op[37] = &AGOSEngine::o4_checkTiles;
    440440        op[38] = &AGOSEngine::o4_loadMouseImage;
     
    24492449// Puzzle Pack Opcodes
    24502450// -----------------------------------------------------------------------
    24512451
    2452 void AGOSEngine::o4_opcode30() {
     2452void AGOSEngine::o4_iconifyWindow() {
    24532453        // 30
    24542454        getNextItemPtr();
     2455        if (_clockStopped != 0)
     2456                _gameTime += time(NULL) - _clockStopped;
     2457        _clockStopped  = 0;
     2458        _system->setFeatureState(OSystem::kFeatureIconifyWindow, true);
    24552459}
    24562460
    24572461void AGOSEngine::o4_restoreOopsPosition() {
  • common/system.h

     
    128128                 * This should only be set if it offers at least 3-4 bits of accuracy,
    129129                 * as opposed to a single alpha bit.
    130130                 */
    131                 kFeatureOverlaySupportsAlpha
     131                kFeatureOverlaySupportsAlpha,
     132
     133                /**
     134                 * Set to true to iconify the window.
     135                 */
     136                kFeatureIconifyWindow
    132137        };
    133138
    134139        /**
  • common/system.cpp

     
    8383
    8484void OSystem::updateCD() {
    8585}
    86 
  • backends/platform/sdl/sdl.cpp

     
    227227                (f == kFeatureFullscreenMode) ||
    228228                (f == kFeatureAspectRatioCorrection) ||
    229229                (f == kFeatureAutoComputeDirtyRects) ||
    230                 (f == kFeatureCursorHasPalette);
     230                (f == kFeatureCursorHasPalette) ||
     231                (f == kFeatureIconifyWindow);
    231232}
    232233
    233234void OSystem_SDL::setFeatureState(Feature f, bool enable) {
     
    244245                else
    245246                        _modeFlags &= ~DF_WANT_RECT_OPTIM;
    246247                break;
     248        case kFeatureIconifyWindow:
     249                if (enable)
     250                        SDL_WM_IconifyWindow();
     251                break;
    247252        default:
    248253                break;
    249254        }