aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-06-13 14:24:13 +0200
committerThierry Crozat2018-01-22 22:59:27 +0000
commitd55ef4045ef287421af9aafa94fb8196cc7d7189 (patch)
tree8acd7e3e35b24729849eef86cb79961aa35089b4
parentf25d6c7485eb1500182c29147debd2cd9fd1f677 (diff)
downloadscummvm-rg350-d55ef4045ef287421af9aafa94fb8196cc7d7189.tar.gz
scummvm-rg350-d55ef4045ef287421af9aafa94fb8196cc7d7189.tar.bz2
scummvm-rg350-d55ef4045ef287421af9aafa94fb8196cc7d7189.zip
SUPERNOVA: Setup image and section viewer
Pressing 'w' increases the image index and 'e' the section index.
-rw-r--r--engines/supernova/supernova.cpp17
-rw-r--r--engines/supernova/supernova.h3
2 files changed, 13 insertions, 7 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index c694fdfb8e..3c57fcdaf5 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -34,11 +34,10 @@
#include "graphics/surface.h"
#include "graphics/screen.h"
#include "graphics/palette.h"
-//#include "graphics/font.h"
-//#include "graphics/fontman.h"
#include "supernova/supernova.h"
#include "supernova/msn_def.h"
+//#include "supernova/rooms.h"
namespace Supernova {
@@ -48,7 +47,8 @@ SupernovaEngine::SupernovaEngine(OSystem *syst)
, _console(NULL)
, _brightness(255)
, _menuBrightness(255)
- , _incIndex(10)
+ , _imageIndex(10)
+ , _sectionIndex(0)
{
// const Common::FSNode gameDataDir(ConfMan.get("path"));
// SearchMan.addSubDirectoryMatching(gameDataDir, "sound");
@@ -79,6 +79,8 @@ Common::Error SupernovaEngine::run() {
while (_gameRunning) {
updateEvents();
+ renderImage(_imageIndex, _sectionIndex);
+ renderText(Common::String::format("%u | %u", _imageIndex, _sectionIndex).c_str(), 0, 190, 15);
_system->updateScreen();
_system->delayMillis(10);
}
@@ -110,13 +112,16 @@ void SupernovaEngine::updateEvents() {
playSound(48, 13530);
}
if (event.kbd.keycode == Common::KEYCODE_w) {
- renderImage(_incIndex, 0);
- if (_incIndex == 31) {
+ _sectionIndex = 0;
+ ++_imageIndex;
+ if (_imageIndex == 31) {
renderText("Das Schicksal", 44, 132, 4);
renderText("des Horst Hummel", 35, 142, 4);
renderText("Teil 1:", 64, 120, 12);
}
- ++_incIndex;
+ }
+ if (event.kbd.keycode == Common::KEYCODE_e) {
+ ++_sectionIndex;
}
break;
default:
diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h
index 4c6787b91a..2e15850b61 100644
--- a/engines/supernova/supernova.h
+++ b/engines/supernova/supernova.h
@@ -50,7 +50,8 @@ private:
Audio::SoundHandle _soundHandle;
bool _gameRunning;
MSNImageDecoder _image;
- byte _incIndex;
+ byte _imageIndex;
+ byte _sectionIndex;
byte _menuBrightness;
byte _brightness;