This commit is contained in:
Daveo 2001-05-05 19:42:49 +00:00
parent ba71212557
commit 7551029dc0
5 changed files with 25 additions and 25 deletions

View File

@ -25,6 +25,11 @@ void CFXJellyFishLegs::init()
/*****************************************************************************/
void CFXJellyFishLegs::shutdown()
{
for (int L=0; L<Width; L++)
{
MemFree(FXList[L]);
}
MemFree(FXList);
MemFree(WidthTable);
MemFree(HeightTable);
@ -66,7 +71,7 @@ int AInc=1024/Width;
dH*=2;
if (dH>8) 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<Width; L++)
@ -129,7 +141,7 @@ s16 *dH=HeightTable;
for (int i=0; i<Count-1; i++)
{
if (Idx>=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-1; i++)
{
if (Idx>=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++;
}
*/

View File

@ -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<BandCount; i++)
{
setXYWH(&Band[i],0,ThisY,512,BandHeight*2);
setXYWH(&Band[i],0,ThisY,512,BandHeight);
addPrim(ThisOT,&Band[i]);
ThisY+=BandHeight;
}

View File

@ -841,6 +841,7 @@ void CNpcPlatform::processMovement( int _frames )
void CNpcPlatform::render()
{
setOnScreenFlag(false);
if ( m_isActive )
{
CPlatformThing::render();
@ -862,6 +863,7 @@ void CNpcPlatform::render()
{
if ( renderPos.vy + collisionRect.y2 >= 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);

View File

@ -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;
};

Binary file not shown.