aboutsummaryrefslogtreecommitdiff
path: root/src/tool/mod.rs
blob: 73654d98cca15293238f775eb4e1db32213d315b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pub mod deletion_tool;
pub mod room_tool;
pub mod wall_tool;

pub use deletion_tool::DeletionTool;
pub use room_tool::RoomTool;
pub use wall_tool::WallTool;

use crate::map_data::MapData;
use crate::transform::Transform;
use raylib::core::drawing::RaylibDrawHandle;
use raylib::RaylibHandle;

#[derive(Debug)]
#[repr(u8)]
pub enum ToolType {
    RoomTool,
    WallTool,
    DeletionTool,
    NumTools,
}

pub trait Tool {
    fn update(&mut self, _map: &MapData, _rl: &RaylibHandle, _transform: &Transform) {}
    fn active_update(&mut self, map: &mut MapData, rl: &RaylibHandle, transform: &Transform);

    fn draw(&self, _map: &MapData, _rld: &mut RaylibDrawHandle, _transform: &Transform) {}
}