jak-project/common
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
..
audio decomp: handle dumping jak 2 VAG file assets (#2969) 2023-09-09 10:33:41 -04:00
cross_os_debug Make all project targets compile on Intel MacOS (#2780) 2023-07-01 13:30:11 -04:00
cross_sockets cleanup our cmake and build warnings (#2876) 2023-08-08 20:53:16 -04:00
custom_data [jak2] More texture animations (#2831) 2023-07-16 13:02:53 -04:00
dma [jak2] Work-in-progress texture animations (#2819) 2023-07-14 18:17:54 -04:00
formatter formatter: support formatting bindings, for example in a let (#2883) 2023-08-05 15:23:09 -04:00
global_profiler jak2: overlord rework (#2544) 2023-04-29 16:13:57 -04:00
goos [extractor] fix territory being set to wrong value (#2946) 2023-08-30 18:36:10 +01:00
log log: ensure the log/ directory exists (#2904) 2023-08-14 22:19:10 -04:00
math [jak 2] Clouds V2, Clean up texture animator (#2921) 2023-08-19 12:50:59 -04:00
repl cleanup our cmake and build warnings (#2876) 2023-08-08 20:53:16 -04:00
serialization [jak2] Work-in-progress texture animations (#2819) 2023-07-14 18:17:54 -04:00
sqlite [jak2] Work-in-progress texture animations (#2819) 2023-07-14 18:17:54 -04:00
texture [jak2] Toxic Slime texture animations (#2922) 2023-08-19 14:22:30 -04:00
type_system [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
util g/j2: Implement speedrunner mode in jak 2 (#2976) 2023-09-16 23:23:29 -04:00
versions formatter: add tree-sitter dependency and commit early draft work on a proper code formatter (#2536) 2023-04-24 23:46:55 -04:00
CMakeLists.txt formatter: support formatting bindings, for example in a let (#2883) 2023-08-05 15:23:09 -04:00
common_types.h support c++ tools on macos (#2063) 2022-12-22 17:12:05 -05:00
goal_constants.h game: Remove temporary CLI arg shim in gk (#2532) 2023-04-22 14:13:57 -04:00
link_types.h [goalc] compile/run code for jak2 ckernel, set up dummy KERNEL.CGO (#1625) 2022-07-08 19:23:49 -04:00
listener_common.h Typo fix LTT_MSG_INSEPCT (#2778) 2023-06-29 16:45:53 -04:00
symbols.h game: Remove temporary CLI arg shim in gk (#2532) 2023-04-22 14:13:57 -04:00