Conditionally compile BitmapFont for Anroid

This commit is contained in:
abdelrahman committed 2023-10-01 15:52:03 +01:00
1 parent bfe6d48527
commit 2d5719fc64
4 files changed
+18

No files matched your search

+4
View File
@@ -1,6 +1,8 @@
#ifndef BITMAP_FONT_H
#define BITMAP_FONT_H
#ifdef __ANDROID__
#include "AssetManager.h"
#include "Renderer.h"
#include "SDL_pixels.h"
@@ -29,4 +31,6 @@ void destroy_bitmap_font(AssetManager *am, BitmapFont **font);
}
#endif // !__cplusplus
#endif // __ANDROID__
#endif // !BITMAP_FONT_H
+6
View File
@@ -43,9 +43,12 @@ void remove_object(ObjectID *id);
// ASSET MANAGEMENT API
AssetID load_asset(const char *path, AssetType type);
void unload_asset(AssetID *id);
#ifdef __ANDROID__
BitmapFont *load_bitmap_font(const char *filepath, u64 tile_width,
u64 tile_height);
void unload_bitmap_font(BitmapFont **font);
#endif // __ANDROID__
// END ASSET MANAGEMENT API
// RENDERING API
@@ -90,9 +93,12 @@ 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);
#ifdef __ANDROID__
void render_text_with_bitmap_font(BitmapFont *font, const char *text,
u64 font_size, u64 start_index,
RenderRect dest, SDL_Color color);
#endif // __ANDROID__
// END RENDERING API
// AUDIO API