tooltips for overmap tiles, and distinct fg-bg offsets

This commit is contained in:
Llywelwyn 2023-08-27 18:04:53 +01:00
parent 2890c16a3c
commit 537e19c4e7
8 changed files with 84 additions and 43 deletions

View file

@ -4,7 +4,7 @@ use serde::{ Deserialize, Serialize };
pub enum EVENT {
TURN(i32),
LEVEL(i32),
CHANGED_FLOOR(i32),
CHANGED_FLOOR(String),
PLAYER_CONFUSED(i32),
KICKED_SOMETHING(i32),
BROKE_DOOR(i32),

View file

@ -1,3 +1,7 @@
use super::names::*;
use super::visuals::*;
use rltk::prelude::*;
pub const ID_OVERMAP: i32 = 1;
pub const ID_TOWN: i32 = 10;
@ -5,3 +9,20 @@ pub const ID_TOWN2: i32 = ID_TOWN + 1;
pub const ID_TOWN3: i32 = ID_TOWN + 2;
pub const ID_INFINITE: i32 = 1000;
pub fn get_local_desc(id: i32) -> String {
let str = match id {
ID_TOWN => NAME_STARTER_TOWN,
ID_INFINITE => NAME_DUNGEON_RANDOM,
_ => "an unnamed overmap tile",
};
return str.to_string();
}
pub fn get_local_col(id: i32) -> RGB {
let col = match id {
ID_TOWN => TO_TOWN_COLOUR,
_ => (255, 255, 255),
};
return RGB::from_u8(col.0, col.1, col.2);
}

View file

@ -19,6 +19,7 @@ pub const LONG_PARTICLE_LIFETIME: f32 = 300.0;
pub const BLOODSTAIN_COLOUR: (u8, u8, u8) = (153, 0, 0);
// DEFAULT THEME
pub const DEFAULT_BG_COLOUR: (u8, u8, u8) = (29, 50, 50);
pub const DEFAULT_BG_OFFSETS: (i32, i32, i32) = (5, 5, 5);
pub const WALL_COLOUR: (u8, u8, u8) = (229, 191, 94);
pub const WALL_OFFSETS: (i32, i32, i32) = (48, 48, 48);
pub const FLOOR_COLOUR: (u8, u8, u8) = (25, 204, 122);