mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
more
This commit is contained in:
parent
a55aedca0c
commit
39dde35229
2 changed files with 33 additions and 42 deletions
36
src/main.rs
36
src/main.rs
|
|
@ -1,4 +1,9 @@
|
|||
mod app;
|
||||
use command::CmdVec;
|
||||
use debug::DebugState;
|
||||
use egui_sfml::SfEgui;
|
||||
use game::GameState;
|
||||
use res::Res;
|
||||
|
||||
mod command;
|
||||
mod debug;
|
||||
mod game;
|
||||
|
|
@ -8,9 +13,34 @@ mod res;
|
|||
mod texture_atlas;
|
||||
mod tiles;
|
||||
mod world;
|
||||
use app::App;
|
||||
|
||||
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.do_game_loop();
|
||||
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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue