aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Persson2005-06-22 19:32:10 +0000
committerLars Persson2005-06-22 19:32:10 +0000
commit9fc959e63dbb72fefecf322cc7dae3744a7977ab (patch)
tree68ea6e7fe08608badd9cc2b103ab283c2101c612
parent8fbbd28f7948323bf20ea281ab570ca8889f6854 (diff)
downloadscummvm-rg350-9fc959e63dbb72fefecf322cc7dae3744a7977ab.tar.gz
scummvm-rg350-9fc959e63dbb72fefecf322cc7dae3744a7977ab.tar.bz2
scummvm-rg350-9fc959e63dbb72fefecf322cc7dae3744a7977ab.zip
Changed from char to int8 in a number of places. This makes not assume the typ of char regardless of any compiler flags. Now looks very nice on the Symbian platfor.
svn-id: r18435
-rw-r--r--gob/draw.cpp12
-rw-r--r--gob/draw.h22
-rw-r--r--gob/map.cpp4
-rw-r--r--gob/map.h12
-rw-r--r--gob/mult.h28
-rw-r--r--gob/scenery.cpp4
-rw-r--r--gob/scenery.h20
-rw-r--r--gob/video.cpp2
-rw-r--r--gob/video.h16
9 files changed, 60 insertions, 60 deletions
diff --git a/gob/draw.cpp b/gob/draw.cpp
index fa4e121503..008f722d20 100644
--- a/gob/draw.cpp
+++ b/gob/draw.cpp
@@ -60,9 +60,9 @@ int16 draw_invalidatedLefts[30];
int16 draw_invalidatedRights[30];
int16 draw_invalidatedBottoms[30];
-char draw_noInvalidated = 0;
-char draw_applyPal = 0;
-char draw_paletteCleared = 0;
+int8 draw_noInvalidated = 0;
+int8 draw_applyPal = 0;
+int8 draw_paletteCleared = 0;
SurfaceDesc *draw_backSurface = 0;
SurfaceDesc *draw_frontSurface = 0;
@@ -85,9 +85,9 @@ int16 draw_transparentCursor = 0;
SurfaceDesc *draw_cursorSprites = 0;
SurfaceDesc *draw_cursorBack = 0;
int16 draw_cursorAnim = 0;
-char draw_cursorAnimLow[40];
-char draw_cursorAnimHigh[40];
-char draw_cursorAnimDelays[40];
+int8 draw_cursorAnimLow[40];
+int8 draw_cursorAnimHigh[40];
+int8 draw_cursorAnimDelays[40];
static uint32 draw_cursorTimeKey = 0;
int16 draw_palLoadData1[] = { 0, 17, 34, 51 };
diff --git a/gob/draw.h b/gob/draw.h
index 2de6c83701..17df68c8b3 100644
--- a/gob/draw.h
+++ b/gob/draw.h
@@ -32,10 +32,10 @@ namespace Gob {
#define RENDERFLAG_USEDELTAS 0x10
typedef struct Draw_FontToSprite {
- char sprite;
- char base;
- char width;
- char height;
+ int8 sprite;
+ int8 base;
+ int8 width;
+ int8 height;
} Draw_FontToSprite;
extern int16 draw_fontIndex;
@@ -65,9 +65,9 @@ extern int16 draw_invalidatedLefts[30];
extern int16 draw_invalidatedRights[30];
extern int16 draw_invalidatedBottoms[30];
-extern char draw_noInvalidated;
-extern char draw_doFullFlip;
-extern char draw_paletteCleared;
+extern int8 draw_noInvalidated;
+extern int8 draw_doFullFlip;
+extern int8 draw_paletteCleared;
extern int16 draw_cursorIndex;
extern int16 draw_transparentCursor;
@@ -91,10 +91,10 @@ extern int16 draw_cursorYDeltaVar;
extern SurfaceDesc *draw_cursorSprites;
extern SurfaceDesc *draw_cursorBack;
extern int16 draw_cursorAnim;
-extern char draw_cursorAnimLow[40];
-extern char draw_cursorAnimHigh[40];
-extern char draw_cursorAnimDelays[40];
-extern char draw_applyPal;
+extern int8 draw_cursorAnimLow[40];
+extern int8 draw_cursorAnimHigh[40];
+extern int8 draw_cursorAnimDelays[40];
+extern int8 draw_applyPal;
void draw_invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
void draw_blitInvalidated(void);
diff --git a/gob/map.cpp b/gob/map.cpp
index 6671e33895..1e1a3df851 100644
--- a/gob/map.cpp
+++ b/gob/map.cpp
@@ -31,7 +31,7 @@
namespace Gob {
-char map_passMap[28][26]; // [y][x]
+int8 map_passMap[28][26]; // [y][x]
int16 map_itemsMap[28][26]; // [y][x]
Map_Point map_wayPoints[40];
@@ -44,7 +44,7 @@ int16 map_destX;
int16 map_destY;
Map_ItemPos map_itemPoses[40];
-char map_loadFromAvo;
+int8 map_loadFromAvo;
char map_sourceFile[15];
static char *map_avoDataPtr;
diff --git a/gob/map.h b/gob/map.h
index 56cbbcff6e..31aa64a0d8 100644
--- a/gob/map.h
+++ b/gob/map.h
@@ -33,13 +33,13 @@ typedef struct Map_Point {
#define szMap_ItemPos 3
typedef struct Map_ItemPos {
- char x;
- char y;
- char orient; // ??
+ int8 x;
+ int8 y;
+ int8 orient; // ??
} GCC_PACK Map_ItemPos;
#pragma END_PACK_STRUCTS
-extern char map_passMap[28][26]; // [y][x]
+extern int8 map_passMap[28][26]; // [y][x]
extern int16 map_itemsMap[28][26]; // [y][x]
extern Map_Point map_wayPoints[40];
extern int16 map_nearestWayPoint;
@@ -49,7 +49,7 @@ extern int16 map_curGoblinX;
extern int16 map_curGoblinY;
extern int16 map_destX;
extern int16 map_destY;
-extern char map_loadFromAvo;
+extern int8 map_loadFromAvo;
extern Map_ItemPos map_itemPoses[40];
extern char map_sourceFile[15];
@@ -64,7 +64,7 @@ int16 map_checkLongPath(int16 x0, int16 y0, int16 x1, int16 y1, int16 i0, int16
int16 map_optimizePoints(int16 xPos, int16 yPos);
void map_loadItemToObject(void);
void map_loadMapObjects(char *avjFile);
-void map_loadDataFromAvo(char *dest, int16 size);
+void map_loadDataFromAvo(int8 *dest, int16 size);
void map_loadMapsInitGobs(void);
} // End of namespace Gob
diff --git a/gob/mult.h b/gob/mult.h
index 1430e532df..b649f1939b 100644
--- a/gob/mult.h
+++ b/gob/mult.h
@@ -28,19 +28,19 @@ namespace Gob {
#pragma START_PACK_STRUCTS
typedef struct Mult_AnimData {
- char animation;
- char layer;
- char frame;
- char animType;
- char order;
- char isPaused;
- char isStatic;
- char maxTick;
- char unknown;
- char newLayer;
- char newAnimation;
+ int8 animation;
+ int8 layer;
+ int8 frame;
+ int8 animType;
+ int8 order;
+ int8 isPaused;
+ int8 isStatic;
+ int8 maxTick;
+ int8 unknown;
+ int8 newLayer;
+ int8 newAnimation;
byte intersected;
- char newCycle;
+ int8 newCycle;
} GCC_PACK Mult_AnimData;
typedef struct Mult_Object {
@@ -82,14 +82,14 @@ typedef struct Mult_PalKey {
int16 rates[4];
int16 unknown0;
int16 unknown1;
- char subst[16][4];
+ int8 subst[16][4];
} GCC_PACK Mult_PalKey;
typedef struct Mult_PalFadeKey {
int16 frame;
int16 fade;
int16 palIndex;
- char flag;
+ int8 flag;
} GCC_PACK Mult_PalFadeKey;
typedef struct Mult_SndKey {
diff --git a/gob/scenery.cpp b/gob/scenery.cpp
index f592b5ab21..8826e0a36e 100644
--- a/gob/scenery.cpp
+++ b/gob/scenery.cpp
@@ -114,7 +114,7 @@ int16 scen_loadStatic(char search) {
ptr->layers = (Scen_StaticLayer **)malloc(sizeof(Scen_StaticLayer *) * ptr->layersCount);
ptr->pieces = (Scen_PieceDesc **)malloc(sizeof(Scen_PieceDesc *) * picsCount);
- ptr->piecesFromExt = (char *)malloc(picsCount);
+ ptr->piecesFromExt = (int8 *)malloc(picsCount);
for (i = 0; i < ptr->layersCount; i++) {
offset = (int16)READ_LE_UINT16(&((int16 *)dataPtr)[i]);
@@ -434,7 +434,7 @@ int16 scen_loadAnim(char search) {
ptr->pieces =
(Scen_PieceDesc **) malloc(sizeof(Scen_PieceDesc *) *
picsCount);
- ptr->piecesFromExt = (char *) malloc(picsCount);
+ ptr->piecesFromExt = (int8 *) malloc(picsCount);
for (i = 0; i < ptr->layersCount; i++) {
offset = (int16)READ_LE_UINT16(&((int16 *)dataPtr)[i]);
diff --git a/gob/scenery.h b/gob/scenery.h
index 71b59e685c..a8af9e901b 100644
--- a/gob/scenery.h
+++ b/gob/scenery.h
@@ -33,12 +33,12 @@ typedef struct Scen_PieceDesc {
} GCC_PACK Scen_PieceDesc;
typedef struct Scen_StaticPlane {
- char pictIndex;
- char pieceIndex;
- char drawOrder;
+ int8 pictIndex;
+ int8 pieceIndex;
+ int8 drawOrder;
int16 destX;
int16 destY;
- char transp;
+ int8 transp;
} GCC_PACK Scen_StaticPlane;
typedef struct Scen_StaticLayer {
@@ -52,9 +52,9 @@ typedef struct Scen_StaticLayer {
typedef struct Scen_AnimFramePiece {
byte pictIndex;
byte pieceIndex;
- char destX;
- char destY;
- char notFinal;
+ int8 destX;
+ int8 destY;
+ int8 notFinal;
} GCC_PACK Scen_AnimFramePiece;
typedef struct Scen_AnimLayer {
@@ -63,7 +63,7 @@ typedef struct Scen_AnimLayer {
int16 posY;
int16 animDeltaX;
int16 animDeltaY;
- char transp;
+ int8 transp;
int16 framesCount;
Scen_AnimFramePiece frames[1];
} GCC_PACK Scen_AnimLayer;
@@ -73,7 +73,7 @@ typedef struct Scen_Static {
int16 layersCount;
Scen_StaticLayer **layers;
Scen_PieceDesc **pieces;
- char *piecesFromExt;
+ int8 *piecesFromExt;
char *dataPtr;
} Scen_Static;
@@ -81,7 +81,7 @@ struct Scen_Animation {
int16 layersCount;
Scen_AnimLayer **layers;
Scen_PieceDesc **pieces;
- char *piecesFromExt;
+ int8 *piecesFromExt;
char *dataPtr;
};
diff --git a/gob/video.cpp b/gob/video.cpp
index 13b379de6e..2cb02ceec1 100644
--- a/gob/video.cpp
+++ b/gob/video.cpp
@@ -84,7 +84,7 @@ int32 vid_getRectSize(int16 width, int16 height, int16 flag, int16 mode) {
}
SurfaceDesc *vid_initSurfDesc(int16 vidMode, int16 width, int16 height, int16 flags) {
- char flagsAnd2;
+ int8 flagsAnd2;
byte *vidMem;
int32 sprSize;
int16 someFlags = 1;
diff --git a/gob/video.h b/gob/video.h
index 4589fc7feb..c9b00ae1b9 100644
--- a/gob/video.h
+++ b/gob/video.h
@@ -39,8 +39,8 @@ namespace Gob {
typedef struct SurfaceDesc_t {
int16 width;
int16 height;
- char reserved1;
- char flag;
+ int8 reserved1;
+ int8 flag;
int16 vidMode;
byte *vidPtr;
int16 reserved2;
@@ -48,12 +48,12 @@ typedef struct SurfaceDesc_t {
typedef struct FontDesc_t {
char *dataPtr;
- char itemWidth;
- char itemHeight;
- char startItem;
- char endItem;
- char itemSize;
- char bitWidth;
+ int8 itemWidth;
+ int8 itemHeight;
+ int8 startItem;
+ int8 endItem;
+ int8 itemSize;
+ int8 bitWidth;
void *extraData;
} FontDesc;