devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

TRNs for different classes + TRN debug command

Open qndel opened this issue 2 years ago • 2 comments

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

qndel avatar Feb 20 '22 14:02 qndel

@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

qndel avatar May 10 '22 22:05 qndel

It's possible but perhaps let's add a LoadFileInMem(SDL_RWops *, ...) instead?

glebm avatar May 11 '22 06:05 glebm