Erwan
- 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:
+1
-1
@@ -24,7 +24,7 @@ HGE_OBJS = src/hge/hgecolor.o src/hge/hgeparticle.o \
|
|||||||
src/hge/hgedistort.o src/hge/hgefont.o
|
src/hge/hgedistort.o src/hge/hgefont.o
|
||||||
|
|
||||||
|
|
||||||
CXXFLAGS = -W -Wall -Werror
|
CXXFLAGS = -W -Wall -Werror -Wno-unused
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
CXXFLAGS += -ggdb3
|
CXXFLAGS += -ggdb3
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ typedef uint32_t u32;
|
|||||||
#define FRAME_BUFFER_SIZE FRAME_BUFFER_WIDTH*SCREEN_HEIGHT*PIXEL_SIZE
|
#define FRAME_BUFFER_SIZE FRAME_BUFFER_WIDTH*SCREEN_HEIGHT*PIXEL_SIZE
|
||||||
|
|
||||||
#define SLICE_SIZE_F 64.0f
|
#define SLICE_SIZE_F 64.0f
|
||||||
typedef unsigned long DWORD;
|
typedef unsigned int DWORD;
|
||||||
|
|
||||||
#define BLEND_ZERO 0x1000
|
#define BLEND_ZERO 0x1000
|
||||||
#define BLEND_ONE 0x1002
|
#define BLEND_ONE 0x1002
|
||||||
|
|||||||
Binary file not shown.
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef LINUX
|
#ifdef WIN32
|
||||||
#pragma warning(disable : 4786)
|
#pragma warning(disable : 4786)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ bool JGBKFont::Init(const char* engFileName, const char* chnFileName, int fontsi
|
|||||||
|
|
||||||
#if defined (WIN32) || defined (LINUX)
|
#if defined (WIN32) || defined (LINUX)
|
||||||
#else
|
#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);
|
unsigned int rowblocks = (width >> 4);
|
||||||
|
|
||||||
@@ -232,9 +232,9 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
|
|||||||
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
||||||
#else
|
#else
|
||||||
if ((bits & bitMask) != 0)
|
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
|
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
|
#endif
|
||||||
bitMask >>= 1;
|
bitMask >>= 1;
|
||||||
x++;
|
x++;
|
||||||
@@ -272,7 +272,7 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
|
|||||||
#if defined (WIN32) || defined (LINUX)
|
#if defined (WIN32) || defined (LINUX)
|
||||||
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
||||||
#else
|
#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
|
#endif
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
@@ -293,9 +293,9 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
|
|||||||
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
||||||
#else
|
#else
|
||||||
if ((bits & bitMask) != 0)
|
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
|
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
|
#endif
|
||||||
x++;
|
x++;
|
||||||
bitMask >>= 1;
|
bitMask >>= 1;
|
||||||
@@ -311,7 +311,7 @@ int JGBKFont::PreCacheChar(const BYTE *ch)
|
|||||||
#if defined (WIN32) || defined (LINUX)
|
#if defined (WIN32) || defined (LINUX)
|
||||||
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
mCharBuffer[y*mFontSize+x] = ARGB(0,0,0,0);
|
||||||
#else
|
#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
|
#endif
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-4
@@ -38,7 +38,7 @@ extern "C" {
|
|||||||
static unsigned int __attribute__((aligned(16))) list[262144];
|
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)
|
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)
|
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 i=0;i<height;i++)
|
||||||
{
|
{
|
||||||
for (int j=0;j<height;j++)
|
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;
|
void* temp;
|
||||||
int bufferwidth;
|
int bufferwidth;
|
||||||
int pixelformat;
|
int pixelformat;
|
||||||
int unknown;
|
|
||||||
int i, x, y;
|
int i, x, y;
|
||||||
png_structp png_ptr;
|
png_structp png_ptr;
|
||||||
png_infop info_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);
|
bool useVideoRAM = (mode == TEX_TYPE_USE_VRAM);
|
||||||
// pixel ** image_data=NULL;
|
// pixel ** image_data=NULL;
|
||||||
DWORD *p32=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_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)
|
#define gif_color32(c) ARGB(255,palette->Colors[c].Red,palette->Colors[c].Green, palette->Colors[c].Blue)
|
||||||
GifRecordType RecordType;
|
GifRecordType RecordType;
|
||||||
|
|||||||
+5
-5
@@ -19,7 +19,7 @@
|
|||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
|
||||||
#ifndef LINUX
|
#ifdef WIN32
|
||||||
#pragma comment( lib, "freetype.lib" )
|
#pragma comment( lib, "freetype.lib" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
// in JGBKFont.cpp
|
// 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
|
#endif
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ int JTTFont::PreCacheChar(u16 ch, u16 cachedCode)
|
|||||||
{
|
{
|
||||||
for (int j=0;j<mMaxCharWidth;j++)
|
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
|
#endif
|
||||||
@@ -306,7 +306,7 @@ int JTTFont::PreCacheChar(u16 ch, u16 cachedCode)
|
|||||||
#if defined (WIN32) || defined (LINUX)
|
#if defined (WIN32) || defined (LINUX)
|
||||||
texBuffer[i*mMaxCharWidth+j+offset] = RGBA(255, 255, 255, grey);
|
texBuffer[i*mMaxCharWidth+j+offset] = RGBA(255, 255, 255, grey);
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
rows--;
|
rows--;
|
||||||
@@ -329,7 +329,7 @@ int JTTFont::PreCacheChar(u16 ch, u16 cachedCode)
|
|||||||
#if defined (WIN32) || defined (LINUX)
|
#if defined (WIN32) || defined (LINUX)
|
||||||
texBuffer[i*mMaxCharWidth+j*8+k+offset] = RGBA(255, 255, 255, 255);
|
texBuffer[i*mMaxCharWidth+j*8+k+offset] = RGBA(255, 255, 255, 255);
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user