PJB3005
5c247bcb15
Fix cCcS layout being interpreted inconsistently across TUs
...
Fixes #245
Might be the cause of #176 too but I wasn't able to repro that in either case, so can't confirm.
2026-04-06 23:15:56 +02:00
Max Roncace
7d3795f745
Detect and replace NaNs in cXyz default ctor
...
This fixes intermittent segfaults due to invalid atan table lookups.
For some reason zero-initializing all cXyz objects causes issues, as
does initializing them with INFINITY or -INFINITY. However, at least
one of the possible crashes (in d_a_e_yg's search_ground_1) is
guaranteed to happen whenever a specific uninitialized cXyz contains
a NaN for x or z.
A possible explanation for these crashes not occurring on hardware might
be that the problematic objects happen to be placed at memory locations
that happen to never contain a NaN upon allocation, so the buggy code
was never caught. Further investigation would be needed to determine if
this is what's actually happening, though.
2026-03-25 20:53:18 -04:00
TakaRikka
929e71975c
add cc collider view (broken color)
2026-03-18 01:25:42 -07:00
Max Roncace
bb061a1225
Merge remote-tracking branch 'decomp/main'
2026-03-18 01:56:47 -04:00
TakaRikka
dee722dab5
cc debug work ( #3133 )
2026-03-17 22:48:37 -07:00
TakaRikka
266c4317d9
Merge https://github.com/zeldaret/tp
2026-03-17 04:08:44 -07:00
TakaRikka
3aec45d6d7
various d_bg debug cleanup / d_menu_window_HIO debug ( #3132 )
...
* various d_bg debug cleanup
* matching forward decl for compiler compatibility
* fix build
2026-03-17 03:44:11 -07:00
Jeffrey Crowell
91fac9b4a0
Fix rotations on optimization builds
...
I have literally zero idea why this broke. Optimizations are wild.
2026-03-15 18:27:25 -04:00
Jasper St. Pierre
2d430eb9a1
shadow fix
2026-03-12 23:49:13 -07:00
PJB3005
8c52a386d5
Merge remote-tracking branch 'decomp/main' into 26-02-27-pjb-dev-2
2026-03-02 12:36:59 +01:00
PJB3005
883ba38bb8
Switch to Aurora headers for GX/VI
...
Replace GXSetArray() with GXSETARRAY() taking in size everywhere
Fix a ton of structs/enums being referred to with underscore name.
2026-03-02 12:00:53 +01:00
Jasper St. Pierre
fe21abb1ec
misc cleanup
2026-03-01 15:37:08 -08:00
Luke Street
4df8ccc871
Reorganize library code into libs/ ( #3119 )
...
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
2026-03-01 14:35:36 -08:00
TakaRikka
c9a46bd65b
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
PJB3005
3750e7cfee
Merge remote-tracking branch 'origin/main' into 26-02-27-pjb-dev-2
2026-03-01 15:08:52 +01:00
PJB3005
1b69152d5a
Fix collision data loading (64-bit & BE)
2026-02-28 22:52:18 +01:00
Luke Street
38b7156a8e
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
b7961b7739
Fix compilation errors after decomp/main merge
...
- Fix <string> -> <cstring> across all source files (upstream fix)
- Add <cstring> to JASGadget.h, <cstdarg> to JUTDbPrint.cpp
- Fix <string> -> <cstring> in JUTFont.h, d_save.h, f_ap_game.h
- Fix std::isnan usage in c_cc_d.cpp
- Fix cCcD_Src types: s32 -> u32 for bitmask fields (upstream fix)
- Fix AT_TYPE_WOLF_ATTACK/AT_TYPE_UNK unsigned literals (upstream fix)
- Remove (s32) casts on hex literals in collision data (upstream fix)
- Fix 0xFFFFFFFF literal in d_a_obj_wood_statue.cpp (upstream fix)
- Add braces to case 0 in d_a_e_gb.cpp to fix jump-over-init
- Fix Z2AudioCS.h include path (Z2AudioLib -> Z2AudioCS)
- Forward-declare Z2AudioCS in stubs.cpp to avoid revolution conflicts
- Guard JASGlobalInstance specializations with __MWERKS__ in m_Do_main
- Remove duplicate inline functions from d_com_inf_game.h
- Mark dummy() functions as static (upstream fix)
- Add JAUSectionHeap.h include to m_Do_main.cpp
2026-02-28 14:29:46 -07:00
Luke Street
3b8300d0d2
Merge decomp/main into dusk
...
Merges 44 upstream commits from zeldaret/tp decomp/main.
Conflict resolutions:
- .github/workflows/build.yml: keep deleted (not needed for PC port)
- README.md: keep PC port README
- J3DAnimation.h: keep OFFSET_PTR macro + add upstream forward decl
- J3DModelLoader.h: keep BE(u32) mBlockNum + add field_0x1c
- d_com_inf_game.h: keep PC port inlines + add upstream declarations
- global.h: keep MULTI_CHAR macro + add FABSF macro
- JUTConsole.cpp: keep uintptr_t cast for 64-bit
- JUTDbPrint.cpp: keep PC enter_() helper + add cstring include
- JUTResFont.cpp: take upstream loop/struct improvements with BE types
- JUTCacheFont.cpp: take upstream decomp fix
- float.h: use upstream !PLATFORM_GCN guard
- d_a_npc_bouS/theB.cpp: keep MULTI_CHAR() for PC portability
- d_a_npc_henna.cpp: keep uintptr_t + use upstream var name
- d_demo.cpp: keep near_/far_ field renames for PC
- d_resorce.cpp: keep uintptr_t + fix var name to res
- d_s_room.cpp, m_Do_graphic.cpp: keep dusk includes + add cstring
- m_Do_main.cpp: keep JHIComPortManager + use JAS_GLOBAL_INSTANCE_INIT
- angle_utils.h: remove redundant types.h include
2026-02-28 13:33:16 -07:00
Luke Street
29c96f5c65
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
af7ab981e6
Fix MORE wrong forward declares (struct/class) ( #3110 )
2026-02-24 14:20:45 -08:00
PJB3005
fcf1f4bed1
Fix wrong forward declares (struct/class)
...
Requires removing the now-matching symbols from jsystem_stubs.cpp
2026-02-24 16:58:12 +01:00
roeming
07ef4b6d26
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
Lurs
292724920c
Merge branch 'wip/linkfix2' into wip/linkfix
2026-02-11 07:20:44 +01:00
roeming
81d679d207
Fix errors for msvc
...
Use less strict compiler flags instead of modifying source code
Add ugly defines so MSVC stops complaining about zero length arrays
2026-02-01 15:37:26 -08:00
Jcw87
dbee7c8f1f
d_com_inf_game debug ( #3075 )
...
* d_com_inf_game debug
* inline sorting
2026-01-29 18:58:59 -08:00
TakaRikka
c9e2a73dda
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
7c71acb6b6
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
ccdb3fbd2a
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
9b7e55965f
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
e3b78563d1
obj_pumpkin dbg equiv ( #3036 )
2026-01-12 22:18:58 +02:00
Max Roncace
91d97cf3f4
d_camera debug almost matching ( #3032 )
2026-01-11 19:20:17 -08:00
roeming
37ec227b3f
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
ea53712c30
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
350d24b4b4
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
798ba743a0
Work on d_cc_d debug ( #3002 )
2025-12-29 04:12:01 -08:00
YunataSavior
fc3692e4ac
Debug d_a_e_ym ( #3003 )
2025-12-26 16:23:14 -08:00
LagoLunatic
e8c70fb18f
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
46d53ab65f
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
811d9c0a8d
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
3fd414beab
Use consistent s32/u32 ( #2964 )
...
* cleanup long usage
* fix regression
2025-12-18 13:31:44 -08:00
Max Roncace
cf492884ea
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
b51274a3dd
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
5321562dec
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
dfa8efa97b
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
47a379e016
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
4067730deb
Clean up some fakematches, mostly around gameInfo loads ( #2862 )
2025-11-25 22:30:14 +02:00
Max Roncace
da16badc8a
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
4bc21e9bea
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
691aac252b
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