diff options
author | Paul Gilbert | 2016-08-22 20:22:41 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-22 20:22:41 -0400 |
commit | 8b3829549a2c82a09f7475c35173238f7470d587 (patch) | |
tree | c0965bfcae7153af1f831be1204726644d99da9e /engines/titanic/npcs/parrot.cpp | |
parent | 65bc8cb83c01cc1e7e6c8c093b8f42080800718d (diff) | |
download | scummvm-rg350-8b3829549a2c82a09f7475c35173238f7470d587.tar.gz scummvm-rg350-8b3829549a2c82a09f7475c35173238f7470d587.tar.bz2 scummvm-rg350-8b3829549a2c82a09f7475c35173238f7470d587.zip |
TITANIC: Cleanup of engine references
Diffstat (limited to 'engines/titanic/npcs/parrot.cpp')
-rw-r--r-- | engines/titanic/npcs/parrot.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp index 62b070efa4..53e6884415 100644 --- a/engines/titanic/npcs/parrot.cpp +++ b/engines/titanic/npcs/parrot.cpp @@ -23,7 +23,6 @@ #include "titanic/npcs/parrot.h" #include "titanic/core/project_item.h" #include "titanic/carry/carry.h" -#include "titanic/titanic.h" namespace Titanic { @@ -426,7 +425,7 @@ bool CParrot::ParrotSpeakMsg(CParrotSpeakMsg *msg) { } // Don't have the parrot speak too often - if ((g_vm->_events->getTicksCount() - _field120) < 20000 || _field100) + if ((getTicksCount() - _field120) < 20000 || _field100) return true; playSound("z#475.wav", 50); @@ -446,8 +445,8 @@ bool CParrot::ParrotSpeakMsg(CParrotSpeakMsg *msg) { else if (msg->_action == "EnterView") startTalking("PerchedParrot", 80159); } else if (msg->_target == "Cellpoints") { - if (g_vm->getRandomNumber(2) == 0) { - switch (g_vm->getRandomNumber(2)) { + if (getRandomNumber(2) == 0) { + switch (getRandomNumber(2)) { case 0: startTalking("PerchedParrot", 80193); break; @@ -473,7 +472,7 @@ bool CParrot::ParrotSpeakMsg(CParrotSpeakMsg *msg) { } } - _field120 = g_vm->_events->getTicksCount(); + _field120 = getTicksCount(); return true; } @@ -502,8 +501,8 @@ bool CParrot::NPCPlayIdleAnimationMsg(CNPCPlayIdleAnimationMsg *msg) { && _visible && !_v4 && !compareViewNameTo("ParrotLobby.Node 1.N")) { CGameObject *dragItem = getDraggingObject(); if (!dragItem || dragItem->getName() == "Chicken") { - if (!_v5 || g_vm->getRandomNumber(3) != 0) { - if (g_vm->getRandomNumber(1)) { + if (!_v5 ||getRandomNumber(3) != 0) { + if (getRandomNumber(1)) { startTalking(this, 280267, findView()); } else { msg->_names = NAMES; |