LILLIPUT: Fix some code formatting
This commit is contained in:
parent
91cbbe27a7
commit
95fa165645
2 changed files with 21 additions and 14 deletions
|
@ -847,7 +847,7 @@ void LilliputEngine::displaySmallIndexedAnim(byte index, byte subIndex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputEngine::displaySmallAnims() {
|
void LilliputEngine::displaySmallAnims() {
|
||||||
debugC(2, kDebugEngineTBC, "displaySmallAnims()");
|
debugC(2, kDebugEngine, "displaySmallAnims()");
|
||||||
|
|
||||||
if (_animationTick == _lastAnimationTick)
|
if (_animationTick == _lastAnimationTick)
|
||||||
return;
|
return;
|
||||||
|
@ -2674,9 +2674,15 @@ void LilliputEngine::handleGameScripts() {
|
||||||
int tmpVal = _rulesBuffer2_12[index];
|
int tmpVal = _rulesBuffer2_12[index];
|
||||||
if (tmpVal == 0xFF)
|
if (tmpVal == 0xFF)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_scriptHandler->listAllTexts();
|
_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++) {
|
for (int i = 0; i < _gameScriptIndexSize; i++) {
|
||||||
assert(tmpVal < _gameScriptIndexSize);
|
assert(tmpVal < _gameScriptIndexSize);
|
||||||
debugC(1, kDebugEngineTBC, "================= Game Script %d ==================", i);
|
debugC(1, kDebugEngineTBC, "================= Game Script %d ==================", i);
|
||||||
|
@ -2684,8 +2690,8 @@ void LilliputEngine::handleGameScripts() {
|
||||||
_scriptHandler->disasmScript(script);
|
_scriptHandler->disasmScript(script);
|
||||||
debugC(1, kDebugEngineTBC, "============= End Game Script %d ==================", i);
|
debugC(1, kDebugEngineTBC, "============= End Game Script %d ==================", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(1);
|
while(1);
|
||||||
|
|
||||||
if(tmpVal == 6) {
|
if(tmpVal == 6) {
|
||||||
warning("e");
|
warning("e");
|
||||||
|
|
|
@ -807,10 +807,10 @@ void LilliputScript::disasmScript( ScriptStream script) {
|
||||||
|
|
||||||
bool hasIf = false;
|
bool hasIf = false;
|
||||||
|
|
||||||
if(val != 0xFFF8) {
|
if (val != 0xFFF8) {
|
||||||
hasIf = true;
|
hasIf = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool firstIf = true;
|
bool firstIf = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -827,25 +827,26 @@ void LilliputScript::disasmScript( ScriptStream script) {
|
||||||
|
|
||||||
// op code type 1
|
// op code type 1
|
||||||
assert(val < sizeof(opCodes1)/sizeof(OpCode));
|
assert(val < sizeof(opCodes1)/sizeof(OpCode));
|
||||||
const OpCode* opCode = &opCodes1[val];
|
const OpCode *opCode = &opCodes1[val];
|
||||||
const KValueType* opArgType = &opCode->_arg1;
|
const KValueType *opArgType = &opCode->_arg1;
|
||||||
|
|
||||||
Common::String str;
|
Common::String str;
|
||||||
|
|
||||||
if(firstIf) {
|
if (firstIf) {
|
||||||
str = "if (";
|
str = "if (";
|
||||||
firstIf = false;
|
firstIf = false;
|
||||||
} else {
|
} else {
|
||||||
str = " ";
|
str = " ";
|
||||||
}
|
}
|
||||||
if (neg) str += "not ";
|
if (neg)
|
||||||
|
str += "not ";
|
||||||
str += Common::String(opCode->_opName);
|
str += Common::String(opCode->_opName);
|
||||||
str += "(";
|
str += "(";
|
||||||
|
|
||||||
for (int p = 0; p < opCode->_numArgs; p++) {
|
for (int p = 0; p < opCode->_numArgs; p++) {
|
||||||
|
|
||||||
str += getArgumentString(*opArgType, script);
|
str += getArgumentString(*opArgType, script);
|
||||||
if(p != opCode->_numArgs - 1)
|
if (p != opCode->_numArgs - 1)
|
||||||
str += ", ";
|
str += ", ";
|
||||||
|
|
||||||
opArgType++;
|
opArgType++;
|
||||||
|
@ -856,7 +857,7 @@ void LilliputScript::disasmScript( ScriptStream script) {
|
||||||
|
|
||||||
val = script.readUint16LE();
|
val = script.readUint16LE();
|
||||||
|
|
||||||
if(val == 0xFFF8) {
|
if (val == 0xFFF8) {
|
||||||
str += ")";
|
str += ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,9 +871,9 @@ void LilliputScript::disasmScript( ScriptStream script) {
|
||||||
while (val != 0xFFF7) {
|
while (val != 0xFFF7) {
|
||||||
|
|
||||||
// op code type 2
|
// op code type 2
|
||||||
assert(val < sizeof(opCodes2)/sizeof(OpCode));
|
assert(val < sizeof(opCodes2) / sizeof(OpCode));
|
||||||
const OpCode* opCode = &opCodes2[val];
|
const OpCode *opCode = &opCodes2[val];
|
||||||
const KValueType* opArgType = &opCode->_arg1;
|
const KValueType *opArgType = &opCode->_arg1;
|
||||||
|
|
||||||
Common::String str;
|
Common::String str;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue