From 928e43def776ab2cb40dbca87316ef956b805249 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Sat, 30 May 2009 07:19:21 +0000 Subject: x86_64 compatiablity for P.E.Op.S OpenGL Driver (untested) git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@23601 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/peopsxgl/texture.c | 415 +++++++++++++++++++++++---------------------- 1 file changed, 210 insertions(+), 205 deletions(-) (limited to 'plugins/peopsxgl/texture.c') diff --git a/plugins/peopsxgl/texture.c b/plugins/peopsxgl/texture.c index c41df389..01630dad 100644 --- a/plugins/peopsxgl/texture.c +++ b/plugins/peopsxgl/texture.c @@ -78,12 +78,12 @@ GLuint gTexMovieName=0; GLuint gTexBlurName=0; GLuint gTexFrameName=0; int iTexGarbageCollection=1; -unsigned long dwTexPageComp=0; +uint32_t dwTexPageComp=0; int iVRamSize=0; int iClampType=GL_CLAMP; void (*LoadSubTexFn) (int,int,short,short); -unsigned long (*PalTexturedColourFn) (unsigned long); +uint32_t (*PalTexturedColourFn) (uint32_t); //////////////////////////////////////////////////////////////////////// // defines @@ -117,7 +117,7 @@ unsigned long (*PalTexturedColourFn) (unsigned long); //////////////////////////////////////////////////////////////////////// -unsigned char * CheckTextureInSubSCache(long TextureMode,unsigned long GivenClutId,unsigned short * pCache); +unsigned char * CheckTextureInSubSCache(int TextureMode, uint32_t 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); @@ -129,7 +129,7 @@ void DefineSubTextureSort(void); GLint giWantedRGBA=4; GLint giWantedFMT=GL_RGBA; GLint giWantedTYPE=GL_UNSIGNED_BYTE; -long GlobalTexturePage; +int GlobalTexturePage; GLint XTexS; GLint YTexS; GLint DXTexS; @@ -140,7 +140,7 @@ BOOL bUse15bitMdec=FALSE; int iFrameTexType=0; int iFrameReadType=0; -unsigned long (*TCF[2]) (unsigned long); +uint32_t (*TCF[2]) (uint32_t); unsigned short (*PTCF[2]) (unsigned short); //////////////////////////////////////////////////////////////////////// @@ -151,7 +151,7 @@ unsigned short (*PTCF[2]) (unsigned short); typedef struct textureWndCacheEntryTag { - unsigned long ClutID; + uint32_t ClutID; short pageid; short textureMode; short Opaque; @@ -164,7 +164,7 @@ typedef struct textureWndCacheEntryTag typedef struct textureSubCacheEntryTagS { - unsigned long ClutID; + uint32_t ClutID; EXLong pos; unsigned char posTX; unsigned char posTY; @@ -184,16 +184,16 @@ textureSubCacheEntryS * pscSubtexStore[3][MAXTPAGES_MAX]; EXLong * pxSsubtexLeft [MAXSORTTEX_MAX]; GLuint uiStexturePage[MAXSORTTEX_MAX]; -unsigned short usLRUTexPage=0; +unsigned short usLRUTexPage = 0; -int iMaxTexWnds=0; -int iTexWndTurn=0; -int iTexWndLimit=MAXWNDTEXCACHE/2; +int iMaxTexWnds = 0; +int iTexWndTurn = 0; +int iTexWndLimit = MAXWNDTEXCACHE/2; -GLubyte * texturepart=NULL; -GLubyte * texturebuffer=NULL; -unsigned long g_x1,g_y1,g_x2,g_y2; -unsigned char ubOpaqueDraw=0; +GLubyte * texturepart = NULL; +GLubyte * texturebuffer = NULL; +uint32_t g_x1,g_y1,g_x2,g_y2; +unsigned char ubOpaqueDraw = 0; unsigned short MAXTPAGES = 32; unsigned short CLUTMASK = 0x7fff; @@ -205,7 +205,7 @@ unsigned short MAXSORTTEX = 196; // porting... and honestly: nowadays the speed gain would be pointless //////////////////////////////////////////////////////////////////////// -unsigned long XP8RGBA(unsigned long BGR) +uint32_t XP8RGBA(uint32_t BGR) { if(!(BGR&0xffff)) return 0x50000000; if(DrawSemiTrans && !(BGR&0x8000)) @@ -213,7 +213,7 @@ unsigned long XP8RGBA(unsigned long BGR) return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8RGBAEx(unsigned long BGR) +uint32_t XP8RGBAEx(uint32_t BGR) { if(!(BGR&0xffff)) return 0x03000000; if(DrawSemiTrans && !(BGR&0x8000)) @@ -221,9 +221,9 @@ unsigned long XP8RGBAEx(unsigned long BGR) return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long CP8RGBA(unsigned long BGR) +uint32_t CP8RGBA(uint32_t BGR) { - unsigned long l; + uint32_t l; if(!(BGR&0xffff)) return 0x50000000; if(DrawSemiTrans && !(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} @@ -232,9 +232,9 @@ unsigned long CP8RGBA(unsigned long BGR) return l; } -unsigned long CP8RGBAEx(unsigned long BGR) +uint32_t CP8RGBAEx(uint32_t BGR) { - unsigned long l; + uint32_t l; if(!(BGR&0xffff)) return 0x03000000; if(DrawSemiTrans && !(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} @@ -243,33 +243,33 @@ unsigned long CP8RGBAEx(unsigned long BGR) return l; } -unsigned long XP8RGBA_0(unsigned long BGR) +uint32_t XP8RGBA_0(uint32_t BGR) { if(!(BGR&0xffff)) return 0x50000000; return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8RGBAEx_0(unsigned long BGR) +uint32_t XP8RGBAEx_0(uint32_t BGR) { if(!(BGR&0xffff)) return 0x03000000; return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8BGRA_0(unsigned long BGR) +uint32_t XP8BGRA_0(uint32_t BGR) { if(!(BGR&0xffff)) return 0x50000000; return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8BGRAEx_0(unsigned long BGR) +uint32_t XP8BGRAEx_0(uint32_t BGR) { if(!(BGR&0xffff)) return 0x03000000; return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; } -unsigned long CP8RGBA_0(unsigned long BGR) +uint32_t CP8RGBA_0(uint32_t BGR) { - unsigned long l; + uint32_t l; if(!(BGR&0xffff)) return 0x50000000; l=((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; @@ -277,9 +277,9 @@ unsigned long CP8RGBA_0(unsigned long BGR) return l; } -unsigned long CP8RGBAEx_0(unsigned long BGR) +uint32_t CP8RGBAEx_0(uint32_t BGR) { - unsigned long l; + uint32_t l; if(!(BGR&0xffff)) return 0x03000000; l=((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; @@ -287,9 +287,9 @@ unsigned long CP8RGBAEx_0(unsigned long BGR) return l; } -unsigned long CP8BGRA_0(unsigned long BGR) +uint32_t CP8BGRA_0(uint32_t BGR) { - unsigned long l; + uint32_t l; if(!(BGR&0xffff)) return 0x50000000; l=((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; @@ -297,9 +297,9 @@ unsigned long CP8BGRA_0(unsigned long BGR) return l; } -unsigned long CP8BGRAEx_0(unsigned long BGR) +uint32_t CP8BGRAEx_0(uint32_t BGR) { - unsigned long l; + uint32_t l; if(!(BGR&0xffff)) return 0x03000000; l=((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; @@ -307,41 +307,41 @@ unsigned long CP8BGRAEx_0(unsigned long BGR) return l; } -unsigned long XP8RGBA_1(unsigned long BGR) +uint32_t XP8RGBA_1(uint32_t BGR) { if(!(BGR&0xffff)) return 0x50000000; if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8RGBAEx_1(unsigned long BGR) +uint32_t XP8RGBAEx_1(uint32_t BGR) { if(!(BGR&0xffff)) return 0x03000000; if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8BGRA_1(unsigned long BGR) +uint32_t XP8BGRA_1(uint32_t BGR) { if(!(BGR&0xffff)) return 0x50000000; if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff);} return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; } -unsigned long XP8BGRAEx_1(unsigned long BGR) +uint32_t XP8BGRAEx_1(uint32_t BGR) { if(!(BGR&0xffff)) return 0x03000000; if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff);} return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; } -unsigned long P8RGBA(unsigned long BGR) +uint32_t P8RGBA(uint32_t BGR) { if(!(BGR&0xffff)) return 0; return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; } -unsigned long P8BGRA(unsigned long BGR) +uint32_t P8BGRA(uint32_t BGR) { if(!(BGR&0xffff)) return 0; return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; @@ -699,7 +699,7 @@ void ResetTextureArea(BOOL bDelTex) // Invalidate tex windows //////////////////////////////////////////////////////////////////////// -void InvalidateWndTextureArea(long X,long Y,long W, long H) +void InvalidateWndTextureArea(int X, int Y, int W, int H) { int i,px1,px2,py1,py2,iYM=1; textureWndCacheEntry * tsw=wcWndtexStore; @@ -790,11 +790,12 @@ void MarkFree(textureSubCacheEntryS * tsx) } } -void InvalidateSubSTextureArea(long X,long Y,long W, long H) +void InvalidateSubSTextureArea(int X, int Y, int W, int H) { - int i,j,k,iMax,px,py,px1,px2,py1,py2,iYM=1; - EXLong npos;textureSubCacheEntryS * tsb; - long x1,x2,y1,y2,xa,sw; + int i,j,k,iMax,px,py,px1,px2,py1,py2,iYM = 1; + EXLong npos; + textureSubCacheEntryS *tsb; + int x1,x2,y1,y2,xa,sw; W+=X-1; H+=Y-1; @@ -884,9 +885,9 @@ void InvalidateTextureAreaEx(void) short W=sxmax-sxmin; short H=symax-symin; - if(W==0 && H==0) return; + if (W == 0 && H == 0) return; - if(iMaxTexWnds) + if (iMaxTexWnds) InvalidateWndTextureArea(sxmin,symin,W,H); InvalidateSubSTextureArea(sxmin,symin,W,H); @@ -894,13 +895,13 @@ void InvalidateTextureAreaEx(void) //////////////////////////////////////////////////////////////////////// -void InvalidateTextureArea(long X,long Y,long W, long H) +void InvalidateTextureArea(int X, int Y, int W, int H) { - if(W==0 && H==0) return; + if (W == 0 && H == 0) return; - if(iMaxTexWnds) InvalidateWndTextureArea(X,Y,W,H); + if (iMaxTexWnds) InvalidateWndTextureArea(X, Y, W, H); - InvalidateSubSTextureArea(X,Y,W,H); + InvalidateSubSTextureArea(X, Y, W, H); } @@ -910,7 +911,7 @@ void InvalidateTextureArea(long X,long Y,long W, long H) void DefineTextureWnd(void) { - if(gTexName==0) + if (gTexName == 0) glGenTextures(1, &gTexName); glBindTexture(GL_TEXTURE_2D, gTexName); @@ -941,27 +942,28 @@ void DefineTextureWnd(void) 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; + uint32_t start, row, column, j, sxh, sxm, ldx, ldy, ldxo; + unsigned int palstart; + unsigned short *px, *pa, *ta; unsigned char *cSRCPtr,*cOSRCPtr; unsigned short *wSRCPtr,*wOSRCPtr; - unsigned long LineOffset;unsigned short s; - int pmult=pageid/16; + uint32_t LineOffset; + unsigned short s; + int pmult = pageid / 16; unsigned short (*LPTCOL)(unsigned short); - LPTCOL=PTCF[DrawSemiTrans]; + LPTCOL = PTCF[DrawSemiTrans]; - ldxo=TWin.Position.x1-TWin.OPosition.x1; - ldy =TWin.Position.y1-TWin.OPosition.y1; + ldxo = TWin.Position.x1-TWin.OPosition.x1; + ldy = TWin.Position.y1-TWin.OPosition.y1; - pa=px=(unsigned short *)ubPaletteBuffer; - ta=(unsigned short *)texturepart; - palstart=cx+(cy*1024); + pa = px = (unsigned short *)ubPaletteBuffer; + ta = (unsigned short *)texturepart; + palstart = cx + (cy * 1024); - ubOpaqueDraw=0; + ubOpaqueDraw = 0; - switch(mode) + switch (mode) { //--------------------------------------------------// // 4bit texture load .. @@ -1133,27 +1135,27 @@ void LoadStretchPackedWndTexturePage(int pageid, int mode, short cx, short cy) void LoadStretchWndTexturePage(int pageid, int mode, short cx, short cy) { - unsigned long start,row,column,j,sxh,sxm,ldx,ldy,ldxo,s; + uint32_t start,row,column,j,sxh,sxm,ldx,ldy,ldxo,s; unsigned int palstart; - unsigned long *px,*pa,*ta; + uint32_t *px,*pa,*ta; unsigned char *cSRCPtr,*cOSRCPtr; unsigned short *wSRCPtr,*wOSRCPtr; - unsigned long LineOffset; - int pmult=pageid/16; - unsigned long (*LTCOL)(unsigned long); + uint32_t LineOffset; + int pmult = pageid / 16; + uint32_t (*LTCOL)(uint32_t); - LTCOL=TCF[DrawSemiTrans]; + LTCOL = TCF[DrawSemiTrans]; ldxo=TWin.Position.x1-TWin.OPosition.x1; ldy =TWin.Position.y1-TWin.OPosition.y1; - pa=px=(unsigned long *)ubPaletteBuffer; - ta=(unsigned long *)texturepart; - palstart=cx+(cy*1024); + pa = px = (uint32_t *)ubPaletteBuffer; + ta = (uint32_t *)texturepart; + palstart = cx + (cy * 1024); - ubOpaqueDraw=0; + ubOpaqueDraw = 0; - switch(mode) + switch (mode) { //--------------------------------------------------// // 4bit texture load .. @@ -1344,12 +1346,12 @@ void LoadStretchWndTexturePage(int pageid, int mode, short cx, short cy) void LoadPackedWndTexturePage(int pageid, int mode, short cx, short cy) { - unsigned long start,row,column,j,sxh,sxm; + uint32_t start,row,column,j,sxh,sxm; unsigned int palstart; unsigned short *px,*pa,*ta; unsigned char *cSRCPtr; unsigned short *wSRCPtr; - unsigned long LineOffset; + uint32_t LineOffset; int pmult=pageid/16; unsigned short (*LPTCOL)(unsigned short); @@ -1486,24 +1488,24 @@ void LoadPackedWndTexturePage(int pageid, int mode, short cx, short cy) void LoadWndTexturePage(int pageid, int mode, short cx, short cy) { - unsigned long start,row,column,j,sxh,sxm; + uint32_t start,row,column,j,sxh,sxm; unsigned int palstart; - unsigned long *px,*pa,*ta; + uint32_t *px,*pa,*ta; unsigned char *cSRCPtr; unsigned short *wSRCPtr; - unsigned long LineOffset; - int pmult=pageid/16; - unsigned long (*LTCOL)(unsigned long); + uint32_t LineOffset; + int pmult = pageid / 16; + uint32_t (*LTCOL)(uint32_t); LTCOL=TCF[DrawSemiTrans]; - pa=px=(unsigned long *)ubPaletteBuffer; - ta=(unsigned long *)texturepart; - palstart=cx+(cy*1024); + pa = px = (uint32_t *)ubPaletteBuffer; + ta = (uint32_t *)texturepart; + palstart = cx + (cy * 1024); - ubOpaqueDraw=0; + ubOpaqueDraw = 0; - switch(mode) + switch (mode) { //--------------------------------------------------// // 4bit texture load .. @@ -1647,13 +1649,13 @@ void LoadWndTexturePage(int pageid, int mode, short cx, short cy) void UploadTexWndPal(int mode,short cx,short cy) { unsigned int i,iSize; - unsigned short * wSrcPtr; - unsigned long * ta=(unsigned long *)texturepart; + unsigned short *wSrcPtr; + uint32_t *ta = (uint32_t *)texturepart; - wSrcPtr=psxVuw+cx+(cy*1024); - if(mode==0) i=4; else i=64; - iSize=i<<2; - ubOpaqueDraw=0; + wSrcPtr = psxVuw + cx + (cy * 1024); + if (mode == 0) i = 4; else i = 64; + iSize = i << 2; + ubOpaqueDraw = 0; do { @@ -1702,15 +1704,15 @@ void DefinePalTextureWnd(void) void LoadPalWndTexturePage(int pageid, int mode, short cx, short cy) { - unsigned long start,row,column,j,sxh,sxm; + uint32_t start,row,column,j,sxh,sxm; unsigned char *ta; unsigned char *cSRCPtr; - unsigned long LineOffset; - int pmult=pageid/16; + uint32_t LineOffset; + int pmult = pageid / 16; - ta=(unsigned char *)texturepart; + ta = (unsigned char *)texturepart; - switch(mode) + switch (mode) { //--------------------------------------------------// // 4bit texture load .. @@ -1762,18 +1764,18 @@ 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; + uint32_t start,row,column,j,sxh,sxm,ldx,ldy,ldxo; unsigned char *ta,s; unsigned char *cSRCPtr,*cOSRCPtr; - unsigned long LineOffset; - int pmult=pageid/16; + uint32_t LineOffset; + int pmult = pageid / 16; - ldxo=TWin.Position.x1-TWin.OPosition.x1; - ldy =TWin.Position.y1-TWin.OPosition.y1; + ldxo = TWin.Position.x1-TWin.OPosition.x1; + ldy = TWin.Position.y1-TWin.OPosition.y1; - ta=(unsigned char *)texturepart; + ta = (unsigned char *)texturepart; - switch(mode) + switch (mode) { //--------------------------------------------------// // 4bit texture load .. @@ -1840,30 +1842,32 @@ void LoadStretchPalWndTexturePage(int pageid, int mode, short cx, short cy) // tex window: main selecting, cache handler included //////////////////////////////////////////////////////////////////////// -GLuint LoadTextureWnd(long pageid,long TextureMode,unsigned long GivenClutId) +GLuint LoadTextureWnd(int pageid, int TextureMode, uint32_t GivenClutId) { - textureWndCacheEntry * ts, * tsx=NULL; - int i;short cx,cy; + textureWndCacheEntry *ts, *tsx = NULL; + int i; + short cx,cy; EXLong npos; - npos.c[3]=TWin.Position.x0; - npos.c[2]=TWin.OPosition.x1; - npos.c[1]=TWin.Position.y0; - npos.c[0]=TWin.OPosition.y1; + npos.c[3] = TWin.Position.x0; + npos.c[2] = TWin.OPosition.x1; + npos.c[1] = TWin.Position.y0; + npos.c[0] = TWin.OPosition.y1; - g_x1=TWin.Position.x0;g_x2=g_x1+TWin.Position.x1-1; - g_y1=TWin.Position.y0;g_y2=g_y1+TWin.Position.y1-1; + g_x1 = TWin.Position.x0; g_x2 = g_x1 + TWin.Position.x1 - 1; + g_y1 = TWin.Position.y0; g_y2 = g_y1 + TWin.Position.y1 - 1; - if(TextureMode==2) {GivenClutId=0;cx=cy=0;} + if (TextureMode == 2) { GivenClutId = 0; cx = cy = 0; } else { - cx=((GivenClutId << 4) & 0x3F0);cy=((GivenClutId >> 6) & CLUTYMASK); - GivenClutId=(GivenClutId&CLUTMASK)|(DrawSemiTrans<<30); + cx = ((GivenClutId << 4) & 0x3F0); + cy = ((GivenClutId >> 6) & CLUTYMASK); + GivenClutId = (GivenClutId & CLUTMASK) | (DrawSemiTrans << 30); // palette check sum { - unsigned long l=0,row; - unsigned long * lSRCPtr=(unsigned long *)(psxVuw+cx+(cy*1024)); + uint32_t l = 0,row; + uint32_t *lSRCPtr = (uint32_t *)(psxVuw + cx + (cy * 1024)); if(TextureMode==1) for(row=1;row<129;row++) l+=((*lSRCPtr++)-1)*row; else for(row=1;row<9;row++) l+=((*lSRCPtr++)-1)<>9)|0x00010001; ta+=2;startxy+=2; } @@ -2161,36 +2165,36 @@ GLuint LoadTextureMovieFast(void) { if(PSXDisplay.RGB24) { - unsigned char * pD; - unsigned long * ta=(unsigned long *)texturepart; + unsigned char *pD; + uint32_t *ta = (uint32_t *)texturepart; startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0; for(column=xrMovieArea.y0;columnClutID&(1<<30)) DrawSemiTrans=1; else DrawSemiTrans=0; - *((unsigned long *)&gl_ux[4])=r.l; + *((uint32_t *)&gl_ux[4])=r.l; gTexName=uiStexturePage[tsx->cTexID]; LoadSubTexFn(k,j,cx,cy); @@ -4808,7 +4813,7 @@ void CompressTextureSpace(void) if(dwTexPageComp==0xffffffff) dwTexPageComp=0; - *((unsigned long *)&gl_ux[4])=opos.l; + *((uint32_t *)&gl_ux[4])=opos.l; GlobalTexturePage=lOGTP; DrawSemiTrans=sOldDST; } @@ -4823,7 +4828,7 @@ void CompressTextureSpace(void) ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// -GLuint SelectSubTextureS(long TextureMode, unsigned long GivenClutId) +GLuint SelectSubTextureS(int TextureMode, uint32_t GivenClutId) { unsigned char * OPtr;unsigned short iCache;short cx,cy; @@ -4865,9 +4870,9 @@ GLuint SelectSubTextureS(long TextureMode, unsigned long GivenClutId) // palette check sum.. removed MMX asm, this easy func works as well { - unsigned long l=0,row; + uint32_t l=0,row; - unsigned long * lSRCPtr=(unsigned long *)(psxVuw+cx+(cy*1024)); + uint32_t *lSRCPtr = (uint32_t *)(psxVuw+cx+(cy*1024)); if(TextureMode==1) for(row=1;row<129;row++) l+=((*lSRCPtr++)-1)*row; else for(row=1;row<9;row++) l+=((*lSRCPtr++)-1)<