zoom out further
This commit is contained in:
parent
092a7b70ff
commit
9d54c17dcd
4 changed files with 33 additions and 33 deletions
|
@ -1,3 +1,4 @@
|
|||
use crate::TILE_TEXTURE_SIZE;
|
||||
use crate::{draw_scaled_texture, Textures};
|
||||
|
||||
use super::tile::*;
|
||||
|
@ -245,9 +246,8 @@ impl Board {
|
|||
out
|
||||
}
|
||||
|
||||
pub fn draw(&self, d: &mut RaylibDrawHandle, textures: &Textures, offset: Vector2, zoom: i32) {
|
||||
let tile_size = 16 << zoom;
|
||||
let scale = (1 << zoom) as f32;
|
||||
pub fn draw(&self, d: &mut RaylibDrawHandle, textures: &Textures, offset: Vector2, scale: f32) {
|
||||
let tile_size = (TILE_TEXTURE_SIZE * scale) as i32;
|
||||
|
||||
let start_x = (-offset.x as i32) / tile_size - 1;
|
||||
let tile_width = d.get_screen_width() / tile_size + 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue