Classes | |
| struct | dungeon_meta |
Functions | |
| bool | rolled_over (int given) |
| bool | is_empty_space (IntPoint point, const dungeon_meta &dm) |
| bool | point_is_beyond_bounds (IntPoint point, const dungeon_meta &dm) |
| std::bitset< 4 > | edges_collide_with_something (Room &r, const dungeon_meta &dm) |
| int | determine_which_wall (IntPoint point, const dungeon_meta &dm) |
| Room | build_room (IntPoint tl, IntPoint br, dungeon_meta &dm) |
| IntPoint | rand_wall_block (const Room ¤t_room) |
| IntPoint | get_next_point (IntPoint this_point, int direction) |
| void | set_wall_if_not_path (int row, int col, dungeon_meta &dm) |
| void | reset (dungeon_meta &dm) |
| ChunkLayer * | get_dungeon (dungeon_meta &dm) |
A namespace from which all dungeon-building classes inherit.
This provides core functionality that those dungeon builders share.
Builds a room in the dungeon with the given points.
| tl | - the top-left corner of the room. |
| br | - the bottom-right corner of the room. |
| dm | - instance of a dungeon to work on |
| int dungeon_builder::determine_which_wall | ( | IntPoint | point, |
| const dungeon_meta & | dm | ||
| ) |
Determines which wall of a room a given point lies on.
| point | - a point which has previously been determined to lie on the edge of a room wall. |
| dm | - instance of a dungeon to work on |
| std::bitset< 4 > dungeon_builder::edges_collide_with_something | ( | Room & | r, |
| const dungeon_meta & | dm | ||
| ) |
Determines whether the edges of a given room collide with another room.
| r | - the room to check |
| dm | - instance of a dungeon to work on |
Finds the adjacent point in the given direction
| this_point | - the current point. |
| direction | - the direction to move, where 0 = up, 1 = right, 2 = down, and 3 = left. |
| bool dungeon_builder::is_empty_space | ( | IntPoint | point, |
| const dungeon_meta & | dm | ||
| ) |
Check if the given point on the dungeon model can be written over.
| point | - the point to check. |
| dm | - instance of a dungeon to work on |
| bool dungeon_builder::point_is_beyond_bounds | ( | IntPoint | point, |
| const dungeon_meta & | dm | ||
| ) |
Determines whether or not the given point is beyond the bounds of the dungeon.
| point | - the point to check |
| dm | - instance of a dungeon to work on |
Finds a random tile on the circumference of the given room.
| current_room | - the room to use. |
| void dungeon_builder::reset | ( | dungeon_meta & | dm | ) |
Resets the num_rooms and main_dungeon variables, effectively clearing the dungeon. The dungeon must be initialized before calling this method.
| dm | - instance of a dungeon to work on |
| bool dungeon_builder::rolled_over | ( | int | given | ) |
Has an n% chance of returning 'true', where n is the given number.
| given | - the desired probability that this check will return true. |
| void dungeon_builder::set_wall_if_not_path | ( | int | row, |
| int | col, | ||
| dungeon_meta & | dm | ||
| ) |
Sets the given point to a ROOM_WALL tile if it is not a PATH tile.
| row | |
| col | |
| dm | - instance of a dungeon to work on |
1.8.8