mapgen runstate
This commit is contained in:
parent
7f02a5a30f
commit
a2fb893f49
7 changed files with 73 additions and 23 deletions
|
|
@ -1191,7 +1191,7 @@ pub fn ranged_target(
|
|||
range: i32,
|
||||
aoe: i32
|
||||
) -> (TargetResult, Option<Point>) {
|
||||
let bounds = camera::get_screen_bounds(&gs.ecs);
|
||||
let bounds = camera::get_screen_bounds(&gs.ecs, false);
|
||||
let player_entity = gs.ecs.fetch::<Entity>();
|
||||
let player_pos = gs.ecs.fetch::<Point>();
|
||||
let viewsheds = gs.ecs.read_storage::<Viewshed>();
|
||||
|
|
@ -1235,7 +1235,7 @@ pub fn ranged_target(
|
|||
|
||||
// Draw mouse cursor
|
||||
let mouse_pos = (x, y);
|
||||
let bounds = camera::get_screen_bounds(&gs.ecs);
|
||||
let bounds = camera::get_screen_bounds(&gs.ecs, false);
|
||||
let x = x.clamp(bounds.x_offset, bounds.x_offset - 1 + VIEWPORT_W);
|
||||
let y = y.clamp(bounds.y_offset, bounds.y_offset - 1 + VIEWPORT_H);
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ impl Tooltip {
|
|||
|
||||
#[rustfmt::skip]
|
||||
pub fn draw_tooltips(ecs: &World, ctx: &mut BTerm, xy: Option<(i32, i32)>) {
|
||||
let bounds = get_screen_bounds(ecs);
|
||||
let bounds = get_screen_bounds(ecs, false);
|
||||
let map = ecs.fetch::<Map>();
|
||||
let names = ecs.read_storage::<Name>();
|
||||
let positions = ecs.read_storage::<Position>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue