71 int resourceIndex = -1;
74 if (resourceList != NULL && resource != NULL)
83 new_list = realloc(resourceList->
resources, newSize);
90 resourceList->
resources[resourceIndex] = resource;
117 if (rawResource != NULL)
void BigResource_Clear(BigResource *resource)
Clear the BigResource object, freeing any memory associated with it.
static int BigResourceList_AddResource(BigResourceList *resourceList, BigResource *resource)
Add a BigResource object to the given BigResourceList object. The list takes ownership of the BigReso...
static BigResourceList _resources
A list of BigResource objects. Initialized by a call to the BigResourceList_AddResource()....
int BigResourceManager_AddResource(BigResource *rawResource)
Add a new big resource and return the ID of the resource. If the resource is successfully added,...
void BigResourceManager_Clear(void)
Release all resources owned by the Big Resource Manager.
BigResource * BigResourceManager_GetResource(int bigResourceId)
Retrieve the requested big resource.
static void BigResourceList_Clear(BigResourceList *resourceList)
Clear the given BigResourceList object by freeing up all allocated BigResource objects and resetting ...
Declaration of the Big Resource Manager functions, BigResourceManager_Clear(), BigResourceManager_Add...
Represents a big image. Call the BigResource_Clear() function to release the memory used by each inst...
Represents an expandable list of pointers to BigResource objects. Use the BigResourceList_Clear() to ...
BigResource ** resources
Dynamic list of pointers to BigResource objects.
size_t resources_count
Number of BigResource objects in the list.