- fixed a few warnings with the PSP compilation
- changed definition of DWORD to unsinged int rather than unsigned long for PSP
- fixed make 3xx. the call to "which" in the makefile still needs to be corrected with a DOS compatible call
This commit is contained in:
wagic.the.homebrew
2008-11-10 11:07:33 +00:00
parent 163512a802
commit 37220f9e24
7 changed files with 135 additions and 136 deletions

View File

@@ -24,7 +24,7 @@ HGE_OBJS = src/hge/hgecolor.o src/hge/hgeparticle.o \
src/hge/hgedistort.o src/hge/hgefont.o
CXXFLAGS = -W -Wall -Werror
CXXFLAGS = -W -Wall -Werror -Wno-unused
ifdef DEBUG
CXXFLAGS += -ggdb3

View File

@@ -211,7 +211,7 @@ typedef uint32_t u32;
#define FRAME_BUFFER_SIZE FRAME_BUFFER_WIDTH*SCREEN_HEIGHT*PIXEL_SIZE
#define SLICE_SIZE_F 64.0f
typedef unsigned long DWORD;
typedef unsigned int DWORD;
#define BLEND_ZERO 0x1000
#define BLEND_ONE 0x1002

Binary file not shown.

View File

@@ -8,7 +8,7 @@
//
//-------------------------------------------------------------------------------------
#ifndef LINUX
#ifdef WIN32
#pragma warning(disable : 4786)
#endif

View File

@@ -138,7 +138,7 @@ bool JGBKFont::Init(const char* engFileName, const char* chnFileName, int fontsi
#if defined (WIN32) || defined (LINUX)
#else
void SwizzlePlot(u8* out, PIXEL_TYPE color, int i, int j, unsigned int width, unsigned int height)
void SwizzlePlot(u8* out, PIXEL_TYPE color, int i, int j, unsigned int width)
{
unsigned int rowblocks = (width >> 4);
@@ -232,9 +232,9 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
#else
if ((bits & bitMask) != 0)
SwizzlePlot(pTexture, ARGB(255,255,255,255), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE, mCacheImageHeight);
SwizzlePlot(pTexture, ARGB(255,255,255,255), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE);
else
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE, mCacheImageHeight);
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE);
#endif
bitMask >>= 1;
x++;
@@ -272,7 +272,7 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
#if defined (WIN32) || defined (LINUX)
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
#else
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE, mCacheImageHeight);
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE);
#endif
x++;
}
@@ -293,9 +293,9 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
#else
if ((bits & bitMask) != 0)
SwizzlePlot(pTexture, ARGB(255,255,255,255), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE, mCacheImageHeight);
SwizzlePlot(pTexture, ARGB(255,255,255,255), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE);
else
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE, mCacheImageHeight);
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE);
#endif
x++;
bitMask >>= 1;
@@ -311,7 +311,7 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
#if defined (WIN32) || defined (LINUX)
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
#else
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE, mCacheImageHeight);
SwizzlePlot(pTexture, ARGB(0,0,0,0), x*PIXEL_SIZE, y, mTexture->mTexWidth*PIXEL_SIZE);
#endif
x++;
}

View File

@@ -38,7 +38,7 @@ extern "C" {
static unsigned int __attribute__((aligned(16))) list[262144];
extern void SwizzlePlot(u8* out, PIXEL_TYPE color, int i, int j, unsigned int width, unsigned int height);
extern void SwizzlePlot(u8* out, PIXEL_TYPE color, int i, int j, unsigned int width);
void Swap(float *a, float *b)
@@ -119,11 +119,12 @@ JTexture::~JTexture()
void JTexture::UpdateBits(int x, int y, int width, int height, PIXEL_TYPE* bits)
{
//TODO: Is this normal that width is not used ??
for (int i=0;i<height;i++)
{
for (int j=0;j<height;j++)
{
SwizzlePlot((u8*)mBits, *(bits++), (x+j)*PIXEL_SIZE, y+i, mTexWidth*PIXEL_SIZE, mTexHeight);
SwizzlePlot((u8*)mBits, *(bits++), (x+j)*PIXEL_SIZE, y+i, mTexWidth*PIXEL_SIZE);
}
}
@@ -814,7 +815,6 @@ void JRenderer::ScreenShot(const char* filename)
void* temp;
int bufferwidth;
int pixelformat;
int unknown;
int i, x, y;
png_structp png_ptr;
png_infop info_ptr;
@@ -1347,7 +1347,6 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
bool useVideoRAM = (mode == TEX_TYPE_USE_VRAM);
// pixel ** image_data=NULL;
DWORD *p32=NULL;
DWORD *buff=NULL;
//#define gif_color(c) RGB(palette->Colors[c].Red, palette->Colors[c].Green, palette->Colors[c].Blue)
#define gif_color32(c) ARGB(255,palette->Colors[c].Red,palette->Colors[c].Green, palette->Colors[c].Blue)
GifRecordType RecordType;

View File

@@ -19,7 +19,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#ifndef LINUX
#ifdef WIN32
#pragma comment( lib, "freetype.lib" )
#endif
@@ -30,7 +30,7 @@
#ifndef WIN32
// in JGBKFont.cpp
extern void SwizzlePlot(u8* out, PIXEL_TYPE color, int i, int j, unsigned int width, unsigned int height);
extern void SwizzlePlot(u8* out, PIXEL_TYPE color, int i, int j, unsigned int width);
#endif
@@ -288,7 +288,7 @@ int JTTFont::PreCacheChar(u16 ch, u16 cachedCode)
{
for (int j=0;j<mMaxCharWidth;j++)
{
SwizzlePlot(pTexture, ARGB(0,0,0,0), (x+j)*PIXEL_SIZE, y+i, mTexWidth*PIXEL_SIZE, mTexHeight);
SwizzlePlot(pTexture, ARGB(0,0,0,0), (x+j)*PIXEL_SIZE, y+i, mTexWidth*PIXEL_SIZE);
}
}
#endif
@@ -306,7 +306,7 @@ int JTTFont::PreCacheChar(u16 ch, u16 cachedCode)
#if defined (WIN32) || defined (LINUX)
texBuffer[i*mMaxCharWidth+j+offset] = RGBA(255, 255, 255, grey);
#else
SwizzlePlot(pTexture, ARGB(grey,255,255,255), (xx+j)*PIXEL_SIZE, yy+i, mTexWidth*PIXEL_SIZE, mTexHeight);
SwizzlePlot(pTexture, ARGB(grey,255,255,255), (xx+j)*PIXEL_SIZE, yy+i, mTexWidth*PIXEL_SIZE);
#endif
}
rows--;
@@ -329,7 +329,7 @@ int JTTFont::PreCacheChar(u16 ch, u16 cachedCode)
#if defined (WIN32) || defined (LINUX)
texBuffer[i*mMaxCharWidth+j*8+k+offset] = RGBA(255, 255, 255, 255);
#else
SwizzlePlot(pTexture, ARGB(255,255,255,255), (xx+j*8+k)*PIXEL_SIZE, yy+i, mTexWidth*PIXEL_SIZE, mTexHeight);
SwizzlePlot(pTexture, ARGB(255,255,255,255), (xx+j*8+k)*PIXEL_SIZE, yy+i, mTexWidth*PIXEL_SIZE);
#endif
}