mirror of
https://github.com/open-goal/jak-project
synced 2026-05-24 23:22:14 -04:00
9351bf782e
And everything else needed for them! A couple functions are bad currently. - fixes #1929 - untested on linux - fixes #1924 - now you need to type `,` before a lambda you want to put in a pair. - fix debugger symbol table in jak 2 - made the decompiler output `(meters 2)` instead of `(meters 2.0)` - fixed a bug with the bitfield enum special -1 case - made bad game text decomp not exit the decompiler - added `editable-player` and `script`
105 lines
3.5 KiB
Common Lisp
Vendored
Generated
105 lines
3.5 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type script-form
|
|
(deftype script-form (structure)
|
|
((name symbol :offset-assert 0)
|
|
(spec pair :offset-assert 4)
|
|
(func (function script-context object) :offset-assert 8)
|
|
)
|
|
:pack-me
|
|
:method-count-assert 10
|
|
:size-assert #xc
|
|
:flag-assert #xa0000000c
|
|
(:methods
|
|
(script-form-method-9 () none 9)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type script-form
|
|
(defmethod inspect script-form ((obj script-form))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'script-form)
|
|
(format #t "~1Tname: ~A~%" (-> obj name))
|
|
(format #t "~1Tspec: ~A~%" (-> obj spec))
|
|
(format #t "~1Tfunc: ~A~%" (-> obj func))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type script-context
|
|
(deftype script-context (structure)
|
|
((load-state load-state :offset-assert 0)
|
|
(key basic :offset-assert 4)
|
|
(process process :offset-assert 8)
|
|
(trans vector :offset-assert 12)
|
|
(side-effect? symbol :offset-assert 16)
|
|
(got-error? symbol :offset-assert 20)
|
|
(expr pair :offset-assert 24)
|
|
(param-count int32 :offset-assert 28)
|
|
(param object 16 :offset-assert 32)
|
|
(param-type object 16 :offset-assert 96)
|
|
)
|
|
:method-count-assert 12
|
|
:size-assert #xa0
|
|
:flag-assert #xc000000a0
|
|
(:methods
|
|
(new (symbol type basic process vector) _type_ 0)
|
|
(eval! (_type_ pair) object 9)
|
|
(script-context-method-10 (_type_ object pair) object 10)
|
|
(script-context-method-11 (_type_ pair pair symbol) symbol 11)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type script-context
|
|
(defmethod inspect script-context ((obj script-context))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-10)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'script-context)
|
|
(format #t "~1Tload-state: ~A~%" (-> obj load-state))
|
|
(format #t "~1Tkey: ~A~%" (-> obj key))
|
|
(format #t "~1Tprocess: ~A~%" (-> obj process))
|
|
(format #t "~1Ttrans: #<vector @ #x~X>~%" (-> obj trans))
|
|
(format #t "~1Tside-effect?: ~A~%" (-> obj side-effect?))
|
|
(format #t "~1Tgot-error?: ~A~%" (-> obj got-error?))
|
|
(format #t "~1Texpr: ~A~%" (-> obj expr))
|
|
(format #t "~1Tparam-count: ~D~%" (-> obj param-count))
|
|
(format #t "~1Tparam[16] @ #x~X~%" (-> obj param))
|
|
(dotimes (s5-0 (-> obj param-count))
|
|
(format #t "~T [~D]~1Tparam: ~`object`P~%" s5-0 (-> obj param s5-0))
|
|
)
|
|
(format #t "~1Tparam-type[16] @ #x~X~%" (-> obj param-type))
|
|
(dotimes (s5-1 (-> obj param-count))
|
|
(format #t "~T [~D]~1Tparam-type: ~`object`P~%" s5-1 (-> obj param-type s5-1))
|
|
)
|
|
(label cfg-10)
|
|
obj
|
|
)
|
|
|
|
;; definition for method 0 of type script-context
|
|
;; WARN: Return type mismatch structure vs script-context.
|
|
(defmethod new script-context ((allocation symbol) (type-to-make type) (arg0 basic) (arg1 process) (arg2 vector))
|
|
(let ((t9-0 (method-of-type structure new))
|
|
(v1-1 type-to-make)
|
|
)
|
|
(-> type-to-make size)
|
|
(let ((v0-0 (t9-0 allocation v1-1)))
|
|
(set! (-> (the-as script-context v0-0) key) arg0)
|
|
(set! (-> (the-as script-context v0-0) process) arg1)
|
|
(set! (-> (the-as script-context v0-0) load-state) *load-state*)
|
|
(set! (-> (the-as script-context v0-0) side-effect?) #t)
|
|
(set! (-> (the-as script-context v0-0) got-error?) #f)
|
|
(set! (-> (the-as script-context v0-0) trans) arg2)
|
|
(the-as script-context v0-0)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|