Skip to content

Commit

Permalink
move main.rs to bin/editor.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
iMilchshake committed Jan 2, 2025
1 parent 8bc7217 commit b6c2ee0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
12 changes: 2 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
name = "gores-mapgen"
version = "1.0.3"
edition = "2021"
default-run = "gores-generator"
default-run = "editor"

[[bin]]
name = "gores-generator"
path = "src/main.rs"

[[bin]]
name = "twmap_test"
name = "editor"

[[bin]]
name = "config_points"
Expand All @@ -19,11 +15,9 @@ name = "benchmark"

[dependencies]
egui-macroquad = "0.15.0"

egui = "0.21.0"
egui-miniquad = "0.14.0"
macroquad = "0.3.25"

ndarray = "0.15.6"
rand = {version="0.8.5", features=['small_rng']}
seahash = "4.1.0"
Expand All @@ -34,8 +28,6 @@ serde = "1.0.197"
serde_json = "1.0.115"
rust-embed = "8.3.0"
tinyfiledialogs = "3.9.1"

# dt = "1.0.6"
dt = {git = "https://github.com/iMilchshake/dt"}
derivative = "2.2.0"
timing = "0.2.3"
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs → src/bin/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DISABLE_VSYNC: bool = true;

fn window_conf() -> Conf {
Conf {
window_title: "gores-mapgen".to_owned(),
window_title: "gores-mapgen-editor".to_owned(),
platform: Platform {
swap_interval: match DISABLE_VSYNC {
true => Some(0), // set swap_interval to 0 to disable vsync
Expand All @@ -41,6 +41,7 @@ async fn main() {
ThemeConfig::default(),
&args,
);

let mut fps_ctrl = FPSControl::new().with_max_fps(60);

// main loop for gui (and step-wise map generation)
Expand Down
2 changes: 1 addition & 1 deletion src/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Random {
}

/// uniformly pick one element from a given slice
pub fn pick_from_slice<'a, T>(&'a mut self, values: &'a [T]) -> &T {
pub fn pick_from_slice<'a, T>(&'a mut self, values: &'a [T]) -> &'a T {
&values[self.get_usize_in_range(0, values.len() - 1)]
}

Expand Down

0 comments on commit b6c2ee0

Please sign in to comment.