From a928aab86ec33f385b749771747d1097b1fba277 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 23 May 2021 18:09:09 +0200 Subject: Add some configuration parameters for compilation --- src/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index f612ef7..dd4145a 100644 --- a/src/main.c +++ b/src/main.c @@ -23,12 +23,23 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. */ +// +// Config parameters. +// +#ifndef TEXT_LAYER +#define TEXT_LAYER ppu.fg +#endif + +#ifndef DEFAULT_CONTROL +#define DEFAULT_CONTROL CONTROL_CONTROLLER +#endif + typedef enum { CONTROL_CONTROLLER, CONTROL_MOUSE, } ControlMethod; -static ControlMethod control_method = CONTROL_CONTROLLER; +static ControlMethod control_method = DEFAULT_CONTROL; #define MOUSE_DELTA 1 typedef struct Mouse { @@ -280,7 +291,7 @@ int main(void) { init_uxn(&u); // Initialize text engine. - txt_init(1, ppu.fg); + txt_init(1, TEXT_LAYER); txt_position(0,0); // Main loop. -- cgit v1.2.1