From d57be650f7177a5c23987732f606a255684780a3 Mon Sep 17 00:00:00 2001 From: Daveo Date: Tue, 29 May 2001 15:43:22 +0000 Subject: [PATCH] --- source/level/layerback.cpp | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/source/level/layerback.cpp b/source/level/layerback.cpp index 545462cbf..9ce249ed5 100644 --- a/source/level/layerback.cpp +++ b/source/level/layerback.cpp @@ -84,28 +84,32 @@ sLayerShadeBackGfx *GfxList=Data->GfxList; for (i=0; iGfxCount; 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;