diff --git a/makefile.gaz b/makefile.gaz index 3eaae6861..5736aa8d0 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -119,6 +119,8 @@ hazard_src := hazard \ hboat \ hcsaw +fx_src := fx \ + projectl_src := projectl \ prnpc diff --git a/source/level/layerback.cpp b/source/level/layerback.cpp index 1a6d7a66f..798a0735b 100644 --- a/source/level/layerback.cpp +++ b/source/level/layerback.cpp @@ -51,8 +51,7 @@ void CLayerBack::init(DVECTOR &MapPos,int Shift) setRGB3(&Band[i],Data->RGB[i+1][0],Data->RGB[i+1][1],Data->RGB[i+1][2]); } - PosDx=0; - PosDy=0; + XOfs=MapPos.vy; YOfs=MapPos.vy; } @@ -65,20 +64,15 @@ void CLayerBack::shutdown() /*****************************************************************************/ void CLayerBack::think(DVECTOR &MapPos) { -int _XOfs=MapPos.vx>>MapXYShift; -int _YOfs=MapPos.vy>>MapXYShift; + XOfs=MapPos.vx>>MapXYShift; + YOfs=MapPos.vy>>MapXYShift; - PosDx=(_XOfs-XOfs)<GfxList; for (i=0; iGfxCount; i++) { - POLY_GT4 *Gt4=GetPrimGT4(); - int PosX=(GfxList->PosX<PosY<PosX*BB)-XOfs; + int PosY=(GfxList->PosY*BB)-YOfs; sLayerShadeBackGfxType &ThisType=Data->TypeList[GfxList->Type]; - Gt4->x0=PosX+(GfxList->Ofs[0][0]-(GfxW/2)*16); Gt4->y0=PosY+(GfxList->Ofs[0][1]-(GfxH/2)*16); - Gt4->x1=PosX+(GfxList->Ofs[1][0]+(GfxW/2)*16); Gt4->y1=PosY+(GfxList->Ofs[1][1]-(GfxH/2)*16); - Gt4->x2=PosX+(GfxList->Ofs[2][0]-(GfxW/2)*16); Gt4->y2=PosY+(GfxList->Ofs[2][1]+(GfxH/2)*16); - Gt4->x3=PosX+(GfxList->Ofs[3][0]+(GfxW/2)*16); Gt4->y3=PosY+(GfxList->Ofs[3][1]+(GfxH/2)*16); + 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],GfxList->RGB[0][1],GfxList->RGB[0][2]); - setRGB1(Gt4,GfxList->RGB[1][0],GfxList->RGB[1][1],GfxList->RGB[1][2]); - setRGB2(Gt4,GfxList->RGB[2][0],GfxList->RGB[2][1],GfxList->RGB[2][2]); - setRGB3(Gt4,GfxList->RGB[3][0],GfxList->RGB[3][1],GfxList->RGB[3][2]); + 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; - Gt4->tpage=ThisType.TPage; + 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; + Gt4->x0--; Gt4->y0--; Gt4->x1++; Gt4->y1--; Gt4->x2--; Gt4->y2++; Gt4->x3++; Gt4->y3++; + AddPrim(ThisOT,sGt4); +*/ + GfxList++; } diff --git a/source/thing/thing.h b/source/thing/thing.h index 07ef15271..d67fa6c86 100644 --- a/source/thing/thing.h +++ b/source/thing/thing.h @@ -86,6 +86,7 @@ public: TYPE_ENEMYPROJECTILE, TYPE_TRIGGER, TYPE_HAZARD, + TYPE_FX, MAX_TYPE, } @@ -225,6 +226,11 @@ class CHazardThing : public CThing public: virtual TYPE getThingType() {return TYPE_HAZARD;} }; +class CFXThing : public CThing +{ +public: + virtual TYPE getThingType() {return TYPE_FX;} +}; /*----------------------------------------------------------------------