I hate my life

This commit is contained in:
2021-11-05 10:55:10 -07:00
parent f6ea081b2d
commit 715ecd3a73
16 changed files with 522 additions and 86 deletions

View File

@ -47,4 +47,12 @@ void fileMkdirp(char *path) {
buffer[i] = '\0';
_mkdir(buffer);
}
}
void assetReadString(FILE *file, char *buffer) {
size_t length;
fseek(file, 0, SEEK_END);// Seek to the end
length = ftell(file);// Get our current position (the end)
fseek(file, 0, SEEK_SET);// Reset the seek
fread(buffer, 1, length, file);// Read all the bytes
}