aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/game.cpp
diff options
context:
space:
mode:
authorĽubomír Remák2018-04-11 21:15:01 +0200
committerEugene Sandulenko2018-08-25 23:12:01 +0200
commitc25ed8957228cfd580216383c3391ccc7e512bb5 (patch)
treefff52e7d5e588719ced3b164b6ea48c9779236af /engines/mutationofjb/game.cpp
parent9af3d8a2381fe7c7440330a9aa338f51cd734990 (diff)
downloadscummvm-rg350-c25ed8957228cfd580216383c3391ccc7e512bb5.tar.gz
scummvm-rg350-c25ed8957228cfd580216383c3391ccc7e512bb5.tar.bz2
scummvm-rg350-c25ed8957228cfd580216383c3391ccc7e512bb5.zip
MUTATIONOFJB: Refactor inventory UI into separate widget, add button widgets.
Diffstat (limited to 'engines/mutationofjb/game.cpp')
-rw-r--r--engines/mutationofjb/game.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/mutationofjb/game.cpp b/engines/mutationofjb/game.cpp
index b7f1893198..af0b76bb7e 100644
--- a/engines/mutationofjb/game.cpp
+++ b/engines/mutationofjb/game.cpp
@@ -35,7 +35,12 @@
namespace MutationOfJB {
Game::Game(MutationOfJBEngine *vm)
-: _vm(vm), _delayedLocalScript(nullptr), _gui(*this, _vm->getScreen()), _scriptExecCtx(*this) {
+ : _vm(vm),
+ _delayedLocalScript(nullptr),
+ _gui(*this, _vm->getScreen()),
+ _scriptExecCtx(*this),
+ _currentAction(ActionInfo::Walk) {
+
_gameData = new GameData;
loadGameData(false);
@@ -87,7 +92,7 @@ bool Game::loadGameData(bool partB) {
Script *Game::changeSceneLoadScript(uint8 sceneId, bool partB) {
if (isCurrentSceneMap()) {
- _gui.markInventoryDirty();
+ _gui.markDirty();
}
_gameData->_lastScene = _gameData->_currentScene;
@@ -179,4 +184,12 @@ Gui &Game::getGui() {
return _gui;
}
+ActionInfo::Action Game::getCurrentAction() const {
+ return _currentAction;
+}
+
+void Game::setCurrentAction(ActionInfo::Action action) {
+ _currentAction = action;
+}
+
}