diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-11-08 02:34:04 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-11-08 02:34:04 +0100 |
| commit | 8ea8da50d1f01fbbfce9e752d73a9303334555b4 (patch) | |
| tree | 7b57544c376ca8907ccf26a878c2d12e202b50e4 /src/game | |
| parent | 468468633e2b07e39d3edeb169a1924d4c4ce773 (diff) | |
| download | pinboid-8ea8da50d1f01fbbfce9e752d73a9303334555b4.tar.gz | |
Upload TIM files into VRAM
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/game/inc/game.h | 15 | ||||
| -rw-r--r-- | src/game/src/game.c | 24 |
3 files changed, 42 insertions, 0 deletions
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt new file mode 100644 index 0000000..89cd1f0 --- /dev/null +++ b/src/game/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(game "src/game.c") +target_include_directories(game PUBLIC "inc") +target_link_libraries(game PRIVATE gfx) diff --git a/src/game/inc/game.h b/src/game/inc/game.h new file mode 100644 index 0000000..8275d54 --- /dev/null +++ b/src/game/inc/game.h @@ -0,0 +1,15 @@ +#ifndef GAME_H +#define GAME_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +int game(void); + +#ifdef __cplusplus +} +#endif + +#endif /* GAME_H */ diff --git a/src/game/src/game.c b/src/game/src/game.c new file mode 100644 index 0000000..b17e534 --- /dev/null +++ b/src/game/src/game.c @@ -0,0 +1,24 @@ +#include <game.h> +#include <gfx.h> + +static int init(void) +{ + struct gfx_sprite s, s2; + + if (gfx_sprite_from_file("cdrom:\\block.TIM;1", &s)) + return -1; + + gfx_sprite_sort(&s); + s2 = s; + gfx_sprite_sort(&s2); + gfx_draw(); + return 0; +} + +int game(void) +{ + if (init()) + return -1; + + return 0; +} |
