Skip to content

Commit

Permalink
TONY: Moved global initialisations out of TonyEngine and into Globals…
Browse files Browse the repository at this point in the history
… class
  • Loading branch information
dreammaster committed Jun 17, 2012
1 parent d0c6497 commit b554063
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 36 deletions.
37 changes: 19 additions & 18 deletions engines/tony/globals.cpp
Expand Up @@ -60,32 +60,14 @@ 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;
_curDialog = 0;
_curSoundEffect = 0;
_bFadeOutStop = false;

// OSystem::MutexRef vdb;
Common::fill(&_mut[0], &_mut[10], 0);
_bSkipIdle = false;
_hSkipIdle = 0;
Expand Down Expand Up @@ -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
18 changes: 0 additions & 18 deletions engines/tony/tony.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit b554063

Please sign in to comment.