[Scummvm-cvs-logs] scummvm master -> 6f6c92d470d50344fb5935b4a8cd6159660d8c5b
bluegr
bluegr at gmail.com
Thu Dec 24 00:33:13 CET 2015
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7a7a25c91d LAB: The maxHeight parameter of readPict() is no longer used
6f6c92d470 LAB: Prevent the Image destructor from deleting the drawing buffer
Commit: 7a7a25c91d2c51c465c7d4131c90b6114f715940
https://github.com/scummvm/scummvm/commit/7a7a25c91d2c51c465c7d4131c90b6114f715940
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-24T01:32:22+02:00
Commit Message:
LAB: The maxHeight parameter of readPict() is no longer used
Changed paths:
engines/lab/dispman.cpp
engines/lab/dispman.h
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index f490503..0f2bc93 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -88,7 +88,7 @@ void DisplayMan::loadBackPict(const Common::String fileName, uint16 *highPal) {
_vm->_anim->_noPalChange = false;
}
-void DisplayMan::readPict(const Common::String filename, bool playOnce, bool onlyDiffData, byte *memoryBuffer, uint16 maxHeight) {
+void DisplayMan::readPict(const Common::String filename, bool playOnce, bool onlyDiffData, byte *memoryBuffer) {
_vm->_anim->stopDiff();
loadPict(filename);
_vm->updateMusicAndEvents();
@@ -813,7 +813,7 @@ void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, const Common::String fi
_vm->_curFileName = _vm->getPictName(closePtrList);
byte *bitMapBuffer = new byte[_screenWidth * (lastY + 5)];
- readPict(_vm->_curFileName, true, false, bitMapBuffer, lastY + 5);
+ readPict(_vm->_curFileName, true, false, bitMapBuffer);
setPalette(_vm->_anim->_diffPalette, 256);
diff --git a/engines/lab/dispman.h b/engines/lab/dispman.h
index 3761e31..8e9cfdf 100644
--- a/engines/lab/dispman.h
+++ b/engines/lab/dispman.h
@@ -85,7 +85,7 @@ public:
/**
* Reads in a picture into the display bitmap.
*/
- void readPict(const Common::String filename, bool playOnce = true, bool onlyDiffData = false, byte *memoryBuffer = nullptr, uint16 maxHeight = 0);
+ void readPict(const Common::String filename, bool playOnce = true, bool onlyDiffData = false, byte *memoryBuffer = nullptr);
void freePict();
/**
Commit: 6f6c92d470d50344fb5935b4a8cd6159660d8c5b
https://github.com/scummvm/scummvm/commit/6f6c92d470d50344fb5935b4a8cd6159660d8c5b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-24T01:32:22+02:00
Commit Message:
LAB: Prevent the Image destructor from deleting the drawing buffer
Changed paths:
engines/lab/dispman.cpp
engines/lab/tilepuzzle.cpp
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index 0f2bc93..e9736a9 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -853,7 +853,10 @@ void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, const Common::String fi
} // for i
} // for j
- delete[] bitMapBuffer;
+ // Prevent the Image destructor from deleting the drawing buffer
+ imDest._imageData = nullptr;
+
+ // bitMapBuffer will be deleted by the Image destructor
}
void DisplayMan::doTransition(TransitionType transitionType, CloseDataPtr *closePtrList, const Common::String filename) {
diff --git a/engines/lab/tilepuzzle.cpp b/engines/lab/tilepuzzle.cpp
index d39612d..bea2b61 100644
--- a/engines/lab/tilepuzzle.cpp
+++ b/engines/lab/tilepuzzle.cpp
@@ -327,6 +327,9 @@ void TilePuzzle::changeCombination(uint16 number) {
_numberImages[combnum]->blitBitmap(0, (_numberImages[combnum])->_height - (2 * i), &(display), _vm->_utils->vgaScaleX(COMBINATION_X[number]), _vm->_utils->vgaScaleY(65), (_numberImages[combnum])->_width, 2, false);
}
+ // Prevent the Image destructor from deleting the display buffer
+ display._imageData = nullptr;
+
delete[] buffer;
bool unlocked = true;
More information about the Scummvm-git-logs
mailing list