mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 23:30:16 -04:00
d/jak2: finish sidekick, target-carry and battle. Close to finishing target-death and warp-gate (#1990)
This commit is contained in:
+1
-1
@@ -146,4 +146,4 @@ tasks:
|
||||
- task: offline-test-file
|
||||
type-test:
|
||||
cmds:
|
||||
- cmd: '{{.GOALCTEST_BIN_RELEASE_DIR}}/goalc-test --gtest_brief=0 --gtest_break_on_failure --gtest_filter="*Jak2TypeConsistency*"'
|
||||
- cmd: '{{.GOALCTEST_BIN_RELEASE_DIR}}/goalc-test --gtest_brief=0 --gtest_filter="*Jak2TypeConsistency*" --gtest_break_on_failure'
|
||||
|
||||
+167
-163
@@ -12602,17 +12602,17 @@
|
||||
)
|
||||
|
||||
(deftype continue-point (basic)
|
||||
((name string) ;; ?
|
||||
(level symbol) ;; ?
|
||||
(flags continue-flags)
|
||||
(trans vector :inline)
|
||||
(quat vector :inline)
|
||||
(camera-trans vector :inline)
|
||||
(camera-rot vector3s 3 :inline)
|
||||
(on-goto pair)
|
||||
(vis-nick symbol)
|
||||
(want level-buffer-state 6 :inline)
|
||||
(want-sound symbol 3)
|
||||
((name string :offset-assert 4) ;; ?
|
||||
(level symbol :offset-assert 8) ;; ?
|
||||
(flags continue-flags :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat vector :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
(camera-rot vector3s 3 :inline :offset-assert 64)
|
||||
(on-goto pair :offset-assert 100)
|
||||
(vis-nick symbol :offset-assert 104)
|
||||
(want level-buffer-state 6 :inline :offset-assert 108)
|
||||
(want-sound symbol 3 :offset-assert 204)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #xd8
|
||||
@@ -14398,7 +14398,7 @@
|
||||
;; Failed to read fields.
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
(drop-pickup (_type_ symbol process-tree fact-info int) (pointer process) 9) ;; (drop-pickup (_type_ symbol process-tree fact-info int) (pointer process) 9)
|
||||
(drop-pickup (_type_ symbol process-tree fact-info int) (pointer process) 9)
|
||||
(reset! (_type_ symbol) none 10)
|
||||
(pickup-collectable! (_type_ pickup-type float handle) float 11)
|
||||
)
|
||||
@@ -15059,6 +15059,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype scene (art-group)
|
||||
((mask-to-clear uint32 :offset-assert 32)
|
||||
(entity string :offset-assert 36)
|
||||
@@ -16688,6 +16689,7 @@
|
||||
(unknown-dword02 int64 :offset 4416) ;; logic-target::read-pad
|
||||
(unknown-vector16 vector :inline :offset 4432) ;; logic-target::target-real-post
|
||||
(unknown-float14 float :offset 4448) ;; logic-target::target-real-post
|
||||
(unknown-floatiujh1bnb2n3i1 float :offset 4452) ;; target-death::velocity-set-to-target!
|
||||
(unknown-float15 float :offset 4456) ;; logic-target::target-real-post
|
||||
(unknown-word01 int32 :offset 4460) ;; logic-target::joint-points
|
||||
(unknown-vector17 vector :inline :offset 4464) ;; logic-target::pre-collide-setup
|
||||
@@ -16743,8 +16745,8 @@
|
||||
(unknown-vector29 vector :inline :offset 5168) ;; logic-target::joint-points
|
||||
(unknown-vector30 vector :inline :offset 5184) ;; logic-target::joint-points
|
||||
(unknown-vector31 vector :inline :offset 5200) ;; logic-target::joint-points
|
||||
(unknown-vector32 vector :inline :offset 5216) ;; logic-target::joint-points
|
||||
(unknown-vector33 vector :inline :offset 5232) ;; logic-target::joint-points
|
||||
(unknown-cspacei1un23i1 cspace :inline :offset 5216) ;; logic-target::joint-points
|
||||
;; (unknown-vector33 vector :inline :offset 5232) ;; logic-target::joint-points
|
||||
(unknown-symbol00 symbol :offset 5248) ;; (exit target-duck-stance)
|
||||
(unknown-float000 float :offset 5252) ;; target-gun::target-gun-end-mode
|
||||
(unknown-float31 float :offset 5256) ;; logic-target::joint-points
|
||||
@@ -16777,7 +16779,7 @@
|
||||
(unknown-time-frame17 time-frame :offset 5712) ;; (trans target-board-halfpipe)
|
||||
(unknown-time-frame18 time-frame :offset 5720) ;; (code target-running-attack)
|
||||
(unknown-sound-id00 sound-id :offset 5776) ;; (enter target-board-flip)
|
||||
(unknown-handle02 handle :offset 5792) ;; (event target-board-grenade)
|
||||
(unknown-handle02 handle :offset 5792) ;; (event target-board-grenade) ;; TODO - make sure this is a handle
|
||||
(unknown-impact-control00 impact-control :inline :offset 5824) ;; logic-target::joint-points
|
||||
(unknown-word06 int32 :offset 5832) ;; (code target-running-attack)
|
||||
(unknown-vector41 vector :inline :offset 5888) ;; (code target-running-attack)
|
||||
@@ -17301,7 +17303,7 @@
|
||||
:flag-assert #xf00000024
|
||||
(:methods
|
||||
(new (symbol type process-drawable) _type_ 0)
|
||||
(effect-control-method-9 () none 9) ;; (TODO-RENAME-9 (_type_) none 9)
|
||||
(effect-control-method-9 (_type_) none 9) ;; (TODO-RENAME-9 (_type_) none 9)
|
||||
(effect-control-method-10 () none 10) ;; (dummy-10 (_type_ symbol float int) object 10)
|
||||
(effect-control-method-11 () none 11) ;; (dummy-11 (_type_ symbol float int basic pat-surface) none 11)
|
||||
(effect-control-method-12 (_type_ symbol float int basic sound-name) int 12) ;; (dummy-12 (_type_ symbol float int basic sound-name) int 12)
|
||||
@@ -17704,8 +17706,9 @@
|
||||
(declare-type darkjak-info basic)
|
||||
|
||||
(deftype target (process-focusable)
|
||||
((control control-info :offset 128 :score 200) ;; guessed by decompiler
|
||||
(fact-info-override fact-info-target :offset 160 :score 100)
|
||||
((self-override target :offset 32 :score 100)
|
||||
(control control-info :offset 128 :score 200) ;; guessed by decompiler
|
||||
(fact-override fact-info-target :offset 160 :score 100)
|
||||
(skel2 joint-control :offset-assert 204)
|
||||
(shadow-backup shadow-geo :offset-assert 208)
|
||||
(target-flags uint32 :offset 188)
|
||||
@@ -17727,7 +17730,7 @@
|
||||
(cam-user-mode symbol :offset-assert 300) ;; guessed by decompiler
|
||||
(sidekick (pointer sidekick) :offset-assert 304) ;; guessed by decompiler
|
||||
(manipy (pointer manipy) :offset-assert 308) ;; guessed by decompiler
|
||||
(mirror (pointer process-drawable) :offset-assert 312)
|
||||
(mirror (pointer process-drawable) :offset-assert 312) ;; hip-mirror?
|
||||
(attack-info attack-info :inline :offset-assert 320)
|
||||
(attack-info-rec attack-info :inline :offset-assert 480)
|
||||
(attack-info-old attack-info 8 :inline :offset-assert 640)
|
||||
@@ -17750,7 +17753,7 @@
|
||||
(pre-joint-hook (function none :behavior target) :offset-assert 2112)
|
||||
(notify handle :offset-assert 2120)
|
||||
(mode-cache basic :offset-assert 2128)
|
||||
(mode-param1 uint64 :offset-assert 2136)
|
||||
(mode-param1 handle :offset-assert 2136)
|
||||
(mode-param2 uint64 :offset-assert 2144)
|
||||
(mode-param3 uint64 :offset-assert 2152)
|
||||
(tobot-state state :offset-assert 2160)
|
||||
@@ -17778,23 +17781,38 @@
|
||||
(target-method-27 (_type_ collide-cache collide-edge-spec) none 27)
|
||||
(init-target (_type_ continue-point symbol) none :behavior target 28)
|
||||
)
|
||||
(:states
|
||||
target-carry-drop
|
||||
target-carry-stance
|
||||
target-carry-walk
|
||||
target-carry-falling
|
||||
(target-carry-hit-ground symbol)
|
||||
(target-carry-jump float float)
|
||||
target-carry-throw
|
||||
(target-warp-out vector vector target) ;; (define-extern target-warp-out state) ;; (state vector vector target)
|
||||
(target-warp-in vector vector target) ;; (define-extern target-warp-in state) ;; (state vector vector target)
|
||||
target-indax-start
|
||||
)
|
||||
)
|
||||
|
||||
(deftype sidekick (process-drawable)
|
||||
((control control-info :offset 128) ;; guessed by decompiler
|
||||
((parent-override (pointer target) :offset 16 :score 100 )
|
||||
(control control-info :offset 128) ;; guessed by decompiler
|
||||
(anim-seed uint64 :offset 208) ;; ??
|
||||
(shadow-in-movie? symbol :offset-assert 216) ;; guessed by decompiler
|
||||
(special-anim-time time-frame :offset-assert 224)
|
||||
(special-anim-interp float :offset-assert 232)
|
||||
(special-anim-frame float :offset-assert 236)
|
||||
(offset transformq :inline :offset-assert 240)
|
||||
(mirror uint32 :offset-assert 288)
|
||||
(mirror (pointer process-drawable) :offset-assert 288) ;; hip-mirror?
|
||||
)
|
||||
:method-count-assert 20
|
||||
:size-assert #x124
|
||||
:flag-assert #x1400b00124
|
||||
(:methods
|
||||
)
|
||||
(:states
|
||||
sidekick-clone)
|
||||
)
|
||||
|
||||
(define-extern *target* target)
|
||||
@@ -26628,7 +26646,7 @@
|
||||
(function symbol matrix))
|
||||
(define-extern matrix-world->local
|
||||
"Returns [[*math-camera*]]'s `camera-rot`"
|
||||
(function matrix))
|
||||
(function symbol object matrix))
|
||||
(define-extern *camera-dummy-vector* vector)
|
||||
(define-extern camera-pos
|
||||
"Returns the `trans` vector from whatever is first determined to exist:
|
||||
@@ -27276,7 +27294,7 @@
|
||||
(define-extern ja-aframe-num (function int float :behavior process-drawable))
|
||||
(define-extern ja-aframe (function float int float :behavior process-drawable))
|
||||
;; (define-extern ja-speed function) ;; (function int float :behavior process-drawable)
|
||||
;; (define-extern ja-step function) ;; (function int float :behavior process-drawable)
|
||||
(define-extern ja-step (function int float :behavior process-drawable)) ;;
|
||||
(define-extern ja-channel-set! (function int int :behavior process-drawable))
|
||||
(define-extern ja-channel-push! (function int time-frame int :behavior process-drawable))
|
||||
;; (define-extern ja-channel-float! function)
|
||||
@@ -28150,7 +28168,7 @@
|
||||
;; (define-extern birth-func-vector-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern birth-func-set-alpha-from-userdata function)
|
||||
;; (define-extern part-tracker-track-target-joint function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern process-drawable-burn-effect function) ;; (function time-frame none :behavior target)
|
||||
(define-extern process-drawable-burn-effect (function time-frame none :behavior target)) ;;
|
||||
(define-extern lightning-probe-callback (function lightning-tracker none))
|
||||
(define-extern process-drawable-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float object)) ;; guess
|
||||
(define-extern process-drawable-shock-wall-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float none))
|
||||
@@ -28239,10 +28257,9 @@
|
||||
;; sidekick ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *sidekick-remap* object) ;; pair
|
||||
;; (define-extern cspace<-cspace+transformq! function)
|
||||
(define-extern *sidekick-remap* pair)
|
||||
(define-extern cspace<-cspace+transformq! (function cspace cspace transformq matrix))
|
||||
(define-extern target-sidekick-setup (function symbol none :behavior target))
|
||||
;; (define-extern sidekick-clone state) ;; (state sidekick)
|
||||
(define-extern init-sidekick (function none :behavior sidekick))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -28577,18 +28594,11 @@
|
||||
;; target-carry ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *carry-walk-mods* surface)
|
||||
;; (define-extern *carry-jump-mods* surface)
|
||||
;; (define-extern target-carry-update function)
|
||||
;; (define-extern target-carry-post function)
|
||||
(define-extern *carry-walk-mods* surface)
|
||||
(define-extern *carry-jump-mods* surface)
|
||||
(define-extern target-carry-update (function none :behavior target))
|
||||
(define-extern target-carry-post (function none :behavior target))
|
||||
(define-extern target-carry-pickup (state target))
|
||||
;; (define-extern target-carry-drop state)
|
||||
;; (define-extern target-carry-stance state)
|
||||
;; (define-extern target-carry-walk state)
|
||||
;; (define-extern target-carry-falling state)
|
||||
;; (define-extern target-carry-hit-ground state)
|
||||
;; (define-extern target-carry-jump state)
|
||||
;; (define-extern target-carry-throw state)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; target-darkjak ;;
|
||||
@@ -28612,37 +28622,35 @@
|
||||
;; target-death ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype kill-nearby-enemies-info (UNKNOWN)
|
||||
(deftype kill-nearby-enemies-info (basic)
|
||||
((dist float :offset-assert 4)
|
||||
(pos vector :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *auto-continue* object) ;; symbol
|
||||
;; (define-extern next-continue function)
|
||||
(define-extern *auto-continue* symbol) ;;
|
||||
(define-extern next-continue (function continue-point continue-point))
|
||||
(define-extern target-continue (state continue-point target))
|
||||
(define-extern *smack-mods* surface)
|
||||
(define-extern *smack-up-mods* surface)
|
||||
;; (define-extern velocity-set-to-target! function) ;; (function vector float attack-info vector :behavior target)
|
||||
(define-extern velocity-set-to-target! (function vector float attack-info vector :behavior target)) ;;
|
||||
(define-extern target-hit-effect (function attack-info none :behavior target))
|
||||
;; (define-extern target-hit-push function) ;; (function vector matrix float float attack-info object :behavior target)
|
||||
(define-extern target-hit-push (function vector matrix float float attack-info symbol :behavior target)) ;;
|
||||
(define-extern target-hit-orient (function attack-info vector symbol :behavior target))
|
||||
;; (define-extern target-hit-setup-anim function) ;; (function attack-info object :behavior target)
|
||||
(define-extern target-hit-setup-anim (function attack-info none :behavior target)) ;;
|
||||
(define-extern target-hit-move (function attack-info symbol (function none :behavior target) float none :behavior target))
|
||||
(define-extern target-hit (state symbol attack-info target))
|
||||
;; (define-extern *death-spool-array* array) ;; (array spool-anim)
|
||||
;; (define-extern death-movie-remap function) ;; (function int int int)
|
||||
;; (define-extern *kill-nearby-enemies-info* kill-nearby-enemies-info)
|
||||
;; (define-extern kill-nearby-enemies function)
|
||||
;; (define-extern target-death-anim-trans function)
|
||||
;; (define-extern target-death-anim function) ;; (function spool-anim none :behavior target)
|
||||
;; (define-extern target-death-main function)
|
||||
;; (define-extern target-death-reset function)
|
||||
(define-extern *death-spool-array* (array spool-anim)) ;;
|
||||
(define-extern death-movie-remap (function int int int)) ;;
|
||||
(define-extern *kill-nearby-enemies-info* kill-nearby-enemies-info)
|
||||
(define-extern kill-nearby-enemies (function vector float object))
|
||||
(define-extern target-death-anim-trans (function none :behavior target))
|
||||
(define-extern target-death-anim (function spool-anim none :behavior target)) ;;
|
||||
(define-extern target-death-main (function symbol none :behavior target))
|
||||
(define-extern target-death-reset (function symbol symbol none :behavior target))
|
||||
(define-extern target-death (state symbol target))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -32831,7 +32839,7 @@
|
||||
|
||||
(define-extern *enemy-dummy-shadow-control* shadow-control)
|
||||
(define-extern get-penetrate-using-from-attack-event (function process-drawable event-message-block penetrate))
|
||||
(define-extern enemy-init-by-other (function none :behavior enemy))
|
||||
(define-extern enemy-init-by-other (function process-drawable transformq none :behavior enemy))
|
||||
(define-extern enemy-event-handler (function process int symbol event-message-block object :behavior enemy))
|
||||
(define-extern enemy-simple-post (function none :behavior enemy))
|
||||
(define-extern enemy-falling-post (function none :behavior enemy))
|
||||
@@ -33764,31 +33772,53 @@
|
||||
;; warp-gate ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype warp-gate (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype air-train (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
(deftype warp-gate (process-drawable)
|
||||
(
|
||||
(root-override collide-shape :offset 128 :score 100)
|
||||
(level-name uint32 :offset-assert 200)
|
||||
(on-notice int32 :offset-assert 204)
|
||||
(on-activate int32 :offset-assert 208)
|
||||
(on-close int32 :offset-assert 212)
|
||||
(wait-for pair :offset-assert 216)
|
||||
(continue continue-point :offset-assert 220)
|
||||
(distance meters :offset-assert 224)
|
||||
(anim-speed float :offset-assert 228)
|
||||
(test-time time-frame :offset-assert 232)
|
||||
(center vector :inline :offset-assert 240)
|
||||
)
|
||||
:method-count-assert 26
|
||||
:size-assert #x100
|
||||
:flag-assert #x1a00800100
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(use (continue-point) _type_ :state 21)
|
||||
(hidden () _type_ :state 22)
|
||||
(warp-gate-method-23 (_type_) none 23)
|
||||
(warp-gate-method-24 () none 24)
|
||||
(warp-gate-method-25 (_type_) continue-point 25)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype air-train (warp-gate)
|
||||
"NOTE - I guess this is why sometimes the air-train makes the warp-gate sound"
|
||||
(
|
||||
(part-exhaust-left sparticle-launch-control :offset-assert 256)
|
||||
(part-exhaust-right sparticle-launch-control :offset-assert 260)
|
||||
(part-dust sparticle-launch-control :offset-assert 264)
|
||||
(dust-y float :offset-assert 268)
|
||||
(hover-sound sound-id :offset-assert 272)
|
||||
(base-pos vector :inline :offset-assert 288)
|
||||
)
|
||||
:method-count-assert 26
|
||||
:size-assert #x130
|
||||
:flag-assert #x1a00b00130
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *kernel-packages* object) ;; pair
|
||||
;; (define-extern warp-gate-init function)
|
||||
;; (define-extern *warp-jump-mods* surface) ;; surface
|
||||
;; (define-extern target-warp-out state) ;; (state vector vector target)
|
||||
;; (define-extern target-warp-in state) ;; (state vector vector target)
|
||||
(define-extern warp-gate-init (function entity-actor vector none :behavior warp-gate))
|
||||
(define-extern *warp-jump-mods* surface) ;; surface
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; guard-projectile ;;
|
||||
@@ -33980,14 +34010,13 @@
|
||||
;; battle ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype battle-info (basic)
|
||||
((id int8 :offset-assert 4)
|
||||
(notice-spec uint64 :offset-assert 8)
|
||||
(pick-logic int8 :offset-assert 16)
|
||||
(notice-distance float :offset-assert 20)
|
||||
(dont-spawn-initial-until-notice? basic :offset-assert 24)
|
||||
(play-battle-music basic :offset-assert 28)
|
||||
(dont-spawn-initial-until-notice? symbol :offset-assert 24)
|
||||
(play-battle-music symbol :offset-assert 28)
|
||||
(min-battle-spawn-delay uint32 :offset-assert 32)
|
||||
(max-battle-spawn-delay uint32 :offset-assert 36)
|
||||
(min-spawner-notice-attack-delay uint32 :offset-assert 40)
|
||||
@@ -34003,65 +34032,49 @@
|
||||
:size-assert #x48
|
||||
:flag-assert #x900000048
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle-ally (structure)
|
||||
((entity basic :offset-assert 0)
|
||||
((entity entity-actor :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle-ally-array (inline-array-class)
|
||||
((length int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
(data UNKNOWN :dynamic :offset-assert 16)
|
||||
)
|
||||
((data battle-ally :dynamic :inline :offset-assert 16))
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle-breed (structure)
|
||||
((breed-type basic :offset-assert 0)
|
||||
((breed-type type :offset-assert 0)
|
||||
(percent float :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle-breed-array (inline-array-class)
|
||||
((length int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
(data UNKNOWN :dynamic :offset-assert 16)
|
||||
)
|
||||
((data battle-breed :dynamic :inline :offset-assert 16))
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle-spawner (structure)
|
||||
((flags uint64 :offset-assert 0)
|
||||
(entity basic :offset-assert 8)
|
||||
(breeds basic :offset-assert 12)
|
||||
(entity entity-actor :offset-assert 8)
|
||||
(breeds battle-breed-array :offset-assert 12)
|
||||
(creature-index int8 :offset-assert 16)
|
||||
(ready-index int8 :offset-assert 17)
|
||||
(attack-index int8 :offset-assert 18)
|
||||
(mode uint8 :offset-assert 19)
|
||||
(intro-path basic :offset-assert 20)
|
||||
(intro-path path-control :offset-assert 20) ;; a guess
|
||||
(notice-attack-delay uint32 :offset-assert 24)
|
||||
(creature uint64 :offset-assert 32)
|
||||
(creature handle :offset-assert 32)
|
||||
(last-spawn-time time-frame :offset-assert 40)
|
||||
(noticed-attack-time time-frame :offset-assert 48)
|
||||
(attack-pos vector :inline :offset-assert 64)
|
||||
@@ -34070,37 +34083,30 @@
|
||||
:size-assert #x50
|
||||
:flag-assert #x900000050
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle-spawner-array (inline-array-class)
|
||||
((length int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
(data UNKNOWN :dynamic :offset-assert 16)
|
||||
)
|
||||
((data battle-spawner :dynamic :inline :offset-assert 16))
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype battle (process-drawable)
|
||||
((info basic :offset-assert 196)
|
||||
(flags uint8 :offset-assert 200)
|
||||
(spawn-initial-creatures? basic :offset-assert 204)
|
||||
(next-spawn-delay uint32 :offset-assert 208)
|
||||
(on-notice basic :offset-assert 212)
|
||||
(on-hostile basic :offset-assert 216)
|
||||
(on-beaten basic :offset-assert 220)
|
||||
(max-count uint32 :offset-assert 224)
|
||||
(count uint32 :offset-assert 228)
|
||||
(die-count uint32 :offset-assert 232)
|
||||
(stat-child-count uint16 :offset-assert 236)
|
||||
(cant-spawn-time time-frame :offset-assert 244)
|
||||
(jammed-starting-time time-frame :offset-assert 252)
|
||||
(spawners basic :offset-assert 260)
|
||||
(allies basic :offset-assert 264)
|
||||
((info battle-info :offset-assert 200)
|
||||
(flags uint8 :offset-assert 204)
|
||||
(spawn-initial-creatures? symbol :offset-assert 208)
|
||||
(next-spawn-delay uint32 :offset-assert 212)
|
||||
(on-notice basic :offset-assert 216)
|
||||
(on-hostile basic :offset-assert 220)
|
||||
(on-beaten basic :offset-assert 224)
|
||||
(max-count uint32 :offset-assert 228)
|
||||
(count uint32 :offset-assert 232)
|
||||
(die-count uint32 :offset-assert 236)
|
||||
(stat-child-count uint16 :offset-assert 240)
|
||||
(cant-spawn-time time-frame :offset-assert 248)
|
||||
(jammed-starting-time time-frame :offset-assert 256)
|
||||
(spawners battle-spawner-array :offset-assert 264)
|
||||
(allies battle-ally-array :offset-assert 268)
|
||||
)
|
||||
:method-count-assert 53
|
||||
:size-assert #x110
|
||||
@@ -34112,40 +34118,39 @@
|
||||
(notice () _type_ :state 22)
|
||||
(hostile () _type_ :state 23)
|
||||
(beaten () _type_ :state 24)
|
||||
(battle-method-25 () none 25)
|
||||
(battle-method-26 () none 26)
|
||||
(battle-method-27 () none 27)
|
||||
(battle-method-28 () none 28)
|
||||
(battle-method-29 () none 29)
|
||||
(battle-method-30 () none 30)
|
||||
(battle-method-31 () none 31)
|
||||
(battle-method-32 () none 32)
|
||||
(battle-method-33 () none 33)
|
||||
(battle-method-34 () none 34)
|
||||
(battle-method-35 () none 35)
|
||||
(battle-method-36 () none 36)
|
||||
(battle-method-37 () none 37)
|
||||
(battle-method-38 () none 38)
|
||||
(battle-method-39 () none 39)
|
||||
(battle-method-40 () none 40)
|
||||
(battle-method-41 () none 41)
|
||||
(battle-method-42 () none 42)
|
||||
(battle-method-43 () none 43)
|
||||
(battle-method-44 () none 44)
|
||||
(battle-method-45 () none 45)
|
||||
(battle-method-46 () none 46)
|
||||
(battle-method-47 () none 47)
|
||||
(battle-method-48 () none 48)
|
||||
(battle-method-49 () none 49)
|
||||
(battle-method-50 () none 50)
|
||||
(battle-method-51 () none 51)
|
||||
(battle-method-52 () none 52)
|
||||
(battle-method-25 (_type_ battle-spawner) symbol 25)
|
||||
(battle-method-26 (_type_ battle-spawner) symbol 26)
|
||||
(battle-method-27 (_type_) none 27)
|
||||
(battle-method-28 (_type_) none 28)
|
||||
(battle-method-29 (_type_ battle-spawner entity-actor) none 29)
|
||||
(battle-method-30 (_type_ process) battle-spawner 30)
|
||||
(battle-method-31 (_type_ battle-ally entity-actor) none 31)
|
||||
(battle-method-32 (_type_ battle-spawner entity-actor) object 32) ;; TODO - gross return value...
|
||||
(battle-method-33 (_type_) none 33)
|
||||
(battle-method-34 (_type_) none 34)
|
||||
(battle-method-35 (_type_) none 35)
|
||||
(battle-method-36 (_type_) battle-spawner 36)
|
||||
(battle-method-37 (_type_ battle-spawner) symbol 37)
|
||||
(battle-method-38 (_type_ battle-breed transformq) handle 38)
|
||||
(battle-method-39 (_type_ battle-spawner symbol) handle 39)
|
||||
(battle-method-40 (_type_) none 40)
|
||||
(battle-method-41 (_type_ battle-spawner) battle-breed 41)
|
||||
(battle-method-42 (_type_ battle-spawner touch-tracker) symbol 42) ;; fma-sphere or touch-tracker?
|
||||
(battle-method-43 (_type_ battle-spawner touch-tracker) symbol 43) ;; fma-sphere or touch-tracker?
|
||||
(battle-method-44 (_type_ battle-spawner) none 44)
|
||||
(battle-method-45 (_type_ battle-spawner touch-tracker) symbol 45) ;; fma-sphere or touch-tracker?
|
||||
(battle-method-46 (_type_ battle-spawner) symbol 46)
|
||||
(battle-method-47 (_type_) none 47)
|
||||
(battle-method-48 (_type_) none 48)
|
||||
(battle-method-49 (_type_) int :behavior battle 49)
|
||||
(battle-method-50 (_type_) symbol 50)
|
||||
(battle-method-51 (_type_ battle-spawner symbol) symbol :behavior battle 51)
|
||||
(battle-method-52 (_type_) int 52)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *battles* array)
|
||||
;; (define-extern battle-event-handler function)
|
||||
(define-extern *battles* (array battle-info))
|
||||
(define-extern battle-event-handler (function process int symbol event-message-block object :behavior battle)) ;; TODO - none required else state handling fails expression pass
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; elec-gate ;;
|
||||
@@ -44294,7 +44299,6 @@
|
||||
;; (define-extern target-indax-exit function)
|
||||
;; (define-extern target-indax-real-post function)
|
||||
;; (define-extern target-indax-post function)
|
||||
;; (define-extern target-indax-start state)
|
||||
;; (define-extern target-indax-stance state)
|
||||
;; (define-extern target-indax-walk state)
|
||||
;; (define-extern target-indax-falling state)
|
||||
@@ -48756,7 +48760,7 @@
|
||||
;; (define-extern *sig-recorder* object)
|
||||
;; (define-extern *sigrec-out* object)
|
||||
;; (define-extern sig-recorder-init-by-other function)
|
||||
;; (define-extern start-sig-recorder function)
|
||||
(define-extern start-sig-recorder (function none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ctyport-part ;;
|
||||
|
||||
@@ -433,5 +433,23 @@
|
||||
[92, "(function object nav-control none)"],
|
||||
[93, "(function object nav-control none)"]
|
||||
],
|
||||
"scene-actor": [[10, "(function process-taskable process)"]]
|
||||
"scene-actor": [[10, "(function process-taskable process)"]],
|
||||
"scene": [[4, "(function symbol :behavior scene-player)"]],
|
||||
"sidekick": [
|
||||
[5, "(function object vector object string :behavior sidekick)"]
|
||||
],
|
||||
"target-death": [
|
||||
[1, "(function symbol :behavior target)"],
|
||||
[2, "(function symbol :behavior target)"],
|
||||
[3, "(function none :behavior target)"],
|
||||
[8, "(function none)"],
|
||||
[12, "(function process entity-perm-status)"],
|
||||
[23, "(function surface object object int float :behavior target)"],
|
||||
[24, "(function surface object object int float :behavior target)"],
|
||||
[26, "(function continue-point target)"]
|
||||
],
|
||||
"warp-gate": [
|
||||
[8, "(function string none)"],
|
||||
[12, "(function none :behavior target)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -219,7 +219,10 @@
|
||||
"(post play-anim scene-player)",
|
||||
"(method 25 scene-player)",
|
||||
"(method 25 scene-player)",
|
||||
"scene-player-init"
|
||||
"scene-player-init",
|
||||
"next-continue",
|
||||
"(method 25 warp-gate)",
|
||||
"(code use warp-gate)"
|
||||
],
|
||||
|
||||
// If format is used with the wrong number of arguments,
|
||||
@@ -280,7 +283,6 @@
|
||||
|
||||
"(method 12 perf-stat)": [0],
|
||||
"(method 11 perf-stat)": [0],
|
||||
"(method 22 gui-control)": [117, 121, 127, 128, 129, 139],
|
||||
"bsp-camera-asm": [1, 2, 3, 4, 6, 7],
|
||||
"(method 9 texture-page-dir)": [5, 6],
|
||||
"level-remap-texture": [2, 3, 4, 5, 6],
|
||||
@@ -343,7 +345,6 @@
|
||||
"(method 11 sparticle-launch-control)": [
|
||||
18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95
|
||||
],
|
||||
|
||||
"(method 22 gui-control)": [
|
||||
10, // goto L63 (B39)
|
||||
16, // goto L58 (B27)
|
||||
@@ -361,10 +362,9 @@
|
||||
117, // goto L91
|
||||
120
|
||||
],
|
||||
|
||||
"(anon-function 11 game-save)": [0, 3, 4, 5],
|
||||
|
||||
"update-actor-hash": [0, 2, 4]
|
||||
"update-actor-hash": [0, 2, 4],
|
||||
"(code target-death)": [111, 140]
|
||||
},
|
||||
|
||||
// Sometimes the game might use format strings that are fetched dynamically,
|
||||
|
||||
@@ -466,5 +466,24 @@
|
||||
["L132", "vector"],
|
||||
["L131", "vector"],
|
||||
["L130", "vector"]
|
||||
],
|
||||
"sidekick": [["L71", "vector"]],
|
||||
"target-death": [
|
||||
["L441", "uint64", true],
|
||||
["L445", "uint64", true],
|
||||
["L447", "uint64", true],
|
||||
["L446", "uint64", true],
|
||||
["L440", "uint64", true],
|
||||
["L449", "uint64", true],
|
||||
["L459", "uint64", true],
|
||||
["L436", "vector"]
|
||||
],
|
||||
"warp-gate": [
|
||||
["L815", "vector"],
|
||||
["L1249", "uint64", true],
|
||||
["L1250", "uint64", true],
|
||||
["L1158", "vector"],
|
||||
["L1222", "uint64", true],
|
||||
["L1223", "uint64", true]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1097,5 +1097,10 @@
|
||||
"(method 150 nav-enemy)": [[16, "vector"]],
|
||||
"(anon-function 88 nav-enemy)": [[16, "vector"]],
|
||||
"(anon-function 93 nav-enemy)": [[16, "vector"]],
|
||||
"(method 54 rigid-body-platform)": [[16, "vector"]]
|
||||
"(method 54 rigid-body-platform)": [[16, "vector"]],
|
||||
"target-carry-update": [[560, ["inline-array", "sphere", 1]]],
|
||||
"(code target-carry-drop)": [[672, ["inline-array", "sphere", 1]]],
|
||||
"(code target-carry-throw)": [[640, ["inline-array", "sphere", 1]]],
|
||||
"(code target-hit)": [[16, "vector"]],
|
||||
"(method 39 battle)": [[64, "transformq"]]
|
||||
}
|
||||
|
||||
@@ -3485,7 +3485,7 @@
|
||||
[30, "v1", "collide-shape-moving"]
|
||||
],
|
||||
"(post fall crate)": [
|
||||
[4, "a0", "collide-shape-moving"],
|
||||
[[4, 10], "a0", "collide-shape-moving"],
|
||||
[15, "v1", "collide-shape-moving"],
|
||||
[26, "v1", "collide-shape-moving"],
|
||||
[[34, 53], "gp", "collide-shape-moving"]
|
||||
@@ -3500,7 +3500,7 @@
|
||||
[37, "a0", "collide-shape-moving"]
|
||||
],
|
||||
"(enter fall crate)": [
|
||||
[35, "v0", "carry-info"],
|
||||
[[35, 40], "a0", "carry-info"],
|
||||
[42, "v1", "collide-shape-moving"],
|
||||
[46, "v1", "collide-shape-moving"],
|
||||
[50, "a0", "collide-shape-moving"],
|
||||
@@ -3987,5 +3987,66 @@
|
||||
"(method 25 remote)": [[[8, 12], "a0", "collide-shape"]],
|
||||
"(method 25 judge)": [[[8, 12], "a0", "collide-shape"]],
|
||||
"(event wait judge)": [[63, "gp", "process-focusable"]],
|
||||
"(code idle judge)": [[39, "v0", "float"]]
|
||||
"(code idle judge)": [[39, "v0", "float"]],
|
||||
"(post sidekick-clone)": [[[474, 513], "gp", "(pointer process-drawable)"]],
|
||||
"(code target-carry-pickup)": [
|
||||
[79, "v0", "carry-info"],
|
||||
[290, "v0", "carry-info"]
|
||||
],
|
||||
"(code target-carry-drop)": [
|
||||
[24, "v0", "carry-info"],
|
||||
[92, "v1", "art-joint-anim"],
|
||||
[158, "v0", "carry-info"],
|
||||
[273, "v0", "carry-info"]
|
||||
],
|
||||
"(code target-carry-throw)": [
|
||||
[51, "v0", "carry-info"],
|
||||
[112, "v0", "carry-info"],
|
||||
[194, "v0", "carry-info"]
|
||||
],
|
||||
"next-continue": [
|
||||
[4, "a2", "symbol"],
|
||||
[5, "a2", "level-load-info"],
|
||||
[12, "a3", "continue-point"]
|
||||
],
|
||||
"(code target-continue)": [[643, "s5", "handle"]],
|
||||
"(code target-warp-in)": [[336, "v1", "art-joint-anim"]],
|
||||
"target-hit-effect": [[39, "t4", "vector"]],
|
||||
"target-hit-setup-anim": [
|
||||
[153, "v1", "art-joint-anim"],
|
||||
[225, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-hit)": [[576, "v1", "art-joint-anim"]],
|
||||
"(anon-function 12 target-death)": [[[12, 19], "gp", "process-drawable"]],
|
||||
"target-death-reset": [[21, "v1", "connection"]],
|
||||
"(anon-function 3 target-death)": [[259, "v1", "art-joint-anim"]],
|
||||
"(anon-function 2 target-death)": [
|
||||
[58, "v1", "art-joint-anim"],
|
||||
[197, "v1", "art-joint-anim"],
|
||||
[141, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(anon-function 1 target-death)": [[73, "v1", "art-joint-anim"]],
|
||||
"(event target-continue)": [[18, "a0", "process"]],
|
||||
"(method 30 battle)": [
|
||||
[7, "s5", "nav-enemy"],
|
||||
[32, "a2", "nav-enemy"]
|
||||
],
|
||||
"(method 7 battle)": [
|
||||
[15, "t9", "(function process-drawable int process-drawable)"]
|
||||
],
|
||||
"(method 51 battle)": [[[38, 95], "s4", "touch-tracker"]],
|
||||
"(method 26 battle)": [
|
||||
[35, "a0", "connection"],
|
||||
[36, "a0", "collide-shape"],
|
||||
[84, "a0", "connection"],
|
||||
[85, "a0", "collide-shape"]
|
||||
],
|
||||
"(method 28 battle)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
[[21, 31], "s5", "(pointer entity-actor)"]
|
||||
],
|
||||
"(method 29 battle)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
["_stack_", 32, "res-tag"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
// if you want to filter to only some object names.
|
||||
// it will make the decompiler much faster.
|
||||
"allowed_objects": ["nav-enemy"],
|
||||
"allowed_objects": [],
|
||||
"banned_objects": ["effect-control", "ctywide-scenes", "texture-anim-tables", "traffic-engine"],
|
||||
|
||||
////////////////////////////
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
(define-extern get-penetrate-using-from-attack-event (function process-drawable event-message-block penetrate))
|
||||
|
||||
;; NOTE - for battle
|
||||
(declare-type enemy process-focusable)
|
||||
(define-extern enemy-init-by-other (function process-drawable transformq none :behavior enemy))
|
||||
|
||||
;; +++enemy-flag
|
||||
(defenum enemy-flag
|
||||
:type int64
|
||||
@@ -83,8 +87,6 @@
|
||||
)
|
||||
;; ---knocked-type
|
||||
|
||||
(declare-type enemy process-focusable)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype enemy-focus (focus)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun matrix-world->local ()
|
||||
(defun matrix-world->local ((arg0 symbol) (arg1 object))
|
||||
"Returns [[*math-camera*]]'s `camera-rot`"
|
||||
(-> *math-camera* camera-rot)
|
||||
)
|
||||
@@ -83,6 +83,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior camera-teleport-to-entity process ((arg0 entity-actor))
|
||||
(let ((gp-0 (new 'stack 'transformq)))
|
||||
(set! (-> gp-0 trans quad) (-> arg0 extra trans quad))
|
||||
@@ -92,7 +93,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
(unknown-dword02 int64 :offset 4416)
|
||||
(unknown-vector16 vector :inline :offset 4432)
|
||||
(unknown-float14 float :offset 4448)
|
||||
(unknown-floatiujh1bnb2n3i1 float :offset 4452)
|
||||
(unknown-float15 float :offset 4456)
|
||||
(unknown-word01 int32 :offset 4460)
|
||||
(unknown-vector17 vector :inline :offset 4464)
|
||||
@@ -118,8 +119,7 @@
|
||||
(unknown-vector29 vector :inline :offset 5168)
|
||||
(unknown-vector30 vector :inline :offset 5184)
|
||||
(unknown-vector31 vector :inline :offset 5200)
|
||||
(unknown-vector32 vector :inline :offset 5216)
|
||||
(unknown-vector33 vector :inline :offset 5232)
|
||||
(unknown-cspacei1un23i1 cspace :inline :offset 5216)
|
||||
(unknown-symbol00 symbol :offset 5248)
|
||||
(unknown-float000 float :offset 5252)
|
||||
(unknown-float31 float :offset 5256)
|
||||
|
||||
@@ -631,7 +631,7 @@
|
||||
(vector+! (-> self draw origin) (-> self root-override2 trans) (-> self draw bounds))
|
||||
(set! (-> self draw origin w) (-> self draw bounds w))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(let ((v1-9 (-> self root-override2 root-prim)))
|
||||
(let ((v1-9 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
|
||||
(set! (-> v1-9 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-9 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
@@ -650,9 +650,13 @@
|
||||
(suspend)
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(let ((v1-29 (-> self root-override2 root-prim)))
|
||||
(set! (-> v1-29 prim-core collide-as) (-> self root-override2 backup-collide-as))
|
||||
(set! (-> v1-29 prim-core collide-with) (-> self root-override2 backup-collide-with))
|
||||
(let ((v1-29 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
|
||||
(set! (-> v1-29 prim-core collide-as)
|
||||
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-as)
|
||||
)
|
||||
(set! (-> v1-29 prim-core collide-with)
|
||||
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-with)
|
||||
)
|
||||
)
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
@@ -664,7 +668,7 @@
|
||||
:event crate-standard-event-handler
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(collide-shape-method-46 (-> self root-override2))
|
||||
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(logior! (-> self mask) (process-mask sleep))
|
||||
(until #f
|
||||
@@ -694,7 +698,7 @@
|
||||
(ja-post)
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(carry-info-method-13 (-> self carry))
|
||||
(collide-shape-method-46 (-> self root-override2))
|
||||
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -731,16 +735,22 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (and (logtest? (-> self root-override2 status) (cshape-moving-flags on-surface))
|
||||
(< 0.8 (-> self root-override2 surface-angle))
|
||||
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root-override2)) status) (cshape-moving-flags on-surface))
|
||||
(< 0.8 (-> (the-as collide-shape-moving (-> self root-override2)) surface-angle))
|
||||
)
|
||||
(vector-reset! (-> self root-override2 transv))
|
||||
(when (= (vector-length (-> self root-override2 transv)) 0.0)
|
||||
(set! (-> self root-override2 root-prim local-sphere w) (-> self carry backup-radius))
|
||||
(set! (-> (the-as collide-shape-moving (-> self root-override2)) root-prim local-sphere w)
|
||||
(-> self carry backup-radius)
|
||||
)
|
||||
(set! (-> self base quad) (-> self root-override2 trans quad))
|
||||
(let ((v1-16 (-> self root-override2 root-prim)))
|
||||
(set! (-> v1-16 prim-core collide-as) (-> self root-override2 backup-collide-as))
|
||||
(set! (-> v1-16 prim-core collide-with) (-> self root-override2 backup-collide-with))
|
||||
(let ((v1-16 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
|
||||
(set! (-> v1-16 prim-core collide-as)
|
||||
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-as)
|
||||
)
|
||||
(set! (-> v1-16 prim-core collide-with)
|
||||
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-with)
|
||||
)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
@@ -751,10 +761,15 @@
|
||||
:post (behavior ()
|
||||
(vector-v++!
|
||||
(-> self root-override2 transv)
|
||||
(compute-acc-due-to-gravity (-> self root-override2) (new-stack-vector0) 0.0)
|
||||
(compute-acc-due-to-gravity (the-as collide-shape-moving (-> self root-override2)) (new-stack-vector0) 0.0)
|
||||
)
|
||||
(if (< (-> self root-override2 dynam gravity-max) (vector-length (-> self root-override2 transv)))
|
||||
(vector-normalize! (-> self root-override2 transv) (-> self root-override2 dynam gravity-max))
|
||||
(if (< (-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
|
||||
(vector-length (-> self root-override2 transv))
|
||||
)
|
||||
(vector-normalize!
|
||||
(-> self root-override2 transv)
|
||||
(-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (-> self root-override2)))
|
||||
(let ((a2-1 (new 'stack-no-clear 'collide-query)))
|
||||
@@ -814,13 +829,13 @@
|
||||
)
|
||||
(when v1-3
|
||||
(let* ((gp-1 (-> (the-as process-drawable v1-3) root))
|
||||
(v1-4 (if (type? gp-1 collide-shape)
|
||||
(v1-4 (if (type? (the-as collide-shape-moving gp-1) collide-shape)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-4
|
||||
(let* ((gp-2 (-> self root-override2 root-prim prim-core))
|
||||
(let* ((gp-2 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim prim-core))
|
||||
(a1-3 (-> (the-as collide-shape-moving v1-4) root-prim prim-core))
|
||||
(f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3)))
|
||||
)
|
||||
@@ -1142,7 +1157,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (-> self root-override2 root-prim)))
|
||||
(let ((v1-20 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
|
||||
(set! (-> v1-20 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-20 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
@@ -1284,7 +1299,7 @@
|
||||
"Initialize the [[crate]]'s skeleton and other parameters based on the crate type."
|
||||
(case (-> obj look)
|
||||
(('iron)
|
||||
(set! (-> obj root-override2 penetrated-by)
|
||||
(set! (-> (the-as collide-shape-moving (-> obj root-override2)) penetrated-by)
|
||||
(penetrate flop uppercut tube vehicle flut-attack board dark-skin explode)
|
||||
)
|
||||
(initialize-skeleton
|
||||
@@ -1294,7 +1309,9 @@
|
||||
)
|
||||
)
|
||||
(('steel)
|
||||
(set! (-> obj root-override2 penetrated-by) (penetrate tube vehicle flut-attack board dark-skin explode))
|
||||
(set! (-> (the-as collide-shape-moving (-> obj root-override2)) penetrated-by)
|
||||
(penetrate tube vehicle flut-attack board dark-skin explode)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-crate-krimson" (the-as (pointer uint32) #f)))
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
(draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel))
|
||||
(let ((a0-22 (-> self skel effect)))
|
||||
(if a0-22
|
||||
((method-of-object a0-22 effect-control-method-9))
|
||||
(effect-control-method-9 a0-22)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self skel status) (joint-control-status blend-shape blend-shape-valid))
|
||||
@@ -94,4 +94,4 @@
|
||||
(logclear! (-> self skel status) (joint-control-status valid-spooled-frame))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
)
|
||||
)
|
||||
(if *target*
|
||||
(set! (-> *game-info* score) (-> *target* fact-info-override trick-point))
|
||||
(set! (-> *game-info* score) (-> *target* fact-override trick-point))
|
||||
)
|
||||
(let ((v1-15 (the-as int (- (-> obj total-time) (- (-> *display* game-clock frame-counter) (-> obj start-time))))))
|
||||
(if (< (the-as time-frame v1-15) 0)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
:flag-assert #xf00000024
|
||||
(:methods
|
||||
(new (symbol type process-drawable) _type_ 0)
|
||||
(effect-control-method-9 () none 9)
|
||||
(effect-control-method-9 (_type_) none 9)
|
||||
(effect-control-method-10 () none 10)
|
||||
(effect-control-method-11 () none 11)
|
||||
(effect-control-method-12 (_type_ symbol float int basic sound-name) int 12)
|
||||
@@ -68,6 +68,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new effect-control ((allocation symbol) (type-to-make type) (arg0 process-drawable))
|
||||
(cond
|
||||
((res-lump-struct (-> arg0 draw jgeo extra) 'effect-name structure)
|
||||
@@ -88,4 +89,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -197,7 +197,113 @@
|
||||
)
|
||||
|
||||
(defun pickup-type->string ((arg0 pickup-type))
|
||||
(enum->string pickup-type arg0)
|
||||
(case arg0
|
||||
(((pickup-type eco-pill-dark))
|
||||
"eco-pill-dark"
|
||||
)
|
||||
(((pickup-type gun-blue))
|
||||
"gun-blue"
|
||||
)
|
||||
(((pickup-type ammo-random))
|
||||
"ammo-random"
|
||||
)
|
||||
(((pickup-type eco-blue))
|
||||
"eco-blue"
|
||||
)
|
||||
(((pickup-type gun-red))
|
||||
"gun-red"
|
||||
)
|
||||
(((pickup-type pass-red))
|
||||
"pass-red"
|
||||
)
|
||||
(((pickup-type eco-pill-green))
|
||||
"eco-pill-green"
|
||||
)
|
||||
(((pickup-type eco-red))
|
||||
"eco-red"
|
||||
)
|
||||
(((pickup-type skill))
|
||||
"skill"
|
||||
)
|
||||
(((pickup-type karma))
|
||||
"karma"
|
||||
)
|
||||
(((pickup-type gun-dark))
|
||||
"gun-dark"
|
||||
)
|
||||
(((pickup-type eco-dark))
|
||||
"eco-dark"
|
||||
)
|
||||
(((pickup-type gem))
|
||||
"gem"
|
||||
)
|
||||
(((pickup-type eco-green))
|
||||
"eco-green"
|
||||
)
|
||||
(((pickup-type darkjak))
|
||||
"darkjak"
|
||||
)
|
||||
(((pickup-type ammo-yellow))
|
||||
"ammo-yellow"
|
||||
)
|
||||
(((pickup-type pass-blue))
|
||||
"pass-blue"
|
||||
)
|
||||
(((pickup-type ammo-red))
|
||||
"ammo-red"
|
||||
)
|
||||
(((pickup-type fuel-cell))
|
||||
"fuel-cell"
|
||||
)
|
||||
(((pickup-type buzzer))
|
||||
"buzzer"
|
||||
)
|
||||
(((pickup-type shield))
|
||||
"shield"
|
||||
)
|
||||
(((pickup-type eco-pill-random))
|
||||
"eco-pill-random"
|
||||
)
|
||||
(((pickup-type board))
|
||||
"board"
|
||||
)
|
||||
(((pickup-type none))
|
||||
"none"
|
||||
)
|
||||
(((pickup-type pass-green))
|
||||
"pass-green"
|
||||
)
|
||||
(((pickup-type gun-yellow))
|
||||
"gun-yellow"
|
||||
)
|
||||
(((pickup-type money))
|
||||
"money"
|
||||
)
|
||||
(((pickup-type eco-yellow))
|
||||
"eco-yellow"
|
||||
)
|
||||
(((pickup-type ammo-dark))
|
||||
"ammo-dark"
|
||||
)
|
||||
(((pickup-type trick-judge))
|
||||
"trick-judge"
|
||||
)
|
||||
(((pickup-type trick-point))
|
||||
"trick-point"
|
||||
)
|
||||
(((pickup-type ammo-blue))
|
||||
"ammo-blue"
|
||||
)
|
||||
(((pickup-type pass-yellow))
|
||||
"pass-yellow"
|
||||
)
|
||||
(((pickup-type health))
|
||||
"health"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype fact-info (basic)
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
;; name in dgo: game-save
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; NOTE - for default-menu
|
||||
(declare-type auto-save process)
|
||||
(define-extern auto-save-command (function symbol int int process-tree symbol (pointer auto-save)))
|
||||
|
||||
(defenum game-save-elt
|
||||
:type uint16
|
||||
(task-deaths 402)
|
||||
|
||||
@@ -562,14 +562,7 @@
|
||||
|
||||
(defbehavior set-pad target ((arg0 vector))
|
||||
(set! (-> self control unknown-float12) (vector-length arg0))
|
||||
(let ((s5-0 vector-matrix*!)
|
||||
(s4-0 (-> self control unknown-vector12))
|
||||
(s3-0 arg0)
|
||||
(t9-0 matrix-world->local)
|
||||
)
|
||||
#t
|
||||
(s5-0 s4-0 s3-0 (t9-0))
|
||||
)
|
||||
(vector-matrix*! (-> self control unknown-vector12) arg0 (matrix-world->local #t #f))
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -2495,7 +2488,10 @@
|
||||
)
|
||||
(vector-matrix*! (-> self control unknown-vector28) (-> *TARGET-bank* head-offset) a2-5)
|
||||
)
|
||||
(vector<-cspace! (-> self control unknown-vector33) (the-as cspace (-> self control unknown-vector32 x)))
|
||||
(vector<-cspace!
|
||||
(the-as vector (&-> (-> self control) unknown-cspacei1un23i1 bone))
|
||||
(-> self control unknown-cspacei1un23i1 parent)
|
||||
)
|
||||
(let ((gp-0 (new-stack-vector0))
|
||||
(s5-0 (new-stack-vector0))
|
||||
)
|
||||
@@ -3283,7 +3279,7 @@
|
||||
(set! (-> obj control unknown-vector29 x) (the-as float (-> obj node-list data 45)))
|
||||
(set! (-> obj control unknown-vector29 y) (the-as float (-> obj node-list data 55)))
|
||||
(set! (-> obj control unknown-vector29 y) (the-as float (-> obj node-list data 55)))
|
||||
(set! (-> obj control unknown-vector32 x) (the-as float (-> obj node-list data 23)))
|
||||
(set! (-> obj control unknown-cspacei1un23i1 parent) (-> obj node-list data 23))
|
||||
(set! (-> obj neck) (new 'process 'joint-mod (joint-mod-mode look-at) obj 8))
|
||||
(set! (-> obj neck parented-scale?) #t)
|
||||
(set! (-> obj neck base-joint) (the-as uint 6))
|
||||
|
||||
@@ -5,5 +5,510 @@
|
||||
;; name in dgo: sidekick
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(declare-type sidekick process-drawable)
|
||||
(define-extern init-sidekick (function none :behavior sidekick))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defskelgroup skel-sidekick daxter 0 -1
|
||||
((1 (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 3)
|
||||
:longest-edge (meters 1)
|
||||
:shadow 3
|
||||
:texture-level 6
|
||||
:sort 1
|
||||
:origin-joint-index 6
|
||||
:shadow-joint-index 6
|
||||
)
|
||||
|
||||
(defskelgroup skel-sidekick-highres daxter-highres 0 -1
|
||||
((1 (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 3)
|
||||
:longest-edge (meters 1)
|
||||
:shadow 2
|
||||
:sort 1
|
||||
:origin-joint-index 6
|
||||
:shadow-joint-index 6
|
||||
)
|
||||
|
||||
(define *sidekick-remap*
|
||||
'(("run-to-stance-left" "run-to-stance")
|
||||
("run-to-stance-loop-left" "run-to-stance-loop")
|
||||
("stance-loop-left" "stance-loop")
|
||||
("run-to-stance-right" "run-to-stance")
|
||||
("run-to-stance-loop-right" "run-to-stance-loop")
|
||||
("stance-loop-right" "stance-loop")
|
||||
("run-to-stance-up" "run-to-stance")
|
||||
("run-to-stance-loop-up" "run-to-stance-loop")
|
||||
("stance-loop-up" "stance-loop")
|
||||
("run-to-stance-down" "run-to-stance")
|
||||
("run-to-stance-loop-down" "run-to-stance-loop")
|
||||
("stance-loop-down" "stance-loop")
|
||||
("run-right" "run")
|
||||
("run-left" "run")
|
||||
("walk-right" "walk")
|
||||
("walk-left" "walk")
|
||||
("gun-hit-elec" "hit-elec")
|
||||
("gun-attack-from-stance-end"
|
||||
"gun-attack-from-stance-end"
|
||||
"gun-attack-from-stance-end"
|
||||
"gun-attack-from-stance-end"
|
||||
"gun-attack-from-stance-end-alt1"
|
||||
)
|
||||
("gun-attack-butt-end"
|
||||
"gun-attack-butt-end"
|
||||
"gun-attack-butt-end"
|
||||
"gun-attack-butt-end"
|
||||
"gun-attack-butt-end"
|
||||
"gun-attack-butt-end-alt1"
|
||||
)
|
||||
("pole-cycle" "pole-cycle" "pole-cycle2")
|
||||
("hit-from-front-alt1" "hit-from-front")
|
||||
("board-jump"
|
||||
,(lambda :behavior sidekick
|
||||
((arg0 object) (arg1 vector) (arg2 object))
|
||||
(let* ((v1-0 (-> self parent-override))
|
||||
(gp-0 (if v1-0
|
||||
(-> v1-0 0 self-override)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (>= (- (-> self clock frame-counter) (-> self special-anim-time)) (seconds 1))
|
||||
(set! (-> self special-anim-interp) 0.0)
|
||||
(set! (-> self special-anim-frame) 0.0)
|
||||
)
|
||||
(cond
|
||||
((or (and (= (-> gp-0 control unknown-surface00 name) 'spin) (!= (-> gp-0 board trotyv) 0.0))
|
||||
(!= (-> self special-anim-interp) 0.0)
|
||||
)
|
||||
(case arg2
|
||||
((1)
|
||||
(set! (-> self special-anim-time) (-> self clock frame-counter))
|
||||
(cond
|
||||
((= (-> gp-0 control unknown-surface00 name) 'spin)
|
||||
(set! (-> arg1 z)
|
||||
(* (lerp-scale 0.0 5.0 (fabs (-> gp-0 board trotyv)) 0.0 182044.44) (-> self special-anim-interp))
|
||||
)
|
||||
(set! (-> self special-anim-frame) (-> arg1 z))
|
||||
(seek! (-> self special-anim-interp) 1.0 (* 8.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(else
|
||||
(seek! (-> self special-anim-interp) 0.0 (* 4.0 (-> self clock seconds-per-frame)))
|
||||
(set! (-> arg1 z) (* (-> self special-anim-frame) (-> self special-anim-interp)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (>= (-> gp-0 board trotyv) 0.0)
|
||||
"board-spin-ccw"
|
||||
"board-spin-cw"
|
||||
)
|
||||
)
|
||||
(else
|
||||
"board-jump"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun cspace<-cspace+transformq! ((arg0 cspace) (arg1 cspace) (arg2 transformq))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s4-0 (-> arg0 bone transform)))
|
||||
(quaternion->matrix s4-0 (-> arg2 quat))
|
||||
(.lvf vf1 (&-> (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) quad))
|
||||
(.lvf vf2 (&-> (-> arg1 bone) transform trans quad))
|
||||
(.lvf vf6 (&-> arg2 trans quad))
|
||||
(.lvf vf3 (&-> s4-0 vector 0 quad))
|
||||
(.lvf vf4 (&-> s4-0 vector 1 quad))
|
||||
(.lvf vf5 (&-> s4-0 vector 2 quad))
|
||||
(.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11)
|
||||
(.wait.vf)
|
||||
(.mul.vf vf2 vf2 Q :mask #b111)
|
||||
(.mov.vf vf2 vf0 :mask #b1000)
|
||||
(.mul.x.vf vf3 vf3 vf1)
|
||||
(.mul.y.vf vf4 vf4 vf1)
|
||||
(.mul.z.vf vf5 vf5 vf1)
|
||||
(.mul.x.vf acc vf3 vf6)
|
||||
(.add.mul.y.vf acc vf4 vf6 acc)
|
||||
(.add.mul.z.vf acc vf5 vf6 acc)
|
||||
(.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111)
|
||||
(.svf (&-> s4-0 trans quad) vf2)
|
||||
(.svf (&-> s4-0 vector 0 quad) vf3)
|
||||
(.svf (&-> s4-0 vector 1 quad) vf4)
|
||||
(.svf (&-> s4-0 vector 2 quad) vf5)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior target-sidekick-setup target ((arg0 symbol))
|
||||
(if (zero? (-> self sidekick))
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
|
||||
)
|
||||
(cond
|
||||
(arg0
|
||||
(if (not (-> self sidekick))
|
||||
(set! (-> self sidekick) (process-spawn sidekick :init init-sidekick :from *16k-dead-pool* :to self))
|
||||
)
|
||||
)
|
||||
((-> self sidekick)
|
||||
(deactivate (-> self sidekick 0))
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate sidekick-clone (sidekick)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case event-type
|
||||
(('matrix)
|
||||
(case (-> event param 0)
|
||||
(('play-anim)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
|
||||
(the-as basic (-> self parent-override 0 node-list data))
|
||||
)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) (the-as basic (-> self offset)))
|
||||
)
|
||||
(('copy-parent)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace!)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
|
||||
(the-as basic (-> self parent-override 0 node-list data))
|
||||
)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) #f)
|
||||
)
|
||||
(('root)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
|
||||
(the-as basic (-> self parent-override 0 node-list data))
|
||||
)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) #f)
|
||||
)
|
||||
(('indax)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-transformq+trans!)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
|
||||
(the-as basic (-> self parent-override 0 control trans))
|
||||
)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2)
|
||||
(the-as basic (-> self parent-override 0 control unknown-vector05))
|
||||
)
|
||||
)
|
||||
(('board)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
|
||||
(the-as basic (-> self parent-override 0 node-list data 25))
|
||||
)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) #f)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
|
||||
(the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent))
|
||||
)
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) (the-as basic (-> self offset)))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(('shadow)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self shadow-in-movie?) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('blend-shape)
|
||||
(cond
|
||||
((-> event param 0)
|
||||
(set! v0-0 (logior (-> self skel status) (joint-control-status blend-shape)))
|
||||
(set! (-> self skel status) (the-as joint-control-status v0-0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (logclear (-> self skel status) (joint-control-status blend-shape)))
|
||||
(set! (-> self skel status) (the-as joint-control-status v0-0))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (the-as (function none :behavior sidekick) looping-code)
|
||||
:post (behavior ()
|
||||
(let ((v1-0 (-> self parent-override)))
|
||||
(when (not (and (-> (if v1-0
|
||||
(-> v1-0 0 self-override)
|
||||
)
|
||||
next-state
|
||||
)
|
||||
(let ((v1-4 (-> self parent-override)))
|
||||
(= (-> (if v1-4
|
||||
(-> v1-4 0 self-override)
|
||||
)
|
||||
next-state
|
||||
name
|
||||
)
|
||||
'process-drawable-art-error
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(quaternion-rotate-y!
|
||||
(-> self root quat)
|
||||
(-> self parent-override 0 control quat)
|
||||
(-> self parent-override 0 upper-body twist z)
|
||||
)
|
||||
(set! (-> self anim-seed) (-> self parent-override 0 anim-seed))
|
||||
(set! (-> self draw status) (-> self parent-override 0 draw status))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw-bounds2))
|
||||
(let ((gp-0 0))
|
||||
(cond
|
||||
((and (not (logtest? (-> self parent-override 0 focus-status) (focus-status edge-grab)))
|
||||
(> (-> self parent-override 0 skel float-channels) 0)
|
||||
)
|
||||
(let ((gp-1 (-> self skel)))
|
||||
(joint-control-copy! gp-1 (-> self parent-override 0 skel))
|
||||
(set! (-> gp-1 root-channel)
|
||||
(the-as (inline-array joint-control-channel) (-> gp-1 channel (-> gp-1 active-channels)))
|
||||
)
|
||||
(dotimes (s5-0 (the-as int (-> self parent-override 0 skel float-channels)))
|
||||
(let ((s4-0 (-> gp-1 channel (+ s5-0 (-> gp-1 active-channels)))))
|
||||
(mem-copy!
|
||||
(the-as pointer s4-0)
|
||||
(the-as
|
||||
pointer
|
||||
(-> self parent-override 0 skel channel (+ s5-0 (-> self parent-override 0 skel active-channels)))
|
||||
)
|
||||
64
|
||||
)
|
||||
(set! (-> s4-0 frame-interp 0) (-> s4-0 frame-interp 1))
|
||||
(set! (-> s4-0 command) (joint-control-command blend))
|
||||
)
|
||||
)
|
||||
(dotimes (v1-58 (the-as int (-> gp-1 allocated-length)))
|
||||
(set! (-> gp-1 channel v1-58 parent) gp-1)
|
||||
)
|
||||
(+! (-> gp-1 active-channels) (-> self parent-override 0 skel float-channels))
|
||||
(set! (-> gp-1 float-channels) (the-as uint 0))
|
||||
)
|
||||
(set! gp-0 1)
|
||||
)
|
||||
(else
|
||||
(joint-control-copy! (-> self skel) (-> self parent-override 0 skel))
|
||||
)
|
||||
)
|
||||
(joint-control-remap!
|
||||
(-> self skel)
|
||||
(-> self draw art-group)
|
||||
(-> self parent-override 0 draw art-group)
|
||||
*sidekick-remap*
|
||||
(the-as int (-> self anim-seed))
|
||||
""
|
||||
)
|
||||
(cond
|
||||
((zero? gp-0)
|
||||
(set! (-> self skel effect channel-offset) (-> self parent-override 0 skel effect channel-offset))
|
||||
)
|
||||
((= gp-0 1)
|
||||
(set! (-> self skel effect channel-offset) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-85 (-> self parent-override 0 draw color-mult quad)))
|
||||
(set! (-> self draw color-mult quad) v1-85)
|
||||
)
|
||||
(let ((v1-89 (-> self parent-override 0 draw color-emissive quad)))
|
||||
(set! (-> self draw color-emissive quad) v1-89)
|
||||
)
|
||||
(set! (-> self draw force-fade) (-> self parent-override 0 draw force-fade))
|
||||
(set! (-> self draw death-vertex-skip) (-> self parent-override 0 draw death-vertex-skip))
|
||||
(set! (-> self draw death-effect) (-> self parent-override 0 draw death-effect))
|
||||
(set! (-> self draw death-timer) (-> self parent-override 0 draw death-timer))
|
||||
(set! (-> self draw death-timer-org) (-> self parent-override 0 draw death-timer-org))
|
||||
(set! (-> self draw death-draw-overlap) (-> self parent-override 0 draw death-draw-overlap))
|
||||
(quaternion-copy! (-> self offset quat) (-> self root quat))
|
||||
(let ((f0-3 (* (-> self parent-override 0 darkjak-interp) (-> self parent-override 0 darkjak-giant-interp))))
|
||||
(set! (-> self offset trans x) (* 286.72 f0-3))
|
||||
(set! (-> self offset trans y) (* 204.8 f0-3))
|
||||
(set! (-> self offset trans z) (* 409.6 f0-3))
|
||||
)
|
||||
(joint-control-method-10 (-> self skel))
|
||||
(when *debug-segment*
|
||||
(let ((gp-2 (-> *display* frames (-> *display* on-screen) profile-array data 0))
|
||||
(v1-132 'target-post)
|
||||
(s5-1 *profile-target-post-color*)
|
||||
)
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let ((s4-1 (-> gp-2 data (-> gp-2 count))))
|
||||
(let ((s3-0 (-> gp-2 base-time)))
|
||||
(set! (-> s4-1 name) v1-132)
|
||||
(set! (-> s4-1 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0))))
|
||||
)
|
||||
(set! (-> s4-1 depth) (the-as uint (-> gp-2 depth)))
|
||||
(set! (-> s4-1 color) s5-1)
|
||||
(set! (-> gp-2 segment (-> gp-2 depth)) s4-1)
|
||||
)
|
||||
(+! (-> gp-2 count) 1)
|
||||
(+! (-> gp-2 depth) 1)
|
||||
(set! (-> gp-2 max-depth) (max (-> gp-2 max-depth) (-> gp-2 depth)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel))
|
||||
(when *debug-segment*
|
||||
(let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let* ((v1-158 (+ (-> gp-3 depth) -1))
|
||||
(s5-2 (-> gp-3 segment v1-158))
|
||||
(s4-2 (-> gp-3 base-time))
|
||||
)
|
||||
(when (>= v1-158 0)
|
||||
(set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-2))))
|
||||
(+! (-> gp-3 depth) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when *display-sidekick-stats*
|
||||
(format *stdcon* "~%")
|
||||
(debug-print-channels (-> self skel) (the-as symbol *stdcon*))
|
||||
(add-debug-sphere
|
||||
*display-sidekick-stats*
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self parent-override 0 control unknown-cspacei1un23i1 parent bone transform trans)
|
||||
(meters 0.1)
|
||||
(new 'static 'rgba :g #xff :a #x80)
|
||||
)
|
||||
(add-debug-sphere
|
||||
*display-sidekick-stats*
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self node-list data 3 bone transform trans)
|
||||
(meters 0.1)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(add-debug-sphere
|
||||
*display-sidekick-stats*
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self node-list data 0 bone transform trans)
|
||||
(meters 0.1)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(add-debug-matrix
|
||||
*display-sidekick-stats*
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self node-list data 0 bone transform)
|
||||
(meters 2)
|
||||
)
|
||||
)
|
||||
(set! (-> self draw shadow)
|
||||
(the-as shadow-geo (if (or (and (movie?) (-> self shadow-in-movie?))
|
||||
(logtest? (focus-status indax) (-> self parent-override 0 focus-status))
|
||||
)
|
||||
(-> self draw art-group data 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-53 (-> self skel effect)))
|
||||
(if a0-53
|
||||
(effect-control-method-9 a0-53)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self skel status) (joint-control-status blend-shape blend-shape-valid))
|
||||
(merc-blend-shape self)
|
||||
)
|
||||
(if (logtest? (-> self skel status) (joint-control-status eye-anim-valid eye-anim))
|
||||
(merc-eye-anim self)
|
||||
)
|
||||
(when (!= (not (-> *setting-control* user-current mirror)) (not (-> self mirror)))
|
||||
(cond
|
||||
((-> self mirror)
|
||||
(deactivate (-> self mirror 0))
|
||||
(set! (-> self mirror) (the-as (pointer process-drawable) #f))
|
||||
)
|
||||
(else
|
||||
(let* ((s5-3 (get-process *default-dead-pool* manipy #x4000))
|
||||
(gp-4
|
||||
(when s5-3
|
||||
(let ((t9-22 (method-of-type manipy activate)))
|
||||
(t9-22 (the-as manipy s5-3) self (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((gp-5 run-function-in-process)
|
||||
(s4-3 s5-3)
|
||||
(s3-1 manipy-init)
|
||||
(s2-0 (-> self root trans))
|
||||
(s1-0 (-> self entity))
|
||||
(t0-4 (art-group-get-by-name *level* "skel-sidekick" (the-as (pointer uint32) #f)))
|
||||
(t1-1 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) gp-5) s4-3 s3-1 s2-0 s1-0 t0-4 t1-1)
|
||||
)
|
||||
(the-as (pointer process-drawable) (-> s5-3 ppointer))
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process gp-4) 'anim-mode 'mirror)
|
||||
(send-event (ppointer->process gp-4) 'mirror #t)
|
||||
(set! (-> self mirror) gp-4)
|
||||
(let ((v0-29 (-> gp-4 0 node-list data)))
|
||||
(set! (-> v0-29 0 param0) cspace<-cspace!)
|
||||
(set! (-> v0-29 0 param1) (the-as basic (-> self node-list data)))
|
||||
(set! (-> v0-29 0 param2) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior init-sidekick sidekick ()
|
||||
(set! (-> self mask) (logior (process-mask sidekick) (-> self mask)))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(vector-identity! (-> self root scale))
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-sidekick" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self draw shadow-ctrl) *target-shadow-control*)
|
||||
(logior! (-> self skel status) (joint-control-status sync-math blend-shape eye-anim))
|
||||
(set! (-> self draw light-index) (the-as uint 30))
|
||||
(let ((v1-14 (-> self node-list data)))
|
||||
(set! (-> v1-14 0 param0) cspace<-cspace+transformq!)
|
||||
(set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent)))
|
||||
(set! (-> v1-14 0 param2) (the-as basic (-> self offset)))
|
||||
)
|
||||
(set! (-> self shadow-in-movie?) #t)
|
||||
(set! (-> self mirror) (the-as (pointer process-drawable) #f))
|
||||
(go sidekick-clone)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,820 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *carry-walk-mods* (new 'static 'surface
|
||||
:name 'run
|
||||
:turnv 524288.0
|
||||
:turnvv 910222.25
|
||||
:tiltv 65536.0
|
||||
:tiltvv 262144.0
|
||||
:transv-max 24576.0
|
||||
:target-speed 24576.0
|
||||
:seek0 1.0
|
||||
:seek90 1.0
|
||||
:seek180 1.0
|
||||
:fric 1.0
|
||||
:nonlin-fric-dist 1.0
|
||||
:slip-factor 1.0
|
||||
:slide-factor 1.0
|
||||
:slope-up-factor 1.0
|
||||
:slope-down-factor 1.0
|
||||
:slope-slip-angle 1.0
|
||||
:impact-fric 1.0
|
||||
:bend-factor 1.0
|
||||
:bend-speed 1.0
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:turnvf 30.0
|
||||
:turnvvf 30.0
|
||||
:tiltvf 150.0
|
||||
:tiltvvf 15.0
|
||||
:flags (surface-flag look-around no-turn-around gun-off)
|
||||
)
|
||||
)
|
||||
|
||||
(define *carry-jump-mods* (new 'static 'surface
|
||||
:name 'jump
|
||||
:turnv 524288.0
|
||||
:turnvv 910222.25
|
||||
:tiltv 65536.0
|
||||
:tiltvv 262144.0
|
||||
:transv-max 24576.0
|
||||
:target-speed 24576.0
|
||||
:seek0 0.3
|
||||
:seek90 0.3
|
||||
:seek180 0.3
|
||||
:fric 0.2
|
||||
:nonlin-fric-dist 1.0
|
||||
:slip-factor 1.0
|
||||
:slide-factor 1.0
|
||||
:slope-up-factor 1.0
|
||||
:slope-down-factor 1.0
|
||||
:slope-slip-angle 1.0
|
||||
:impact-fric 1.0
|
||||
:bend-factor 1.0
|
||||
:bend-speed 1.0
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:turnvf 30.0
|
||||
:turnvvf 30.0
|
||||
:tiltvf 150.0
|
||||
:tiltvvf 15.0
|
||||
:mode 'air
|
||||
:flags (surface-flag air gun-off)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior target-carry-update target ()
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(when (and (= (-> self control unknown-symbol00) 'carry) (< (-> self control unknown-float000) 1.0))
|
||||
(let ((gp-0 (new 'stack-no-clear 'collide-query))
|
||||
(s5-0 (new 'stack-no-clear 'inline-array 'sphere 1))
|
||||
)
|
||||
(dotimes (s4-0 1)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-0 s4-0)) sphere)
|
||||
)
|
||||
(let ((f30-0 (seek (-> self control unknown-float000) 1.0 (* 0.1 (-> self clock time-adjust-ratio)))))
|
||||
(set! (-> s5-0 0 quad) (-> self control unknown-sphere-array00 2 prim-core world-sphere quad))
|
||||
(set! (-> s5-0 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 7372.8 f30-0 0.0 1.0))
|
||||
(let ((v1-17 gp-0))
|
||||
(set! (-> v1-17 spheres) s5-0)
|
||||
(set! (-> v1-17 num-spheres) (the-as uint 1))
|
||||
(set! (-> v1-17 collide-with) (-> self control root-prim prim-core collide-with))
|
||||
(set! (-> v1-17 ignore-process0) #f)
|
||||
(set! (-> v1-17 ignore-process1) #f)
|
||||
(set! (-> v1-17 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-17 best-my-prim) (the-as collide-shape-prim #t))
|
||||
(set! (-> v1-17 action-mask) (collide-action solid))
|
||||
)
|
||||
(if (not (fill-and-probe-using-spheres *collide-cache* gp-0))
|
||||
(target-collide-set! 'carry f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (handle->process (-> self carry other)) 'carry (-> self carry))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch focus-status vs none.
|
||||
(defbehavior target-carry-post target ()
|
||||
(target-post)
|
||||
(target-carry-update)
|
||||
(set! (-> self focus-status) (logior (focus-status carry) (-> self focus-status)))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate target-carry-pickup (target)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 1920)
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 0)
|
||||
(set! (-> a1-2 message) 'carry?)
|
||||
(let ((a1-3 (send-event-function proc a1-2)))
|
||||
(when a1-3
|
||||
(let ((f0-0 (distance-from-destination (-> self carry) (the-as carry-info a1-3))))
|
||||
(when (and (>= f0-0 0.0) (< f0-0 (-> self carry other-value)))
|
||||
(set! (-> self carry other) (process->handle proc))
|
||||
(set! (-> self carry other-value) f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self carry other) (the-as handle #f))
|
||||
(set! (-> self carry other-value) 100000000000.0)
|
||||
(set! (-> self carry max-distance) 12288.0)
|
||||
(set! (-> self carry mode) (carry-mode carry))
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name)))
|
||||
(or (= v1-3 'target-carry-stance)
|
||||
(= v1-3 'target-carry-walk)
|
||||
(= v1-3 'target-carry-drop)
|
||||
(= v1-3 'target-carry-throw)
|
||||
(= v1-3 'target-carry-jump)
|
||||
(= v1-3 'target-carry-falling)
|
||||
(= v1-3 'target-carry-hit-ground)
|
||||
(= v1-3 'target-carry-throw)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self focus-status) (focus-status carry))
|
||||
(send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(target-exit)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((f30-0 0.0))
|
||||
(let ((f28-0 0.0))
|
||||
(ja-channel-push! 2 (seconds 0.1))
|
||||
(target-danger-set! 'carry? #f)
|
||||
(ja :group! (-> self draw art-group data 319) :num! min)
|
||||
(let ((a0-3 (-> self skel root-channel 1)))
|
||||
(set! (-> a0-3 frame-interp 1) f30-0)
|
||||
(set! (-> a0-3 frame-interp 0) f30-0)
|
||||
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> self draw art-group data 318)))
|
||||
(set! (-> a0-3 param 0) 0.0)
|
||||
(joint-control-channel-group-eval!
|
||||
a0-3
|
||||
(the-as art-joint-anim (-> self draw art-group data 318))
|
||||
num-func-chan
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(format #t "carry picked ~A~%" (handle->process (-> self carry other)))
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) (process->ppointer self))
|
||||
(set! (-> a1-5 num-params) 0)
|
||||
(set! (-> a1-5 message) 'carry-info)
|
||||
(let ((gp-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-5))))
|
||||
(when gp-1
|
||||
(let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-1 point) (-> self control trans)))
|
||||
(s4-0 (new-stack-vector0))
|
||||
(f26-0 (vector-dot (-> self control local-normal) s5-1))
|
||||
)
|
||||
0.0
|
||||
(vector-! s4-0 s5-1 (vector-float*! s4-0 (-> self control local-normal) f26-0))
|
||||
(let* ((f24-0 (vector-length s4-0))
|
||||
(f22-0 f24-0)
|
||||
)
|
||||
(set! f28-0 (lerp-scale 1.0 0.0 f26-0 1638.4 4505.6))
|
||||
(vector+!
|
||||
s5-1
|
||||
(vector-float*! s5-1 (-> self control local-normal) f26-0)
|
||||
(vector-float*! s4-0 s4-0 (/ f24-0 f22-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(forward-up-nopitch->quaternion
|
||||
(-> self control dir-targ)
|
||||
(vector-normalize! (vector-! (new-stack-vector0) (-> gp-1 point) (-> self control trans)) 1.0)
|
||||
(vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(target-danger-set! 'harmless #f)
|
||||
(ja-no-eval :num! (seek! (ja-aframe 5.0 0)))
|
||||
(while (not (ja-done? 0))
|
||||
(set! f30-0 (seek f30-0 f28-0 (* 5.0 (-> self clock seconds-per-frame))))
|
||||
(let ((v1-45 (-> self skel root-channel 1)))
|
||||
(set! (-> v1-45 frame-interp 1) f30-0)
|
||||
(set! (-> v1-45 frame-interp 0) f30-0)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(when (send-event (handle->process (-> self carry other)) 'pickup (-> self carry))
|
||||
(target-collide-set! 'carry 0.0)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(set! f30-0 (seek f30-0 f28-0 (* 5.0 (-> self clock seconds-per-frame))))
|
||||
(let ((v1-70 (-> self skel root-channel 1)))
|
||||
(set! (-> v1-70 frame-interp 1) f30-0)
|
||||
(set! (-> v1-70 frame-interp 0) f30-0)
|
||||
)
|
||||
(when (< 22.0 (ja-aframe-num 0))
|
||||
(let ((a1-22 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-22 from) (process->ppointer self))
|
||||
(set! (-> a1-22 num-params) 0)
|
||||
(set! (-> a1-22 message) 'carry-info)
|
||||
(let ((gp-4 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-22))))
|
||||
(if gp-4
|
||||
(seek! (-> gp-4 grab-trans-blend) 0.0 (* 2.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
)
|
||||
(ja-no-eval :num! (seek! 0.0))
|
||||
(while (not (ja-done? 0))
|
||||
(let ((v1-93 (-> self skel root-channel 1)))
|
||||
(set! (-> v1-93 frame-interp 1) f30-0)
|
||||
(set! (-> v1-93 frame-interp 0) f30-0)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post (behavior ()
|
||||
(target-no-stick-post)
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(target-carry-update)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate target-carry-drop (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set-forward-vel 0.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((f30-0 1.0))
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) (process->ppointer self))
|
||||
(set! (-> a1-0 num-params) 0)
|
||||
(set! (-> a1-0 message) 'carry-info)
|
||||
(let ((a0-5 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-0))))
|
||||
(when a0-5
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> a0-5 point quad))
|
||||
(set! (-> gp-0 y) (- (-> gp-0 y) (-> a0-5 process 0 control root-prim prim-core world-sphere w)))
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(f28-0 (vector-dot (-> self control local-normal) gp-0))
|
||||
)
|
||||
0.0
|
||||
(vector-! s5-0 gp-0 (vector-float*! s5-0 (-> self control local-normal) f28-0))
|
||||
(let* ((f26-0 (vector-length s5-0))
|
||||
(f24-0 f26-0)
|
||||
)
|
||||
(set! f30-0 (lerp-scale 1.0 0.0 f28-0 1638.4 4505.6))
|
||||
(vector+!
|
||||
gp-0
|
||||
(vector-float*! gp-0 (-> self control local-normal) f28-0)
|
||||
(vector-float*! s5-0 s5-0 (/ f26-0 f24-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-channel-push! 2 (seconds 0.1))
|
||||
(ja :group! (-> self draw art-group data 319)
|
||||
:num! (identity (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 319)) frames num-frames) -1)))
|
||||
)
|
||||
(let ((a0-16 (-> self skel root-channel 1)))
|
||||
(set! (-> a0-16 frame-interp 1) f30-0)
|
||||
(set! (-> a0-16 frame-interp 0) f30-0)
|
||||
(set! (-> a0-16 frame-group) (the-as art-joint-anim (-> self draw art-group data 318)))
|
||||
(set! (-> a0-16 param 0) 0.0)
|
||||
(joint-control-channel-group-eval!
|
||||
a0-16
|
||||
(the-as art-joint-anim (-> self draw art-group data 318))
|
||||
num-func-chan
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-no-eval :num! (seek! (ja-aframe 5.0 0)))
|
||||
(while (not (ja-done? 0))
|
||||
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-9 from) (process->ppointer self))
|
||||
(set! (-> a1-9 num-params) 0)
|
||||
(set! (-> a1-9 message) 'carry-info)
|
||||
(let ((gp-4 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-9))))
|
||||
(when gp-4
|
||||
(if (< 22.0 (ja-aframe-num 0))
|
||||
(seek! (-> gp-4 grab-trans-blend) 1.0 (* 2.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(let ((s4-0 (-> gp-4 process 0 control))
|
||||
(gp-5 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'inline-array 'sphere 1)))
|
||||
(dotimes (s3-0 1)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-1 s3-0)) sphere)
|
||||
)
|
||||
(set! (-> s5-1 0 quad) (-> s4-0 root-prim prim-core world-sphere quad))
|
||||
(let ((v1-64 gp-5))
|
||||
(set! (-> v1-64 spheres) s5-1)
|
||||
(set! (-> v1-64 num-spheres) (the-as uint 1))
|
||||
(set! (-> v1-64 collide-with) (-> self control root-prim prim-core collide-with))
|
||||
(set! (-> v1-64 ignore-process0) #f)
|
||||
(set! (-> v1-64 ignore-process1) #f)
|
||||
(set! (-> v1-64 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-64 best-my-prim) (the-as collide-shape-prim #t))
|
||||
(set! (-> v1-64 action-mask) (collide-action solid))
|
||||
)
|
||||
)
|
||||
(when (fill-and-probe-using-spheres *collide-cache* gp-5)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(when (< 22.0 (ja-aframe-num 0))
|
||||
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-14 from) (process->ppointer self))
|
||||
(set! (-> a1-14 num-params) 0)
|
||||
(set! (-> a1-14 message) 'carry-info)
|
||||
(let ((gp-6 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-14))))
|
||||
(if gp-6
|
||||
(seek! (-> gp-6 grab-trans-blend) 0.0 (* 2.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(ja-no-eval :num! (seek! 0.0))
|
||||
(while (not (ja-done? 0))
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post (-> target-carry-pickup post)
|
||||
)
|
||||
|
||||
(defstate target-carry-stance (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *carry-walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
((-> target-carry-pickup exit))
|
||||
(set! (-> self control unknown-float29) 0.0)
|
||||
(target-state-hook-exit)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (move-legs?)
|
||||
(set! (-> self control unknown-float29) 0.0)
|
||||
(remove-exit)
|
||||
(go target-carry-walk)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) r1)
|
||||
(go target-carry-drop)
|
||||
)
|
||||
(when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 2)
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(can-jump? #f)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-17 (-> *TARGET-bank* carry-jump-height-min))
|
||||
(a1-2 (-> *TARGET-bank* carry-jump-height-max))
|
||||
)
|
||||
(go target-carry-jump a0-17 a1-2)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) square) (can-hands? #t))
|
||||
(go target-carry-throw)
|
||||
)
|
||||
(fall-test (the-as (state symbol target) target-carry-falling) -4096000.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((v1-2 (ja-group)))
|
||||
(when (not (and v1-2 (= v1-2 (-> self draw art-group data 316))))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja :group! (-> self draw art-group data 316))
|
||||
)
|
||||
)
|
||||
(until #f
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-walk (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set! (-> self control unknown-surface00) *carry-walk-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
((-> target-carry-pickup exit))
|
||||
(target-effect-exit)
|
||||
(target-state-hook-exit)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (not (move-legs?))
|
||||
(target-effect-exit)
|
||||
(remove-exit)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) r1)
|
||||
(go target-carry-drop)
|
||||
)
|
||||
(when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 2)
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(can-jump? #f)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-17 (-> *TARGET-bank* carry-jump-height-min))
|
||||
(a1-2 (-> *TARGET-bank* carry-jump-height-max))
|
||||
)
|
||||
(go target-carry-jump a0-17 a1-2)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) square) (can-hands? #t))
|
||||
(go target-carry-throw)
|
||||
)
|
||||
(fall-test (the-as (state symbol target) target-carry-falling) -4096000.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((v1-2 (ja-group)))
|
||||
(when (not (and v1-2 (= v1-2 (-> self draw art-group data 317))))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja :group! (-> self draw art-group data 317) :dist (-> *TARGET-bank* walk-cycle-dist))
|
||||
)
|
||||
)
|
||||
(until #f
|
||||
(suspend)
|
||||
(let* ((f0-2 (* (current-cycle-distance (-> self skel)) (-> self control scale x)))
|
||||
(f0-4 (/ (-> self control unknown-float05) (* 1.25 f0-2)))
|
||||
)
|
||||
(ja :num! (loop! f0-4))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-falling (target)
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *carry-jump-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
|
||||
(go target-carry-hit-ground #f)
|
||||
)
|
||||
(let* ((f0-0 (target-move-dist (-> *TARGET-bank* stuck-time)))
|
||||
(v1-9 (ja-group))
|
||||
(v1-12 (if (and v1-9 (= v1-9 (-> self draw art-group data 322)))
|
||||
15
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (if (and (< f0-0 (-> *TARGET-bank* stuck-distance))
|
||||
(and (>= v1-12 0)
|
||||
(>= (- (-> self clock frame-counter) (-> self state-time)) v1-12)
|
||||
(not (and *cheat-mode* (cpad-hold? (-> self control unknown-cpad-info00 number) r2)))
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
(logior! (-> self control status) (cshape-moving-flags on-surface))
|
||||
(go target-carry-hit-ground 'stuck)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((v1-2 (ja-group)))
|
||||
(cond
|
||||
((and v1-2 (= v1-2 (-> self draw art-group data 322)))
|
||||
)
|
||||
(else
|
||||
(ja-channel-push! 1 (seconds 0.33))
|
||||
(ja :group! (-> self draw art-group data 322))
|
||||
(while (!= (-> self skel root-channel 0) (-> self skel channel))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-no-eval :group! (-> self draw art-group data 322) :num! (loop!) :frame-num 0.0)
|
||||
(until #f
|
||||
(suspend)
|
||||
(ja :group! (-> self draw art-group data 27) :num! (loop!))
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-hit-ground (target)
|
||||
:event target-walk-event-handler
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(case arg0
|
||||
(('stuck)
|
||||
)
|
||||
(else
|
||||
(target-land-effect)
|
||||
)
|
||||
)
|
||||
(set! (-> self control unknown-time-frame11) 0)
|
||||
(set! (-> self control unknown-time-frame12) 0)
|
||||
(if (>= (-> self control ground-impact-vel) (-> *TARGET-bank* fall-stumble-threshold))
|
||||
(set-forward-vel 0.0)
|
||||
)
|
||||
(if (!= (-> self control ground-pat material) (pat-material ice))
|
||||
(delete-back-vel)
|
||||
)
|
||||
(set! (-> self control unknown-surface00) *carry-walk-mods*)
|
||||
(start-bobbing!
|
||||
(-> self water)
|
||||
(lerp-scale 0.0 4096.0 (-> self control ground-impact-vel) 40960.0 102400.0)
|
||||
600
|
||||
1500
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self state-flags) (state-flags lleg-still rleg-still))
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 2)
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(can-jump? #f)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-16 (-> *TARGET-bank* carry-jump-height-min))
|
||||
(a1-2 (-> *TARGET-bank* carry-jump-height-max))
|
||||
)
|
||||
(go target-carry-jump a0-16 a1-2)
|
||||
)
|
||||
)
|
||||
(if (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(go target-carry-walk)
|
||||
)
|
||||
(fall-test (the-as (state symbol target) target-carry-falling) -4096000.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 #f)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-jump (target)
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(sound-play "jump" :vol 70)
|
||||
(init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0)
|
||||
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
|
||||
(set! (-> self control unknown-surface00) *carry-jump-mods*)
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float05)))))
|
||||
)
|
||||
(set! (-> self control unknown-float35)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float05)))))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
((-> target-carry-pickup exit))
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))
|
||||
)
|
||||
)
|
||||
((-> target-carry-falling trans))
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
|
||||
(seek!
|
||||
(-> self control unknown-float35)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float05)))))
|
||||
(-> self clock seconds-per-frame)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(ja-channel-push! 1 (seconds 0.05))
|
||||
(ja :group! (-> self draw art-group data 321) :num! min)
|
||||
(suspend)
|
||||
(ja :group! (-> self draw art-group data 321) :num! (+!))
|
||||
(suspend)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(f0-4 (- 6.0 (ja-aframe-num 0)))
|
||||
(gp-1 (-> self skel root-channel 0))
|
||||
)
|
||||
(set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1)))
|
||||
(let ((v1-27 (and (< 0.0 f30-0) (< 0.0 f0-4))))
|
||||
(set! (-> gp-1 param 1)
|
||||
(if v1-27
|
||||
(fmin (fmin 3.0 f0-4) (/ (* 5.0 f0-4) (the float (time-to-apex f30-0 -245760.0))))
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(go target-carry-falling)
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-throw (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set-forward-vel 0.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja-no-eval :group! (-> self draw art-group data 320) :num! (seek! (ja-aframe 19.0 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-3 from) (process->ppointer self))
|
||||
(set! (-> a1-3 num-params) 0)
|
||||
(set! (-> a1-3 message) 'carry-info)
|
||||
(let ((gp-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-3))))
|
||||
(if gp-1
|
||||
(seek! (-> gp-1 grab-trans-blend) 1.0 (* 4.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 19.0 0)))
|
||||
)
|
||||
(let ((a1-7 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-7 from) (process->ppointer self))
|
||||
(set! (-> a1-7 num-params) 0)
|
||||
(set! (-> a1-7 message) 'carry-info)
|
||||
(let ((v1-30 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-7))))
|
||||
(when v1-30
|
||||
(let ((s4-0 (-> v1-30 process 0 control))
|
||||
(gp-3 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'inline-array 'sphere 1)))
|
||||
(dotimes (s3-0 1)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-0 s3-0)) sphere)
|
||||
)
|
||||
(set! (-> s5-0 0 quad) (-> s4-0 root-prim prim-core world-sphere quad))
|
||||
(let ((v1-38 gp-3))
|
||||
(set! (-> v1-38 spheres) s5-0)
|
||||
(set! (-> v1-38 num-spheres) (the-as uint 1))
|
||||
(set! (-> v1-38 collide-with) (-> self control root-prim prim-core collide-with))
|
||||
(set! (-> v1-38 ignore-process0) #f)
|
||||
(set! (-> v1-38 ignore-process1) #f)
|
||||
(set! (-> v1-38 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-38 best-my-prim) (the-as collide-shape-prim #t))
|
||||
(set! (-> v1-38 action-mask) (collide-action solid))
|
||||
)
|
||||
)
|
||||
(when (fill-and-probe-using-spheres *collide-cache* gp-3)
|
||||
(ja-no-eval :num! (seek! 0.0))
|
||||
(while (not (ja-done? 0))
|
||||
(let ((a1-11 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-11 from) (process->ppointer self))
|
||||
(set! (-> a1-11 num-params) 0)
|
||||
(set! (-> a1-11 message) 'carry-info)
|
||||
(let ((gp-4 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-11))))
|
||||
(if gp-4
|
||||
(seek! (-> gp-4 grab-trans-blend) 0.0 (* 4.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-58 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 79764.13)))
|
||||
(vector+float*! v1-58 v1-58 (-> self control unknown-matrix01 vector 2) 32768.0)
|
||||
(send-event (handle->process (-> self carry other)) 'drop (-> self carry) v1-58)
|
||||
)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post (-> target-carry-pickup post)
|
||||
)
|
||||
|
||||
@@ -139,11 +139,14 @@
|
||||
(define-extern target-pos (function int vector))
|
||||
(define-extern stop (function symbol int))
|
||||
|
||||
;; og:ignore-form:(new 'static 'boxed-array
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype target (process-focusable)
|
||||
((control control-info :offset 128)
|
||||
(fact-info-override fact-info-target :offset 160)
|
||||
((self-override target :offset 32)
|
||||
(control control-info :offset 128)
|
||||
(fact-override fact-info-target :offset 160)
|
||||
(skel2 joint-control :offset-assert 204)
|
||||
(shadow-backup shadow-geo :offset-assert 208)
|
||||
(target-flags uint32 :offset 188)
|
||||
@@ -188,7 +191,7 @@
|
||||
(pre-joint-hook (function none :behavior target) :offset-assert 2112)
|
||||
(notify handle :offset-assert 2120)
|
||||
(mode-cache basic :offset-assert 2128)
|
||||
(mode-param1 uint64 :offset-assert 2136)
|
||||
(mode-param1 handle :offset-assert 2136)
|
||||
(mode-param2 uint64 :offset-assert 2144)
|
||||
(mode-param3 uint64 :offset-assert 2152)
|
||||
(tobot-state state :offset-assert 2160)
|
||||
@@ -216,29 +219,42 @@
|
||||
(target-method-27 (_type_ collide-cache collide-edge-spec) none 27)
|
||||
(init-target (_type_ continue-point symbol) none :behavior target 28)
|
||||
)
|
||||
(:states
|
||||
target-carry-drop
|
||||
target-carry-falling
|
||||
(target-carry-hit-ground symbol)
|
||||
(target-carry-jump float float)
|
||||
target-carry-stance
|
||||
target-carry-throw
|
||||
target-carry-walk
|
||||
target-indax-start
|
||||
(target-warp-in vector vector target)
|
||||
(target-warp-out vector vector target)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define-perm *target* target #f)
|
||||
|
||||
(deftype sidekick (process-drawable)
|
||||
((control control-info :offset 128)
|
||||
(anim-seed uint64 :offset 208)
|
||||
(shadow-in-movie? symbol :offset-assert 216)
|
||||
(special-anim-time time-frame :offset-assert 224)
|
||||
(special-anim-interp float :offset-assert 232)
|
||||
(special-anim-frame float :offset-assert 236)
|
||||
(offset transformq :inline :offset-assert 240)
|
||||
(mirror uint32 :offset-assert 288)
|
||||
((parent-override (pointer target) :offset 16)
|
||||
(control control-info :offset 128)
|
||||
(anim-seed uint64 :offset 208)
|
||||
(shadow-in-movie? symbol :offset-assert 216)
|
||||
(special-anim-time time-frame :offset-assert 224)
|
||||
(special-anim-interp float :offset-assert 232)
|
||||
(special-anim-frame float :offset-assert 236)
|
||||
(offset transformq :inline :offset-assert 240)
|
||||
(mirror (pointer process-drawable) :offset-assert 288)
|
||||
)
|
||||
:heap-base #xb0
|
||||
:method-count-assert 20
|
||||
:size-assert #x124
|
||||
:flag-assert #x1400b00124
|
||||
(:states
|
||||
sidekick-clone
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define-perm *sidekick* sidekick #f)
|
||||
|
||||
; what is this.
|
||||
;(new 'static 'boxed-array :type type pilot-info mech-info turret-info indax-info tube-info)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -34,7 +34,9 @@
|
||||
*/
|
||||
|
||||
void setup_logging(bool verbose, std::string log_file) {
|
||||
lg::set_file(log_file);
|
||||
if (!log_file.empty()) {
|
||||
lg::set_file(log_file);
|
||||
}
|
||||
if (verbose) {
|
||||
lg::set_file_level(lg::level::debug);
|
||||
lg::set_flush_level(lg::level::debug);
|
||||
@@ -66,9 +68,7 @@ int main(int argc, char** argv) {
|
||||
AppState appstate;
|
||||
LSPRouter lsp_router;
|
||||
appstate.verbose = verbose;
|
||||
if (!logfile.empty()) {
|
||||
setup_logging(appstate.verbose, logfile);
|
||||
}
|
||||
setup_logging(appstate.verbose, logfile);
|
||||
lsp_router.init_routes();
|
||||
|
||||
lg::info("OpenGOAL LSP Initialized, ready for requests");
|
||||
|
||||
+1
-15
@@ -1,7 +1,5 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function position-in-front-of-camera!
|
||||
(defun position-in-front-of-camera! ((arg0 vector) (arg1 float) (arg2 float))
|
||||
(vector-float*! arg0 (-> *math-camera* inv-camera-rot vector 2) arg1)
|
||||
(vector+float*! arg0 arg0 (-> *math-camera* inv-camera-rot vector 1) arg2)
|
||||
@@ -9,7 +7,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function position-in-front-of-screen!
|
||||
(defun position-in-front-of-screen! ((arg0 vector) (arg1 float) (arg2 vector))
|
||||
(let ((a2-1 (vector-negate! (new 'stack-no-clear 'vector) (-> *math-camera* inv-camera-rot vector 2)))
|
||||
(a1-3 (vector-float*! (new 'stack-no-clear 'vector) (-> *math-camera* inv-camera-rot vector 2) arg1))
|
||||
@@ -20,7 +17,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function matrix-local->world
|
||||
(defun matrix-local->world ((smooth? symbol))
|
||||
"Returns [[*math-camera*]]'s `inv-camera-rot-smooth` if `smooth?` is true, else return `inv-camera-rot`"
|
||||
(if smooth?
|
||||
@@ -29,16 +25,13 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function matrix-world->local
|
||||
(defun matrix-world->local ()
|
||||
(defun matrix-world->local ((arg0 symbol) (arg1 object))
|
||||
"Returns [[*math-camera*]]'s `camera-rot`"
|
||||
(-> *math-camera* camera-rot)
|
||||
)
|
||||
|
||||
;; definition (perm) for symbol *camera-dummy-vector*, type vector
|
||||
(define-perm *camera-dummy-vector* vector (vector-reset! (new 'global 'vector)))
|
||||
|
||||
;; definition for function camera-pos
|
||||
(defun camera-pos ()
|
||||
"Returns the `trans` vector from whatever is first determined to exist:
|
||||
- [[*camera-combiner*]]
|
||||
@@ -57,13 +50,11 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function math-camera-pos
|
||||
(defun math-camera-pos ()
|
||||
"Returns [[*math-camera*]]'s `trans`"
|
||||
(-> *math-camera* trans)
|
||||
)
|
||||
|
||||
;; definition for function camera-matrix
|
||||
(defun camera-matrix ()
|
||||
"If [[*camera-combiner*]] exists, return it's `inv-camera-rot`. Else, return [[*math-camera*]]'s"
|
||||
(if *camera-combiner*
|
||||
@@ -72,13 +63,11 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function math-camera-matrix
|
||||
(defun math-camera-matrix ()
|
||||
"Returns [[*math-camera*]]'s `inv-camera-rot`"
|
||||
(-> *math-camera* inv-camera-rot)
|
||||
)
|
||||
|
||||
;; definition for function camera-angle
|
||||
(defun camera-angle ()
|
||||
(let ((f0-0 (-> *math-camera* camera-rot vector 0 x))
|
||||
(f1-0 (-> *math-camera* camera-rot vector 0 z))
|
||||
@@ -87,9 +76,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function camera-teleport-to-entity
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior camera-teleport-to-entity process ((arg0 entity-actor))
|
||||
(let ((gp-0 (new 'stack 'transformq)))
|
||||
(set! (-> gp-0 trans quad) (-> arg0 extra trans quad))
|
||||
|
||||
+2
-5
@@ -1,7 +1,5 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type control-info
|
||||
(deftype control-info (collide-shape-moving)
|
||||
((unknown-float00 float :offset 448)
|
||||
(unknown-float01 float :offset 452)
|
||||
@@ -58,6 +56,7 @@
|
||||
(unknown-dword02 int64 :offset 4416)
|
||||
(unknown-vector16 vector :inline :offset 4432)
|
||||
(unknown-float14 float :offset 4448)
|
||||
(unknown-floatiujh1bnb2n3i1 float :offset 4452)
|
||||
(unknown-float15 float :offset 4456)
|
||||
(unknown-word01 int32 :offset 4460)
|
||||
(unknown-vector17 vector :inline :offset 4464)
|
||||
@@ -113,8 +112,7 @@
|
||||
(unknown-vector29 vector :inline :offset 5168)
|
||||
(unknown-vector30 vector :inline :offset 5184)
|
||||
(unknown-vector31 vector :inline :offset 5200)
|
||||
(unknown-vector32 vector :inline :offset 5216)
|
||||
(unknown-vector33 vector :inline :offset 5232)
|
||||
(unknown-cspacei1un23i1 cspace :inline :offset 5216)
|
||||
(unknown-symbol00 symbol :offset 5248)
|
||||
(unknown-float000 float :offset 5252)
|
||||
(unknown-float31 float :offset 5256)
|
||||
@@ -211,5 +209,4 @@
|
||||
:flag-assert #x4400001910
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
+1
-1
@@ -781,7 +781,7 @@
|
||||
:post (behavior ()
|
||||
(vector-v++!
|
||||
(-> self root-override2 transv)
|
||||
(compute-acc-due-to-gravity (-> self root-override2) (new-stack-vector0) 0.0)
|
||||
(compute-acc-due-to-gravity (the-as collide-shape-moving (-> self root-override2)) (new-stack-vector0) 0.0)
|
||||
)
|
||||
(if (< (-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
|
||||
(vector-length (-> self root-override2 transv))
|
||||
|
||||
+1
-1
@@ -493,7 +493,7 @@
|
||||
)
|
||||
)
|
||||
(if *target*
|
||||
(set! (-> *game-info* score) (-> *target* fact-info-override trick-point))
|
||||
(set! (-> *game-info* score) (-> *target* fact-override trick-point))
|
||||
)
|
||||
(let ((v1-15 (the-as int (- (-> obj total-time) (- (-> *display* game-clock frame-counter) (-> obj start-time))))))
|
||||
(if (< (the-as time-frame v1-15) 0)
|
||||
|
||||
+1
-8
@@ -1,7 +1,5 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type effect-control
|
||||
(deftype effect-control (basic)
|
||||
((process process-drawable :offset-assert 4)
|
||||
(flags effect-control-flag :offset-assert 8)
|
||||
@@ -17,7 +15,7 @@
|
||||
:flag-assert #xf00000024
|
||||
(:methods
|
||||
(new (symbol type process-drawable) _type_ 0)
|
||||
(effect-control-method-9 () none 9)
|
||||
(effect-control-method-9 (_type_) none 9)
|
||||
(effect-control-method-10 () none 10)
|
||||
(effect-control-method-11 () none 11)
|
||||
(effect-control-method-12 (_type_ symbol float int basic sound-name) int 12)
|
||||
@@ -26,7 +24,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type effect-control
|
||||
(defmethod inspect effect-control ((obj effect-control))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
@@ -45,7 +42,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 0 of type effect-control
|
||||
(defmethod new effect-control ((allocation symbol) (type-to-make type) (arg0 process-drawable))
|
||||
(cond
|
||||
((res-lump-struct (-> arg0 draw jgeo extra) 'effect-name structure)
|
||||
@@ -61,13 +57,10 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type effect-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-channel-offset! effect-control ((obj effect-control) (arg0 int))
|
||||
(set! (-> obj channel-offset) arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
+7
-16
@@ -3110,7 +3110,7 @@
|
||||
(when (= *cheat-mode* 'debug)
|
||||
(when (and (not *pause-lock*) (cpad-hold? (-> self control unknown-cpad-info00 number) r2))
|
||||
(set! (-> self control unknown-time-frame30) (-> self clock frame-counter))
|
||||
(pickup-collectable! (-> self fact-info-override) (pickup-type health) 100.0 (the-as handle #f))
|
||||
(pickup-collectable! (-> self fact-override) (pickup-type health) 100.0 (the-as handle #f))
|
||||
(go target-board-stance)
|
||||
)
|
||||
)
|
||||
@@ -3188,27 +3188,22 @@
|
||||
(go target-stance)
|
||||
)
|
||||
(else
|
||||
(pickup-collectable! (-> self fact-info-override) (pickup-type health) -1000.0 (the-as handle #f))
|
||||
(pickup-collectable! (-> self fact-override) (pickup-type health) -1000.0 (the-as handle #f))
|
||||
(go target-death (-> gp-0 mode))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('drown-death 'sharkey 'lava 'dark-eco-pool 'melt 'instant-death 'crush 'death 'grenade 'big-explosion 'bot)
|
||||
(pickup-collectable! (-> self fact-info-override) (pickup-type health) -1000.0 (the-as handle #f))
|
||||
(pickup-collectable! (-> self fact-override) (pickup-type health) -1000.0 (the-as handle #f))
|
||||
(if (= (-> self game mode) 'play)
|
||||
(go target-death (-> gp-0 mode))
|
||||
)
|
||||
)
|
||||
(('death)
|
||||
(pickup-collectable! (-> self fact-info-override) (pickup-type health) -1000.0 (the-as handle #f))
|
||||
(pickup-collectable! (-> self fact-override) (pickup-type health) -1000.0 (the-as handle #f))
|
||||
)
|
||||
(else
|
||||
(pickup-collectable!
|
||||
(-> self fact-info-override)
|
||||
(pickup-type health)
|
||||
(- (-> gp-0 damage))
|
||||
(the-as handle #f)
|
||||
)
|
||||
(pickup-collectable! (-> self fact-override) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(target-hit-effect gp-0)
|
||||
@@ -3221,9 +3216,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (and (= (-> self game mode) 'play)
|
||||
(>= 0.0 (-> (the-as fact-info-target (-> self fact-info-override)) health))
|
||||
)
|
||||
(when (not (and (= (-> self game mode) 'play) (>= 0.0 (-> (the-as fact-info-target (-> self fact-override)) health)))
|
||||
)
|
||||
(when (= (-> gp-0 knock) 8)
|
||||
(set-quaternion! (-> self control) (-> self control dir-targ))
|
||||
@@ -3251,9 +3244,7 @@
|
||||
)
|
||||
(target-hit-move gp-0 (target-hit-orient gp-0 s5-0) target-board-falling-anim-trans (-> gp-0 speed))
|
||||
)
|
||||
(if (and (= (-> self game mode) 'play)
|
||||
(>= 0.0 (-> (the-as fact-info-target (-> self fact-info-override)) health))
|
||||
)
|
||||
(if (and (= (-> self game mode) 'play) (>= 0.0 (-> (the-as fact-info-target (-> self fact-override)) health)))
|
||||
(go target-death (-> gp-0 mode))
|
||||
)
|
||||
)
|
||||
|
||||
+1
-13
@@ -1,8 +1,5 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 7 of type board
|
||||
;; WARN: Return type mismatch process-drawable vs board.
|
||||
(defmethod relocate board ((obj board) (arg0 int))
|
||||
(if (nonzero? (-> obj main))
|
||||
(&+! (-> obj main) arg0)
|
||||
@@ -10,13 +7,10 @@
|
||||
(the-as board ((method-of-type process-drawable relocate) obj arg0))
|
||||
)
|
||||
|
||||
;; definition for function board-post
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior board-post board ()
|
||||
(let* ((a0-0 (-> self parent))
|
||||
(v1-0 (if a0-0
|
||||
(the-as target (-> (the-as target (-> a0-0 0)) self))
|
||||
(-> (the-as target (-> a0-0 0)) self-override)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -57,7 +51,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate hidden (board)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
@@ -86,7 +79,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (board)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
@@ -137,7 +129,6 @@
|
||||
:post board-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate use (board)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
@@ -200,9 +191,6 @@
|
||||
:post board-post
|
||||
)
|
||||
|
||||
;; definition for function board-init
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior board-init board ()
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(initialize-skeleton
|
||||
|
||||
+38
-20
@@ -2635,12 +2635,12 @@
|
||||
(send-event (handle->process (-> obj process 0 notify)) 'notify 'trick-point arg0)
|
||||
(when (and (< (-> obj trick-count) 16)
|
||||
(and (< 0.0 arg1)
|
||||
(nonzero? (-> (the-as fact-info-target (-> obj process 0 fact-info-override)) trick-point-duration))
|
||||
(nonzero? (-> (the-as fact-info-target (-> obj process 0 fact-override)) trick-point-duration))
|
||||
)
|
||||
)
|
||||
(let ((s4-0 0))
|
||||
(when (>= (- (-> *display* game-clock frame-counter)
|
||||
(-> (the-as fact-info-target (-> obj process 0 fact-info-override)) trick-point-pickup-time)
|
||||
(-> (the-as fact-info-target (-> obj process 0 fact-override)) trick-point-pickup-time)
|
||||
)
|
||||
(seconds 30)
|
||||
)
|
||||
@@ -2752,25 +2752,43 @@
|
||||
|
||||
(defmethod flush-trick-list board-info ((obj board-info))
|
||||
"Flush trick list and give out points."
|
||||
(let ((f30-0 0.0))
|
||||
(dotimes (v1-0 (-> obj trick-count))
|
||||
(+! f30-0 (-> obj trick-points-array v1-0))
|
||||
)
|
||||
(when (< 0.0 f30-0)
|
||||
(send-event
|
||||
(handle->process (-> obj process 0 notify))
|
||||
'notify
|
||||
'trick-flush
|
||||
f30-0
|
||||
(-> obj trick-list)
|
||||
(-> obj trick-count)
|
||||
(with-pp
|
||||
(let ((f30-0 0.0))
|
||||
(dotimes (v1-0 (-> obj trick-count))
|
||||
(+! f30-0 (-> obj trick-points-array v1-0))
|
||||
)
|
||||
(when (< 0.0 f30-0)
|
||||
(send-event
|
||||
(handle->process (-> obj process 0 notify))
|
||||
'notify
|
||||
'trick-flush
|
||||
f30-0
|
||||
(-> obj trick-list)
|
||||
(-> obj trick-count)
|
||||
)
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) (process->ppointer pp))
|
||||
(set! (-> a1-1 num-params) 2)
|
||||
(set! (-> a1-1 message) 'get-pickup)
|
||||
(set! (-> a1-1 param 0) (the-as uint 19))
|
||||
(set! (-> a1-1 param 1) (the-as uint f30-0))
|
||||
(let ((t9-1 send-event-function)
|
||||
(v1-22 (-> obj process))
|
||||
)
|
||||
(t9-1
|
||||
(if v1-22
|
||||
(-> v1-22 0 self-override)
|
||||
)
|
||||
a1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(sound-play "trick-score")
|
||||
)
|
||||
(send-event (ppointer->process (-> obj process)) 'get-pickup 19 f30-0)
|
||||
(sound-play "trick-score")
|
||||
)
|
||||
(set! (-> obj trick-count) 0)
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
(set! (-> obj trick-count) 0)
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+9
-13
@@ -6,8 +6,8 @@
|
||||
(set! (-> self control unknown-time-frame02) (-> self clock frame-counter))
|
||||
)
|
||||
(surface-mult! (-> self control unknown-surface01) (-> self control unknown-surface00) (-> self control surf))
|
||||
(when (and (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 3)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 3)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(or (= (-> self control unknown-surface00 name) 'run) (= (-> self control unknown-surface00 name) 'jump))
|
||||
)
|
||||
@@ -530,14 +530,7 @@
|
||||
|
||||
(defbehavior set-pad target ((arg0 vector))
|
||||
(set! (-> self control unknown-float12) (vector-length arg0))
|
||||
(let ((s5-0 vector-matrix*!)
|
||||
(s4-0 (-> self control unknown-vector12))
|
||||
(s3-0 arg0)
|
||||
(t9-0 matrix-world->local)
|
||||
)
|
||||
#t
|
||||
(s5-0 s4-0 s3-0 (t9-0))
|
||||
)
|
||||
(vector-matrix*! (-> self control unknown-vector12) arg0 (matrix-world->local #t #f))
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -2462,7 +2455,10 @@
|
||||
)
|
||||
(vector-matrix*! (-> self control unknown-vector28) (-> *TARGET-bank* head-offset) a2-5)
|
||||
)
|
||||
(vector<-cspace! (-> self control unknown-vector33) (the-as cspace (-> self control unknown-vector32 x)))
|
||||
(vector<-cspace!
|
||||
(the-as vector (&-> (-> self control) unknown-cspacei1un23i1 bone))
|
||||
(-> self control unknown-cspacei1un23i1 parent)
|
||||
)
|
||||
(let ((gp-0 (new-stack-vector0))
|
||||
(s5-0 (new-stack-vector0))
|
||||
)
|
||||
@@ -3250,7 +3246,7 @@
|
||||
(set! (-> obj control unknown-vector29 x) (the-as float (-> obj node-list data 45)))
|
||||
(set! (-> obj control unknown-vector29 y) (the-as float (-> obj node-list data 55)))
|
||||
(set! (-> obj control unknown-vector29 y) (the-as float (-> obj node-list data 55)))
|
||||
(set! (-> obj control unknown-vector32 x) (the-as float (-> obj node-list data 23)))
|
||||
(set! (-> obj control unknown-cspacei1un23i1 parent) (-> obj node-list data 23))
|
||||
(set! (-> obj neck) (new 'process 'joint-mod (joint-mod-mode look-at) obj 8))
|
||||
(set! (-> obj neck parented-scale?) #t)
|
||||
(set! (-> obj neck base-joint) (the-as uint 6))
|
||||
@@ -3281,7 +3277,7 @@
|
||||
(set! (-> obj leg-ik 1 elbow-rotation-axis) (the-as uint 0))
|
||||
(set! (-> obj foot 0) (new 'process 'joint-mod (joint-mod-mode foot-rot) obj 29))
|
||||
(set! (-> obj foot 1) (new 'process 'joint-mod (joint-mod-mode foot-rot) obj 36))
|
||||
(set! (-> obj fact-info-override)
|
||||
(set! (-> obj fact-override)
|
||||
(new 'process 'fact-info-target obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
|
||||
)
|
||||
(target-gun-setup (logtest? (-> obj game features) (game-feature unk-game-feature-06)))
|
||||
|
||||
+92
-84
@@ -1,7 +1,5 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type carry-info
|
||||
(deftype carry-info (basic)
|
||||
((process (pointer target) :offset-assert 4)
|
||||
(pickup-time time-frame :offset-assert 8)
|
||||
@@ -41,7 +39,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type carry-info
|
||||
(defmethod inspect carry-info ((obj carry-info))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
@@ -85,8 +82,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 0 of type carry-info
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod new carry-info ((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 process-drawable)
|
||||
@@ -129,8 +124,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type carry-info
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod carry-info-method-9 carry-info ((obj carry-info))
|
||||
(let ((s5-0 (-> obj process 0 node-list data (-> obj joint) bone transform)))
|
||||
(vector-rotate*! (-> obj normal) (-> obj local-normal) s5-0)
|
||||
@@ -140,7 +133,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type carry-info
|
||||
(defmethod distance-from-destination carry-info ((obj carry-info) (arg0 carry-info))
|
||||
"Returns the distance from the current `point` and the provided [[carry-info]]'s `point`.
|
||||
Returns `-1.0` if it exceeds the maximum allowed"
|
||||
@@ -214,9 +206,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type carry-info
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod drag! carry-info ((obj carry-info) (arg0 carry-info))
|
||||
(let ((v1-0 (-> arg0 process)))
|
||||
(set! (-> obj other) (the-as handle (logior (if v1-0
|
||||
@@ -286,25 +275,36 @@
|
||||
(-> arg0 local-point z)
|
||||
)
|
||||
)
|
||||
(change-parent (ppointer->process (-> arg0 process)) (ppointer->process (-> obj process)))
|
||||
(let* ((v1-46 (-> arg0 process))
|
||||
(v1-49
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if v1-46
|
||||
(the-as process-drawable (-> v1-46 0 self))
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
(let* ((t9-13 change-parent)
|
||||
(v1-42 (-> arg0 process))
|
||||
(a0-28 (if v1-42
|
||||
(-> v1-42 0 self-override)
|
||||
)
|
||||
)
|
||||
(v1-44 (-> obj process))
|
||||
)
|
||||
(t9-13 a0-28 (if v1-44
|
||||
(-> v1-44 0 self-override)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((v1-46 (-> arg0 process))
|
||||
(v1-49 (-> (the-as collide-shape (-> (the-as process-drawable (if v1-46
|
||||
(-> v1-46 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-30 (-> v1-49 prim-core collide-as))
|
||||
(a1-25 (-> arg0 process))
|
||||
)
|
||||
(set! (-> (the-as collide-shape (-> (the-as process-drawable (if a1-25
|
||||
(the-as process-drawable (-> a1-25 0 self))
|
||||
(-> a1-25 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
@@ -319,7 +319,7 @@
|
||||
(a0-31 (-> arg0 process))
|
||||
)
|
||||
(set! (-> (the-as collide-shape (-> (the-as process-drawable (if a0-31
|
||||
(the-as process-drawable (-> a0-31 0 self))
|
||||
(-> a0-31 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
@@ -332,17 +332,16 @@
|
||||
)
|
||||
)
|
||||
(let* ((v1-51 (-> arg0 process))
|
||||
(v1-54
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if v1-51
|
||||
(the-as process-drawable (-> v1-51 0 self))
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
(v1-54 (-> (the-as collide-shape (-> (the-as process-drawable (if v1-51
|
||||
(-> v1-51 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-54 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-54 prim-core collide-with) (collide-spec))
|
||||
@@ -352,8 +351,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type carry-info
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod drop-impl! carry-info ((obj carry-info) (arg0 carry-info))
|
||||
(let ((a1-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> arg0 process 0 control quat))))
|
||||
(set! (-> a1-2 y) 0.0)
|
||||
@@ -371,24 +368,32 @@
|
||||
)
|
||||
(set! (-> obj other) (the-as handle #f))
|
||||
(set! (-> arg0 other) (the-as handle #f))
|
||||
(change-parent (ppointer->process (-> arg0 process)) *entity-pool*)
|
||||
(let ((t9-3 change-parent)
|
||||
(v1-11 (-> arg0 process))
|
||||
)
|
||||
(t9-3
|
||||
(if v1-11
|
||||
(-> v1-11 0 self-override)
|
||||
)
|
||||
*entity-pool*
|
||||
)
|
||||
)
|
||||
(let* ((v1-13 (-> arg0 process))
|
||||
(v1-16
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if v1-13
|
||||
(the-as process-drawable (-> v1-13 0 self))
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
(v1-16 (-> (the-as collide-shape (-> (the-as process-drawable (if v1-13
|
||||
(-> v1-13 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-8 (-> arg0 process)))
|
||||
(set! (-> v1-16 prim-core collide-as)
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if a0-8
|
||||
(the-as process-drawable (-> a0-8 0 self))
|
||||
(-> a0-8 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
@@ -401,7 +406,7 @@
|
||||
(let ((a0-12 (-> arg0 process)))
|
||||
(set! (-> v1-16 prim-core collide-with)
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if a0-12
|
||||
(the-as process-drawable (-> a0-12 0 self))
|
||||
(-> a0-12 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
@@ -416,8 +421,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type carry-info
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod carry-info-method-13 carry-info ((obj carry-info))
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) (process->ppointer self))
|
||||
@@ -484,9 +487,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type carry-info
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defmethod carry! carry-info ((obj carry-info) (arg0 carry-info) (arg1 vector) (arg2 vector))
|
||||
(let ((v1-0 (-> arg0 process)))
|
||||
(set! (-> obj other) (the-as handle (logior (if v1-0
|
||||
@@ -537,25 +537,36 @@
|
||||
)
|
||||
)
|
||||
(vector+float*! arg1 (-> arg0 point) arg2 (- (-> arg0 carry-radius)))
|
||||
(change-parent (ppointer->process (-> arg0 process)) (ppointer->process (-> obj process)))
|
||||
(let* ((t9-7 change-parent)
|
||||
(v1-42 (-> arg0 process))
|
||||
(a0-30 (if v1-42
|
||||
(-> v1-42 0 self-override)
|
||||
)
|
||||
)
|
||||
(v1-44 (-> obj process))
|
||||
)
|
||||
(t9-7 a0-30 (if v1-44
|
||||
(-> v1-44 0 self-override)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((v1-46 (-> arg0 process))
|
||||
(v1-49
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if v1-46
|
||||
(the-as process-drawable (-> v1-46 0 self))
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
(v1-49 (-> (the-as collide-shape (-> (the-as process-drawable (if v1-46
|
||||
(-> v1-46 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-32 (-> v1-49 prim-core collide-as))
|
||||
(a1-7 (-> arg0 process))
|
||||
)
|
||||
(set! (-> (the-as collide-shape (-> (the-as process-drawable (if a1-7
|
||||
(the-as process-drawable (-> a1-7 0 self))
|
||||
(-> a1-7 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
@@ -570,7 +581,7 @@
|
||||
(a0-33 (-> arg0 process))
|
||||
)
|
||||
(set! (-> (the-as collide-shape (-> (the-as process-drawable (if a0-33
|
||||
(the-as process-drawable (-> a0-33 0 self))
|
||||
(-> a0-33 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
@@ -583,17 +594,16 @@
|
||||
)
|
||||
)
|
||||
(let* ((v1-51 (-> arg0 process))
|
||||
(v1-54
|
||||
(-> (the-as collide-shape (-> (the-as process-drawable (if v1-51
|
||||
(the-as process-drawable (-> v1-51 0 self))
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
(v1-54 (-> (the-as collide-shape (-> (the-as process-drawable (if v1-51
|
||||
(-> v1-51 0 self-override)
|
||||
)
|
||||
)
|
||||
root
|
||||
)
|
||||
)
|
||||
root-prim
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-54 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-54 prim-core collide-with) (collide-spec))
|
||||
@@ -602,7 +612,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 16 of type carry-info
|
||||
(defmethod translate! carry-info ((obj carry-info))
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) (process->ppointer self))
|
||||
@@ -619,7 +628,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type carry-info
|
||||
(defmethod drop! carry-info ((obj carry-info) (arg0 carry-info))
|
||||
(drop-impl! obj arg0)
|
||||
(none)
|
||||
|
||||
+817
@@ -0,0 +1,817 @@
|
||||
(in-package goal)
|
||||
|
||||
(define *carry-walk-mods* (new 'static 'surface
|
||||
:name 'run
|
||||
:turnv 524288.0
|
||||
:turnvv 910222.25
|
||||
:tiltv 65536.0
|
||||
:tiltvv 262144.0
|
||||
:transv-max 24576.0
|
||||
:target-speed 24576.0
|
||||
:seek0 1.0
|
||||
:seek90 1.0
|
||||
:seek180 1.0
|
||||
:fric 1.0
|
||||
:nonlin-fric-dist 1.0
|
||||
:slip-factor 1.0
|
||||
:slide-factor 1.0
|
||||
:slope-up-factor 1.0
|
||||
:slope-down-factor 1.0
|
||||
:slope-slip-angle 1.0
|
||||
:impact-fric 1.0
|
||||
:bend-factor 1.0
|
||||
:bend-speed 1.0
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:turnvf 30.0
|
||||
:turnvvf 30.0
|
||||
:tiltvf 150.0
|
||||
:tiltvvf 15.0
|
||||
:flags (surface-flag look-around no-turn-around gun-off)
|
||||
)
|
||||
)
|
||||
|
||||
(define *carry-jump-mods* (new 'static 'surface
|
||||
:name 'jump
|
||||
:turnv 524288.0
|
||||
:turnvv 910222.25
|
||||
:tiltv 65536.0
|
||||
:tiltvv 262144.0
|
||||
:transv-max 24576.0
|
||||
:target-speed 24576.0
|
||||
:seek0 0.3
|
||||
:seek90 0.3
|
||||
:seek180 0.3
|
||||
:fric 0.2
|
||||
:nonlin-fric-dist 1.0
|
||||
:slip-factor 1.0
|
||||
:slide-factor 1.0
|
||||
:slope-up-factor 1.0
|
||||
:slope-down-factor 1.0
|
||||
:slope-slip-angle 1.0
|
||||
:impact-fric 1.0
|
||||
:bend-factor 1.0
|
||||
:bend-speed 1.0
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:turnvf 30.0
|
||||
:turnvvf 30.0
|
||||
:tiltvf 150.0
|
||||
:tiltvvf 15.0
|
||||
:mode 'air
|
||||
:flags (surface-flag air gun-off)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior target-carry-update target ()
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(when (and (= (-> self control unknown-symbol00) 'carry) (< (-> self control unknown-float000) 1.0))
|
||||
(let ((gp-0 (new 'stack-no-clear 'collide-query))
|
||||
(s5-0 (new 'stack-no-clear 'inline-array 'sphere 1))
|
||||
)
|
||||
(dotimes (s4-0 1)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-0 s4-0)) sphere)
|
||||
)
|
||||
(let ((f30-0 (seek (-> self control unknown-float000) 1.0 (* 0.1 (-> self clock time-adjust-ratio)))))
|
||||
(set! (-> s5-0 0 quad) (-> self control unknown-sphere-array00 2 prim-core world-sphere quad))
|
||||
(set! (-> s5-0 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 7372.8 f30-0 0.0 1.0))
|
||||
(let ((v1-17 gp-0))
|
||||
(set! (-> v1-17 spheres) s5-0)
|
||||
(set! (-> v1-17 num-spheres) (the-as uint 1))
|
||||
(set! (-> v1-17 collide-with) (-> self control root-prim prim-core collide-with))
|
||||
(set! (-> v1-17 ignore-process0) #f)
|
||||
(set! (-> v1-17 ignore-process1) #f)
|
||||
(set! (-> v1-17 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-17 best-my-prim) (the-as collide-shape-prim #t))
|
||||
(set! (-> v1-17 action-mask) (collide-action solid))
|
||||
)
|
||||
(if (not (fill-and-probe-using-spheres *collide-cache* gp-0))
|
||||
(target-collide-set! 'carry f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (handle->process (-> self carry other)) 'carry (-> self carry))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior target-carry-post target ()
|
||||
(target-post)
|
||||
(target-carry-update)
|
||||
(set! (-> self focus-status) (logior (focus-status carry) (-> self focus-status)))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate target-carry-pickup (target)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 1920)
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 0)
|
||||
(set! (-> a1-2 message) 'carry?)
|
||||
(let ((a1-3 (send-event-function proc a1-2)))
|
||||
(when a1-3
|
||||
(let ((f0-0 (distance-from-destination (-> self carry) (the-as carry-info a1-3))))
|
||||
(when (and (>= f0-0 0.0) (< f0-0 (-> self carry other-value)))
|
||||
(set! (-> self carry other) (process->handle proc))
|
||||
(set! (-> self carry other-value) f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self carry other) (the-as handle #f))
|
||||
(set! (-> self carry other-value) 100000000000.0)
|
||||
(set! (-> self carry max-distance) 12288.0)
|
||||
(set! (-> self carry mode) (carry-mode carry))
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name)))
|
||||
(or (= v1-3 'target-carry-stance)
|
||||
(= v1-3 'target-carry-walk)
|
||||
(= v1-3 'target-carry-drop)
|
||||
(= v1-3 'target-carry-throw)
|
||||
(= v1-3 'target-carry-jump)
|
||||
(= v1-3 'target-carry-falling)
|
||||
(= v1-3 'target-carry-hit-ground)
|
||||
(= v1-3 'target-carry-throw)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self focus-status) (focus-status carry))
|
||||
(send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(target-exit)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((f30-0 0.0))
|
||||
(let ((f28-0 0.0))
|
||||
(ja-channel-push! 2 (seconds 0.1))
|
||||
(target-danger-set! 'carry? #f)
|
||||
(ja :group! (-> self draw art-group data 319) :num! min)
|
||||
(let ((a0-3 (-> self skel root-channel 1)))
|
||||
(set! (-> a0-3 frame-interp 1) f30-0)
|
||||
(set! (-> a0-3 frame-interp 0) f30-0)
|
||||
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> self draw art-group data 318)))
|
||||
(set! (-> a0-3 param 0) 0.0)
|
||||
(joint-control-channel-group-eval!
|
||||
a0-3
|
||||
(the-as art-joint-anim (-> self draw art-group data 318))
|
||||
num-func-chan
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(format #t "carry picked ~A~%" (handle->process (-> self carry other)))
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) (process->ppointer self))
|
||||
(set! (-> a1-5 num-params) 0)
|
||||
(set! (-> a1-5 message) 'carry-info)
|
||||
(let ((gp-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-5))))
|
||||
(when gp-1
|
||||
(let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-1 point) (-> self control trans)))
|
||||
(s4-0 (new-stack-vector0))
|
||||
(f26-0 (vector-dot (-> self control local-normal) s5-1))
|
||||
)
|
||||
0.0
|
||||
(vector-! s4-0 s5-1 (vector-float*! s4-0 (-> self control local-normal) f26-0))
|
||||
(let* ((f24-0 (vector-length s4-0))
|
||||
(f22-0 f24-0)
|
||||
)
|
||||
(set! f28-0 (lerp-scale 1.0 0.0 f26-0 1638.4 4505.6))
|
||||
(vector+!
|
||||
s5-1
|
||||
(vector-float*! s5-1 (-> self control local-normal) f26-0)
|
||||
(vector-float*! s4-0 s4-0 (/ f24-0 f22-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(forward-up-nopitch->quaternion
|
||||
(-> self control dir-targ)
|
||||
(vector-normalize! (vector-! (new-stack-vector0) (-> gp-1 point) (-> self control trans)) 1.0)
|
||||
(vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(target-danger-set! 'harmless #f)
|
||||
(ja-no-eval :num! (seek! (ja-aframe 5.0 0)))
|
||||
(while (not (ja-done? 0))
|
||||
(set! f30-0 (seek f30-0 f28-0 (* 5.0 (-> self clock seconds-per-frame))))
|
||||
(let ((v1-45 (-> self skel root-channel 1)))
|
||||
(set! (-> v1-45 frame-interp 1) f30-0)
|
||||
(set! (-> v1-45 frame-interp 0) f30-0)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(when (send-event (handle->process (-> self carry other)) 'pickup (-> self carry))
|
||||
(target-collide-set! 'carry 0.0)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(set! f30-0 (seek f30-0 f28-0 (* 5.0 (-> self clock seconds-per-frame))))
|
||||
(let ((v1-70 (-> self skel root-channel 1)))
|
||||
(set! (-> v1-70 frame-interp 1) f30-0)
|
||||
(set! (-> v1-70 frame-interp 0) f30-0)
|
||||
)
|
||||
(when (< 22.0 (ja-aframe-num 0))
|
||||
(let ((a1-22 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-22 from) (process->ppointer self))
|
||||
(set! (-> a1-22 num-params) 0)
|
||||
(set! (-> a1-22 message) 'carry-info)
|
||||
(let ((gp-4 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-22))))
|
||||
(if gp-4
|
||||
(seek! (-> gp-4 grab-trans-blend) 0.0 (* 2.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
)
|
||||
(ja-no-eval :num! (seek! 0.0))
|
||||
(while (not (ja-done? 0))
|
||||
(let ((v1-93 (-> self skel root-channel 1)))
|
||||
(set! (-> v1-93 frame-interp 1) f30-0)
|
||||
(set! (-> v1-93 frame-interp 0) f30-0)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post (behavior ()
|
||||
(target-no-stick-post)
|
||||
(carry-info-method-9 (-> self carry))
|
||||
(target-carry-update)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate target-carry-drop (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set-forward-vel 0.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((f30-0 1.0))
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) (process->ppointer self))
|
||||
(set! (-> a1-0 num-params) 0)
|
||||
(set! (-> a1-0 message) 'carry-info)
|
||||
(let ((a0-5 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-0))))
|
||||
(when a0-5
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> a0-5 point quad))
|
||||
(set! (-> gp-0 y) (- (-> gp-0 y) (-> a0-5 process 0 control root-prim prim-core world-sphere w)))
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(f28-0 (vector-dot (-> self control local-normal) gp-0))
|
||||
)
|
||||
0.0
|
||||
(vector-! s5-0 gp-0 (vector-float*! s5-0 (-> self control local-normal) f28-0))
|
||||
(let* ((f26-0 (vector-length s5-0))
|
||||
(f24-0 f26-0)
|
||||
)
|
||||
(set! f30-0 (lerp-scale 1.0 0.0 f28-0 1638.4 4505.6))
|
||||
(vector+!
|
||||
gp-0
|
||||
(vector-float*! gp-0 (-> self control local-normal) f28-0)
|
||||
(vector-float*! s5-0 s5-0 (/ f26-0 f24-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-channel-push! 2 (seconds 0.1))
|
||||
(ja :group! (-> self draw art-group data 319)
|
||||
:num! (identity (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 319)) frames num-frames) -1)))
|
||||
)
|
||||
(let ((a0-16 (-> self skel root-channel 1)))
|
||||
(set! (-> a0-16 frame-interp 1) f30-0)
|
||||
(set! (-> a0-16 frame-interp 0) f30-0)
|
||||
(set! (-> a0-16 frame-group) (the-as art-joint-anim (-> self draw art-group data 318)))
|
||||
(set! (-> a0-16 param 0) 0.0)
|
||||
(joint-control-channel-group-eval!
|
||||
a0-16
|
||||
(the-as art-joint-anim (-> self draw art-group data 318))
|
||||
num-func-chan
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-no-eval :num! (seek! (ja-aframe 5.0 0)))
|
||||
(while (not (ja-done? 0))
|
||||
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-9 from) (process->ppointer self))
|
||||
(set! (-> a1-9 num-params) 0)
|
||||
(set! (-> a1-9 message) 'carry-info)
|
||||
(let ((gp-4 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-9))))
|
||||
(when gp-4
|
||||
(if (< 22.0 (ja-aframe-num 0))
|
||||
(seek! (-> gp-4 grab-trans-blend) 1.0 (* 2.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(let ((s4-0 (-> gp-4 process 0 control))
|
||||
(gp-5 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'inline-array 'sphere 1)))
|
||||
(dotimes (s3-0 1)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-1 s3-0)) sphere)
|
||||
)
|
||||
(set! (-> s5-1 0 quad) (-> s4-0 root-prim prim-core world-sphere quad))
|
||||
(let ((v1-64 gp-5))
|
||||
(set! (-> v1-64 spheres) s5-1)
|
||||
(set! (-> v1-64 num-spheres) (the-as uint 1))
|
||||
(set! (-> v1-64 collide-with) (-> self control root-prim prim-core collide-with))
|
||||
(set! (-> v1-64 ignore-process0) #f)
|
||||
(set! (-> v1-64 ignore-process1) #f)
|
||||
(set! (-> v1-64 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-64 best-my-prim) (the-as collide-shape-prim #t))
|
||||
(set! (-> v1-64 action-mask) (collide-action solid))
|
||||
)
|
||||
)
|
||||
(when (fill-and-probe-using-spheres *collide-cache* gp-5)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(when (< 22.0 (ja-aframe-num 0))
|
||||
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-14 from) (process->ppointer self))
|
||||
(set! (-> a1-14 num-params) 0)
|
||||
(set! (-> a1-14 message) 'carry-info)
|
||||
(let ((gp-6 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-14))))
|
||||
(if gp-6
|
||||
(seek! (-> gp-6 grab-trans-blend) 0.0 (* 2.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(ja-no-eval :num! (seek! 0.0))
|
||||
(while (not (ja-done? 0))
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post (-> target-carry-pickup post)
|
||||
)
|
||||
|
||||
(defstate target-carry-stance (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *carry-walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
((-> target-carry-pickup exit))
|
||||
(set! (-> self control unknown-float29) 0.0)
|
||||
(target-state-hook-exit)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (move-legs?)
|
||||
(set! (-> self control unknown-float29) 0.0)
|
||||
(remove-exit)
|
||||
(go target-carry-walk)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) r1)
|
||||
(go target-carry-drop)
|
||||
)
|
||||
(when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 2)
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(can-jump? #f)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-17 (-> *TARGET-bank* carry-jump-height-min))
|
||||
(a1-2 (-> *TARGET-bank* carry-jump-height-max))
|
||||
)
|
||||
(go target-carry-jump a0-17 a1-2)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) square) (can-hands? #t))
|
||||
(go target-carry-throw)
|
||||
)
|
||||
(fall-test (the-as (state symbol target) target-carry-falling) -4096000.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((v1-2 (ja-group)))
|
||||
(when (not (and v1-2 (= v1-2 (-> self draw art-group data 316))))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja :group! (-> self draw art-group data 316))
|
||||
)
|
||||
)
|
||||
(until #f
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-walk (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set! (-> self control unknown-surface00) *carry-walk-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
((-> target-carry-pickup exit))
|
||||
(target-effect-exit)
|
||||
(target-state-hook-exit)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (not (move-legs?))
|
||||
(target-effect-exit)
|
||||
(remove-exit)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) r1)
|
||||
(go target-carry-drop)
|
||||
)
|
||||
(when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 2)
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(can-jump? #f)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-17 (-> *TARGET-bank* carry-jump-height-min))
|
||||
(a1-2 (-> *TARGET-bank* carry-jump-height-max))
|
||||
)
|
||||
(go target-carry-jump a0-17 a1-2)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) square) (can-hands? #t))
|
||||
(go target-carry-throw)
|
||||
)
|
||||
(fall-test (the-as (state symbol target) target-carry-falling) -4096000.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((v1-2 (ja-group)))
|
||||
(when (not (and v1-2 (= v1-2 (-> self draw art-group data 317))))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja :group! (-> self draw art-group data 317) :dist (-> *TARGET-bank* walk-cycle-dist))
|
||||
)
|
||||
)
|
||||
(until #f
|
||||
(suspend)
|
||||
(let* ((f0-2 (* (current-cycle-distance (-> self skel)) (-> self control scale x)))
|
||||
(f0-4 (/ (-> self control unknown-float05) (* 1.25 f0-2)))
|
||||
)
|
||||
(ja :num! (loop! f0-4))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-falling (target)
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *carry-jump-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
|
||||
(go target-carry-hit-ground #f)
|
||||
)
|
||||
(let* ((f0-0 (target-move-dist (-> *TARGET-bank* stuck-time)))
|
||||
(v1-9 (ja-group))
|
||||
(v1-12 (if (and v1-9 (= v1-9 (-> self draw art-group data 322)))
|
||||
15
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (if (and (< f0-0 (-> *TARGET-bank* stuck-distance))
|
||||
(and (>= v1-12 0)
|
||||
(>= (- (-> self clock frame-counter) (-> self state-time)) v1-12)
|
||||
(not (and *cheat-mode* (cpad-hold? (-> self control unknown-cpad-info00 number) r2)))
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
(logior! (-> self control status) (cshape-moving-flags on-surface))
|
||||
(go target-carry-hit-ground 'stuck)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((v1-2 (ja-group)))
|
||||
(cond
|
||||
((and v1-2 (= v1-2 (-> self draw art-group data 322)))
|
||||
)
|
||||
(else
|
||||
(ja-channel-push! 1 (seconds 0.33))
|
||||
(ja :group! (-> self draw art-group data 322))
|
||||
(while (!= (-> self skel root-channel 0) (-> self skel channel))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-no-eval :group! (-> self draw art-group data 322) :num! (loop!) :frame-num 0.0)
|
||||
(until #f
|
||||
(suspend)
|
||||
(ja :group! (-> self draw art-group data 27) :num! (loop!))
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-hit-ground (target)
|
||||
:event target-walk-event-handler
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(case arg0
|
||||
(('stuck)
|
||||
)
|
||||
(else
|
||||
(target-land-effect)
|
||||
)
|
||||
)
|
||||
(set! (-> self control unknown-time-frame11) 0)
|
||||
(set! (-> self control unknown-time-frame12) 0)
|
||||
(if (>= (-> self control ground-impact-vel) (-> *TARGET-bank* fall-stumble-threshold))
|
||||
(set-forward-vel 0.0)
|
||||
)
|
||||
(if (!= (-> self control ground-pat material) (pat-material ice))
|
||||
(delete-back-vel)
|
||||
)
|
||||
(set! (-> self control unknown-surface00) *carry-walk-mods*)
|
||||
(start-bobbing!
|
||||
(-> self water)
|
||||
(lerp-scale 0.0 4096.0 (-> self control ground-impact-vel) 40960.0 102400.0)
|
||||
600
|
||||
1500
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self state-flags) (state-flags lleg-still rleg-still))
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 2)
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(can-jump? #f)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-16 (-> *TARGET-bank* carry-jump-height-min))
|
||||
(a1-2 (-> *TARGET-bank* carry-jump-height-max))
|
||||
)
|
||||
(go target-carry-jump a0-16 a1-2)
|
||||
)
|
||||
)
|
||||
(if (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(go target-carry-walk)
|
||||
)
|
||||
(fall-test (the-as (state symbol target) target-carry-falling) -4096000.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 #f)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-jump (target)
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(sound-play "jump" :vol 70)
|
||||
(init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0)
|
||||
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
|
||||
(set! (-> self control unknown-surface00) *carry-jump-mods*)
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float05)))))
|
||||
)
|
||||
(set! (-> self control unknown-float35)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float05)))))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
((-> target-carry-pickup exit))
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))
|
||||
)
|
||||
)
|
||||
((-> target-carry-falling trans))
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
|
||||
(seek!
|
||||
(-> self control unknown-float35)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float05)))))
|
||||
(-> self clock seconds-per-frame)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(ja-channel-push! 1 (seconds 0.05))
|
||||
(ja :group! (-> self draw art-group data 321) :num! min)
|
||||
(suspend)
|
||||
(ja :group! (-> self draw art-group data 321) :num! (+!))
|
||||
(suspend)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(f0-4 (- 6.0 (ja-aframe-num 0)))
|
||||
(gp-1 (-> self skel root-channel 0))
|
||||
)
|
||||
(set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1)))
|
||||
(let ((v1-27 (and (< 0.0 f30-0) (< 0.0 f0-4))))
|
||||
(set! (-> gp-1 param 1)
|
||||
(if v1-27
|
||||
(fmin (fmin 3.0 f0-4) (/ (* 5.0 f0-4) (the float (time-to-apex f30-0 -245760.0))))
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(go target-carry-falling)
|
||||
(none)
|
||||
)
|
||||
:post target-carry-post
|
||||
)
|
||||
|
||||
(defstate target-carry-throw (target)
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(set-forward-vel 0.0)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja-no-eval :group! (-> self draw art-group data 320) :num! (seek! (ja-aframe 19.0 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-3 from) (process->ppointer self))
|
||||
(set! (-> a1-3 num-params) 0)
|
||||
(set! (-> a1-3 message) 'carry-info)
|
||||
(let ((gp-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-3))))
|
||||
(if gp-1
|
||||
(seek! (-> gp-1 grab-trans-blend) 1.0 (* 4.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 19.0 0)))
|
||||
)
|
||||
(let ((a1-7 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-7 from) (process->ppointer self))
|
||||
(set! (-> a1-7 num-params) 0)
|
||||
(set! (-> a1-7 message) 'carry-info)
|
||||
(let ((v1-30 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-7))))
|
||||
(when v1-30
|
||||
(let ((s4-0 (-> v1-30 process 0 control))
|
||||
(gp-3 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'inline-array 'sphere 1)))
|
||||
(dotimes (s3-0 1)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-0 s3-0)) sphere)
|
||||
)
|
||||
(set! (-> s5-0 0 quad) (-> s4-0 root-prim prim-core world-sphere quad))
|
||||
(let ((v1-38 gp-3))
|
||||
(set! (-> v1-38 spheres) s5-0)
|
||||
(set! (-> v1-38 num-spheres) (the-as uint 1))
|
||||
(set! (-> v1-38 collide-with) (-> self control root-prim prim-core collide-with))
|
||||
(set! (-> v1-38 ignore-process0) #f)
|
||||
(set! (-> v1-38 ignore-process1) #f)
|
||||
(set! (-> v1-38 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-38 best-my-prim) (the-as collide-shape-prim #t))
|
||||
(set! (-> v1-38 action-mask) (collide-action solid))
|
||||
)
|
||||
)
|
||||
(when (fill-and-probe-using-spheres *collide-cache* gp-3)
|
||||
(ja-no-eval :num! (seek! 0.0))
|
||||
(while (not (ja-done? 0))
|
||||
(let ((a1-11 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-11 from) (process->ppointer self))
|
||||
(set! (-> a1-11 num-params) 0)
|
||||
(set! (-> a1-11 message) 'carry-info)
|
||||
(let ((gp-4 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-11))))
|
||||
(if gp-4
|
||||
(seek! (-> gp-4 grab-trans-blend) 0.0 (* 4.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-carry-stance)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-58 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 79764.13)))
|
||||
(vector+float*! v1-58 v1-58 (-> self control unknown-matrix01 vector 2) 32768.0)
|
||||
(send-event (handle->process (-> self carry other)) 'drop (-> self carry) v1-58)
|
||||
)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post (-> target-carry-pickup post)
|
||||
)
|
||||
+6
-12
@@ -48,9 +48,7 @@
|
||||
)
|
||||
)
|
||||
(or (and (not (and (logtest? (focus-status dark) (-> self focus-status)) (nonzero? (-> self darkjak))))
|
||||
(and (>= (- (-> self clock frame-counter)
|
||||
(-> (the-as fact-info-target (-> self fact-info-override)) darkjak-start-time)
|
||||
)
|
||||
(and (>= (- (-> self clock frame-counter) (-> (the-as fact-info-target (-> self fact-override)) darkjak-start-time))
|
||||
(seconds 0.05)
|
||||
)
|
||||
(>= (-> self game eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default))
|
||||
@@ -108,10 +106,8 @@
|
||||
)
|
||||
(target-danger-set! (-> self control unknown-symbol04) #f)
|
||||
(collide-shape-method-46 (-> self control))
|
||||
(if (and (or (>= (- (-> self clock frame-counter)
|
||||
(-> (the-as fact-info-target (-> self fact-info-override)) darkjak-start-time)
|
||||
)
|
||||
(-> (the-as fact-info-target (-> self fact-info-override)) darkjak-effect-time)
|
||||
(if (and (or (>= (- (-> self clock frame-counter) (-> (the-as fact-info-target (-> self fact-override)) darkjak-start-time))
|
||||
(-> (the-as fact-info-target (-> self fact-override)) darkjak-effect-time)
|
||||
)
|
||||
(not (-> *setting-control* user-current darkjak))
|
||||
)
|
||||
@@ -288,7 +284,7 @@
|
||||
(persist-with-delay *setting-control* 'bg-a-speed (seconds 3) 'bg-a-speed 'abs 0.5 0)
|
||||
(if (not (and (-> self next-state) (= (-> self next-state name) 'target-darkjak-get-off)))
|
||||
(pickup-collectable!
|
||||
(-> self fact-info-override)
|
||||
(-> self fact-override)
|
||||
(pickup-type eco-pill-dark)
|
||||
(- (-> *FACT-bank* eco-pill-dark-max-default))
|
||||
(the-as handle #f)
|
||||
@@ -319,10 +315,8 @@
|
||||
(set! (-> self darkjak-giant-interp) 1.0)
|
||||
(set-setting! 'sound-flava #f #x41f00000 4)
|
||||
(set! (-> self focus-status) (logior (focus-status dark) (-> self focus-status)))
|
||||
(set! (-> (the-as fact-info-target (-> self fact-info-override)) darkjak-start-time)
|
||||
(-> self clock frame-counter)
|
||||
)
|
||||
(set! (-> (the-as fact-info-target (-> self fact-info-override)) darkjak-effect-time) (seconds 20))
|
||||
(set! (-> (the-as fact-info-target (-> self fact-override)) darkjak-start-time) (-> self clock frame-counter))
|
||||
(set! (-> (the-as fact-info-target (-> self fact-override)) darkjak-effect-time) (seconds 20))
|
||||
(if (logtest? (-> self darkjak stage) 16)
|
||||
(logior! (-> self state-flags) (state-flags sf4))
|
||||
(logclear! (-> self state-flags) (state-flags sf4))
|
||||
|
||||
+1
-1
@@ -2346,7 +2346,7 @@
|
||||
(logtest? (state-flags sf16) (-> self state-flags))
|
||||
(logtest? (-> self game secrets) (game-secrets endless-ammo))
|
||||
)
|
||||
(pickup-collectable! (-> self fact-info-override) (the-as pickup-type a1-0) -1.0 (the-as handle #f))
|
||||
(pickup-collectable! (-> self fact-override) (the-as pickup-type a1-0) -1.0 (the-as handle #f))
|
||||
(case (-> gp-0 gun-type)
|
||||
(((pickup-type eco-blue))
|
||||
(cond
|
||||
|
||||
+1
-1
@@ -677,7 +677,7 @@
|
||||
(set! (-> v1-1 mode) 'damage)
|
||||
)
|
||||
(if (and (= (-> self game mode) 'play)
|
||||
(>= 0.0 (- (-> (the-as fact-info-target (-> self fact-info-override)) health) (-> v1-1 damage)))
|
||||
(>= 0.0 (- (-> (the-as fact-info-target (-> self fact-override)) health) (-> v1-1 damage)))
|
||||
)
|
||||
(set! (-> v1-1 mode) 'drown-death)
|
||||
)
|
||||
|
||||
+3
-3
@@ -731,7 +731,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(case (-> (the-as fact-info-target (-> self fact-info-override)) eco-type)
|
||||
(case (-> (the-as fact-info-target (-> self fact-override)) eco-type)
|
||||
((1)
|
||||
(set! (-> self control penetrate-using) (logior (penetrate eco-yellow) (-> self control penetrate-using)))
|
||||
)
|
||||
@@ -1433,8 +1433,8 @@
|
||||
)
|
||||
)
|
||||
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame11))
|
||||
(the-as time-frame (if (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 1)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(the-as time-frame (if (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 1)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(-> *TARGET-bank* yellow-attack-timeout)
|
||||
(-> *TARGET-bank* attack-timeout)
|
||||
|
||||
+18
-18
@@ -2235,8 +2235,8 @@
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(let ((s5-1 (method-of-object (-> self skel effect) effect-control-method-10)))
|
||||
'group-red-eco-spinkick
|
||||
@@ -2568,8 +2568,8 @@
|
||||
#f
|
||||
)
|
||||
)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(let ((s5-1 (method-of-object (-> self skel effect) effect-control-method-10)))
|
||||
'group-red-eco-spinkick
|
||||
@@ -3023,8 +3023,8 @@
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(let ((s5-0 (method-of-object (-> self skel effect) effect-control-method-10)))
|
||||
'group-red-eco-spinkick
|
||||
@@ -3325,8 +3325,8 @@
|
||||
(go target-attack-air 'uppercut)
|
||||
)
|
||||
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(let ((s5-0 (method-of-object (-> self skel effect) effect-control-method-10)))
|
||||
'group-red-eco-spinkick
|
||||
@@ -3450,8 +3450,8 @@
|
||||
)
|
||||
:enter (behavior ((arg0 float) (arg1 float) (arg2 float))
|
||||
(cond
|
||||
((and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 1)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
((and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 1)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(go target-yellow-jump-blast)
|
||||
)
|
||||
@@ -3528,8 +3528,8 @@
|
||||
)
|
||||
(when gp-1
|
||||
(logior! (-> self control status) (cshape-moving-flags on-surface))
|
||||
(when (or (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (or (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(and (logtest? (focus-status dark) (-> self focus-status))
|
||||
(nonzero? (-> self darkjak))
|
||||
@@ -3537,8 +3537,8 @@
|
||||
)
|
||||
)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5))
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(let ((s4-0 (method-of-object (-> self skel effect) effect-control-method-10)))
|
||||
'group-red-eco-strike-ground
|
||||
@@ -3564,8 +3564,8 @@
|
||||
(go target-flop-hit-ground gp-1)
|
||||
)
|
||||
)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(let* ((gp-2 (-> self skel effect))
|
||||
(s5-2 (method-of-object gp-2 effect-control-method-10))
|
||||
@@ -3785,8 +3785,8 @@
|
||||
(go target-attack-air 'flop)
|
||||
)
|
||||
)
|
||||
(when (and (and (= (-> (the-as fact-info-target (-> self fact-info-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-info-override)) eco-level) 1.0)
|
||||
(when (and (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
|
||||
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
|
||||
)
|
||||
(< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.25))
|
||||
)
|
||||
|
||||
+1987
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user