SBSPSS/source/level/level.h

79 lines
1.8 KiB
C
Raw Normal View History

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?
struct sLvlTab
{
FileEquate LevelInfo;
FileEquate TileBank,Level,Tex;
int exitX,exitY,exitW,exitH;
int spawnX,spawnY;
int Spr0,Spr1;
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
void init();
2001-04-03 23:28:56 +02:00
void shutdown(bool CleanUp);
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-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:
2000-12-08 15:48:50 +01:00
void initLayers();
2001-04-03 23:28:56 +02:00
void initNewLevel(sLvlTab *LevelDat);
void DisplayLoadingScreen();
void DoPaulsTempCrap(sLvlTab *LevelDat);
sLevelInfo *LevelInfo;
u8 *PakBuffer,*LevelBuffer;
2000-12-07 16:56:20 +01:00
2001-03-08 00:20:09 +01:00
sTile *TileBank;
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;
2000-12-06 23:52:00 +01:00
};
/*****************************************************************************/
#endif