Start abstracting the rendering backend away to make it easier to switch to GPU rendering later

This commit is contained in:
2026-05-24 21:59:29 -04:00
parent 8f613397d6
commit 6314ad7f26
13 changed files with 159 additions and 82 deletions

View File

@@ -5,6 +5,7 @@
#include "types.h"
#include <SDL3_mixer/SDL_mixer.h>
#include "tilemap.h"
#include "renderer.h"
#define AKGL_VERSION "0.1.0"
@@ -41,13 +42,13 @@ typedef struct {
} akgl_Game;
extern SDL_Window *window;
extern SDL_Renderer *renderer;
extern akgl_Tilemap gamemap;
extern MIX_Audio *bgm;
extern MIX_Mixer *akgl_mixer;
extern MIX_Track *akgl_tracks[AKGL_GAME_AUDIO_MAX_TRACKS];
extern SDL_FRect camera;
extern akgl_Game game;
extern akgl_RenderBackend renderer;
#define AKGL_BITMASK_HAS(x, y) (x & y) == y
#define AKGL_BITMASK_ADD(x, y) x |= y