Commit bc03451e authored by Gerhard Stein's avatar Gerhard Stein

Super Cleanup

parent 96741e4c
......@@ -37,7 +37,7 @@
237422DD11FC849A000EEA5B /* CBehaviorEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B111CFF5FB00F60BC8 /* CBehaviorEngine.cpp */; };
237422DE11FC849A000EEA5B /* CGameLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B311CFF5FB00F60BC8 /* CGameLauncher.cpp */; };
237422DF11FC849A000EEA5B /* CMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B511CFF5FB00F60BC8 /* CMap.cpp */; };
237422E011FC849A000EEA5B /* CMapLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B711CFF5FB00F60BC8 /* CMapLoader.cpp */; };
237422E011FC849A000EEA5B /* CVorticonMapLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B711CFF5FB00F60BC8 /* CVorticonMapLoader.cpp */; };
237422E211FC849A000EEA5B /* CObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10BB11CFF5FB00F60BC8 /* CObject.cpp */; };
237422E311FC849A000EEA5B /* CPhysicsSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10BD11CFF5FB00F60BC8 /* CPhysicsSettings.cpp */; };
237422E411FC849A000EEA5B /* CPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10BF11CFF5FB00F60BC8 /* CPlane.cpp */; };
......@@ -75,7 +75,7 @@
2374230811FC849A000EEA5B /* CPlanes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD110F11CFF5FB00F60BC8 /* CPlanes.cpp */; };
2374230911FC849A000EEA5B /* CTitle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111111CFF5FB00F60BC8 /* CTitle.cpp */; };
2374230A11FC849A000EEA5B /* CEGAGraphicsGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111411CFF5FB00F60BC8 /* CEGAGraphicsGalaxy.cpp */; };
2374230B11FC849A000EEA5B /* CMapLoaderGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111611CFF5FB00F60BC8 /* CMapLoaderGalaxy.cpp */; };
2374230B11FC849A000EEA5B /* CVorticonMapLoaderGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111611CFF5FB00F60BC8 /* CVorticonMapLoaderGalaxy.cpp */; };
2374230C11FC849A000EEA5B /* CMenuGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111811CFF5FB00F60BC8 /* CMenuGalaxy.cpp */; };
2374230D11FC849A000EEA5B /* CPassive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111A11CFF5FB00F60BC8 /* CPassive.cpp */; };
2374230E11FC849A000EEA5B /* CPlayGameGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111C11CFF5FB00F60BC8 /* CPlayGameGalaxy.cpp */; };
......@@ -324,7 +324,7 @@
63CD120911CFF5FC00F60BC8 /* CBehaviorEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B111CFF5FB00F60BC8 /* CBehaviorEngine.cpp */; };
63CD120A11CFF5FC00F60BC8 /* CGameLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B311CFF5FB00F60BC8 /* CGameLauncher.cpp */; };
63CD120B11CFF5FC00F60BC8 /* CMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B511CFF5FB00F60BC8 /* CMap.cpp */; };
63CD120C11CFF5FC00F60BC8 /* CMapLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B711CFF5FB00F60BC8 /* CMapLoader.cpp */; };
63CD120C11CFF5FC00F60BC8 /* CVorticonMapLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10B711CFF5FB00F60BC8 /* CVorticonMapLoader.cpp */; };
63CD120E11CFF5FC00F60BC8 /* CObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10BB11CFF5FB00F60BC8 /* CObject.cpp */; };
63CD120F11CFF5FC00F60BC8 /* CPhysicsSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10BD11CFF5FB00F60BC8 /* CPhysicsSettings.cpp */; };
63CD121011CFF5FC00F60BC8 /* CPlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10BF11CFF5FB00F60BC8 /* CPlane.cpp */; };
......@@ -362,7 +362,7 @@
63CD123511CFF5FC00F60BC8 /* CPlanes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD110F11CFF5FB00F60BC8 /* CPlanes.cpp */; };
63CD123611CFF5FC00F60BC8 /* CTitle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111111CFF5FB00F60BC8 /* CTitle.cpp */; };
63CD123711CFF5FC00F60BC8 /* CEGAGraphicsGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111411CFF5FB00F60BC8 /* CEGAGraphicsGalaxy.cpp */; };
63CD123811CFF5FC00F60BC8 /* CMapLoaderGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111611CFF5FB00F60BC8 /* CMapLoaderGalaxy.cpp */; };
63CD123811CFF5FC00F60BC8 /* CVorticonMapLoaderGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111611CFF5FB00F60BC8 /* CVorticonMapLoaderGalaxy.cpp */; };
63CD123911CFF5FC00F60BC8 /* CMenuGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111811CFF5FB00F60BC8 /* CMenuGalaxy.cpp */; };
63CD123A11CFF5FC00F60BC8 /* CPassive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111A11CFF5FB00F60BC8 /* CPassive.cpp */; };
63CD123B11CFF5FC00F60BC8 /* CPlayGameGalaxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD111C11CFF5FB00F60BC8 /* CPlayGameGalaxy.cpp */; };
......@@ -848,8 +848,8 @@
63CD10B411CFF5FB00F60BC8 /* CGameLauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGameLauncher.h; sourceTree = "<group>"; };
63CD10B511CFF5FB00F60BC8 /* CMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMap.cpp; sourceTree = "<group>"; };
63CD10B611CFF5FB00F60BC8 /* CMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMap.h; sourceTree = "<group>"; };
63CD10B711CFF5FB00F60BC8 /* CMapLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMapLoader.cpp; sourceTree = "<group>"; };
63CD10B811CFF5FB00F60BC8 /* CMapLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMapLoader.h; sourceTree = "<group>"; };
63CD10B711CFF5FB00F60BC8 /* CVorticonMapLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CVorticonMapLoader.cpp; sourceTree = "<group>"; };
63CD10B811CFF5FB00F60BC8 /* CVorticonMapLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CVorticonMapLoader.h; sourceTree = "<group>"; };
63CD10BB11CFF5FB00F60BC8 /* CObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CObject.cpp; sourceTree = "<group>"; };
63CD10BC11CFF5FB00F60BC8 /* CObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CObject.h; sourceTree = "<group>"; };
63CD10BD11CFF5FB00F60BC8 /* CPhysicsSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPhysicsSettings.cpp; sourceTree = "<group>"; };
......@@ -927,8 +927,8 @@
63CD111211CFF5FB00F60BC8 /* CTitle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTitle.h; sourceTree = "<group>"; };
63CD111411CFF5FB00F60BC8 /* CEGAGraphicsGalaxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CEGAGraphicsGalaxy.cpp; sourceTree = "<group>"; };
63CD111511CFF5FB00F60BC8 /* CEGAGraphicsGalaxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEGAGraphicsGalaxy.h; sourceTree = "<group>"; };
63CD111611CFF5FB00F60BC8 /* CMapLoaderGalaxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMapLoaderGalaxy.cpp; sourceTree = "<group>"; };
63CD111711CFF5FB00F60BC8 /* CMapLoaderGalaxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMapLoaderGalaxy.h; sourceTree = "<group>"; };
63CD111611CFF5FB00F60BC8 /* CVorticonMapLoaderGalaxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CVorticonMapLoaderGalaxy.cpp; sourceTree = "<group>"; };
63CD111711CFF5FB00F60BC8 /* CVorticonMapLoaderGalaxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CVorticonMapLoaderGalaxy.h; sourceTree = "<group>"; };
63CD111811CFF5FB00F60BC8 /* CMenuGalaxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMenuGalaxy.cpp; sourceTree = "<group>"; };
63CD111911CFF5FB00F60BC8 /* CMenuGalaxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMenuGalaxy.h; sourceTree = "<group>"; };
63CD111A11CFF5FB00F60BC8 /* CPassive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPassive.cpp; sourceTree = "<group>"; };
......@@ -1694,8 +1694,8 @@
23A11A9011DE888400747BFA /* CHUD.h */,
63CD10B511CFF5FB00F60BC8 /* CMap.cpp */,
63CD10B611CFF5FB00F60BC8 /* CMap.h */,
63CD10B711CFF5FB00F60BC8 /* CMapLoader.cpp */,
63CD10B811CFF5FB00F60BC8 /* CMapLoader.h */,
63CD10B711CFF5FB00F60BC8 /* CVorticonMapLoader.cpp */,
63CD10B811CFF5FB00F60BC8 /* CVorticonMapLoader.h */,
63CD10BB11CFF5FB00F60BC8 /* CObject.cpp */,
63CD10BC11CFF5FB00F60BC8 /* CObject.h */,
63CD10BD11CFF5FB00F60BC8 /* CPhysicsSettings.cpp */,
......@@ -1827,8 +1827,8 @@
23A1441C12A5380100E894CF /* CInventory.h */,
2332378E120EBBF600915252 /* CLevelPlay.cpp */,
2332378F120EBBF600915252 /* CLevelPlay.h */,
63CD111611CFF5FB00F60BC8 /* CMapLoaderGalaxy.cpp */,
63CD111711CFF5FB00F60BC8 /* CMapLoaderGalaxy.h */,
63CD111611CFF5FB00F60BC8 /* CVorticonMapLoaderGalaxy.cpp */,
63CD111711CFF5FB00F60BC8 /* CVorticonMapLoaderGalaxy.h */,
63CD111811CFF5FB00F60BC8 /* CMenuGalaxy.cpp */,
63CD111911CFF5FB00F60BC8 /* CMenuGalaxy.h */,
63CD111A11CFF5FB00F60BC8 /* CPassive.cpp */,
......@@ -2462,7 +2462,7 @@
63CD120911CFF5FC00F60BC8 /* CBehaviorEngine.cpp in Sources */,
63CD120A11CFF5FC00F60BC8 /* CGameLauncher.cpp in Sources */,
63CD120B11CFF5FC00F60BC8 /* CMap.cpp in Sources */,
63CD120C11CFF5FC00F60BC8 /* CMapLoader.cpp in Sources */,
63CD120C11CFF5FC00F60BC8 /* CVorticonMapLoader.cpp in Sources */,
63CD120E11CFF5FC00F60BC8 /* CObject.cpp in Sources */,
63CD120F11CFF5FC00F60BC8 /* CPhysicsSettings.cpp in Sources */,
63CD121011CFF5FC00F60BC8 /* CPlane.cpp in Sources */,
......@@ -2500,7 +2500,7 @@
63CD123511CFF5FC00F60BC8 /* CPlanes.cpp in Sources */,
63CD123611CFF5FC00F60BC8 /* CTitle.cpp in Sources */,
63CD123711CFF5FC00F60BC8 /* CEGAGraphicsGalaxy.cpp in Sources */,
63CD123811CFF5FC00F60BC8 /* CMapLoaderGalaxy.cpp in Sources */,
63CD123811CFF5FC00F60BC8 /* CVorticonMapLoaderGalaxy.cpp in Sources */,
63CD123911CFF5FC00F60BC8 /* CMenuGalaxy.cpp in Sources */,
63CD123A11CFF5FC00F60BC8 /* CPassive.cpp in Sources */,
63CD123B11CFF5FC00F60BC8 /* CPlayGameGalaxy.cpp in Sources */,
......@@ -2713,7 +2713,7 @@
237422DD11FC849A000EEA5B /* CBehaviorEngine.cpp in Sources */,
237422DE11FC849A000EEA5B /* CGameLauncher.cpp in Sources */,
237422DF11FC849A000EEA5B /* CMap.cpp in Sources */,
237422E011FC849A000EEA5B /* CMapLoader.cpp in Sources */,
237422E011FC849A000EEA5B /* CVorticonMapLoader.cpp in Sources */,
237422E211FC849A000EEA5B /* CObject.cpp in Sources */,
237422E311FC849A000EEA5B /* CPhysicsSettings.cpp in Sources */,
237422E411FC849A000EEA5B /* CPlane.cpp in Sources */,
......@@ -2751,7 +2751,7 @@
2374230811FC849A000EEA5B /* CPlanes.cpp in Sources */,
2374230911FC849A000EEA5B /* CTitle.cpp in Sources */,
2374230A11FC849A000EEA5B /* CEGAGraphicsGalaxy.cpp in Sources */,
2374230B11FC849A000EEA5B /* CMapLoaderGalaxy.cpp in Sources */,
2374230B11FC849A000EEA5B /* CVorticonMapLoaderGalaxy.cpp in Sources */,
2374230C11FC849A000EEA5B /* CMenuGalaxy.cpp in Sources */,
2374230D11FC849A000EEA5B /* CPassive.cpp in Sources */,
2374230E11FC849A000EEA5B /* CPlayGameGalaxy.cpp in Sources */,
......
......@@ -25,15 +25,15 @@
///
CPlayer::CPlayer(const char &Episode, short &Level,
bool *mp_level_completed,
std::vector<CSpriteObject*> &m_Object, CMap &map) :
CSpriteObject(&map, 0, 0, OBJ_PLAYER),
std::vector<CVorticonSpriteObject*> &m_Object, CMap &map) :
CVorticonSpriteObject(&map, 0, 0, OBJ_PLAYER),
m_episode(Episode),
m_level(Level),
pjumpupspeed_decrease(g_pBehaviorEngine->getPhysicsSettings().player.defaultjumpupdecreasespeed),
mp_levels_completed(mp_level_completed),
mp_option(g_pBehaviorEngine->m_option)
{
mp_object = &m_Object;
//mp_object = &m_Object;
canbezapped = true;
m_index = 0;
......
......@@ -10,7 +10,7 @@
#include <SDL.h>
#include "inventory.h"
#include "CSpriteObject.h"
#include "engine/vorticon/CVorticonSpriteObject.h"
#include "CMap.h"
#include "CStatusScreen.h"
#include "Playerdefines.h"
......@@ -32,7 +32,7 @@ enum level_triggers
///
// Class definition starts here!
///
class CPlayer : public CSpriteObject
class CPlayer : public CVorticonSpriteObject
{
public:
......@@ -44,7 +44,7 @@ public:
CPlayer(const char &Episode, short &Level,
bool *mp_level_completed,
std::vector<CSpriteObject*> &m_Object, CMap &map);
std::vector<CVorticonSpriteObject*> &m_Object, CMap &map);
void setupCameraObject();
void setDatatoZero();
void setDefaultStartValues();
......
......@@ -9,8 +9,8 @@
*/
#ifndef COBJECT_H_
#define COBJECT_H_
#ifndef __CSPRITEOBJECT_H_
#define __CSPRITEOBJECT_H_
#include "engine/CEventContainer.h"
#include "ActionFormat.h"
......@@ -110,8 +110,6 @@ public:
bool dead, dying;
bool needinit; // Deprecated. Is only there so savegame mode still works.
bool m_canturnaround;
// This is used for action format only
......@@ -264,6 +262,7 @@ public:
virtual ~CSpriteObject();
protected:
CMap *mp_Map;
......@@ -277,6 +276,7 @@ protected:
ActionFormatType m_Action;
Uint8 transluceny;
};
#endif /* COBJECT_H_ */
#endif // __CSPRITEOBJECT_H_
/*
* CMapLoader.cpp
* CVorticonMapLoader.cpp
*
* Created on: 09.10.2009
* Author: gerstrong
*/
#include "CMapLoader.h"
#include "CVorticonMapLoader.h"
#include <iostream>
#include <fstream>
#include "FindFile.h"
......@@ -42,7 +42,7 @@
#include "engine/vorticon/ai/CIceCannon.h"
#include "engine/vorticon/ai/CSpark.h"
CMapLoader::CMapLoader( SmartPointer<CMap> &map,
CVorticonMapLoader::CVorticonMapLoader( SmartPointer<CMap> &map,
std::vector<CPlayer> *p_PlayerVect ) :
mpMap(map),
mp_vec_Player(p_PlayerVect)
......@@ -53,7 +53,7 @@ mp_vec_Player(p_PlayerVect)
}
// Loads the map into the memory
bool CMapLoader::load( Uint8 episode, Uint8 level, const std::string& path, bool loadNewMusic, bool stategame )
bool CVorticonMapLoader::load( Uint8 episode, Uint8 level, const std::string& path, bool loadNewMusic, bool stategame )
{
std::string levelname = "level";
if(level < 10) levelname += "0";
......@@ -144,7 +144,7 @@ bool CMapLoader::load( Uint8 episode, Uint8 level, const std::string& path, bool
if(mp_objvect && stategame == false)
{
std::vector<CSpriteObject*>::iterator obj = mp_objvect->begin();
std::vector<CVorticonSpriteObject*>::iterator obj = mp_objvect->begin();
for( ; obj != mp_objvect->end() ; obj++ )
{
delete *obj;
......@@ -188,7 +188,7 @@ bool CMapLoader::load( Uint8 episode, Uint8 level, const std::string& path, bool
return true;
}
void CMapLoader::addTile( Uint16 t, Uint16 x, Uint16 y )
void CVorticonMapLoader::addTile( Uint16 t, Uint16 x, Uint16 y )
{
// Special cases. Those happen normally, when levels are replayed.
// For example if one player has battery, the level won't show that item
......@@ -197,7 +197,7 @@ void CMapLoader::addTile( Uint16 t, Uint16 x, Uint16 y )
mpMap->setTile(x, y, t);
}
void CMapLoader::addWorldMapObject(unsigned int t, Uint16 x, Uint16 y, int episode)
void CVorticonMapLoader::addWorldMapObject(unsigned int t, Uint16 x, Uint16 y, int episode)
{
// This function add sprites on the map. Most of the objects are invisible.
// TODO : Please convert this into ifs. There are more conditions than just switch.agree
......@@ -292,7 +292,7 @@ void CMapLoader::addWorldMapObject(unsigned int t, Uint16 x, Uint16 y, int episo
}
}
void CMapLoader::addEnemyObject(unsigned int t, Uint16 x, Uint16 y, int episode, int level)
void CVorticonMapLoader::addEnemyObject(unsigned int t, Uint16 x, Uint16 y, int episode, int level)
{
mpMap->m_objectlayer[x][y] = t;
......@@ -316,7 +316,7 @@ void CMapLoader::addEnemyObject(unsigned int t, Uint16 x, Uint16 y, int episode,
}
else
{
CSpriteObject *enemyobject = NULL;
CVorticonSpriteObject *enemyobject = NULL;
switch(t)
{
......@@ -494,7 +494,7 @@ void CMapLoader::addEnemyObject(unsigned int t, Uint16 x, Uint16 y, int episode,
* \param curmapY Y-Coordinate of the map not CSFed
* \param episode Episode of the game
*/
void CMapLoader::fixLevelTiles(int &currentTile, const Uint16 curmapX, const Uint16 curmapY, const int episode, const int level)
void CVorticonMapLoader::fixLevelTiles(int &currentTile, const Uint16 curmapX, const Uint16 curmapY, const int episode, const int level)
{
if( episode == 1 && level == 14 )
{
......
/*
* CMapLoader.h
* CVorticonMapLoader.h
*
* Created on: 09.10.2009
* Author: gerstrong
*/
#ifndef CMAPLOADER_H_
#define CMAPLOADER_H_
#ifndef CVorticonMapLoader_H_
#define CVorticonMapLoader_H_
#include "CMap.h"
#include "CPlayer.h"
......@@ -18,10 +18,10 @@
#include <string>
#include <vector>
class CMapLoader
class CVorticonMapLoader
{
public:
CMapLoader(SmartPointer<CMap> &map,
CVorticonMapLoader(SmartPointer<CMap> &map,
std::vector<CPlayer> *p_PlayerVect = NULL);
bool load( Uint8 episode, Uint8 level, const std::string& path, bool loadNewMusic=true, bool stategame=false );
......@@ -33,11 +33,11 @@ public:
bool m_checkpointset;
bool m_NessieAlreadySpawned;
std::vector<CSpriteObject*> *mp_objvect;
std::vector<CVorticonSpriteObject*> *mp_objvect;
private:
SmartPointer<CMap>& mpMap;
std::vector<CPlayer> *mp_vec_Player;
};
#endif /* CMAPLOADER_H_ */
#endif /* CVorticonMapLoader_H_ */
......@@ -27,7 +27,7 @@ CMapPlayGalaxy(ExeFile, Inventory, Cheatmode)
void CLevelPlay::loadMap(const int level)
{
// Load the World map level.
CMapLoaderGalaxy MapLoader(m_ExeFile, m_ObjectPtr, m_Inventory, m_Cheatmode);
CVorticonMapLoaderGalaxy MapLoader(m_ExeFile, m_ObjectPtr, m_Inventory, m_Cheatmode);
MapLoader.loadMap( m_Map, level );
......
/*
* CMapLoaderGalaxy.cpp
* CVorticonMapLoaderGalaxy.cpp
*
* Created on: 29.05.2010
* Author: gerstrong
......@@ -51,7 +51,7 @@
namespace galaxy
{
CMapLoaderGalaxy::CMapLoaderGalaxy(CExeFile &ExeFile, std::vector<CSpriteObject*>& ObjectPtr,
CVorticonMapLoaderGalaxy::CVorticonMapLoaderGalaxy(CExeFile &ExeFile, std::vector<CSpriteObject*>& ObjectPtr,
CInventory &Inventory, stCheat &Cheatmode):
m_ExeFile(ExeFile),
m_ObjectPtr(ObjectPtr),
......@@ -60,7 +60,7 @@ m_Cheatmode(Cheatmode)
{}
// Gets returns the address of the datablock of the exe file, in where the
size_t CMapLoaderGalaxy::getMapheadOffset()
size_t CVorticonMapLoaderGalaxy::getMapheadOffset()
{
size_t offset = 0;
......@@ -76,7 +76,7 @@ size_t CMapLoaderGalaxy::getMapheadOffset()
return offset;
}
bool CMapLoaderGalaxy::gotoSignature(std::ifstream &MapFile)
bool CVorticonMapLoaderGalaxy::gotoSignature(std::ifstream &MapFile)
{
char c;
while(!MapFile.eof())
......@@ -100,7 +100,7 @@ bool CMapLoaderGalaxy::gotoSignature(std::ifstream &MapFile)
return false;
}
void CMapLoaderGalaxy::unpackPlaneData(std::ifstream &MapFile,
void CVorticonMapLoaderGalaxy::unpackPlaneData(std::ifstream &MapFile,
CMap &Map, size_t PlaneNumber,
longword offset, longword length,
word magic_word)
......@@ -153,7 +153,7 @@ void CMapLoaderGalaxy::unpackPlaneData(std::ifstream &MapFile,
}
bool CMapLoaderGalaxy::loadMap(CMap &Map, Uint8 level)
bool CVorticonMapLoaderGalaxy::loadMap(CMap &Map, Uint8 level)
{
// Get the MAPHEAD Location from within the Exe File
......@@ -280,7 +280,7 @@ bool CMapLoaderGalaxy::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 CMapLoaderGalaxy::spawnFoes(CMap &Map)
void CVorticonMapLoaderGalaxy::spawnFoes(CMap &Map)
{
word *start_data = Map.getData(2);
word *data_ptr;
......@@ -359,7 +359,7 @@ const int DIVE_SUIT = 35;
/**
* @brief Loads a foe given by the coordiantes
*/
void CMapLoaderGalaxy::addFoe(CMap &Map, word foe, size_t x, size_t y)
void CVorticonMapLoaderGalaxy::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
......
/*
* CMapLoaderGalaxy.h
* CVorticonMapLoaderGalaxy.h
*
* Created on: 29.05.2010
* Author: gerstrong
*/
#ifndef CMAPLOADERGALAXY_H_
#define CMAPLOADERGALAXY_H_
#ifndef CVorticonMapLoaderGALAXY_H_
#define CVorticonMapLoaderGALAXY_H_
#include "fileio/CExeFile.h"
#include "fileio/TypeDefinitions.h"
......@@ -22,10 +22,10 @@
namespace galaxy
{
class CMapLoaderGalaxy
class CVorticonMapLoaderGalaxy
{
public:
CMapLoaderGalaxy(CExeFile &ExeFile, std::vector<CSpriteObject*>& ObjectPtr,
CVorticonMapLoaderGalaxy(CExeFile &ExeFile, std::vector<CSpriteObject*>& ObjectPtr,
CInventory &Inventory, stCheat &Cheatmode);
size_t getMapheadOffset();
bool gotoSignature(std::ifstream &MapFile);
......@@ -47,4 +47,4 @@ private:
}
#endif /* CMAPLOADERGALAXY_H_ */
#endif /* CVorticonMapLoaderGALAXY_H_ */
......@@ -19,7 +19,7 @@ CMapPlayGalaxy(ExeFile, Inventory, Cheatmode)
void CWorldMap::init()
{
// Load the World map level.
CMapLoaderGalaxy MapLoader(m_ExeFile, m_ObjectPtr, m_Inventory, m_Cheatmode);
CVorticonMapLoaderGalaxy MapLoader(m_ExeFile, m_ObjectPtr, m_Inventory, m_Cheatmode);
MapLoader.loadMap(m_Map, 0); // Is it a Map Level?
const std::string loading_text = g_pBehaviorEngine->getString("WORLDMAP_LOAD_TEXT");
......
......@@ -12,7 +12,7 @@
#include "fileio/CExeFile.h"
#include "graphics/CGfxEngine.h"
#include "sdl/CVideoDriver.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "fileio/ResourceMgmt.h"
#include "sdl/extensions.h"
......@@ -24,7 +24,7 @@ void CAbout::init()
{
CExeFile &ExeFile = g_pBehaviorEngine->m_ExeFile;
mpMap = new CMap;
CMapLoader Maploader(mpMap);
CVorticonMapLoader Maploader(mpMap);
Maploader.load(ExeFile.getEpisode(), 90, ExeFile.getDataDirectory());
mpMap->gotoPos( 1008, 28 );
......
......@@ -9,7 +9,7 @@
#include "sdl/input/CInput.h"
#include "sdl/CVideoDriver.h"
#include "graphics/CGfxEngine.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "sdl/extensions.h"
void CCredits::init()
......@@ -17,7 +17,7 @@ void CCredits::init()
CExeFile &ExeFile = g_pBehaviorEngine->m_ExeFile;
mpMap = new CMap;
CMapLoader Maploader(mpMap);
CVorticonMapLoader Maploader(mpMap);
Maploader.load( ExeFile.getEpisode(), 90, ExeFile.getDataDirectory() );
mpMap->gotoPos( 104<<4, 16 );
......
......@@ -10,7 +10,7 @@
#include "CHelp.h"
#include "fileio/CExeFile.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "graphics/CGfxEngine.h"
#include "sdl/CVideoDriver.h"
#include "sdl/input/CInput.h"
......
......@@ -15,7 +15,7 @@
#include "StringUtils.h"
#include "FindFile.h"
#include "sdl/CVideoDriver.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "sdl/extensions.h"
const int HIGHSCORETABLE_X = 1344;
......@@ -76,7 +76,7 @@ void CHighScores::init()
// Load the map for the background
mpMap = new CMap();
CMapLoader MapLoader(mpMap);
CVorticonMapLoader MapLoader(mpMap);
MapLoader.load(m_Episode, 90, m_DataDirectory, false);
mpMap->gotoPos(HIGHSCORETABLE_X, HIGHSCORETABLE_Y);
......
......@@ -11,7 +11,7 @@
#include "fileio/CExeFile.h"
#include "graphics/CGfxEngine.h"
#include "sdl/CVideoDriver.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "sdl/extensions.h"
......@@ -23,7 +23,7 @@ void COrderingInfo::init()
mpMap = new CMap;
CMapLoader Maploader(mpMap);
CVorticonMapLoader Maploader(mpMap);
Maploader.load(episode, 90, datadirectory);
mpMap->gotoPos( 22<<4, 32 );
......
......@@ -12,7 +12,7 @@
#include "sdl/CVideoDriver.h"
#include "sdl/input/CInput.h"
#include "StringUtils.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "sdl/extensions.h"
void CPreviews::init()
......@@ -22,7 +22,7 @@ void CPreviews::init()
std::string DataDirectory = ExeFile.getDataDirectory();
mpMap = new CMap();
CMapLoader Maploader(mpMap);
CVorticonMapLoader Maploader(mpMap);
Maploader.load(m_episode, 90, DataDirectory);
mpMap->gotoPos( 0, 0 );
......
......@@ -10,7 +10,7 @@
#include <fstream>
#include "CStory.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "fileio/CExeFile.h"
#include "graphics/CGfxEngine.h"
#include "sdl/CVideoDriver.h"
......@@ -25,7 +25,7 @@ void CStory::init()
std::string DataDirectory = ExeFile.getDataDirectory();
mpMap = new CMap();
CMapLoader Maploader(mpMap);
CVorticonMapLoader Maploader(mpMap);
std::string Text;
......
......@@ -17,7 +17,7 @@
#include "fileio/lz.h"
#include "fileio/ResourceMgmt.h"
#include "common/CBehaviorEngine.h"
#include "common/CSpriteObject.h"
#include "CVorticonSpriteObject.h"
#include "common/tga.h"
#include "CResourceLoader.h"
#include "graphics/CGfxEngine.h"
......
......@@ -8,7 +8,7 @@
#include "CPassiveVort.h"
#include "graphics/CGfxEngine.h"
#include "common/CMapLoader.h"
#include "common/CVorticonMapLoader.h"
#include "common/CTileProperties.h"
#include "sdl/CVideoDriver.h"
#include "sdl/input/CInput.h"
......@@ -25,7 +25,7 @@ bool CPassiveVort::init(char mode)
{
mpIntroScreen = new CIntro();
mpMap = new CMap;
CMapLoader MapLoader( mpMap );
CVorticonMapLoader MapLoader( mpMap );
MapLoader.load( m_Episode, 90, m_DataDirectory);
mpMap->gotoPos( 64+5*320, 32); // Coordinates of star sky
mpMap->drawAll();
......@@ -35,7 +35,7 @@ bool CPassiveVort::init(char mode)
else if( m_mode == TITLE )
{
mpMap = new CMap;
CMapLoader MapLoader( mpMap );
CVorticonMapLoader MapLoader( mpMap );
MapLoader.load( m_Episode, 90, m_DataDirectory);
mpMap->gotoPos( 32, 32 ); // Coordinates of title screen
mpMap->drawAll();
......
......@@ -12,7 +12,7 @@ const unsigned int ANKH_FLICKER_DELAY = 3;
const unsigned int ANKH_SHIELD_FRAME = 61;
CAnkhShield::CAnkhShield(CPlayer &attachedPlayer) :
CSpriteObject(attachedPlayer.getMapPtr(),
CVorticonSpriteObject(attachedPlayer.getMapPtr(),
attachedPlayer.getXPosition(),
attachedPlayer.getYPosition(),
OBJ_ANKHSHIELD),
......
......@@ -23,7 +23,8 @@
#define PLAY_ANKH_TIME (ANKH_STAGE1_TIME+ANKH_STAGE2_TIME+ANKH_STAGE3_TIME)
// these correspond stage 1,2 and 3 respectively
class CAnkhShield :public CSpriteObject{
class CAnkhShield : public CVorticonSpriteObject
{
public:
CAnkhShield(CPlayer &attachedPlayer);
void process();
......
......@@ -12,8 +12,8 @@
#include "CAutoRay.h"
CAutoRay::CAutoRay(CMap *pmap, Uint32 x, Uint32 y,
std::vector<CSpriteObject*> &Objvect, stRayAlignment type) :
CSpriteObject(pmap, x, y, (type==HORIZONTAL) ? OBJ_AUTORAY : OBJ_AUTORAY_V),
std::vector<CVorticonSpriteObject*> &Objvect, stRayAlignment type) :
CVorticonSpriteObject(pmap, x, y, (type==HORIZONTAL) ? OBJ_AUTORAY : OBJ_AUTORAY_V),
m_Objvect(Objvect),
m_type(type)
{
......
......@@ -8,22 +8,22 @@
#ifndef CAUTORAY_H_
#define CAUTORAY_H_
#include "../../../common/CSpriteObject.h"
#include "engine/vorticon/CVorticonSpriteObject.h"
#define GUNFIRE_TIMER 128
class CAutoRay : public CSpriteObject
class CAutoRay : public CVorticonSpriteObject
{
public:
enum stRayAlignment{ VERTICAL, HORIZONTAL };
CAutoRay(CMap *pmap, Uint32 x, Uint32 y,
std::vector<CSpriteObject*> &Objvect, stRayAlignment type);