diff --git a/.cargo/config.toml b/.cargo/config.toml index 6b7f477..3aae6ac 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,9 @@ [target.wasm32-unknown-emscripten] +# TODO: Document what the fuck this is. rustflags = [ "-O", "-C", "link-args=-O2 --profiling", #"-C", "link-args=-O3 --closure 1", "-C", "link-args=-sASYNCIFY -sALLOW_MEMORY_GROWTH=1", - "-C", "link-args=-sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sSDL2_IMAGE_FORMATS=['png']", + "-C", "link-args=-sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sSDL_EMSCRIPTEN_KEYBOARD_ELEMENT -sSDL2_IMAGE_FORMATS=['png']", "-C", "link-args=--preload-file assets/ -lidbfs.js", ] diff --git a/src/animation.rs b/src/animation.rs index d582d08..51cff50 100644 --- a/src/animation.rs +++ b/src/animation.rs @@ -92,6 +92,7 @@ impl<'a> AnimatedTexture<'a> { direction: Direction, frame: u32, ) { + // TODO: If the frame we're targeting is in the opposite direction (due to self.reverse), we should pre-emptively reverse. let current = self.current_frame(); self.render_static(canvas, position, direction, Some(current)); diff --git a/src/game.rs b/src/game.rs index 648fdf2..c48a038 100644 --- a/src/game.rs +++ b/src/game.rs @@ -5,7 +5,6 @@ use sdl2::keyboard::Keycode; use sdl2::render::{Texture, TextureCreator}; use sdl2::video::WindowContext; use sdl2::{pixels::Color, render::Canvas, video::Window}; -use tracing::event; use crate::constants::{MapTile, BOARD_HEIGHT, BOARD_WIDTH, RAW_BOARD}; use crate::direction::Direction;