mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
LAB: Add an access function to make _headerData a private member of Anim
This commit is contained in:
parent
6910a3b269
commit
07b554b847
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user