decomp: anim-tester and a bunch of progress on files that are blocked (#884)

* blocked: `puffer` has state decomp issues

* blocked: decomp crash when adding process-drawble cast in `helix-water`

* blocked: `green-eco-lurker` no nice way to cast value out of EMB

* decomp: started on `citadel-sages`

* decomp: `seagull` blocked state decomp

* blocked: `sunken-pipegame` runs into handle related issues

* blocked: `snow-ram` and `snow-ram-boss` state decomp

* decomp: `rolling-race-ring` blocked, handle casts

* blocked: state decomp in `part-tester`

* decomp: started `joint-exploder`

* blocked: `anim-tester` has rare cmove-#f-zero usage

* decomp: I lied! `anim-tester` finished

* config: update banned list
This commit is contained in:
Tyler Wilding
2021-10-10 19:53:19 -04:00
committed by GitHub
parent 01b43f6111
commit 2cb00f4a02
17 changed files with 8396 additions and 1149 deletions
File diff suppressed because it is too large Load Diff
+12 -1
View File
@@ -4,7 +4,18 @@
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": ["crates"],
"banned_objects": [
"crates",
"puffer",
"helix-water",
"green-eco-lurker",
"seagull",
"sunken-pipegame",
"snow-ram",
"snow-ram-boss",
"rolling-race-ring",
"part-tester"
],
////////////////////////////
// CODE ANALYSIS OPTIONS
@@ -380,10 +380,6 @@
["L327", "(inline-array lbvtx)", 3]
],
"anim-tester": [
["L509", "(inline-array list-field)", 12]
],
"default-menu": [
["L6251", "float", true],
["L6252", "float", true],
@@ -815,6 +811,48 @@
["L314", "float", true]
],
"seagull": [
["L226", "(inline-array air-box)", 20]
],
"rolling-race-ring": [
["L94", "vector"],
["L95", "vector"],
["L96", "vector"],
["L97", "vector"],
["L98", "vector"],
["L99", "vector"],
["L100", "vector"]
],
"part-tester": [
["L32", "uint64", true]
],
"anim-tester": [
["L509", "(inline-array list-field)", 12],
["L523", "vector"],
["L524", "vector"],
["L649", "(pointer float)", 1],
["L650", "(pointer float)", 1],
["L651", "(pointer float)", 1],
["L652", "(pointer float)", 1],
["L653", "(pointer float)", 1],
["L654", "(pointer float)", 1],
["L655", "(pointer float)", 1],
["L656", "(pointer float)", 1],
["L657", "uint64", true],
["L658", "uint64", true],
["L663", "uint64", true],
["L664", "uint64", true],
["L665", "uint64", true],
["L666", "uint64", true],
["L667", "uint64", true],
["L668", "uint64", true],
["L669", "uint64", true],
["L670", "uint64", 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": []
}
@@ -2751,5 +2751,37 @@
[96, "vector"]
],
"(code helix-button-startup)": [
[16, "vector"]
],
"(method 43 green-eco-lurker)": [
[16, "event-message-block"]
],
"(method 73 green-eco-lurker)": [
[16, "event-message-block"]
],
"citb-sagecage-draw-bars": [
[16, "vector"],
[32, "vector"],
[48, "vector"]
],
"(code sunken-pipegame-start-up)": [
[16, "event-message-block"]
],
"(code race-ring-active)": [
[16, "event-message-block"],
[96, "vector"]
],
"(method 11 race-ring)": [
[16, "vector"],
[32, "vector"]
],
"placeholder-do-not-add-below!": []
}
@@ -1334,6 +1334,7 @@
],
"(method 0 anim-test-seq-item)": [
[7, "v0", "anim-test-seq-item"],
[8, "v1", "anim-test-seq-item"],
[10, "v0", "anim-test-seq-item"],
[11, "v0", "anim-test-seq-item"],
@@ -1443,14 +1444,17 @@
"anim-test-obj-list-handler": [
[25, "s5", "anim-test-obj"],
[31, "s5", "anim-test-obj"],
[[50, 53], "v1", "dma-packet"],
[110, "s5", "anim-test-obj"],
[166, "s5", "anim-test-obj"],
[112, "v1", "anim-tester"]
[112, "v1", "anim-tester"],
[[202, 205], "v1", "dma-packet"]
],
"anim-test-anim-list-handler": [
[2, "s5", "anim-test-obj"],
[25, "s5", "anim-test-obj"],
[[44, 47], "v1", "dma-packet"],
[65, "s5", "anim-test-obj"],
[227, "s5", "anim-test-obj"],
[90, "v1", "anim-test-obj"],
@@ -1464,13 +1468,15 @@
[167, "v1", "anim-test-obj"],
[169, "v1", "anim-test-obj"],
[171, "v1", "anim-test-obj"],
[173, "v1", "anim-test-obj"]
[173, "v1", "anim-test-obj"],
[[263, 266], "v1", "dma-packet"]
],
"anim-test-sequence-list-handler": [
[2, "s5", "anim-test-sequence"],
[25, "s5", "anim-test-sequence"],
[31, "s5", "anim-test-sequence"],
[[50, 53], "v1", "dma-packet"],
[71, "s5", "anim-test-sequence"],
[231, "s5", "anim-test-sequence"],
[96, "v1", "anim-test-sequence"],
@@ -1480,10 +1486,16 @@
[136, "v1", "anim-test-sequence"],
[137, "v1", "anim-test-sequence"],
[146, "v1", "anim-test-sequence"],
[151, "v1", "anim-test-sequence"]
[151, "v1", "anim-test-sequence"],
[[267, 270], "v1", "dma-packet"]
],
"anim-test-edit-sequence-list-handler": [
[[82, 85], "v1", "dma-packet"],
[[148, 151], "v1", "dma-packet"],
[[323, 326], "v1", "dma-packet"],
[[979, 982], "v1", "dma-packet"],
[[1028, 1031], "v1", "dma-packet"],
[[122, 965], "s4", "anim-test-sequence"],
[129, "v1", "glst-named-node"],
[[128, 909], "gp", "anim-test-seq-item"],
@@ -1498,26 +1510,37 @@
"anim-tester-interface": [
[[34, 48], "gp", "anim-test-obj"],
[[70, 73], "v1", "dma-packet"],
[[131, 134], "v1", "dma-packet"],
[[189, 192], "v1", "dma-packet"],
[[228, 231], "v1", "dma-packet"],
[[95, 109], "gp", "anim-test-obj"],
[[156, 160], "v1", "anim-test-obj"],
[[162, 165], "v1", "anim-test-sequence"]
],
"anim-tester-get-playing-item": [
[7, "v0", "anim-test-seq-item"],
[4, "t9", "(function glst-list int anim-test-seq-item)"],
[20, "t9", "(function glst-list int anim-test-seq-item)"],
[[5, 22], "s5", "anim-test-seq-item"],
[21, "v0", "anim-test-seq-item"],
[25, "v0", "anim-test-seq-item"]
[25, "v0", "anim-test-seq-item"],
[5, "v0", "anim-test-seq-item"]
],
"anim-tester-add-newobj": [
["_stack_", 128, "anim-test-obj"],
[[2, 185], "s2", "anim-test-obj"],
[[70, 193], "s5", "anim-test-obj"],
[149, "v1", "anim-test-sequence"],
[154, "v1", "anim-test-sequence"],
[160, "v1", "anim-test-sequence"],
[164, "a0", "art-joint-anim"],
[170, "a0", "art-joint-anim"]
[168, "v1", "anim-test-seq-item"],
[168, "v1", "anim-test-seq-item"],
[170, "a0", "art-joint-anim"],
[171, "v1", "anim-test-seq-item"],
[173, "v1", "anim-test-seq-item"]
],
"anim-tester-start": [[20, "t9", "(function process function none)"]],
@@ -3924,5 +3947,62 @@
[[371, 451], "s3", "death-info"]
],
"(post water-vol-idle helix-dark-eco)": [
[4, "t9", "(function none :behavior helix-dark-eco)"]
],
"(code helix-slide-door-close)": [
[10, "v1", "art-joint-anim"]
],
"(code helix-button-startup)": [
[39, "v1", "process-drawable"]
],
"(method 73 green-eco-lurker)": [
[6, "a1", "touching-shapes-entry"]
],
"citb-sagecage-update-collision": [
[2, "a0", "collide-shape-prim-group"]
],
"race-ring-set-particle-rotation-callback": [
[1, "v1", "(pointer race-ring)"]
],
"race-ring-blue-set-particle-rotation-callback": [
[1, "v1", "(pointer race-ring)"]
],
"(code race-ring-active)": [
[242, "v1", "handle"],
[245, "v1", "handle"],
[253, "gp", "handle"],
[269, "s5", "handle"],
[272, "s5", "handle"]
],
"(trans race-ring-active)": [
[26, "a0", "part-tracker"]
],
"(code anim-tester-process)": [
[41, "v1", "anim-test-obj"],
[45, "v1", "anim-test-obj"],
[[40, 114], "s4", "anim-test-obj"],
[82, "v0", "anim-test-sequence"],
[119, "v0", "art-joint-anim"]
],
"display-list-control": [
[[194, 197], "v1", "dma-packet"],
[[423, 426], "v1", "dma-packet"]
],
"anim-tester-disp-frame-num": [
[[75, 78], "v1", "dma-packet"]
],
"placeholder-do-not-add-below": []
}
@@ -3547,5 +3547,11 @@
}
},
"anim-tester-get-playing-item": {
"vars": {
"v0-0": ["v0-0", "anim-test-seq-item"]
}
},
"aaaaaaaaaaaaaaaaaaaaaaa": {}
}
+2
View File
@@ -5,3 +5,5 @@
;; name in dgo: cam-states-dbg
;; dgos: GAME, ENGINE
;; TODO - for anim-tester
(define-extern cam-orbit state)
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -5,6 +5,8 @@
;; name in dgo: debug-h
;; dgos: GAME, ENGINE
;; TODO - for anim-tester
(define-extern *debug-menu-context* debug-menu-context)
(deftype pos-history (structure)
((points (inline-array vector) :offset-assert 0)
@@ -44,4 +46,4 @@
;; TODO - for trajectory.gc
(define-extern add-debug-line (function symbol bucket-id vector vector rgba symbol rgba symbol))
(defun-extern add-debug-sphere symbol bucket-id vector float rgba symbol)
(defun-extern add-debug-sphere symbol bucket-id vector float rgba symbol)
-1
View File
@@ -30,7 +30,6 @@
(define-extern cam-layout-stop (function none))
(define-extern cam-layout-start (function none))
(define-extern prototype-bucket-recalc-fields (function instance none))
(define-extern anim-tester-start (function none))
(define-extern auto-save-command (function symbol int int process-tree none))
;; this file is debug only
+3
View File
@@ -50,3 +50,6 @@
(define-extern process-drawable-art-error (state string process-drawable))
(define-extern foreground-engine-execute (function engine display-frame int int none))
(define-extern sphere-in-view-frustum? (function sphere symbol))
;; for anim-tester
(define-extern dma-add-process-drawable function)
+5 -1
View File
@@ -32,7 +32,11 @@
(define-extern ja-group-size (function int))
;; TODO - for yakow
(define-extern ja-frame-num (function int float))
;; TODO - for anim-tester
(define-extern draw-joint-spheres (function process-drawable symbol))
(define-extern *default-skel-template* pair)
(define-extern make-nodes-from-jg (function object pair symbol int))
(define-extern fill-skeleton-cache (function process-drawable int))
(defun vector<-cspace! ((arg0 vector) (arg1 cspace))
(rlet ((Q :class vf)
+4
View File
@@ -203,6 +203,10 @@
(rolling-ring-chase-1 #x324)
(rolling-ring-chase-2 #x325)
(rolling-ring-hint-one-ring-down #x33f)
(rolling-ring-hint-be-quick-to-next #x340)
(rolling-ring-hint-be-quick-all #x341)
(sunken-blue-eco-charger-hint #x345)
(sunken-qbert-hint #x34a)
+6
View File
@@ -1391,3 +1391,9 @@
)
)
(defmacro cmove-#f-zero (dest condition src)
`(if (zero? ,condition)
(set! ,dest #f)
(set! ,dest ,src)
)
)
+7
View File
@@ -755,3 +755,10 @@
:flags (sp-flag copy-from-other-field)
)
)
(defmacro cmove-#f-zero (dest condition src)
`(if (zero? ,condition)
(set! ,dest #f)
(set! ,dest ,src)
)
)
File diff suppressed because it is too large Load Diff
+18 -7
View File
@@ -81,7 +81,12 @@ const std::unordered_set<std::string> g_functions_expected_to_reject = {
"ambient-inspect", // asm, weird
// background
"background-upload-vu0", "draw-node-cull"};
"background-upload-vu0", "draw-node-cull",
// anim-tester
"(method 3 anim-tester)",
"anim-tester-save-object-seqs" // anim-tester -- new basic on the stack
};
const std::unordered_set<std::string> g_functions_to_skip_compiling = {
/// GCOMMON
@@ -173,7 +178,12 @@ const std::unordered_set<std::string> g_functions_to_skip_compiling = {
"debug-menu-item-var-make-float",
// decompiler BUG
"level-hint-task-process"};
"level-hint-task-process",
// anim-tester
"(method 3 anim-tester)",
"anim-tester-save-object-seqs" // anim-tester -- new basic on the stack
};
// default location for the data. It can be changed with a command line argument.
std::string g_iso_data_path = "";
@@ -188,11 +198,12 @@ struct decomp_meta {
std::vector<decomp_meta> g_object_files_to_decompile_or_ref_check;
std::vector<std::string> dgos = {
"CGO/KERNEL.CGO", "CGO/ENGINE.CGO", "CGO/GAME.CGO", "DGO/BEA.DGO", "DGO/INT.DGO", "DGO/VI1.DGO",
"DGO/VI2.DGO", "DGO/VI3.DGO", "DGO/CIT.DGO", "DGO/MIS.DGO", "DGO/JUB.DGO", "DGO/SUN.DGO",
"DGO/DEM.DGO", "DGO/FIN.DGO", "DGO/JUN.DGO", "DGO/FIC.DGO", "DGO/SNO.DGO", "DGO/SWA.DGO",
"DGO/MAI.DGO", "DGO/ROB.DGO", "DGO/LAV.DGO", "DGO/OGR.DGO", "DGO/TRA.DGO"};
std::vector<std::string> dgos = {"CGO/KERNEL.CGO", "CGO/ENGINE.CGO", "CGO/GAME.CGO", "DGO/BEA.DGO",
"DGO/INT.DGO", "DGO/VI1.DGO", "DGO/VI2.DGO", "DGO/VI3.DGO",
"DGO/CIT.DGO", "DGO/MIS.DGO", "DGO/JUB.DGO", "DGO/SUN.DGO",
"DGO/DEM.DGO", "DGO/FIN.DGO", "DGO/JUN.DGO", "DGO/FIC.DGO",
"DGO/SNO.DGO", "DGO/SWA.DGO", "DGO/MAI.DGO", "DGO/ROB.DGO",
"DGO/LAV.DGO", "DGO/OGR.DGO", "DGO/TRA.DGO", "DGO/ROL.DGO"};
} // namespace