Connected the AssetManager to the GameEngine and added function in the
GameEngine API to allow for loading and removing assets as well as rendering textures using their AssetID
This commit is contained in:
1 parent
c4f1775392
commit
3f71cf0f3f
11 files changed
+156
-33
No files matched your search
@@ -4,11 +4,11 @@
|
||||
#include "Renderer.h"
|
||||
#include "SDL_events.h"
|
||||
#include "engine_build_config.h"
|
||||
#include "reusable_ids.h"
|
||||
|
||||
typedef int32_t ObjectID;
|
||||
typedef void (*EventHandlerPtr)(const SDL_Event *event, void *object);
|
||||
typedef void (*UpdateFuncPtr)(float delta, void *object);
|
||||
typedef void (*RenderFuncPtr)(Renderer *renderer, void *object);
|
||||
typedef void (*RenderFuncPtr)(void *object);
|
||||
|
||||
typedef struct object_store ObjectStore;
|
||||
|
||||
@@ -18,11 +18,11 @@ ObjectID add_object_to_store(ObjectStore *os, void *object, EventHandlerPtr eh,
|
||||
void remove_object_from_store(ObjectStore *os, ObjectID id);
|
||||
void handle_all_objects_events(ObjectStore *os, const SDL_Event *event);
|
||||
void update_all_objects(ObjectStore *os, float delta);
|
||||
void render_all_objects(ObjectStore *os, Renderer *renderer);
|
||||
void render_all_objects(ObjectStore *os);
|
||||
void destroy_object_store(ObjectStore *os);
|
||||
|
||||
#ifdef DEBUG_ENGINE
|
||||
void print_objects(ObjectStore *os);
|
||||
#endif /* DEBUG_ENGINE */
|
||||
#endif // !DEBUG_ENGINE
|
||||
|
||||
#endif // !OBJECT_STORE_H
|
||||
Reference in new issue
Block a user