From 399d7d700ec961b4c291d87d023d51fe8838150d Mon Sep 17 00:00:00 2001 From: UserIsntAvailable Date: Wed, 17 Jan 2024 10:26:37 -0500 Subject: [PATCH] chore: move `asset/directory` -> `asset/pack_file/directory`. --- engine/src/asset/pack_file.rs | 2 ++ engine/src/asset/{ => pack_file}/directory.rs | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) rename engine/src/asset/{ => pack_file}/directory.rs (96%) diff --git a/engine/src/asset/pack_file.rs b/engine/src/asset/pack_file.rs index e7845ee..3231a6e 100644 --- a/engine/src/asset/pack_file.rs +++ b/engine/src/asset/pack_file.rs @@ -1,5 +1,7 @@ //! This only works with the last version of Ashen :). +mod directory; + use crate::utils::nom::*; use flate2::read::ZlibDecoder; use std::io::Read; diff --git a/engine/src/asset/directory.rs b/engine/src/asset/pack_file/directory.rs similarity index 96% rename from engine/src/asset/directory.rs rename to engine/src/asset/pack_file/directory.rs index cdad2bf..65d5849 100644 --- a/engine/src/asset/directory.rs +++ b/engine/src/asset/pack_file/directory.rs @@ -1,5 +1,5 @@ use super::PackFile; -use engine::{asset::Asset, directory::Directory}; +use crate::{asset::Asset, directory::Directory}; use std::collections::HashMap; macro_rules! insert_asset { @@ -28,8 +28,9 @@ impl PackFileDirectory { impl Directory for PackFileDirectory { fn get(&self, id: &str) -> A { - let bytes = self.assets.get(id).expect("id was found"); - A::parse(bytes, Default::default()) + // let bytes = self.assets.get(id).expect("id was found"); + // A::parse(bytes, Default::default()) + todo!() } fn get_all(&self) -> Vec {