Super basic map rendering

This commit is contained in:
crumblingstatue 2023-04-02 00:30:03 +02:00
parent 5e539d668f
commit 49c47ac718
6 changed files with 60 additions and 22 deletions

View file

@ -6,15 +6,15 @@ use sfml::{
use sfml_xt::graphics::RenderWindowExt;
pub struct ScreenRes {
pub w: u16,
pub h: u16,
pub w: i16,
pub h: i16,
}
impl ScreenRes {
fn to_sf(&self) -> VideoMode {
VideoMode {
width: self.w.into(),
height: self.h.into(),
width: self.w as _,
height: self.h as _,
bits_per_pixel: 32,
}
}