From b9bfa3a85704c705e7b628a28d9e34a32e210ceb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:26 +0100 Subject: TONY: Make GPL headers consistent in themselves. --- engines/tony/inventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tony/inventory.cpp') diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp index 6b023d5990..1ffc0a4cf4 100644 --- a/engines/tony/inventory.cpp +++ b/engines/tony/inventory.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3 From f358ec74f7ac4575e5450fd468a46aba2190da91 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 28 Feb 2014 22:47:36 +0100 Subject: TONY: Reduce the scope of some more variables --- engines/tony/inventory.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'engines/tony/inventory.cpp') diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp index 1ffc0a4cf4..974be8b04d 100644 --- a/engines/tony/inventory.cpp +++ b/engines/tony/inventory.cpp @@ -457,8 +457,6 @@ bool RMInventory::rightRelease(const RMPoint &mpos, RMTonyAction &curAction) { #define INVSPEED 20 void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen) { - bool bNeedRedraw = false; - if (_state != CLOSED) { // Clean up the OT list g_system->lockMutex(_csModifyInterface); @@ -466,6 +464,8 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo // DoFrame makes all the objects currently in the inventory be displayed // @@@ Maybe we should do all takeable objects? Please does not help + bool bNeedRedraw = false; + for (int i = 0; i < _nInv; i++) { if (_items[_inv[i]]._icon.doFrame(this, false) && (i >= _curPos && i <= _curPos + 7)) bNeedRedraw = true; @@ -698,9 +698,8 @@ int RMInventory::loadState(byte *state) { state += 4; } - int x; for (int i = 0; i < 256; i++) { - x = READ_LE_UINT32(state); + int x = READ_LE_UINT32(state); state += 4; if (i < _nItems) { -- cgit v1.2.3