Commit Graph

181 Commits

Author SHA1 Message Date
Mattias Blum c71bb1dafb d_camera 45% (#747)
* 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

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* more progress

* PR changes

* corrected size comment

* fixed broken member references
2025-05-06 21:02:35 -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
Zeclos 0c6c84d675 D_a_obj_doguu (#741)
* createInit for now

* _create almost _draw

* push for now, some functions finished progress on others

* _execute matches

* privatecute matching

* cleanup, almost matched

* data almost matching

* added getStartFrame to mDoExt_baseAnm, everything but data 100% matching

* cleanup and marked as Equivalent in configure.py

* cleanup
2025-04-25 17:12:32 -04:00
LagoLunatic fa7d4d2896 Fix relocation and data value mismatches 2025-04-24 14:53:58 -04:00
Jcw87 be0f59f361 d_mesg 2025-04-17 12:16:48 -07:00
LagoLunatic 36a3a2b660 More inlines, use sizeof for memcard structs 2025-04-16 13:53:30 -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 db2c5ef978 Cleanp a bunch of stuff 2025-03-28 20:44:06 -04:00
LagoLunatic bf2a5b9808 shand OK, ship 99.8%, add some missing inlines 2025-03-28 18:15:14 -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 5cb5fe848b Clean up mDoAud_seStart inline
The devs apparently made 4 versions of this inline instead of just using default arguments.
2025-03-17 15:57:18 -04:00
mattias-blum ae528dc3d9 d_a_fganon 100% (#695)
* added `cBgS_Chk::OffSameActorChk`inline function

* initial progress of d_a_fganon

100% Matching:
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `daFganon_IsDelete`

Partial Matching:
- `daFganon_Hio_C::daFganon_HIO_c` (88%)
- `deru_brk` (98%, code is matching, variable memory locations needed for 100% match)
- `kieru_brk` (98%, code is matching, variable memory locations needed for 100% match)
- `deru_brk2` (98%, code is matching, variable memory locations needed for 100% match)
- `kieru_brk2` (98%, code is matching, variable memory locations needed for 100% match)
- `pos_move` (73%)
- `move` (80%)
- `mahou_se_set` (82%)
- `daFganon_Delete` (94%, code is matching, variable memory locations needed for 100% match)
- `useHeapInit` (92%)
- `daFganon_Create` (77%)
- `fgannon_class::fganon_class()` (88%)

Remainder haven't been started

* Additional progress, more functions at 100% matching

100% Matching:
- `daFganon_Hio_C::daFganon_HIO_c`
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `deru_brk`
- `kieru_brk`
- `deru_brk2`
- `kieru_brk2`
- `pos_move`
- `fly_se_set`
- `mahou_set`
- `mahou_se_set`
- `daFganon_IsDelete`
- `daFganon_Delete`
- `useHeapInit`

Partial Matching:
- `fly` (60%)
- `shot` (46%)
- `move` (92%)
- `daFganon_Execute` (11%)
- `daFganon_Create` (60%)
- `fgannon_class::fganon_class()` (93%)

* More functions at 100% matching

- Added a `cXyz` member to `mant_class` that is referenced in this TU.
- Changed 'fganon_class` to inherit from `fopEn_enemy_c` instead of `fopAc_ac_c`

100% Matching:
- `daFganon_Hio_C::daFganon_HIO_c`
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `deru_brk`
- `kieru_brk`
- `deru_brk2`
- `kieru_brk2`
- `pos_move`
- `fly_se_set`
- `fly`
- `shot`
- `spinattack`
- `fly2`
- `tama_set`
- `mahou_set`
- `mahou_set`
- `mahou_se_set`
- `daFganon_IsDelete`
- `daFganon_Delete`
- `useHeapInit`
- `fgannon_class::fganon_class()`

Partial Matching:
- `move` (96%, code is matching, variable memory locations needed for 100% match)
- `daFganon_Execute` (96%, code is matching, variable memory locations needed for 100% match)
- `daFganon_Create` (96%, code is matching, variable memory locations needed for 100% match)

* additional functions at 100% matching

Cleaned up the values of the static globals, will resolve their symbols later

100% Matching:
- `daFganon_Hio_C::daFganon_HIO_c`
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `deru_brk`
- `kieru_brk`
- `deru_brk2`
- `kieru_brk2`
- `pos_move`
- `fly_se_set`
- `fly`
- `shot`
- `spinattack`
- `fly2`
- `tama_set`
- `mahou_set`
- `shot2`
- `spinattack2`
- `down`
- `kabe_check`
- `deru`
- `kieru`
- `fail`
- `standby`
- `start`
- `last_end`
- `damage_check`
- `ball_tg_check`
- `mahou_se_set`
- `daFganon_IsDelete`
- `daFganon_Delete`
- `useHeapInit`
- `fgannon_class::fganon_class()`

Partial Matching:
- `end` (97%, code is matching, variable memory locations needed for 100% match)
- `move` (97%, code is matching, variable memory locations needed for 100% match)
- `demo_camera` (63%)
- `daFganon_Execute` (97%, code is matching, variable memory locations needed for 100% match)
- `daFganon_Create` (98%, code is matching, variable memory locations needed for 100% match)

* added `mDoAud_changeSubBgmStatus` inline

* changed return type of `dComIfGp_getPlayerCameraID` inline

needed this change to get a match for this `d_a_fganon`

* d_a_fganon 100% matching

Currently the checksum fails but I have some theories as to why that might be. I'll continue to cleanup the symbols.

* symbol cleanup

* fixed `mDoAud_changeSubBgmStatus` calling wrong function

* 100% matching now, checksum passes

There is a weak function ordering issue so I included the param in `configure.py`

* PR changes made

* Additional PR changes, better naming of class members
2025-03-16 19:04:00 -04:00
LagoLunatic 901bc51f40 d_a_npc_md work 2025-01-27 19:26:14 -05:00
LagoLunatic 067b47185b Fix references to memcard gamedata struct size 2025-01-18 18:42:35 -05:00
LagoLunatic 5400c43ea1 d_a_bk work 2025-01-17 20:04:27 -05:00
LagoLunatic 532bdb29ad Some initial work on HIO classes definitions for debug build 2025-01-11 22:10:44 -05:00
LagoLunatic 417ef8cacb Fix mDoHIO inlines 2025-01-08 15:49:00 -05:00
LagoLunatic f74fd75332 Misc cleanup 2025-01-08 15:42:47 -05:00
LagoLunatic fab0d7a5ba misc cleanup, mostly inlines 2024-10-29 00:22:32 -04:00
LagoLunatic 202851599f More warning/error cleanup, mostly includes 2024-10-17 23:46:30 -04:00
LagoLunatic d71cf42416 m_Do_MemCardRWmng OK 2024-10-02 19:22:51 -04:00
LagoLunatic a42fd39a9f d_a_att OK, d_a_bgn header work
fixes #89
2024-09-07 16:16:17 -04:00
LagoLunatic 66dfae2571 Change i_entry from int to BOOL 2024-07-19 12:47:27 -04:00
Jasper St. Pierre 26add38fb0 build fix 2024-07-14 11:24:54 -07:00
Jasper St. Pierre 7cc7ad2b14 m_Do_MemCardRWmng work 2024-07-14 11:02:23 -07:00
Jasper St. Pierre ee2fef6351 m_Do_MemCardRWmng work 2024-07-14 10:36:13 -07:00
Daniel Hajjar 347f996cd4 d_a_title (#666)
* d_a_title work

* daTitle_proc_c::proc_draw matching

* daTitle_proc_c::~daTitle_proc_c matching

* daTitle_proc_c::daTitle_proc_c matching

* d_a_title work

* daTitle_proc_c::set_mtx matching

* proc_execute matching

* daTitle_proc_c::model_draw matching

* daTitle_c inlines matching

* daTitle_proc_c::calc_2d_alpha matching

* Fixed mDoExt_bpkAnm::remove inline

* Updated configure.py

* d_a_title cleanup

* Updated configure.py
2024-07-14 10:05:20 -07:00
Jasper St. Pierre 0614e8cb9e m_Do_MemCardRWmng work 2024-07-14 10:04:25 -07:00
LagoLunatic 61d9f474a5 Add extern declarations to headers for all global variables 2024-07-12 19:19:30 -04:00
LagoLunatic 9489cd4bcb d_a_movie_player start 2024-07-10 17:16:55 -04:00
SuperDude88 17a7656450 Bit of Figurine Work (#665)
* Bit of Figurine Work

Not super complete, was just poking around to figure a few things out

* Fix Build

I really need to stop having this every single time
2024-07-09 20:52:54 -07:00
Jasper St. Pierre 84c76203fc d_s_menu work 2024-07-02 16:31:05 -07:00
Jasper St. Pierre 30103693f5 d_s_open_sub work 2024-07-01 23:35:25 -07:00
Jasper St. Pierre 1d5c9da99b m_do_ext work
also jsys documentation
2024-06-26 22:50:12 -07:00
LagoLunatic 0d66571e86 Fix JUT_ASSERT to use double defines
We know JUT_ASSERT originally had double defines because defines such as NULL and ARRAY_SIZE are expanded in assertion strings, as discovered by Jasper:
https://godbolt.org/z/PvqsG9asb
2024-06-22 09:54:20 -04:00
LagoLunatic f8f84a2ac8 procTactPlay, player_tact 100%
fixes #641
2024-06-07 10:02:06 -04:00
LagoLunatic eec24f6c27 procTactWait 2024-06-06 18:48:25 -04:00
Erilea 6a0462aecd Add checkFrame helper to mDoExt_baseAnm 2024-06-05 11:47:50 +02:00
LagoLunatic af61ba5f0a d_a_player_tact work 2024-05-08 19:11:20 -04:00
Daniel Hajjar e7e5ea2071 d_a_lbridge (#622)
* Started working on d_a_lbridge

* Implemented CheckCreateHeap in d_a_lbridge

* Added member variables for d_a_lbridge

* Implemented daLbridge_c::set_mtx

* Implemented daLbridge_c::setMoveBGMtx

* Implemented se functions in d_a_lbridge

* Implemented daLbridge_c::demo

* Implemented daLbridge_c::_create

* Refactored daLbridge_c::_create

* Added constructor for mDoExt_bpkAnm

* daLbridge_c::_draw

* daLbridge_c::_execute match

* daLbridge_c::CreateInit

* daLbridge_c::sw_check match

* daLbridge_c::appear_bridge

* daLbridge_c::CreateHeap

* daLbridge_c::_delete match

* daLbridge_c::disappear_bridge match

* d_a_lbridge fixes

* d_a_lbridge matching

* Removed old comments

* d_a_lbridge variable renaming

* d_a_lbridge PR fixes
2024-05-01 16:04:57 -04:00
LagoLunatic 9d746447f9 d_a_bwdg 100%, weak order not matching 2024-04-16 19:56:52 -04:00
LagoLunatic ad0478fe15 d_a_tag_event OK 2024-04-16 13:28:35 -04:00
LagoLunatic b6d0373644 m_Do_ext 2024-03-21 17:53:48 -04:00
LagoLunatic 029ddf6bb9 minor inline cleanup 2024-03-11 18:12:15 -04:00
LagoLunatic f835d2b98f d_a_npc_md 2024-02-25 18:50:02 -05:00
LagoLunatic 687ad99080 d_a_npc_md, m_Do_ext work 2024-02-25 01:08:06 -05:00
LagoLunatic 3699da9e09 Match mDoExt_McaMorf::isStop inline regalloc 2024-02-05 04:52:28 -05:00
LagoLunatic 0d899b50f5 d_envse OK 2024-02-04 20:33:51 -05:00