This commit is contained in:
Charles 2001-05-17 21:07:43 +00:00
parent d9d7005122
commit 42b33334a4
7 changed files with 26 additions and 43 deletions

View File

@ -629,6 +629,7 @@ void CNpcEnemy::init()
m_isBlowerOn = false;
m_speed = m_data[m_type].speed;
m_heading = 0;
m_RGB = 0;
updateCollisionArea();
}
@ -1696,10 +1697,3 @@ void CNpcEnemy::processCoralBlower( int _frames )
m_isBlowerOn = false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
u32 CNpcEnemy::getRGB()
{
return( 0 );
}

View File

@ -110,7 +110,7 @@ public:
virtual int getFrameCount();
virtual int getFrame() {return( m_frame );}
void setSpeed( s16 newSpeed ) {m_speed = newSpeed;}
virtual u32 getRGB();
virtual u32 getRGB() {return( m_RGB );}
static CNpcEnemy *Create(sThingActor *ThisActor);
virtual void setupWaypoints( sThingActor *ThisActor );
@ -298,6 +298,7 @@ protected:
DVECTOR m_caughtPos;
s16 m_speed;
u8 m_isDying;
u32 m_RGB;
s32 m_frame;
int m_animNo;

View File

@ -42,6 +42,8 @@ void CNpcSmallJellyfishProjectileEnemy::postInit()
CNpcEnemy::postInit();
m_lifetime = 8 * GameState::getOneSecondInFrames();
m_RGB = 255 + ( 128 << 8 ) + ( 255 << 16 );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -28,6 +28,15 @@
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSmallJellyfish2BackgroundEnemy::postInit()
{
CNpcEnemy::postInit();
m_RGB = 128 + ( 128 << 8 ) + ( 255 << 16 );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSmallJellyfish2BackgroundEnemy::render()
@ -141,19 +150,3 @@ void CNpcSmallJellyfish2BackgroundEnemy::collidedWith( CThing *_thisThing )
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
u32 CNpcSmallJellyfish2BackgroundEnemy::getRGB()
{
CVECTOR rgb;
rgb.r = 128;
rgb.g = 128;
rgb.b = 255;
u32 rgbVal;
rgbVal = rgb.r + ( rgb.g << 8 ) + ( rgb.b << 16 );
return( rgbVal );
}

View File

@ -21,8 +21,8 @@
class CNpcSmallJellyfish2BackgroundEnemy : public CNpcSmallJellyfishBackgroundEnemy
{
public:
virtual void postInit();
virtual void render();
virtual u32 getRGB();
protected:
virtual void collidedWith(CThing *_thisThing);
};

View File

@ -40,6 +40,15 @@
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSmallJellyfishEnemy::postInit()
{
CNpcEnemy::postInit();
m_RGB = 255 + ( 128 << 8 ) + ( 255 << 16 );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSmallJellyfishEnemy::render()
@ -376,19 +385,3 @@ void CNpcSmallJellyfishEnemy::fireAsProjectile( s16 heading )
projectile->setHasRGB( true );
projectile->setRGB( 255, 128, 255 );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
u32 CNpcSmallJellyfishEnemy::getRGB()
{
CVECTOR rgb;
rgb.r = 255;
rgb.g = 128;
rgb.b = 255;
u32 rgbVal;
rgbVal = rgb.r + ( rgb.g << 8 ) + ( rgb.b << 16 );
return( rgbVal );
}

View File

@ -25,10 +25,10 @@
class CNpcSmallJellyfishEnemy : public CNpcEnemy
{
public:
virtual void postInit();
virtual void render();
virtual int getFrameCount() {return( FRM_JELLYFISH1_SWIM7 - FRM_JELLYFISH1_SWIM1 + 1 );}
virtual u8 canCollideWithEnemy() {return( false );}
virtual u32 getRGB();
protected:
virtual bool processSensor();
virtual void processClose( int _frames );