mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
The help screen in the IHNM demo is shown correctly now
svn-id: r28406
This commit is contained in:
parent
af16be07a1
commit
3e9c4be280
@ -694,14 +694,18 @@ bool Interface::processAscii(uint16 ascii) {
|
||||
} else {
|
||||
// In the IHNM demo, this panel mode is set by the scripts
|
||||
// to flip through the pages of the help system
|
||||
// Any keypress here returns the user back to the game
|
||||
_vm->_scene->clearPsychicProfile();
|
||||
}
|
||||
break;
|
||||
case kPanelPlacard:
|
||||
if (_vm->getGameType() == GType_IHNM) {
|
||||
// Any keypress here returns the user back to the game
|
||||
_vm->_scene->clearPsychicProfile();
|
||||
if (_vm->getGameId() != GID_IHNM_DEMO) {
|
||||
_vm->_scene->clearPsychicProfile();
|
||||
} else {
|
||||
setMode(kPanelConverse);
|
||||
_vm->_scene->_textList.clear();
|
||||
_vm->_script->wakeUpThreads(kWaitTypeDelay);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1770,8 +1774,15 @@ void Interface::update(const Point& mousePoint, int updateFlag) {
|
||||
case kPanelPlacard:
|
||||
if (_vm->getGameType() == GType_IHNM) {
|
||||
// Any mouse click here returns the user back to the game
|
||||
if (updateFlag & UPDATE_MOUSECLICK)
|
||||
_vm->_scene->clearPsychicProfile();
|
||||
if (updateFlag & UPDATE_MOUSECLICK) {
|
||||
if (_vm->getGameId() != GID_IHNM_DEMO) {
|
||||
_vm->_scene->clearPsychicProfile();
|
||||
} else {
|
||||
setMode(kPanelConverse);
|
||||
_vm->_scene->_textList.clear();
|
||||
_vm->_script->wakeUpThreads(kWaitTypeDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1411,6 +1411,8 @@ void Scene::showPsychicProfile(const char *text) {
|
||||
|
||||
q_event = _vm->_events->chain(q_event, &event);
|
||||
|
||||
_vm->_scene->_textList.clear();
|
||||
|
||||
if (text != NULL) {
|
||||
textHeight = _vm->_font->getHeight(kKnownFontVerb, text, 226, kFontCentered);
|
||||
|
||||
@ -1424,7 +1426,6 @@ void Scene::showPsychicProfile(const char *text) {
|
||||
textEntry.flags = (FontEffectFlags)(kFontCentered);
|
||||
textEntry.text = text;
|
||||
|
||||
_vm->_scene->_textList.clear();
|
||||
TextListEntry *_psychicProfileTextEntry = _vm->_scene->_textList.addEntry(textEntry);
|
||||
|
||||
event.type = kEvTOneshot;
|
||||
@ -1455,8 +1456,9 @@ void Scene::showPsychicProfile(const char *text) {
|
||||
}
|
||||
|
||||
void Scene::clearPsychicProfile() {
|
||||
if (_vm->_interface->getMode() == kPanelPlacard) {
|
||||
if (_vm->_interface->getMode() == kPanelPlacard || _vm->getGameId() == GID_IHNM_DEMO) {
|
||||
_vm->_scene->clearPlacard();
|
||||
_vm->_scene->_textList.clear();
|
||||
_vm->_actor->showActors(false);
|
||||
_vm->_gfx->restorePalette();
|
||||
_vm->_scene->restoreScene();
|
||||
|
@ -592,9 +592,9 @@ private:
|
||||
void sfScriptStartVideo(SCRIPTFUNC_PARAMS);
|
||||
void sfScriptReturnFromVideo(SCRIPTFUNC_PARAMS);
|
||||
void sfScriptEndVideo(SCRIPTFUNC_PARAMS);
|
||||
void sfShowIHNMDemoHelp(SCRIPTFUNC_PARAMS);
|
||||
void sfShowIHNMDemoHelpText(SCRIPTFUNC_PARAMS);
|
||||
void sfClearIHNMDemoHelpText(SCRIPTFUNC_PARAMS);
|
||||
void sfShowIHNMDemoHelpBg(SCRIPTFUNC_PARAMS);
|
||||
void sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS);
|
||||
void sfShowIHNMDemoHelpPage(SCRIPTFUNC_PARAMS);
|
||||
void sfGetPoints(SCRIPTFUNC_PARAMS);
|
||||
void sfSetGlobalFlag(SCRIPTFUNC_PARAMS);
|
||||
void sf92(SCRIPTFUNC_PARAMS);
|
||||
|
@ -225,9 +225,9 @@ static const ScriptFunctionDescription IHNMscriptFunctionsList[IHNM_SCRIPT_FUNCT
|
||||
OPCODE(sfScriptReturnFromVideo),
|
||||
OPCODE(sfScriptEndVideo),
|
||||
OPCODE(sfSetActorZ),
|
||||
OPCODE(sfShowIHNMDemoHelp),
|
||||
OPCODE(sfShowIHNMDemoHelpText),
|
||||
OPCODE(sfClearIHNMDemoHelpText),
|
||||
OPCODE(sfShowIHNMDemoHelpBg),
|
||||
OPCODE(sfAddIHNMDemoHelpTextLine),
|
||||
OPCODE(sfShowIHNMDemoHelpPage),
|
||||
OPCODE(sfVstopFX),
|
||||
OPCODE(sfVstopLoopedFX),
|
||||
OPCODE(sf92), // only used in the demo version of IHNM
|
||||
@ -1998,14 +1998,12 @@ void Script::sfScriptEndVideo(SCRIPTFUNC_PARAMS) {
|
||||
_vm->_anim->endVideo();
|
||||
}
|
||||
|
||||
void Script::sfShowIHNMDemoHelp(SCRIPTFUNC_PARAMS) {
|
||||
thread->wait(kWaitTypePlacard);
|
||||
|
||||
void Script::sfShowIHNMDemoHelpBg(SCRIPTFUNC_PARAMS) {
|
||||
_ihnmDemoCurrentY = 0;
|
||||
_vm->_scene->showPsychicProfile(NULL);
|
||||
}
|
||||
|
||||
void Script::sfShowIHNMDemoHelpText(SCRIPTFUNC_PARAMS) {
|
||||
void Script::sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS) {
|
||||
int stringId, textHeight;
|
||||
TextListEntry textEntry;
|
||||
Event event;
|
||||
@ -2039,17 +2037,11 @@ void Script::sfShowIHNMDemoHelpText(SCRIPTFUNC_PARAMS) {
|
||||
_ihnmDemoCurrentY += 10;
|
||||
}
|
||||
|
||||
void Script::sfClearIHNMDemoHelpText(SCRIPTFUNC_PARAMS) {
|
||||
thread->wait(kWaitTypePlacard);
|
||||
|
||||
warning("TODO: sfClearIHNMDemoHelpText");
|
||||
|
||||
// This is called a while after the psychic profile is
|
||||
// opened in the IHNM demo, to flip through the help system pages
|
||||
_vm->_scene->clearPlacard();
|
||||
// FIXME: The demo uses mode 8 when changing pages
|
||||
//_vm->_interface->setMode(8);
|
||||
_vm->_interface->setMode(7);
|
||||
void Script::sfShowIHNMDemoHelpPage(SCRIPTFUNC_PARAMS) {
|
||||
// Note: The IHNM demo changes panel mode to 8 (kPanelProtect in ITE)
|
||||
// when changing pages
|
||||
_vm->_interface->setMode(kPanelConverse);
|
||||
_vm->_interface->setMode(kPanelPlacard);
|
||||
_ihnmDemoCurrentY = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user