From: Tomas Wenström Date: Sat, 13 Feb 2021 17:06:26 +0000 (+0100) Subject: Renamed common to util X-Git-Url: http://www.dolda2000.com/gitweb/?p=kaka%2Frust-sdl-test.git;a=commitdiff_plain;h=5433a77fa53c337c07577dc02d769616945d58ea Renamed common to util --- diff --git a/src/core/app.rs b/src/core/app.rs index f5452fd..808277f 100644 --- a/src/core/app.rs +++ b/src/core/app.rs @@ -2,7 +2,7 @@ use boll::*; use core::controller::ControllerManager; use core::render::Renderer; use geometry::{Point, Dimension}; -use point; // defined in common, but loaded from main... +use point; use rand::Rng; use sdl2::event::{Event, WindowEvent}; use sdl2::keyboard::Keycode; diff --git a/src/main.rs b/src/main.rs index 4a88954..d60ad55 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,11 +7,11 @@ use core::game::GameState; use core::app::*; mod boll; -mod common; mod core; mod geometry; mod sprites; mod teststate; +mod util; const SCREEN_WIDTH: u16 = 1280; const SCREEN_HEIGHT: u16 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u16; diff --git a/src/common/mod.rs b/src/util/mod.rs similarity index 84% rename from src/common/mod.rs rename to src/util/mod.rs index 36d3193..2fb29cf 100644 --- a/src/common/mod.rs +++ b/src/util/mod.rs @@ -1,5 +1,5 @@ mod time; -pub use common::time::ScopeTimer; +pub use util::time::ScopeTimer; #[macro_export] macro_rules! hashmap { diff --git a/src/common/time.rs b/src/util/time.rs similarity index 92% rename from src/common/time.rs rename to src/util/time.rs index 0902d94..b533bb6 100644 --- a/src/common/time.rs +++ b/src/util/time.rs @@ -23,11 +23,11 @@ impl Drop for ScopeTimer { #[macro_export] macro_rules! time_scope { () => { - use common::ScopeTimer; + use util::ScopeTimer; let _magical_scope_timer_ = ScopeTimer::new("scope"); }; ( $name:expr ) => { - use common::ScopeTimer; + use util::ScopeTimer; let _magical_scope_timer_ = ScopeTimer::new($name); }; }