Added support for desktop full screen with pillarboxing and letterboxing
and started adding some comments to the code
This commit is contained in:
1 parent
ffaa6e5ae7
commit
e110b1f2fd
10 files changed
+351
-77
No files matched your search
@@ -17,13 +17,36 @@ typedef void (*RenderFuncPtr)(void *object);
|
||||
|
||||
typedef struct object_store ObjectStore;
|
||||
|
||||
/**
|
||||
* Attempts to allocate an ObjectStore object on the heap.
|
||||
*
|
||||
* Returns the pointer to the object when it succeeds, or NULL if it fails.
|
||||
*/
|
||||
ObjectStore *create_object_store();
|
||||
|
||||
/**
|
||||
* Attempts to add an object to the store.
|
||||
*
|
||||
* Returns the ObjectID on success or an INVALID_ID in the case of failure.
|
||||
*/
|
||||
ObjectID add_object_to_store(ObjectStore *os, void *object, EventHandlerPtr eh,
|
||||
UpdateFuncPtr uf, RenderFuncPtr rf);
|
||||
|
||||
/**
|
||||
* Removes an object from the store using its ID.
|
||||
*
|
||||
* Does nothing if the ID is not valid.
|
||||
*/
|
||||
void remove_object_from_store(ObjectStore *os, ObjectID *id_ptr);
|
||||
|
||||
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);
|
||||
|
||||
/**
|
||||
* Frees the memory allocated to the ObjectStore object and performs the
|
||||
* necessary cleanup.
|
||||
*/
|
||||
void destroy_object_store(ObjectStore **os);
|
||||
|
||||
#ifdef DEBUG_ENGINE
|
||||
|
||||
Reference in new issue
Block a user