aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/kevent.cpp')
-rw-r--r--engines/sci/engine/kevent.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index bac1d08d78..d5846c2daa 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -41,6 +41,7 @@ reg_t kGetEvent(EngineState *s, int funct_nr, int argc, reg_t *argv) {
sci_event_t e;
int oldx, oldy;
int modifier_mask = s->resourceManager->sciVersion() <= SCI_VERSION_01 ? SCI_EVM_ALL : SCI_EVM_NO_FOOLOCK;
+ SegManager *segManager = s->segmentManager;
// If there's a simkey pending, and the game wants a keyboard event, use the
// simkey instead of a normal event
@@ -152,6 +153,7 @@ reg_t kGetEvent(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t kMapKeyToDir(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t obj = argv[0];
+ SegManager *segManager = s->segmentManager;
if (GET_SEL32V(obj, type) == SCI_EVT_KEYBOARD) { // Keyboard
int mover = -1;
@@ -201,6 +203,7 @@ reg_t kMapKeyToDir(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t kGlobalToLocal(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t obj = argc ? argv[0] : NULL_REG; // Can this really happen? Lars
+ SegManager *segManager = s->segmentManager;
if (obj.segment) {
int x = GET_SEL32V(obj, x);
@@ -216,6 +219,7 @@ reg_t kGlobalToLocal(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t kLocalToGlobal(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t obj = argc ? argv[0] : NULL_REG; // Can this really happen? Lars
+ SegManager *segManager = s->segmentManager;
if (obj.segment) {
int x = GET_SEL32V(obj, x);