aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actions/action_cel.cpp
diff options
context:
space:
mode:
authorwhitertandrek2018-03-23 22:52:16 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitc6df869fec46858d25d294854c1e446ca47fd85d (patch)
tree21711e773e5b7e0d0e92821c1439f2cc981fb2cf /engines/pink/objects/actions/action_cel.cpp
parentbba35c5f2c71aa8c83c7ba9180f08ce7f609c911 (diff)
downloadscummvm-rg350-c6df869fec46858d25d294854c1e446ca47fd85d.tar.gz
scummvm-rg350-c6df869fec46858d25d294854c1e446ca47fd85d.tar.bz2
scummvm-rg350-c6df869fec46858d25d294854c1e446ca47fd85d.zip
PINK: Basic implementation of CEL decoder. Fixed sprite positioning
Diffstat (limited to 'engines/pink/objects/actions/action_cel.cpp')
-rw-r--r--engines/pink/objects/actions/action_cel.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/engines/pink/objects/actions/action_cel.cpp b/engines/pink/objects/actions/action_cel.cpp
index 5385386b39..abfc59373e 100644
--- a/engines/pink/objects/actions/action_cel.cpp
+++ b/engines/pink/objects/actions/action_cel.cpp
@@ -26,11 +26,12 @@
#include "engines/pink/archive.h"
#include "engines/pink/objects/pages/game_page.h"
#include "pink/pink.h"
+#include "pink/cel_decoder.h"
namespace Pink {
ActionCEL::ActionCEL()
- : _flicDecoder(nullptr) {
+ : _decoder(nullptr) {
}
@@ -40,30 +41,30 @@ void ActionCEL::deserialize(Archive &archive) {
}
void ActionCEL::start(bool unk) {
- if (!_flicDecoder)
- _flicDecoder = _actor->getPage()->loadCel(_fileName);
+ if (!_decoder)
+ _decoder = _actor->getPage()->loadCel(_fileName);
_actor->getPage()->getGame()->getDirector()->addSprite(this);
this->onStart();
}
void ActionCEL::end() {
_actor->getPage()->getGame()->getDirector()->removeSprite(this);
- delete _flicDecoder;
- _flicDecoder = nullptr;
+ delete _decoder;
+ _decoder = nullptr;
}
uint32 ActionCEL::getZ() {
return _z;
}
-Video::FlicDecoder *ActionCEL::getDecoder() {
- return _flicDecoder;
+CelDecoder *ActionCEL::getDecoder() {
+ return _decoder;
}
bool ActionCEL::initPallete(Director *director) {
- _flicDecoder = _actor->getPage()->loadCel(_fileName);
- _flicDecoder->decodeNextFrame();
- director->setPallette(_flicDecoder->getPalette());
+ _decoder = _actor->getPage()->loadCel(_fileName);
+ _decoder->decodeNextFrame();
+ director->setPallette(_decoder->getPalette());
return 1;
}