Most texure work

This commit is contained in:
2025-06-10 21:59:51 +02:00
parent a17e3abbff
commit 39c31f0042
103 changed files with 666 additions and 246 deletions

View File

@@ -9,19 +9,20 @@
#include <SDL2/SDL_ttf.h>
#include <math.h>
#define fontCount 4
#define fontCount 5
typedef struct BitmapFont {
SDL_Texture *texture[256];
SDL_Surface *surface[256];
typedef struct {
SDL_Texture *atlas;
SDL_Rect glyphs[256];
uint8_t size;
SDL_Rect atlasRect;
SDL_Color color;
} BitmapFont;
extern BitmapFont fonts[fontCount];
BitmapFont
prepText(SDL_Renderer *renderer, unsigned char pxSize, const char *file, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
BitmapFont prepText(SDL_Renderer *renderer, unsigned char pxSize, const char *file);
void destroyFont(BitmapFont *font);