This commit is contained in:
nora 2023-04-17 19:51:02 +02:00
parent 98dd54f1f2
commit 62107a20d8
21 changed files with 138 additions and 459 deletions

View file

@ -2,27 +2,14 @@ use std::{collections::HashMap, path::Path};
use crate::math::IntRect;
use sfml::{graphics::Texture, SfBox};
use texture_packer::{texture::Texture as _, TexturePacker, TexturePackerConfig};
pub type RectMap = HashMap<String, IntRect>;
pub(crate) type RectMap = HashMap<String, IntRect>;
#[derive(Debug)]
pub struct AtlasBundle {
pub tex: SfBox<Texture>,
pub rects: RectMap,
pub(crate) struct AtlasBundle {
pub(crate) tex: SfBox<Texture>,
pub(crate) rects: RectMap,
}
impl AtlasBundle {
pub fn new() -> anyhow::Result<Self> {
pub(crate) fn new() -> anyhow::Result<Self> {
loop {}
}
}
fn make_pix_buf(packer: &TexturePacker<image::DynamicImage, String>) -> Vec<u8> {
loop {}
}
fn path_img_key(path: &Path) -> String {
loop {}
}
#[test]
fn test_path_img_key() {
loop {}
}
fn walk_graphics(mut f: impl FnMut(&Path)) {
loop {}
}