aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/console.cpp
diff options
context:
space:
mode:
authorThierry Crozat2017-11-16 03:17:44 +0000
committerThierry Crozat2018-01-23 02:15:40 +0000
commit888930660a5a4bef4fe00e69f267ce0d35492dd8 (patch)
tree8196f70987c2436c2476b80b91b0580fdfa5fe9a /engines/supernova/console.cpp
parent624425077b0353303a72192906c495f619099b7d (diff)
downloadscummvm-rg350-888930660a5a4bef4fe00e69f267ce0d35492dd8.tar.gz
scummvm-rg350-888930660a5a4bef4fe00e69f267ce0d35492dd8.tar.bz2
scummvm-rg350-888930660a5a4bef4fe00e69f267ce0d35492dd8.zip
SUPERNOVA: Use setCurrentImage instead of passing the image to renderImage
This is more similar to what the original code does and allows to retire the renderImage variant that takes an image.
Diffstat (limited to 'engines/supernova/console.cpp')
-rw-r--r--engines/supernova/console.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/supernova/console.cpp b/engines/supernova/console.cpp
index 29c30b6c6f..ee1905a3ce 100644
--- a/engines/supernova/console.cpp
+++ b/engines/supernova/console.cpp
@@ -47,7 +47,11 @@ bool Console::cmdRenderImage(int argc, const char **argv) {
return true;
}
- _vm->renderImage(atoi(argv[1]), atoi(argv[2]));
+ int image = atoi(argv[1]);
+ if (_vm->setCurrentImage(image))
+ _vm->renderImage(atoi(argv[2]));
+ else
+ debugPrintf("Image %d is invalid!", image);
return true;
}