aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-17 14:05:05 +0000
committerFilippos Karapetis2010-06-17 14:05:05 +0000
commit36d92b4566ba15d381f56870ccf9898ca0383138 (patch)
tree8f9825e2542ae60296ecd1a90781a353387b2985 /engines/sci/engine
parent45b23601e77d816415cccd7cd73f487d3a0f485b (diff)
downloadscummvm-rg350-36d92b4566ba15d381f56870ccf9898ca0383138.tar.gz
scummvm-rg350-36d92b4566ba15d381f56870ccf9898ca0383138.tar.bz2
scummvm-rg350-36d92b4566ba15d381f56870ccf9898ca0383138.zip
Fixed kLoad and kUnload (the resource type was incorrect)
svn-id: r49931
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kscripts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index 88e765a0ff..7e33f17f5f 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -36,7 +36,7 @@ namespace Sci {
// Loads arbitrary resources of type 'restype' with resource numbers 'resnrs'
// This implementation ignores all resource numbers except the first one.
reg_t kLoad(EngineState *s, int argc, reg_t *argv) {
- int restype = argv[0].toUint16();
+ ResourceType restype = (ResourceType)(argv[0].toUint16() & 0x7f);
int resnr = argv[1].toUint16();
// Request to dynamically allocate hunk memory for later use
@@ -76,7 +76,7 @@ reg_t kLock(EngineState *s, int argc, reg_t *argv) {
// Unloads an arbitrary resource of type 'restype' with resource numbber 'resnr'
reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) {
if (argc >= 2) {
- int restype = argv[0].toUint16();
+ ResourceType restype = (ResourceType)(argv[0].toUint16() & 0x7f);
reg_t resnr = argv[1];
if (restype == kResourceTypeMemory)