From 74ea6dc86646cee9915292d73d8c7afef01ef3e0 Mon Sep 17 00:00:00 2001 From: Sopár Adrián Date: Thu, 20 Jun 2024 09:28:14 +0200 Subject: First commit. This is mostly the state of the project as I left it around the end of 2019. --- src/config.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/config.c (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c new file mode 100644 index 0000000..98f806a --- /dev/null +++ b/src/config.c @@ -0,0 +1,16 @@ +#include "config.h" +#include "defaults.h" +#include + +struct conf *load_default_conf() +{ + struct conf *conf = malloc(sizeof(struct conf)); + //Bindings. + struct binding bindings[] = DEFAULT_BINDINGS; + conf->bindings = malloc(sizeof(bindings)); + memcpy(conf->bindings, bindings, sizeof(bindings)); + conf->count = sizeof(bindings) / sizeof(struct binding); + //Game blocks. + set_blocks(&(conf->blocks)); + return conf; +} \ No newline at end of file -- cgit v1.2.3