From c15f2114862f2c2c3422519d578a0c8352626042 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 1 Jun 2014 10:52:39 +0200 Subject: CRUISE: Reduce the scope of some variables in actor and cruise_main --- engines/cruise/cruise_main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'engines/cruise/cruise_main.cpp') diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index b3f9308d17..f9ae722fe6 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -989,7 +989,6 @@ bool findRelation(int objOvl, int objIdx, int x, int y) { ovlDataStruct *ovl2 = NULL; ovlDataStruct *ovl3 = NULL; - //ovlDataStruct *ovl4 = NULL; if (verbOvl > 0) ovl2 = overlayTable[verbOvl].ovlData; @@ -1079,9 +1078,6 @@ void callSubRelation(menuElementSubStruct *pMenuElement, int nOvl, int nObj) { } if ((obj2Ovl == nOvl) && (pHeader->obj2Number != -1) && (pHeader->obj2Number == nObj)) { - int x = 60; - int y = 60; - objectParamsQuery params; memset(¶ms, 0, sizeof(objectParamsQuery)); // to remove warning @@ -1129,6 +1125,8 @@ void callSubRelation(menuElementSubStruct *pMenuElement, int nOvl, int nObj) { } } } else if (pHeader->type == RT_MSG) { + int x = 60; + int y = 60; if (pHeader->obj2Number >= 0) { if ((pHeader->trackX !=-1) && (pHeader->trackY !=-1) && @@ -1897,11 +1895,10 @@ void CruiseEngine::mainLoop() { // Raoul appearing when looking at the book is being there are 3 script iterations separation between the // scene being changed to the book, and the Raoul actor being frozen/disabled. This loop is a hack to ensure // that does a few extra script executions for that scene - bool bgChanged; int numIterations = 1; while (numIterations-- > 0) { - bgChanged = backgroundChanged[masterScreen]; + bool bgChanged = backgroundChanged[masterScreen]; manageScripts(&relHead); manageScripts(&procHead); -- cgit v1.2.3