jak-project/goal_src/jak2/engine/collide
ManDude fe491c2b5e
[opengoal] make none a child of object (#3001)
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
2023-09-22 10:54:49 +01:00
..
collide-cache-h.gc [decomp] collide cache, other minor fixes (#2031) 2022-11-20 11:32:29 -05:00
collide-cache.gc jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321) 2023-03-14 22:57:31 -04:00
collide-debug.gc [decompiler] fix in-place ops not getting detected sometimes (#2810) 2023-07-08 07:34:38 +01:00
collide-edge-grab-h.gc target code bugfixes (#2034) 2022-11-21 20:25:20 -05:00
collide-edge-grab.gc Update font-color enum (#2670) 2023-05-24 06:57:05 +01:00
collide-frag-h.gc [decomp] Decompile first batch of files in engine (#1787) 2022-08-24 00:29:51 -04:00
collide-frag.gc docs: fix method docstrings and grab @file comment blocks to use as a file description (#2289) 2023-02-27 18:58:01 -05:00
collide-func-h.gc gsrc: add decomp begins placeholder to all gsrc files (#1731) 2022-08-05 16:12:54 -04:00
collide-func.gc docs: fix method docstrings and grab @file comment blocks to use as a file description (#2289) 2023-02-27 18:58:01 -05:00
collide-h.gc d/jak2: finish process-drawable, collide-reaction-target, target-anim, almost target-part and gun-part (#2012) 2022-11-12 11:19:04 -05:00
collide-mesh-h.gc [decomp] start work on collide (#2008) 2022-11-11 12:01:45 -05:00
collide-mesh.gc gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
collide-probe.gc start blit-displays decomp & renderer + improve decompilation of some DMA macros (#2616) 2023-05-04 18:34:09 -04:00
collide-shape-h.gc [decompiler] decomp jak2 static-attack-info (#2992) 2023-09-15 19:32:57 +01:00
collide-shape-rider.gc [decomp] hud, hud-classes, add some new basic alignment options, fix type bug (#2084) 2023-01-02 10:05:22 -05:00
collide-shape.gc [decompiler] decomp jak2 static-attack-info (#2992) 2023-09-15 19:32:57 +01:00
collide-target-h.gc [decomp] target-handler (#2027) 2022-11-20 09:21:25 -05:00
collide-touch-h.gc [decomp] collide-mesh (#1999) 2022-10-30 15:54:10 -04:00
collide-touch.gc jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321) 2023-03-14 22:57:31 -04:00
collide.gc docs: fix method docstrings and grab @file comment blocks to use as a file description (#2289) 2023-02-27 18:58:01 -05:00
find-nearest-h.gc d/jak2: finish find-nearest | trajectory | editable-h and most of editable and editable-player (#1847) 2022-09-10 18:03:17 -04:00
find-nearest.gc jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321) 2023-03-14 22:57:31 -04:00
los-control-h.gc d/jak2: finish viewer, texture-finish, process-taskable, main-collide, prototype and los-control (#1975) 2022-10-22 13:26:28 -04:00
los-control.gc [decompiler] new features + fixes, + other jak2 fixes (#2796) 2023-07-04 17:23:24 -04:00
main-collide.gc d/jak2: finish viewer, texture-finish, process-taskable, main-collide, prototype and los-control (#1975) 2022-10-22 13:26:28 -04:00
pat-h.gc [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00