Commit Graph

2557 Commits

Author SHA1 Message Date
Briggs Baltzell 8aa7121964 Add STATIC_ASSERT checks for struct size validation in d_menu_cloth. 2026-03-09 17:33:25 -05:00
Briggs Baltzell 0073467680 Normalize hex color and value formatting in d_menu_cloth. 2026-03-09 09:33:14 -05:00
Briggs Baltzell cc6ae6bdd1 Use version-specific scale values for MENU_CLOTH_TYPE_DEFAULT in d_menu_cloth. 2026-03-09 09:27:29 -05:00
Briggs Baltzell 341b0bf80b Add dummy functions to ensure correct float order in d_menu_cloth. 2026-03-09 09:14:35 -05:00
Briggs Baltzell ce493ca7e3 Adjust plot_shadow parameters in d_menu_cloth for consistent shadow scaling. 2026-03-08 18:36:52 -05:00
Briggs Baltzell 296fea9e2c Match d_menu_cloth for specific regions: GZLJ01, GZLE01, GZLP01. 2026-03-07 19:30:39 -06:00
Briggs Baltzell 49512d77ca Add TODO note to identify superclass for correct size in menu_cloth_class. 2026-03-07 19:28:17 -06:00
Briggs Baltzell 9c35aaf747 Match draw for JP version 2026-03-07 19:18:09 -06:00
Briggs Baltzell 5aa20508c5 Match init for JP version 2026-03-07 19:16:38 -06:00
Briggs Baltzell 1181a6652c Match cloth_init for JP version 2026-03-07 19:15:27 -06:00
Briggs Baltzell 9b4778fae7 Update vertex attribute formats and streamline vertex function calls in d_cloth_packet. 2026-03-07 19:03:24 -06:00
Briggs Baltzell 8a9805e074 Match plot and plot_shadow in demo build. 2026-03-07 18:44:22 -06:00
Briggs Baltzell b64d4e28ba Inline empty destructor for daCLOTH_HIO_c in d_menu_cloth to simplify code. 2026-03-07 18:39:03 -06:00
Briggs Baltzell 1284002cc7 Refactor lightDistance variable in d_menu_cloth for improved clarity. 2026-03-07 18:25:10 -06:00
Briggs Baltzell a8d9627bbb Match plot and plot_shadow. 2026-03-07 18:18:52 -06:00
Briggs Baltzell b529c780a6 Inline vertex index calculations in d_menu_cloth to simplify code and reduce redundant variables. 2026-03-07 18:05:28 -06:00
Briggs Baltzell e776cf7b24 Refactor variable names in alpha calculation for improved clarity in d_menu_cloth. 2026-03-07 17:56:57 -06:00
Briggs Baltzell 8c1d90f7e8 Refactor loop variable initialization in d_menu_cloth for improved clarity. 2026-03-07 17:46:49 -06:00
Briggs Baltzell 872ad7fdb1 Match cloth_move_sin and cloth_move_simple. 2026-03-07 17:43:49 -06:00
Briggs Baltzell 9c18c6685a Remove demo version-specific mipmap handling logic in d_menu_cloth initialization. 2026-03-07 17:34:27 -06:00
Briggs Baltzell 2f276439a0 Add demo version-specific mipmap handling logic in d_menu_cloth initialization. 2026-03-06 19:56:29 -06:00
Briggs Baltzell 883cca8b06 Change waveFreqX and waveFreqY types from u16 to s16 in d_menu_cloth structure for consistency. 2026-03-05 14:36:54 -06:00
Briggs Baltzell e49a9b6801 Refactor position array access in d_menu_cloth to use getPos() result for better clarity and maintainability. 2026-03-05 14:34:58 -06:00
Briggs Baltzell ff4e8d50cb Add temporary dummy0 function in d_menu_window for placeholder debug strings. 2026-03-05 14:01:45 -06:00
Briggs Baltzell 34c32cd7d7 Refactor mColor1/mColor2 to mClothColor/mShadowColor for improved clarity in d_menu_cloth and update all related logic. 2026-03-05 13:42:04 -06:00
Briggs Baltzell d86fbdbbbd Simplify alpha blending logic by removing redundant variables in d_menu_cloth. 2026-03-05 13:38:34 -06:00
Briggs Baltzell 3f1556b681 Refactor color1 and color2 fields to clothColor and shadowColor for improved clarity in d_menu_cloth structure and related logic. 2026-03-05 13:33:50 -06:00
Briggs Baltzell ff51b74645 Refactor mChildren array indexing in daCLOTH_HIO_c constructor to use MENU_CLOTH_TYPE constants for improved readability and maintainability. 2026-03-05 13:31:56 -06:00
Briggs Baltzell 01958fe322 Refactor MENU_CLOTH_TYPE enum names for clarity and update all references across d_menu_cloth, d_s_name, and d_menu_window. 2026-03-05 13:18:09 -06:00
Briggs Baltzell 0144c32c53 Replace hardcoded cloth type with MENU_CLOTH_TYPE_2 constant in d_menu_window. 2026-03-05 13:04:01 -06:00
Briggs Baltzell 4f6c6eba4b Implement dMs_cloth_create and dMs_cloth_delete functions in d_menu_window and update related structure definitions. 2026-03-05 13:03:01 -06:00
Briggs Baltzell ddf57fdd63 Add dMs_clothOnly_create and dMs_clothOnly_delete implementations in d_menu_window 2026-03-05 13:03:00 -06:00
Briggs Baltzell 1820779222 Update vertex format in d_menu_cloth to use GXPosition1x16 and GXNormal1x16 for improved attribute handling. 2026-03-05 12:53:39 -06:00
Briggs Baltzell 9d76f1decd Add GXNormal1x16 and GXColor3x8 inline utility functions to GX.h for simplified normal and color input handling. 2026-03-05 12:53:10 -06:00
Briggs Baltzell 0dde5978e0 Refactor vertex handling in d_menu_cloth to group vertex and texture operations for improved readability and structure. 2026-03-05 12:35:45 -06:00
Briggs Baltzell 156149f947 Refactor vertex and texture coordinate handling in dMCloth_c::plot_shadow for improved clarity and correctness. 2026-03-05 12:28:08 -06:00
Briggs Baltzell 98af1f807f Refactor triangle strip generation in d_menu_cloth for improved readability and maintainability. 2026-03-05 12:16:17 -06:00
Briggs Baltzell 3ff385ffb6 Add inline utility function GXColor4x8 to GX.h for streamlined color input handling 2026-03-05 12:14:18 -06:00
Briggs Baltzell 09a8c046a6 Update vertex attribute formats in d_menu_cloth for improved correctness. 2026-03-05 00:36:13 -06:00
Briggs Baltzell e0156f17b9 Fix INNER_SIZE iteration in d_menu_cloth to properly handle loop bounds. 2026-03-05 00:00:43 -06:00
Briggs Baltzell add12a1e3c Match cloth_init in d_menu_cloth 2026-03-04 23:57:53 -06:00
Briggs Baltzell a74af799e5 Change mWaveProgress type from u16 to s16 in d_menu_cloth for consistency with signed calculations. 2026-03-04 17:11:19 -06:00
Briggs Baltzell 8834e7314d Replace hardcoded angle conversion with cM_deg2s in MENU_CLOTH_TYPE_0 logic for improved clarity and maintainability. 2026-03-04 17:07:49 -06:00
Briggs Baltzell b07c7e690e Change wavePreSteps type from u16 to s16 in d_menu_cloth for alignment with signed calculations. 2026-03-04 17:05:31 -06:00
Briggs Baltzell ac76b6e26d Refactor MENU_CLOTH_TYPE_2 logic: replace hardcoded rotation calculation with cM_deg2s for clarity and maintainability. 2026-03-04 17:04:10 -06:00
Briggs Baltzell b5240d4bdb Refactor dMCloth_c::cloth_init: replace raw pointer arithmetic with set calls for improved clarity and maintainability. 2026-03-04 16:58:11 -06:00
Briggs Baltzell d90d9b218d Merge branch 'main' into menu_cloth 2026-03-04 16:23:51 -06:00
LagoLunatic 256b4eeb37 Fix some clangd errors 2026-03-04 13:47:40 -05:00
Zeclos dcf4862387 D_a_npc_tc matching for retail (#930)
* progress

* code matching non-demo

* cleanup for d_a_npc_tc and d_a_obj_smplbg
2026-03-04 13:25:59 -05:00
Briggs Baltzell d54d983a4a d_a_boomerang matching (#936)
* Added constructor implementation for `daBoomerang_c`.

* Extend `daBoomerang_sightPacket_c` with `dDlst_base_c` base class.

* Refactor `d_a_boomerang.h`: reorganize class definitions and update member layout in `daBoomerang_c`.

* Extend `daBoomerang_c`: add new arrays, members, and static assertions for structure validation.

* Extend `daBoomerang_c`: add `dBgS_BoomerangLinChk` member and update padding fields.

* Extend `daBoomerang_c`: implement `create` method, add new members, and update function signatures.

* Refactor `daBoomerang_c`: update `createHeap` function to return `BOOL` and adjust related calls.

* Extend `daBoomerang_c`: implement `execute` method logic, update member variables, and adjust structure layout in `d_a_boomerang.h`.

* Extend `daBoomerang_c`: add static blur vector definitions for `l_blur_top` and `l_blur_root`.

* Add fields to `daBoomerang_blur_c`.

* Refactor `daBoomerang_blur_c`: implement `initBlur` logic, add `pos` field, update structure layout in `d_a_boomerang.h`.

* Refactor `daBoomerang_blur_c`: update `initBlur` and `copyBlur` logic, modify array structure to use 2D layout, and adjust declarations in `d_a_boomerang.h`.

* Match `copyBlur`

* Update `config.yml`: add symbol `l_matDL` for `daBoomerang_blur_c`.

* Extend `daBoomerang_blur_c`: implement `draw` method, add vertex description, attribute format lists, and texture handling logic.

* Add fields to `daBoomerang_sightPacket_c`

* Update `play` method in `daBoomerang_sightPacket_c`: implement looping logic for modifying `field_0xF4` values.

* Refactor `setSight` and `play` in `daBoomerang_sightPacket_c`: implement animation logic, replace `field_0xF4` with `arr_0xF4`, add `arr_0xF9`, and update structure in `d_a_boomerang.h`.

* Refactor `daBoomerang_sightPacket_c`: add `setTex` and `setImage` methods; update image data logic in `d_a_boomerang.cpp` and `d_a_boomerang.h`.

* Update `initFrame` and `resetSightOn` in `daBoomerang_sightPacket_c`: initialize `arr_0xF4` and reset `targetFlags`.

* Replace hardcoded array size with `BOOM_TARGET_MAX` in `d_a_boomerang.cpp` and `d_a_boomerang.h`

* Refactor `daBoomerang_sightPacket_c`: rename variables for clarity, update structure fields, and adjust logic in `setSight`, `play`, and related methods.

* Implement `draw` method in `daBoomerang_sightPacket_c`: add vertex descriptor/attribute format lists, texture handling, and sight rendering logic.

* Adjust vertex attribute formats in `d_a_boomerang.cpp`: update position to `GX_S8` and texture to `GX_U8`.

* Reorder includes in `d_a_boomerang.cpp` to resolve dependencies for `l_sightMatDL` and `l_sightDL__d_a_boomerang`

* Update `getFlyMax` in `daBoomerang_c`: add player status and stage name checks to determine maximum flight distance.

* Refactor `procMove` and `execute` in `daBoomerang_c`: improve boomerang targeting logic, rename variables for clarity, update array structures, and adjust control flow.

* Implement enhanced boomerang movement logic in `daBoomerang_c`: calculate angles, update position/rotation, handle water effects, and refine collision detection. Adjust structure fields in `d_a_boomerang.h`.

* Refactor `daBoomerang_c` control flow: reorder player retrieval logic, adjust distance-based normalization, and refine boomerang return handling.

* Change return type of `returnBoomerang` from `int` to `BOOL` in `d_a_player_main.h` and `d_a_player_boomerang.inc`.

* Change `setItemWaterEffect` return type from `u32` to `BOOL` and refactor its parameters and logic for clarity and behavior adjustment.

* Adjust `setItemWaterEffect` call in `d_a_boomerang.cpp` to use explicit `BOOL` comparison for clarity.

* Refactor `daBoomerang_c` control flow and targeting logic: introduce `mTargetRayEnd`, enhance position/angle calculations, integrate player sight checks, and update camera handling. Adjust includes and structure definitions for consistency.

* Match `rockLineCallback`

* Rename `param_1` to `pHitActor` in `rockLineCallback` for clarity.

* Match `setAimActor` in `d_a_boomerang.cpp`.

* Refactor `daBoomerang_c`: update `setLockActor` to use `BOOL` type, modify related logic for clarity, and ensure consistent parameter usage across `d_a_boomerang.cpp`.

* Match `resetLockActor` in `d_a_boomerang.cpp`: initialize target arrays and reset counters for consistency.

* Refactor `daBoomerang_c`: Fix struct offsets, update instance size

* Match `setRoomInfo` in `d_a_boomerang.cpp`: update position handling, ground checks, room ID assignment, and environment override logic.

* Match `create` in `d_a_boomerang.cpp`: update matrix handling, target ID initialization, callback setup, and clean up unused code.

* Match `setKeepMatrix` in `d_a_boomerang.cpp`: update transformation logic to align boomerang with Link's hand.

* Refactor `d_a_player_main` boomerang logic: rename `m36F4` to `mBoomerangCatchPos`, implement `getBoomerangCatchPos` accessor

* Match `setAimPos` in `d_a_boomerang.cpp`: implement target position logic based on current target index and player catch position.

* Match `checkBgHit` in `d_a_boomerang.cpp`: implement background collision logic, position updates, sound effects, and behavior adjustments.

* Continue matching `procWait` in `d_a_boomerang.cpp`

* Refactor `d_a_boomerang.cpp`: rename `field_0xF3A` to `mModelRotY` for clarity, update all associated references, and adjust struct definition in the header file.

* Continue matching `procWait` in `d_a_boomerang.cpp`

* Match `procWait` in `d_a_boomerang.cpp`

* Continue matching `procMove` in `d_a_boomerang.cpp`

* Refactor `d_a_boomerang.cpp`: convert `u8` fields to `bool` for clarity and better type usage, update header and references accordingly.

* Match `draw` in `d_a_boomerang.cpp`: implement drawing logic with model updates, light settings, shadow handling, and target sight management. Update struct definition to include `mGroundY`.

* Refactor `procMove` in `d_a_boomerang.cpp`: simplify angle calculations, update `mInWater` to `u8`, and improve readability by reducing nested logic.

* Fix `at_offset` initialization in `procMove` in `d_a_boomerang.cpp`

* Match `procMove` in `d_a_boomerang.cpp`

* Refine `draw` in `d_a_boomerang.cpp`: inline comments for quads setup, add light yellow trail color definition.

* Refactor `d_a_boomerang.cpp` and header: rename `field_0x14` to `numTrailSegments` for improved clarity and update all related references.

* Refactor `draw` in `d_a_boomerang.cpp`: reorganize quads initialization and alpha blending loops for improved structure and readability.

* Refactor `draw` in `d_a_boomerang.cpp`: combine alpha variable declarations for improved local scope and clarity.

* Refactor `draw` in `d_a_boomerang.cpp`: introduce `QUAD_VERT` macro to streamline quad vertex setup and improve code readability.

* Refactor `draw` in `d_a_boomerang.cpp`: rename `alpha` variables to `uCoord` for improved clarity and consistency with their purpose.

* Refactor `d_a_boomerang.cpp` and header: introduce `SEGMENTS_PER_STEP` constant for improved clarity and consistency, update related loops and data structures.

* Refactor `d_a_boomerang.cpp` and header: rename trail arrays for improved clarity and consistency, update all related references.

* Refactor `d_a_boomerang.cpp` and header: simplify trail vertex array indexing by flattening multidimensional arrays and updating all related code.

* Refactor `d_a_boomerang.cpp`: mark `se_flg` array as `const` for improved immutability and clarity.

* Refactor `d_a_boomerang.cpp`: relocate `l_at_cps_src` definition for improved organization and consistency.

* Refactor `d_a_boomerang.cpp` and header: rename and clarify multiple variables (e.g., `field_0xF2C` to `mIsReturning`) for improved readability and consistency, update all related references and logic.

* Refactor `d_a_boomerang.h`: add destructors to `daBoomerang_blur_c` and `daBoomerang_sightPacket_c` for proper ordering.

* Refactor `daBoomerang_blur_c::draw` in `d_a_boomerang.cpp`: reorder variable initialization, streamline loops, and adjust `QUAD_VERT` macro usage for improved clarity and consistency.

* Add inline geometry utility functions to `GFGeometry.h`

* Refactor `d_a_boomerang.cpp`: simplify geometry rendering by updating `QUAD_VERT` macro implementation and replacing manual vertex management with `GFBegin`/`GFEnd`.

* Refactor `d_a_boomerang.cpp`: simplify trail rendering by streamlining `uCoord` handling, reducing redundant variables, and improving clarity in loops.

* Refactor `d_a_boomerang.cpp`: rename `QUAD_VERT` to `QUAD_VTX` for clarity and update all related references.

* Add `l_matDL$4438` entry to config files for `daBoomerang_blur_c` rendering assets.

* Add version check around `j3dSys.reinitGX()` in `d_a_boomerang.cpp` to limit execution to non-demo builds.

* Refactor `d_a_boomerang.cpp`: replace direct `current.roomNo` usage with `roomNo` variable for improved clarity and consistency.

* Add version-specific asserts in `d_a_boomerang.cpp` for demo and non-demo builds

* Add version-specific asserts and adjust version check logic in `d_a_boomerang.cpp` for Japanese build

* Align `GXVtxDescList` and `GXVtxAttrFmtList` declarations with `ALIGN_DECL(32)` in `d_a_boomerang.cpp` for consistent memory alignment.

* Update `d_a_boomerang` to use `MatchingFor` in configuration

* Remove outdated `FIXME` comment in `d_a_boomerang.cpp`.

* Refactor `d_a_boomerang.cpp`: replace hardcoded rotation constants with `yRotPerStep` variable for clarity and maintainability.

* Update `d_a_boomerang.cpp` configuration to use `Matching` instead of `MatchingFor`.

* Refactor `d_a_boomerang.cpp`: rename `field_0xF2E` to `mJustHit` and `field_0xF2D` to `unused_0xF2D` for improved clarity.

* Replace hardcoded value in `d_a_boomerang.cpp` with `daBoomerang_blur_c::SEGMENTS_PER_STEP` for improved readability and maintainability.

* Refactor `d_a_boomerang.cpp`: replace `fpcM_GetParam` with `fopAcM_GetParam` for consistency with actor parameter retrieval methods.

* Introduce `Mode` enum in `d_a_boomerang` and replace related hardcoded values for improved readability and maintainability.

* Refactor `setAimActor` in `d_a_boomerang.cpp`: rename parameter for improved clarity.

* Replace `fpcM_SetParam` with `fopAcM_SetParam` in `d_a_boomerang.cpp` for consistency with actor parameter setting methods.

* Replace hardcoded `0` with `dEvtMode_NONE_e` in `d_a_boomerang.cpp` for improved readability and maintainability.

* Replace `BOOM_TARGET_MAX` with `BOOMERANG_LOCK_MAX` in `d_a_boomerang` for consistency.

* Refactor `d_a_boomerang.cpp` and `d_a_boomerang.h`: rename target-related variables and methods to lock-related for improved clarity and consistency.

* Refactor `daBoomerang_Draw` and `daBoomerang_Execute` in `d_a_boomerang.cpp` to simplify and remove redundant casts.

* Replace `Mode_0` and `Mode_1` with `Mode_Wait` and `Mode_Throw` in `d_a_boomerang`

* Simplify boolean assignment in boomerang lock condition in `d_a_boomerang.cpp`.

* Rename variable `b` to `isAiming` in `d_a_boomerang.cpp` for improved readability.

* Refactor draw methods in `d_a_boomerang.cpp` to streamline list-setting logic.

* Refactor particle effect in `d_a_boomerang.cpp` to use `dComIfGp_particle_setP1` for improved clarity and maintainability.

* Replace `g_dComIfG_gameInfo` camera getter with `dComIfGp` equivalents in `d_a_boomerang.cpp` for consistency.

* Simplify version-specific `JUT_ASSERT` calls in `d_a_boomerang.cpp` with `VERSION_SELECT` for improved maintainability.

* Replace direct model matrix assignment with `fopAcM_SetMtx` in `d_a_boomerang.cpp` for consistency.

* Update matching logic for `d_a_boomerang.cpp` to use `MatchingFor`.
2026-03-03 23:44:51 -05:00