[Scummvm-cvs-logs] SF.net SVN: scummvm:[53819] scummvm/branches/branch-1-2-0/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Oct 25 13:13:54 CEST 2010
Revision: 53819
http://scummvm.svn.sourceforge.net/scummvm/?rev=53819&view=rev
Author: thebluegr
Date: 2010-10-25 11:13:54 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
SCI: Backport of revisions 53746, 53775 (kMemory fix, kAddToPic regression)
Modified Paths:
--------------
scummvm/branches/branch-1-2-0/engines/sci/engine/kmisc.cpp
scummvm/branches/branch-1-2-0/engines/sci/graphics/animate.cpp
Modified: scummvm/branches/branch-1-2-0/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/engines/sci/engine/kmisc.cpp 2010-10-25 11:12:34 UTC (rev 53818)
+++ scummvm/branches/branch-1-2-0/engines/sci/engine/kmisc.cpp 2010-10-25 11:13:54 UTC (rev 53819)
@@ -231,14 +231,18 @@
switch (argv[0].toUint16()) {
case K_MEMORY_ALLOCATE_CRITICAL: {
int byteCount = argv[1].toUint16();
- // WORKAROUND: pq3 (multilingual) when plotting crimes - allocates the
- // returned bytes from kStrLen on "W" and "E" and wants to put a
- // string in there, which doesn't fit of course. That's why we allocate
- // one byte more all the time inside that room
- if (g_sci->getGameId() == GID_PQ3) {
- if (s->currentRoomNumber() == 202)
- byteCount++;
- }
+ // WORKAROUND:
+ // - pq3 (multilingual) room 202
+ // when plotting crimes, allocates the returned bytes from kStrLen
+ // on "W" and "E" and wants to put a string in there, which doesn't
+ // fit of course.
+ // - lsl5 (multilingual) room 280
+ // allocates memory according to a previous kStrLen for the name of
+ // the airport ladies (bug #3093818), which isn't enough
+
+ // We always allocate 1 byte more, because of this
+ byteCount++;
+
if (!s->_segMan->allocDynmem(byteCount, "kMemory() critical", &s->r_acc)) {
error("Critical heap allocation failed");
}
Modified: scummvm/branches/branch-1-2-0/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/engines/sci/graphics/animate.cpp 2010-10-25 11:12:34 UTC (rev 53818)
+++ scummvm/branches/branch-1-2-0/engines/sci/graphics/animate.cpp 2010-10-25 11:13:54 UTC (rev 53819)
@@ -575,7 +575,9 @@
// Create rect according to coordinates and given cel
if (it->scaleSignal & kScaleSignalDoScaling) {
- applyGlobalScaling(it, view);
+ if (it->scaleSignal & kScaleSignalGlobalScaling) {
+ applyGlobalScaling(it, view);
+ }
view->getCelScaledRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->scaleX, it->scaleY, it->celRect);
writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsLeft), it->celRect.left);
writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsTop), it->celRect.top);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list