Most texure work
This commit is contained in:
13
util/font.h
13
util/font.h
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user