diff --git a/src/entity/graph.rs b/src/entity/graph.rs index b6dffb5..0bf3021 100644 --- a/src/entity/graph.rs +++ b/src/entity/graph.rs @@ -1,6 +1,6 @@ use glam::Vec2; -use crate::ecs::components::NodeId; +use crate::systems::components::NodeId; use super::direction::Direction; diff --git a/src/game/mod.rs b/src/game/mod.rs index 7210fc0..9b0360b 100644 --- a/src/game/mod.rs +++ b/src/game/mod.rs @@ -3,16 +3,16 @@ include!(concat!(env!("OUT_DIR"), "/atlas_data.rs")); use crate::constants::CANVAS_SIZE; -use crate::ecs::components::{ - DeltaTime, DirectionalAnimated, GlobalState, PlayerBundle, PlayerControlled, Position, Renderable, Velocity, -}; -use crate::ecs::interact::interact_system; -use crate::ecs::movement::movement_system; -use crate::ecs::render::{directional_render_system, render_system, BackbufferResource, MapTextureResource}; use crate::entity::direction::Direction; use crate::error::{GameError, GameResult, TextureError}; use crate::input::commands::GameCommand; use crate::map::builder::Map; +use crate::systems::components::{ + DeltaTime, DirectionalAnimated, GlobalState, PlayerBundle, PlayerControlled, Position, Renderable, Velocity, +}; +use crate::systems::interact::interact_system; +use crate::systems::movement::movement_system; +use crate::systems::render::{directional_render_system, render_system, BackbufferResource, MapTextureResource}; use crate::texture::animated::AnimatedTexture; use bevy_ecs::event::EventRegistry; use bevy_ecs::observer::Trigger; diff --git a/src/lib.rs b/src/lib.rs index a90eb5d..6d2f054 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ pub mod app; pub mod asset; pub mod audio; pub mod constants; -pub mod ecs; pub mod entity; pub mod error; pub mod game; @@ -12,4 +11,5 @@ pub mod helpers; pub mod input; pub mod map; pub mod platform; +pub mod systems; pub mod texture; diff --git a/src/main.rs b/src/main.rs index 2117321..2b9453d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,6 @@ mod asset; mod audio; mod constants; -mod ecs; mod entity; mod error; mod game; @@ -18,6 +17,7 @@ mod helpers; mod input; mod map; mod platform; +mod systems; mod texture; /// The main entry point of the application. diff --git a/src/map/builder.rs b/src/map/builder.rs index 49b32e3..ca83767 100644 --- a/src/map/builder.rs +++ b/src/map/builder.rs @@ -1,11 +1,11 @@ //! Map construction and building functionality. use crate::constants::{MapTile, BOARD_CELL_SIZE, CELL_SIZE}; -use crate::ecs::components::NodeId; use crate::entity::direction::Direction; use crate::entity::graph::{EdgePermissions, Graph, Node}; use crate::map::parser::MapTileParser; use crate::map::render::MapRenderer; +use crate::systems::components::NodeId; use crate::texture::sprite::SpriteAtlas; use bevy_ecs::resource::Resource; use glam::{IVec2, Vec2}; diff --git a/src/ecs/components.rs b/src/systems/components.rs similarity index 100% rename from src/ecs/components.rs rename to src/systems/components.rs diff --git a/src/ecs/interact.rs b/src/systems/interact.rs similarity index 94% rename from src/ecs/interact.rs rename to src/systems/interact.rs index 8ac4588..3855519 100644 --- a/src/ecs/interact.rs +++ b/src/systems/interact.rs @@ -4,10 +4,10 @@ use bevy_ecs::{ }; use crate::{ - ecs::components::{GlobalState, PlayerControlled, Velocity}, error::GameError, game::events::GameEvent, input::commands::GameCommand, + systems::components::{GlobalState, PlayerControlled, Velocity}, }; // Handles diff --git a/src/ecs/mod.rs b/src/systems/mod.rs similarity index 100% rename from src/ecs/mod.rs rename to src/systems/mod.rs diff --git a/src/ecs/movement.rs b/src/systems/movement.rs similarity index 98% rename from src/ecs/movement.rs rename to src/systems/movement.rs index 10f5a91..7ca5e6d 100644 --- a/src/ecs/movement.rs +++ b/src/systems/movement.rs @@ -1,7 +1,7 @@ -use crate::ecs::components::{DeltaTime, PlayerControlled, Position, Velocity}; use crate::entity::graph::EdgePermissions; use crate::error::{EntityError, GameError}; use crate::map::builder::Map; +use crate::systems::components::{DeltaTime, PlayerControlled, Position, Velocity}; use bevy_ecs::event::EventWriter; use bevy_ecs::system::{Query, Res}; diff --git a/src/ecs/render.rs b/src/systems/render.rs similarity index 97% rename from src/ecs/render.rs rename to src/systems/render.rs index 56d7db7..5f959e4 100644 --- a/src/ecs/render.rs +++ b/src/systems/render.rs @@ -1,6 +1,6 @@ -use crate::ecs::components::{DeltaTime, DirectionalAnimated, Position, Renderable, Velocity}; use crate::error::{GameError, TextureError}; use crate::map::builder::Map; +use crate::systems::components::{DeltaTime, DirectionalAnimated, Position, Renderable, Velocity}; use crate::texture::sprite::SpriteAtlas; use bevy_ecs::entity::Entity; use bevy_ecs::event::EventWriter;