Slight cleanup
svn-id: r35523
This commit is contained in:
parent
41ebd732f5
commit
c2c439b53d
3 changed files with 17 additions and 20 deletions
|
@ -654,7 +654,7 @@ bool Interface::processAscii(Common::KeyState keystate) {
|
|||
switch (ascii) {
|
||||
case 'x':
|
||||
setMode(kPanelMain);
|
||||
if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive())
|
||||
if (_vm->_scene->isITEPuzzleScene())
|
||||
_vm->_puzzle->exitPuzzle();
|
||||
break;
|
||||
|
||||
|
@ -670,15 +670,12 @@ bool Interface::processAscii(Common::KeyState keystate) {
|
|||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
converseSetPos(ascii);
|
||||
break;
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (_vm->getGameId() == GID_IHNM)
|
||||
converseSetPos(ascii);
|
||||
converseSetPos(ascii);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -736,14 +733,12 @@ bool Interface::processAscii(Common::KeyState keystate) {
|
|||
}
|
||||
|
||||
void Interface::setStatusText(const char *text, int statusColor) {
|
||||
|
||||
// Disable the status text in IHNM when the chapter is 8
|
||||
if (_vm->getGameId() == GID_IHNM && !(_vm->getFeatures() & GF_IHNM_DEMO) && _vm->_scene->currentChapterNumber() == 8)
|
||||
return;
|
||||
|
||||
// Disable the status text in the introduction of the IHNM demo
|
||||
if (_vm->getFeatures() & GF_IHNM_DEMO && _vm->_scene->currentSceneNumber() == 0)
|
||||
return;
|
||||
if (_vm->getGameId() == GID_IHNM) {
|
||||
// Don't show the status text for the IHNM chapter selection screens (chapter 8), or
|
||||
// scene 0 (IHNM demo introduction)
|
||||
if (_vm->_scene->currentChapterNumber() == 8 || _vm->_scene->currentSceneNumber() == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
assert(text != NULL);
|
||||
assert(strlen(text) < STATUS_TEXT_LEN);
|
||||
|
@ -1743,7 +1738,7 @@ void Interface::update(const Point& mousePoint, int updateFlag) {
|
|||
converseChangePos(1);
|
||||
}
|
||||
|
||||
if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive()) {
|
||||
if (_vm->_scene->isITEPuzzleScene()) {
|
||||
_vm->_puzzle->handleClick(mousePoint);
|
||||
}
|
||||
}
|
||||
|
@ -2624,7 +2619,7 @@ void Interface::converseSetPos(int key) {
|
|||
|
||||
_vm->_script->finishDialog(ct->strId, ct->replyId, ct->replyFlags, ct->replyBit);
|
||||
|
||||
if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive())
|
||||
if (_vm->_scene->isITEPuzzleScene())
|
||||
_vm->_puzzle->handleReply(ct->replyId);
|
||||
|
||||
_conversePos = -1;
|
||||
|
|
|
@ -104,7 +104,7 @@ void Render::drawScene() {
|
|||
if (!(_flags & RF_DISABLE_ACTORS) || _vm->getGameId() == GID_ITE)
|
||||
_vm->_scene->draw();
|
||||
|
||||
if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive()) {
|
||||
if (_vm->_scene->isITEPuzzleScene()) {
|
||||
_vm->_puzzle->movePiece(mousePoint);
|
||||
_vm->_actor->drawSpeech();
|
||||
} else {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "saga/list.h"
|
||||
#include "saga/actor.h"
|
||||
#include "saga/interface.h"
|
||||
#include "saga/puzzle.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
|
@ -348,10 +349,7 @@ class Scene {
|
|||
void setChapterPointsChanged(bool cp) { _chapterPointsChanged = cp; }
|
||||
|
||||
void cutawaySkip() {
|
||||
if (_vm->_scene->isInIntro())
|
||||
_vm->_framesEsc = 2;
|
||||
else
|
||||
_vm->_framesEsc = 1;
|
||||
_vm->_framesEsc = _vm->_scene->isInIntro() ? 2 : 1;
|
||||
}
|
||||
|
||||
void drawTextList();
|
||||
|
@ -372,6 +370,10 @@ class Scene {
|
|||
return _vm->getFeatures() & GF_IHNM_DEMO && (_sceneNumber >= 144 && _sceneNumber <= 149);
|
||||
}
|
||||
|
||||
bool isITEPuzzleScene() {
|
||||
return _vm->getGameId() == GID_ITE && _vm->_puzzle->isActive();
|
||||
}
|
||||
|
||||
private:
|
||||
void loadScene(LoadSceneParams *loadSceneParams);
|
||||
void loadSceneDescriptor(uint32 resourceId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue