[Scummvm-cvs-logs] SF.net SVN: scummvm:[54279] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Nov 17 09:30:09 CET 2010
Revision: 54279
http://scummvm.svn.sourceforge.net/scummvm/?rev=54279&view=rev
Author: thebluegr
Date: 2010-11-17 08:30:08 +0000 (Wed, 17 Nov 2010)
Log Message:
-----------
SCI: The heap was a separate resource in SCI1.1 - SCI2.1 games only. It was later
merged into the script files again in SCI3
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
scummvm/trunk/engines/sci/engine/script.cpp
scummvm/trunk/engines/sci/resource.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2010-11-17 08:18:56 UTC (rev 54278)
+++ scummvm/trunk/engines/sci/console.cpp 2010-11-17 08:30:08 UTC (rev 54279)
@@ -834,7 +834,7 @@
}
bool Console::cmdVerifyScripts(int argc, const char **argv) {
- if (getSciVersion() < SCI_VERSION_1_1) {
+ if (getSciVersion() < SCI_VERSION_1_1 || getSciVersion() == SCI_VERSION_3) {
DebugPrintf("This script check is only meant for SCI1.1-SCI2.1 games\n");
return true;
}
Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp 2010-11-17 08:18:56 UTC (rev 54278)
+++ scummvm/trunk/engines/sci/engine/script.cpp 2010-11-17 08:30:08 UTC (rev 54279)
@@ -90,8 +90,8 @@
if (getSciVersion() == SCI_VERSION_0_EARLY) {
_bufSize += READ_LE_UINT16(script->data) * 2;
- } else if (getSciVersion() >= SCI_VERSION_1_1) {
- // In SCI11, the heap was in a separate space from the script. We append
+ } else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) {
+ // In SCI1.1 - SCI2.1, the heap was in a separate space from the script. We append
// it to the end of the script, and adjust addressing accordingly.
// However, since we address the heap with a 16-bit pointer, the
// combined size of the stack and the heap must be 64KB. So far this has
@@ -129,7 +129,7 @@
// Check scripts for matching signatures and patch those, if found
matchSignatureAndPatch(_nr, _buf, script->size);
- if (getSciVersion() >= SCI_VERSION_1_1) {
+ if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) {
Resource *heap = resMan->findResource(ResourceId(kResourceTypeHeap, _nr), 0);
assert(heap != 0);
Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp 2010-11-17 08:18:56 UTC (rev 54278)
+++ scummvm/trunk/engines/sci/resource.cpp 2010-11-17 08:30:08 UTC (rev 54279)
@@ -2431,9 +2431,11 @@
if (getSciVersion() < SCI_VERSION_1_1) {
heap = findResource(ResourceId(kResourceTypeScript, 0), false);
- } else {
+ } else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) {
heap = findResource(ResourceId(kResourceTypeHeap, 0), false);
nameSelector += 5;
+ } else if (getSciVersion() == SCI_VERSION_3) {
+ warning("TODO: findSierraGameId(): SCI3 equivalent");
}
if (!heap)
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