mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
CGE2: Reimplement checkSaySwitch().
This commit is contained in:
parent
848b2650e9
commit
49f68a8913
@ -92,6 +92,7 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
|
||||
_flag[i] = false;
|
||||
_sayCap = true;
|
||||
_sayVox = true;
|
||||
_oldSayVox = false;
|
||||
_req = 1;
|
||||
_midiNotify = nullptr;
|
||||
_spriteNotify = nullptr;
|
||||
@ -164,6 +165,7 @@ bool CGE2Engine::hasFeature(EngineFeature f) const {
|
||||
}
|
||||
|
||||
Common::Error CGE2Engine::run() {
|
||||
syncSoundSettings();
|
||||
initGraphics(kScrWidth, kScrHeight, false);
|
||||
|
||||
init();
|
||||
|
@ -280,6 +280,7 @@ public:
|
||||
bool _flag[4];
|
||||
bool _sayCap;
|
||||
bool _sayVox;
|
||||
bool _oldSayVox;
|
||||
int _req;
|
||||
NotifyFunctionType _midiNotify;
|
||||
NotifyFunctionType _spriteNotify;
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "sound.h"
|
||||
#include "common/config-manager.h"
|
||||
#include "cge2/cge2_main.h"
|
||||
#include "cge2/cge2.h"
|
||||
#include "cge2/vga13h.h"
|
||||
@ -540,6 +541,7 @@ void CGE2Engine::showBak(int ref) {
|
||||
|
||||
void CGE2Engine::mainLoop() {
|
||||
_sound->checkSoundHandle();
|
||||
checkSaySwitch();
|
||||
|
||||
_vga->show();
|
||||
_commandHandlerTurbo->runCommand();
|
||||
@ -766,7 +768,7 @@ void CGE2Engine::initToolbar() {
|
||||
if (!_music)
|
||||
_midiPlayer->killMidi();
|
||||
|
||||
checkSaySwitch();
|
||||
_commandHandlerTurbo->addCommand(kCmdSeq, 128, _sayCap, nullptr); // Sets the speech caption switch on.
|
||||
|
||||
_infoLine->gotoxyz(V3D(kInfoX, kInfoY, 0));
|
||||
_infoLine->setText(nullptr);
|
||||
@ -807,11 +809,24 @@ void CGE2Engine::releasePocket(Sprite *spr) {
|
||||
}
|
||||
|
||||
void CGE2Engine::checkSaySwitch() {
|
||||
warning("STUB: CGE2Engine::checkSaySwitch()");
|
||||
// if (SNDDrvInfo.DDEV == DEV_QUIET)
|
||||
// _sayVox = !(_sayCap = true);
|
||||
_commandHandlerTurbo->addCommand(kCmdSeq, 129, _sayVox, nullptr);
|
||||
_commandHandlerTurbo->addCommand(kCmdSeq, 128, _sayCap, nullptr);
|
||||
bool mute = false;
|
||||
if (ConfMan.hasKey("mute"))
|
||||
mute = ConfMan.getBool("mute");
|
||||
bool speechMute = mute;
|
||||
if (!speechMute)
|
||||
speechMute = ConfMan.getBool("speech_mute");
|
||||
|
||||
if (mute || speechMute) {
|
||||
_sayVox = false;
|
||||
_sayCap = true;
|
||||
}
|
||||
|
||||
if (_oldSayVox != _sayVox) {
|
||||
_commandHandlerTurbo->addCommand(kCmdSeq, 129, _sayVox, nullptr);
|
||||
_commandHandlerTurbo->addCommand(kCmdSeq, 128, _sayCap, nullptr);
|
||||
}
|
||||
|
||||
_oldSayVox = _sayVox;
|
||||
}
|
||||
|
||||
void CGE2Engine::loadTab() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user