aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Milburn2010-12-13 00:03:15 +0000
committerAlyssa Milburn2010-12-13 00:03:15 +0000
commit03777f18671da0dd0913c462715ba1daa57427f9 (patch)
tree597750f6c9c312f0576fdf8b3fcaaec05bb81858
parent679f67b2e790c48571ddbc1c6f31755479927e7d (diff)
downloadscummvm-rg350-03777f18671da0dd0913c462715ba1daa57427f9.tar.gz
scummvm-rg350-03777f18671da0dd0913c462715ba1daa57427f9.tar.bz2
scummvm-rg350-03777f18671da0dd0913c462715ba1daa57427f9.zip
MOHAWK: Use named constants for LB control modes
svn-id: r54897
-rw-r--r--engines/mohawk/livingbooks.cpp10
-rw-r--r--engines/mohawk/livingbooks.h7
2 files changed, 12 insertions, 5 deletions
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,