My Project
 
Loading...
Searching...
No Matches
Room Class Reference

#include <room.h>

Inheritance diagram for Room:
Collaboration diagram for Room:

Classes

class  Door
 

Public Types

enum  Type {
  NONE , STANDARD , ENTRANCE , EXIT ,
  BOSS_EXIT , TUNNEL , PASSAGE , SHOP ,
  BLACKSMITH , TREASURY , ARMORY , LIBRARY ,
  LABORATORY , VAULT , TRAPS , STORAGE ,
  MAGIC_WELL , GARDEN , CRYPT , STATUE ,
  POOL , RAT_KING , WEAK_FLOOR , PIT ,
  ALTAR , ALL
}
 
typedef void(* PaintMethod) (Level *l, Room *r)
 

Public Member Functions

 Room ()
 
void set (int left, int top, int right, int bottom)
 
void set (Rect b)
 
void addNeigbour (Room *other)
 
int width ()
 
int height ()
 
Point center ()
 
void connect (Room *room)
 
int random ()
 
int random (int m)
 
Rect getBounds ()
 
Doorentrance ()
 
bool inside (int p)
 
virtual int Distance ()
 
virtual void Distance (int v)
 
virtual int Price ()
 
virtual void Price (int v)
 
virtual std::set< Graph::Node * > edges ()
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
virtual std::string getClassName ()
 

Static Public Member Functions

static void useType (Type type)
 
static void paint (Type type, Level *level, Room *r)
 
static PaintMethod getPaintMethod (Type type)
 
static void shuffleTypes ()
 

Public Attributes

std::set< Room * > neigbours
 
std::map< Room *, Door * > connected
 
int distance
 
int price
 
Type type
 

Static Public Attributes

static std::list< TypeSPECIALS
 

Member Typedef Documentation

◆ PaintMethod

typedef void(* Room::PaintMethod) (Level *l, Room *r)

Member Enumeration Documentation

◆ Type

enum Room::Type
Enumerator
NONE 
STANDARD 
ENTRANCE 
EXIT 
BOSS_EXIT 
TUNNEL 
PASSAGE 
SHOP 
BLACKSMITH 
TREASURY 
ARMORY 
LIBRARY 
LABORATORY 
VAULT 
TRAPS 
STORAGE 
MAGIC_WELL 
GARDEN 
CRYPT 
STATUE 
POOL 
RAT_KING 
WEAK_FLOOR 
PIT 
ALTAR 
ALL 

Constructor & Destructor Documentation

◆ Room()

Room::Room ( )
Here is the caller graph for this function:

Member Function Documentation

◆ addNeigbour()

void Room::addNeigbour ( Room * other)
Here is the call graph for this function:

◆ center()

Point Room::center ( )
Here is the caller graph for this function:

◆ connect()

void Room::connect ( Room * room)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Distance() [1/2]

virtual int Room::Distance ( )
inlinevirtual

Implements Graph::Node.

◆ Distance() [2/2]

virtual void Room::Distance ( int v)
inlinevirtual

Implements Graph::Node.

◆ edges()

virtual std::set< Graph::Node * > Room::edges ( )
inlinevirtual

Implements Graph::Node.

◆ entrance()

Room::Door * Room::entrance ( )
Here is the caller graph for this function:

◆ getBounds()

Rect Room::getBounds ( )
inline
Here is the caller graph for this function:

◆ getClassName()

virtual std::string Room::getClassName ( )
inlinevirtual

◆ getPaintMethod()

Room::PaintMethod Room::getPaintMethod ( Type type)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ height()

int Room::height ( )
Here is the caller graph for this function:

◆ inside()

bool Room::inside ( int p)

◆ paint()

void Room::paint ( Type type,
Level * level,
Room * r )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Price() [1/2]

virtual int Room::Price ( )
inlinevirtual

Implements Graph::Node.

◆ Price() [2/2]

virtual void Room::Price ( int v)
inlinevirtual

Implements Graph::Node.

◆ random() [1/2]

int Room::random ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ random() [2/2]

int Room::random ( int m)

◆ restoreFromBundle()

void Room::restoreFromBundle ( Bundle * bundle)
virtual

◆ set() [1/2]

void Room::set ( int left,
int top,
int right,
int bottom )
Here is the caller graph for this function:

◆ set() [2/2]

void Room::set ( Rect b)

◆ shuffleTypes()

void Room::shuffleTypes ( )
static
Here is the caller graph for this function:

◆ storeInBundle()

void Room::storeInBundle ( Bundle * bundle)
virtual

◆ useType()

void Room::useType ( Type type)
static
Here is the caller graph for this function:

◆ width()

int Room::width ( )
Here is the caller graph for this function:

Member Data Documentation

◆ connected

std::map<Room*, Door*> Room::connected

◆ distance

int Room::distance

◆ neigbours

std::set<Room*> Room::neigbours

◆ price

int Room::price

◆ SPECIALS

std::list< Room::Type > Room::SPECIALS
static

◆ type

Type Room::type

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