diff --git a/source/fx/fxjfish.cpp b/source/fx/fxjfish.cpp index e9a96120f..1dd0a1675 100644 --- a/source/fx/fxjfish.cpp +++ b/source/fx/fxjfish.cpp @@ -25,6 +25,11 @@ void CFXJellyFishLegs::init() /*****************************************************************************/ void CFXJellyFishLegs::shutdown() { + for (int L=0; L8) dH=8; HeightTable[H]=(s16)dH; - printf("%i %i =%i\n",H,Ofs,HeightTable[H]); +// printf("%i %i =%i\n",H,Ofs,HeightTable[H]); } } @@ -99,7 +104,10 @@ void CFXJellyFishLegs::think(int _frames) /*****************************************************************************/ /*** Render ******************************************************************/ /*****************************************************************************/ -int Trans=0; +const int Trans=3; +int LX=8; +int LY=32; + void CFXJellyFishLegs::render() { DVECTOR _MapOfs=CLevel::getCameraPos(); @@ -107,6 +115,10 @@ DVECTOR MapOfs; int dRGB=256/Count; s16 *dH=HeightTable; + _MapOfs.vx+=LX; + _MapOfs.vy+=LY; + + if (!Parent->getOnScreenFlag()) return; MapOfs.vx=_MapOfs.vx+XOfs; for (int L=0; L=Count) Idx=0; - POLY_FT4 *Ft4=m_spriteBank->printFT4(FRM__TENTACLE,LastPos.vx,LastPos.vy,0,0,0); + POLY_FT4 *Ft4=m_spriteBank->printFT4(FRM__TENTACLE,LastPos.vx,LastPos.vy,0,0,6); Ft4->x0=LastPos.vx+0+LastdW; Ft4->y0=LastPos.vy; Ft4->x1=LastPos.vx+8-LastdW; Ft4->y1=LastPos.vy; @@ -148,24 +160,3 @@ s16 *dH=HeightTable; MapOfs.vx+=Gap; } } -/* - for (int i=0; i=Count) Idx=0; - POLY *Ft4=m_spriteBank->printFT4(LastPos.vx,LastPos.vy); - LINE_F2 *P=GetPrimLF2(); - P->x0=LastPos.vx; - P->y0=LastPos.vy; - LastPos.vx=List[Idx].Ofs.vx-MapOfs.vx; - LastPos.vy=List[Idx].Ofs.vy-MapOfs.vy; - P->x1=LastPos.vx; - P->y1=LastPos.vy; - setRGB0(P,C,C,C); - C-=dRGB; - if (!i) setRGB0(P,255,0,0); - AddPrim(OtPtr,P); - MapOfs.vy-=Length; - Idx++; - } - -*/ diff --git a/source/level/layerback.cpp b/source/level/layerback.cpp index 798a0735b..be578fe89 100644 --- a/source/level/layerback.cpp +++ b/source/level/layerback.cpp @@ -119,9 +119,12 @@ sLayerShadeBackGfx *GfxList=Data->GfxList; // Render Back Shade +// printf("%i %i\n",ThisY,BandHeight); + if (BandHeight>256) BandHeight=256; +// if (ThisY<0) BandHeight=256; for (i=0; i= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() ) { + setOnScreenFlag(true); m_modelGfx->Render(renderPos); // POLY_F4 *F4=GetPrimF4(); // setXYWH(F4,renderPos.vx-32,renderPos.vy-32,64,16); diff --git a/source/thing/thing.h b/source/thing/thing.h index e401fc8bd..0c92f5176 100644 --- a/source/thing/thing.h +++ b/source/thing/thing.h @@ -160,6 +160,9 @@ public: virtual s32 getNewYPos( CThing *_thisThing ); void setNewCollidedPos(DVECTOR newPos) {m_newCollidedPos = newPos;} // pkg - to be removed? + bool IsOnScreen() {return(m_OnScreenFlag);/* Put check code here */} + bool getOnScreenFlag() {return(m_OnScreenFlag);} + void setOnScreenFlag(bool f) {m_OnScreenFlag=f;} protected: virtual void setCollisionSize(int _w,int _h); @@ -174,6 +177,7 @@ private: DVECTOR m_collisionCentre; s16 m_collisionAngle; // pkg - move to CNpcPlatform? DVECTOR m_newCollidedPos; // pkg - to be removed? + bool m_OnScreenFlag; }; diff --git a/tools/Data/bin/MkLevel.exe b/tools/Data/bin/MkLevel.exe index b3515eea2..f3b58c51a 100644 Binary files a/tools/Data/bin/MkLevel.exe and b/tools/Data/bin/MkLevel.exe differ