Commit Graph

217 Commits

Author SHA1 Message Date
LagoLunatic d89fe27888 Use composition instead of inheritance for most f_op classes 2025-09-25 15:59:25 -04:00
LagoLunatic 37865be5b5 Rename subtype to argument
This appears to be the official name of this field based off of an assert in TP debug.
2025-09-14 14:24:43 -04:00
123456789758 52d3e87e7d d_a_btd - 99% matching (#872)
Co-authored-by: ‎ ‎ ‎ <‎ ‎ ‎>
2025-08-29 17:04:11 -04:00
LagoLunatic ac8ff10650 Fix most weak function ordering issues 2025-08-20 19:09:06 -04:00
Maide 1ab3619dbf d_a_stone (#846) 2025-08-11 17:19:18 -04:00
LagoLunatic cb76a08c3a Fix some missing enum usages 2025-08-04 00:02:15 -04:00
SuperDude88 4adfd27155 daNpc_Cb1_c Almost OK (#822)
* daNpc_Cb1_c Almost OK

Down to regswaps/minor instruction issues

* Oops

That inline was fake

* Some Cleanup

- Fill in more inlines
- Reorganize daNpc_Cb1_c inlines
- Use inlines more
- Some naming and typing consistency

* Naming, Consistency Tweaks

- TRUE/FALSE macros for all cases of BOOL, use int -> BOOL sometimes
- Rename HIO to be consistent with other NPCs
- Animation enum

* Some HIO Names

* Clarity Tweaks

- NULL in more asserts
- Squared constants
2025-07-29 21:04:42 -04:00
Maide 5a3911cfed d_a_kanban (#820)
* d_a_kanban

* PR

---------

Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
2025-07-27 17:26:24 -04:00
Maide 9461730b10 d_a_bridge (#811)
* d_a_bridge

* PR
2025-07-22 01:44:41 -04:00
Maide b324f4b1fc d_a_bb (#810)
* d_a_bb

* PR
2025-07-19 22:39:35 -04:00
LagoLunatic 96a546265e Remove fake inline 2025-06-27 15:50:54 -04:00
LagoLunatic 3bb95dd90c d_mesg work 2025-06-26 19:12:22 -04:00
LagoLunatic cdfaa05635 More demo work, cleanup 2025-06-01 16:05:42 -04:00
LagoLunatic 431943a893 Cleanup, demo work, and match daNpcPeople_c::getMsg on retail 2025-05-29 15:41:38 -04:00
LagoLunatic c484eb490d More demo work, fix some fakematches in retail 2025-05-25 19:20:08 -04:00
LagoLunatic 7cd75e8f7b Demo matches (#767) 2025-05-24 18:54:46 -04:00
Mattias Blum 59d39267ec Merge branch 'zeldaret:main' into d_menu 2025-05-17 22:57:55 -04:00
mattias-blum 5f7d4c3745 more progress 2025-05-17 20:30:16 -04:00
mattias-blum b92b0db6a6 more progress 2025-05-15 18:23:10 -04:00
mattias-blum 0a2e18900f more progress 2025-05-15 17:51:38 -04:00
LagoLunatic 36fec0f7fd Disappear drop type cleanup 2025-05-09 16:34:02 -04:00
123456789758 224b83ed8c d_a_player_main - 96% matching (#750)
Co-authored-by: ‎ ‎ ‎ <‎ ‎ ‎>
2025-05-07 19:08:04 -04:00
LagoLunatic f064e064eb d_cam_style: Fix excessive float precision 2025-05-07 01:47:44 -04:00
LagoLunatic f690b92d28 Add camera mWork union; also fix clang union handling
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.
2025-05-07 01:19:23 -04:00
LagoLunatic c4eb26b2a1 d_attention cleanup, add mDoCPd inlines 2025-04-27 16:38:29 -04:00
Mm2PL 4d1cb33cd8 d_attention 100% (#701)
* Add helper functions for d_attention

* Copy and adapt code from TP

* Move for better matching layout

* Clean up includes for d_attention.cpp

* Give dAttention_c::nextAttention a return

* Use enums in dAttention_c::getActionBtnB and slight reformat

* Change return types for comparison code to match
I don't love this

* Implement dAttList_c::calcWeight

* Implement dAttention_c::sortList

* Implement dAttDraw_c::draw

* Implement dAttDraw_c::setAnm

* Implement dAttention_c::chaseAttention

* Implement judgement related functions

* Implement dAttention_c::Run and runDrawProc

* Implement dAttention_c::Draw

Actually finish Draw

* Looks like dAttention_c::stockAttention had an unused return value

* Give d_Attention_c::mLockOnState an enum

* Rename field_0x02c to mDrawAttnPos based on TP

* Add comments for fields of d_attention

* Give d_attention's flags an enum (although without names)

* Undo type change for dAttention_c::{chk,set,clr}Flag

Co-Authored-By: LagoLunatic <LagoLunatic@users.noreply.github.com>

* Do not spell the `this` pointer

Co-Authored-By: LagoLunatic <LagoLunatic@users.noreply.github.com>

* Deal with resource enums and inlines

* Move PLAYER_STATUS_FLAG_MAGIC_JUDGEMENT to daPy__PlayerStatus0 enum

* Use inlines and macros

* Add mDoCPd_L_LOCK_BUTTON inline, debug maps claim it exists

Nothing else uses it

* Update TODO comments

* Debug maps claim runXyCheckCB was used but it only makes sense if modified

* Use dComIfGp_getPlayer instead of directly indexing the array

* Locate a few more inlines

* Do not cast to AttentionFlags enum type

* Update configure script

---------

Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
2025-04-27 15:12:46 -04:00
Jcw87 be0f59f361 d_mesg 2025-04-17 12:16:48 -07:00
LagoLunatic 1f049c0911 Move remaining class definitions to headers 2025-04-16 14:18:08 -04:00
LagoLunatic 26015238ef d_stage cleanup 2025-04-13 23:21:01 -04:00
SuperDude88 1f1900bf66 f_op_msg_mng Work (#685)
* f_op_msg_mng work

* Fix Some Conflicts

Haven't had much chance to work on actual progress, still looking to do more matching before merge

* Tiny bit of Work

Little bit of cleanup, start on a couple more functions

* More Matches

Also add back some missing nonmatch comments

* Fixes

* JPN ifdefs

* Inline Fix

Also force one match (there's no way that casting is real)

* Reorder Strings

Fix rodata, I think this order is also slightly more accurate to the function (but I'm not really trying to match it right now anyways)
2025-04-12 21:02:24 -04:00
Mattias Blum 5f287fcaee d_camera 28% (#732)
* initial progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* fix outdated member names

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* fixed deprecated member references

* more progress

* more progress

* more progress

* fix deprecated member references

* more progress

* more progress

* more progress

* more progress

* more progress

* check in for review

* remove comment

* initial PR changes

* more PR changes

* more PR changes

* added anonymous struct as class member

* reverted changes to `stage_camera2_data_class`

* added `dCamera_event_data`, `dCamera_monitoring_things` and `dCamera_DMC_system` from debug maps

* more progress

* more progress

* realmatch for `camera_draw`

* PR changes

* fix broken merge

* formatting

* Reverted change to `camSphChkdata` that caused  `sph_chk_callback` match to regress

* Reverted change to `BG` struct that caused ctor and dtor match to regress
2025-04-11 16:37:42 -04:00
LagoLunatic 309158e274 J3DModel inlines cleanup, procBottleSwing_init match, etc 2025-04-10 19:30:51 -04:00
LagoLunatic 458d027fc9 d_a_hookshot equivalent 2025-04-02 15:54:23 -04:00
LagoLunatic 5dff645173 Cleanup
0.0099999998f -> 0.01f
4 space indents
Unnecessary parentheses from Ghidra
etc
2025-04-01 15:26:16 -04:00
123456789758 340a15feb3 d_a_player_grab.inc - Almost all matching except a few with minor issues. (#719)
Co-authored-by: ‎ ‎ ‎ <‎ ‎ ‎>
2025-04-01 14:31:00 -04:00
mattias-blum d945c14cac d_a_ship 95% (#706)
* Initial Progress

Basic functions at 100% matching

100% Matching:
- `daShip_Draw`
- `daShip_Execute`
- `daShip_IsDelete`
- `daShip_Delete`
- `daShip_createHeap`
- `daShip_Create`

* implemented `getJointPos` inlines in `daTornado_c` needed for d_a_ship

* implemented `Center()` inline in `dCamera_c` needed for d_a_ship

* added `setTranslationX` inline to `J3DTexMtx` needed for match in d_a_ship

* parameters set to `const` for certain inlines in `m_Do_mtx.h`

* added `dComIfGp_onMenuCollect` inline

* changed `shipSpecialDemoStart` return type to `BOOL`

* added member functions to `dPa_waveEcallBack`, `dPa_splashEcallBack `, `dPa_trackEcallBack`

also modified member type of `mRotMtx` of `dPa_waveEcallBack`  and `mPos` of `dPa_trackEcallBack`

* added member to `daGrid_c` that is used in d_a_ship

* added `mDoAud_setShipSailState` and `mDoAud_shipCruiseSePlay` inline functions

* added `fopAcM_seenPlayerAngleY` inline

* d_a_ship mostly matching

approx. 90% matching, mostly regalloc issues. , `checkNextMode`, `setRopePos`, `setHeadAnm`, and `execute` need to have their logic fixer

* replace `unknown_inline_TODO ` from `daShip_c` with `checkForceMove`

* .data match

* .rodata matching

* more inline return type changes from `bool` to `BOOL`

Also changed the array size of `mPlayerStatus`

* implemented `force_calc_wind_rel_angle` inline in `daGrid_c`

* fix `d_a_ship_static`

* fixed `getEmitterAxis`, might need review but works for now

* more progress

* reverted change to `getEmitterAxis`, moved casts to function call in `dPa_waveEcallBack::executeAfter`

* more progress

* change return types of certain inlines from `BOOL` to `u32`

`dComIfGp_checkCameraAttentionStatus`, `dComIfGp_checkPlayerStatus0`, `dComIfGp_checkPlayerStatus1` needed for match in d_a_ship

* fixed memory addresses in `daGrid_c`

* more progress

* resolving symbols

* Initial PR changes

* Removed unnecessary cast

* replaced instances of `PSVECSquareMag` with corresponding inline functions

* update memory layout in `d_a_grid` for consistency

* More PR changes

`checkNextMode` and `procZevDemo` now at 100% matching
2025-03-28 14:17:21 -04:00
LagoLunatic 13fd5f3dc4 d_a_bk OK 2025-03-24 20:32:30 -04:00
LagoLunatic 4c3bd2c651 Missed some spots where cPhs_State should be used 2025-03-18 15:10:32 -04:00
LagoLunatic 822b13e57a Add cPhs_State typedef and use it everywhere 2025-03-17 22:26:56 -04:00
Ross Newman 20317a1942 d-a-obj-swheavy (#704)
* start d-a-obj-swheavy

* mostly finish d-a-obj-swheavy

* renames and 100%

* mark matching

* address PR comments
2025-03-17 19:03:04 -04:00
LagoLunatic 89e9cdafb5 JASChannel OK 2025-03-15 19:55:45 -04:00
LagoLunatic a9e1527253 Work on d_a_bk, c_damagereaction 2025-03-12 22:30:10 -04:00
LagoLunatic f51b9b65df A few small matches for 2dnumber/meter 2025-02-11 17:08:48 -05:00
LagoLunatic 458c40ede8 Translate strings in fopAcM_entrySolidHeap 2025-02-11 16:25:06 -05:00
LagoLunatic e8adc6c9e5 Rename more item enums 2025-01-17 20:58:43 -05:00
LagoLunatic 8e44641465 Fix various data relocation differences in unlinked TUs 2025-01-14 22:11:08 -05:00
LagoLunatic d330c1e68a Add enums for items and disappears 2025-01-11 19:15:36 -05:00
LagoLunatic 37dbfd75de Add item button enum and talk button enum 2025-01-06 00:23:55 -05:00
LagoLunatic 4a0a89501d Match getMesgHeader on JPN 2024-12-28 21:34:40 -05:00
Jasper St. Pierre 72bbd3ea1f f_op_msg_mng work 2024-12-28 15:33:02 -08:00