Skip to content

Commit

Permalink
PINK: added debug information to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
whitertandrek authored and sev- committed Jun 28, 2018
1 parent eb6ce67 commit 8874ccb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
6 changes: 3 additions & 3 deletions engines/pink/objects/actions/action_hide.cpp
Expand Up @@ -32,13 +32,13 @@ void Pink::ActionHide::deserialize(Archive &archive) {
Action::deserialize(archive);
}

void ActionHide::play(bool unk_startNow) {
debug("ActionHide %s is now in playing state", _name.c_str());
void ActionHide::start(bool unk_startNow) {
debug("Actor %s has now ActionHide %s", _actor->getName().c_str(), _name.c_str());
_actor->endAction();
}

void ActionHide::end() {
debug("ActionHide %s is ended", _name.c_str());
debug("ActionHide %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
}

void ActionHide::toConsole() {
Expand Down
2 changes: 1 addition & 1 deletion engines/pink/objects/actions/action_hide.h
Expand Up @@ -33,7 +33,7 @@ class ActionHide : public Action {

virtual void toConsole();

virtual void play(bool unk_startNow);
virtual void start(bool unk_startNow);
virtual void end();
};

Expand Down
9 changes: 9 additions & 0 deletions engines/pink/objects/actions/action_play.cpp
Expand Up @@ -22,6 +22,7 @@

#include <common/debug.h>
#include "action_play.h"
#include "../actors/actor.h"
#include "engines/pink/archive.h"

namespace Pink {
Expand All @@ -36,4 +37,12 @@ void ActionPlay::toConsole() {
" _endFrame = %u", _name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame);
}

void ActionPlay::start(bool unk) {
debug("Actor %s has now ActionPlay %s", _actor->getName().c_str(), _name.c_str());
}

void ActionPlay::end() {
debug("ActionPlay %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
}

} // End of namespace Pink
3 changes: 3 additions & 0 deletions engines/pink/objects/actions/action_play.h
Expand Up @@ -33,6 +33,9 @@ class ActionPlay : public ActionStill {
virtual void deserialize(Archive &archive);
virtual void toConsole();

virtual void start(bool unk);
virtual void end();

private:
uint32 _stopFrame;
};
Expand Down
3 changes: 3 additions & 0 deletions engines/pink/objects/actions/action_sound.cpp
Expand Up @@ -56,9 +56,12 @@ void ActionSound::start(bool unk) {
_sound->play(soundType, _volume, _isLoop);
if (_isLoop)
_actor->endAction();

debug("Actor %s has now ActionSound %s", _actor->getName().c_str(), _name.c_str());
}

void ActionSound::end() {
debug("ActionSound %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
_sound->stop();
delete _sound;
_sound = nullptr;
Expand Down
9 changes: 9 additions & 0 deletions engines/pink/objects/actions/action_still.cpp
Expand Up @@ -23,6 +23,7 @@
#include <common/debug.h>
#include "action_still.h"
#include "engines/pink/archive.h"
#include <engines/pink/objects/actors/actor.h>

namespace Pink {

Expand All @@ -36,4 +37,12 @@ void ActionStill::toConsole() {
_name.c_str(), _fileName.c_str(), _startFrame);
}

void ActionStill::start(bool unk) {
debug("Actor %s has now ActionStill %s", _actor->getName().c_str(), _name.c_str());
}

void ActionStill::end() {
debug("ActionStill %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
}

} // End of namespace Pink
4 changes: 4 additions & 0 deletions engines/pink/objects/actions/action_still.h
Expand Up @@ -32,6 +32,10 @@ class ActionStill : public ActionCEL {
virtual void deserialize(Archive &archive);
virtual void toConsole();

virtual void start(bool unk);

virtual void end();

protected:
uint32 _startFrame;
};
Expand Down

0 comments on commit 8874ccb

Please sign in to comment.