Refactored some tooling.

This commit is contained in:
2021-10-16 20:06:17 -07:00
parent 97a8d936b5
commit d8ded38fd5
11 changed files with 260 additions and 46 deletions

View File

@ -34,6 +34,7 @@ char * assetStringLoad(char *assetName) {
assetbuffer_t * assetBufferOpen(char *assetName) {
// Get the directory based on the raw input by creating a new string.
FILE *fptr;
size_t lenAsset = strlen(assetName);// Get the length of asset
size_t lenPrefix = strlen(SETTING_ASSET_PREFIX);// Get the length of the prefix
@ -48,7 +49,7 @@ assetbuffer_t * assetBufferOpen(char *assetName) {
printf("Opening up %s\n", joined);
// Open the file pointer now.
FILE *fptr = fopen(joined, "rb");
fptr = fopen(joined, "rb");
free(joined);// Free the string we just created
if(!fptr) return NULL;// File available?
return (assetbuffer_t *)fptr;