[Scummvm-cvs-logs] scummvm master -> 3bee3e78cd68d72144e5348eae4f480680ebcb6f
dreammaster
dreammaster at scummvm.org
Wed Jun 3 03:38:53 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3bee3e78cd SHERLOCK: Make some fields of CAnimStream private
Commit: 3bee3e78cd68d72144e5348eae4f480680ebcb6f
https://github.com/scummvm/scummvm/commit/3bee3e78cd68d72144e5348eae4f480680ebcb6f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-02T21:37:51-04:00
Commit Message:
SHERLOCK: Make some fields of CAnimStream private
Changed paths:
engines/sherlock/objects.h
engines/sherlock/tattoo/tattoo_scene.cpp
engines/sherlock/tattoo/tattoo_user_interface.cpp
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index 54cea69..e7b26d1 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 e712e62..12922b2 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 6779cc4..084d52a 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
More information about the Scummvm-git-logs
mailing list