From 2e388b33433431fab1e3ee308c77a62e7c34f032 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 9 Feb 2014 00:29:52 +0100 Subject: TSAGE: Ringworld - Reduce the scope of a couple of variables --- engines/tsage/ringworld/ringworld_dialogs.cpp | 3 +-- engines/tsage/ringworld/ringworld_scenes3.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/tsage/ringworld/ringworld_dialogs.cpp b/engines/tsage/ringworld/ringworld_dialogs.cpp index 4728e66cd9..d512806903 100644 --- a/engines/tsage/ringworld/ringworld_dialogs.cpp +++ b/engines/tsage/ringworld/ringworld_dialogs.cpp @@ -385,7 +385,6 @@ void InventoryDialog::execute() { if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory()) RING_INVENTORY._selectedItem->setCursor(); - GfxElement *hiliteObj; bool lookFlag = false; _gfxManager.activate(); @@ -399,7 +398,7 @@ void InventoryDialog::execute() { if (g_vm->shouldQuit()) break; - hiliteObj = NULL; + GfxElement *hiliteObj = nullptr; if ((event.eventType == EVENT_BUTTON_DOWN) && !_bounds.contains(event.mousePos)) break; diff --git a/engines/tsage/ringworld/ringworld_scenes3.cpp b/engines/tsage/ringworld/ringworld_scenes3.cpp index e834e659b5..5f33652458 100644 --- a/engines/tsage/ringworld/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld/ringworld_scenes3.cpp @@ -4946,8 +4946,6 @@ void Scene2310::synchronize(Serializer &s) { } void Scene2310::process(Event &event) { - int frameNum = 0; - if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN)) { int idx = 0; while (idx < 5) { @@ -4961,7 +4959,7 @@ void Scene2310::process(Event &event) { if (_wireIndex == 5) { // No wire is currently active, so start moving designated wire _wireIndex = idx; - frameNum = idx + 2; + int frameNum = idx + 2; if (event.mousePos.y > 105) idx = findObject(idx); -- cgit v1.2.3