EPOK RUNTIME
Dungeon Map
dungeon_map.hpp · the dungeon map module
Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.
Module
the dungeon map module.
Include this module
C++ include
#include "dungeon_map.hpp"Types
MapStruct declared by the dungeon-map module for the dungeon map module.StructMapRectThe minimap: the walkable cells of the dungeon's plane as rectangles, in cells from the minimap grid's corner.StructMinimapStruct declared by the dungeon-map module for the dungeon map module.StructMinimapColorEnum declared by the dungeon-map module for the dungeon map module.EnumMinimapFlagVisible shows the box; follow keeps the player in its middle at `cell` pixels a cell instead of fitting the dungeon; everything skips the fog; full fills the screen; right and bottom measure the box's corner from those screen edges.EnumPointDataA key, item, locked door or spot: where it is and which room it belongs to.StructRoomDataWhat the editor baked about the map's generated dungeon, for the Dungeon gameplay queries.StructRoomFlagEnum declared by the dungeon-map module for the dungeon map module.EnumFunctions and methods
explore_atExplores where a point stands: its rectangle, and its whole room the first time.Functionexplore_everythingPerforms `explore everything` as part of the dungeon map module.Functionexplore_roomMarks a room and every rectangle of it explored.Functionfloor_dividePerforms `floor divide` as part of the dungeon map module.Functionforget_everythingPerforms `forget everything` as part of the dungeon map module.Functionmap_cellThe minimap cell holding a world point; false outside the grid.Functionnext_roomThe neighbour of `from` on a shortest way to `to`: `to` itself when they are linked, `from` when they are the same room, -1 when there is no way.FunctionrandomA gameplay random number below `below`, the same for the same stream, index and dungeon seed on every run.Functionrect_atThe rectangle holding a minimap cell, or -1.Functionrect_exploredPerforms `rect explored` as part of the dungeon map module.FunctionresetResets reset as part of the dungeon map module.Functionreset_minimapResets minimap as part of the dungeon map module.FunctionroomPerforms `room` as part of the dungeon map module.Functionroom_atThe room whose bounds hold the point, in the dungeon's plane; -1 in corridors and outside.Functionroom_exploredPerforms `room explored` as part of the dungeon map module.FunctionwalkBreadth-first over the room links.FunctionFields, variables and values
cellExposes `cell` on `epok::dungeon::Minimap` for the dungeon map module.FieldcenterExposes `center` on `epok::dungeon::RoomData` for the dungeon map module.Fieldcolor_backgroundNamed value `color_background` in `epok::dungeon::MinimapColor`.Enum valuecolor_corridorNamed value `color_corridor` in `epok::dungeon::MinimapColor`.Enum valuecolor_goalNamed value `color_goal` in `epok::dungeon::MinimapColor`.Enum valuecolor_keyNamed value `color_key` in `epok::dungeon::MinimapColor`.Enum valuecolor_lockNamed value `color_lock` in `epok::dungeon::MinimapColor`.Enum valuecolor_playerNamed value `color_player` in `epok::dungeon::MinimapColor`.Enum valuecolor_roomNamed value `color_room` in `epok::dungeon::MinimapColor`.Enum valuecolor_seenNamed value `color_seen` in `epok::dungeon::MinimapColor`.Enum valuecolorsExposes `colors` on `epok::dungeon::Minimap` for the dungeon map module.FieldcolumnsExposes `columns` on `epok::dungeon::Minimap` for the dungeon map module.FieldcornerThe grid's corner and one cell's step on the dungeon's plane, world raw values: (x, z) in 3D, (x, y) pixels in 2D.FieldcountExposes `count` on `epok::dungeon::Minimap` for the dungeon map module.FielddepthExposes `depth` on `epok::dungeon::RoomData` for the dungeon map module.FieldexploredExplored rectangles, one bit each; rooms explored, one bit each.Fieldfirst_neighbourExposes `first_neighbour` on `epok::dungeon::RoomData` for the dungeon map module.Fieldfirst_spotExposes `first_spot` on `epok::dungeon::RoomData` for the dungeon map module.FieldflagsExposes `flags` on `epok::dungeon::Minimap` for the dungeon map module.FieldflagsExposes `flags` on `epok::dungeon::RoomData` for the dungeon map module.FieldgoalExposes `goal` on `epok::dungeon::Map` for the dungeon map module.Fieldgoal_roomNamed value `goal_room` in `epok::dungeon::RoomFlag`.Enum valuehExposes `h` on `epok::dungeon::MapRect` for the dungeon map module.FieldheightWhere it draws: the box's corner and size in pixels, pixels per cell when it follows the player, and MinimapFlag bits.Fielditem_actorsExposes `item_actors` on `epok::dungeon::Minimap` for the dungeon map module.Fielditem_countExposes `item_count` on `epok::dungeon::Map` for the dungeon map module.Fielditem_roomNamed value `item_room` in `epok::dungeon::RoomFlag`.Enum valueitemsExposes `items` on `epok::dungeon::Map` for the dungeon map module.Fieldkey_roomNamed value `key_room` in `epok::dungeon::RoomFlag`.Enum valuelevelExposes `level` on `epok::dungeon::RoomData` for the dungeon map module.FieldlockExposes `lock` on `epok::dungeon::PointData` for the dungeon map module.Fieldlock_actorsExposes `lock_actors` on `epok::dungeon::Minimap` for the dungeon map module.Fieldlock_countExposes `lock_count` on `epok::dungeon::Map` for the dungeon map module.Fieldlocked_roomNamed value `locked_room` in `epok::dungeon::RoomFlag`.Enum valuelocksExposes `locks` on `epok::dungeon::Map` for the dungeon map module.FieldmapExposes `map` on the `epok::dungeon` namespace for the dungeon map module.VariablemaximumExposes `maximum` on `epok::dungeon::RoomData` for the dungeon map module.FieldminimapExposes `minimap` on the `epok::dungeon` namespace for the dungeon map module.Variableminimap_bottomNamed value `minimap_bottom` in `epok::dungeon::MinimapFlag`.Enum valueminimap_colorsNamed value `minimap_colors` in `epok::dungeon::MinimapColor`.Enum valueminimap_everythingNamed value `minimap_everything` in `epok::dungeon::MinimapFlag`.Enum valueminimap_followNamed value `minimap_follow` in `epok::dungeon::MinimapFlag`.Enum valueminimap_fullNamed value `minimap_full` in `epok::dungeon::MinimapFlag`.Enum valueminimap_rightNamed value `minimap_right` in `epok::dungeon::MinimapFlag`.Enum valueminimap_visibleNamed value `minimap_visible` in `epok::dungeon::MinimapFlag`.Enum valueminimumExposes `minimum` on `epok::dungeon::RoomData` for the dungeon map module.FieldnearExposes `near` on `epok::dungeon::MapRect` for the dungeon map module.FieldneighboursExposes `neighbours` on `epok::dungeon::Map` for the dungeon map module.FieldneighboursExposes `neighbours` on `epok::dungeon::RoomData` for the dungeon map module.FieldpathExposes `path` on `epok::dungeon::RoomData` for the dungeon map module.FieldplayerRuntime object slots: the player, each item's actor and each lock's door; -1 when there is none.FieldpositionExposes `position` on `epok::dungeon::PointData` for the dungeon map module.FieldrectsExposes `rects` on `epok::dungeon::Minimap` for the dungeon map module.FieldroomExposes `room` on `epok::dungeon::MapRect` for the dungeon map module.FieldroomExposes `room` on `epok::dungeon::PointData` for the dungeon map module.Fieldroom_countExposes `room_count` on `epok::dungeon::Map` for the dungeon map module.FieldroomsExposes `rooms` on `epok::dungeon::Map` for the dungeon map module.Fieldrooms_exploredExposes `rooms_explored` on the `epok::dungeon` namespace for the dungeon map module.VariablerowsExposes `rows` on `epok::dungeon::Minimap` for the dungeon map module.FieldseedExposes `seed` on `epok::dungeon::Map` for the dungeon map module.FieldspawnExposes `spawn` on `epok::dungeon::Map` for the dungeon map module.Fieldspawn_roomNamed value `spawn_room` in `epok::dungeon::RoomFlag`.Enum valuespotsExposes `spots` on `epok::dungeon::Map` for the dungeon map module.FieldspotsExposes `spots` on `epok::dungeon::RoomData` for the dungeon map module.FieldstepExposes `step` on `epok::dungeon::Minimap` for the dungeon map module.Fieldto_goalExposes `to_goal` on `epok::dungeon::RoomData` for the dungeon map module.Fieldtwo_dExposes `two_d` on `epok::dungeon::Map` for the dungeon map module.FieldunusedExposes `unused` on `epok::dungeon::MapRect` for the dungeon map module.FieldwExposes `w` on `epok::dungeon::MapRect` for the dungeon map module.FieldwidthWhere it draws: the box's corner and size in pixels, pixels per cell when it follows the player, and MinimapFlag bits.FieldxExposes `x` on `epok::dungeon::MapRect` for the dungeon map module.FieldxWhere it draws: the box's corner and size in pixels, pixels per cell when it follows the player, and MinimapFlag bits.FieldyExposes `y` on `epok::dungeon::MapRect` for the dungeon map module.FieldyWhere it draws: the box's corner and size in pixels, pixels per cell when it follows the player, and MinimapFlag bits.Field