diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index d8b0c0c3c..e971c5feb 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -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 ); } diff --git a/source/enemy/npc.h b/source/enemy/npc.h index 0220a7960..595bdfcc7 100644 --- a/source/enemy/npc.h +++ b/source/enemy/npc.h @@ -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 ); diff --git a/source/enemy/nsj2back.cpp b/source/enemy/nsj2back.cpp index ce42d78ac..329f64676 100644 --- a/source/enemy/nsj2back.cpp +++ b/source/enemy/nsj2back.cpp @@ -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 ); } diff --git a/source/enemy/nsj2back.h b/source/enemy/nsj2back.h index 4167ac924..841577c75 100644 --- a/source/enemy/nsj2back.h +++ b/source/enemy/nsj2back.h @@ -22,7 +22,7 @@ class CNpcSmallJellyfish2BackgroundEnemy : public CNpcSmallJellyfishBackgroundEn { public: virtual void render(); - virtual CVECTOR getRGB(); + virtual u32 getRGB(); protected: virtual void collidedWith(CThing *_thisThing); }; diff --git a/source/enemy/nsjfish.cpp b/source/enemy/nsjfish.cpp index 7b75b62ac..fc4e3a74f 100644 --- a/source/enemy/nsjfish.cpp +++ b/source/enemy/nsjfish.cpp @@ -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 ); } diff --git a/source/enemy/nsjfish.h b/source/enemy/nsjfish.h index a45b40d5e..3558c0347 100644 --- a/source/enemy/nsjfish.h +++ b/source/enemy/nsjfish.h @@ -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 ); diff --git a/source/player/pmnet.h b/source/player/pmnet.h index deef28409..f2e8f4344 100644 --- a/source/player/pmnet.h +++ b/source/player/pmnet.h @@ -60,7 +60,7 @@ private: int m_netFrame; NetState m_netState; int m_netSin; - CVECTOR m_RGB; + u32 m_RGB; }; diff --git a/source/projectl/projectl.cpp b/source/projectl/projectl.cpp index 5746de3b1..5566e60dd 100644 --- a/source/projectl/projectl.cpp +++ b/source/projectl/projectl.cpp @@ -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; +} + /*****************************************************************************/ diff --git a/source/projectl/projectl.h b/source/projectl/projectl.h index 995912d79..f3aa558ef 100644 --- a/source/projectl/projectl.h +++ b/source/projectl/projectl.h @@ -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;