2000-12-06 23:52:00 +01:00
|
|
|
/*******************/
|
|
|
|
/*** Level Class ***/
|
|
|
|
/*******************/
|
|
|
|
|
|
|
|
#ifndef __LEVEL_LEVEL_H__
|
|
|
|
#define __LEVEL_LEVEL_H__
|
|
|
|
|
2001-01-16 17:20:45 +01:00
|
|
|
#include "system\global.h"
|
2001-02-02 20:16:49 +01:00
|
|
|
#include "level/layertile.h"
|
|
|
|
#include "level/layercollision.h"
|
2000-12-06 23:52:00 +01:00
|
|
|
|
2001-04-03 23:28:56 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
// Woo.. this is getting big now isn't it?
|
2001-04-08 21:42:24 +02:00
|
|
|
// Nope.. it's shrunk again! :)
|
2001-04-03 23:28:56 +02:00
|
|
|
struct sLvlTab
|
|
|
|
{
|
2001-04-19 01:04:03 +02:00
|
|
|
u16 Chapter,Level;
|
|
|
|
FileEquate LevelFilename,TexFilename;
|
2001-04-03 23:28:56 +02:00
|
|
|
int songId;
|
|
|
|
};
|
|
|
|
|
2000-12-06 23:52:00 +01:00
|
|
|
/*****************************************************************************/
|
2001-02-02 20:16:49 +01:00
|
|
|
class CLayer;
|
2000-12-06 23:52:00 +01:00
|
|
|
class CLevel
|
|
|
|
{
|
|
|
|
public:
|
2001-04-03 23:28:56 +02:00
|
|
|
CLevel();
|
2000-12-07 16:56:20 +01:00
|
|
|
// Scene Handlers
|
2001-04-19 01:04:03 +02:00
|
|
|
void init(int LevelNo);
|
|
|
|
void shutdown();
|
2000-12-07 16:56:20 +01:00
|
|
|
void render();
|
|
|
|
void think(int _frames);
|
|
|
|
|
2001-02-06 18:15:28 +01:00
|
|
|
void setCameraCentre(DVECTOR _pos) {MapPos=_pos;}
|
|
|
|
static DVECTOR getCameraPos() {return MapPos;}
|
2001-03-07 22:27:57 +01:00
|
|
|
static DVECTOR getPlayerSpawnPos() {return s_playerSpawnPos;}
|
2001-04-02 21:21:46 +02:00
|
|
|
int getActorCount() {return ActorCount;}
|
|
|
|
sThingActor **getActorList() {return ActorList;}
|
2001-04-08 22:46:34 +02:00
|
|
|
int getPlatformCount() {return PlatformCount;}
|
|
|
|
sThingPlatform **getPlatformList() {return PlatformList;}
|
2001-02-06 18:15:28 +01:00
|
|
|
CLayerCollision *getCollisionLayer() {return CollisionLayer;}
|
2001-02-12 16:26:00 +01:00
|
|
|
DVECTOR getMapSize();
|
2001-01-15 23:19:34 +01:00
|
|
|
|
2001-04-03 23:28:56 +02:00
|
|
|
int GetNextLevel(int Lvl);
|
2000-12-06 23:52:00 +01:00
|
|
|
private:
|
2001-04-19 01:04:03 +02:00
|
|
|
void initLayers();
|
|
|
|
void DisplayLoadingScreen(sLvlTab *lvlTab);
|
2001-04-03 23:28:56 +02:00
|
|
|
|
2001-04-19 17:12:21 +02:00
|
|
|
sLevelHdr *LevelHdr;
|
2000-12-07 16:56:20 +01:00
|
|
|
|
2001-01-16 17:20:45 +01:00
|
|
|
static DVECTOR MapPos;
|
2001-03-07 22:27:57 +01:00
|
|
|
static DVECTOR s_playerSpawnPos;
|
2000-12-12 21:56:51 +01:00
|
|
|
|
2001-02-09 18:01:04 +01:00
|
|
|
TPAGE_DESC m_levelTPage;
|
|
|
|
|
2000-12-08 15:48:50 +01:00
|
|
|
// Tile Layers
|
2001-02-02 20:16:49 +01:00
|
|
|
CLayerTile *TileLayers[CLayerTile::LAYER_TILE_TYPE_MAX];
|
2001-04-03 23:28:56 +02:00
|
|
|
|
2001-02-02 20:16:49 +01:00
|
|
|
// Collision
|
|
|
|
CLayerCollision *CollisionLayer;
|
2001-04-03 23:28:56 +02:00
|
|
|
|
2001-04-02 02:17:48 +02:00
|
|
|
// Things
|
|
|
|
int ActorCount;
|
|
|
|
sThingActor **ActorList;
|
|
|
|
int ItemCount;
|
|
|
|
sThingItem *ItemList;
|
|
|
|
int PlatformCount;
|
|
|
|
sThingPlatform **PlatformList;
|
2001-04-07 23:17:27 +02:00
|
|
|
int TriggerCount;
|
|
|
|
sThingTrigger *TriggerList;
|
|
|
|
int FXCount;
|
|
|
|
sThingFX *FXList;
|
2001-04-02 02:17:48 +02:00
|
|
|
|
2000-12-06 23:52:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#endif
|