This commit is contained in:
Charles 2001-05-10 22:35:10 +00:00
parent d1340ad504
commit 6c28c8cc7f
2 changed files with 8 additions and 4 deletions

View File

@ -30,10 +30,9 @@ void CNpcButterflyBackgroundEnemy::processMovementModifier(int _frames, s32 dist
Pos.vx += distX;
Pos.vy += distY;
m_frame++;
if ( m_frame > ( FRM_BUTTERFLY_FLAP04 - FRM_BUTTERFLY_FLAP01 ) )
if ( !m_animPlaying )
{
m_animPlaying = true;
m_frame = 0;
}
}
@ -73,7 +72,7 @@ void CNpcButterflyBackgroundEnemy::render()
{
if ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
{
SprFrame = m_spriteBank->printRotatedScaledSprite( FRM_BUTTERFLY_FLAP01 + m_frame,renderPos.vx,renderPos.vy,4096,4096,0,10);
SprFrame = m_spriteBank->printFT4(FRM_BUTTERFLY_FLAP01 + ( m_frame >> 8 ),renderPos.vx,renderPos.vy,!m_reversed,0,10);
setRGB0( SprFrame, 255, 128, 255 ); // Let me know if these change! ALso ket me know when the different coloured ones go in pls! (pkg)
// get xmax, xmin, ymax, ymin

View File

@ -18,10 +18,15 @@
#include "enemy\nsjback.h"
#endif
#ifndef __SPR_SPRITES_H__
#include <sprites.h>
#endif
class CNpcButterflyBackgroundEnemy : public CNpcSmallJellyfishBackgroundEnemy
{
public:
virtual void render();
virtual int getFrameCount() {return( FRM_BUTTERFLY_FLAP04 - FRM_BUTTERFLY_FLAP01 + 1 );}
protected:
virtual void processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
};