Commit 0616245e authored by Gerhard Stein's avatar Gerhard Stein

Heavy class reorganisaion

parent d6171ecc
......@@ -275,6 +275,7 @@ bool CSpriteObject::hitdetectWithTileProperty(const int Property, const int x, c
return false;
}
bool CSpriteObject::checkMapBoundaryR(const int x2)
{
if( (Uint16)x2 > ((mp_Map->m_width)<<CSF) ) // Out of map?
......@@ -285,11 +286,32 @@ bool CSpriteObject::checkMapBoundaryR(const int x2)
return false;
}
bool CSpriteObject::checkMapBoundaryL(const int x1)
{
if( x1 == 0 ) // Out of map?
{
exists = false; // deactivate it!
return true;
}
return false;
}
bool CSpriteObject::checkMapBoundaryU(const int y1)
{
if( y1 <= (1<<CSF) )
return true;
return false;
}
int CSpriteObject::checkSolidR( int x1, int x2, int y1, int y2)
{
std::vector<CTileProperties> &TileProperty = g_pBehaviorEngine->getTileProperties();
int blocker;
bool vorticon = (g_pBehaviorEngine->getEpisode() <= 3);
x2 += COLISION_RES;
......@@ -316,7 +338,6 @@ int CSpriteObject::checkSolidR( int x1, int x2, int y1, int y2)
int CSpriteObject::checkSolidL( int x1, int x2, int y1, int y2)
{
bool vorticon = (g_pBehaviorEngine->getEpisode() <= 3);
int blocker;
std::vector<CTileProperties> &TileProperty = g_pBehaviorEngine->getTileProperties();
......@@ -343,21 +364,7 @@ int CSpriteObject::checkSolidL( int x1, int x2, int y1, int y2)
return 0;
}
// borders
if( m_type == OBJ_PLAYER && solid )
{
if( vorticon && (x1 <= (2<<CSF)) ) return 1;
else if( x1 <= (1<<CSF) ) return 1;
}
else
{
if( x1 == 0 )
{
exists = false; // Out of map?
return 1;
}
}
return 0;
return checkMapBoundaryL(x1) ? 1 : 0;
}
int CSpriteObject::checkSolidU(int x1, int x2, int y1, const bool push_mode )
......@@ -417,10 +424,7 @@ int CSpriteObject::checkSolidU(int x1, int x2, int y1, const bool push_mode )
}
}
if( y1 <= ( ((m_type == OBJ_PLAYER) ? 2 : 1)<<CSF) )
return 1;
return 0;
return checkMapBoundaryU(y1) ? 1 : 0;
}
int CSpriteObject::checkSolidD( int x1, int x2, int y2, const bool push_mode )
......
......@@ -815,6 +815,24 @@ bool CPlayer::checkMapBoundaryR(const int x2)
return false;
}
bool CPlayer::checkMapBoundaryL(const int x1)
{
if( solid && x1 <= (2<<CSF) )
return true;
return false;
}
bool CPlayer::checkMapBoundaryU(const int y1)
{
if( y1 <= (2<<CSF) )
return true;
return false;
}
bool CPlayer::checkObjSolid()
{
supportedbyobject = false;
......
......@@ -86,7 +86,9 @@ public:
int pollLevelTrigger();
void getShotByRay(object_t &obj_type);
bool checkMapBoundaryL(const int x1);
bool checkMapBoundaryR(const int x2);
bool checkMapBoundaryU(const int y1);
// Used for both situations
void processCamera();
......
......@@ -5,9 +5,9 @@
* Author: gerstrong
*/
#include "engine/spritedefines.h"
#include "CSpriteObject.h"
#include "CLogFile.h"
#include "engine/spritedefines.h"
#include "sdl/CVideoDriver.h"
int CSpriteObject::m_number_of_objects = 0; // The current number of total objects we have within the game!
......@@ -15,8 +15,7 @@ int CSpriteObject::m_number_of_objects = 0; // The current number of total objec
///
// Initialization Routine
///
CSpriteObject::CSpriteObject(CMap *pmap, Uint32 x, Uint32 y, object_t type) :
m_type(type),
CSpriteObject::CSpriteObject(CMap *pmap, Uint32 x, Uint32 y) :
m_index(m_number_of_objects),
mHealthPoints(1),
sprite(BLANKSPRITE),
......@@ -56,79 +55,8 @@ transluceny(0)
blockedu = false;
blockedl = false;
blockedr = false;
if(m_type != OBJ_NONE )
{
setupObjectType(g_pBehaviorEngine->getEpisode());
performCollisions();
}
}
void CSpriteObject::setupObjectType(int Episode)
{
switch(m_type)
{
// Mainly Episode 1
case OBJ_GARG: sprite = OBJ_GARG_DEFSPRITE; break;
case OBJ_BUTLER: sprite = OBJ_BUTLER_DEFSPRITE; break;
case OBJ_TANK: sprite = OBJ_BUTLER_DEFSPRITE; break;
case OBJ_ICECHUNK: sprite = OBJ_ICECHUNK_DEFSPRITE; break;
case OBJ_ICEBIT: sprite = OBJ_ICEBIT_DEFSPRITE; break;
case OBJ_ICECANNON: sprite = OBJ_ICECHUNK_DEFSPRITE; break;
case OBJ_ROPE: sprite = OBJ_ROPE_DEFSPRITE; break;
// Mainly Episode 2
case OBJ_SCRUB: sprite = OBJ_SCRUB_DEFSPRITE; break;
case OBJ_GUARDROBOT: sprite = OBJ_TANKEP2_DEFSPRITE; break;
case OBJ_VORTELITE: sprite = OBJ_VORTELITE_DEFSPRITE; break;
case OBJ_SPARK: sprite = OBJ_SPARK_DEFSPRITE_EP2; break;
// Mainly Episode 3
case OBJ_FOOB: sprite = OBJ_FOOB_DEFSPRITE; break;
case OBJ_NINJA: sprite = OBJ_NINJA_DEFSPRITE; break;
case OBJ_MOTHER: sprite = OBJ_MOTHER_DEFSPRITE; break;
case OBJ_MEEP: sprite = OBJ_MEEP_DEFSPRITE; break;
case OBJ_BALL: sprite = OBJ_BALL_DEFSPRITE; break;
case OBJ_JACK: sprite = OBJ_JACK_DEFSPRITE; break;
case OBJ_MESSIE: sprite = OBJ_NESSIE_DEFSPRITE; break;
case OBJ_AUTORAY_V: sprite = RAY_VERT_EP3; break;
case OBJ_SNDWAVE: sprite = OBJ_SNDWAVE_DEFSPRITE; break;
case OBJ_VORT:
{
if(Episode == 1) sprite = OBJ_VORT_DEFSPRITE_EP1;
else if(Episode == 2) sprite = OBJ_VORT_DEFSPRITE_EP2;
else if(Episode == 3) sprite = OBJ_VORT_DEFSPRITE_EP3;
}break;
case OBJ_BABY:
{
if(Episode == 2) sprite = OBJ_BABY_DEFSPRITE_EP2;
else sprite = OBJ_BABY_DEFSPRITE_EP3;
}break;
case OBJ_PLATFORM:
case OBJ_PLATVERT:
{
if(Episode == 2) sprite = OBJ_PLATFORM_DEFSPRITE_EP2;
else sprite = OBJ_PLATFORM_DEFSPRITE_EP3;
}break;
case OBJ_AUTORAY: {
if(Episode == 1) sprite = ENEMYRAY;
else if(Episode == 2) sprite = ENEMYRAYEP2;
sprite = ENEMYRAYEP3;
}break;
case OBJ_DOOR: sprite = DOOR_YELLOW_SPRITE; break;
case OBJ_TELEPORTER: sprite = OBJ_TELEPORTER_DEFSPRITE; break;
case OBJ_SECTOREFFECTOR: sprite = BLANKSPRITE; break;
case OBJ_GOTPOINTS: sprite = PT500_SPRITE; break;
default: sprite = BLANKSPRITE; break;
}
}
void CSpriteObject::setScrPos( int px, int py )
{
......@@ -143,67 +71,18 @@ bool CSpriteObject::calcVisibility()
{
int &visibility = g_pBehaviorEngine->getPhysicsSettings().misc.visibility;
// Platform are always active
if( m_type == OBJ_PLATFORM || m_type == OBJ_PLATVERT )
return true;
// If an object is in the mid-air still moves it still,
// until it gets stuck to ceiling, wall or floor
if( !blockedd && m_type!=OBJ_SCRUB ) return true;
SDL_Rect gameres = g_pVideoDriver->getGameResolution().SDLRect();
Uint32 left = (((mp_Map->m_scrollx<<STC)-(visibility<<CSF))<0) ? 0 :
const Uint32 left = (((mp_Map->m_scrollx<<STC)-(visibility<<CSF))<0) ? 0 :
(mp_Map->m_scrollx<<STC)-(visibility<<CSF);
Uint32 right = ((mp_Map->m_scrollx+gameres.w)<<STC)+(visibility<<CSF);
Uint32 up = (((mp_Map->m_scrolly<<STC)-(visibility<<CSF))<0) ? 0 :
const Uint32 right = ((mp_Map->m_scrollx+gameres.w)<<STC)+(visibility<<CSF);
const Uint32 up = (((mp_Map->m_scrolly<<STC)-(visibility<<CSF))<0) ? 0 :
(mp_Map->m_scrolly<<STC)-(visibility<<CSF);
Uint32 down = ((mp_Map->m_scrolly+gameres.h)<<STC)+(visibility<<CSF);
const Uint32 down = ((mp_Map->m_scrolly+gameres.h)<<STC)+(visibility<<CSF);
bool inscreen = ( right > m_Pos.x && left < m_Pos.x && down > m_Pos.y && up < m_Pos.y );
// Bullets should disappear when offscreen
if(m_type == OBJ_SNDWAVE || m_type == OBJ_RAY || m_type == OBJ_FIREBALL)
{
if(!inscreen)
exists=false;
}
return inscreen;
return ( right > m_Pos.x && left < m_Pos.x && down > m_Pos.y && up < m_Pos.y );
}
/**
* This function will check if the enemy is in the limited scenario,
* so it will triggered. Happens normally when the Object is seen on the screen.
*/
bool CSpriteObject::checkforScenario()
{
if ( !exists || m_type==OBJ_PLAYER ) return false;
if( m_type==OBJ_EXPLOSION || m_type==OBJ_EARTHCHUNK
|| m_type == OBJ_BRIDGE || m_type == OBJ_NONE ) return true;
// Check if enemy is near enough. If he isn't, don't make him perform. Exception is on the map
if(!mp_Map->m_worldmap)
if(!calcVisibility()) return false;
onscreen = true;
if (hasbeenonscreen ||
m_type==OBJ_RAY || m_type==OBJ_ROPE ||
m_type==OBJ_ICECANNON ||
m_type==OBJ_ICECHUNK || m_type==OBJ_PLATFORM ||
m_type==OBJ_PLATVERT || m_type==OBJ_YORP ||
m_type==OBJ_FOOB || m_type==OBJ_SCRUB ||
m_type == OBJ_SECTOREFFECTOR)
{
return true;
}
return false;
}
......@@ -413,8 +292,6 @@ void CSpriteObject::processFalling()
{
// CAUTION: There is a difference between falling and going down with the gravity...
if(m_type == OBJ_MESSIE) return;
// So it reaches the maximum of fallspeed
if(!inhibitfall && !m_climbing)
{
......
......@@ -69,9 +69,8 @@ struct ObjMove : public CEvent
class CSpriteObject
{
public:
CSpriteObject(CMap *pmap, Uint32 x, Uint32 y, object_t type);
CSpriteObject(CMap *pmap, Uint32 x, Uint32 y);
object_t m_type; // yorp, vorticon, etc.
unsigned int m_index; // Like an ID for some objects that need this implementation
char mHealthPoints; // episode 1 style four-shots-to-kill
bool exists;
......@@ -126,14 +125,11 @@ public:
// This container will held the triggered events of the object
CEventContainer m_EventCont;
void setupObjectType(int Episode);
void calcBoundingBoxes();
void performCollisionsSameBox();
void performCollisions();
void setScrPos( int px, int py );
bool calcVisibility();
bool checkforScenario();
virtual bool calcVisibility();
/**
* \description This will verify whether object has to fall or not.
......@@ -221,7 +217,10 @@ public:
int checkSolidU( int x1, int x2, int y1, const bool push_mode=false );
int checkSolidD( int x1, int x2, int y2, const bool push_mode=false );
virtual bool checkMapBoundaryL(const int x1);
virtual bool checkMapBoundaryR(const int x2);
virtual bool checkMapBoundaryU(const int y1);
// special functions for sloped tiles
bool checkslopedU( int c, int y1, char blocked);
......@@ -241,7 +240,7 @@ public:
Uint32 getYDownPos();
Uint32 getYMidPos();
void processFalling();
virtual void processFalling();
virtual void getTouchedBy(CSpriteObject &theObject) {};
virtual bool isNearby(CSpriteObject &theObject) { return true; }
virtual void getShotByRay(object_t &obj_type);
......
......@@ -16,7 +16,7 @@
#include "engine/spritedefines.h"
CCamera::CCamera(CMap *pmap, Uint32 x, Uint32 y, CSpriteObject *p_attacher) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CSpriteObject(pmap, x, y),
mp_AttachedObject(p_attacher)
{
m_relcam.x = 0;
......
......@@ -7,7 +7,6 @@
#include "CGalaxySpriteObject.h"
CGalaxySpriteObject::CGalaxySpriteObject(CMap *pmap, Uint32 x, Uint32 y, object_t type) :
CSpriteObject(pmap, x, y, type)
CGalaxySpriteObject::CGalaxySpriteObject(CMap *pmap, Uint32 x, Uint32 y) :
CSpriteObject(pmap, x, y)
{}
......@@ -12,7 +12,8 @@
class CGalaxySpriteObject: public CSpriteObject
{
CGalaxySpriteObject(CMap *pmap, Uint32 x, Uint32 y, object_t type);
public:
CGalaxySpriteObject(CMap *pmap, Uint32 x, Uint32 y);
};
#endif /* CGALAXYSPRITEOBJECT_H_ */
......@@ -15,7 +15,7 @@ const Uint32 speed = 10;
const Uint32 hittime = 100;
CBullet::CBullet(CMap *pmap, const Uint32 x, const Uint32 y, const direction_t dir) :
CSpriteObject(pmap, x, y, OBJ_RAY)
CSpriteObject(pmap, x, y)
{
m_hDir = NONE; m_vDir = NONE;
......
......@@ -14,7 +14,7 @@ namespace galaxy {
CEnemyShot::CEnemyShot(CMap *pmap, const Uint32 x, const Uint32 y,
const int actionFormatOffset, const direction_t dir, const int speed) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CSpriteObject(pmap, x, y),
m_speed(speed)
{
setupGalaxyObjectOnMap(actionFormatOffset, 0);
......
......@@ -18,7 +18,7 @@ const Uint16 SPEED = 64;
CFlag::CFlag(CMap *pmap, const VectorD2<Uint32> &Location,
const VectorD2<Uint32> &Destination) :
CSpriteObject(pmap, Location.x, Location.y, OBJ_NONE),
CSpriteObject(pmap, Location.x, Location.y),
m_location(Location),
m_destination(Destination),
m_baseframe(FLYING_BASEFRAME),
......
......@@ -17,7 +17,7 @@ const int itemEffectTime = 50;
const int itemEffectTime_Animation = 14;
CItemEffect::CItemEffect(CMap *pmap, Uint32 x, Uint32 y, Uint16 l_sprite, item_effect_type ieffect) :
CSpriteObject(pmap, x, y, OBJ_NONE)
CSpriteObject(pmap, x, y)
{
m_timer = 0;
sprite = l_sprite-124;
......
......@@ -20,7 +20,7 @@ CPlayerBase::CPlayerBase(
direction_t facedir,
CInventory &l_Inventory,
stCheat &Cheatmode) :
CSpriteObject(pmap, x, y, OBJ_PLAYER),
CGalaxySpriteObject(pmap, x, y),
m_Inventory(l_Inventory),
m_camera(pmap,x,y,this),
m_ObjectPtrs(ObjectPtrs),
......@@ -351,6 +351,23 @@ bool CPlayerBase::checkMapBoundaryR(const int x2)
return false;
}
bool CPlayerBase::checkMapBoundaryL(const int x1)
{
if( solid && x1 <= (1<<CSF) )
return true;
return false;
}
bool CPlayerBase::checkMapBoundaryU(const int y1)
{
if( y1 <= (2<<CSF) )
return true;
return false;
}
};
......@@ -15,7 +15,7 @@
#ifndef CPLAYERBASE_H_
#define CPLAYERBASE_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
#include "common/Playerdefines.h"
#include "engine/CEvent.h"
#include "common/Cheat.h"
......@@ -29,7 +29,7 @@ namespace galaxy
#define A_KEEN_DIE 29
class CPlayerBase : public CSpriteObject
class CPlayerBase : public CGalaxySpriteObject
{
public:
/**
......@@ -88,7 +88,9 @@ public:
protected:
bool checkMapBoundaryL(const int x1);
bool checkMapBoundaryR(const int x2);
bool checkMapBoundaryU(const int y1);
std::vector<CSpriteObject*>& m_ObjectPtrs;
......
......@@ -17,7 +17,7 @@ const int MAX_ANIMATION_TIMER = 20;
CSpriteItem::CSpriteItem(CMap *pmap, Uint32 x, Uint32 y,
std::vector<CSpriteObject*>& ObjectPtrs, Uint32 sprite) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CGalaxySpriteObject(pmap, x, y),
m_ObjectPtrs(ObjectPtrs)
{
m_index = sprite;
......
......@@ -12,12 +12,13 @@
#ifndef CSPRITEITEM_H_
#define CSPRITEITEM_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
namespace galaxy {
class CSpriteItem : public CSpriteObject{
class CSpriteItem : public CGalaxySpriteObject
{
public:
CSpriteItem(CMap *pmap, Uint32 x, Uint32 y,
std::vector<CSpriteObject*>& ObjectPtrs, Uint32 sprite);
......
......@@ -12,8 +12,8 @@ namespace galaxy
const unsigned int STARRING_ANIMATION_TIME = 5;
CStarRing::CStarRing(CMap *pmap, Uint32 x, Uint32 y, object_t type) :
CSpriteObject(pmap, x, y, type),
CStarRing::CStarRing(CMap *pmap, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, x, y),
m_animation_timer(0)
{
sprite = STARRING_SPRITE;
......
......@@ -11,16 +11,17 @@
#ifndef CSTARRING_H_
#define CSTARRING_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
namespace galaxy
{
const unsigned int STARRING_SPRITE = 40;
class CStarRing : public CSpriteObject {
class CStarRing : public CGalaxySpriteObject
{
public:
CStarRing(CMap *pmap, Uint32 x, Uint32 y, object_t type);
CStarRing(CMap *pmap, Uint32 x, Uint32 y);
private:
void process();
......
......@@ -21,9 +21,8 @@ namespace galaxy
CStunnable::CStunnable( CMap *pmap,
Uint32 x,
Uint32 y,
object_t type ) :
CSpriteObject( pmap, x, y, type )
Uint32 y ) :
CGalaxySpriteObject( pmap, x, y )
{
m_invincible = false;
}
......@@ -49,7 +48,7 @@ void CStunnable::processGettingStunned()
const Uint32 star_x = getXMidPos() - ( (StarRing.getWidth()<<STC)/2 );
const Uint32 star_y = getYUpPos() - ( StarRing.getHeight()<<STC );
EventSpawnObject *Ev = new EventSpawnObject( new CStarRing(mp_Map, star_x, star_y, OBJ_NONE) );
EventSpawnObject *Ev = new EventSpawnObject( new CStarRing(mp_Map, star_x, star_y) );
g_pBehaviorEngine->m_EventList.add( Ev );
mp_processState = &CStunnable::processStunned;
}
......
......@@ -8,19 +8,18 @@
#ifndef CSTUNNABLE_H_
#define CSTUNNABLE_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
#include "engine/galaxy/ai/CBullet.h"
namespace galaxy
{
class CStunnable: public virtual CSpriteObject
class CStunnable: public virtual CGalaxySpriteObject
{
public:
CStunnable( CMap *pmap,
Uint32 x,
Uint32 y,
object_t type=OBJ_NONE );
Uint32 y );
/**
* What happens when some objects gets touched, or normally shot
......
......@@ -19,9 +19,9 @@ const int MAX_BOUNCE_BOOST = -115;
const int HOR_SPEED = 40;
CBounder::CBounder(CMap *pmap, Uint32 x, Uint32 y) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CGalaxySpriteObject(pmap, x, y),
CStunnable(pmap, x, y),
CPlatform(pmap, x, y, OBJ_NONE),
CPlatform(pmap, x, y),
bounceboost(0)
{
setupGalaxyObjectOnMap(0x2F12, A_BOUNDER_BOUNCE);
......
......@@ -14,7 +14,7 @@ namespace galaxy {
const int BUBBLE_FLOAT_SPEED = 40;
CBubbles::CBubbles(CMap *pmap, Uint32 x, Uint32 y, const bool bigbubble) :
CSpriteObject(pmap, x, y, OBJ_NONE)
CGalaxySpriteObject(pmap, x, y)
{
if(bigbubble)
......
......@@ -10,11 +10,11 @@
#ifndef CBUBBLES_H_
#define CBUBBLES_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
namespace galaxy {
class CBubbles: public CSpriteObject
class CBubbles: public CGalaxySpriteObject
{
public:
CBubbles(CMap *pmap, Uint32 x, Uint32 y, const bool bigbubble);
......
......@@ -19,7 +19,7 @@ const int ELDER_MOVE_TIMER = 10;
CCouncilMember::CCouncilMember(CMap *pmap, Uint32 x, Uint32 y) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CSpriteObject(pmap, x, y),
rescued(false),
m_timer(0)
{
......
......@@ -25,7 +25,7 @@ const int CSF_MIN_DISTANCE_X_TO_LOOK = 10<<CSF;
const int CSF_MIN_DISTANCE_Y_TO_LOOK = 1<<CSF;
CDevilSprite::CDevilSprite(CMap *pmap, Uint32 x, Uint32 y) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CGalaxySpriteObject(pmap, x, y),
m_timer(0)
{
setupGalaxyObjectOnMap(0x37A0, A_SPRITE_MOVE);
......
......@@ -8,11 +8,12 @@
#ifndef CDEVILSPRITE_H_
#define CDEVILSPRITE_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
namespace galaxy {
class CDevilSprite: public CSpriteObject {
class CDevilSprite: public CGalaxySpriteObject
{
public:
CDevilSprite(CMap *pmap, Uint32 x, Uint32 y);
......
......@@ -11,7 +11,7 @@
namespace galaxy {
CDiveSuit::CDiveSuit(CMap *pmap, Uint32 x, Uint32 y) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CGalaxySpriteObject(pmap, x, y),
taken(false)
{
sprite = 306;
......
......@@ -8,11 +8,12 @@
#ifndef CDIVESUIT_H_
#define CDIVESUIT_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
namespace galaxy {
class CDiveSuit: public CSpriteObject {
class CDiveSuit: public CGalaxySpriteObject
{
public:
CDiveSuit(CMap *pmap, Uint32 x, Uint32 y);
......
......@@ -9,7 +9,8 @@
#include "engine/galaxy/ai/ep4/CPlayerDive.h"
#include "CBubbles.h"
namespace galaxy {
namespace galaxy
{
#define A_DOPEFISH_SWIM 0
#define A_DOPEFISH_EAT 2
......@@ -25,7 +26,7 @@ const int DOPE_EAT_TIMER = 50;
CDopeFish::CDopeFish(CMap *pmap, Uint32 x, Uint32 y) :
CSpriteObject(pmap, x, y, OBJ_NONE),
CGalaxySpriteObject(pmap, x, y),
m_eatTimer(0),
m_burped(false)
{
......