aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu-gles
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gpu-gles')
-rw-r--r--plugins/gpu-gles/gpuDraw.c2
-rw-r--r--plugins/gpu-gles/gpuExternals.h43
-rw-r--r--plugins/gpu-gles/gpuPlugin.c78
-rw-r--r--plugins/gpu-gles/gpuPlugin.h16
-rw-r--r--plugins/gpu-gles/gpuPrim.c78
-rw-r--r--plugins/gpu-gles/gpuPrim.h2
-rw-r--r--plugins/gpu-gles/gpuTexture.c84
7 files changed, 147 insertions, 156 deletions
diff --git a/plugins/gpu-gles/gpuDraw.c b/plugins/gpu-gles/gpuDraw.c
index 597f286..4f639c1 100644
--- a/plugins/gpu-gles/gpuDraw.c
+++ b/plugins/gpu-gles/gpuDraw.c
@@ -211,7 +211,7 @@ void GetExtInfos(void)
{
BOOL bPacked=FALSE; // default: no packed pixel support
- if(strstr((s8 *)glGetString(GL_EXTENSIONS), // packed pixels available?
+ if(strstr((char *)glGetString(GL_EXTENSIONS), // packed pixels available?
"GL_EXT_packed_pixels"))
bPacked=TRUE; // -> ok
diff --git a/plugins/gpu-gles/gpuExternals.h b/plugins/gpu-gles/gpuExternals.h
index 977d74d..8d30814 100644
--- a/plugins/gpu-gles/gpuExternals.h
+++ b/plugins/gpu-gles/gpuExternals.h
@@ -33,15 +33,6 @@
extern "C" {
#endif
-typedef unsigned char u8;
-typedef signed char s8;
-typedef unsigned short int u16;
-typedef signed short int s16;
-typedef unsigned long u32;
-typedef signed long s32;
-typedef unsigned long long int u64;
-typedef signed long long int s64;
-
#ifndef _WINDOWS
#ifdef __NANOGL__
#include <gl/gl.h>
@@ -253,7 +244,7 @@ typedef struct OGLVertexTag
union
COLTAG
{
- u8 col[4];
+ unsigned char col[4];
unsigned long lcol;
} c;
@@ -261,13 +252,13 @@ COLTAG
typedef union EXShortTag
{
- u8 c[2];
+ unsigned char c[2];
unsigned short s;
} EXShort;
typedef union EXLongTag
{
- u8 c[4];
+ unsigned char c[4];
unsigned long l;
EXShort s[2];
} EXLong;
@@ -295,8 +286,8 @@ extern BOOL bAdvancedBlend;
//extern PFNGLBLENDEQU glBlendEquationEXTEx;
//extern PFNGLCOLORTABLEEXT glColorTableEXTEx;
-extern u8 gl_ux[8];
-extern u8 gl_vy[8];
+extern unsigned char gl_ux[8];
+extern unsigned char gl_vy[8];
extern OGLVertex vertex[4];
extern short sprtY,sprtX,sprtH,sprtW;
#ifdef _WINDOWS
@@ -361,8 +352,8 @@ extern short sSprite_vy2;
extern BOOL bRenderFrontBuffer;
extern unsigned long ulOLDCOL;
extern unsigned long ulClutID;
-extern void (*primTableJ[256])(u8 *);
-extern void (*primTableSkip[256])(u8 *);
+extern void (*primTableJ[256])(unsigned char *);
+extern void (*primTableSkip[256])(unsigned char *);
extern unsigned short usMirror;
extern unsigned long dwCfgFixes;
extern unsigned long dwActFixes;
@@ -386,7 +377,7 @@ extern short symax;
#ifndef _IN_TEXTURE
-extern u8 ubOpaqueDraw;
+extern unsigned char ubOpaqueDraw;
extern GLint giWantedRGBA;
extern GLint giWantedFMT;
extern GLint giWantedTYPE;
@@ -424,8 +415,8 @@ extern int iDataReadMode;
extern int iColDepth;
extern BOOL bChangeRes;
extern BOOL bWindowMode;
-extern s8 szDispBuf[];
-extern s8 szGPUKeys[];
+extern char szDispBuf[];
+extern char szGPUKeys[];
extern PSXDisplay_t PSXDisplay;
extern PSXDisplay_t PreviousPSXDisplay;
//extern unsigned long ulKeybits;
@@ -435,8 +426,8 @@ extern long lGPUstatusRet;
extern short imageX0,imageX1;
extern short imageY0,imageY1;
extern long lClearOnSwap,lClearOnSwapColor;
-extern u8 * psxVub;
-extern s8 * psxVsb;
+extern unsigned char * psxVub;
+extern char * psxVsb;
extern unsigned short * psxVuw;
extern signed short * psxVsw;
extern unsigned long * psxVul;
@@ -481,7 +472,7 @@ extern GLuint gTexPicName;
#ifndef _IN_CFG
#ifndef _WINDOWS
-extern s8 * pConfigFile;
+extern char * pConfigFile;
#endif
#endif
@@ -503,10 +494,10 @@ extern float fps_cur;
//-----------------------------------------------------//
typedef struct {
-u8 r;
-u8 g;
-u8 b;
-u8 a;
+unsigned char r;
+unsigned char g;
+unsigned char b;
+unsigned char a;
} Vec4f;
/**/
diff --git a/plugins/gpu-gles/gpuPlugin.c b/plugins/gpu-gles/gpuPlugin.c
index 897c942..81b7f05 100644
--- a/plugins/gpu-gles/gpuPlugin.c
+++ b/plugins/gpu-gles/gpuPlugin.c
@@ -83,8 +83,8 @@ int iTileCheat=0;
// memory image of the PSX vram
////////////////////////////////////////////////////////////////////////
-u8 *psxVSecure;
-u8 *psxVub;
+unsigned char *psxVSecure;
+unsigned char *psxVub;
signed char *psxVsb;
unsigned short *psxVuw;
unsigned short *psxVuw_eom;
@@ -112,10 +112,10 @@ unsigned long ulStatusControl[256];
static long GPUdataRet;
long lGPUstatusRet;
-s8 szDispBuf[64];
+char szDispBuf[64];
static unsigned long gpuDataM[256];
-static u8 gpuCommand = 0;
+static unsigned char gpuCommand = 0;
static long gpuDataC = 0;
static long gpuDataP = 0;
@@ -144,7 +144,7 @@ BOOL bDisplayNotSet = TRUE;
GLuint uiScanLine=0;
int iUseScanLines=0;
long lSelectedSlot=0;
-u8 * pGfxCardScreen=0;
+unsigned char * pGfxCardScreen=0;
int iBlurBuffer=0;
int iScanBlend=0;
int iRenderFVR=0;
@@ -161,7 +161,7 @@ static void (*rearmed_get_layer_pos)(int *x, int *y, int *w, int *h);
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
-s8 * CALLBACK PSEgetLibName(void)
+char * CALLBACK PSEgetLibName(void)
{
return "name";
}
@@ -208,14 +208,14 @@ void ResizeWindow()
SetAspectRatio();
}
-s8 * GetConfigInfos(int hW)
+char * GetConfigInfos(int hW)
{
#ifdef _WINDOWS
HDC hdc;HGLRC hglrc;
#endif
- s8 szO[2][4]={"off","on "};
- s8 szTxt[256];
- s8 * pB=(s8 *)malloc(32767);
+ char szO[2][4]={"off","on "};
+ char szTxt[256];
+ char * pB=(char *)malloc(32767);
/*
if(!pB) return NULL;
*pB=0;
@@ -237,7 +237,7 @@ s8 * GetConfigInfos(int hW)
strcat(pB,szTxt);
sprintf(szTxt,"OGL version: %s\r\n\r\n",(char *)glGetString(GL_VERSION));
strcat(pB,szTxt);
- //strcat(pB,(s8 *)glGetString(GL_EXTENSIONS));
+ //strcat(pB,(char *)glGetString(GL_EXTENSIONS));
//strcat(pB,"\r\n\r\n");
#ifdef _WINDOWS
@@ -432,7 +432,7 @@ iWinSize=MAKELONG(iResX,iResY);
bKeepRatio = TRUE;
// different ways of accessing PSX VRAM
-psxVSecure=(u8 *)malloc((iGPUHeight*2)*1024 + (1024*1024)); // always alloc one extra MB for soft drawing funcs security
+psxVSecure=(unsigned char *)malloc((iGPUHeight*2)*1024 + (1024*1024)); // always alloc one extra MB for soft drawing funcs security
if(!psxVSecure) return -1;
psxVub=psxVSecure+512*1024; // security offset into double sized psx vram!
@@ -1730,8 +1730,8 @@ void CheckVRamReadEx(int x, int y, int dx, int dy)
int ux,uy,udx,udy,wx,wy;
unsigned short * p1, *p2;
float XS,YS;
- u8 * ps;
- u8 * px;
+ unsigned char * ps;
+ unsigned char * px;
unsigned short s,sx;
if(STATUSREG&GPUSTATUS_RGB24) return;
@@ -1828,7 +1828,7 @@ void CheckVRamReadEx(int x, int y, int dx, int dy)
if(!pGfxCardScreen)
{
glPixelStorei(GL_PACK_ALIGNMENT,1);
- pGfxCardScreen=(u8 *)malloc(iResX*iResY*4);
+ pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4);
}
ps=pGfxCardScreen;
@@ -1881,7 +1881,7 @@ void CheckVRamRead(int x, int y, int dx, int dy, bool bFront)
{
unsigned short sArea;unsigned short * p;
int ux,uy,udx,udy,wx,wy;float XS,YS;
- u8 * ps, * px;
+ unsigned char * ps, * px;
unsigned short s=0,sx;
if(STATUSREG&GPUSTATUS_RGB24) return;
@@ -1976,7 +1976,7 @@ void CheckVRamRead(int x, int y, int dx, int dy, bool bFront)
if(!pGfxCardScreen)
{
glPixelStorei(GL_PACK_ALIGNMENT,1);
- pGfxCardScreen=(u8 *)malloc(iResX*iResY*4);
+ pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4);
}
ps=pGfxCardScreen;
@@ -2112,7 +2112,7 @@ unsigned long CALLBACK GPUreadData(void)
// helper table to know how much data is used by drawing commands
////////////////////////////////////////////////////////////////////////
-const u8 primTableCX[256] =
+const unsigned char primTableCX[256] =
{
// 00
0,0,3,0,0,0,0,0,
@@ -2192,7 +2192,7 @@ void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize)
void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize)
#endif
{
-u8 command;
+unsigned char command;
unsigned long gdata=0;
int i=0;
GPUIsBusy;
@@ -2252,7 +2252,7 @@ ENDVRAM:
if(iDataWriteMode==DR_NORMAL)
{
- void (* *primFunc)(u8 *);
+ void (* *primFunc)(unsigned char *);
if(bSkipNextFrame) primFunc=primTableSkip;
else primFunc=primTableJ;
@@ -2264,7 +2264,7 @@ if(iDataWriteMode==DR_NORMAL)
if(gpuDataC == 0)
{
- command = (u8)((gdata>>24) & 0xff);
+ command = (unsigned char)((gdata>>24) & 0xff);
if(primTableCX[command])
{
@@ -2293,7 +2293,7 @@ if(iDataWriteMode==DR_NORMAL)
if(gpuDataP == gpuDataC)
{
gpuDataC=gpuDataP=0;
- primFunc[gpuCommand]((u8 *)gpuDataM);
+ primFunc[gpuCommand]((unsigned char *)gpuDataM);
if(dwEmuFixes&0x0001 || dwActFixes&0x20000) // hack for emulating "gpu busy" in some games
iFakePrimBusy=4;
@@ -2357,9 +2357,9 @@ return iT;
/*#include <unistd.h>
-void StartCfgTool(s8 * pCmdLine) // linux: start external cfg tool
+void StartCfgTool(char * pCmdLine) // linux: start external cfg tool
{
- FILE * cf;s8 filename[255],t[255];
+ FILE * cf;char filename[255],t[255];
strcpy(filename,"cfg/cfgPeopsMesaGL"); // look in cfg sub folder first
cf=fopen(filename,"rb");
@@ -2464,7 +2464,7 @@ long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr)
#endif
{
unsigned long dmaMem;
-u8 * baseAddrB;
+unsigned char * baseAddrB;
short count;unsigned int DMACommandCounter = 0;
if(bIsFirstFrame) GLinitialize();
@@ -2473,7 +2473,7 @@ GPUIsBusy;
lUsedAddr[0]=lUsedAddr[1]=lUsedAddr[2]=0xffffff;
-baseAddrB = (u8*) baseAddrL;
+baseAddrB = (unsigned char*) baseAddrL;
do
{
@@ -2604,7 +2604,7 @@ ResetTextureArea(TRUE);
//10 = red
//11 = transparent
-u8 cFont[10][120]=
+unsigned char cFont[10][120]=
{
// 0
{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
@@ -2830,7 +2830,7 @@ u8 cFont[10][120]=
////////////////////////////////////////////////////////////////////////
-void PaintPicDot(u8 * p,u8 c)
+void PaintPicDot(unsigned char * p,unsigned char c)
{
if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;}
if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;}
@@ -2840,19 +2840,19 @@ void PaintPicDot(u8 * p,u8 c)
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
-void CALLBACK GPUgetScreenPic(u8 * pMem)
+void CALLBACK GPUgetScreenPic(unsigned char * pMem)
#else
-long CALLBACK GPUgetScreenPic(u8 * pMem)
+long CALLBACK GPUgetScreenPic(unsigned char * pMem)
#endif
{
float XS,YS;int x,y,v;
- u8 * ps, * px, * pf;
- u8 c;
+ unsigned char * ps, * px, * pf;
+ unsigned char c;
if(!pGfxCardScreen)
{
glPixelStorei(GL_PACK_ALIGNMENT,1);
- pGfxCardScreen=(u8 *)malloc(iResX*iResY*4);
+ pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4);
}
ps=pGfxCardScreen;
@@ -2891,13 +2891,13 @@ long CALLBACK GPUgetScreenPic(u8 * pMem)
{
c=cFont[lSelectedSlot][x+y*6];
v=(c&0xc0)>>6;
- PaintPicDot(pf,(u8)v);pf+=3; // paint the dots into the rect
+ PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect
v=(c&0x30)>>4;
- PaintPicDot(pf,(u8)v);pf+=3;
+ PaintPicDot(pf,(unsigned char)v);pf+=3;
v=(c&0x0c)>>2;
- PaintPicDot(pf,(u8)v);pf+=3;
+ PaintPicDot(pf,(unsigned char)v);pf+=3;
v=c&0x03;
- PaintPicDot(pf,(u8)v);pf+=3;
+ PaintPicDot(pf,(unsigned char)v);pf+=3;
}
pf+=104*3;
}
@@ -2923,9 +2923,9 @@ long CALLBACK GPUgetScreenPic(u8 * pMem)
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
-void CALLBACK GPUshowScreenPic(u8 * pMem)
+void CALLBACK GPUshowScreenPic(unsigned char * pMem)
#else
-long CALLBACK GPUshowScreenPic(u8 * pMem)
+long CALLBACK GPUshowScreenPic(unsigned char * pMem)
#endif
{
// DestroyPic();
diff --git a/plugins/gpu-gles/gpuPlugin.h b/plugins/gpu-gles/gpuPlugin.h
index f5e9182..e9a66af 100644
--- a/plugins/gpu-gles/gpuPlugin.h
+++ b/plugins/gpu-gles/gpuPlugin.h
@@ -81,10 +81,10 @@ extern "C" {
#define bool unsigned short
typedef struct {
- u32 ulFreezeVersion;
- u32 ulStatus;
- u32 ulControl[256];
- u8 psxVRam[1024*1024*2];
+ unsigned int ulFreezeVersion;
+ unsigned int ulStatus;
+ unsigned int ulControl[256];
+ unsigned char psxVRam[1024*1024*2];
} GPUFreeze_t;
long CALLBACK GPUinit();
@@ -101,8 +101,8 @@ long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr);
void CALLBACK GPUupdateLace(void);
void CALLBACK GPUmakeSnapshot(void);
long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF);
-long CALLBACK GPUgetScreenPic(u8 * pMem);
-long CALLBACK GPUshowScreenPic(u8 * pMem);
+long CALLBACK GPUgetScreenPic(unsigned char * pMem);
+long CALLBACK GPUshowScreenPic(unsigned char * pMem);
//void CALLBACK GPUkeypressed(int keycode);
//void CALLBACK GPUdisplayText(s8 * pText);
//void CALLBACK GPUclearDynarec(void (CALLBACK *callback)(void));
@@ -121,8 +121,8 @@ void CheckVRamRead(int x, int y, int dx, int dy, bool bFront);
void CheckVRamReadEx(int x, int y, int dx, int dy);
void SetFixes(void);
-void PaintPicDot(u8 * p,u8 c);
-//void DrawNumBorPic(u8 *pMem, int lSelectedSlot);
+void PaintPicDot(unsigned char * p,unsigned char c);
+//void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot);
void ResizeWindow();
////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/gpu-gles/gpuPrim.c b/plugins/gpu-gles/gpuPrim.c
index 980d3dd..7772dba 100644
--- a/plugins/gpu-gles/gpuPrim.c
+++ b/plugins/gpu-gles/gpuPrim.c
@@ -1514,7 +1514,7 @@ void PrepareFullScreenUpload (long Position)
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-u8 * LoadDirectMovieFast(void);
+unsigned char * LoadDirectMovieFast(void);
void UploadScreenEx(long Position)
{
@@ -1745,7 +1745,7 @@ BOOL IsInsideNextScreen(short x, short y, short xoff, short yoff)
//Mask1 Set mask bit while drawing. 1 = on
//Mask2 Do not draw to mask areas. 1= on
-void cmdSTP(u8 * baseAddr)
+void cmdSTP(unsigned char * baseAddr)
{
unsigned long gdata = ((unsigned long*)baseAddr)[0];
@@ -1778,7 +1778,7 @@ void cmdSTP(u8 * baseAddr)
// cmd: Set texture page infos
////////////////////////////////////////////////////////////////////////
-void cmdTexturePage(u8 * baseAddr)
+void cmdTexturePage(unsigned char * baseAddr)
{
unsigned long gdata = ((unsigned long*)baseAddr)[0];
UpdateGlobalTP((unsigned short)gdata);
@@ -1789,7 +1789,7 @@ void cmdTexturePage(u8 * baseAddr)
// cmd: turn on/off texture window
////////////////////////////////////////////////////////////////////////
-void cmdTextureWindow(u8 *baseAddr)
+void cmdTextureWindow(unsigned char *baseAddr)
{
unsigned long gdata = ((unsigned long*)baseAddr)[0];
@@ -1998,7 +1998,7 @@ void ClampToPSXScreenOffset(short *x0, short *y0, short *x1, short *y1)
// cmd: start of drawing area... primitives will be clipped inside
////////////////////////////////////////////////////////////////////////
-void cmdDrawAreaStart(u8 * baseAddr)
+void cmdDrawAreaStart(unsigned char * baseAddr)
{
unsigned long gdata = ((unsigned long*)baseAddr)[0];
@@ -2029,7 +2029,7 @@ void cmdDrawAreaStart(u8 * baseAddr)
// cmd: end of drawing area... primitives will be clipped inside
////////////////////////////////////////////////////////////////////////
-void cmdDrawAreaEnd(u8 * baseAddr)
+void cmdDrawAreaEnd(unsigned char * baseAddr)
{
unsigned long gdata = ((unsigned long*)baseAddr)[0];
@@ -2064,7 +2064,7 @@ void cmdDrawAreaEnd(u8 * baseAddr)
// cmd: draw offset... will be added to prim coords
////////////////////////////////////////////////////////////////////////
-void cmdDrawOffset(u8 * baseAddr)
+void cmdDrawOffset(unsigned char * baseAddr)
{
unsigned long gdata = ((unsigned long*)baseAddr)[0];
@@ -2095,7 +2095,7 @@ void cmdDrawOffset(u8 * baseAddr)
// cmd: load image to vram
////////////////////////////////////////////////////////////////////////
-void primLoadImage(u8 * baseAddr)
+void primLoadImage(unsigned char * baseAddr)
{
unsigned short *sgpuData = ((unsigned short *) baseAddr);
@@ -2252,7 +2252,7 @@ void CheckWriteUpdate()
// cmd: vram -> psx mem
////////////////////////////////////////////////////////////////////////
-void primStoreImage(u8 * baseAddr)
+void primStoreImage(unsigned char * baseAddr)
{
unsigned short *sgpuData = ((unsigned short *) baseAddr);
@@ -2274,7 +2274,7 @@ void primStoreImage(u8 * baseAddr)
// cmd: blkfill - NO primitive! Doesn't care about draw areas...
////////////////////////////////////////////////////////////////////////
-void primBlkFill(u8 * baseAddr)
+void primBlkFill(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -2471,7 +2471,7 @@ void MoveImageWrapped(short imageX0,short imageY0,
////////////////////////////////////////////////////////////////////////
-void primMoveImage(u8 * baseAddr)
+void primMoveImage(unsigned char * baseAddr)
{
short *sgpuData = ((short *) baseAddr);
short imageY0,imageX0,imageY1,imageX1,imageSX,imageSY,i,j;
@@ -2630,7 +2630,7 @@ void primMoveImage(u8 * baseAddr)
// cmd: draw free-size Tile
////////////////////////////////////////////////////////////////////////
-void primTileS(u8 * baseAddr)
+void primTileS(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long*)baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -2695,7 +2695,7 @@ void primTileS(u8 * baseAddr)
// cmd: draw 1 dot Tile (point)
////////////////////////////////////////////////////////////////////////
-void primTile1(u8 * baseAddr)
+void primTile1(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long*)baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -2742,7 +2742,7 @@ void primTile1(u8 * baseAddr)
// cmd: draw 8 dot Tile (small rect)
////////////////////////////////////////////////////////////////////////
-void primTile8(u8 * baseAddr)
+void primTile8(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long*)baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -2789,7 +2789,7 @@ void primTile8(u8 * baseAddr)
// cmd: draw 16 dot Tile (medium rect)
////////////////////////////////////////////////////////////////////////
-void primTile16(u8 * baseAddr)
+void primTile16(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long*)baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -2900,7 +2900,7 @@ void DrawMultiFilterSprite(void)
// cmd: small sprite (textured rect)
////////////////////////////////////////////////////////////////////////
-void primSprt8(u8 * baseAddr)
+void primSprt8(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -3021,7 +3021,7 @@ void primSprt8(u8 * baseAddr)
// cmd: medium sprite (textured rect)
////////////////////////////////////////////////////////////////////////
-void primSprt16(u8 * baseAddr)
+void primSprt16(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -3141,7 +3141,7 @@ void primSprt16(u8 * baseAddr)
// cmd: free-size sprite (textured rect)
////////////////////////////////////////////////////////////////////////
-void primSprtSRest(u8 * baseAddr,unsigned short type)
+void primSprtSRest(unsigned char * baseAddr,unsigned short type)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -3312,7 +3312,7 @@ void primSprtSRest(u8 * baseAddr,unsigned short type)
}
}
-void primSprtS(u8 * baseAddr)
+void primSprtS(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -3451,7 +3451,7 @@ void primSprtS(u8 * baseAddr)
// cmd: flat shaded Poly4
////////////////////////////////////////////////////////////////////////
-void primPolyF4(u8 *baseAddr)
+void primPolyF4(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -3496,7 +3496,7 @@ void primPolyF4(u8 *baseAddr)
// cmd: smooth shaded Poly4
////////////////////////////////////////////////////////////////////////
-void primPolyG4(u8 * baseAddr);
+void primPolyG4(unsigned char * baseAddr);
BOOL bDrawOffscreenFrontFF9G4(void)
{
@@ -3519,9 +3519,9 @@ BOOL bDrawOffscreenFrontFF9G4(void)
return TRUE;
}
-BOOL bCheckFF9G4(u8 * baseAddr)
+BOOL bCheckFF9G4(unsigned char * baseAddr)
{
- static u8 pFF9G4Cache[32];
+ static unsigned char pFF9G4Cache[32];
static int iFF9Fix=0;
if(baseAddr)
@@ -3560,7 +3560,7 @@ BOOL bCheckFF9G4(u8 * baseAddr)
////////////////////////////////////////////////////////////////////////
-void primPolyG4(u8 * baseAddr)
+void primPolyG4(unsigned char * baseAddr)
{
unsigned long *gpuData = (unsigned long *)baseAddr;
short *sgpuData = ((short *) baseAddr);
@@ -3778,7 +3778,7 @@ BOOL DoLineCheck(unsigned long * gpuData)
////////////////////////////////////////////////////////////////////////
-void primPolyFT3(u8 * baseAddr)
+void primPolyFT3(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4214,7 +4214,7 @@ void RectTexAlign(void)
}
-void primPolyFT4(u8 * baseAddr)
+void primPolyFT4(unsigned char * baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4302,7 +4302,7 @@ void primPolyFT4(u8 * baseAddr)
// cmd: smooth shaded Texture3
////////////////////////////////////////////////////////////////////////
-void primPolyGT3(u8 *baseAddr)
+void primPolyGT3(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4411,7 +4411,7 @@ void primPolyGT3(u8 *baseAddr)
// cmd: smooth shaded Poly3
////////////////////////////////////////////////////////////////////////
-void primPolyG3(u8 *baseAddr)
+void primPolyG3(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4456,7 +4456,7 @@ void primPolyG3(u8 *baseAddr)
// cmd: smooth shaded Texture4
////////////////////////////////////////////////////////////////////////
-void primPolyGT4(u8 *baseAddr)
+void primPolyGT4(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4576,7 +4576,7 @@ void primPolyGT4(u8 *baseAddr)
// cmd: smooth shaded Poly3
////////////////////////////////////////////////////////////////////////
-void primPolyF3(u8 *baseAddr)
+void primPolyF3(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4620,7 +4620,7 @@ void primPolyF3(u8 *baseAddr)
// cmd: skipping shaded polylines
////////////////////////////////////////////////////////////////////////
-void primLineGSkip(u8 *baseAddr)
+void primLineGSkip(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4645,7 +4645,7 @@ void primLineGSkip(u8 *baseAddr)
// cmd: shaded polylines
////////////////////////////////////////////////////////////////////////
-void primLineGEx(u8 *baseAddr)
+void primLineGEx(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
int iMax=255;
@@ -4709,7 +4709,7 @@ void primLineGEx(u8 *baseAddr)
// cmd: shaded polyline2
////////////////////////////////////////////////////////////////////////
-void primLineG2(u8 *baseAddr)
+void primLineG2(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4754,7 +4754,7 @@ void primLineG2(u8 *baseAddr)
// cmd: skipping flat polylines
////////////////////////////////////////////////////////////////////////
-void primLineFSkip(u8 *baseAddr)
+void primLineFSkip(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
int i=2,iMax=255;
@@ -4774,7 +4774,7 @@ void primLineFSkip(u8 *baseAddr)
// cmd: drawing flat polylines
////////////////////////////////////////////////////////////////////////
-void primLineFEx(u8 *baseAddr)
+void primLineFEx(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
int iMax;
@@ -4832,7 +4832,7 @@ void primLineFEx(u8 *baseAddr)
// cmd: drawing flat polyline2
////////////////////////////////////////////////////////////////////////
-void primLineF2(u8 *baseAddr)
+void primLineF2(unsigned char *baseAddr)
{
unsigned long *gpuData = ((unsigned long *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -4873,7 +4873,7 @@ void primLineF2(u8 *baseAddr)
// cmd: well, easiest command... not implemented
////////////////////////////////////////////////////////////////////////
-void primNI(u8 *bA)
+void primNI(unsigned char *bA)
{
}
@@ -4881,7 +4881,7 @@ void primNI(u8 *bA)
// cmd func ptr table
////////////////////////////////////////////////////////////////////////
-void (*primTableJ[256])(u8 *) =
+void (*primTableJ[256])(unsigned char *) =
{
// 00
primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI,
@@ -4953,7 +4953,7 @@ void (*primTableJ[256])(u8 *) =
// cmd func ptr table for skipping
////////////////////////////////////////////////////////////////////////
-void (*primTableSkip[256])(u8 *) =
+void (*primTableSkip[256])(unsigned char *) =
{
// 00
primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI,
diff --git a/plugins/gpu-gles/gpuPrim.h b/plugins/gpu-gles/gpuPrim.h
index 58d3311..dc49767 100644
--- a/plugins/gpu-gles/gpuPrim.h
+++ b/plugins/gpu-gles/gpuPrim.h
@@ -45,7 +45,7 @@ BOOL CheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1)
BOOL CheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1);
BOOL FastCheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1);
BOOL FastCheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1);
-BOOL bCheckFF9G4(u8 * baseAddr);
+BOOL bCheckFF9G4(unsigned char * baseAddr);
void SetScanTrans(void);
void SetScanTexTrans(void);
void DrawMultiBlur(void);
diff --git a/plugins/gpu-gles/gpuTexture.c b/plugins/gpu-gles/gpuTexture.c
index 98f8c9c..f057951 100644
--- a/plugins/gpu-gles/gpuTexture.c
+++ b/plugins/gpu-gles/gpuTexture.c
@@ -139,7 +139,7 @@ unsigned long (*PalTexturedColourFn) (unsigned long);
////////////////////////////////////////////////////////////////////////
-u8 * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache);
+unsigned char * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache);
void LoadSubTexturePageSort(int pageid, int mode, short cx, short cy);
void LoadPackedSubTexturePageSort(int pageid, int mode, short cx, short cy);
void DefineSubTextureSort(void);
@@ -189,10 +189,10 @@ typedef struct textureSubCacheEntryTagS
{
unsigned long ClutID;
EXLong pos;
- u8 posTX;
- u8 posTY;
- u8 cTexID;
- u8 Opaque;
+ unsigned char posTX;
+ unsigned char posTY;
+ unsigned char cTexID;
+ unsigned char Opaque;
} textureSubCacheEntryS;
#ifdef _WINDOWS
@@ -220,7 +220,7 @@ int iTexWndLimit=MAXWNDTEXCACHE/2;
GLubyte * texturepart=NULL;
GLubyte * texturebuffer=NULL;
unsigned long g_x1,g_y1,g_x2,g_y2;
-u8 ubOpaqueDraw=0;
+unsigned char ubOpaqueDraw=0;
unsigned short MAXTPAGES = 32;
unsigned short CLUTMASK = 0x7fff;
@@ -462,7 +462,7 @@ void CheckTextureMemory(void)
{
GLboolean b;GLboolean * bDetail;
int i,iCnt,iRam=iVRamSize*1024*1024;
- int iTSize;s8 * p;
+ int iTSize;char * p;
if(iVRamSize)
@@ -493,7 +493,7 @@ void CheckTextureMemory(void)
iTSize=256;
- p=(s8 *)malloc(iTSize*iTSize*4);
+ p=(char *)malloc(iTSize*iTSize*4);
iCnt=0;
glGenTextures(MAXSORTTEX,uiStexturePage);
@@ -752,7 +752,7 @@ void InvalidateWndTextureArea(long X,long Y,long W, long H)
void MarkFree(textureSubCacheEntryS * tsx)
{
EXLong * ul, * uls;
- int j,iMax;u8 x1,y1,dx,dy;
+ int j,iMax;unsigned char x1,y1,dx,dy;
uls=pxSsubtexLeft[tsx->cTexID];
iMax=uls->l;ul=uls+1;
@@ -926,7 +926,7 @@ void LoadStretchPackedWndTexturePage(int pageid, int mode, short cx, short cy)
unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo;
unsigned int palstart;
unsigned short *px,*pa,*ta;
- u8 *cSRCPtr,*cOSRCPtr;
+ unsigned char *cSRCPtr,*cOSRCPtr;
unsigned short *wSRCPtr,*wOSRCPtr;
unsigned long LineOffset;unsigned short s;
int pmult=pageid/16;
@@ -1118,7 +1118,7 @@ void LoadStretchWndTexturePage(int pageid, int mode, short cx, short cy)
unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo,s;
unsigned int palstart;
unsigned long *px,*pa,*ta;
- u8 *cSRCPtr,*cOSRCPtr;
+ unsigned char *cSRCPtr,*cOSRCPtr;
unsigned short *wSRCPtr,*wOSRCPtr;
unsigned long LineOffset;
int pmult=pageid/16;
@@ -1329,7 +1329,7 @@ void LoadPackedWndTexturePage(int pageid, int mode, short cx, short cy)
unsigned long start,row,column,j,sxh,sxm;
unsigned int palstart;
unsigned short *px,*pa,*ta;
- u8 *cSRCPtr;
+ unsigned char *cSRCPtr;
unsigned short *wSRCPtr;
unsigned long LineOffset;
int pmult=pageid/16;
@@ -1471,7 +1471,7 @@ void LoadWndTexturePage(int pageid, int mode, short cx, short cy)
unsigned long start,row,column,j,sxh,sxm;
unsigned int palstart;
unsigned long *px,*pa,*ta;
- u8 *cSRCPtr;
+ unsigned char *cSRCPtr;
unsigned short *wSRCPtr;
unsigned long LineOffset;
int pmult=pageid/16;
@@ -1679,12 +1679,12 @@ void DefinePalTextureWnd(void)
void LoadPalWndTexturePage(int pageid, int mode, short cx, short cy)
{
unsigned long start,row,column,j,sxh,sxm;
- u8 *ta;
- u8 *cSRCPtr;
+ unsigned char *ta;
+ unsigned char *cSRCPtr;
unsigned long LineOffset;
int pmult=pageid/16;
- ta=(u8 *)texturepart;
+ ta=(unsigned char *)texturepart;
switch(mode)
{
@@ -1739,15 +1739,15 @@ void LoadPalWndTexturePage(int pageid, int mode, short cx, short cy)
void LoadStretchPalWndTexturePage(int pageid, int mode, short cx, short cy)
{
unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo;
- u8 *ta,s;
- u8 *cSRCPtr,*cOSRCPtr;
+ unsigned char *ta,s;
+ unsigned char *cSRCPtr,*cOSRCPtr;
unsigned long LineOffset;
int pmult=pageid/16;
ldxo=TWin.Position.x1-TWin.OPosition.x1;
ldy =TWin.Position.y1-TWin.OPosition.y1;
- ta=(u8 *)texturepart;
+ ta=(unsigned char *)texturepart;
switch(mode)
{
@@ -2006,7 +2006,7 @@ void DefineTextureMovie(void)
// movie texture: load
////////////////////////////////////////////////////////////////////////
-u8 * LoadDirectMovieFast(void)
+unsigned char * LoadDirectMovieFast(void)
{
long row,column;
unsigned int startxy;
@@ -2015,13 +2015,13 @@ u8 * LoadDirectMovieFast(void)
if(PSXDisplay.RGB24)
{
- u8 * pD;
+ unsigned char * pD;
startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0;
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++,startxy+=1024)
{
- pD=(u8 *)&psxVuw[startxy];
+ pD=(unsigned char *)&psxVuw[startxy];
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)
{
*ta++=*((unsigned long *)pD)|0xff000000;
@@ -2058,7 +2058,7 @@ GLuint LoadTextureMovieFast(void)
{
if(PSXDisplay.RGB24)
{
- u8 * pD;
+ unsigned char * pD;
unsigned long * ta=(unsigned long *)texturepart;
startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0;
@@ -2066,7 +2066,7 @@ GLuint LoadTextureMovieFast(void)
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++,startxy+=1024)
{
//startxy=((1024)*column)+xrMovieArea.x0;
- pD=(u8 *)&psxVuw[startxy];
+ pD=(unsigned char *)&psxVuw[startxy];
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)
{
*ta++=*((unsigned long *)pD)|0xff000000;
@@ -2114,7 +2114,7 @@ GLuint LoadTextureMovie(void)
{
if(PSXDisplay.RGB24)
{
- u8 * pD;
+ unsigned char * pD;
unsigned long * ta=(unsigned long *)texturepart;
if(b_X)
@@ -2122,7 +2122,7 @@ GLuint LoadTextureMovie(void)
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++)
{
startxy=((1024)*column)+xrMovieArea.x0;
- pD=(u8 *)&psxVuw[startxy];
+ pD=(unsigned char *)&psxVuw[startxy];
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)
{
*ta++=*((unsigned long *)pD)|0xff000000;
@@ -2143,7 +2143,7 @@ GLuint LoadTextureMovie(void)
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++)
{
startxy=((1024)*column)+xrMovieArea.x0;
- pD=(u8 *)&psxVuw[startxy];
+ pD=(unsigned char *)&psxVuw[startxy];
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)
{
*ta++=*((unsigned long *)pD)|0xff000000;
@@ -2327,7 +2327,7 @@ GLuint Fake15BitTexture(void)
if(!gTexFrameName)
{
- s8 * p;
+ char * p;
if(iResX>1280 || iResY>1024) iFTex=2048;
else
@@ -2343,7 +2343,7 @@ GLuint Fake15BitTexture(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, iFilter);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, iFilter);
- p=(s8 *)malloc(iFTex*iFTex*4);
+ p=(char *)malloc(iFTex*iFTex*4);
memset(p,0,iFTex*iFTex*4);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, iFTex, iFTex, 0, GL_RGBA, GL_UNSIGNED_BYTE, p);
free(p);
@@ -2431,7 +2431,7 @@ GLuint Fake15BitTexture(void)
if(glGetError())
{
- s8 * p=(s8 *)malloc(iFTex*iFTex*4);
+ char * p=(char *)malloc(iFTex*iFTex*4);
memset(p,0,iFTex*iFTex*4);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, iFTex, iFTex,
GL_RGBA, GL_UNSIGNED_BYTE, p);
@@ -2465,7 +2465,7 @@ void LoadSubTexturePageSort(int pageid, int mode, short cx, short cy)
unsigned long start,row,column,j,sxh,sxm;
unsigned int palstart;
unsigned long *px,*pa,*ta;
- u8 *cSRCPtr;
+ unsigned char *cSRCPtr;
unsigned short *wSRCPtr;
unsigned long LineOffset;
unsigned long x2a,xalign=0;
@@ -2793,7 +2793,7 @@ void LoadPackedSubTexturePageSort(int pageid, int mode, short cx, short cy)
unsigned long start,row,column,j,sxh,sxm;
unsigned int palstart;
unsigned short *px,*pa,*ta;
- u8 *cSRCPtr;
+ unsigned char *cSRCPtr;
unsigned short *wSRCPtr;
unsigned long LineOffset;
unsigned long x2a,xalign=0;
@@ -3109,8 +3109,8 @@ void LoadPackedSubTexturePageSort(int pageid, int mode, short cx, short cy)
#define Q_INTERPOLATE8(A, B, C, D) (((((A & qcolorMask8) >> 2) + ((B & qcolorMask8) >> 2) + ((C & qcolorMask8) >> 2) + ((D & qcolorMask8) >> 2) + ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8))|((((A&0xFF000000)==0x50000000)?0x50000000:(((B&0xFF000000)==0x50000000)?0x50000000:(((C&0xFF000000)==0x50000000)?0x50000000:(((D&0xFF000000)==0x50000000)?0x50000000:(((A&0xFF000000)==0x00000000)?0x00000000:(((B&0xFF000000)==0x00000000)?0x00000000:(((C&0xFF000000)==0x00000000)?0x00000000:(((D&0xFF000000)==0x00000000)?0x00000000:0xFF000000)))))))))))
-void Super2xSaI_ex8_Ex(u8 *srcPtr, DWORD srcPitch,
- u8 *dstBitmap, int width, int height)
+void Super2xSaI_ex8_Ex(unsigned char *srcPtr, DWORD srcPitch,
+ unsigned char *dstBitmap, int width, int height)
{
DWORD dstPitch = srcPitch * 2;
DWORD line;
@@ -3254,8 +3254,8 @@ void Super2xSaI_ex8_Ex(u8 *srcPtr, DWORD srcPitch,
}
-void Super2xSaI_ex8(u8 *srcPtr, DWORD srcPitch,
- u8 *dstBitmap, int width, int height)
+void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
+ unsigned char *dstBitmap, int width, int height)
{
DWORD dstPitch = srcPitch * 2;
DWORD line;
@@ -3548,15 +3548,15 @@ void DoTexGarbageCollection(void)
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-u8 * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache)
+unsigned char * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache)
{
textureSubCacheEntryS * tsx, * tsb, *tsg;//, *tse=NULL;
int i,iMax;EXLong npos;
- u8 cx,cy;
+ unsigned char cx,cy;
int iC,j,k;unsigned long rx,ry,mx,my;
EXLong * ul=0, * uls;
EXLong rfree;
- u8 cXAdj,cYAdj;
+ unsigned char cXAdj,cYAdj;
npos.l=*((unsigned long *)&gl_ux[4]);
@@ -3860,7 +3860,7 @@ BOOL GetCompressTexturePlace(textureSubCacheEntryS * tsx)
{
int i,j,k,iMax,iC;unsigned long rx,ry,mx,my;
EXLong * ul=0, * uls, rfree;
- u8 cXAdj=1,cYAdj=1;
+ unsigned char cXAdj=1,cYAdj=1;
rx=(int)tsx->pos.c[2]-(int)tsx->pos.c[3];
ry=(int)tsx->pos.c[0]-(int)tsx->pos.c[1];
@@ -4128,11 +4128,11 @@ void CompressTextureSpace(void)
GLuint SelectSubTextureS(long TextureMode, unsigned long GivenClutId)
{
- u8 * OPtr;unsigned short iCache;short cx,cy;
+ unsigned char * OPtr;unsigned short iCache;short cx,cy;
// sort sow/tow infos for fast access
- u8 ma1,ma2,mi1,mi2;
+ unsigned char ma1,ma2,mi1,mi2;
if(gl_ux[0]>gl_ux[1]) {mi1=gl_ux[1];ma1=gl_ux[0];}
else {mi1=gl_ux[0];ma1=gl_ux[1];}
if(gl_ux[2]>gl_ux[3]) {mi2=gl_ux[3];ma2=gl_ux[2];}