coastline 0.0.4
Loading...
Searching...
No Matches
textgrid.h File Reference

A text-mode screen of 80 by 25 cells, each a character of code page 437 with a foreground and a background colour of the 16 colours of CGA. More...

#include <array>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
Include dependency graph for textgrid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  coastline::TextCell
 A cell of the grid. More...
class  coastline::TextGrid
 The cells of the screen and the place of the text cursor. More...

Namespaces

namespace  coastline

Enumerations

enum class  coastline::CgaColor : std::uint8_t {
  coastline::Black , coastline::Blue , coastline::Green , coastline::Cyan ,
  coastline::Red , coastline::Magenta , coastline::Brown , coastline::LightGray ,
  coastline::DarkGray , coastline::LightBlue , coastline::LightGreen , coastline::LightCyan ,
  coastline::LightRed , coastline::LightMagenta , coastline::Yellow , coastline::White
}
 The 16 colours of CGA, by their number. More...

Functions

std::uint8_t coastline::Cp437FromCodepoint (char32_t codepoint)
std::u32string coastline::DecodeUtf8 (std::string_view text)
std::string coastline::EncodeUtf8 (std::u32string_view text)

Variables

constexpr int coastline::GRID_COLUMNS = 80
 The columns of the grid.
constexpr int coastline::GRID_ROWS = 25
 The rows of the grid.
constexpr int coastline::CELL_WIDTH = 8
 The width of a cell in pixels.
constexpr int coastline::CELL_HEIGHT = 16
 The height of a cell in pixels.
constexpr std::array< std::array< std::uint8_t, 3 >, 16 > coastline::CGA_PALETTE
 The red, green, and blue of each colour of CGA, by its number.
constexpr std::uint8_t coastline::REPLACEMENT_GLYPH = 0
 The glyph drawn for a character code page 437 does not have.

Detailed Description

A text-mode screen of 80 by 25 cells, each a character of code page 437 with a foreground and a background colour of the 16 colours of CGA.