HOG2
Functions
MapGenerators.h File Reference
#include "Map.h"
Include dependency graph for MapGenerators.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void MakeMaze (Map *map, int width=1, int startx=-1, int starty=-1)
 MakeMaze(map) More...
 
void MakeMaze (Map *m, float straightPercent, float branchPercent)
 
void MakeRandomMap (Map *map, int obstacles)
 
void MakePseudoMaze (Map *map, int pathSize)
 MakeMaze(map, pathsize) More...
 
void BuildRandomRoomMap (Map *map, int roomSize, int openingProbability=80)
 
MapMakeWarehouseMap (int columns, int rows, int corridor, int shelfWidth, int shelfHeight, int leftMargin, int rightMargin)
 

Function Documentation

◆ BuildRandomRoomMap()

void BuildRandomRoomMap ( Map map,
int  roomSize,
int  openingProbability = 80 
)

◆ MakeMaze() [1/2]

void MakeMaze ( Map m,
float  straightPercent,
float  branchPercent 
)

◆ MakeMaze() [2/2]

void MakeMaze ( Map map,
int  width = 1,
int  startx = -1,
int  starty = -1 
)

◆ MakePseudoMaze()

void MakePseudoMaze ( Map map,
int  pathSize 
)

MakeMaze(map, pathsize)

A cheap function I hacked together to make psuedo mazes. The only good values for pathSize are 1 and 3.

Definition at line 20 of file MapGenerators.cpp.

References Map::GetHeight(), Map::GetMapHeight(), Map::GetMapWidth(), height, kGround, kOutOfBounds, Map::SetHeight(), Map::SetRectHeight(), Map::SetTerrainType(), and width.

◆ MakeRandomMap()

void MakeRandomMap ( Map map,
int  obstacles 
)

◆ MakeWarehouseMap()

Map* MakeWarehouseMap ( int  columns,
int  rows,
int  corridor,
int  shelfWidth,
int  shelfHeight,
int  leftMargin,
int  rightMargin 
)

Definition at line 388 of file MapGenerators.cpp.

References kTrees.