z_mirror/sdl-osu

git clone https://git.raiguard.me/z_mirror/sdl-osu

Caleb HeuerSwitch to four-space indents and inline braces836a89c

trunk
1.1 KiB38 linesraw
1#pragma once
2#include "game.h"
3#include <SDL3/SDL_rect.h>
4
5struct Osu_Graphics {
6    struct SDL_Window* window;
7    struct SDL_Renderer* renderer;
8
9    struct TTF_Font* font;
10    struct TTF_Font* debugFont;
11    struct TTF_TextEngine* textEngine;
12
13    struct TTF_Text* debugText;
14
15    struct SDL_Texture* selectedBeatmapWallpaper;
16
17    struct SDL_FRect screenRect;
18
19    Uint8 beatmapDimFactor;
20
21    // Static textures; will not change during runtime
22    struct SDL_Texture* beatmapWedgeTexture;
23    struct SDL_Texture* cursorTexture;
24    struct SDL_Texture* menuBackgroundTexture;
25    struct SDL_Texture* songSelectTopTexture;
26    struct SDL_Texture* hitCircleTexture;
27    struct SDL_Texture* hitCircleOverlayTexture;
28    struct SDL_Texture* approachCircleTexture;
29};
30
31struct Osu_Graphics* Osu_CreateGraphics(const char* dataPath);
32void Osu_DestroyGraphics(struct Osu_Graphics* graphics);
33
34void Osu_PrepareRender(struct Osu_Graphics* graphics);
35void Osu_RenderWallpaper(struct Osu_Graphics* graphics);
36void Osu_RenderCursor(struct Osu_Graphics* graphics);
37
38void Osu_SetWallpaper(struct Osu_Graphics* graphics, const char* filePath);