jak-project/goal_src/jak1/engine
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
..
anim [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
camera [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
collide gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
common-obs [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
data jak1: Consolidate art-elts into a single file as is done in jak 2 (#2887) 2023-08-18 11:07:24 -04:00
debug [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
dma gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
draw gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
engine jak2: Create goal_src skeleton (#1576) 2022-06-29 22:20:09 -04:00
entity [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
game [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
geometry gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
gfx gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
level gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
load [jak1] fix concerning game-save bug (#2311) 2023-03-10 03:47:35 +00:00
math Create a new format for particle definitions (defpart) (#2572) 2023-04-29 11:01:47 -04:00
nav gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
physics jak2: Create goal_src skeleton (#1576) 2022-06-29 22:20:09 -04:00
ps2 Update font-color enum (#2670) 2023-05-24 06:57:05 +01:00
sound gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
target [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
ui [opengoal] make none a child of object (#3001) 2023-09-22 10:54:49 +01:00
util split new pc features in some files into their own code files + address some old issues + ripple graphics improvements (#2216) 2023-02-13 21:39:14 +00:00