polish metadata definitions
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

This commit is contained in:
2026-04-10 06:19:12 +01:00
parent a16edcb257
commit 35c138fd86
2 changed files with 15 additions and 15 deletions
+4 -4
View File
@@ -31,7 +31,7 @@ pub struct AssetEntry {
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GlyphsMetadata {
pub struct GlyphBankMetadata {
pub tile_size: u32,
pub width: u32,
pub height: u32,
@@ -40,13 +40,13 @@ pub struct GlyphsMetadata {
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SoundsMetadata {
pub struct SoundBankMetadata {
pub sample_rate: u32,
pub channels: u32,
}
impl AssetEntry {
pub fn metadata_as_glyphs(&self) -> Result<GlyphsMetadata, String> {
pub fn metadata_as_glyph_bank(&self) -> Result<GlyphBankMetadata, String> {
if self.bank_type != BankType::GLYPH {
return Err(format!(
"Asset {} is not a GLYPH bank (type: {:?})",
@@ -57,7 +57,7 @@ impl AssetEntry {
.map_err(|e| format!("Invalid GLYPH metadata for asset {}: {}", self.asset_id, e))
}
pub fn metadata_as_sounds(&self) -> Result<SoundsMetadata, String> {
pub fn metadata_as_sound_bank(&self) -> Result<SoundBankMetadata, String> {
if self.bank_type != BankType::SOUNDS {
return Err(format!(
"Asset {} is not a SOUNDS bank (type: {:?})",