Skip to content

Commit

Permalink
put map rendering parts in separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Aug 11, 2023
1 parent c928c50 commit 820a250
Show file tree
Hide file tree
Showing 8 changed files with 476 additions and 412 deletions.
5 changes: 2 additions & 3 deletions native_app/src/game_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl State {
me
}

#[profiling::function]
//#[profiling::function]
pub fn update(&mut self, ctx: &mut Context) {
crate::network::goria_update(self);

Expand Down Expand Up @@ -137,8 +137,7 @@ impl State {
Self::manage_settings(ctx, &self.uiw.read::<Settings>());
self.manage_io(ctx);

self.map_renderer
.terrain_update(ctx, &self.goria.read().unwrap());
self.map_renderer.update(&self.goria.read().unwrap(), ctx);

ctx.gfx
.set_time(self.goria.read().unwrap().read::<GameTime>().timestamp as f32);
Expand Down
Loading

0 comments on commit 820a250

Please sign in to comment.