diff options
author | RichieSams | 2015-01-18 17:06:24 -0600 |
---|---|---|
committer | RichieSams | 2015-01-18 17:06:37 -0600 |
commit | a26a9c7268d27cb1f7407f5cf48038303f443197 (patch) | |
tree | 913309792fcaf397813cc5565e0c0cc47c1df3db /engines/zvision/graphics/cursors | |
parent | 762e2ca69be7f4bba789ed7decad39e241dd03c5 (diff) | |
download | scummvm-rg350-a26a9c7268d27cb1f7407f5cf48038303f443197.tar.gz scummvm-rg350-a26a9c7268d27cb1f7407f5cf48038303f443197.tar.bz2 scummvm-rg350-a26a9c7268d27cb1f7407f5cf48038303f443197.zip |
ZVISION: Fix formatting and add curlies
Diffstat (limited to 'engines/zvision/graphics/cursors')
-rw-r--r-- | engines/zvision/graphics/cursors/cursor_manager.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/engines/zvision/graphics/cursors/cursor_manager.cpp b/engines/zvision/graphics/cursors/cursor_manager.cpp index 1e048efedf..eeab18f4ba 100644 --- a/engines/zvision/graphics/cursors/cursor_manager.cpp +++ b/engines/zvision/graphics/cursors/cursor_manager.cpp @@ -124,31 +124,30 @@ void CursorManager::cursorDown(bool pushed) { } void CursorManager::changeCursor(int id) { - int _id = id; - - if (_item && - (_id == CursorIndex_Active || - _id == CursorIndex_Idle || - _id == CursorIndex_HandPu)) { - - if (_id == CursorIndex_Idle) - _id = CursorIndex_ItemIdle; - else - _id = CursorIndex_ItemAct; + if (_item && (id == CursorIndex_Active || + id == CursorIndex_Idle || + id == CursorIndex_HandPu)) { + if (id == CursorIndex_Idle) { + id = CursorIndex_ItemIdle; + } else { + id = CursorIndex_ItemAct; + } } - if (_currentCursor != _id || - ((_id == CursorIndex_ItemAct || _id == CursorIndex_ItemIdle) && _lastitem != _item)) { - _currentCursor = _id; + if (_currentCursor != id || ((id == CursorIndex_ItemAct || id == CursorIndex_ItemIdle) && _lastitem != _item)) { + _currentCursor = id; _lastitem = _item; changeCursor(_cursors[_currentCursor][_cursorIsPushed]); } } int CursorManager::getCursorId(const Common::String &name) { - for (int i = 0; i < NUM_CURSORS; i++) - if (name.equals(_cursorNames[i])) + for (int i = 0; i < NUM_CURSORS; i++) { + if (name.equals(_cursorNames[i])) { return i; + } + } + return CursorIndex_Idle; } |