Skip to content

Commit

Permalink
TONY: Extra initialisation of globals
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jun 2, 2012
1 parent a850eab commit 3927d90
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions engines/tony/globals.cpp
Expand Up @@ -26,6 +26,7 @@
namespace Tony {

Globals::Globals() {
Common::fill(nextMusic, nextMusic + MAX_PATH, 0);
nextLoop = false;
nextChannel = 0;
nextSync = 0;
Expand Down Expand Up @@ -71,6 +72,7 @@ Globals::Globals() {
bCfgDubbing = false;
bCfgMusic = false;
bCfgSFX = false;
bAlwaysDisplay = false;
nCfgTonySpeed = 0;
nCfgTextSpeed = 0;
nCfgDubbingVolume = 0;
Expand Down Expand Up @@ -129,6 +131,15 @@ Globals::Globals() {
nExecutingDialog = 0;
nExecutingChoice = 0;
nSelectedChoice = 0;
nTonyNextTalkType = RMTony::TALK_NORMAL;
saveTonyLoc = 0;

for (int i = 0; i < 16; ++i)
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);
for (int i = 0; i < 256; ++i)
Common::fill((byte *)&ChangedHotspot[i], (byte *)&ChangedHotspot[i] + sizeof(ChangedHotspotStruct), 0);
}

} // End of namespace Tony

0 comments on commit 3927d90

Please sign in to comment.