From bead956c8de3eb8548de9b799c12b46b424cc14c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 27 Apr 2007 19:59:40 +0000 Subject: Fixing more warnings svn-id: r26618 --- engines/cruise/menu.cpp | 12 ++++++------ engines/cruise/menu.h | 2 +- engines/cruise/object.cpp | 14 +++++++------- engines/cruise/vars.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp index f30775dd18..aaf28bcfd5 100644 --- a/engines/cruise/menu.cpp +++ b/engines/cruise/menu.cpp @@ -46,7 +46,7 @@ menuStruct* createMenu(int X, int Y, const char* menuName) } // TODO: rewrite to remove the goto -void addSelectableMenuEntry(int var0, int var1, menuStruct* pMenu, int var2, int color, char* menuText) +void addSelectableMenuEntry(int param0, int param1, menuStruct* pMenu, int param2, int color, const char* menuText) { menuElementStruct* di; menuElementStruct* var_6; @@ -63,7 +63,7 @@ void addSelectableMenuEntry(int var0, int var1, menuStruct* pMenu, int var2, int do { di = var_6; - if(var2) + if(param2) { if(!strcmp(var_6->string, menuText)) { @@ -72,8 +72,8 @@ void addSelectableMenuEntry(int var0, int var1, menuStruct* pMenu, int var2, int ASSERT(pSubStruct); pSubStruct->pNext = NULL; - pSubStruct->var2 = var0; - pSubStruct->var4 = var1; + pSubStruct->var2 = param0; + pSubStruct->var4 = param1; pSubStructCurrent = pNewElement->ptrSub; @@ -125,8 +125,8 @@ void addSelectableMenuEntry(int var0, int var1, menuStruct* pMenu, int var2, int pNewElement->ptrSub = pSubStruct; pSubStruct->pNext = NULL; - pSubStruct->var2 = var0; - pSubStruct->var4 = var1; + pSubStruct->var2 = param0; + pSubStruct->var4 = param1; pMenu->numElements++; } diff --git a/engines/cruise/menu.h b/engines/cruise/menu.h index 5cc983ba67..83226189db 100644 --- a/engines/cruise/menu.h +++ b/engines/cruise/menu.h @@ -39,7 +39,7 @@ typedef struct menuStruct menuStruct; extern menuStruct* menuTable[8]; menuStruct* createMenu(int X, int Y, const char* menuName); -void addSelectableMenuEntry(int var0, int var1, menuStruct* pMenu, int var2, int color, char* menuText); +void addSelectableMenuEntry(int var0, int var1, menuStruct* pMenu, int var2, int color, const char* menuText); void updateMenuMouse(int mouseX, int mouseY, menuStruct* pMenu); int processMenu(menuStruct* pMenu); void freeMenu(menuStruct* pMenu); diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp index a584aead37..6770bae57d 100644 --- a/engines/cruise/object.cpp +++ b/engines/cruise/object.cpp @@ -282,7 +282,7 @@ void setObjectPosition(int16 param1,int16 objIdx,int16 param3,int16 param4) void Op_7Sub1(int16 param1, int16 param2, objectStruct* objPtr) { int16 var; - objectStruct* var8; + objectStruct* var8_; objectStruct* var40; objectStruct* var3E; objectStruct* currentObjPtrPrevious; @@ -297,7 +297,7 @@ void Op_7Sub1(int16 param1, int16 param2, objectStruct* objPtr) match = NULL; var40 = NULL; var3E = NULL; - var8 = objPtr; + var8_ = objPtr; while(currentObjPtr2) { @@ -351,7 +351,7 @@ void Op_7Sub1(int16 param1, int16 param2, objectStruct* objPtr) if(var>var2) { - var8 = currentObjPtr2; + var8_ = currentObjPtr2; } currentObjPtrPrevious=currentObjPtrPrevious->next; @@ -364,14 +364,14 @@ void Op_7Sub1(int16 param1, int16 param2, objectStruct* objPtr) { objectStruct* temp; - temp = var8->next; + temp = var8_->next; - var8->next = var40; + var8_->next = var40; match->next = temp; - if(objPtr!=var8) + if(objPtr!=var8_) { - var40->prev = var8; + var40->prev = var8_; } if(!temp) diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h index 3fda98b0e0..091f1c23e3 100644 --- a/engines/cruise/vars.h +++ b/engines/cruise/vars.h @@ -41,7 +41,7 @@ typedef struct menuElementSubStruct menuElementSubStruct; struct menuElementStruct { struct menuElementStruct* next; - char* string; + const char* string; int x; int y; int varA; -- cgit v1.2.3