mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
BURIED: Use runLoadDialog/runSaveDialog instead of the old save/load code
This commit is contained in:
committed by
Eugene Sandulenko
parent
8de136a125
commit
e9542e6e67
@@ -260,25 +260,6 @@ bool FrameWindow::startNewGame(bool walkthrough, bool introMovie) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FrameWindow::startNewGame(const Common::String &fileName) {
|
||||
_gameInProgress = true;
|
||||
_atMainMenu = false;
|
||||
|
||||
_vm->removeMouseMessages(this);
|
||||
|
||||
delete _mainChildWindow;
|
||||
|
||||
// Create Game UI window to kick things off
|
||||
_mainChildWindow = new GameUIWindow(_vm, this);
|
||||
_mainChildWindow->showWindow(kWindowShow);
|
||||
setFocus();
|
||||
((GameUIWindow *)_mainChildWindow)->startNewGame(fileName);
|
||||
|
||||
_vm->removeMouseMessages(this);
|
||||
_vm->removeMouseMessages(_mainChildWindow);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FrameWindow::showDeathScene(int deathSceneIndex, GlobalFlags globalFlags) {
|
||||
_gameInProgress = false;
|
||||
_atMainMenu = false;
|
||||
|
||||
@@ -45,7 +45,6 @@ public:
|
||||
bool showClosingScreen();
|
||||
bool showFeaturesScreen();
|
||||
bool startNewGame(bool walkthrough = false, bool introMovie = false);
|
||||
bool startNewGame(const Common::String &fileName);
|
||||
// TODO: startNewGame with continue data
|
||||
bool showDeathScene(int deathSceneIndex, GlobalFlags globalFlags);
|
||||
bool showCompletionScene(GlobalFlags globalFlags);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "buried/biochip_right.h"
|
||||
#include "buried/buried.h"
|
||||
#include "buried/frame_window.h"
|
||||
#include "buried/gameui.h"
|
||||
#include "buried/graphics.h"
|
||||
#include "buried/invdata.h"
|
||||
@@ -37,6 +38,7 @@
|
||||
#include "buried/sound.h"
|
||||
#include "buried/video_window.h"
|
||||
|
||||
#include "common/error.h"
|
||||
#include "common/keyboard.h"
|
||||
#include "common/system.h"
|
||||
#include "graphics/surface.h"
|
||||
@@ -130,41 +132,6 @@ bool GameUIWindow::startNewGame(const Location &startingLocation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GameUIWindow::startNewGame(const Common::String &fileName) {
|
||||
_doNotDraw = false;
|
||||
showWindow(kWindowShow);
|
||||
invalidateWindow(false);
|
||||
|
||||
_navArrowWindow->showWindow(kWindowShow);
|
||||
_liveTextWindow->showWindow(kWindowShow);
|
||||
_sceneViewWindow->showWindow(kWindowShow);
|
||||
_inventoryWindow->showWindow(kWindowShow);
|
||||
_bioChipRightWindow->showWindow(kWindowShow);
|
||||
_sceneViewWindow->startNewGame(fileName);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GameUIWindow::loadGame() {
|
||||
_doNotDraw = false;
|
||||
|
||||
// TODO;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GameUIWindow::loadGame(const Common::String &fileName) {
|
||||
// TODO
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GameUIWindow::saveGame() {
|
||||
// TODO
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GameUIWindow::changeCurrentDate(int timeZoneID) {
|
||||
switch (timeZoneID) {
|
||||
case 1:
|
||||
@@ -341,7 +308,7 @@ void GameUIWindow::onKeyUp(const Common::KeyState &key, uint flags) {
|
||||
_bioChipRightWindow->changeCurrentBioChip(kItemBioChipInterface);
|
||||
_bioChipRightWindow->invalidateWindow(false);
|
||||
_bioChipRightWindow->sendMessage(new LButtonUpMessage(Common::Point(50, 130), 0));
|
||||
saveGame();
|
||||
_vm->runSaveDialog();
|
||||
return;
|
||||
}
|
||||
// Fall through
|
||||
@@ -351,7 +318,9 @@ void GameUIWindow::onKeyUp(const Common::KeyState &key, uint flags) {
|
||||
_bioChipRightWindow->changeCurrentBioChip(kItemBioChipInterface);
|
||||
_bioChipRightWindow->invalidateWindow(false);
|
||||
_bioChipRightWindow->sendMessage(new LButtonUpMessage(Common::Point(50, 130), 0));
|
||||
loadGame();
|
||||
|
||||
if (_vm->runLoadDialog().getCode() == Common::kUnknownError)
|
||||
((FrameWindow *)_vm->_mainWindow)->showMainMenu();
|
||||
return;
|
||||
}
|
||||
// Fall through
|
||||
|
||||
@@ -49,11 +49,7 @@ public:
|
||||
bool startNewGame(bool walkthrough = false);
|
||||
bool startNewGameIntro(bool walkthrough = false);
|
||||
bool startNewGame(const Location &startingLocation);
|
||||
bool startNewGame(const Common::String &fileName);
|
||||
// startNewGame(continue data, location struct);
|
||||
bool loadGame();
|
||||
bool loadGame(const Common::String &fileName);
|
||||
bool saveGame();
|
||||
bool changeCurrentDate(int timeZoneID);
|
||||
bool flashWarningLight();
|
||||
bool setWarningState(bool newState);
|
||||
|
||||
@@ -194,12 +194,6 @@ bool SceneViewWindow::startNewGame(const Location &startingLocation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SceneViewWindow::startNewGame(const Common::String &restoreFile) {
|
||||
((GameUIWindow *)_parent)->loadGame(restoreFile);
|
||||
invalidateWindow(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SceneViewWindow::showDeathScene(int deathSceneIndex) {
|
||||
return ((FrameWindow *)(_parent->getParent()))->showDeathScene(deathSceneIndex, _globalFlags); // TODO: Inventory
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ public:
|
||||
bool startNewGame(bool walkthrough = false);
|
||||
bool startNewGameIntro(bool walkthrough = false);
|
||||
bool startNewGame(const Location &startingLocation);
|
||||
bool startNewGame(const Common::String &restoreFile);
|
||||
bool showDeathScene(int deathSceneIndex);
|
||||
bool showCompletionScene();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user