Commit Graph

182 Commits

Author SHA1 Message Date
TakaRikka 6e149819e1 d_s_logo / d_s_play debug work, d_a_kago cleanup, misc cleanup (#3116)
* d_a_kago cleanup

* d_s_logo wii/shield work

* d_s_logo / d_s_play debug work

* fix missing profile class sizeof's

* fix phase->id values

* build fixes

* fix dCamera_c and camera profile
2026-03-01 13:19:48 -08:00
Luke Street b5d3b8c059 Another round of GCC fixes (#3115)
* 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.
2026-02-28 13:35:07 -08:00
Luke Street c900a043b8 Some GCC compilation fixes (#3114)
* Fix 6-byte multichar literals

* Add `struct` to `e_ga_class::ga_s`

* Fix remaining wrong forward declares (struct/class)

* Replace `#include <string>` with `#include <cstring>`

* Guard FLT_EPSILON define to prevent redefinition

* Add missing `#include <cstring>` for direct cstring function usage
2026-02-28 12:11:00 -08:00
Pieter-Jan Briers f54661f878 Fix MORE wrong forward declares (struct/class) (#3110) 2026-02-24 14:20:45 -08:00
roeming 0558bde1e6 Big cast cleanup (#3076)
* Big cast cleanup

* fix for name conflict

* rename header

* rename cast macros

* fix rename mistake

---------

Co-authored-by: roeming <roeming@users.noreply.github.com>
2026-02-20 02:48:29 -08:00
Jcw87 21de544196 d_com_inf_game debug (#3075)
* d_com_inf_game debug

* inline sorting
2026-01-29 18:58:59 -08:00
TakaRikka 5867eaf68b general cleanup, d_menu_quit / d_a_obj_testcube mostly done, d_msg_scrn_explain debug (#3065)
* typedef for cPhs_Step

* make sdk includes consistent

* d_menu_quit / d_msg_scrn_explain debug

* d_a_obj_testcube mostly done

* d_debug_pad mostly done

* jstudio tool library headers

* some JStudioCameraEditor headers

* d_jcam_editor mostly done

* try fixing some shield regressions

* d_bg_parts mostly done

* fix merge errors

* debug fix
2026-01-24 23:36:23 -08:00
roeming 740387eb4f match d_a_npc_tk for debug (#3046)
* match d_a_npc_tk for debug

* fix macro usage

* fix whitespace
2026-01-17 15:45:52 +02:00
TakaRikka b1f44ce532 d_a_alink cleanup / debug work (#3045)
* start d_a_alink debug cleanup

* d_a_alink_damage debug

* d_a_alink_guard debug

* d_a_alink_bow debug

* d_a_alink_boom debug

* d_a_alink_copyrod debug

* d_a_alink_hvyboots debug

* d_a_alink_grab debug

* d_a_alink_sumou debug

* d_a_alink_horse debug

* d_a_alink_canoe debug

* d_a_alink_crawl / d_a_alink_hang debug

* d_a_alink_swim debug

* d_a_alink_hook / d_a_alink_iceleaf debug

* d_a_alink_bottle debug

* d_a_alink_whistle / d_a_alink_kandelaar / d_a_alink_ironball debug

* d_a_alink_demo debug

* d_a_alink_effect debug

* d_a_alink_wolf debug

* d_a_alink debug / cleanup

* cleanup button status enums
2026-01-17 15:44:37 +02:00
kipcode66 dd03bf861f standard compiler compatibility changes (#3040)
* move math to cmath

* replace stdarg to cstdarg

* change stdint to stdint.h

* minor fixes

* change stdio to cstdio

* change stdlib to stdlib

* renamed ctype to cctype

* fix missing argument for UNSET_FLAG
2026-01-13 00:48:25 +02:00
YunataSavior 53aaed17c0 obj_pumpkin dbg equiv (#3036) 2026-01-12 22:18:58 +02:00
Max Roncace decb0c5437 d_camera debug almost matching (#3032) 2026-01-11 19:20:17 -08:00
roeming 562f4d0d65 first round of constants cleanup (#3021)
* first round of constants cleanup

* move m_PI_D definition

* remove compatibility comment

* add future version of angle subtracting with/without cast

* whitespace change to run builds again
2026-01-10 23:38:04 +02:00
kipcode66 1d2a0d9568 Add guards around std library headers (#3013)
* 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
2026-01-05 03:50:45 -08:00
roeming 1400687731 d_a_e_rdy debug work (#3011)
* debug work for d_a_e_rdy

* remove unused fake function

* fix regressions

* rename variable

* Fix version diffs of angle adding
2026-01-04 17:22:04 -08:00
hatal175 e77f841d35 Work on d_cc_d debug (#3002) 2025-12-29 04:12:01 -08:00
YunataSavior 6e3b22adee Debug d_a_e_ym (#3003) 2025-12-26 16:23:14 -08:00
LagoLunatic 877889c510 Clean up code, remove fakematches, add UNUSED, enable warnings (#2992)
* Remove NDEBUG_DEFINED fakematch, clean up getName temps

* Fix ifdef

* Fix bad JSystem pch ifdef breaking decomp.me

* Remove Acch Chk fakematches

* Private Acch fields

* Fix some clangd errors in headers

* Add UNUSED macro for matching debug parameters

* Enable clangd unused-parameter warning

* Remove extern from initializers

Probably added by dol2asm?

* Fix process profile definitions

* Remove leftover dol2asm address comments

* Remove some unnecessary double casts

* Enable some more clangd warnings

* Fix missing usages of fopAcM_ct

* Fix wrong enum usage

* Fix more fakematches
2025-12-23 15:53:10 -08:00
TakaRikka c9d0c58ffe MSL_C header cleanup (#2988)
* msl_c header cleanup

* math header cleanup

* fix rest of shieldD configs

* cleanup cflag configs a bit

* fix shield build
2025-12-23 10:20:32 -08:00
roeming f9d69372a1 match last function in d_camera.cpp (#2971)
Co-authored-by: Cuyler36 <Cuyler36@users.noreply.github.com>
2025-12-19 17:24:18 -08:00
roeming 93067110f6 Use consistent s32/u32 (#2964)
* cleanup long usage

* fix regression
2025-12-18 13:31:44 -08:00
Max Roncace a30e617e5a Various debug conditional compilation cleanup (#2915)
* Global: Define DEBUG as 0 if not already defined

* Clean up DEBUG-guarded code
2025-12-06 13:34:47 -08:00
LagoLunatic f97d334732 Debug+retail matches and clean up some fakematches (#2910)
* Debug matches

* Match daAlink_c::procGrassWhistleWait

* Match JASAramStream::channelProc

* More debug matches

* Match JAUStreamStaticAramMgr_::deleteStreamAram and bitset inlines

* Fix some fakematches

* Fix gameinfo player info not being a struct

* Update bug comments

* Fix procids in alink

* d_a_scene_exit OK
2025-12-03 15:09:56 -08:00
Niklas Bauer c1861812ef d_a_npc_kn debug work (#2907)
* d_a_npc_kn debug work

* d_a_npc_kn pr comments
2025-12-03 20:30:59 +02:00
TakaRikka a6e76c0841 project cleanup (#2895)
* some wii OS fixes

* remove old dol2asm comments

* remove dol2asm.h

* remove function address comments

* normalize ATTRIBUTE_ALIGN usage

* DECL_WEAK macro

* fix gcc attribute weak macro

* wrap more mwcc specific things in ifdefs

* fixes

* fix revo sdk version flags

* fixes
2025-11-30 15:23:42 -07:00
Max Roncace 9f76ba2f69 d_a_npc debug work (#2863)
* Remove d_a_npc3.cpp

This file appears to not actually be real and the asserts in its
functions all reference d_a_npc2.cpp instead.

* d_a_npc debug almost matching
2025-11-25 22:32:01 +02:00
Max Roncace 360bad3995 Clean up some fakematches, mostly around gameInfo loads (#2862) 2025-11-25 22:30:14 +02:00
Max Roncace 9943a52a79 Move cBgS_GrpPassChk and cBgS_PolyPassChk to separate headers (#2861)
This is supported by RTTI ordering which only makes sense if these
classes are in separate headers from the dBgS_* classes.
2025-11-25 18:39:11 +02:00
LagoLunatic 8d53f6dd59 Fix more nonmatchings (#2850)
* Fix GetPolyIndex and GetBgIndex, fixing a couple regallocs

* Match daNpcCd2_c::checkFearSituation and daNpcCd2_c::getAnmP

* Match daAlink_c::jointControll

* Clean up float class checks

* Move float constants to global.h
2025-11-23 15:23:44 -08:00
TakaRikka 540217c31b wii building OK / m_Do_graphic debug work (#2815)
* wii building OK + m_Do_graphic debug work

* d_meter_HIO debug cleanup

* wii m_Do_graphic stuff

* tag_attack_item OK, mirror_chain almost

* fix build

* mg_fshop matching
2025-11-17 20:01:03 +02:00
Max Roncace c428403198 d_a_e_sh matching (#2772) 2025-11-05 19:16:06 -08:00
Carco_21 54f989f16e d_a_obj_hata & d_a_obj_hb matching (#2752)
* hata matching

* hb initial work

* obj_hb matching

* fixed error

* pr cleanup
2025-10-28 04:25:15 +02:00
Howard Luck 21bff2ba25 d_a_obj_ss_drink equivalent (#2708)
* d_a_obj_ss_drink equivalent

* SomeFunc -> ProcessFunc

* fixes for taka

* rm FLT_MIN

* G_CM3D_F_INF
2025-09-27 22:03:27 -07:00
LagoLunatic 54d8839d91 Remove unnecessary externs (#2705) 2025-09-27 15:30:54 -07:00
TakaRikka 9a2df2162b d_debug_camera mostly done (#2695)
* d_debug_camera mostly done

* update some alink demo stuff

* some misc debug stuff
2025-09-25 18:20:46 +03:00
Max Roncace fe5e8aff98 More miscellaneous TU improvements (#2665) 2025-09-17 15:01:59 +03:00
TakaRikka 5d46f1fc22 d_a_e_ai done (#2617)
* d_a_e_ai done

* pr
2025-08-30 10:31:22 +03:00
LagoLunatic 956e84b0e7 Start linking some TUs on debug and PAL (#2612)
* Fix clang union handling (affects all TUs including d_camera.h)

Union members with non-trivial ctors/dtors is undefined behavior and clangd normally throws a fit and refuses to parse the whole union, but it seems to be possible to ifdef the problematic ctors out for non-mwerks compilers and explicitly tell modern compilers to use the defaults instead. Thanks to encounter for this fix.

* Link all TUs that already match on debug

In order to link TUs for debug, most functions seem to need to have their alignment set to 16 in symbols.txt. There are a few hundred functions that seem to be the exception and break when their alignment is set to 16, but I don't know the reason for this.

* Remove some fakematches (nosyminline/sym off) for weak func order in retail

* Fix clang not knowing that MSL_C++ is C++

* Link more debug TUs

* Fix missing PAL split

* Fix wrong slashes being used in includes

* RZDE01_00: Fix incorrect capitalization in config.yml

* Add RZDE01_00 to configure task

* Revert configure.py to use MatchingFor

* Fix PAL splits and symbols, link matching PAL TUs
2025-08-27 17:37:31 -07:00
Max Roncace 513816ce5c Add a precompiled header for RELs (#2597) 2025-08-24 09:52:08 +03:00
Max Roncace 41c72dc6d9 d_a_e_hp almost matching (#2585) 2025-08-15 12:50:49 +03:00
Max Roncace ddf4fc0677 Misc framework fixes (#2578) 2025-08-10 23:22:28 -07:00
hatal175 b83ff69589 Improve various partially matched TUs (#2526) 2025-07-11 01:11:21 -07:00
Max Roncace 25d13c76e4 d_bg_w_kcol work (#2490) 2025-06-19 23:40:53 -07:00
Howard Luck 5ec7e42c2d d_a_npc_kn work (#2274)
* checkpoint

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* fixups

* check

* fixes 2

* fixes 3

* fixes 4

* fixes 5

---------

Co-authored-by: pheenoh <pheenoh@macmini.local>
Co-authored-by: pheenoh <pheenoh@macmini.lan>
2025-06-08 21:01:18 +03:00
YunataSavior 9ffb52027a Debug and various d_ev_camera fixes (#2448) 2025-05-19 18:40:57 +03:00
Niklas Bauer 2e10e625d3 d_a_e_tk_ball Matching (#2402)
* d_a_e_tk_ball matching

* d_a_e_tk_ball cleanup

* d_a_e_tk_ball comments
2025-04-20 18:05:58 -07:00
TakaRikka 54dd764096 GCN pal / jpn support, some debug work (#2375)
* 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
2025-04-06 21:08:25 +03:00
Caroline Madsen e55c504f28 d_camera work (#2369)
* bumpCheck matching

* checkGroundInfo matching

* chaseCamera matching

* lockonCamera attempted

* talktoCamera matching

* subjectCamera, magneCamera matching

* colosseumCamera close, plus various fixes

* towerCamera attempted

* hookshotCamera matching
2025-04-01 19:05:30 -07:00
TakaRikka a4cdad86f4 b_gnd equivalent (#2340)
* b_gnd equivalent

* fix dEvt_info_c inlines

* fix some more inlines
2025-03-23 21:55:28 +02:00
LagoLunatic 4dc0cd9d09 Debug version now builds OK and all_source compiles (#2343)
* 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
2025-03-22 18:00:51 -07:00