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_80173D60 #1883

Closed Onenutmcgee closed 1 week ago

Onenutmcgee commented 1 week ago

This is the primary ability update function for Faerie. The basic idea is that we some upkeep every frame, and tick down the timer.

Once the timer has ticked down, it resets and then searches through it's logic to figure out if the player is in a state that the Faerie can alliviate. If a path is found, a luck check is performed and if sucessful, the Entity ID is updated so that a different update function is called on the next update(s) to perform the action.

Note, this is not initiated from the engine, this is called from many of the update functions that the engine does call on every frame.

PSX: https://decomp.me/scratch/3ADW8 PSP: https://decomp.me/scratch/53Vc0

This should be a PSP match.

@hohle got this most of the way, I just figured out the local variables.

Co-authored-by: hohle jonhohle@gmail.com

github-actions[bot] commented 1 week ago

TT_002 us

coverage 78.87% (+60.65%)

funcs 93.75% (+6.25%)

hohle commented 1 week ago

Thanks for finding it!