aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/livingbooks_lbx.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2013-04-19 00:25:18 +0200
committerAlyssa Milburn2013-04-19 00:25:18 +0200
commitaa1fe8a1612c743a58b3d31bd34c61c626d53b79 (patch)
tree42ddf2aa7532b45779a8aba5fb5eaf083b9d4bc7 /engines/mohawk/livingbooks_lbx.cpp
parentace04a92a2d85a330c00f8479fa7b3cf2aad7c4d (diff)
downloadscummvm-rg350-aa1fe8a1612c743a58b3d31bd34c61c626d53b79.tar.gz
scummvm-rg350-aa1fe8a1612c743a58b3d31bd34c61c626d53b79.tar.bz2
scummvm-rg350-aa1fe8a1612c743a58b3d31bd34c61c626d53b79.zip
MOHAWK: Implement kLBXDataFileAddSection/SetKey.
Diffstat (limited to 'engines/mohawk/livingbooks_lbx.cpp')
-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());