This commit is contained in:
Daveo 2001-05-29 15:43:22 +00:00
parent d6747572a6
commit d57be650f7

View File

@ -84,28 +84,32 @@ sLayerShadeBackGfx *GfxList=Data->GfxList;
for (i=0; i<Data->GfxCount; i++)
{
POLY_GT4 *sGt4,*Gt4=GetPrimGT4();
int PosX=(GfxList->PosX*BB)-XOfs;
int PosY=(GfxList->PosY*BB)-YOfs;
sLayerShadeBackGfxType &ThisType=Data->TypeList[GfxList->Type];
if (PosX>0-64 && PosX<512+64)
if (PosY>0-64 && PosY<256+64)
{
POLY_GT4 *sGt4,*Gt4=GetPrimGT4();
sLayerShadeBackGfxType &ThisType=Data->TypeList[GfxList->Type];
Gt4->x0=PosX+(GfxList->Ofs[0][0])*BM; Gt4->y0=PosY+(GfxList->Ofs[0][1])*BM;
Gt4->x1=PosX+(GfxList->Ofs[1][0])*BM; Gt4->y1=PosY+(GfxList->Ofs[1][1])*BM;
Gt4->x2=PosX+(GfxList->Ofs[2][0])*BM; Gt4->y2=PosY+(GfxList->Ofs[2][1])*BM;
Gt4->x3=PosX+(GfxList->Ofs[3][0])*BM; Gt4->y3=PosY+(GfxList->Ofs[3][1])*BM;
Gt4->x0=PosX+(GfxList->Ofs[0][0])*BM; Gt4->y0=PosY+(GfxList->Ofs[0][1])*BM;
Gt4->x1=PosX+(GfxList->Ofs[1][0])*BM; Gt4->y1=PosY+(GfxList->Ofs[1][1])*BM;
Gt4->x2=PosX+(GfxList->Ofs[2][0])*BM; Gt4->y2=PosY+(GfxList->Ofs[2][1])*BM;
Gt4->x3=PosX+(GfxList->Ofs[3][0])*BM; Gt4->y3=PosY+(GfxList->Ofs[3][1])*BM;
setRGB0(Gt4,GfxList->RGB[0][0]>>1,GfxList->RGB[0][1]>>1,GfxList->RGB[0][2]>>1);
setRGB1(Gt4,GfxList->RGB[1][0]>>1,GfxList->RGB[1][1]>>1,GfxList->RGB[1][2]>>1);
setRGB2(Gt4,GfxList->RGB[2][0]>>1,GfxList->RGB[2][1]>>1,GfxList->RGB[2][2]>>1);
setRGB3(Gt4,GfxList->RGB[3][0]>>1,GfxList->RGB[3][1]>>1,GfxList->RGB[3][2]>>1);
setRGB0(Gt4,GfxList->RGB[0][0]>>1,GfxList->RGB[0][1]>>1,GfxList->RGB[0][2]>>1);
setRGB1(Gt4,GfxList->RGB[1][0]>>1,GfxList->RGB[1][1]>>1,GfxList->RGB[1][2]>>1);
setRGB2(Gt4,GfxList->RGB[2][0]>>1,GfxList->RGB[2][1]>>1,GfxList->RGB[2][2]>>1);
setRGB3(Gt4,GfxList->RGB[3][0]>>1,GfxList->RGB[3][1]>>1,GfxList->RGB[3][2]>>1);
setUVWH(Gt4,ThisType.U,ThisType.V,ThisType.W,ThisType.H);
Gt4->u1--; Gt4->u3--;
Gt4->v2--; Gt4->v3--;
Gt4->clut=ThisType.Clut;
setSemiTrans(Gt4,1);
Gt4->tpage=ThisType.TPage;// | GfxList->Trans<<5;
AddPrim(ThisOT,Gt4);
setUVWH(Gt4,ThisType.U,ThisType.V,ThisType.W,ThisType.H);
Gt4->u1--; Gt4->u3--;
Gt4->v2--; Gt4->v3--;
Gt4->clut=ThisType.Clut;
setSemiTrans(Gt4,1);
Gt4->tpage=ThisType.TPage;// | GfxList->Trans<<5;
AddPrim(ThisOT,Gt4);
}
/*
// Bodge it cos artist made the fuckers too big
sGt4=GetPrimGT4(); *sGt4=*Gt4;