MADS: Rename some outstanding 'abortTimers' to the more proper 'endTrigger'

This commit is contained in:
Paul Gilbert 2015-03-08 19:54:00 -04:00
parent 62c1485df2
commit 29ac19947f
3 changed files with 12 additions and 12 deletions

View file

@ -69,7 +69,7 @@ void KernelMessages::clear() {
} }
int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags, int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags,
uint8 abortTimers, uint32 timeout, const Common::String &msg) { int endTrigger, uint32 timeout, const Common::String &msg) {
Scene &scene = _vm->_game->_scene; Scene &scene = _vm->_game->_scene;
// Find a free slot // Find a free slot
@ -77,7 +77,7 @@ int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags,
while ((idx < _entries.size()) && ((_entries[idx]._flags & KMSG_ACTIVE) != 0)) while ((idx < _entries.size()) && ((_entries[idx]._flags & KMSG_ACTIVE) != 0))
++idx; ++idx;
if (idx == _entries.size()) { if (idx == _entries.size()) {
if (abortTimers == 0) if (endTrigger == 0)
return -1; return -1;
error("KernelMessages overflow"); error("KernelMessages overflow");
@ -92,7 +92,7 @@ int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags,
rec._textDisplayIndex = -1; rec._textDisplayIndex = -1;
rec._timeout = timeout; rec._timeout = timeout;
rec._frameTimer = _vm->_game->_priorFrameTimer; rec._frameTimer = _vm->_game->_priorFrameTimer;
rec._trigger = abortTimers; rec._trigger = endTrigger;
rec._abortMode = _vm->_game->_triggerSetupMode; rec._abortMode = _vm->_game->_triggerSetupMode;
rec._actionDetails = scene._action._activeAction; rec._actionDetails = scene._action._activeAction;
@ -104,10 +104,10 @@ int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags,
return idx; return idx;
} }
int KernelMessages::addQuote(int quoteId, int abortTimers, uint32 timeout) { int KernelMessages::addQuote(int quoteId, int endTrigger, uint32 timeout) {
Common::String quoteStr = _vm->_game->getQuote(quoteId); Common::String quoteStr = _vm->_game->getQuote(quoteId);
return add(Common::Point(), 0x1110, KMSG_PLAYER_TIMEOUT | KMSG_CENTER_ALIGN, return add(Common::Point(), 0x1110, KMSG_PLAYER_TIMEOUT | KMSG_CENTER_ALIGN,
abortTimers, timeout, quoteStr); endTrigger, timeout, quoteStr);
} }
void KernelMessages::scrollMessage(int msgIndex, int numTicks, bool quoted) { void KernelMessages::scrollMessage(int msgIndex, int numTicks, bool quoted) {

View file

@ -99,9 +99,9 @@ public:
~KernelMessages(); ~KernelMessages();
void clear(); void clear();
int add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, int add(const Common::Point &pt, uint fontColor, uint8 flags, int endTrigger,
uint32 timeout, const Common::String &msg); uint32 timeout, const Common::String &msg);
int addQuote(int quoteId, int abortTimers, uint32 timeout); int addQuote(int quoteId, int endTrigger, uint32 timeout);
void scrollMessage(int msgIndex, int numTicks, bool quoted); void scrollMessage(int msgIndex, int numTicks, bool quoted);
void setSeqIndex(int msgIndex, int seqIndex); void setSeqIndex(int msgIndex, int seqIndex);
void remove(int msgIndex); void remove(int msgIndex);

View file

@ -165,16 +165,16 @@ void Scene201::enter() {
int sepChar = (_globals[kSexOfRex] == SEX_MALE) ? 't' : 'u'; int sepChar = (_globals[kSexOfRex] == SEX_MALE) ? 't' : 'u';
// Guess values. What is the default value used by the compiler? // Guess values. What is the default value used by the compiler?
int suffixNum = -1; int suffixNum = -1;
int abortTimers = -1; int endTrigger = -1;
switch(_globals[kTeleporterCommand]) { switch(_globals[kTeleporterCommand]) {
case 1: case 1:
suffixNum = 3; suffixNum = 3;
abortTimers = 76; endTrigger = 76;
_globals[kTeleporterUnderstood] = true; _globals[kTeleporterUnderstood] = true;
break; break;
case 2: case 2:
suffixNum = 1; suffixNum = 1;
abortTimers = 77; endTrigger = 77;
break; break;
case 3: case 3:
_game._player._visible = true; _game._player._visible = true;
@ -183,12 +183,12 @@ void Scene201::enter() {
break; break;
case 4: case 4:
suffixNum = 2; suffixNum = 2;
abortTimers = 78; endTrigger = 78;
break; break;
} }
_globals[kTeleporterCommand] = 0; _globals[kTeleporterCommand] = 0;
if (suffixNum >= 0) if (suffixNum >= 0)
_scene->loadAnimation(formAnimName(sepChar, suffixNum), abortTimers); _scene->loadAnimation(formAnimName(sepChar, suffixNum), endTrigger);
} }
if ((_scene->_priorSceneId == 202) && (_globals[kMeteorologistStatus] == METEOROLOGIST_PRESENT) && !_scene->_roomChanged) { if ((_scene->_priorSceneId == 202) && (_globals[kMeteorologistStatus] == METEOROLOGIST_PRESENT) && !_scene->_roomChanged) {