Expand description
prelude
Modules§
Macros§
- add_
wasm_ support - embedded_
resource - Declare an embedded resource.
- link_
resource - Link an embedded resource, making it available to
bracket-lib
via the resources system. - smallvec
- Creates a
SmallVec
containing the arguments.
Structs§
- Alpha
Lerp - Implements an Alpha-Only Lerp as an iterator
- BACKEND
- BACKEND_
INTERNAL - BTerm
- A BTerm context.
- BTerm
Builder - Provides a builder mechanism for initializing BTerm. You can chain builders together,
and and with a call to
.build()
. This allows you to provide settings if you want to, or just use a simple initializer if you are in a hurry. - BTerm
Internal - BTerm
Platform - Provides a base abstract platform for BTerm to run on, with specialized content.
- Bresenham
- Line-drawing iterator
- Bresenham
Circle - An implementation of [Bresenham’s circle algorithm]. [Bresenham’s circle algorithm]: http://members.chello.at/~easyfilter/bresenham.html Derived from the line_drawing crate, but specialized to use BTerm’s types.
- Bresenham
Circle NoDiag - A version of the Bresenham circle that does not make diagonal jumps
- Bresenham
Inclusive - New type over
Bresenham
which include theend
points when iterated over. - Color
Pair - Represents two colors together, a foreground and a background. Frequently used to represent a glyph rendered on a console with a solid background color.
- Degrees
- Convenience type: you can define an angle in Degrees and it is convertible to Radians (and vice versa)
- Dice
Iterator - Dice
Parse Error - Dice
Type - Dijkstra
Map - Representation of a Dijkstra flow map. map is a vector of floats, having a size equal to size_x * size_y (one per tile). size_x and size_y are stored for overflow avoidance. max_depth is the maximum number of iterations this search shall support.
- Display
Console - A display console, used internally to provide console render support. Public in case you want to play with it, or access it directly.
- Draw
Batch - Represents a batch of drawing commands, designed to be submitted together.
- EMBED
- Fast
Noise - Flexi
Console - A sparse console. Rather than storing every cell on the screen, it stores just cells that have data.
- Flexi
Tile - Internal storage structure for sparse tiles.
- Font
- BTerm’s representation of a font or tileset file.
- HSV
- Represents an H/S/V triplet, in the range 0..1 (32-bit float) This can provide for a more natural color progression, and provides compatibility with HSV-based color systems.
- HsvLerp
- An HSV Lerp - transition from one HSV color to another in a set number of steps.
- INPUT
- Init
Hints - Input
- Represents the current input state. The old key/mouse fields remain available for compatibility.
- Multi
Tile Sprite - Represents a sprite consisting of multiple glyphs/colors, occupying multiple console locations.
- Navigation
Path - Holds the result of an A-Star navigation query.
destination
is the index of the target tile.success
is true if it reached the target, false otherwise.steps
is a vector of each step towards the target, including the starting position. - OutOf
Space - Point
- Helper struct defining a 2D point in space.
- Point3
- Helper struct defining a 2D point in space.
- RGB
- Represents an R/G/B triplet, in the range 0..1 (32-bit float)
- RGBA
- Represents an R/G/B triplet, in the range 0..1 (32-bit float)
- Radians
- Convenience type: you can define an angle in Radians and it is convertible to Degrees (and vice versa)
- Random
Number Generator - Rect
- Defines a two-dimensional rectangle.
- RectF
- Defines a rectangle with floating-point coordinates.
- Render
Sprite - Internal storage structure for sparse tiles.
- RgbLerp
- Implements an RGB Lerp as an iterator
- Rgba
Lerp - Implements an RGBA Lerp as an iterator
- Shader
- Simple
Console - A simple console with background color.
- Small
Vec - A
Vec
-like container that can store a small number of elements inline. - Sparse
Console - A sparse console. Rather than storing every cell on the screen, it stores just cells that have data.
- Sparse
Tile - Internal storage structure for sparse tiles.
- Sprite
- Sprite
Console - A sparse console. Rather than storing every cell on the screen, it stores just cells that have data.
- Sprite
Sheet - Text
Block - Text
Builder - Tile
- The internal storage type for tiles in a simple console.
- Vector
Line - Define a line using a fast 2D vector. It may not be as pixel-perfect as Bresenham, but with vectorization it is sometimes faster for a quick line solution.
- Virtual
Console - XpCell
- Structure representing a character and its foreground/background color
- XpColor
- Structure representing the components of one color
- XpFile
- Structure representing a REXPaint image file which is a stack of layers
- XpLayer
- Structure representing a layer Cells are in the same order as in the file, in column-major order (index of position x,y is y*height + x).
Enums§
- BEvent
- Available device events
- Cellular
Distance Function - Cellular noise distance function to use
- Cellular
Return Type - What type of cellular noise result do you want
- Character
Translation Mode - Command
Type - Distance
Alg - Enumeration of available 2D Distance algorithms
- Draw
Command - Represents a buffered drawing command that can be asynchronously submitted to the drawing buffer, for application at the end of the frame.
- Field
OfView Alg - Enumeration of available FOV algorithms
- Fractal
Type - Fractal function to use
- Html
Color Conversion Error - Error message type when failing to convert a hex code to RGB.
- Interp
- Interpolation function to use
- LineAlg
- Enumeration of available 2D Distance algorithms
- Noise
Type - Type of noise to generate
- Text
Align - Virtual
KeyCode - Symbolic name for a keyboard key.
Constants§
- ALICEBLUE
- ALICE_
BLUE - ANTIQUEWHITE
- ANTIQUEWHIT
E1 - ANTIQUEWHIT
E2 - ANTIQUEWHIT
E3 - ANTIQUEWHIT
E4 - ANTIQUE_
WHITE - AQUA
- AQUAMARINE
- AQUAMARIN
E1 - AQUAMARIN
E2 - AQUAMARIN
E3 - AQUAMARIN
E4 - AZURE
- AZURE1
- AZURE2
- AZURE3
- AZURE4
- BEIGE
- BISQUE
- BISQUE1
- BISQUE2
- BISQUE3
- BISQUE4
- BLACK
- BLANCHEDALMOND
- BLANCHED_
ALMOND - BLUE
- BLUE1
- BLUE2
- BLUE3
- BLUE4
- BLUEVIOLET
- BLUE_
VIOLET - BROWN1
- BROWN2
- BROWN3
- BROWN4
- BROWN_
42 - BURLYWOOD
- BURLYWOO
D1 - BURLYWOO
D2 - BURLYWOO
D3 - BURLYWOO
D4 - CADETBLUE
- CADETBLU
E1 - CADETBLU
E2 - CADETBLU
E3 - CADETBLU
E4 - CADET_
BLUE - CHARTREUSE
- CHARTREUS
E1 - CHARTREUS
E2 - CHARTREUS
E3 - CHARTREUS
E4 - CHOCOLATE
- CHOCOLAT
E1 - CHOCOLAT
E2 - CHOCOLAT
E3 - CHOCOLAT
E4 - CORAL
- CORAL1
- CORAL2
- CORAL3
- CORAL4
- CORNFLOWERBLUE
- CORNFLOWER_
BLUE - CORNSILK
- CORNSIL
K1 - CORNSIL
K2 - CORNSIL
K3 - CORNSIL
K4 - CRIMSON
- CYAN
- CYAN1
- CYAN2
- CYAN3
- CYAN4
- DARKBLUE
- DARKCYAN
- DARKGOLDENROD
- DARKGOLDENRO
D1 - DARKGOLDENRO
D2 - DARKGOLDENRO
D3 - DARKGOLDENRO
D4 - DARKGRAY
- DARKGREEN
- DARKGREY
- DARKKHAKI
- DARKMAGENTA
- DARKOLIVEGREEN
- DARKOLIVEGREE
N1 - DARKOLIVEGREE
N2 - DARKOLIVEGREE
N3 - DARKOLIVEGREE
N4 - DARKORANGE
- DARKORANG
E1 - DARKORANG
E2 - DARKORANG
E3 - DARKORANG
E4 - DARKORCHID
- DARKORCHI
D1 - DARKORCHI
D2 - DARKORCHI
D3 - DARKORCHI
D4 - DARKRED
- DARKSALMON
- DARKSEAGREEN
- DARKSEAGREE
N1 - DARKSEAGREE
N2 - DARKSEAGREE
N3 - DARKSEAGREE
N4 - DARKSLATEBLUE
- DARKSLATEGRAY
- DARKSLATEGRA
Y1 - DARKSLATEGRA
Y2 - DARKSLATEGRA
Y3 - DARKSLATEGRA
Y4 - DARKSLATEGREY
- DARKTURQUOISE
- DARKVIOLET
- DARK_
BLUE - DARK_
CYAN - DARK_
GOLDENROD - DARK_
GRAY - DARK_
GREEN - DARK_
GREY - DARK_
KHAKI - DARK_
MAGENTA - DARK_
OLIVE - DARK_
ORANGE - DARK_
ORCHID - DARK_
RED - DARK_
SALMON - DARK_
SEA - DARK_
SLATE - DARK_
TURQUOISE - DARK_
VIOLET - DEEPPINK
- DEEPPIN
K1 - DEEPPIN
K2 - DEEPPIN
K3 - DEEPPIN
K4 - DEEPSKYBLUE
- DEEPSKYBLU
E1 - DEEPSKYBLU
E2 - DEEPSKYBLU
E3 - DEEPSKYBLU
E4 - DEEP_
PINK - DEEP_
SKY - DIMGRAY
- DIMGREY
- DIM_
GRAY - DIM_
GREY - DODGERBLUE
- DODGERBLU
E1 - DODGERBLU
E2 - DODGERBLU
E3 - DODGERBLU
E4 - DODGER_
BLUE - FIREBRIC
K1 - FIREBRIC
K2 - FIREBRIC
K3 - FIREBRIC
K4 - FIREBRICK_
34 - FLORALWHITE
- FLORAL_
WHITE - FORESTGREEN
- FOREST_
GREEN - FUCHSIA
- GAINSBORO
- GHOSTWHITE
- GHOST_
WHITE - GOLD
- GOLD1
- GOLD2
- GOLD3
- GOLD4
- GOLDENROD
- GOLDENRO
D1 - GOLDENRO
D2 - GOLDENRO
D3 - GOLDENRO
D4 - GRAY
- GRAY0
- GRAY1
- GRAY2
- GRAY3
- GRAY4
- GRAY5
- GRAY6
- GRAY7
- GRAY8
- GRAY9
- GRAY10
- GRAY11
- GRAY12
- GRAY13
- GRAY14
- GRAY15
- GRAY16
- GRAY17
- GRAY18
- GRAY19
- GRAY20
- GRAY21
- GRAY22
- GRAY23
- GRAY24
- GRAY25
- GRAY26
- GRAY27
- GRAY28
- GRAY29
- GRAY30
- GRAY31
- GRAY32
- GRAY33
- GRAY34
- GRAY35
- GRAY36
- GRAY37
- GRAY38
- GRAY39
- GRAY40
- GRAY41
- GRAY42
- GRAY43
- GRAY44
- GRAY45
- GRAY46
- GRAY47
- GRAY48
- GRAY49
- GRAY50
- GRAY51
- GRAY52
- GRAY53
- GRAY54
- GRAY55
- GRAY56
- GRAY57
- GRAY58
- GRAY59
- GRAY60
- GRAY61
- GRAY62
- GRAY63
- GRAY64
- GRAY65
- GRAY66
- GRAY67
- GRAY68
- GRAY69
- GRAY70
- GRAY71
- GRAY72
- GRAY73
- GRAY74
- GRAY75
- GRAY76
- GRAY77
- GRAY78
- GRAY79
- GRAY80
- GRAY81
- GRAY82
- GRAY83
- GRAY84
- GRAY85
- GRAY86
- GRAY87
- GRAY88
- GRAY89
- GRAY90
- GRAY91
- GRAY92
- GRAY93
- GRAY94
- GRAY95
- GRAY96
- GRAY97
- GRAY98
- GRAY99
- GRAY100
- GREEN
- GREEN1
- GREEN2
- GREEN3
- GREEN4
- GREENYELLOW
- GREEN_
YELLOW - GREY
- GREY0
- GREY1
- GREY2
- GREY3
- GREY4
- GREY5
- GREY6
- GREY7
- GREY8
- GREY9
- GREY10
- GREY11
- GREY12
- GREY13
- GREY14
- GREY15
- GREY16
- GREY17
- GREY18
- GREY19
- GREY20
- GREY21
- GREY22
- GREY23
- GREY24
- GREY25
- GREY26
- GREY27
- GREY28
- GREY29
- GREY30
- GREY31
- GREY32
- GREY33
- GREY34
- GREY35
- GREY36
- GREY37
- GREY38
- GREY39
- GREY40
- GREY41
- GREY42
- GREY43
- GREY44
- GREY45
- GREY46
- GREY47
- GREY48
- GREY49
- GREY50
- GREY51
- GREY52
- GREY53
- GREY54
- GREY55
- GREY56
- GREY57
- GREY58
- GREY59
- GREY60
- GREY61
- GREY62
- GREY63
- GREY64
- GREY65
- GREY66
- GREY67
- GREY68
- GREY69
- GREY70
- GREY71
- GREY72
- GREY73
- GREY74
- GREY75
- GREY76
- GREY77
- GREY78
- GREY79
- GREY80
- GREY81
- GREY82
- GREY83
- GREY84
- GREY85
- GREY86
- GREY87
- GREY88
- GREY89
- GREY90
- GREY91
- GREY92
- GREY93
- GREY94
- GREY95
- GREY96
- GREY97
- GREY98
- GREY99
- GREY100
- HONEYDEW
- HONEYDE
W1 - HONEYDE
W2 - HONEYDE
W3 - HONEYDE
W4 - HOTPINK
- HOTPIN
K1 - HOTPIN
K2 - HOTPIN
K3 - HOTPIN
K4 - HOT_
PINK - INDIANRED
- INDIANRE
D1 - INDIANRE
D2 - INDIANRE
D3 - INDIANRE
D4 - INDIAN_
RED - INDIGO
- IVORY
- IVORY1
- IVORY2
- IVORY3
- IVORY4
- KHAKI
- KHAKI1
- KHAKI2
- KHAKI3
- KHAKI4
- LAVENDER
- LAVENDERBLUSH
- LAVENDERBLUS
H1 - LAVENDERBLUS
H2 - LAVENDERBLUS
H3 - LAVENDERBLUS
H4 - LAVENDER_
BLUSH - LAWNGREEN
- LAWN_
GREEN - LEMONCHIFFON
- LEMONCHIFFO
N1 - LEMONCHIFFO
N2 - LEMONCHIFFO
N3 - LEMONCHIFFO
N4 - LEMON_
CHIFFON - LIGHTBLUE
- LIGHTBLU
E1 - LIGHTBLU
E2 - LIGHTBLU
E3 - LIGHTBLU
E4 - LIGHTCORAL
- LIGHTCYAN
- LIGHTCYA
N1 - LIGHTCYA
N2 - LIGHTCYA
N3 - LIGHTCYA
N4 - LIGHTGOLDENROD
- LIGHTGOLDENRO
D1 - LIGHTGOLDENRO
D2 - LIGHTGOLDENRO
D3 - LIGHTGOLDENRO
D4 - LIGHTGOLDENRODYELLOW
- LIGHTGRAY
- LIGHTGREEN
- LIGHTGREY
- LIGHTPINK
- LIGHTPIN
K1 - LIGHTPIN
K2 - LIGHTPIN
K3 - LIGHTPIN
K4 - LIGHTSALMON
- LIGHTSALMO
N1 - LIGHTSALMO
N2 - LIGHTSALMO
N3 - LIGHTSALMO
N4 - LIGHTSEAGREEN
- LIGHTSKYBLUE
- LIGHTSKYBLU
E1 - LIGHTSKYBLU
E2 - LIGHTSKYBLU
E3 - LIGHTSKYBLU
E4 - LIGHTSLATEBLUE
- LIGHTSLATEGRAY
- LIGHTSLATEGREY
- LIGHTSTEELBLUE
- LIGHTSTEELBLU
E1 - LIGHTSTEELBLU
E2 - LIGHTSTEELBLU
E3 - LIGHTSTEELBLU
E4 - LIGHTYELLOW
- LIGHTYELLO
W1 - LIGHTYELLO
W2 - LIGHTYELLO
W3 - LIGHTYELLO
W4 - LIGHT_
BLUE - LIGHT_
CORAL - LIGHT_
CYAN - LIGHT_
GOLDENROD - LIGHT_
GRAY - LIGHT_
GREEN - LIGHT_
GREY - LIGHT_
PINK - LIGHT_
SALMON - LIGHT_
SEA - LIGHT_
SKY - LIGHT_
SLATE - LIGHT_
STEEL - LIGHT_
YELLOW - LIME
- LIMEGREEN
- LIME_
GREEN - LINEN
- MAGENTA
- MAGENT
A1 - MAGENT
A2 - MAGENT
A3 - MAGENT
A4 - MAROON
- MAROON1
- MAROON2
- MAROON3
- MAROON4
- MEDIUMAQUAMARINE
- MEDIUMBLUE
- MEDIUMORCHID
- MEDIUMORCHI
D1 - MEDIUMORCHI
D2 - MEDIUMORCHI
D3 - MEDIUMORCHI
D4 - MEDIUMPURPLE
- MEDIUMPURPL
E1 - MEDIUMPURPL
E2 - MEDIUMPURPL
E3 - MEDIUMPURPL
E4 - MEDIUMSEAGREEN
- MEDIUMSLATEBLUE
- MEDIUMSPRINGGREEN
- MEDIUMTURQUOISE
- MEDIUMVIOLETRED
- MEDIUM_
AQUAMARINE - MEDIUM_
BLUE - MEDIUM_
ORCHID - MEDIUM_
PURPLE - MEDIUM_
SEA - MEDIUM_
SLATE - MEDIUM_
SPRING - MEDIUM_
TURQUOISE - MEDIUM_
VIOLET - MIDNIGHTBLUE
- MIDNIGHT_
BLUE - MINTCREAM
- MINT_
CREAM - MISTYROSE
- MISTYROS
E1 - MISTYROS
E2 - MISTYROS
E3 - MISTYROS
E4 - MISTY_
ROSE - MOCCASIN
- NAVAJOWHITE
- NAVAJOWHIT
E1 - NAVAJOWHIT
E2 - NAVAJOWHIT
E3 - NAVAJOWHIT
E4 - NAVAJO_
WHITE - NAVY
- NAVYBLUE
- NAVY_
BLUE - OLDLACE
- OLD_
LACE - OLIVE
- OLIVEDRAB
- OLIVEDRA
B1 - OLIVEDRA
B2 - OLIVEDRA
B3 - OLIVEDRA
B4 - OLIVE_
DRAB - ORANGE
- ORANGE1
- ORANGE2
- ORANGE3
- ORANGE4
- ORANGERED
- ORANGERE
D1 - ORANGERE
D2 - ORANGERE
D3 - ORANGERE
D4 - ORANGE_
RED - ORCHID
- ORCHID1
- ORCHID2
- ORCHID3
- ORCHID4
- PALEGOLDENROD
- PALEGREEN
- PALEGREE
N1 - PALEGREE
N2 - PALEGREE
N3 - PALEGREE
N4 - PALETURQUOISE
- PALETURQUOIS
E1 - PALETURQUOIS
E2 - PALETURQUOIS
E3 - PALETURQUOIS
E4 - PALEVIOLETRED
- PALEVIOLETRE
D1 - PALEVIOLETRE
D2 - PALEVIOLETRE
D3 - PALEVIOLETRE
D4 - PALE_
GOLDENROD - PALE_
GREEN - PALE_
TURQUOISE - PALE_
VIOLET - PAPAYAWHIP
- PAPAYA_
WHIP - PEACHPUFF
- PEACHPUF
F1 - PEACHPUF
F2 - PEACHPUF
F3 - PEACHPUF
F4 - PEACH_
PUFF - PERU
- PINK
- PINK1
- PINK2
- PINK3
- PINK4
- PLUM
- PLUM1
- PLUM2
- PLUM3
- PLUM4
- POWDERBLUE
- POWDER_
BLUE - PURPLE
- PURPLE1
- PURPLE2
- PURPLE3
- PURPLE4
- REBECCAPURPLE
- REBECCA_
PURPLE - RED
- RED1
- RED2
- RED3
- RED4
- ROSYBROWN
- ROSYBROW
N1 - ROSYBROW
N2 - ROSYBROW
N3 - ROSYBROW
N4 - ROSY_
BROWN - ROYALBLUE
- ROYALBLU
E1 - ROYALBLU
E2 - ROYALBLU
E3 - ROYALBLU
E4 - ROYAL_
BLUE - SADDLEBROWN
- SADDLE_
BROWN - SALMON
- SALMON1
- SALMON2
- SALMON3
- SALMON4
- SANDYBROWN
- SANDY_
BROWN - SEAGREEN
- SEAGREE
N1 - SEAGREE
N2 - SEAGREE
N3 - SEAGREE
N4 - SEASHELL
- SEASHEL
L1 - SEASHEL
L2 - SEASHEL
L3 - SEASHEL
L4 - SEA_
GREEN - SIENNA
- SIENNA1
- SIENNA2
- SIENNA3
- SIENNA4
- SILVER
- SKYBLUE
- SKYBLU
E1 - SKYBLU
E2 - SKYBLU
E3 - SKYBLU
E4 - SKY_
BLUE - SLATEBLUE
- SLATEBLU
E1 - SLATEBLU
E2 - SLATEBLU
E3 - SLATEBLU
E4 - SLATEGRAY
- SLATEGRA
Y1 - SLATEGRA
Y2 - SLATEGRA
Y3 - SLATEGRA
Y4 - SLATEGREY
- SLATE_
BLUE - SLATE_
GRAY - SLATE_
GREY - SNOW
- SNOW1
- SNOW2
- SNOW3
- SNOW4
- SPRINGGREEN
- SPRINGGREE
N1 - SPRINGGREE
N2 - SPRINGGREE
N3 - SPRINGGREE
N4 - SPRING_
GREEN - STEELBLUE
- STEELBLU
E1 - STEELBLU
E2 - STEELBLU
E3 - STEELBLU
E4 - STEEL_
BLUE - TAN
- TAN1
- TAN2
- TAN3
- TAN4
- TEAL
- THISTLE
- THISTL
E1 - THISTL
E2 - THISTL
E3 - THISTL
E4 - TOMATO
- TOMATO1
- TOMATO2
- TOMATO3
- TOMATO4
- TURQUOISE
- TURQUOIS
E1 - TURQUOIS
E2 - TURQUOIS
E3 - TURQUOIS
E4 - VIOLET
- VIOLETRED
- VIOLETRE
D1 - VIOLETRE
D2 - VIOLETRE
D3 - VIOLETRE
D4 - VIOLET_
RED - WEBGRAY
- WEBGREEN
- WEBGREY
- WEBMAROON
- WEBPURPLE
- WEB_
GRAY - WEB_
GREEN - WEB_
GREY - WEB_
MAROON - WEB_
PURPLE - WHEAT
- WHEAT1
- WHEAT2
- WHEAT3
- WHEAT4
- WHITE
- WHITESMOKE
- WHITE_
SMOKE - X11GRAY
- X11GREEN
- X11GREY
- X11MAROON
- X11PURPLE
- X11_
GRAY - X11_
GREEN - X11_
GREY - X11_
MAROON - X11_
PURPLE - YELLOW
- YELLOW1
- YELLOW2
- YELLOW3
- YELLOW4
- YELLOWGREEN
- YELLOW_
GREEN
Traits§
- Algorithm2D
- Implement these for handling conversion to/from 2D coordinates (they are separate, because you might want Dwarf Fortress style 3D!)
- Algorithm3D
- Implement these for handling conversion to/from 2D coordinates (they are separate, because you might want Dwarf Fortress style 3D!)
- BaseMap
- Implement this trait to support path-finding functions.
- Console
- Trait that must be implemented by console types.
- Game
State - Implement this trait on your state struct, so the engine knows what to call on each tick.
Functions§
- a_
star_ search - Request an A-Star search. The start and end are specified as index numbers (compatible with your BaseMap implementation), and it requires access to your map so as to call distance and exit determinations.
- add_
named_ colors_ to_ palette - Insert all named W3C colors into the palette
- clear_
command_ buffer - Clears the global command buffer. This is called internally by BTerm at the end of each frame. You really shouldn’t need to call this yourself.
- clear_
palette - Empties the palette
- draw_
bar_ horizontal - Draws a horizontal progress bar
- draw_
bar_ vertical - Draws a vertical progress bar
- draw_
box - Draws a box, starting at x/y with the extents width/height using CP437 line characters
- draw_
box_ double - Draws a box, starting at x/y with the extents width/height using CP437 line characters
- draw_
hollow_ box - Draw a single-lined box without filling in the middle
- draw_
hollow_ box_ double - Draws a box, starting at x/y with the extents width/height using CP437 line characters
- field_
of_ view - Calculates field-of-view for a map that supports Algorithm2D.
- field_
of_ view_ set - Calculates field-of-view for a map that supports Algorithm2D, returning a HashSet. This is a bit faster than coercing the results into a vector, since internally it uses the set for de-duplication.
- init_
raw - letter_
to_ option - For A-Z menus, translates the keys A through Z into 0..25
- line2d
- Plots a line between two 2D points and returns a vector of points along the line.
- line2d_
bresenham - Uses a Bresenham’s algorithm to plot a line between two points. On some CPUs, this is faster than Bresenham.
- line2d_
vector - Uses a 2D vector algorithm to plot a line between two points. On some CPUs, this is faster than Bresenham.
- log
- main_
loop - Runs the BTerm application, calling into the provided gamestate handler every tick.
- palette_
color - Retrieve a palette color by name from the global registry.
Returns
Some(RGBA)
if the color is registered,None
if it is not. - parse_
dice_ string - project_
angle - From a given start point, project forward radius units at an angle of angle_radians degrees. 0 Degrees is north (negative Y), 90 degrees is east (positive X)
- register_
palette_ color - Register a palette color by name with the global registry.
- render_
draw_ buffer - Submits the current batch to the BTerm buffer and empties it
- string_
to_ cp437 - Converts a string into a vector of u8, CP437 representations of the string
- to_char
- to_
cp437 - Converts a unicode character to a CP437 equivalent, returning 0 if it didn’t have a match
- xp_
to_ console - Applies an XpFile to a given console, with 0,0 offset by offset_x and offset-y.
- xp_
to_ draw_ batch - Applies an XpFile to a given draw batch, with 0,0 offset by offset_x and offset-y.
Type Aliases§
- BError
- BResult
- Font
Char Type - GlCallback
- PointF
- A 2D floating-point position.