Add configuration option for default grid size.

This commit is contained in:
KikooDX 2021-02-26 11:33:19 +01:00
parent 9a0bbb8e95
commit 4fb7d33645
3 changed files with 7 additions and 1 deletions

Binary file not shown.

View File

@ -26,6 +26,11 @@ pub const mouse_right_btn: c_int = 1;
// * true: click to enter, draw, release to exit.
pub const mouse_graphic_tablet: bool = false;
pub const default_grid_size = .{
.width = 16,
.height = 16,
};
pub const theme = .{
.background = ray.BLACK,
.mode = .{

View File

@ -49,7 +49,8 @@ pub fn main() void {
// Try to load level, is doesn't exist create it.
var level: Level = Level.init_read(allocator, level_path) catch create: {
break :create Level.init(allocator, 16, 16) catch unreachable;
break :create Level.init(allocator, conf.default_grid_size.width, conf.default_grid_size.height) catch
unreachable;
};
defer level.deinit(allocator);