From 77b5c7e4adea3485a8c3cfb215eca4471deae443 Mon Sep 17 00:00:00 2001 From: uruk Date: Tue, 22 Jul 2014 15:41:33 +0200 Subject: CGE2: Rename _commandStat to _soundStat. --- engines/cge2/cge2.cpp | 6 +++--- engines/cge2/cge2.h | 4 ++-- engines/cge2/cge2_main.cpp | 2 +- engines/cge2/snail.cpp | 16 ++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp index cddf833c24..e247cf507e 100644 --- a/engines/cge2/cge2.cpp +++ b/engines/cge2/cge2.cpp @@ -83,9 +83,9 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription) _lastTick = 0; _waitSeq = 0; _waitRef = 0; - _commandStat._wait = nullptr; - _commandStat._ref[0] = 0; - _commandStat._ref[1] = 0; + _soundStat._wait = nullptr; + _soundStat._ref[0] = 0; + _soundStat._ref[1] = 0; _taken = false; _endGame = false; for (int i = 0; i < 4; i++) diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h index cd3a56617a..48d9bc84fe 100644 --- a/engines/cge2/cge2.h +++ b/engines/cge2/cge2.h @@ -271,10 +271,10 @@ public: bool _dark; int _waitSeq; int _waitRef; - struct CommandStat { + struct { int *_wait; int _ref[2]; - } _commandStat; + } _soundStat; bool _taken; bool _endGame; bool _flag[4]; diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 51d9816445..f887bdc2fe 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -463,7 +463,7 @@ void CGE2Engine::sceneUp(int cav) { void CGE2Engine::sceneDown() { busy(true); - _commandStat._wait = nullptr; // unlock snail + _soundStat._wait = nullptr; // unlock snail Sprite *spr = _vga->_showQ->locate((_now << 8) | 254); if (spr) feedSnail(spr, kNear, _heroTab[_sex]->_ptr); diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index 1361c64469..cee4531fba 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -67,13 +67,13 @@ CommandHandler::~CommandHandler() { } void CommandHandler::runCommand() { - if (!_turbo && _vm->_commandStat._wait) { - if (*(_vm->_commandStat._wait)) + if (!_turbo && _vm->_soundStat._wait) { + if (*(_vm->_soundStat._wait)) return; else { - ++_vm->_commandStat._ref[0]; + ++_vm->_soundStat._ref[0]; warning("STUB: CommandHandler::runCommand() - Sound code missing!"); - _vm->_commandStat._wait = nullptr; + _vm->_soundStat._wait = nullptr; } } @@ -675,12 +675,12 @@ void CGE2Engine::snSound(Sprite *spr, int wav) { else { if (_sound->_smpinf._counter && wav < 20) return; - if (_commandStat._wait && ((wav & 255) > 80)) + if (_soundStat._wait && ((wav & 255) > 80)) return; - _commandStat._ref[1] = wav; - _commandStat._ref[0] = !_fx->exist(_commandStat._ref[1]); - _sound->play(_fx->load(_commandStat._ref[1], _commandStat._ref[0]), + _soundStat._ref[1] = wav; + _soundStat._ref[0] = !_fx->exist(_soundStat._ref[1]); + _sound->play(_fx->load(_soundStat._ref[1], _soundStat._ref[0]), (spr) ? (spr->_pos2D.x / (kScrWidth / 16)) : 8); } -- cgit v1.2.3