[Scummvm-cvs-logs] CVS: scummvm/saga interface.cpp,1.85,1.86
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sun May 8 23:38:09 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5828
Modified Files:
interface.cpp
Log Message:
Fixed failed assertion when entering the Elk King's court. It looks like a
hack - perhaps it *is* a hack - but it's what the original engine did too,
as far as I can tell.
Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- interface.cpp 24 Apr 2005 15:17:37 -0000 1.85
+++ interface.cpp 9 May 2005 06:36:27 -0000 1.86
@@ -307,7 +307,10 @@
int Interface::loadScenePortraits(int resourceId) {
_scenePortraits.freeMem();
- return _vm->_sprite->loadList(resourceId, _scenePortraits);
+warning("loadScenePortraits(%d)", resourceId);
+int res = _vm->_sprite->loadList(resourceId, _scenePortraits);
+warning("_scenePortraits.spriteCount = %d", _scenePortraits.spriteCount);
+return res;
}
int Interface::setLeftPortrait(int portrait) {
@@ -409,6 +412,14 @@
rightPortraitPoint.x = _mainPanel.x + _vm->getDisplayInfo().rightPortraitXOffset;
rightPortraitPoint.y = _mainPanel.y + _vm->getDisplayInfo().rightPortraitYOffset;
+ // This looks like hack - particularly since it's only done for
+ // the right-side portrait - and perhaps it is! But as far as I
+ // can tell this is what the original engine does. And it keeps
+ // ITE from crashing when entering the Elk King's court.
+
+ if (_rightPortrait >= _scenePortraits.spriteCount)
+ _rightPortrait = 0;
+
_vm->_sprite->draw(backBuffer, _scenePortraits, _rightPortrait, rightPortraitPoint, 256);
}
More information about the Scummvm-git-logs
mailing list