use std::fs::read_to_string; use editor::Editor; use marble_engine::board::Board; use raylib::prelude::*; mod editor; mod marble_engine; mod util; use util::*; fn main() { let (mut rl, thread) = raylib::init() .resizable() .title("good window title") .build(); rl.set_target_fps(60); rl.set_window_min_size(640, 480); rl.set_mouse_cursor(MouseCursor::MOUSE_CURSOR_CROSSHAIR); rl.set_exit_key(None); rl.set_trace_log(TraceLogLevel::LOG_WARNING); let mut textures = Textures::default(); textures.load_dir("assets", &mut rl, &thread); textures.load_dir("assets/tiles", &mut rl, &thread); let mut game = Editor::new_sandbox(); let board = Board::parse(&read_to_string("boards/adder.mbl").unwrap()); game.load_board(board); while !rl.window_should_close() { game.input(&rl); let mut d = rl.begin_drawing(&thread); d.clear_background(Color::new(64, 64, 64, 255)); game.draw(&mut d, &textures); } }