Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Dead code cleanup + format
Browse files Browse the repository at this point in the history
  • Loading branch information
darthdeus committed Nov 12, 2023
1 parent 2d66225 commit 7f72bba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
1 change: 0 additions & 1 deletion comfy-wgpu/src/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ impl Bloom {
threshold,
mipmap_generator,
// mipmaps, mipmaps_bind_group,

blur_texture,
mip_blur_pipeline,

Expand Down
53 changes: 0 additions & 53 deletions comfy/src/game.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::*;

// pub type StateBuilder<T> = fn(&mut EngineContext) -> T;

pub struct SimpleGame<T> {
pub engine: EngineState,
pub state_builder: StateBuilder<T>,
Expand Down Expand Up @@ -34,55 +32,4 @@ impl<T> SimpleGame<T> {
}
}

// pub type ContextBuilder<'a, 'b: 'a, S, C> =
// fn(&'a mut S, &'b mut EngineContext<'b>) -> C;

// pub type ContextBuilder<S, C> = fn(&mut S, &mut EngineState) -> C;

pub type StateBuilder<T> = fn(&mut EngineContext) -> T;

// TODO: ... once someone smart figures out how to pass in `context_builder` things can get a bit
// nicer.

// pub struct ComfyGame<S, C> {
// pub engine: EngineState,
// pub state_builder: StateBuilder<S>,
// pub state: Option<S>,
// pub setup: fn(&mut S, &mut EngineContext),
// pub update: fn(&mut C),
// }
//
// impl<S: 'static, C: 'static> ComfyGame<S, C> {
// pub fn new(
// engine: EngineState,
// state_builder: StateBuilder<S>,
// setup: fn(&mut S, &mut EngineContext),
// update: fn(&mut C),
// ) -> Self {
// Self { state_builder, state: None, engine, setup, update }
// }
//
// pub fn update(&mut self, context_builder: ???) {
// let mut c = self.engine.make_context();
//
// if self.state.is_none() {
// let mut state = (self.state_builder)(&mut c);
// (self.setup)(&mut state, &mut c);
//
// self.state = Some(state);
// }
//
// if let Some(state) = self.state.as_mut() {
// run_early_update_stages(&mut c);
// // TODO: early update
// run_mid_update_stages(&mut c);
//
// let mut game_c =
// (context_builder)(state, &mut self.engine);
//
// (self.update)(&mut game_c);
//
// run_late_update_stages(&mut c);
// }
// }
// }

0 comments on commit 7f72bba

Please sign in to comment.