aboutsummaryrefslogtreecommitdiff
path: root/light-client/src/main.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-16 18:05:29 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-16 18:05:29 +0200
commit511199443a419f549aeb500d7b013baef10152de (patch)
tree10fb8dd4b9166e57d95ad0d31a1a45734745ebd0 /light-client/src/main.rs
parent9dfc5afb299ed74b277735bcf06f47b52f68caee (diff)
downloadhurrycurry-511199443a419f549aeb500d7b013baef10152de.tar
hurrycurry-511199443a419f549aeb500d7b013baef10152de.tar.bz2
hurrycurry-511199443a419f549aeb500d7b013baef10152de.tar.zst
refactor renderer again
Diffstat (limited to 'light-client/src/main.rs')
-rw-r--r--light-client/src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/light-client/src/main.rs b/light-client/src/main.rs
index a1c02475..278229d2 100644
--- a/light-client/src/main.rs
+++ b/light-client/src/main.rs
@@ -17,19 +17,18 @@
*/
use game::Game;
use network::Network;
+use render::SpriteRenderer;
use sdl2::{
event::Event,
keyboard::{KeyboardState, Keycode},
pixels::Color,
};
-use sprite_renderer::SpriteRenderer;
use std::time::{Duration, Instant};
pub mod game;
pub mod network;
-pub mod sprite_renderer;
-pub mod tilemap;
pub mod render;
+pub mod tilemap;
fn main() {
env_logger::init_from_env("LOG");
@@ -53,8 +52,8 @@ fn main() {
let texture_creator = canvas.texture_creator();
let mut net = Network::connect("ws://127.0.0.1/").unwrap();
- let mut game = Game::new();
let mut renderer = SpriteRenderer::init(&texture_creator);
+ let mut game = Game::new(&renderer);
net.queue_out.push_back(hurrycurry_protocol::PacketS::Join {
name: "light".to_string(),