// USE_NASM
static inline int shl10idiv(int x, int y)
{
+#ifdef __arm__
+ // rearmed: let's use VFP divider instead
+ float r = 1024.0f * (float)x / (float)y;
+ return (int)r;
+#else
__int64 bi=x;
bi<<=10;
return bi/y;
+#endif
}
////////////////////////////////////////////////////////////////////////
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16);
if(j==xmax)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
}
}
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16);
if(j==xmax)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
}
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16);
}
if(j==xmax)
{
- tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
}
}
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16);
}
if(j==xmax)
{
- tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
}
}
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16);
}
if(j==xmax)
{
- tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
}
}
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColG32_SPR((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16);
}
if(j==xmax)
{
- tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1]));
}
}
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
posX+=difX2;
posY+=difY2;
}
if(j==xmax)
GetTextureTransColG_S(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
}
if(NextRow_FT())
{
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
posX+=difX2;
posY+=difY2;
}
if(j==xmax)
GetTextureTransColG(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
}
if(NextRow_FT())
{
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY)<<10)+TWin.Position.y0+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY)<<10)+TWin.Position.y0+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
posX+=difX2;
posY+=difY2;
}
if(j==xmax)
GetTextureTransColG_S(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
}
if(NextRow_FT4()) return;
}
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
posX+=difX2;
posY+=difY2;
}
if(j==xmax)
GetTextureTransColG(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
}
if(NextRow_FT4()) return;
}
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY)<<10)+TWin.Position.y0+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY)<<10)+TWin.Position.y0+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
posX+=difX2;
posY+=difY2;
}
if(j==xmax)
GetTextureTransColG_S(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
}
if(NextRow_FT4()) return;
}
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColG32_SPR((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
posX+=difX2;
posY+=difY2;
}
if(j==xmax)
GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]));
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]));
}
if(NextRow_FT4()) return;
}
for(j=xmin;j<xmax;j+=2)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
- XAdjust=((posX+difX)>>16)%TWin.Position.x1;
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
+ XAdjust=((posX+difX)>>16)&TWin.xmask;
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC2=(tC2>>((XAdjust&1)<<2))&0xf;
GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j],
}
if(j==xmax)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
GetTextureTransColGX_S(&psxVuw[(i<<10)+j],
for(j=xmin;j<=xmax;j++)
{
- XAdjust=(posX>>16)%TWin.Position.x1;
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
+ XAdjust=(posX>>16)&TWin.xmask;
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
YAdjust+(XAdjust>>1)];
tC1=(tC1>>((XAdjust&1)<<2))&0xf;
if(iDither)
for(j=xmin;j<xmax;j+=2)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
- tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+
- YAdjust+(((posX+difX)>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
+ tC2 = psxVub[((((posY+difY)>>16)&TWin.ymask)<<11)+
+ YAdjust+(((posX+difX)>>16)&TWin.xmask)];
GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1])|
}
if(j==xmax)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
GetTextureTransColGX_S(&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1]),
(cB1>>16),(cG1>>16),(cR1>>16));
for(j=xmin;j<=xmax;j++)
{
- tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+
- YAdjust+((posX>>16)%TWin.Position.x1)];
+ tC1 = psxVub[(((posY>>16)&TWin.ymask)<<11)+
+ YAdjust+((posX>>16)&TWin.xmask)];
if(iDither)
GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j],
GETLE16(&psxVuw[clutP+tC1]),
for(j=xmin;j<xmax;j+=2)
{
GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j],
- (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]),
+ (((int32_t)GETLE16(&psxVuw[(((((posY+difY)>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX+difX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]))<<16)|
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ (((posX)>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]),
(cB1>>16)|((cB1+difB)&0xff0000),
(cG1>>16)|((cG1+difG)&0xff0000),
(cR1>>16)|((cR1+difR)&0xff0000));
}
if(j==xmax)
GetTextureTransColGX_S(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]),
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]),
(cB1>>16),(cG1>>16),(cR1>>16));
}
if(NextRow_GT())
{
if(iDither)
GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]),
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]),
(cB1>>16),(cG1>>16),(cR1>>16));
else
GetTextureTransColGX(&psxVuw[(i<<10)+j],
- GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+
- ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]),
+ GETLE16(&psxVuw[((((posY>>16)&TWin.ymask)+GlobalTextAddrY+TWin.Position.y0)<<10)+
+ ((posX>>16)&TWin.xmask)+GlobalTextAddrX+TWin.Position.x0]),
(cB1>>16),(cG1>>16),(cR1>>16));
posX+=difX;
posY+=difY;