* Array size UB fixes
* Fix ShieldD
* Remove (almost) all unsafe strcpy calls
Bunch of macros. C arrays are easy enough and just need a different call. For various cases where a char* is passed around bare, I've made a TEXT_SPAN macro that can store a length too for bounds checking.
* Move crash handling in safe string operations to separate TU
* strcat safe version
* sprintf made safe too
* Fix compile
* Consolidate fopAcM_STATUS into fopAc_Status_e
* Add _e suffix to fopAcStts enums
* Prepare for profile enumeration
* Correct typo in scene_process_profile_definition
* Manually handle g_profile_Obj_DamCps (inline preprocessing)
* Correct g_profile_TAG_LV5SOUP procname to enum
* Create d_priority.h
* Update process profile definitions
* Moved inline comments to the left
* Add missing fopAcStts enums
* Add d_priority.h include in f_pc_leaf.h
* Manually update d_a_obj_damCps profile
* Replace fopAcStts enums replacing and anticipatory profile size correction
* Changed profile size from literal to sizeof() in anticipation of PR #3116
* Provided putative names to staff-related status enums
* Replaced appropriate literals with fopAcStts enums
* Fix borked merge
* Rename item number enums and move to d_item_data.h
* Rename process profile name & draw priority enums
* Move process profile name & draw priority enums to appropriate files
* Moved fpcNm_ enums from d/d_procname.h to f_pc/f_pc_name.h
* Moved fpcDwPi_ enums from d/d_priority.h to f_pc/f_pc_draw_priority.h
* ACTUALLY (whoops) stage merge
* Correct item mistranslation
Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
---------
Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
* Fix remaining <string> -> <cstring> for GCC compilation (#3114 follow-up)
MWerks' <string> header transitively includes C string functions
(memcpy, strlen, strcmp, etc.), but GCC/Clang's <string> is the C++
std::string header. These files all use C string functions and should
include <cstring> instead.
* Use std::isnan instead of isnan for GCC compilation
GCC's <cmath> places isnan in the std namespace. Using the unqualified
isnan fails to compile with GCC/Clang.
* Fix cCcD_Src types: s32 -> u32 for bitmask fields
cCcD_SrcObjCommonBase::mSPrm, cCcD_SrcObjTg::mType, and
cCcD_SrcObjAt::mType are used as bitmasks (SetType/SetSPrm take u32,
MskType/MskSPrm use u32, values like 0xFFFFFFFF are common in
aggregate inits). Change from s32 to u32 to match usage.
Also fix AT_TYPE_WOLF_ATTACK/AT_TYPE_UNK to use unsigned literals,
and remove now-unnecessary (s32) casts on hex literals in collision
source data.
* Mark dummy() functions as static to avoid multiple definition errors
These decomp artifact functions have the same name and signature across
TUs, causing linker errors when building as a single binary.
* Last fix for standard compiler error
* adding define guards around headers
* rename cmath.h and climits.h to cmath and climits respectively
* renaming cstdarg.h to cstdarg
* renaming cstdlib.h to cstdlib
* renaming cstring.h to cstring
* renaming cstdio.h to cstdio
* renaming cmath locale ctype
* renaming stdarg string and va_list
* renaming cstddef
* renaming stdio stddef stdlib
* renaming algorithm, functional, iterator, memory, and utility
* renaming bitset, cstdint, limits, and stdint
* renaming new and type_traits
* update quote includes for standard library headers to angle bracket includes
* Clean up various inlines/fakematches/comments
* Copy OptRuby inline name from TWW debug
* Resolve all dEvt_control_c related fakematches, return pointer instead of reference
* Fix some more missing inline usages
* menu_fmap2d debug progress
* match debug for d_menu_fmap2D
* fix broken function
* fix weird shield mismatch
* fix other shield mismatch
* fix suggestions
* fix func for wii version
* match func for all versions
* remove cast from saveBitLabels
* Fix JUT_ASSERT to be a nested define
* Switch names that appear in asserts to be constants instead of defines
* Replace `0` in asserts with `NULL` or `FALSE`
* Fix fpclassify
* Fix ARRAY_SIZE
* Use G_CM3D_F_INF
* More fixes for fpclassify
* Remove FLOAT_LABEL
* Remove incorrect FLAG_ON macro
* Remove UNK_BSS macro
* Silence clangd unused header warning for PCH
* anm_init and nodeCallBack, need to review nodeCallBack as weird code
* First pass on class, 86% match
* Cleanup for PR, still work to do
* Solve error after pull
* Clangd format
* Adressing PR comments
* Update l_HIOInit
* Fix debug building, 60% match on debug :')
* d_save debug cleanup / d_s_menu debug
* gameinfo / kankyo struct debug fixes
* pal building ok
* jp building ok
* some tests with jp
* some more pal/jp tests
* Fix missing arg to JUT_ASSERT
* Fix some MWCC version diff errors
* Compile m_Do_ext, d_demo, actor_mng
* Add VSCode task to quickly switch between versions
* Unlink magLift for debug
* Update the hash of the debug dol
The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment.
The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol.
The DOL now builds OK.
* Fix all debug REL dtor splits
All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds.
* Add genMessage declarations to all HIO subclasses
* Fixing more compilation errors
* m_Do_mtx 100% on debug
Cannot be linked due to weak function name mangling?
* Improve various matches
* Fix all remaining compilation errors
* Fix new compilation errors from main
* Fix retail regression
* Link f_pc_profile_lst