zoom out further

This commit is contained in:
Crispy 2024-12-10 22:18:09 +01:00
parent 092a7b70ff
commit 9d54c17dcd
4 changed files with 33 additions and 33 deletions

View file

@ -7,7 +7,7 @@ use board::Board;
use pos::*;
use tile::*;
use crate::{draw_usize_small, Textures};
use crate::{draw_usize_small, Textures, TILE_TEXTURE_SIZE};
#[derive(Debug)]
pub struct Machine {
@ -76,10 +76,9 @@ impl Machine {
d: &mut RaylibDrawHandle,
textures: &Textures,
offset: Vector2,
zoom: i32,
scale: f32,
) {
let tile_size = 16 << zoom;
let scale = (1 << zoom) as f32;
let tile_size = (TILE_TEXTURE_SIZE * scale) as i32;
for marble in &self.marbles {
let x = marble.x;
let y = marble.y;