From a48ff3713b150589e6530dbc6a3ea079787f405d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 6 Aug 2017 19:27:56 -0400 Subject: TITANIC: Renaming in SuccUBus classes for better clarity --- engines/titanic/npcs/bilge_succubus.cpp | 9 +++++---- engines/titanic/npcs/succubus.cpp | 8 ++++---- engines/titanic/npcs/succubus.h | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'engines/titanic/npcs') diff --git a/engines/titanic/npcs/bilge_succubus.cpp b/engines/titanic/npcs/bilge_succubus.cpp index 84baa1865c..a1fc46874c 100644 --- a/engines/titanic/npcs/bilge_succubus.cpp +++ b/engines/titanic/npcs/bilge_succubus.cpp @@ -73,7 +73,8 @@ bool CBilgeSuccUBus::FrameMsg(CFrameMsg *msg) { bool CBilgeSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) { CPetControl *pet = getPetControl(); - if (_style) { + if (_motherBlocked) { + // Mother hasn't yet been unblocked, so don't receive anything if (_receiveStartFrame >= 0) playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_WAIT_FOR_FINISH); if (_afterReceiveStartFrame >= 0) @@ -130,7 +131,7 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { _isFeathers = mailObject->getName() == "Feathers"; _sendAction = SA_SENT; - if (_style) { + if (_motherBlocked) { if (_isFeathers) { startTalking(this, 230022); _sendAction = SA_FEATHERS; @@ -189,7 +190,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { playSound("z#30.wav"); } else { if (msg->_endFrame == _onEndFrame && pet) { - if (_style) { + if (_motherBlocked) { startTalking(this, getRandomNumber(1) ? 230062 : 230063); } else if (!findMail(pet->getRoomFlags())) { switch (getRandomNumber(4)) { @@ -254,7 +255,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { } else if (msg->_endFrame == _sneezing2EndFrame) { changeView("BilgeRoomWith.Node 1.N", ""); - _style = false; + _motherBlocked = false; resetMail(); if (_mailP) { diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp index 1155eb08b2..522269b41b 100644 --- a/engines/titanic/npcs/succubus.cpp +++ b/engines/titanic/npcs/succubus.cpp @@ -47,7 +47,7 @@ BEGIN_MESSAGE_MAP(CSuccUBus, CTrueTalkNPC) END_MESSAGE_MAP() bool CSuccUBus::_isOn; -bool CSuccUBus::_style; +bool CSuccUBus::_motherBlocked; bool CSuccUBus::_enabled; CSuccUBus::CSuccUBus() : CTrueTalkNPC() { @@ -118,7 +118,7 @@ void CSuccUBus::save(SimpleFile *file, int indent) { file->writeNumberLine(_okEndFrame, indent); file->writeNumberLine(_flagsComparison, indent); - file->writeNumberLine(_style, indent); + file->writeNumberLine(_motherBlocked, indent); file->writeNumberLine(_afterReceiveStartFrame, indent); file->writeNumberLine(_afterReceiveEndFrame, indent); file->writeNumberLine(_trayOutStartFrame, indent); @@ -181,7 +181,7 @@ void CSuccUBus::load(SimpleFile *file) { _okEndFrame = file->readNumber(); _flagsComparison = (RoomFlagsComparison)file->readNumber(); - _style = file->readNumber(); + _motherBlocked = file->readNumber(); _afterReceiveStartFrame = file->readNumber(); _afterReceiveEndFrame = file->readNumber(); _trayOutStartFrame = file->readNumber(); @@ -571,7 +571,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { stopSound(_soundHandle); _soundHandle = -1; - switch (getRandomNumber(_style ? 7 : 5, &_priorRandomVal2)) { + switch (getRandomNumber(_motherBlocked ? 7 : 5, &_priorRandomVal2)) { case 2: startTalking(this, 230001, findView()); break; diff --git a/engines/titanic/npcs/succubus.h b/engines/titanic/npcs/succubus.h index 483ef54f47..94e0bebe54 100644 --- a/engines/titanic/npcs/succubus.h +++ b/engines/titanic/npcs/succubus.h @@ -50,7 +50,7 @@ class CSuccUBus : public CTrueTalkNPC { bool MouseDragStartMsg(CMouseDragStartMsg *msg); protected: static bool _isOn; - static bool _style; + static bool _motherBlocked; static bool _enabled; protected: int _initialStartFrame; -- cgit v1.2.3