242 Commits

Author SHA1 Message Date
Miguel 424d1d7b71 Fixed Debug target not compiling (#1157)
* Update f_op_actor_mng.h

* Update f_op_actor_mng.h
2026-05-14 23:10:09 -06:00
Max Roncace bb061a1225 Merge remote-tracking branch 'decomp/main' 2026-03-18 01:56:47 -04:00
Max Roncace 8578874254 Fix a bunch of compiler warnings and document several more bugs (#3130) 2026-03-17 22:38:05 -07:00
TakaRikka 1618e9b276 Merge https://github.com/zeldaret/tp 2026-03-12 17:56:51 -07:00
Huitzi 56890c32e8 Actor status consolidation & process profile definition editing (#3117)
* 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>
2026-03-09 18:33:31 -07:00
Pieter-Jan Briers b289dece80 26 02 27 pjb dev 2 (#41)
* fix kankyo UB

* Fix TEV Stage DL writing

BE issue

* BE Fixes in materials/shapes

* Move to Aurora GD impl

* JUTDataFileHeader

* j3d: load vertex and texture not through GD

* Endian swap vertex data (mostly)

* Just exit(0) when closing the game

Fix crashes :godo:

* fix fopAcM_ct_placement and remove memcpy

* J3D: track vertex arrays correctly, swap work

* fix visibility, turn off overridden new/delete when we call into aurora

* event: cut name be

* Default window improvements

Double size, allow OS to decide position

* survive TParse::parseHeader_next

* color swap fix

* swap endian/fixes oob function pointer

* Remove GXGetViewportv stub

Aurora has it now

* Set array pointers via GD again

Relies on https://github.com/encounter/aurora/pull/35

* Let Aurora decide graphics backend

* disable procbar drawing

* Fix TColor endianness conversion issues

Fixes the wrong color for the flashing logo

* cam param swap

* simplify vtx loading, mat/amb color fix

* endian swap stb/fvb data

* aurora stat changes

* fix storage buffer crash

dont unnecessarily reassign vertex buffers in a way that forces aurora to recache things

* set bgobj spec fix

* add camera debug, endian swap more stb data, d_a_bg_obj::spec_data_c swapped

* JKRExpHeap: fix bad allocator slowdown

* solid tex

* texture caching

* log level

* fix window aspect ratio, disable bloom, endian swap camera type data

camera is now actually playing opening cutscene!!!!

* add GXDestroyTexObj to a couple stack init'd GXTexObjs, remove some diag printfs

* endian swap joint weight envelope data

* move to dusk config

* verbose arg errors

* better stub logging (for now)

* less logging, more BE

* more stubbing, move logging stuff around

* move all logging to aurora logging

* fix STUB_LOG, __FUNCTION__ isn't a string literal, wasn't building as it
was.

* update aurora

* fix heap alignment mismatch and always head align for now

* prevent them from fucking up my shit

* forward jut warning to DuskLog

* remove report logging

* maybe and i must emphasize maybe fix JMessage parsing

* this was a dumb idea

* preserve negative alignment for JKRHeap

* use normal free on macos and linux

* ^

* fix JMAHermiteInterpolation c impl

* endian swap J2DScreen mColor (oops)

* swap more J3D anim data, remove weird pointer addr check in J3DMaterial getMaterialAnm

* typo fix

* Fix aligned_alloc() size issues on POSIX

aligned_alloc() requires its input size to be a multiple of alignment. This wasn't being upheld so there were allocation failures in init code that made the game fail to start outside Windows.

Also just cleaned up some of this code a bit and removed fallback cases that *shouldn't* get hit.

* _Exit instead of exit()

Seriously I don't want destructors to run. Let the OS reclaim that shit.

* Reapply "Isolate JKRHeap operator overloads" (#39)

This reverts commit 3623b27f37.

* Fix some oopsies

* Fix hardcoded pointer size in JUTCacheFont::allocArray

* More operator overload fixes

Add void template specialization for jkrDelete

Add new[] placement overload. Apparently.

* Fix delete macros on nullptr

TIL C++ allows that.

* fix delete[]

* fix new(std::nothrow) overload

* fix avoid ub

* swap remaining anim data needed for title logo

* get rid of op 7

* move aurora_end_frame to correct spot

* juttexture destroy tex

* j2d animation be

* shutdown crash

* link warp material fix

* mDoExt_3DlineMat1_c fix

* hacky keyboard controls

* endian swap J2DResReference, add kb_pad to files.cmake

* fix some missing endian swaps in J2D, remove addr alignment check

* Remove heap unsetting in aurora calls

Never worked properly and not the right solution even if it did

* Don't print in DC stubs

They're fine to never implement

* Fix alignment stuff again

* Compile GF from dolphin lib

Doesn't seem to break anything and shuts up some stub warnings

* j3dtexture tlut obj fix

* addTexMtxIndexInDL fix

* don't recreate null tex data every frame

* the actual fix i wanted to push

* its kinda fakematch city over here

* insert hte efb copy

* limited window size / viewport support

* IsDelete FIX

---------

Co-authored-by: madeline <qwertytrogi@gmail.com>
Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net>
Co-authored-by: Jeffrey Crowell <jeff@crowell.biz>
Co-authored-by: TakaRikka <takarikka@outlook.com>
Co-authored-by: CraftyBoss <talibabdulmaalik@gmail.com>
Co-authored-by: Lurs <2795933+Lurs@users.noreply.github.com>
2026-03-08 15:27:15 -07:00
TakaRikka 51df58ebb4 Merge https://github.com/zeldaret/tp 2026-03-06 22:39:33 -08:00
TakaRikka 8e2545f2ec d_s_room / d_s_name / d_a_title debug work (#3123)
* d_s_room / d_s_name debug work

* camera_class rtti fix

* d_a_title debug / handle shield rel changes

* fix shield build

* fix regressions
2026-03-06 22:30:25 -08:00
TakaRikka 3623b27f37 Revert "Isolate JKRHeap operator overloads" (#39) 2026-03-06 19:49:35 -08:00
PJB3005 3ffc3266d7 Merge branch 'main' into 26-02-27-allocator-isolation 2026-03-05 00:15:09 +01:00
PJB3005 8c52a386d5 Merge remote-tracking branch 'decomp/main' into 26-02-27-pjb-dev-2 2026-03-02 12:36:59 +01: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 5832f70384 process class inheritance vtable fix 2026-03-01 14:34:07 +01:00
Luke Street 6e748ac283 More GCC compatibility/warning fixes (#3118)
* Wrap >4-char literals in a MULTI_CHAR macro

Modern compilers do not support CW's non-standard behavior with
>4 char literals. We can, however, use a constexpr function to
compute the u64 values directly. This leaves <=4 char literals
unchanged.

* Replace non-pointer usages of NULL with 0

* Define NULL to nullptr on C++11 and above

* Fix more -Wpointer-arith and -Woverflow warnings

* Replace u32/s32 with uintptr_t/intptr_t where appropriate

* JSUOutputStream: Overload all standard int types
2026-02-28 20:19:17 -08:00
Luke Street acdf6ad70f Some u32/s32 -> uintptr_t/intptr_t 2026-02-28 20:34:06 -07:00
Luke Street bd682c9818 Various minor warning fixes 2026-02-28 17:18:04 -07:00
Jasper St. Pierre d7ad3622bb fopAc_ac_c inherit 2026-02-28 14:23:50 -08:00
PJB3005 fd140a6beb Fix fopAcM_ct_placement with vtable layouts 2026-02-28 23:02:06 +01: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
Max Roncace a290c2d52c ShieldD: Clean up a bunch of 99% matching TUs (#3113)
* d_a_npc_ks debug code 100%

* d_a_npc_rafrel debug code 100%

* d_a_npc_inko minor improvements

* d_a_npc_gro debug code 100%

* d_a_npc_pachi_taro debug code 100%

* d_a_npc_passer debug code 100%

* d_a_npc_pachi_maro debug code 100%

* d_a_npc_post debug code 100%

* d_a_obj_bemos debug improvements

* d_a_obj_scannon_ten debug code 100%

* d_a_b_mgn debug code 100%

* d_a_e_fb debug code 100%

* d_a_e_gb debug code 100%

* d_a_e_hz debug code 100%

* d_a_e_cr_egg debug code 100%

* d_a_e_md debug code 100%

* d_a_e_wb debug code 100%

* d_a_obj_mirror_6pole debug code 100%

* d_a_obj_spinLift debug data fixes

* d_a_obj_pdwall debug data fixes

* d_a_obj_ss_drink debug code almost matching

* d_a_obj_poFire debug code 100%

* d_a_obj_picture debug code 100%

* d_a_obj_dust debug code 100%

* d_a_obj_fallobj debug code 100%

* d_a_obj_itamato debug code almost matching

* d_a_obj_syRock debug code 100%

* d_a_obj_katatsumuri debug code 100%

* d_a_obj_wood_statue debug code 100%

* d_a_obj_lv6egate debug code 100%

* d_a_tag_qs minor debug symbol fixes

* d_a_obj_twGate debug code 100%

* d_a_obj_lv6SwGate debug code 100%

* d_a_obj_lv6swturn debug code 100%

* d_a_obj_lv6Tenbin debug code 100%

* d_a_obj_kwheel01 debug code 100%

* Fix RTTI order regression (cM3dGCyl vs cBgS_*)
2026-02-28 12:13:57 -08:00
PJB3005 24fc42f5be Fix pointer truncation in fopScnM_CreateReq i_data 2026-02-28 21:00:16 +01:00
PJB3005 6025319c84 Fix default constructor parent zeroing shenanigans in actor creation 2026-02-28 13:27:42 +01:00
PJB3005 b598f856b4 Make stage loading work on LE & 64-bit 2026-02-28 13:17:05 +01:00
PJB3005 038ef4216f Isolate JKRHeap operator overloads
Fixes #25

This isolates the JKRHeap operator new/delete overloads. Every single new/delete site in the code has been replaced with a macro.

Sadly for new[] and delete[] we have to keep global operators. The global new[] just allocates into malloc() however, and delete[] goes into free() if it's not in a JKRHeap. So that's fine.
2026-02-27 23:11:59 +01: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
Lurs 8599684fae First pink screen! 2026-02-21 22:15:39 +01:00
Lurs 3b742025db Fix MSVC compiler and linker errors
- Fix struct/class forward declaration mismatches (JAIAudience, JASTrack) causing different MSVC mangled names and unresolved symbols
- Add jsystem_stubs.cpp with stubs for JASHeap, JASVoiceBank, J3DShapeTable, JAUSection, JHICommBuf, HIO/HIO2, JOR
2026-02-13 23:28:47 +01: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
Jcw87 46da46b152 d_stage debug (#3063) 2026-01-22 21:11:28 -08:00
roeming 0571b8c22d fopAcM_Register cleanup (#3047)
* use macro `fopAcM_Register` more consistently

* replace fopAcM_RegisterCreateID with version that doesn't create `a_this`
2026-01-17 15:52:32 +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
Max Roncace 43eac24e2e Use attention enums everywhere instead of integer literals (#3044) 2026-01-14 16:55:59 +02:00
YunataSavior e3b78563d1 obj_pumpkin dbg equiv (#3036) 2026-01-12 22:18:58 +02:00
Niklas Bauer b3803dfa74 f_op work (#3008)
* f_op debug 1

* f_op debug 2

* f_op debug 3

* f_op debug 4

* f_op debug 5

* f_op_debug fix build

* f_op linking

* remove goto in fopac_create

* fix regressions

* fix regressions

* pr comments

* f_op debug 6

* f_op debug 7

* f_op debug 8

* f_op debug 9

* f_op debug 10

* f_op work, linking, symbols, heap

* regressions 1

* regressions 2

* pr comments
2025-12-30 14:22:38 +02:00
TakaRikka d58e17f9f1 d_a_door_spiral mostly done (#3007) 2025-12-27 13:46:46 -07:00
Niklas Bauer df0ffcd87c f_op debug work (#2991)
* f_op debug 1

* f_op debug 2

* f_op debug 3

* f_op debug 4

* f_op debug 5

* f_op_debug fix build

* f_op linking

* remove goto in fopac_create

* fix regressions

* fix regressions

* pr comments
2025-12-26 13:17:51 -08:00
Max Roncace b384af2431 d_a_mg_rod debug improvements (#2993) 2025-12-23 16:11:09 -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
Carco_21 3ec0cbca92 almost matching (#2933) 2025-12-08 22:12:20 +02: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
Carco_21 ecbb3eb776 d_a_e_dn work (#2899)
* d_a_e_dn work

* PR cleanup and more documentation
2025-12-03 14:16:08 -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
Howard Luck 2abb771894 d_a_alink_HIO work (#2852)
* daAlink_c::jointControll OK

* daalink debug work

* checkpoint

* fix casting

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* remaining functions + fixes round 1

* fixes round 2

* fixes round 3

* fixes round 4

* revert getNeckAimAngle for now
2025-11-30 22:26:50 +02:00
Carco_21 25993716bc d_a_b_mgn debug almost equivalent (#2842)
* debug almost equivalent

* PR cleanup
2025-11-27 14:22:27 -08:00
Max Roncace 03adb6f6a0 d_kankyo matching (#2872) 2025-11-26 13:52:12 -08:00