Files
jak-project/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc
T
water111 48cb9bb787 [decompiler] as-type and font method support (#3855)
Add support for `as-type` macro, and detecting inline font methods. This
works in all three games but I've only updated jak 3's goal_src for now.
Eventually I will go back and work through the others, but I want to get
more decompiler features in first.


![image](https://github.com/user-attachments/assets/5c31bf85-97b4-437c-bc4b-dc054e60551e)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-02-01 21:23:11 -05:00

882 lines
44 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defpart 623
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:scale-x (meters 3))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 100.0)
(:g 80.0)
(:b 255.0)
(:a 16.0)
(:omega (degrees 2261.25))
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 409.6)
)
)
;; definition for symbol *jchar-wings-ragdoll-setup*, type ragdoll-setup
(define *jchar-wings-ragdoll-setup* (new 'static 'ragdoll-setup
:scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
:bg-collide-with (collide-spec backgnd player-list)
:joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup
(new 'static 'ragdoll-joint-setup
:joint-index 4
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.2654 :y -0.0018 :z -0.9641 :w 6300.3945)
:geo-tform (new 'static 'vector :x -0.0691 :y 0.9889 :z -0.1309 :w 40149.74)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 5
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.6487 :y -0.1165 :z 0.752 :w 2928.8037)
:geo-tform (new 'static 'vector :x -0.2599 :y 0.9602 :z 0.1019 :w 40284.58)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 6
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.6739 :y 0.0291 :z 0.7381 :w 5517.9307)
:geo-tform (new 'static 'vector :x 0.6239 :y 0.7439 :z -0.2391 :w 38562.84)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 7
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.7135 :y -0.0779 :z -0.6962 :w 14612.671)
:geo-tform (new 'static 'vector :x 0.427 :y 0.8201 :z -0.3806 :w 42171.234)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 8
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.9024 :y 0.17 :z -0.3958 :w 11472.295)
:geo-tform (new 'static 'vector :x -0.2578 :y 0.9589 :z 0.118 :w 41397.145)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 9
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.3801 :y 0.004 :z -0.9248 :w 10360.44)
:geo-tform (new 'static 'vector :x 0.029 :y 0.9893 :z -0.1425 :w 38818.555)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 10
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.9764 :y -0.1821 :z 0.1154 :w 2970.6013)
:geo-tform (new 'static 'vector :x -0.3592 :y 0.9097 :z 0.208 :w 39567.34)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 11
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.7474 :y 0.077 :z 0.6598 :w 8458.804)
:geo-tform (new 'static 'vector :x 0.7599 :y 0.4936 :z -0.4228 :w 40823.484)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 12
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.9331 :y -0.0047 :z -0.3594 :w 19540.941)
:geo-tform (new 'static 'vector :x -0.371 :y -0.9276 :z 0.0428 :w 19994.434)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 13
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.6734 :y 0.0697 :z -0.7359 :w 6495.546)
:geo-tform (new 'static 'vector :x 0.2558 :y -0.9488 :z -0.1848 :w 20230.09)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 14
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.4255 :y 0.0067 :z -0.9049 :w 20150.281)
:geo-tform (new 'static 'vector :x -0.2495 :y 0.9088 :z -0.3343 :w 35460.62)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 15
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.6235 :y -0.2077 :z 0.7536 :w 9110.888)
:geo-tform (new 'static 'vector :x -0.4093 :y 0.7846 :z 0.4655 :w 40835.207)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 16
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.9382 :y 0.1251 :z 0.3225 :w 12873.182)
:geo-tform (new 'static 'vector :x 0.8171 :y 0.4684 :z -0.336 :w 36737.35)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 17
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.8007 :y 0.0872 :z 0.5926 :w 43485.977)
:geo-tform (new 'static 'vector :x 0.1755 :y -0.9787 :z -0.106 :w 21626.426)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 18
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.8735 :y -0.2713 :z 0.404 :w 3852.2788)
:geo-tform (new 'static 'vector :x 0.2542 :y -0.9517 :z -0.1717 :w 20847.074)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 19
:parent-joint 3
:pre-tform (new 'static 'vector :x 0.3727 :y -0.0018 :z 0.9279 :w 39237.88)
:geo-tform (new 'static 'vector :x -0.3279 :y 0.8812 :z -0.3403 :w 32193.342)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 20
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.6138 :y -0.2619 :z 0.7446 :w 10673.011)
:geo-tform (new 'static 'vector :x -0.2349 :y 0.9716 :z 0.027 :w 35094.527)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 21
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.2056 :y 0.0894 :z 0.9745 :w 4970.159)
:geo-tform (new 'static 'vector :x 0.4984 :y 0.8656 :z -0.0465 :w 34449.273)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 22
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.2011 :y -0.0286 :z -0.9791 :w 10903.315)
:geo-tform (new 'static 'vector :x -0.3811 :y 0.9235 :z 0.0419 :w 34879.68)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 23
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.2655 :y -0.1245 :z 0.956 :w 8234.635)
:geo-tform (new 'static 'vector :x -0.176 :y 0.9839 :z 0.0286 :w 36081.355)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 24
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.2278 :y -0.0045 :z 0.9736 :w 7255.163)
:geo-tform (new 'static 'vector :x 0.1231 :y 0.9802 :z -0.1548 :w 25669.123)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 25
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.505 :y 0.1057 :z -0.8565 :w 3937.3848)
:geo-tform (new 'static 'vector :x 0.26 :y 0.9604 :z 0.0998 :w 25394.436)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 26
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.6633 :y -0.0291 :z -0.7477 :w 5518.568)
:geo-tform (new 'static 'vector :x -0.6247 :y 0.7448 :z -0.2343 :w 27084.008)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 27
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.7035 :y 0.0779 :z 0.7063 :w 14612.635)
:geo-tform (new 'static 'vector :x -0.4285 :y 0.8213 :z -0.3765 :w 23488.012)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 28
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.8966 :y -0.17 :z 0.4087 :w 11471.3125)
:geo-tform (new 'static 'vector :x 0.2579 :y 0.9591 :z 0.1158 :w 24282.729)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 29
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.3141 :y -0.0019 :z 0.9493 :w 10925.16)
:geo-tform (new 'static 'vector :x 0.012 :y 0.9857 :z -0.1675 :w 27199.225)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 30
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.9195 :y 0.1659 :z -0.3562 :w 3444.5723)
:geo-tform (new 'static 'vector :x 0.3612 :y 0.9109 :z 0.1992 :w 26365.314)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 31
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.7192 :y -0.0769 :z -0.6904 :w 8459.351)
:geo-tform (new 'static 'vector :x 0.7654 :y -0.4999 :z 0.4051 :w 40607.035)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 32
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.9174 :y 0.0049 :z 0.3978 :w 19540.723)
:geo-tform (new 'static 'vector :x -0.3669 :y 0.9295 :z -0.0346 :w 20393.875)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 33
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.6425 :y -0.0696 :z 0.763 :w 6494.891)
:geo-tform (new 'static 'vector :x 0.2562 :y 0.9502 :z 0.1772 :w 20638.305)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 34
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.3625 :y -0.0048 :z 0.9319 :w 19612.213)
:geo-tform (new 'static 'vector :x 0.219 :y 0.8996 :z -0.3777 :w 30652.809)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 35
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.7243 :y 0.2029 :z -0.6588 :w 9590.757)
:geo-tform (new 'static 'vector :x 0.4178 :y 0.7885 :z 0.4511 :w 25124.445)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 36
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.9203 :y -0.1251 :z -0.3705 :w 12873.563)
:geo-tform (new 'static 'vector :x 0.8236 :y -0.4721 :z 0.3141 :w 36484.418)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 37
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.7691 :y -0.0872 :z -0.6331 :w 43486.32)
:geo-tform (new 'static 'vector :x 0.1757 :y 0.9793 :z 0.1 :w 22153.406)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 38
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.8514 :y 0.2725 :z -0.4481 :w 3853.9175)
:geo-tform (new 'static 'vector :x 0.2546 :y 0.9532 :z 0.1627 :w 21354.834)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 39
:parent-joint 3
:pre-tform (new 'static 'vector :x -0.3106 :y -0.0029 :z 0.9505 :w 25369.969)
:geo-tform (new 'static 'vector :x 0.2772 :y 0.8778 :z -0.3905 :w 33952.89)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 40
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.7403 :y 0.2573 :z -0.621 :w 10801.298)
:geo-tform (new 'static 'vector :x 0.2349 :y 0.9718 :z 0.019 :w 31129.637)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 41
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.1393 :y -0.0881 :z -0.9863 :w 4969.959)
:geo-tform (new 'static 'vector :x -0.4987 :y 0.8662 :z -0.0296 :w 31694.191)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 42
:parent-joint -1
:pre-tform (new 'static 'vector :x -0.136 :y 0.0307 :z 0.9902 :w 10903.225)
:geo-tform (new 'static 'vector :x 0.3813 :y 0.9239 :z 0.0294 :w 31281.717)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
(new 'static 'ragdoll-joint-setup
:joint-index 43
:parent-joint -1
:pre-tform (new 'static 'vector :x 0.196 :y 0.1065 :z -0.9747 :w 8216.977)
:geo-tform (new 'static 'vector :x 0.176 :y 0.9841 :z 0.0214 :w 30276.574)
:axial-slop 1689.773
:max-angle 5461.3335
:coll-rad 614.4
)
)
)
)
;; definition for function wings-post
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior wings-post wings ()
(let ((v1-0 (ppointer->process (-> self parent))))
(set! (-> self draw light-index) (-> (the-as process-focusable v1-0) draw light-index))
(set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0)
(set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0)
(set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip))
(set! (-> self draw death-effect) (-> self parent 0 draw death-effect))
(set! (-> self draw death-timer) (-> self parent 0 draw death-timer))
(set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org))
(set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap))
(let ((a0-29 (-> v1-0 draw shadow-ctrl settings shadow-dir quad)))
(set! (-> self draw shadow-ctrl settings shadow-dir quad) a0-29)
)
(if (or (logtest? (-> v1-0 draw status) (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2))
(zero? (-> v1-0 skel active-channels))
)
(logior! (-> self draw status) (draw-control-status no-draw))
(logclear! (-> self draw status) (draw-control-status no-draw))
)
(when (and (not (focus-test? (the-as process-focusable v1-0) in-head))
(and (not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp)))
(not (movie?))
(< (-> *setting-control* user-current slow-time) 1.0)
)
)
(let ((gp-0 (new 'stack-no-clear 'vector))
(f30-0 (fmin 1.0 (-> self clock clock-ratio)))
)
(set! (-> (get-field-spec-by-id (-> *part-id-table* 623) (sp-field-id spt-a)) initial-valuef)
(* 16.0 (- 1.0 (-> *setting-control* user-current slow-time)))
)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg upper_body))
:rate f30-0
)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg chest)) :rate f30-0)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg neckA)) :rate f30-0)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg neckB)) :rate f30-0)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg MhairB))
:rate f30-0
)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg Lshould))
:rate f30-0
)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg Lforarm))
:rate f30-0
)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg lindA)) :rate f30-0)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg lringA))
:rate f30-0
)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg Rshould))
:rate f30-0
)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg Rarm)) :rate f30-0)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg Rforarm))
:rate f30-0
)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg sk_rhand))
:rate f30-0
)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg rindA)) :rate f30-0)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg gun)) :rate f30-0)
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (joint-node jakb-lod0-jg hips)) :rate f30-0)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg Lankle))
:rate f30-0
)
(launch-particles
(-> *part-id-table* 623)
(vector<-cspace! gp-0 (joint-node jakb-lod0-jg LbigToe))
:rate f30-0
)
)
)
)
0
(none)
)
;; failed to figure out what this is:
(defstate hidden (wings)
:virtual #t
:trans (behavior ()
(if (not (focus-test? (ppointer->process (-> self parent)) in-head))
(go-virtual idle #f)
)
)
:code (behavior ()
(ja-channel-set! 0)
(ja-post)
(logior! (-> self mask) (process-mask sleep-code))
(suspend)
0
)
)
;; failed to figure out what this is:
(defstate idle (wings)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('open)
(go-virtual use)
)
(('end-mode)
(go-virtual close)
)
)
)
:enter (behavior ((arg0 symbol))
(set! (-> self lock?) arg0)
)
:exit (behavior ()
(let ((a0-1 (handle->process (-> self ragdoll-proc))))
(if a0-1
(disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.2))
)
)
)
:trans (behavior ()
(b! (not (focus-test? (ppointer->process (-> self parent)) in-head)) cfg-4 :delay (empty-form))
(go-virtual hidden)
(b! #t cfg-27 :delay (nop!))
(label cfg-4)
(if (and (not (-> self lock?)) (let* ((v1-10 (ppointer->process (-> self parent)))
(a0-4 (if (> (-> v1-10 skel active-channels) 0)
(-> v1-10 skel root-channel 0 frame-group)
)
)
)
(and a0-4 (or (= a0-4 (-> v1-10 draw art-group data 493))
(= a0-4 (-> v1-10 draw art-group data 494))
(= a0-4 (-> v1-10 draw art-group data 495))
(= a0-4 (-> v1-10 draw art-group data 496))
(= a0-4 (-> v1-10 draw art-group data 482))
(= a0-4 (-> v1-10 draw art-group data 485))
(= a0-4 (-> v1-10 draw art-group data 483))
)
)
)
)
(go-virtual use)
)
(label cfg-27)
(let ((v1-20 (handle->process (-> self ragdoll-proc))))
(when v1-20
(let ((v1-22 (-> (the-as ragdoll-proc v1-20) ragdoll)))
(if v1-22
(logclear! (-> v1-22 ragdoll-flags) (ragdoll-flag rf2))
)
)
)
)
)
:code (behavior ((arg0 symbol))
(case arg0
(('open)
(ja-channel-set! 1)
(ja-no-eval :group! jakb-wings-lightjak-get-on-land-ja :num! (seek! (ja-aframe 45.0 0)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 45.0 0)))
)
(sound-play "ltjak-wings-out")
(ja-no-eval :num! (seek!))
(while (not (ja-done? 0))
(suspend)
(ja-eval)
)
)
(('force)
(ja-channel-set! 1)
(ja :group! jakb-wings-lightjak-stance-ja :num! max)
(suspend)
0
)
)
(set! (-> self lock?) #f)
(let ((a0-17 (handle->process (-> self ragdoll-proc))))
(when (not a0-17)
(set! (-> self ragdoll-proc) (ppointer->handle (process-spawn
ragdoll-proc
:init wings-ragdoll-proc-init-by-other
*jchar-wings-ragdoll-setup*
:name "ragdoll-proc"
:to self
:stack-size #x5000
)
)
)
(set! a0-17 (handle->process (-> self ragdoll-proc)))
)
(if (and (the-as ragdoll-proc a0-17) (-> (the-as ragdoll-proc a0-17) ragdoll))
(logior! (-> (the-as ragdoll-proc a0-17) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4 rf10))
)
(ragdoll-proc-method-15 (the-as ragdoll-proc a0-17) #f (the-as vector #f) #t)
)
(ja-channel-push! 1 (seconds 0.1))
(until #f
(ja-no-eval :group! jakb-wings-lightjak-stance-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
#f
)
:post (behavior ()
(wings-post)
(ja-post)
)
)
;; failed to figure out what this is:
(defstate close (wings)
:virtual #t
:code (behavior ()
(sound-play "ltjak-wings-in")
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! jakb-wings-lightjak-get-off-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
(ja-channel-set! 0)
(sleep-code)
)
:post (-> (method-of-type wings idle) post)
)
;; failed to figure out what this is:
(defstate use (wings)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('close)
(go-virtual idle #f)
)
(('end-mode)
(go-virtual close)
)
)
)
:trans (behavior ()
(let ((v1-0 (ppointer->process (-> self parent))))
(cond
((focus-test? (ppointer->process (-> self parent)) in-head)
(go-virtual hidden)
)
((let ((a0-8 (if (> (-> v1-0 skel active-channels) 0)
(-> v1-0 skel root-channel 0 frame-group)
)
)
)
(not (and a0-8 (or (= a0-8 (-> v1-0 draw art-group data 493))
(= a0-8 (-> v1-0 draw art-group data 494))
(= a0-8 (-> v1-0 draw art-group data 495))
(= a0-8 (-> v1-0 draw art-group data 496))
(= a0-8 (-> v1-0 draw art-group data 482))
(= a0-8 (-> v1-0 draw art-group data 485))
(= a0-8 (-> v1-0 draw art-group data 483))
)
)
)
)
(go-virtual idle #f)
)
)
)
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.1))
(until #f
(ja-no-eval :group! jakb-wings-lightjak-stance-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
#f
)
:post (behavior ()
(wings-post)
(clone-anim-once (ppointer->handle (-> self parent)) #f "wings-")
(ja-post)
)
)
;; definition for function wings-init
;; WARN: Return type mismatch object vs none.
(defbehavior wings-init wings ((arg0 symbol))
(set! (-> self root) (new 'process 'trsqv))
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-jchar-wings" (the-as (pointer level) #f)))
(the-as pair 0)
)
(set! (-> self shadow-backup) #f)
(let ((v1-6 (as-type (ppointer->process (-> self parent)) process-focusable))
(a0-6 (-> self node-list data))
)
(set! (-> a0-6 0 param0) (the-as (function cspace transformq none) cspace<-cspace-normalized!))
(set! (-> a0-6 0 param1) (the-as basic (-> v1-6 node-list data 6)))
(set! (-> a0-6 0 param2) #f)
)
(set! (-> self ragdoll-proc) (the-as handle #f))
(set! (-> self draw shadow-ctrl) *target-shadow-control*)
(cond
((= arg0 'open)
(go-virtual idle 'open)
)
((= arg0 'move)
(go-virtual idle #f)
)
((= arg0 'force)
(go-virtual idle 'force)
)
(else
(go-virtual use)
)
)
(none)
)
;; definition of type wings-ragdoll
(deftype wings-ragdoll (ragdoll)
((which-chain int8)
(chain-pos int8)
)
)
;; definition for method 3 of type wings-ragdoll
(defmethod inspect ((this wings-ragdoll))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tragdoll-joints[60] @ #x~X~%" (-> this ragdoll-joints))
(format #t "~1Tnum-joints: ~D~%" (-> this num-joints))
(format #t "~1Tmirror: #<matrix @ #x~X>~%" (-> this mirror))
(format #t "~1Tgravity: #<vector @ #x~X>~%" (-> this gravity))
(format #t "~1Tgravity-target: #<vector @ #x~X>~%" (-> this gravity-target))
(format #t "~1Torient-tform: #<vector @ #x~X>~%" (-> this orient-tform))
(format #t "~1Tscale: #<vector @ #x~X>~%" (-> this scale))
(format #t "~1Tstretch-vel: ~f~%" (-> this stretch-vel))
(format #t "~1Tstretch-vel-parallel: ~f~%" (-> this stretch-vel-parallel))
(format #t "~1Tcompress-vel: ~f~%" (-> this compress-vel))
(format #t "~1Tcompress-vel-parallel: ~f~%" (-> this compress-vel-parallel))
(format #t "~1Tmomentum: ~f~%" (-> this momentum))
(format #t "~1Tmaximum-stretch: ~f~%" (-> this maximum-stretch))
(format #t "~1Tturn-off-start: ~D~%" (-> this turn-off-start))
(format #t "~1Tturn-off-duration: ~D~%" (-> this turn-off-duration))
(format #t "~1Tcopy-velocity-start: ~D~%" (-> this copy-velocity-start))
(format #t "~1Troot-offset: #<vector @ #x~X>~%" (-> this root-offset))
(format #t "~1Trotate-vel: #<quaternion @ #x~X>~%" (-> this rotate-vel))
(format #t "~1Trotate-adj: #<quaternion @ #x~X>~%" (-> this rotate-adj))
(format #t "~1Trotate-adj-count: ~D~%" (-> this rotate-adj-count))
(format #t "~1Tragdoll-flags: ~D~%" (-> this ragdoll-flags))
(format #t "~1Tflex-blend: ~f~%" (-> this flex-blend))
(format #t "~1Tstable-joints: ~D~%" (-> this stable-joints))
(format #t "~1Tragdoll-joint-remap[100] @ #x~X~%" (-> this ragdoll-joint-remap))
(format #t "~1Tallow-destabilize: ~D~%" (-> this allow-destabilize))
(format #t "~1Tbg-collide-with: ~D~%" (-> this bg-collide-with))
(format #t "~1Twater-info: #<water-info @ #x~X>~%" (-> this water-info))
(format #t "~1Twhich-chain: ~D~%" (-> this which-chain))
(format #t "~1Tchain-pos: ~D~%" (-> this chain-pos))
(label cfg-4)
this
)
;; definition for method 19 of type wings-ragdoll
;; INFO: Used lq/sq
;; WARN: Return type mismatch vector vs none.
(defmethod ragdoll-method-19 ((this wings-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix))
(let ((s3-0 (new 'stack-no-clear 'vector)))
(vector-copy! s3-0 (-> this gravity))
(let ((s1-0 (-> this ragdoll-joints arg1))
(f30-0 1.0)
)
(cond
((= (-> s1-0 parent-joint) -1)
(+! (-> this chain-pos) 1)
)
(else
(+! (-> this which-chain) 1)
(set! (-> this chain-pos) 0)
0
)
)
(let ((v1-12 (-> this which-chain)))
(cond
((or (zero? v1-12) (= v1-12 4))
(set! f30-0 100.0)
)
((or (= v1-12 1) (= v1-12 5))
(set! f30-0 50.0)
)
((or (= v1-12 2) (= v1-12 6))
(set! f30-0 10.0)
)
)
)
(vector-float*! (-> this gravity) (-> arg3 uvec) f30-0)
(let ((t9-0 (method-of-type ragdoll ragdoll-method-19)))
(t9-0 this arg0 arg1 arg2 arg3)
)
(when (= (-> s1-0 parent-joint) -1)
(let* ((f0-4 (+ (* 54.613335 (the float (current-time)))
(* 10922.667 (the float (-> this chain-pos)))
(* 29127.111 (the float (-> this which-chain)))
)
)
(f0-5 (- f0-4 (* (the float (the int (/ f0-4 65536.0))) 65536.0)))
)
(vector+float*! arg0 arg0 (-> arg3 rvec) (* 5.0 (cos f0-5) f30-0 (the float (-> this chain-pos))))
)
)
)
(vector-copy! (-> this gravity) s3-0)
)
(if (and (= (-> this ragdoll-joints arg1 parent-joint) -1)
(= (-> this ragdoll-joints (+ arg1 -1) parent-joint) -1)
)
(vector+float*!
arg0
arg0
(the-as vector (+ (the-as uint (-> this ragdoll-joints 0 velocity)) (* 192 (+ arg1 -1))))
0.25
)
)
(none)
)
;; definition for method 18 of type wings-ragdoll
;; WARN: Return type mismatch int vs none.
(defmethod ragdoll-method-18 ((this wings-ragdoll))
(let ((t9-0 (method-of-type ragdoll ragdoll-method-18)))
(t9-0 this)
)
(set! (-> this which-chain) -1)
(set! (-> this chain-pos) -1)
(none)
)
;; definition for method 16 of type wings-ragdoll
;; WARN: Return type mismatch float vs none.
(defmethod ragdoll-setup! ((this wings-ragdoll) (arg0 process-drawable) (arg1 ragdoll-setup))
"Set up this ragdoll with the given [[ragdoll-setup]]."
(let ((t9-0 (method-of-type ragdoll ragdoll-setup!)))
(t9-0 this arg0 arg1)
)
(set! (-> this stretch-vel) 0.7)
(set! (-> this stretch-vel-parallel) 0.8)
(set! (-> this compress-vel) 0.85)
(set! (-> this compress-vel-parallel) 0.75)
(set! (-> this momentum) 0.4)
(set! (-> this maximum-stretch) 1.5)
(none)
)
;; definition for function wings-ragdoll-proc-init-by-other
(defbehavior wings-ragdoll-proc-init-by-other wings-ragdoll-proc ((arg0 ragdoll-proc))
(set! (-> self last-attack-id) (the-as uint 0))
(set! (-> self ragdoll) (new 'process 'wings-ragdoll))
(if (nonzero? (-> self ragdoll))
(ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) (the-as ragdoll-setup arg0))
(format 0 "ERROR<gmj>: didn't have enough memory to allocate wings-ragdoll for wings-ragdoll-proc~%")
)
(go-virtual idle)
)