mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
fe491c2b5e
Previously, `object` and `none` were both top-level types. This made decompilation rather messy as they have no LCA and resulted in a lot of variables coming out as type `none` which is very very wrong and additionally there were plenty of casts to `object`. This changes it so `none` becomes a child of `object` (it is still represented by `NullType` which remains unusable in compilation). This change makes `object` the sole top-level type, and the type that can represent *any* GOAL object. I believe this matches the original GOAL built-in type structure. A function that has a return type of `object` can now return an integer or a `none` at the same time. However, keep in mind that the return value of `(none)` is still undefined, just as before. This also makes a cast to `object` meaningless in 90% of the situations it showed up in (as every single thing is already an `object`) and the decompiler will no longer emit them. Casts to `none` are also reduced. Yay! Additionally, state handlers also don't get the final `(none)` printed out anymore. The return type of a state handler is completely meaningless outside the event handler (which is return type `object` anyway) so there are no limitations on what the last form needs to be. I did this instead of making them return `object` to trick the decompiler into not trying to output a variable to be used as a return value (internally, in the decompiler they still have return type `none`, but they have `object` elsewhere). Fixes #1703 Fixes #830 Fixes #928 |
||
---|---|---|
.. | ||
collide-cache-h.gc | ||
collide-cache.gc | ||
collide-debug.gc | ||
collide-edge-grab-h.gc | ||
collide-edge-grab.gc | ||
collide-frag-h.gc | ||
collide-frag.gc | ||
collide-func-h.gc | ||
collide-func.gc | ||
collide-h.gc | ||
collide-mesh-h.gc | ||
collide-mesh.gc | ||
collide-probe.gc | ||
collide-shape-h.gc | ||
collide-shape-rider.gc | ||
collide-shape.gc | ||
collide-target-h.gc | ||
collide-touch-h.gc | ||
collide-touch.gc | ||
collide.gc | ||
find-nearest-h.gc | ||
find-nearest.gc | ||
los-control-h.gc | ||
los-control.gc | ||
main-collide.gc | ||
pat-h.gc |