aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-23 18:09:09 +0200
committerBad Diode <bd@badd10de.dev>2021-05-23 18:09:09 +0200
commita928aab86ec33f385b749771747d1097b1fba277 (patch)
tree53f03275c0adecda8eea52af7ffb5f0eb499b7a1 /src
parentc0f6187b99a1d82db71616ec67286b295cc27636 (diff)
downloaduxngba-a928aab86ec33f385b749771747d1097b1fba277.tar.gz
uxngba-a928aab86ec33f385b749771747d1097b1fba277.zip
Add some configuration parameters for compilation
Diffstat (limited to 'src')
-rw-r--r--src/main.c15
1 files changed, 13 insertions, 2 deletions
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
23WITH REGARD TO THIS SOFTWARE. 23WITH REGARD TO THIS SOFTWARE.
24*/ 24*/
25 25
26//
27// Config parameters.
28//
29#ifndef TEXT_LAYER
30#define TEXT_LAYER ppu.fg
31#endif
32
33#ifndef DEFAULT_CONTROL
34#define DEFAULT_CONTROL CONTROL_CONTROLLER
35#endif
36
26typedef enum { 37typedef enum {
27 CONTROL_CONTROLLER, 38 CONTROL_CONTROLLER,
28 CONTROL_MOUSE, 39 CONTROL_MOUSE,
29} ControlMethod; 40} ControlMethod;
30 41
31static ControlMethod control_method = CONTROL_CONTROLLER; 42static ControlMethod control_method = DEFAULT_CONTROL;
32 43
33#define MOUSE_DELTA 1 44#define MOUSE_DELTA 1
34typedef struct Mouse { 45typedef struct Mouse {
@@ -280,7 +291,7 @@ int main(void) {
280 init_uxn(&u); 291 init_uxn(&u);
281 292
282 // Initialize text engine. 293 // Initialize text engine.
283 txt_init(1, ppu.fg); 294 txt_init(1, TEXT_LAYER);
284 txt_position(0,0); 295 txt_position(0,0);
285 296
286 // Main loop. 297 // Main loop.