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

Decompile tt_002 func_us_80176178 and func_us_80175DBC #1863

Closed Onenutmcgee closed 1 week ago

Onenutmcgee commented 2 weeks ago

A lot of these update functions are code revolving around the faerie using items (which makes sense, that's what the familiar does). This means that these update functions share a lot of code. In fact, entity update steps 0, 1, 4,5,6 are mostly shared between the update functions. Steps 2 and 3 vary in what they do exactly, but tend to pull from common ideas. Combined, they look like they do the same concepts for each function. Data structures are slightly different, but all are used in similar methods.

I will add an enum for these steps as I get farther along. But there is still some steps that I am not sure of and I'd rather keep it like it is for now, and do it when I'm either done with decomp or at least done with the base update functions. There is a lot of refactoring that I'll do when I'm closer as well.

Worth noting that I believe all of these functions are mostly a PSP perfect match meaning we may be able to add this to PSP build fairly easily once the decomp is finished.

This PR has 2 functions. Step 2 and 3 are really the only differences.

func_us_80176178/func_psp_092EAC80 PSX: https://decomp.me/scratch/axD5C PSP: https://decomp.me/scratch/3KWit

func_us_80175DBC/func_psp_092EA6F0 PSX: https://decomp.me/scratch/Rx6yJ PSP: https://decomp.me/scratch/youUM