From d49c62663b6a2229e9849769591873005c762618 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 3 Jan 2021 09:23:25 +0000 Subject: Renamed aux to helpers to be windows compatible --- game/src/aux.c | 18 ------------------ game/src/aux.h | 12 ------------ game/src/game.c | 2 +- game/src/helpers.c | 18 ++++++++++++++++++ game/src/helpers.h | 12 ++++++++++++ game/src/main.c | 2 +- 6 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 game/src/aux.c delete mode 100644 game/src/aux.h create mode 100644 game/src/helpers.c create mode 100644 game/src/helpers.h (limited to 'game') diff --git a/game/src/aux.c b/game/src/aux.c deleted file mode 100644 index b8864c6..0000000 --- a/game/src/aux.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#include "ubox.h" - -#include "aux.h" - -/** - * Put a zero terminated string on the screen using tiles. - * - * The font starts on the tileset on tile 128 and the fist char in our has - * ASCII value 31, so it is adjusted so we can use ASCII *uppercase* directly - * in our C code. - */ -void put_text(uint8_t x, uint8_t y, const uint8_t *text) -{ - while (*text) - ubox_put_tile(x++, y, *text++ + 128 - 31); -} diff --git a/game/src/aux.h b/game/src/aux.h deleted file mode 100644 index 64dfbbd..0000000 --- a/game/src/aux.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _AUX_H -#define _AUX_H - -#include - -/** - * Auxiliary functions. - */ - -void put_text(uint8_t x, uint8_t y, const uint8_t *text); - -#endif // _AUX_H diff --git a/game/src/game.c b/game/src/game.c index bb08f32..f5f5970 100644 --- a/game/src/game.c +++ b/game/src/game.c @@ -5,7 +5,7 @@ #include "spman.h" #include "mplayer.h" -#include "aux.h" +#include "helpers.h" #include "main.h" #define LOCAL diff --git a/game/src/helpers.c b/game/src/helpers.c new file mode 100644 index 0000000..9aa4785 --- /dev/null +++ b/game/src/helpers.c @@ -0,0 +1,18 @@ +#include + +#include "ubox.h" + +#include "helpers.h" + +/** + * Put a zero terminated string on the screen using tiles. + * + * The font starts on the tileset on tile 128 and the fist char in our has + * ASCII value 31, so it is adjusted so we can use ASCII *uppercase* directly + * in our C code. + */ +void put_text(uint8_t x, uint8_t y, const uint8_t *text) +{ + while (*text) + ubox_put_tile(x++, y, *text++ + 128 - 31); +} diff --git a/game/src/helpers.h b/game/src/helpers.h new file mode 100644 index 0000000..8f35661 --- /dev/null +++ b/game/src/helpers.h @@ -0,0 +1,12 @@ +#ifndef _HELPERS_H +#define _HELPERS_H + +#include + +/** + * Auxiliary functions. + */ + +void put_text(uint8_t x, uint8_t y, const uint8_t *text); + +#endif // _HELPERS_H diff --git a/game/src/main.c b/game/src/main.c index 23591ca..6ac4833 100644 --- a/game/src/main.c +++ b/game/src/main.c @@ -3,7 +3,7 @@ #include "ubox.h" #include "mplayer.h" -#include "aux.h" +#include "helpers.h" #include "game.h" #define LOCAL -- cgit v1.2.3