[Scummvm-cvs-logs] CVS: scummvm/saga interface.cpp,1.121,1.122 interface.h,1.65,1.66 render.cpp,1.67,1.68 scene.cpp,1.125,1.126 sfuncs.cpp,1.144,1.145
Eugene Sandulenko
sev at users.sourceforge.net
Fri Jul 29 09:38:30 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3072
Modified Files:
interface.cpp interface.h render.cpp scene.cpp sfuncs.cpp
Log Message:
Show scene substitute image for demo versions of ITE.
Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- interface.cpp 21 Jul 2005 01:33:28 -0000 1.121
+++ interface.cpp 29 Jul 2005 16:37:06 -0000 1.122
@@ -297,6 +297,10 @@
case kPanelMap:
mapPanelShow();
break;
+ case kPanelSceneSubstitute:
+ _vm->_render->setFlag(RF_PLACARD);
+ _vm->_gfx->getCurrentPal(_mapSavedPal);
+ break;
}
draw();
@@ -441,6 +445,15 @@
case kPanelMap:
mapPanelClean();
break;
+ case kPanelSceneSubstitute:
+ if (ascii == 13) {
+ _vm->_render->clearFlag(RF_PLACARD);
+ _vm->_gfx->setPalette(_mapSavedPal);
+ setMode(kPanelMain);
+ } else if (ascii == 'q' || ascii == 'Q') {
+ _vm->shutDown();
+ }
+ break;
}
return false;
}
@@ -483,6 +496,9 @@
assert(text != NULL);
assert(strlen(text) < STATUS_TEXT_LEN);
+ if (_vm->_render->getFlags() & (RF_PLACARD | RF_MAP))
+ return;
+
strncpy(_statusText, text, STATUS_TEXT_LEN);
_statusOnceColor = statusColor;
drawStatusBar();
@@ -1293,6 +1309,14 @@
mapPanelClean();
}
+ if (_panelMode == kPanelSceneSubstitute) {
+ if (updateFlag & UPDATE_MOUSECLICK) {
+ _vm->_render->clearFlag(RF_PLACARD);
+ _vm->_gfx->setPalette(_mapSavedPal);
+ setMode(kPanelMain);
+ }
+ }
+
_lastMousePoint = mousePoint;
}
@@ -1426,7 +1450,7 @@
}
changed = true;
} else {
- _vm->_script->whichObject(mousePoint);
+ _vm->_script->whichObject(mousePoint);
}
changed = changed || (panelButton != _mainPanel.currentButton);
Index: interface.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- interface.h 19 Jul 2005 19:05:45 -0000 1.65
+++ interface.h 29 Jul 2005 16:37:06 -0000 1.66
@@ -68,7 +68,8 @@
kPanelConverse,
kPanelProtect,
kPanelPlacard,
- kPanelMap
+ kPanelMap,
+ kPanelSceneSubstitute
// kPanelInventory
};
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- render.cpp 14 Jul 2005 17:46:20 -0000 1.67
+++ render.cpp 29 Jul 2005 16:37:06 -0000 1.68
@@ -82,7 +82,7 @@
// Get mouse coordinates
mousePoint = _vm->mousePos();
- if (/*_vm->_interface->getMode() != kPanelPlacard*/!(_flags & (RF_PLACARD | RF_MAP))) {
+ if (!(_flags & (RF_PLACARD | RF_MAP))) {
// Display scene background
_vm->_scene->draw();
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- scene.cpp 25 Jul 2005 17:35:35 -0000 1.125
+++ scene.cpp 29 Jul 2005 16:37:06 -0000 1.126
@@ -44,6 +44,8 @@
#include "saga/rscfile.h"
#include "saga/resnames.h"
+#include "graphics/ilbm.h"
+
namespace Saga {
static int initSceneDoors[SCENE_DOORS_MAX] = {
@@ -305,7 +307,88 @@
}
}
+static struct SceneSubstitutes {
+ int sceneId;
+ const char *message;
+ const char *name;
+ const char *image;
+} sceneSubstitutes[] = {
+ {
+ 7,
+ "Tycho says he knows much about the northern lands. Can Rif convince "
+ "the Dog to share this knowledge?",
+ "The Home of Tycho Northpaw",
+ "tycho.bbm"
+ },
+
+ {
+ 27,
+ "The scene of the crime may hold many clues, but will the servants of "
+ "the Sanctuary trust Rif?",
+ "The Sanctuary of the Orb",
+ "sanctuar.bbm"
+ },
+
+ {
+ 5,
+ "The Rats hold many secrets that could guide Rif on his quest -- assuming "
+ "he can get past the doorkeeper.",
+ "The Rat Complex",
+ "ratdoor.bbm"
+ },
+
+ {
+ 2,
+ "The Ferrets enjoy making things and have the materials to do so. How can "
+ "that help Rif?",
+ "The Ferret Village",
+ "ferrets.bbm"
+ },
+
+ {
+ 67,
+ "What aid can the noble King of the Elks provide to Rif and his companions?",
+ "The Realm of the Forest King",
+ "elkenter.bbm"
+ },
+
+ {
+ 3,
+ "The King holds Rif's sweetheart hostage. Will the Boar provide any "
+ "assistance to Rif?",
+ "The Great Hall of the Boar King",
+ "boarhall.bbm"
+ }
+};
+
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;
+ 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);
+ for (int j = 0; j < PAL_ENTRIES; j++) {
+ cPal[j].red = *pal++;
+ cPal[j].green = *pal++;
+ cPal[j].blue = *pal++;
+ }
+ _vm->_gfx->setPalette(cPal);
+ }
+ debug(0, "Scene %d substitute exists", sceneNumber);
+ return;
+ }
+ }
+
LoadSceneParams sceneParams;
sceneParams.actorsEntrance = actorsEntrance;
Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- sfuncs.cpp 25 Jul 2005 02:38:43 -0000 1.144
+++ sfuncs.cpp 29 Jul 2005 16:37:06 -0000 1.145
@@ -307,7 +307,8 @@
// Script function #5 (0x05)
void Script::sfMainMode(SCRIPTFUNC_PARAMS) {
_vm->_actor->_centerActor = _vm->_actor->_protagonist;
- showVerb();
+
+ showVerb();
_vm->_interface->activate();
_vm->_interface->setMode(kPanelMain);
@@ -534,60 +535,6 @@
}
}
-static struct SceneSubstitutes {
- int sceneId;
- const char *message;
- const char *name;
- const char *image;
-} sceneSubstitutes[] = {
- {
- 7,
- "Tycho says he knows much about the northern lands. Can Rif convince "
- "the Dog to share this knowledge?",
- "The Home of Tycho Northpaw",
- "tycho.bbm"
- },
-
- {
- 27,
- "The scene of the crime may hold many clues, but will the servants of "
- "the Sanctuary trust Rif?",
- "The Sanctuary of the Orb",
- "sanctuar.bbm"
- },
-
- {
- 5,
- "The Rats hold many secrets that could guide Rif on his quest -- assuming "
- "he can get past the doorkeeper.",
- "The Rat Complex",
- "ratdoor.bbm"
- },
-
- {
- 2,
- "The Ferrets enjoy making things and have the materials to do so. How can "
- "that help Rif?",
- "The Ferret Village",
- "ferrets.bbm"
- },
-
- {
- 67,
- "What aid can the noble King of the Elks provide to Rif and his companions?",
- "The Realm of the Forest King",
- "elkenter.bbm"
- },
-
- {
- 3,
- "The King holds Rif's sweetheart hostage. Will the Boar provide any "
- "assistance to Rif?",
- "The Great Hall of the Boar King",
- "boarhall.bbm"
- }
-};
-
// Script function #16 (0x10)
void Script::sfScriptGotoScene(SCRIPTFUNC_PARAMS) {
int16 sceneNumber;
@@ -610,16 +557,6 @@
_vm->_interface->setMode(kPanelMain);
}
- // 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) {
- debug(0, "Scene %d substitute exists", sceneNumber);
- }
- }
-
_vm->_scene->changeScene(sceneNumber, entrance, (sceneNumber == ITE_SCENE_ENDCREDIT1) ? kTransitionFade : kTransitionNoFade);
//TODO: placard stuff
More information about the Scummvm-git-logs
mailing list