FULLPIPE: Started using debug channels

This commit is contained in:
Eugene Sandulenko
2016-07-28 00:37:32 +03:00
parent ce0f1b9c33
commit 2d96b5f3e6
5 changed files with 17 additions and 9 deletions
+3
View File
@@ -24,6 +24,7 @@
#include "common/archive.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "audio/mixer.h"
#include "engines/util.h"
@@ -199,6 +200,8 @@ FullpipeEngine::~FullpipeEngine() {
}
void FullpipeEngine::initialize() {
DebugMan.addDebugChannel(kDebugPathfinding, "path", "Pathfinding");
_globalMessageQueueList = new GlobalMessageQueueList;
_behaviorManager = new BehaviorManager;
+5
View File
@@ -48,6 +48,11 @@ namespace Fullpipe {
enum FullpipeGameFeatures {
};
enum AccessDebugChannels {
kDebugPathfinding = 1 << 0,
kDebugDrawing = 1 << 1
};
class BehaviorManager;
class BaseModalObject;
class GameLoader;
+2 -2
View File
@@ -155,7 +155,7 @@ void MGM::rebuildTables(int objId) {
if (!obj)
return;
warning("WWW rebuild. idx: %d, size: %d", idx, obj->_staticsList.size() * obj->_staticsList.size());
debugC(1, kDebugPathfinding, "WWW rebuild. idx: %d, size: %d", idx, obj->_staticsList.size() * obj->_staticsList.size());
for (uint i = 0; i < obj->_staticsList.size(); i++) {
_items[idx]->statics.push_back((Statics *)obj->_staticsList[i]);
@@ -583,7 +583,7 @@ int MGM::refreshOffsets(int objectId, int idx1, int idx2) {
int from = getStaticsIndexById(idx, idx1);
int to = getStaticsIndexById(idx, idx2);
warning("WWW 6, want idx: %d, off: %d", idx, from + to * _items[idx]->statics.size());
debugC(1, kDebugPathfinding, "WWW 6, want idx: %d, off: %d", idx, from + to * _items[idx]->statics.size());
MGMSubItem *sub = _items[idx]->subItems[from + to * _items[idx]->statics.size()];
if (sub->movement) {
+4 -4
View File
@@ -186,7 +186,7 @@ MessageQueue *MctlCompound::startMove(StaticANIObject *ani, int sourceX, int sou
if (sourceIdx == -1)
return 0;
warning("WWW 2");
debugC(1, kDebugPathfinding, "WWW 2");
if (idx == sourceIdx)
return _motionControllers[idx]->_motionControllerObj->startMove(ani, sourceX, sourceY, fuzzyMatch, staticsId);
@@ -1634,7 +1634,7 @@ int MovGraph2::getItemSubIndexByMGM(int index, StaticANIObject *ani) {
int min = 0;
for (int i = 0; i < 4; i++) {
warning("WWW 5");
debugC(1, kDebugPathfinding, "WWW 5");
int tmp = _mgm.refreshOffsets(ani->_id, ani->_statics->_staticsId, _items2[index]->_subItems[i]._staticsId1);
if (tmp >= 0 && (minidx == -1 || tmp < min)) {
@@ -2052,7 +2052,7 @@ MessageQueue *MovGraph2::startMove(StaticANIObject *ani, int xpos, int ypos, int
if (ani->_flags & 0x100)
return 0;
warning("WWW 3");
debugC(1, kDebugPathfinding, "WWW 3");
MessageQueue *mq = doWalkTo(ani, xpos, ypos, fuzzyMatch, staticsId);
if (!mq)
@@ -2121,7 +2121,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
bool subMgm = false;
if (idxsub == -1) {
warning("WWW 4");
debugC(1, kDebugPathfinding, "WWW 4");
idxsub = getItemSubIndexByMGM(idx, obj);
subMgm = true;
+3 -3
View File
@@ -654,7 +654,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
g_fp->_globalPalette = _palette->_data;
}
debug(1, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
debugC(1, kDebugDrawing, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
if (_picObjList.size() > 2) { // We need to z-sort them
objectList_sortByPriority(_picObjList, true);
@@ -666,11 +666,11 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
if (maxPri == -1)
maxPri = 60000;
debug(1, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
debugC(1, kDebugDrawing, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
Common::Point point;
debug(1, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size());
debugC(1, kDebugDrawing, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size());
if (drawBg && _bigPictureArray1Count && _picObjList.size()) {