Added ability to open, close and render fonts

This commit is contained in:
abdelrahman committed 2022-09-25 15:58:54 +01:00
1 parent e3f4f9c94f
commit dbc8c88b89
6 files changed
+111 -9

No files matched your search

+7 -4
View File
@@ -12,15 +12,18 @@
extern "C" {
#endif // !__cplusplus
bool init_game(const char *game_name, uint32_t window_width,
uint32_t window_height, SDL_Color window_background_color,
bool full_screen, uint8_t audio_tracks);
bool init_engine(const char *game_name, uint32_t window_width,
uint32_t window_height, SDL_Color window_background_color,
bool full_screen, uint8_t audio_tracks);
bool game_running();
ObjectID add_object(void *object, EventHandlerPtr eh, UpdateFuncPtr uf,
RenderFuncPtr rf);
void remove_object(ObjectID *id);
AssetID load_asset(const char *path, AssetType type);
void render_texture_asset(AssetID id, float x, float y, float w, float h);
void render_text_with_font_asset(AssetID id, const char *text, float x,
float y);
void set_font_asset_size(AssetID id, uint32_t size);
int8_t play_audio_asset(AssetID id, int16_t loops, bool fade_in,
uint32_t fade_length_in_ms);
void pause_audio_asset_on_track(AssetID id, uint8_t track);
@@ -54,7 +57,7 @@ void close_asset(AssetID *id);
void handle_events();
void update();
void render();
void close_game();
void close_engine();
#ifdef __cplusplus
}