This commit is contained in:
Charles 2001-05-17 20:04:57 +00:00
parent 4d00a63deb
commit b0ca39dc2c
9 changed files with 24 additions and 16 deletions

View File

@ -1699,12 +1699,7 @@ void CNpcEnemy::processCoralBlower( int _frames )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CVECTOR CNpcEnemy::getRGB()
u32 CNpcEnemy::getRGB()
{
CVECTOR rgb;
rgb.r = 0;
rgb.g = 0;
rgb.b = 0;
return( rgb );
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 CVECTOR getRGB();
virtual u32 getRGB();
static CNpcEnemy *Create(sThingActor *ThisActor);
virtual void setupWaypoints( sThingActor *ThisActor );

View File

@ -144,7 +144,7 @@ void CNpcSmallJellyfish2BackgroundEnemy::collidedWith( CThing *_thisThing )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CVECTOR CNpcSmallJellyfish2BackgroundEnemy::getRGB()
u32 CNpcSmallJellyfish2BackgroundEnemy::getRGB()
{
CVECTOR rgb;
@ -152,5 +152,8 @@ CVECTOR CNpcSmallJellyfish2BackgroundEnemy::getRGB()
rgb.g = 128;
rgb.b = 255;
return( rgb );
u32 rgbVal;
rgbVal = rgb.r + ( rgb.g << 8 ) + ( rgb.b << 16 );
return( rgbVal );
}

View File

@ -22,7 +22,7 @@ class CNpcSmallJellyfish2BackgroundEnemy : public CNpcSmallJellyfishBackgroundEn
{
public:
virtual void render();
virtual CVECTOR getRGB();
virtual u32 getRGB();
protected:
virtual void collidedWith(CThing *_thisThing);
};

View File

@ -379,7 +379,7 @@ void CNpcSmallJellyfishEnemy::fireAsProjectile( s16 heading )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CVECTOR CNpcSmallJellyfishEnemy::getRGB()
u32 CNpcSmallJellyfishEnemy::getRGB()
{
CVECTOR rgb;
@ -387,5 +387,8 @@ CVECTOR CNpcSmallJellyfishEnemy::getRGB()
rgb.g = 128;
rgb.b = 255;
return( rgb );
u32 rgbVal;
rgbVal = rgb.r + ( rgb.g << 8 ) + ( rgb.b << 16 );
return( rgbVal );
}

View File

@ -28,7 +28,7 @@ public:
virtual void render();
virtual int getFrameCount() {return( FRM_JELLYFISH1_SWIM7 - FRM_JELLYFISH1_SWIM1 + 1 );}
virtual u8 canCollideWithEnemy() {return( false );}
virtual CVECTOR getRGB();
virtual u32 getRGB();
protected:
virtual bool processSensor();
virtual void processClose( int _frames );

View File

@ -60,7 +60,7 @@ private:
int m_netFrame;
NetState m_netState;
int m_netSin;
CVECTOR m_RGB;
u32 m_RGB;
};

View File

@ -592,4 +592,11 @@ void CPlayerProjectile::collidedWith(CThing *_thisThing)
}
}
void CPlayerProjectile::setRGB( u32 new_RGB )
{
m_RGB.r = new_RGB & 255;
m_RGB.g = ( new_RGB >> 8 ) & 255;
m_RGB.b = ( new_RGB >> 16 ) & 255;
}
/*****************************************************************************/

View File

@ -112,7 +112,7 @@ public:
void setLifeTime( PLAYER_PROJECTILE_LIFETIME_TYPE lifeType );
void setPosition( DVECTOR newPos );
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
void setRGB( CVECTOR new_RGB ) {m_RGB = new_RGB;}
void setRGB( u32 new_RGB );
private:
class CLayerCollision *m_layerCollision;