diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-02-18 13:19:52 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-02-18 13:19:52 +0100 |
| commit | 2a1f31365dade481c32efc3307f94cc052d00f7f (patch) | |
| tree | 54acaae0d6c18106a82eb263e3b860197908f903 /src | |
| parent | 63fd09807c528915ac5ba6bc9eb11520cbf073e0 (diff) | |
| download | snake.s-2a1f31365dade481c32efc3307f94cc052d00f7f.tar.xz snake.s-2a1f31365dade481c32efc3307f94cc052d00f7f.zip | |
refactor: split SDL bindings
Diffstat (limited to 'src')
| -rw-r--r-- | src/error.S | 1 | ||||
| -rw-r--r-- | src/libs/sdl.S | 36 | ||||
| -rw-r--r-- | src/main.S | 4 |
3 files changed, 4 insertions, 37 deletions
diff --git a/src/error.S b/src/error.S index af441ce..44be8b0 100644 --- a/src/error.S +++ b/src/error.S @@ -1,4 +1,5 @@ #include "helpers/function.S" +#include "SDL/error.S" .section .text diff --git a/src/libs/sdl.S b/src/libs/sdl.S deleted file mode 100644 index 485dfd7..0000000 --- a/src/libs/sdl.S +++ /dev/null @@ -1,36 +0,0 @@ -//! @file sdl.S -//! -//! Assembler bindings for SDL2 - -#define SDL_INIT_TIMER 0x00000001u -#define SDL_INIT_AUDIO 0x00000010u -#define SDL_INIT_VIDEO 0x00000020u -#define SDL_INIT_JOYSTICK 0x00000200u -#define SDL_INIT_HAPTIC 0x00001000u -#define SDL_INIT_GAMECONTROLLER 0x00002000u - -#define SDL_RENDERER_ACCELERATED 0x00000002u - -#define SDL_WINDOW_SHOWN 0x00000004u - -#define SDL_WINDOWPOS_UNDEFINED 0x1FFF0000u - -// int SDL_Init(uint32_t flags) -.type SDL_Init, @function -.extern SDL_Init - -// SDL_Renderer * SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags); -.type SDL_CreateRenderer, @function -.extern SDL_CreateRenderer - -// SDL_Window * SDL_CreateWindow(const char *title, int x, int y, int w, int h, uint32_t flags) -.type SDL_CreateWindow, @function -.extern SDL_CreateWindow - -// void SDL_DestroyWindow(SDL_Window *window) -.type SDL_DestroyWindow, @function -.extern SDL_DestroyWindow - -// void SDL_Quit(void) -.type SDL_Quit, @function -.extern SDL_Quit
\ No newline at end of file @@ -1,5 +1,7 @@ #include "helpers/function.S" -#include "libs/sdl.S" +#include "SDL/init.S" +#include "SDL/render.S" +#include "SDL/video.S" #define SCREEN_WIDTH 800 #define SCREEN_HEIGHT 600 |
