Init
This commit is contained in:
26
util/font.h
Normal file
26
util/font.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Created by bruno on 1.2.2025.
|
||||
//
|
||||
|
||||
#ifndef RISCB_FONT_H
|
||||
#define RISCB_FONT_H
|
||||
|
||||
#include <SDL2/SDL_render.h>
|
||||
#include <SDL2/SDL_ttf.h>
|
||||
#include <math.h>
|
||||
|
||||
typedef struct {
|
||||
SDL_Texture *texture[256];
|
||||
SDL_Surface *surface[256];
|
||||
uint8_t size;
|
||||
SDL_Color color;
|
||||
} BitmapFont;
|
||||
|
||||
BitmapFont
|
||||
prepText(SDL_Renderer *renderer, unsigned char pxSize, const char *file, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
|
||||
|
||||
void destroyFont(BitmapFont *font);
|
||||
|
||||
void renderText(SDL_Renderer *renderer, BitmapFont font, char *string, uint16_t x, uint16_t y);
|
||||
|
||||
#endif //RISCB_FONT_H
|
Reference in New Issue
Block a user