leoetlino / project-restoration

A Majora's Mask 3D patch that restores some mechanics from the original game to get the best of both worlds
https://zora.re/storation
GNU General Public License v2.0
693 stars 24 forks source link

OffsetOf Fixes #190

Closed PhlexPlexico closed 3 years ago

PhlexPlexico commented 3 years ago

Just recently updated my 3dstools and libctru to see that the implemented OffsetOf no longer works.

"/mnt/c/Users/phlex/Projects/project-restoration/source/./game/context.h:358:63: error: non-constant condition for static assertion\n"
"  358 | static_assert(rst::util::OffsetOf(&GlobalContext::field_C4C8) == 0xC4C8);\n"

This PR is to change them over to regular offsetof calls. It does compile. but there are loads of more warnings during the compilation. I guess having it successfully compile is better than having no warnings, right?

leoetlino commented 3 years ago

If you can, please squash the commit history. The first 12 commits shouldn't show up in the history ^^

PhlexPlexico commented 3 years ago

Was away for break here, but I hope this is okay now 😬 I don't really do squashes very often so this was definitely a good experience for me, lemme know if anything else is needed!