removes ctx arg from get_screen_bounds()

This commit is contained in:
Llywelwyn 2023-09-24 00:01:17 +01:00
parent be1c7aa1c7
commit 683ab95531
9 changed files with 46 additions and 54 deletions

View file

@ -7,7 +7,7 @@ use super::data::prelude::*;
const SHOW_BOUNDARIES: bool = false;
pub fn get_screen_bounds(ecs: &World, _ctx: &mut BTerm) -> (i32, i32, i32, i32, i32, i32) {
pub fn get_screen_bounds(ecs: &World) -> (i32, i32, i32, i32, i32, i32) {
let player_pos = ecs.fetch::<Point>();
let map = ecs.fetch::<Map>();
let (x_chars, y_chars, mut x_offset, mut y_offset) = (VIEWPORT_W, VIEWPORT_H, 1, 10);
@ -35,7 +35,7 @@ pub fn get_screen_bounds(ecs: &World, _ctx: &mut BTerm) -> (i32, i32, i32, i32,
pub fn render_camera(ecs: &World, ctx: &mut BTerm) {
let map = ecs.fetch::<Map>();
let (min_x, max_x, min_y, max_y, x_offset, y_offset) = get_screen_bounds(ecs, ctx);
let (min_x, max_x, min_y, max_y, x_offset, y_offset) = get_screen_bounds(ecs);
// Render map
let mut y = 0;