aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput
diff options
context:
space:
mode:
authorStrangerke2012-05-12 22:21:02 +0200
committerEugene Sandulenko2018-03-28 17:36:57 +0200
commit95fa16564501014a47dee48d89d796d94f2904df (patch)
tree48857ba29598ba160bae25d32c01dda8a5830526 /engines/lilliput
parent91cbbe27a7aecd935bed6631300245b63cb2afa9 (diff)
downloadscummvm-rg350-95fa16564501014a47dee48d89d796d94f2904df.tar.gz
scummvm-rg350-95fa16564501014a47dee48d89d796d94f2904df.tar.bz2
scummvm-rg350-95fa16564501014a47dee48d89d796d94f2904df.zip
LILLIPUT: Fix some code formatting
Diffstat (limited to 'engines/lilliput')
-rw-r--r--engines/lilliput/lilliput.cpp12
-rw-r--r--engines/lilliput/script.cpp23
2 files changed, 21 insertions, 14 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index 348de3833c..2aaece16ee 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -847,7 +847,7 @@ void LilliputEngine::displaySmallIndexedAnim(byte index, byte subIndex) {
}
void LilliputEngine::displaySmallAnims() {
- debugC(2, kDebugEngineTBC, "displaySmallAnims()");
+ debugC(2, kDebugEngine, "displaySmallAnims()");
if (_animationTick == _lastAnimationTick)
return;
@@ -2674,9 +2674,15 @@ void LilliputEngine::handleGameScripts() {
int tmpVal = _rulesBuffer2_12[index];
if (tmpVal == 0xFF)
return;
+
/*
_scriptHandler->listAllTexts();
+ debugC(1, kDebugEngineTBC, "================= Menu Script ==================");
+ ScriptStream script = ScriptStream(_menuScript, _menuScriptSize);
+ _scriptHandler->disasmScript(script);
+ debugC(1, kDebugEngineTBC, "============= End Menu Script ==================");
+
for (int i = 0; i < _gameScriptIndexSize; i++) {
assert(tmpVal < _gameScriptIndexSize);
debugC(1, kDebugEngineTBC, "================= Game Script %d ==================", i);
@@ -2684,8 +2690,8 @@ void LilliputEngine::handleGameScripts() {
_scriptHandler->disasmScript(script);
debugC(1, kDebugEngineTBC, "============= End Game Script %d ==================", i);
}
-
-while(1);
+
+ while(1);
if(tmpVal == 6) {
warning("e");
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index 4542b56bcc..5866081759 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -807,10 +807,10 @@ void LilliputScript::disasmScript( ScriptStream script) {
bool hasIf = false;
- if(val != 0xFFF8) {
+ if (val != 0xFFF8) {
hasIf = true;
-
}
+
bool firstIf = true;
@@ -827,25 +827,26 @@ void LilliputScript::disasmScript( ScriptStream script) {
// op code type 1
assert(val < sizeof(opCodes1)/sizeof(OpCode));
- const OpCode* opCode = &opCodes1[val];
- const KValueType* opArgType = &opCode->_arg1;
+ const OpCode *opCode = &opCodes1[val];
+ const KValueType *opArgType = &opCode->_arg1;
Common::String str;
- if(firstIf) {
+ if (firstIf) {
str = "if (";
firstIf = false;
} else {
str = " ";
}
- if (neg) str += "not ";
+ if (neg)
+ str += "not ";
str += Common::String(opCode->_opName);
str += "(";
for (int p = 0; p < opCode->_numArgs; p++) {
str += getArgumentString(*opArgType, script);
- if(p != opCode->_numArgs - 1)
+ if (p != opCode->_numArgs - 1)
str += ", ";
opArgType++;
@@ -856,7 +857,7 @@ void LilliputScript::disasmScript( ScriptStream script) {
val = script.readUint16LE();
- if(val == 0xFFF8) {
+ if (val == 0xFFF8) {
str += ")";
}
@@ -870,9 +871,9 @@ void LilliputScript::disasmScript( ScriptStream script) {
while (val != 0xFFF7) {
// op code type 2
- assert(val < sizeof(opCodes2)/sizeof(OpCode));
- const OpCode* opCode = &opCodes2[val];
- const KValueType* opArgType = &opCode->_arg1;
+ assert(val < sizeof(opCodes2) / sizeof(OpCode));
+ const OpCode *opCode = &opCodes2[val];
+ const KValueType *opArgType = &opCode->_arg1;
Common::String str;