improved sprites - spriteinfo and methods

This commit is contained in:
Llywelwyn 2023-09-26 20:40:17 +01:00
parent 849c400497
commit bd450e806b
12 changed files with 187 additions and 108 deletions

View file

@ -29,6 +29,7 @@ use super::{
Intrinsics,
HasAncestry,
HasClass,
SpriteInfo,
};
use crate::gui::{ Ancestry, Class };
use crate::consts::entity;
@ -57,8 +58,7 @@ pub fn player(ecs: &mut World, player_x: i32, player_y: i32) -> Entity {
.with(BlocksTile {})
.with(Renderable {
glyph: to_cp437('@'),
sprite: Some("@".to_string()), // TODO: Player sprite
colour_sprite: true,
sprite: Some(SpriteInfo::colourable("@")),
fg: RGB::named(YELLOW),
bg: RGB::named(BLACK),
render_order: 0,