-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decomp: decompile almost all the platform related files #812
Conversation
xTVaser
commented
Sep 2, 2021
- plat
- baseplat
- plat-button
- plat-eco (almost, pure states [decomp] pure virtual states #792 )
- citb-drop-plat-CIT/L1 (l1 omitted intentionally)
- plat-flip
- wedge-plats
- wall-plat
plat
finished, baseplat
startedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great to see so much gameplay code getting decompiled!
There are just a few suggestions I had for types. I think you might have reverted the googletest submodule update we did recently as well. I think if you go into third-party/googletest
and do a git fetch
and a git checkout 955c7f83
it will go back to the right version.
self | ||
duration | ||
) | ||
((the-as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this cast is wrong, it should be (function process function vector uint uint int)
.
) | ||
) | ||
(if (and gp-0 (rand-vu-percent? 0.5)) | ||
(spawn-projectile-blue *target*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the mysterious blue projectile is the blue eco effect that goes from Jak to the door that's being opened.
goal_src/levels/common/plat.gc
Outdated
(defmethod copy-defaults! plat ((obj plat) (arg0 res-lump)) | ||
(set! | ||
(-> obj mask) | ||
(the-as process-mask (the-as int (logior #x80000 (-> obj mask)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the output with the latest version of the decompiler? I think this should become a constant now.
goal_src/levels/jungleb/plat-flip.gc
Outdated
(a0-17 uint128) | ||
(a0-26 uint128) | ||
(a1-11 uint128) | ||
(sv-16 int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sv-16 needs to be a res-tag here, otherwise this stack variable will be too small. You can add a type_casts.json
entry:
["_stack_", 16, "res-tag"],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh interesting, ill have to keep my eye out for this
goal_src/levels/jungleb/plat-flip.gc
Outdated
(.pcpyud | ||
a0-17 | ||
a0-16 | ||
r0-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this use of r0 won't work properly, but I think this should go away when sv-16 is a res-tag
goal_src/levels/jungleb/plat-flip.gc
Outdated
(a0-26 uint128) | ||
(a1-11 uint128) | ||
(sv-16 int) | ||
(sv-32 int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sv-32 and sv-48 also needs to be a res-tag