refining the sprites
This commit is contained in:
parent
d58614b106
commit
670b365def
6 changed files with 28 additions and 22 deletions
|
|
@ -3,7 +3,6 @@ use bracket_lib::prelude::*;
|
|||
use specs::prelude::*;
|
||||
use std::ops::Mul;
|
||||
use super::data::visuals::{ VIEWPORT_W, VIEWPORT_H };
|
||||
use super::data::sprites::*;
|
||||
use super::data::prelude::*;
|
||||
|
||||
const SHOW_BOUNDARIES: bool = false;
|
||||
|
|
@ -38,6 +37,19 @@ 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);
|
||||
|
||||
ctx.set_active_console(0);
|
||||
for i in 0..16 {
|
||||
for j in 0..19 {
|
||||
ctx.add_sprite(
|
||||
Rect::with_size(i * 16, j * 16, 16, 16),
|
||||
0,
|
||||
RGBA::named(WHITE),
|
||||
i + j * 16
|
||||
);
|
||||
}
|
||||
}
|
||||
ctx.set_active_console(1);
|
||||
|
||||
// Render map
|
||||
let mut y = 0;
|
||||
for t_y in min_y..max_y {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue