Xeeynamo / sotn-decomp

Decompilation of Castlevania: Symphony of the Night (PSX+Saturn)
https://sotn.xee.dev/
GNU Affero General Public License v3.0
508 stars 55 forks source link

tt_001 duplicate function decomp #1670

Closed Onenutmcgee closed 1 month ago

Onenutmcgee commented 1 month ago

A lot of these are in the same order in tt_000, so I would assume they could be moved to shared static functions at some point.

sozud commented 1 month ago

Would you mind deduplicating these? The process is similar to this PR: https://github.com/Xeeynamo/sotn-decomp/pull/1556/files

You'll need to unify the function and data names, just doing something simple like UnkFamiliarFunc1 is fine. These need to be added to symbols.txt for both overlays

Then you can pull these out to headers

Doing this should also fix the analyze_calls error you're seeing

Onenutmcgee commented 1 month ago

Yes, I will do that when I get back on either later tonight or tomorrow.
Do you happen to know if that will also resolve the issue with the Linter check? I'm not sure I understand why that one is failing.

sozud commented 1 month ago

Run make format to fix the linter. Also I started a page on deduplication which may help https://github.com/Xeeynamo/sotn-decomp/wiki/Deduplication

Onenutmcgee commented 1 month ago

Sounds good. Thanks for the docs. I’ll get to it after my kiddo goes to bed.

Onenutmcgee commented 1 month ago

This ended up being more changes than I had wanted to do with a single PR. Sorry about that. I'm not sure what I may have done to destroy the PSP build.

sozud commented 1 month ago

Try this to fix psp https://github.com/Xeeynamo/sotn-decomp/commit/e572ac74fd08323586878009c4d4670939360abf