From aa1fe8a1612c743a58b3d31bd34c61c626d53b79 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Fri, 19 Apr 2013 00:25:18 +0200 Subject: MOHAWK: Implement kLBXDataFileAddSection/SetKey. --- engines/mohawk/livingbooks_lbx.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'engines/mohawk/livingbooks_lbx.cpp') 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 ¶ms, 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 list = Common::SharedPtr(new LBList); @@ -81,6 +91,13 @@ bool LBXDataFile::call(uint callId, const Common::Array ¶ms, 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()); -- cgit v1.2.3