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/changecommand.cpp | |
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/changecommand.cpp')
-rw-r--r-- | engines/mutationofjb/commands/changecommand.cpp | 104 |
1 files changed, 68 insertions, 36 deletions
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)"; } } |