made the switch to using bracket-lib directly, instead of rltk wrapper

this should solve the build issues; it makes using the non-crashing github build a lot easier, because it lets the explicit rltk dependency be removed.
This commit is contained in:
Llywelwyn 2023-09-05 02:23:31 +01:00
parent 455b8f2d80
commit 85efe13dc5
93 changed files with 1528 additions and 770 deletions

View file

@ -21,7 +21,6 @@ use super::{
SerializeMe,
Skill,
Skills,
TileType,
tile_walkable,
Viewshed,
BlocksTile,
@ -30,7 +29,7 @@ use super::{
use crate::data::entity;
use crate::data::visuals::BLOODSTAIN_COLOUR;
use crate::gamesystem::*;
use rltk::{ RandomNumberGenerator, RGB };
use bracket_lib::prelude::*;
use specs::prelude::*;
use specs::saveload::{ MarkedBuilder, SimpleMarker };
use std::collections::HashMap;
@ -52,9 +51,9 @@ pub fn player(ecs: &mut World, player_x: i32, player_y: i32) -> Entity {
.with(Position { x: player_x, y: player_y })
.with(BlocksTile {})
.with(Renderable {
glyph: rltk::to_cp437('@'),
fg: RGB::named(rltk::YELLOW),
bg: RGB::named(rltk::BLACK),
glyph: to_cp437('@'),
fg: RGB::named(YELLOW),
bg: RGB::named(BLACK),
render_order: 0,
})
.with(Bleeds { colour: RGB::named(BLOODSTAIN_COLOUR) })
@ -132,7 +131,7 @@ pub fn spawn_region(
let difficulty = (map.difficulty + player_level) / 2;
// If no area, log and return.
if areas.len() == 0 {
rltk::console::log("DEBUGINFO: No areas capable of spawning mobs!");
console::log("DEBUGINFO: No areas capable of spawning mobs!");
return;
}
// Get num of each entity type.
@ -212,7 +211,7 @@ pub fn spawn_entity(ecs: &mut World, spawn: &(&usize, &String)) {
return;
}
rltk::console::log(format!("WARNING: We don't know how to spawn [{}]!", spawn.1));
console::log(format!("WARNING: We don't know how to spawn [{}]!", spawn.1));
}
// 3 scrolls : 3 potions : 1 equipment : 1 wand?