A set of 512 8x8 pixel monochrome tiles, along with a map for the basic 256 ASCII characters to tile indices. Most tile sets only include character mappings for the typable characters on a conventional keyboard.
If indexed with
usize, gives the 64 bit integer corresponding to the tile data for that tile index.
Can also be mutated by assigning to a particular
Can also be indexed by
char, which gives the tile index (a
usize) corresponding to that particular character.
The character map can be changed by assigning to a particular
Create a blank tile set with 512 tiles (all pixels off) and the default character map.
Load a tile set from the file with the given path. Sugar for
Load a tile set from a
Read instance such as a file. Commonly used with
include_bin! like so:
let ts = include_bytes!("tile_set"); TileSet::load_from(Cursor::new(&ts[..]))
A built-in tile set used in, among other things, the tesseraed editor.
A built-in tile set containing the 256 CGA standard ASCII characters using the font used in Hercules graphics cards.
The regular, all-uppercase shifted PETscii tile set used in Commodore PET and Commodore 64 machines.
pub fn petscii_unshifted() -> TileSet[src]
The unshifted PETscii tile set which includes lower case letters used in Commodore PET and Commodore 64 machines.
Save the tileset to a file at the provided path.
Should always return 512, but using this gives you future-proofing in case the tile set size changes in future.
impl RefUnwindSafe for TileSet
impl UnwindSafe for TileSet
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.