Merge remote-tracking branch 'water111/master' into decomp/sunken-elevator

This commit is contained in:
Tyler Wilding
2021-08-12 19:23:19 -04:00
101 changed files with 11708 additions and 1181 deletions
@@ -189,15 +189,15 @@
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-12 (_type_ vector float uint process bone uint) float 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-16 (_type_ vector float uint process uint) none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-20 (_type_ vector float uint bone uint) none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
@@ -94,8 +94,8 @@
((move-vec vector :inline :offset-assert 16)
(best-u float :offset-assert 32)
(best-tri collide-tri-result :inline :offset-assert 48)
(best-from-prim basic :offset-assert 132)
(best-to-prim basic :offset-assert 136)
(best-from-prim collide-shape-prim :offset-assert 132)
(best-to-prim collide-shape-prim :offset-assert 136)
)
:method-count-assert 10
:size-assert #x8c
@@ -119,8 +119,8 @@
;; definition of type collide-overlap-result
(deftype collide-overlap-result (structure)
((best-dist float :offset-assert 0)
(best-from-prim basic :offset-assert 4)
(best-to-prim basic :offset-assert 8)
(best-from-prim collide-shape-prim :offset-assert 4)
(best-to-prim collide-shape-prim :offset-assert 8)
(best-from-tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 10
+3 -3
View File
@@ -126,15 +126,15 @@
(attacker uint64 :offset-assert 48)
(invinc-time uint64 :offset-assert 56)
(mask uint32 :offset-assert 64)
(mode basic :offset-assert 68)
(mode symbol :offset-assert 68)
(shove-back meters :offset-assert 72)
(shove-up meters :offset-assert 76)
(speed meters :offset-assert 80)
(dist meters :offset-assert 84)
(control float :offset-assert 88)
(angle basic :offset-assert 92)
(angle symbol :offset-assert 92)
(rotate-to degrees :offset-assert 96)
(prev-state basic :offset-assert 100)
(prev-state state :offset-assert 100)
)
:method-count-assert 10
:size-assert #x68
+1 -1
View File
@@ -121,7 +121,7 @@
;; definition of type camera-tracker
(deftype camera-tracker (process)
((grab-target uint64 :offset 120)
((grab-target handle :offset 120)
(grab-event basic :offset-assert 128)
(release-event basic :offset-assert 132)
(old-global-mask uint32 :offset-assert 136)
+1 -1
View File
@@ -35,7 +35,7 @@
(projectile-dissipate () none 21)
(projectile-impact () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-24 (_type_) none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
+1 -1
View File
@@ -183,7 +183,7 @@
)
;; definition for function ripple-find-height
(defun ripple-find-height ((arg0 process-drawable) (arg1 basic) (arg2 vector))
(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector))
(local-vars (sv-16 float) (sv-32 float))
(let* ((f30-0 (-> arg0 root trans y))
(v1-1 (-> arg0 draw))
@@ -0,0 +1,339 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function add-fake-shadow-to-buffer
;; INFO: Return type mismatch int vs none.
(defun
add-fake-shadow-to-buffer
((arg0 vector) (arg1 vector) (arg2 float) (arg3 int))
(let ((v1-0 *fake-shadow-buffer*))
(when (< (-> v1-0 num-shadows) 32)
(let ((t0-5 (-> v1-0 data (-> v1-0 num-shadows))))
(set! (-> t0-5 px) (-> arg0 x))
(set! (-> t0-5 py) (-> arg0 y))
(set! (-> t0-5 pz) (-> arg0 z))
(set! (-> t0-5 scale) arg2)
(set! (-> t0-5 qx) (-> arg1 x))
(set! (-> t0-5 qy) (-> arg1 y))
(set! (-> t0-5 qz) (-> arg1 z))
(set! (-> t0-5 flags) arg3)
)
(+! (-> v1-0 num-shadows) 1)
)
)
0
(none)
)
;; definition for function swap-fake-shadow-buffers
;; INFO: Return type mismatch int vs none.
(defun swap-fake-shadow-buffers ()
(set! *fake-shadow-buffer* (if (= *fake-shadow-buffer* *fake-shadow-buffer-1*)
*fake-shadow-buffer-2*
*fake-shadow-buffer-1*
)
)
(set! (-> *fake-shadow-buffer* num-shadows) 0)
0
(none)
)
;; definition for function draw-shadow
;; INFO: Return type mismatch int vs none.
(defun
draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 vector)
(arg3 float)
(arg4 float)
(arg5 float)
)
(let ((f0-1 (- (-> arg0 y) (-> arg1 y))))
(if (< f0-1 arg4)
(add-fake-shadow-to-buffer
arg1
arg2
(* (- 1.0 (/ f0-1 arg4)) arg3)
(the-as int arg5)
)
)
)
0
(none)
)
;; definition for function compute-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun
compute-and-draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 vector)
(arg3 vector)
(arg4 float)
(arg5 float)
)
(local-vars
(v1-10 float)
(v1-11 float)
(sv-96 vector)
(sv-112 (function quaternion vector float quaternion))
(sv-128 vector)
(sv-144 vector)
)
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(set! sv-96 arg2)
(let ((s4-0 arg3)
(s3-0 arg4)
(s2-0 arg5)
)
(when (< (- (-> arg0 y) (-> arg1 y)) s3-0)
(set! sv-144 (new 'stack-no-clear 'vector))
(let ((s0-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'sparticle-cpuinfo))
)
(set! (-> arg1 y) (+ 40.96 (-> arg1 y)))
(set! (-> sv-144 x) (-> sv-96 z))
(set! (-> sv-144 y) 0.0)
(set! (-> sv-144 z) (- (-> sv-96 x)))
(vector-normalize! sv-144 1.0)
(set! sv-112 quaternion-vector-angle!)
(set! sv-128 s0-0)
(let ((a2-1 (acos (-> sv-96 y))))
(sv-112 (the-as quaternion sv-128) sv-144 a2-1)
)
(let ((v1-9 s1-0))
(cond
((< (-> s0-0 w) 0.0)
(.lvf vf1 (&-> v1-9 vel-sxvel quad))
(.lvf vf2 (&-> s0-0 quad))
(.sub.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> v1-9 vel-sxvel quad) vf1)
(.mov v1-10 vf1)
)
(else
(.lvf vf1 (&-> v1-9 vel-sxvel quad))
(.lvf vf2 (&-> s0-0 quad))
(.add.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> v1-9 vel-sxvel quad) vf1)
(.mov v1-11 vf1)
)
)
)
(draw-shadow arg0 arg1 (-> s1-0 vel-sxvel) (the-as float s4-0) s3-0 s2-0)
)
)
)
0
(none)
)
)
;; definition for function find-ground-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun
find-ground-and-draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 float)
(arg3 uint)
(arg4 process)
(arg5 float)
(arg6 float)
)
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> arg0 quad))
(new 'stack-no-clear 'vector)
(+! (-> s2-0 y) arg5)
(let ((s4-0 (new 'stack-no-clear 'bone)))
(cond
((>=
(dummy-12 *collide-cache* s2-0 arg6 arg3 arg4 s4-0 (the-as uint 1))
0.0
)
(if (!= arg2 0.0)
(compute-and-draw-shadow
s2-0
(-> s4-0 transform vector 3)
(-> s4-0 scale)
(the-as vector arg2)
arg6
(the-as float 0)
)
)
(if (and arg1 (!= (shr (shl (-> s4-0 cache bone-matrix) 52) 58) 3))
(set! (-> arg1 quad) (-> s4-0 transform vector 3 quad))
)
)
(else
(if arg1
(vector+float*!
arg1
arg0
(-> *standard-dynamics* gravity-normal)
(- arg6)
)
)
)
)
)
)
0
(none)
)
;; definition for function do-target-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior do-target-shadow target ()
(if
(and
(logtest? (-> self control status) 1)
(!= (-> self control unknown-surface mode) 'swim)
(!= (-> self control unknown-surface mode) 'dive)
(!= (-> self next-state name) 'target-flop)
(zero? (logand (-> self draw status) 38))
)
(set! (-> self control shadow-pos quad) (-> self control trans quad))
(find-ground-and-draw-shadow
(-> self control trans)
(-> self control shadow-pos)
0.0
(-> (the-as collide-shape-prim (-> self control root-prim)) collide-with)
self
0.0
81920.0
)
)
0
(none)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 362)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x41000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x4499999a
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x10
:flags #x1
:initial-value -956301312
:random-range #x47800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x3
:initial-value -4
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x41a00000
:random-range #x41a00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x1a
:flags #x1
:initial-value #x4103126f
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x1c
:flags #x1
:initial-value #x41888889
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x20
:flags #x3
:initial-value -4
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x24
:flags #x1
:initial-value -1097229926
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value #x138c
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value 12
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x36
:flags #x1
:initial-value -983331271
:random-range #x452aaaab
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3a
:flags #x1
:initial-value #x46800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3b
:flags #x1
:initial-value -956301312
:random-range #x47800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3e
:flags #x1
:initial-value #x444ccccd
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
@@ -5,12 +5,12 @@
(deftype sp-field-init-spec (structure)
((field uint16 :offset-assert 0)
(flags uint16 :offset-assert 2)
(initial-valuef float :offset-assert 4)
(random-rangef float :offset-assert 8)
(random-multf float :offset-assert 12)
(initial-value int32 :offset 4)
(random-range int32 :offset 8)
(random-mult int32 :offset 12)
(initial-value int32 :offset-assert 4)
(random-range int32 :offset-assert 8)
(random-mult int32 :offset-assert 12)
(initial-valuef float :offset 4)
(random-rangef float :offset 8)
(random-multf float :offset 12)
(func basic :offset 4)
(tex uint32 :offset 4)
(pntr uint32 :offset 4)
@@ -30,9 +30,9 @@
(format #t "~Tinitial-valuef: ~f~%" (-> obj initial-valuef))
(format #t "~Trandom-rangef: ~f~%" (-> obj random-rangef))
(format #t "~Trandom-multf: ~f~%" (-> obj random-multf))
(format #t "~Tinitial-value: ~D~%" (-> obj initial-valuef))
(format #t "~Trandom-range: ~D~%" (-> obj random-rangef))
(format #t "~Trandom-mult: ~D~%" (-> obj random-multf))
(format #t "~Tinitial-value: ~D~%" (-> obj initial-value))
(format #t "~Trandom-range: ~D~%" (-> obj random-range))
(format #t "~Trandom-mult: ~D~%" (-> obj random-mult))
(format #t "~Tfunc: ~A~%" (-> obj initial-valuef))
(format #t "~Ttex: ~D~%" (-> obj initial-valuef))
(format #t "~Tpntr: #x~X~%" (-> obj initial-valuef))
@@ -43,9 +43,9 @@
;; definition of type sparticle-launcher
(deftype sparticle-launcher (basic)
((birthaccum float :offset-assert 4)
(soundaccum float :offset-assert 8)
(init-specs uint32 :offset-assert 12)
((birthaccum float :offset-assert 4)
(soundaccum float :offset-assert 8)
(init-specs (inline-array sp-field-init-spec) :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
+3 -3
View File
@@ -151,13 +151,13 @@
(:methods
(water-vol-idle () none 20)
(water-vol-startup () none 21)
(dummy-22 () none 22)
(TODO-RENAME-22 (_type_) ripple-wave-set 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(TODO-RENAME-25 (_type_) quaternion 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-28 () none 28)
(get-ripple-height (_type_ vector) float 28)
(dummy-29 () none 29)
)
)
+222
View File
@@ -0,0 +1,222 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type twist-joint
(deftype twist-joint (structure)
((ry float :offset-assert 0)
(max-dry float :offset-assert 4)
)
:allow-misaligned :method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; definition for method 3 of type twist-joint
(defmethod inspect twist-joint ((obj twist-joint))
(format #t "[~8x] ~A~%" obj 'twist-joint)
(format #t "~Try: ~f~%" (-> obj ry))
(format #t "~Tmax-dry: ~f~%" (-> obj max-dry))
obj
)
;; definition of type twister
(deftype twister (basic)
((num-joints int32 :offset-assert 4)
(first-joint int32 :offset-assert 8)
(last-joint int32 :offset-assert 12)
(something uint16 :offset 12)
(max-speed float :offset-assert 16)
(smoothing float :offset-assert 20)
(min-dist float :offset-assert 24)
(target float :offset-assert 28)
(ry float :offset-assert 32)
(max-speed-ry float :offset-assert 36)
(data twist-joint :inline :dynamic :offset-assert 40)
)
:method-count-assert 13
:size-assert #x28
:flag-assert #xd00000028
(:methods
(new (symbol _type_ int int float float float float) _type_ 0)
(TODO-RENAME-9 (_type_ int int float) none 9)
(set-target! (_type_ float) none 10)
(TODO-RENAME-11 (_type_) none 11)
(TODO-RENAME-12 (_type_ process-drawable) none 12)
)
)
;; definition for method 3 of type twister
(defmethod inspect twister ((obj twister))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tnum-joints: ~D~%" (-> obj num-joints))
(format #t "~Tfirst-joint: ~D~%" (-> obj first-joint))
(format #t "~Tlast-joint: ~D~%" (-> obj last-joint))
(format #t "~Tmax-speed: ~f~%" (-> obj max-speed))
(format #t "~Tsmoothing: ~f~%" (-> obj smoothing))
(format #t "~Tmin-dist: ~f~%" (-> obj min-dist))
(format #t "~Ttarget: ~f~%" (-> obj target))
(format #t "~Try: ~f~%" (-> obj ry))
(format #t "~Tmax-speed-ry: ~f~%" (-> obj max-speed-ry))
(format #t "~Tdata[0] @ #x~X~%" (-> obj data))
obj
)
;; definition for method 0 of type twister
(defmethod
new
twister
((allocation symbol)
(type-to-make twister)
(arg0 int)
(arg1 int)
(arg2 float)
(arg3 float)
(arg4 float)
(arg5 float)
)
(let* ((gp-0 (+ (- 1 arg0) arg1))
(v0-0
(object-new
allocation
(the-as type type-to-make)
(the-as int (+ (-> type-to-make something) (* gp-0 16)))
)
)
)
(set! (-> v0-0 first-joint) arg0)
(set! (-> v0-0 last-joint) arg1)
(set! (-> v0-0 num-joints) gp-0)
(set! (-> v0-0 max-speed) arg2)
(set! (-> v0-0 smoothing) arg4)
(set! (-> v0-0 min-dist) arg5)
(set! (-> v0-0 target) 0.0)
(set! (-> v0-0 ry) 0.0)
(set! (-> v0-0 max-speed-ry) arg3)
(dotimes (v1-4 gp-0)
(set! (-> v0-0 data v1-4 ry) 0.0)
(set! (-> v0-0 data v1-4 max-dry) 0.0)
)
v0-0
)
)
;; definition for method 5 of type twister
(defmethod asize-of twister ((obj twister))
(+ (* (-> obj num-joints) 16) 40)
)
;; definition for method 9 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod
TODO-RENAME-9
twister
((obj twister) (arg0 int) (arg1 int) (arg2 float))
(let ((v1-1 (- arg0 (-> obj first-joint)))
(a1-2 (- arg1 (-> obj first-joint)))
)
(while (>= a1-2 v1-1)
(set! (-> obj data v1-1 max-dry) arg2)
(+! v1-1 1)
)
)
0
(none)
)
;; definition for method 10 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod set-target! twister ((obj twister) (arg0 float))
(set! (-> obj target) arg0)
0
(none)
)
;; definition for method 11 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-11 twister ((obj twister))
(let* ((s5-0 (+ (-> obj num-joints) -1))
(s4-0 (-> obj data s5-0))
)
(let ((f0-2 (deg-diff (-> s4-0 ry) (-> obj target))))
(+!
(-> s4-0 ry)
(seek-with-smooth
0.0
f0-2
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
(let ((f30-1 (-> s4-0 ry)))
(while (> s5-0 0)
(+! s5-0 -1)
(let ((s4-1 (-> obj data s5-0)))
(let ((f0-9 (deg-diff f30-1 (-> s4-1 ry))))
(cond
((= (-> s4-1 max-dry) 0.0)
(set! f0-9 0.0)
)
((< (fabs f0-9) (-> s4-1 max-dry))
)
((< f0-9 0.0)
(set!
f0-9
(seek-with-smooth
f0-9
(- (-> s4-1 max-dry))
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
(else
(set!
f0-9
(seek-with-smooth
f0-9
(-> s4-1 max-dry)
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
)
(+! f30-1 f0-9)
)
(set! (-> s4-1 ry) f30-1)
)
)
)
)
0
(none)
)
;; definition for method 12 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-12 twister ((obj twister) (arg0 process-drawable))
(let ((s4-0 (new 'stack-no-clear 'matrix)))
(dotimes (s3-0 (-> obj num-joints))
(let
((s2-0
(-> arg0 node-list data (+ (-> obj first-joint) s3-0) bone transform)
)
)
(matrix-rotate-y! s4-0 (-> obj data s3-0 ry))
(vector-! (-> s2-0 vector 3) (-> s2-0 vector 3) (-> arg0 root trans))
(matrix*! s2-0 s2-0 s4-0)
(vector+! (-> s2-0 vector 3) (-> s2-0 vector 3) (-> arg0 root trans))
)
)
)
0
(none)
)
+102
View File
@@ -0,0 +1,102 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type wobbler
(deftype wobbler (basic)
((posx float :offset-assert 4)
(posy float :offset-assert 8)
(velx float :offset-assert 12)
(vely float :offset-assert 16)
(spring float :offset-assert 20)
(damping float :offset-assert 24)
(height float :offset-assert 28)
)
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
(:methods
(reset! (_type_ float float float) none 9)
(inc-xy-vel! (_type_ float float) none 10)
(move! (_type_) none 11)
(TODO-RENAME-12 (_type_ quaternion) none 12)
)
)
;; definition for method 3 of type wobbler
(defmethod inspect wobbler ((obj wobbler))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tposx: ~f~%" (-> obj posx))
(format #t "~Tposy: ~f~%" (-> obj posy))
(format #t "~Tvelx: ~f~%" (-> obj velx))
(format #t "~Tvely: ~f~%" (-> obj vely))
(format #t "~Tspring: ~f~%" (-> obj spring))
(format #t "~Tdamping: ~f~%" (-> obj damping))
(format #t "~Theight: ~f~%" (-> obj height))
obj
)
;; definition for method 9 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod reset! wobbler ((obj wobbler) (arg0 float) (arg1 float) (arg2 float))
(set! (-> obj posx) 0.0)
(set! (-> obj posy) 0.0)
(set! (-> obj velx) 0.0)
(set! (-> obj vely) 0.0)
(set! (-> obj spring) arg0)
(set! (-> obj damping) arg1)
(set! (-> obj height) arg2)
0
(none)
)
;; definition for method 10 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod inc-xy-vel! wobbler ((obj wobbler) (arg0 float) (arg1 float))
(+! (-> obj velx) arg0)
(+! (-> obj vely) arg1)
0
(none)
)
;; definition for method 11 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod move! wobbler ((obj wobbler))
(+! (-> obj posx) (* (-> obj velx) (-> *display* seconds-per-frame)))
(+! (-> obj posy) (* (-> obj vely) (-> *display* seconds-per-frame)))
(set! (-> obj velx) (* (-> obj velx) (-> obj damping)))
(set! (-> obj vely) (* (-> obj vely) (-> obj damping)))
(+! (-> obj velx) (* (* -1.0 (-> obj posx)) (-> obj spring)))
(+! (-> obj vely) (* (* -1.0 (-> obj posy)) (-> obj spring)))
0
(none)
)
;; definition for method 12 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-12 wobbler ((obj wobbler) (arg0 quaternion))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 x) (-> obj posy))
(set! (-> s5-0 y) 0.0)
(set! (-> s5-0 z) (- (-> obj posx)))
(vector-normalize! s5-0 1.0)
(let*
((f0-8
(/
(sqrtf
(+ (* (-> obj posx) (-> obj posx)) (* (-> obj posy) (-> obj posy)))
)
(-> obj height)
)
)
(f0-9 (atan f0-8 1.0))
)
(quaternion-vector-angle! arg0 s5-0 f0-9)
)
)
0
(none)
)
+14 -14
View File
@@ -27,20 +27,20 @@
:size-assert #x1a8
:flag-assert #x17000001a8
(:methods
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(TODO-RENAME-9 (_type_ float float float float) none 9)
(dummy-10 (_type_ float) none 10)
(clear-force-torque! (_type_) none 11)
(clear-momentum! (_type_) none 12)
(TODO-RENAME-13 (_type_ vector vector) none 13)
(TODO-RENAME-14 (_type_ vector vector) none 14)
(TODO-RENAME-15 (_type_ vector) none 15)
(TODO-RENAME-16 (_type_ vector vector float) none 16)
(TODO-RENAME-17 (_type_ vector vector) vector 17)
(TODO-RENAME-18 (_type_ vector) vector 18)
(dummy-19 (_type_) none 19)
(dummy-20 (_type_) none 20)
(TODO-RENAME-21 (_type_) none 21)
(TODO-RENAME-22 (_type_ vector quaternion float float) none 22)
)
)
File diff suppressed because it is too large Load Diff
+100
View File
@@ -0,0 +1,100 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type ticky
(deftype ticky (structure)
((delay-til-ramp uint64 :offset-assert 0)
(delay-til-timeout uint64 :offset-assert 8)
(starting-time uint64 :offset-assert 16)
(last-tick-time uint64 :offset-assert 24)
)
:method-count-assert 12
:size-assert #x20
:flag-assert #xc00000020
(:methods
(sleep (_type_ uint) none 9)
(reached-delay? (_type_ uint) symbol 10)
(completed? (_type_) symbol 11)
)
)
;; definition for method 3 of type ticky
(defmethod inspect ticky ((obj ticky))
(format #t "[~8x] ~A~%" obj 'ticky)
(format #t "~Tdelay-til-ramp: ~D~%" (-> obj delay-til-ramp))
(format #t "~Tdelay-til-timeout: ~D~%" (-> obj delay-til-timeout))
(format #t "~Tstarting-time: ~D~%" (-> obj starting-time))
(format #t "~Tlast-tick-time: ~D~%" (-> obj last-tick-time))
obj
)
;; definition for method 9 of type ticky
;; INFO: Return type mismatch int vs none.
(defmethod sleep ticky ((obj ticky) (arg0 uint))
(set! (-> obj starting-time) (-> *display* base-frame-counter))
(set! (-> obj delay-til-timeout) arg0)
(set! (-> obj delay-til-ramp) (max 0 (the-as int (+ arg0 -1200))))
(set! (-> obj last-tick-time) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type ticky
(defmethod completed? ticky ((obj ticky))
(let ((gp-0 #f))
(let ((v1-2 (- (-> *display* base-frame-counter) (-> obj starting-time))))
(cond
((>= (the-as int v1-2) (the-as int (-> obj delay-til-timeout)))
(set! gp-0 #t)
)
(else
(let*
((f0-1
(fmin
1.0
(/
(the float (max 0 (the-as int (- v1-2 (-> obj delay-til-ramp)))))
(the float (- (-> obj delay-til-timeout) (-> obj delay-til-ramp)))
)
)
)
(v1-7 (the int (lerp 105.0 41.0 f0-1)))
)
(when
(>=
(the-as
int
(- (-> *display* base-frame-counter) (-> obj last-tick-time))
)
v1-7
)
(set! (-> obj last-tick-time) (-> *display* base-frame-counter))
(sound-play-by-name
(static-sound-name "stopwatch")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
)
)
)
)
)
gp-0
)
)
;; definition for method 10 of type ticky
(defmethod reached-delay? ticky ((obj ticky) (arg0 uint))
(>=
(the-as int (- (-> *display* base-frame-counter) (-> obj starting-time)))
(the-as int arg0)
)
)
+106
View File
@@ -0,0 +1,106 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type tippy
(deftype tippy (structure)
((axis vector :inline :offset-assert 0)
(angle float :offset-assert 16)
(orig quaternion :inline :offset-assert 32)
(dist-ratio float :offset-assert 48)
(damping float :offset-assert 52)
(1-damping float :offset-assert 56)
)
:method-count-assert 11
:size-assert #x3c
:flag-assert #xb0000003c
(:methods
(reset! (_type_ process-drawable float float) none 9)
(TODO-RENAME-10 (_type_ process-drawable vector) symbol 10)
)
)
;; definition for method 3 of type tippy
(defmethod inspect tippy ((obj tippy))
(format #t "[~8x] ~A~%" obj 'tippy)
(format #t "~Taxis: #<vector @ #x~X>~%" (-> obj axis))
(format #t "~Tangle: ~f~%" (-> obj angle))
(format #t "~Torig: #<quaternion @ #x~X>~%" (-> obj orig))
(format #t "~Tdist-ratio: ~f~%" (-> obj dist-ratio))
(format #t "~Tdamping: ~f~%" (-> obj damping))
(format #t "~T1-damping: ~f~%" (-> obj 1-damping))
obj
)
;; definition for method 9 of type tippy
;; INFO: Return type mismatch int vs none.
(defmethod
reset!
tippy
((obj tippy) (arg0 process-drawable) (arg1 float) (arg2 float))
(set-vector! (-> obj axis) 0.0 0.0 0.0 1.0)
(set! (-> obj angle) 0.0)
(quaternion-copy! (-> obj orig) (-> arg0 root quat))
(set! (-> obj dist-ratio) arg1)
(set! (-> obj damping) arg2)
(set! (-> obj 1-damping) (- 1.0 arg2))
0
(none)
)
;; definition for method 10 of type tippy
(defmethod
TODO-RENAME-10
tippy
((obj tippy) (arg0 process-drawable) (arg1 vector))
(let ((s4-0 #t))
(cond
(arg1
(let ((s3-0 (new 'stack-no-clear 'vector)))
0.0
(set! (-> s3-0 x) (- (-> arg1 z) (-> arg0 root trans z)))
(set! (-> s3-0 y) 0.0)
(set! (-> s3-0 z) (- (-> arg0 root trans x) (-> arg1 x)))
(let ((f0-6 (vector-length s3-0)))
(vector-float*! s3-0 s3-0 (/ 1.0 f0-6))
(let ((f30-0 (* f0-6 (-> obj dist-ratio))))
(set!
(-> obj axis x)
(+
(* (-> obj 1-damping) (-> obj axis x))
(* (-> obj damping) (-> s3-0 x))
)
)
(set! (-> obj axis y) 0.0)
(set!
(-> obj axis z)
(+
(* (-> obj 1-damping) (-> obj axis z))
(* (-> obj damping) (-> s3-0 z))
)
)
(vector-normalize! (-> obj axis) 1.0)
(set!
(-> obj angle)
(+ (* (-> obj 1-damping) (-> obj angle)) (* (-> obj damping) f30-0))
)
)
)
)
)
(else
(set! (-> obj angle) (* (-> obj 1-damping) (-> obj angle)))
(when (< (-> obj angle) 182.04445)
(set! (-> obj angle) 0.0)
(set! s4-0 #f)
)
)
)
(quaternion-vector-angle! (-> arg0 root quat) (-> obj axis) (-> obj angle))
(quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> obj orig))
s4-0
)
)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,481 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type teetertotter
(deftype teetertotter (process-drawable)
((launched-player basic :offset-assert 176)
(in-launch-window basic :offset-assert 180)
(rock-is-dangerous basic :offset-assert 184)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xbc
:flag-assert #x14005000bc
)
;; definition for method 3 of type teetertotter
(defmethod inspect teetertotter ((obj teetertotter))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tlaunched-player: ~A~%" (-> obj launched-player))
(format #t "~T~Tin-launch-window: ~A~%" (-> obj in-launch-window))
(format #t "~T~Trock-is-dangerous: ~A~%" (-> obj rock-is-dangerous))
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "teetertotter"
:bounds (new 'static 'vector :w 32768.0)
:max-lod 2
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 4)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *teetertotter-sg* v1-1)
)
;; definition for function target-on-end-of-teetertotter?
;; Used lq/sq
(defun target-on-end-of-teetertotter? ((arg0 teetertotter))
(let
((gp-1
(vector-!
(new-stack-vector0)
(-> *target* control trans)
(-> arg0 root trans)
)
)
)
(if
(<
(vector-dot
(vector-x-quaternion! (new-stack-vector0) (-> arg0 root quat))
gp-1
)
-8192.0
)
#t
)
)
)
;; failed to figure out what this is:
(let
((v1-3
(new 'static 'state
:name 'teetertotter-idle
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-idle (the-as (state none) v1-3))
(set!
(-> v1-3 event)
(lambda :behavior teetertotter
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(case (-> arg3 param 1)
(('flop)
(when (target-on-end-of-teetertotter? self)
(set! (-> self in-launch-window) #f)
(increment-success-for-hint
(the-as level-hint-control 676)
)
(go teetertotter-launch)
)
)
)
)
((= v1-0 'bonk)
(when (target-on-end-of-teetertotter? self)
(level-hint-spawn
(game-text-id misty-teetertotter-bonk-dax-tutorial)
"sksp0070"
#f
*entity-pool*
0
)
(go teetertotter-bend)
)
)
)
)
)
)
)
(set!
(-> v1-3 code)
(lambda :behavior teetertotter () (let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as
art-joint-anim
(-> self draw art-group data 4)
)
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(while #t
(suspend)
)
(none)
)
)
(set! (-> v1-3 post) transform-post)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'state
:name 'teetertotter-launch
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-launch (the-as (state none) v1-4))
(set!
(-> v1-4 event)
(lambda :behavior teetertotter
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(when (= arg2 'touch)
(-> arg3 param 0)
(let ((t9-0 (method-of-type touching-shapes-entry dummy-12)))
(-> self root)
1
(when (and (t9-0) (-> self rock-is-dangerous))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 2)
(set! (-> a1-2 message) 'attack)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(let ((a0-2 (new 'static 'attack-info :mask #x20)))
(set! (-> a0-2 mode) 'deadly)
(set! (-> a1-2 param 1) (the-as uint a0-2))
)
(send-event-function arg0 a1-2)
)
)
)
(-> arg3 param 0)
(let ((t9-2 (method-of-type touching-shapes-entry dummy-12)))
(-> self root)
2
(when
(and
(t9-2)
(target-on-end-of-teetertotter? self)
(not (-> self launched-player))
(-> self in-launch-window)
)
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-4 from) self)
(set! (-> a1-4 num-params) 2)
(set! (-> a1-4 message) 'shove)
(set! (-> a1-4 param 0) (the-as uint #f))
(let ((v1-16 (new 'static 'attack-info :mask #xcc0)))
(set! (-> v1-16 shove-back) 0.0)
(set! (-> v1-16 shove-up) 53248.0)
(set! (-> v1-16 angle) 'jump)
(set! (-> v1-16 control) 1.0)
(set! (-> a1-4 param 1) (the-as uint v1-16))
)
(when (send-event-function arg0 a1-4)
(let ((v0-0 #t))
(set! (-> self launched-player) v0-0)
v0-0
)
)
)
)
)
)
)
)
(set!
(-> v1-4 code)
(lambda :behavior teetertotter
()
(local-vars (v1-16 symbol) (f0-4 float))
(set! (-> self launched-player) #f)
(let ((a0-0 (-> self skel root-channel 0)))
(set!
(-> a0-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group!
a0-0
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (begin
(set! (-> self rock-is-dangerous) (and v1-16 (>= 76.0 f0-4)))
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(set! f0-4 (ja-aframe-num 0))
(set! (-> self in-launch-window) (and (>= f0-4 76.0) (>= 82.0 f0-4)))
(set! v1-16 (>= f0-4 12.0))
)
(go teetertotter-idle)
(none)
)
)
(set! (-> v1-4 post) rider-post)
)
;; failed to figure out what this is:
(let
((v1-5
(new 'static 'state
:name 'teetertotter-bend
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-bend (the-as (state none) v1-5))
(set!
(-> v1-5 code)
(lambda :behavior teetertotter () (let ((a0-0 (-> self skel root-channel 0)))
(set!
(-> a0-0 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
)
(set!
(-> a0-0 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group!
a0-0
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
num-func-seek!
)
)
(until (begin
(suspend)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 param 0)
(the float (+ (-> a0-1 frame-group data 0 length) -1))
)
(set! (-> a0-1 param 1) 1.0)
(joint-control-channel-group-eval!
a0-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(empty)
)
(go teetertotter-idle)
(none)
)
)
(set! (-> v1-5 post) rider-post)
)
;; definition for method 11 of type teetertotter
(defmethod copy-defaults! teetertotter ((obj teetertotter) (arg0 res-lump))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))
)
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(let ((t9-2 (method-of-object s4-0 dummy-29)))
1
(t9-2)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 12288.0 0.0 36864.0)
((method-of-object s4-0 dummy-46))
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set! (-> s2-0 prim-core action) (the-as uint 1))
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 5)
(set-vector! (-> s2-0 local-sphere) -4096.0 2048.0 0.0 5120.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-1
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 0)
(the-as uint 2)
)
)
)
(set! (-> s2-1 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-1 collide-with) (the-as uint 16))
(set! (-> s2-1 prim-core action) (the-as uint 3))
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 7)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-2
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 1)
(the-as uint 0)
)
)
)
(set! (-> s2-2 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-2 collide-with) (the-as uint 16))
(set! (-> s2-2 prim-core action) (the-as uint 1))
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 4)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-3
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 2)
(the-as uint 0)
)
)
)
(set! (-> s2-3 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-3 collide-with) (the-as uint 16))
(set! (-> s2-3 prim-core action) (the-as uint 1))
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 3)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-4
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 3)
(the-as uint 2)
)
)
)
(set! (-> s2-4 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-4 collide-with) (the-as uint 16))
(set! (-> s2-4 prim-core action) (the-as uint 3))
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 3)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
((method-of-object s4-0 dummy-50))
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *teetertotter-sg* '())
(set! (-> obj launched-player) #f)
(set! (-> obj in-launch-window) #f)
(set! (-> obj rock-is-dangerous) #f)
(go teetertotter-idle)
(none)
)
@@ -0,0 +1,468 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type silostep
(deftype silostep (process-drawable)
((anim-limit float :offset-assert 176)
(cam-tracker uint64 :offset-assert 184)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xc0
:flag-assert #x14005000c0
)
;; definition for method 3 of type silostep
(defmethod inspect silostep ((obj silostep))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tanim-limit: ~f~%" (-> obj anim-limit))
(format #t "~T~Tcam-tracker: ~D~%" (-> obj cam-tracker))
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "silostep"
:bounds
(new 'static 'vector :y 8192.0 :w 32768.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *silostep-sg* v1-1)
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'state
:name 'silostep-idle
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-idle (the-as (state none) v1-2))
(set!
(-> v1-2 event)
(the-as
(function process int symbol event-message-block object)
(lambda :behavior silostep
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('trigger)
(go silostep-camera)
)
(('trigger-rise)
enter-state
(go silostep-rise)
)
)
(none)
)
)
)
(set!
(-> v1-2 code)
(lambda :behavior silostep () (let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as
art-joint-anim
(-> self draw art-group data 2)
)
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(transform-post)
(while #t
(suspend)
)
(none)
)
)
(set! (-> v1-2 post) ja-post)
)
;; definition for function misty-camera-view
(defbehavior misty-camera-view silostep ()
(let* ((gp-0 (get-process *default-dead-pool* camera-tracker #x4000))
(v1-1 (when gp-0
(let ((t9-1 (method-of-type camera-tracker activate)))
(t9-1
(the-as camera-tracker gp-0)
self
'camera-tracker
(the-as pointer #x70004000)
)
)
((the-as
(function object object object object)
run-function-in-process
)
gp-0
camera-tracker-init
(lambda :behavior camera-tracker
()
(while (not (process-grab? *target*))
(suspend)
)
(camera-change-to "camera-160" 150 #f)
(let ((gp-0 (-> *display* base-frame-counter)))
(until (begin
(suspend)
(>=
(the-as
int
(- (-> *display* base-frame-counter) gp-0)
)
900
)
)
(empty)
)
)
(while
(not
(process-release? (handle->process (-> self grab-target)))
)
(suspend)
)
(camera-change-to (the-as string 'base) 150 #f)
(none)
)
)
(-> gp-0 ppointer)
)
)
(v0-3
(logior (shl (-> v1-1 0 pid) 32) (new 'static 'handle :process v1-1))
)
)
(set! (-> self cam-tracker) (the-as uint v0-3))
v0-3
)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'state
:name 'silostep-camera
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-camera (the-as (state none) v1-4))
(set!
(-> v1-4 code)
(lambda :behavior silostep
()
(misty-camera-view)
(let* ((gp-0 (get-task-control (game-task misty-warehouse)))
(v1-1 (get-reminder gp-0 0))
)
(save-reminder gp-0 (logior v1-1 2) 0)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(let ((gp-1 (-> *display* base-frame-counter)))
(until (begin
(suspend)
(>= (the-as int (- (-> *display* base-frame-counter) gp-1)) 300)
)
(empty)
)
)
(sound-play-by-name
(static-sound-name "arena-steps")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(send-to-all-after (-> self link) 'trigger-rise)
enter-state
(go silostep-rise)
(none)
)
)
(set! (-> v1-4 post) ja-post)
)
;; failed to figure out what this is:
(let
((v1-5
(new 'static 'state
:name 'silostep-rise
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-rise (the-as (state none) v1-5))
(set!
(-> v1-5 code)
(lambda :behavior silostep
((arg0 symbol))
(process-entity-status! self (entity-perm-status complete) #t)
(when (not arg0)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set! (-> a0-2 param 0) (-> self anim-limit))
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (begin
(rider-trans)
(rider-post)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set! (-> a0-3 param 0) (-> self anim-limit))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(empty)
)
)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-identity
)
(set! (-> gp-1 frame-num) (-> self anim-limit))
)
(rider-post)
(while #t
(ja-post)
(suspend)
)
(none)
)
)
(set! (-> v1-5 post) #f)
)
;; definition for method 11 of type silostep
(defmethod copy-defaults! silostep ((obj silostep) (arg0 res-lump))
(logior! (-> obj mask) (process-mask movie-subject))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))
)
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(let ((t9-2 (method-of-object s4-0 dummy-29)))
1
(t9-2)
)
(let
((s3-0
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 18432.0)
)
((method-of-object s4-0 dummy-46))
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
((method-of-object s4-0 dummy-50))
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *silostep-sg* '())
(set!
(-> obj anim-limit)
(*
(get-property-value-float
arg0
'distance
'interp
-1000000000.0
1.0
(the-as (pointer res-tag) #f)
*res-static-buf*
)
(the
float
(+
(-> (the-as art-joint-anim (-> obj draw art-group data 2)) data 0 length)
-1
)
)
)
)
(set! (-> obj link) (new 'process 'actor-link-info obj))
(cond
((and
(-> obj entity)
(nonzero?
(logand (-> obj entity extra perm status) (entity-perm-status complete))
)
)
enter-state
#t
(go silostep-rise)
)
(else
(go silostep-idle)
)
)
(none)
)
;; failed to figure out what this is:
(let
((v1-6
(new 'static 'skeleton-group
:art-group-name "rounddoor"
:bounds (new 'static 'vector :w 32768.0)
:max-lod 1
:version #x6
)
)
)
(set! (-> v1-6 jgeo) 0)
(set! (-> v1-6 janim) 3)
(set! (-> v1-6 mgeo 0) (the-as uint 1))
(set! (-> v1-6 lod-dist 0) 81920.0)
(set! (-> v1-6 mgeo 1) (the-as uint 2))
(set! (-> v1-6 lod-dist 1) 4095996000.0)
(set! *rounddoor-sg* v1-6)
)
;; definition of type rounddoor
(deftype rounddoor (eco-door)
()
:heap-base #xa0
:method-count-assert 27
:size-assert #x104
:flag-assert #x1b00a00104
)
;; definition for method 3 of type rounddoor
(defmethod inspect rounddoor ((obj rounddoor))
(let ((t9-0 (method-of-type eco-door inspect)))
(t9-0 obj)
)
obj
)
;; definition for method 24 of type rounddoor
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-24 rounddoor ((obj rounddoor))
(let
((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
(let
((s4-0
(new
'process
'collide-shape-prim-mesh
s5-0
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s4-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) -12288.0 0.0 0.0 40960.0)
)
((method-of-object s5-0 dummy-46))
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
((method-of-object s5-0 dummy-50))
(set! (-> obj root-override) s5-0)
)
0
(none)
)
;; definition for method 25 of type rounddoor
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defmethod TODO-RENAME-25 rounddoor ((obj rounddoor))
(dummy-14 obj *rounddoor-sg* '())
(set! (-> obj open-distance) 69632.0)
(set! (-> obj close-distance) 81920.0)
(set!
(-> obj open-sound)
(the-as
uint128
(make-u128 (the-as uint #x6e65706f2d72) (the-as uint #x6f6f64616e657261))
)
)
(set!
(-> obj close-sound)
(the-as
uint128
(make-u128 (the-as uint #x65736f6c632d72) (the-as uint #x6f6f64616e657261))
)
)
(set! (-> obj speed) 1.5)
(set! (-> obj auto-close) #t)
(set! (-> obj one-way) #t)
(vector-x-quaternion! (-> obj out-dir) (-> obj root-override quat))
(set!
(-> obj out-dir w)
(- 8192.0 (vector-dot (-> obj out-dir) (-> obj root-override trans)))
)
(dummy-47 (-> obj root-override))
0
(none)
)
+112
View File
@@ -0,0 +1,112 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type mud
(deftype mud (water-anim)
()
:heap-base #x70
:method-count-assert 30
:size-assert #xdc
:flag-assert #x1e007000dc
)
;; definition for method 3 of type mud
(defmethod inspect mud ((obj mud))
(let ((t9-0 (method-of-type water-anim inspect)))
(t9-0 obj)
)
obj
)
;; definition for symbol ripple-for-mud, type ripple-wave-set
(define
ripple-for-mud
(new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave
(new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for symbol ripple-for-small-mud, type ripple-wave-set
(define
ripple-for-small-mud
(new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave
(new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 20.0 :xdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv -2 :zdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for method 22 of type mud
(defmethod TODO-RENAME-22 mud ((obj mud))
(let ((t9-0 (method-of-type water-anim TODO-RENAME-22)))
(t9-0 obj)
)
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
(set! (-> obj flags) (logior #x40000 (-> obj flags)))
(let ((gp-0 (new 'process 'ripple-control)))
(set! (-> obj draw ripple) gp-0)
(set! (-> gp-0 global-scale) 3072.0)
(set! (-> gp-0 waveform) ripple-for-mud)
(let
((v1-9
(the-as
object
((method-of-type res-lump get-property-data)
(-> obj entity)
'water-anim-fade-dist
'interp
-1000000000.0
(the-as pointer #f)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
)
(when (the-as pointer v1-9)
(set!
(-> gp-0 close-fade-dist)
(-> (the-as ripple-control v1-9) global-scale)
)
(set!
(-> gp-0 far-fade-dist)
(-> (the-as ripple-control v1-9) last-frame-scale)
)
)
)
(case (-> obj look)
((21 25 29)
(set! (-> gp-0 close-fade-dist) 4096000000.0)
(set! (-> gp-0 far-fade-dist) 8192000000.0)
)
)
(case (-> obj look)
((22 25 24 27 26 31)
(let ((v0-3 ripple-for-small-mud))
(set! (-> gp-0 waveform) v0-3)
v0-3
)
)
)
)
)
+1 -1
View File
@@ -268,7 +268,7 @@ class OfflineDecompilation : public ::testing::Test {
config->generate_symbol_definition_map = false;
std::vector<std::string> dgos = {"CGO/KERNEL.CGO", "CGO/ENGINE.CGO", "CGO/GAME.CGO",
"DGO/BEA.DGO"};
"DGO/BEA.DGO", "CGO/L1.CGO"};
std::vector<std::string> dgo_paths;
if (g_iso_data_path.empty()) {
for (auto& x : dgos) {