This commit is contained in:
Paul 2001-04-26 20:56:11 +00:00
parent 505d0c9ede
commit 9400e8bbd2

View File

@ -109,17 +109,15 @@ void CSpatulaPickup::collect(class CPlayer *_player)
Params: Params:
Returns: Returns:
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
int spat_glintspeed=1; int spat_maxglint=50;
int spat_maxglint=100; int spat_glintgrowspeed=3;
int spat_glintrotspeed=50; int spat_glintrotspeed=90;
int spat_glintgrowspeed=5; DVECTOR spat_gxy={19,1};
DVECTOR spat_gxy1={0,28};
DVECTOR spat_gxy2={50,-35};
static const int spat_glintFrames[]={FRM__GLINT1,FRM__GLINT2,FRM__GLINT3,FRM__GLINT4,FRM__GLINT4,FRM__GLINT3,FRM__GLINT2,FRM__GLINT1}; static const int spat_glintFrames[]={FRM__GLINT1,FRM__GLINT2,FRM__GLINT3,FRM__GLINT4,FRM__GLINT4,FRM__GLINT3,FRM__GLINT2,FRM__GLINT1};
void CSpatulaPickup::thinkPickup(int _frames) void CSpatulaPickup::thinkPickup(int _frames)
{ {
m_glint+=_frames*spat_glintspeed; m_glint+=_frames;
if(m_glint>spat_maxglint)m_glint-=spat_maxglint; m_glint&=0xff;
m_glintRot+=_frames*spat_glintrotspeed; m_glintRot+=_frames*spat_glintrotspeed;
m_glintRot&=4095; m_glintRot&=4095;
} }
@ -142,11 +140,11 @@ void CSpatulaPickup::renderPickup(DVECTOR *_pos)
y=_pos->vy-(fh->H/2); y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS); sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
if(m_glint<=255) if(m_glint<=spat_maxglint)
{ {
fh=sprites->getFrameHeader(spat_glintFrames[(m_glint>>spat_glintgrowspeed)&0x07]); fh=sprites->getFrameHeader(spat_glintFrames[(m_glint>>spat_glintgrowspeed)&0x07]);
x=x+(((spat_gxy2.vx-spat_gxy1.vx)*m_glint)>>8)+spat_gxy1.vx; x=x+spat_gxy.vx;
y=y+(((spat_gxy2.vy-spat_gxy1.vy)*m_glint)>>8)+spat_gxy1.vy; y=y+spat_gxy.vy;
sprites->printRotatedScaledSprite(fh,x,y,4095,4095,m_glintRot,OTPOS__PICKUP_POS-1); sprites->printRotatedScaledSprite(fh,x,y,4095,4095,m_glintRot,OTPOS__PICKUP_POS-1);
} }
} }
@ -167,7 +165,7 @@ extern int balloon_scale2;
extern int balloon_phase; extern int balloon_phase;
extern int balloon_vissize; extern int balloon_vissize;
extern int balloon_stringx; extern int balloon_stringx;
int bspat_stringendxoff=6; int bspat_stringendxoff=8;
int bspat_stringendyoff=-13; int bspat_stringendyoff=-13;
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
Function: Function: