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: camera | cam-combiner | cam-start | cam-update #621

Merged
merged 26 commits into from
Jul 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ec948b4
started process on `camera`
xTVaser Jun 21, 2021
844cce0
the bulk of `camera` is finished, with the exception of a few
xTVaser Jun 23, 2021
5469d68
decomp: Confirmed function ret value
xTVaser Jun 24, 2021
72b2afc
Merge remote-tracking branch 'water111/master' into decomp/camera
xTVaser Jun 24, 2021
aef322d
decomp: `cam-combiner` dead code issue
xTVaser Jun 24, 2021
2df89d1
stash
xTVaser Jun 24, 2021
b95f5ae
Merge remote-tracking branch 'water111/master' into decomp/camera
xTVaser Jun 24, 2021
c20b967
decomp: finish `cam-combiner`
xTVaser Jun 24, 2021
3f08df2
decomp: finish `cam-start`
xTVaser Jun 25, 2021
ad35715
decomp: mostly finish `cam-update`, just needs polish now
xTVaser Jun 25, 2021
9ed8fc5
Merge remote-tracking branch 'water111/master' into decomp/camera
xTVaser Jun 27, 2021
7d3aa43
`cam-standard-event-handler` still causing issues
xTVaser Jun 27, 2021
58be5af
`cam-combiner` issues with top-level `s6` usage
xTVaser Jun 27, 2021
b4aabd1
decomp: update reference tests
xTVaser Jun 27, 2021
7863917
decomp: finalize `cam-start`
xTVaser Jun 27, 2021
e0c463d
decomp: `cam-update` cleaned up everything except the array of planes…
xTVaser Jun 27, 2021
b4d71fd
label correction
xTVaser Jul 3, 2021
4936b93
Merge remote-tracking branch 'water111/master' into decomp/camera
xTVaser Jul 3, 2021
63d5d48
still blocked in cam-combiner over casting issues
xTVaser Jul 3, 2021
ea62866
decomp: resolve issues in `cam-start`
xTVaser Jul 3, 2021
02fb01e
decomp: finalize `cam-update`
xTVaser Jul 4, 2021
8bd602a
stash
xTVaser Jul 4, 2021
8543ec8
Merge remote-tracking branch 'water111/master' into decomp/camera
xTVaser Jul 28, 2021
08379fc
decomp: finalize `cam-combiner`
xTVaser Jul 28, 2021
9dccd18
decomp: finalize `camera`
xTVaser Jul 29, 2021
18fd28c
decomp: address feedback
xTVaser Jul 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 106 additions & 104 deletions decompiler/config/all-types.gc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -579,5 +579,10 @@
[13, "(function none :behavior anim-tester)"]
],

"cam-combiner": [
[1, "(function none :behavior camera-combiner)"],
[2, "(function basic int basic event-message-block object :behavior camera-combiner)"]
],

"placeholder-do-not-add-below": []
}
53 changes: 53 additions & 0 deletions decompiler/config/jak1_ntsc_black_label/label_types.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,59 @@
["L5", "rgba", true]
],

"camera": [
["L257", "(inline-array qword)", true, 1],
["L258", "(inline-array qword)", true, 1],
["L271", "float", true],
["L278", "float", true],
["L279", "float", true],
["L285", "float", true],
["L287", "float", true],
["L288", "float", true],
["L291", "float", true],
["L292", "float", true],
["L293", "float", true],
["L297", "float", true],
["L299", "float", true],
["L301", "float", true],
["L302", "float", true],
["L312", "float", true],
["L314", "float", true],
["L315", "float", true],
["L317", "float", true],
["L321", "float", true],
["L323", "float", true]
],

"cam-combiner": [
["L4", "_lambda_", true],
["L54", "_lambda_", true],
["L77", "state", true],
["L90", "float", true]
],

"cam-master": [
["L369", "float", true],
["L370", "float", true],
["L371", "float", true]
],

"cam-update": [
["L82", "float", true],
["L84", "float", true],
["L88", "rgba", true]
],

"cam-states-dbg": [
["L90", "float", true],
["L91", "float", true],
["L92", "float", true],
["L93", "float", true],
["L94", "float", true],
["L98", "float", true],
["L99", "float", true]
],

// please do not add things after this entry! git is dumb.
"object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": []
}
146 changes: 141 additions & 5 deletions decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,6 @@
[32, "matrix"]
],

"(method 18 tracking-spline)": [
[16, "tracking-spline-sampler"],
[32, "tracking-spline-sampler"]
],

"draw-ocean-transition": [[16, "sphere"]],

"dm-cam-mode-func": [[16, "event-message-block"]],
Expand Down Expand Up @@ -423,6 +418,7 @@
"(method 22 level)": [[16, "event-message-block"]],
"(method 9 level)": [[16, "event-message-block"]],
"(method 10 load-state)": [[16, "event-message-block"]],
"cam-slave-get-rot": [[16, "quaternion"]],

"draw-joint-spheres": [[16, "vector"]],
"(method 16 process-drawable)": [
Expand Down Expand Up @@ -583,6 +579,146 @@
"instance-tfragment-add-debug-sphere": [
[16, "vector"]
],

"(method 10 game-save)": [[16, "file-stream"]],

"cam-state-from-entity": [[16, "curve"]],

"(method 9 cam-index)": [[16, "vector"]],

"(method 10 cam-index)": [[16, "vector"]],

"(method 15 tracking-spline)": [
[16, "tracking-spline-sampler"],
[32, "tracking-point"]
],

"(method 16 tracking-spline)": [
[16, "tracking-spline-sampler"],
[32, "vector"]
],

"(method 18 tracking-spline)": [
[16, "tracking-spline-sampler"],
[32, "vector"]
],

"(method 20 tracking-spline)": [
[16, "vector"],
[32, "vector"]
],

"(method 21 tracking-spline)": [
[16, "tracking-spline-sampler"],
[32, "vector"]
],

"(method 22 tracking-spline)": [
[16, "tracking-spline-sampler"],
[32, "vector"]
],

"cam-slave-init": [[16, "event-message-block"]],

"cam-curve-pos": [
[16, "vector"],
[32, "vector"],
[48, "vector"]
],

"curve-length": [
[16, "vector"],
[32, "vector"]
],

"curve-closest-point": [
[16, "vector"],
[32, "vector"]
],

"cam-calc-follow!": [
[16, "event-message-block"],
[96, "vector"],
[112, "vector"],
[128, "vector"],
[144, "vector"]
],

"mat-remove-z-rot": [
[16, "vector"],
[32, "matrix"]
],

"slave-matrix-blend-2": [
[16, "vector"],
[32, "quaternion"],
[48, "quaternion"],
[64, "quaternion"]
],

"vector-into-frustum-nosmooth!": [
[16, "matrix"],
[80, "vector"],
[96, "vector"]
],

"slave-set-rotation!": [
[16, "vector"],
[32, "matrix"],
[96, "vector"],
[112, "matrix"], // guess
[176, "vector"] // guess
],

"v-slrp2!": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "matrix"],
[128, "vector"]
],

"v-slrp3!": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "matrix"],
[128, "vector"]
],

"(anon-function 1 cam-combiner)": [
[16, "vector"],
[32, "matrix"],
[80, "vector"],
[96, "matrix"]
],

"cam-master-init": [
[16, "vector"],
[32, "vector"]
],

"plane-from-points": [[16, "vector"]],

"update-view-planes": [
[16, "view-frustum"],
[144, "vector"],
[160, "vector"],
[176, "vector"],
[192, "vector"],
[208, "vector"],
[224, "vector"]
],

"move-camera-from-pad": [[16, "vector"]],

"cam-free-floating-move": [[16, "camera-free-floating-move-info"]],

"update-camera": [
[16, "vector"],
[32, "quaternion"],
[48, "vector"]
],

"placeholder-do-not-add-below!": []
}
72 changes: 66 additions & 6 deletions decompiler/config/jak1_ntsc_black_label/type_casts.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,6 @@
[[11, 18], "v0", "collide-shape-prim-group"]
],

"camera-teleport-to-entity": [[9, "a0", "transform"]],

"entity-actor-count": [["_stack_", 16, "res-tag"]],

"entity-actor-lookup": [
Expand Down Expand Up @@ -635,8 +633,6 @@

"num-func-chan": [[8, "v1", "joint-control-channel"]],

"cspace-by-name-no-fail": [[[0, 100], "v0", "cspace"]],

"shrubbery-login-post-texture": [
//[[13, 41], "a3", "qword"],
// [[13, 41], "a2", "qword"]
Expand Down Expand Up @@ -893,7 +889,6 @@
[[115, 154], "s3", "continue-point"]
],
"(method 20 level)": [[[43, 45], "s3", "ramdisk-rpc-fill"]],
//"bg": [[[25, 52], "a0", "string"]],

"(anon-function 29 process-drawable)": [
[[0, 99999], "s6", "process-drawable"]
Expand Down Expand Up @@ -1101,7 +1096,6 @@
],
"(method 13 art-group)": [[16, "s3", "art-joint-anim"]],
"(method 14 art-group)": [[16, "s3", "art-joint-anim"]],

"(method 9 external-art-control)": [
[171, "s4", "external-art-buffer"],
[172, "s4", "external-art-buffer"],
Expand Down Expand Up @@ -1586,6 +1580,72 @@
[154, "v1", "vector"],
[[172, 189], "a1", "dma-packet"]
],

"cam-standard-event-handler": [
[[0, 999], "s6", "camera-slave"],
[[16, 30], "s5", "state"],
[41, "a0", "vector"],
[[5, 8], "t9", "(function object)"],
[[19, 22], "t9", "(function object)"],
[[30, 32], "t9", "(function object)"]
],

"cam-curve-pos": [[[0, 224], "s6", "camera-slave"]],

"cam-combiner-init": [
[[0, 999], "s6", "camera-combiner"],
[[28, 33], "t9", "(function object)"]
],

"(anon-function 1 cam-combiner)": [
[[0, 999], "s6", "camera-combiner"]
],

"(anon-function 2 cam-combiner)": [
[10, "a0", "vector"],
[[0, 20], "s6", "camera-slave"],
[[20, 231], "s6", "camera-combiner"],
[[99, 127], "gp", "camera-slave"],
[[187, 231], "gp", "camera-slave"]
],

"cam-start": [
[[18, 22], "t9", "(function process object function)"],
[[38, 42], "t9", "(function process object function)"]
],

"cam-master-init": [
[[0, 999], "s6", "camera-master"],
[[111, 115], "t9", "(function cpu-thread function)"],
[[139, 145], "t9", "(function cpu-thread function object object)"],
[[163, 167], "t9", "(function object)"]
],

"cam-curve-setup": [[[0, 82], "s6", "camera-slave"]],

"(method 15 tracking-spline)": [
[[57, 59], "a2", "vector"],
[[57, 59], "a3", "vector"]
],

"(method 16 tracking-spline)": [
[[40, 42], "a0", "vector"],
[[40, 42], "a1", "vector"]
],

"cam-slave-init-vars": [
[[0, 999], "s6", "camera-slave"]
],

"cam-slave-get-vector-with-offset": [[[52, 65], "s3", "vector"]],

"cam-slave-go": [[[3, 6], "t9", "(function object)"]],

"cam-slave-init": [
[[0, 999], "s6", "camera-slave"],
[[47, 50], "t9", "(function object object)"],
[[54, 58], "t9", "(function object object)"]
],

"placeholder-do-not-add-below": []
}
12 changes: 12 additions & 0 deletions decompiler/config/jak1_ntsc_black_label/var_names.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2781,5 +2781,17 @@
}
},

"(anon-function 1 cam-combiner)": {
"vars": {
"pp": ["pp", "process"]
}
},

"(anon-function 2 cam-combiner)": {
"vars": {
"a0-3": ["vec", "(pointer vector)"]
}
},

"aaaaaaaaaaaaaaaaaaaaaaa": {}
}
Loading