aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-17 08:30:08 +0000
committerFilippos Karapetis2010-11-17 08:30:08 +0000
commit0470e47145b42a8e9af56c1553bc9944c6096cba (patch)
treee8978cae737cd7879b4582c4013338a7d3f46bdf /engines/sci
parent553d571c5047327a75f99192142301e385e6ffe4 (diff)
downloadscummvm-rg350-0470e47145b42a8e9af56c1553bc9944c6096cba.tar.gz
scummvm-rg350-0470e47145b42a8e9af56c1553bc9944c6096cba.tar.bz2
scummvm-rg350-0470e47145b42a8e9af56c1553bc9944c6096cba.zip
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 svn-id: r54279
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/console.cpp2
-rw-r--r--engines/sci/engine/script.cpp6
-rw-r--r--engines/sci/resource.cpp4
3 files changed, 7 insertions, 5 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index b16a01c78f..509daf0206 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -834,7 +834,7 @@ bool Console::cmdHexgrep(int argc, const char **argv) {
}
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;
}
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index e3d43f4fd2..7133ca0168 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -90,8 +90,8 @@ void Script::init(int script_nr, ResourceManager *resMan) {
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 @@ void Script::load(ResourceManager *resMan) {
// 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);
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 0773357174..0be52834b9 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -2431,9 +2431,11 @@ Common::String ResourceManager::findSierraGameId() {
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)