aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kgraphics.cpp2
-rw-r--r--engines/sci/engine/klists.cpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 4ccc125eb4..8413a7887b 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -769,7 +769,7 @@ static int collides_with(EngineState *s, Common::Rect area, reg_t other_obj, int
return 0;
}
-reg_t kCanBeHere(EngineState *s, int funct_nr, int argc, reg_t * argv) {
+reg_t kCanBeHere(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t obj = argv[0];
reg_t cliplist_ref = KP_ALT(1, NULL_REG);
List *cliplist = NULL;
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 029954d00f..43d1f25e01 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -310,7 +310,7 @@ reg_t kAddToFront(EngineState *s, int funct_nr, int argc, reg_t *argv) {
}
reg_t kAddAfter(EngineState *s, int funct_nr, int argc, reg_t *argv) {
- List *l =lookup_list(s, argv[0]);
+ List *l = lookup_list(s, argv[0]);
Node *firstnode = argv[1].isNull() ? NULL : lookup_node(s, argv[1]);
Node *newnode = lookup_node(s, argv[2]);
@@ -341,12 +341,11 @@ reg_t kAddAfter(EngineState *s, int funct_nr, int argc, reg_t *argv) {
else
lookup_node(s, oldnext)->pred = argv[2];
- return s->r_acc;
} else { // !firstnode
- // Prepare call to AddToFront...
- argv[1] = argv[0];
- return kAddToFront(s, funct_nr, 2, argv + 1); // Set as initial list node
+ _k_add_to_front(s, argv[0], argv[2]); // Set as initial list node
}
+
+ return s->r_acc;
}
reg_t kAddToEnd(EngineState *s, int funct_nr, int argc, reg_t *argv) {