33 lines
942 B
C
33 lines
942 B
C
#ifndef BITMAP_FONT_H
|
|
#define BITMAP_FONT_H
|
|
|
|
#include "AssetManager.h"
|
|
#include "Renderer.h"
|
|
#include "SDL_pixels.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif // !__cplusplus
|
|
|
|
typedef struct bitmap_font BitmapFont;
|
|
|
|
BitmapFont *create_bitmap_font(AssetManager *am, const Renderer *renderer,
|
|
const char *filepath, u64 tile_width,
|
|
u64 tile_height);
|
|
|
|
TextSize get_text_size_from_bitmap_font(BitmapFont *font, u64 font_size,
|
|
const char *text);
|
|
|
|
void render_bitmap_font_text(AssetManager *am, Renderer *renderer,
|
|
BitmapFont *font, u64 font_size, const char *text,
|
|
u64 start_index, RenderRect dst_rect,
|
|
SDL_Color text_color);
|
|
|
|
void destroy_bitmap_font(AssetManager *am, BitmapFont **font);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif // !__cplusplus
|
|
|
|
#endif // !BITMAP_FONT_H
|