My Project
 
Loading...
Searching...
No Matches
RegularLevel Class Referenceabstract

#include <regularlevel.h>

Inheritance diagram for RegularLevel:
Collaboration diagram for RegularLevel:

Public Member Functions

 RegularLevel ()
 
virtual ~RegularLevel ()
 
virtual int nMobs ()
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
Roomroom (int pos)
 
- Public Member Functions inherited from Level
 Level ()
 
virtual ~Level ()
 
void create ()
 
void clear ()
 
int pitCell ()
 
int randomRespawnCell ()
 
int adjustPos (int pos)
 
virtual std::string tilesTex ()
 
virtual std::string waterTex ()
 
void reset ()
 
std::vector< bool > updateFieldOfView (Char *c)
 
int tunnelTile ()
 
int randomDestination ()
 
void mobPress (Mob *mob)
 
Heapdrop (Item *item, int cell)
 
void uproot (int pos)
 
Plantplant (Plant::Seed *seed, int pos)
 
void press (int cell, Char *ch)
 
void destroy (int pos)
 
String tileName (int tile)
 
String tileDesc (int tile)
 
void addVisuals (Scene *scene)
 

Public Attributes

int secretDoors
 
- Public Attributes inherited from Level
std::vector< int > map
 
std::vector< bool > visited
 
std::vector< bool > mapped
 
int viewDistance
 
Feeling feeling
 
int entrance
 
int exit
 
HashSet< Mob * > mobs
 
HashMap< std::string, Blob * > blobs
 
HashMap< int, Heap * > heaps
 
HashMap< int, Plant * > plants
 
int color1
 
int color2
 

Protected Member Functions

virtual bool build ()
 
bool initRooms ()
 
void split (Rect rect)
 
void paint ()
 
void paintWater ()
 
void paintGrass ()
 
void placeTraps ()
 
void paintDoors (Room *r)
 
void assignRoomType ()
 
RoomrandomRoom (Room::Type type, int tries)
 
int randomDropCell ()
 
bool joinRooms (Room *r, Room *n)
 
int nTraps ()
 
std::vector< float > trapChances ()
 
virtual void createMobs ()
 
virtual void createItems ()
 
virtual std::vector< bool > water ()=0
 
virtual std::vector< bool > grass ()=0
 
- Protected Member Functions inherited from Level
virtual void decorate ()=0
 

Protected Attributes

std::list< Room::Typespecials
 
std::set< Room * > rooms
 
int minRoomSize
 
int maxRoomSize
 
RoomroomEntrance
 
RoomroomExit
 

Additional Inherited Members

- Public Types inherited from Level
enum  Feeling { NONE , CHASM , WATER , GRASS }
 
- Static Public Member Functions inherited from Level
static int distance (int a, int b)
 
static bool adjacent (int a, int b)
 
static void set (int cell, int terrain)
 
- Static Public Attributes inherited from Level
static const int WIDTH = 32
 
static const int HEIGHT = 32
 
static const int LENGTH = WIDTH * HEIGHT
 
static const int NEIGHBOURS4 [] = { -Level::WIDTH, +1, +Level::WIDTH, -1 }
 
static const int NEIGHBOURS8 [] = { +1, -1, +Level::WIDTH, -Level::WIDTH, +1 + Level::WIDTH, +1 - Level::WIDTH, -1 + Level::WIDTH, -1 - Level::WIDTH }
 
static const int NEIGHBOURS9 [] = { 0, +1, -1, +Level::WIDTH, -Level::WIDTH, +1 + Level::WIDTH, +1 - Level::WIDTH, -1 + Level::WIDTH, -1 - Level::WIDTH }
 
static bool resizingNeeded
 
static int loadedMapSize
 
static std::vector< bool > fieldOfView
 
static std::vector< bool > passable
 
static std::vector< bool > losBlocking
 
static std::vector< bool > flamable
 
static std::vector< bool > secret
 
static std::vector< bool > solid
 
static std::vector< bool > avoid
 
static std::vector< bool > water
 
static std::vector< bool > pit
 
static std::vector< bool > discoverable
 
- Static Protected Attributes inherited from Level
static const float TIME_TO_RESPAWN = 50
 
static bool pitRoomNeeded = false
 
static bool weakFloorCreated = false
 

Constructor & Destructor Documentation

◆ RegularLevel()

RegularLevel::RegularLevel ( )

◆ ~RegularLevel()

RegularLevel::~RegularLevel ( )
virtual

Member Function Documentation

◆ assignRoomType()

void RegularLevel::assignRoomType ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build()

bool RegularLevel::build ( )
protectedvirtual

Implements Level.

Here is the call graph for this function:

◆ createItems()

void RegularLevel::createItems ( )
protectedvirtual

Implements Level.

Reimplemented in SewerLevel.

Here is the caller graph for this function:

◆ createMobs()

void RegularLevel::createMobs ( )
protectedvirtual

Implements Level.

Reimplemented in SewerLevel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grass()

virtual std::vector< bool > RegularLevel::grass ( )
protectedpure virtual

Implemented in SewerLevel.

Here is the caller graph for this function:

◆ initRooms()

bool RegularLevel::initRooms ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ joinRooms()

bool RegularLevel::joinRooms ( Room * r,
Room * n )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nMobs()

int RegularLevel::nMobs ( )
virtual

Reimplemented from Level.

Here is the caller graph for this function:

◆ nTraps()

int RegularLevel::nTraps ( )
protected
Here is the caller graph for this function:

◆ paint()

void RegularLevel::paint ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paintDoors()

void RegularLevel::paintDoors ( Room * r)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paintGrass()

void RegularLevel::paintGrass ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paintWater()

void RegularLevel::paintWater ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ placeTraps()

void RegularLevel::placeTraps ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ randomDropCell()

int RegularLevel::randomDropCell ( )
protected
Here is the call graph for this function:

◆ randomRoom()

Room * RegularLevel::randomRoom ( Room::Type type,
int tries )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restoreFromBundle()

void RegularLevel::restoreFromBundle ( Bundle * bundle)
virtual

◆ room()

Room * RegularLevel::room ( int pos)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ split()

void RegularLevel::split ( Rect rect)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ storeInBundle()

void RegularLevel::storeInBundle ( Bundle * bundle)
virtual

◆ trapChances()

std::vector< float > RegularLevel::trapChances ( )
protected
Here is the caller graph for this function:

◆ water()

virtual std::vector< bool > RegularLevel::water ( )
protectedpure virtual

Implemented in SewerLevel.

Here is the caller graph for this function:

Member Data Documentation

◆ maxRoomSize

int RegularLevel::maxRoomSize
protected

◆ minRoomSize

int RegularLevel::minRoomSize
protected

◆ roomEntrance

Room* RegularLevel::roomEntrance
protected

◆ roomExit

Room* RegularLevel::roomExit
protected

◆ rooms

std::set<Room*> RegularLevel::rooms
protected

◆ secretDoors

int RegularLevel::secretDoors

◆ specials

std::list<Room::Type> RegularLevel::specials
protected

The documentation for this class was generated from the following files: