From 34f570419ad49550c6a7790e2a97a7d88d02fbac Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 5 Sep 2010 00:48:38 +0000 Subject: MOHAWK: Cleanup - Split the main Riven event loop into a separate function for readability and for use in the sunner external functions eventually - Some minor function signature changes (const!) - Rename matchVarToString() to getVar() (I have no idea where that original name came from, considering it takes a string and returns a variable - Use solely Common::String in getVar() svn-id: r52538 --- engines/mohawk/riven_saveload.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/mohawk/riven_saveload.cpp') diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp index d73b4ec0dc..c055eb51a8 100644 --- a/engines/mohawk/riven_saveload.cpp +++ b/engines/mohawk/riven_saveload.cpp @@ -161,7 +161,7 @@ bool RivenSaveLoad::loadGame(Common::String filename) { if (name == "dropLeftStart" || name == "dropRightStart") continue; - uint32 *var = _vm->matchVarToString(name); + uint32 *var = _vm->getVar(name); *var = rawVariables[i]; @@ -272,8 +272,8 @@ bool RivenSaveLoad::saveGame(Common::String filename) { filename += ".rvn"; // Convert class variables to variable numbers - *_vm->matchVarToString("currentstackid") = mapNewStackIDToOld(_vm->getCurStack()); - *_vm->matchVarToString("currentcardid") = _vm->getCurCard(); + *_vm->getVar("currentstackid") = mapNewStackIDToOld(_vm->getCurStack()); + *_vm->getVar("currentcardid") = _vm->getCurCard(); Common::OutSaveFile *saveFile = _saveFileMan->openForSaving(filename); if (!saveFile) -- cgit v1.2.3 From c91a07229a8bd841e6b6e77d977254c388a2e407 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 18 Sep 2010 10:55:16 +0000 Subject: JANITORIAL: Removed most punctuation at end of warning() and error() Our warning() and error() functions always add an exclamation mark to the end of the message anyway. svn-id: r52791 --- engines/mohawk/riven_saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/mohawk/riven_saveload.cpp') diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp index c055eb51a8..c63a3f98fb 100644 --- a/engines/mohawk/riven_saveload.cpp +++ b/engines/mohawk/riven_saveload.cpp @@ -110,7 +110,7 @@ bool RivenSaveLoad::loadGame(Common::String filename) { delete vers; if ((saveGameVersion == kCDSaveGameVersion && (_vm->getFeatures() & GF_DVD)) || (saveGameVersion == kDVDSaveGameVersion && !(_vm->getFeatures() & GF_DVD))) { - warning("Incompatible saved game versions. No support for this yet."); + warning("Incompatible saved game versions. No support for this yet"); delete mhk; return false; } -- cgit v1.2.3