Commit 4ca8e4da authored by Gerhard Stein's avatar Gerhard Stein

Classes cleanups

parent 33e3821f
......@@ -19,7 +19,7 @@
#include "SmartPointer.h"
#include "CVec.h"
class CSpriteObject;
class CGalaxySpriteObject;
// TODO: These Event Interfaces must go to another file. Those are Inlevel Galaxy Events
......@@ -130,9 +130,9 @@ struct EventSendSelectionDialogMsg : CEvent {
*/
struct EventSpawnObject : CEvent {
const CSpriteObject* pObject;
const CGalaxySpriteObject* pObject;
EventSpawnObject( const CSpriteObject* pObject ) :
EventSpawnObject( const CGalaxySpriteObject* pObject ) :
pObject(pObject) {}
};
......
......@@ -27,14 +27,14 @@ CMapPlayGalaxy(ExeFile, Inventory, Cheatmode)
void CLevelPlay::loadMap(const int level)
{
// Load the World map level.
CVorticonMapLoaderGalaxy MapLoader(m_ExeFile, m_ObjectPtr, m_Inventory, m_Cheatmode);
CMapLoaderGalaxy MapLoader(mExeFile, mObjectPtr, mInventory, mCheatmode);
MapLoader.loadMap( m_Map, level );
MapLoader.loadMap( mMap, level );
// Load the Background Music
g_pMusicPlayer->stop();
if(!g_pMusicPlayer->load(m_ExeFile, level))
if( !g_pMusicPlayer->load(mExeFile, level) )
g_pLogFile->textOut("Warning: The music cannot be played. Check that all the files have been correctly copied!");
else
g_pMusicPlayer->play();
......@@ -43,7 +43,7 @@ void CLevelPlay::loadMap(const int level)
void CLevelPlay::reloadLevel()
{
loadMap( m_Map.getLevel() );
loadMap( mMap.getLevel() );
}
bool CLevelPlay::loadLevel(const Uint16 level)
......@@ -57,7 +57,7 @@ bool CLevelPlay::loadLevel(const Uint16 level)
CEventContainer& EventContainer = g_pBehaviorEngine->m_EventList;
EventContainer.add( new EventSendBitmapDialogMsg(106, loading_text, LEFT) );
m_Map.drawAll();
mMap.drawAll();
return true;
}
......
......@@ -51,8 +51,8 @@
namespace galaxy
{
CVorticonMapLoaderGalaxy::CVorticonMapLoaderGalaxy(CExeFile &ExeFile,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtr,
CMapLoaderGalaxy::CMapLoaderGalaxy(CExeFile &ExeFile,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtr,
CInventory &Inventory, stCheat &Cheatmode):
m_ExeFile(ExeFile),
m_ObjectPtr(ObjectPtr),
......@@ -61,7 +61,7 @@ m_Cheatmode(Cheatmode)
{}
// Gets returns the address of the datablock of the exe file, in where the
size_t CVorticonMapLoaderGalaxy::getMapheadOffset()
size_t CMapLoaderGalaxy::getMapheadOffset()
{
size_t offset = 0;
......@@ -77,7 +77,7 @@ size_t CVorticonMapLoaderGalaxy::getMapheadOffset()
return offset;
}
bool CVorticonMapLoaderGalaxy::gotoSignature(std::ifstream &MapFile)
bool CMapLoaderGalaxy::gotoSignature(std::ifstream &MapFile)
{
char c;
while(!MapFile.eof())
......@@ -101,7 +101,7 @@ bool CVorticonMapLoaderGalaxy::gotoSignature(std::ifstream &MapFile)
return false;
}
void CVorticonMapLoaderGalaxy::unpackPlaneData(std::ifstream &MapFile,
void CMapLoaderGalaxy::unpackPlaneData(std::ifstream &MapFile,
CMap &Map, size_t PlaneNumber,
longword offset, longword length,
word magic_word)
......@@ -154,7 +154,7 @@ void CVorticonMapLoaderGalaxy::unpackPlaneData(std::ifstream &MapFile,
}
bool CVorticonMapLoaderGalaxy::loadMap(CMap &Map, Uint8 level)
bool CMapLoaderGalaxy::loadMap(CMap &Map, Uint8 level)
{
// Get the MAPHEAD Location from within the Exe File
......@@ -281,7 +281,7 @@ bool CVorticonMapLoaderGalaxy::loadMap(CMap &Map, Uint8 level)
* @brief This will setup the enemies on the map. They are pushed in a objects vector,
* so they can interact all the time
*/
void CVorticonMapLoaderGalaxy::spawnFoes(CMap &Map)
void CMapLoaderGalaxy::spawnFoes(CMap &Map)
{
word *start_data = Map.getData(2);
word *data_ptr;
......@@ -358,14 +358,14 @@ const int DIVE_SUIT = 35;
/**
* @brief Loads a foe given by the coordiantes
*/
void CVorticonMapLoaderGalaxy::addFoe(CMap &Map, word foe, size_t x, size_t y)
void CMapLoaderGalaxy::addFoe(CMap &Map, word foe, size_t x, size_t y)
{
// TODO: Split this function into the one meant for the map, because some enemies are loaded on that WM
// that shouldn't
x <<= CSF;
y <<= CSF;
CSpriteObject *p_newfoe = NULL;
CGalaxySpriteObject *p_newfoe = NULL;
VectorD2<Uint32> Location(x,y);
// Point Item Sprites (Candies, etc...)
......
......@@ -13,7 +13,7 @@
#include "common/CMap.h"
#include "common/Cheat.h"
#include "engine/galaxy/CInventory.h"
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
#include "SmartPointer.h"
#include <vector>
......@@ -23,11 +23,11 @@
namespace galaxy
{
class CVorticonMapLoaderGalaxy
class CMapLoaderGalaxy
{
public:
CVorticonMapLoaderGalaxy(CExeFile &ExeFile,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtr,
CMapLoaderGalaxy(CExeFile &ExeFile,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtr,
CInventory &Inventory, stCheat &Cheatmode);
size_t getMapheadOffset();
bool gotoSignature(std::ifstream &MapFile);
......@@ -42,7 +42,7 @@ private:
word magic_word);
CExeFile &m_ExeFile;
std::vector< SmartPointer<CSpriteObject> > &m_ObjectPtr;
std::vector< SmartPointer<CGalaxySpriteObject> > &m_ObjectPtr;
CInventory &m_Inventory;
stCheat &m_Cheatmode;
};
......
......@@ -10,31 +10,31 @@
#include "common/CBehaviorEngine.h"
CMapPlayGalaxy::CMapPlayGalaxy(CExeFile &ExeFile, CInventory &Inventory, stCheat &Cheatmode) :
m_active(false),
m_ExeFile(ExeFile),
m_Inventory(Inventory),
mp_option(g_pBehaviorEngine->m_option),
m_Cheatmode(Cheatmode)
mActive(false),
mExeFile(ExeFile),
mInventory(Inventory),
mpOption(g_pBehaviorEngine->m_option),
mCheatmode(Cheatmode)
{}
bool CMapPlayGalaxy::isActive()
{ return m_active; }
{ return mActive; }
void CMapPlayGalaxy::setActive(bool value)
{
m_active = value;
mActive = value;
if(m_active)
if(mActive)
{
m_Map.drawAll();
mMap.drawAll();
// Set Scrollbuffer
g_pVideoDriver->updateScrollBuffer(m_Map);
g_pVideoDriver->updateScrollBuffer(mMap);
}
}
......@@ -46,7 +46,7 @@ void CMapPlayGalaxy::setActive(bool value)
*/
std::string CMapPlayGalaxy::getLevelName()
{
return m_Map.getLevelName();
return mMap.getLevelName();
}
......@@ -58,17 +58,17 @@ std::string CMapPlayGalaxy::getLevelName()
void CMapPlayGalaxy::process(const bool msgboxactive)
{
// Check if the engine need to be paused
const bool pause = m_Inventory.showStatus() || msgboxactive;
const bool pause = mInventory.showStatus() || msgboxactive;
// Animate the tiles of the map
m_Map.m_animation_enabled = !pause;
m_Map.animateAllTiles();
mMap.m_animation_enabled = !pause;
mMap.animateAllTiles();
if(!pause)
{
for(size_t i=0 ; i<m_ObjectPtr.size() ; i++)
for(size_t i=0 ; i<mObjectPtr.size() ; i++)
{
CSpriteObject* p_Object = m_ObjectPtr[i].get();
CSpriteObject* p_Object = mObjectPtr[i].get();
// If the Player is not only dying, but also lost it's existence, meaning he got out of the screen
// how the death-message or go gameover.
......@@ -92,9 +92,9 @@ void CMapPlayGalaxy::process(const bool msgboxactive)
p_Object->processEvents();
// Check collision between objects
for(size_t j=0 ; j<m_ObjectPtr.size() ; j++)
for(size_t j=0 ; j<mObjectPtr.size() ; j++)
{
CSpriteObject *theOtherObj = m_ObjectPtr[j].get();
CSpriteObject *theOtherObj = mObjectPtr[j].get();
if( theOtherObj != p_Object )
{
p_Object->isNearby(*theOtherObj);
......@@ -108,13 +108,13 @@ void CMapPlayGalaxy::process(const bool msgboxactive)
g_pVideoDriver->mDrawTasks.add( new BlitScrollSurfaceTask() );
std::vector< SmartPointer <CSpriteObject> >::reverse_iterator obj;
std::vector< SmartPointer <CGalaxySpriteObject> >::reverse_iterator obj;
// Draw all the sprites without player
// The player sprites are drawn as last
galaxy::CPlayerBase *player = NULL;
for( obj=m_ObjectPtr.rbegin() ;
obj!=m_ObjectPtr.rend() ; obj++ )
for( obj=mObjectPtr.rbegin() ;
obj!=mObjectPtr.rend() ; obj++ )
{
if( galaxy::CPlayerBase* newplayer = dynamic_cast<galaxy::CPlayerBase*>(obj->get()) )
......@@ -133,23 +133,23 @@ void CMapPlayGalaxy::process(const bool msgboxactive)
}
// Draw masked tiles here!
m_Map.drawForegroundTiles();
mMap.drawForegroundTiles();
for( obj=m_ObjectPtr.rbegin() ;
obj!=m_ObjectPtr.rend() ; obj++ )
for( obj=mObjectPtr.rbegin() ;
obj!=mObjectPtr.rend() ; obj++ )
{
if(!(*obj)->honorPriority)
(*obj)->draw();
}
if(mp_option[OPT_HUD].value )
m_Inventory.drawHUD();
if(mpOption[OPT_HUD].value )
mInventory.drawHUD();
CEventContainer &EventContainer = g_pBehaviorEngine->m_EventList;
if( EventSpawnObject *ev = EventContainer.occurredEvent<EventSpawnObject>() )
{
m_ObjectPtr.push_back( const_cast<CSpriteObject*>(ev->pObject) );
mObjectPtr.push_back( const_cast<CGalaxySpriteObject*>(ev->pObject) );
EventContainer.pop_Event();
}
......@@ -159,6 +159,39 @@ void CMapPlayGalaxy::process(const bool msgboxactive)
void CMapPlayGalaxy::operator>>(CSaveGameController &savedGame)
{
size_t size = mObjectPtr.size();
// save the number of objects on screen
savedGame.encodeData(size);
std::vector< SmartPointer<CGalaxySpriteObject> >::iterator it = mObjectPtr.begin();
for( ; it != mObjectPtr.end() ; it++ )
{
// save all the objects states
savedGame.encodeData( (*it)->getXPosition() );
savedGame.encodeData( (*it)->getYPosition() );
savedGame.encodeData( (*it)->dead );
savedGame.encodeData( (*it)->onscreen );
savedGame.encodeData( (*it)->hasbeenonscreen );
savedGame.encodeData( (*it)->exists );
savedGame.encodeData( (*it)->blockedd );
savedGame.encodeData( (*it)->blockedu );
savedGame.encodeData( (*it)->blockedl );
savedGame.encodeData( (*it)->blockedr );
savedGame.encodeData( (*it)->mHealthPoints );
savedGame.encodeData( (*it)->canbezapped );
savedGame.encodeData( (*it)->cansupportplayer );
savedGame.encodeData( (*it)->inhibitfall );
savedGame.encodeData( (*it)->honorPriority );
savedGame.encodeData( (*it)->sprite );
}
savedGame.encodeData( mActive );
// Save the map_data as it is left
savedGame.encodeData(mMap.m_width);
savedGame.encodeData(mMap.m_height);
savedGame.addData( reinterpret_cast<byte*>(mMap.getForegroundData()),
2*mMap.m_width*mMap.m_height );
}
// This is for loading the game
......
......@@ -12,10 +12,10 @@
#ifndef CMAPPLAYGALAXY_H_
#define CMAPPLAYGALAXY_H_
#include "common/CSpriteObject.h"
#include "common/Cheat.h"
#include "fileio/CExeFile.h"
#include "engine/galaxy/CInventory.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
#include "engine/galaxy/dialog/CMessageBoxGalaxy.h"
#include "common/CBehaviorEngine.h"
#include "CMapLoaderGalaxy.h"
......@@ -49,14 +49,14 @@ public:
protected:
std::vector< SmartPointer<CSpriteObject> > m_ObjectPtr;
bool m_active;
CMap m_Map;
CExeFile &m_ExeFile;
CInventory &m_Inventory;
stOption *mp_option;
stCheat &m_Cheatmode;
std::vector< SmartPointer<CGalaxySpriteObject> > mObjectPtr;
bool mActive;
CMap mMap;
CExeFile &mExeFile;
CInventory &mInventory;
stOption *mpOption;
stCheat &mCheatmode;
};
#endif /* CMAPPLAYGALAXY_H_ */
......@@ -34,15 +34,26 @@ m_SavedGame(SavedGame)
bool CPlayGameGalaxy::loadGameState()
{
return false;
CSaveGameController &savedGame = *(gpSaveGameController);
/// Save the Game in the CSavedGame object
// store the episode, level and difficulty
savedGame.decodeData(m_Episode);
savedGame.decodeData(m_Level);
savedGame.decodeData(g_pBehaviorEngine->mDifficulty);
// Save number of Players
savedGame.decodeData(m_NumPlayers);
m_Inventory << savedGame;
m_WorldMap << savedGame;
m_LevelPlay << savedGame;
return savedGame.load();
}
bool CPlayGameGalaxy::saveGameState()
{
//size_t i;
//size_t size;
CSaveGameController &savedGame = *(gpSaveGameController);
/// Save the Game in the CSavedGame object
......@@ -58,53 +69,6 @@ bool CPlayGameGalaxy::saveGameState()
m_WorldMap >> savedGame;
m_LevelPlay >> savedGame;
/*// Now save the inventory of every player
for( i=0 ; i<m_NumPlayers ; i++ )
{
savedGame.encodeData(m_Player[i].getXPosition());
savedGame.encodeData(m_Player[i].getYPosition());
savedGame.encodeData(m_Player[i].blockedd);
savedGame.encodeData(m_Player[i].blockedu);
savedGame.encodeData(m_Player[i].blockedl);
savedGame.encodeData(m_Player[i].blockedr);
savedGame.encodeData(m_Player[i].inventory);
}
size = m_Object.size();
// save the number of objects on screen
savedGame.encodeData(size);
for( i=0 ; i<size ; i++)
{
// save all the objects states
savedGame.encodeData(m_Object[i]->m_type);
savedGame.encodeData(m_Object[i]->getXPosition());
savedGame.encodeData(m_Object[i]->getYPosition());
savedGame.encodeData(m_Object[i]->dead);
savedGame.encodeData(m_Object[i]->onscreen);
savedGame.encodeData(m_Object[i]->hasbeenonscreen);
savedGame.encodeData(m_Object[i]->exists);
savedGame.encodeData(m_Object[i]->blockedd);
savedGame.encodeData(m_Object[i]->blockedu);
savedGame.encodeData(m_Object[i]->blockedl);
savedGame.encodeData(m_Object[i]->blockedr);
savedGame.encodeData(m_Object[i]->mHealthPoints);
savedGame.encodeData(m_Object[i]->canbezapped);
savedGame.encodeData(m_Object[i]->cansupportplayer);
savedGame.encodeData(m_Object[i]->inhibitfall);
savedGame.encodeData(m_Object[i]->honorPriority);
savedGame.encodeData(m_Object[i]->sprite);
}
// Save the map_data as it is left
savedGame.encodeData(mMap->m_width);
savedGame.encodeData(mMap->m_height);
savedGame.addData( reinterpret_cast<byte*>(mMap->getForegroundData()),
2*mMap->m_width*mMap->m_height );
// store completed levels
savedGame.addData( (byte*)(mp_level_completed), MAX_LEVELS_VORTICON );*/
return savedGame.save();
}
......
......@@ -19,15 +19,15 @@ CMapPlayGalaxy(ExeFile, Inventory, Cheatmode)
void CWorldMap::init()
{
// Load the World map level.
CVorticonMapLoaderGalaxy MapLoader(m_ExeFile, m_ObjectPtr, m_Inventory, m_Cheatmode);
CMapLoaderGalaxy MapLoader(mExeFile, mObjectPtr, mInventory, mCheatmode);
MapLoader.loadMap(m_Map, 0); // Is it a Map Level?
MapLoader.loadMap(mMap, 0); // Is it a Map Level?
const std::string loading_text = g_pBehaviorEngine->getString("WORLDMAP_LOAD_TEXT");
CEventContainer& EventContainer = g_pBehaviorEngine->m_EventList;
EventContainer.add( new EventSendBitmapDialogMsg(106, loading_text, LEFT) );
m_Map.drawAll();
mMap.drawAll();
}
......@@ -37,7 +37,7 @@ void CWorldMap::init()
void CWorldMap::loadAndPlayMusic()
{
g_pMusicPlayer->stop();
if(g_pMusicPlayer->load(m_ExeFile, 0))
if(g_pMusicPlayer->load(mExeFile, 0))
g_pMusicPlayer->play();
}
......
......@@ -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),
CGalaxySpriteObject(pmap, Location.x, Location.y),
m_location(Location),
m_destination(Destination),
m_baseframe(FLYING_BASEFRAME),
......
......@@ -11,12 +11,13 @@
#ifndef CFLAG_H_
#define CFLAG_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
#include "CVec.h"
namespace galaxy {
class CFlag : public CSpriteObject {
class CFlag : public CGalaxySpriteObject
{
public:
CFlag(CMap *pmap, const VectorD2<Uint32> &Location,
const VectorD2<Uint32> &Destination);
......
......@@ -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)
CGalaxySpriteObject(pmap, x, y)
{
m_timer = 0;
sprite = l_sprite-124;
......
......@@ -8,20 +8,22 @@
#ifndef CITEMEFFECT_H_
#define CITEMEFFECT_H_
#include "common/CSpriteObject.h"
#include "engine/galaxy/CGalaxySpriteObject.h"
namespace galaxy {
// Array of chunk numbers for first frames of sprite items (keys, guns, point items)
// All these items have two frames only
const int sprite_item_pics[] = {
const int sprite_item_pics[] =
{
242, 246, 248, 250, /* Keygems */
227, 229, 231, 233, 235, 237, /* Point items */
239, 251 /* lifewater and Neural stunner */
};
const int got_sprite_item_pics[] = {
const int got_sprite_item_pics[] =
{
250, 250, 250, 250, // Got gem sprite
219, 220, 221, 222, 223, 224, // 100,200,500,1000,2000,5000 pt sprites
225, 226 // 1Up and got raygun sprites
......@@ -33,7 +35,8 @@ enum item_effect_type
ANIMATE
};
class CItemEffect : public CSpriteObject {
class CItemEffect : public CGalaxySpriteObject
{
public:
CItemEffect(CMap *pmap, Uint32 x, Uint32 y, Uint16 l_sprite, item_effect_type ieffect = FLOAT);
void process();
......
......@@ -17,7 +17,7 @@ CPlayerBase::CPlayerBase(
CMap *pmap,
Uint32 x,
Uint32 y,
std::vector< SmartPointer<CSpriteObject> >& ObjectPtrs,
std::vector< SmartPointer<CGalaxySpriteObject> >& ObjectPtrs,
direction_t facedir,
CInventory &l_Inventory,
stCheat &Cheatmode) :
......
......@@ -40,7 +40,7 @@ public:
CPlayerBase(CMap *pmap,
Uint32 x,
Uint32 y,
std::vector< SmartPointer<CSpriteObject> >& ObjectPtrs,
std::vector< SmartPointer<CGalaxySpriteObject> >& ObjectPtrs,
direction_t facedir,
CInventory &l_Inventory,
stCheat &Cheatmode);
......@@ -95,7 +95,7 @@ protected:
unsigned short mPlayerNum;
std::vector< SmartPointer<CSpriteObject> >& m_ObjectPtrs;
std::vector< SmartPointer<CGalaxySpriteObject> >& m_ObjectPtrs;
Sint16 m_playcontrol[PA_MAX_ACTIONS];
int m_timer;
......
......@@ -34,7 +34,7 @@ const int FIRE_RECHARGE_TIME = 5;
CPlayerLevel::CPlayerLevel(CMap *pmap, Uint32 x, Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs, direction_t facedir,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs, direction_t facedir,
CInventory &l_Inventory, stCheat &Cheatmode) :
CPlayerBase(pmap, x, y, ObjectPtrs, facedir, l_Inventory, Cheatmode),
m_jumpdownfromobject(false)
......
......@@ -50,7 +50,7 @@ namespace galaxy {
class CPlayerLevel : public CPlayerBase {
public:
CPlayerLevel(CMap *pmap, Uint32 x, Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs, direction_t facedir,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs, direction_t facedir,
CInventory &l_Inventory, stCheat &Cheatmode);
......
......@@ -22,7 +22,7 @@ namespace galaxy {
CPlayerWM::CPlayerWM(CMap *pmap,
Uint32 x,
Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs,
CInventory &l_Inventory,
stCheat &Cheatmode):
CPlayerBase(pmap, x, y,
......
......@@ -12,12 +12,13 @@
namespace galaxy {
class CPlayerWM : public CPlayerBase {
class CPlayerWM : public CPlayerBase
{
public:
CPlayerWM(CMap *pmap,
Uint32 x,
Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs,
CInventory &l_Inventory,
stCheat &Cheatmode);
......
......@@ -16,7 +16,7 @@ namespace galaxy {
const int MAX_ANIMATION_TIMER = 20;
CSpriteItem::CSpriteItem(CMap *pmap, Uint32 x, Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs, Uint32 sprite) :
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs, Uint32 sprite) :
CGalaxySpriteObject(pmap, x, y),
m_ObjectPtrs(ObjectPtrs)
{
......
......@@ -22,14 +22,14 @@ class CSpriteItem : public CGalaxySpriteObject
{
public:
CSpriteItem(CMap *pmap, Uint32 x, Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs, Uint32 sprite);
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs, Uint32 sprite);
void process();
void getTouchedBy(CSpriteObject &theObject);
private:
int m_timer;
Uint32 m_basesprite;
std::vector< SmartPointer<CSpriteObject> > &m_ObjectPtrs;
std::vector< SmartPointer<CGalaxySpriteObject> > &m_ObjectPtrs;
};
}
......
......@@ -15,7 +15,7 @@ namespace galaxy {
CPlayerDive::CPlayerDive(CMap *pmap,
Uint32 x,
Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs,
direction_t facedir,
CInventory &l_Inventory,
stCheat &Cheatmode) :
......
......@@ -20,7 +20,7 @@ public:
CPlayerDive(CMap *pmap,
Uint32 x,
Uint32 y,
std::vector< SmartPointer<CSpriteObject> > &ObjectPtrs,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs,
direction_t facedir,
CInventory &l_Inventory,
stCheat &Cheatmode);
......
......@@ -18,7 +18,7 @@ const int SLUG_MOVE_SPEED = 1;
const int SLUG_MOVE_TIMER = 10;
CPoisonSlug::CPoisonSlug(CMap *pmap, Uint32 x, Uint32 y,
std::vector< SmartPointer<CSpriteObject> >&ObjectPtrs) :
std::vector< SmartPointer<CGalaxySpriteObject> >&ObjectPtrs) :
CGalaxySpriteObject(pmap, x, y),
CStunnable(pmap, x, y),
m_ObjectPtrs(ObjectPtrs),
......
......@@ -24,7 +24,7 @@ class CPoisonSlug : public CStunnable
{
public:
CPoisonSlug(CMap *pmap, Uint32 x, Uint32 y,
std::vector< SmartPointer<CSpriteObject> >&ObjectPtrs);
std::vector< SmartPointer<CGalaxySpriteObject> >&ObjectPtrs);
/**
* When slug is moving normally
......@@ -46,7 +46,7 @@ public:
void getTouchedBy(CSpriteObject &theObject);
private:
std::vector< SmartPointer<CSpriteObject> > &m_ObjectPtrs;
std::vector< SmartPointer<CGalaxySpriteObject> > &m_ObjectPtrs;
int m_timer;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment