aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-06-17 15:01:13 +1000
committerPaul Gilbert2012-06-17 15:01:13 +1000
commitb554063d3018a39f328f0cd818b03546918c60d6 (patch)
treeb7d8584ba72cc799b0baac27e1a3f975f23ebc58 /engines
parentd0c649721276e289745124f28005c08d61381070 (diff)
downloadscummvm-rg350-b554063d3018a39f328f0cd818b03546918c60d6.tar.gz
scummvm-rg350-b554063d3018a39f328f0cd818b03546918c60d6.tar.bz2
scummvm-rg350-b554063d3018a39f328f0cd818b03546918c60d6.zip
TONY: Moved global initialisations out of TonyEngine and into Globals class
Diffstat (limited to 'engines')
-rw-r--r--engines/tony/globals.cpp37
-rw-r--r--engines/tony/tony.cpp18
2 files changed, 19 insertions, 36 deletions
diff --git a/engines/tony/globals.cpp b/engines/tony/globals.cpp
index 9115dafd63..3042b5843a 100644
--- a/engines/tony/globals.cpp
+++ b/engines/tony/globals.cpp
@@ -60,24 +60,7 @@ Globals::Globals() {
_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;
_bAlwaysDisplay = false;
- _nCfgTonySpeed = 0;
- _nCfgTextSpeed = 0;
- _nCfgDubbingVolume = 0;
- _nCfgMusicVolume = 0;
- _nCfgSFXVolume = 0;
_bIdleExited = false;
_bSkipSfxNoLoop = false;
_bNoBullsEye = false;
@@ -85,7 +68,6 @@ Globals::Globals() {
_curSoundEffect = 0;
_bFadeOutStop = false;
-// OSystem::MutexRef vdb;
Common::fill(&_mut[0], &_mut[10], 0);
_bSkipIdle = false;
_hSkipIdle = 0;
@@ -143,6 +125,25 @@ Globals::Globals() {
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);
+
+ // Set up globals that have explicit initial values
+ _bCfgInvLocked = false;
+ _bCfgInvNoScroll = false;
+ _bCfgTimerizedText = true;
+ _bCfgInvUp = false;
+ _bCfgAnni30 = false;
+ _bCfgAntiAlias = false;
+ _bCfgTransparence = true;
+ _bCfgInterTips = true;
+ _bCfgSottotitoli = true;
+ _nCfgTonySpeed = 3;
+ _nCfgTextSpeed = 5;
+ _bCfgDubbing = true;
+ _bCfgMusic = true;
+ _bCfgSFX = true;
+ _nCfgDubbingVolume = 10;
+ _nCfgMusicVolume = 7;
+ _nCfgSFXVolume = 10;
}
} // End of namespace Tony
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 094e1bd038..91204763b3 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -167,24 +167,6 @@ Common::ErrorCode TonyEngine::init() {
// Allocate space for thumbnails when saving the game
_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;
_bQuitNow = false;
return Common::kNoError;