aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-07-25 19:19:52 +0200
committeruruk2014-07-25 19:20:50 +0200
commit3c0665edfa5fcbb1557aba3bc13c512f48f86dc6 (patch)
treeba2f670fad508be66ceff1b3ce587f2a58fdb64c
parent72c8dbaf669c850ad4d4d91a7a1befaa48d7f56d (diff)
downloadscummvm-rg350-3c0665edfa5fcbb1557aba3bc13c512f48f86dc6.tar.gz
scummvm-rg350-3c0665edfa5fcbb1557aba3bc13c512f48f86dc6.tar.bz2
scummvm-rg350-3c0665edfa5fcbb1557aba3bc13c512f48f86dc6.zip
CGE2: Rework loadUser().
Now initToolbar() works as intended both when starting a new game or when loading an old gamestate.
-rw-r--r--engines/cge2/cge2_main.cpp10
-rw-r--r--engines/cge2/saveload.cpp4
2 files changed, 6 insertions, 8 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index e4b34a001c..87ab2dea8f 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -643,9 +643,8 @@ void CGE2Engine::runGame() {
loadUser();
- initToolbar();
-
sceneUp(_now);
+ initToolbar();
// main loop
while (!_endGame && !_quitFlag) {
@@ -666,12 +665,13 @@ void CGE2Engine::runGame() {
void CGE2Engine::loadUser() {
loadPos();
+
if (_startGameSlot != -1)
loadGame(_startGameSlot);
- else {
+ else
loadScript("CGE.INI");
- loadHeroes();
- }
+
+ loadHeroes();
}
void CGE2Engine::loadHeroes() { // Original name: loadGame()
diff --git a/engines/cge2/saveload.cpp b/engines/cge2/saveload.cpp
index 3c57e621f2..5e60f07bcd 100644
--- a/engines/cge2/saveload.cpp
+++ b/engines/cge2/saveload.cpp
@@ -369,9 +369,7 @@ bool CGE2Engine::loadGame(int slotNumber) {
delete readStream;
syncSpeechSettings();
- initToolbar();
- loadHeroes();
-
+
return true;
}