From 27c427add299399a71fe96f591690e589e35c031 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Wed, 25 Jun 2008 03:17:01 +0000 Subject: Scumm and sky now use the new _quit flag svn-id: r32775 --- engines/sky/control.cpp | 10 +++++----- engines/sky/intro.cpp | 3 +-- engines/sky/intro.h | 1 - engines/sky/logic.cpp | 2 +- engines/sky/mouse.cpp | 2 +- engines/sky/sky.cpp | 15 +++++---------- engines/sky/sky.h | 1 - 7 files changed, 13 insertions(+), 21 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index 53169402e1..5955c851f6 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -492,7 +492,7 @@ void Control::doControlPanel(void) { _curButtonText = 0; uint16 clickRes = 0; - while (!quitPanel && !SkyEngine::_systemVars.quitGame) { + while (!quitPanel && !g_engine->_quit) { _text->drawToScreen(WITH_MASK); _system->updateScreen(); _mouseClicked = false; @@ -524,7 +524,7 @@ void Control::doControlPanel(void) { } memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); - if (!SkyEngine::_systemVars.quitGame) + if (!g_engine->_quit) _system->updateScreen(); _skyScreen->forceRefresh(); _skyScreen->setPaletteEndian((uint8 *)_skyCompact->fetchCpt(SkyEngine::_systemVars.currentPalette)); @@ -603,7 +603,7 @@ uint16 Control::handleClick(ConResource *pButton) { case QUIT_TO_DOS: animClick(pButton); if (getYesNo(quitDos)) - SkyEngine::_systemVars.quitGame = true; + g_engine->_quit = true; return 0; default: error("Control::handleClick: unknown routine: %X",pButton->_onClick); @@ -875,7 +875,7 @@ uint16 Control::saveRestorePanel(bool allowSave) { bool refreshNames = true; bool refreshAll = true; uint16 clickRes = 0; - while (!quitPanel && !SkyEngine::_systemVars.quitGame) { + while (!quitPanel && !g_engine->_quit) { clickRes = 0; if (refreshNames || refreshAll) { if (refreshAll) { @@ -1547,7 +1547,7 @@ void Control::delay(unsigned int amount) { _mouseWheel = 1; break; case Common::EVENT_QUIT: - SkyEngine::_systemVars.quitGame = true; + g_engine->_quit = true; break; default: break; diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 024360561c..f5699eb2f1 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -636,7 +636,6 @@ Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *t _textBuf = (uint8*)malloc(10000); _saveBuf = (uint8*)malloc(10000); _bgBuf = NULL; - _quitProg = false; _relDelay = 0; } @@ -913,7 +912,7 @@ bool Intro::escDelay(uint32 msecs) { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) return false; } else if (event.type == Common::EVENT_QUIT) { - _quitProg = true; + g_engine->_quit = true; return false; } } diff --git a/engines/sky/intro.h b/engines/sky/intro.h index 4a54fb8dd3..796bcf7e36 100644 --- a/engines/sky/intro.h +++ b/engines/sky/intro.h @@ -43,7 +43,6 @@ public: Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, Audio::Mixer *mixer, OSystem *system); ~Intro(void); bool doIntro(bool floppyIntro); - bool _quitProg; private: static uint16 _mainIntroSeq[]; static uint16 _floppyIntroSeq[]; diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index ed7e419f64..936efdacbe 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -2489,7 +2489,7 @@ bool Logic::fnFadeUp(uint32 a, uint32 b, uint32 c) { } bool Logic::fnQuitToDos(uint32 a, uint32 b, uint32 c) { - SkyEngine::_systemVars.quitGame = true; + g_engine->_quit = true; return false; } diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp index b3be8b4f36..38a3b6a8e9 100644 --- a/engines/sky/mouse.cpp +++ b/engines/sky/mouse.cpp @@ -180,7 +180,7 @@ void Mouse::waitMouseNotPressed(int minDelay) { while (mousePressed || _system->getMillis() < now + minDelay) { if (eventMan->shouldQuit()) { - SkyEngine::_systemVars.quitGame = true; + g_engine->_quit = true; minDelay = 0; mousePressed = false; } diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index d87ed06fef..072d0c914e 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -257,7 +257,7 @@ namespace Sky { void *SkyEngine::_itemList[300]; -SystemVars SkyEngine::_systemVars = {0, 0, 0, 0, 4316, 0, 0, false, false, false }; +SystemVars SkyEngine::_systemVars = {0, 0, 0, 0, 4316, 0, 0, false, false }; SkyEngine::SkyEngine(OSystem *syst) : Engine(syst), _fastMode(0), _debugger(0) { @@ -340,8 +340,6 @@ void SkyEngine::handleKey(void) { int SkyEngine::go() { - _systemVars.quitGame = false; - _keyPressed.reset(); uint16 result = 0; @@ -353,12 +351,9 @@ int SkyEngine::go() { if (_systemVars.gameVersion > 267) { // don't do intro for floppydemos _skyIntro = new Intro(_skyDisk, _skyScreen, _skyMusic, _skySound, _skyText, _mixer, _system); introSkipped = !_skyIntro->doIntro(_floppyIntro); - _systemVars.quitGame = _skyIntro->_quitProg; - - delete _skyIntro; } - if (!_systemVars.quitGame) { + if (!_quit) { _skyLogic->initScreen0(); if (introSkipped) _skyControl->restartGame(); @@ -368,7 +363,7 @@ int SkyEngine::go() { _lastSaveTime = _system->getMillis(); uint32 delayCount = _system->getMillis(); - while (!_systemVars.quitGame) { + while (!_quit) { if (_debugger->isAttached()) _debugger->onFrame(); @@ -419,7 +414,7 @@ int SkyEngine::go() { _skyMusic->stopMusic(); ConfMan.flushToDisk(); delay(1500); - return 0; + return _rtl; } int SkyEngine::init() { @@ -616,7 +611,7 @@ void SkyEngine::delay(int32 amount) { _skyMouse->buttonPressed(1); break; case Common::EVENT_QUIT: - _systemVars.quitGame = true; + _quit = true; break; default: break; diff --git a/engines/sky/sky.h b/engines/sky/sky.h index b5d1701930..47aebaba77 100644 --- a/engines/sky/sky.h +++ b/engines/sky/sky.h @@ -41,7 +41,6 @@ struct SystemVars { uint16 gameSpeed; uint16 currentMusic; bool pastIntro; - bool quitGame; bool paused; }; -- cgit v1.2.3 From e53556af85bf3727d42898625a6eee508ca82862 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Thu, 26 Jun 2008 00:50:16 +0000 Subject: Fixed quitting from BASS intro, cleaned up comments in agos svn-id: r32793 --- engines/sky/intro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index f5699eb2f1..56c2fff1b4 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -911,7 +911,7 @@ bool Intro::escDelay(uint32 msecs) { if (event.type == Common::EVENT_KEYDOWN) { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) return false; - } else if (event.type == Common::EVENT_QUIT) { + } else if (event.type == Common::EVENT_QUIT || g_engine->_quit) { g_engine->_quit = true; return false; } -- cgit v1.2.3 From d0dcc1ad7943a528f0f4f016a64ee45251adb6a8 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Thu, 26 Jun 2008 22:03:49 +0000 Subject: Quit or RTL from the main menu now triggers an EVENT_QUIT in DefaultEventManager::pollEvent() svn-id: r32813 --- engines/sky/intro.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 56c2fff1b4..51160924da 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -911,8 +911,7 @@ bool Intro::escDelay(uint32 msecs) { if (event.type == Common::EVENT_KEYDOWN) { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) return false; - } else if (event.type == Common::EVENT_QUIT || g_engine->_quit) { - g_engine->_quit = true; + } else if (event.type == Common::EVENT_QUIT) { return false; } } -- cgit v1.2.3 From a6e1d6bd3dcdc1fae7832ffe26b4d774ec1fe6a3 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Sun, 13 Jul 2008 20:41:39 +0000 Subject: SKY works with the new GMM implementation, also updated gui/newgui.cpp and prevented pushEvent from pushing more than one EVENT_QUIT into the artificialEventQueue svn-id: r33041 --- engines/sky/control.cpp | 11 ++++------- engines/sky/logic.cpp | 2 +- engines/sky/mouse.cpp | 1 - engines/sky/sky.cpp | 9 +++------ 4 files changed, 8 insertions(+), 15 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index 5955c851f6..a6ab5429dd 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -492,7 +492,7 @@ void Control::doControlPanel(void) { _curButtonText = 0; uint16 clickRes = 0; - while (!quitPanel && !g_engine->_quit) { + while (!quitPanel && !g_engine->quit()) { _text->drawToScreen(WITH_MASK); _system->updateScreen(); _mouseClicked = false; @@ -524,7 +524,7 @@ void Control::doControlPanel(void) { } memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); - if (!g_engine->_quit) + if (!g_engine->quit()) _system->updateScreen(); _skyScreen->forceRefresh(); _skyScreen->setPaletteEndian((uint8 *)_skyCompact->fetchCpt(SkyEngine::_systemVars.currentPalette)); @@ -603,7 +603,7 @@ uint16 Control::handleClick(ConResource *pButton) { case QUIT_TO_DOS: animClick(pButton); if (getYesNo(quitDos)) - g_engine->_quit = true; + g_engine->quitGame(); return 0; default: error("Control::handleClick: unknown routine: %X",pButton->_onClick); @@ -875,7 +875,7 @@ uint16 Control::saveRestorePanel(bool allowSave) { bool refreshNames = true; bool refreshAll = true; uint16 clickRes = 0; - while (!quitPanel && !g_engine->_quit) { + while (!quitPanel && !g_engine->quit()) { clickRes = 0; if (refreshNames || refreshAll) { if (refreshAll) { @@ -1546,9 +1546,6 @@ void Control::delay(unsigned int amount) { case Common::EVENT_WHEELDOWN: _mouseWheel = 1; break; - case Common::EVENT_QUIT: - g_engine->_quit = true; - break; default: break; } diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index 936efdacbe..6cd4ce505a 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -2489,7 +2489,7 @@ bool Logic::fnFadeUp(uint32 a, uint32 b, uint32 c) { } bool Logic::fnQuitToDos(uint32 a, uint32 b, uint32 c) { - g_engine->_quit = true; + g_engine->quitGame(); return false; } diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp index 38a3b6a8e9..1fc9e47539 100644 --- a/engines/sky/mouse.cpp +++ b/engines/sky/mouse.cpp @@ -180,7 +180,6 @@ void Mouse::waitMouseNotPressed(int minDelay) { while (mousePressed || _system->getMillis() < now + minDelay) { if (eventMan->shouldQuit()) { - g_engine->_quit = true; minDelay = 0; mousePressed = false; } diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 072d0c914e..421f6a5f08 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -353,7 +353,7 @@ int SkyEngine::go() { introSkipped = !_skyIntro->doIntro(_floppyIntro); } - if (!_quit) { + if (!quit()) { _skyLogic->initScreen0(); if (introSkipped) _skyControl->restartGame(); @@ -363,7 +363,7 @@ int SkyEngine::go() { _lastSaveTime = _system->getMillis(); uint32 delayCount = _system->getMillis(); - while (!_quit) { + while (!quit()) { if (_debugger->isAttached()) _debugger->onFrame(); @@ -414,7 +414,7 @@ int SkyEngine::go() { _skyMusic->stopMusic(); ConfMan.flushToDisk(); delay(1500); - return _rtl; + return _eventMan->shouldRTL(); } int SkyEngine::init() { @@ -610,9 +610,6 @@ void SkyEngine::delay(int32 amount) { _skyMouse->mouseMoved(event.mouse.x, event.mouse.y); _skyMouse->buttonPressed(1); break; - case Common::EVENT_QUIT: - _quit = true; - break; default: break; } -- cgit v1.2.3 From 7f480ac571f978802a3ecd5cf6169d0271d1f561 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Wed, 16 Jul 2008 04:22:56 +0000 Subject: Quit and RTL code is more modular now. EVENT_RTL no longer sets _shouldQuit, shouldQuit is only set if there's an EVENT_QUIT. EVENT_RTL and EVENT_QUIT are completely separate from each other. Engine::quit() method now checks both _shouldQuit and _shouldRTL to determine if the engine should exit. There is no longer a need for resetQuit(), so it's removed svn-id: r33082 --- engines/sky/intro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 51160924da..d7a94f6c2f 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -911,7 +911,7 @@ bool Intro::escDelay(uint32 msecs) { if (event.type == Common::EVENT_KEYDOWN) { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) return false; - } else if (event.type == Common::EVENT_QUIT) { + } else if (event.type == Common::EVENT_QUIT || event.type == Common::EVENT_RTL) { return false; } } -- cgit v1.2.3 From 8b01922317ae96e8180319c573f77f6c46c7c892 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Mon, 21 Jul 2008 19:37:12 +0000 Subject: Improved GMM sound settings support for SKY svn-id: r33178 --- engines/sky/sky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 421f6a5f08..92df584f6f 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -435,7 +435,7 @@ int SkyEngine::init() { _floppyIntro = ConfMan.getBool("alt_intro"); _skyDisk = new Disk(); - _skySound = new Sound(_mixer, _skyDisk, ConfMan.getInt("sfx_volume")); + _skySound = new Sound(_mixer, _skyDisk, Audio::Mixer::kMaxChannelVolume); _systemVars.gameVersion = _skyDisk->determineGameVersion(); -- cgit v1.2.3 From a51f45407659bba43254b466d20b6af2e8f17ffd Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Thu, 31 Jul 2008 21:56:05 +0000 Subject: Added check for valid save slots, when loading savestates using -x svn-id: r33483 --- engines/sky/sky.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 92df584f6f..44347cf9a7 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -343,8 +343,11 @@ int SkyEngine::go() { _keyPressed.reset(); uint16 result = 0; - if (ConfMan.hasKey("save_slot") && ConfMan.getInt("save_slot") >= 0) - result = _skyControl->quickXRestore(ConfMan.getInt("save_slot")); + if (ConfMan.hasKey("save_slot")) { + int saveSlot = ConfMan.getInt("save_slot"); + if (saveSlot >= 0 && saveSlot <= 999) + result = _skyControl->quickXRestore(ConfMan.getInt("save_slot")); + } if (result != GAME_RESTORED) { bool introSkipped = false; -- cgit v1.2.3 From dcecff4829b30471cd230c03fe4c75c5d1f4b31b Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 3 Aug 2008 09:41:10 +0000 Subject: Fixed bug that prevented upper-case letters from being used in savegame names. Apparently, strchr(..., 0) will find the string terminator - at least for me - and when that's added to the name, it will terminate the string. svn-id: r33565 --- engines/sky/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index 53169402e1..9d6b58704d 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -986,7 +986,7 @@ void Control::handleKeyPress(Common::KeyState kbd, Common::String &textBuf) { if (kbd.keycode == Common::KEYCODE_BACKSPACE) { // backspace if (textBuf.size() > 0) textBuf.deleteLastChar(); - } else { + } else if (kbd.ascii) { // Cannot enter text wider than the save/load panel if (_enteredTextWidth >= PAN_LINE_WIDTH - 10) return; -- cgit v1.2.3 From e8cee7823d5c2087c4a6bfde04c350d16c56774d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 3 Aug 2008 09:51:13 +0000 Subject: Fixed bug #1995022 ("BASS: wrong displayed 2 line text"). svn-id: r33568 --- engines/sky/logic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index ed7e419f64..c6c6c34c4d 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -1774,6 +1774,7 @@ bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) { uint32 size = ((dataFileHeader *)data)->s_height * ((dataFileHeader *)data)->s_width; uint32 index = 0; uint32 width = ((dataFileHeader *)data)->s_width; + uint32 height = ((dataFileHeader *)data)->s_height; data += sizeof(dataFileHeader); @@ -1794,7 +1795,7 @@ bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) { textCompact->xcood = TOP_LEFT_X; // set coordinates textCompact->ycood = ycood; - ycood += 12; + ycood += height; } if (p == _scriptVariables + TEXT1) -- cgit v1.2.3 From 117dee5e4a024d41edf1e21b74c0017f78341424 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 3 Aug 2008 10:16:17 +0000 Subject: Fixed bug #1995033 ("BASS: BG Sound stopped on opening item list"). Apparently the sound is supposed to be paused and then unpaused, but the pause function is called many more times than the unpause function. In the original, this presumably didn't matter. In ScummVM's mixer, it does. svn-id: r33570 --- engines/sky/sound.cpp | 15 +++++++++++---- engines/sky/sound.h | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index 928221a9a5..f15038c0b6 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -1025,6 +1025,7 @@ Sound::Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume) { _mixer = mixer; _saveSounds[0] = _saveSounds[1] = 0xFFFF; _mainSfxVolume = pVolume; + _isPaused = false; } Sound::~Sound(void) { @@ -1254,14 +1255,20 @@ bool Sound::startSpeech(uint16 textNum) { void Sound::fnPauseFx(void) { - _mixer->pauseID(SOUND_CH0, true); - _mixer->pauseID(SOUND_CH1, true); + if (!_isPaused) { + _isPaused = true; + _mixer->pauseID(SOUND_CH0, true); + _mixer->pauseID(SOUND_CH1, true); + } } void Sound::fnUnPauseFx(void) { - _mixer->pauseID(SOUND_CH0, false); - _mixer->pauseID(SOUND_CH1, false); + if (_isPaused) { + _isPaused = false; + _mixer->pauseID(SOUND_CH0, false); + _mixer->pauseID(SOUND_CH1, false); + } } } // End of namespace Sky diff --git a/engines/sky/sound.h b/engines/sky/sound.h index 28e2e8c88a..0ad509700e 100644 --- a/engines/sky/sound.h +++ b/engines/sky/sound.h @@ -89,6 +89,8 @@ private: uint8 *_sampleRates, *_sfxInfo; uint8 _mainSfxVolume; + bool _isPaused; + static uint16 _speechConvertTable[8]; static SfxQueue _sfxQueue[MAX_QUEUED_FX]; }; -- cgit v1.2.3 From 2d31207a8169491647d8fa3baab7eadbfdfa1da9 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Wed, 13 Aug 2008 20:27:39 +0000 Subject: Fixed some memory leaks svn-id: r33846 --- engines/sky/control.cpp | 12 ++++++++---- engines/sky/intro.cpp | 3 --- engines/sky/sky.cpp | 3 +++ 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index 3edc087f57..8699c893e4 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -238,13 +238,17 @@ void Control::removePanel(void) { free(_sprites.slide2); free(_sprites.slode); free(_sprites.slode2); free(_sprites.musicBodge); delete _controlPanel; delete _exitButton; - delete _slide; delete _slide2; - delete _slode; delete _restorePanButton; + delete _slide; delete _slide2; + delete _slode; delete _restorePanButton; + delete _savePanel; delete _saveButton; + delete _downFastButton; delete _downSlowButton; + delete _upFastButton; delete _upSlowButton; + delete _quitButton; delete _autoSaveButton; delete _savePanButton; delete _dosPanButton; delete _restartPanButton; delete _fxPanButton; delete _musicPanButton; delete _bodge; - delete _yesNo; delete _text; - delete _statusBar; delete _restoreButton; + delete _yesNo; delete _text; + delete _statusBar; delete _restoreButton; if (_textSprite) { free(_textSprite); diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index d7a94f6c2f..86e26309c9 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -640,9 +640,6 @@ Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *t } Intro::~Intro(void) { - - _mixer->stopAll(); - _skyScreen->stopSequence(); if (_textBuf) free(_textBuf); if (_saveBuf) diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 44347cf9a7..bcdc9f5130 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -277,6 +277,8 @@ SkyEngine::~SkyEngine() { delete _skyDisk; delete _skyControl; delete _skyCompact; + if (_skyIntro) + delete _skyIntro; for (int i = 0; i < 300; i++) if (_itemList[i]) @@ -473,6 +475,7 @@ int SkyEngine::init() { _systemVars.systemFlags |= SF_PLAY_VOCS; _systemVars.gameSpeed = 50; + _skyIntro = 0; _skyCompact = new SkyCompact(); _skyText = new Text(_skyDisk, _skyCompact); _skyMouse = new Mouse(_system, _skyDisk, _skyCompact); -- cgit v1.2.3 From 9d3cdcb2da64ae3afdcd19f1ea18a917f9318190 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Fri, 15 Aug 2008 18:15:14 +0000 Subject: Defined some MetaEngineFeatures for the engines, the launcher uses these features to allow/disallow loading and deleting saves svn-id: r33909 --- engines/sky/sky.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index bcdc9f5130..88f7f93d75 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -110,9 +110,10 @@ public: virtual const char *getName() const; virtual const char *getCopyright() const; + virtual bool hasFeature(MetaEngineFeature f) const; virtual GameList getSupportedGames() const; virtual GameDescriptor findGame(const char *gameid) const; - virtual GameList detectGames(const FSList &fslist) const; + virtual GameList detectGames(const FSList &fslist) const; virtual PluginError createInstance(OSystem *syst, Engine **engine) const; @@ -127,6 +128,12 @@ const char *SkyMetaEngine::getCopyright() const { return "Beneath a Steel Sky (C) Revolution"; } +bool SkyMetaEngine::hasFeature(MetaEngineFeature f) const { + return + (f == kSupportsListSaves) || + (f == kSupportsDirectLoad); +} + GameList SkyMetaEngine::getSupportedGames() const { GameList games; games.push_back(skySetting); -- cgit v1.2.3 From ec8dac5540d87925525523eb1715abc1ec271261 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Sat, 16 Aug 2008 02:53:16 +0000 Subject: Added a MetaEngineFeature for RTL support, the RTL button is disabled in the GMM if the engine doesn't support it svn-id: r33921 --- engines/sky/sky.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 88f7f93d75..eecc7a9fbf 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -130,6 +130,7 @@ const char *SkyMetaEngine::getCopyright() const { bool SkyMetaEngine::hasFeature(MetaEngineFeature f) const { return + (f == kSupportsRTL) || (f == kSupportsListSaves) || (f == kSupportsDirectLoad); } -- cgit v1.2.3 From 58166351c6420ce1f6f0b7daac4b0ee6f1e43390 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Sat, 16 Aug 2008 22:06:44 +0000 Subject: Made sure to set the loading slot AFTER selecting the active domain when loading from the launcher. Also fixed the flickering Virgin logo in BASS svn-id: r33949 --- engines/sky/sky.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index eecc7a9fbf..4f803cb393 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -298,8 +298,6 @@ GUI::Debugger *SkyEngine::getDebugger() { } void SkyEngine::initVirgin() { - - _skyScreen->setPalette(60111); _skyScreen->showScreen(60110); } -- cgit v1.2.3 From 3fef592c205a07a7519132ea2fe602340d18eeed Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Tue, 2 Sep 2008 00:31:27 +0000 Subject: fix Virgin logo screen breakage that was introduced in the RTL merge svn-id: r34267 --- engines/sky/sky.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 4f803cb393..7cdd92aed3 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -298,6 +298,7 @@ GUI::Debugger *SkyEngine::getDebugger() { } void SkyEngine::initVirgin() { + _skyScreen->setPalette(60111); _skyScreen->showScreen(60110); } -- cgit v1.2.3 From 531bcf847ceef2b9eca82e0b3ef8473612889632 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 3 Sep 2008 11:22:51 +0000 Subject: Moved FilesystemNode / FSList to namespace Common; also got rid of some 'typedef Common::String String;' name aliases svn-id: r34302 --- engines/sky/sky.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 7cdd92aed3..594e7a6aaf 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -113,7 +113,7 @@ public: virtual bool hasFeature(MetaEngineFeature f) const; virtual GameList getSupportedGames() const; virtual GameDescriptor findGame(const char *gameid) const; - virtual GameList detectGames(const FSList &fslist) const; + virtual GameList detectGames(const Common::FSList &fslist) const; virtual PluginError createInstance(OSystem *syst, Engine **engine) const; @@ -147,7 +147,7 @@ GameDescriptor SkyMetaEngine::findGame(const char *gameid) const { return GameDescriptor(); } -GameList SkyMetaEngine::detectGames(const FSList &fslist) const { +GameList SkyMetaEngine::detectGames(const Common::FSList &fslist) const { GameList detectedGames; bool hasSkyDsk = false; bool hasSkyDnr = false; @@ -155,7 +155,7 @@ GameList SkyMetaEngine::detectGames(const FSList &fslist) const { int dataDiskSize = -1; // Iterate over all files in the given directory - for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { + for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { if (!file->isDirectory()) { const char *fileName = file->getName().c_str(); -- cgit v1.2.3 From d3642080def2d9ae5035724dab00565547a52a5e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 3 Sep 2008 16:56:40 +0000 Subject: Moved check for shouldRTL() from engines to scummvm_main svn-id: r34310 --- engines/sky/sky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 594e7a6aaf..0900ba5617 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -426,7 +426,7 @@ int SkyEngine::go() { _skyMusic->stopMusic(); ConfMan.flushToDisk(); delay(1500); - return _eventMan->shouldRTL(); + return 0; } int SkyEngine::init() { -- cgit v1.2.3 From 2f30e5f63d93c94d545730d9f333049dac9bdb1e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 7 Sep 2008 21:38:53 +0000 Subject: Comment out some #defines in skydefs.h as they conflict with other headers (esp. T2 conflicts with some template defs) svn-id: r34425 --- engines/sky/skydefs.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/skydefs.h b/engines/sky/skydefs.h index f4be91b3d1..f68c0f826b 100644 --- a/engines/sky/skydefs.h +++ b/engines/sky/skydefs.h @@ -2023,14 +2023,14 @@ namespace Sky { #define DISQ_13 26624 #define DISQ_14 28672 #define DISQ_15 30720 -#define T0 0 -#define T1 4096 -#define T2 8192 -#define T3 12288 -#define T4 16384 -#define T5 20480 -#define T6 24576 -#define T7 28672 +//#define T0 0 +//#define T1 4096 +//#define T2 8192 +//#define T3 12288 +//#define T4 16384 +//#define T5 20480 +//#define T6 24576 +//#define T7 28672 #define UP 0 #define DOWN 1 #define LEFT 2 -- cgit v1.2.3