aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2015-12-26 13:53:11 +0100
committerStrangerke2015-12-26 13:53:11 +0100
commit07b554b847d9675d5d97b7ea36ac87ce17e6a1f3 (patch)
treefe77dd9410ed5b1877e2bc1df2cefd4013b928e0 /engines
parent6910a3b2690040dfa6592e6a49f0dbf95d2a2855 (diff)
downloadscummvm-rg350-07b554b847d9675d5d97b7ea36ac87ce17e6a1f3.tar.gz
scummvm-rg350-07b554b847d9675d5d97b7ea36ac87ce17e6a1f3.tar.bz2
scummvm-rg350-07b554b847d9675d5d97b7ea36ac87ce17e6a1f3.zip
LAB: Add an access function to make _headerData a private member of Anim
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/anim.cpp5
-rw-r--r--engines/lab/anim.h4
-rw-r--r--engines/lab/dispman.cpp7
3 files changed, 10 insertions, 6 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index 92ca49b95d..ea7f568de3 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -80,6 +80,9 @@ void Anim::setOutputBuffer(byte *memoryBuffer) {
_outputBuffer = memoryBuffer;
}
+uint16 Anim::getDIFFHeight() {
+ return _headerdata._height;
+}
void Anim::diffNextFrame(bool onlyDiffData) {
if (_lastBlockHeader == 65535)
@@ -90,7 +93,7 @@ void Anim::diffNextFrame(bool onlyDiffData) {
byte *startOfBuf = _outputBuffer;
int bufPitch = _vm->_graphics->_screenWidth;
- if (!_outputBuffer) {
+ if (!startOfBuf) {
startOfBuf = _vm->_graphics->getCurrentDrawingBuffer();
drawOnScreen = true;
}
diff --git a/engines/lab/anim.h b/engines/lab/anim.h
index 1979aa5979..e9bc8589c0 100644
--- a/engines/lab/anim.h
+++ b/engines/lab/anim.h
@@ -66,12 +66,12 @@ private:
uint32 _diffHeight;
byte *_outputBuffer;
+ DIFFHeader _headerdata;
public:
Anim(LabEngine *vm);
virtual ~Anim();
- DIFFHeader _headerdata;
char _diffPalette[256 * 3];
bool _waitForEffect; // Wait for each sound effect to finish before continuing.
bool _doBlack; // Black the screen before new picture
@@ -94,6 +94,8 @@ public:
* Stops an animation from running.
*/
void stopDiffEnd();
+
+ uint16 getDIFFHeight();
};
} // End of namespace Lab
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index 4f0f2b5b97..0b4119347d 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -673,20 +673,19 @@ void DisplayMan::doScrollWipe(const Common::String filename) {
uint16 nheight = height;
uint16 startLine = 0, onRow = 0;
- while (onRow < _vm->_anim->_headerdata._height) {
+ while (onRow < _vm->_anim->getDIFFHeight()) {
_vm->updateMusicAndEvents();
if ((by > nheight) && nheight)
by = nheight;
- if ((startLine + by) > (_vm->_anim->_headerdata._height - height - 1))
+ if ((startLine + by) > (_vm->_anim->getDIFFHeight() - height - 1))
break;
if (nheight)
nheight -= by;
copyPage(width, height, nheight, startLine, mem);
-
screenUpdate();
if (!nheight)
@@ -715,7 +714,7 @@ void DisplayMan::doScrollBounce() {
byte *mem = _vm->_anim->_scrollScreenBuffer;
_vm->updateMusicAndEvents();
- int startLine = _vm->_anim->_headerdata._height - height - 1;
+ int startLine = _vm->_anim->getDIFFHeight() - height - 1;
for (int i = 0; i < 5; i++) {
_vm->updateMusicAndEvents();