mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
46 lines
900 B
Rust
46 lines
900 B
Rust
use command::CmdVec;
|
|
use debug::DebugState;
|
|
use egui_sfml::SfEgui;
|
|
use game::GameState;
|
|
use res::Res;
|
|
|
|
mod command;
|
|
mod debug;
|
|
mod game;
|
|
mod graphics;
|
|
mod math;
|
|
mod res;
|
|
mod texture_atlas;
|
|
mod tiles;
|
|
mod world;
|
|
|
|
pub(crate) struct App {
|
|
pub(crate) game: GameState,
|
|
pub(crate) res: Res,
|
|
pub(crate) sf_egui: SfEgui,
|
|
pub(crate) debug: DebugState,
|
|
/// Integer scale for rendering the game
|
|
pub(crate) scale: u8,
|
|
pub(crate) cmdvec: CmdVec,
|
|
}
|
|
impl App {
|
|
pub(crate) fn new() -> anyhow::Result<Self> {
|
|
loop {}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let mut app = App::new().unwrap();
|
|
app.sf_egui
|
|
.do_frame(|ctx| {
|
|
debug::do_debug_ui(
|
|
ctx,
|
|
&mut app.debug,
|
|
&mut app.game,
|
|
&mut app.res,
|
|
&mut app.scale,
|
|
&mut app.cmdvec,
|
|
);
|
|
})
|
|
.unwrap();
|
|
}
|