diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/font.rs | 8 | ||||
-rw-r--r-- | src/main.rs | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/font.rs b/src/font.rs index c97ac8f..738ae30 100644 --- a/src/font.rs +++ b/src/font.rs @@ -21,7 +21,7 @@ pub struct Font<'a> { } pub const MEOW_FONT: LazyLock<Font> = LazyLock::new(|| Font { - texture: include_bytes!("../assets/uwu-logo-font-20px.png"), + texture: include_bytes!("../assets/fonts/uwu-logo-20px.png"), glyphs: { let a: &mut Vec<*const Glyph> = &mut Vec::new(); insert_value(a, 32, &Glyph { x: 2 }); @@ -32,7 +32,7 @@ pub const MEOW_FONT: LazyLock<Font> = LazyLock::new(|| Font { mod sprite_sheets { use super::{MEOW_FONT, UWU_HEIGHT, UWU_WIDTH}; use sdl2::{ - image::LoadTexture, + // image::LoadTexture, pixels::PixelFormatEnum, rect::Rect, render::{Canvas, TextureCreator}, @@ -88,8 +88,8 @@ mod sprite_sheets { let surface = Surface::new(112, 24, PixelFormatEnum::RGB24).unwrap(); let mut canvas = Canvas::from_surface(surface).unwrap(); let tc = canvas.texture_creator(); - let tx = tc.load_texture_bytes(MEOW_FONT.texture).unwrap(); - canvas.copy(&tx, None, None).unwrap(); + // let tx = tc.load_texture_bytes(MEOW_FONT.texture).unwrap(); + // canvas.copy(&tx, None, None).unwrap(); canvas.present(); let sheet = canvas.into_surface(); diff --git a/src/main.rs b/src/main.rs index c3f434a..bfcc5f6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,6 @@ mod font; use font::{UwUFont, UWU_WIDTH}; use sdl2::event::Event; -use sdl2::image::LoadTexture; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; use sdl2::rect::Rect; @@ -44,7 +43,7 @@ pub fn main() { //canvas.clear(); let tc = canvas.texture_creator(); - let sheet = tc.load_texture_bytes(font::MEOW_FONT.texture).unwrap(); + // let sheet = tc.load_texture_bytes(font::MEOW_FONT.texture).unwrap(); /* canvas.copy( &sheet, |