From 78686b449d0a2e8c3a48a0cd46e8b69812e691d3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 4 Feb 2024 22:41:45 -0800 Subject: [PATCH] collapse this struct --- src/map.rs | 5 ++++- src/model.rs | 22 ---------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/map.rs b/src/map.rs index aa4f6bc..c89c3c5 100644 --- a/src/map.rs +++ b/src/map.rs @@ -1,10 +1,13 @@ +use std::collections::HashMap; + use crate::model; use crate::gameplay_modes; use crate::gameplay_attributes; //this is the current map data loaded in memory pub struct Map{ pub modes:gameplay_modes::Modes, - pub models:model::Models, + pub indexed_models:HashMap, + pub models:HashMap, pub attributes:Vec, //RenderPattern pub textures:Vec>, diff --git a/src/model.rs b/src/model.rs index 0b7644d..96a911f 100644 --- a/src/model.rs +++ b/src/model.rs @@ -160,25 +160,3 @@ pub struct Model{ pub color:Color4,//transparency is in here pub transform:Planar64Affine3, } - -pub struct Models{ - pub indexed_models:HashMap, - pub models:HashMap, -} -impl Models{ - pub fn new( - indexed_models:HashMap, - models:HashMap, - )->Self{ - Self{ - indexed_models, - models, - } - } -} -impl Updatable for Models{ - fn update(&mut self,update:Models){ - self.indexed_models.extend(update.indexed_models); - self.models.extend(update.models); - } -} \ No newline at end of file