[−][src]Crate rltk
Modules
console | |
embedding | |
prelude | |
rex |
Macros
add_wasm_support | |
embedded_resource | |
link_resource | |
link_resource | |
smallvec | Creates a |
Structs
AlphaLerp | Implements an Alpha-Only Lerp as an iterator |
BACKEND | |
BACKEND_INTERNAL | |
BTerm | A BTerm context. |
BTermBuilder | Provides a builder mechanism for initializing BTerm. You can chain builders together,
and and with a call to |
BTermInternal | |
BTermPlatform | Provides a base abstract platform for BTerm to run on, with specialized content. |
Bresenham | Line-drawing iterator |
BresenhamCircle | 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. |
BresenhamCircleNoDiag | A version of the Bresenham circle that does not make diagonal jumps |
ColorPair | Represents two colors together, a foreground and a background. |
Degrees | Convenience type: you can define an angle in Degrees and it is convertible to Radians (and vice versa) |
DiceIterator | |
DiceParseError | |
DiceType | |
DijkstraMap | 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. |
DisplayConsole | A display console, used internally to provide console render support. Public in case you want to play with it, or access it directly. |
DrawBatch | Represents a batch of drawing commands, designed to be submitted together. |
EMBED | |
FastNoise | |
FlexiConsole | A sparse console. Rather than storing every cell on the screen, it stores just cells that have data. |
FlexiTile | 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) |
HsvLerp | An HSV Lerp - transition from one HSV color to another in a set number of steps. |
INPUT | |
InitHints | |
Input | Represents the current input state. The old key/mouse fields remain available for compatibility. |
MultiTileSprite | Represents a sprite consisting of multiple glyphs/colors, occupying multiple console locations. |
NavigationPath | Holds the result of an A-Star navigation query.
|
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) |
RandomNumberGenerator | |
Rect | |
RectF | |
RenderSprite | Internal storage structure for sparse tiles. |
RgbLerp | Implements an RGB Lerp as an iterator |
RgbaLerp | Implements an RGBA Lerp as an iterator |
Rltk | A BTerm context. |
RltkBuilder | Provides a builder mechanism for initializing BTerm. You can chain builders together,
and and with a call to |
Shader | |
SimpleConsole | A simple console with background color. |
SmallVec | A |
SparseConsole | A sparse console. Rather than storing every cell on the screen, it stores just cells that have data. |
SparseTile | Internal storage structure for sparse tiles. |
Sprite | |
SpriteConsole | A sparse console. Rather than storing every cell on the screen, it stores just cells that have data. |
SpriteSheet | |
TextBlock | |
TextBuilder | |
Tile | The internal storage type for tiles in a simple console. |
VectorLine | |
VirtualConsole | |
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 |
CellularDistanceFunction | Cellular noise distance function to use |
CellularReturnType | What type of cellular noise result do you want |
CharacterTranslationMode | |
CommandType | |
DistanceAlg | Enumeration of available 2D Distance algorithms |
DrawCommand | Represents a buffered drawing command that can be asynchronously submitted to the drawing buffer, for application at the end of the frame. |
FractalType | Fractal function to use |
HtmlColorConversionError | Error message type when failing to convert a hex code to RGB. |
Interp | Interpolation function to use |
LineAlg | Enumeration of available 2D Distance algorithms |
NoiseType | Type of noise to generate |
TextAlign | |
VirtualKeyCode | Symbolic name for a keyboard key. |
Constants
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. |
GameState | 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. |
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. |
Type Definitions
BError | |
FontCharType | |
GlCallback | |
PointF | |
RltkError |