Enabled SDL_image's support for PNG and TIFF files and improved the
AssetManager with a hashing function, a linked list structure to store the hashes as well as a reference counter to support multiple users sharing the same asset.
This commit is contained in:
1 parent
3f71cf0f3f
commit
dfee36ffe9
12 files changed
+292
-60
No files matched your search
+10
-2
@@ -7,18 +7,26 @@
|
||||
#include "reusable_ids.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // !__cplusplus
|
||||
|
||||
bool init_game(const char *game_name, int window_width, int window_height,
|
||||
SDL_Color window_background_color, bool full_screen);
|
||||
bool game_running();
|
||||
ObjectID add_object(void *object, EventHandlerPtr eh, UpdateFuncPtr uf,
|
||||
RenderFuncPtr rf);
|
||||
void remove_object(ObjectID id);
|
||||
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 close_asset(AssetID id);
|
||||
void close_asset(AssetID *id);
|
||||
void handle_events();
|
||||
void update();
|
||||
void render();
|
||||
void close_game();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // !__cplusplus
|
||||
|
||||
#endif // !GAME_H
|
||||
Reference in new issue
Block a user