From 03777f18671da0dd0913c462715ba1daa57427f9 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 13 Dec 2010 00:03:15 +0000 Subject: MOHAWK: Use named constants for LB control modes svn-id: r54897 --- engines/mohawk/livingbooks.cpp | 10 +++++----- engines/mohawk/livingbooks.h | 7 +++++++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 8b06f6a021..18fa00d987 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -1594,7 +1594,7 @@ LBItem::LBItem(MohawkEngine_LivingBooks *vm, Common::Rect rect) : _vm(vm), _rect _timingMode = kLBAutoNone; _periodMin = 0; _periodMax = 0; - _controlMode = 0; + _controlMode = kLBControlNone; _soundMode = 0; _neverEnabled = true; @@ -2037,12 +2037,12 @@ bool LBItem::togglePlaying(bool playing, bool restart) { else _loops = _loopMode; - if (_controlMode >= 1) { + if (_controlMode >= kLBControlHideMouse) { debug(2, "Hiding cursor"); _vm->_cursor->hideCursor(); // TODO: lock sound? - if (_controlMode >= 2) { + if (_controlMode >= kLBControlPauseItems) { debug(2, "Disabling all"); _vm->setEnableForAll(false, this); } @@ -2075,12 +2075,12 @@ void LBItem::done(bool onlyNotify) { _loops = 0; _startTime = 0; - if (_controlMode >= 1) { + if (_controlMode >= kLBControlHideMouse) { debug(2, "Showing cursor"); _vm->_cursor->showCursor(); // TODO: unlock sound? - if (_controlMode >= 2) { + if (_controlMode >= kLBControlPauseItems) { debug(2, "Enabling all"); _vm->setEnableForAll(true, this); } diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h index 5fe3f8ee2c..b192c9fe05 100644 --- a/engines/mohawk/livingbooks.h +++ b/engines/mohawk/livingbooks.h @@ -67,6 +67,13 @@ enum { kLBAutoLoad = 7 }; +// control modes used in _controlMode +enum { + kLBControlNone = 0, + kLBControlHideMouse = 1, + kLBControlPauseItems = 2 +}; + enum { kLBStaticTextItem = 0x1, kLBPictureItem = 0x2, -- cgit v1.2.3