This commit is contained in:
parent
e24c93004d
commit
b9fa255cd3
5 changed files with 145 additions and 96 deletions
|
@ -10,8 +10,6 @@
|
|||
#include "level/layercollision.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
// Woo.. this is getting big now isn't it?
|
||||
// Nope.. it's shrunk again! :)
|
||||
struct sLvlTab
|
||||
{
|
||||
u16 Chapter,Level;
|
||||
|
@ -20,6 +18,10 @@ struct sLvlTab
|
|||
int songId;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
extern int s_globalLevelSelectThing;
|
||||
extern sLvlTab LvlTable[];
|
||||
|
||||
/*****************************************************************************/
|
||||
class CLayer;
|
||||
class CLevel
|
||||
|
@ -27,74 +29,78 @@ class CLevel
|
|||
public:
|
||||
CLevel();
|
||||
// Scene Handlers
|
||||
void init(int LevelNo);
|
||||
void shutdown();
|
||||
void render();
|
||||
void think(int _frames);
|
||||
void init(int LevelNo);
|
||||
void shutdown();
|
||||
void render();
|
||||
void think(int _frames);
|
||||
|
||||
void setCameraCentre(DVECTOR _pos) {MapPos=_pos;}
|
||||
static DVECTOR const &getCameraPos() {return MapPos;}
|
||||
static DVECTOR const &getPlayerSpawnPos() {return s_playerSpawnPos;}
|
||||
void setCameraCentre(DVECTOR _pos) {MapPos=_pos;}
|
||||
static DVECTOR const &getCameraPos() {return MapPos;}
|
||||
static DVECTOR const &getPlayerSpawnPos() {return s_playerSpawnPos;}
|
||||
|
||||
static int getCurrentChapter();
|
||||
static int getCurrentChapterLevel();
|
||||
static int getTotalSpatCount();
|
||||
static int getCurrentChapter() {return( LvlTable[s_globalLevelSelectThing].Chapter );}
|
||||
static int getCurrentChapterLevel() {return( LvlTable[s_globalLevelSelectThing].Level);}
|
||||
static int getTotalSpatCount() {return( LvlTable[s_globalLevelSelectThing].totalSpatCount);}
|
||||
|
||||
int getActorCount() {return ActorCount;}
|
||||
sThingActor **getActorList() {return ActorList;}
|
||||
int getPlatformCount() {return PlatformCount;}
|
||||
sThingPlatform **getPlatformList() {return PlatformList;}
|
||||
int getHazardCount() {return HazardCount;}
|
||||
sThingHazard **getHazardList() {return HazardList;}
|
||||
void destroyMapArea(DVECTOR const &Pos);
|
||||
void destroyMapTile(DVECTOR const &Pos);
|
||||
|
||||
CLayerCollision *getCollisionLayer() {return CollisionLayer;}
|
||||
DVECTOR getMapSize();
|
||||
int getActorCount() {return ActorCount;}
|
||||
sThingActor **getActorList() {return ActorList;}
|
||||
int getPlatformCount() {return PlatformCount;}
|
||||
sThingPlatform **getPlatformList() {return PlatformList;}
|
||||
int getHazardCount() {return HazardCount;}
|
||||
sThingHazard **getHazardList() {return HazardList;}
|
||||
|
||||
bool GetNextLevel(int &Lvl);
|
||||
CLayerCollision *getCollisionLayer() {return CollisionLayer;}
|
||||
DVECTOR getMapSize();
|
||||
|
||||
void respawnLevel();
|
||||
bool GetNextLevel(int &Lvl);
|
||||
|
||||
void respawnLevel();
|
||||
static sLevelHdr *getLevelHdr() {return(LevelHdr);}
|
||||
|
||||
static u8 getIsBossRespawn() {return m_isBossRespawn;}
|
||||
static s32 getBossHealth() {return m_bossHealth;}
|
||||
static void setIsBossRespawn( u8 newIsBossRespawn) {m_isBossRespawn=newIsBossRespawn;}
|
||||
static void setBossHealth( s32 newBossHealth ) {m_bossHealth=newBossHealth;}
|
||||
|
||||
static u8 getIsBossRespawn() {return m_isBossRespawn;}
|
||||
static s32 getBossHealth() {return m_bossHealth;}
|
||||
static void setIsBossRespawn( u8 newIsBossRespawn ) {m_isBossRespawn=newIsBossRespawn;}
|
||||
static void setBossHealth( s32 newBossHealth ) {m_bossHealth=newBossHealth;}
|
||||
|
||||
|
||||
private:
|
||||
void initLayers();
|
||||
void initThings(int _respawningLevel);
|
||||
void initLayers();
|
||||
void initThings(int _respawningLevel);
|
||||
|
||||
void DisplayLoadingScreen(sLvlTab *lvlTab);
|
||||
void DisplayLoadingScreen(sLvlTab *lvlTab);
|
||||
|
||||
sLevelHdr *LevelHdr;
|
||||
static sLevelHdr *LevelHdr;
|
||||
|
||||
static DVECTOR MapPos;
|
||||
static DVECTOR s_playerSpawnPos;
|
||||
|
||||
TPAGE_DESC m_levelTPage;
|
||||
static DVECTOR MapPos;
|
||||
static DVECTOR s_playerSpawnPos;
|
||||
TPAGE_DESC m_levelTPage;
|
||||
|
||||
// Tile Layers
|
||||
CLayerTile *TileLayers[CLayerTile::LAYER_TILE_TYPE_MAX];
|
||||
CLayerTile *TileLayers[CLayerTile::LAYER_TILE_TYPE_MAX];
|
||||
|
||||
// Collision
|
||||
CLayerCollision *CollisionLayer;
|
||||
CLayerCollision *CollisionLayer;
|
||||
|
||||
// Things
|
||||
int ActorCount;
|
||||
sThingActor **ActorList;
|
||||
int ItemCount;
|
||||
sThingItem *ItemList;
|
||||
int PlatformCount;
|
||||
sThingPlatform **PlatformList;
|
||||
int TriggerCount;
|
||||
sThingTrigger *TriggerList;
|
||||
int FXCount;
|
||||
sThingFX *FXList;
|
||||
int HazardCount;
|
||||
sThingHazard **HazardList;
|
||||
int ActorCount;
|
||||
sThingActor **ActorList;
|
||||
int ItemCount;
|
||||
sThingItem *ItemList;
|
||||
int PlatformCount;
|
||||
sThingPlatform **PlatformList;
|
||||
int TriggerCount;
|
||||
sThingTrigger *TriggerList;
|
||||
int FXCount;
|
||||
sThingFX *FXList;
|
||||
int HazardCount;
|
||||
sThingHazard **HazardList;
|
||||
|
||||
static u8 m_isBossRespawn;
|
||||
static s32 m_bossHealth;
|
||||
|
||||
static u8 m_isBossRespawn;
|
||||
static s32 m_bossHealth;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue