devilutionX
devilutionX copied to clipboard
TRNs for different classes + TRN debug command
Created a way to add TRNs for classes + debug command to test TRNs Made loading TRNs optional so we can just add TRN files later to make it work
@glebm Wondering if https://github.com/diasurgical/devilutionX/pull/4076/commits/6c6bb906f80874eaaaeabbe64209275a49482463 is fine, I'm not a template expert 😅 not sure if there won't be any conflict between
template <typename T, bool isOptional = false>
and
template <typename T, std::size_t N>
since bool can be treated as size and the opposite.
I'm just hoping
template <typename T, std::size_t N>
void LoadFileInMem(const char *path, std::array<T, N> &data)
arguments for that function are distinguishable enough that there won't be any confusion Do you have any idea how to handle it in a more elegant way? Ideally some type like bool that doesn't convert to a number :D
It's possible but perhaps let's add a LoadFileInMem(SDL_RWops *, ...)
instead?