Some minor casting issues that trip up the 0.9.6 pspsdk when compiling.

This commit is contained in:
wrenczes@gmail.com
2010-10-06 09:22:44 +00:00
parent 1e7f2507f0
commit 9c982475fe
3 changed files with 5 additions and 4 deletions

View File

@@ -137,15 +137,16 @@ typedef uint32_t u32;
#if defined (ABGR8888) #if defined (ABGR8888)
#define PIXEL_TYPE u32
#ifndef ARGB #ifndef ARGB
#define ARGB(a, r, g, b) ((a << 24) | (b << 16) | (g << 8) | r) // macro to assemble pixels in correct format #define ARGB(a, r, g, b) (PIXEL_TYPE)((a << 24) | (b << 16) | (g << 8) | r) // macro to assemble pixels in correct format
#endif #endif
#define MAKE_COLOR(a, c) (a << 24 | c) #define MAKE_COLOR(a, c) (a << 24 | c)
#define MASK_ALPHA 0xFF000000 // masks for accessing individual pixels #define MASK_ALPHA 0xFF000000 // masks for accessing individual pixels
#define MASK_BLUE 0x00FF0000 #define MASK_BLUE 0x00FF0000
#define MASK_GREEN 0x0000FF00 #define MASK_GREEN 0x0000FF00
#define MASK_RED 0x000000FF #define MASK_RED 0x000000FF
#define PIXEL_TYPE u32
#define PIXEL_SIZE 4 #define PIXEL_SIZE 4
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_8888 #define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_8888

View File

@@ -1482,7 +1482,7 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
if (buffer) if (buffer)
{ {
p32 = (u32*) buffer; p32 = (DWORD*) buffer;
} }
//if((*image_data = (pixel *)malloc(sizeof(pixel) * GifFileIn->Image.Width * GifFileIn->Image.Height)) == NULL) //if((*image_data = (pixel *)malloc(sizeof(pixel) * GifFileIn->Image.Width * GifFileIn->Image.Height)) == NULL)

View File

@@ -99,7 +99,7 @@ const KeyRep& translateKey(LocalKeySym key) {
else else
{ {
char* str = NEW char[11]; char* str = NEW char[11];
sprintf(str, "%d", key); sprintf(str, "%d", (int) key);
fattable[key] = make_pair(str, static_cast<JQuad*>(static_cast<JQuad*>(NULL))); fattable[key] = make_pair(str, static_cast<JQuad*>(static_cast<JQuad*>(NULL)));
} }
res = fattable.find(key); res = fattable.find(key);