Skip to content

d_event_debug equivalent & modifications to dEvLib_callback_c#2359

Merged
TakaRikka merged 5 commits intozeldaret:mainfrom
marwernerh:EVT_DEBUG
Mar 31, 2025
Merged

d_event_debug equivalent & modifications to dEvLib_callback_c#2359
TakaRikka merged 5 commits intozeldaret:mainfrom
marwernerh:EVT_DEBUG

Conversation

@marwernerh
Copy link
Copy Markdown
Contributor

No description provided.

* Implemented most functions close to matching
* Removed erroneous comment in d_com_inf_game.h
* Implemented getEventP in dEvDtBase_c
* Retyped dEvLib_callback_c function returns from BOOL to bool
* Implemented getHeader, getEventList, and setDbgData in dEvent_manager_c
* Moved relevant dEvDb_* classes from d_event.h to d_event_debug.h and changed to structs
* Extended JORFile mFilename character array from 8 to 256 characters
* Implemented combo boxes and update slider functionalities in JORMContext
* Named field_0xC of JORProperyEvent as id, based on use of field in d_event_debug.cpp
* Corrected debug event tables and created missing table
* Debug tables explicitly pasted in d_event_debug.cpp to circumvent ShiftJIS not properly encoding tables via #include directive
…ent_debug, and change respective fields in dEvDb_bit & reg_c to be const
* Changed configure.py entry to equivalent instead of matching
* Preliminary documentation
Copy link
Copy Markdown
Contributor

@TakaRikka TakaRikka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks fine, just ensure that there's no regressions in unlinked TUs and i'll merge it

Comment on lines +1829 to +1841
inline void dComIfGs_setTmpReg(const u16 i_reg, u8 i_no) {
g_dComIfG_gameInfo.info.getTmp().setEventReg(i_reg, i_no);
}

inline u8 dComIfGs_getTmpReg(u16 i_reg) {
inline u8 dComIfGs_getTmpReg(const u16 i_reg) {
return g_dComIfG_gameInfo.info.getTmp().getEventReg(i_reg);
}

inline u8 dComIfGs_getEventReg(u16 reg) {
inline u8 dComIfGs_getEventReg(const u16 reg) {
return g_dComIfG_gameInfo.info.getEvent().getEventReg(reg);
}

inline void dComIfGs_setEventReg(u16 reg, u8 value) {
inline void dComIfGs_setEventReg(const u16 reg, u8 value) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for all these const changes, did you confirm that it doesn't cause regressions in unlinked TUs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression testing was done using the following command:

git checkout main && ninja && objdiff-cli report generate > report-before.json && git checkout EVT_DEBUG && ninja && objdiff-cli report generate > report-after.json && objdiff-cli report changes report-before.json report-after.json --format json-pretty > report-diff.json

Attached are the generated JSON files for GZ2E01.
report-after-GZ2E01.json
report-before-GZ2E01.json
report-diff-GZ2E01.json

However, when I attempt to do the same for ShieldD, running objdiff-cli report generate yields the following error:

 INFO Loading project .
 INFO Generating report for 3201 units (using 16 threads)
Failed: Failed to open ./build/ShieldD/src/REL/executor.o

Caused by:
    No such file or directory (os error 2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, that actually seemed to fix a d_save function lol, good job. dw about shield, this is fine

@TakaRikka TakaRikka merged commit 4ccca6b into zeldaret:main Mar 31, 2025
1 check passed
@marwernerh marwernerh deleted the EVT_DEBUG branch April 1, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants