This commit is contained in:
parent
d1340ad504
commit
6c28c8cc7f
2 changed files with 8 additions and 4 deletions
|
@ -30,10 +30,9 @@ void CNpcButterflyBackgroundEnemy::processMovementModifier(int _frames, s32 dist
|
||||||
Pos.vx += distX;
|
Pos.vx += distX;
|
||||||
Pos.vy += distY;
|
Pos.vy += distY;
|
||||||
|
|
||||||
m_frame++;
|
if ( !m_animPlaying )
|
||||||
|
|
||||||
if ( m_frame > ( FRM_BUTTERFLY_FLAP04 - FRM_BUTTERFLY_FLAP01 ) )
|
|
||||||
{
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +72,7 @@ void CNpcButterflyBackgroundEnemy::render()
|
||||||
{
|
{
|
||||||
if ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
|
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)
|
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
|
// get xmax, xmin, ymax, ymin
|
||||||
|
|
|
@ -18,10 +18,15 @@
|
||||||
#include "enemy\nsjback.h"
|
#include "enemy\nsjback.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __SPR_SPRITES_H__
|
||||||
|
#include <sprites.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class CNpcButterflyBackgroundEnemy : public CNpcSmallJellyfishBackgroundEnemy
|
class CNpcButterflyBackgroundEnemy : public CNpcSmallJellyfishBackgroundEnemy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
virtual int getFrameCount() {return( FRM_BUTTERFLY_FLAP04 - FRM_BUTTERFLY_FLAP01 + 1 );}
|
||||||
protected:
|
protected:
|
||||||
virtual void processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
|
virtual void processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue