PINK: More debug output of Objects attributes

This commit is contained in:
whitertandrek 2018-03-18 22:18:39 +02:00 committed by Eugene Sandulenko
parent 113540b930
commit c87a392e16
13 changed files with 55 additions and 2 deletions

View File

@ -20,7 +20,16 @@
*
*/
#include "action_hide.h"
#include <engines/pink/archive.h>
#include <common/debug.h>
namespace Pink {
void Pink::ActionHide::deserialize(Archive &archive) {
Action::deserialize(archive);
debug("\tActionHide: _name = %s", _name.c_str());
}
} //End of namespace Pink

View File

@ -28,7 +28,10 @@
namespace Pink {
class ActionHide : public Action {
public:
virtual void deserialize(Archive &archive);
public:
};
} //End of namespace Pink

View File

@ -20,14 +20,20 @@
*
*/
#include <common/debug.h>
#include "action_still.h"
#include "../archive.h"
#include "action_play.h"
namespace Pink {
void ActionStill::deserialize(Archive &archive) {
ActionCEL::deserialize(archive);
archive >> _startFrame;
if (!dynamic_cast<ActionPlay*>(this)){
debug("\tActionStill: _name = %s, _fileName = %s, _startFrame = %u",
_name.c_str(), _fileName.c_str(), _startFrame);
}
}
} // End of namespace Pink

View File

@ -20,6 +20,7 @@
*
*/
#include <common/debug.h>
#include "sequence_item.h"
#include "../archive.h"

View File

@ -31,7 +31,7 @@ class SequenceItem : public Object {
public:
virtual void deserialize(Archive &archive);
private:
protected:
Common::String _actor;
Common::String _action;
};

View File

@ -20,6 +20,16 @@
*
*/
#include <engines/pink/archive.h>
#include <common/debug.h>
#include "sequence_item_default_action.h"
namespace Pink {
void Pink::SequenceItemDefaultAction::deserialize(Archive &archive) {
SequenceItem::deserialize(archive);
debug("\t\tSequenceItemDefaultAction: _actor = %s, _action = %s",
_actor.c_str(), _action.c_str());
}
} // End of namespace Pink

View File

@ -28,7 +28,8 @@
namespace Pink {
class SequenceItemDefaultAction : public SequenceItem {
public:
virtual void deserialize(Archive &archive);
};
} // End of namespace Pink

View File

@ -20,7 +20,17 @@
*
*/
#include <engines/pink/archive.h>
#include <common/debug.h>
#include "sequence_item_leader.h"
namespace Pink {
void Pink::SequenceItemLeader::deserialize(Archive &archive) {
SequenceItem::deserialize(archive);
debug("\t\tSequenceItemLeader: _actor = %s, _action = %s",
_actor.c_str(), _action.c_str());
}
} //End of namespace Pink

View File

@ -29,6 +29,7 @@ namespace Pink {
class SequenceItemLeader : public SequenceItem {
public:
virtual void deserialize(Archive &archive);
private:
};

View File

@ -61,6 +61,13 @@ void GamePage::init(bool isLoadingSave) {
//assert(perhapsIsLoaded == 0);
loadFields();
}
//init actor which inits actions
if (!isLoadingSave) {
}
}
void GamePage::loadFields() {

View File

@ -110,6 +110,7 @@ Common::Error Pink::PinkEngine::run() {
}
}
//update();
g_system->updateScreen();
g_system->delayMillis(10);
}

View File

@ -20,6 +20,7 @@
*
*/
#include <common/debug.h>
#include "sequence.h"
#include "sequencer.h"
#include "../archive.h"
@ -28,6 +29,7 @@ namespace Pink {
void Sequence::deserialize(Archive &archive) {
NamedObject::deserialize(archive);
debug("\tSequence %s", _name.c_str());
_sequencer = static_cast<Sequencer*>(archive.readObject());
archive >> _items;
}

View File

@ -21,6 +21,7 @@
*/
#include <common/debug.h>
#include "sequencer.h"
#include "engines/pink/archive.h"
@ -31,6 +32,7 @@ Sequencer::Sequencer(GamePage *page)
{}
void Sequencer::deserialize(Archive &archive) {
debug("Sequencer:");
archive >> _sequences;
archive.readCount();// intro have 0 timers;
//serialize timers;