Temporal changes
This commit is contained in:
parent
c2786fdceb
commit
9420ca82fe
|
@ -0,0 +1,11 @@
|
|||
@import("../input.zig");
|
||||
|
||||
fn loadControls() void {
|
||||
|
||||
}
|
||||
|
||||
fn createControls() void {
|
||||
|
||||
}
|
||||
|
||||
pub const controls = config.init("coso.ini")I
|
|
@ -0,0 +1 @@
|
|||
const Score = @Type(u64);
|
|
@ -1,4 +1,6 @@
|
|||
const rl = @import("raylib.zig");
|
||||
const std = @import("std");
|
||||
const config = @import("Config/config.zig");
|
||||
|
||||
pub const Input = struct {
|
||||
name: []const u8,
|
||||
|
@ -24,6 +26,20 @@ fn init(comptime name: []const u8, comptime key_code: []const u8) Input {
|
|||
};
|
||||
}
|
||||
|
||||
pub fn loadConfig() void {
|
||||
var configIterator = config.getConfigIterator("input.ini") catch {
|
||||
// Error opening config
|
||||
std.debug.print("Cannot load input.ini configuration file, using default keybindings\n");
|
||||
return;
|
||||
};
|
||||
|
||||
// while (configIterator.next()) |option| {
|
||||
|
||||
// }
|
||||
configIterator.deinit();
|
||||
|
||||
}
|
||||
|
||||
pub var menu_right = init("Menu Right", "RIGHT");
|
||||
pub var menu_left = init("Menu Left", "LEFT");
|
||||
pub var menu_down = init("Menu Down", "DOWN");
|
||||
|
|
|
@ -11,11 +11,6 @@ const State = @import("flow.zig").State;
|
|||
|
||||
pub fn main() !void {
|
||||
|
||||
var configIterator = config.getConfigIterator("test") catch unreachable;
|
||||
while (configIterator.next()) |option| {
|
||||
std.debug.print("Key: {s}, Option: {s}\n", .{option.key, option.value});
|
||||
}
|
||||
configIterator.deinit();
|
||||
|
||||
|
||||
var renderer = try Renderer.init();
|
||||
|
|
Loading…
Reference in New Issue