From 7a8de938afdb18a51c08de0896a7ce3f539f40e5 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 3 Oct 2023 19:42:07 -0700 Subject: [PATCH] rename stages to modes --- src/body.rs | 2 +- src/load_roblox.rs | 4 +--- src/main.rs | 4 ++-- src/model.rs | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/body.rs b/src/body.rs index d67b197..0874546 100644 --- a/src/body.rs +++ b/src/body.rs @@ -328,7 +328,7 @@ pub struct PhysicsState{ //all models pub models:Vec, - pub stages:Vec, + pub modes:Vec, //the spawn point is where you spawn when you load into the map. //This is not the same as Reset which teleports you to Spawn0 pub spawn_point:glam::Vec3, diff --git a/src/load_roblox.rs b/src/load_roblox.rs index e3dd5fb..0f3159b 100644 --- a/src/load_roblox.rs +++ b/src/load_roblox.rs @@ -171,8 +171,6 @@ pub fn generate_indexed_models(dom:rbx_dom_weak::WeakDom) -> crate::model::Index //IndexedModelInstances includes textures let mut spawn_point=glam::Vec3::ZERO; - let mut stages=Vec::new(); - let mut indexed_models=Vec::new(); let mut model_id_from_description=std::collections::HashMap::::new(); @@ -424,6 +422,6 @@ pub fn generate_indexed_models(dom:rbx_dom_weak::WeakDom) -> crate::model::Index textures:asset_id_from_texture_id.iter().map(|t|t.to_string()).collect(), models:indexed_models, spawn_point, - stages, + modes:Vec::new(), } } diff --git a/src/main.rs b/src/main.rs index 9d330df..cbecae1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -528,7 +528,7 @@ impl framework::Example for GraphicsData { controls: 0, world:body::WorldState{}, game:body::GameMechanicsState::default(), - stages:Vec::new(), + modes:Vec::new(), }; //load textures @@ -784,7 +784,7 @@ impl framework::Example for GraphicsData { textures:Vec::new(), models:indexed_models, spawn_point:glam::Vec3::Y*50.0, - stages:Vec::new(), + modes:Vec::new(), }; graphics.generate_model_physics(&indexed_model_instances); graphics.generate_model_graphics(&device,&queue,indexed_model_instances); diff --git a/src/model.rs b/src/model.rs index 159c66d..820cac4 100644 --- a/src/model.rs +++ b/src/model.rs @@ -65,11 +65,11 @@ pub struct IndexedModelInstances{ pub textures:Vec,//RenderPattern pub models:Vec, //may make this into an object later. - pub stages:Vec, + pub modes:Vec, pub spawn_point:glam::Vec3, } //stage description referencing flattened ids is spooky, but the map loading is meant to be deterministic. -pub struct StageDescription{ +pub struct ModeDescription{ pub start:u32,//start=model_id pub spawns:Vec,//spawns[spawn_id]=model_id pub ordered_checkpoints:Vec,//ordered_checkpoints[checkpoint_id]=model_id