aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kscripts.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2018-08-25 12:21:36 +0300
committerFilippos Karapetis2018-08-25 12:39:12 +0300
commit941869c466354356c7ebf76e5c6fe37fe06785cf (patch)
treef08ad9e3db85b01e5e4583caa476aab6d69bf6ab /engines/sci/engine/kscripts.cpp
parent66cbaeefe20967348bb5306272f937dba0281021 (diff)
downloadscummvm-rg350-941869c466354356c7ebf76e5c6fe37fe06785cf.tar.gz
scummvm-rg350-941869c466354356c7ebf76e5c6fe37fe06785cf.tar.bz2
scummvm-rg350-941869c466354356c7ebf76e5c6fe37fe06785cf.zip
SCI32: Remove reg32_t and use reg_t in all cases
reg32_t was a transitive solution, before reg_t's were adapted to use 32-bit addresses internally, and before support for SCI3 was added. It was introduced as another way to handle large script offsets in SCI3, and was only used for the program counter (PC). It's no longer needed, as we now support SCI3 script offsets using reg_t's, so we can use make_reg32 in all cases where we need to access offsets over 64KB
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r--engines/sci/engine/kscripts.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index 26dbe9ba00..61b0f16cae 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -298,10 +298,7 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) {
s->variables[VAR_GLOBAL][kGlobalVarSpeed] = make_reg(0, 6);
}
- reg_t addr;
- addr.setSegment(scriptSeg);
- addr.setOffset(address);
- return addr;
+ return make_reg32(scriptSeg, address);
}
reg_t kDisposeScript(EngineState *s, int argc, reg_t *argv) {