aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/mult_v2.cpp
diff options
context:
space:
mode:
authorSven Hesse2006-11-21 13:28:45 +0000
committerSven Hesse2006-11-21 13:28:45 +0000
commit2768fa24fc809168784d3cde79fcb4ac6ad513c0 (patch)
tree5448797e78304046d294c06fab37cbdafc0e36aa /engines/gob/mult_v2.cpp
parentfada662a1f01a18dc020b5af02798d47650f7a4a (diff)
downloadscummvm-rg350-2768fa24fc809168784d3cde79fcb4ac6ad513c0.tar.gz
scummvm-rg350-2768fa24fc809168784d3cde79fcb4ac6ad513c0.tar.bz2
scummvm-rg350-2768fa24fc809168784d3cde79fcb4ac6ad513c0.zip
- Fixed the crashes in Gob1 EGA and Gob2 Demo
- Fixed the compile error in GobEngine::saveGame on some systems svn-id: r24756
Diffstat (limited to 'engines/gob/mult_v2.cpp')
-rw-r--r--engines/gob/mult_v2.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index 20b61626e8..c92aae8504 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -476,14 +476,17 @@ void Mult_v2::playMult(int16 startFrame, int16 endFrame, char checkEscape,
if ((_vm->_global->_videoMode == 0x13) && _vm->_video->_extraMode &&
((_vm->_draw->_backSurface->width * _vm->_draw->_backSurface->height) / 2
+ (_vm->_anim->_areaWidth * _vm->_anim->_areaHeight) / 4) < 64000) {
- _vm->_anim->_animSurf = new Video::SurfaceDesc;
+ warning("GOB2 Stub! Mult_v2::playMult(), wide frontSurface, using the extra space as animSurf");
+/* _vm->_anim->_animSurf = new Video::SurfaceDesc;
memcpy(_vm->_anim->_animSurf, _vm->_draw->_frontSurface, sizeof(Video::SurfaceDesc));
_vm->_anim->_animSurf->width = (_vm->_anim->_areaLeft + _vm->_anim->_areaWidth - 1) | 7;
_vm->_anim->_animSurf->width -= (_vm->_anim->_areaLeft & 0x0FFF8) - 1;
_vm->_anim->_animSurf->height = _vm->_anim->_areaHeight;
_vm->_anim->_animSurf->vidPtr +=
(_vm->_draw->_backSurface->width * _vm->_draw->_backSurface->height) / 2;
- _vm->_draw->_spritesArray[22] = _vm->_anim->_animSurf;
+ _vm->_draw->_spritesArray[22] = _vm->_anim->_animSurf;*/
+ _vm->_draw->initBigSprite(22, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight, 0);
+ _vm->_anim->_animSurf = _vm->_draw->_spritesArray[22];
} else {
_vm->_draw->initBigSprite(22, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight, 0);
_vm->_anim->_animSurf = _vm->_draw->_spritesArray[22];
@@ -1333,6 +1336,7 @@ void Mult_v2::playSound(Snd::SoundDesc * soundDesc, int16 repCount, int16 freq,
void Mult_v2::freeMult(void) {
if (_vm->_anim->_animSurf != 0)
delete _vm->_anim->_animSurf;
+ _vm->_anim->_animSurf = 0;
delete[] _objects;
delete[] _renderData2;
@@ -1341,7 +1345,6 @@ void Mult_v2::freeMult(void) {
_objects = 0;
_renderData2 = 0;
_orderArray = 0;
- _vm->_anim->_animSurf = 0;
}
void Mult_v2::freeMultKeys(void) {