You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With C23, there is now a #embed preprocessor macro that can be used to embed raw file data. It would be cool to have some functions that allow us to specify a buffer and size instead of just a file path option.
Example:
In addition to rresResourceChunk rresLoadResourceChunk(const char *fileName, int rresId), there could be a rresResourceChunk rresLoadResourceChunk(const unsigned char *buffer, size_t buffer_size, int rresId) as well.
The text was updated successfully, but these errors were encountered:
Even before that, you could have just used one of the countless tools to convert the file to a C file, and compiled it into the binary. the #embed preprocessor just makes it easier.
That said, being able to load from a buffer would be useful.
With C23, there is now a
#embed
preprocessor macro that can be used to embed raw file data. It would be cool to have some functions that allow us to specify a buffer and size instead of just a file path option.Example:
In addition to
rresResourceChunk rresLoadResourceChunk(const char *fileName, int rresId)
, there could be arresResourceChunk rresLoadResourceChunk(const unsigned char *buffer, size_t buffer_size, int rresId)
as well.The text was updated successfully, but these errors were encountered: