-
Notifications
You must be signed in to change notification settings - Fork 4
Extends GFF and ERF a bit #11
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
base: master
Are you sure you want to change the base?
Conversation
…ich can be used to produce ERF files.
// A vector of resources contained within this ERF. | ||
std::vector<ErfResource> m_Resources; | ||
|
||
char m_FileType[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this (and the other one) to std:array<char, 4>
?
|
||
std::string ext = std::filesystem::path(out_path).extension().string().substr(1); | ||
std::transform(std::begin(ext), std::end(ext), std::begin(ext), ::toupper); | ||
std::memcpy(erf.GetFileType(), ext.c_str(), 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could we add a function to Resource.hpp to map between resource type and file type? Like: std::array<char, 4> FiletypeFromResource(ResourceType res)
.
will address soon. |
…ich was usually fine on Windows because of CRLF, but would skip empty lines on Linux.
Adds a new tool too, ERF packer.
btw, I've noticed the Friendly:: API often assumes implementation knowledge. It's worse with these changes (because I'm exposing FileType). Maybe that's not an issue?