Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for embedding the resource file inside the executable #26

Open
xslendix opened this issue May 10, 2024 · 1 comment
Open

Allow for embedding the resource file inside the executable #26

xslendix opened this issue May 10, 2024 · 1 comment

Comments

@xslendix
Copy link

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.

@ERmilburn02
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants