Expose bitmap font rendering in the GameEngine API
This commit is contained in:
1 parent
fe427689cf
commit
0e18dd0705
2 files changed
+52
-26
No files matched your search
+10
-3
@@ -2,6 +2,7 @@
|
||||
#define GAME_H
|
||||
|
||||
#include "AssetManager.h"
|
||||
#include "BitmapFont.h"
|
||||
#include "ObjectStore.h"
|
||||
#include "Renderer.h"
|
||||
#include "SDL_pixels.h"
|
||||
@@ -42,6 +43,9 @@ void remove_object(ObjectID *id);
|
||||
// ASSET MANAGEMENT API
|
||||
AssetID load_asset(const char *path, AssetType type);
|
||||
void unload_asset(AssetID *id);
|
||||
BitmapFont *load_bitmap_font(const char *filepath, u64 tile_width,
|
||||
u64 tile_height);
|
||||
void unload_bitmap_font(BitmapFont **font);
|
||||
// END ASSET MANAGEMENT API
|
||||
|
||||
// RENDERING API
|
||||
@@ -80,12 +84,15 @@ void render_texture_asset(AssetID id, const RenderRect *src,
|
||||
void modulate_texture_color(AssetID id, SDL_Color color);
|
||||
void modulate_texture_alpha(AssetID id, u8 alpha);
|
||||
TextSize get_text_size_from_font_asset(AssetID id, const char *text);
|
||||
void render_text_with_font_asset(AssetID id, const char *text,
|
||||
const RenderRect *src, RenderRect dest,
|
||||
SDL_Color color);
|
||||
void set_font_asset_size(AssetID id, u32 size);
|
||||
i32 set_font_direction(AssetID id, FontDirection direction);
|
||||
i32 set_font_script_name(AssetID id, const char *script);
|
||||
void render_text_with_font_asset(AssetID id, const char *text,
|
||||
const RenderRect *src, RenderRect dest,
|
||||
SDL_Color color);
|
||||
void render_text_with_bitmap_font(BitmapFont *font, const char *text,
|
||||
u64 font_size, u64 start_index,
|
||||
RenderRect dest, SDL_Color color);
|
||||
// END RENDERING API
|
||||
|
||||
// AUDIO API
|
||||
|
||||
Reference in new issue
Block a user