aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/tony/custom.cpp16
-rw-r--r--engines/tony/globals.cpp1
-rw-r--r--engines/tony/globals.h1
3 files changed, 0 insertions, 18 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index a6381e0937..03c6405d2e 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -275,7 +275,6 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
_ctx->curOffset = _ctx->curVoc->offset;
// First time allocation
- g_system->lockMutex(GLOBALS.vdb);
_vm->_vdbFP.seek(_ctx->curOffset);
_vm->_theSound.CreateSfx(&_ctx->voice);
@@ -283,7 +282,6 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
_ctx->curOffset = _vm->_vdbFP.pos();
_ctx->voice->SetLoop(false);
- g_system->unlockMutex(GLOBALS.vdb);
}
if (GLOBALS.nTonyNextTalkType != GLOBALS.Tony->TALK_NORMAL) {
@@ -335,7 +333,6 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
_ctx->voice->Play();
_ctx->text.SetCustomSkipHandle2(_ctx->voice->hEndOfBuffer);
} else {
- g_system->lockMutex(GLOBALS.vdb);
_vm->_vdbFP.seek(_ctx->curOffset);
_vm->_theSound.CreateSfx(&_ctx->voice);
_ctx->voice->LoadVoiceFromVDB(_vm->_vdbFP);
@@ -344,7 +341,6 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
_ctx->voice->SetLoop(false);
_ctx->voice->Play();
_ctx->text.SetCustomSkipHandle2(_ctx->voice->hEndOfBuffer);
- g_system->unlockMutex(GLOBALS.vdb);
}
}
@@ -1486,10 +1482,8 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
_ctx->voice = NULL;
if (_ctx->curVoc) {
// Position within the database of entries, beginning at the first
- g_system->lockMutex(GLOBALS.vdb);
_vm->_vdbFP.seek(_ctx->curVoc->offset);
_ctx->curOffset = _ctx->curVoc->offset;
- g_system->unlockMutex(GLOBALS.vdb);
}
for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
@@ -1527,7 +1521,6 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
GLOBALS.LinkGraphicTask(_ctx->text);
if (_ctx->curVoc) {
- g_system->lockMutex(GLOBALS.vdb);
_vm->_theSound.CreateSfx(&_ctx->voice);
_vm->_vdbFP.seek(_ctx->curOffset);
_ctx->voice->LoadVoiceFromVDB(_vm->_vdbFP);
@@ -1536,7 +1529,6 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
_ctx->voice->Play();
_ctx->text->SetCustomSkipHandle2(_ctx->voice->hEndOfBuffer);
_ctx->curOffset = _vm->_vdbFP.pos();
- g_system->unlockMutex(GLOBALS.vdb);
}
// Wait for the end of display
@@ -1701,11 +1693,9 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
_ctx->voice = NULL;
if (_ctx->curVoc) {
// Position within the database of entries, beginning at the first
- g_system->lockMutex(GLOBALS.vdb);
// fseek(_vm->m_vdbFP, curVoc->offset, SEEK_SET);
_vm->_vdbFP.seek(_ctx->curVoc->offset);
_ctx->curOffset = _ctx->curVoc->offset;
- g_system->unlockMutex(GLOBALS.vdb);
}
for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
@@ -1744,7 +1734,6 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
GLOBALS.LinkGraphicTask(_ctx->text);
if (_ctx->curVoc) {
- g_system->lockMutex(GLOBALS.vdb);
_vm->_theSound.CreateSfx(&_ctx->voice);
_vm->_vdbFP.seek(_ctx->curOffset);
_ctx->voice->LoadVoiceFromVDB(_vm->_vdbFP);
@@ -1753,7 +1742,6 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
_ctx->voice->Play();
_ctx->text->SetCustomSkipHandle2(_ctx->voice->hEndOfBuffer);
_ctx->curOffset = _vm->_vdbFP.pos();
- g_system->unlockMutex(GLOBALS.vdb);
}
// Wait for the end of display
@@ -1818,13 +1806,11 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg
if (_ctx->curVoc) {
// Position within the database of entries, beginning at the first
- g_system->lockMutex(GLOBALS.vdb);
_vm->_vdbFP.seek(_ctx->curVoc->offset);
_vm->_theSound.CreateSfx(&_ctx->voice);
_ctx->voice->LoadVoiceFromVDB(_vm->_vdbFP);
_ctx->voice->SetLoop(false);
if (_ctx->bIsBack) _ctx->voice->SetVolume(55);
- g_system->unlockMutex(GLOBALS.vdb);
}
_ctx->string = mpalQueryDialogPeriod(nMsg);
@@ -2559,8 +2545,6 @@ void SetupGlobalVars(RMTony *tony, RMPointer *ptr, RMGameBoxes *box, RMLocation
GLOBALS.EnableGUI = MainEnableGUI;
GLOBALS.SetPalesati = MainSetPalesati;
- GLOBALS.vdb = g_system->createMutex();
-
GLOBALS.bAlwaysDisplay = false;
int i;
diff --git a/engines/tony/globals.cpp b/engines/tony/globals.cpp
index 7c801a787d..1a4467ef28 100644
--- a/engines/tony/globals.cpp
+++ b/engines/tony/globals.cpp
@@ -91,7 +91,6 @@ Globals::Globals() {
lastTappeto = 0;
Common::fill(&tappeti[0], &tappeti[200], 0);
SFM_nLoc = 0;
- vdb = NULL;
// MPAL global variables
mpalError = 0;
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index d2d47d392a..76a54e07c8 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -241,7 +241,6 @@ public:
RMPoint StartLocPos[256];
OSystem::MutexRef cs[10];
- OSystem::MutexRef vdb;
uint32 mut[10];
bool bSkipIdle;