mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
SHERLOCK: SS: Cleaned up handling of 3DO portrait playback
This commit is contained in:
parent
b573e0cf7a
commit
2696be83c0
@ -537,12 +537,13 @@ void ScalpelTalk::talkWait(const byte *&str) {
|
||||
}
|
||||
}
|
||||
|
||||
void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
|
||||
if (!IS_3DO) {
|
||||
// No 3DO? No movie!
|
||||
return;
|
||||
}
|
||||
void ScalpelTalk::switchSpeaker(int subIndex) {
|
||||
// If it's the 3DO, pass on to start the actor's conversation movie
|
||||
if (IS_3DO)
|
||||
talk3DOMovieTrigger(subIndex);
|
||||
}
|
||||
|
||||
void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
|
||||
// Find out a few things that we need
|
||||
int userSelector = _vm->_ui->_selector;
|
||||
int scriptSelector = _scriptSelect;
|
||||
|
@ -63,10 +63,11 @@ protected:
|
||||
*/
|
||||
virtual void talkWait(const byte *&str);
|
||||
|
||||
|
||||
/**
|
||||
* Trigger to play a 3DO talk dialog movie
|
||||
* Called when the active speaker is switched
|
||||
*/
|
||||
virtual void talk3DOMovieTrigger(int subIndex);
|
||||
virtual void switchSpeaker(int subIndex);
|
||||
|
||||
/**
|
||||
* Show the talk display
|
||||
@ -91,6 +92,11 @@ public:
|
||||
* Prints a single conversation option in the interface window
|
||||
*/
|
||||
int talkLine(int lineNum, int stateNum, byte color, int lineY, bool slamIt);
|
||||
|
||||
/**
|
||||
* Trigger to play a 3DO talk dialog movie
|
||||
*/
|
||||
void talk3DOMovieTrigger(int subIndex);
|
||||
};
|
||||
|
||||
} // End of namespace Scalpel
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "sherlock/scalpel/scalpel_people.h"
|
||||
#include "sherlock/scalpel/scalpel_saveload.h"
|
||||
#include "sherlock/scalpel/scalpel_screen.h"
|
||||
#include "sherlock/scalpel/scalpel_talk.h"
|
||||
#include "sherlock/scalpel/settings.h"
|
||||
#include "sherlock/scalpel/scalpel.h"
|
||||
#include "sherlock/sherlock.h"
|
||||
@ -1483,7 +1484,7 @@ void ScalpelUserInterface::doTalkControl() {
|
||||
ScalpelPeople &people = *(ScalpelPeople *)_vm->_people;
|
||||
ScalpelScreen &screen = *(ScalpelScreen *)_vm->_screen;
|
||||
Sound &sound = *_vm->_sound;
|
||||
Talk &talk = *_vm->_talk;
|
||||
ScalpelTalk &talk = *(ScalpelTalk *)_vm->_talk;
|
||||
Common::Point mousePos = events.mousePos();
|
||||
|
||||
_key = _oldKey = -1;
|
||||
@ -1645,8 +1646,9 @@ void ScalpelUserInterface::doTalkControl() {
|
||||
sound._speechOn = false;
|
||||
}
|
||||
|
||||
// Trigger to play 3DO movie
|
||||
talk.talk3DOMovieTrigger(0);
|
||||
if (IS_3DO)
|
||||
// Trigger to play 3DO movie
|
||||
talk.talk3DOMovieTrigger(0);
|
||||
|
||||
talk.waitForMore(talk._statements[_selector]._statement.size());
|
||||
if (talk._talkToAbort)
|
||||
|
@ -823,7 +823,7 @@ void Talk::doScript(const Common::String &script) {
|
||||
}
|
||||
}
|
||||
|
||||
bool trigger3DOMovie = true;
|
||||
bool speakerSwitched = true;
|
||||
uint16 subIndex = 1;
|
||||
|
||||
do {
|
||||
@ -844,13 +844,13 @@ void Talk::doScript(const Common::String &script) {
|
||||
return;
|
||||
case RET_CONTINUE:
|
||||
continue;
|
||||
case OP_SWITCH_SPEAKER:
|
||||
trigger3DOMovie = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (c == _opcodes[OP_SWITCH_SPEAKER])
|
||||
speakerSwitched = true;
|
||||
|
||||
++str;
|
||||
} else {
|
||||
// Handle drawing the talk interface with the text
|
||||
@ -869,12 +869,10 @@ void Talk::doScript(const Common::String &script) {
|
||||
_openTalkWindow = false;
|
||||
}
|
||||
|
||||
if ((_wait) && (trigger3DOMovie)) {
|
||||
// Trigger to play 3DO movie
|
||||
talk3DOMovieTrigger(subIndex);
|
||||
|
||||
trigger3DOMovie = false; // wait for next switch speaker opcode
|
||||
subIndex++;
|
||||
if ((_wait) && (speakerSwitched)) {
|
||||
switchSpeaker(subIndex);
|
||||
speakerSwitched = false;
|
||||
++subIndex;
|
||||
}
|
||||
|
||||
if (_wait)
|
||||
|
@ -250,15 +250,15 @@ protected:
|
||||
*/
|
||||
virtual void talkWait(const byte *&str);
|
||||
|
||||
/**
|
||||
* Trigger to play a 3DO talk dialog movie
|
||||
*/
|
||||
virtual void talk3DOMovieTrigger(int subIndex) {};
|
||||
|
||||
/**
|
||||
* Show the talk display
|
||||
*/
|
||||
virtual void showTalk() = 0;
|
||||
|
||||
/**
|
||||
* Called when the active speaker is switched
|
||||
*/
|
||||
virtual void switchSpeaker(int subIndex) {}
|
||||
public:
|
||||
TalkSequence _talkSequenceStack[TALK_SEQUENCE_STACK_SIZE];
|
||||
Common::Array<Statement> _statements;
|
||||
|
Loading…
Reference in New Issue
Block a user