aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actions/action_cel.cpp
diff options
context:
space:
mode:
authorwhiterandrek2018-06-09 15:57:45 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitfb8d8c1f570b9e6da55cf21eb6d176335a65f25c (patch)
tree6109f31f5555de94bd600caf3b0559aaa0de5c29 /engines/pink/objects/actions/action_cel.cpp
parentbfd1b62063040c970894fbf81d9dca9c3d4088d0 (diff)
downloadscummvm-rg350-fb8d8c1f570b9e6da55cf21eb6d176335a65f25c.tar.gz
scummvm-rg350-fb8d8c1f570b9e6da55cf21eb6d176335a65f25c.tar.bz2
scummvm-rg350-fb8d8c1f570b9e6da55cf21eb6d176335a65f25c.zip
PINK: remove redundant adding sprite to scene, which doesn't need to be drawn
Diffstat (limited to 'engines/pink/objects/actions/action_cel.cpp')
-rw-r--r--engines/pink/objects/actions/action_cel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/pink/objects/actions/action_cel.cpp b/engines/pink/objects/actions/action_cel.cpp
index a5f0e1f610..4596d5d1b5 100644
--- a/engines/pink/objects/actions/action_cel.cpp
+++ b/engines/pink/objects/actions/action_cel.cpp
@@ -88,4 +88,16 @@ CelDecoder *ActionCEL::getDecoder() {
return _decoder;
}
+Coordinates ActionCEL::getCoordinates() {
+ if (!_decoder)
+ _decoder = _actor->getPage()->loadCel(_fileName);
+
+ Coordinates coords;
+ coords.x = _decoder->getX() + _decoder->getWidth() / 2;
+ coords.y = _decoder->getY() + _decoder->getHeight() / 2;
+ coords.z = getZ();
+
+ return coords;
+}
+
} // End of namespace Pink