aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mutationofjb/game.cpp')
-rw-r--r--engines/mutationofjb/game.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/engines/mutationofjb/game.cpp b/engines/mutationofjb/game.cpp
index 86755b1abd..134dc72e90 100644
--- a/engines/mutationofjb/game.cpp
+++ b/engines/mutationofjb/game.cpp
@@ -34,6 +34,8 @@
#include "common/str.h"
#include "common/util.h"
+#include "engines/advancedDetector.h"
+
namespace MutationOfJB {
Game::Game(MutationOfJBEngine *vm)
@@ -41,7 +43,6 @@ Game::Game(MutationOfJBEngine *vm)
_randomSource("mutationofjb"),
_delayedLocalScript(nullptr),
_gui(*this, _vm->getScreen()),
- _currentAction(ActionInfo::Walk),
_scriptExecCtx(*this),
_taskManager(*this),
_assets(*this) {
@@ -63,6 +64,10 @@ Game::Game(MutationOfJBEngine *vm)
_taskManager.startTask(TaskPtr(new ObjectAnimationTask));
}
+MutationOfJBEngine &Game::getEngine() {
+ return *_vm;
+}
+
Common::RandomSource &Game::getRandomSource() {
return _randomSource;
}
@@ -109,7 +114,7 @@ Script *Game::changeSceneLoadScript(uint8 sceneId, bool partB) {
_gameData->_partB = partB;
_room->load(_gameData->_currentScene, partB);
- _room->redraw();
+ _gui.refreshAfterSceneChanged();
EncryptedFile scriptFile;
Common::String fileName = Common::String::format("scrn%d%s.atn", sceneId, partB ? "b" : "");
@@ -128,8 +133,6 @@ Script *Game::changeSceneLoadScript(uint8 sceneId, bool partB) {
localScript->loadFromStream(scriptFile);
scriptFile.close();
- _vm->updateCursor();
-
return localScript;
}
@@ -190,7 +193,6 @@ void Game::update() {
_delayedLocalScript = nullptr;
}
- _gui.update();
_taskManager.update();
}
@@ -198,14 +200,6 @@ GameScreen &Game::getGameScreen() {
return _gui;
}
-ActionInfo::Action Game::getCurrentAction() const {
- return _currentAction;
-}
-
-void Game::setCurrentAction(ActionInfo::Action action) {
- _currentAction = action;
-}
-
uint8 Game::colorFromString(const char *colorStr) {
struct {
const char *str;
@@ -265,4 +259,8 @@ bool Game::loadSaveAllowed() const {
return true;
}
+Common::Language Game::getLanguage() const {
+ return _vm->getGameDescription()->language;
+}
+
}