blob: 98f806ace560918660f2d82761f42409023c5f35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "config.h"
#include "defaults.h"
#include <string.h>
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;
}
|