aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-29 17:26:47 +0000
committerEugene Sandulenko2005-07-29 17:26:47 +0000
commitdefae9e76ae2a38e0dc98c5a75233707be964654 (patch)
tree9e055e2292785569e295100e597600acbd2611c6
parent922c5e29a04ec80b4f34a11e755568a8677264a0 (diff)
downloadscummvm-rg350-defae9e76ae2a38e0dc98c5a75233707be964654.tar.gz
scummvm-rg350-defae9e76ae2a38e0dc98c5a75233707be964654.tar.bz2
scummvm-rg350-defae9e76ae2a38e0dc98c5a75233707be964654.zip
Render substitute scene title and description.
svn-id: r18591
-rw-r--r--saga/scene.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/saga/scene.cpp b/saga/scene.cpp
index 74b140ffc6..209ca93e79 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -310,7 +310,7 @@ void Scene::skipScene() {
static struct SceneSubstitutes {
int sceneId;
const char *message;
- const char *name;
+ const char *title;
const char *image;
} sceneSubstitutes[] = {
{
@@ -364,27 +364,32 @@ static struct SceneSubstitutes {
void Scene::changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType) {
// This is used for latter demos where all places on world map except
// Tent Faire are substituted with LBM picture and short description
- // TODO: implement
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
if (sceneSubstitutes[i].sceneId == sceneNumber) {
Surface *backBuffer = _vm->_gfx->getBackBuffer();
- byte *pal;
+ byte *pal, *colors;
Common::File file;
PalEntry cPal[PAL_ENTRIES];
if (file.open(sceneSubstitutes[i].image)) {
_vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit.");
_vm->_interface->setMode(kPanelSceneSubstitute);
- Graphics::decodeILBM(file, *backBuffer, pal);
+ Graphics::decodeILBM(file, *backBuffer, colors);
+ pal = colors;
for (int j = 0; j < PAL_ENTRIES; j++) {
cPal[j].red = *pal++;
cPal[j].green = *pal++;
cPal[j].blue = *pal++;
}
_vm->_gfx->setPalette(cPal);
+ free(colors);
+ _vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].title,
+ Common::Rect(0, 10, _vm->getDisplayWidth(), 30), 1, 15, kFontOutline);
+ _vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].message,
+ Common::Rect(20, _vm->getSceneHeight() - 40, _vm->getDisplayWidth() - 20,
+ _vm->getSceneHeight()), 1, 15, kFontOutline);
}
- debug(0, "Scene %d substitute exists", sceneNumber);
return;
}
}