aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-27 23:58:11 +0300
committerEugene Sandulenko2016-07-28 00:37:32 +0300
commit2d96b5f3e60969cdeb96cdcaaff44a90855bbab2 (patch)
treec4f8462c7eef4b4813014b961ba35a000ea0acc3 /engines/fullpipe
parentce0f1b9c33a11c7cdc124fa68aab9febc5152992 (diff)
downloadscummvm-rg350-2d96b5f3e60969cdeb96cdcaaff44a90855bbab2.tar.gz
scummvm-rg350-2d96b5f3e60969cdeb96cdcaaff44a90855bbab2.tar.bz2
scummvm-rg350-2d96b5f3e60969cdeb96cdcaaff44a90855bbab2.zip
FULLPIPE: Started using debug channels
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/fullpipe.cpp3
-rw-r--r--engines/fullpipe/fullpipe.h5
-rw-r--r--engines/fullpipe/mgm.cpp4
-rw-r--r--engines/fullpipe/motion.cpp8
-rw-r--r--engines/fullpipe/scene.cpp6
5 files changed, 17 insertions, 9 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index c2aae9ba88..cef3d5ce74 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -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;
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index fba61aa13b..afd4fd91d4 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -48,6 +48,11 @@ namespace Fullpipe {
enum FullpipeGameFeatures {
};
+enum AccessDebugChannels {
+ kDebugPathfinding = 1 << 0,
+ kDebugDrawing = 1 << 1
+};
+
class BehaviorManager;
class BaseModalObject;
class GameLoader;
diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index ca2ec060e2..b5c7124092 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -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) {
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 81424db93a..f0304467cf 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -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;
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 5a3fbe34b6..067fbff76c 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -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()) {