EPOK RUNTIME
namespace epok::dungeon
10 types, 16 functions and 3 data symbols.
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.
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.EnumMinimapRendererDraws the dungeon minimap over the world and under the HUD: one flat rectangle per shown map rectangle and icon, in fixed double-buffered packets.Class templatePointDataA key, item, locked door or spot: where it is and which room it belongs to.StructRandomThe dungeon generator's random stream, bit-identical to src/dungeon_random.rs: xoshiro128** seeded through a SplitMix32 sequence.ClassRoomDataWhat 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
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.Function