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
@@ -1,15 +1,21 @@
|
||||
#ifndef GAME_H
|
||||
#define GAME_H
|
||||
|
||||
#include "AssetManager.h"
|
||||
#include "ObjectStore.h"
|
||||
#include "SDL_pixels.h"
|
||||
#include "reusable_ids.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
bool init_game(const char *game_name, int window_width, int window_height,
|
||||
bool full_screen);
|
||||
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);
|
||||
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 handle_events();
|
||||
void update();
|
||||
void render();
|
||||
|
||||
Reference in new issue
Block a user