Conditionally compile BitmapFont for Anroid
This commit is contained in:
1 parent
bfe6d48527
commit
2d5719fc64
4 files changed
+18
No files matched your search
@@ -1,3 +1,5 @@
|
||||
#ifdef __ANDROID__
|
||||
|
||||
#include "BitmapFont.h"
|
||||
#include "AssetManager.h"
|
||||
#include "Renderer.h"
|
||||
@@ -147,3 +149,5 @@ RenderRect get_character_sprite(BitmapFont *font, u64 index) {
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
#endif /* ifdef __ANDROID__ */
|
||||
@@ -216,6 +216,7 @@ void unload_asset(AssetID *id) {
|
||||
remove_asset_from_manager(GameEngine.asset_manager, id);
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
BitmapFont *load_bitmap_font(const char *filepath, u64 tile_width,
|
||||
u64 tile_height) {
|
||||
return create_bitmap_font(GameEngine.asset_manager,
|
||||
@@ -226,6 +227,7 @@ BitmapFont *load_bitmap_font(const char *filepath, u64 tile_width,
|
||||
void unload_bitmap_font(BitmapFont **font) {
|
||||
destroy_bitmap_font(GameEngine.asset_manager, font);
|
||||
}
|
||||
#endif /* ifdef __ANDROID__ */
|
||||
|
||||
WindowSize get_window_defined_size() { return GameEngine.window.defined_size; }
|
||||
|
||||
@@ -450,12 +452,14 @@ void render_text_with_font_asset(AssetID id, const char *text,
|
||||
surface = NULL;
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
void render_text_with_bitmap_font(BitmapFont *font, const char *text,
|
||||
u64 font_size, u64 start_index,
|
||||
RenderRect dest, SDL_Color color) {
|
||||
render_bitmap_font_text(GameEngine.asset_manager, GameEngine.window.renderer,
|
||||
font, font_size, text, start_index, dest, color);
|
||||
}
|
||||
#endif /* ifdef __ANDROID__ */
|
||||
|
||||
i8 play_audio_asset(AssetID id, i16 loops, bool fade_in,
|
||||
u32 fade_length_in_ms) {
|
||||
|
||||
Reference in new issue
Block a user