mirror of
https://github.com/open-goal/jak-project
synced 2026-09-06 19:21:00 -04:00
d/jak2: get script decompiling, no ref tests yet (#1877)
Has boxed array accessing that prevents me from adding anything to ref tests (the entire file is lambdas so the access pattern that i would like to ignore happens at the top-level, can't ignore it. This code actually already has quite a bit of original docstrings so it's not too bad in that regard considering a `script-context` can have 16 arbitrary objects. It seems they rarely put more than a single object in the context and the types are usually obvious / are actually type checked!
This commit is contained in:
+1
-1
@@ -2005,7 +2005,7 @@
|
||||
(when s4-0
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> *syntax-context* got-error?) #f)
|
||||
(eval! *syntax-context* (the-as structure gp-1))
|
||||
(eval! *syntax-context* gp-1)
|
||||
(when (not (-> *syntax-context* got-error?))
|
||||
(set! (-> s4-0 changed) #t)
|
||||
(cond
|
||||
|
||||
+18
-1
@@ -684,7 +684,24 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-func-decode
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
;; WARN: Return type mismatch object vs function.
|
||||
;; WARN: Using new Jak 2 rtype-of
|
||||
(defun debug-menu-func-decode ((arg0 object))
|
||||
(let ((v1-2 (rtype-of arg0)))
|
||||
(the-as function (cond
|
||||
((or (= v1-2 symbol) (= v1-2 type))
|
||||
(-> (the-as symbol arg0) value)
|
||||
)
|
||||
((= v1-2 function)
|
||||
arg0
|
||||
)
|
||||
(else
|
||||
nothing
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-make-from-template
|
||||
;; INFO: Used lq/sq
|
||||
|
||||
Reference in New Issue
Block a user