This commit is contained in:
parent
0000a0bbe5
commit
a25bbc13fb
7 changed files with 89 additions and 2 deletions
|
@ -128,7 +128,8 @@ hazard_src := hazard \
|
||||||
fx_src := fx \
|
fx_src := fx \
|
||||||
|
|
||||||
projectl_src := projectl \
|
projectl_src := projectl \
|
||||||
prnpc
|
prnpc \
|
||||||
|
prnpcspr
|
||||||
|
|
||||||
fileio_src := fileio \
|
fileio_src := fileio \
|
||||||
$($(FILE_SYSTEM)_FILESYS_SRC)
|
$($(FILE_SYSTEM)_FILESYS_SRC)
|
||||||
|
|
|
@ -115,7 +115,7 @@ public:
|
||||||
|
|
||||||
bool canBeSuckedUp();
|
bool canBeSuckedUp();
|
||||||
bool suckUp( DVECTOR *suckPos, int _frames );
|
bool suckUp( DVECTOR *suckPos, int _frames );
|
||||||
void fireAsProjectile( s16 heading );
|
virtual void fireAsProjectile( s16 heading );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
class CLayerCollision *m_layerCollision;
|
class CLayerCollision *m_layerCollision;
|
||||||
|
|
|
@ -27,6 +27,13 @@
|
||||||
#include "system\vid.h"
|
#include "system\vid.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PROJECTL_PRNPCSPR_H__
|
||||||
|
#include "projectl\prnpcspr.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcSquidDartEnemy::render()
|
void CNpcSquidDartEnemy::render()
|
||||||
{
|
{
|
||||||
SprFrame = NULL;
|
SprFrame = NULL;
|
||||||
|
@ -81,3 +88,26 @@ void CNpcSquidDartEnemy::render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CNpcSquidDartEnemy::fireAsProjectile( s16 heading )
|
||||||
|
{
|
||||||
|
m_isActive = false;
|
||||||
|
setToShutdown();
|
||||||
|
|
||||||
|
DVECTOR newPos = Pos;
|
||||||
|
|
||||||
|
newPos.vy -= 10;
|
||||||
|
|
||||||
|
CEnemyAsSpriteProjectile *projectile;
|
||||||
|
projectile = new( "blower projectile" ) CEnemyAsSpriteProjectile;
|
||||||
|
projectile->init( newPos,
|
||||||
|
heading,
|
||||||
|
CPlayerProjectile::PLAYER_PROJECTILE_DUMBFIRE,
|
||||||
|
CPlayerProjectile::PLAYER_PROJECTILE_FINITE_LIFE,
|
||||||
|
5*60);
|
||||||
|
projectile->setLayerCollision( m_layerCollision );
|
||||||
|
projectile->setGraphic( FRM_SQUIDDART_SWIM0001 );
|
||||||
|
projectile->setHasRGB( true );
|
||||||
|
projectile->setRGB( 255, 128, 255 );
|
||||||
|
}
|
|
@ -24,6 +24,7 @@ public:
|
||||||
void render();
|
void render();
|
||||||
virtual int getFrameCount() {return( FRM_SQUIDDART_SWIM0004 - FRM_SQUIDDART_SWIM0001 + 1 );}
|
virtual int getFrameCount() {return( FRM_SQUIDDART_SWIM0004 - FRM_SQUIDDART_SWIM0001 + 1 );}
|
||||||
virtual u8 canCollideWithEnemy() {return( false );}
|
virtual u8 canCollideWithEnemy() {return( false );}
|
||||||
|
virtual void fireAsProjectile( s16 heading );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,6 +35,13 @@
|
||||||
#include "system\vid.h"
|
#include "system\vid.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PROJECTL_PRNPCSPR_H__
|
||||||
|
#include "projectl\prnpcspr.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcSmallJellyfishEnemy::render()
|
void CNpcSmallJellyfishEnemy::render()
|
||||||
{
|
{
|
||||||
SprFrame = NULL;
|
SprFrame = NULL;
|
||||||
|
@ -102,6 +109,8 @@ void CNpcSmallJellyfishEnemy::render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcSmallJellyfishEnemy::processClose( int _frames )
|
void CNpcSmallJellyfishEnemy::processClose( int _frames )
|
||||||
{
|
{
|
||||||
s32 moveX = 0, moveY = 0;
|
s32 moveX = 0, moveY = 0;
|
||||||
|
@ -235,6 +244,8 @@ void CNpcSmallJellyfishEnemy::processClose( int _frames )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool CNpcSmallJellyfishEnemy::processSensor()
|
bool CNpcSmallJellyfishEnemy::processSensor()
|
||||||
{
|
{
|
||||||
switch( m_sensorFunc )
|
switch( m_sensorFunc )
|
||||||
|
@ -259,6 +270,8 @@ bool CNpcSmallJellyfishEnemy::processSensor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcSmallJellyfishEnemy::processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange )
|
void CNpcSmallJellyfishEnemy::processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange )
|
||||||
{
|
{
|
||||||
s32 newX, newY;
|
s32 newX, newY;
|
||||||
|
@ -346,3 +359,36 @@ void CNpcSmallJellyfishEnemy::processMovementModifier( int _frames, s32 distX, s
|
||||||
|
|
||||||
m_drawRotation = m_heading;
|
m_drawRotation = m_heading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CNpcSmallJellyfishEnemy::fireAsProjectile( s16 heading )
|
||||||
|
{
|
||||||
|
m_isActive = false;
|
||||||
|
|
||||||
|
if ( m_data[m_type].respawning )
|
||||||
|
{
|
||||||
|
m_timerFunc = NPC_TIMER_RESPAWN;
|
||||||
|
m_timerTimer = 4 * GameState::getOneSecondInFrames();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setToShutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
DVECTOR newPos = Pos;
|
||||||
|
|
||||||
|
newPos.vy -= 10;
|
||||||
|
|
||||||
|
CEnemyAsSpriteProjectile *projectile;
|
||||||
|
projectile = new( "blower projectile" ) CEnemyAsSpriteProjectile;
|
||||||
|
projectile->init( newPos,
|
||||||
|
heading,
|
||||||
|
CPlayerProjectile::PLAYER_PROJECTILE_DUMBFIRE,
|
||||||
|
CPlayerProjectile::PLAYER_PROJECTILE_FINITE_LIFE,
|
||||||
|
5*60);
|
||||||
|
projectile->setLayerCollision( m_layerCollision );
|
||||||
|
projectile->setGraphic( FRM_JELLYFISH1_SWIM1 );
|
||||||
|
projectile->setHasRGB( true );
|
||||||
|
projectile->setRGB( 255, 128, 255 );
|
||||||
|
}
|
|
@ -32,6 +32,7 @@ protected:
|
||||||
virtual bool processSensor();
|
virtual bool processSensor();
|
||||||
virtual void processClose( int _frames );
|
virtual void processClose( int _frames );
|
||||||
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 );
|
||||||
|
virtual void fireAsProjectile( s16 heading );
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -1473,6 +1473,14 @@ SOURCE=..\..\..\source\projectl\prnpc.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\projectl\prnpcspr.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\projectl\prnpcspr.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\projectl\projectl.cpp
|
SOURCE=..\..\..\source\projectl\projectl.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Reference in a new issue