aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/custom.cpp38
-rw-r--r--engines/tony/font.cpp12
-rw-r--r--engines/tony/game.cpp80
-rw-r--r--engines/tony/gfxcore.cpp6
-rw-r--r--engines/tony/gfxengine.cpp92
-rw-r--r--engines/tony/globals.cpp48
-rw-r--r--engines/tony/globals.h48
-rw-r--r--engines/tony/inventory.cpp30
-rw-r--r--engines/tony/loc.cpp2
-rw-r--r--engines/tony/sound.cpp8
-rw-r--r--engines/tony/tony.cpp34
-rw-r--r--engines/tony/tonychar.cpp2
12 files changed, 200 insertions, 200 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 810e6a9353..7482ac0db8 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -495,7 +495,7 @@ DECLARE_CUSTOM_FUNCTION(SendFullscreenMessage)(CORO_PARAM, uint32 nMsg, uint32 n
}
DECLARE_CUSTOM_FUNCTION(NoOcchioDiBue)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.bNoOcchioDiBue = true;
+ GLOBALS._bNoOcchioDiBue = true;
}
DECLARE_CUSTOM_FUNCTION(CloseLocation)(CORO_PARAM, uint32, uint32, uint32, uint32) {
@@ -504,7 +504,7 @@ DECLARE_CUSTOM_FUNCTION(CloseLocation)(CORO_PARAM, uint32, uint32, uint32, uint3
CORO_BEGIN_CODE(_ctx);
- if (!GLOBALS.bNoOcchioDiBue) {
+ if (!GLOBALS._bNoOcchioDiBue) {
GLOBALS.InitWipe(1);
CORO_INVOKE_0(GLOBALS.WaitWipeEnd);
}
@@ -526,7 +526,7 @@ DECLARE_CUSTOM_FUNCTION(ChangeLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, uint
CORO_BEGIN_CODE(_ctx);
- if (!GLOBALS.bNoOcchioDiBue) {
+ if (!GLOBALS._bNoOcchioDiBue) {
GLOBALS.InitWipe(1);
CORO_INVOKE_0(GLOBALS.WaitWipeEnd);
}
@@ -550,7 +550,7 @@ DECLARE_CUSTOM_FUNCTION(ChangeLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, uint
_vm->playMusic(4, tappetiFile[GLOBALS.lastTappeto], 0, true, 2000);
}
- if (!GLOBALS.bNoOcchioDiBue) {
+ if (!GLOBALS._bNoOcchioDiBue) {
GLOBALS.InitWipe(2);
}
@@ -559,12 +559,12 @@ DECLARE_CUSTOM_FUNCTION(ChangeLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, uint
_ctx->h = mpalQueryDoAction(0, nLoc, 0);
- if (!GLOBALS.bNoOcchioDiBue) {
+ if (!GLOBALS._bNoOcchioDiBue) {
CORO_INVOKE_0(GLOBALS.WaitWipeEnd);
GLOBALS.CloseWipe();
}
- GLOBALS.bNoOcchioDiBue = false;
+ GLOBALS._bNoOcchioDiBue = false;
// On Enter?
if (_ctx->h != CORO_INVALID_PID_VALUE)
@@ -2102,14 +2102,14 @@ void ThreadFadeOutMusic(CORO_PARAM, const void *nMusic) {
debug("Start FadeOut Music");
- for (_ctx->i = 16; _ctx->i > 0 && !GLOBALS.bFadeOutStop; _ctx->i--) {
+ for (_ctx->i = 16; _ctx->i > 0 && !GLOBALS._bFadeOutStop; _ctx->i--) {
if (_ctx->i * 4 < _ctx->startVolume)
_vm->setMusicVolume(nChannel, _ctx->i * 4);
CORO_INVOKE_1(CoroScheduler.sleep, 100);
}
- if (!GLOBALS.bFadeOutStop)
+ if (!GLOBALS._bFadeOutStop)
_vm->setMusicVolume(nChannel, 0);
// If there is a stacchetto, stop all
@@ -2124,16 +2124,16 @@ void ThreadFadeOutMusic(CORO_PARAM, const void *nMusic) {
}
DECLARE_CUSTOM_FUNCTION(FadeInSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- CoroScheduler.createProcess(ThreadFadeInMusic, &GLOBALS.curSonoriz, sizeof(int));
+ CoroScheduler.createProcess(ThreadFadeInMusic, &GLOBALS._curSonoriz, sizeof(int));
}
DECLARE_CUSTOM_FUNCTION(FadeOutSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.bFadeOutStop = false;
- CoroScheduler.createProcess(ThreadFadeOutMusic, &GLOBALS.curSonoriz, sizeof(int));
+ GLOBALS._bFadeOutStop = false;
+ CoroScheduler.createProcess(ThreadFadeOutMusic, &GLOBALS._curSonoriz, sizeof(int));
}
DECLARE_CUSTOM_FUNCTION(FadeOutStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.bFadeOutStop = false;
+ GLOBALS._bFadeOutStop = false;
int channel = 2;
CoroScheduler.createProcess(ThreadFadeOutMusic, &channel, sizeof(int));
}
@@ -2144,7 +2144,7 @@ DECLARE_CUSTOM_FUNCTION(FadeInStacchetto)(CORO_PARAM, uint32, uint32, uint32, ui
}
DECLARE_CUSTOM_FUNCTION(StopSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->stopMusic(GLOBALS.curSonoriz);
+ _vm->stopMusic(GLOBALS._curSonoriz);
}
DECLARE_CUSTOM_FUNCTION(StopStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
@@ -2152,12 +2152,12 @@ DECLARE_CUSTOM_FUNCTION(StopStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint
}
DECLARE_CUSTOM_FUNCTION(MuteSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->setMusicVolume(GLOBALS.curSonoriz, 0);
+ _vm->setMusicVolume(GLOBALS._curSonoriz, 0);
}
DECLARE_CUSTOM_FUNCTION(DemuteSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.bFadeOutStop = true;
- _vm->setMusicVolume(GLOBALS.curSonoriz, 64);
+ GLOBALS._bFadeOutStop = true;
+ _vm->setMusicVolume(GLOBALS._curSonoriz, 64);
}
DECLARE_CUSTOM_FUNCTION(MuteStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
@@ -2183,11 +2183,11 @@ void CustPlayMusic(uint32 nChannel, const char *mFN, uint32 nFX, bool bLoop, int
DECLARE_CUSTOM_FUNCTION(PlaySonoriz)(CORO_PARAM, uint32 nMusic, uint32 nFX, uint32 bNoLoop, uint32) {
if (nFX == 0 || nFX == 1 || nFX == 2) {
debug("PlaySonoriz stop fadeout");
- GLOBALS.bFadeOutStop = true;
+ GLOBALS._bFadeOutStop = true;
}
GLOBALS.lastMusic = nMusic;
- CustPlayMusic(GLOBALS.curSonoriz, musicFiles[nMusic].name, nFX, bNoLoop ? false : true, musicFiles[nMusic].sync);
+ CustPlayMusic(GLOBALS._curSonoriz, musicFiles[nMusic].name, nFX, bNoLoop ? false : true, musicFiles[nMusic].sync);
}
DECLARE_CUSTOM_FUNCTION(PlayStacchetto)(CORO_PARAM, uint32 nMusic, uint32 nFX, uint32 bLoop, uint32) {
@@ -2270,7 +2270,7 @@ DECLARE_CUSTOM_FUNCTION(MustSkipIdleEnd)(CORO_PARAM, uint32, uint32, uint32, uin
}
DECLARE_CUSTOM_FUNCTION(PatIrqFreeze)(CORO_PARAM, uint32 bStatus, uint32, uint32, uint32) {
- GLOBALS.bPatIrqFreeze = bStatus;
+ GLOBALS._bPatIrqFreeze = bStatus;
}
DECLARE_CUSTOM_FUNCTION(OpenInitLoadMenu)(CORO_PARAM, uint32, uint32, uint32, uint32) {
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 398389ebcd..23a92c5f30 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -1946,7 +1946,7 @@ void RMText::writeText(const RMString &text, RMFontColor *font, int *time) {
}
if (time != NULL)
- *time = 1000 + numchar * (11 - GLOBALS.nCfgTextSpeed) * 14;
+ *time = 1000 + numchar * (11 - GLOBALS._nCfgTextSpeed) * 14;
}
void RMText::clipOnScreen(RMGfxPrimitive *prim) {
@@ -2075,8 +2075,8 @@ void RMTextDialog::removeThis(CORO_PARAM, bool &result) {
// Don't erase the background
if (_bSkipStatus) {
- if (!(GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
- if (GLOBALS.bCfgTimerizedText) {
+ if (!(GLOBALS._bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
+ if (GLOBALS._bCfgTimerizedText) {
if (!_bForceNoTime) {
if (_vm->getTime() > (uint32)_time + _startTime)
return;
@@ -2097,7 +2097,7 @@ void RMTextDialog::removeThis(CORO_PARAM, bool &result) {
}
}
// Erase the background
- else if (!(GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
+ else if (!(GLOBALS._bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
if (!_bForceNoTime) {
if (_vm->getTime() > (uint32)_time + _startTime)
return;
@@ -2117,7 +2117,7 @@ void RMTextDialog::removeThis(CORO_PARAM, bool &result) {
return;
}
- if (GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE) {
+ if (GLOBALS._bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE) {
CORO_INVOKE_3(CoroScheduler.waitForSingleObject, hCustomSkip2, 0, &_ctx->expired);
// == WAIT_OBJECT_0
if (!_ctx->expired)
@@ -2145,7 +2145,7 @@ void RMTextDialog::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *p
_startTime = _vm->getTime();
if (_bShowed) {
- if (GLOBALS.bCfgSottotitoli || _bAlwaysDisplay) {
+ if (GLOBALS._bCfgSottotitoli || _bAlwaysDisplay) {
prim->getDst().topLeft() = dst;
CORO_INVOKE_2(RMText::draw, bigBuf, prim);
}
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 886b5f0859..f3aee0f183 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -673,57 +673,57 @@ void RMOptionScreen::initState(CORO_PARAM) {
if (_nState == MENUGAME) {
assert(_ButtonGame_Lock == NULL);
_ButtonGame_Lock = new RMOptionButton(20008, RMPoint(176, 262), true);
- _ButtonGame_Lock->setActiveState(GLOBALS.bCfgInvLocked);
+ _ButtonGame_Lock->setActiveState(GLOBALS._bCfgInvLocked);
assert(_ButtonGame_TimerizedText == NULL);
_ButtonGame_TimerizedText = new RMOptionButton(20009, RMPoint(463, 273), true);
- _ButtonGame_TimerizedText->setActiveState(!GLOBALS.bCfgTimerizedText);
+ _ButtonGame_TimerizedText->setActiveState(!GLOBALS._bCfgTimerizedText);
assert(_ButtonGame_Scrolling == NULL);
_ButtonGame_Scrolling = new RMOptionButton(20010, RMPoint(315, 263), true);
- _ButtonGame_Scrolling->setActiveState(GLOBALS.bCfgInvNoScroll);
+ _ButtonGame_Scrolling->setActiveState(GLOBALS._bCfgInvNoScroll);
assert(_ButtonGame_InterUp == NULL);
_ButtonGame_InterUp = new RMOptionButton(20011, RMPoint(36, 258), true);
- _ButtonGame_InterUp->setActiveState(GLOBALS.bCfgInvUp);
+ _ButtonGame_InterUp->setActiveState(GLOBALS._bCfgInvUp);
assert(_SlideTextSpeed == NULL);
- _SlideTextSpeed = new RMOptionSlide(RMPoint(165, 122), 10, GLOBALS.nCfgTextSpeed);
+ _SlideTextSpeed = new RMOptionSlide(RMPoint(165, 122), 10, GLOBALS._nCfgTextSpeed);
assert(_SlideTonySpeed == NULL);
- _SlideTonySpeed = new RMOptionSlide(RMPoint(165, 226), 5, GLOBALS.nCfgTonySpeed);
+ _SlideTonySpeed = new RMOptionSlide(RMPoint(165, 226), 5, GLOBALS._nCfgTonySpeed);
}
// Menu Graphics
else if (_nState == MENUGFX) {
assert(_ButtonGfx_Anni30 == NULL);
_ButtonGfx_Anni30 = new RMOptionButton(20015, RMPoint(247, 178), true);
- _ButtonGfx_Anni30->setActiveState(GLOBALS.bCfgAnni30);
+ _ButtonGfx_Anni30->setActiveState(GLOBALS._bCfgAnni30);
assert(_ButtonGfx_AntiAlias == NULL);
_ButtonGfx_AntiAlias = new RMOptionButton(20016, RMPoint(430, 83), true);
- _ButtonGfx_AntiAlias->setActiveState(!GLOBALS.bCfgAntiAlias);
+ _ButtonGfx_AntiAlias->setActiveState(!GLOBALS._bCfgAntiAlias);
assert(_ButtonGfx_Sottotitoli == NULL);
_ButtonGfx_Sottotitoli = new RMOptionButton(20017, RMPoint(98, 82), true);
- _ButtonGfx_Sottotitoli->setActiveState(!GLOBALS.bCfgSottotitoli);
+ _ButtonGfx_Sottotitoli->setActiveState(!GLOBALS._bCfgSottotitoli);
assert(_ButtonGfx_Tips == NULL);
_ButtonGfx_Tips = new RMOptionButton(20018, RMPoint(431, 246), true);
- _ButtonGfx_Tips->setActiveState(GLOBALS.bCfgInterTips);
+ _ButtonGfx_Tips->setActiveState(GLOBALS._bCfgInterTips);
assert(_ButtonGfx_Trans == NULL);
_ButtonGfx_Trans = new RMOptionButton(20019, RMPoint(126, 271), true);
- _ButtonGfx_Trans->setActiveState(!GLOBALS.bCfgTransparence);
+ _ButtonGfx_Trans->setActiveState(!GLOBALS._bCfgTransparence);
} else if (_nState == MENUSOUND) {
assert(_SliderSound_Dubbing == NULL);
- _SliderSound_Dubbing = new RMOptionSlide(RMPoint(165, 122), 10, GLOBALS.nCfgDubbingVolume);
+ _SliderSound_Dubbing = new RMOptionSlide(RMPoint(165, 122), 10, GLOBALS._nCfgDubbingVolume);
assert(_SliderSound_Music == NULL);
- _SliderSound_Music = new RMOptionSlide(RMPoint(165, 226), 10, GLOBALS.nCfgMusicVolume);
+ _SliderSound_Music = new RMOptionSlide(RMPoint(165, 226), 10, GLOBALS._nCfgMusicVolume);
assert(_SliderSound_SFX == NULL);
- _SliderSound_SFX = new RMOptionSlide(RMPoint(165, 330), 10, GLOBALS.nCfgSFXVolume);
+ _SliderSound_SFX = new RMOptionSlide(RMPoint(165, 330), 10, GLOBALS._nCfgSFXVolume);
assert(_ButtonSound_DubbingOn == NULL);
_ButtonSound_DubbingOn = new RMOptionButton(20033, RMPoint(339, 75), true);
- _ButtonSound_DubbingOn->setActiveState(GLOBALS.bCfgDubbing);
+ _ButtonSound_DubbingOn->setActiveState(GLOBALS._bCfgDubbing);
assert(_ButtonSound_MusicOn == NULL);
_ButtonSound_MusicOn = new RMOptionButton(20034, RMPoint(338, 179), true);
- _ButtonSound_MusicOn->setActiveState(GLOBALS.bCfgMusic);
+ _ButtonSound_MusicOn->setActiveState(GLOBALS._bCfgMusic);
assert(_ButtonSound_SFXOn == NULL);
_ButtonSound_SFXOn = new RMOptionButton(20035, RMPoint(338, 283), true);
- _ButtonSound_SFXOn->setActiveState(GLOBALS.bCfgSFX);
+ _ButtonSound_SFXOn->setActiveState(GLOBALS._bCfgSFX);
}
}
@@ -789,71 +789,71 @@ void RMOptionScreen::closeState(void) {
}
if (_nState == MENUGAME) {
- GLOBALS.bCfgInvLocked = _ButtonGame_Lock->isActive();
+ GLOBALS._bCfgInvLocked = _ButtonGame_Lock->isActive();
delete _ButtonGame_Lock;
_ButtonGame_Lock = NULL;
- GLOBALS.bCfgTimerizedText = !_ButtonGame_TimerizedText->isActive();
+ GLOBALS._bCfgTimerizedText = !_ButtonGame_TimerizedText->isActive();
delete _ButtonGame_TimerizedText;
_ButtonGame_TimerizedText = NULL;
- GLOBALS.bCfgInvNoScroll = _ButtonGame_Scrolling->isActive();
+ GLOBALS._bCfgInvNoScroll = _ButtonGame_Scrolling->isActive();
delete _ButtonGame_Scrolling;
_ButtonGame_Scrolling = NULL;
- GLOBALS.bCfgInvUp = _ButtonGame_InterUp->isActive();
+ GLOBALS._bCfgInvUp = _ButtonGame_InterUp->isActive();
delete _ButtonGame_InterUp;
_ButtonGame_InterUp = NULL;
- GLOBALS.nCfgTextSpeed = _SlideTextSpeed->getValue();
+ GLOBALS._nCfgTextSpeed = _SlideTextSpeed->getValue();
delete _SlideTextSpeed;
_SlideTextSpeed = NULL;
- GLOBALS.nCfgTonySpeed = _SlideTonySpeed->getValue();
+ GLOBALS._nCfgTonySpeed = _SlideTonySpeed->getValue();
delete _SlideTonySpeed;
_SlideTonySpeed = NULL;
} else if (_nState == MENUGFX) {
- GLOBALS.bCfgAnni30 = _ButtonGfx_Anni30->isActive();
+ GLOBALS._bCfgAnni30 = _ButtonGfx_Anni30->isActive();
delete _ButtonGfx_Anni30;
_ButtonGfx_Anni30 = NULL;
- GLOBALS.bCfgAntiAlias = !_ButtonGfx_AntiAlias->isActive();
+ GLOBALS._bCfgAntiAlias = !_ButtonGfx_AntiAlias->isActive();
delete _ButtonGfx_AntiAlias;
_ButtonGfx_AntiAlias = NULL;
- GLOBALS.bCfgSottotitoli = !_ButtonGfx_Sottotitoli->isActive();
+ GLOBALS._bCfgSottotitoli = !_ButtonGfx_Sottotitoli->isActive();
delete _ButtonGfx_Sottotitoli;
_ButtonGfx_Sottotitoli = NULL;
- GLOBALS.bCfgInterTips = _ButtonGfx_Tips->isActive();
+ GLOBALS._bCfgInterTips = _ButtonGfx_Tips->isActive();
delete _ButtonGfx_Tips;
_ButtonGfx_Tips = NULL;
- GLOBALS.bCfgTransparence = !_ButtonGfx_Trans->isActive();
+ GLOBALS._bCfgTransparence = !_ButtonGfx_Trans->isActive();
delete _ButtonGfx_Trans;
_ButtonGfx_Trans = NULL;
} else if (_nState == MENUSOUND) {
- GLOBALS.nCfgDubbingVolume = _SliderSound_Dubbing->getValue();
+ GLOBALS._nCfgDubbingVolume = _SliderSound_Dubbing->getValue();
delete _SliderSound_Dubbing;
_SliderSound_Dubbing = NULL;
- GLOBALS.nCfgMusicVolume = _SliderSound_Music->getValue();
+ GLOBALS._nCfgMusicVolume = _SliderSound_Music->getValue();
delete _SliderSound_Music;
_SliderSound_Music = NULL;
- GLOBALS.nCfgSFXVolume = _SliderSound_SFX->getValue();
+ GLOBALS._nCfgSFXVolume = _SliderSound_SFX->getValue();
delete _SliderSound_SFX;
_SliderSound_SFX = NULL;
- GLOBALS.bCfgDubbing = _ButtonSound_DubbingOn->isActive();
+ GLOBALS._bCfgDubbing = _ButtonSound_DubbingOn->isActive();
delete _ButtonSound_DubbingOn;
_ButtonSound_DubbingOn = NULL;
- GLOBALS.bCfgMusic = _ButtonSound_MusicOn->isActive();
+ GLOBALS._bCfgMusic = _ButtonSound_MusicOn->isActive();
delete _ButtonSound_MusicOn;
_ButtonSound_MusicOn = NULL;
- GLOBALS.bCfgSFX = _ButtonSound_SFXOn->isActive();
+ GLOBALS._bCfgSFX = _ButtonSound_SFXOn->isActive();
delete _ButtonSound_SFXOn;
_ButtonSound_SFXOn = NULL;
}
@@ -1246,19 +1246,19 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
if (_nState == MENUGFX) {
// These options take effect immediately
if (_ButtonGfx_Anni30->isActive())
- GLOBALS.bCfgAnni30 = true;
+ GLOBALS._bCfgAnni30 = true;
else
- GLOBALS.bCfgAnni30 = false;
+ GLOBALS._bCfgAnni30 = false;
if (_ButtonGfx_AntiAlias->isActive())
- GLOBALS.bCfgAntiAlias = false;
+ GLOBALS._bCfgAntiAlias = false;
else
- GLOBALS.bCfgAntiAlias = true;
+ GLOBALS._bCfgAntiAlias = true;
if (_ButtonGfx_Trans->isActive())
- GLOBALS.bCfgTransparence = false;
+ GLOBALS._bCfgTransparence = false;
else
- GLOBALS.bCfgTransparence = true;
+ GLOBALS._bCfgTransparence = true;
}
}
}
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 09b102db11..fdc435e3e9 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -1390,7 +1390,7 @@ void RMGfxSourceBuffer8RLEWordAB::RLEDecompressLine(uint16 *dst, byte *src, int
int i, n;
int r, g, b, r2, g2, b2;
- if (!GLOBALS.bCfgTransparence) {
+ if (!GLOBALS._bCfgTransparence) {
RMGfxSourceBuffer8RLEWord::RLEDecompressLine(dst, src, nStartSkip, nLength);
return;
}
@@ -1751,7 +1751,7 @@ void RMGfxSourceBuffer8RLEByteAA::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RM
CORO_BEGIN_CODE(_ctx);
CORO_INVOKE_2(RMGfxSourceBuffer8RLE::draw, bigBuf, prim);
- if (GLOBALS.bCfgAntiAlias)
+ if (GLOBALS._bCfgAntiAlias)
drawAA(bigBuf, prim);
CORO_END_CODE;
@@ -1789,7 +1789,7 @@ void RMGfxSourceBuffer8RLEWordAA::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RM
CORO_BEGIN_CODE(_ctx);
CORO_INVOKE_2(RMGfxSourceBuffer8RLE::draw, bigBuf, prim);
- if (GLOBALS.bCfgAntiAlias)
+ if (GLOBALS._bCfgAntiAlias)
drawAA(bigBuf, prim);
CORO_END_CODE;
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index e61e6a8b84..801b4d35fb 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -49,12 +49,12 @@ void ExitAllIdles(CORO_PARAM, const void *param) {
CORO_BEGIN_CODE(_ctx);
// Closes idle
- GLOBALS.bSkipSfxNoLoop = true;
+ GLOBALS._bSkipSfxNoLoop = true;
CORO_INVOKE_2(mpalEndIdlePoll, nCurLoc, NULL);
- GLOBALS.bIdleExited = true;
- GLOBALS.bSkipSfxNoLoop = false;
+ GLOBALS._bIdleExited = true;
+ GLOBALS._bSkipSfxNoLoop = false;
CORO_END_CODE;
}
@@ -124,11 +124,11 @@ void RMGfxEngine::openOptionScreen(CORO_PARAM, int type) {
// Exists the IDLE to avoid premature death in loading
_bMustEnterMenu = true;
if (type == 1 || type == 2) {
- GLOBALS.bIdleExited = true;
+ GLOBALS._bIdleExited = true;
} else {
CORO_INVOKE_0(_tony.stopNoAction);
- GLOBALS.bIdleExited = false;
+ GLOBALS._bIdleExited = false;
CoroScheduler.createProcess(ExitAllIdles, &_nCurLoc, sizeof(int));
}
@@ -148,10 +148,10 @@ void RMGfxEngine::doFrame(CORO_PARAM, bool bDrawLocation) {
// Poll of input devices
_input.poll();
- if (_bMustEnterMenu && GLOBALS.bIdleExited) {
+ if (_bMustEnterMenu && GLOBALS._bIdleExited) {
_bOption = true;
_bMustEnterMenu = false;
- GLOBALS.bIdleExited = false;
+ GLOBALS._bIdleExited = false;
}
if (_bOption) {
@@ -365,10 +365,10 @@ void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) {
item = GLOBALS.GfxEngine->_loc.getItemFromCode(dwItem);
if (item != NULL) {
if (nPattern != -1) {
- if (GLOBALS.bPatIrqFreeze)
+ if (GLOBALS._bPatIrqFreeze)
mainFreeze();
item->setPattern(nPattern, true);
- if (GLOBALS.bPatIrqFreeze)
+ if (GLOBALS._bPatIrqFreeze)
mainUnfreeze();
}
if (nStatus != -1)
@@ -479,16 +479,16 @@ void RMGfxEngine::init() {
_vm->_window.getNewFrame(*this, NULL);
_vm->_window.repaint();
- GLOBALS.bPatIrqFreeze = true;
+ GLOBALS._bPatIrqFreeze = true;
// Activate GUI
_bGUIOption = true;
_bGUIInterface = true;
_bGUIInventory = true;
- GLOBALS.bSkipSfxNoLoop = false;
+ GLOBALS._bSkipSfxNoLoop = false;
_bMustEnterMenu = false;
- GLOBALS.bIdleExited = false;
+ GLOBALS._bIdleExited = false;
_bOption = false;
_bWiping = false;
_hWipeEvent = CoroScheduler.createEvent(false, false);
@@ -652,23 +652,23 @@ void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Comm
CharsSaveAll(f);
// Save the options
- f->writeByte(GLOBALS.bCfgInvLocked);
- f->writeByte(GLOBALS.bCfgInvNoScroll);
- f->writeByte(GLOBALS.bCfgTimerizedText);
- f->writeByte(GLOBALS.bCfgInvUp);
- f->writeByte(GLOBALS.bCfgAnni30);
- f->writeByte(GLOBALS.bCfgAntiAlias);
- f->writeByte(GLOBALS.bCfgSottotitoli);
- f->writeByte(GLOBALS.bCfgTransparence);
- f->writeByte(GLOBALS.bCfgInterTips);
- f->writeByte(GLOBALS.bCfgDubbing);
- f->writeByte(GLOBALS.bCfgMusic);
- f->writeByte(GLOBALS.bCfgSFX);
- f->writeByte(GLOBALS.nCfgTonySpeed);
- f->writeByte(GLOBALS.nCfgTextSpeed);
- f->writeByte(GLOBALS.nCfgDubbingVolume);
- f->writeByte(GLOBALS.nCfgMusicVolume);
- f->writeByte(GLOBALS.nCfgSFXVolume);
+ f->writeByte(GLOBALS._bCfgInvLocked);
+ f->writeByte(GLOBALS._bCfgInvNoScroll);
+ f->writeByte(GLOBALS._bCfgTimerizedText);
+ f->writeByte(GLOBALS._bCfgInvUp);
+ f->writeByte(GLOBALS._bCfgAnni30);
+ f->writeByte(GLOBALS._bCfgAntiAlias);
+ f->writeByte(GLOBALS._bCfgSottotitoli);
+ f->writeByte(GLOBALS._bCfgTransparence);
+ f->writeByte(GLOBALS._bCfgInterTips);
+ f->writeByte(GLOBALS._bCfgDubbing);
+ f->writeByte(GLOBALS._bCfgMusic);
+ f->writeByte(GLOBALS._bCfgSFX);
+ f->writeByte(GLOBALS._nCfgTonySpeed);
+ f->writeByte(GLOBALS._nCfgTextSpeed);
+ f->writeByte(GLOBALS._nCfgDubbingVolume);
+ f->writeByte(GLOBALS._nCfgMusicVolume);
+ f->writeByte(GLOBALS._nCfgSFXVolume);
// Save the hotspots
SaveChangedHotspot(f);
@@ -788,23 +788,23 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
if (_ctx->ver >= 6) {
// Load options
- GLOBALS.bCfgInvLocked = _ctx->f->readByte();
- GLOBALS.bCfgInvNoScroll = _ctx->f->readByte();
- GLOBALS.bCfgTimerizedText = _ctx->f->readByte();
- GLOBALS.bCfgInvUp = _ctx->f->readByte();
- GLOBALS.bCfgAnni30 = _ctx->f->readByte();
- GLOBALS.bCfgAntiAlias = _ctx->f->readByte();
- GLOBALS.bCfgSottotitoli = _ctx->f->readByte();
- GLOBALS.bCfgTransparence = _ctx->f->readByte();
- GLOBALS.bCfgInterTips = _ctx->f->readByte();
- GLOBALS.bCfgDubbing = _ctx->f->readByte();
- GLOBALS.bCfgMusic = _ctx->f->readByte();
- GLOBALS.bCfgSFX = _ctx->f->readByte();
- GLOBALS.nCfgTonySpeed = _ctx->f->readByte();
- GLOBALS.nCfgTextSpeed = _ctx->f->readByte();
- GLOBALS.nCfgDubbingVolume = _ctx->f->readByte();
- GLOBALS.nCfgMusicVolume = _ctx->f->readByte();
- GLOBALS.nCfgSFXVolume = _ctx->f->readByte();
+ GLOBALS._bCfgInvLocked = _ctx->f->readByte();
+ GLOBALS._bCfgInvNoScroll = _ctx->f->readByte();
+ GLOBALS._bCfgTimerizedText = _ctx->f->readByte();
+ GLOBALS._bCfgInvUp = _ctx->f->readByte();
+ GLOBALS._bCfgAnni30 = _ctx->f->readByte();
+ GLOBALS._bCfgAntiAlias = _ctx->f->readByte();
+ GLOBALS._bCfgSottotitoli = _ctx->f->readByte();
+ GLOBALS._bCfgTransparence = _ctx->f->readByte();
+ GLOBALS._bCfgInterTips = _ctx->f->readByte();
+ GLOBALS._bCfgDubbing = _ctx->f->readByte();
+ GLOBALS._bCfgMusic = _ctx->f->readByte();
+ GLOBALS._bCfgSFX = _ctx->f->readByte();
+ GLOBALS._nCfgTonySpeed = _ctx->f->readByte();
+ GLOBALS._nCfgTextSpeed = _ctx->f->readByte();
+ GLOBALS._nCfgDubbingVolume = _ctx->f->readByte();
+ GLOBALS._nCfgMusicVolume = _ctx->f->readByte();
+ GLOBALS._nCfgSFXVolume = _ctx->f->readByte();
// Load hotspots
LoadChangedHotspot(_ctx->f);
diff --git a/engines/tony/globals.cpp b/engines/tony/globals.cpp
index 37a5a20454..6f81e81a48 100644
--- a/engines/tony/globals.cpp
+++ b/engines/tony/globals.cpp
@@ -59,31 +59,31 @@ Globals::Globals() {
dwTonyNumTexts = 0;
bTonyInTexts = false;
bStaticTalk = false;
- bPatIrqFreeze = false;
- bCfgInvLocked = false;
- bCfgInvNoScroll = false;
- bCfgTimerizedText = false;
- bCfgInvUp = false;
- bCfgAnni30 = false;
- bCfgAntiAlias = false;
- bCfgSottotitoli = false;
- bCfgTransparence = false;
- bCfgInterTips = false;
- bCfgDubbing = false;
- bCfgMusic = false;
- bCfgSFX = false;
+ _bPatIrqFreeze = false;
+ _bCfgInvLocked = false;
+ _bCfgInvNoScroll = false;
+ _bCfgTimerizedText = false;
+ _bCfgInvUp = false;
+ _bCfgAnni30 = false;
+ _bCfgAntiAlias = false;
+ _bCfgSottotitoli = false;
+ _bCfgTransparence = false;
+ _bCfgInterTips = false;
+ _bCfgDubbing = false;
+ _bCfgMusic = false;
+ _bCfgSFX = false;
_bAlwaysDisplay = false;
- nCfgTonySpeed = 0;
- nCfgTextSpeed = 0;
- nCfgDubbingVolume = 0;
- nCfgMusicVolume = 0;
- nCfgSFXVolume = 0;
- bIdleExited = false;
- bSkipSfxNoLoop = false;
- bNoOcchioDiBue = false;
- curDialog = 0;
- curSonoriz = 0;
- bFadeOutStop = false;
+ _nCfgTonySpeed = 0;
+ _nCfgTextSpeed = 0;
+ _nCfgDubbingVolume = 0;
+ _nCfgMusicVolume = 0;
+ _nCfgSFXVolume = 0;
+ _bIdleExited = false;
+ _bSkipSfxNoLoop = false;
+ _bNoOcchioDiBue = false;
+ _curDialog = 0;
+ _curSonoriz = 0;
+ _bFadeOutStop = false;
// OSystem::MutexRef vdb;
Common::fill(&mut[0], &mut[10], 0);
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index 84c5d7398c..a675066bc1 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -187,30 +187,30 @@ public:
RMTextDialog *_curBackText;
bool _bTonyIsSpeaking;
int _curChangedHotspot;
- bool bPatIrqFreeze;
- bool bCfgInvLocked;
- bool bCfgInvNoScroll;
- bool bCfgTimerizedText;
- bool bCfgInvUp;
- bool bCfgAnni30;
- bool bCfgAntiAlias;
- bool bCfgSottotitoli;
- bool bCfgTransparence;
- bool bCfgInterTips;
- bool bCfgDubbing;
- bool bCfgMusic;
- bool bCfgSFX;
- int nCfgTonySpeed;
- int nCfgTextSpeed;
- int nCfgDubbingVolume;
- int nCfgMusicVolume;
- int nCfgSFXVolume;
- bool bSkipSfxNoLoop;
- bool bIdleExited;
- bool bNoOcchioDiBue;
- int curDialog;
- int curSonoriz;
- bool bFadeOutStop;
+ bool _bPatIrqFreeze;
+ bool _bCfgInvLocked;
+ bool _bCfgInvNoScroll;
+ bool _bCfgTimerizedText;
+ bool _bCfgInvUp;
+ bool _bCfgAnni30;
+ bool _bCfgAntiAlias;
+ bool _bCfgSottotitoli;
+ bool _bCfgTransparence;
+ bool _bCfgInterTips;
+ bool _bCfgDubbing;
+ bool _bCfgMusic;
+ bool _bCfgSFX;
+ int _nCfgTonySpeed;
+ int _nCfgTextSpeed;
+ int _nCfgDubbingVolume;
+ int _nCfgMusicVolume;
+ int _nCfgSFXVolume;
+ bool _bSkipSfxNoLoop;
+ bool _bIdleExited;
+ bool _bNoOcchioDiBue;
+ int _curDialog;
+ int _curSonoriz;
+ bool _bFadeOutStop;
RMTony *Tony;
RMPointer *Pointer;
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index bbc74afa01..162443d0bd 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -65,7 +65,7 @@ RMInventory::~RMInventory() {
}
bool RMInventory::checkPointInside(const RMPoint &pt) {
- if (!GLOBALS.bCfgInvUp)
+ if (!GLOBALS._bCfgInvUp)
return pt.y > RM_SY - 70;
else
return pt.y < 70;
@@ -201,7 +201,7 @@ void RMInventory::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
if (_state == SELECTING) {
- if (!GLOBALS.bCfgInvUp) {
+ if (!GLOBALS._bCfgInvUp) {
_ctx->pos.set((_nSelectObj + 1) * 64 - 20, RM_SY - 113);
_ctx->pos2.set((_nSelectObj + 1) * 64 + 34, RM_SY - 150);
} else {
@@ -215,7 +215,7 @@ void RMInventory::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
// Draw the mini interface
CORO_INVOKE_2(miniInterface.draw, bigBuf, _ctx->p);
- if (GLOBALS.bCfgInterTips) {
+ if (GLOBALS._bCfgInterTips) {
if (miniAction == 1) // Examine
CORO_INVOKE_2(_hints[0].draw, bigBuf, _ctx->p2);
else if (miniAction == 2) // Talk
@@ -531,7 +531,7 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
}
if (_vm->getEngine()->getInput().getAsyncKeyState(Common::KEYCODE_i)) {
- GLOBALS.bCfgInvLocked = !GLOBALS.bCfgInvLocked;
+ GLOBALS._bCfgInvLocked = !GLOBALS._bCfgInvLocked;
}
if (_bCombining) {//m_state == COMBINING)
@@ -539,9 +539,9 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
ptr.setSpecialPointer(RMPointer::PTR_CUSTOM);
}
- if (!GLOBALS.bCfgInvUp) {
- if ((_state == CLOSED) && (mpos.y > RM_SY - 10 || GLOBALS.bCfgInvLocked) && bCanOpen) {
- if (!GLOBALS.bCfgInvNoScroll) {
+ if (!GLOBALS._bCfgInvUp) {
+ if ((_state == CLOSED) && (mpos.y > RM_SY - 10 || GLOBALS._bCfgInvLocked) && bCanOpen) {
+ if (!GLOBALS._bCfgInvNoScroll) {
_state = OPENING;
_curPutY = RM_SY - 1;
_curPutTime = _vm->getTime();
@@ -550,8 +550,8 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
_curPutY = RM_SY - 68;
}
} else if (_state == OPENED) {
- if ((mpos.y < RM_SY - 70 && !GLOBALS.bCfgInvLocked) || !bCanOpen) {
- if (!GLOBALS.bCfgInvNoScroll) {
+ if ((mpos.y < RM_SY - 70 && !GLOBALS._bCfgInvLocked) || !bCanOpen) {
+ if (!GLOBALS._bCfgInvNoScroll) {
_state = CLOSING;
_curPutY = RM_SY - 68;
_curPutTime = _vm->getTime();
@@ -580,8 +580,8 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
_state = CLOSED;
}
} else {
- if ((_state == CLOSED) && (mpos.y < 10 || GLOBALS.bCfgInvLocked) && bCanOpen) {
- if (!GLOBALS.bCfgInvNoScroll) {
+ if ((_state == CLOSED) && (mpos.y < 10 || GLOBALS._bCfgInvLocked) && bCanOpen) {
+ if (!GLOBALS._bCfgInvNoScroll) {
_state = OPENING;
_curPutY = - 68;
_curPutTime = _vm->getTime();
@@ -590,8 +590,8 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
_curPutY = 0;
}
} else if (_state == OPENED) {
- if ((mpos.y > 70 && !GLOBALS.bCfgInvLocked) || !bCanOpen) {
- if (!GLOBALS.bCfgInvNoScroll) {
+ if ((mpos.y > 70 && !GLOBALS._bCfgInvLocked) || !bCanOpen) {
+ if (!GLOBALS._bCfgInvNoScroll) {
_state = CLOSING;
_curPutY = -2;
_curPutTime = _vm->getTime();
@@ -624,7 +624,7 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
int startx = (_nSelectObj + 1) * 64 - 20;
int starty;
- if (!GLOBALS.bCfgInvUp)
+ if (!GLOBALS._bCfgInvUp)
starty = RM_SY - 109;
else
starty = 70;
@@ -802,7 +802,7 @@ void RMInterface::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
_vm->playUtilSFX(1);
}
- if (GLOBALS.bCfgInterTips) {
+ if (GLOBALS._bCfgInterTips) {
prim->getDst().topLeft() = _openStart + RMPoint(70, 177);
CORO_INVOKE_2(_hints[_ctx->h].draw, bigBuf, prim);
}
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index afde5403b5..146ca65533 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -146,7 +146,7 @@ void RMPattern::stopSfx(RMSfx *sfx) {
if (_slots[i]._type == SOUND) {
if (sfx[_slots[i]._data]._name[0] == '_')
sfx[_slots[i]._data].stop();
- else if (GLOBALS.bSkipSfxNoLoop)
+ else if (GLOBALS._bSkipSfxNoLoop)
sfx[_slots[i]._data].stop();
}
}
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 93b5e90706..6d9eaf350b 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -1492,15 +1492,15 @@ void FPSFX::SetVolume(int dwVolume) {
lastVolume = dwVolume;
if (bIsVoice) {
- if (!GLOBALS.bCfgDubbing) dwVolume = 0;
+ if (!GLOBALS._bCfgDubbing) dwVolume = 0;
else {
- dwVolume -= (10 - GLOBALS.nCfgDubbingVolume) * 2;
+ dwVolume -= (10 - GLOBALS._nCfgDubbingVolume) * 2;
if (dwVolume < 0) dwVolume = 0;
}
} else {
- if (!GLOBALS.bCfgSFX) dwVolume = 0;
+ if (!GLOBALS._bCfgSFX) dwVolume = 0;
else {
- dwVolume -= (10 - GLOBALS.nCfgSFXVolume) * 2;
+ dwVolume -= (10 - GLOBALS._nCfgSFXVolume) * 2;
if (dwVolume < 0) dwVolume = 0;
}
}
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 7f7930c5d7..eab52c6b4b 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -153,23 +153,23 @@ Common::ErrorCode TonyEngine::init() {
_curThumbnail = new uint16[160 * 120];
// Set up global defaults
- GLOBALS.bCfgInvLocked = false;
- GLOBALS.bCfgInvNoScroll = false;
- GLOBALS.bCfgTimerizedText = true;
- GLOBALS.bCfgInvUp = false;
- GLOBALS.bCfgAnni30 = false;
- GLOBALS.bCfgAntiAlias = false;
- GLOBALS.bCfgTransparence = true;
- GLOBALS.bCfgInterTips = true;
- GLOBALS.bCfgSottotitoli = true;
- GLOBALS.nCfgTonySpeed = 3;
- GLOBALS.nCfgTextSpeed = 5;
- GLOBALS.bCfgDubbing = true;
- GLOBALS.bCfgMusic = true;
- GLOBALS.bCfgSFX = true;
- GLOBALS.nCfgDubbingVolume = 10;
- GLOBALS.nCfgMusicVolume = 7;
- GLOBALS.nCfgSFXVolume = 10;
+ GLOBALS._bCfgInvLocked = false;
+ GLOBALS._bCfgInvNoScroll = false;
+ GLOBALS._bCfgTimerizedText = true;
+ GLOBALS._bCfgInvUp = false;
+ GLOBALS._bCfgAnni30 = false;
+ GLOBALS._bCfgAntiAlias = false;
+ GLOBALS._bCfgTransparence = true;
+ GLOBALS._bCfgInterTips = true;
+ GLOBALS._bCfgSottotitoli = true;
+ GLOBALS._nCfgTonySpeed = 3;
+ GLOBALS._nCfgTextSpeed = 5;
+ GLOBALS._bCfgDubbing = true;
+ GLOBALS._bCfgMusic = true;
+ GLOBALS._bCfgSFX = true;
+ GLOBALS._nCfgDubbingVolume = 10;
+ GLOBALS._nCfgMusicVolume = 7;
+ GLOBALS._nCfgSFXVolume = 10;
_bQuitNow = false;
return Common::kNoError;
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index 9f34276c41..a63d2d69c3 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -138,7 +138,7 @@ void RMTony::doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
if (!_nInList && _bShow)
bigBuf->addPrim(new RMGfxPrimitive(this));
- setSpeed(GLOBALS.nCfgTonySpeed);
+ setSpeed(GLOBALS._nCfgTonySpeed);
// Runs the normal character movement
_ctx->time = _vm->getTime();