diff options
author | Max Horn | 2005-03-25 00:37:14 +0000 |
---|---|---|
committer | Max Horn | 2005-03-25 00:37:14 +0000 |
commit | 980576a4b63444d56744ec2e96496d296813196f (patch) | |
tree | e2a0bc84dfbf8b84ac9232dc99f903ec833fd033 /scumm | |
parent | 99997aefc3e389928cd94078c363a49819805cb0 (diff) | |
download | scummvm-rg350-980576a4b63444d56744ec2e96496d296813196f.tar.gz scummvm-rg350-980576a4b63444d56744ec2e96496d296813196f.tar.bz2 scummvm-rg350-980576a4b63444d56744ec2e96496d296813196f.zip |
Do not use (non-const) local static variables
svn-id: r17221
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 10 | ||||
-rw-r--r-- | scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.h | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 15cbc22dbd..d13f79e51c 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1287,12 +1287,10 @@ void ScummEngine::actorTalk(const byte *msg) { if (_heversion >= 72 || getTalkingActor() > 0x7F) { _charsetColor = (byte)_string[0].color; } else if (_features & GF_NES) { - static int NES_lastActor = 0; - static int NES_color = 0; - if (NES_lastActor != getTalkingActor()) - NES_color ^= 1; - NES_lastActor = getTalkingActor(); - _charsetColor = NES_color; + if (_NES_lastTalkingActor != getTalkingActor()) + _NES_talkColor ^= 1; + _NES_lastTalkingActor = getTalkingActor(); + _charsetColor = _NES_talkColor; } else { a = derefActor(getTalkingActor(), "actorTalk(2)"); _charsetColor = a->_talkColor; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 9261c3fca0..b64594d029 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -852,6 +852,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _confirmExit = false; _voiceMode = 0; _talkDelay = 0; + _NES_lastTalkingActor = 0; + _NES_talkColor = 0; _keepText = false; _existLanguageFile = false; _languageBuffer = NULL; diff --git a/scumm/scumm.h b/scumm/scumm.h index 5163ee63fd..3d487f483a 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -836,6 +836,9 @@ public: SentenceTab _sentence[NUM_SENTENCE]; StringTab _string[6]; int16 _talkDelay; + int _NES_lastTalkingActor; + int _NES_talkColor; + void actorTalk(const byte *msg); void stopTalk(); int getTalkingActor(); // Wrapper around VAR_TALK_ACTOR for V1 Maniac |