aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mohawk/livingbooks_lbx.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks_lbx.cpp b/engines/mohawk/livingbooks_lbx.cpp
index 9628e06294..2b8b22ec81 100644
--- a/engines/mohawk/livingbooks_lbx.cpp
+++ b/engines/mohawk/livingbooks_lbx.cpp
@@ -48,8 +48,10 @@ LBXDataFile::~LBXDataFile() {
enum {
kLBXDataFileOpen = 1,
+ kLBXDataFileAddSection = 3,
kLBXDataFileGetSectionList = 4,
kLBXDataFileSetCurSection = 5,
+ kLBXDataFileSetKey = 7,
kLBXDataFileLoadCurSectionVars = 8,
kLBXDataFileDeleteCurSection = 10,
kLBXDataFileSectionExists = 14
@@ -64,6 +66,14 @@ bool LBXDataFile::call(uint callId, const Common::Array<LBValue> &params, LBValu
open(params[0].toString());
return false;
+ case kLBXDataFileAddSection:
+ if (params.size() != 1)
+ error("incorrect number of parameters (%d) to LBXDataFile::addSection", params.size());
+
+ _dataFile.addSection(params[0].toString());
+ _curSection = params[0].toString();
+ return false;
+
case kLBXDataFileGetSectionList:
{
Common::SharedPtr<LBList> list = Common::SharedPtr<LBList>(new LBList);
@@ -81,6 +91,13 @@ bool LBXDataFile::call(uint callId, const Common::Array<LBValue> &params, LBValu
_curSection = params[0].toString();
return false;
+ case kLBXDataFileSetKey:
+ if (params.size() != 2)
+ error("incorrect number of parameters (%d) to LBXDataFile::setKey", params.size());
+
+ _dataFile.setKey(params[0].toString(), _curSection, params[1].toString());
+ return false;
+
case kLBXDataFileLoadCurSectionVars:
if (params.size() != 0)
error("incorrect number of parameters (%d) to LBXDataFile::loadCurSectionVars", params.size());