Skip to content

Conversation

EctoplasmNWN
Copy link
Contributor

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?

// A vector of resources contained within this ERF.
std::vector<ErfResource> m_Resources;

char m_FileType[4];
Copy link
Owner

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);
Copy link
Owner

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).

@EctoplasmNWN
Copy link
Contributor Author

will address soon.

…ich was usually fine on Windows because of CRLF, but would skip empty lines on Linux.
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

Successfully merging this pull request may close these issues.

2 participants