mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-08 10:51:11 +00:00
CHEWY: Play audio commentary in inventory - bug #13522
This commit is contained in:
parent
cdb198ade2
commit
faf42d0f84
@ -25,6 +25,7 @@
|
||||
#include "common/str.h"
|
||||
#include "common/str-array.h"
|
||||
#include "chewy/resource.h"
|
||||
#include "chewy/text.h"
|
||||
|
||||
namespace Chewy {
|
||||
|
||||
@ -274,6 +275,7 @@ public:
|
||||
|
||||
Common::StringArray getTextArray(uint dialogNum, uint entryNum, int type, int subEntry = -1);
|
||||
Common::String getTextEntry(uint dialogNum, uint entryNum, int type, int subEntry = -1);
|
||||
int16 getLastSpeechId() { return _text->getLastSpeechId(); }
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "chewy/main.h"
|
||||
#include "chewy/menus.h"
|
||||
#include "chewy/mouse.h"
|
||||
#include "chewy/sound.h"
|
||||
|
||||
namespace Chewy {
|
||||
namespace Dialogs {
|
||||
@ -383,6 +384,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
|
||||
bool endLoop = false;
|
||||
int16 startLine = 0;
|
||||
bool mouseFl = true;
|
||||
bool firstTime = true;
|
||||
|
||||
if (mode == INV_ATS_MODE) {
|
||||
itemName = _G(atds)->getTextEntry(invent_nr, TXT_MARK_NAME, INV_ATS_DATA);
|
||||
@ -409,6 +411,8 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
|
||||
endLoop = true;
|
||||
}
|
||||
|
||||
const int16 speechId = _G(atds)->getLastSpeechId();
|
||||
|
||||
while (!endLoop) {
|
||||
int16 rect = _G(in)->findHotspot(_G(inventoryHotspots));
|
||||
|
||||
@ -518,6 +522,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
|
||||
_G(scr_width), itemDesc[i].c_str());
|
||||
++k;
|
||||
}
|
||||
|
||||
if (g_engine->_sound->speechEnabled() && speechId >= 0 && firstTime) {
|
||||
g_engine->_sound->playSpeech(speechId, false);
|
||||
firstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
_G(cur)->plot_cur();
|
||||
|
Loading…
Reference in New Issue
Block a user