From 1408ffc4273945abc882033b9aabde82b3d2f841 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 8 Dec 2017 20:54:22 +0000 Subject: FULLPIPE: Better debug output for movement --- engines/fullpipe/statics.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index b5baa180fa..5ea3b10d23 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1579,9 +1579,6 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { int dynCount = file.readUint16LE(); - debugC(6, kDebugXML, "%% ", - _id, transCyrillic(_objectName), _ox, _oy, _priority, _field_8); - if (dynCount != 0xffff || _id == MV_MAN_TURN_LU) { _framePosOffsets.resize(dynCount + 2); @@ -1589,8 +1586,6 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { DynamicPhase *ph = new DynamicPhase(); ph->load(file); - debugC(6, kDebugXML, "%% ", ph->toXML().c_str()); - _dynamicPhases.push_back(ph); _framePosOffsets[i].x = ph->_x; @@ -1609,12 +1604,12 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { _mx = file.readSint32LE(); _my = file.readSint32LE(); - staticsid = file.readUint16LE(); + int staticsid2 = file.readUint16LE(); - _staticsObj2 = ani->getStaticsById(staticsid); + _staticsObj2 = ani->getStaticsById(staticsid2); - if (!_staticsObj2 && (staticsid & 0x4000)) { - Statics *s = ani->getStaticsById(staticsid ^ 0x4000); + if (!_staticsObj2 && (staticsid2 & 0x4000)) { + Statics *s = ani->getStaticsById(staticsid2 ^ 0x4000); _staticsObj2 = ani->addReverseStatics(s); } @@ -1628,6 +1623,14 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { _framePosOffsets[_dynamicPhases.size() - 1].y = _m2y; } + debugC(6, kDebugXML, "%% ", + _id, transCyrillic(_objectName), _ox, _oy, _priority, _field_8, staticsid, _mx, _my, staticsid2, _m2x, _m2y); + + for (int i = 0; i < dynCount; i++) + debugC(6, kDebugXML, "%% ", _dynamicPhases[i]->toXML().c_str()); + + debugC(6, kDebugXML, "%% "); + } else { int movid = file.readUint16LE(); @@ -1654,8 +1657,6 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { _counter = 0; updateCurrDynamicPhase(); - debugC(6, kDebugXML, "%% "); - return true; } -- cgit v1.2.3