I hate my life

This commit is contained in:
2021-11-05 10:55:10 -07:00
parent 489c282022
commit b6cc69eef6
18 changed files with 524 additions and 88 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
}