Building Game Engines
BSPMapGenerator Class Reference

represents a bsp node More...

#include <MapGenerator.hpp>

Collaboration diagram for BSPMapGenerator:
Collaboration graph

Public Member Functions

 BSPMapGenerator ()
 the end room, at the other child of the root More...
 
 ~BSPMapGenerator ()
 empty desstructor, for reuse purpose More...
 
void generateMap (int *m_Tiles)
 trigger all map generation functions More...
 
Position getStartPos ()
 returns the start room data, for player spawning at correct place More...
 

Public Attributes

bool rootSplitted
 storing the root node More...
 
bool rootSplitH
 is the root splitted? More...
 
int rootSplitPos
 how is the root splitted, horizontally or vertically More...
 
RoomstartRoom
 where does the root splitted More...
 
RoomendRoom
 the start room, at one of the root's children More...
 

Detailed Description

represents a bsp node

Constructor & Destructor Documentation

◆ BSPMapGenerator()

BSPMapGenerator::BSPMapGenerator ( )

the end room, at the other child of the root

empty constructor, for reuse purpose

◆ ~BSPMapGenerator()

BSPMapGenerator::~BSPMapGenerator ( )

empty desstructor, for reuse purpose

Member Function Documentation

◆ generateMap()

void BSPMapGenerator::generateMap ( int *  m_Tiles)

trigger all map generation functions

Parameters
m_Tilesthe given empty map data structure

◆ getStartPos()

Position BSPMapGenerator::getStartPos ( )

returns the start room data, for player spawning at correct place

Member Data Documentation

◆ endRoom

Room* BSPMapGenerator::endRoom

the start room, at one of the root's children

◆ rootSplitH

bool BSPMapGenerator::rootSplitH

is the root splitted?

◆ rootSplitPos

int BSPMapGenerator::rootSplitPos

how is the root splitted, horizontally or vertically

◆ rootSplitted

bool BSPMapGenerator::rootSplitted

storing the root node

◆ startRoom

Room* BSPMapGenerator::startRoom

where does the root splitted