diff options
author | Ľubomír Remák | 2018-08-04 16:57:41 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | a25715a29b0587ae6795eef63a575172e2cb971d (patch) | |
tree | b10acdeffd001f507209799498a6e9f90a585e06 /engines/mutationofjb/commands | |
parent | 6ff609c51478c07a00018e57d8149f09d97677e7 (diff) | |
download | scummvm-rg350-a25715a29b0587ae6795eef63a575172e2cb971d.tar.gz scummvm-rg350-a25715a29b0587ae6795eef63a575172e2cb971d.tar.bz2 scummvm-rg350-a25715a29b0587ae6795eef63a575172e2cb971d.zip |
MUTATIONOFJB: Fix code formatting issues (with astyle).
Diffstat (limited to 'engines/mutationofjb/commands')
23 files changed, 237 insertions, 207 deletions
diff --git a/engines/mutationofjb/commands/additemcommand.cpp b/engines/mutationofjb/commands/additemcommand.cpp index 1a670f7d27..67d3e13188 100644 --- a/engines/mutationofjb/commands/additemcommand.cpp +++ b/engines/mutationofjb/commands/additemcommand.cpp @@ -24,11 +24,11 @@ #include "mutationofjb/gamedata.h" #include "mutationofjb/script.h" -/* - "ADDITEM" " " <item> - - Adds item to inventory. -*/ +/** @file + * "ADDITEM " <item> + * + * Adds item to inventory. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/callmacrocommand.cpp b/engines/mutationofjb/commands/callmacrocommand.cpp index 49b948c48d..01470f2ba1 100644 --- a/engines/mutationofjb/commands/callmacrocommand.cpp +++ b/engines/mutationofjb/commands/callmacrocommand.cpp @@ -25,11 +25,11 @@ #include "mutationofjb/game.h" #include "common/translation.h" -/* - "_" <name> - - Calls macro with the specified name. -*/ +/** @file + * "_" <name> + * + * Calls macro with the specified name. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/camefromcommand.cpp b/engines/mutationofjb/commands/camefromcommand.cpp index 0583187884..485e0c54c9 100644 --- a/engines/mutationofjb/commands/camefromcommand.cpp +++ b/engines/mutationofjb/commands/camefromcommand.cpp @@ -25,13 +25,13 @@ #include "mutationofjb/script.h" #include "common/str.h" -/* - "CAMEFROM" <sceneId> - - This command tests whether last scene (the scene player came from) is sceneId. - If true, the execution continues after this command. - Otherwise the execution continues after first '#' found. -*/ +/** @file + * "CAMEFROM" <sceneId> + * + * This command tests whether last scene (the scene player came from) is sceneId. + * If true, the execution continues after this command. + * Otherwise the execution continues after first '#' found. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/changecommand.cpp b/engines/mutationofjb/commands/changecommand.cpp index 4eac41e619..5d6833b82c 100644 --- a/engines/mutationofjb/commands/changecommand.cpp +++ b/engines/mutationofjb/commands/changecommand.cpp @@ -27,15 +27,21 @@ namespace MutationOfJB { -// CHANGEe rr ss ii val -// <e> 1B Entity to change register for. -// D door -// O object -// S static -// <rr> 2B Register name. -// <ss> 2B Scene ID. -// <ii> 2B Entity ID. -// <val> VL Value. +/** @file + * "CHANGE" <entity> " " <register> " " <sceneId> " " <entityId> " " <value> + * + * Changes entity register value for specified scene. + * <entity> 1B Entity to change register for. + * Possible values: + * 'D' - door + * 'O' - object + * 'S' - static + * '' - scene + * <register> 2B Register name. + * <sceneId> 2B Scene ID. + * <entityid> 2B Entity ID. + * <value> *B Value (variable length). + */ bool ChangeCommandParser::parseValueString(const Common::String &valueString, bool changeEntity, uint8 &sceneId, uint8 &entityId, ChangeCommand::ChangeRegister ®, ChangeCommand::ChangeOperation &op, ChangeCommandValue &ccv) { if (changeEntity) { @@ -102,7 +108,7 @@ bool ChangeCommandParser::parseValueString(const Common::String &valueString, bo ccv._byteVal = parseInteger(val, op); } else if (valueString.hasPrefix("FR")) { reg = ChangeCommand::FR; - ccv._byteVal = parseInteger(val, op); + ccv._byteVal = parseInteger(val, op); } else if (valueString.hasPrefix("NA")) { reg = ChangeCommand::NA; ccv._byteVal = parseInteger(val, op); @@ -234,32 +240,58 @@ int ChangeCommandParser::parseInteger(const char *val, ChangeCommand::ChangeOper const char *ChangeCommand::getRegisterAsString() const { switch (_register) { - case NM: return "NM"; - case LT: return "LT"; - case SX: return "SX"; - case SY: return "SY"; - case XX: return "XX"; - case YY: return "YY"; - case XL: return "XL"; - case YL: return "YL"; - case WX: return "WX"; - case WY: return "WY"; - case SP: return "SP"; - case AC: return "AC"; - case FA: return "FA"; - case FR: return "FR"; - case NA: return "NA"; - case FS: return "FS"; - case CA: return "CA"; - case DS: return "DS"; - case DL: return "DL"; - case ND: return "ND"; - case NO: return "NO"; - case NS: return "NS"; - case PF: return "PF"; - case PL: return "PL"; - case PD: return "PD"; - default: return "(unknown)"; + case NM: + return "NM"; + case LT: + return "LT"; + case SX: + return "SX"; + case SY: + return "SY"; + case XX: + return "XX"; + case YY: + return "YY"; + case XL: + return "XL"; + case YL: + return "YL"; + case WX: + return "WX"; + case WY: + return "WY"; + case SP: + return "SP"; + case AC: + return "AC"; + case FA: + return "FA"; + case FR: + return "FR"; + case NA: + return "NA"; + case FS: + return "FS"; + case CA: + return "CA"; + case DS: + return "DS"; + case DL: + return "DL"; + case ND: + return "ND"; + case NO: + return "NO"; + case NS: + return "NS"; + case PF: + return "PF"; + case PL: + return "PL"; + case PD: + return "PD"; + default: + return "(unknown)"; } } diff --git a/engines/mutationofjb/commands/changecommand.h b/engines/mutationofjb/commands/changecommand.h index 6fa090ef6d..a88cdc11ef 100644 --- a/engines/mutationofjb/commands/changecommand.h +++ b/engines/mutationofjb/commands/changecommand.h @@ -44,7 +44,7 @@ public: YL, // Height WX, // Walk to X WY, // Walk to Y - SP, // + SP, // AC, // Active FA, // First animation FR, @@ -67,7 +67,7 @@ public: SubtractValue }; - ChangeCommand(uint8 sceneId, uint8 entityId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue& val) : + ChangeCommand(uint8 sceneId, uint8 entityId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue &val) : _sceneId(sceneId), _entityId(entityId), _register(reg), _operation(op), _value(val) {} protected: diff --git a/engines/mutationofjb/commands/definestructcommand.cpp b/engines/mutationofjb/commands/definestructcommand.cpp index 93dbfc80bc..4ccf2e8631 100644 --- a/engines/mutationofjb/commands/definestructcommand.cpp +++ b/engines/mutationofjb/commands/definestructcommand.cpp @@ -50,7 +50,7 @@ bool DefineStructCommandParser::parse(const Common::String &line, ScriptParseCon continue; } - const char* linePtr = convLineStr.c_str(); + const char *linePtr = convLineStr.c_str(); ConversationInfo::Line convLine; diff --git a/engines/mutationofjb/commands/endblockcommand.cpp b/engines/mutationofjb/commands/endblockcommand.cpp index b883beed48..c7fbd41f00 100644 --- a/engines/mutationofjb/commands/endblockcommand.cpp +++ b/engines/mutationofjb/commands/endblockcommand.cpp @@ -27,29 +27,29 @@ #include "common/debug.h" #include "common/translation.h" -/* - ("#L " | "-L ") <object> - ("#W " | "-W ") <object> - ("#T " | "-T ") <object> - ("#P " | "-P ") <object1> - ("#U " | "-U ") <object1> [<object2>] - ("#ELSE" | "-ELSE") [<tag>] - "#MACRO " <name> - "#EXTRA" <name> - - If a line starts with '#', '=', '-', it is treated as the end of a section. - However, at the same time it can also start a new section depending on what follows. - - #L (look), #W (walk), #T (talk), #U (use) sections are executed - when the user starts corresponding action on the object or in case of "use" up to two objects. - The difference between '#' and '-' version is whether the player walks towards the object ('#') or not ('-'). - - #ELSE is used by conditional commands (see comments for IfCommand and others). - - #MACRO starts a new macro. Global script can call macros from local script and vice versa. - - #EXTRA defines an "extra" section. This is called from dialog responses ("TALK TO HIM" command). -*/ +/** @file + * ("#L " | "-L ") <object> + * ("#W " | "-W ") <object> + * ("#T " | "-T ") <object> + * ("#P " | "-P ") <object1> + * ("#U " | "-U ") <object1> [<object2>] + * ("#ELSE" | "-ELSE") [<tag>] + * "#MACRO " <name> + * "#EXTRA" <name> + * + * If a line starts with '#', '=', '-', it is treated as the end of a section. + * However, at the same time it can also start a new section depending on what follows. + * + * #L (look), #W (walk), #T (talk), #U (use) sections are executed + * when the user starts corresponding action on the object or in case of "use" up to two objects. + * The difference between '#' and '-' version is whether the player walks towards the object ('#') or not ('-'). + * + * #ELSE is used by conditional commands (see comments for IfCommand and others). + * + * #MACRO starts a new macro. Global script can call macros from local script and vice versa. + * + * #EXTRA defines an "extra" section. This is called from dialog responses ("TALK TO HIM" command). + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/gotocommand.cpp b/engines/mutationofjb/commands/gotocommand.cpp index bc24e2c552..b8d15a7131 100644 --- a/engines/mutationofjb/commands/gotocommand.cpp +++ b/engines/mutationofjb/commands/gotocommand.cpp @@ -25,11 +25,11 @@ #include "mutationofjb/gamedata.h" #include "mutationofjb/script.h" -/* - "GOTO " <label> - - Jumps to a label. -*/ +/** @file + * "GOTO " <label> + * + * Jumps to a label. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/ifcommand.cpp b/engines/mutationofjb/commands/ifcommand.cpp index b5f03fc9e4..06fb5ca4c6 100644 --- a/engines/mutationofjb/commands/ifcommand.cpp +++ b/engines/mutationofjb/commands/ifcommand.cpp @@ -26,24 +26,24 @@ #include "common/str.h" #include "common/translation.h" -/* - "IF" <tag> <sceneId> <objectId> <value> ["!"] - - IF command compares the value of the WX pseudo-register of the object in the specified scene. - If the values match, execution continues to the next line. - Otherwise execution continues after first "#ELSE" or "=ELSE" with the same <tag>. - The logic can be reversed with exclamation mark at the end. - - <tag> is always 1 character long, <sceneId> and <objectId> 2 characters long. - - Please note that this does not work like you are used to from saner languages. - IF does not have any blocks. It only searches for first #ELSE, so you can have stuff like: - IF something - IF something else - #ELSE - ... - This is effectively logical AND. -*/ +/** @file + * "IF" <tag> <sceneId> <objectId> <value> ["!"] + * + * IF command compares the value of the WX pseudo-register of the object in the specified scene. + * If the values match, execution continues to the next line. + * Otherwise execution continues after first "#ELSE" or "=ELSE" with the same <tag>. + * The logic can be reversed with exclamation mark at the end. + * + * <tag> is always 1 character long, <sceneId> and <objectId> 2 characters long. + * + * Please note that this does not work like you are used to from saner languages. + * IF does not have any blocks. It only searches for first #ELSE, so you can have stuff like: + * IF something + * IF something else + * #ELSE + * ... + * This is effectively logical AND. + */ namespace MutationOfJB { @@ -58,7 +58,7 @@ bool IfCommandParser::parse(const Common::String &line, ScriptParseContext &, Co if (line.size() < 10) { return false; } - + if (!line.hasPrefix("IF")) { return false; } diff --git a/engines/mutationofjb/commands/ifcommand.h b/engines/mutationofjb/commands/ifcommand.h index b04d8a363d..04174d9ed6 100644 --- a/engines/mutationofjb/commands/ifcommand.h +++ b/engines/mutationofjb/commands/ifcommand.h @@ -39,7 +39,7 @@ private: class IfCommand : public ConditionalCommand { public: IfCommand(uint8 sceneId, uint8 objectId, uint16 value, bool negative); - + virtual ExecuteResult execute(ScriptExecutionContext &scriptExecCtx) override; virtual Common::String debugString() const; diff --git a/engines/mutationofjb/commands/ifitemcommand.cpp b/engines/mutationofjb/commands/ifitemcommand.cpp index 7a58cee22d..d70add9207 100644 --- a/engines/mutationofjb/commands/ifitemcommand.cpp +++ b/engines/mutationofjb/commands/ifitemcommand.cpp @@ -27,22 +27,22 @@ #include "common/str.h" #include "common/translation.h" -/* - "IFITEM" <item> ["!"] - - IFITEM command tests whether an item is in the inventory. - If it is, execution continues to the next line. - Otherwise execution continues after first "#ELSE" or "=ELSE". - The logic can be reversed with exclamation mark at the end. - - Please note that this does not work like you are used to from saner languages. - IFITEM does not have any blocks. It only searches for first #ELSE, so you can have stuff like: - IFITEM item1 - IFITEM item2 - #ELSE - ... - This is effectively logical AND. -*/ +/** @file + * "IFITEM" <item> ["!"] + * + * IFITEM command tests whether an item is in the inventory. + * If it is, execution continues to the next line. + * Otherwise execution continues after first "#ELSE" or "=ELSE". + * The logic can be reversed with exclamation mark at the end. + * + * Please note that this does not work like you are used to from saner languages. + * IFITEM does not have any blocks. It only searches for first #ELSE, so you can have stuff like: + * IFITEM item1 + * IFITEM item2 + * #ELSE + * ... + * This is effectively logical AND. + */ namespace MutationOfJB { @@ -50,7 +50,7 @@ bool IfItemCommandParser::parse(const Common::String &line, ScriptParseContext & if (line.size() < 8) { return false; } - + if (!line.hasPrefix("IFITEM")) { return false; } diff --git a/engines/mutationofjb/commands/ifitemcommand.h b/engines/mutationofjb/commands/ifitemcommand.h index df073b9fa4..86a5ad2684 100644 --- a/engines/mutationofjb/commands/ifitemcommand.h +++ b/engines/mutationofjb/commands/ifitemcommand.h @@ -39,7 +39,7 @@ public: class IfItemCommand : public ConditionalCommand { public: IfItemCommand(const Common::String &item, bool negative); - + virtual ExecuteResult execute(ScriptExecutionContext &scriptExecCtx) override; virtual Common::String debugString() const; diff --git a/engines/mutationofjb/commands/ifpiggycommand.cpp b/engines/mutationofjb/commands/ifpiggycommand.cpp index e30213ac68..e3107806ec 100644 --- a/engines/mutationofjb/commands/ifpiggycommand.cpp +++ b/engines/mutationofjb/commands/ifpiggycommand.cpp @@ -27,21 +27,21 @@ #include "common/str.h" #include "common/translation.h" -/* - "IFPIGGY" - - IFPIGGY command tests whether current loaded APK file (character animation) is "piggy.apk". - If it is, execution continues to the next line. - Otherwise execution continues after first "#ELSE" or "=ELSE". - - Please note that this does not work like you are used to from saner languages. - IFPIGGY does not have any blocks. It only searches for first #ELSE, so you can have stuff like: - IFPIGGY - IFITEM someitem - #ELSE - ... - This is effectively logical AND. -*/ +/** @file + * "IFPIGGY" + * + * IFPIGGY command tests whether current loaded APK file (character animation) is "piggy.apk". + * If it is, execution continues to the next line. + * Otherwise execution continues after first "#ELSE" or "=ELSE". + * + * Please note that this does not work like you are used to from saner languages. + * IFPIGGY does not have any blocks. It only searches for first #ELSE, so you can have stuff like: + * IFPIGGY + * IFITEM someitem + * #ELSE + * ... + * This is effectively logical AND. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/labelcommand.cpp b/engines/mutationofjb/commands/labelcommand.cpp index de6de020ab..7593e52bb3 100644 --- a/engines/mutationofjb/commands/labelcommand.cpp +++ b/engines/mutationofjb/commands/labelcommand.cpp @@ -24,11 +24,11 @@ #include "mutationofjb/commands/gotocommand.h" #include "mutationofjb/script.h" -/* - <label> ":" - - Creates a label. -*/ +/** @file + * <label> ":" + * + * Creates a label. + */ namespace MutationOfJB { @@ -59,8 +59,7 @@ bool LabelCommandParser::parse(const Common::String &line, ScriptParseContext &p return true; } -const Common::String &LabelCommand::getName() const -{ +const Common::String &LabelCommand::getName() const { return _name; } diff --git a/engines/mutationofjb/commands/newroomcommand.cpp b/engines/mutationofjb/commands/newroomcommand.cpp index 818ef7d5ee..5aabc6705f 100644 --- a/engines/mutationofjb/commands/newroomcommand.cpp +++ b/engines/mutationofjb/commands/newroomcommand.cpp @@ -26,15 +26,15 @@ #include "mutationofjb/gamedata.h" #include "common/str.h" -/* - "NEWROOM " <sceneId> " " <x> " " <y> " " <frame> - - NEWROOM changes the current scene. While doing that, it also executes STARTUP section for the new room. - However, after that, the execution goes back to the old script to finish commands after NEWROOM. - - All parameters are supposed to be 3 characters long. - SceneId is the scene to load, x and y are the player's new position and frame is the player's new frame (orientation). -*/ +/** @file + * "NEWROOM " <sceneId> " " <x> " " <y> " " <frame> + * + * NEWROOM changes the current scene. While doing that, it also executes STARTUP section for the new room. + * However, after that, the execution goes back to the old script to finish commands after NEWROOM. + * + * All parameters are supposed to be 3 characters long. + * SceneId is the scene to load, x and y are the player's new position and frame is the player's new frame (orientation). + */ namespace MutationOfJB { @@ -62,7 +62,7 @@ Command::ExecuteResult NewRoomCommand::execute(ScriptExecutionContext &scriptExe if (!_innerExecCtx) { Script *newScript = game.changeSceneDelayScript(_sceneId, game.getGameData()._partB); _innerExecCtx = new ScriptExecutionContext(scriptExecCtx.getGame(), newScript); - res =_innerExecCtx->startStartupSection(); + res = _innerExecCtx->startStartupSection(); } else { res = _innerExecCtx->runActiveCommand(); } diff --git a/engines/mutationofjb/commands/randomcommand.cpp b/engines/mutationofjb/commands/randomcommand.cpp index b9cc303125..467f7888d3 100644 --- a/engines/mutationofjb/commands/randomcommand.cpp +++ b/engines/mutationofjb/commands/randomcommand.cpp @@ -28,16 +28,16 @@ #include "common/random.h" #include "common/translation.h" -/* - "RANDOM " <numChoices> - - RANDOM command randomly picks one of the command blocks that - follow it and jumps to its start. - - These blocks start with "/" and end with "\". The end of a random - block also ends the current section. The number of blocks must - match numChoices. -*/ +/** @file + * "RANDOM " <numChoices> + * + * RANDOM command randomly picks one of the command blocks that + * follow it and jumps to its start. + * + * These blocks start with "/" and end with "\". The end of a random + * block also ends the current section. The number of blocks must + * match numChoices. + */ namespace MutationOfJB { @@ -86,8 +86,7 @@ void RandomBlockStartParser::transition(ScriptParseContext &parseCtx, Command *, RandomCommand::RandomCommand(uint numChoices) : _numChoices(numChoices), - _chosenNext(nullptr) -{ + _chosenNext(nullptr) { _choices.reserve(numChoices); } diff --git a/engines/mutationofjb/commands/removeallitemscommand.cpp b/engines/mutationofjb/commands/removeallitemscommand.cpp index d9ebe4534a..38e30ded47 100644 --- a/engines/mutationofjb/commands/removeallitemscommand.cpp +++ b/engines/mutationofjb/commands/removeallitemscommand.cpp @@ -24,11 +24,11 @@ #include "mutationofjb/script.h" #include "mutationofjb/gamedata.h" -/* - "DELALLITEMS" - - Removes all items from inventory. -*/ +/** @file + * "DELALLITEMS" + * + * Removes all items from inventory. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/removeitemcommand.cpp b/engines/mutationofjb/commands/removeitemcommand.cpp index 48dbda9801..21d1123dc2 100644 --- a/engines/mutationofjb/commands/removeitemcommand.cpp +++ b/engines/mutationofjb/commands/removeitemcommand.cpp @@ -24,11 +24,11 @@ #include "mutationofjb/script.h" #include "mutationofjb/gamedata.h" -/* - "DELITEM" " " <item> - - Removes item from inventory. -*/ +/** @file + * "DELITEM" " " <item> + * + * Removes item from inventory. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/renamecommand.cpp b/engines/mutationofjb/commands/renamecommand.cpp index 03a883261c..7bd526974a 100644 --- a/engines/mutationofjb/commands/renamecommand.cpp +++ b/engines/mutationofjb/commands/renamecommand.cpp @@ -25,11 +25,12 @@ #include "mutationofjb/gamedata.h" #include "common/algorithm.h" -/* - "REN " <oldName> " " <newName> - Renames every door, static (in the current scene) and inventory item - with the name oldName to newName. -*/ +/** @file + * "REN " <oldName> " " <newName> + * + * Renames every door, static (in the current scene) and inventory item + * with the name oldName to newName. + */ namespace MutationOfJB { diff --git a/engines/mutationofjb/commands/saycommand.cpp b/engines/mutationofjb/commands/saycommand.cpp index 0474a3e1ac..e63ceb198e 100644 --- a/engines/mutationofjb/commands/saycommand.cpp +++ b/engines/mutationofjb/commands/saycommand.cpp @@ -32,27 +32,27 @@ #include "common/debug.h" #include "common/debug-channels.h" -/* - ("SM" | "SLM" | "NM" | "NLM") " " <lineToSay> ["<" <voiceFile> | "<!"] - <skipped> " " <lineToSay> ("<" <voiceFile> | "<!") - - Say command comes in four variants: SM, SLM, NM and NLM. - Note: In script files, they are usually written as *SM. - The asterisk is ignored by the readLine function. - - Each of them plays a voice file (if present) and/or shows a message - (if voice file not present or subtitles are enabled). - - The difference between versions starting with "S" and "N" is that - the "N" version does not show talking animation. - - The "L" versions are "blocking", i.e. they wait for the previous say command to finish. - - If the line ends with "<!", it means the message continues to the next line. - Next line usually has "SM" (or other variant) repeated, but it does not have to. - Then we have the rest of the string to say (which is concatenated with the previous line) - and possibly the voice file or "<!" again. -*/ +/** @file + * ("SM" | "SLM" | "NM" | "NLM") " " <lineToSay> ["<" <voiceFile> | "<!"] + * <skipped> " " <lineToSay> ("<" <voiceFile> | "<!") + * + * Say command comes in four variants: SM, SLM, NM and NLM. + * Note: In script files, they are usually written as *SM. + * The asterisk is ignored by the readLine function. + * + * Each of them plays a voice file (if present) and/or shows a message + * (if voice file not present or subtitles are enabled). + * + * The difference between versions starting with "S" and "N" is that + * the "N" version does not show talking animation. + * + * The "L" versions are "blocking", i.e. they wait for the previous say command to finish. + * + * If the line ends with "<!", it means the message continues to the next line. + * Next line usually has "SM" (or other variant) repeated, but it does not have to. + * Then we have the rest of the string to say (which is concatenated with the previous line) + * and possibly the voice file or "<!" again. + */ namespace MutationOfJB { @@ -113,7 +113,7 @@ bool SayCommandParser::parse(const Common::String &line, ScriptParseContext &par Common::String talkStr(currentLine.c_str() + startPos, endPos - startPos); if (endPos != currentLine.size()) { - const char * end = currentLine.c_str() + endPos + 1; + const char *end = currentLine.c_str() + endPos + 1; if (end[0] == '!') { cont = true; } else { diff --git a/engines/mutationofjb/commands/seqcommand.cpp b/engines/mutationofjb/commands/seqcommand.cpp index 02164dcff7..4836d0357f 100644 --- a/engines/mutationofjb/commands/seqcommand.cpp +++ b/engines/mutationofjb/commands/seqcommand.cpp @@ -34,8 +34,7 @@ void SeqCommandParser::transition(ScriptParseContext &, Command *oldCommand, Com static_cast<SeqCommand *>(oldCommand)->setNextCommand(newCommand); } -void SeqCommand::setNextCommand(Command *nextCommand) -{ +void SeqCommand::setNextCommand(Command *nextCommand) { _nextCommand = nextCommand; } diff --git a/engines/mutationofjb/commands/seqcommand.h b/engines/mutationofjb/commands/seqcommand.h index 04731c2984..6c969e935f 100644 --- a/engines/mutationofjb/commands/seqcommand.h +++ b/engines/mutationofjb/commands/seqcommand.h @@ -21,7 +21,7 @@ */ #ifndef MUTATIONOFJB_SEQCOMMAND_H -#define MUTATIONOFJB_SEQCOMMAND_H +#define MUTATIONOFJB_SEQCOMMAND_H #include "mutationofjb/commands/command.h" #include "common/scummsys.h" diff --git a/engines/mutationofjb/commands/talkcommand.cpp b/engines/mutationofjb/commands/talkcommand.cpp index 6a3b204bb5..5c7eb8e863 100644 --- a/engines/mutationofjb/commands/talkcommand.cpp +++ b/engines/mutationofjb/commands/talkcommand.cpp @@ -70,7 +70,7 @@ Command::ExecuteResult TalkCommand::execute(ScriptExecutionContext &scriptExeCtx } Common::String TalkCommand::debugString() const { - const char * modes[] = {"NORMAL", "RAY_AND_BUTTLEG", "CARNIVAL_TICKET_SELLER"}; + const char *modes[] = {"NORMAL", "RAY_AND_BUTTLEG", "CARNIVAL_TICKET_SELLER"}; return Common::String::format("TALK %s", modes[(int) _mode]); } |