aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/mads_logic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4/mads_logic.cpp')
-rw-r--r--engines/m4/mads_logic.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index cc28a26e68..335127393e 100644
--- a/engines/m4/mads_logic.cpp
+++ b/engines/m4/mads_logic.cpp
@@ -199,6 +199,10 @@ uint32 MadsSceneLogic::getDataValue(int dataId) {
return getActiveAnimationBool();
case 11:
return getAnimationCurrentFrame();
+ case 12:
+ return _madsVm->scene()->_action._inProgress;
+ case 13:
+ return _madsVm->globals()->_difficultyLevel;
default:
// All other data variables get stored in the hash table
return _madsVm->globals()->_dataMap[dataId];
@@ -239,6 +243,12 @@ void MadsSceneLogic::setDataValue(int dataId, uint16 dataValue) {
case 11:
error("Tried to set read only data field %d", dataId);
break;
+ case 12:
+ _madsVm->scene()->_action._inProgress = dataValue != 0;
+ break;
+ case 13:
+ _madsVm->globals()->_difficultyLevel = dataValue;
+ break;
default:
// All other data variables get stored in the hash table
_madsVm->globals()->_dataMap[dataId] = dataValue;
@@ -986,6 +996,37 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
break;
}
+ case 27: {
+ // object_get_id_from_desc
+ EXTRACT_PARAMS(1);
+ stack.push(_madsVm->globals()->getObjectIndex(p[0]));
+ break;
+ }
+
+ case 28: {
+ // object_get_folder
+ EXTRACT_PARAMS(1);
+ stack.push(_madsVm->globals()->getObjectFolder(p[0]));
+ break;
+ }
+
+ case 29:
+ // inventory_remove
+ EXTRACT_PARAMS(1);
+ _madsVm->scene()->getInterface()->addObjectToInventory(p[0]);
+ break;
+
+ case 30:
+ // image_inter_list_call
+ EXTRACT_PARAMS(1);
+ warning("TODO: image_inter_list_call");
+ break;
+
+ case 31:
+ // dialog_flags_show
+ warning("todo: dialog_flags_show");
+ break;
+
default:
error("Unknown subroutine %d called", subIndex);
break;