aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-02 21:37:51 -0400
committerPaul Gilbert2015-06-02 21:37:51 -0400
commit3bee3e78cd68d72144e5348eae4f480680ebcb6f (patch)
treea03b812a9027c26fc658f0aa4c4207015b369f0b
parentb5a2b55096fbe470425d08269f583c0dd6713898 (diff)
downloadscummvm-rg350-3bee3e78cd68d72144e5348eae4f480680ebcb6f.tar.gz
scummvm-rg350-3bee3e78cd68d72144e5348eae4f480680ebcb6f.tar.bz2
scummvm-rg350-3bee3e78cd68d72144e5348eae4f480680ebcb6f.zip
SHERLOCK: Make some fields of CAnimStream private
-rw-r--r--engines/sherlock/objects.h5
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.cpp6
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index 54cea69d5a..e7b26d12c1 100644
--- a/engines/sherlock/objects.h
+++ b/engines/sherlock/objects.h
@@ -418,11 +418,12 @@ struct CAnim {
void load(Common::SeekableReadStream &s, bool isRoseTattoo);
};
-struct CAnimStream {
+class CAnimStream {
Common::SeekableReadStream *_stream; // Stream to read frames from
int _frameSize; // Temporary used to store the frame size
void *_images; // TOOD: FIgure out hwo to hook up ImageFile with streaming support
+public:
ImageFrame *_imageFrame;
Common::Point _position; // Animation position
@@ -432,7 +433,7 @@ struct CAnimStream {
int _flags; // Flags
int _scaleVal; // Specifies the scale amount
int _zPlacement; // Used by doBgAnim for determining Z order
-
+public:
CAnimStream();
void getNextFrame();
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index e712e6223b..12922b2245 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -211,7 +211,7 @@ void TattooScene::checkBgShapes() {
Scene::checkBgShapes();
// Check for any active playing animation
- if (_activeCAnim._images && _activeCAnim._zPlacement != REMOVE) {
+ if (_activeCAnim._imageFrame && _activeCAnim._zPlacement != REMOVE) {
switch (_activeCAnim._flags & 3) {
case 0:
_activeCAnim._zPlacement = BEHIND;
@@ -427,7 +427,7 @@ void TattooScene::doBgAnimUpdateBgObjectsAndAnim() {
people[idx].adjustSprite();
}
- if ((_activeCAnim._images != nullptr) && (_activeCAnim._zPlacement != REMOVE)) {
+ if (_activeCAnim._imageFrame != nullptr && _activeCAnim._zPlacement != REMOVE) {
_activeCAnim.getNextFrame();
}
@@ -644,7 +644,7 @@ void TattooScene::doBgAnimDrawSprites() {
}
}
- if (_activeCAnim._images != nullptr || _activeCAnim._zPlacement == REMOVE) {
+ if (_activeCAnim._imageFrame != nullptr || _activeCAnim._zPlacement == REMOVE) {
if (_activeCAnim._zPlacement != REMOVE) {
screen.flushImage(_activeCAnim._imageFrame, _activeCAnim._position, _activeCAnim._oldBounds, _activeCAnim._scaleVal);
} else {
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 6779cc48ae..084d52acc6 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -169,7 +169,7 @@ void TattooUserInterface::doBgAnimRestoreUI() {
_oldInvGraphicBounds);
// If a canimation is active, restore the graphics underneath it
- if (scene._activeCAnim._images != nullptr)
+ if (scene._activeCAnim._imageFrame != nullptr)
screen.restoreBackground(scene._activeCAnim._oldBounds);
// If a canimation just ended, remove it's graphics from the backbuffer