From 7724e51936fc006a48ded3efd28b9caf20c5bc7e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 8 Dec 2017 21:25:32 +0000 Subject: FULLPIPE: Added debug output for GameObject --- engines/fullpipe/gfx.cpp | 5 +++++ engines/fullpipe/gfx.h | 1 + engines/fullpipe/statics.cpp | 11 +++++------ 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 667c2ba190..31e5c219c4 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -234,6 +234,11 @@ GameObject::GameObject(GameObject *src) { _field_8 = src->_field_8; } +Common::String GameObject::toXML() { + return Common::String::format("id=%d name=\"%s\" x=%d y=%d priority=%d f8=%d", + _id, transCyrillic(_objectName), _ox, _oy, _priority, _field_8); +} + bool GameObject::load(MfcArchive &file) { debugC(5, kDebugLoading, "GameObject::load()"); _odelay = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index a2c83c8131..04771f5991 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -154,6 +154,7 @@ class GameObject : public CObject { GameObject(); GameObject(GameObject *src); + virtual Common::String toXML(); virtual bool load(MfcArchive &file); void setOXY(int x, int y); void renumPictures(Common::Array *lst); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 5ea3b10d23..49cb3fde1f 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -163,8 +163,7 @@ bool StaticANIObject::load(MfcArchive &file) { GameObject::load(file); - debugC(6, kDebugXML, "%% ", - _id, transCyrillic(_objectName), _ox, _oy, _priority, _field_8); + debugC(6, kDebugXML, "%% ", GameObject::toXML().c_str()); int count = file.readUint16LE(); @@ -1376,8 +1375,8 @@ bool Statics::load(MfcArchive &file) { _staticsId = file.readUint16LE(); _staticsName = file.readPascalString(); - debugC(6, kDebugXML, "%% ", - _staticsId, transCyrillic(_staticsName), _field_7C, DynamicPhase::toXML().c_str()); + debugC(6, kDebugXML, "%% ", + _staticsId, transCyrillic(_staticsName), DynamicPhase::toXML().c_str()); _picture.load(file); @@ -1623,8 +1622,8 @@ 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); + debugC(6, kDebugXML, "%% ", + GameObject::toXML().c_str(), staticsid, _mx, _my, staticsid2, _m2x, _m2y); for (int i = 0; i < dynCount; i++) debugC(6, kDebugXML, "%% ", _dynamicPhases[i]->toXML().c_str()); -- cgit v1.2.3