aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorFilippos Karapetis2007-04-27 18:54:33 +0000
committerFilippos Karapetis2007-04-27 18:54:33 +0000
commitbfe346afd2e59fa42645e4f4b292a71e1a1704f3 (patch)
treeada7e8184c09c018a831f03a61820610fa553a4d /engines/cruise
parentb5bc32cf56575286c0b6653d130f0f3980023df7 (diff)
downloadscummvm-rg350-bfe346afd2e59fa42645e4f4b292a71e1a1704f3.tar.gz
scummvm-rg350-bfe346afd2e59fa42645e4f4b292a71e1a1704f3.tar.bz2
scummvm-rg350-bfe346afd2e59fa42645e4f4b292a71e1a1704f3.zip
Fixed loads of warnings with MSVC and gcc
svn-id: r26615
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/actor.cpp14
-rw-r--r--engines/cruise/cruise_main.cpp18
-rw-r--r--engines/cruise/ctp.cpp24
-rw-r--r--engines/cruise/dataLoader.cpp16
-rw-r--r--engines/cruise/font.cpp6
-rw-r--r--engines/cruise/gfxModule.cpp4
-rw-r--r--engines/cruise/menu.cpp8
-rw-r--r--engines/cruise/object.cpp2
-rw-r--r--engines/cruise/overlay.cpp12
-rw-r--r--engines/cruise/script.cpp14
10 files changed, 67 insertions, 51 deletions
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index b819eb680c..1cedb816e0 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -640,7 +640,7 @@ void valide_noeud( int16 table[], int16 p, int *nclick, int16 solution0[20+3][2]
}
//computePathfinding(returnVar2, params.X, params.Y, var34, var35, currentActor->stepX, currentActor->stepY);
-int16 computePathfinding(int16* pSolution, int16 X, int16 Y, int16 destX, int16 destY, int16 stepX, int16 stepY, int16 oldPathId)
+int16 computePathfinding(int16* pSolution, int16 _X, int16 _Y, int16 destX, int16 destY, int16 stepX, int16 stepY, int16 oldPathId)
{
persoStruct* perso;
int num;
@@ -689,8 +689,8 @@ int16 computePathfinding(int16* pSolution, int16 X, int16 Y, int16 destX, int16
perso->inc_jo1 = stepX;
perso->inc_jo2 = stepY;
- *(ptr++) = X;
- *(ptr++) = Y;
+ *(ptr++) = _X;
+ *(ptr++) = _Y;
*(ptr++) = pSolution[0] = destX;
*(ptr++) = pSolution[1] = destY;
*(ptr++) = -1;
@@ -707,7 +707,7 @@ int16 computePathfinding(int16* pSolution, int16 X, int16 Y, int16 destX, int16
ctpVar19=ctpVar11;
flag_aff_chemin=0;
- if (X==destX && Y==destY)
+ if (_X==destX && _Y==destY)
{
pSolution[0]=-1;
pSolution[1]=-1;
@@ -717,12 +717,12 @@ int16 computePathfinding(int16* pSolution, int16 X, int16 Y, int16 destX, int16
/******* cherche le premier noeud ******/
- getPixel(X,Y);
+ getPixel(_X,_Y);
pSolution[4] = computedVar14;
- x_mouse = X;
- y_mouse = Y;
+ x_mouse = _X;
+ y_mouse = _Y;
if (!flag_obstacle || (point_select=point_proche(ctp_routeCoords))==-1)
{
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 25ec7ec273..99205b5bab 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -728,7 +728,7 @@ int getCursorFromObject(int mouseX, int mouseY, int* outX, int* outY)
if((var_4 != var_16) && (var_2 != var_14))
{
- objectParamsQuery params;
+ params;
getMultipleObjectParam(var_16, var_14, &params);
var_C = params.X;
@@ -893,7 +893,7 @@ int buildInventorySub1(int overlayIdx, int objIdx)
void buildInventory(int X, int Y)
{
- int numObjectInInventory;
+ int numObjectInInventory = 0;
menuStruct* pMenu;
pMenu = createMenu(X, Y, "Inventaire");
@@ -1131,7 +1131,7 @@ int callInventoryObject(int param0, int param1, int x, int y)
{
if(var_22->specialString1)
{
- char* ptr = getObjectName(var_34->varNameOffset, var_22->specialString1);
+ ptr = getObjectName(var_34->varNameOffset, var_22->specialString1);
var_2C = 1;
@@ -1163,8 +1163,8 @@ int processInventory(void)
if(pMenuElementSub)
{
- int var2;
- int var4;
+ //int var2;
+ //int var4;
var2 = pMenuElementSub->var2;
var4 = pMenuElementSub->var4;
@@ -1190,9 +1190,9 @@ int processInput(void)
{
menuStruct* var_5C;
- int16 mouseX;
- int16 mouseY;
- int16 button;
+ int16 mouseX = 0;
+ int16 mouseY = 0;
+ int16 button = 0;
/*if(inputSub1keyboad())
{
@@ -1476,7 +1476,7 @@ void mainLoop(void)
int frames=0; /* Number of frames displayed */
//int32 t_start,t_left;
//uint32 t_end;
- int32 q=0; /* Dummy */
+ //int32 q=0; /* Dummy */
int enableUser = 0;
//int16 mouseX;
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index 10a09f6260..b0fadc765f 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -89,7 +89,7 @@ void loadCtpSub2(short int coordCount, short int* ptr) // coordCount = ctp_r
}
}
-void getWalkBoxCenter(int boxIdx, uint16* walkboxTable)
+void getWalkBoxCenter(int boxIdx, uint16* _walkboxTable)
{
int minX = 1000;
int minY = 1000;
@@ -97,12 +97,12 @@ void getWalkBoxCenter(int boxIdx, uint16* walkboxTable)
int maxY = -1;
ASSERT(boxIdx <= 15); // max number of walkboxes is 16
- ASSERT(walkboxTable[boxIdx * 40]); // we should never have an empty walk box
+ ASSERT(_walkboxTable[boxIdx * 40]); // we should never have an empty walk box
- if(walkboxTable[boxIdx * 40] > 0)
+ if(_walkboxTable[boxIdx * 40] > 0)
{
- int numPoints = walkboxTable[boxIdx * 40];
- uint16* pCurrentPtr = walkboxTable + (boxIdx * 40) + 1;
+ int numPoints = _walkboxTable[boxIdx * 40];
+ uint16* pCurrentPtr = _walkboxTable + (boxIdx * 40) + 1;
int i;
@@ -169,7 +169,7 @@ void renderCTPWalkBox(int X1, int Y1, int X2, int scale, int Y2, uint16* walkbox
}
// this process the walkboxes
-void loadCtpSub1(int boxIdx, int scale, uint16* walkboxTable, ctpVar19Struct* param4)
+void loadCtpSub1(int boxIdx, int scale, uint16* _walkboxTable, ctpVar19Struct* param4)
{
int minX = 1000;
int minY = 1000;
@@ -186,20 +186,20 @@ void loadCtpSub1(int boxIdx, int scale, uint16* walkboxTable, ctpVar19Struct* pa
// int ax;
// int var_2;
int var_E;
- int var_C = 1000;
- int var_A = 0;
+ //int var_C = 1000;
+ //int var_A = 0;
ctpVar19SubStruct* subStruct;
ASSERT(boxIdx <= 15);
- if(walkboxTable[boxIdx * 40] > 0) // is walkbox used ?
+ if(_walkboxTable[boxIdx * 40] > 0) // is walkbox used ?
{
- getWalkBoxCenter(boxIdx, walkboxTable);
+ getWalkBoxCenter(boxIdx, _walkboxTable);
currentWalkBoxCenterYBis = currentWalkBoxCenterY;
currentWalkBoxCenterXBis = currentWalkBoxCenterX;
// + 512
- renderCTPWalkBox(currentWalkBoxCenterX, currentWalkBoxCenterY, currentWalkBoxCenterX, scale + 0x200, currentWalkBoxCenterY, walkboxTable + boxIdx * 40);
+ renderCTPWalkBox(currentWalkBoxCenterX, currentWalkBoxCenterY, currentWalkBoxCenterX, scale + 0x200, currentWalkBoxCenterY, _walkboxTable + boxIdx * 40);
var_1C = param4;
var_12 = var_1C + 1; // next
@@ -245,7 +245,7 @@ void loadCtpSub1(int boxIdx, int scale, uint16* walkboxTable, ctpVar19Struct* pa
{
int i;
int numPoints;
- uint16* pCurrentPtr = walkboxTable + boxIdx * 40;
+ uint16* pCurrentPtr = _walkboxTable + boxIdx * 40;
numPoints = *(pCurrentPtr++);
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 4eb1ba09b7..f56fd73fd4 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -322,6 +322,14 @@ int loadFileMode2(uint8* name, int startIdx, int currentEntryIdx, int numIdx)
loadFNTSub(ptr, startIdx);
break;
}
+ case type_UNK:
+ {
+ break;
+ }
+ case type_SPL:
+ {
+ break;
+ }
}
return 0;
}
@@ -356,6 +364,14 @@ int loadFullBundle(uint8* name, int startIdx)
loadFNTSub(ptr, startIdx);
break;
}
+ case type_UNK:
+ {
+ break;
+ }
+ case type_SPL:
+ {
+ break;
+ }
}
return 0;
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index fce90460d5..37c3e8c2b3 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -62,7 +62,7 @@ int32 getTextLineCount(int32 rightBorder_X, int32 wordSpacingWidth, uint8* ptr,
int32 var_6 = 0;
int32 lineLength = 0;
- uint8* tempPtr;
+ uint8* tempPtr = 0;
if(!*localString)
{
@@ -505,7 +505,7 @@ void drawString(int32 x, int32 y, uint8* string, uint8* buffer, uint8 color, int
do
{
- uint8 character = *(string++);
+ character = *(string++);
short int data = fontCharacterTable[character];
@@ -698,7 +698,7 @@ gfxEntryStruct* renderText(int inRightBorder_X, uint8* string)
// draw textline, character wise
do
{
- uint8 character = *(string++);
+ character = *(string++);
short int charData = fontCharacterTable[character]; // get character position
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index 763cb8bae1..1a3240fe97 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -635,8 +635,8 @@ void flip()
{
int i;
byte paletteRGBA[256 * 4];
- uint8* outPtr = scaledScreen;
- uint8* inPtr = globalScreen;
+ //uint8* outPtr = scaledScreen;
+ //uint8* inPtr = globalScreen;
for(i=0;i<256;i++)
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 5837415ffc..7d16459b1b 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -214,7 +214,7 @@ int processMenu(menuStruct* pMenu)
int playerMenu(int menuX, int menuY)
{
int retourMenu;
- int restartGame = 0;
+ //int restartGame = 0;
if(entrerMenuJoueur && affichePasMenuJoueur)
{
@@ -294,13 +294,13 @@ void freeMenu(menuStruct* pMenu)
while(pSub)
{
- menuElementSubStruct* next;
+ menuElementSubStruct* nextSub;
- next = pSub->pNext;
+ nextSub = pSub->pNext;
free(pSub);
- pSub=next;
+ pSub=nextSub;
}
if(pElement->gfx)
diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp
index 4d53a36a4f..a584aead37 100644
--- a/engines/cruise/object.cpp
+++ b/engines/cruise/object.cpp
@@ -437,7 +437,7 @@ int16 Op_7Sub(int ovlIdx,int objIdx,int param2)
int16 getSingleObjectParam(int16 overlayIdx,int16 param2,int16 param3,int16* returnParam)
{
int var_A = 0;
- char* ptr3 = NULL;
+ //char* ptr3 = NULL;
objDataStruct* ptr;
ovlDataStruct* ovlData;
objectParams* ptr2;
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index 8cff91674b..ff7711b8ea 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -447,8 +447,8 @@ int loadOverlay(uint8* scriptName)
if(scriptNotLoadedBefore)
{
- int var1;
- int var2;
+ //int var1;
+ //int var2;
overlayTable[scriptIdx].field_14 = (char)setup1;
@@ -532,10 +532,10 @@ int loadOverlay(uint8* scriptName)
if(ovlData->specialString1Length /*|| ovlData->specialString2Length*/ || ovlData->stringTable)
{
int i;
- int unpackedSize;
- int fileIdx;
- uint8 fileName[50];
- char* unpackedBuffer;
+ //int unpackedSize;
+ //int fileIdx;
+ //uint8 fileName[50];
+ //char* unpackedBuffer;
strcpyuint8(fileName,scriptName);
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index dcb5f3812b..eedcfe58e6 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -63,7 +63,7 @@ int32 opcodeType0(void) // load opcode
}
case 1:
{
- uint8* ptr;
+ uint8* ptr = 0;
int byte1 = getByteFromScript();
int byte2 = getByteFromScript();
short int short1 = getShortFromScript();
@@ -153,7 +153,7 @@ int32 opcodeType0(void) // load opcode
int var_E = byte1 & 7;
- uint8* ptr;
+ uint8* ptr = 0;
if(!var_E)
{
@@ -243,7 +243,7 @@ int32 opcodeType1(void) // save opcode
int var_C = short1;
- uint8* ptr;
+ uint8* ptr = 0;
int type2;
if(!var_6)
@@ -405,8 +405,8 @@ int32 opcodeType4(void) // test
{
int boolVar = 0;
- int var1 = popVar();
- int var2 = popVar();
+ var1 = popVar();
+ var2 = popVar();
switch(currentScriptOpcodeType)
{
@@ -480,8 +480,8 @@ int32 opcodeType6(void)
int32 opcodeType7(void)
{
- int var1 = popVar();
- int var2 = popVar();
+ var1 = popVar();
+ var2 = popVar();
pushVar(var1);
pushVar(var2);