diff options
author | Strangerke | 2012-06-08 08:44:14 +0200 |
---|---|---|
committer | Strangerke | 2012-06-08 08:44:14 +0200 |
commit | 1866cbd0fb0d7df1c1a4059e98b5d0f6d851c2d4 (patch) | |
tree | 0c6321f6ec55a4773a034ec4f438b2b65529e345 | |
parent | cd15e483ed64274049142a2e6838962d794c3ff5 (diff) | |
download | scummvm-rg350-1866cbd0fb0d7df1c1a4059e98b5d0f6d851c2d4.tar.gz scummvm-rg350-1866cbd0fb0d7df1c1a4059e98b5d0f6d851c2d4.tar.bz2 scummvm-rg350-1866cbd0fb0d7df1c1a4059e98b5d0f6d851c2d4.zip |
TONY: start renaming globals
-rw-r--r-- | engines/tony/custom.cpp | 304 | ||||
-rw-r--r-- | engines/tony/globals.cpp | 28 | ||||
-rw-r--r-- | engines/tony/globals.h | 186 | ||||
-rw-r--r-- | engines/tony/mpal/mpalutils.cpp | 4 | ||||
-rw-r--r-- | engines/tony/mpal/mpalutils.h | 2 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 4 |
6 files changed, 264 insertions, 264 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index a50807822c..810e6a9353 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -108,24 +108,24 @@ const char *staccFileNames[] = { void ReapplyChangedHotspot(void) { int i; - for (i = 0; i < GLOBALS.curChangedHotspot; i++) - GLOBALS.Loc->getItemFromCode(GLOBALS.ChangedHotspot[i].dwCode)->changeHotspot(RMPoint(GLOBALS.ChangedHotspot[i].nX, GLOBALS.ChangedHotspot[i].nY)); + for (i = 0; i < GLOBALS._curChangedHotspot; i++) + GLOBALS.Loc->getItemFromCode(GLOBALS._changedHotspot[i]._dwCode)->changeHotspot(RMPoint(GLOBALS._changedHotspot[i]._nX, GLOBALS._changedHotspot[i]._nY)); } void SaveChangedHotspot(Common::OutSaveFile *f) { - f->writeByte(GLOBALS.curChangedHotspot); - if (GLOBALS.curChangedHotspot > 0) { - for (int i = 0; i < GLOBALS.curChangedHotspot; ++i) - GLOBALS.ChangedHotspot[i].Save(f); + f->writeByte(GLOBALS._curChangedHotspot); + if (GLOBALS._curChangedHotspot > 0) { + for (int i = 0; i < GLOBALS._curChangedHotspot; ++i) + GLOBALS._changedHotspot[i].save(f); } } void LoadChangedHotspot(Common::InSaveFile *f) { - GLOBALS.curChangedHotspot = f->readByte(); + GLOBALS._curChangedHotspot = f->readByte(); - if (GLOBALS.curChangedHotspot > 0) { - for (int i = 0; i < GLOBALS.curChangedHotspot; ++i) - GLOBALS.ChangedHotspot[i].Load(f); + if (GLOBALS._curChangedHotspot > 0) { + for (int i = 0; i < GLOBALS._curChangedHotspot; ++i) + GLOBALS._changedHotspot[i].load(f); } } @@ -141,29 +141,29 @@ void LoadChangedHotspot(Common::InSaveFile *f) { */ void MCharResetCodes(void) { for (int i = 0; i < 10; i++) - GLOBALS.MCharacter[i].item = GLOBALS.Loc->getItemFromCode(GLOBALS.MCharacter[i].code); + GLOBALS._mCharacter[i]._item = GLOBALS.Loc->getItemFromCode(GLOBALS._mCharacter[i]._code); for (int i = 0; i < 10; i++) - GLOBALS.Character[i].item = GLOBALS.Loc->getItemFromCode(GLOBALS.Character[i].code); + GLOBALS._character[i]._item = GLOBALS.Loc->getItemFromCode(GLOBALS._character[i]._code); } void CharsSaveAll(Common::OutSaveFile *f) { for (int i = 0; i < 10; i++) { - f->writeByte(GLOBALS.IsMChar[i]); - if (GLOBALS.IsMChar[i]) { - GLOBALS.MCharacter[i].Save(f); + f->writeByte(GLOBALS._isMChar[i]); + if (GLOBALS._isMChar[i]) { + GLOBALS._mCharacter[i].save(f); } else { - GLOBALS.Character[i].Save(f); + GLOBALS._character[i].save(f); } } } void CharsLoadAll(Common::InSaveFile *f) { for (int i = 0; i < 10; i++) { - GLOBALS.IsMChar[i] = f->readByte(); - if (GLOBALS.IsMChar[i]) - GLOBALS.MCharacter[i].Load(f); + GLOBALS._isMChar[i] = f->readByte(); + if (GLOBALS._isMChar[i]) + GLOBALS._mCharacter[i].load(f); else - GLOBALS.Character[i].Load(f); + GLOBALS._character[i].load(f); } } @@ -202,7 +202,7 @@ DECLARE_CUSTOM_FUNCTION(MySleep)(CORO_PARAM, uint32 dwTime, uint32, uint32, uint } DECLARE_CUSTOM_FUNCTION(SetAlwaysDisplay)(CORO_PARAM, uint32 val, uint32, uint32, uint32) { - GLOBALS.bAlwaysDisplay = (val != 0); + GLOBALS._bAlwaysDisplay = (val != 0); } @@ -296,10 +296,10 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.Tony->TALK_NORMAL); } - if (GLOBALS.curBackText) - CORO_INVOKE_0(GLOBALS.curBackText->hide); + if (GLOBALS._curBackText) + CORO_INVOKE_0(GLOBALS._curBackText->hide); - GLOBALS.bTonyIsSpeaking = true; + GLOBALS._bTonyIsSpeaking = true; for (_ctx->i = 0; _ctx->i < _ctx->msg.numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) { _ctx->text.setInput(GLOBALS.Input); @@ -320,7 +320,7 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX _ctx->text.setPosition(RMPoint(nX, nY) - GLOBALS.Loc->scrollPosition()); // Handling for always display - if (GLOBALS.bAlwaysDisplay) { + if (GLOBALS._bAlwaysDisplay) { _ctx->text.setAlwaysDisplay(); _ctx->text.forceTime(); } @@ -355,9 +355,9 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX } } - GLOBALS.bTonyIsSpeaking = false; - if (GLOBALS.curBackText) - GLOBALS.curBackText->show(); + GLOBALS._bTonyIsSpeaking = false; + if (GLOBALS._curBackText) + GLOBALS._curBackText->show(); CORO_INVOKE_0(GLOBALS.Tony->endTalk); @@ -378,7 +378,7 @@ DECLARE_CUSTOM_FUNCTION(CustLoadLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, ui GLOBALS.Freeze(); - GLOBALS.curChangedHotspot = 0; + GLOBALS._curChangedHotspot = 0; if (bUseStartPos != 0) GLOBALS.LoadLocation(nLoc, RMPoint(tX, tY), GLOBALS.StartLocPos[nLoc]); else @@ -538,7 +538,7 @@ DECLARE_CUSTOM_FUNCTION(ChangeLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, uint // On exit, unfreeze CORO_INVOKE_2(GLOBALS.UnloadLocation, true, NULL); - GLOBALS.curChangedHotspot = 0; + GLOBALS._curChangedHotspot = 0; if (bUseStartPos != 0) GLOBALS.LoadLocation(nLoc, RMPoint(tX, tY), GLOBALS.StartLocPos[nLoc]); else @@ -578,8 +578,8 @@ DECLARE_CUSTOM_FUNCTION(SetLocStartPosition)(CORO_PARAM, uint32 nLoc, uint32 lX, } DECLARE_CUSTOM_FUNCTION(SaveTonyPosition)(CORO_PARAM, uint32, uint32, uint32, uint32) { - GLOBALS.saveTonyPos = GLOBALS.Tony->position(); - GLOBALS.saveTonyLoc = GLOBALS.Loc->TEMPGetNumLoc(); + GLOBALS._saveTonyPos = GLOBALS.Tony->position(); + GLOBALS._saveTonyLoc = GLOBALS.Loc->TEMPGetNumLoc(); } DECLARE_CUSTOM_FUNCTION(RestoreTonyPosition)(CORO_PARAM, uint32, uint32, uint32, uint32) { @@ -588,7 +588,7 @@ DECLARE_CUSTOM_FUNCTION(RestoreTonyPosition)(CORO_PARAM, uint32, uint32, uint32, CORO_BEGIN_CODE(_ctx); - CORO_INVOKE_4(ChangeLocation, GLOBALS.saveTonyLoc, GLOBALS.saveTonyPos.x, GLOBALS.saveTonyPos.y, 0); + CORO_INVOKE_4(ChangeLocation, GLOBALS._saveTonyLoc, GLOBALS._saveTonyPos.x, GLOBALS._saveTonyPos.y, 0); MCharResetCodes(); @@ -1340,18 +1340,18 @@ DECLARE_CUSTOM_FUNCTION(SyncScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, ui DECLARE_CUSTOM_FUNCTION(ChangeHotspot)(CORO_PARAM, uint32 dwCode, uint32 nX, uint32 nY, uint32) { int i; - for (i = 0; i < GLOBALS.curChangedHotspot; i++) - if (GLOBALS.ChangedHotspot[i].dwCode == dwCode) { - GLOBALS.ChangedHotspot[i].nX = nX; - GLOBALS.ChangedHotspot[i].nY = nY; + for (i = 0; i < GLOBALS._curChangedHotspot; i++) + if (GLOBALS._changedHotspot[i]._dwCode == dwCode) { + GLOBALS._changedHotspot[i]._nX = nX; + GLOBALS._changedHotspot[i]._nY = nY; break; } - if (i == GLOBALS.curChangedHotspot) { - GLOBALS.ChangedHotspot[i].dwCode = dwCode; - GLOBALS.ChangedHotspot[i].nX = nX; - GLOBALS.ChangedHotspot[i].nY = nY; - GLOBALS.curChangedHotspot++; + if (i == GLOBALS._curChangedHotspot) { + GLOBALS._changedHotspot[i]._dwCode = dwCode; + GLOBALS._changedHotspot[i]._nX = nX; + GLOBALS._changedHotspot[i]._nY = nY; + GLOBALS._curChangedHotspot++; } GLOBALS.Loc->getItemFromCode(dwCode)->changeHotspot(RMPoint(nX, nY)); @@ -1412,36 +1412,36 @@ DECLARE_CUSTOM_FUNCTION(TremaSchermo)(CORO_PARAM, uint32 nScosse, uint32, uint32 DECLARE_CUSTOM_FUNCTION(CharSetCode)(CORO_PARAM, uint32 nChar, uint32 nCode, uint32, uint32) { assert(nChar < 16); - GLOBALS.Character[nChar].code = nCode; - GLOBALS.Character[nChar].item = GLOBALS.Loc->getItemFromCode(nCode); - GLOBALS.Character[nChar].r = 255; - GLOBALS.Character[nChar].g = 255; - GLOBALS.Character[nChar].b = 255; - GLOBALS.Character[nChar].talkpattern = 0; - GLOBALS.Character[nChar].starttalkpattern = 0; - GLOBALS.Character[nChar].endtalkpattern = 0; - GLOBALS.Character[nChar].standpattern = 0; + GLOBALS._character[nChar]._code = nCode; + GLOBALS._character[nChar]._item = GLOBALS.Loc->getItemFromCode(nCode); + GLOBALS._character[nChar]._r = 255; + GLOBALS._character[nChar]._g = 255; + GLOBALS._character[nChar]._b = 255; + GLOBALS._character[nChar]._talkPattern = 0; + GLOBALS._character[nChar]._startTalkPattern = 0; + GLOBALS._character[nChar]._endTalkPattern = 0; + GLOBALS._character[nChar]._standPattern = 0; - GLOBALS.IsMChar[nChar] = false; + GLOBALS._isMChar[nChar] = false; } DECLARE_CUSTOM_FUNCTION(CharSetColor)(CORO_PARAM, uint32 nChar, uint32 r, uint32 g, uint32 b) { assert(nChar < 16); - GLOBALS.Character[nChar].r = r; - GLOBALS.Character[nChar].g = g; - GLOBALS.Character[nChar].b = b; + GLOBALS._character[nChar]._r = r; + GLOBALS._character[nChar]._g = g; + GLOBALS._character[nChar]._b = b; } DECLARE_CUSTOM_FUNCTION(CharSetTalkPattern)(CORO_PARAM, uint32 nChar, uint32 tp, uint32 sp, uint32) { assert(nChar < 16); - GLOBALS.Character[nChar].talkpattern = tp; - GLOBALS.Character[nChar].standpattern = sp; + GLOBALS._character[nChar]._talkPattern = tp; + GLOBALS._character[nChar]._standPattern = sp; } DECLARE_CUSTOM_FUNCTION(CharSetStartEndTalkPattern)(CORO_PARAM, uint32 nChar, uint32 sp, uint32 ep, uint32) { assert(nChar < 16); - GLOBALS.Character[nChar].starttalkpattern = sp; - GLOBALS.Character[nChar].endtalkpattern = ep; + GLOBALS._character[nChar]._startTalkPattern = sp; + GLOBALS._character[nChar]._endTalkPattern = ep; } DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMessage, uint32 bIsBack, uint32) { @@ -1461,18 +1461,18 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess _ctx->curOffset = 0; assert(nChar < 16); - _ctx->pt = GLOBALS.Character[nChar].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); + _ctx->pt = GLOBALS._character[nChar]._item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); - if (GLOBALS.Character[nChar].starttalkpattern != 0) { + if (GLOBALS._character[nChar]._startTalkPattern != 0) { GLOBALS.Freeze(); - GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].starttalkpattern); + GLOBALS._character[nChar]._item->setPattern(GLOBALS._character[nChar]._startTalkPattern); GLOBALS.Unfreeze(); - CORO_INVOKE_0(GLOBALS.Character[nChar].item->waitForEndPattern); + CORO_INVOKE_0(GLOBALS._character[nChar]._item->waitForEndPattern); } GLOBALS.Freeze(); - GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].talkpattern); + GLOBALS._character[nChar]._item->setPattern(GLOBALS._character[nChar]._talkPattern); GLOBALS.Unfreeze(); _ctx->curVoc = SearchVoiceHeader(0, dwMessage); @@ -1485,9 +1485,9 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess for (_ctx->i = 0; _ctx->i < _ctx->msg->numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) { if (bIsBack) { - GLOBALS.curBackText = _ctx->text = new RMTextDialogScrolling(GLOBALS.Loc); - if (GLOBALS.bTonyIsSpeaking) - CORO_INVOKE_0(GLOBALS.curBackText->hide); + GLOBALS._curBackText = _ctx->text = new RMTextDialogScrolling(GLOBALS.Loc); + if (GLOBALS._bTonyIsSpeaking) + CORO_INVOKE_0(GLOBALS._curBackText->hide); } else _ctx->text = new RMTextDialog; @@ -1500,7 +1500,7 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess _ctx->text->setAlignType(RMText::HCENTER, RMText::VBOTTOM); // Colour - _ctx->text->setColor(GLOBALS.Character[nChar].r, GLOBALS.Character[nChar].g, GLOBALS.Character[nChar].b); + _ctx->text->setColor(GLOBALS._character[nChar]._r, GLOBALS._character[nChar]._g, GLOBALS._character[nChar]._b); // Write the text _ctx->text->writeText((*_ctx->msg)[_ctx->i], 0); @@ -1509,7 +1509,7 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess _ctx->text->setPosition(_ctx->pt); // Set the always display - if (GLOBALS.bAlwaysDisplay) { + if (GLOBALS._bAlwaysDisplay) { _ctx->text->setAlwaysDisplay(); _ctx->text->forceTime(); } @@ -1539,19 +1539,19 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess } - GLOBALS.curBackText = NULL; + GLOBALS._curBackText = NULL; delete _ctx->text; } - if (GLOBALS.Character[nChar].endtalkpattern != 0) { + if (GLOBALS._character[nChar]._endTalkPattern != 0) { GLOBALS.Freeze(); - GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].endtalkpattern); + GLOBALS._character[nChar]._item->setPattern(GLOBALS._character[nChar]._endTalkPattern); GLOBALS.Unfreeze(); - CORO_INVOKE_0(GLOBALS.Character[nChar].item->waitForEndPattern); + CORO_INVOKE_0(GLOBALS._character[nChar]._item->waitForEndPattern); } GLOBALS.Freeze(); - GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].standpattern); + GLOBALS._character[nChar]._item->setPattern(GLOBALS._character[nChar]._standPattern); GLOBALS.Unfreeze(); delete _ctx->msg; @@ -1577,43 +1577,43 @@ DECLARE_CUSTOM_FUNCTION(ChangeInventoryStatus)(CORO_PARAM, uint32 dwCode, uint32 DECLARE_CUSTOM_FUNCTION(MCharSetCode)(CORO_PARAM, uint32 nChar, uint32 nCode, uint32, uint32) { assert(nChar < 10); - GLOBALS.MCharacter[nChar].code = nCode; + GLOBALS._mCharacter[nChar]._code = nCode; if (nCode == 0) - GLOBALS.MCharacter[nChar].item = NULL; + GLOBALS._mCharacter[nChar]._item = NULL; else - GLOBALS.MCharacter[nChar].item = GLOBALS.Loc->getItemFromCode(nCode); - GLOBALS.MCharacter[nChar].r = 255; - GLOBALS.MCharacter[nChar].g = 255; - GLOBALS.MCharacter[nChar].b = 255; - GLOBALS.MCharacter[nChar].x = -1; - GLOBALS.MCharacter[nChar].y = -1; - GLOBALS.MCharacter[nChar].bAlwaysBack = 0; + GLOBALS._mCharacter[nChar]._item = GLOBALS.Loc->getItemFromCode(nCode); + GLOBALS._mCharacter[nChar]._r = 255; + GLOBALS._mCharacter[nChar]._g = 255; + GLOBALS._mCharacter[nChar]._b = 255; + GLOBALS._mCharacter[nChar]._x = -1; + GLOBALS._mCharacter[nChar]._y = -1; + GLOBALS._mCharacter[nChar]._bAlwaysBack = 0; for (int i = 0; i < 10; i++) - GLOBALS.MCharacter[nChar].numtalks[i] = 1; + GLOBALS._mCharacter[nChar]._numTalks[i] = 1; - GLOBALS.MCharacter[nChar].curgroup = 0; + GLOBALS._mCharacter[nChar]._curGroup = 0; - GLOBALS.IsMChar[nChar] = true; + GLOBALS._isMChar[nChar] = true; } DECLARE_CUSTOM_FUNCTION(MCharResetCode)(CORO_PARAM, uint32 nChar, uint32, uint32, uint32) { - GLOBALS.MCharacter[nChar].item = GLOBALS.Loc->getItemFromCode(GLOBALS.MCharacter[nChar].code); + GLOBALS._mCharacter[nChar]._item = GLOBALS.Loc->getItemFromCode(GLOBALS._mCharacter[nChar]._code); } DECLARE_CUSTOM_FUNCTION(MCharSetPosition)(CORO_PARAM, uint32 nChar, uint32 nX, uint32 nY, uint32) { assert(nChar < 10); - GLOBALS.MCharacter[nChar].x = nX; - GLOBALS.MCharacter[nChar].y = nY; + GLOBALS._mCharacter[nChar]._x = nX; + GLOBALS._mCharacter[nChar]._y = nY; } DECLARE_CUSTOM_FUNCTION(MCharSetColor)(CORO_PARAM, uint32 nChar, uint32 r, uint32 g, uint32 b) { assert(nChar < 10); - GLOBALS.MCharacter[nChar].r = r; - GLOBALS.MCharacter[nChar].g = g; - GLOBALS.MCharacter[nChar].b = b; + GLOBALS._mCharacter[nChar]._r = r; + GLOBALS._mCharacter[nChar]._g = g; + GLOBALS._mCharacter[nChar]._b = b; } @@ -1621,7 +1621,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSetNumTalksInGroup)(CORO_PARAM, uint32 nChar, uint3 assert(nChar < 10); assert(nGroup < 10); - GLOBALS.MCharacter[nChar].numtalks[nGroup] = nTalks; + GLOBALS._mCharacter[nChar]._numTalks[nGroup] = nTalks; } @@ -1629,20 +1629,20 @@ DECLARE_CUSTOM_FUNCTION(MCharSetCurrentGroup)(CORO_PARAM, uint32 nChar, uint32 n assert(nChar < 10); assert(nGroup < 10); - GLOBALS.MCharacter[nChar].curgroup = nGroup; + GLOBALS._mCharacter[nChar]._curGroup = nGroup; } DECLARE_CUSTOM_FUNCTION(MCharSetNumTexts)(CORO_PARAM, uint32 nChar, uint32 nTexts, uint32, uint32) { assert(nChar < 10); - GLOBALS.MCharacter[nChar].numtexts = nTexts - 1; - GLOBALS.MCharacter[nChar].bInTexts = false; + GLOBALS._mCharacter[nChar]._numTexts = nTexts - 1; + GLOBALS._mCharacter[nChar]._bInTexts = false; } DECLARE_CUSTOM_FUNCTION(MCharSetAlwaysBack)(CORO_PARAM, uint32 nChar, uint32 bAlwaysBack, uint32, uint32) { assert(nChar < 10); - GLOBALS.MCharacter[nChar].bAlwaysBack = bAlwaysBack; + GLOBALS._mCharacter[nChar]._bAlwaysBack = bAlwaysBack; } @@ -1666,21 +1666,21 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes assert(nChar < 10); - bIsBack |= GLOBALS.MCharacter[nChar].bAlwaysBack ? 1 : 0; + bIsBack |= GLOBALS._mCharacter[nChar]._bAlwaysBack ? 1 : 0; // Calculates the position of the text according to the current frame - if (GLOBALS.MCharacter[nChar].x == -1) - _ctx->pt = GLOBALS.MCharacter[nChar].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); + if (GLOBALS._mCharacter[nChar]._x == -1) + _ctx->pt = GLOBALS._mCharacter[nChar]._item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); else - _ctx->pt = RMPoint(GLOBALS.MCharacter[nChar].x, GLOBALS.MCharacter[nChar].y); + _ctx->pt = RMPoint(GLOBALS._mCharacter[nChar]._x, GLOBALS._mCharacter[nChar]._y); // Parameter for special actions: random between the spoken - _ctx->parm = (GLOBALS.MCharacter[nChar].curgroup * 10) + _vm->_randomSource.getRandomNumber( - GLOBALS.MCharacter[nChar].numtalks[GLOBALS.MCharacter[nChar].curgroup] - 1) + 1; + _ctx->parm = (GLOBALS._mCharacter[nChar]._curGroup * 10) + _vm->_randomSource.getRandomNumber( + GLOBALS._mCharacter[nChar]._numTalks[GLOBALS._mCharacter[nChar]._curGroup] - 1) + 1; // Try to run the custom function to initialise the speech - if (GLOBALS.MCharacter[nChar].item) { - _ctx->h = mpalQueryDoAction(30, GLOBALS.MCharacter[nChar].item->mpalCode(), _ctx->parm); + if (GLOBALS._mCharacter[nChar]._item) { + _ctx->h = mpalQueryDoAction(30, GLOBALS._mCharacter[nChar]._item->mpalCode(), _ctx->parm); if (_ctx->h != CORO_INVALID_PID_VALUE) { CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE); } @@ -1698,9 +1698,9 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes for (_ctx->i = 0; _ctx->i < _ctx->msg->numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) { // Create a different object depending on whether it's background or not if (bIsBack) { - GLOBALS.curBackText = _ctx->text = new RMTextDialogScrolling(GLOBALS.Loc); - if (GLOBALS.bTonyIsSpeaking) - CORO_INVOKE_0(GLOBALS.curBackText->hide); + GLOBALS._curBackText = _ctx->text = new RMTextDialogScrolling(GLOBALS.Loc); + if (GLOBALS._bTonyIsSpeaking) + CORO_INVOKE_0(GLOBALS._curBackText->hide); } else _ctx->text = new RMTextDialog; @@ -1713,7 +1713,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes _ctx->text->setAlignType(RMText::HCENTER, RMText::VBOTTOM); // Colour - _ctx->text->setColor(GLOBALS.MCharacter[nChar].r, GLOBALS.MCharacter[nChar].g, GLOBALS.MCharacter[nChar].b); + _ctx->text->setColor(GLOBALS._mCharacter[nChar]._r, GLOBALS._mCharacter[nChar]._g, GLOBALS._mCharacter[nChar]._b); // Write the text _ctx->text->writeText((*_ctx->msg)[_ctx->i], nFont); @@ -1722,7 +1722,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes _ctx->text->setPosition(_ctx->pt); // Set the always display - if (GLOBALS.bAlwaysDisplay) { + if (GLOBALS._bAlwaysDisplay) { _ctx->text->setAlwaysDisplay(); _ctx->text->forceTime(); } @@ -1751,15 +1751,15 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes _ctx->voice = NULL; } - GLOBALS.curBackText = NULL; + GLOBALS._curBackText = NULL; delete _ctx->text; delete _ctx->msg; } // Try to run the custom function to close the speech - if (GLOBALS.MCharacter[nChar].item) { - _ctx->h = mpalQueryDoAction(31, GLOBALS.MCharacter[nChar].item->mpalCode(), _ctx->parm); + if (GLOBALS._mCharacter[nChar]._item) { + _ctx->h = mpalQueryDoAction(31, GLOBALS._mCharacter[nChar]._item->mpalCode(), _ctx->parm); if (_ctx->h != CORO_INVALID_PID_VALUE) CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE); } @@ -1790,7 +1790,7 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg _ctx->bIsBack = false; // The SendDialogMessage can go in the background if it is a character - if (nPers != 0 && GLOBALS.IsMChar[nPers] && GLOBALS.MCharacter[nPers].bAlwaysBack) + if (nPers != 0 && GLOBALS._isMChar[nPers] && GLOBALS._mCharacter[nPers]._bAlwaysBack) _ctx->bIsBack = true; _ctx->curVoc = SearchVoiceHeader(curDialog, nMsg); @@ -1830,67 +1830,67 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg if (!GLOBALS.bStaticTalk) GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL; } - } else if (!GLOBALS.IsMChar[nPers]) { + } else if (!GLOBALS._isMChar[nPers]) { _ctx->text = new RMTextDialog; - _ctx->pt = GLOBALS.Character[nPers].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); + _ctx->pt = GLOBALS._character[nPers]._item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); - if (GLOBALS.Character[nPers].starttalkpattern != 0) { + if (GLOBALS._character[nPers]._startTalkPattern != 0) { GLOBALS.Freeze(); - GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].starttalkpattern); + GLOBALS._character[nPers]._item->setPattern(GLOBALS._character[nPers]._startTalkPattern); GLOBALS.Unfreeze(); - CORO_INVOKE_0(GLOBALS.Character[nPers].item->waitForEndPattern); + CORO_INVOKE_0(GLOBALS._character[nPers]._item->waitForEndPattern); } - GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].talkpattern); + GLOBALS._character[nPers]._item->setPattern(GLOBALS._character[nPers]._talkPattern); - _ctx->text->setColor(GLOBALS.Character[nPers].r, GLOBALS.Character[nPers].g, GLOBALS.Character[nPers].b); + _ctx->text->setColor(GLOBALS._character[nPers]._r, GLOBALS._character[nPers]._g, GLOBALS._character[nPers]._b); _ctx->text->writeText(_ctx->string, 0); _ctx->text->setPosition(_ctx->pt); } else { - if (GLOBALS.MCharacter[nPers].x == -1) - _ctx->pt = GLOBALS.MCharacter[nPers].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); + if (GLOBALS._mCharacter[nPers]._x == -1) + _ctx->pt = GLOBALS._mCharacter[nPers]._item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition(); else - _ctx->pt = RMPoint(GLOBALS.MCharacter[nPers].x, GLOBALS.MCharacter[nPers].y); + _ctx->pt = RMPoint(GLOBALS._mCharacter[nPers]._x, GLOBALS._mCharacter[nPers]._y); // Parameter for special actions. Random between the spoken. - _ctx->parm = (GLOBALS.MCharacter[nPers].curgroup * 10) + _vm->_randomSource.getRandomNumber( - GLOBALS.MCharacter[nPers].numtalks[GLOBALS.MCharacter[nPers].curgroup] - 1) + 1; + _ctx->parm = (GLOBALS._mCharacter[nPers]._curGroup * 10) + _vm->_randomSource.getRandomNumber( + GLOBALS._mCharacter[nPers]._numTalks[GLOBALS._mCharacter[nPers]._curGroup] - 1) + 1; - if (GLOBALS.MCharacter[nPers].numtexts != 0 && GLOBALS.MCharacter[nPers].bInTexts) { - GLOBALS.MCharacter[nPers].numtexts--; + if (GLOBALS._mCharacter[nPers]._numTexts != 0 && GLOBALS._mCharacter[nPers]._bInTexts) { + GLOBALS._mCharacter[nPers]._numTexts--; } else { // Try to run the custom function to initialise the speech - _ctx->h = mpalQueryDoAction(30, GLOBALS.MCharacter[nPers].item->mpalCode(), _ctx->parm); + _ctx->h = mpalQueryDoAction(30, GLOBALS._mCharacter[nPers]._item->mpalCode(), _ctx->parm); if (_ctx->h != CORO_INVALID_PID_VALUE) CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE); - GLOBALS.MCharacter[nPers].curTalk = _ctx->parm; + GLOBALS._mCharacter[nPers]._curTalk = _ctx->parm; - if (GLOBALS.MCharacter[nPers].numtexts != 0) { - GLOBALS.MCharacter[nPers].bInTexts = true; - GLOBALS.MCharacter[nPers].numtexts--; + if (GLOBALS._mCharacter[nPers]._numTexts != 0) { + GLOBALS._mCharacter[nPers]._bInTexts = true; + GLOBALS._mCharacter[nPers]._numTexts--; } } - if (GLOBALS.MCharacter[nPers].bAlwaysBack) { - _ctx->text = GLOBALS.curBackText = new RMTextDialogScrolling(GLOBALS.Loc); - if (GLOBALS.bTonyIsSpeaking) - CORO_INVOKE_0(GLOBALS.curBackText->hide); + if (GLOBALS._mCharacter[nPers]._bAlwaysBack) { + _ctx->text = GLOBALS._curBackText = new RMTextDialogScrolling(GLOBALS.Loc); + if (GLOBALS._bTonyIsSpeaking) + CORO_INVOKE_0(GLOBALS._curBackText->hide); _ctx->bIsBack = true; } else _ctx->text = new RMTextDialog; - _ctx->text->setSkipStatus(!GLOBALS.MCharacter[nPers].bAlwaysBack); - _ctx->text->setColor(GLOBALS.MCharacter[nPers].r, GLOBALS.MCharacter[nPers].g, GLOBALS.MCharacter[nPers].b); + _ctx->text->setSkipStatus(!GLOBALS._mCharacter[nPers]._bAlwaysBack); + _ctx->text->setColor(GLOBALS._mCharacter[nPers]._r, GLOBALS._mCharacter[nPers]._g, GLOBALS._mCharacter[nPers]._b); _ctx->text->writeText(_ctx->string, 0); _ctx->text->setPosition(_ctx->pt); } if (!GLOBALS.bSkipIdle) { _ctx->text->setInput(GLOBALS.Input); - if (GLOBALS.bAlwaysDisplay) { + if (GLOBALS._bAlwaysDisplay) { _ctx->text->setAlwaysDisplay(); _ctx->text->forceTime(); } @@ -1914,29 +1914,29 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg } if (nPers != 0) { - if (!GLOBALS.IsMChar[nPers]) { - if (GLOBALS.Character[nPers].endtalkpattern != 0) { + if (!GLOBALS._isMChar[nPers]) { + if (GLOBALS._character[nPers]._endTalkPattern != 0) { GLOBALS.Freeze(); - GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].endtalkpattern); + GLOBALS._character[nPers]._item->setPattern(GLOBALS._character[nPers]._endTalkPattern); GLOBALS.Unfreeze(); - CORO_INVOKE_0(GLOBALS.Character[nPers].item->waitForEndPattern); + CORO_INVOKE_0(GLOBALS._character[nPers]._item->waitForEndPattern); } - GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].standpattern); + GLOBALS._character[nPers]._item->setPattern(GLOBALS._character[nPers]._standPattern); delete _ctx->text; } else { - if ((GLOBALS.MCharacter[nPers].bInTexts && GLOBALS.MCharacter[nPers].numtexts == 0) || !GLOBALS.MCharacter[nPers].bInTexts) { + if ((GLOBALS._mCharacter[nPers]._bInTexts && GLOBALS._mCharacter[nPers]._numTexts == 0) || !GLOBALS._mCharacter[nPers]._bInTexts) { // Try to run the custom function to close the speech - GLOBALS.MCharacter[nPers].curTalk = (GLOBALS.MCharacter[nPers].curTalk % 10) + GLOBALS.MCharacter[nPers].curgroup * 10; - _ctx->h = mpalQueryDoAction(31, GLOBALS.MCharacter[nPers].item->mpalCode(), GLOBALS.MCharacter[nPers].curTalk); + GLOBALS._mCharacter[nPers]._curTalk = (GLOBALS._mCharacter[nPers]._curTalk % 10) + GLOBALS._mCharacter[nPers]._curGroup * 10; + _ctx->h = mpalQueryDoAction(31, GLOBALS._mCharacter[nPers]._item->mpalCode(), GLOBALS._mCharacter[nPers]._curTalk); if (_ctx->h != CORO_INVALID_PID_VALUE) CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE); - GLOBALS.MCharacter[nPers].bInTexts = false; - GLOBALS.MCharacter[nPers].numtexts = 0; + GLOBALS._mCharacter[nPers]._bInTexts = false; + GLOBALS._mCharacter[nPers]._numTexts = 0; } - GLOBALS.curBackText = NULL; + GLOBALS._curBackText = NULL; delete _ctx->text; } } else { @@ -2545,7 +2545,7 @@ void setupGlobalVars(RMTony *tony, RMPointer *ptr, RMGameBoxes *box, RMLocation GLOBALS.EnableGUI = mainEnableGUI; GLOBALS.SetPalesati = mainSetPalesati; - GLOBALS.bAlwaysDisplay = false; + GLOBALS._bAlwaysDisplay = false; int i; for (i = 0; i < 10; i++) diff --git a/engines/tony/globals.cpp b/engines/tony/globals.cpp index 742d4376d5..37a5a20454 100644 --- a/engines/tony/globals.cpp +++ b/engines/tony/globals.cpp @@ -26,15 +26,15 @@ namespace Tony { Globals::Globals() { - Common::fill(nextMusic, nextMusic + MAX_PATH, 0); - nextLoop = false; - nextChannel = 0; - nextSync = 0; - curChannel = 0; - flipflop = 0; - curBackText = NULL; - bTonyIsSpeaking = false; - curChangedHotspot = 0; + Common::fill(_nextMusic, _nextMusic + MAX_PATH, 0); + _nextLoop = false; + _nextChannel = 0; + _nextSync = 0; + _curChannel = 0; + _flipflop = 0; + _curBackText = NULL; + _bTonyIsSpeaking = false; + _curChangedHotspot = 0; Tony = NULL; Pointer = NULL; Boxes = NULL; @@ -72,7 +72,7 @@ Globals::Globals() { bCfgDubbing = false; bCfgMusic = false; bCfgSFX = false; - bAlwaysDisplay = false; + _bAlwaysDisplay = false; nCfgTonySpeed = 0; nCfgTextSpeed = 0; nCfgDubbingVolume = 0; @@ -132,14 +132,14 @@ Globals::Globals() { nExecutingChoice = 0; nSelectedChoice = 0; nTonyNextTalkType = RMTony::TALK_NORMAL; - saveTonyLoc = 0; + _saveTonyLoc = 0; for (int i = 0; i < 16; ++i) - Common::fill((byte *)&Character[i], (byte *)&Character[i] + sizeof(CharacterStruct), 0); + Common::fill((byte *)&_character[i], (byte *)&_character[i] + sizeof(CharacterStruct), 0); for (int i = 0; i < 10; ++i) - Common::fill((byte *)&MCharacter[i], (byte *)&MCharacter[i] + sizeof(MCharacterStruct), 0); + Common::fill((byte *)&_mCharacter[i], (byte *)&_mCharacter[i] + sizeof(MCharacterStruct), 0); for (int i = 0; i < 256; ++i) - Common::fill((byte *)&ChangedHotspot[i], (byte *)&ChangedHotspot[i] + sizeof(ChangedHotspotStruct), 0); + Common::fill((byte *)&_changedHotspot[i], (byte *)&_changedHotspot[i] + sizeof(ChangedHotspotStruct), 0); } } // End of namespace Tony diff --git a/engines/tony/globals.h b/engines/tony/globals.h index 76a54e07c8..84c5d7398c 100644 --- a/engines/tony/globals.h +++ b/engines/tony/globals.h @@ -48,101 +48,101 @@ namespace Tony { struct CharacterStruct { - uint32 code; - RMItem *item; - byte r, g, b; - int talkpattern; - int standpattern; - int starttalkpattern, endtalkpattern; - int numtexts; - - void Save(Common::OutSaveFile *f) { - f->writeUint32LE(code); + uint32 _code; + RMItem *_item; + byte _r, _g, _b; + int _talkPattern; + int _standPattern; + int _startTalkPattern, _endTalkPattern; + int _numTexts; + + void save(Common::OutSaveFile *f) { + f->writeUint32LE(_code); f->writeUint32LE(0); - f->writeByte(r); - f->writeByte(g); - f->writeByte(b); - f->writeUint32LE(talkpattern); - f->writeUint32LE(standpattern); - f->writeUint32LE(starttalkpattern); - f->writeUint32LE(endtalkpattern); - f->writeUint32LE(numtexts); + f->writeByte(_r); + f->writeByte(_g); + f->writeByte(_b); + f->writeUint32LE(_talkPattern); + f->writeUint32LE(_standPattern); + f->writeUint32LE(_startTalkPattern); + f->writeUint32LE(_endTalkPattern); + f->writeUint32LE(_numTexts); } - void Load(Common::InSaveFile *f) { - code = f->readUint32LE(); + void load(Common::InSaveFile *f) { + _code = f->readUint32LE(); f->readUint32LE(); - item = NULL; - r = f->readByte(); - g = f->readByte(); - b = f->readByte(); - talkpattern = f->readUint32LE(); - standpattern = f->readUint32LE(); - starttalkpattern = f->readUint32LE(); - endtalkpattern = f->readUint32LE(); - numtexts = f->readUint32LE(); + _item = NULL; + _r = f->readByte(); + _g = f->readByte(); + _b = f->readByte(); + _talkPattern = f->readUint32LE(); + _standPattern = f->readUint32LE(); + _startTalkPattern = f->readUint32LE(); + _endTalkPattern = f->readUint32LE(); + _numTexts = f->readUint32LE(); } }; struct MCharacterStruct { - uint32 code; - RMItem *item; - byte r, g, b; - int x, y; - int numtalks[10]; - int curgroup; - int numtexts; - bool bInTexts; - int curTalk; - bool bAlwaysBack; - - void Save(Common::OutSaveFile *f) { - f->writeUint32LE(code); + uint32 _code; + RMItem *_item; + byte _r, _g, _b; + int _x, _y; + int _numTalks[10]; + int _curGroup; + int _numTexts; + bool _bInTexts; + int _curTalk; + bool _bAlwaysBack; + + void save(Common::OutSaveFile *f) { + f->writeUint32LE(_code); f->writeUint32LE(0); - f->writeByte(r); - f->writeByte(g); - f->writeByte(b); - f->writeUint32LE(x); - f->writeUint32LE(y); + f->writeByte(_r); + f->writeByte(_g); + f->writeByte(_b); + f->writeUint32LE(_x); + f->writeUint32LE(_y); for (int i = 0; i < 10; ++i) - f->writeUint32LE(numtalks[i]); - f->writeUint32LE(curgroup); - f->writeUint32LE(numtexts); - f->writeByte(bInTexts); - f->writeUint32LE(curTalk); - f->writeByte(bAlwaysBack); + f->writeUint32LE(_numTalks[i]); + f->writeUint32LE(_curGroup); + f->writeUint32LE(_numTexts); + f->writeByte(_bInTexts); + f->writeUint32LE(_curTalk); + f->writeByte(_bAlwaysBack); } - void Load(Common::InSaveFile *f) { - code = f->readUint32LE(); + void load(Common::InSaveFile *f) { + _code = f->readUint32LE(); f->readUint32LE(); - item = NULL; - r = f->readByte(); - g = f->readByte(); - b = f->readByte(); - x = f->readUint32LE(); - y = f->readUint32LE(); + _item = NULL; + _r = f->readByte(); + _g = f->readByte(); + _b = f->readByte(); + _x = f->readUint32LE(); + _y = f->readUint32LE(); for (int i = 0; i < 10; ++i) - numtalks[i] = f->readUint32LE(); - curgroup = f->readUint32LE(); - numtexts = f->readUint32LE(); - bInTexts = f->readByte(); - curTalk = f->readUint32LE(); - bAlwaysBack = f->readByte(); + _numTalks[i] = f->readUint32LE(); + _curGroup = f->readUint32LE(); + _numTexts = f->readUint32LE(); + _bInTexts = f->readByte(); + _curTalk = f->readUint32LE(); + _bAlwaysBack = f->readByte(); } }; struct ChangedHotspotStruct { - uint32 dwCode; - uint32 nX, nY; + uint32 _dwCode; + uint32 _nX, _nY; - void Save(Common::OutSaveFile *f) { - f->writeUint32LE(dwCode); - f->writeUint32LE(nX); - f->writeUint32LE(nY); + void save(Common::OutSaveFile *f) { + f->writeUint32LE(_dwCode); + f->writeUint32LE(_nX); + f->writeUint32LE(_nY); } - void Load(Common::InSaveFile *f) { - dwCode = f->readUint32LE(); - nX = f->readUint32LE(); - nY = f->readUint32LE(); + void load(Common::InSaveFile *f) { + _dwCode = f->readUint32LE(); + _nX = f->readUint32LE(); + _nY = f->readUint32LE(); } }; @@ -170,23 +170,23 @@ class Globals { public: Globals(); - char nextMusic[MAX_PATH]; - bool nextLoop; - int nextChannel; - int nextSync; - int curChannel; - int flipflop; + char _nextMusic[MAX_PATH]; + bool _nextLoop; + int _nextChannel; + int _nextSync; + int _curChannel; + int _flipflop; // OSystem::MutexRef csMusic; - CharacterStruct Character[16]; - MCharacterStruct MCharacter[10]; - ChangedHotspotStruct ChangedHotspot[256]; - bool IsMChar[16]; - bool bAlwaysDisplay; - RMPoint saveTonyPos; - int saveTonyLoc; - RMTextDialog *curBackText; - bool bTonyIsSpeaking; - int curChangedHotspot; + CharacterStruct _character[16]; + MCharacterStruct _mCharacter[10]; + ChangedHotspotStruct _changedHotspot[256]; + bool _isMChar[16]; + bool _bAlwaysDisplay; + RMPoint _saveTonyPos; + int _saveTonyLoc; + RMTextDialog *_curBackText; + bool _bTonyIsSpeaking; + int _curChangedHotspot; bool bPatIrqFreeze; bool bCfgInvLocked; bool bCfgInvNoScroll; diff --git a/engines/tony/mpal/mpalutils.cpp b/engines/tony/mpal/mpalutils.cpp index bce623e43c..aba92a86cd 100644 --- a/engines/tony/mpal/mpalutils.cpp +++ b/engines/tony/mpal/mpalutils.cpp @@ -85,12 +85,12 @@ RMResRaw::RMResRaw(uint32 resID) : RMRes(resID) { RMResRaw::~RMResRaw() { } -const byte *RMResRaw::DataPointer() { +const byte *RMResRaw::dataPointer() { return _buf + 8; } RMResRaw::operator const byte *() { - return DataPointer(); + return dataPointer(); } int RMResRaw::width() { diff --git a/engines/tony/mpal/mpalutils.h b/engines/tony/mpal/mpalutils.h index a428a40a64..19810cf3a1 100644 --- a/engines/tony/mpal/mpalutils.h +++ b/engines/tony/mpal/mpalutils.h @@ -54,7 +54,7 @@ public: RMResRaw(uint32 resID); virtual ~RMResRaw(); - const byte *DataPointer(); + const byte *dataPointer(); operator const byte*(); int width(); diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index e763877d97..e53177513a 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -191,7 +191,7 @@ void TonyEngine::playMusic(int nChannel, const char *fn, int nFX, bool bLoop, in // g_system->lockMutex(csMusic); if (nChannel < 4) - if (GLOBALS.flipflop) + if (GLOBALS._flipflop) nChannel = nChannel + 1; switch (nFX) { @@ -287,7 +287,7 @@ void TonyEngine::stopMusic(int nChannel) { // g_system->lockMutex(csMusic); if (nChannel < 4) - _stream[nChannel + GLOBALS.flipflop]->Stop(); + _stream[nChannel + GLOBALS._flipflop]->Stop(); else _stream[nChannel]->Stop(); |