Commit 63542a27 authored by Gerhard Stein's avatar Gerhard Stein

Working CG again

parent bfe13dbf
......@@ -163,7 +163,7 @@ void CMapPlayGalaxy::ponder()
{
for( int y=-1 ; y<2 ; y++ )
{
std::shared_ptr<CGalaxySpriteObject> smoke(new galaxy::CSmokePuff( &mMap, posX+(x<<CSF), posY+(y<<CSF) ));
std::shared_ptr<CGalaxySpriteObject> smoke(new galaxy::CSmokePuff( &mMap, posX+(x<<CSF), posY+(y<<CSF), 0 ));
mObjectPtr.push_back( smoke );
}
}
......@@ -357,7 +357,7 @@ bool CMapPlayGalaxy::operator<<(CSaveGameController &savedGame)
// TODO: Be careful here is a bad Null Pointer inside that structure
if(pNewfoe == NULL)
{
pNewfoe = new CGalaxySpriteObject(&mMap, foeID, x, y);
pNewfoe = new CGalaxySpriteObject(&mMap, foeID, x, y, 0);
}
savedGame.decodeData( pNewfoe->dead );
......@@ -537,6 +537,7 @@ void CMapPlayGalaxy::operator<<(boost::property_tree::ptree &levelNode)
auto &spriteNode = levelItem.second;
foeID = spriteNode.get<int>("<xmlattr>.id");
int sprVarID = spriteNode.get<int>("<xmlattr>.Variant", 0);
x = spriteNode.get<int>("<xmlattr>.x");;
y = spriteNode.get<int>("<xmlattr>.y");;
......@@ -545,7 +546,7 @@ void CMapPlayGalaxy::operator<<(boost::property_tree::ptree &levelNode)
// TODO: Be careful here is a bad Null Pointer inside that structure
if(pNewfoe == nullptr)
{
pNewfoe = new CGalaxySpriteObject(&mMap, foeID, x, y);
pNewfoe = new CGalaxySpriteObject(&mMap, foeID, x, y, sprVarID);
}
pNewfoe->dead = spriteNode.get<bool>("dead", false);
......
......@@ -10,7 +10,8 @@
static int spriteOffset;
CGalaxySpriteObject::CGalaxySpriteObject(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar) :
CGalaxySpriteObject::CGalaxySpriteObject(CMap *pmap, const Uint16 foeID,
Uint32 x, Uint32 y, const int sprVar) :
CSpriteObject(pmap, x, y, sprVar),
mFoeID(foeID),
m_ActionTicker(0),
......
......@@ -23,7 +23,7 @@
class CInventory
{
public:
CInventory(const int id);
CInventory(const int id=0);
void reset();
// This function draws the HUD on the Screen
......
......@@ -27,8 +27,8 @@ const unsigned int STARRING_ANIMATION_TIME = 5;
CStunnable::CStunnable( CMap *pmap,
const Uint16 foeID,
Uint32 x, Uint32 y ) :
CGalaxyActionSpriteObject( pmap, foeID, x, y ),
Uint32 x, Uint32 y ) :
CGalaxyActionSpriteObject( pmap, foeID, x, y, 0 ),
m_stunned(false),
m_animation_timer(0),
starTimer(TIME_STAR_SHOWN)
......
......@@ -12,7 +12,7 @@
namespace galaxy {
CPlatform::CPlatform(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
mp_CarriedPlayer(NULL)
{
m_ActionBaseOffset = 0x316A;
......
......@@ -77,14 +77,14 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
if( foe == i )
{
const Uint32 newsprite = 103+2*(i-61);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite, 0);
}
}
// Neuronal-stunner
if( foe == 68 )
{
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127, 0);
}
// Gems
......@@ -93,7 +93,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
if( foe == i )
{
const Uint32 newsprite = 118+2*(i-57);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite, 0);
}
}
......@@ -154,7 +154,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
case 0x09:
//This is the Thunder Cloud
p_newfoe = new galaxy::CThunderCloud(&Map, foe, x, y);
p_newfoe = new galaxy::CThunderCloud(&Map, foe, x, y, 0);
break;
case 0x0A:
......@@ -187,15 +187,15 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
case 0x0F:
// Dope Fish
p_newfoe = new galaxy::CDopeFish(&Map, foe, x, y);
p_newfoe = new galaxy::CDopeFish(&Map, foe, x, y, 0);
break;
case 0x10:
p_newfoe = new galaxy::CSchoolFish(&Map, foe, x, y);
p_newfoe = new galaxy::CSchoolFish(&Map, foe, x, y);
break;
case 0x11:
p_newfoe = new galaxy::CDevilSprite(&Map, foe, x, y);
p_newfoe = new galaxy::CDevilSprite(&Map, foe, x, y );
break;
case 0x12:
......@@ -234,20 +234,20 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
// case 0x1A: This is vertical blocker, not a sprite to load!!
case 0x1B: // Plat starts moving up
p_newfoe = new galaxy::CPlatformVertical(&Map, foe, x, y, UP, 0x316A); break;
p_newfoe = new galaxy::CPlatformVertical(&Map, foe, x, y, UP, 0x316A, 0); break;
case 0x1D: // Plat starts moving down
p_newfoe = new galaxy::CPlatformVertical(&Map, foe, x, y, DOWN, 0x316A); break;
p_newfoe = new galaxy::CPlatformVertical(&Map, foe, x, y, DOWN, 0x316A, 0); break;
case 0x1C: // plat moves to the RIGHT
p_newfoe = new galaxy::CPlatformHorizontal(&Map, foe, RIGHT, x, y, 0x316A); break;
p_newfoe = new galaxy::CPlatformHorizontal(&Map, foe, RIGHT, x, y, 0x316A, 0); break;
case 0x1E: // plat moves to the LEFT
p_newfoe = new galaxy::CPlatformHorizontal(&Map, foe, LEFT, x, y, 0x316A); break;
p_newfoe = new galaxy::CPlatformHorizontal(&Map, foe, LEFT, x, y, 0x316A, 0); break;
//case 0x1F: break; // Platform-Blocker
case 0x20:
p_newfoe = new galaxy::CPlatformDrop(&Map, foe, x, y, 0x316A); break;
p_newfoe = new galaxy::CPlatformDrop(&Map, foe, x, y, 0x316A, 0); break;
case 0x21:
// Place Miragia in Episode 4 on the Map
......@@ -260,7 +260,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
{
if(inventory.Item.m_bullets < 5)
{
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127, 0);
break;
}
}
......@@ -268,7 +268,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
case 0x23:
// Place Miragia in Episode 4 on the Map
p_newfoe = new galaxy::CDiveSuit(&Map, foe, x, y);
p_newfoe = new galaxy::CDiveSuit(&Map, foe, x, y, 0);
break;
//case 0x24: break; // Seem to be an unused keen Sprite. Not sure though
......@@ -357,20 +357,20 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
case 0x35 ... 0x38:
// Dart guns
if(foe == 0x35)
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, UP, 256);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, UP, 256, 0);
else if(foe == 0x36)
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, RIGHT, CENTER, 260);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, RIGHT, CENTER, 260, 0);
else if(foe == 0x37)
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, DOWN, 258);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, DOWN, 258, 0);
else
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, LEFT, CENTER, 262);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, LEFT, CENTER, 262, 0);
break;
case 0x58: if( difficulty < HARD ) break;
case 0x57: if( difficulty < NORMAL ) break;
// Dope Fish
p_newfoe = new galaxy::CDopeFish(&Map, foe, x, y);
p_newfoe = new galaxy::CDopeFish(&Map, foe, x, y, 0);
break;
......
......@@ -19,7 +19,7 @@ const int A_ARACHNUT_STUNNED = 4;
const int WALK_SPEED = 45;
CArachnut::CArachnut(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y)
CGalaxySpriteObject(pmap, foeID, x, y, 0)
{
setupGalaxyObjectOnMap( 0x2378, A_ARACHNUT_WALK );
xDirection = LEFT;
......
......@@ -19,7 +19,7 @@ const int BERKELOID_TIME = 5;
CBerkeloid::CBerkeloid(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
mTimer(0),
mpProcessState(nullptr)
{
......@@ -152,7 +152,7 @@ const int A_FLAME_LANDED = 2;
const int FLAME_INERTIAX = 150;
CBerkFlame::CBerkFlame(CMap *pmap, Uint32 x, Uint32 y, const int xDir) :
CGalaxySpriteObject(pmap, 0, x, y),
CGalaxySpriteObject(pmap, 0, x, y, 0),
mpProcessState(NULL)
{
mActionMap[A_FLAME_THROWN] = &CBerkFlame::processThrown;
......
......@@ -23,7 +23,7 @@ const int CHANCETOFLY = 50;
const int CHANCETOSTAND = 50;
CBlueBird::CBlueBird(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
mTimer(0)
{
mActionMap[A_EAGLE_HATCHED] = &CBlueBird::processHatched;
......
......@@ -14,7 +14,7 @@ namespace galaxy {
const int BUBBLE_FLOAT_SPEED = 40;
CBubbles::CBubbles(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const bool bigbubble) :
CGalaxySpriteObject(pmap, foeID, x, y)
CGalaxySpriteObject(pmap, foeID, x, y, 0)
{
if(bigbubble)
......
......@@ -26,7 +26,7 @@ int NumberToRescue;
CCouncilMember::CCouncilMember(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
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, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
m_timer(0)
{
setupGalaxyObjectOnMap(0x37A0, A_SPRITE_MOVE);
......@@ -113,7 +113,7 @@ void CDevilSprite::processShoot()
int x_coord = getXMidPos();
x_coord += (xDirection == LEFT) ? -(8<<STC) : +(8<<STC);
CEnemyShot *Spark = new CEnemyShot(mp_Map, 0, x_coord, getYMidPos()-(8<<STC),
0x3818, xDirection, 0, 100);
0x3818, xDirection, 0, 100, 0);
g_pBehaviorEngine->m_EventList.add( new EventSpawnObject( Spark ) );
}
......
......@@ -10,8 +10,8 @@
namespace galaxy {
CDiveSuit::CDiveSuit(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CDiveSuit::CDiveSuit(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar) :
CGalaxySpriteObject(pmap, foeID, x, y, sprVar),
taken(false)
{
sprite = 306;
......
......@@ -15,7 +15,7 @@ namespace galaxy {
class CDiveSuit: public CGalaxySpriteObject
{
public:
CDiveSuit(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y);
CDiveSuit(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar);
private:
void process();
......
......@@ -27,8 +27,8 @@ const int CSF_DISTANCE_TO_FOLLOW = 20<<CSF;
const int DOPE_EAT_TIMER = 50;
CDopeFish::CDopeFish(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CDopeFish::CDopeFish(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar) :
CGalaxySpriteObject(pmap, foeID, x, y, sprVar),
m_eatTimer(0),
m_burped(false)
{
......
......@@ -15,7 +15,7 @@ namespace galaxy {
class CDopeFish : public CGalaxySpriteObject
{
public:
CDopeFish(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y);
CDopeFish(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar);
// When Dopefish gets touched by something
void getTouchedBy(CSpriteObject &theObject);
......
......@@ -22,7 +22,7 @@ const int A_EGG_SHELL3 = 4;
CEgg::CEgg(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y)
CGalaxySpriteObject(pmap, foeID, x, y, 0)
{
setupGalaxyObjectOnMap(0x2120, A_EGG_NORMAL);
}
......
......@@ -12,7 +12,7 @@
namespace galaxy {
CFoot::CFoot(CMap *pmap, const Uint16 foeID, const int actionID, const Uint32 x, const Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y)
CGalaxySpriteObject(pmap, foeID, x, y, 0)
{
setupGalaxyObjectOnMap(actionID, 0);
xDirection = RIGHT;
......
......@@ -11,7 +11,7 @@
namespace galaxy {
CInchWorm::CInchWorm(CMap *pmap, const Uint16 foeID, const Uint32 x, const Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
mInchWormContacts(0)
{
setupGalaxyObjectOnMap(0x2E9A, 0);
......
......@@ -14,7 +14,7 @@ const int LINDSEY_MOVE_SPEED = 20;
const int LINDSEY_MOVE_TIME = 60;
CLindsey::CLindsey(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
m_timer(0),
prepareToVanish(false)
{
......
......@@ -20,7 +20,7 @@ const int MUSHROOM_LOW_INERTIA = 90;
const int MUSHROOM_HIGH_INERTIA = 148;
CMadMushroom::CMadMushroom(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
jumpcounter(0)
{
setupGalaxyObjectOnMap(0x20E4, A_MUSHROOM_BOUNCE);
......
......@@ -15,7 +15,7 @@ const Uint16 ANIMATION_TIME = 32;
const Uint16 WAIT_BETWEEN_FADE_TIME = 8;
CMiragia::CMiragia(CMap *pmap, const Uint16 foeID, const VectorD2<Uint32> &Location) :
CGalaxySpriteObject(pmap, foeID, Location.x, Location.y),
CGalaxySpriteObject(pmap, foeID, Location.x, Location.y, 0),
m_step(0),
m_fade(FADE_IN),
m_waittime(WAIT_BETWEEN_FADE_TIME),
......
......@@ -60,7 +60,7 @@ void CPoisonSlug::processCrawling()
m_timer = 0;
setAction( A_SLUG_POOING );
playSound( SOUND_SLUG_DEFECATE );
CSlugSlime *slime = new CSlugSlime(mp_Map, 0, getXMidPos(), getYDownPos()-(1<<CSF));
CSlugSlime *slime = new CSlugSlime(mp_Map, 0, getXMidPos(), getYDownPos()-(1<<CSF), 0);
g_pBehaviorEngine->m_EventList.add( new EventSpawnObject( slime ) );
xDirection = -xDirection;
......
......@@ -17,7 +17,7 @@ const int CSF_DISTANCE_TO_FOLLOW_TOLERANCE = 1<<CSF;
const int FISH_SPEED = 40;
CSchoolFish::CSchoolFish(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CGalaxySpriteObject(pmap, foeID, x, y, 0),
m_moveSpeed(0)
{
setupGalaxyObjectOnMap(0x3692, A_DOPEFISHFOOD_NORMAL);
......
......@@ -17,7 +17,7 @@ namespace galaxy {
const int FLY_SPEED = 50;
CSkypest::CSkypest(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y)
CGalaxySpriteObject(pmap, foeID, x, y, 0)
{
setupGalaxyObjectOnMap(0x2486, A_SKYPEST_FLY);
mp_processState = &CSkypest::processFly;
......
......@@ -16,8 +16,8 @@ const int A_SLUGPOISON_NORMAL = 0;
const int A_SLUGPOISON_FADE = 1;
const int POISON_TIME = 1;
CSlugSlime::CSlugSlime(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CSlugSlime::CSlugSlime(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar) :
CGalaxySpriteObject(pmap, foeID, x, y, sprVar),
m_timer(0)
{
setupGalaxyObjectOnMap(0x20A8, A_SLUGPOISON_NORMAL);
......
......@@ -21,7 +21,7 @@ class CSlugSlime : public CGalaxySpriteObject
public:
/** Standard Constructor for the slug poo */
CSlugSlime(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y);
CSlugSlime(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar);
/** Main Process cycle */
void process();
......
......@@ -2,8 +2,8 @@
namespace galaxy {
CSmokePuff::CSmokePuff(CMap *pmap, const Uint32 x, const Uint32 y) :
CGalaxySpriteObject(pmap, 0, x, y)
CSmokePuff::CSmokePuff(CMap *pmap, const Uint32 x, const Uint32 y, const int sprVar) :
CGalaxySpriteObject(pmap, 0, x, y, sprVar)
{
setupGalaxyObjectOnMap(0x2E22, 0);
xDirection = LEFT;
......@@ -19,4 +19,4 @@ void CSmokePuff::process()
return;
}
};
\ No newline at end of file
};
......@@ -9,7 +9,7 @@ namespace galaxy {
class CSmokePuff : public CGalaxySpriteObject
{
public:
CSmokePuff(CMap *pmap, const Uint32 x, const Uint32 y);
CSmokePuff(CMap *pmap, const Uint32 x, const Uint32 y, const int sprVar);
void process();
};
......
......@@ -26,8 +26,8 @@ const int STRIKE_TIME = 120;
const int TIME_TO_STRIKE_1 = 30;
const int TIME_TO_STRIKE_2 = 90;
CThunderCloud::CThunderCloud(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
CThunderCloud::CThunderCloud(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar) :
CGalaxySpriteObject(pmap, foeID, x, y, sprVar),
mTimer(0),
mpBolt(NULL),
mSecondTry(false)
......@@ -103,7 +103,7 @@ bool CThunderCloud::isNearby(CSpriteObject &theObject)
mSecondTry = !mSecondTry;
setAction(A_CLOUD_STRIKING);
playSound(SOUND_THUNDERCLOUD_STRIKE);
mpBolt = new CThunderBolt( mp_Map, getXLeftPos() + (12<<STC), getYDownPos() + (32<<STC) );
mpBolt = new CThunderBolt( mp_Map, getXLeftPos() + (12<<STC), getYDownPos() + (32<<STC), mSprVar );
g_pBehaviorEngine->m_EventList.spawnObj( mpBolt );
}
}
......@@ -182,8 +182,8 @@ void CThunderCloud::process()
*/
const int A_LIGHTNING_STRIKE = 0;
CThunderBolt::CThunderBolt(CMap *pmap,Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, 0, x, y)
CThunderBolt::CThunderBolt(CMap *pmap, Uint32 x, Uint32 y, const int sprVar) :
CGalaxySpriteObject(pmap, 0, x, y, sprVar)
{
setupGalaxyObjectOnMap(0x2A44, A_LIGHTNING_STRIKE);
inhibitfall = false;
......
......@@ -17,7 +17,7 @@ namespace galaxy
class CThunderBolt: public CGalaxySpriteObject
{
public:
CThunderBolt(CMap *pmap, Uint32 x, Uint32 y);
CThunderBolt(CMap *pmap, Uint32 x, Uint32 y, const int sprVar);
void getTouchedBy(CSpriteObject &theObject);
void process();
......@@ -29,7 +29,7 @@ public:
class CThunderCloud: public CGalaxySpriteObject
{
public:
CThunderCloud(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y);
CThunderCloud(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar);
void process();
......
......@@ -16,7 +16,7 @@ namespace galaxy {
const int MINE_SPEED = 20;
CWaterMine::CWaterMine(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const direction_t xDir, const bool vertical) :
CGalaxySpriteObject(pmap, foeID, x, y)
CGalaxySpriteObject(pmap, foeID, x, y, 0)
{
yDirection = 0;
xDirection = xDir;
......
......@@ -61,7 +61,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp6::addFoe(CMap &Map, word foe, size_t x,
if( foe == i )
{
const Uint32 newsprite = 118+2*(i-0x39);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite, 0);
}
}
......@@ -71,14 +71,14 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp6::addFoe(CMap &Map, word foe, size_t x,
if( foe == i )
{
const Uint32 newsprite = 104+2*(i-0x3D);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, newsprite, 0);
}
}
// Neuronal-stunner
if( foe == 0x44 )
{
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127, 0);
}
// Neuronal-stunner which appears if you are low on bullets
......@@ -88,7 +88,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp6::addFoe(CMap &Map, word foe, size_t x,
{
if(inventory.Item.m_bullets < 5)
{
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127);
p_newfoe = new galaxy::CSpriteItem(&Map, foe, x, y, 127, 0);
break;
}
}
......@@ -153,41 +153,41 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp6::addFoe(CMap &Map, word foe, size_t x,
case 0x1B:
p_newfoe = new galaxy::CPlatformVertical( &Map, foe, x, y, UP, 0x1DD8 );
p_newfoe = new galaxy::CPlatformVertical( &Map, foe, x, y, UP, 0x1DD8, 0 );
break;
case 0x1C:
p_newfoe = new galaxy::CPlatformHorizontal( &Map, foe, RIGHT, x, y, 0x1DD8 );
p_newfoe = new galaxy::CPlatformHorizontal( &Map, foe, RIGHT, x, y, 0x1DD8, 0 );
break;
case 0x1D:
p_newfoe = new galaxy::CPlatformVertical( &Map, foe, x, y, DOWN, 0x1DD8 );
p_newfoe = new galaxy::CPlatformVertical( &Map, foe, x, y, DOWN, 0x1DD8, 0 );
break;
case 0x1E:
p_newfoe = new galaxy::CPlatformHorizontal( &Map, foe, LEFT, x, y, 0x1DD8 );
p_newfoe = new galaxy::CPlatformHorizontal( &Map, foe, LEFT, x, y, 0x1DD8, 0 );
break;
case 0x20:
p_newfoe = new galaxy::CPlatformDrop( &Map, foe, x, y, 0x1E14); break;
p_newfoe = new galaxy::CPlatformDrop( &Map, foe, x, y, 0x1E14, 0); break;
case 0x21: if (difficulty >= NORMAL) break;
case 0x22: if (difficulty >= HARD) break;
case 0x23:
p_newfoe = new galaxy::CPlatformSit( &Map, foe, x, y, 0x1E14); break;
p_newfoe = new galaxy::CPlatformSit( &Map, foe, x, y, 0x1E14, 0); break;
// Var Plats red color
case 0x24:
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, CENTER, UP, 0x1E6E); break;
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, CENTER, UP, 0x1E6E, 0); break;
case 0x25:
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, RIGHT, CENTER, 0x1E6E); break;
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, RIGHT, CENTER, 0x1E6E, 0); break;
case 0x26:
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, CENTER, DOWN, 0x1E6E); break;
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, CENTER, DOWN, 0x1E6E, 0); break;
case 0x27:
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, LEFT, CENTER, 0x1E6E); break;
p_newfoe = new galaxy::CVarPlatform( &Map, foe, x, y, LEFT, CENTER, 0x1E6E, 0); break;
case 0x28:
p_newfoe = new galaxy::CPlatformMoveAway( &Map, foe, x, y, CENTER, LEFT, 0x1EC8);
p_newfoe = new galaxy::CPlatformMoveAway( &Map, foe, x, y, CENTER, LEFT, 0x1EC8, 0);
break;
case 0x2B: if( difficulty < HARD ) break;
......@@ -211,26 +211,26 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp6::addFoe(CMap &Map, word foe, size_t x,
break;
case 0x35: if ( difficulty < NORMAL ) break;
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, UP, 130);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, UP, 130, 0);
break;
case 0x36: if ( difficulty < NORMAL ) break;
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, RIGHT, CENTER, 130);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, RIGHT, CENTER, 130, 0);
break;
case 0x37: if ( difficulty < NORMAL ) break;
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, DOWN, 130);
p_newfoe = new galaxy::AutoGun(&Map, foe, x, y, CENTER, DOWN, 130, 0);
break;
case 0x38: if ( difficulty < NORMAL ) break