{\r
BOOL bPacked=FALSE; // default: no packed pixel support\r
\r
- if(strstr((s8 *)glGetString(GL_EXTENSIONS), // packed pixels available?\r
+ if(strstr((char *)glGetString(GL_EXTENSIONS), // packed pixels available?\r
"GL_EXT_packed_pixels")) \r
bPacked=TRUE; // -> ok\r
\r
extern "C" {\r
#endif\r
\r
-typedef unsigned char u8;\r
-typedef signed char s8;\r
-typedef unsigned short int u16;\r
-typedef signed short int s16;\r
-typedef unsigned long u32;\r
-typedef signed long s32;\r
-typedef unsigned long long int u64;\r
-typedef signed long long int s64;\r
-\r
#ifndef _WINDOWS\r
#ifdef __NANOGL__\r
#include <gl/gl.h>\r
union\r
COLTAG\r
{\r
- u8 col[4];\r
+ unsigned char col[4];\r
unsigned long lcol;\r
} c;\r
\r
\r
typedef union EXShortTag\r
{\r
- u8 c[2];\r
+ unsigned char c[2];\r
unsigned short s;\r
} EXShort;\r
\r
typedef union EXLongTag\r
{\r
- u8 c[4];\r
+ unsigned char c[4];\r
unsigned long l;\r
EXShort s[2];\r
} EXLong;\r
//extern PFNGLBLENDEQU glBlendEquationEXTEx;\r
//extern PFNGLCOLORTABLEEXT glColorTableEXTEx;\r
\r
-extern u8 gl_ux[8];\r
-extern u8 gl_vy[8];\r
+extern unsigned char gl_ux[8];\r
+extern unsigned char gl_vy[8];\r
extern OGLVertex vertex[4];\r
extern short sprtY,sprtX,sprtH,sprtW;\r
#ifdef _WINDOWS\r
extern BOOL bRenderFrontBuffer;\r
extern unsigned long ulOLDCOL;\r
extern unsigned long ulClutID;\r
-extern void (*primTableJ[256])(u8 *);\r
-extern void (*primTableSkip[256])(u8 *);\r
+extern void (*primTableJ[256])(unsigned char *);\r
+extern void (*primTableSkip[256])(unsigned char *);\r
extern unsigned short usMirror;\r
extern unsigned long dwCfgFixes;\r
extern unsigned long dwActFixes;\r
\r
#ifndef _IN_TEXTURE\r
\r
-extern u8 ubOpaqueDraw;\r
+extern unsigned char ubOpaqueDraw;\r
extern GLint giWantedRGBA;\r
extern GLint giWantedFMT;\r
extern GLint giWantedTYPE;\r
extern int iColDepth;\r
extern BOOL bChangeRes;\r
extern BOOL bWindowMode;\r
-extern s8 szDispBuf[];\r
-extern s8 szGPUKeys[];\r
+extern char szDispBuf[];\r
+extern char szGPUKeys[];\r
extern PSXDisplay_t PSXDisplay;\r
extern PSXDisplay_t PreviousPSXDisplay;\r
//extern unsigned long ulKeybits;\r
extern short imageX0,imageX1;\r
extern short imageY0,imageY1;\r
extern long lClearOnSwap,lClearOnSwapColor;\r
-extern u8 * psxVub;\r
-extern s8 * psxVsb;\r
+extern unsigned char * psxVub;\r
+extern char * psxVsb;\r
extern unsigned short * psxVuw;\r
extern signed short * psxVsw;\r
extern unsigned long * psxVul;\r
#ifndef _IN_CFG\r
\r
#ifndef _WINDOWS\r
-extern s8 * pConfigFile;\r
+extern char * pConfigFile;\r
#endif\r
\r
#endif\r
//-----------------------------------------------------//\r
\r
typedef struct {\r
-u8 r;\r
-u8 g;\r
-u8 b;\r
-u8 a;\r
+unsigned char r;\r
+unsigned char g;\r
+unsigned char b;\r
+unsigned char a;\r
} Vec4f;\r
\r
/**/\r
// memory image of the PSX vram\r
////////////////////////////////////////////////////////////////////////\r
\r
-u8 *psxVSecure;\r
-u8 *psxVub;\r
+unsigned char *psxVSecure;\r
+unsigned char *psxVub;\r
signed char *psxVsb;\r
unsigned short *psxVuw;\r
unsigned short *psxVuw_eom;\r
\r
static long GPUdataRet;\r
long lGPUstatusRet;\r
-s8 szDispBuf[64];\r
+char szDispBuf[64];\r
\r
static unsigned long gpuDataM[256];\r
-static u8 gpuCommand = 0;\r
+static unsigned char gpuCommand = 0;\r
static long gpuDataC = 0;\r
static long gpuDataP = 0;\r
\r
GLuint uiScanLine=0;\r
int iUseScanLines=0;\r
long lSelectedSlot=0;\r
-u8 * pGfxCardScreen=0;\r
+unsigned char * pGfxCardScreen=0;\r
int iBlurBuffer=0;\r
int iScanBlend=0;\r
int iRenderFVR=0;\r
////////////////////////////////////////////////////////////////////////\r
\r
#ifdef _WINDOWS\r
-s8 * CALLBACK PSEgetLibName(void)\r
+char * CALLBACK PSEgetLibName(void)\r
{\r
return "name";\r
}\r
SetAspectRatio();\r
}\r
\r
-s8 * GetConfigInfos(int hW)\r
+char * GetConfigInfos(int hW)\r
{\r
#ifdef _WINDOWS\r
HDC hdc;HGLRC hglrc;\r
#endif\r
- s8 szO[2][4]={"off","on "};\r
- s8 szTxt[256];\r
- s8 * pB=(s8 *)malloc(32767);\r
+ char szO[2][4]={"off","on "};\r
+ char szTxt[256];\r
+ char * pB=(char *)malloc(32767);\r
/*\r
if(!pB) return NULL;\r
*pB=0;\r
strcat(pB,szTxt);\r
sprintf(szTxt,"OGL version: %s\r\n\r\n",(char *)glGetString(GL_VERSION));\r
strcat(pB,szTxt);\r
- //strcat(pB,(s8 *)glGetString(GL_EXTENSIONS));\r
+ //strcat(pB,(char *)glGetString(GL_EXTENSIONS));\r
//strcat(pB,"\r\n\r\n");\r
\r
#ifdef _WINDOWS\r
bKeepRatio = TRUE;\r
// different ways of accessing PSX VRAM\r
\r
-psxVSecure=(u8 *)malloc((iGPUHeight*2)*1024 + (1024*1024)); // always alloc one extra MB for soft drawing funcs security\r
+psxVSecure=(unsigned char *)malloc((iGPUHeight*2)*1024 + (1024*1024)); // always alloc one extra MB for soft drawing funcs security\r
if(!psxVSecure) return -1;\r
\r
psxVub=psxVSecure+512*1024; // security offset into double sized psx vram!\r
int ux,uy,udx,udy,wx,wy;\r
unsigned short * p1, *p2;\r
float XS,YS;\r
- u8 * ps;\r
- u8 * px;\r
+ unsigned char * ps;\r
+ unsigned char * px;\r
unsigned short s,sx;\r
\r
if(STATUSREG&GPUSTATUS_RGB24) return;\r
if(!pGfxCardScreen)\r
{\r
glPixelStorei(GL_PACK_ALIGNMENT,1);\r
- pGfxCardScreen=(u8 *)malloc(iResX*iResY*4);\r
+ pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4);\r
}\r
\r
ps=pGfxCardScreen;\r
{\r
unsigned short sArea;unsigned short * p;\r
int ux,uy,udx,udy,wx,wy;float XS,YS;\r
- u8 * ps, * px;\r
+ unsigned char * ps, * px;\r
unsigned short s=0,sx;\r
\r
if(STATUSREG&GPUSTATUS_RGB24) return;\r
if(!pGfxCardScreen)\r
{\r
glPixelStorei(GL_PACK_ALIGNMENT,1);\r
- pGfxCardScreen=(u8 *)malloc(iResX*iResY*4);\r
+ pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4);\r
}\r
\r
ps=pGfxCardScreen;\r
// helper table to know how much data is used by drawing commands\r
////////////////////////////////////////////////////////////////////////\r
\r
-const u8 primTableCX[256] =\r
+const unsigned char primTableCX[256] =\r
{\r
// 00\r
0,0,3,0,0,0,0,0,\r
void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize)\r
#endif\r
{\r
-u8 command;\r
+unsigned char command;\r
unsigned long gdata=0;\r
int i=0;\r
GPUIsBusy;\r
\r
if(iDataWriteMode==DR_NORMAL)\r
{\r
- void (* *primFunc)(u8 *);\r
+ void (* *primFunc)(unsigned char *);\r
if(bSkipNextFrame) primFunc=primTableSkip;\r
else primFunc=primTableJ;\r
\r
\r
if(gpuDataC == 0)\r
{\r
- command = (u8)((gdata>>24) & 0xff);\r
+ command = (unsigned char)((gdata>>24) & 0xff);\r
\r
if(primTableCX[command])\r
{\r
if(gpuDataP == gpuDataC)\r
{\r
gpuDataC=gpuDataP=0;\r
- primFunc[gpuCommand]((u8 *)gpuDataM);\r
+ primFunc[gpuCommand]((unsigned char *)gpuDataM);\r
\r
if(dwEmuFixes&0x0001 || dwActFixes&0x20000) // hack for emulating "gpu busy" in some games\r
iFakePrimBusy=4;\r
\r
/*#include <unistd.h>\r
\r
-void StartCfgTool(s8 * pCmdLine) // linux: start external cfg tool\r
+void StartCfgTool(char * pCmdLine) // linux: start external cfg tool\r
{\r
- FILE * cf;s8 filename[255],t[255];\r
+ FILE * cf;char filename[255],t[255];\r
\r
strcpy(filename,"cfg/cfgPeopsMesaGL"); // look in cfg sub folder first\r
cf=fopen(filename,"rb");\r
#endif\r
{\r
unsigned long dmaMem;\r
-u8 * baseAddrB;\r
+unsigned char * baseAddrB;\r
short count;unsigned int DMACommandCounter = 0;\r
\r
if(bIsFirstFrame) GLinitialize();\r
\r
lUsedAddr[0]=lUsedAddr[1]=lUsedAddr[2]=0xffffff;\r
\r
-baseAddrB = (u8*) baseAddrL;\r
+baseAddrB = (unsigned char*) baseAddrL;\r
\r
do\r
{\r
//10 = red\r
//11 = transparent\r
\r
-u8 cFont[10][120]=\r
+unsigned char cFont[10][120]=\r
{\r
// 0\r
{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,\r
\r
////////////////////////////////////////////////////////////////////////\r
\r
-void PaintPicDot(u8 * p,u8 c)\r
+void PaintPicDot(unsigned char * p,unsigned char c)\r
{\r
if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;}\r
if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;}\r
////////////////////////////////////////////////////////////////////////\r
\r
#ifdef _WINDOWS\r
-void CALLBACK GPUgetScreenPic(u8 * pMem)\r
+void CALLBACK GPUgetScreenPic(unsigned char * pMem)\r
#else\r
-long CALLBACK GPUgetScreenPic(u8 * pMem)\r
+long CALLBACK GPUgetScreenPic(unsigned char * pMem)\r
#endif\r
{\r
float XS,YS;int x,y,v;\r
- u8 * ps, * px, * pf;\r
- u8 c;\r
+ unsigned char * ps, * px, * pf;\r
+ unsigned char c;\r
\r
if(!pGfxCardScreen)\r
{\r
glPixelStorei(GL_PACK_ALIGNMENT,1);\r
- pGfxCardScreen=(u8 *)malloc(iResX*iResY*4);\r
+ pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4);\r
}\r
\r
ps=pGfxCardScreen;\r
{\r
c=cFont[lSelectedSlot][x+y*6];\r
v=(c&0xc0)>>6;\r
- PaintPicDot(pf,(u8)v);pf+=3; // paint the dots into the rect\r
+ PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect\r
v=(c&0x30)>>4;\r
- PaintPicDot(pf,(u8)v);pf+=3;\r
+ PaintPicDot(pf,(unsigned char)v);pf+=3;\r
v=(c&0x0c)>>2;\r
- PaintPicDot(pf,(u8)v);pf+=3;\r
+ PaintPicDot(pf,(unsigned char)v);pf+=3;\r
v=c&0x03;\r
- PaintPicDot(pf,(u8)v);pf+=3;\r
+ PaintPicDot(pf,(unsigned char)v);pf+=3;\r
}\r
pf+=104*3;\r
}\r
////////////////////////////////////////////////////////////////////////\r
\r
#ifdef _WINDOWS\r
-void CALLBACK GPUshowScreenPic(u8 * pMem)\r
+void CALLBACK GPUshowScreenPic(unsigned char * pMem)\r
#else\r
-long CALLBACK GPUshowScreenPic(u8 * pMem)\r
+long CALLBACK GPUshowScreenPic(unsigned char * pMem)\r
#endif\r
{\r
// DestroyPic();\r
#define bool unsigned short\r
\r
typedef struct {\r
- u32 ulFreezeVersion;\r
- u32 ulStatus;\r
- u32 ulControl[256];\r
- u8 psxVRam[1024*1024*2];\r
+ unsigned int ulFreezeVersion;\r
+ unsigned int ulStatus;\r
+ unsigned int ulControl[256];\r
+ unsigned char psxVRam[1024*1024*2];\r
} GPUFreeze_t;\r
\r
long CALLBACK GPUinit();\r
void CALLBACK GPUupdateLace(void);\r
void CALLBACK GPUmakeSnapshot(void);\r
long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF);\r
-long CALLBACK GPUgetScreenPic(u8 * pMem);\r
-long CALLBACK GPUshowScreenPic(u8 * pMem);\r
+long CALLBACK GPUgetScreenPic(unsigned char * pMem);\r
+long CALLBACK GPUshowScreenPic(unsigned char * pMem);\r
//void CALLBACK GPUkeypressed(int keycode);\r
//void CALLBACK GPUdisplayText(s8 * pText);\r
//void CALLBACK GPUclearDynarec(void (CALLBACK *callback)(void));\r
void CheckVRamReadEx(int x, int y, int dx, int dy);\r
void SetFixes(void);\r
\r
-void PaintPicDot(u8 * p,u8 c);\r
-//void DrawNumBorPic(u8 *pMem, int lSelectedSlot);\r
+void PaintPicDot(unsigned char * p,unsigned char c);\r
+//void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot);\r
void ResizeWindow();\r
\r
////////////////////////////////////////////////////////////////////////////\r
////////////////////////////////////////////////////////////////////////\r
////////////////////////////////////////////////////////////////////////\r
\r
-u8 * LoadDirectMovieFast(void);\r
+unsigned char * LoadDirectMovieFast(void);\r
\r
void UploadScreenEx(long Position)\r
{\r
//Mask1 Set mask bit while drawing. 1 = on\r
//Mask2 Do not draw to mask areas. 1= on\r
\r
-void cmdSTP(u8 * baseAddr)\r
+void cmdSTP(unsigned char * baseAddr)\r
{\r
unsigned long gdata = ((unsigned long*)baseAddr)[0];\r
\r
// cmd: Set texture page infos\r
////////////////////////////////////////////////////////////////////////\r
\r
-void cmdTexturePage(u8 * baseAddr)\r
+void cmdTexturePage(unsigned char * baseAddr)\r
{\r
unsigned long gdata = ((unsigned long*)baseAddr)[0];\r
UpdateGlobalTP((unsigned short)gdata);\r
// cmd: turn on/off texture window\r
////////////////////////////////////////////////////////////////////////\r
\r
-void cmdTextureWindow(u8 *baseAddr)\r
+void cmdTextureWindow(unsigned char *baseAddr)\r
{\r
unsigned long gdata = ((unsigned long*)baseAddr)[0];\r
\r
// cmd: start of drawing area... primitives will be clipped inside\r
////////////////////////////////////////////////////////////////////////\r
\r
-void cmdDrawAreaStart(u8 * baseAddr)\r
+void cmdDrawAreaStart(unsigned char * baseAddr)\r
{\r
unsigned long gdata = ((unsigned long*)baseAddr)[0];\r
\r
// cmd: end of drawing area... primitives will be clipped inside\r
////////////////////////////////////////////////////////////////////////\r
\r
-void cmdDrawAreaEnd(u8 * baseAddr)\r
+void cmdDrawAreaEnd(unsigned char * baseAddr)\r
{\r
unsigned long gdata = ((unsigned long*)baseAddr)[0];\r
\r
// cmd: draw offset... will be added to prim coords\r
////////////////////////////////////////////////////////////////////////\r
\r
-void cmdDrawOffset(u8 * baseAddr)\r
+void cmdDrawOffset(unsigned char * baseAddr)\r
{\r
unsigned long gdata = ((unsigned long*)baseAddr)[0];\r
\r
// cmd: load image to vram\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLoadImage(u8 * baseAddr)\r
+void primLoadImage(unsigned char * baseAddr)\r
{\r
unsigned short *sgpuData = ((unsigned short *) baseAddr);\r
\r
// cmd: vram -> psx mem\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primStoreImage(u8 * baseAddr)\r
+void primStoreImage(unsigned char * baseAddr)\r
{\r
unsigned short *sgpuData = ((unsigned short *) baseAddr);\r
\r
// cmd: blkfill - NO primitive! Doesn't care about draw areas...\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primBlkFill(u8 * baseAddr)\r
+void primBlkFill(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primMoveImage(u8 * baseAddr)\r
+void primMoveImage(unsigned char * baseAddr)\r
{\r
short *sgpuData = ((short *) baseAddr);\r
short imageY0,imageX0,imageY1,imageX1,imageSX,imageSY,i,j;\r
// cmd: draw free-size Tile \r
////////////////////////////////////////////////////////////////////////\r
\r
-void primTileS(u8 * baseAddr)\r
+void primTileS(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long*)baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: draw 1 dot Tile (point)\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primTile1(u8 * baseAddr)\r
+void primTile1(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long*)baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: draw 8 dot Tile (small rect)\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primTile8(u8 * baseAddr)\r
+void primTile8(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long*)baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: draw 16 dot Tile (medium rect)\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primTile16(u8 * baseAddr)\r
+void primTile16(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long*)baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: small sprite (textured rect)\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primSprt8(u8 * baseAddr)\r
+void primSprt8(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: medium sprite (textured rect)\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primSprt16(u8 * baseAddr)\r
+void primSprt16(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: free-size sprite (textured rect)\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primSprtSRest(u8 * baseAddr,unsigned short type)\r
+void primSprtSRest(unsigned char * baseAddr,unsigned short type)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
}\r
}\r
\r
-void primSprtS(u8 * baseAddr)\r
+void primSprtS(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: flat shaded Poly4\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyF4(u8 *baseAddr)\r
+void primPolyF4(unsigned char *baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: smooth shaded Poly4\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyG4(u8 * baseAddr);\r
+void primPolyG4(unsigned char * baseAddr);\r
\r
BOOL bDrawOffscreenFrontFF9G4(void)\r
{\r
return TRUE;\r
}\r
\r
-BOOL bCheckFF9G4(u8 * baseAddr)\r
+BOOL bCheckFF9G4(unsigned char * baseAddr)\r
{\r
- static u8 pFF9G4Cache[32];\r
+ static unsigned char pFF9G4Cache[32];\r
static int iFF9Fix=0;\r
\r
if(baseAddr)\r
\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyG4(u8 * baseAddr)\r
+void primPolyG4(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = (unsigned long *)baseAddr;\r
short *sgpuData = ((short *) baseAddr);\r
\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyFT3(u8 * baseAddr)\r
+void primPolyFT3(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
\r
}\r
\r
-void primPolyFT4(u8 * baseAddr)\r
+void primPolyFT4(unsigned char * baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: smooth shaded Texture3\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyGT3(u8 *baseAddr)\r
+void primPolyGT3(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: smooth shaded Poly3\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyG3(u8 *baseAddr)\r
+void primPolyG3(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: smooth shaded Texture4\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyGT4(u8 *baseAddr)\r
+void primPolyGT4(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: smooth shaded Poly3\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primPolyF3(u8 *baseAddr)\r
+void primPolyF3(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: skipping shaded polylines\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLineGSkip(u8 *baseAddr)\r
+void primLineGSkip(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: shaded polylines\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLineGEx(u8 *baseAddr)\r
+void primLineGEx(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
int iMax=255;\r
// cmd: shaded polyline2\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLineG2(u8 *baseAddr)\r
+void primLineG2(unsigned char *baseAddr)\r
{ \r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: skipping flat polylines\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLineFSkip(u8 *baseAddr)\r
+void primLineFSkip(unsigned char *baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
int i=2,iMax=255;\r
// cmd: drawing flat polylines\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLineFEx(u8 *baseAddr)\r
+void primLineFEx(unsigned char *baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
int iMax;\r
// cmd: drawing flat polyline2\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primLineF2(u8 *baseAddr)\r
+void primLineF2(unsigned char *baseAddr)\r
{\r
unsigned long *gpuData = ((unsigned long *) baseAddr);\r
short *sgpuData = ((short *) baseAddr);\r
// cmd: well, easiest command... not implemented\r
////////////////////////////////////////////////////////////////////////\r
\r
-void primNI(u8 *bA)\r
+void primNI(unsigned char *bA)\r
{\r
}\r
\r
// cmd func ptr table\r
////////////////////////////////////////////////////////////////////////\r
\r
-void (*primTableJ[256])(u8 *) = \r
+void (*primTableJ[256])(unsigned char *) = \r
{\r
// 00\r
primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI,\r
// cmd func ptr table for skipping\r
////////////////////////////////////////////////////////////////////////\r
\r
-void (*primTableSkip[256])(u8 *) = \r
+void (*primTableSkip[256])(unsigned char *) = \r
{\r
// 00\r
primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI,\r
BOOL CheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1);\r
BOOL FastCheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1);\r
BOOL FastCheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1);\r
-BOOL bCheckFF9G4(u8 * baseAddr);\r
+BOOL bCheckFF9G4(unsigned char * baseAddr);\r
void SetScanTrans(void);\r
void SetScanTexTrans(void);\r
void DrawMultiBlur(void);\r
\r
////////////////////////////////////////////////////////////////////////\r
\r
-u8 * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache);\r
+unsigned char * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache);\r
void LoadSubTexturePageSort(int pageid, int mode, short cx, short cy);\r
void LoadPackedSubTexturePageSort(int pageid, int mode, short cx, short cy);\r
void DefineSubTextureSort(void);\r
{\r
unsigned long ClutID;\r
EXLong pos;\r
- u8 posTX;\r
- u8 posTY;\r
- u8 cTexID;\r
- u8 Opaque;\r
+ unsigned char posTX;\r
+ unsigned char posTY;\r
+ unsigned char cTexID;\r
+ unsigned char Opaque;\r
} textureSubCacheEntryS;\r
\r
#ifdef _WINDOWS\r
GLubyte * texturepart=NULL;\r
GLubyte * texturebuffer=NULL;\r
unsigned long g_x1,g_y1,g_x2,g_y2;\r
-u8 ubOpaqueDraw=0;\r
+unsigned char ubOpaqueDraw=0;\r
\r
unsigned short MAXTPAGES = 32;\r
unsigned short CLUTMASK = 0x7fff;\r
{\r
GLboolean b;GLboolean * bDetail;\r
int i,iCnt,iRam=iVRamSize*1024*1024;\r
- int iTSize;s8 * p;\r
+ int iTSize;char * p;\r
\r
\r
if(iVRamSize)\r
\r
\r
iTSize=256;\r
- p=(s8 *)malloc(iTSize*iTSize*4);\r
+ p=(char *)malloc(iTSize*iTSize*4);\r
\r
iCnt=0;\r
glGenTextures(MAXSORTTEX,uiStexturePage);\r
void MarkFree(textureSubCacheEntryS * tsx)\r
{\r
EXLong * ul, * uls;\r
- int j,iMax;u8 x1,y1,dx,dy;\r
+ int j,iMax;unsigned char x1,y1,dx,dy;\r
\r
uls=pxSsubtexLeft[tsx->cTexID];\r
iMax=uls->l;ul=uls+1;\r
unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo;\r
unsigned int palstart;\r
unsigned short *px,*pa,*ta;\r
- u8 *cSRCPtr,*cOSRCPtr;\r
+ unsigned char *cSRCPtr,*cOSRCPtr;\r
unsigned short *wSRCPtr,*wOSRCPtr;\r
unsigned long LineOffset;unsigned short s;\r
int pmult=pageid/16;\r
unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo,s;\r
unsigned int palstart;\r
unsigned long *px,*pa,*ta;\r
- u8 *cSRCPtr,*cOSRCPtr;\r
+ unsigned char *cSRCPtr,*cOSRCPtr;\r
unsigned short *wSRCPtr,*wOSRCPtr;\r
unsigned long LineOffset;\r
int pmult=pageid/16;\r
unsigned long start,row,column,j,sxh,sxm;\r
unsigned int palstart;\r
unsigned short *px,*pa,*ta;\r
- u8 *cSRCPtr;\r
+ unsigned char *cSRCPtr;\r
unsigned short *wSRCPtr;\r
unsigned long LineOffset;\r
int pmult=pageid/16;\r
unsigned long start,row,column,j,sxh,sxm;\r
unsigned int palstart;\r
unsigned long *px,*pa,*ta;\r
- u8 *cSRCPtr;\r
+ unsigned char *cSRCPtr;\r
unsigned short *wSRCPtr;\r
unsigned long LineOffset;\r
int pmult=pageid/16;\r
void LoadPalWndTexturePage(int pageid, int mode, short cx, short cy)\r
{\r
unsigned long start,row,column,j,sxh,sxm;\r
- u8 *ta;\r
- u8 *cSRCPtr;\r
+ unsigned char *ta;\r
+ unsigned char *cSRCPtr;\r
unsigned long LineOffset;\r
int pmult=pageid/16;\r
\r
- ta=(u8 *)texturepart;\r
+ ta=(unsigned char *)texturepart;\r
\r
switch(mode)\r
{\r
void LoadStretchPalWndTexturePage(int pageid, int mode, short cx, short cy)\r
{\r
unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo;\r
- u8 *ta,s;\r
- u8 *cSRCPtr,*cOSRCPtr;\r
+ unsigned char *ta,s;\r
+ unsigned char *cSRCPtr,*cOSRCPtr;\r
unsigned long LineOffset;\r
int pmult=pageid/16;\r
\r
ldxo=TWin.Position.x1-TWin.OPosition.x1;\r
ldy =TWin.Position.y1-TWin.OPosition.y1;\r
\r
- ta=(u8 *)texturepart;\r
+ ta=(unsigned char *)texturepart;\r
\r
switch(mode)\r
{\r
// movie texture: load\r
////////////////////////////////////////////////////////////////////////\r
\r
-u8 * LoadDirectMovieFast(void)\r
+unsigned char * LoadDirectMovieFast(void)\r
{\r
long row,column;\r
unsigned int startxy;\r
\r
if(PSXDisplay.RGB24)\r
{\r
- u8 * pD;\r
+ unsigned char * pD;\r
\r
startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0;\r
\r
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++,startxy+=1024)\r
{\r
- pD=(u8 *)&psxVuw[startxy];\r
+ pD=(unsigned char *)&psxVuw[startxy];\r
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)\r
{\r
*ta++=*((unsigned long *)pD)|0xff000000;\r
{\r
if(PSXDisplay.RGB24)\r
{\r
- u8 * pD;\r
+ unsigned char * pD;\r
unsigned long * ta=(unsigned long *)texturepart;\r
\r
startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0;\r
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++,startxy+=1024)\r
{\r
//startxy=((1024)*column)+xrMovieArea.x0;\r
- pD=(u8 *)&psxVuw[startxy];\r
+ pD=(unsigned char *)&psxVuw[startxy];\r
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)\r
{\r
*ta++=*((unsigned long *)pD)|0xff000000;\r
{\r
if(PSXDisplay.RGB24)\r
{\r
- u8 * pD;\r
+ unsigned char * pD;\r
unsigned long * ta=(unsigned long *)texturepart;\r
\r
if(b_X)\r
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++)\r
{\r
startxy=((1024)*column)+xrMovieArea.x0;\r
- pD=(u8 *)&psxVuw[startxy];\r
+ pD=(unsigned char *)&psxVuw[startxy];\r
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)\r
{\r
*ta++=*((unsigned long *)pD)|0xff000000;\r
for(column=xrMovieArea.y0;column<xrMovieArea.y1;column++)\r
{\r
startxy=((1024)*column)+xrMovieArea.x0;\r
- pD=(u8 *)&psxVuw[startxy];\r
+ pD=(unsigned char *)&psxVuw[startxy];\r
for(row=xrMovieArea.x0;row<xrMovieArea.x1;row++)\r
{\r
*ta++=*((unsigned long *)pD)|0xff000000;\r
\r
if(!gTexFrameName)\r
{\r
- s8 * p;\r
+ char * p;\r
\r
if(iResX>1280 || iResY>1024) iFTex=2048;\r
else\r
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, iFilter);\r
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, iFilter);\r
\r
- p=(s8 *)malloc(iFTex*iFTex*4);\r
+ p=(char *)malloc(iFTex*iFTex*4);\r
memset(p,0,iFTex*iFTex*4);\r
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, iFTex, iFTex, 0, GL_RGBA, GL_UNSIGNED_BYTE, p);\r
free(p);\r
\r
if(glGetError()) \r
{\r
- s8 * p=(s8 *)malloc(iFTex*iFTex*4);\r
+ char * p=(char *)malloc(iFTex*iFTex*4);\r
memset(p,0,iFTex*iFTex*4);\r
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, iFTex, iFTex,\r
GL_RGBA, GL_UNSIGNED_BYTE, p);\r
unsigned long start,row,column,j,sxh,sxm;\r
unsigned int palstart;\r
unsigned long *px,*pa,*ta;\r
- u8 *cSRCPtr;\r
+ unsigned char *cSRCPtr;\r
unsigned short *wSRCPtr;\r
unsigned long LineOffset;\r
unsigned long x2a,xalign=0;\r
unsigned long start,row,column,j,sxh,sxm;\r
unsigned int palstart;\r
unsigned short *px,*pa,*ta;\r
- u8 *cSRCPtr;\r
+ unsigned char *cSRCPtr;\r
unsigned short *wSRCPtr;\r
unsigned long LineOffset;\r
unsigned long x2a,xalign=0;\r
\r
#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)))))))))))\r
\r
-void Super2xSaI_ex8_Ex(u8 *srcPtr, DWORD srcPitch,\r
- u8 *dstBitmap, int width, int height)\r
+void Super2xSaI_ex8_Ex(unsigned char *srcPtr, DWORD srcPitch,\r
+ unsigned char *dstBitmap, int width, int height)\r
{\r
DWORD dstPitch = srcPitch * 2;\r
DWORD line;\r
}\r
\r
\r
-void Super2xSaI_ex8(u8 *srcPtr, DWORD srcPitch,\r
- u8 *dstBitmap, int width, int height)\r
+void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,\r
+ unsigned char *dstBitmap, int width, int height)\r
{\r
DWORD dstPitch = srcPitch * 2;\r
DWORD line;\r
/////////////////////////////////////////////////////////////////////////////\r
/////////////////////////////////////////////////////////////////////////////\r
\r
-u8 * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache)\r
+unsigned char * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache)\r
{\r
textureSubCacheEntryS * tsx, * tsb, *tsg;//, *tse=NULL;\r
int i,iMax;EXLong npos;\r
- u8 cx,cy;\r
+ unsigned char cx,cy;\r
int iC,j,k;unsigned long rx,ry,mx,my;\r
EXLong * ul=0, * uls;\r
EXLong rfree;\r
- u8 cXAdj,cYAdj;\r
+ unsigned char cXAdj,cYAdj;\r
\r
npos.l=*((unsigned long *)&gl_ux[4]);\r
\r
{\r
int i,j,k,iMax,iC;unsigned long rx,ry,mx,my;\r
EXLong * ul=0, * uls, rfree;\r
- u8 cXAdj=1,cYAdj=1;\r
+ unsigned char cXAdj=1,cYAdj=1;\r
\r
rx=(int)tsx->pos.c[2]-(int)tsx->pos.c[3];\r
ry=(int)tsx->pos.c[0]-(int)tsx->pos.c[1];\r
\r
GLuint SelectSubTextureS(long TextureMode, unsigned long GivenClutId) \r
{\r
- u8 * OPtr;unsigned short iCache;short cx,cy;\r
+ unsigned char * OPtr;unsigned short iCache;short cx,cy;\r
\r
// sort sow/tow infos for fast access\r
\r
- u8 ma1,ma2,mi1,mi2;\r
+ unsigned char ma1,ma2,mi1,mi2;\r
if(gl_ux[0]>gl_ux[1]) {mi1=gl_ux[1];ma1=gl_ux[0];}\r
else {mi1=gl_ux[0];ma1=gl_ux[1];}\r
if(gl_ux[2]>gl_ux[3]) {mi2=gl_ux[3];ma2=gl_ux[2];}\r