mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 16:33:50 +00:00
NANCY: Pick correct responses in primary video
Fixed an issue where the incorrect player dialogue would be chosen when one or more of the other responses are hidden.
This commit is contained in:
parent
fb7a903080
commit
415406bbcc
@ -300,6 +300,7 @@ void PlayPrimaryVideoChan0::execute() {
|
||||
|
||||
if (res.conditionFlags.isSatisfied()) {
|
||||
NancySceneState.getTextbox().addTextLine(res.text);
|
||||
res.isOnScreen = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -314,7 +315,19 @@ void PlayPrimaryVideoChan0::execute() {
|
||||
// NPC has finished talking, we have responses
|
||||
for (uint i = 0; i < 30; ++i) {
|
||||
if (NancySceneState.getLogicCondition(i, kLogUsed)) {
|
||||
_pickedResponse = i;
|
||||
int pickedOnScreenResponse = _pickedResponse = i;
|
||||
|
||||
// Adjust to account for hidden responses
|
||||
for (uint j = 0; j < _responses.size(); ++j) {
|
||||
if (!_responses[j].isOnScreen) {
|
||||
++_pickedResponse;
|
||||
}
|
||||
|
||||
if ((int)j == pickedOnScreenResponse) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -350,7 +363,7 @@ void PlayPrimaryVideoChan0::execute() {
|
||||
g_nancy->_sound->stopSound(_responseGenericSound);
|
||||
|
||||
if (_pickedResponse != -1) {
|
||||
NancySceneState.changeScene(_responses[_pickedResponse].sceneChange);
|
||||
NancySceneState.changeScene(_responses[_pickedResponse].sceneChange);
|
||||
} else {
|
||||
// Evaluate scene branch structs here
|
||||
|
||||
|
@ -59,6 +59,8 @@ struct ResponseStruct {
|
||||
Common::String soundName; // 0x196
|
||||
SceneChangeDescription sceneChange; // 0x1A0
|
||||
FlagDescription flagDesc; // 0x1A8
|
||||
|
||||
bool isOnScreen = false;
|
||||
};
|
||||
|
||||
struct FlagsStruct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user