Skip to content

Comments

Big cast cleanup#3076

Merged
TakaRikka merged 6 commits intozeldaret:mainfrom
roeming:cast_add_cleanup
Feb 20, 2026
Merged

Big cast cleanup#3076
TakaRikka merged 6 commits intozeldaret:mainfrom
roeming:cast_add_cleanup

Conversation

@roeming
Copy link
Contributor

@roeming roeming commented Jan 29, 2026

I went through and cleaned up a lot of the s16 casts, but let me know if I went a little overboard. I tried to differentiate s16s from angles, don't know how necessary that was, but it was easier to fix as I went along.

@decomp-dev
Copy link

decomp-dev bot commented Jan 29, 2026

Report for Shield (95c3626 - c898211)

📈 1 improvement in an unmatched item
Unit Item Bytes Before After
d_a_npc_kn/d/actor/d_a_npc_kn daNpc_Kn_c::calcSlip() +24 95.34% 99.98%

Report for GZ2P01 (95c3626 - c898211)

No changes

Report for GZ2E01 (95c3626 - c898211)

No changes

Report for RZDP01 (95c3626 - c898211)

No changes

Report for RZDJ01 (95c3626 - c898211)

No changes

Report for GZ2J01 (95c3626 - c898211)

No changes

Report for ShieldD (95c3626 - c898211)

No changes

Report for RZDE01_02 (95c3626 - c898211)

No changes

Report for DZDE01 (95c3626 - c898211)

No changes

Report for RZDE01_00 (95c3626 - c898211)

No changes

@roeming
Copy link
Contributor Author

roeming commented Jan 30, 2026

As a thought, instead of all these macros, I could instead replace the macros with typedefs, something like typedef int Shield_s16; where the shield version instead typedefs it to s16. This would allow a cleaner cast, but at the result of seeing casts everywhere. Thoughts?

@roeming roeming marked this pull request as draft February 1, 2026 19:27
@TakaRikka
Copy link
Contributor

i prefer the macros personally

@roeming
Copy link
Contributor Author

roeming commented Feb 2, 2026

Do you think there are too many casts in this pr? I replaced all the += (s16) and related lines of code. It felt excessive, but I want to know if this is the scale of replacement you would want.

@roeming roeming marked this pull request as ready for review February 19, 2026 02:04
@TakaRikka TakaRikka merged commit 0558bde into zeldaret:main Feb 20, 2026
10 checks passed
@roeming roeming deleted the cast_add_cleanup branch February 20, 2026 13:57
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