Xeeynamo / sotn-decomp

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

Update entity IDs to map to enum #1675

Closed JoshSchreuder closed 13 hours ago

JoshSchreuder commented 2 days ago

Did my best to give contextual names where possible based on surrounding code.

There's still some remaining ones where it wasn't clear what the entity was referring to so have left some as is.

sozud commented 2 days ago

Have you used the debug module? You can use it to spawn entities https://github.com/Xeeynamo/sotn-decomp/wiki/Debug-Module

What's here so far seems reasonable to me but haven't checked any of these ingame

JoshSchreuder commented 1 day ago

Thanks, that was quite interesting. I wasn't really able to discern much more. A combination of not being able to get to specific stages in the debugger (stage select crashes, and I don't know if there's a way to get to NO3 for example after getting the bat card?) and also spawning a lot of these entities or previewing them straight up crashes the emulator.

==================

One interesting aside - I spawned this inside NZ0 https://github.com/Xeeynamo/sotn-decomp/blob/e357fcaeeb20750e30f0595155b924944c1f36e6/src/st/entity_unkId13.h#L13

It does not appear to me to be an explosion - looks more like the dust kick up from running back and forth (hold run for more than 5 frames perhaps?). I'm not sure why the entity ID is mapped as it is, and this is shared across many overlays, but if you have any thoughts I'd be interested. Maybe it is the explosion of dust from a wall being destroyed or something.

JoshSchreuder commented 1 day ago

@Xeeynamo are you happy to merge as is if I rebase or would you like me to dig into these in more detail using MAC and keep this open for now?

As mentioned in the original comment, this doesn't cover off the entirety of usages, some of which are still named E_ID_15 etc. I've just tried to map these to surrounding code where possible and done a minor spot check of some ones I could access with the debug overlay.