gpu-gles: remove short types
[pcsx_rearmed.git] / plugins / gpu-gles / gpuPlugin.c
index 897c942..81b7f05 100644 (file)
@@ -83,8 +83,8 @@ int           iTileCheat=0;
 // 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
@@ -112,10 +112,10 @@ unsigned long   ulStatusControl[256];
 \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
@@ -144,7 +144,7 @@ BOOL            bDisplayNotSet = TRUE;
 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
@@ -161,7 +161,7 @@ static void (*rearmed_get_layer_pos)(int *x, int *y, int *w, int *h);
 ////////////////////////////////////////////////////////////////////////\r
 \r
 #ifdef _WINDOWS\r
-s8 * CALLBACK PSEgetLibName(void)\r
+char * CALLBACK PSEgetLibName(void)\r
 {\r
  return "name";\r
 }\r
@@ -208,14 +208,14 @@ void ResizeWindow()
  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
@@ -237,7 +237,7 @@ s8 * GetConfigInfos(int hW)
  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
@@ -432,7 +432,7 @@ iWinSize=MAKELONG(iResX,iResY);
 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
@@ -1730,8 +1730,8 @@ void CheckVRamReadEx(int x, int y, int dx, int dy)
  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
@@ -1828,7 +1828,7 @@ void CheckVRamReadEx(int x, int y, int dx, int dy)
  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
@@ -1881,7 +1881,7 @@ void CheckVRamRead(int x, int y, int dx, int dy, bool bFront)
 {\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
@@ -1976,7 +1976,7 @@ void CheckVRamRead(int x, int y, int dx, int dy, bool bFront)
  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
@@ -2112,7 +2112,7 @@ unsigned long CALLBACK GPUreadData(void)
 // 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
@@ -2192,7 +2192,7 @@ void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize)
 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
@@ -2252,7 +2252,7 @@ ENDVRAM:
 \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
@@ -2264,7 +2264,7 @@ if(iDataWriteMode==DR_NORMAL)
 \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
@@ -2293,7 +2293,7 @@ if(iDataWriteMode==DR_NORMAL)
     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
@@ -2357,9 +2357,9 @@ return iT;
 \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
@@ -2464,7 +2464,7 @@ long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr)
 #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
@@ -2473,7 +2473,7 @@ GPUIsBusy;
 \r
 lUsedAddr[0]=lUsedAddr[1]=lUsedAddr[2]=0xffffff;\r
 \r
-baseAddrB = (u8*) baseAddrL;\r
+baseAddrB = (unsigned char*) baseAddrL;\r
 \r
 do\r
  {\r
@@ -2604,7 +2604,7 @@ ResetTextureArea(TRUE);
 //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
@@ -2830,7 +2830,7 @@ u8 cFont[10][120]=
 \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
@@ -2840,19 +2840,19 @@ void PaintPicDot(u8 * p,u8 c)
 ////////////////////////////////////////////////////////////////////////\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
@@ -2891,13 +2891,13 @@ long CALLBACK GPUgetScreenPic(u8 * pMem)
     {\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
@@ -2923,9 +2923,9 @@ long CALLBACK GPUgetScreenPic(u8 * pMem)
 ////////////////////////////////////////////////////////////////////////\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