open-ead / sead

Decompilation of sead: the standard C++ library for first-party Nintendo games
190 stars 26 forks source link

C++14 support (replacing C++17-only features) #82

Closed MonsterDruide1 closed 3 years ago

MonsterDruide1 commented 3 years ago

To support clang-3.9.1 for building Super Mario Odyssey, C++17 features have to be dropped. Here, this results in one major change: As string_view gets unusable, the signatures of blocks in modules/src/resource/seadSharcArchiveRes.cpp can't be checked using that. Instead, std::strncmp is used then.


This change is Reviewable

aboood40091 commented 3 years ago

Yeah, I noticed recently that this is a mistake on my part in the original sead because they used memcmp in sead. The reason I made that mistake is due to confusion as I was also reverse-engineering nw::lyt at the time. nw::lyt::ArcExtractor::PrepareArchive() is an exact match of sead::SharcArchiveRes::prepareArchive_() (Nintendo copying code between NintendoWare and sead again), except for a single difference which is that nw used strncmp, whereas sead used memcmp.