Commit Graph

789 Commits

Author SHA1 Message Date
Nikolaj Jensen Ulrik d62ccfae12 d_a_obj_hat 100% (#696)
* nearly matching obj_hat

* use inline instead

* cleanup

* remove debug map

* renaming member variables

* fixing missing inlines in setMtx

* last couple of renames, status to Matching

* bit more inlining

* Apply suggestions from code review

Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>

* fixing review comments, missing returns

---------

Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
2025-03-02 16:16:25 -05:00
LagoLunatic 6c75c400f2 Reorder dComIfG inlines 2025-03-01 00:54:57 -05:00
LagoLunatic 6e83a87f42 Implement dCom attention inlines 2025-03-01 00:54:52 -05:00
LagoLunatic 6c6b5a95ac d_a_lwood OK 2025-02-28 18:08:31 -05:00
LagoLunatic 5571ec74e4 Document the second param to joint callback functions 2025-02-28 18:04:05 -05:00
Ross Newman fdfb69f055 d_a_tornado (#697)
* d_a_tornado 100%

* update member names

* fixes

* fix constant

* add compiler flag

* return BOOL type

* Apply suggestions from code review

Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>

---------

Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
2025-02-28 01:49:58 -05:00
LagoLunatic c61fe4a335 Use "switch no" instead of "switch id/index" 2025-02-27 18:14:50 -05:00
mattias-blum f2264eea7c d_a_tag_so 100% (#694)
* d_a_tag_so 100%

Small one, nothing to comment on

* PR changes made

Reverted variable names, better use of inlines

* small fix, removed extra semi
2025-02-25 20:53:21 -05:00
mattias-blum ea840c9a23 d_a_leaflift 100% (#693)
* d_a_leaflift 100%

* d_a_leaflift_static 100%

Additional formatting changes plus variable re-naming's due to added context from `d_a_leaflift_static`

* PR changes made, renamed other variables

The m43C-m43E flags seem to be flags relating to Link's gliding state but couldn't figure out the order of them. m43F seems to be some timer.

* additional PR changes
2025-02-25 19:46:12 -05:00
LagoLunatic 8ed6cad381 d_timer OK 2025-02-23 20:57:01 -05:00
LagoLunatic 33f76d9968 More cleanup 2025-02-23 20:56:27 -05:00
LagoLunatic c4ad9f7241 Various cleanup 2025-02-23 19:59:54 -05:00
mattias-blum 730b74e2e3 d_a_shutter2 100% (#692)
* d_a_shutter_2 100%

- Code should be consistent with `d_a_shutter`
- A couple of variables still remain unnamed

* fixed issue in configure.py, git related

* forgot to set to matching

* weak function ordering in fine, removed param

* merged decleration and instantiation of minVel, maxVel

* PR changes

_create() still has me stumped. You would think that the return after that if statement would be `return cPhs_COMPLEATE_e;` but it just, doesn't exist? Adding any sort of return statement causes it not to match. Potential bug forgotten by the devs maybe?
2025-02-23 19:42:10 -05:00
mattias-blum 8338fd56e6 d_a_shutter 100% (#691)
* d_a_shutter 100%

- Wasn't sure what to name some of the used member variables that have yet to be assigned names (ex. `field_0x339`) but if you have an intuitive guess based on the code/previous actors I'd be happy to change them

* Requested PR changes made

The only thing I was unsure about was the new name for `mCount`. I settled on `mFrameTimer` because it's initialized to 30 and counts down every frame (assuming `_execute()` is called every frame).

* changed typing of `mbIsSwitch` to remove unnecessary cast

* file reference changes
2025-02-22 21:06:13 -05:00
mattias-blum 3f00e1e347 d_a_steam_tag 100% (#690)
* d_a_steam_tag 100%

Added inline functions to `d_point_wind` that were referenced in this TU

* PR changes added

- Also removed an unused local variable, renamed another
- Seems my struct had one member too many so I removed the last one ('field_0x0F`) and resized `field_0x0E` accordingly
2025-02-20 18:38:33 -05:00
mattias-blum 5dcccc228f d_a_tori_flag 100% (#689)
* d_a_tori_flag 100%

Had to add a constructor for `dCloth_packet_c`, may want to reconsider the naming of certain members of `daTori_Flag_HIO_c` in the future.

* d_a_tori_flag 100% configuration

* Requested PR changes made

* added proper inline functions
2025-02-19 19:48:55 -05:00
LagoLunatic f51b9b65df A few small matches for 2dnumber/meter 2025-02-11 17:08:48 -05:00
LagoLunatic 9875a39ee6 Mark d_a_obj_hha as equivalent, and fix various small things in it 2025-02-01 16:42:58 -05:00
LagoLunatic 025b7e459a Switch return type of _execute/_draw/_delete to be bool by default instead of BOOL
It's not completely consistent, but it seems like the majority used `bool`, and only a handful used `BOOL`. So I switched all of them to `bool` except for 13 TUs that stopped matching when changed like this.
2025-02-01 16:17:46 -05:00
Azurpourpre 39aace2c91 d_a_obj_hha 100% (#688)
* daObjHhaPart_c : progress on init_data, set_mdl_area, set_bgw, init_mtx

* daObjHhaSplash_c::create_s match

* daObjHhaYgush_c::create_area match

* daObjHhaYgush_c::init_data match

* daObjHhaYgush_c::init_mtx match

* daObjHhaYgush_c::draw match

* daObjHha_c class definition

* exe_normal & draw_normal match

* daObjHha_c::create_heap match

* daObjHha_c::_create match

* daObjHha_c::_delete almost match

* daObjHha_c::check_sw

* daObjHha_c::set_tex match

* daObjHha_c::init_mtx match

* daObjHha_c::get_water_h

* daObjHha_c::set_splash_bottom_* & daObjHha_get_r match

* daObjHha_c::set_splash_bottom_stop_r match

* daObjHha_c::part_manager almost match

* daObjHha_c::ygush_manager match

* daObjHha_c::_execute almost match

* daObjHha_c::_draw match

* daObjHha_c::water_manager match

* Mthd match

* da_a_obj_hha object file match

* Cleaning & adding variable names

* Updating configure.py & cleaning

* fixing d_a_obj_hha constants symbol name

* Adding suggestions (zeldaret/tww/#688)

* Fixing d_a_obj_hha Mthd (as suggested in PR zeldaret/tww/#688)

* Reverting configure.py
2025-02-01 15:44:48 -05:00
LagoLunatic a52bb789da Rename HostIO mChildID to mNo
TP debug has an assert in d_a_obj showing the name of this variable is `M_no` there.
2025-01-31 15:49:44 -05:00
LagoLunatic 901bc51f40 d_a_npc_md work 2025-01-27 19:26:14 -05:00
LagoLunatic ffe54e0bea Mark funcs with weak func order issues as Equivalent, fix a few other issues 2025-01-23 21:52:41 -05:00
LagoLunatic e8adc6c9e5 Rename more item enums 2025-01-17 20:58:43 -05:00
LagoLunatic 2a02484cdc JStudio/JMessage work and cleanup 2025-01-17 20:04:18 -05:00
LagoLunatic 532bdb29ad Some initial work on HIO classes definitions for debug build 2025-01-11 22:10:44 -05:00
LagoLunatic d330c1e68a Add enums for items and disappears 2025-01-11 19:15:36 -05:00
LagoLunatic ca6bebcb4b Add more actor mode enums 2025-01-11 17:20:45 -05:00
Azurpourpre 3816b8d8f0 d_a_obj_rforce match (#686)
* d_a_obj_rforce match

* Adding suggestions (Pull Request zeldaret/tww/#686)
2025-01-10 23:48:07 -05:00
LagoLunatic 3d63a54587 Player inlines and enums 2025-01-08 15:05:14 -05:00
LagoLunatic b18a1e448a Add enums for island room numbers and indexes 2025-01-06 00:47:29 -05:00
LagoLunatic 37dbfd75de Add item button enum and talk button enum 2025-01-06 00:23:55 -05:00
LagoLunatic 06709dad7f d_a_obj_toripost documentation, d_a_rd wrong name fixes 2024-12-28 18:58:57 -05:00
Jasper St. Pierre 72bbd3ea1f f_op_msg_mng work 2024-12-28 15:33:02 -08:00
Jasper St. Pierre 4470b7df8a d_a_demo00 work 2024-12-27 12:23:32 -08:00
Jasper St. Pierre c7e3e7ffea small fixes 2024-12-27 01:32:02 -08:00
Jasper St. Pierre 929027bfc1 document inventory slots 2024-12-27 01:23:55 -08:00
LagoLunatic 0492ca2b52 start d_menu_option 2024-11-05 20:53:59 -05:00
LagoLunatic e01095535f d_a_dai_item work 2024-11-02 16:21:43 -04:00
LagoLunatic 8911dab195 Starting switching u8 arrays to use dtk asset extract feature 2024-11-01 15:04:58 -04:00
LagoLunatic 2dfcdd84ab clean up d_wood and d_tree data, match d_wood on JPN, match rest of d_tree .data section 2024-10-31 18:43:53 -04:00
Mike Lester 64cc277d05 d_wood (bushes) matching (#682)
* d_wood (bushes) 73% matching

* d_wood::Unit_c::set_ground 100% match

Jasper pointed me to the fact that the complicated inv_sqrt function I wrote was indeed just std::sqrtf(), which unlocked the rest of the match

* Replace some bitshifts with multiplies based on PR feedback

* Remove all instances of "this->" from d_wood

* Add missing struct offset comment for mTevStr

* Cleaned up d_tree externs

* Use MTXIdentity instead of PSMTXIdentity

* Remove incorrect TODO rearding cCcD_ObjAtType enum

* Use the mDoAud_seStart inline function

* Remove unnecessary parenthesis

* Fix incorrect branching logic in d_wood::cc_hit_before_cut()

* d_wood data sections fixup

* Re-add "Nonmatching" comments to all nonmatching functions

* Formatting: reformat from 2 to 4 space indentation

This was a local system problem which slipped by me in a previous commit

* 100% match for d_wood::Anm_c::mode_norm()

Thanks Chippy! https://discord.com/channels/727908905392275526/873250400483024976/1298360716964790294

* Use cLib_*Bit() functions for flag checking and setting

Based on the inline functions from the .map

* d_wood: Use AnmID_e according to the .map file

* d_wood: add a couple AnmID_e related inlines from the .map

* d_wood: Name remaining unknowns related to animation

* d_wood: Match cc_hit_before_cut()

* d_wood: Match calc_cc() by using the dComIfGp_roomControl_getStayNo() inline

* d_wood: Match string table and search_anm() by using a constant in assert string

* d_wood: Match mode_to_norm()

Switching normAnim to a const* did most of the work

* d_wood: 100% match for L_attr and the .rodata section

* d_wood: Fill in .data section. Still some extra data from vtables

* d_wood: Match .sbss section

* d_wood: Match .sdata section

* d_wood: 98% match for Packet_c::draw()

The only error is that g_dTree_shadowTexCoord is still using a 32-bit load instead of 16. the only way I know of to fix that is to define the data in this compilation unit. But that can't be right

* d_wood: Various small formatting changes

- No one line function implementations
- Replaced instances of (SomeType*)0x0 (copy/pasted from Ghidra) with NULL
- Replaced a few instances of 0.0 with 0.0f
- Replaced one instance where a number was used instead of an enum value

* d_wood: More formatting fixes

- Removed unused variables from functions
- Removed unnecessary iVar1 loop variables (leftover Ghidra detritus)
- Fixed dtk function comments being wrapped by autoformatter. They now always appear on one line

* d_tree: 100% match of data which is used by d_wood

This moves g_dTree_shadowTexCoord into .sdata which allows d_wood::Packet_c::draw() to load its address with a single instruction. This  makes a 100% match for draw()

* d_wood: Removed unnecessary comment now that draw() matches

g_dTree_shadowTexCoord now lives in the d_tree .sdata section, so its instruction can be loaded with a single instruction. This makes a 100% match with draw().

* d_wood: 100% match for mode_cut()

* d_wood: Match mode_push_into()

Also renamed mWindDir to mForceDir as it represents both wind and an actor pushing from a vector

* d_wood: Match mode_push_back

* d_wood: Match __sinit_d_wood_cpp

The l_matDL display list is dynamically patched to reference the l_Txa_swood_bTEX texture at static initialization time. Is there a better way to represent this?

* d_wood: Fix incorrect constant in set_ground()

* d_wood: Simplify dummy data at the top of .data section

* d_wood: Mark as matching in configure.py

Had to move Packet_c destructor to get the functions in the right order. See discussion: https://discord.com/channels/727908905392275526/873250400483024976/1300680009458913280

* d_wood: Add `d/d_cc_d.h` include as some enums have moved

* d_wood: Clean up some types at the top

* Mark d_wood as non-matching for the Japanese version
2024-10-31 16:58:37 -04:00
LagoLunatic fab0d7a5ba misc cleanup, mostly inlines 2024-10-29 00:22:32 -04:00
Jasper St. Pierre 70044ec8dd Clean up cc enums 2024-10-28 21:16:46 -07:00
LagoLunatic 55ad93af06 cleanup daPy_sightPacket_c inlines, match setHookshotSight 2024-10-19 17:25:30 -04:00
LagoLunatic a3560350c7 d_a_sail and d_a_pirate_flag cleanup 2024-10-19 15:39:43 -04:00
LagoLunatic b293609f56 Fix dPa_modelEmitter_c vtable 2024-10-19 14:04:00 -04:00
Daniel Hajjar 9ed7cfc79d d_a_pirate_flag (#681)
* d_a_pirate_flag started work

* daPirate_Flag_packet_c::setCorrectNrmAngle matching

* daPirate_Flag_packet_c::setBackNrm matching

* daPirate_Flag_packet_c::setNrmVtx work

* d_a_pirate_flag work

* get_cloth_anim_factor matching

* pirate_flag_move matching

* daPirate_Flag_Execute matching

* d_a_pirate_flag mostly done
2024-10-19 13:07:44 -04:00
SuperDude88 716492b7b9 First Person Item Procs (#680)
* First Person Item Procs

Match a couple of Link's proc functions

* Cleanup
2024-10-19 13:03:32 -04:00
LagoLunatic 9e29fd3c68 More warning cleanup 2024-10-18 11:33:08 -04:00