diff options
-rw-r--r-- | scumm/actor.cpp | 22 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.h | 4 | ||||
-rw-r--r-- | scumm/sound.cpp | 2 | ||||
-rw-r--r-- | scumm/string.cpp | 6 |
7 files changed, 20 insertions, 20 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index c583a04771..0ee27e40fd 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -567,7 +567,7 @@ void Actor::setDirection(int direction) { } void Actor::putActor(int dstX, int dstY, byte newRoom) { - if (visible && _vm->_currentRoom != newRoom && _vm->talkingActor() == number) { + if (visible && _vm->_currentRoom != newRoom && _vm->getTalkingActor() == number) { _vm->stopTalk(); } @@ -789,14 +789,14 @@ void Actor::showActor() { // V1 Maniac doesn't have a ScummVar for VAR_TALK_ACTOR, and just uses // an internal variable. Emulate this to prevent overwriting script vars... -int ScummEngine::talkingActor() { +int ScummEngine::getTalkingActor() { if (_gameId == GID_MANIAC && _version == 1) return _V1_talkingActor; else return VAR(VAR_TALK_ACTOR); }; -void ScummEngine::talkingActor(int value) { +void ScummEngine::setTalkingActor(int value) { if (_gameId == GID_MANIAC && _version == 1) _V1_talkingActor = value; else @@ -1158,7 +1158,7 @@ void ScummEngine::actorTalk(const byte *msg) { if (_actorToPrintStrFor == 0xFF) { if (!_keepText) stopTalk(); - talkingActor(0xFF); + setTalkingActor(0xFF); } else { int oldact; @@ -1174,21 +1174,21 @@ void ScummEngine::actorTalk(const byte *msg) { } else { if (!_keepText) stopTalk(); - talkingActor(a->number); + setTalkingActor(a->number); if (!_string[0].no_talk_anim) { a->startAnimActor(a->talkStartFrame); _useTalkAnims = true; } - oldact = talkingActor(); + oldact = getTalkingActor(); } if (oldact >= 0x80) return; } - if (((_gameId == GID_MANIAC) && (_version == 1)) || talkingActor() > 0x7F) { + if (((_gameId == GID_MANIAC) && (_version == 1)) || getTalkingActor() > 0x7F) { _charsetColor = (byte)_string[0].color; } else { - a = derefActor(talkingActor(), "actorTalk(2)"); + a = derefActor(getTalkingActor(), "actorTalk(2)"); _charsetColor = a->talkColor; } _charsetBufPos = 0; @@ -1208,7 +1208,7 @@ void ScummEngine::stopTalk() { _haveMsg = 0; _talkDelay = 0; - act = talkingActor(); + act = getTalkingActor(); if (act && act < 0x80) { Actor *a = derefActor(act, "stopTalk"); if ((a->isInCurrentRoom() && _useTalkAnims) || (_features & GF_NEW_COSTUMES)) { @@ -1216,10 +1216,10 @@ void ScummEngine::stopTalk() { _useTalkAnims = false; } if (!(_features & GF_HUMONGOUS)) - talkingActor(0xFF); + setTalkingActor(0xFF); } if (_features & GF_HUMONGOUS) - talkingActor(0); + setTalkingActor(0); _keepText = false; _charset->restoreCharsetBg(); } diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index acb95c9dcc..263e23539c 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1648,7 +1648,7 @@ void ScummEngine_v5::o5_putActorInRoom() { a = derefActor(act, "o5_putActorInRoom"); - if (a->visible && _currentRoom != room && talkingActor() == a->number) { + if (a->visible && _currentRoom != room && getTalkingActor() == a->number) { stopTalk(); } a->room = room; diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 454fdd2934..49051548f2 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1161,7 +1161,7 @@ void ScummEngine_v6::o6_putActorAtXY() { if (room == 0xFF || room == 0x7FFFFFFF) { room = a->room; } else { - if (a->visible && _currentRoom != room && talkingActor() == a->number) { + if (a->visible && _currentRoom != room && getTalkingActor() == a->number) { stopTalk(); } if (room != 0) diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 38726f9f09..66f7a89f83 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1238,7 +1238,7 @@ void ScummEngine::initScummVars() { VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles"); VAR(VAR_CHARINC) = 4; - talkingActor(0); + setTalkingActor(0); } #pragma mark - diff --git a/scumm/scumm.h b/scumm/scumm.h index 2561ad0de7..ca9cee49d2 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -777,8 +777,8 @@ public: int16 _talkDelay; void actorTalk(const byte *msg); void stopTalk(); - int talkingActor(); // Wrapper around VAR_TALK_ACTOR for V1 Maniac - void talkingActor(int variable); + int getTalkingActor(); // Wrapper around VAR_TALK_ACTOR for V1 Maniac + void setTalkingActor(int variable); // Costume class void cost_decodeData(Actor *a, int frame, uint usemask); diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 61e4da3d77..e46a43c929 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -423,7 +423,7 @@ void Sound::processSfxQueues() { _talk_sound_mode = 0; } - const int act = _vm->talkingActor(); + const int act = _vm->getTalkingActor(); if ((_sfxMode & 2) && act != 0) { Actor *a; bool b, finished; diff --git a/scumm/string.cpp b/scumm/string.cpp index bdd30a0136..3dc4fd14e4 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -98,14 +98,14 @@ void ScummEngine::CHARSET_1() { if (!_haveMsg) return; - if (!(_features & GF_NEW_CAMERA) && !(_gameId == GID_ZAK256 && talkingActor() == 0xFF)) { + if (!(_features & GF_NEW_CAMERA) && !(_gameId == GID_ZAK256 && getTalkingActor() == 0xFF)) { if ((camera._dest.x / 8) != (camera._cur.x / 8) || camera._cur.x != camera._last.x) return; } a = NULL; - if (talkingActor() != 0xFF) - a = derefActorSafe(talkingActor(), "CHARSET_1"); + if (getTalkingActor() != 0xFF) + a = derefActorSafe(getTalkingActor(), "CHARSET_1"); if (a && _string[0].overhead != 0) { if (_version <= 5) { |