skip to content
==> include/mesh/top_ui_doom.h <==
1/* @ajax/mesh-top-ui-doom: mesh-top's Doom tab (crates/mesh-top src/ui.rs, "3 doom"): the
2 * raycaster's frame in half blocks (two pixels a cell, fogged walls), the placement's shown frame
3 * with a row marking which machine rendered each column, the 16x16 minimap and the player pane. */
4#ifndef MESH_TOP_UI_DOOM_H
5#define MESH_TOP_UI_DOOM_H
6
7#include "mesh/top_ui_kit.h"
8
9/* The frame meshd's placement shows (the show region's current buffer): its column arrays' view
10 * offsets, its frame number and which system rendered each part (4 bits per part). */
11typedef struct {
12    uint32_t arrays[4];
13    uint32_t frame, sys;
14} mt_shown;
15bool mt_shown_frame(const mt_section *p, mt_shown *out);
16tui_color mt_wall_color(uint32_t kind, uint32_t side, float dist);
17/* The frame: doom's columns stretched to the pane, from column arrays at `at` (heights, kinds,
18 * sides, dists). */
19void mt_render_doom_at(mt_frame *f, tui_rect area, const mt_section *p, const uint32_t at[4]);
20void mt_render_doom(mt_frame *f, tui_rect area, const mt_section *p);
21void mt_draw_doom(mt_frame *f, tui_rect area, const mt_app *app);
22
23#endif