Skip to content
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

Merged
merged 29 commits into from
Sep 7, 2021

Conversation

xTVaser
Copy link
Member

@xTVaser 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

@xTVaser xTVaser changed the title deocmp: plat finished, baseplat started deocmp: decompile almost all the platform related files Sep 2, 2021
@xTVaser xTVaser changed the title deocmp: decompile almost all the platform related files decomp: decompile almost all the platform related files Sep 2, 2021
Copy link
Collaborator

@water111 water111 left a 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
Copy link
Collaborator

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*)
Copy link
Collaborator

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.

(defmethod copy-defaults! plat ((obj plat) (arg0 res-lump))
(set!
(-> obj mask)
(the-as process-mask (the-as int (logior #x80000 (-> obj mask))))
Copy link
Collaborator

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.

(a0-17 uint128)
(a0-26 uint128)
(a1-11 uint128)
(sv-16 int)
Copy link
Collaborator

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"],

Copy link
Member Author

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

(.pcpyud
a0-17
a0-16
r0-0
Copy link
Collaborator

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

(a0-26 uint128)
(a1-11 uint128)
(sv-16 int)
(sv-32 int)
Copy link
Collaborator

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

@water111 water111 merged commit 4ff2130 into open-goal:master Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants