This commit is contained in:
Charles 2001-05-16 21:15:50 +00:00
parent 306b6e9011
commit 0c9df556f0
5 changed files with 24 additions and 3 deletions

View File

@ -108,6 +108,7 @@ public:
virtual u8 canBeCaughtByNet();
void caughtWithNet();
virtual int getFrameCount();
virtual int getFrame() {return( m_frame );}
void setSpeed( s16 newSpeed ) {m_speed = newSpeed;}
static CNpcEnemy *Create(sThingActor *ThisActor);

View File

@ -19,6 +19,19 @@
#include <sprites.h>
#endif
#ifndef __UTILS_HEADER__
#include "utils\utils.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcShellEnemy::postInit()
{
CNpcEnemy::postInit();
m_shellType = FRM_SHELL_STATIC0000 + ( getRnd() % ( FRM_SHELL_STATIC0002 - FRM_SHELL_STATIC0000 + 1 ) );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -34,7 +47,7 @@ void CNpcShellEnemy::render()
{
DVECTOR &renderPos=getRenderPos();
SprFrame = m_spriteBank->printRotatedScaledSprite( FRM_SHELL_STATIC0000,renderPos.vx,renderPos.vy,4096,4096,m_drawRotation,10);
SprFrame = m_spriteBank->printRotatedScaledSprite( m_shellType,renderPos.vx,renderPos.vy,4096,4096,m_drawRotation,10);
// get xmax, xmin, ymax, ymin

View File

@ -21,8 +21,13 @@
class CNpcShellEnemy : public CNpcEnemy
{
public:
virtual void postInit();
virtual void render();
virtual int getFrameCount() {return( 1 );}
virtual int getFrame() {return( m_shellType );}
protected:
u8 m_shellType;
};
#endif

View File

@ -240,6 +240,7 @@ void CPlayerModeCoralBlower::think()
// Got an enemy.. suck him up
if(m_enemy->suckUp(getSuckUpPoint(),1))
{
m_enemyFrame = m_enemy->getFrame();
m_blowerState=BLOWER_STATE__FULL;
}
}
@ -276,7 +277,7 @@ void CPlayerModeCoralBlower::think()
//CActorGfx *projectileGfx;
//projectileGfx=CActorPool::GetActor((FileEquate)ACTORS_SHELL_SBK);
//projectile->setGraphic( projectileGfx );
projectile->setGraphic( FRM_SHELL_STATIC0000 );
projectile->setGraphic( m_enemyFrame );
projectile->setHasRGB( false );
}
break;

View File

@ -58,7 +58,8 @@ private:
DVECTOR *getSuckUpPoint();
BlowerState m_blowerState;
class CNpcEnemy *m_enemy;
class CNpcEnemy *m_enemy;
u8 m_enemyFrame;
};