Skip to content

Commit

Permalink
FULLPIPE: WIP debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Sep 6, 2013
1 parent 5c759da commit a522f5b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/fullpipe/scenes.cpp
Expand Up @@ -1370,10 +1370,10 @@ void scene01_initScene(Scene *sc, int entrance) {
pic->_flags &= 0xFFFB;
}

if (entrance != TrubaLeft ) {
if (entrance != TrubaLeft) {
StaticANIObject *bootAnim = sc->getStaticANIObject1ById(ANI_BOOT_1, -1);
if (bootAnim)
bootAnim->_flags &= 0xFFFB;
bootAnim->_flags &= ~0x04;
}

setElevatorButton(sO_Level2, ST_LBN_2N);
Expand Down
12 changes: 12 additions & 0 deletions engines/fullpipe/statics.cpp
Expand Up @@ -217,6 +217,7 @@ void StaticANIObject::setFlags40(bool state) {
if (_flags & 0x40)
_flags ^= 0x40;
}
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);
}

void StaticANIObject::deleteFromGlobalMessageQueue() {
Expand All @@ -239,6 +240,7 @@ void StaticANIObject::queueMessageQueue(MessageQueue *mq) {
_messageNum = 0;
if (_flags & 2) {
_flags ^= 2;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);
}
if (mq) {
_animExFlag = 0;
Expand Down Expand Up @@ -266,6 +268,7 @@ bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) {
}

_flags |= 2;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);
_messageNum = msgNum;
_messageQueueId = qId;

Expand Down Expand Up @@ -611,6 +614,7 @@ void StaticANIObject::update(int counterdiff) {
int mqid;

debug(0, "StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags);
if (_id == 322 && _oy != 100) warning("StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags);

if (_flags & 2) {
_messageNum--;
Expand All @@ -620,6 +624,7 @@ void StaticANIObject::update(int counterdiff) {
mqid = _messageQueueId;
_messageQueueId = 0;
_flags ^= 2;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);

updateGlobalMessageQueue(mqid, _id);
return;
Expand Down Expand Up @@ -699,6 +704,7 @@ void StaticANIObject::update(int counterdiff) {
} else if (_flags & 0x20) {
_flags ^= 0x20;
_flags |= 1;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);
_movement->gotoFirstFrame();
_movement->getCurrDynamicPhaseXY(point);

Expand All @@ -722,6 +728,8 @@ void StaticANIObject::update(int counterdiff) {
}

debug(0, " StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags);
if (_id == 322 && _oy != 100)
warning(" StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags);
}

void StaticANIObject::stopAnim_maybe() {
Expand All @@ -731,6 +739,7 @@ void StaticANIObject::stopAnim_maybe() {
return;

_flags ^= 1;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);

int oid = 0;
int oldmqid = _messageQueueId;
Expand Down Expand Up @@ -897,6 +906,7 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) {

if (_flags & 1)
_flags ^= 1;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);

_messageQueueId = mqId;
}
Expand Down Expand Up @@ -951,6 +961,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase

if (mov == _movement) {
_flags |= 1;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);
_messageQueueId = messageQueueId;

return true;
Expand Down Expand Up @@ -1014,6 +1025,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
_flags &= 0xFFF7;

_flags |= 1;
if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags);

_messageQueueId = messageQueueId;
_movement->_currDynamicPhase->_countdown = _movement->_currDynamicPhase->_initialCountdown;
Expand Down

0 comments on commit a522f5b

Please sign in to comment.