mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-27 00:10:31 +00:00
decomp3: eye renderer and more files (#3457)
- `eye` - `collision-editor` - `simple-nav-sphere` - `mech-part` - `mech-states` - `mech` - `target-mech` - `target-tube` - `flut-part` - `flut` - `target-flut`
This commit is contained in:
parent
cc8801a27b
commit
ae0f139667
@ -21424,7 +21424,7 @@
|
||||
(last-nonzero-input-dir-targ quaternion :inline :offset 6384)
|
||||
(time-of-last-wall-hide-first-check-pass time-frame :offset 6400)
|
||||
(time-of-first-wall-hide-first-check-pass time-frame :offset 6408)
|
||||
(pad uint8 4)
|
||||
(unknown-float0000 float :offset 6416)
|
||||
)
|
||||
:size-assert #x1914
|
||||
:flag-assert #x4400001914
|
||||
@ -22772,7 +22772,8 @@
|
||||
(leg-ik joint-mod-ik 2 :offset-assert 252) ;; guessed by decompiler
|
||||
(foot joint-mod 2 :offset-assert 260) ;; guessed by decompiler
|
||||
(cloth symbol :offset-assert 268)
|
||||
(init-time time-frame :offset-assert 272) ;; time-frame
|
||||
(mech-ik joint-mod-ik 2 :offset-assert 272) ;; added
|
||||
(init-time time-frame :offset 272) ;; time-frame
|
||||
(teleport-time time-frame :offset-assert 280) ;; time-frame
|
||||
(state-hook-time time-frame :offset-assert 288) ;; time-frame
|
||||
(state-hook (function none :behavior target) :offset-assert 296) ;; guessed by decompiler
|
||||
@ -22807,9 +22808,9 @@
|
||||
(mode-param1 handle :offset-assert 2320) ;; handle
|
||||
(mode-param2 uint64 :offset-assert 2328)
|
||||
(mode-param3 uint64 :offset-assert 2336)
|
||||
(major-mode-exit-hook basic :offset-assert 2344)
|
||||
(major-mode-event-hook basic :offset-assert 2348)
|
||||
(sub-mode-exit-hook basic :offset-assert 2352)
|
||||
(major-mode-exit-hook (function none :behavior target) :offset-assert 2344)
|
||||
(major-mode-event-hook (function none :behavior target) :offset-assert 2348)
|
||||
(sub-mode-exit-hook (function none :behavior target) :offset-assert 2352)
|
||||
(ext-geo-control external-art-buffer :offset-assert 2356)
|
||||
(pending-ext-geo target-geo :offset-assert 2360)
|
||||
(ext-geo target-geo :offset-assert 2364)
|
||||
@ -22900,7 +22901,7 @@
|
||||
(target-jump-forward float float symbol)
|
||||
(target-high-jump float float object)
|
||||
(target-double-jump float float)
|
||||
(target-falling symbol)
|
||||
(target-falling object)
|
||||
target-slide-down
|
||||
(target-flop float float float object)
|
||||
(target-hit-ground symbol)
|
||||
@ -22961,49 +22962,50 @@
|
||||
(target-board-clone-anim handle)
|
||||
;; flut
|
||||
(target-flut-start handle symbol int)
|
||||
target-flut-get-on
|
||||
target-flut-get-off
|
||||
(target-flut-get-on handle)
|
||||
(target-flut-get-off handle)
|
||||
target-flut-get-off-jump
|
||||
target-flut-eject
|
||||
(target-flut-eject symbol)
|
||||
target-flut-grab
|
||||
target-flut-stance
|
||||
target-flut-walk
|
||||
target-flut-jump
|
||||
target-flut-double-jump
|
||||
(target-flut-jump float float)
|
||||
(target-flut-double-jump float float)
|
||||
target-flut-running-attack
|
||||
target-flut-air-attack
|
||||
(target-flut-air-attack float)
|
||||
target-flut-air-attack-hit-ground
|
||||
target-flut-hit
|
||||
(target-flut-hit symbol attack-info)
|
||||
target-flut-hit-ground
|
||||
target-flut-falling
|
||||
target-flut-kanga-catch
|
||||
target-flut-death
|
||||
target-flut-clone-anim
|
||||
(target-flut-falling object)
|
||||
(target-flut-kanga-catch handle symbol)
|
||||
(target-flut-death symbol)
|
||||
(target-flut-clone-anim handle)
|
||||
target-flut-run-wild
|
||||
;; mech
|
||||
(target-mech-start handle float symbol)
|
||||
target-mech-get-on ;; associated process guessed by decompiler, old: (state handle target)
|
||||
(target-mech-get-on handle)
|
||||
target-mech-get-off
|
||||
target-mech-get-up
|
||||
(target-mech-get-up handle)
|
||||
target-mech-grab
|
||||
target-mech-stance
|
||||
target-mech-walk
|
||||
target-mech-jump ;; associated process guessed by decompiler, old: (state float float surface target)
|
||||
(target-mech-jump float float surface)
|
||||
target-mech-punch
|
||||
target-mech-shield
|
||||
target-mech-hit ;; associated process guessed by decompiler, old: (state symbol attack-info target)
|
||||
target-mech-hit-ground ;; associated process guessed by decompiler, old: (state symbol target)
|
||||
target-mech-falling ;; associated process guessed by decompiler, old: (state symbol target)
|
||||
(target-mech-hit symbol attack-info)
|
||||
(target-mech-hit-ground symbol)
|
||||
(target-mech-falling symbol)
|
||||
target-mech-carry-pickup
|
||||
target-mech-carry-stance
|
||||
target-mech-carry-walk
|
||||
target-mech-carry-jump ;; associated process guessed by decompiler, old: (state float float symbol target)
|
||||
(target-mech-carry-jump float float)
|
||||
target-mech-carry-drag
|
||||
target-mech-carry-drop
|
||||
target-mech-carry-throw
|
||||
target-mech-carry-hit-ground ;; associated process guessed by decompiler, old: (state symbol target)
|
||||
(target-mech-carry-hit-ground symbol)
|
||||
target-mech-carry-falling
|
||||
target-mech-death ;; associated process guessed by decompiler, old: (state symbol target)
|
||||
target-mech-clone-anim ;; associated process guessed by decompiler, old: (state handle target)
|
||||
(target-mech-death symbol)
|
||||
(target-mech-clone-anim handle)
|
||||
;; pilot
|
||||
(target-racing-start handle)
|
||||
(target-grab-ride handle)
|
||||
@ -23071,8 +23073,12 @@
|
||||
target-ladder-switch
|
||||
target-ladder-jump-off
|
||||
;; tube
|
||||
(target-tube-start handle)
|
||||
target-tube
|
||||
target-tube-walk
|
||||
(target-tube-start handle)
|
||||
(target-tube-jump float float)
|
||||
(target-tube-hit symbol attack-info)
|
||||
(target-tube-death symbol)
|
||||
;; tobot
|
||||
tobot-stance
|
||||
)
|
||||
@ -27896,29 +27902,29 @@
|
||||
:flag-assert #x2000000024
|
||||
(:methods
|
||||
(new "Allocate a new path-control, set up the curve to point to the specified lump data." (symbol type process symbol float entity symbol) _type_) ;; 0
|
||||
(path-control-method-9 (_type_) none) ;; 9 ;; (debug-draw (_type_) none)
|
||||
(debug-draw (_type_) none) ;; 9
|
||||
(get-point-in-path! (_type_ vector float symbol) vector) ;; 10
|
||||
(path-control-method-11 () none) ;; 11 ;; (get-random-point (_type_ vector) vector)
|
||||
(path-control-method-12 () none) ;; 12 ;; (displacement-between-two-points-copy! (_type_ vector float float) vector)
|
||||
(path-control-method-13 () none) ;; 13 ;; (displacement-between-two-points-normalized! (_type_ vector float) vector)
|
||||
(get-random-point (_type_ vector) vector) ;; 11
|
||||
(path-control-method-12 (_type_ vector float float) vector) ;; 12 ;; (displacement-between-two-points-copy! (_type_ vector float float) vector)
|
||||
(displacement-between-two-points-normalized! (_type_ vector float) vector) ;; 13
|
||||
(get-point-at-percent-along-path! (_type_ vector float symbol) vector) ;; 14
|
||||
(path-control-method-15 () none) ;; 15 ;; (displacement-between-points-at-percent-scaled! (_type_ vector float float) vector)
|
||||
(path-control-method-15 (_type_ vector float float) vector) ;; 15 ;; (displacement-between-points-at-percent-scaled! (_type_ vector float float) vector)
|
||||
(displacement-between-points-at-percent-normalized! (_type_ vector float) vector) ;; 16
|
||||
(get-num-segments (_type_) float) ;; 17
|
||||
(total-distance (_type_) float) ;; 18
|
||||
(get-num-verts (_type_) int) ;; 19
|
||||
(segement-duration->path-duration (_type_ float) float) ;; 20
|
||||
(path-duration->segment-duration (_type_ float) float) ;; 21
|
||||
(path-control-method-22 () none) ;; 22 ;; (get-furthest-point-on-path (_type_ vector) float)
|
||||
(path-control-method-23 () none) ;; 23 ;; (get-path-percentage-at-furthest-point (_type_ vector) float)
|
||||
(path-control-method-24 () none) ;; 24 ;; (path-control-method-24 (_type_ vector) vector)
|
||||
(path-control-method-22 (_type_ vector) float) ;; 22 ;; (get-furthest-point-on-path (_type_ vector) float)
|
||||
(path-control-method-23 (_type_ vector) float) ;; 23 ;; (get-path-percentage-at-furthest-point (_type_ vector) float)
|
||||
(path-control-method-24 (_type_ vector) float) ;; 24 ;; (path-control-method-24 (_type_ vector) vector)
|
||||
(path-control-method-25 (_type_ vector) float) ;; 25
|
||||
(path-control-method-26 () none) ;; 26 ;; (displacement-between-two-points! (_type_ vector float float) vector)
|
||||
(path-control-method-27 () none) ;; 27
|
||||
(path-control-method-28 () none) ;; 28
|
||||
(path-control-method-29 () none) ;; 29
|
||||
(path-control-method-26 (_type_ float float) float) ;; 26 ;; (displacement-between-two-points! (_type_ vector float float) vector)
|
||||
(path-control-method-27 (_type_ vector) vector) ;; 27
|
||||
(path-control-method-28 (_type_ vector float float) float) ;; 28
|
||||
(path-control-method-29 (_type_ vector int float) float) ;; 29
|
||||
(should-display-marks? (_type_) symbol) ;; 30
|
||||
(path-control-method-31 () none) ;; 31
|
||||
(displacement-between-two-points! (_type_ vector float float) vector) ;; 31
|
||||
)
|
||||
)
|
||||
|
||||
@ -35147,33 +35153,40 @@
|
||||
(defenum flut-flag
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(ff0 0)
|
||||
(ff1 1)
|
||||
(ff2 2)
|
||||
(ff3 3)
|
||||
)
|
||||
;; ---flut-h:flut-flag
|
||||
|
||||
(deftype flut (process-focusable)
|
||||
((extra-trans vector :inline :offset-assert 208)
|
||||
((root collide-shape-moving :override)
|
||||
(extra-trans vector :inline :offset-assert 208)
|
||||
(condition int32 :offset-assert 224)
|
||||
(shadow-backup shadow-geo :offset-assert 228)
|
||||
(rider handle :offset-assert 232)
|
||||
(nav-sphere-handle handle :offset-assert 240)
|
||||
(probe-time time-frame :offset-assert 248)
|
||||
(count-lock basic :offset-assert 256)
|
||||
(count-lock symbol :offset-assert 256)
|
||||
(flags flut-flag :offset-assert 264)
|
||||
(mode basic :offset-assert 272)
|
||||
(mode symbol :offset-assert 272)
|
||||
(color-index int32 :offset-assert 276)
|
||||
(minimap connection-minimap :offset-assert 280)
|
||||
)
|
||||
:method-count-assert 35
|
||||
:size-assert #x11c
|
||||
:flag-assert #x2300a0011c
|
||||
(:state-methods
|
||||
wait-for-start ;; 28
|
||||
idle ;; 29
|
||||
(pickup (state flut)) ;; 30
|
||||
wait-for-return ;; 31
|
||||
die ;; 32
|
||||
)
|
||||
(:methods
|
||||
(flut-method-28 () none) ;; 28
|
||||
(flut-method-29 () none) ;; 29
|
||||
(flut-method-30 () none) ;; 30
|
||||
(flut-method-31 () none) ;; 31
|
||||
(flut-method-32 () none) ;; 32
|
||||
(flut-method-33 () none) ;; 33
|
||||
(flut-method-34 () none) ;; 34
|
||||
(flut-method-33 (_type_) symbol) ;; 33
|
||||
(spawn-part-and-sound! (_type_) none) ;; 34
|
||||
)
|
||||
)
|
||||
|
||||
@ -35313,7 +35326,7 @@
|
||||
(define-extern move-legs? (function symbol :behavior target))
|
||||
(define-extern jump-hit-ground-stuck? (function symbol :behavior target))
|
||||
(define-extern target-time-to-ground (function time-frame :behavior target))
|
||||
(define-extern fall-test (function (state symbol target) float none :behavior target))
|
||||
(define-extern fall-test (function (state object target) float none :behavior target))
|
||||
(define-extern slide-down-test (function none :behavior target))
|
||||
(define-extern smack-surface? (function symbol symbol :behavior target))
|
||||
(define-extern can-roll? (function symbol :behavior target))
|
||||
@ -36961,6 +36974,7 @@
|
||||
(drag-sound-id sound-id :offset-assert 80) ;; guessed by decompiler
|
||||
(whine-sound-id sound-id :offset-assert 84) ;; guessed by decompiler
|
||||
(shield-sound-id sound-id :offset-assert 88)
|
||||
(mode-sound-bank connection :offset-assert 92) ;; added
|
||||
(mech-start-time time-frame :offset-assert 96) ;; time-frame
|
||||
(mech-time time-frame :offset-assert 104) ;; time-frame
|
||||
(no-get-off-time time-frame :offset-assert 112) ;; time-frame
|
||||
@ -36990,7 +37004,7 @@
|
||||
(smoke-local-vel vector 2 :inline :offset-assert 464) ;; guessed by decompiler
|
||||
(particle-system-2d basic :offset-assert 496)
|
||||
(particle-system-3d basic :offset-assert 500)
|
||||
(part-thruster sparticle-launch-control :offset-assert 504)
|
||||
(part-thruster sparticle-launcher :offset-assert 504)
|
||||
(part-thruster-scale-x sp-field-init-spec :offset-assert 508)
|
||||
(part-thruster-scale-y sp-field-init-spec :offset-assert 512)
|
||||
(part-quat quaternion :offset-assert 516)
|
||||
@ -40100,7 +40114,6 @@
|
||||
;; collision-editor ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype collision-editor-default-proc (process-drawable)
|
||||
()
|
||||
:method-count-assert 21
|
||||
@ -40110,9 +40123,7 @@
|
||||
idle ;; 20
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype collision-editor-edited-proc (process-drawable)
|
||||
()
|
||||
:method-count-assert 21
|
||||
@ -40122,11 +40133,9 @@
|
||||
idle ;; 20
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype collision-editor (process)
|
||||
((proc uint64 :offset-assert 128)
|
||||
((proc handle :offset-assert 128)
|
||||
)
|
||||
:method-count-assert 15
|
||||
:size-assert #x88
|
||||
@ -40135,39 +40144,46 @@
|
||||
idle ;; 14
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
;; +++collision-editor:collision-editor-func
|
||||
(defenum collision-editor-func
|
||||
:type uint64
|
||||
(analog 0)
|
||||
(edit 1)
|
||||
(print-collision 2)
|
||||
(stop-editor 3)
|
||||
)
|
||||
;; ---collision-editor:collision-editor-func
|
||||
|
||||
(deftype collision-edit-info (structure)
|
||||
((editing basic :offset-assert 0)
|
||||
(current-func uint64 :offset-assert 8)
|
||||
(analog-func uint64 :offset-assert 16)
|
||||
((editing symbol :offset-assert 0)
|
||||
(current-func collision-editor-func :offset-assert 8)
|
||||
(analog-func collision-editor-func :offset-assert 16)
|
||||
(current-prim int32 :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x1c
|
||||
:flag-assert #xc0000001c
|
||||
(:methods
|
||||
(collision-edit-info-method-9 () none) ;; 9
|
||||
(collision-edit-info-method-10 () none) ;; 10
|
||||
(collision-edit-info-method-11 () none) ;; 11
|
||||
(collision-edit-info-method-9 (_type_) none) ;; 9
|
||||
(draw-menu (_type_ process-drawable) none) ;; 10
|
||||
(collision-edit-info-method-11 (_type_ process-drawable) none) ;; 11
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern collision-editor-default-proc-init-by-other function)
|
||||
;; (define-extern collision-editor-edited-proc-init-by-other function)
|
||||
;; (define-extern *collision-editor-mesh-names* array)
|
||||
;; (define-extern *collision-editor-art-group-name* string)
|
||||
;; (define-extern collision-editor-add-mesh-to-ccache function)
|
||||
;; (define-extern print-default-collision function)
|
||||
;; (define-extern print-actual-collision function)
|
||||
;; (define-extern collision-edit-get-max-prim function)
|
||||
;; (define-extern collision-edit-get-prim function)
|
||||
;; (define-extern *collision-edit-info* object)
|
||||
;; (define-extern collision-editor-init-by-other function)
|
||||
;; (define-extern stop-collision-edit function)
|
||||
;; (define-extern collision-edit function)
|
||||
(define-extern collision-editor-default-proc-init-by-other (function object :behavior collision-editor-default-proc))
|
||||
(define-extern collision-editor-edited-proc-init-by-other (function object :behavior collision-editor-edited-proc))
|
||||
(define-extern *collision-editor-mesh-names* (array string))
|
||||
(define-extern *collision-editor-art-group-name* string)
|
||||
(define-extern collision-editor-add-mesh-to-ccache (function collide-shape-prim-group collide-cache none))
|
||||
(define-extern print-default-collision (function process-drawable none))
|
||||
(define-extern print-actual-collision (function process-drawable none))
|
||||
(define-extern collision-edit-get-max-prim (function process-drawable int))
|
||||
(define-extern collision-edit-get-prim (function process-drawable int collide-shape-prim))
|
||||
(define-extern *collision-edit-info* collision-edit-info)
|
||||
(define-extern collision-editor-init-by-other (function handle object :behavior collision-editor))
|
||||
(define-extern stop-collision-edit (function none))
|
||||
(define-extern collision-edit (function process (pointer process)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; speech-manager ;;
|
||||
@ -41594,7 +41610,6 @@
|
||||
;; simple-nav-sphere ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype simple-nav-sphere (process-drawable)
|
||||
((first-time? symbol :offset-assert 200) ;; guessed by decompiler
|
||||
(track-joint int32 :offset-assert 204)
|
||||
@ -41603,14 +41618,13 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #x16005000d0
|
||||
(:state-methods
|
||||
active ;; 21, old: (active () _type_ :state)
|
||||
idle ;; 20, old: (idle () _type_ :state)
|
||||
idle ;; 20
|
||||
active ;; 21
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern simple-nav-sphere-event-handler function) ;; (function process int symbol event-message-block object :behavior simple-nav-sphere)
|
||||
;; (define-extern simple-nav-sphere-init-by-other function) ;; (function float vector nav-mesh int none :behavior simple-nav-sphere)
|
||||
(define-extern simple-nav-sphere-event-handler (function process int symbol event-message-block object :behavior simple-nav-sphere))
|
||||
(define-extern simple-nav-sphere-init-by-other (function float vector nav-mesh int object :behavior simple-nav-sphere))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; process-taskable ;;
|
||||
@ -49507,7 +49521,7 @@
|
||||
;; (define-extern traffic-manager-init-by-other function) ;; (function none :behavior traffic-manager)
|
||||
(define-extern traffic-start (function none))
|
||||
(define-extern traffic-kill (function none))
|
||||
;; (define-extern ctywide-entity-hack function) ;; (function none)
|
||||
(define-extern ctywide-entity-hack (function none))
|
||||
;; (define-extern traffic-entity-hack function)
|
||||
;; (define-extern riders-on function) ;; (function none)
|
||||
;; (define-extern riders-off function) ;; (function none)
|
||||
@ -50277,59 +50291,56 @@
|
||||
;; mech-part ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern mech-spawn-thruster function) ;; (function mech-info vector vector float float none)
|
||||
(define-extern mech-spawn-thruster (function mech-info vector vector float float none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; mech ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype mech (process-drawable)
|
||||
((extra-trans vector :inline :offset-assert 208)
|
||||
((root collide-shape-moving :override)
|
||||
(extra-trans vector :inline :offset-assert 208)
|
||||
(condition int32 :offset-assert 224)
|
||||
(shadow-backup basic :offset-assert 228)
|
||||
(rider uint64 :offset-assert 232)
|
||||
(shadow-backup shadow-geo :offset-assert 228)
|
||||
(rider handle :offset-assert 232)
|
||||
(shield-value float :offset-assert 240)
|
||||
(nav-sphere-handle uint64 :offset-assert 248)
|
||||
(probe-time uint64 :offset-assert 256) ;; time-frame
|
||||
(nav-sphere-handle handle :offset-assert 248)
|
||||
(probe-time time-frame :offset-assert 256) ;; time-frame
|
||||
)
|
||||
:method-count-assert 25
|
||||
:size-assert #x108
|
||||
:flag-assert #x1900900108
|
||||
(:methods
|
||||
(mech-method-24 () none) ;; 24 ;; (mech-method-24 (_type_) none)
|
||||
)
|
||||
(:state-methods
|
||||
wait-for-return ;; 23, old: (wait-for-return () _type_ :state)
|
||||
pickup ;; 22, old: (pickup ((state mech)) _type_ :state)
|
||||
idle ;; 21, old: (idle () _type_ :state)
|
||||
wait-for-start ;; 20, old: (wait-for-start () _type_ :state)
|
||||
wait-for-start ;; 20
|
||||
idle ;; 21
|
||||
(pickup (state mech)) ;; 22
|
||||
wait-for-return ;; 23
|
||||
)
|
||||
(:methods
|
||||
(mech-method-24 (_type_) none) ;; 24
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype mech-target (process-drawable)
|
||||
()
|
||||
((parent (pointer target) :override)
|
||||
)
|
||||
:method-count-assert 22
|
||||
:size-assert #xc8
|
||||
:flag-assert #x16005000c8
|
||||
(:state-methods
|
||||
active ;; 21, old: (active () _type_ :state)
|
||||
idle ;; 20, old: (idle () _type_ :state)
|
||||
idle ;; 20
|
||||
active ;; 21
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern mech-init function) ;; (function entity-actor matrix3 handle float none :behavior mech)
|
||||
;; (define-extern mech-target-init function) ;; (function vector quaternion entity-actor none :behavior mech)
|
||||
;; (define-extern mech-target-spawn function) ;; (function vector process quaternion entity-actor (pointer mech-target))
|
||||
(define-extern mech-init (function entity-actor matrix3 handle float object :behavior mech))
|
||||
(define-extern mech-target-init (function vector quaternion entity-actor object :behavior mech))
|
||||
(define-extern mech-target-spawn (function vector process quaternion entity-actor (pointer mech-target)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; target-mech ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype mech-shield (shield-sphere)
|
||||
()
|
||||
:method-count-assert 43
|
||||
@ -50339,43 +50350,42 @@
|
||||
shield-disabled ;; 29
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern mech-shield-init-by-other function)
|
||||
;; (define-extern *mech-stance-mods* surface) ;; surface
|
||||
;; (define-extern *mech-walk-mods* surface) ;; surface
|
||||
;; (define-extern *mech-jump-mods* surface) ;; surface
|
||||
;; (define-extern *mech-punch-mods* surface) ;; surface
|
||||
;; (define-extern *mech-pickup-mods* surface) ;; surface
|
||||
;; (define-extern *mech-carry-walk-mods* surface) ;; surface
|
||||
;; (define-extern *mech-carry-drag-mods* surface) ;; surface
|
||||
;; (define-extern *mech-carry-jump-mods* surface) ;; surface
|
||||
;; (define-extern target-mech-falling-anim-trans function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-mech-effect function) ;; (function target none :behavior mech)
|
||||
;; (define-extern mech-on-ground? function) ;; (function symbol :behavior target)
|
||||
;; (define-extern target-mech-get-off? function) ;; (function symbol :behavior target)
|
||||
;; (define-extern target-mech-handler function) ;; (function process int symbol event-message-block object :behavior target)
|
||||
;; (define-extern target-mech-bonk-event-handler function) ;; (function process int symbol event-message-block object :behavior target)
|
||||
;; (define-extern mech-leg-ik-callback function) ;; (function joint-mod-ik matrix matrix vector object :behavior target)
|
||||
;; (define-extern mech-update-ik function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-init function) ;; (function handle float symbol none :behavior target)
|
||||
;; (define-extern target-mech-exit function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-effect function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-add-thrust function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-collision function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-real-post function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-post function) ;; (function none :behavior target)
|
||||
(define-extern mech-shield-init-by-other (function shield-sphere-spawn-params object :behavior mech-shield))
|
||||
(define-extern *mech-stance-mods* surface)
|
||||
(define-extern *mech-walk-mods* surface)
|
||||
(define-extern *mech-jump-mods* surface)
|
||||
(define-extern *mech-punch-mods* surface)
|
||||
(define-extern *mech-pickup-mods* surface)
|
||||
(define-extern *mech-carry-walk-mods* surface)
|
||||
(define-extern *mech-carry-drag-mods* surface)
|
||||
(define-extern *mech-carry-jump-mods* surface)
|
||||
(define-extern target-mech-falling-anim-trans (function none :behavior target))
|
||||
(define-extern target-mech-mech-effect (function target none :behavior mech))
|
||||
(define-extern mech-on-ground? (function symbol :behavior target))
|
||||
(define-extern target-mech-get-off? (function symbol :behavior target))
|
||||
(define-extern target-mech-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern target-mech-bonk-event-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern mech-leg-ik-callback (function joint-mod-ik matrix matrix vector object :behavior target))
|
||||
(define-extern mech-update-ik (function none :behavior target))
|
||||
(define-extern target-mech-init (function handle float symbol none :behavior target))
|
||||
(define-extern target-mech-exit (function none :behavior target))
|
||||
(define-extern target-mech-effect (function none :behavior target))
|
||||
(define-extern target-mech-add-thrust (function none :behavior target))
|
||||
(define-extern target-mech-collision (function none :behavior target))
|
||||
(define-extern target-mech-real-post (function none :behavior target))
|
||||
(define-extern target-mech-post (function none :behavior target))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; mech-states ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *mech-exploder-params* joint-exploder-static-params) ;; joint-exploder-static-params
|
||||
;; (define-extern check-turn-on-shield function)
|
||||
;; (define-extern mech-can-throw? function)
|
||||
;; (define-extern target-mech-punch-pick function) ;; (function symbol int :behavior target)
|
||||
;; (define-extern target-mech-carry-update function) ;; (function none :behavior target)
|
||||
;; (define-extern target-mech-carry-post function) ;; (function none :behavior target)
|
||||
(define-extern *mech-exploder-params* joint-exploder-static-params)
|
||||
(define-extern check-turn-on-shield (function target object))
|
||||
(define-extern mech-can-throw? (function symbol :behavior target))
|
||||
(define-extern target-mech-punch-pick (function symbol int :behavior target))
|
||||
(define-extern target-mech-carry-update (function none :behavior target))
|
||||
(define-extern target-mech-carry-post (function none :behavior target))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; nstb-texture ;;
|
||||
@ -65654,17 +65664,16 @@
|
||||
;; flut ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *flut-shadow-control* shadow-control)
|
||||
;; (define-extern *flut-color-table* array)
|
||||
;; (define-extern flut-color-from-index function)
|
||||
;; (define-extern flut-random-color-index function)
|
||||
;; (define-extern flut-init function)
|
||||
(define-extern *flut-shadow-control* shadow-control)
|
||||
(define-extern *flut-color-table* (array rgbaf))
|
||||
(define-extern flut-color-from-index (function int none :behavior flut))
|
||||
(define-extern flut-random-color-index (function int))
|
||||
(define-extern flut-init (function entity-actor transformq handle flut-flag symbol object :behavior flut))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; target-flut ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype flut-bank (basic)
|
||||
((jump-height-min meters :offset-assert 4)
|
||||
(jump-height-max meters :offset-assert 8)
|
||||
@ -65677,33 +65686,31 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *FLUT-bank* flut-bank)
|
||||
;; (define-extern *flut-walk-mods* surface)
|
||||
;; (define-extern *flut-run-racer-mods* surface)
|
||||
;; (define-extern *flut-run-wild-mods* surface)
|
||||
;; (define-extern *flut-jump-wild-mods* surface)
|
||||
;; (define-extern *flut-jump-mods* surface)
|
||||
;; (define-extern *flut-jump-racer-mods* surface)
|
||||
;; (define-extern *flut-double-jump-mods* surface)
|
||||
;; (define-extern *flut-double-jump-racer-mods* surface)
|
||||
;; (define-extern *flut-run-attack-mods* surface)
|
||||
;; (define-extern *flut-air-attack-mods* surface)
|
||||
;; (define-extern flut-leg-ik-callback function)
|
||||
;; (define-extern flut-update-ik function)
|
||||
;; (define-extern target-flut-get-off? function)
|
||||
;; (define-extern target-flut-post-post function)
|
||||
;; (define-extern target-flut-wild-post function)
|
||||
;; (define-extern target-flut-post function)
|
||||
;; (define-extern target-flut-falling-anim-trans function)
|
||||
;; (define-extern target-flut-hit-ground-anim function)
|
||||
;; (define-extern target-flut-standard-event-handler function)
|
||||
;; (define-extern target-flut-dangerous-event-handler function)
|
||||
;; (define-extern target-fldax-enter function)
|
||||
;; (define-extern target-fldax-exit function)
|
||||
;; (define-extern target-flut-run-wild object)
|
||||
;; (define-extern *flut-get-off-mods* object)
|
||||
(define-extern *FLUT-bank* flut-bank)
|
||||
(define-extern *flut-walk-mods* surface)
|
||||
(define-extern *flut-run-racer-mods* surface)
|
||||
(define-extern *flut-run-wild-mods* surface)
|
||||
(define-extern *flut-jump-wild-mods* surface)
|
||||
(define-extern *flut-jump-mods* surface)
|
||||
(define-extern *flut-jump-racer-mods* surface)
|
||||
(define-extern *flut-double-jump-mods* surface)
|
||||
(define-extern *flut-double-jump-racer-mods* surface)
|
||||
(define-extern *flut-run-attack-mods* surface)
|
||||
(define-extern *flut-air-attack-mods* surface)
|
||||
(define-extern flut-leg-ik-callback (function joint-mod-ik object object vector none))
|
||||
(define-extern flut-update-ik (function object :behavior target))
|
||||
(define-extern target-flut-get-off? (function symbol :behavior target))
|
||||
(define-extern target-flut-post-post (function none :behavior target))
|
||||
(define-extern target-flut-wild-post (function none :behavior target))
|
||||
(define-extern target-flut-post (function none :behavior target))
|
||||
(define-extern target-flut-falling-anim-trans (function object :behavior target))
|
||||
(define-extern target-flut-hit-ground-anim (function object :behavior target))
|
||||
(define-extern target-flut-standard-event-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern target-flut-dangerous-event-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern target-fldax-enter (function object :behavior target))
|
||||
(define-extern target-fldax-exit (function object :behavior target))
|
||||
(define-extern *flut-get-off-mods* surface)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ctymark-obs-h ;;
|
||||
@ -68255,10 +68262,9 @@
|
||||
;; target-tube ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype tube-info (basic)
|
||||
((entity basic :offset-assert 4)
|
||||
(tube uint64 :offset-assert 8) ;; handle
|
||||
((entity entity :offset-assert 4)
|
||||
(tube handle :offset-assert 8) ;; handle
|
||||
(downhill vector :inline :offset-assert 16)
|
||||
(centertube vector :inline :offset-assert 32)
|
||||
(downtube vector :inline :offset-assert 48)
|
||||
@ -68267,7 +68273,7 @@
|
||||
(old-transv vector :inline :offset-assert 96)
|
||||
(mod-x float :offset-assert 112)
|
||||
(mod-y float :offset-assert 116)
|
||||
(start-time uint64 :offset-assert 120) ;; time-frame
|
||||
(start-time time-frame :offset-assert 120) ;; time-frame
|
||||
(turn-anim-targ float :offset-assert 128)
|
||||
(turn-anim-frame float :offset-assert 132)
|
||||
(turn-anim-vel float :offset-assert 136)
|
||||
@ -68279,20 +68285,16 @@
|
||||
:size-assert #x98
|
||||
:flag-assert #x900000098
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype tube-bank (basic)
|
||||
()
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype slide-control (process-drawable)
|
||||
((target uint64 :offset-assert 200) ;; handle
|
||||
((target handle :offset-assert 200) ;; handle
|
||||
(pos float :offset-assert 208)
|
||||
(trans vector :inline :offset-assert 224)
|
||||
(rot vector :inline :offset-assert 240)
|
||||
@ -68302,27 +68304,23 @@
|
||||
:size-assert #x110
|
||||
:flag-assert #x1600900110
|
||||
(:state-methods
|
||||
slide-control-ride ;; 21, old: (slide-control-ride () _type_ :state)
|
||||
slide-control-watch ;; 20, old: (slide-control-watch () _type_ :state)
|
||||
slide-control-watch ;; 20
|
||||
slide-control-ride ;; 21
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *tube-mods* surface) ;; surface
|
||||
;; (define-extern *tube-jump-mods* surface) ;; surface
|
||||
;; (define-extern *tube-hit-mods* surface) ;; surface
|
||||
;; (define-extern *tube-surface* surface) ;; surface
|
||||
;; (define-extern *TUBE-bank* tube-bank) ;; tube-bank
|
||||
;; (define-extern tube-sounds function) ;; (function sound-id :behavior target)
|
||||
;; (define-extern tube-thrust function) ;; (function float float none :behavior target)
|
||||
;; (define-extern target-tube-post function) ;; (function none :behavior target)
|
||||
;; (define-extern target-tube-turn-anim function) ;; (function none :behavior target)
|
||||
;; (define-extern target-tube-walk object)
|
||||
;; (define-extern target-tube-jump object) ;; (state float float target)
|
||||
;; (define-extern target-tube-hit object) ;; (state symbol attack-info target)
|
||||
;; (define-extern target-tube-death object) ;; (state symbol target)
|
||||
;; (define-extern distance-from-tangent function) ;; (function path-control float vector vector vector vector float)
|
||||
;; (define-extern find-target-point function) ;; (function vector float :behavior slide-control)
|
||||
(define-extern *tube-mods* surface)
|
||||
(define-extern *tube-jump-mods* surface)
|
||||
(define-extern *tube-hit-mods* surface)
|
||||
(define-extern *tube-surface* surface)
|
||||
(define-extern *TUBE-bank* tube-bank)
|
||||
(define-extern tube-sounds (function sound-id :behavior target))
|
||||
(define-extern tube-thrust (function float float none :behavior target))
|
||||
(define-extern target-tube-post (function none :behavior target))
|
||||
(define-extern target-tube-turn-anim (function none :behavior target))
|
||||
|
||||
(define-extern distance-from-tangent (function path-control float vector vector vector vector float))
|
||||
(define-extern find-target-point (function vector float :behavior slide-control))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; precurc-part ;;
|
||||
|
@ -545,5 +545,22 @@
|
||||
[107, "(function script-context object)"],
|
||||
[108, "(function script-context object)"]
|
||||
],
|
||||
"relocate": [[7, "(function sparticle-system sparticle-cpuinfo none)"]]
|
||||
"relocate": [[7, "(function sparticle-system sparticle-cpuinfo none)"]],
|
||||
"target-mech": [
|
||||
[7, "(function object :behavior target)"],
|
||||
[8, "(function object :behavior target)"],
|
||||
[9, "(function object :behavior target)"],
|
||||
[18, "(function surface surface surface int object :behavior target)"],
|
||||
[19, "(function surface surface surface int object :behavior target)"]
|
||||
],
|
||||
"mech-states": [[57, "(function object :behavior target)"]],
|
||||
"target-flut": [
|
||||
[14, "(function surface surface surface int object :behavior target)"],
|
||||
[20, "(function object :behavior target)"],
|
||||
[21, "(function object :behavior target)"],
|
||||
[33, "(function process-focusable object)"],
|
||||
[72, "(function object)"],
|
||||
[73, "(function object :behavior target)"],
|
||||
[74, "(function object :behavior target)"]
|
||||
]
|
||||
}
|
||||
|
@ -385,7 +385,8 @@
|
||||
"(method 16 sparticle-launch-control)": [25, 35, 36, 48, 62, 65, 100, 102],
|
||||
"(anon-function 17 target-ladder)": [0, 1],
|
||||
"command-get-process": [46],
|
||||
"foreground-draw-hud": [0, 7, 8, 9, 16, 22]
|
||||
"foreground-draw-hud": [0, 7, 8, 9, 16, 22],
|
||||
"target-flut-falling-anim-trans": [8, 9]
|
||||
},
|
||||
|
||||
// Sometimes the game might use format strings that are fetched dynamically,
|
||||
|
@ -44,7 +44,7 @@
|
||||
// "DGO/LJAKC.DGO",
|
||||
// "DGO/CTB.DGO",
|
||||
// "DGO/CTYCARC.DGO",
|
||||
// "DGO/LMECH.DGO",
|
||||
"DGO/LMECH.DGO",
|
||||
// "DGO/LBBSDRP2.DGO",
|
||||
// "DGO/NSA.DGO",
|
||||
// "DGO/LBBTCHA3.DGO",
|
||||
@ -78,7 +78,7 @@
|
||||
// "DGO/RAILB.DGO",
|
||||
// "DGO/LCTYHIJK.DGO",
|
||||
// "DGO/CTYPEPB.DGO",
|
||||
// "DGO/PRECB.DGO",
|
||||
"DGO/PRECB.DGO",
|
||||
// "DGO/LFORM.DGO",
|
||||
// "DGO/WASLEAPR.DGO",
|
||||
// "DGO/LKEIRA.DGO",
|
||||
@ -133,7 +133,7 @@
|
||||
// "DGO/CFA.DGO",
|
||||
// "DGO/LJINX.DGO",
|
||||
// "DGO/SEO.DGO",
|
||||
// "DGO/PRECA.DGO",
|
||||
"DGO/PRECA.DGO",
|
||||
// "DGO/TOWERC.DGO",
|
||||
// "DGO/WCA.DGO",
|
||||
// "DGO/SEC.DGO",
|
||||
@ -208,7 +208,7 @@
|
||||
// "DGO/LONINSIM.DGO",
|
||||
// "DGO/RUBA.DGO",
|
||||
// "DGO/DESRALLY.DGO",
|
||||
// "DGO/WWD.DGO",
|
||||
"DGO/WWD.DGO",
|
||||
// "DGO/STB.DGO",
|
||||
// "DGO/MIB.DGO",
|
||||
// "DGO/LCTYBLOW.DGO",
|
||||
@ -235,7 +235,7 @@
|
||||
// "DGO/TEMC.DGO",
|
||||
// "DGO/COMBC.DGO",
|
||||
// "DGO/LTRTWHLS.DGO",
|
||||
// "DGO/PRECC.DGO",
|
||||
"DGO/PRECC.DGO",
|
||||
// "DGO/DESCHASE.DGO",
|
||||
// "DGO/CITYCAST.DGO",
|
||||
// "DGO/CPO.DGO",
|
||||
|
@ -584,5 +584,71 @@
|
||||
["L200", "uint64", true],
|
||||
["L203", "uint64", true],
|
||||
["L201", "uint64", true]
|
||||
],
|
||||
"target-tube": [["L191", "attack-info"]],
|
||||
"mech": [["L118", "attack-info"]],
|
||||
"target-mech": [
|
||||
["L256", "attack-info"],
|
||||
["L250", "vector"],
|
||||
["L249", "vector"]
|
||||
],
|
||||
"mech-states": [
|
||||
["L675", "uint64", true],
|
||||
["L655", "uint64", true],
|
||||
["L663", "uint64", true],
|
||||
["L668", "uint64", true],
|
||||
["L659", "uint64", true],
|
||||
["L669", "uint64", true],
|
||||
["L654", "uint64", true],
|
||||
["L653", "uint64", true],
|
||||
["L672", "uint64", true],
|
||||
["L657", "uint64", true],
|
||||
["L656", "uint64", true],
|
||||
["L674", "uint64", true],
|
||||
["L676", "uint64", true],
|
||||
["L667", "uint64", true],
|
||||
["L658", "uint64", true],
|
||||
["L673", "uint64", true],
|
||||
["L670", "uint64", true],
|
||||
["L662", "uint64", true],
|
||||
["L661", "uint64", true],
|
||||
["L660", "uint64", true],
|
||||
["L666", "uint64", true],
|
||||
["L665", "uint64", true],
|
||||
["L652", "uint64", true],
|
||||
["L629", "attack-info"],
|
||||
["L671", "uint64", true],
|
||||
["L664", "uint64", true]
|
||||
],
|
||||
"target-flut": [
|
||||
["L789", "uint64", true],
|
||||
["L766", "uint64", true],
|
||||
["L767", "uint64", true],
|
||||
["L774", "uint64", true],
|
||||
["L765", "uint64", true],
|
||||
["L768", "uint64", true],
|
||||
["L771", "uint64", true],
|
||||
["L773", "uint64", true],
|
||||
["L776", "uint64", true],
|
||||
["L750", "attack-info"],
|
||||
["L775", "uint64", true],
|
||||
["L770", "uint64", true],
|
||||
["L748", "attack-info"],
|
||||
["L769", "uint64", true],
|
||||
["L736", "attack-info"],
|
||||
["L735", "attack-info"],
|
||||
["L741", "attack-info"],
|
||||
["L740", "attack-info"],
|
||||
["L739", "attack-info"],
|
||||
["L772", "uint64", true],
|
||||
["L727", "attack-info"],
|
||||
["L764", "uint64", true],
|
||||
["L763", "uint64", true],
|
||||
["L762", "uint64", true]
|
||||
],
|
||||
"flut": [
|
||||
["L139", "attack-info"],
|
||||
["L138", "attack-info"],
|
||||
["L137", "attack-info"]
|
||||
]
|
||||
}
|
||||
|
@ -718,5 +718,51 @@
|
||||
[176, "part-tracker-init-params"]
|
||||
],
|
||||
"(method 9 mood-control)": [[16, "mood-control-work"]],
|
||||
"check-drop-level-rain": [[16, "vector"]]
|
||||
"check-drop-level-rain": [[16, "vector"]],
|
||||
"(method 28 path-control)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"(method 29 path-control)": [[32, "vector"]],
|
||||
"print-default-collision": [
|
||||
[144, "vector"],
|
||||
[96, "vector"],
|
||||
[112, "vector"],
|
||||
[128, "vector"],
|
||||
[160, "matrix"]
|
||||
],
|
||||
"mech-spawn-thruster": [[32, "vector"]],
|
||||
"mech-shield-init-by-other": [[16, "shield-sphere-distort-spawn-params"]],
|
||||
"target-mech-get-off?": [[560, ["inline-array", "sphere", 1]]],
|
||||
"mech-update-ik": [
|
||||
[16, "collide-query"],
|
||||
[592, "vector"],
|
||||
[608, "vector"],
|
||||
[624, "vector"],
|
||||
[640, "vector"],
|
||||
[656, "vector"],
|
||||
[672, "vector"]
|
||||
],
|
||||
"target-mech-init": [[96, "shield-sphere-spawn-params"]],
|
||||
"target-mech-add-thrust": [[16, "vector"]],
|
||||
"target-mech-collision": [[144, "vector"]],
|
||||
"(code target-mech-carry-throw)": [[640, ["inline-array", "sphere", 1]]],
|
||||
"(trans target-mech-carry-drag)": [[560, ["inline-array", "sphere", 1]]],
|
||||
"(code target-mech-carry-drop)": [[672, ["inline-array", "sphere", 1]]],
|
||||
"target-mech-carry-update": [[560, ["inline-array", "sphere", 1]]],
|
||||
"flut-update-ik": [
|
||||
[16, "collide-query"],
|
||||
[624, "vector"],
|
||||
[640, "vector"],
|
||||
[656, "vector"],
|
||||
[592, "vector"],
|
||||
[608, "vector"]
|
||||
],
|
||||
"(code target-flut-get-on)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
]
|
||||
}
|
||||
|
@ -4688,5 +4688,290 @@
|
||||
[90, "t1", "vu-lights"],
|
||||
[[93, 99], "t1", "(pointer uint128)"],
|
||||
[101, "t1", "(pointer uint128)"]
|
||||
],
|
||||
"free-eye-index": [[30, "a2", "eye-control"]],
|
||||
"update-eyes": [
|
||||
[23, "v1", "process-drawable"],
|
||||
[29, "v1", "process-drawable"]
|
||||
],
|
||||
"render-eyes-64": [
|
||||
[[77, 82], "v1", "dma-gif-packet"],
|
||||
[[88, 93], "s0", "adgif-shader"],
|
||||
[[132, 164], "v1", "(inline-array vector4w)"],
|
||||
[[244, 274], "a1", "(inline-array vector4w)"],
|
||||
[[284, 292], "v1", "dma-gif-packet"],
|
||||
[[298, 303], "s0", "adgif-shader"],
|
||||
[[376, 406], "a1", "(inline-array vector4w)"],
|
||||
[[442, 450], "v1", "dma-gif-packet"],
|
||||
[[456, 461], "s0", "adgif-shader"],
|
||||
[[535, 562], "a1", "(inline-array vector4w)"],
|
||||
[[575, 580], "v1", "dma-gif-packet"],
|
||||
[[586, 591], "s0", "adgif-shader"],
|
||||
[[664, 694], "a1", "(inline-array vector4w)"],
|
||||
[[733, 738], "v1", "dma-gif-packet"],
|
||||
[[744, 749], "s0", "adgif-shader"],
|
||||
[[845, 874], "a1", "(inline-array vector4w)"],
|
||||
[[887, 892], "v1", "dma-gif-packet"],
|
||||
[[898, 903], "s0", "adgif-shader"],
|
||||
[[1003, 1029], "a1", "(inline-array vector4w)"],
|
||||
[180, "a0", "int"],
|
||||
[188, "a1", "int"],
|
||||
[310, "a0", "int"],
|
||||
[318, "a1", "int"],
|
||||
[468, "a0", "int"],
|
||||
[476, "a1", "int"],
|
||||
[598, "a0", "int"],
|
||||
[606, "a1", "int"],
|
||||
[756, "a0", "int"],
|
||||
[764, "a1", "int"],
|
||||
[910, "a0", "int"],
|
||||
[918, "a1", "int"]
|
||||
],
|
||||
"render-eyes-32": [
|
||||
[[77, 82], "v1", "dma-gif-packet"],
|
||||
[[88, 93], "s0", "adgif-shader"],
|
||||
[[132, 164], "v1", "(inline-array vector4w)"],
|
||||
[[244, 274], "a1", "(inline-array vector4w)"],
|
||||
[[287, 292], "v1", "dma-gif-packet"],
|
||||
[[298, 303], "s0", "adgif-shader"],
|
||||
[[376, 406], "a1", "(inline-array vector4w)"],
|
||||
[[445, 450], "v1", "dma-gif-packet"],
|
||||
[[456, 461], "s0", "adgif-shader"],
|
||||
[[532, 562], "a1", "(inline-array vector4w)"],
|
||||
[[575, 580], "v1", "dma-gif-packet"],
|
||||
[[586, 591], "s0", "adgif-shader"],
|
||||
[[664, 694], "a1", "(inline-array vector4w)"],
|
||||
[[733, 738], "v1", "dma-gif-packet"],
|
||||
[[744, 749], "s0", "adgif-shader"],
|
||||
[[845, 874], "a1", "(inline-array vector4w)"],
|
||||
[[887, 892], "v1", "dma-gif-packet"],
|
||||
[[898, 903], "s0", "adgif-shader"],
|
||||
[[1000, 1029], "a1", "(inline-array vector4w)"],
|
||||
[180, "a0", "int"],
|
||||
[188, "a1", "int"],
|
||||
[910, "a0", "int"],
|
||||
[918, "a1", "int"],
|
||||
[310, "a0", "int"],
|
||||
[318, "a1", "int"],
|
||||
[468, "a0", "int"],
|
||||
[476, "a1", "int"],
|
||||
[598, "a0", "int"],
|
||||
[606, "a1", "int"],
|
||||
[756, "a0", "int"],
|
||||
[764, "a1", "int"]
|
||||
],
|
||||
"(method 28 path-control)": [["_stack_", 124, "float"]],
|
||||
"collision-edit-get-prim": [[11, "v1", "collide-shape"]],
|
||||
"collision-edit-get-max-prim": [[11, "v1", "collide-shape"]],
|
||||
"print-actual-collision": [
|
||||
[12, "v1", "collide-shape"],
|
||||
[182, "v1", "collide-shape"],
|
||||
[83, "v1", "collide-shape-prim-mesh"],
|
||||
[87, "v1", "(array string)"]
|
||||
],
|
||||
"print-default-collision": [
|
||||
[23, "v1", "process-drawable"],
|
||||
[27, "v1", "process-drawable"],
|
||||
[55, "v1", "process-drawable"],
|
||||
[66, "v1", "process-drawable"],
|
||||
[76, "v0", "(array collide-mesh)"],
|
||||
[138, "v1", "process-drawable"],
|
||||
[157, "v1", "process-drawable"],
|
||||
[267, "a1", "process-drawable"],
|
||||
[277, "v1", "process-drawable"],
|
||||
[375, "v1", "process-drawable"],
|
||||
[[190, 250], "a0", "(inline-array collide-cache-tri)"]
|
||||
],
|
||||
"(method 10 collision-edit-info)": [[[495, 538], "s4", "collide-cache-tri"]],
|
||||
"(event slide-control-ride slide-control)": [
|
||||
[21, "gp", "process-drawable"],
|
||||
[32, "v1", "vector"],
|
||||
[36, "v1", "vector"],
|
||||
[28, "v1", "vector"]
|
||||
],
|
||||
"(code target-tube-walk)": [
|
||||
[44, "v1", "art-joint-anim"],
|
||||
[129, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-tube-start)": [[163, "v1", "float"]],
|
||||
"(trans active simple-nav-sphere)": [
|
||||
[10, "v1", "process-drawable"],
|
||||
[14, "a0", "collide-shape"],
|
||||
[17, "a0", "collide-shape"]
|
||||
],
|
||||
"simple-nav-sphere-event-handler": [
|
||||
[11, "a0", "collide-shape"],
|
||||
[14, "a0", "collide-shape"],
|
||||
[24, "a0", "collide-shape"],
|
||||
[26, "a0", "collide-shape"],
|
||||
[28, "a0", "collide-shape"],
|
||||
[21, "v1", "float"]
|
||||
],
|
||||
"target-mech-handler": [
|
||||
[94, "a0", "process"],
|
||||
[[198, 380], "s3", "attack-info"]
|
||||
],
|
||||
"mech-update-ik": [
|
||||
[3, "v1", "process-drawable"],
|
||||
[36, "s5", "collide-shape"],
|
||||
[41, "s5", "collide-shape"],
|
||||
[85, "s5", "collide-shape-moving"]
|
||||
],
|
||||
"target-mech-collision": [[108, "v0", "carry-info"]],
|
||||
"(anon-function 8 target-mech)": [
|
||||
[4, "gp", "target"],
|
||||
[10, "gp", "target"],
|
||||
[14, "gp", "target"]
|
||||
],
|
||||
"(anon-function 9 target-mech)": [
|
||||
[6, "v1", "target"],
|
||||
[10, "v1", "target"],
|
||||
[16, "v1", "target"],
|
||||
[20, "v1", "target"],
|
||||
[24, "v1", "target"],
|
||||
[28, "v1", "target"],
|
||||
[32, "v1", "target"]
|
||||
],
|
||||
"(event target-mech-grab)": [[27, "a0", "process"]],
|
||||
"(code target-mech-get-off)": [[67, "v1", "art-joint-anim"]],
|
||||
"(code target-mech-get-up)": [
|
||||
[74, "v1", "process-drawable"],
|
||||
[80, "v1", "process-drawable"],
|
||||
[115, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-mech-get-on)": [
|
||||
[74, "v1", "process-drawable"],
|
||||
[80, "v1", "process-drawable"],
|
||||
[115, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-mech-carry-throw)": [
|
||||
[51, "v0", "carry-info"],
|
||||
[112, "v0", "carry-info"]
|
||||
],
|
||||
"(enter target-mech-carry-hit-ground)": [[3, "v0", "sound-rpc-set-param"]],
|
||||
"(exit target-mech-carry-drag)": [
|
||||
[28, "v0", "sound-rpc-set-param"],
|
||||
[11, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(code target-mech-carry-walk)": [[80, "f0", "float"]],
|
||||
"(code target-mech-carry-drop)": [
|
||||
[42, "v0", "carry-info"],
|
||||
[110, "v1", "art-joint-anim"],
|
||||
[176, "v0", "carry-info"],
|
||||
[283, "v0", "sound-rpc-set-param"],
|
||||
[316, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(code target-mech-carry-pickup)": [
|
||||
[137, "v0", "carry-info"],
|
||||
[377, "v1", "art-joint-anim"],
|
||||
[541, "v0", "carry-info"],
|
||||
[574, "f0", "float"]
|
||||
],
|
||||
"(code target-mech-death)": [
|
||||
[410, "gp", "art-joint-anim"],
|
||||
[731, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-mech-walk)": [[91, "f0", "float"]],
|
||||
"(code target-mech-punch)": [
|
||||
[107, "v1", "art-joint-anim"],
|
||||
[135, "v1", "art-joint-anim"],
|
||||
[163, "v1", "art-joint-anim"],
|
||||
[191, "v1", "art-joint-anim"],
|
||||
[231, "v1", "art-joint-anim"],
|
||||
[259, "v1", "art-joint-anim"],
|
||||
[287, "v1", "art-joint-anim"],
|
||||
[315, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(event target-mech-punch)": [
|
||||
[45, "gp", "collide-query"],
|
||||
[53, "s4", "collide-shape-prim"],
|
||||
[68, "s5", "process-focusable"],
|
||||
[104, "gp", "collide-query"],
|
||||
[109, "s4", "collide-shape-prim"],
|
||||
[137, "s5", "process-focusable"],
|
||||
[166, "gp", "collide-query"],
|
||||
[213, "gp", "collide-query"]
|
||||
],
|
||||
"target-mech-punch-pick": [
|
||||
[227, "s5", "art-joint-anim"],
|
||||
[246, "s5", "art-joint-anim"]
|
||||
],
|
||||
"(code target-mech-jump)": [[26, "t9", "(function none)"]],
|
||||
"(enter target-mech-hit-ground)": [[3, "v0", "sound-rpc-set-param"]],
|
||||
"(method 33 flut)": [[8, "v0", "(array collide-shape)"]],
|
||||
"(event target-flut-grab)": [[35, "a0", "process"]],
|
||||
"(post target-flut-kanga-catch)": [[21, "s5", "process-focusable"]],
|
||||
"(code target-flut-kanga-catch)": [
|
||||
[62, "s5", "art-joint-anim"],
|
||||
[127, "s5", "process-focusable"],
|
||||
[137, "s5", "process-focusable"],
|
||||
[187, "s5", "process-focusable"]
|
||||
],
|
||||
"target-flut-standard-event-handler": [[305, "a0", "process"]],
|
||||
"target-flut-hit-ground-anim": [
|
||||
[137, "v1", "art-joint-anim"],
|
||||
[212, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-flut-run-wild)": [[72, "v1", "art-joint-anim"]],
|
||||
"(code target-flut-double-jump)": [[14, "v1", "art-joint-anim"]],
|
||||
"(code target-flut-stance)": [
|
||||
[87, "v1", "art-joint-anim"],
|
||||
[153, "v1", "art-joint-anim"],
|
||||
[219, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(trans target-flut-walk)": [
|
||||
[144, "f0", "float"],
|
||||
[149, "f1", "float"]
|
||||
],
|
||||
"(code target-flut-walk)": [[65, "v1", "art-joint-anim"]],
|
||||
"(event target-flut-running-attack)": [
|
||||
[40, "v1", "process-drawable"],
|
||||
[46, "s5", "collide-shape"]
|
||||
],
|
||||
"(code target-flut-air-attack-hit-ground)": [[81, "v1", "art-joint-anim"]],
|
||||
"(code target-flut-air-attack)": [[78, "v1", "art-joint-anim"]],
|
||||
"flut-update-ik": [
|
||||
[3, "v1", "process-drawable"],
|
||||
[36, "s5", "collide-shape"],
|
||||
[41, "s5", "collide-shape"],
|
||||
[96, "s5", "collide-shape-moving"]
|
||||
],
|
||||
"(anon-function 74 target-flut)": [
|
||||
[6, "gp", "target"],
|
||||
[10, "gp", "target"],
|
||||
[16, "gp", "target"],
|
||||
[24, "gp", "target"],
|
||||
[33, "gp", "target"],
|
||||
[42, "a0", "target"],
|
||||
[49, "gp", "target"],
|
||||
[56, "gp", "target"]
|
||||
],
|
||||
"(anon-function 21 target-flut)": [[58, "v1", "art-joint-anim"]],
|
||||
"(code target-flut-death)": [
|
||||
[609, "a1", "art-joint-anim"],
|
||||
[698, "a1", "art-joint-anim"]
|
||||
],
|
||||
"(code target-flut-get-on)": [
|
||||
[75, "s3", "process-drawable"],
|
||||
[72, "s2", "process-drawable"],
|
||||
[204, "v1", "process-drawable"],
|
||||
[201, "s3", "process-drawable"]
|
||||
],
|
||||
"(code target-flut-running-attack)": [
|
||||
[129, "a0", "uint"],
|
||||
[298, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(trans target-flut-running-attack)": [[87, "v1", "int"]],
|
||||
"(anon-function 20 target-flut)": [
|
||||
// [
|
||||
// 119,
|
||||
// "v1",
|
||||
// "art-joint-anim"
|
||||
// ],
|
||||
// [
|
||||
// 284,
|
||||
// "v1",
|
||||
// "art-joint-anim"
|
||||
// ]
|
||||
]
|
||||
}
|
||||
|
@ -760,9 +760,9 @@ s32 find_or_add_texture_to_level(tfrag3::Level& out,
|
||||
}
|
||||
|
||||
// check eyes
|
||||
u32 eye_tpage = version == GameVersion::Jak2 ? 0x70c : 0x1cf;
|
||||
u32 left_id = version == GameVersion::Jak2 ? 7 : 0x6f;
|
||||
u32 right_id = version == GameVersion::Jak2 ? 8 : 0x70;
|
||||
u32 eye_tpage = PerGameVersion<u32>(0x1cf, 0x70c, 0x3)[version];
|
||||
u32 left_id = PerGameVersion<u32>(0x6f, 0x7, 0x2)[version];
|
||||
u32 right_id = PerGameVersion<u32>(0x70, 0x8, 0x3)[version];
|
||||
|
||||
if (eye_out && (pc_combo_tex_id >> 16) == eye_tpage) {
|
||||
auto tex_it = tex_db.textures.find(pc_combo_tex_id);
|
||||
|
@ -23,6 +23,7 @@ void EyeRenderer::init_textures(TexturePool& texture_pool, GameVersion version)
|
||||
tbp += EYE_BASE_BLOCK_JAK1;
|
||||
break;
|
||||
case GameVersion::Jak2:
|
||||
case GameVersion::Jak3:
|
||||
// NOTE: using jak 1's address because jak 2's breaks some ocean stuff.
|
||||
tbp += EYE_BASE_BLOCK_JAK1;
|
||||
break;
|
||||
|
@ -302,6 +302,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
init_bucket_renderer<DirectRenderer>("debug-menu", BucketCategory::OTHER, BucketId::DEBUG_MENU,
|
||||
0x8000);
|
||||
|
||||
auto eye_renderer = std::make_unique<EyeRenderer>("eyes", 0);
|
||||
m_render_state.eye_renderer = eye_renderer.get();
|
||||
m_jak3_eye_renderer = std::move(eye_renderer);
|
||||
|
||||
// for any unset renderers, just set them to an EmptyBucketRenderer.
|
||||
for (size_t i = 0; i < m_bucket_renderers.size(); i++) {
|
||||
if (!m_bucket_renderers[i]) {
|
||||
@ -312,6 +316,8 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
m_bucket_renderers[i]->init_shaders(m_render_state.shaders);
|
||||
m_bucket_renderers[i]->init_textures(*m_render_state.texture_pool, GameVersion::Jak3);
|
||||
}
|
||||
m_jak3_eye_renderer->init_shaders(m_render_state.shaders);
|
||||
m_jak3_eye_renderer->init_textures(*m_render_state.texture_pool, GameVersion::Jak3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1041,6 +1047,12 @@ void OpenGLRenderer::draw_renderer_selection_window() {
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
if (m_jak3_eye_renderer) {
|
||||
if (ImGui::TreeNode("Eyes")) {
|
||||
m_jak3_eye_renderer->draw_debug_window();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
@ -135,5 +135,6 @@ class OpenGLRenderer {
|
||||
} m_fbo_state;
|
||||
|
||||
std::unique_ptr<BucketRenderer> m_jak2_eye_renderer;
|
||||
std::unique_ptr<BucketRenderer> m_jak3_eye_renderer;
|
||||
GameVersion m_version;
|
||||
};
|
||||
|
@ -53,6 +53,7 @@
|
||||
|
||||
(define-extern traffic-start (function none))
|
||||
(define-extern traffic-kill (function none))
|
||||
(define-extern ctywide-entity-hack (function none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
@ -228,6 +228,6 @@
|
||||
(last-nonzero-input-dir-targ quaternion :inline :offset 6384)
|
||||
(time-of-last-wall-hide-first-check-pass time-frame :offset 6400)
|
||||
(time-of-first-wall-hide-first-check-pass time-frame :offset 6408)
|
||||
(pad uint8 4)
|
||||
(unknown-float0000 float :offset 6416)
|
||||
)
|
||||
)
|
||||
|
@ -549,7 +549,7 @@
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(logclear! (-> self elevator-status) (elevator-status waiting-to-descend))
|
||||
(path-control-method-9 (-> self path))
|
||||
(debug-draw (-> self path))
|
||||
(plat-post)
|
||||
)
|
||||
)
|
||||
|
@ -164,14 +164,15 @@
|
||||
)
|
||||
(update-anim-data (-> self skel))
|
||||
(do-joint-math (-> self draw) (-> self node-list) (-> self skel))
|
||||
(let ((a0-22 (-> self skel effect)))
|
||||
(if a0-22
|
||||
(effect-control-method-9 a0-22)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self skel status) (joint-control-status blend-shape blend-shape-valid))
|
||||
(merc-blend-shape self)
|
||||
)
|
||||
;; not-yet-implemented
|
||||
;; (let ((a0-22 (-> self skel effect)))
|
||||
;; (if a0-22
|
||||
;; (effect-control-method-9 a0-22)
|
||||
;; )
|
||||
;; )
|
||||
;; (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)
|
||||
)
|
||||
@ -2054,7 +2055,7 @@
|
||||
:trans (behavior ()
|
||||
(when (-> self enable)
|
||||
(when (nonzero? (-> self path))
|
||||
(path-control-method-9 (-> self path))
|
||||
(debug-draw (-> self path))
|
||||
(get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp)
|
||||
(displacement-between-points-at-percent-normalized! (-> self path) (-> self last-velocity) (-> self path-pos))
|
||||
(let ((f0-3 (+ (-> self path-pos) (* (-> self path-speed) (seconds-per-frame)))))
|
||||
|
@ -67,7 +67,7 @@
|
||||
(defmethod draw-path ((this flow-control))
|
||||
(let ((a0-1 (-> this path)))
|
||||
(if (nonzero? a0-1)
|
||||
(path-control-method-9 a0-1)
|
||||
(debug-draw a0-1)
|
||||
)
|
||||
)
|
||||
0
|
||||
@ -129,17 +129,14 @@
|
||||
0
|
||||
(let ((f0-12 (/ f30-0 (- f30-0 f0-10))))
|
||||
(set! sv-208 (new 'stack-no-clear 'vector))
|
||||
(let ((t9-2 (method-of-object (-> this path) path-control-method-13)))
|
||||
sv-208
|
||||
(+ (the float (if (= s4-0 (+ s2-0 -1))
|
||||
(+ s4-0 -1)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
f0-12
|
||||
)
|
||||
(t9-2)
|
||||
)
|
||||
(displacement-between-two-points-normalized! (-> this path) sv-208 (+ (the float (if (= s4-0 (+ s2-0 -1))
|
||||
(+ s4-0 -1)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
f0-12
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -262,10 +259,7 @@
|
||||
(let ((f0-12 (/ f30-0 (- f30-0 f0-10)))
|
||||
(s1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((t9-3 (method-of-object (-> this path) path-control-method-13)))
|
||||
(+ (the float s3-1) f0-12)
|
||||
(t9-3)
|
||||
)
|
||||
(displacement-between-two-points-normalized! (-> this path) s1-1 (+ (the float s3-1) f0-12))
|
||||
(let ((v1-17 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! v1-17 s1-1 (* (-> s2-0 speed) (seconds-per-frame)))
|
||||
(let ((a1-16 (new 'stack-no-clear 'vector)))
|
||||
|
@ -5,5 +5,945 @@
|
||||
;; name in dgo: collision-editor
|
||||
;; dgos: GAME
|
||||
|
||||
;; +++collision-editor-func
|
||||
(defenum collision-editor-func
|
||||
:type uint64
|
||||
(analog 0)
|
||||
(edit 1)
|
||||
(print-collision 2)
|
||||
(stop-editor 3)
|
||||
)
|
||||
;; ---collision-editor-func
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
(defskelgroup skel-collision-editor sew-rove-plat sew-rove-plat-lod0-jg sew-rove-plat-idle-ja
|
||||
((sew-rove-plat-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 100)
|
||||
)
|
||||
|
||||
(deftype collision-editor-default-proc (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defstate idle (collision-editor-default-proc)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(deactivate self)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defbehavior collision-editor-default-proc-init-by-other collision-editor-default-proc ()
|
||||
(let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096000.0)
|
||||
(set! (-> gp-0 total-prims) (the-as uint 1))
|
||||
(set! (-> gp-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> gp-0 root-prim)))
|
||||
(set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) gp-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(transform-post)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
(deftype collision-editor-edited-proc (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defstate idle (collision-editor-edited-proc)
|
||||
:virtual #t
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(transform-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior collision-editor-edited-proc-init-by-other collision-editor-edited-proc ()
|
||||
(let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096.0)
|
||||
(set! (-> gp-0 total-prims) (the-as uint 1))
|
||||
(set! (-> gp-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> gp-0 root-prim)))
|
||||
(set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) gp-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
(define *collision-editor-mesh-names* (new 'static 'boxed-array :type string "moveplat"))
|
||||
|
||||
(define *collision-editor-art-group-name* "sew-rove-plat")
|
||||
|
||||
(defun collision-editor-add-mesh-to-ccache ((arg0 collide-shape-prim-group) (arg1 collide-cache))
|
||||
(set! (-> arg1 collide-box4w min x) -409600000)
|
||||
(set! (-> arg1 collide-box4w min y) -409600000)
|
||||
(set! (-> arg1 collide-box4w min z) -409600000)
|
||||
(set! (-> arg1 collide-box4w max x) #x186a0000)
|
||||
(set! (-> arg1 collide-box4w max y) #x186a0000)
|
||||
(set! (-> arg1 collide-box4w max z) #x186a0000)
|
||||
(set! (-> arg1 num-tris) 0)
|
||||
(set! (-> arg1 num-prims) 0)
|
||||
(set! (-> arg1 collide-with) (the-as collide-spec -1))
|
||||
(set! (-> arg1 ignore-mask) (new 'static 'pat-surface))
|
||||
(add-fg-prim-using-box arg0 arg1)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
(defun print-default-collision ((arg0 process-drawable))
|
||||
(local-vars (sv-224 matrix) (sv-240 symbol) (sv-256 string) (sv-272 float) (sv-288 float))
|
||||
(let ((gp-0 (process-spawn collision-editor-default-proc :name "collision-editor-default-proc")))
|
||||
(when gp-0
|
||||
(when (and (nonzero? (-> (the-as process-drawable (-> gp-0 0)) draw))
|
||||
(-> (the-as process-drawable (-> gp-0 0)) draw jgeo)
|
||||
)
|
||||
(format #t "(group (#f~%")
|
||||
(format #t " :action (solid)~%")
|
||||
(format #t " :collide-as enemy~%")
|
||||
(format #t " :collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 2.0))~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name)
|
||||
)
|
||||
(format #t " :children (~%")
|
||||
(let* ((t9-10 (method-of-type res-lump get-property-struct))
|
||||
(a0-11 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra))
|
||||
(a1-10 'collide-mesh-group)
|
||||
(a2-3 'interp)
|
||||
(a3-3 -1000000000.0)
|
||||
(t0-0 (the-as float #f))
|
||||
(s5-1 (the-as
|
||||
(array collide-mesh)
|
||||
(t9-10 a0-11 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and s5-1 (> (length s5-1) 0))
|
||||
(dotimes (s4-0 (length s5-1))
|
||||
(format
|
||||
#t
|
||||
" (mesh ((la-collide-mesh ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> *collision-editor-mesh-names* s4-0)
|
||||
)
|
||||
(format #t " :action solid~%")
|
||||
(format #t " :collide-as enemy~%")
|
||||
(format #t " :collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(let ((v1-22 (-> s5-1 s4-0 joint-id)))
|
||||
(cond
|
||||
((= v1-22 -1)
|
||||
(format #t " ;;:transform-index JOINT_ID_NO_TRANSFORM~%")
|
||||
)
|
||||
((= v1-22 -2)
|
||||
(format #t " ;;:transform-index JOINT_ID_ROOT_TRANSLATION~%")
|
||||
)
|
||||
((= v1-22 -3)
|
||||
(format #t " ;;:transform-index JOINT_ID_ROOT_TRANSFORM~%")
|
||||
)
|
||||
(else
|
||||
(let ((t9-19 format)
|
||||
(a0-23 #t)
|
||||
(a1-18 " :transform-index (joint-node-index ~S ~S)~%")
|
||||
(a2-5 *collision-editor-art-group-name*)
|
||||
(a3-12 (-> (the-as process-drawable (-> gp-0 0)) node-list data (+ (-> s5-1 s4-0 joint-id) 1) joint name))
|
||||
)
|
||||
(t9-19 a0-23 a1-18 a2-5 a3-12)
|
||||
(let ((s0-0 (new 'stack 'collide-shape-prim-mesh (the-as collide-shape 0) (the-as uint a3-12) (the-as uint t0-0))))
|
||||
(set! (-> s0-0 cshape) (the-as collide-shape (-> (the-as process-drawable (-> gp-0 0)) root)))
|
||||
(set! (-> s0-0 transform-index) (+ (-> s5-1 s4-0 joint-id) 1))
|
||||
(set! (-> s0-0 prim-core prim-type) 1)
|
||||
(set! (-> s0-0 local-sphere w) 1.0)
|
||||
(set! (-> s0-0 mesh) (-> s5-1 s4-0))
|
||||
(set! (-> s0-0 mesh-cache-id) (the-as uint 0))
|
||||
(set! (-> s0-0 mesh-id) s4-0)
|
||||
(collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s0-0) *collide-cache*)
|
||||
(let ((a0-26 (the-as object (-> *collide-cache* tris)))
|
||||
(v1-41 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (nonzero? (-> *collide-cache* num-tris))
|
||||
(set! (-> v1-41 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad))
|
||||
(set! (-> s2-0 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad))
|
||||
)
|
||||
(countdown (a1-27 (-> *collide-cache* num-tris))
|
||||
(set! (-> v1-41 x) (fmin
|
||||
(fmin
|
||||
(fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-41 y) (fmin
|
||||
(fmin
|
||||
(fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-41 z) (fmin
|
||||
(fmin
|
||||
(fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 x) (fmax
|
||||
(fmax
|
||||
(fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 y) (fmax
|
||||
(fmax
|
||||
(fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 z) (fmax
|
||||
(fmax
|
||||
(fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
|
||||
)
|
||||
)
|
||||
(set! a0-26 (-> (the-as (inline-array collide-cache-tri) a0-26) 1))
|
||||
)
|
||||
(vector+! s3-0 v1-41 s2-0)
|
||||
(vector-float*! s3-0 s3-0 0.5)
|
||||
(vector<-cspace! s1-0 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index)))
|
||||
(vector-! s1-0 s3-0 s1-0)
|
||||
(set! sv-224 (new 'stack-no-clear 'matrix))
|
||||
(let* ((a0-35 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform))
|
||||
(a2-11 (-> a0-35 rvec quad))
|
||||
(a1-36 (-> a0-35 uvec quad))
|
||||
(v1-53 (-> a0-35 fvec quad))
|
||||
(a0-36 (-> a0-35 trans quad))
|
||||
)
|
||||
(set! (-> sv-224 rvec quad) a2-11)
|
||||
(set! (-> sv-224 uvec quad) a1-36)
|
||||
(set! (-> sv-224 fvec quad) v1-53)
|
||||
(set! (-> sv-224 trans quad) a0-36)
|
||||
)
|
||||
(vector-reset! (-> sv-224 trans))
|
||||
(matrix-transpose! sv-224 sv-224)
|
||||
(vector-matrix*! s1-0 s1-0 sv-224)
|
||||
(let ((s0-1 format))
|
||||
(set! sv-240 #t)
|
||||
(set! sv-256 " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%")
|
||||
(set! sv-272 (-> s1-0 x))
|
||||
(set! sv-288 (-> s1-0 y))
|
||||
(let ((s1-1 (-> s1-0 z))
|
||||
(t1-1 (* 1.0001 (vector-vector-distance s3-0 s2-0)))
|
||||
)
|
||||
(set! t0-0 s1-1)
|
||||
(s0-1 sv-240 sv-256 sv-272 sv-288 t0-0 t1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t " ))~%")
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(format #t " (sphere (#f~%")
|
||||
(format #t " :action solid~%")
|
||||
(format #t " :collide-as enemy~%")
|
||||
(format #t " :collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name)
|
||||
)
|
||||
(format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 1.0))~%")
|
||||
(format #t " ))~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t " )))~%")
|
||||
)
|
||||
)
|
||||
(deactivate (-> gp-0 0))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun print-actual-collision ((arg0 process-drawable))
|
||||
(format #t "~%~%")
|
||||
(when arg0
|
||||
(when (type? (-> arg0 root) collide-shape)
|
||||
(let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim))
|
||||
(s4-0 0)
|
||||
)
|
||||
(let ((v1-3 (-> s5-0 prim-core prim-type)))
|
||||
(cond
|
||||
((or (= v1-3 1) (= v1-3 -1))
|
||||
(set! s4-0 1)
|
||||
)
|
||||
((zero? v1-3)
|
||||
(let ((s4-1 s5-0))
|
||||
(format #t "(group (#f~%")
|
||||
(format #t " ;;:action (solid)~%")
|
||||
(format #t " ;;:collide-as enemy~%")
|
||||
(format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> s5-0 local-sphere x)
|
||||
(-> s5-0 local-sphere y)
|
||||
(-> s5-0 local-sphere z)
|
||||
(-> s5-0 local-sphere w)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> arg0 node-list data (-> s4-1 transform-index) joint name)
|
||||
)
|
||||
(format #t " :children (~%")
|
||||
(set! s4-0 (the-as int (-> s4-1 specific 1)))
|
||||
)
|
||||
(&+! s5-0 80)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s3-0 s4-0)
|
||||
(case (-> s5-0 prim-core prim-type)
|
||||
((1)
|
||||
(let ((v1-11 s5-0))
|
||||
(format
|
||||
#t
|
||||
" (mesh ((la-collide-mesh ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> (the-as
|
||||
(array string)
|
||||
(+ (* (-> (the-as collide-shape-prim-mesh v1-11) mesh-id) 4) (the-as int *collision-editor-mesh-names*))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t " ;;:action solid~%")
|
||||
(format #t " ;;:collide-as enemy~%")
|
||||
(format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> arg0 node-list data (-> s5-0 transform-index) joint name)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
" :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> s5-0 local-sphere x)
|
||||
(-> s5-0 local-sphere y)
|
||||
(-> s5-0 local-sphere z)
|
||||
(-> s5-0 local-sphere w)
|
||||
)
|
||||
(format #t " ))~%")
|
||||
)
|
||||
((-1)
|
||||
(format #t " (sphere (#f~%")
|
||||
(format #t " ;;:action solid~%")
|
||||
(format #t " ;;:collide-as enemy~%")
|
||||
(format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> arg0 node-list data (-> s5-0 transform-index) joint name)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
" :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> s5-0 local-sphere x)
|
||||
(-> s5-0 local-sphere y)
|
||||
(-> s5-0 local-sphere z)
|
||||
(-> s5-0 local-sphere w)
|
||||
)
|
||||
(format #t " ))~%")
|
||||
)
|
||||
)
|
||||
(&+! s5-0 80)
|
||||
)
|
||||
)
|
||||
(if (zero? (-> (the-as collide-shape (-> arg0 root)) root-prim prim-core prim-type))
|
||||
(format #t " )))~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "~%~%")
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype collision-editor (process)
|
||||
((proc handle)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod inspect ((this collision-editor))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tproc: ~D~%" (-> this proc))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
(deftype collision-edit-info (structure)
|
||||
((editing symbol)
|
||||
(current-func collision-editor-func)
|
||||
(analog-func collision-editor-func)
|
||||
(current-prim int32)
|
||||
)
|
||||
(:methods
|
||||
(collision-edit-info-method-9 (_type_) none)
|
||||
(draw-menu (_type_ process-drawable) none)
|
||||
(collision-edit-info-method-11 (_type_ process-drawable) none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod inspect ((this collision-edit-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'collision-edit-info)
|
||||
(format #t "~1Tediting: ~A~%" (-> this editing))
|
||||
(format #t "~1Tcurrent-func: ~D~%" (-> this current-func))
|
||||
(format #t "~1Tanalog-func: ~D~%" (-> this analog-func))
|
||||
(format #t "~1Tcurrent-prim: ~D~%" (-> this current-prim))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
(defun collision-edit-get-max-prim ((arg0 process-drawable))
|
||||
(let ((gp-0 0))
|
||||
(when (and arg0 (type? (-> arg0 root) collide-shape))
|
||||
(let ((v1-3 (-> (the-as collide-shape (-> arg0 root)) root-prim)))
|
||||
(if (zero? (-> v1-3 prim-core prim-type))
|
||||
(set! gp-0 (the-as int (-> v1-3 specific 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs collide-shape-prim.
|
||||
(defun collision-edit-get-prim ((arg0 process-drawable) (arg1 int))
|
||||
(when (and arg0 (type? (-> arg0 root) collide-shape))
|
||||
(let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim))
|
||||
(v1-3 (collision-edit-get-max-prim arg0))
|
||||
)
|
||||
(if (and s5-0 (>= v1-3 arg1))
|
||||
(return (the-as collide-shape-prim (+ (the-as uint s5-0) (* 80 arg1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as collide-shape-prim #f)
|
||||
)
|
||||
|
||||
(defmethod collision-edit-info-method-9 ((this collision-edit-info))
|
||||
(if (cpad-pressed? 0 up)
|
||||
(+! (-> this current-func) -1)
|
||||
)
|
||||
(if (cpad-pressed? 0 left)
|
||||
(+! (-> this current-func) -4)
|
||||
)
|
||||
(if (cpad-pressed? 0 down)
|
||||
(+! (-> this current-func) 1)
|
||||
)
|
||||
(if (cpad-pressed? 0 right)
|
||||
(+! (-> this current-func) 4)
|
||||
)
|
||||
(cond
|
||||
((< (the-as int (-> this current-func)) 0)
|
||||
(set! (-> this current-func) (collision-editor-func stop-editor))
|
||||
)
|
||||
((>= (the-as int (-> this current-func)) 4)
|
||||
(set! (-> this current-func) (collision-editor-func analog))
|
||||
0
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod collision-edit-info-method-11 ((this collision-edit-info) (arg0 process-drawable))
|
||||
(local-vars (s5-0 int))
|
||||
(when (not arg0)
|
||||
(set! s5-0 (the-as int #f))
|
||||
(goto cfg-14)
|
||||
)
|
||||
(set! s5-0 (-> this current-prim))
|
||||
(let ((v1-2 (collision-edit-get-max-prim arg0)))
|
||||
(when (cpad-pressed? 0 r1)
|
||||
(+! s5-0 1)
|
||||
(if (cpad-hold? 0 l1)
|
||||
(+! s5-0 4)
|
||||
)
|
||||
)
|
||||
(when (cpad-pressed? 0 l1)
|
||||
(+! s5-0 -1)
|
||||
(if (cpad-hold? 0 r1)
|
||||
(+! s5-0 -4)
|
||||
)
|
||||
)
|
||||
(if (< s5-0 0)
|
||||
(set! s5-0 v1-2)
|
||||
)
|
||||
(if (< v1-2 s5-0)
|
||||
(set! s5-0 0)
|
||||
)
|
||||
)
|
||||
(set! (-> this current-prim) s5-0)
|
||||
(label cfg-14)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod draw-menu ((this collision-edit-info) (arg0 process-drawable))
|
||||
(local-vars (a3-0 string))
|
||||
(when (cpad-pressed? 0 l2)
|
||||
(set! (-> this editing) (not (-> this editing)))
|
||||
(cond
|
||||
((-> this editing)
|
||||
(set! *external-cam-mode* 'locked)
|
||||
)
|
||||
(*target*
|
||||
(set! *external-cam-mode* #f)
|
||||
)
|
||||
(else
|
||||
(set! *external-cam-mode* 'pad-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((or (not (-> this editing)) (cpad-hold? 0 r2))
|
||||
(if (not (-> this editing))
|
||||
(format *stdcon* "press l2 to edit collision~%")
|
||||
(format *stdcon* "release r2 to continue editing collision~%")
|
||||
)
|
||||
(if (or (cpad-hold? 0 r2) (not *target*))
|
||||
(set! *external-cam-mode* 'pad-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! *external-cam-mode* 'locked)
|
||||
(collision-edit-info-method-9 this)
|
||||
(collision-edit-info-method-11 this arg0)
|
||||
(let ((s3-0 ">")
|
||||
(s4-0 " ")
|
||||
)
|
||||
(if (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
|
||||
(set! s3-0 " ")
|
||||
)
|
||||
(format *stdcon* " r2/l2: move camera~%")
|
||||
(let ((s2-0 (-> this current-prim)))
|
||||
"??"
|
||||
(let ((v1-38 (collision-edit-get-prim arg0 0)))
|
||||
(when v1-38
|
||||
(if (zero? (-> v1-38 prim-core prim-type))
|
||||
(+! s2-0 -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= s2-0 -1)
|
||||
(set! a3-0 "*group*")
|
||||
)
|
||||
((= (-> (collision-edit-get-prim arg0 s2-0) prim-core prim-type) 1)
|
||||
(set! a3-0 (-> *collision-editor-mesh-names* s2-0))
|
||||
)
|
||||
(else
|
||||
(set! a3-0 "*sphere*")
|
||||
)
|
||||
)
|
||||
)
|
||||
(format *stdcon* " r1/l1: select prim ~D ~S~%" (-> this current-prim) a3-0)
|
||||
(format *stdcon* " dpad: select function~%")
|
||||
(format *stdcon* " x, tri: toggle/call~%")
|
||||
(format *stdcon* "------------------------~%")
|
||||
(format
|
||||
*stdcon*
|
||||
" ~S analog: ~S~%"
|
||||
(if (= (-> this current-func) (collision-editor-func analog))
|
||||
s3-0
|
||||
s4-0
|
||||
)
|
||||
(if (= (-> this analog-func) (collision-editor-func analog))
|
||||
"adjust sphere"
|
||||
"???"
|
||||
)
|
||||
)
|
||||
(let ((v1-50 (collision-edit-get-prim arg0 (-> this current-prim)))
|
||||
(a3-2 (the-as basic "??"))
|
||||
)
|
||||
(if (zero? (-> v1-50 transform-index))
|
||||
(set! a3-2 "*root*")
|
||||
)
|
||||
(if (and v1-50
|
||||
(< (-> v1-50 transform-index) (-> arg0 node-list length))
|
||||
(-> arg0 node-list data (-> v1-50 transform-index) joint)
|
||||
)
|
||||
(set! a3-2 (-> arg0 node-list data (-> v1-50 transform-index) joint name))
|
||||
)
|
||||
(format
|
||||
*stdcon*
|
||||
" ~S change sphere joint ~S~%"
|
||||
(if (= (-> this current-func) (collision-editor-func edit))
|
||||
s3-0
|
||||
s4-0
|
||||
)
|
||||
a3-2
|
||||
)
|
||||
)
|
||||
(format
|
||||
*stdcon*
|
||||
" ~S print to listener~%"
|
||||
(if (= (-> this current-func) (collision-editor-func print-collision))
|
||||
s3-0
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
(format *stdcon* " ~S quit~%" (cond
|
||||
((= (-> this current-func) (collision-editor-func stop-editor))
|
||||
(empty)
|
||||
s3-0
|
||||
)
|
||||
(else
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 0))
|
||||
(if (cpad-pressed? 0 x)
|
||||
(+! s4-1 1)
|
||||
)
|
||||
(if (cpad-pressed? 0 triangle)
|
||||
(+! s4-1 -1)
|
||||
)
|
||||
(when (nonzero? s4-1)
|
||||
(case (-> this current-func)
|
||||
(((collision-editor-func analog))
|
||||
(+! (-> this analog-func) s4-1)
|
||||
)
|
||||
(((collision-editor-func edit))
|
||||
(let ((v1-75 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(when (and v1-75 (!= (-> v1-75 prim-core prim-type) 1))
|
||||
(let* ((a0-41 (-> v1-75 transform-index))
|
||||
(a1-25 (+ (-> arg0 node-list length) -1))
|
||||
(a0-42 (+ a0-41 s4-1))
|
||||
)
|
||||
(if (< a0-42 0)
|
||||
(set! a0-42 a1-25)
|
||||
)
|
||||
(while (or (= a0-42 1) (= a0-42 2))
|
||||
(+! a0-42 s4-1)
|
||||
)
|
||||
(if (< a1-25 a0-42)
|
||||
(set! a0-42 0)
|
||||
)
|
||||
(set! (-> v1-75 transform-index) a0-42)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(((collision-editor-func print-collision))
|
||||
(print-actual-collision arg0)
|
||||
)
|
||||
(((collision-editor-func stop-editor))
|
||||
(kill-by-type collision-editor-edited-proc *active-pool*)
|
||||
(kill-by-type collision-editor *active-pool*)
|
||||
)
|
||||
(else
|
||||
(format 0 "~%ERROR<GMJ>: bad collision-edit-func~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< (the-as int (-> this analog-func)) 0)
|
||||
(set! (-> this analog-func) (collision-editor-func analog))
|
||||
0
|
||||
)
|
||||
((>= (the-as int (-> this analog-func)) 1)
|
||||
(set! (-> this analog-func) (collision-editor-func analog))
|
||||
0
|
||||
)
|
||||
)
|
||||
(when arg0
|
||||
(let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))
|
||||
(f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 1.0))
|
||||
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 1.0))
|
||||
(f24-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 1.0))
|
||||
)
|
||||
(when (or (!= f30-0 0.0) (!= f28-0 0.0) (!= f26-0 0.0) (!= f24-0 0.0))
|
||||
(when (= (-> this analog-func) (collision-editor-func analog))
|
||||
(set! f30-0 (* -409.6 f30-0))
|
||||
(set! f28-0 (* -409.6 f28-0))
|
||||
(let ((f0-8 (+ (* 0.01 f24-0) (* -0.01 f26-0))))
|
||||
(set! f24-0 (+ 1.0 f0-8))
|
||||
)
|
||||
(set! f26-0 0.0)
|
||||
)
|
||||
(when (= (-> this analog-func) (collision-editor-func analog))
|
||||
(let ((s4-2 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(when s4-2
|
||||
(set! (-> s4-2 local-sphere w) (* (-> s4-2 local-sphere w) f24-0))
|
||||
(let ((s3-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-17 (matrix-local->world #f #f))
|
||||
(v1-107 (-> a2-17 rvec quad))
|
||||
(a0-58 (-> a2-17 uvec quad))
|
||||
(a1-37 (-> a2-17 fvec quad))
|
||||
(a2-18 (-> a2-17 trans quad))
|
||||
)
|
||||
(set! (-> s3-1 rvec quad) v1-107)
|
||||
(set! (-> s3-1 uvec quad) a0-58)
|
||||
(set! (-> s3-1 fvec quad) a1-37)
|
||||
(set! (-> s3-1 trans quad) a2-18)
|
||||
)
|
||||
(let ((s2-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-19 (-> arg0 node-list data (-> s4-2 transform-index) bone transform))
|
||||
(v1-111 (-> a2-19 rvec quad))
|
||||
(a0-61 (-> a2-19 uvec quad))
|
||||
(a1-38 (-> a2-19 fvec quad))
|
||||
(a2-20 (-> a2-19 trans quad))
|
||||
)
|
||||
(set! (-> s2-1 rvec quad) v1-111)
|
||||
(set! (-> s2-1 uvec quad) a0-61)
|
||||
(set! (-> s2-1 fvec quad) a1-38)
|
||||
(set! (-> s2-1 trans quad) a2-20)
|
||||
)
|
||||
(let ((s1-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-1 x) f30-0)
|
||||
(set! (-> s1-1 y) f28-0)
|
||||
(set! (-> s1-1 z) f26-0)
|
||||
(set! (-> s1-1 w) 1.0)
|
||||
(vector-reset! (-> s3-1 trans))
|
||||
(vector-matrix*! s1-1 s1-1 s3-1)
|
||||
(vector-reset! (-> s2-1 trans))
|
||||
(matrix-transpose! s2-1 s2-1)
|
||||
(vector-matrix*! s1-1 s1-1 s2-1)
|
||||
(+! (-> s4-2 local-sphere x) (-> s1-1 x))
|
||||
(+! (-> s4-2 local-sphere y) (-> s1-1 y))
|
||||
(+! (-> s4-2 local-sphere z) (-> s1-1 z))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(cond
|
||||
(s5-1
|
||||
(show-maya-skeleton arg0 (-> s5-1 transform-index) #x45800000)
|
||||
(let ((gp-1 (shl #x80ff 16)))
|
||||
(let ((v1-117 (-> s5-1 prim-core prim-type)))
|
||||
(cond
|
||||
((= v1-117 1)
|
||||
(collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s5-1) *collide-cache*)
|
||||
(debug-draw *collide-cache*)
|
||||
(let ((s4-3 (the-as object (-> *collide-cache* tris))))
|
||||
(countdown (s3-2 (-> *collide-cache* num-tris))
|
||||
(when (< (-> s5-1 prim-core world-sphere w)
|
||||
(vector-vector-distance
|
||||
(the-as vector (-> s5-1 prim-core))
|
||||
(the-as vector (-> (the-as collide-cache-tri s4-3) vertex))
|
||||
)
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(the-as vector (-> (the-as collide-cache-tri s4-3) vertex))
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(set! gp-1 (the-as int (the-as uint #x800000ff)))
|
||||
)
|
||||
(when (< (-> s5-1 prim-core world-sphere w)
|
||||
(vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 1))
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> (the-as collide-cache-tri s4-3) vertex 1)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(set! gp-1 (the-as int (the-as uint #x800000ff)))
|
||||
)
|
||||
(when (< (-> s5-1 prim-core world-sphere w)
|
||||
(vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 2))
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> (the-as collide-cache-tri s4-3) vertex 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(set! gp-1 (the-as int (the-as uint #x800000ff)))
|
||||
)
|
||||
(set! s4-3 (&+ (the-as collide-cache-tri s4-3) 64))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-117 -1)
|
||||
)
|
||||
((zero? v1-117)
|
||||
)
|
||||
)
|
||||
)
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(the-as vector (-> s5-1 prim-core))
|
||||
(-> s5-1 prim-core world-sphere w)
|
||||
(the-as rgba gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(show-maya-skeleton arg0 1000 #x45800000)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *collision-edit-info* (the-as collision-edit-info 0))
|
||||
|
||||
(define *collision-edit-info*
|
||||
(new 'static 'collision-edit-info :editing #t :current-func (collision-editor-func print-collision))
|
||||
)
|
||||
|
||||
(defstate idle (collision-editor)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(set! *external-cam-mode* #f)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 *collision-edit-info*)
|
||||
(s5-0 (method-of-type collision-edit-info draw-menu))
|
||||
(s4-0 (handle->process (-> self proc)))
|
||||
)
|
||||
(s5-0 gp-0 (the-as process-drawable (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defbehavior collision-editor-init-by-other collision-editor ((arg0 handle))
|
||||
(set! (-> self proc) arg0)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
(defun stop-collision-edit ()
|
||||
(kill-by-type collision-editor-edited-proc *active-pool*)
|
||||
(kill-by-type collision-editor *active-pool*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun collision-edit ((arg0 process))
|
||||
(stop-collision-edit)
|
||||
(when (not arg0)
|
||||
(let ((v1-2 (process-spawn collision-editor-edited-proc :name "collision-editor-edited-proc")))
|
||||
(set! arg0 (if v1-2
|
||||
(the-as process (-> v1-2 0 self))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (process->handle (the-as process-tree arg0))))
|
||||
(process-spawn collision-editor gp-2 :name "collision-editor")
|
||||
)
|
||||
)
|
||||
|
@ -1895,7 +1895,7 @@
|
||||
(update-warp-and-hud *texture-pool*)
|
||||
)
|
||||
(-> arg0 frames (-> arg0 on-screen) global-buf)
|
||||
;; (update-eyes) TODO
|
||||
(update-eyes)
|
||||
)
|
||||
(when *debug-segment*
|
||||
(with-profiler 'debug *profile-debug-color*
|
||||
|
@ -1107,7 +1107,7 @@
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) path))
|
||||
(path-control-method-9 (-> (the-as process-drawable arg0) path))
|
||||
(debug-draw (-> (the-as process-drawable arg0) path))
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) vol))
|
||||
(debug-draw (-> (the-as process-drawable arg0) vol))
|
||||
@ -1482,7 +1482,7 @@
|
||||
*active-pool*
|
||||
(lambda ((arg0 process)) (when (type? arg0 process-drawable)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) path))
|
||||
(path-control-method-9 (-> (the-as process-drawable arg0) path))
|
||||
(debug-draw (-> (the-as process-drawable arg0) path))
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) vol))
|
||||
(debug-draw (-> (the-as process-drawable arg0) vol))
|
||||
|
@ -1526,9 +1526,9 @@
|
||||
)
|
||||
|
||||
; ;; generate DMA to copy from render buffer to frame buffer.
|
||||
; (with-profiler 'blit-displays *profile-blit-color*
|
||||
; (blit-displays-work-method-19 *blit-displays-work*)
|
||||
; )
|
||||
(with-profiler 'blit-displays *profile-blit-color*
|
||||
(blit-displays-work-method-19 *blit-displays-work*)
|
||||
)
|
||||
|
||||
;; wrap up this frame (drawing of stdcon, debugging, etc.)
|
||||
(end-display arg0)
|
||||
|
@ -32,29 +32,29 @@ These path-controls are typically allocated on a process heap."
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type process symbol float entity symbol) _type_)
|
||||
(path-control-method-9 (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
(get-point-in-path! (_type_ vector float symbol) vector)
|
||||
(path-control-method-11 () none)
|
||||
(path-control-method-12 () none)
|
||||
(path-control-method-13 () none)
|
||||
(get-random-point (_type_ vector) vector)
|
||||
(path-control-method-12 (_type_ vector float float) vector)
|
||||
(displacement-between-two-points-normalized! (_type_ vector float) vector)
|
||||
(get-point-at-percent-along-path! (_type_ vector float symbol) vector)
|
||||
(path-control-method-15 () none)
|
||||
(path-control-method-15 (_type_ vector float float) vector)
|
||||
(displacement-between-points-at-percent-normalized! (_type_ vector float) vector)
|
||||
(get-num-segments (_type_) float)
|
||||
(total-distance (_type_) float)
|
||||
(get-num-verts (_type_) int)
|
||||
(segement-duration->path-duration (_type_ float) float)
|
||||
(path-duration->segment-duration (_type_ float) float)
|
||||
(path-control-method-22 () none)
|
||||
(path-control-method-23 () none)
|
||||
(path-control-method-24 () none)
|
||||
(path-control-method-22 (_type_ vector) float)
|
||||
(path-control-method-23 (_type_ vector) float)
|
||||
(path-control-method-24 (_type_ vector) float)
|
||||
(path-control-method-25 (_type_ vector) float)
|
||||
(path-control-method-26 () none)
|
||||
(path-control-method-27 () none)
|
||||
(path-control-method-28 () none)
|
||||
(path-control-method-29 () none)
|
||||
(path-control-method-26 (_type_ float float) float)
|
||||
(path-control-method-27 (_type_ vector) vector)
|
||||
(path-control-method-28 (_type_ vector float float) float)
|
||||
(path-control-method-29 (_type_ vector int float) float)
|
||||
(should-display-marks? (_type_) symbol)
|
||||
(path-control-method-31 () none)
|
||||
(displacement-between-two-points! (_type_ vector float float) vector)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -7,10 +7,570 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod path-control-method-25 ((this path-control) (arg0 vector))
|
||||
0.0
|
||||
(defmethod debug-draw ((this path-control))
|
||||
(cond
|
||||
((logtest? (-> this flags) (path-control-flag not-found))
|
||||
(when (and (type? (-> this process) process-drawable) *display-entity-errors* (not *display-capture-mode*))
|
||||
(let ((s5-0 add-debug-text-3d)
|
||||
(s4-0 #t)
|
||||
(s3-0 577)
|
||||
)
|
||||
(format (clear *temp-string*) "path data error in ~S" (-> this process name))
|
||||
(s5-0
|
||||
s4-0
|
||||
(the-as bucket-id s3-0)
|
||||
*temp-string*
|
||||
(-> this process root trans)
|
||||
(font-color red)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((let ((a0-5 this))
|
||||
(and *display-path-marks* (logtest? (-> a0-5 flags) (path-control-flag display)))
|
||||
)
|
||||
(dotimes (s5-1 (-> this curve num-cverts))
|
||||
(let ((s4-1 (-> this curve cverts s5-1)))
|
||||
(if (and (logtest? (-> this flags) (path-control-flag draw-line)) (< s5-1 (+ (-> this curve num-cverts) -1)))
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
s4-1
|
||||
(-> this curve cverts (+ s5-1 1))
|
||||
(new 'static 'rgba :r #xff :g #x80 :a #x80)
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> this flags) (path-control-flag draw-point))
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf1) s4-1 (new 'static 'rgba :r #xff :a #x80))
|
||||
)
|
||||
(when (logtest? (-> this flags) (path-control-flag draw-text))
|
||||
(let ((s3-1 add-debug-text-3d)
|
||||
(s2-1 #t)
|
||||
(s1-0 577)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color orange) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-point-at-percent-along-path! ((this path-control) (ret vector) (percent float) (search-type symbol))
|
||||
(static-vectorm 0 0 0)
|
||||
)
|
||||
(defmethod total-distance ((this path-control))
|
||||
(let ((f30-0 (-> this curve length)))
|
||||
(when (= f30-0 0.0)
|
||||
(dotimes (s5-0 (+ (-> this curve num-cverts) -1))
|
||||
(+! f30-0 (vector-vector-distance (-> this curve cverts s5-0) (-> this curve cverts (+ s5-0 1))))
|
||||
)
|
||||
(set! (-> this curve length) f30-0)
|
||||
)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod total-distance ((this curve-control))
|
||||
(let ((f0-0 (-> this curve length)))
|
||||
(when (= f0-0 0.0)
|
||||
(set! f0-0 (curve-length (-> this curve)))
|
||||
(set! (-> this curve length) f0-0)
|
||||
)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-26 ((this path-control) (arg0 float) (arg1 float))
|
||||
(local-vars (v1-9 float))
|
||||
(let ((f30-0 (* arg0 (the float (+ (-> this curve num-cverts) -1))))
|
||||
(f28-0 (if (< 0.0 arg1)
|
||||
1.0
|
||||
-1.0
|
||||
)
|
||||
)
|
||||
(f26-0 (fabs arg1))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(get-point-in-path! this s5-0 f30-0 'interp)
|
||||
0.0
|
||||
(while (< 0.0 f26-0)
|
||||
(let ((f24-0 (the float (the int (+ f28-0 f30-0)))))
|
||||
(set! f30-0 (cond
|
||||
((or (< f24-0 0.0) (>= f24-0 (the float (-> this curve num-cverts))))
|
||||
(set! v1-9 f24-0)
|
||||
(goto cfg-19)
|
||||
f30-0
|
||||
)
|
||||
(else
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> this curve cverts (the int (the float (the int f24-0))) quad))
|
||||
0.0
|
||||
(let ((f0-16 (vector-vector-distance s5-0 s4-0)))
|
||||
(cond
|
||||
((< f0-16 f26-0)
|
||||
(set! f26-0 (- f26-0 f0-16))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
f24-0
|
||||
)
|
||||
(else
|
||||
(let ((f0-17 (/ f26-0 f0-16)))
|
||||
(set! v1-9 (lerp f30-0 f24-0 f0-17))
|
||||
)
|
||||
(goto cfg-19)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-9 (the-as float #f))
|
||||
(label cfg-19)
|
||||
(let* ((f0-21 (/ v1-9 (the float (+ (-> this curve num-cverts) -1))))
|
||||
(f0-22 (fmin 1.0 f0-21))
|
||||
)
|
||||
(fmax 0.0 f0-22)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-point-in-path! ((this path-control) (arg0 vector) (arg1 float) (arg2 symbol))
|
||||
(let ((a1-1 (-> this curve num-cverts))
|
||||
(f0-3 (the float (the int arg1)))
|
||||
)
|
||||
(cond
|
||||
((< arg1 0.0)
|
||||
(set! (-> arg0 quad) (-> this curve cverts 0 quad))
|
||||
)
|
||||
((>= f0-3 (the float (+ a1-1 -1)))
|
||||
(set! (-> arg0 quad) (-> this curve cverts (+ a1-1 -1) quad))
|
||||
)
|
||||
((or (= arg2 'exact) (= f0-3 arg1))
|
||||
(set! (-> arg0 quad) (-> this curve cverts (the int f0-3) quad))
|
||||
)
|
||||
(else
|
||||
(vector-lerp!
|
||||
arg0
|
||||
(-> this curve cverts (the int f0-3))
|
||||
(-> this curve cverts (the int (+ 1.0 f0-3)))
|
||||
(- arg1 f0-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod get-random-point ((this path-control) (arg0 vector))
|
||||
(with-pp
|
||||
(cond
|
||||
((> (-> this curve num-cverts) 0)
|
||||
(let ((a0-2 (rand-vu-int-count (-> this curve num-cverts))))
|
||||
(set! (-> arg0 quad) (-> this curve cverts a0-2 quad))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format #t "WARNING: method get-random-point called on a path-control object with no vertices.~%")
|
||||
(if pp
|
||||
(format #t "current process is ~A~%" (-> pp name))
|
||||
)
|
||||
(set! (-> arg0 quad) (-> *null-vector* quad))
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-point-at-percent-along-path! ((this path-control) (arg0 vector) (arg1 float) (arg2 symbol))
|
||||
(get-point-in-path! this arg0 (* arg1 (the float (+ (-> this curve num-cverts) -1))) arg2)
|
||||
)
|
||||
|
||||
(defmethod get-point-at-percent-along-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol))
|
||||
(if (not (logtest? (-> this flags) (path-control-flag not-found)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
arg1
|
||||
(-> this curve cverts)
|
||||
(-> this curve num-cverts)
|
||||
(-> this curve knots)
|
||||
(-> this curve num-knots)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod get-point-in-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol))
|
||||
(if (not (logtest? (-> this flags) (path-control-flag not-found)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
(/ arg1 (the float (+ (-> this curve num-cverts) -1)))
|
||||
(-> this curve cverts)
|
||||
(-> this curve num-cverts)
|
||||
(-> this curve knots)
|
||||
(-> this curve num-knots)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod displacement-between-two-points! ((this path-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(let ((v1-0 (-> this curve num-cverts))
|
||||
(f0-3 (the float (the int arg1)))
|
||||
)
|
||||
(cond
|
||||
((or (logtest? (-> this flags) (path-control-flag not-found)) (< v1-0 2) (< arg1 0.0))
|
||||
(vector-reset! arg0)
|
||||
)
|
||||
(else
|
||||
(let ((f0-4 (fmin f0-3 (the float (+ v1-0 -2)))))
|
||||
(vector-! arg0 (-> this curve cverts (the int (+ 1.0 f0-4))) (-> this curve cverts (the int f0-4)))
|
||||
)
|
||||
(vector-float*! arg0 arg0 arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod path-control-method-12 ((this path-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(displacement-between-two-points! this arg0 arg1 arg2)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-15 ((this path-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(path-control-method-12
|
||||
this
|
||||
arg0
|
||||
(* arg1 (the float (+ (-> this curve num-cverts) -1)))
|
||||
(* arg2 (the float (+ (-> this curve num-cverts) -1)))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod displacement-between-two-points-normalized! ((this path-control) (arg0 vector) (arg1 float))
|
||||
(displacement-between-two-points! this arg0 arg1 1.0)
|
||||
(vector-normalize! arg0 1.0)
|
||||
)
|
||||
|
||||
(defmethod displacement-between-points-at-percent-normalized! ((this path-control) (arg0 vector) (arg1 float))
|
||||
(displacement-between-two-points-normalized! this arg0 (* arg1 (the float (+ (-> this curve num-cverts) -1))))
|
||||
)
|
||||
|
||||
(defmethod displacement-between-two-points! ((this curve-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(when (not (logtest? (-> this flags) (path-control-flag not-found)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
arg1
|
||||
(-> this curve cverts)
|
||||
(-> this curve num-cverts)
|
||||
(-> this curve knots)
|
||||
(-> this curve num-knots)
|
||||
)
|
||||
(cond
|
||||
((< arg1 (- 1.0 arg2))
|
||||
(curve-evaluate!
|
||||
s4-0
|
||||
(+ arg1 arg2)
|
||||
(-> this curve cverts)
|
||||
(-> this curve num-cverts)
|
||||
(-> this curve knots)
|
||||
(-> this curve num-knots)
|
||||
)
|
||||
(vector-! arg0 s4-0 arg0)
|
||||
)
|
||||
(else
|
||||
(curve-evaluate!
|
||||
s4-0
|
||||
(- arg1 arg2)
|
||||
(-> this curve cverts)
|
||||
(-> this curve num-cverts)
|
||||
(-> this curve knots)
|
||||
(-> this curve num-knots)
|
||||
)
|
||||
(vector-! arg0 arg0 s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-26 ((this curve-control) (arg0 float) (arg1 float))
|
||||
(let* ((f30-0 0.0001)
|
||||
(v1-2 (displacement-between-two-points! this (new 'stack-no-clear 'vector) arg0 f30-0))
|
||||
)
|
||||
0.0
|
||||
0.0
|
||||
(let* ((f0-3 (/ f30-0 (vector-length v1-2)))
|
||||
(v1-4 (+ arg0 (* f0-3 arg1)))
|
||||
)
|
||||
(fmax 0.0 (fmin 1.0 v1-4))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-12 ((this curve-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(displacement-between-two-points! this arg0 (/ arg1 (the float (+ (-> this curve num-cverts) -1))) arg2)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-15 ((this curve-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(displacement-between-two-points! this arg0 arg1 arg2)
|
||||
)
|
||||
|
||||
(defmethod displacement-between-points-at-percent-normalized! ((this curve-control) (arg0 vector) (arg1 float))
|
||||
(displacement-between-two-points! this arg0 arg1 0.01)
|
||||
(vector-normalize! arg0 1.0)
|
||||
)
|
||||
|
||||
(defmethod displacement-between-two-points-normalized! ((this curve-control) (arg0 vector) (arg1 float))
|
||||
(displacement-between-points-at-percent-normalized!
|
||||
this
|
||||
arg0
|
||||
(/ arg1 (the float (+ (-> this curve num-cverts) -1)))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-28 ((this path-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(local-vars
|
||||
(sv-96 vector)
|
||||
(sv-100 vector)
|
||||
(sv-104 vector)
|
||||
(sv-108 vector)
|
||||
(sv-112 number)
|
||||
(sv-116 vector)
|
||||
(sv-120 symbol)
|
||||
(sv-124 float)
|
||||
)
|
||||
(set! sv-96 (new 'stack-no-clear 'vector))
|
||||
(set! sv-100 (new 'stack-no-clear 'vector))
|
||||
(set! sv-104 (new 'stack-no-clear 'vector))
|
||||
(set! sv-108 (new 'stack-no-clear 'vector))
|
||||
(set! sv-112 -1.0)
|
||||
(set! sv-116 (new 'stack-no-clear 'vector))
|
||||
(set! sv-120 (the-as symbol #f))
|
||||
(set! sv-124 (the-as float -1.0))
|
||||
(get-point-in-path! this sv-96 0.0 'interp)
|
||||
;; og:preserve-this
|
||||
(set! sv-112 (the-as float #x7f800000))
|
||||
(when (not arg2)
|
||||
(set! sv-124 (path-control-method-22 this arg0))
|
||||
(get-point-in-path! this sv-108 sv-124 'interp)
|
||||
(set! sv-112 (vector-vector-distance-squared sv-108 arg0))
|
||||
)
|
||||
(let ((s3-1 (new 'stack-no-clear 'vector)))
|
||||
(vector+! s3-1 arg0 (the-as vector arg1))
|
||||
(dotimes (s2-0 (+ (-> this curve num-cverts) -1))
|
||||
(get-point-in-path! this sv-100 (the float (+ s2-0 1)) 'interp)
|
||||
(vector-! sv-104 sv-100 sv-96)
|
||||
(let ((s0-0 #f))
|
||||
0.0
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-0 x) -1.0)
|
||||
(set! (-> s1-0 y) -1.0)
|
||||
(line-line-find-intersection-xz arg0 (the-as vector arg1) sv-96 sv-104 s1-0)
|
||||
(when (>= (-> s1-0 x) 0.0)
|
||||
(if (and (< 0.0 (-> s1-0 y)) (>= 1.0 (-> s1-0 y)))
|
||||
(set! s0-0 #t)
|
||||
)
|
||||
(vector+float*! sv-116 arg0 (the-as vector arg1) (-> s1-0 x))
|
||||
(cond
|
||||
((and s0-0 (not sv-120))
|
||||
(set! (-> sv-108 quad) (-> sv-116 quad))
|
||||
(set! sv-112 (vector-vector-distance-squared sv-116 arg0))
|
||||
(set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y)))
|
||||
(set! sv-120 #t)
|
||||
)
|
||||
((and s0-0 sv-120)
|
||||
(let ((f0-22 (vector-vector-distance-squared sv-116 arg0)))
|
||||
(when (< f0-22 (the-as float sv-112))
|
||||
(set! (-> sv-108 quad) (-> sv-116 quad))
|
||||
(set! sv-112 f0-22)
|
||||
(set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y)))
|
||||
)
|
||||
)
|
||||
)
|
||||
((not (or s0-0 sv-120))
|
||||
(let ((s0-1 (new 'stack-no-clear 'vector))
|
||||
(a3-5 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s1-0 y) (fmax 0.0 (fmin 1.0 (-> s1-0 y))))
|
||||
(vector+float*! s0-1 sv-96 sv-104 (-> s1-0 y))
|
||||
(let* ((f0-32 (vector-segment-distance-point! s0-1 arg0 s3-1 a3-5))
|
||||
(f0-33 (* f0-32 f0-32))
|
||||
)
|
||||
(when (< f0-33 (the-as float sv-112))
|
||||
(set! (-> sv-108 quad) (-> s0-1 quad))
|
||||
(set! sv-112 f0-33)
|
||||
(set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> sv-96 quad) (-> sv-100 quad))
|
||||
)
|
||||
)
|
||||
(set! sv-124 (/ sv-124 (the float (+ (-> this curve num-cverts) -1))))
|
||||
sv-124
|
||||
)
|
||||
|
||||
(defmethod path-control-method-29 ((this path-control) (arg0 vector) (arg1 int) (arg2 float))
|
||||
(let ((s2-0 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float arg1) 'interp))
|
||||
(a2-3 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float (+ arg1 1)) 'interp))
|
||||
)
|
||||
(vector-segment-distance-point! arg0 s2-0 a2-3 (the-as vector arg2))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-22 ((this path-control) (arg0 vector))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(f30-0 4096000000.0)
|
||||
(f28-0 0.0)
|
||||
)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-0 quad) (-> arg0 quad))
|
||||
(set! (-> s3-0 y) 0.0)
|
||||
(get-point-in-path! this s4-0 0.0 'interp)
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(dotimes (s1-0 (+ (-> this curve num-cverts) -1))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp)
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(let ((f0-5 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0)))
|
||||
(when (< f0-5 f30-0)
|
||||
(set! f30-0 f0-5)
|
||||
(set! f28-0
|
||||
(+ (/ (vector-vector-xz-distance s2-0 s5-0) (vector-vector-xz-distance s4-0 s5-0)) (the float s1-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
f28-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-24 ((this path-control) (arg0 vector))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(f30-0 4096000000.0)
|
||||
(f28-0 0.0)
|
||||
)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-0 quad) (-> arg0 quad))
|
||||
(get-point-in-path! this s4-0 0.0 'interp)
|
||||
(dotimes (s1-0 (+ (-> this curve num-cverts) -1))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp)
|
||||
(let ((f0-2 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0)))
|
||||
(when (< f0-2 f30-0)
|
||||
(set! f30-0 f0-2)
|
||||
(set! f28-0 (+ (/ (vector-vector-distance s2-0 s5-0) (vector-vector-distance s4-0 s5-0)) (the float s1-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
f28-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-25 ((this path-control) (arg0 vector))
|
||||
(/ (path-control-method-24 this arg0) (the float (+ (-> this curve num-cverts) -1)))
|
||||
)
|
||||
|
||||
(defmethod path-control-method-23 ((this path-control) (arg0 vector))
|
||||
(/ (path-control-method-22 this arg0) (the float (+ (-> this curve num-cverts) -1)))
|
||||
)
|
||||
|
||||
(defmethod debug-draw ((this curve-control))
|
||||
(cond
|
||||
((logtest? (-> this flags) (path-control-flag not-found))
|
||||
(when (and (type? (-> this process) process-drawable) *display-entity-errors* (not *display-capture-mode*))
|
||||
(let ((s5-0 add-debug-text-3d)
|
||||
(s4-0 #t)
|
||||
(s3-0 577)
|
||||
)
|
||||
(format (clear *temp-string*) "curve data error in ~S" (-> this process name))
|
||||
(s5-0
|
||||
s4-0
|
||||
(the-as bucket-id s3-0)
|
||||
*temp-string*
|
||||
(-> this process root trans)
|
||||
(font-color red)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((let ((a0-5 this))
|
||||
(and *display-path-marks* (logtest? (-> a0-5 flags) (path-control-flag display)))
|
||||
)
|
||||
(if (and (logtest? (-> this flags) (path-control-flag draw-line)) (> (-> this curve num-cverts) 0))
|
||||
(add-debug-curve2
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> this curve)
|
||||
(new 'static 'rgba :r #xff :g #x80 :a #x80)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 (-> this curve num-cverts))
|
||||
(let ((s4-1 (-> this curve cverts s5-1)))
|
||||
(if (logtest? (-> this flags) (path-control-flag draw-point))
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf1) s4-1 (new 'static 'rgba :r #xff :a #x80))
|
||||
)
|
||||
(when (logtest? (-> this flags) (path-control-flag draw-text))
|
||||
(let ((s3-1 add-debug-text-3d)
|
||||
(s2-1 #t)
|
||||
(s1-0 577)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color orange) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod path-control-method-27 ((this path-control) (arg0 vector))
|
||||
(let ((s4-0 (-> this curve num-cverts)))
|
||||
(let ((f30-0 (/ 1.0 (the float s4-0))))
|
||||
(set-vector! arg0 0.0 0.0 0.0 0.0)
|
||||
(dotimes (s3-0 s4-0)
|
||||
(vector+float*!
|
||||
arg0
|
||||
arg0
|
||||
(get-point-in-path! this (new 'stack-no-clear 'vector) (the float s3-0) 'interp)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s3-1 s4-0)
|
||||
(let ((f0-10
|
||||
(vector-vector-distance arg0 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float s3-1) 'interp))
|
||||
)
|
||||
)
|
||||
(if (< (-> arg0 w) f0-10)
|
||||
(set! (-> arg0 w) (+ 4096.0 f0-10))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1515,9 +1515,9 @@
|
||||
;; (if (logtest? (-> this skel status) (joint-control-status blend-shape blend-shape-valid))
|
||||
;; (merc-blend-shape this)
|
||||
;; )
|
||||
;; (if (logtest? (-> this skel status) (joint-control-status eye-anim-valid eye-anim))
|
||||
;; (merc-eye-anim this)
|
||||
;; )
|
||||
(if (logtest? (-> this skel status) (joint-control-status eye-anim-valid eye-anim))
|
||||
(merc-eye-anim this)
|
||||
)
|
||||
(label cfg-45)
|
||||
;; (let ((a0-26 (-> gp-0 effect)))
|
||||
;; (if a0-26
|
||||
|
@ -7,3 +7,131 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype simple-nav-sphere (process-drawable)
|
||||
((first-time? symbol)
|
||||
(track-joint int32)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
active
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior simple-nav-sphere-event-handler simple-nav-sphere ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('die-fast)
|
||||
(go empty-state)
|
||||
)
|
||||
(('move-trans)
|
||||
(move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> arg3 param 0)))
|
||||
#t
|
||||
)
|
||||
(('set-radius)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0)))
|
||||
(a0-7 (-> self root))
|
||||
)
|
||||
(set! (-> a0-7 nav-radius) f0-0)
|
||||
(set! (-> (the-as collide-shape a0-7) root-prim local-sphere w) f0-0)
|
||||
(update-transforms (the-as collide-shape a0-7))
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod run-logic? ((this simple-nav-sphere))
|
||||
"Should this process be run? Checked by execute-process-tree."
|
||||
(cond
|
||||
(*display-nav-marks*
|
||||
#t
|
||||
)
|
||||
((>= (-> this track-joint) 0)
|
||||
#t
|
||||
)
|
||||
((-> this first-time?)
|
||||
(set! (-> this first-time?) #f)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (simple-nav-sphere)
|
||||
:virtual #t
|
||||
:event simple-nav-sphere-event-handler
|
||||
:trans (behavior ()
|
||||
(if *display-nav-marks*
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug)
|
||||
(-> self root trans)
|
||||
(-> self root nav-radius)
|
||||
(new 'static 'rgba :r #x80 :g #x40 :a #x80)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defstate active (simple-nav-sphere)
|
||||
:virtual #t
|
||||
:event simple-nav-sphere-event-handler
|
||||
:trans (behavior ()
|
||||
(let ((v1-0 (ppointer->process (-> self parent)))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector<-cspace! gp-0 (-> (the-as process-drawable v1-0) node-list data (-> self track-joint)))
|
||||
(move-to-point! (the-as collide-shape (-> self root)) gp-0)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defbehavior simple-nav-sphere-init-by-other simple-nav-sphere ((arg0 float) (arg1 vector) (arg2 nav-mesh) (arg3 int))
|
||||
(set! (-> self track-joint) arg3)
|
||||
(set! (-> self first-time?) #t)
|
||||
(let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec obstacle))
|
||||
(set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 4096.0)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-3)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-6 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) arg0)
|
||||
(set! (-> s5-0 root-prim local-sphere w) arg0)
|
||||
(if arg1
|
||||
(set! (-> s5-0 trans quad) (-> arg1 quad))
|
||||
)
|
||||
(vector-identity! (-> s5-0 scale))
|
||||
(quaternion-identity! (-> s5-0 quat))
|
||||
(let ((v1-11 (-> s5-0 root-prim)))
|
||||
(set! (-> v1-11 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-11 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(update-transforms s5-0)
|
||||
(set! (-> self root) s5-0)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause enemy))
|
||||
(set! (-> self event-hook) simple-nav-sphere-event-handler)
|
||||
(cond
|
||||
(arg2
|
||||
(let ((t9-5 (method-of-object arg2 nav-mesh-method-31)))
|
||||
self
|
||||
(t9-5)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(nav-mesh-connect-from-ent self)
|
||||
)
|
||||
)
|
||||
(if (>= (-> self track-joint) 0)
|
||||
(go-virtual active)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
|
@ -9,6 +9,10 @@
|
||||
(defenum flut-flag
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(ff0 0)
|
||||
(ff1 1)
|
||||
(ff2 2)
|
||||
(ff3 3)
|
||||
)
|
||||
;; ---flut-flag
|
||||
|
||||
@ -37,26 +41,29 @@
|
||||
|
||||
|
||||
(deftype flut (process-focusable)
|
||||
((extra-trans vector :inline)
|
||||
((root collide-shape-moving :override)
|
||||
(extra-trans vector :inline)
|
||||
(condition int32)
|
||||
(shadow-backup shadow-geo)
|
||||
(rider handle)
|
||||
(nav-sphere-handle handle)
|
||||
(probe-time time-frame)
|
||||
(count-lock basic)
|
||||
(count-lock symbol)
|
||||
(flags flut-flag)
|
||||
(mode basic)
|
||||
(mode symbol)
|
||||
(color-index int32)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:state-methods
|
||||
wait-for-start
|
||||
idle
|
||||
(pickup (state flut))
|
||||
wait-for-return
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(flut-method-28 () none)
|
||||
(flut-method-29 () none)
|
||||
(flut-method-30 () none)
|
||||
(flut-method-31 () none)
|
||||
(flut-method-32 () none)
|
||||
(flut-method-33 () none)
|
||||
(flut-method-34 () none)
|
||||
(flut-method-33 (_type_) symbol)
|
||||
(spawn-part-and-sound! (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -7,3 +7,126 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-flut-trans-pad
|
||||
:id 237
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1059 :fade-after (meters 160))
|
||||
(sp-item 1060 :fade-after (meters 160))
|
||||
(sp-item 1061 :fade-after (meters 60) :falloff-to (meters 60) :flags (is-3d))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1059
|
||||
:init-specs ((:texture (common-white common))
|
||||
(:num 0.5)
|
||||
(:y (meters 7))
|
||||
(:scale-x (meters 14) (meters 1))
|
||||
(:scale-y (meters 14))
|
||||
(:r 40.0)
|
||||
(:g 60.0 60.0)
|
||||
(:b 128.0)
|
||||
(:a 32.0 32.0)
|
||||
(:timer (seconds 0.035))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1060
|
||||
:init-specs ((:texture (common-white common))
|
||||
(:num 0.5)
|
||||
(:y (meters 4))
|
||||
(:scale-x (meters 7) (meters 1))
|
||||
(:scale-y (meters 14))
|
||||
(:r 40.0)
|
||||
(:g 60.0 60.0)
|
||||
(:b 128.0)
|
||||
(:a 64.0 64.0)
|
||||
(:fade-a -8.533334)
|
||||
(:timer (seconds 0.035))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1061
|
||||
:init-specs ((:texture (splash-foam level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 0.75) (meters 0.1))
|
||||
(:scale-x (meters 0))
|
||||
(:rot-x (degrees 0) (degrees 15))
|
||||
(:rot-y (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 16.0)
|
||||
(:g 0.0 127.0)
|
||||
(:b 127.0)
|
||||
(:a 127.0)
|
||||
(:vel-y (meters 0))
|
||||
(:scalevel-x (meters 0.02))
|
||||
(:rotvel-y (degrees -0.6) (degrees 1.2))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.21333334)
|
||||
(:accel-y (meters -0.00015))
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-flut-attack-strike-ground
|
||||
:id 238
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 1062) (sp-item 1063))
|
||||
)
|
||||
|
||||
(defpart 1062
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 24.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 1) (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 8.0 56.0)
|
||||
(:vel-y (meters 0.13333334) (meters 0.16666667))
|
||||
(:scalevel-x (meters 0.013333334))
|
||||
(:rotvel-z (degrees -0.4) (degrees 0.8))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -1.4222223)
|
||||
(:fade-a -0.35555556)
|
||||
(:accel-y (meters 0.00008333333))
|
||||
(:friction 0.7)
|
||||
(:timer (seconds 0.6))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.3))
|
||||
(:next-launcher 1064)
|
||||
(:conerot-x (degrees 90))
|
||||
(:conerot-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1063
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 32.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 1) (meters 0.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 64.0 8.0)
|
||||
(:vel-y (meters 0.3))
|
||||
(:scalevel-x (meters 0.0033333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -2.8444445)
|
||||
(:fade-a -0.82222223)
|
||||
(:friction 0.7)
|
||||
(:timer (seconds 0.3))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.15))
|
||||
(:next-launcher 1064)
|
||||
(:conerot-x (degrees 90))
|
||||
(:conerot-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
@ -7,3 +7,623 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *flut-shadow-control*
|
||||
(new 'static 'shadow-control :settings (new 'static 'shadow-settings
|
||||
:center (new 'static 'vector :w (the-as float #xa))
|
||||
:shadow-dir (new 'static 'vector :y -1.0 :w 614400.0)
|
||||
:bot-plane (new 'static 'plane :y 1.0 :w 81920.0)
|
||||
:top-plane (new 'static 'plane :y 1.0 :w -2867.2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *flut-color-table* (the-as (array rgbaf) (new 'static 'boxed-array :type vector
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.8 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.7 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.6 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.5 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.4 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.9 :z 0.5 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.8 :z 0.6 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.8 :z 0.5 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.8 :z 0.4 :w 1.0)
|
||||
(new 'static 'vector :x 0.9 :y 0.9 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 0.8 :y 0.9 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 0.8 :y 1.0 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 0.8 :y 1.0 :z 0.8 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod spawn-part-and-sound! ((this flut))
|
||||
(if (nonzero? (-> this part))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
)
|
||||
(if (nonzero? (-> this sound))
|
||||
(update! (-> this sound))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this flut))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(when (-> this count-lock)
|
||||
(set! (-> this count-lock) #f)
|
||||
(+! (-> *game-info* flut-count) -1)
|
||||
)
|
||||
((method-of-type process-drawable deactivate) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior flut-color-from-index flut ((arg0 int))
|
||||
(set! (-> self draw color-mult quad) (-> *flut-color-table* (mod arg0 (-> *flut-color-table* length)) quad))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun flut-random-color-index ()
|
||||
(rand-vu-int-range 0 (-> *flut-color-table* length))
|
||||
)
|
||||
|
||||
(defmethod flut-method-33 ((this flut))
|
||||
(let ((gp-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 32))))
|
||||
(let ((a1-2 (sphere<-vector+r! (new 'stack-no-clear 'sphere) (-> this root trans) 16384.0)))
|
||||
(+! (-> a1-2 y) 12288.0)
|
||||
(set! (-> gp-0 length)
|
||||
(fill-actor-list-for-box *actor-hash* (the-as bounding-box a1-2) (-> gp-0 data) (-> gp-0 allocated-length))
|
||||
)
|
||||
)
|
||||
(let* ((s5-1 (-> gp-0 length))
|
||||
(s4-0 0)
|
||||
(v1-7 (-> gp-0 s4-0))
|
||||
)
|
||||
(while (< s4-0 s5-1)
|
||||
(if (type? (-> v1-7 process) flut)
|
||||
(return #f)
|
||||
)
|
||||
(+! s4-0 1)
|
||||
(set! v1-7 (-> gp-0 s4-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
(defstate wait-for-start (flut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('bonk)
|
||||
(send-event proc 'target-flut-get-off 90)
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(('attack)
|
||||
(cond
|
||||
((and (-> self next-state) (= (-> self next-state name) 'wait-for-start))
|
||||
#f
|
||||
)
|
||||
((= (-> self mode) 'normal)
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual die)
|
||||
)
|
||||
(else
|
||||
(send-event proc 'target-flut-get-off 90)
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(send-event proc 'target-flut-get-off 90)
|
||||
(send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0)
|
||||
#f
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-2 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-2))
|
||||
v0-2
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
(set-vector! (-> self root root-prim local-sphere) 0.0 5734.4 0.0 7372.8)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(while (or (>= (-> *game-info* flut-count) 10)
|
||||
(and (sphere-in-view-frustum? (sphere<-vector+r! (new 'stack 'sphere) (-> self root trans) 8192.0))
|
||||
(and (< (vector-vector-distance (-> self root trans) (camera-pos)) 409600.0)
|
||||
*target*
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (flut-method-33 self))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (flut)
|
||||
:virtual #t
|
||||
:event (-> (method-of-type flut wait-for-start) event)
|
||||
:enter (behavior ()
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0)))
|
||||
(when s5-0
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-z-quaternion! gp-0 (-> self root quat))
|
||||
(vector-normalize! gp-0 5120.0)
|
||||
(vector+! gp-0 gp-0 (-> self root trans))
|
||||
(set! (-> self nav-sphere-handle)
|
||||
(ppointer->handle
|
||||
(process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(send-event (handle->process (-> self nav-sphere-handle)) 'die-fast)
|
||||
((-> (method-of-type flut wait-for-start) exit))
|
||||
)
|
||||
:code (behavior ()
|
||||
(when (not (-> self count-lock))
|
||||
(set! (-> self count-lock) #t)
|
||||
(+! (-> *game-info* flut-count) 1)
|
||||
)
|
||||
;; og:preserve-this not-yet-implemented check
|
||||
(if (and (nonzero? *minimap*) (not (-> self minimap)))
|
||||
(set! (-> self minimap) (add-icon! *minimap* self (the-as uint 11) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(change-parent self *entity-pool*)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 3))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
0.0
|
||||
(let ((f30-0 20480.0))
|
||||
(until #f
|
||||
(when (and (logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
(time-elapsed? (-> self probe-time) (seconds 1))
|
||||
)
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
(set-time! (-> self probe-time))
|
||||
)
|
||||
(when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (focus-test? *target* grabbed in-head pole flut light board dark))
|
||||
(can-display-query? self "flut" -99.0)
|
||||
(-> *setting-control* user-current pilot)
|
||||
(-> *target* current-level)
|
||||
)
|
||||
(let ((gp-0
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-43 gp-0))
|
||||
(set! (-> v1-43 width) (the float 340))
|
||||
)
|
||||
(let ((v1-44 gp-0))
|
||||
(set! (-> v1-44 height) (the float 80))
|
||||
)
|
||||
(let ((v1-45 gp-0)
|
||||
(a0-21 (-> *setting-control* user-default language))
|
||||
)
|
||||
(set! (-> v1-45 scale) (if (or (= a0-21 (language-enum korean)) (= a0-21 (language-enum russian)))
|
||||
0.9
|
||||
0.7
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning large))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (text-id text-0083) #f)
|
||||
gp-0
|
||||
#f
|
||||
44
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? 0 triangle)
|
||||
(send-event *target* 'change-mode 'flut self (-> self mode) (-> self color-index))
|
||||
)
|
||||
(go-virtual pickup (method-of-object self wait-for-return))
|
||||
)
|
||||
)
|
||||
(if *target*
|
||||
(look-at!
|
||||
(-> *target* neck)
|
||||
(vector+!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(the-as vector (-> self root root-prim prim-core))
|
||||
(new 'static 'vector :y 2048.0 :w 1.0)
|
||||
)
|
||||
'nothing-special
|
||||
self
|
||||
)
|
||||
)
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate pickup (flut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('draw)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 3))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
(transform-post)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('touch 'attack 'bonk)
|
||||
#f
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 (state flut)))
|
||||
(talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(let ((t9-2 (-> arg0 enter)))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 (state flut)))
|
||||
(when (-> self count-lock)
|
||||
(set! (-> self count-lock) #f)
|
||||
(+! (-> *game-info* flut-count) -1)
|
||||
)
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(when (not (and (-> self entity) (= (-> self entity extra process) self)))
|
||||
(let ((s5-0 (current-time)))
|
||||
(until (time-elapsed? s5-0 (seconds 0.1))
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
(while (zero? (ja-group-size))
|
||||
(if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
(while (and *target* (focus-test? *target* flut))
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
(let ((s5-1 (current-time)))
|
||||
(until (time-elapsed? s5-1 (seconds 1))
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate wait-for-return (flut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as structure #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(when (type? (-> self root) collide-shape)
|
||||
(let ((v1-2 (-> self root root-prim)))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(transform-post)
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate die (flut)
|
||||
:virtual #t
|
||||
:enter (-> (method-of-type flut idle) enter)
|
||||
:exit (-> (method-of-type flut idle) exit)
|
||||
:code (behavior ()
|
||||
(change-parent self *entity-pool*)
|
||||
(when (-> self count-lock)
|
||||
(set! (-> self count-lock) #f)
|
||||
(+! (-> *game-info* flut-count) -1)
|
||||
)
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(if (-> self skel effect)
|
||||
(logior! (-> self skel effect flags) (effect-control-flag ecf1))
|
||||
)
|
||||
(when (logtest? (-> self flags) (flut-flag ff3))
|
||||
(set! (-> self root dynam gravity-max) 40960.0)
|
||||
(set! (-> self root dynam gravity-length) 20480.0)
|
||||
(vector-float*!
|
||||
(-> self root dynam gravity)
|
||||
(-> self root dynam gravity-normal)
|
||||
(the-as float (-> self root dynam gravity-length))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> self flags) (flut-flag ff1))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
)
|
||||
(else
|
||||
(set-vector! (-> self root root-prim local-sphere) 0.0 1638.4 0.0 1638.4)
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(logior!
|
||||
(-> self root root-prim prim-core collide-with)
|
||||
(collide-spec backgnd crate obstacle hit-by-others-list pusher)
|
||||
)
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
0
|
||||
)
|
||||
)
|
||||
(ja-channel-set! 1)
|
||||
(cond
|
||||
((logtest? (-> self flags) (flut-flag ff3))
|
||||
(ja-no-eval :group! (-> self draw art-group data 29)
|
||||
:num! (seek! (ja-aframe 65.0 0))
|
||||
:frame-num (ja-aframe 60.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 65.0 0)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(ja-no-eval :group! (-> self draw art-group data 28)
|
||||
:num! (seek! (ja-aframe 38.0 0))
|
||||
:frame-num (ja-aframe 25.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 38.0 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(do-effect (-> self skel effect) (the-as symbol "death-default") 0.0 -1)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(while (nonzero? (-> self draw death-timer))
|
||||
(suspend)
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(if (and (-> self entity) (= (-> self entity extra process) self))
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0))
|
||||
(if (< (-> self root dynam gravity-max) (vector-length (-> self root transv)))
|
||||
(vector-normalize! (-> self root transv) (-> self root dynam gravity-max))
|
||||
)
|
||||
(let ((v1-12 (-> self root))
|
||||
(a2-1 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(set! (-> a2-1 collide-with) (collide-spec backgnd crate obstacle pusher))
|
||||
(set! (-> a2-1 ignore-process0) self)
|
||||
(set! (-> a2-1 ignore-process1) #f)
|
||||
(set! (-> a2-1 ignore-pat) (-> v1-12 pat-ignore-mask))
|
||||
(set! (-> a2-1 action-mask) (collide-action solid))
|
||||
(fill-cache-integrate-and-collide v1-12 (-> v1-12 transv) a2-1 (meters 0))
|
||||
)
|
||||
(transform-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior flut-init flut ((arg0 entity-actor) (arg1 transformq) (arg2 handle) (arg3 flut-flag) (arg4 symbol))
|
||||
(let ((s1-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s1-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s1-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s1-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s1-0 (the-as uint 0))))
|
||||
(set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak))
|
||||
(set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> v1-6 transform-index) 0)
|
||||
(set-vector! (-> v1-6 local-sphere) 0.0 5734.4 0.0 7372.8)
|
||||
(set! (-> s1-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s1-0 root-prim) v1-6)
|
||||
)
|
||||
(set! (-> s1-0 nav-radius) (* 0.75 (-> s1-0 root-prim local-sphere w)))
|
||||
(let ((v1-9 (-> s1-0 root-prim)))
|
||||
(set! (-> s1-0 backup-collide-as) (-> v1-9 prim-core collide-as))
|
||||
(set! (-> s1-0 backup-collide-with) (-> v1-9 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) s1-0)
|
||||
)
|
||||
(set! (-> self count-lock) #f)
|
||||
(set! (-> self rider) arg2)
|
||||
(set! (-> self flags) arg3)
|
||||
(set! (-> self mode) arg4)
|
||||
(set! (-> self minimap) #f)
|
||||
(when arg0
|
||||
(process-entity-set! self arg0)
|
||||
(if (logtest? (-> self entity extra kill-mask) (task-mask ctywide))
|
||||
(ctywide-entity-hack)
|
||||
)
|
||||
(process-drawable-from-entity! self arg0)
|
||||
(set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset))
|
||||
)
|
||||
(when arg1
|
||||
(set! (-> self root trans quad) (-> arg1 trans quad))
|
||||
(quaternion-copy! (-> self root quat) (-> arg1 quat))
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self shadow-backup) (-> self draw shadow))
|
||||
(set! (-> self draw shadow-ctrl) *flut-shadow-control*)
|
||||
(let ((v1-33 (-> self node-list data)))
|
||||
(set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
|
||||
(set! (-> v1-33 0 param1) (the-as basic (-> self root trans)))
|
||||
(set! (-> v1-33 0 param2) (the-as basic (-> self extra-trans)))
|
||||
)
|
||||
(set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0))
|
||||
(set! (-> self fact)
|
||||
(new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
|
||||
)
|
||||
(if (not (logtest? arg3 (flut-flag ff0)))
|
||||
(setup-masks (-> self draw) 0 2)
|
||||
)
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(set! (-> self color-index) (mod (the-as int (sar (the-as int arg3) 32)) (-> *flut-color-table* length)))
|
||||
(flut-color-from-index (-> self color-index))
|
||||
(when (logtest? (-> self flags) (flut-flag ff1))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
)
|
||||
(if (and (-> self entity) (not (logtest? arg3 (flut-flag ff2))))
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
)
|
||||
(set! (-> self sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0)
|
||||
)
|
||||
(set! (-> self draw light-index) (the-as uint 30))
|
||||
(logior! (-> self mask) (process-mask crate))
|
||||
(cond
|
||||
((logtest? arg3 (flut-flag ff2))
|
||||
(go-virtual die)
|
||||
)
|
||||
((handle->process arg2)
|
||||
(go-virtual idle)
|
||||
)
|
||||
(else
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this flut) (arg0 entity-actor))
|
||||
(flut-init
|
||||
arg0
|
||||
(the-as transformq #f)
|
||||
(the-as handle #f)
|
||||
(the-as flut-flag (+ (shl (flut-random-color-index) 32) 1))
|
||||
'normal
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@
|
||||
(drag-sound-id sound-id)
|
||||
(whine-sound-id sound-id)
|
||||
(shield-sound-id sound-id)
|
||||
(mode-sound-bank connection)
|
||||
(mech-start-time time-frame)
|
||||
(mech-time time-frame)
|
||||
(no-get-off-time time-frame)
|
||||
@ -49,7 +50,7 @@
|
||||
(smoke-local-vel vector 2 :inline)
|
||||
(particle-system-2d basic)
|
||||
(particle-system-3d basic)
|
||||
(part-thruster sparticle-launch-control)
|
||||
(part-thruster sparticle-launcher)
|
||||
(part-thruster-scale-x sp-field-init-spec)
|
||||
(part-thruster-scale-y sp-field-init-spec)
|
||||
(part-quat quaternion)
|
||||
|
@ -7,3 +7,405 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpart 1037
|
||||
:init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite))
|
||||
(:birth-func 'birth-func-set-quat)
|
||||
(:num 1.0)
|
||||
(:y (meters 0))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y (meters 3))
|
||||
(:r 128.0 128.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b :copy g)
|
||||
(:a 128.0 64.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1038
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters -0.3))
|
||||
(:scale-x (meters 1.5) (meters 0.1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 0.0)
|
||||
(:a 16.0 8.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 409.6)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1039
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 1.0 4.0)
|
||||
(:y (meters 0) (meters -0.25))
|
||||
(:scale-x (meters 0.2) (meters 0.2))
|
||||
(:rot-z (degrees 0) 1 (degrees 180))
|
||||
(:scale-y (meters 1) (meters 0.6))
|
||||
(:r 192.0)
|
||||
(:g 64.0)
|
||||
(:b 0.0)
|
||||
(:a 0.0 16.0)
|
||||
(:vel-y (meters -0.06666667) (meters -0.016666668))
|
||||
(:scalevel-x (meters 0.033333335))
|
||||
(:scalevel-y (meters 0.006666667))
|
||||
(:fade-r -2.0)
|
||||
(:fade-g 2.0)
|
||||
(:fade-b 5.0)
|
||||
(:fade-a 0.32)
|
||||
(:accel-x (meters 0) (meters 0.0016666667))
|
||||
(:accel-y (meters 0.00016666666) (meters 0.0005))
|
||||
(:friction 0.94)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.085))
|
||||
(:next-launcher 1040)
|
||||
(:rotate-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1040
|
||||
:init-specs ((:r 64.0 64.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 64.0 64.0)
|
||||
(:fade-r 0.0)
|
||||
(:fade-g 0.0)
|
||||
(:fade-b 0.0)
|
||||
(:fade-a -0.128 -0.256)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1041
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 0.1 0.1)
|
||||
(:y (meters 0.25) (meters -0.5))
|
||||
(:scale-x (meters 0.05))
|
||||
(:scale-y (meters 0.5))
|
||||
(:r 192.0 64.0)
|
||||
(:g 0.0 128.0)
|
||||
(:b 0.0)
|
||||
(:a 128.0)
|
||||
(:vel-y (meters -0.033333335) (meters -0.026666667))
|
||||
(:scalevel-x (meters 0.001))
|
||||
(:scalevel-y (meters -0.017))
|
||||
(:fade-g 0.0)
|
||||
(:accel-x (meters 0) (meters 0.0016666667))
|
||||
(:accel-y (meters 0.00016666666) (meters 0.0005))
|
||||
(:friction 0.96)
|
||||
(:timer (seconds 0.167) (seconds 0.247))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.1))
|
||||
(:next-launcher 1042)
|
||||
(:rotate-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1042
|
||||
:init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)))
|
||||
)
|
||||
|
||||
(defpart 1043
|
||||
:init-specs ((:num 0.6)
|
||||
(:rot-x 8)
|
||||
(:r 1638.4)
|
||||
(:g 1331.2)
|
||||
(:b 1433.6)
|
||||
(:vel-y (meters -0.06666667) (meters -0.016666668))
|
||||
(:fade-r 32.768)
|
||||
(:fade-g 26.623999)
|
||||
(:fade-b 28.671999)
|
||||
(:accel-x (meters 0) (meters 0.0016666667))
|
||||
(:friction 0.94)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (distort))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 1044)
|
||||
(:rotate-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1044
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096))
|
||||
)
|
||||
|
||||
(defun mech-spawn-thruster ((arg0 mech-info) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(set! (-> arg0 part-thruster) (-> *part-id-table* 1037))
|
||||
(set! (-> arg0 part-thruster-scale-x) (-> *part-id-table* 1037 init-specs 4))
|
||||
(set! (-> arg0 part-thruster-scale-y) (-> *part-id-table* 1037 init-specs 5))
|
||||
(let ((s1-0 (new 'stack-no-clear 'quaternion))
|
||||
(s0-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(forward-up->quaternion s1-0 arg2 (new 'static 'vector :y 1.0 :w 1.0))
|
||||
(quaternion-rotate-local-x! s1-0 s1-0 32768.0)
|
||||
(let ((a0-3 s0-0))
|
||||
(let ((v1-10 arg1))
|
||||
(let ((a1-4 (* 0.5 arg4)))
|
||||
(.mov vf7 a1-4)
|
||||
)
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
(.lvf vf4 (&-> v1-10 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a0-3 quad) vf6)
|
||||
)
|
||||
(set! (-> arg0 part-thruster-scale-x initial-valuef) arg3)
|
||||
(set! (-> arg0 part-thruster-scale-y initial-valuef) arg4)
|
||||
(dotimes (s4-1 2)
|
||||
(quaternion-rotate-local-z! s1-0 s1-0 16384.0)
|
||||
(quaternion-copy! (-> arg0 part-quat) s1-0)
|
||||
(let ((t9-4 sp-launch-particles-var)
|
||||
(a0-6 (-> arg0 particle-system-3d))
|
||||
(a1-7 (-> arg0 part-thruster))
|
||||
(a2-4 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-4 trans quad) (-> s0-0 quad))
|
||||
(t9-4
|
||||
(the-as sparticle-system a0-6)
|
||||
a1-7
|
||||
a2-4
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(launch-particles (-> *part-id-table* 1043) arg1)
|
||||
(launch-particles (-> *part-id-table* 1038) arg1)
|
||||
(cond
|
||||
((!= (-> *setting-control* user-current under-water-pitch-mod) 0.0)
|
||||
(launch-particles (-> *part-id-table* 1043) arg1)
|
||||
)
|
||||
(else
|
||||
(launch-particles (-> *part-id-table* 1039) arg1)
|
||||
(launch-particles (-> *part-id-table* 1041) arg1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1045
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 3.0)
|
||||
(:x (meters -16) (meters 32))
|
||||
(:y (meters 0) (meters 12))
|
||||
(:z (meters -16) (meters 32))
|
||||
(:scale-x (meters 0.1) (meters 0.3))
|
||||
(:rot-x 4)
|
||||
(:rot-z (degrees 0) (degrees 3600))
|
||||
(:scale-y (meters 0.1) (meters 0.1))
|
||||
(:r 0.0 64.0)
|
||||
(:g 64.0 128.0)
|
||||
(:b 64.0 196.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters -0.0033333334) (meters 0.006666667))
|
||||
(:rotvel-z (degrees -0.4) (degrees 0.8))
|
||||
(:fade-a 0.21333334 0.21333334)
|
||||
(:timer (seconds 2.5))
|
||||
(:flags (sp-cpuinfo-flag-2))
|
||||
(:userdata 0.0)
|
||||
(:func 'check-water-level-above-and-die)
|
||||
(:next-time (seconds 0.5))
|
||||
(:next-launcher 1046)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
(:conerot-radius (meters -3) (meters 8))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1046
|
||||
:init-specs ((:fade-a 0.0) (:next-time (seconds 1)) (:next-launcher 1047))
|
||||
)
|
||||
|
||||
(defpart 1047
|
||||
:init-specs ((:fade-a -0.21333334 -0.21333334))
|
||||
)
|
||||
|
||||
(defpart 1048
|
||||
:init-specs ((:texture (lakedrop level-default-sprite))
|
||||
(:num 0.2)
|
||||
(:x (meters -24) (meters 48))
|
||||
(:y (meters -4) (meters 4))
|
||||
(:z (meters -24) (meters 48))
|
||||
(:scale-x (meters 0.15) (meters 0.15))
|
||||
(:scale-y (meters 0.1) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters 0.008333334) (meters 0.005))
|
||||
(:fade-a 0.16)
|
||||
(:timer (seconds 16))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata 0.0)
|
||||
(:func 'check-water-level-above-and-die)
|
||||
(:next-time (seconds 0.33) (seconds 0.657))
|
||||
(:next-launcher 1049)
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1049
|
||||
:init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 5.997)) (:next-launcher 1050))
|
||||
)
|
||||
|
||||
(defpart 1050
|
||||
:init-specs ((:scalevel-x (meters -0.00033333333) (meters -0.00066666666))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.16)
|
||||
(:accel-y (meters -0.0001) (meters -0.0001))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1051
|
||||
:init-specs ((:texture (lakedrop level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.15) (meters 0.15))
|
||||
(:scale-y (meters 0.1) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters 0.008333334) (meters 0.005))
|
||||
(:fade-a 0.16)
|
||||
(:accel-y (meters 0.0002))
|
||||
(:friction 0.97 0.01)
|
||||
(:timer (seconds 4))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata 0.0)
|
||||
(:func 'check-water-level-above-and-die)
|
||||
(:next-time (seconds 0.33) (seconds 0.657))
|
||||
(:next-launcher 1052)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
(:conerot-radius (meters 0) (meters 0.5))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1052
|
||||
:init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 0.997)) (:next-launcher 1050))
|
||||
)
|
||||
|
||||
(defpartgroup group-mech-explode-death
|
||||
:id 236
|
||||
:duration (seconds 0.25)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 153) (sp-item 154))
|
||||
)
|
||||
|
||||
(defpart 1053
|
||||
:init-specs ((:num 4.0)
|
||||
(:x (meters -1) (meters 3))
|
||||
(:y (meters 0) (meters 4))
|
||||
(:rot-x 6)
|
||||
(:r 4096.0)
|
||||
(:g 2662.4)
|
||||
(:b 2867.2)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.01))
|
||||
(:accel-y (meters 0.0016666667) (meters 0.00033333333))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 0.4))
|
||||
(:flags (distort))
|
||||
(:next-time (seconds 0.135) (seconds 0.13))
|
||||
(:next-launcher 1054)
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1054
|
||||
:init-specs ((:fade-b -5.12))
|
||||
)
|
||||
|
||||
(defpart 1055
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:birth-func 'birth-func-texture-group)
|
||||
(:num 16.0 4.0)
|
||||
(:x (meters -1) (meters 3))
|
||||
(:y (meters 0) (meters 4))
|
||||
(:scale-x (meters 0.5) (meters 0.25))
|
||||
(:scale-y (meters 1) (meters 0.25))
|
||||
(:r 255.0)
|
||||
(:g 0.0 128.0)
|
||||
(:b 0.0)
|
||||
(:a 32.0 32.0)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.01))
|
||||
(:scalevel-x (meters 0.013333334) (meters 0.006666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:accel-y (meters 0.0016666667) (meters 0.00033333333))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 0.367))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400f00 #x400f00))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 1056)
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1056
|
||||
:init-specs ((:fade-a -0.53333336 -0.53333336))
|
||||
)
|
||||
|
||||
(defpart 1057
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.2) (meters 4))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:rot-z (degrees 0) (degrees 8))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 32.0 64.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 4096.0)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
(:conerot-radius (meters -0.1) (meters 0.5))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1058
|
||||
:init-specs ((:texture (motion-blur-part level-default-sprite))
|
||||
(:num 2.0 4.0)
|
||||
(:scale-x (meters 2.5))
|
||||
(:rot-x 4)
|
||||
(:scale-y (meters 0.04) (meters 0.03))
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0.01125) (degrees 0.01125))
|
||||
(:vel-y (meters 0.1) (meters 0.2))
|
||||
(:fade-g -2.55 -2.55)
|
||||
(:fade-b -2.0)
|
||||
(:fade-a -0.64 -0.64)
|
||||
(:accel-y (meters -0.0033333334) (meters -0.0033333334))
|
||||
(:friction 0.8 0.02)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-motion-blur)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,3 +7,482 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype mech (process-drawable)
|
||||
((root collide-shape-moving :override)
|
||||
(extra-trans vector :inline)
|
||||
(condition int32)
|
||||
(shadow-backup shadow-geo)
|
||||
(rider handle)
|
||||
(shield-value float)
|
||||
(nav-sphere-handle handle)
|
||||
(probe-time time-frame)
|
||||
)
|
||||
(:state-methods
|
||||
wait-for-start
|
||||
idle
|
||||
(pickup (state mech))
|
||||
wait-for-return
|
||||
)
|
||||
(:methods
|
||||
(mech-method-24 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod mech-method-24 ((this mech))
|
||||
(if (nonzero? (-> this part))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
)
|
||||
(update! (-> this sound))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate wait-for-start (mech)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('attack 'bonk)
|
||||
(send-event proc 'target-mech-get-off (seconds 0.3))
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as structure #f)
|
||||
)
|
||||
(('touch)
|
||||
(send-event proc 'target-mech-get-off (seconds 0.3))
|
||||
(send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0)
|
||||
(the-as structure #f)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-2 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-2))
|
||||
v0-2
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as structure #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
)
|
||||
:code (behavior ()
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (mech)
|
||||
:virtual #t
|
||||
:event (-> (method-of-type mech wait-for-start) event)
|
||||
:enter (behavior ()
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0)))
|
||||
(when s5-0
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-z-quaternion! gp-0 (-> self root quat))
|
||||
(vector-normalize! gp-0 5120.0)
|
||||
(vector+! gp-0 gp-0 (-> self root trans))
|
||||
(set! (-> self nav-sphere-handle)
|
||||
(ppointer->handle
|
||||
(process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(send-event (handle->process (-> self nav-sphere-handle)) 'die-fast)
|
||||
((-> (method-of-type mech wait-for-start) exit))
|
||||
)
|
||||
:code (behavior ()
|
||||
(change-parent self *entity-pool*)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! mech-mech-idle-ja)
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
0.0
|
||||
(let ((f30-0 20480.0))
|
||||
(until #f
|
||||
(when (and (logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
(time-elapsed? (-> self probe-time) (seconds 1))
|
||||
)
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
(set-time! (-> self probe-time))
|
||||
)
|
||||
(when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (focus-test? *target* in-head pole light board mech dark))
|
||||
(can-display-query? self "mech" -99.0)
|
||||
(-> *setting-control* user-current pilot)
|
||||
)
|
||||
(let ((gp-0
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-31 gp-0))
|
||||
(set! (-> v1-31 width) (the float 340))
|
||||
)
|
||||
(let ((v1-32 gp-0))
|
||||
(set! (-> v1-32 height) (the float 80))
|
||||
)
|
||||
(let ((v1-33 gp-0)
|
||||
(a0-19 (-> *setting-control* user-default language))
|
||||
)
|
||||
(set! (-> v1-33 scale) (if (or (= a0-19 (language-enum korean)) (= a0-19 (language-enum russian)))
|
||||
0.9
|
||||
0.7
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning large))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (text-id text-0083) #f)
|
||||
gp-0
|
||||
#f
|
||||
44
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'mech self (-> self shield-value)))
|
||||
(go-virtual pickup (method-of-object self wait-for-return))
|
||||
)
|
||||
)
|
||||
(if *target*
|
||||
(look-at!
|
||||
(-> *target* neck)
|
||||
(vector+!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(the-as vector (-> self root root-prim prim-core))
|
||||
(new 'static 'vector :y 2048.0 :w 1.0)
|
||||
)
|
||||
'nothing-special
|
||||
self
|
||||
)
|
||||
)
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate pickup (mech)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('draw)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! mech-mech-idle-ja)
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
(transform-post)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('touch 'attack 'bonk)
|
||||
#f
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 (state mech)))
|
||||
(let ((t9-0 (-> arg0 enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 (state mech)))
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(while (zero? (ja-group-size))
|
||||
(if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
(while (and *target* (focus-test? *target* mech))
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
(let ((s5-0 (current-time)))
|
||||
(until (time-elapsed? s5-0 (seconds 1))
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate wait-for-return (mech)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as structure #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior mech-init mech ((arg0 entity-actor) (arg1 matrix3) (arg2 handle) (arg3 float))
|
||||
(let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s2-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s2-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0))))
|
||||
(set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak))
|
||||
(set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> v1-6 transform-index) 0)
|
||||
(set-vector! (-> v1-6 local-sphere) 0.0 6553.6 5324.8 6553.6)
|
||||
(set! (-> s2-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s2-0 root-prim) v1-6)
|
||||
)
|
||||
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
|
||||
(let ((v1-9 (-> s2-0 root-prim)))
|
||||
(set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as))
|
||||
(set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) s2-0)
|
||||
)
|
||||
(set! (-> self rider) arg2)
|
||||
(when arg0
|
||||
(process-entity-set! self arg0)
|
||||
(process-drawable-from-entity! self arg0)
|
||||
(set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset))
|
||||
)
|
||||
(when arg1
|
||||
(set! (-> self root trans quad) (-> arg1 vector 0 quad))
|
||||
(quaternion-copy! (-> self root quat) (the-as quaternion (-> arg1 vector 1)))
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-mech" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self shadow-backup) (-> self draw shadow))
|
||||
(set! (-> self draw shadow-ctrl) *mech-shadow-control*)
|
||||
(let ((v1-27 (-> self node-list data)))
|
||||
(set! (-> v1-27 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
|
||||
(set! (-> v1-27 0 param1) (the-as basic (-> self root trans)))
|
||||
(set! (-> v1-27 0 param2) (the-as basic (-> self extra-trans)))
|
||||
)
|
||||
(set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0))
|
||||
(set! (-> self fact)
|
||||
(new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
|
||||
)
|
||||
(set! (-> self shield-value) arg3)
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(if (-> self entity)
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
)
|
||||
(set! (-> self sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0)
|
||||
)
|
||||
(set! (-> self draw light-index) (the-as uint 30))
|
||||
(if (handle->process arg2)
|
||||
(go-virtual idle)
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this mech) (arg0 entity-actor))
|
||||
(mech-init arg0 (the-as matrix3 #f) (the-as handle #f) 100.0)
|
||||
)
|
||||
|
||||
(deftype mech-target (process-drawable)
|
||||
((parent (pointer target) :override)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
active
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-mech-target mech mech-target-lod0-jg mech-target-idle-ja
|
||||
((mech-target-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
)
|
||||
|
||||
(defstate idle (mech-target)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('look-at-point)
|
||||
(set-time! (-> self state-time))
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (and *target* (and (>= 98304.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(focus-test? *target* mech)
|
||||
)
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(while (< 0.0 (-> self root scale x))
|
||||
(seek! (-> self root scale x) 0.0 (* 8.0 (seconds-per-frame)))
|
||||
(set! (-> self root scale y) (-> self root scale x))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(ja-post)
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate active (mech-target)
|
||||
:virtual #t
|
||||
:event (-> (method-of-type mech-target idle) event)
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (or (or (not *target*) (or (< 106496.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(not (logtest? (focus-status mech) (-> *target* focus-status)))
|
||||
)
|
||||
(time-elapsed? (-> self state-time) (seconds 10))
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(sound-play "mech-target")
|
||||
(let ((f30-0 0.0))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(while (< (-> self root scale x) 1.0)
|
||||
(seek! (-> self root scale x) 1.0 (* 8.0 (seconds-per-frame)))
|
||||
(set! (-> self root scale y) (-> self root scale x))
|
||||
(set! f30-0 (seek f30-0 1.0 (* 2.0 (seconds-per-frame))))
|
||||
(ja :num! (loop! f30-0))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
(until #f
|
||||
(set! f30-0 (seek f30-0 1.0 (* 0.25 (seconds-per-frame))))
|
||||
(ja :num! (loop! f30-0))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior mech-target-init mech ((arg0 vector) (arg1 quaternion) (arg2 entity-actor))
|
||||
(process-entity-set! self arg2)
|
||||
(when (not (and (-> self level) (logtest? (level-flags lf16) (-> self level info level-flags))))
|
||||
(dotimes (v1-4 (-> *level* length))
|
||||
(let ((a0-7 (-> *level* level v1-4)))
|
||||
(when (= (-> a0-7 status) 'active)
|
||||
(when (logtest? (level-flags lf16) (-> a0-7 info level-flags))
|
||||
(set! (-> self level) a0-7)
|
||||
(goto cfg-12)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-12)
|
||||
(set! (-> self root) (the-as collide-shape-moving (new 'process 'trsqv)))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(quaternion-copy! (-> self root quat) arg1)
|
||||
(set! (-> self root scale x) 0.0)
|
||||
(set! (-> self root scale y) 0.0)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-mech-target" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer mech-target).
|
||||
(defun mech-target-spawn ((arg0 vector) (arg1 process) (arg2 quaternion) (arg3 entity-actor))
|
||||
(process-spawn mech-target :init mech-target-init arg0 arg2 arg3 :name "mech-target" :to arg1)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -545,9 +545,9 @@
|
||||
;; (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)
|
||||
;; )
|
||||
(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)
|
||||
|
@ -170,6 +170,25 @@
|
||||
;; target-ladder
|
||||
(define-extern *ladder-mods* surface)
|
||||
|
||||
;; target-tube
|
||||
(define-extern *tube-mods* surface)
|
||||
(define-extern *tube-jump-mods* surface)
|
||||
(define-extern *tube-hit-mods* surface)
|
||||
(define-extern *tube-surface* surface)
|
||||
|
||||
;; target-flut
|
||||
(define-extern *flut-walk-mods* surface)
|
||||
(define-extern *flut-run-racer-mods* surface)
|
||||
(define-extern *flut-run-wild-mods* surface)
|
||||
(define-extern *flut-jump-wild-mods* surface)
|
||||
(define-extern *flut-jump-mods* surface)
|
||||
(define-extern *flut-jump-racer-mods* surface)
|
||||
(define-extern *flut-double-jump-mods* surface)
|
||||
(define-extern *flut-double-jump-racer-mods* surface)
|
||||
(define-extern *flut-run-attack-mods* surface)
|
||||
(define-extern *flut-air-attack-mods* surface)
|
||||
(define-extern *flut-get-off-mods* surface)
|
||||
|
||||
;; +++lightjak-stage
|
||||
(defenum lightjak-stage
|
||||
:bitfield #t
|
||||
@ -237,7 +256,8 @@
|
||||
(leg-ik joint-mod-ik 2)
|
||||
(foot joint-mod 2)
|
||||
(cloth symbol)
|
||||
(init-time time-frame)
|
||||
(mech-ik joint-mod-ik 2)
|
||||
(init-time time-frame :overlay-at (-> mech-ik 0))
|
||||
(teleport-time time-frame)
|
||||
(state-hook-time time-frame)
|
||||
(state-hook (function none :behavior target))
|
||||
@ -272,9 +292,9 @@
|
||||
(mode-param1 handle)
|
||||
(mode-param2 uint64)
|
||||
(mode-param3 uint64)
|
||||
(major-mode-exit-hook basic)
|
||||
(major-mode-event-hook basic)
|
||||
(sub-mode-exit-hook basic)
|
||||
(major-mode-exit-hook (function none :behavior target))
|
||||
(major-mode-event-hook (function none :behavior target))
|
||||
(sub-mode-exit-hook (function none :behavior target))
|
||||
(ext-geo-control external-art-buffer)
|
||||
(pending-ext-geo target-geo)
|
||||
(ext-geo target-geo)
|
||||
@ -370,25 +390,26 @@
|
||||
target-edge-grab
|
||||
(target-edge-grab-jump float float symbol)
|
||||
target-edge-grab-off
|
||||
(target-falling symbol)
|
||||
(target-falling object)
|
||||
target-float
|
||||
(target-flop float float float object)
|
||||
(target-flop-hit-ground symbol)
|
||||
target-flut-air-attack
|
||||
(target-flut-air-attack float)
|
||||
target-flut-air-attack-hit-ground
|
||||
target-flut-clone-anim
|
||||
target-flut-death
|
||||
target-flut-double-jump
|
||||
target-flut-eject
|
||||
target-flut-falling
|
||||
target-flut-get-off
|
||||
(target-flut-clone-anim handle)
|
||||
(target-flut-death symbol)
|
||||
(target-flut-double-jump float float)
|
||||
(target-flut-eject symbol)
|
||||
(target-flut-falling object)
|
||||
(target-flut-get-off handle)
|
||||
target-flut-get-off-jump
|
||||
target-flut-get-on
|
||||
(target-flut-get-on handle)
|
||||
target-flut-grab
|
||||
target-flut-hit
|
||||
(target-flut-hit symbol attack-info)
|
||||
target-flut-hit-ground
|
||||
target-flut-jump
|
||||
target-flut-kanga-catch
|
||||
(target-flut-jump float float)
|
||||
(target-flut-kanga-catch handle symbol)
|
||||
target-flut-run-wild
|
||||
target-flut-running-attack
|
||||
target-flut-stance
|
||||
(target-flut-start handle symbol int)
|
||||
@ -446,22 +467,22 @@
|
||||
target-mech-carry-drag
|
||||
target-mech-carry-drop
|
||||
target-mech-carry-falling
|
||||
target-mech-carry-hit-ground
|
||||
target-mech-carry-jump
|
||||
(target-mech-carry-hit-ground symbol)
|
||||
(target-mech-carry-jump float float)
|
||||
target-mech-carry-pickup
|
||||
target-mech-carry-stance
|
||||
target-mech-carry-throw
|
||||
target-mech-carry-walk
|
||||
target-mech-clone-anim
|
||||
target-mech-death
|
||||
target-mech-falling
|
||||
(target-mech-clone-anim handle)
|
||||
(target-mech-death symbol)
|
||||
(target-mech-falling symbol)
|
||||
target-mech-get-off
|
||||
target-mech-get-on
|
||||
target-mech-get-up
|
||||
(target-mech-get-on handle)
|
||||
(target-mech-get-up handle)
|
||||
target-mech-grab
|
||||
target-mech-hit
|
||||
target-mech-hit-ground
|
||||
target-mech-jump
|
||||
(target-mech-hit symbol attack-info)
|
||||
(target-mech-hit-ground symbol)
|
||||
(target-mech-jump float float surface)
|
||||
target-mech-punch
|
||||
target-mech-shield
|
||||
target-mech-stance
|
||||
@ -504,7 +525,11 @@
|
||||
target-swim-walk
|
||||
target-title
|
||||
target-tube
|
||||
(target-tube-death symbol)
|
||||
(target-tube-hit symbol attack-info)
|
||||
(target-tube-jump float float)
|
||||
(target-tube-start handle)
|
||||
target-tube-walk
|
||||
target-turn-around
|
||||
target-turret-get-off
|
||||
(target-turret-get-on handle)
|
||||
|
@ -81,7 +81,7 @@
|
||||
(a0-19 (-> self control))
|
||||
)
|
||||
(set! (-> a0-19 status) v1-53)
|
||||
(go target-falling (the-as symbol a0-19))
|
||||
(go target-falling a0-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1389,7 +1389,7 @@
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior fall-test target ((arg0 (state symbol target)) (arg1 float))
|
||||
(defbehavior fall-test target ((arg0 (state object target)) (arg1 float))
|
||||
(when (and (not (logtest? (-> self control status) (collide-status on-surface)))
|
||||
(time-elapsed? (-> self control last-time-on-surface) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
|
@ -1843,7 +1843,7 @@
|
||||
|
||||
(defstate target-falling (target)
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 symbol))
|
||||
:enter (behavior ((arg0 object))
|
||||
(case arg0
|
||||
(('uppercut)
|
||||
(set! (-> self control mod-surface) *uppercut-jump-mods*)
|
||||
@ -1866,7 +1866,7 @@
|
||||
#t
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 object))
|
||||
(case arg0
|
||||
(('uppercut)
|
||||
(ja-no-eval :num! (seek!))
|
||||
|
@ -7,3 +7,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; stub
|
||||
(defun ctywide-entity-hack ()
|
||||
(none)
|
||||
)
|
2
test/decompiler/reference/jak3/engine/collide/collide-target-h_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/collide/collide-target-h_REF.gc
generated
vendored
@ -223,7 +223,7 @@
|
||||
(last-nonzero-input-dir-targ quaternion :inline :offset 6384)
|
||||
(time-of-last-wall-hide-first-check-pass time-frame :offset 6400)
|
||||
(time-of-first-wall-hide-first-check-pass time-frame :offset 6408)
|
||||
(pad uint8 4)
|
||||
(unknown-float0000 float :offset 6416)
|
||||
)
|
||||
)
|
||||
|
||||
|
6
test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc
generated
vendored
6
test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc
generated
vendored
@ -614,7 +614,7 @@
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(logclear! (-> self elevator-status) (elevator-status waiting-to-descend))
|
||||
(path-control-method-9 (-> self path))
|
||||
(debug-draw (-> self path))
|
||||
(plat-post)
|
||||
)
|
||||
)
|
||||
@ -1021,7 +1021,3 @@
|
||||
(init-sound! this)
|
||||
(go-arrived-or-waiting this)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc
generated
vendored
@ -2482,7 +2482,7 @@
|
||||
:trans (behavior ()
|
||||
(when (-> self enable)
|
||||
(when (nonzero? (-> self path))
|
||||
(path-control-method-9 (-> self path))
|
||||
(debug-draw (-> self path))
|
||||
(get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp)
|
||||
(displacement-between-points-at-percent-normalized! (-> self path) (-> self last-velocity) (-> self path-pos))
|
||||
(let ((f0-3 (+ (-> self path-pos) (* (-> self path-speed) (seconds-per-frame)))))
|
||||
|
30
test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc
generated
vendored
30
test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc
generated
vendored
@ -113,7 +113,7 @@
|
||||
(defmethod draw-path ((this flow-control))
|
||||
(let ((a0-1 (-> this path)))
|
||||
(if (nonzero? a0-1)
|
||||
(path-control-method-9 a0-1)
|
||||
(debug-draw a0-1)
|
||||
)
|
||||
)
|
||||
0
|
||||
@ -177,17 +177,14 @@
|
||||
0
|
||||
(let ((f0-12 (/ f30-0 (- f30-0 f0-10))))
|
||||
(set! sv-208 (new 'stack-no-clear 'vector))
|
||||
(let ((t9-2 (method-of-object (-> this path) path-control-method-13)))
|
||||
sv-208
|
||||
(+ (the float (if (= s4-0 (+ s2-0 -1))
|
||||
(+ s4-0 -1)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
f0-12
|
||||
)
|
||||
(t9-2)
|
||||
)
|
||||
(displacement-between-two-points-normalized! (-> this path) sv-208 (+ (the float (if (= s4-0 (+ s2-0 -1))
|
||||
(+ s4-0 -1)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
f0-12
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -313,10 +310,7 @@
|
||||
(let ((f0-12 (/ f30-0 (- f30-0 f0-10)))
|
||||
(s1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((t9-3 (method-of-object (-> this path) path-control-method-13)))
|
||||
(+ (the float s3-1) f0-12)
|
||||
(t9-3)
|
||||
)
|
||||
(displacement-between-two-points-normalized! (-> this path) s1-1 (+ (the float s3-1) f0-12))
|
||||
(let ((v1-17 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! v1-17 s1-1 (* (-> s2-0 speed) (seconds-per-frame)))
|
||||
(let ((a1-16 (new 'stack-no-clear 'vector)))
|
||||
@ -707,7 +701,3 @@
|
||||
(set! (-> this flow) (new 'process 'flow-control (the-as process-drawable this) (the-as res-lump #f)))
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
994
test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc
generated
vendored
Normal file
994
test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc
generated
vendored
Normal file
@ -0,0 +1,994 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-collision-editor sew-rove-plat sew-rove-plat-lod0-jg sew-rove-plat-idle-ja
|
||||
((sew-rove-plat-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 100)
|
||||
)
|
||||
|
||||
;; definition of type collision-editor-default-proc
|
||||
(deftype collision-editor-default-proc (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type collision-editor-default-proc
|
||||
(defmethod inspect ((this collision-editor-default-proc))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (collision-editor-default-proc)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(deactivate self)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; definition for function collision-editor-default-proc-init-by-other
|
||||
(defbehavior collision-editor-default-proc-init-by-other collision-editor-default-proc ()
|
||||
(let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096000.0)
|
||||
(set! (-> gp-0 total-prims) (the-as uint 1))
|
||||
(set! (-> gp-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> gp-0 root-prim)))
|
||||
(set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) gp-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(transform-post)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
;; definition of type collision-editor-edited-proc
|
||||
(deftype collision-editor-edited-proc (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type collision-editor-edited-proc
|
||||
(defmethod inspect ((this collision-editor-edited-proc))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (collision-editor-edited-proc)
|
||||
:virtual #t
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(transform-post)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function collision-editor-edited-proc-init-by-other
|
||||
(defbehavior collision-editor-edited-proc-init-by-other collision-editor-edited-proc ()
|
||||
(let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096.0)
|
||||
(set! (-> gp-0 total-prims) (the-as uint 1))
|
||||
(set! (-> gp-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> gp-0 root-prim)))
|
||||
(set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) gp-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
;; definition for symbol *collision-editor-mesh-names*, type (array string)
|
||||
(define *collision-editor-mesh-names* (new 'static 'boxed-array :type string "moveplat"))
|
||||
|
||||
;; definition for symbol *collision-editor-art-group-name*, type string
|
||||
(define *collision-editor-art-group-name* "sew-rove-plat")
|
||||
|
||||
;; definition for function collision-editor-add-mesh-to-ccache
|
||||
(defun collision-editor-add-mesh-to-ccache ((arg0 collide-shape-prim-group) (arg1 collide-cache))
|
||||
(set! (-> arg1 collide-box4w min x) -409600000)
|
||||
(set! (-> arg1 collide-box4w min y) -409600000)
|
||||
(set! (-> arg1 collide-box4w min z) -409600000)
|
||||
(set! (-> arg1 collide-box4w max x) #x186a0000)
|
||||
(set! (-> arg1 collide-box4w max y) #x186a0000)
|
||||
(set! (-> arg1 collide-box4w max z) #x186a0000)
|
||||
(set! (-> arg1 num-tris) 0)
|
||||
(set! (-> arg1 num-prims) 0)
|
||||
(set! (-> arg1 collide-with) (the-as collide-spec -1))
|
||||
(set! (-> arg1 ignore-mask) (new 'static 'pat-surface))
|
||||
(add-fg-prim-using-box arg0 arg1)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function print-default-collision
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun print-default-collision ((arg0 process-drawable))
|
||||
(local-vars (sv-224 matrix) (sv-240 symbol) (sv-256 string) (sv-272 float) (sv-288 float))
|
||||
(let ((gp-0 (process-spawn collision-editor-default-proc :name "collision-editor-default-proc")))
|
||||
(when gp-0
|
||||
(when (and (nonzero? (-> (the-as process-drawable (-> gp-0 0)) draw))
|
||||
(-> (the-as process-drawable (-> gp-0 0)) draw jgeo)
|
||||
)
|
||||
(format #t "(group (#f~%")
|
||||
(format #t " :action (solid)~%")
|
||||
(format #t " :collide-as enemy~%")
|
||||
(format #t " :collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 2.0))~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name)
|
||||
)
|
||||
(format #t " :children (~%")
|
||||
(let* ((t9-10 (method-of-type res-lump get-property-struct))
|
||||
(a0-11 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra))
|
||||
(a1-10 'collide-mesh-group)
|
||||
(a2-3 'interp)
|
||||
(a3-3 -1000000000.0)
|
||||
(t0-0 (the-as float #f))
|
||||
(s5-1 (the-as
|
||||
(array collide-mesh)
|
||||
(t9-10 a0-11 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and s5-1 (> (length s5-1) 0))
|
||||
(dotimes (s4-0 (length s5-1))
|
||||
(format
|
||||
#t
|
||||
" (mesh ((la-collide-mesh ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> *collision-editor-mesh-names* s4-0)
|
||||
)
|
||||
(format #t " :action solid~%")
|
||||
(format #t " :collide-as enemy~%")
|
||||
(format #t " :collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(let ((v1-22 (-> s5-1 s4-0 joint-id)))
|
||||
(cond
|
||||
((= v1-22 -1)
|
||||
(format #t " ;;:transform-index JOINT_ID_NO_TRANSFORM~%")
|
||||
)
|
||||
((= v1-22 -2)
|
||||
(format #t " ;;:transform-index JOINT_ID_ROOT_TRANSLATION~%")
|
||||
)
|
||||
((= v1-22 -3)
|
||||
(format #t " ;;:transform-index JOINT_ID_ROOT_TRANSFORM~%")
|
||||
)
|
||||
(else
|
||||
(let ((t9-19 format)
|
||||
(a0-23 #t)
|
||||
(a1-18 " :transform-index (joint-node-index ~S ~S)~%")
|
||||
(a2-5 *collision-editor-art-group-name*)
|
||||
(a3-12 (-> (the-as process-drawable (-> gp-0 0)) node-list data (+ (-> s5-1 s4-0 joint-id) 1) joint name))
|
||||
)
|
||||
(t9-19 a0-23 a1-18 a2-5 a3-12)
|
||||
(let ((s0-0 (new 'stack 'collide-shape-prim-mesh (the-as collide-shape 0) (the-as uint a3-12) (the-as uint t0-0))))
|
||||
(set! (-> s0-0 cshape) (the-as collide-shape (-> (the-as process-drawable (-> gp-0 0)) root)))
|
||||
(set! (-> s0-0 transform-index) (+ (-> s5-1 s4-0 joint-id) 1))
|
||||
(set! (-> s0-0 prim-core prim-type) 1)
|
||||
(set! (-> s0-0 local-sphere w) 1.0)
|
||||
(set! (-> s0-0 mesh) (-> s5-1 s4-0))
|
||||
(set! (-> s0-0 mesh-cache-id) (the-as uint 0))
|
||||
(set! (-> s0-0 mesh-id) s4-0)
|
||||
(collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s0-0) *collide-cache*)
|
||||
(let ((a0-26 (the-as object (-> *collide-cache* tris)))
|
||||
(v1-41 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (nonzero? (-> *collide-cache* num-tris))
|
||||
(set! (-> v1-41 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad))
|
||||
(set! (-> s2-0 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad))
|
||||
)
|
||||
(countdown (a1-27 (-> *collide-cache* num-tris))
|
||||
(set! (-> v1-41 x) (fmin
|
||||
(fmin
|
||||
(fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-41 y) (fmin
|
||||
(fmin
|
||||
(fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-41 z) (fmin
|
||||
(fmin
|
||||
(fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 x) (fmax
|
||||
(fmax
|
||||
(fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 y) (fmax
|
||||
(fmax
|
||||
(fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 z) (fmax
|
||||
(fmax
|
||||
(fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
|
||||
)
|
||||
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
|
||||
)
|
||||
)
|
||||
(set! a0-26 (-> (the-as (inline-array collide-cache-tri) a0-26) 1))
|
||||
)
|
||||
(vector+! s3-0 v1-41 s2-0)
|
||||
(vector-float*! s3-0 s3-0 0.5)
|
||||
(vector<-cspace! s1-0 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index)))
|
||||
(vector-! s1-0 s3-0 s1-0)
|
||||
(set! sv-224 (new 'stack-no-clear 'matrix))
|
||||
(let* ((a0-35 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform))
|
||||
(a2-11 (-> a0-35 rvec quad))
|
||||
(a1-36 (-> a0-35 uvec quad))
|
||||
(v1-53 (-> a0-35 fvec quad))
|
||||
(a0-36 (-> a0-35 trans quad))
|
||||
)
|
||||
(set! (-> sv-224 rvec quad) a2-11)
|
||||
(set! (-> sv-224 uvec quad) a1-36)
|
||||
(set! (-> sv-224 fvec quad) v1-53)
|
||||
(set! (-> sv-224 trans quad) a0-36)
|
||||
)
|
||||
(vector-reset! (-> sv-224 trans))
|
||||
(matrix-transpose! sv-224 sv-224)
|
||||
(vector-matrix*! s1-0 s1-0 sv-224)
|
||||
(let ((s0-1 format))
|
||||
(set! sv-240 #t)
|
||||
(set! sv-256 " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%")
|
||||
(set! sv-272 (-> s1-0 x))
|
||||
(set! sv-288 (-> s1-0 y))
|
||||
(let ((s1-1 (-> s1-0 z))
|
||||
(t1-1 (* 1.0001 (vector-vector-distance s3-0 s2-0)))
|
||||
)
|
||||
(set! t0-0 s1-1)
|
||||
(s0-1 sv-240 sv-256 sv-272 sv-288 t0-0 t1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t " ))~%")
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(format #t " (sphere (#f~%")
|
||||
(format #t " :action solid~%")
|
||||
(format #t " :collide-as enemy~%")
|
||||
(format #t " :collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name)
|
||||
)
|
||||
(format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 1.0))~%")
|
||||
(format #t " ))~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t " )))~%")
|
||||
)
|
||||
)
|
||||
(deactivate (-> gp-0 0))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function print-actual-collision
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun print-actual-collision ((arg0 process-drawable))
|
||||
(format #t "~%~%")
|
||||
(when arg0
|
||||
(when (type? (-> arg0 root) collide-shape)
|
||||
(let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim))
|
||||
(s4-0 0)
|
||||
)
|
||||
(let ((v1-3 (-> s5-0 prim-core prim-type)))
|
||||
(cond
|
||||
((or (= v1-3 1) (= v1-3 -1))
|
||||
(set! s4-0 1)
|
||||
)
|
||||
((zero? v1-3)
|
||||
(let ((s4-1 s5-0))
|
||||
(format #t "(group (#f~%")
|
||||
(format #t " ;;:action (solid)~%")
|
||||
(format #t " ;;:collide-as enemy~%")
|
||||
(format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> s5-0 local-sphere x)
|
||||
(-> s5-0 local-sphere y)
|
||||
(-> s5-0 local-sphere z)
|
||||
(-> s5-0 local-sphere w)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> arg0 node-list data (-> s4-1 transform-index) joint name)
|
||||
)
|
||||
(format #t " :children (~%")
|
||||
(set! s4-0 (the-as int (-> s4-1 specific 1)))
|
||||
)
|
||||
(&+! s5-0 80)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s3-0 s4-0)
|
||||
(case (-> s5-0 prim-core prim-type)
|
||||
((1)
|
||||
(let ((v1-11 s5-0))
|
||||
(format
|
||||
#t
|
||||
" (mesh ((la-collide-mesh ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> (the-as
|
||||
(array string)
|
||||
(+ (* (-> (the-as collide-shape-prim-mesh v1-11) mesh-id) 4) (the-as int *collision-editor-mesh-names*))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t " ;;:action solid~%")
|
||||
(format #t " ;;:collide-as enemy~%")
|
||||
(format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> arg0 node-list data (-> s5-0 transform-index) joint name)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
" :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> s5-0 local-sphere x)
|
||||
(-> s5-0 local-sphere y)
|
||||
(-> s5-0 local-sphere z)
|
||||
(-> s5-0 local-sphere w)
|
||||
)
|
||||
(format #t " ))~%")
|
||||
)
|
||||
((-1)
|
||||
(format #t " (sphere (#f~%")
|
||||
(format #t " ;;:action solid~%")
|
||||
(format #t " ;;:collide-as enemy~%")
|
||||
(format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%")
|
||||
(format
|
||||
#t
|
||||
" :transform-index (joint-node-index ~S ~S)~%"
|
||||
*collision-editor-art-group-name*
|
||||
(-> arg0 node-list data (-> s5-0 transform-index) joint name)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
" :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> s5-0 local-sphere x)
|
||||
(-> s5-0 local-sphere y)
|
||||
(-> s5-0 local-sphere z)
|
||||
(-> s5-0 local-sphere w)
|
||||
)
|
||||
(format #t " ))~%")
|
||||
)
|
||||
)
|
||||
(&+! s5-0 80)
|
||||
)
|
||||
)
|
||||
(if (zero? (-> (the-as collide-shape (-> arg0 root)) root-prim prim-core prim-type))
|
||||
(format #t " )))~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "~%~%")
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type collision-editor
|
||||
(deftype collision-editor (process)
|
||||
((proc handle)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type collision-editor
|
||||
(defmethod inspect ((this collision-editor))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tproc: ~D~%" (-> this proc))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type collision-edit-info
|
||||
(deftype collision-edit-info (structure)
|
||||
((editing symbol)
|
||||
(current-func collision-editor-func)
|
||||
(analog-func collision-editor-func)
|
||||
(current-prim int32)
|
||||
)
|
||||
(:methods
|
||||
(collision-edit-info-method-9 (_type_) none)
|
||||
(draw-menu (_type_ process-drawable) none)
|
||||
(collision-edit-info-method-11 (_type_ process-drawable) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type collision-edit-info
|
||||
(defmethod inspect ((this collision-edit-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'collision-edit-info)
|
||||
(format #t "~1Tediting: ~A~%" (-> this editing))
|
||||
(format #t "~1Tcurrent-func: ~D~%" (-> this current-func))
|
||||
(format #t "~1Tanalog-func: ~D~%" (-> this analog-func))
|
||||
(format #t "~1Tcurrent-prim: ~D~%" (-> this current-prim))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function collision-edit-get-max-prim
|
||||
(defun collision-edit-get-max-prim ((arg0 process-drawable))
|
||||
(let ((gp-0 0))
|
||||
(when (and arg0 (type? (-> arg0 root) collide-shape))
|
||||
(let ((v1-3 (-> (the-as collide-shape (-> arg0 root)) root-prim)))
|
||||
(if (zero? (-> v1-3 prim-core prim-type))
|
||||
(set! gp-0 (the-as int (-> v1-3 specific 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function collision-edit-get-prim
|
||||
;; WARN: Return type mismatch int vs collide-shape-prim.
|
||||
(defun collision-edit-get-prim ((arg0 process-drawable) (arg1 int))
|
||||
(when (and arg0 (type? (-> arg0 root) collide-shape))
|
||||
(let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim))
|
||||
(v1-3 (collision-edit-get-max-prim arg0))
|
||||
)
|
||||
(if (and s5-0 (>= v1-3 arg1))
|
||||
(return (the-as collide-shape-prim (+ (the-as uint s5-0) (* 80 arg1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as collide-shape-prim #f)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type collision-edit-info
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collision-edit-info-method-9 ((this collision-edit-info))
|
||||
(if (cpad-pressed? 0 up)
|
||||
(+! (-> this current-func) -1)
|
||||
)
|
||||
(if (cpad-pressed? 0 left)
|
||||
(+! (-> this current-func) -4)
|
||||
)
|
||||
(if (cpad-pressed? 0 down)
|
||||
(+! (-> this current-func) 1)
|
||||
)
|
||||
(if (cpad-pressed? 0 right)
|
||||
(+! (-> this current-func) 4)
|
||||
)
|
||||
(cond
|
||||
((< (the-as int (-> this current-func)) 0)
|
||||
(set! (-> this current-func) (collision-editor-func stop-editor))
|
||||
)
|
||||
((>= (the-as int (-> this current-func)) 4)
|
||||
(set! (-> this current-func) (collision-editor-func analog))
|
||||
0
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type collision-edit-info
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collision-edit-info-method-11 ((this collision-edit-info) (arg0 process-drawable))
|
||||
(local-vars (s5-0 int))
|
||||
(when (not arg0)
|
||||
(set! s5-0 (the-as int #f))
|
||||
(goto cfg-14)
|
||||
)
|
||||
(set! s5-0 (-> this current-prim))
|
||||
(let ((v1-2 (collision-edit-get-max-prim arg0)))
|
||||
(when (cpad-pressed? 0 r1)
|
||||
(+! s5-0 1)
|
||||
(if (cpad-hold? 0 l1)
|
||||
(+! s5-0 4)
|
||||
)
|
||||
)
|
||||
(when (cpad-pressed? 0 l1)
|
||||
(+! s5-0 -1)
|
||||
(if (cpad-hold? 0 r1)
|
||||
(+! s5-0 -4)
|
||||
)
|
||||
)
|
||||
(if (< s5-0 0)
|
||||
(set! s5-0 v1-2)
|
||||
)
|
||||
(if (< v1-2 s5-0)
|
||||
(set! s5-0 0)
|
||||
)
|
||||
)
|
||||
(set! (-> this current-prim) s5-0)
|
||||
(label cfg-14)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type collision-edit-info
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw-menu ((this collision-edit-info) (arg0 process-drawable))
|
||||
(local-vars (a3-0 string))
|
||||
(when (cpad-pressed? 0 l2)
|
||||
(set! (-> this editing) (not (-> this editing)))
|
||||
(cond
|
||||
((-> this editing)
|
||||
(set! *external-cam-mode* 'locked)
|
||||
)
|
||||
(*target*
|
||||
(set! *external-cam-mode* #f)
|
||||
)
|
||||
(else
|
||||
(set! *external-cam-mode* 'pad-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((or (not (-> this editing)) (cpad-hold? 0 r2))
|
||||
(if (not (-> this editing))
|
||||
(format *stdcon* "press l2 to edit collision~%")
|
||||
(format *stdcon* "release r2 to continue editing collision~%")
|
||||
)
|
||||
(if (or (cpad-hold? 0 r2) (not *target*))
|
||||
(set! *external-cam-mode* 'pad-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! *external-cam-mode* 'locked)
|
||||
(collision-edit-info-method-9 this)
|
||||
(collision-edit-info-method-11 this arg0)
|
||||
(let ((s3-0 ">")
|
||||
(s4-0 " ")
|
||||
)
|
||||
(if (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
|
||||
(set! s3-0 " ")
|
||||
)
|
||||
(format *stdcon* " r2/l2: move camera~%")
|
||||
(let ((s2-0 (-> this current-prim)))
|
||||
"??"
|
||||
(let ((v1-38 (collision-edit-get-prim arg0 0)))
|
||||
(when v1-38
|
||||
(if (zero? (-> v1-38 prim-core prim-type))
|
||||
(+! s2-0 -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= s2-0 -1)
|
||||
(set! a3-0 "*group*")
|
||||
)
|
||||
((= (-> (collision-edit-get-prim arg0 s2-0) prim-core prim-type) 1)
|
||||
(set! a3-0 (-> *collision-editor-mesh-names* s2-0))
|
||||
)
|
||||
(else
|
||||
(set! a3-0 "*sphere*")
|
||||
)
|
||||
)
|
||||
)
|
||||
(format *stdcon* " r1/l1: select prim ~D ~S~%" (-> this current-prim) a3-0)
|
||||
(format *stdcon* " dpad: select function~%")
|
||||
(format *stdcon* " x, tri: toggle/call~%")
|
||||
(format *stdcon* "------------------------~%")
|
||||
(format
|
||||
*stdcon*
|
||||
" ~S analog: ~S~%"
|
||||
(if (= (-> this current-func) (collision-editor-func analog))
|
||||
s3-0
|
||||
s4-0
|
||||
)
|
||||
(if (= (-> this analog-func) (collision-editor-func analog))
|
||||
"adjust sphere"
|
||||
"???"
|
||||
)
|
||||
)
|
||||
(let ((v1-50 (collision-edit-get-prim arg0 (-> this current-prim)))
|
||||
(a3-2 (the-as basic "??"))
|
||||
)
|
||||
(if (zero? (-> v1-50 transform-index))
|
||||
(set! a3-2 "*root*")
|
||||
)
|
||||
(if (and v1-50
|
||||
(< (-> v1-50 transform-index) (-> arg0 node-list length))
|
||||
(-> arg0 node-list data (-> v1-50 transform-index) joint)
|
||||
)
|
||||
(set! a3-2 (-> arg0 node-list data (-> v1-50 transform-index) joint name))
|
||||
)
|
||||
(format
|
||||
*stdcon*
|
||||
" ~S change sphere joint ~S~%"
|
||||
(if (= (-> this current-func) (collision-editor-func edit))
|
||||
s3-0
|
||||
s4-0
|
||||
)
|
||||
a3-2
|
||||
)
|
||||
)
|
||||
(format
|
||||
*stdcon*
|
||||
" ~S print to listener~%"
|
||||
(if (= (-> this current-func) (collision-editor-func print-collision))
|
||||
s3-0
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
(format *stdcon* " ~S quit~%" (cond
|
||||
((= (-> this current-func) (collision-editor-func stop-editor))
|
||||
(empty)
|
||||
s3-0
|
||||
)
|
||||
(else
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 0))
|
||||
(if (cpad-pressed? 0 x)
|
||||
(+! s4-1 1)
|
||||
)
|
||||
(if (cpad-pressed? 0 triangle)
|
||||
(+! s4-1 -1)
|
||||
)
|
||||
(when (nonzero? s4-1)
|
||||
(case (-> this current-func)
|
||||
(((collision-editor-func analog))
|
||||
(+! (-> this analog-func) s4-1)
|
||||
)
|
||||
(((collision-editor-func edit))
|
||||
(let ((v1-75 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(when (and v1-75 (!= (-> v1-75 prim-core prim-type) 1))
|
||||
(let* ((a0-41 (-> v1-75 transform-index))
|
||||
(a1-25 (+ (-> arg0 node-list length) -1))
|
||||
(a0-42 (+ a0-41 s4-1))
|
||||
)
|
||||
(if (< a0-42 0)
|
||||
(set! a0-42 a1-25)
|
||||
)
|
||||
(while (or (= a0-42 1) (= a0-42 2))
|
||||
(+! a0-42 s4-1)
|
||||
)
|
||||
(if (< a1-25 a0-42)
|
||||
(set! a0-42 0)
|
||||
)
|
||||
(set! (-> v1-75 transform-index) a0-42)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(((collision-editor-func print-collision))
|
||||
(print-actual-collision arg0)
|
||||
)
|
||||
(((collision-editor-func stop-editor))
|
||||
(kill-by-type collision-editor-edited-proc *active-pool*)
|
||||
(kill-by-type collision-editor *active-pool*)
|
||||
)
|
||||
(else
|
||||
(format 0 "~%ERROR<GMJ>: bad collision-edit-func~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< (the-as int (-> this analog-func)) 0)
|
||||
(set! (-> this analog-func) (collision-editor-func analog))
|
||||
0
|
||||
)
|
||||
((>= (the-as int (-> this analog-func)) 1)
|
||||
(set! (-> this analog-func) (collision-editor-func analog))
|
||||
0
|
||||
)
|
||||
)
|
||||
(when arg0
|
||||
(let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))
|
||||
(f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 1.0))
|
||||
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 1.0))
|
||||
(f24-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 1.0))
|
||||
)
|
||||
(when (or (!= f30-0 0.0) (!= f28-0 0.0) (!= f26-0 0.0) (!= f24-0 0.0))
|
||||
(when (= (-> this analog-func) (collision-editor-func analog))
|
||||
(set! f30-0 (* -409.6 f30-0))
|
||||
(set! f28-0 (* -409.6 f28-0))
|
||||
(let ((f0-8 (+ (* 0.01 f24-0) (* -0.01 f26-0))))
|
||||
(set! f24-0 (+ 1.0 f0-8))
|
||||
)
|
||||
(set! f26-0 0.0)
|
||||
)
|
||||
(when (= (-> this analog-func) (collision-editor-func analog))
|
||||
(let ((s4-2 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(when s4-2
|
||||
(set! (-> s4-2 local-sphere w) (* (-> s4-2 local-sphere w) f24-0))
|
||||
(let ((s3-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-17 (matrix-local->world #f #f))
|
||||
(v1-107 (-> a2-17 rvec quad))
|
||||
(a0-58 (-> a2-17 uvec quad))
|
||||
(a1-37 (-> a2-17 fvec quad))
|
||||
(a2-18 (-> a2-17 trans quad))
|
||||
)
|
||||
(set! (-> s3-1 rvec quad) v1-107)
|
||||
(set! (-> s3-1 uvec quad) a0-58)
|
||||
(set! (-> s3-1 fvec quad) a1-37)
|
||||
(set! (-> s3-1 trans quad) a2-18)
|
||||
)
|
||||
(let ((s2-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-19 (-> arg0 node-list data (-> s4-2 transform-index) bone transform))
|
||||
(v1-111 (-> a2-19 rvec quad))
|
||||
(a0-61 (-> a2-19 uvec quad))
|
||||
(a1-38 (-> a2-19 fvec quad))
|
||||
(a2-20 (-> a2-19 trans quad))
|
||||
)
|
||||
(set! (-> s2-1 rvec quad) v1-111)
|
||||
(set! (-> s2-1 uvec quad) a0-61)
|
||||
(set! (-> s2-1 fvec quad) a1-38)
|
||||
(set! (-> s2-1 trans quad) a2-20)
|
||||
)
|
||||
(let ((s1-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-1 x) f30-0)
|
||||
(set! (-> s1-1 y) f28-0)
|
||||
(set! (-> s1-1 z) f26-0)
|
||||
(set! (-> s1-1 w) 1.0)
|
||||
(vector-reset! (-> s3-1 trans))
|
||||
(vector-matrix*! s1-1 s1-1 s3-1)
|
||||
(vector-reset! (-> s2-1 trans))
|
||||
(matrix-transpose! s2-1 s2-1)
|
||||
(vector-matrix*! s1-1 s1-1 s2-1)
|
||||
(+! (-> s4-2 local-sphere x) (-> s1-1 x))
|
||||
(+! (-> s4-2 local-sphere y) (-> s1-1 y))
|
||||
(+! (-> s4-2 local-sphere z) (-> s1-1 z))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(cond
|
||||
(s5-1
|
||||
(show-maya-skeleton arg0 (-> s5-1 transform-index) #x45800000)
|
||||
(let ((gp-1 (shl #x80ff 16)))
|
||||
(let ((v1-117 (-> s5-1 prim-core prim-type)))
|
||||
(cond
|
||||
((= v1-117 1)
|
||||
(collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s5-1) *collide-cache*)
|
||||
(debug-draw *collide-cache*)
|
||||
(let ((s4-3 (the-as object (-> *collide-cache* tris))))
|
||||
(countdown (s3-2 (-> *collide-cache* num-tris))
|
||||
(when (< (-> s5-1 prim-core world-sphere w)
|
||||
(vector-vector-distance
|
||||
(the-as vector (-> s5-1 prim-core))
|
||||
(the-as vector (-> (the-as collide-cache-tri s4-3) vertex))
|
||||
)
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(the-as vector (-> (the-as collide-cache-tri s4-3) vertex))
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(set! gp-1 (the-as int (the-as uint #x800000ff)))
|
||||
)
|
||||
(when (< (-> s5-1 prim-core world-sphere w)
|
||||
(vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 1))
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> (the-as collide-cache-tri s4-3) vertex 1)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(set! gp-1 (the-as int (the-as uint #x800000ff)))
|
||||
)
|
||||
(when (< (-> s5-1 prim-core world-sphere w)
|
||||
(vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 2))
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> (the-as collide-cache-tri s4-3) vertex 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(set! gp-1 (the-as int (the-as uint #x800000ff)))
|
||||
)
|
||||
(set! s4-3 (&+ (the-as collide-cache-tri s4-3) 64))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-117 -1)
|
||||
)
|
||||
((zero? v1-117)
|
||||
)
|
||||
)
|
||||
)
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(the-as vector (-> s5-1 prim-core))
|
||||
(-> s5-1 prim-core world-sphere w)
|
||||
(the-as rgba gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(show-maya-skeleton arg0 1000 #x45800000)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for symbol *collision-edit-info*, type collision-edit-info
|
||||
(define *collision-edit-info* (the-as collision-edit-info 0))
|
||||
|
||||
;; definition for symbol *collision-edit-info*, type collision-edit-info
|
||||
(define *collision-edit-info*
|
||||
(new 'static 'collision-edit-info :editing #t :current-func (collision-editor-func print-collision))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (collision-editor)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(set! *external-cam-mode* #f)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 *collision-edit-info*)
|
||||
(s5-0 (method-of-type collision-edit-info draw-menu))
|
||||
(s4-0 (handle->process (-> self proc)))
|
||||
)
|
||||
(s5-0 gp-0 (the-as process-drawable (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; definition for function collision-editor-init-by-other
|
||||
(defbehavior collision-editor-init-by-other collision-editor ((arg0 handle))
|
||||
(set! (-> self proc) arg0)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
;; definition for function stop-collision-edit
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun stop-collision-edit ()
|
||||
(kill-by-type collision-editor-edited-proc *active-pool*)
|
||||
(kill-by-type collision-editor *active-pool*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function collision-edit
|
||||
(defun collision-edit ((arg0 process))
|
||||
(stop-collision-edit)
|
||||
(when (not arg0)
|
||||
(let ((v1-2 (process-spawn collision-editor-edited-proc :name "collision-editor-edited-proc")))
|
||||
(set! arg0 (if v1-2
|
||||
(the-as process (-> v1-2 0 self))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (process->handle (the-as process-tree arg0))))
|
||||
(process-spawn collision-editor gp-2 :name "collision-editor")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
4
test/decompiler/reference/jak3/engine/entity/entity_REF.gc
generated
vendored
4
test/decompiler/reference/jak3/engine/entity/entity_REF.gc
generated
vendored
@ -1274,7 +1274,7 @@
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) path))
|
||||
(path-control-method-9 (-> (the-as process-drawable arg0) path))
|
||||
(debug-draw (-> (the-as process-drawable arg0) path))
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) vol))
|
||||
(debug-draw (-> (the-as process-drawable arg0) vol))
|
||||
@ -1652,7 +1652,7 @@
|
||||
*active-pool*
|
||||
(lambda ((arg0 process)) (when (type? arg0 process-drawable)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) path))
|
||||
(path-control-method-9 (-> (the-as process-drawable arg0) path))
|
||||
(debug-draw (-> (the-as process-drawable arg0) path))
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable arg0) vol))
|
||||
(debug-draw (-> (the-as process-drawable arg0) vol))
|
||||
|
26
test/decompiler/reference/jak3/engine/geometry/path-h_REF.gc
generated
vendored
26
test/decompiler/reference/jak3/engine/geometry/path-h_REF.gc
generated
vendored
@ -17,29 +17,29 @@ These path-controls are typically allocated on a process heap."
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type process symbol float entity symbol) _type_)
|
||||
(path-control-method-9 (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
(get-point-in-path! (_type_ vector float symbol) vector)
|
||||
(path-control-method-11 () none)
|
||||
(path-control-method-12 () none)
|
||||
(path-control-method-13 () none)
|
||||
(get-random-point (_type_ vector) vector)
|
||||
(path-control-method-12 (_type_ vector float float) vector)
|
||||
(displacement-between-two-points-normalized! (_type_ vector float) vector)
|
||||
(get-point-at-percent-along-path! (_type_ vector float symbol) vector)
|
||||
(path-control-method-15 () none)
|
||||
(path-control-method-15 (_type_ vector float float) vector)
|
||||
(displacement-between-points-at-percent-normalized! (_type_ vector float) vector)
|
||||
(get-num-segments (_type_) float)
|
||||
(total-distance (_type_) float)
|
||||
(get-num-verts (_type_) int)
|
||||
(segement-duration->path-duration (_type_ float) float)
|
||||
(path-duration->segment-duration (_type_ float) float)
|
||||
(path-control-method-22 () none)
|
||||
(path-control-method-23 () none)
|
||||
(path-control-method-24 () none)
|
||||
(path-control-method-22 (_type_ vector) float)
|
||||
(path-control-method-23 (_type_ vector) float)
|
||||
(path-control-method-24 (_type_ vector) float)
|
||||
(path-control-method-25 (_type_ vector) float)
|
||||
(path-control-method-26 () none)
|
||||
(path-control-method-27 () none)
|
||||
(path-control-method-28 () none)
|
||||
(path-control-method-29 () none)
|
||||
(path-control-method-26 (_type_ float float) float)
|
||||
(path-control-method-27 (_type_ vector) vector)
|
||||
(path-control-method-28 (_type_ vector float float) float)
|
||||
(path-control-method-29 (_type_ vector int float) float)
|
||||
(should-display-marks? (_type_) symbol)
|
||||
(path-control-method-31 () none)
|
||||
(displacement-between-two-points! (_type_ vector float float) vector)
|
||||
)
|
||||
)
|
||||
|
||||
|
1130
test/decompiler/reference/jak3/engine/gfx/foreground/eye_REF.gc
generated
vendored
Normal file
1130
test/decompiler/reference/jak3/engine/gfx/foreground/eye_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
156
test/decompiler/reference/jak3/engine/process-drawable/simple-nav-sphere_REF.gc
generated
vendored
Normal file
156
test/decompiler/reference/jak3/engine/process-drawable/simple-nav-sphere_REF.gc
generated
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type simple-nav-sphere
|
||||
(deftype simple-nav-sphere (process-drawable)
|
||||
((first-time? symbol)
|
||||
(track-joint int32)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
active
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type simple-nav-sphere
|
||||
(defmethod inspect ((this simple-nav-sphere))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tfirst-time?: ~A~%" (-> this first-time?))
|
||||
(format #t "~2Ttrack-joint: ~D~%" (-> this track-joint))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function simple-nav-sphere-event-handler
|
||||
(defbehavior simple-nav-sphere-event-handler simple-nav-sphere ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('die-fast)
|
||||
(go empty-state)
|
||||
)
|
||||
(('move-trans)
|
||||
(move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> arg3 param 0)))
|
||||
#t
|
||||
)
|
||||
(('set-radius)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0)))
|
||||
(a0-7 (-> self root))
|
||||
)
|
||||
(set! (-> a0-7 nav-radius) f0-0)
|
||||
(set! (-> (the-as collide-shape a0-7) root-prim local-sphere w) f0-0)
|
||||
(update-transforms (the-as collide-shape a0-7))
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type simple-nav-sphere
|
||||
(defmethod run-logic? ((this simple-nav-sphere))
|
||||
"Should this process be run? Checked by execute-process-tree."
|
||||
(cond
|
||||
(*display-nav-marks*
|
||||
#t
|
||||
)
|
||||
((>= (-> this track-joint) 0)
|
||||
#t
|
||||
)
|
||||
((-> this first-time?)
|
||||
(set! (-> this first-time?) #f)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (simple-nav-sphere)
|
||||
:virtual #t
|
||||
:event simple-nav-sphere-event-handler
|
||||
:trans (behavior ()
|
||||
(if *display-nav-marks*
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug)
|
||||
(-> self root trans)
|
||||
(-> self root nav-radius)
|
||||
(new 'static 'rgba :r #x80 :g #x40 :a #x80)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (simple-nav-sphere)
|
||||
:virtual #t
|
||||
:event simple-nav-sphere-event-handler
|
||||
:trans (behavior ()
|
||||
(let ((v1-0 (ppointer->process (-> self parent)))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector<-cspace! gp-0 (-> (the-as process-drawable v1-0) node-list data (-> self track-joint)))
|
||||
(move-to-point! (the-as collide-shape (-> self root)) gp-0)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; definition for function simple-nav-sphere-init-by-other
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior simple-nav-sphere-init-by-other simple-nav-sphere ((arg0 float) (arg1 vector) (arg2 nav-mesh) (arg3 int))
|
||||
(set! (-> self track-joint) arg3)
|
||||
(set! (-> self first-time?) #t)
|
||||
(let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec obstacle))
|
||||
(set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 4096.0)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-3)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-6 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) arg0)
|
||||
(set! (-> s5-0 root-prim local-sphere w) arg0)
|
||||
(if arg1
|
||||
(set! (-> s5-0 trans quad) (-> arg1 quad))
|
||||
)
|
||||
(vector-identity! (-> s5-0 scale))
|
||||
(quaternion-identity! (-> s5-0 quat))
|
||||
(let ((v1-11 (-> s5-0 root-prim)))
|
||||
(set! (-> v1-11 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-11 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(update-transforms s5-0)
|
||||
(set! (-> self root) s5-0)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause enemy))
|
||||
(set! (-> self event-hook) simple-nav-sphere-event-handler)
|
||||
(cond
|
||||
(arg2
|
||||
(let ((t9-5 (method-of-object arg2 nav-mesh-method-31)))
|
||||
self
|
||||
(t9-5)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(nav-mesh-connect-from-ent self)
|
||||
)
|
||||
)
|
||||
(if (>= (-> self track-joint) 0)
|
||||
(go-virtual active)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
23
test/decompiler/reference/jak3/engine/target/flut/flut-h_REF.gc
generated
vendored
23
test/decompiler/reference/jak3/engine/target/flut/flut-h_REF.gc
generated
vendored
@ -51,26 +51,29 @@
|
||||
|
||||
;; definition of type flut
|
||||
(deftype flut (process-focusable)
|
||||
((extra-trans vector :inline)
|
||||
((root collide-shape-moving :override)
|
||||
(extra-trans vector :inline)
|
||||
(condition int32)
|
||||
(shadow-backup shadow-geo)
|
||||
(rider handle)
|
||||
(nav-sphere-handle handle)
|
||||
(probe-time time-frame)
|
||||
(count-lock basic)
|
||||
(count-lock symbol)
|
||||
(flags flut-flag)
|
||||
(mode basic)
|
||||
(mode symbol)
|
||||
(color-index int32)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:state-methods
|
||||
wait-for-start
|
||||
idle
|
||||
(pickup (state flut))
|
||||
wait-for-return
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(flut-method-28 () none)
|
||||
(flut-method-29 () none)
|
||||
(flut-method-30 () none)
|
||||
(flut-method-31 () none)
|
||||
(flut-method-32 () none)
|
||||
(flut-method-33 () none)
|
||||
(flut-method-34 () none)
|
||||
(flut-method-33 (_type_) symbol)
|
||||
(spawn-part-and-sound! (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
137
test/decompiler/reference/jak3/engine/target/flut/flut-part_REF.gc
generated
vendored
Normal file
137
test/decompiler/reference/jak3/engine/target/flut/flut-part_REF.gc
generated
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-flut-trans-pad
|
||||
:id 237
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1059 :fade-after (meters 160))
|
||||
(sp-item 1060 :fade-after (meters 160))
|
||||
(sp-item 1061 :fade-after (meters 60) :falloff-to (meters 60) :flags (is-3d))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1059
|
||||
:init-specs ((:texture (common-white common))
|
||||
(:num 0.5)
|
||||
(:y (meters 7))
|
||||
(:scale-x (meters 14) (meters 1))
|
||||
(:scale-y (meters 14))
|
||||
(:r 40.0)
|
||||
(:g 60.0 60.0)
|
||||
(:b 128.0)
|
||||
(:a 32.0 32.0)
|
||||
(:timer (seconds 0.035))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1060
|
||||
:init-specs ((:texture (common-white common))
|
||||
(:num 0.5)
|
||||
(:y (meters 4))
|
||||
(:scale-x (meters 7) (meters 1))
|
||||
(:scale-y (meters 14))
|
||||
(:r 40.0)
|
||||
(:g 60.0 60.0)
|
||||
(:b 128.0)
|
||||
(:a 64.0 64.0)
|
||||
(:fade-a -8.533334)
|
||||
(:timer (seconds 0.035))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1061
|
||||
:init-specs ((:texture (splash-foam level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 0.75) (meters 0.1))
|
||||
(:scale-x (meters 0))
|
||||
(:rot-x (degrees 0) (degrees 15))
|
||||
(:rot-y (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 16.0)
|
||||
(:g 0.0 127.0)
|
||||
(:b 127.0)
|
||||
(:a 127.0)
|
||||
(:vel-y (meters 0))
|
||||
(:scalevel-x (meters 0.02))
|
||||
(:rotvel-y (degrees -0.6) (degrees 1.2))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.21333334)
|
||||
(:accel-y (meters -0.00015))
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-flut-attack-strike-ground
|
||||
:id 238
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 1062) (sp-item 1063))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1062
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 24.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 1) (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 8.0 56.0)
|
||||
(:vel-y (meters 0.13333334) (meters 0.16666667))
|
||||
(:scalevel-x (meters 0.013333334))
|
||||
(:rotvel-z (degrees -0.4) (degrees 0.8))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -1.4222223)
|
||||
(:fade-a -0.35555556)
|
||||
(:accel-y (meters 0.00008333333))
|
||||
(:friction 0.7)
|
||||
(:timer (seconds 0.6))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.3))
|
||||
(:next-launcher 1064)
|
||||
(:conerot-x (degrees 90))
|
||||
(:conerot-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1063
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 32.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 1) (meters 0.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 64.0 8.0)
|
||||
(:vel-y (meters 0.3))
|
||||
(:scalevel-x (meters 0.0033333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -2.8444445)
|
||||
(:fade-a -0.82222223)
|
||||
(:friction 0.7)
|
||||
(:timer (seconds 0.3))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.15))
|
||||
(:next-launcher 1064)
|
||||
(:conerot-x (degrees 90))
|
||||
(:conerot-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
644
test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc
generated
vendored
Normal file
644
test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc
generated
vendored
Normal file
@ -0,0 +1,644 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *flut-shadow-control*, type shadow-control
|
||||
(define *flut-shadow-control*
|
||||
(new 'static 'shadow-control :settings (new 'static 'shadow-settings
|
||||
:center (new 'static 'vector :w (the-as float #xa))
|
||||
:shadow-dir (new 'static 'vector :y -1.0 :w 614400.0)
|
||||
:bot-plane (new 'static 'plane :y 1.0 :w 81920.0)
|
||||
:top-plane (new 'static 'plane :y 1.0 :w -2867.2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *flut-color-table*, type (array rgbaf)
|
||||
(define *flut-color-table* (the-as (array rgbaf) (new 'static 'boxed-array :type vector
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.8 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.7 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.6 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.5 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 0.4 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.9 :z 0.5 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.8 :z 0.6 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.8 :z 0.5 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.8 :z 0.4 :w 1.0)
|
||||
(new 'static 'vector :x 0.9 :y 0.9 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 0.8 :y 0.9 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 0.8 :y 1.0 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 0.8 :y 1.0 :z 0.8 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 34 of type flut
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod spawn-part-and-sound! ((this flut))
|
||||
(if (nonzero? (-> this part))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
)
|
||||
(if (nonzero? (-> this sound))
|
||||
(update! (-> this sound))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type flut
|
||||
(defmethod deactivate ((this flut))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(when (-> this count-lock)
|
||||
(set! (-> this count-lock) #f)
|
||||
(+! (-> *game-info* flut-count) -1)
|
||||
)
|
||||
((method-of-type process-drawable deactivate) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function flut-color-from-index
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior flut-color-from-index flut ((arg0 int))
|
||||
(set! (-> self draw color-mult quad) (-> *flut-color-table* (mod arg0 (-> *flut-color-table* length)) quad))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function flut-random-color-index
|
||||
(defun flut-random-color-index ()
|
||||
(rand-vu-int-range 0 (-> *flut-color-table* length))
|
||||
)
|
||||
|
||||
;; definition for method 33 of type flut
|
||||
(defmethod flut-method-33 ((this flut))
|
||||
(let ((gp-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 32))))
|
||||
(let ((a1-2 (sphere<-vector+r! (new 'stack-no-clear 'sphere) (-> this root trans) 16384.0)))
|
||||
(+! (-> a1-2 y) 12288.0)
|
||||
(set! (-> gp-0 length)
|
||||
(fill-actor-list-for-box *actor-hash* (the-as bounding-box a1-2) (-> gp-0 data) (-> gp-0 allocated-length))
|
||||
)
|
||||
)
|
||||
(let* ((s5-1 (-> gp-0 length))
|
||||
(s4-0 0)
|
||||
(v1-7 (-> gp-0 s4-0))
|
||||
)
|
||||
(while (< s4-0 s5-1)
|
||||
(if (type? (-> v1-7 process) flut)
|
||||
(return #f)
|
||||
)
|
||||
(+! s4-0 1)
|
||||
(set! v1-7 (-> gp-0 s4-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-for-start (flut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('bonk)
|
||||
(send-event proc 'target-flut-get-off 90)
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(('attack)
|
||||
(cond
|
||||
((and (-> self next-state) (= (-> self next-state name) 'wait-for-start))
|
||||
#f
|
||||
)
|
||||
((= (-> self mode) 'normal)
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual die)
|
||||
)
|
||||
(else
|
||||
(send-event proc 'target-flut-get-off 90)
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(send-event proc 'target-flut-get-off 90)
|
||||
(send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0)
|
||||
#f
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-2 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-2))
|
||||
v0-2
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
(set-vector! (-> self root root-prim local-sphere) 0.0 5734.4 0.0 7372.8)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(while (or (>= (-> *game-info* flut-count) 10)
|
||||
(and (sphere-in-view-frustum? (sphere<-vector+r! (new 'stack 'sphere) (-> self root trans) 8192.0))
|
||||
(and (< (vector-vector-distance (-> self root trans) (camera-pos)) 409600.0)
|
||||
*target*
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (flut-method-33 self))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (flut)
|
||||
:virtual #t
|
||||
:event (-> (method-of-type flut wait-for-start) event)
|
||||
:enter (behavior ()
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0)))
|
||||
(when s5-0
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-z-quaternion! gp-0 (-> self root quat))
|
||||
(vector-normalize! gp-0 5120.0)
|
||||
(vector+! gp-0 gp-0 (-> self root trans))
|
||||
(set! (-> self nav-sphere-handle)
|
||||
(ppointer->handle
|
||||
(process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(send-event (handle->process (-> self nav-sphere-handle)) 'die-fast)
|
||||
((-> (method-of-type flut wait-for-start) exit))
|
||||
)
|
||||
:code (behavior ()
|
||||
(when (not (-> self count-lock))
|
||||
(set! (-> self count-lock) #t)
|
||||
(+! (-> *game-info* flut-count) 1)
|
||||
)
|
||||
(if (not (-> self minimap))
|
||||
(set! (-> self minimap) (add-icon! *minimap* self (the-as uint 11) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(change-parent self *entity-pool*)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 3))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
0.0
|
||||
(let ((f30-0 20480.0))
|
||||
(until #f
|
||||
(when (and (logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
(time-elapsed? (-> self probe-time) (seconds 1))
|
||||
)
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
(set-time! (-> self probe-time))
|
||||
)
|
||||
(when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (focus-test? *target* grabbed in-head pole flut light board dark))
|
||||
(can-display-query? self "flut" -99.0)
|
||||
(-> *setting-control* user-current pilot)
|
||||
(-> *target* current-level)
|
||||
)
|
||||
(let ((gp-0
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-43 gp-0))
|
||||
(set! (-> v1-43 width) (the float 340))
|
||||
)
|
||||
(let ((v1-44 gp-0))
|
||||
(set! (-> v1-44 height) (the float 80))
|
||||
)
|
||||
(let ((v1-45 gp-0)
|
||||
(a0-21 (-> *setting-control* user-default language))
|
||||
)
|
||||
(set! (-> v1-45 scale) (if (or (= a0-21 (language-enum korean)) (= a0-21 (language-enum russian)))
|
||||
0.9
|
||||
0.7
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning large))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (text-id text-0083) #f)
|
||||
gp-0
|
||||
#f
|
||||
44
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? 0 triangle)
|
||||
(send-event *target* 'change-mode 'flut self (-> self mode) (-> self color-index))
|
||||
)
|
||||
(go-virtual pickup (method-of-object self wait-for-return))
|
||||
)
|
||||
)
|
||||
(if *target*
|
||||
(look-at!
|
||||
(-> *target* neck)
|
||||
(vector+!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(the-as vector (-> self root root-prim prim-core))
|
||||
(new 'static 'vector :y 2048.0 :w 1.0)
|
||||
)
|
||||
'nothing-special
|
||||
self
|
||||
)
|
||||
)
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pickup (flut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('draw)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 3))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
(transform-post)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('touch 'attack 'bonk)
|
||||
#f
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 (state flut)))
|
||||
(talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(let ((t9-2 (-> arg0 enter)))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 (state flut)))
|
||||
(when (-> self count-lock)
|
||||
(set! (-> self count-lock) #f)
|
||||
(+! (-> *game-info* flut-count) -1)
|
||||
)
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(when (not (and (-> self entity) (= (-> self entity extra process) self)))
|
||||
(let ((s5-0 (current-time)))
|
||||
(until (time-elapsed? s5-0 (seconds 0.1))
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
(while (zero? (ja-group-size))
|
||||
(if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
(while (and *target* (focus-test? *target* flut))
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
(let ((s5-1 (current-time)))
|
||||
(until (time-elapsed? s5-1 (seconds 1))
|
||||
(spawn-part-and-sound! self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-for-return (flut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as structure #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(when (type? (-> self root) collide-shape)
|
||||
(let ((v1-2 (-> self root root-prim)))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(transform-post)
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate die (flut)
|
||||
:virtual #t
|
||||
:enter (-> (method-of-type flut idle) enter)
|
||||
:exit (-> (method-of-type flut idle) exit)
|
||||
:code (behavior ()
|
||||
(change-parent self *entity-pool*)
|
||||
(when (-> self count-lock)
|
||||
(set! (-> self count-lock) #f)
|
||||
(+! (-> *game-info* flut-count) -1)
|
||||
)
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(if (-> self skel effect)
|
||||
(logior! (-> self skel effect flags) (effect-control-flag ecf1))
|
||||
)
|
||||
(when (logtest? (-> self flags) (flut-flag ff3))
|
||||
(set! (-> self root dynam gravity-max) 40960.0)
|
||||
(set! (-> self root dynam gravity-length) 20480.0)
|
||||
(vector-float*!
|
||||
(-> self root dynam gravity)
|
||||
(-> self root dynam gravity-normal)
|
||||
(the-as float (-> self root dynam gravity-length))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> self flags) (flut-flag ff1))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
)
|
||||
(else
|
||||
(set-vector! (-> self root root-prim local-sphere) 0.0 1638.4 0.0 1638.4)
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(logior!
|
||||
(-> self root root-prim prim-core collide-with)
|
||||
(collide-spec backgnd crate obstacle hit-by-others-list pusher)
|
||||
)
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
0
|
||||
)
|
||||
)
|
||||
(ja-channel-set! 1)
|
||||
(cond
|
||||
((logtest? (-> self flags) (flut-flag ff3))
|
||||
(ja-no-eval :group! (-> self draw art-group data 29)
|
||||
:num! (seek! (ja-aframe 65.0 0))
|
||||
:frame-num (ja-aframe 60.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 65.0 0)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(ja-no-eval :group! (-> self draw art-group data 28)
|
||||
:num! (seek! (ja-aframe 38.0 0))
|
||||
:frame-num (ja-aframe 25.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 38.0 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(do-effect (-> self skel effect) (the-as symbol "death-default") 0.0 -1)
|
||||
(ja-no-eval :num! (seek!))
|
||||
(while (not (ja-done? 0))
|
||||
(suspend)
|
||||
(ja-eval)
|
||||
)
|
||||
(while (nonzero? (-> self draw death-timer))
|
||||
(suspend)
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(if (and (-> self entity) (= (-> self entity extra process) self))
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0))
|
||||
(if (< (-> self root dynam gravity-max) (vector-length (-> self root transv)))
|
||||
(vector-normalize! (-> self root transv) (-> self root dynam gravity-max))
|
||||
)
|
||||
(let ((v1-12 (-> self root))
|
||||
(a2-1 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(set! (-> a2-1 collide-with) (collide-spec backgnd crate obstacle pusher))
|
||||
(set! (-> a2-1 ignore-process0) self)
|
||||
(set! (-> a2-1 ignore-process1) #f)
|
||||
(set! (-> a2-1 ignore-pat) (-> v1-12 pat-ignore-mask))
|
||||
(set! (-> a2-1 action-mask) (collide-action solid))
|
||||
(fill-cache-integrate-and-collide v1-12 (-> v1-12 transv) a2-1 (meters 0))
|
||||
)
|
||||
(transform-post)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function flut-init
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior flut-init flut ((arg0 entity-actor) (arg1 transformq) (arg2 handle) (arg3 flut-flag) (arg4 symbol))
|
||||
(let ((s1-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s1-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s1-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s1-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s1-0 (the-as uint 0))))
|
||||
(set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak))
|
||||
(set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> v1-6 transform-index) 0)
|
||||
(set-vector! (-> v1-6 local-sphere) 0.0 5734.4 0.0 7372.8)
|
||||
(set! (-> s1-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s1-0 root-prim) v1-6)
|
||||
)
|
||||
(set! (-> s1-0 nav-radius) (* 0.75 (-> s1-0 root-prim local-sphere w)))
|
||||
(let ((v1-9 (-> s1-0 root-prim)))
|
||||
(set! (-> s1-0 backup-collide-as) (-> v1-9 prim-core collide-as))
|
||||
(set! (-> s1-0 backup-collide-with) (-> v1-9 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) s1-0)
|
||||
)
|
||||
(set! (-> self count-lock) #f)
|
||||
(set! (-> self rider) arg2)
|
||||
(set! (-> self flags) arg3)
|
||||
(set! (-> self mode) arg4)
|
||||
(set! (-> self minimap) #f)
|
||||
(when arg0
|
||||
(process-entity-set! self arg0)
|
||||
(if (logtest? (-> self entity extra kill-mask) (task-mask ctywide))
|
||||
(ctywide-entity-hack)
|
||||
)
|
||||
(process-drawable-from-entity! self arg0)
|
||||
(set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset))
|
||||
)
|
||||
(when arg1
|
||||
(set! (-> self root trans quad) (-> arg1 trans quad))
|
||||
(quaternion-copy! (-> self root quat) (-> arg1 quat))
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self shadow-backup) (-> self draw shadow))
|
||||
(set! (-> self draw shadow-ctrl) *flut-shadow-control*)
|
||||
(let ((v1-33 (-> self node-list data)))
|
||||
(set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
|
||||
(set! (-> v1-33 0 param1) (the-as basic (-> self root trans)))
|
||||
(set! (-> v1-33 0 param2) (the-as basic (-> self extra-trans)))
|
||||
)
|
||||
(set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0))
|
||||
(set! (-> self fact)
|
||||
(new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
|
||||
)
|
||||
(if (not (logtest? arg3 (flut-flag ff0)))
|
||||
(setup-masks (-> self draw) 0 2)
|
||||
)
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(set! (-> self color-index) (mod (the-as int (sar (the-as int arg3) 32)) (-> *flut-color-table* length)))
|
||||
(flut-color-from-index (-> self color-index))
|
||||
(when (logtest? (-> self flags) (flut-flag ff1))
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
)
|
||||
(if (and (-> self entity) (not (logtest? arg3 (flut-flag ff2))))
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
)
|
||||
(set! (-> self sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0)
|
||||
)
|
||||
(set! (-> self draw light-index) (the-as uint 30))
|
||||
(logior! (-> self mask) (process-mask crate))
|
||||
(cond
|
||||
((logtest? arg3 (flut-flag ff2))
|
||||
(go-virtual die)
|
||||
)
|
||||
((handle->process arg2)
|
||||
(go-virtual idle)
|
||||
)
|
||||
(else
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type flut
|
||||
(defmethod init-from-entity! ((this flut) (arg0 entity-actor))
|
||||
(flut-init
|
||||
arg0
|
||||
(the-as transformq #f)
|
||||
(the-as handle #f)
|
||||
(the-as flut-flag (+ (shl (flut-random-color-index) 32) 1))
|
||||
'normal
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
3414
test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc
generated
vendored
Normal file
3414
test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
test/decompiler/reference/jak3/engine/target/gun/gun-states_REF.gc
generated
vendored
4
test/decompiler/reference/jak3/engine/target/gun/gun-states_REF.gc
generated
vendored
@ -476,7 +476,3 @@
|
||||
)
|
||||
:post target-gun-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
test/decompiler/reference/jak3/engine/target/mech/mech-h_REF.gc
generated
vendored
7
test/decompiler/reference/jak3/engine/target/mech/mech-h_REF.gc
generated
vendored
@ -15,6 +15,7 @@
|
||||
(drag-sound-id sound-id)
|
||||
(whine-sound-id sound-id)
|
||||
(shield-sound-id sound-id)
|
||||
(mode-sound-bank connection)
|
||||
(mech-start-time time-frame)
|
||||
(mech-time time-frame)
|
||||
(no-get-off-time time-frame)
|
||||
@ -44,7 +45,7 @@
|
||||
(smoke-local-vel vector 2 :inline)
|
||||
(particle-system-2d basic)
|
||||
(particle-system-3d basic)
|
||||
(part-thruster sparticle-launch-control)
|
||||
(part-thruster sparticle-launcher)
|
||||
(part-thruster-scale-x sp-field-init-spec)
|
||||
(part-thruster-scale-y sp-field-init-spec)
|
||||
(part-quat quaternion)
|
||||
@ -139,7 +140,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
435
test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc
generated
vendored
Normal file
435
test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc
generated
vendored
Normal file
@ -0,0 +1,435 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1037
|
||||
:init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite))
|
||||
(:birth-func 'birth-func-set-quat)
|
||||
(:num 1.0)
|
||||
(:y (meters 0))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y (meters 3))
|
||||
(:r 128.0 128.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b :copy g)
|
||||
(:a 128.0 64.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1038
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters -0.3))
|
||||
(:scale-x (meters 1.5) (meters 0.1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 0.0)
|
||||
(:a 16.0 8.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 409.6)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1039
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 1.0 4.0)
|
||||
(:y (meters 0) (meters -0.25))
|
||||
(:scale-x (meters 0.2) (meters 0.2))
|
||||
(:rot-z (degrees 0) 1 (degrees 180))
|
||||
(:scale-y (meters 1) (meters 0.6))
|
||||
(:r 192.0)
|
||||
(:g 64.0)
|
||||
(:b 0.0)
|
||||
(:a 0.0 16.0)
|
||||
(:vel-y (meters -0.06666667) (meters -0.016666668))
|
||||
(:scalevel-x (meters 0.033333335))
|
||||
(:scalevel-y (meters 0.006666667))
|
||||
(:fade-r -2.0)
|
||||
(:fade-g 2.0)
|
||||
(:fade-b 5.0)
|
||||
(:fade-a 0.32)
|
||||
(:accel-x (meters 0) (meters 0.0016666667))
|
||||
(:accel-y (meters 0.00016666666) (meters 0.0005))
|
||||
(:friction 0.94)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.085))
|
||||
(:next-launcher 1040)
|
||||
(:rotate-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1040
|
||||
:init-specs ((:r 64.0 64.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 64.0 64.0)
|
||||
(:fade-r 0.0)
|
||||
(:fade-g 0.0)
|
||||
(:fade-b 0.0)
|
||||
(:fade-a -0.128 -0.256)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1041
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 0.1 0.1)
|
||||
(:y (meters 0.25) (meters -0.5))
|
||||
(:scale-x (meters 0.05))
|
||||
(:scale-y (meters 0.5))
|
||||
(:r 192.0 64.0)
|
||||
(:g 0.0 128.0)
|
||||
(:b 0.0)
|
||||
(:a 128.0)
|
||||
(:vel-y (meters -0.033333335) (meters -0.026666667))
|
||||
(:scalevel-x (meters 0.001))
|
||||
(:scalevel-y (meters -0.017))
|
||||
(:fade-g 0.0)
|
||||
(:accel-x (meters 0) (meters 0.0016666667))
|
||||
(:accel-y (meters 0.00016666666) (meters 0.0005))
|
||||
(:friction 0.96)
|
||||
(:timer (seconds 0.167) (seconds 0.247))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.1))
|
||||
(:next-launcher 1042)
|
||||
(:rotate-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1042
|
||||
:init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1043
|
||||
:init-specs ((:num 0.6)
|
||||
(:rot-x 8)
|
||||
(:r 1638.4)
|
||||
(:g 1331.2)
|
||||
(:b 1433.6)
|
||||
(:vel-y (meters -0.06666667) (meters -0.016666668))
|
||||
(:fade-r 32.768)
|
||||
(:fade-g 26.623999)
|
||||
(:fade-b 28.671999)
|
||||
(:accel-x (meters 0) (meters 0.0016666667))
|
||||
(:friction 0.94)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (distort))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 1044)
|
||||
(:rotate-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1044
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096))
|
||||
)
|
||||
|
||||
;; definition for function mech-spawn-thruster
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun mech-spawn-thruster ((arg0 mech-info) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(set! (-> arg0 part-thruster) (-> *part-id-table* 1037))
|
||||
(set! (-> arg0 part-thruster-scale-x) (-> *part-id-table* 1037 init-specs 4))
|
||||
(set! (-> arg0 part-thruster-scale-y) (-> *part-id-table* 1037 init-specs 5))
|
||||
(let ((s1-0 (new 'stack-no-clear 'quaternion))
|
||||
(s0-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(forward-up->quaternion s1-0 arg2 (new 'static 'vector :y 1.0 :w 1.0))
|
||||
(quaternion-rotate-local-x! s1-0 s1-0 32768.0)
|
||||
(let ((a0-3 s0-0))
|
||||
(let ((v1-10 arg1))
|
||||
(let ((a1-4 (* 0.5 arg4)))
|
||||
(.mov vf7 a1-4)
|
||||
)
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
(.lvf vf4 (&-> v1-10 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a0-3 quad) vf6)
|
||||
)
|
||||
(set! (-> arg0 part-thruster-scale-x initial-valuef) arg3)
|
||||
(set! (-> arg0 part-thruster-scale-y initial-valuef) arg4)
|
||||
(dotimes (s4-1 2)
|
||||
(quaternion-rotate-local-z! s1-0 s1-0 16384.0)
|
||||
(quaternion-copy! (-> arg0 part-quat) s1-0)
|
||||
(let ((t9-4 sp-launch-particles-var)
|
||||
(a0-6 (-> arg0 particle-system-3d))
|
||||
(a1-7 (-> arg0 part-thruster))
|
||||
(a2-4 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-4 trans quad) (-> s0-0 quad))
|
||||
(t9-4
|
||||
(the-as sparticle-system a0-6)
|
||||
a1-7
|
||||
a2-4
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(launch-particles (-> *part-id-table* 1043) arg1)
|
||||
(launch-particles (-> *part-id-table* 1038) arg1)
|
||||
(cond
|
||||
((!= (-> *setting-control* user-current under-water-pitch-mod) 0.0)
|
||||
(launch-particles (-> *part-id-table* 1043) arg1)
|
||||
)
|
||||
(else
|
||||
(launch-particles (-> *part-id-table* 1039) arg1)
|
||||
(launch-particles (-> *part-id-table* 1041) arg1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1045
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 3.0)
|
||||
(:x (meters -16) (meters 32))
|
||||
(:y (meters 0) (meters 12))
|
||||
(:z (meters -16) (meters 32))
|
||||
(:scale-x (meters 0.1) (meters 0.3))
|
||||
(:rot-x 4)
|
||||
(:rot-z (degrees 0) (degrees 3600))
|
||||
(:scale-y (meters 0.1) (meters 0.1))
|
||||
(:r 0.0 64.0)
|
||||
(:g 64.0 128.0)
|
||||
(:b 64.0 196.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters -0.0033333334) (meters 0.006666667))
|
||||
(:rotvel-z (degrees -0.4) (degrees 0.8))
|
||||
(:fade-a 0.21333334 0.21333334)
|
||||
(:timer (seconds 2.5))
|
||||
(:flags (sp-cpuinfo-flag-2))
|
||||
(:userdata 0.0)
|
||||
(:func 'check-water-level-above-and-die)
|
||||
(:next-time (seconds 0.5))
|
||||
(:next-launcher 1046)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
(:conerot-radius (meters -3) (meters 8))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1046
|
||||
:init-specs ((:fade-a 0.0) (:next-time (seconds 1)) (:next-launcher 1047))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1047
|
||||
:init-specs ((:fade-a -0.21333334 -0.21333334))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1048
|
||||
:init-specs ((:texture (lakedrop level-default-sprite))
|
||||
(:num 0.2)
|
||||
(:x (meters -24) (meters 48))
|
||||
(:y (meters -4) (meters 4))
|
||||
(:z (meters -24) (meters 48))
|
||||
(:scale-x (meters 0.15) (meters 0.15))
|
||||
(:scale-y (meters 0.1) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters 0.008333334) (meters 0.005))
|
||||
(:fade-a 0.16)
|
||||
(:timer (seconds 16))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata 0.0)
|
||||
(:func 'check-water-level-above-and-die)
|
||||
(:next-time (seconds 0.33) (seconds 0.657))
|
||||
(:next-launcher 1049)
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1049
|
||||
:init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 5.997)) (:next-launcher 1050))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1050
|
||||
:init-specs ((:scalevel-x (meters -0.00033333333) (meters -0.00066666666))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.16)
|
||||
(:accel-y (meters -0.0001) (meters -0.0001))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1051
|
||||
:init-specs ((:texture (lakedrop level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.15) (meters 0.15))
|
||||
(:scale-y (meters 0.1) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters 0.008333334) (meters 0.005))
|
||||
(:fade-a 0.16)
|
||||
(:accel-y (meters 0.0002))
|
||||
(:friction 0.97 0.01)
|
||||
(:timer (seconds 4))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata 0.0)
|
||||
(:func 'check-water-level-above-and-die)
|
||||
(:next-time (seconds 0.33) (seconds 0.657))
|
||||
(:next-launcher 1052)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
(:conerot-radius (meters 0) (meters 0.5))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1052
|
||||
:init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 0.997)) (:next-launcher 1050))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-mech-explode-death
|
||||
:id 236
|
||||
:duration (seconds 0.25)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 153) (sp-item 154))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1053
|
||||
:init-specs ((:num 4.0)
|
||||
(:x (meters -1) (meters 3))
|
||||
(:y (meters 0) (meters 4))
|
||||
(:rot-x 6)
|
||||
(:r 4096.0)
|
||||
(:g 2662.4)
|
||||
(:b 2867.2)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.01))
|
||||
(:accel-y (meters 0.0016666667) (meters 0.00033333333))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 0.4))
|
||||
(:flags (distort))
|
||||
(:next-time (seconds 0.135) (seconds 0.13))
|
||||
(:next-launcher 1054)
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1054
|
||||
:init-specs ((:fade-b -5.12))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1055
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:birth-func 'birth-func-texture-group)
|
||||
(:num 16.0 4.0)
|
||||
(:x (meters -1) (meters 3))
|
||||
(:y (meters 0) (meters 4))
|
||||
(:scale-x (meters 0.5) (meters 0.25))
|
||||
(:scale-y (meters 1) (meters 0.25))
|
||||
(:r 255.0)
|
||||
(:g 0.0 128.0)
|
||||
(:b 0.0)
|
||||
(:a 32.0 32.0)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.01))
|
||||
(:scalevel-x (meters 0.013333334) (meters 0.006666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:accel-y (meters 0.0016666667) (meters 0.00033333333))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 0.367))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400f00 #x400f00))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 1056)
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1056
|
||||
:init-specs ((:fade-a -0.53333336 -0.53333336))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1057
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.2) (meters 4))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:rot-z (degrees 0) (degrees 8))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 32.0 64.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 4096.0)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
(:conerot-radius (meters -0.1) (meters 0.5))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1058
|
||||
:init-specs ((:texture (motion-blur-part level-default-sprite))
|
||||
(:num 2.0 4.0)
|
||||
(:scale-x (meters 2.5))
|
||||
(:rot-x 4)
|
||||
(:scale-y (meters 0.04) (meters 0.03))
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0.01125) (degrees 0.01125))
|
||||
(:vel-y (meters 0.1) (meters 0.2))
|
||||
(:fade-g -2.55 -2.55)
|
||||
(:fade-b -2.0)
|
||||
(:fade-a -0.64 -0.64)
|
||||
(:accel-y (meters -0.0033333334) (meters -0.0033333334))
|
||||
(:friction 0.8 0.02)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-motion-blur)
|
||||
(:conerot-x (degrees 0) (degrees 3600))
|
||||
(:conerot-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
2786
test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc
generated
vendored
Normal file
2786
test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
534
test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc
generated
vendored
Normal file
534
test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc
generated
vendored
Normal file
@ -0,0 +1,534 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type mech
|
||||
(deftype mech (process-drawable)
|
||||
((root collide-shape-moving :override)
|
||||
(extra-trans vector :inline)
|
||||
(condition int32)
|
||||
(shadow-backup shadow-geo)
|
||||
(rider handle)
|
||||
(shield-value float)
|
||||
(nav-sphere-handle handle)
|
||||
(probe-time time-frame)
|
||||
)
|
||||
(:state-methods
|
||||
wait-for-start
|
||||
idle
|
||||
(pickup (state mech))
|
||||
wait-for-return
|
||||
)
|
||||
(:methods
|
||||
(mech-method-24 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mech
|
||||
(defmethod inspect ((this mech))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Textra-trans: ~`vector`P~%" (-> this extra-trans))
|
||||
(format #t "~2Tcondition: ~D~%" (-> this condition))
|
||||
(format #t "~2Tshadow-backup: ~A~%" (-> this shadow-backup))
|
||||
(format #t "~2Trider: ~D~%" (-> this rider))
|
||||
(format #t "~2Tshield-value: ~f~%" (-> this shield-value))
|
||||
(format #t "~2Tnav-sphere-handle: ~D~%" (-> this nav-sphere-handle))
|
||||
(format #t "~2Tprobe-time: ~D~%" (-> this probe-time))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 24 of type mech
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod mech-method-24 ((this mech))
|
||||
(if (nonzero? (-> this part))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
)
|
||||
(update! (-> this sound))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-for-start (mech)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('attack 'bonk)
|
||||
(send-event proc 'target-mech-get-off (seconds 0.3))
|
||||
(send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(shove-back (meters 3))
|
||||
(shove-up (meters 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as structure #f)
|
||||
)
|
||||
(('touch)
|
||||
(send-event proc 'target-mech-get-off (seconds 0.3))
|
||||
(send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0)
|
||||
(the-as structure #f)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-2 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-2))
|
||||
v0-2
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as structure #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self root root-prim prim-core action) (collide-action))
|
||||
(set! (-> self root penetrated-by) (the-as penetrate -1))
|
||||
)
|
||||
:code (behavior ()
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (mech)
|
||||
:virtual #t
|
||||
:event (-> (method-of-type mech wait-for-start) event)
|
||||
:enter (behavior ()
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0)))
|
||||
(when s5-0
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-z-quaternion! gp-0 (-> self root quat))
|
||||
(vector-normalize! gp-0 5120.0)
|
||||
(vector+! gp-0 gp-0 (-> self root trans))
|
||||
(set! (-> self nav-sphere-handle)
|
||||
(ppointer->handle
|
||||
(process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(send-event (handle->process (-> self nav-sphere-handle)) 'die-fast)
|
||||
((-> (method-of-type mech wait-for-start) exit))
|
||||
)
|
||||
:code (behavior ()
|
||||
(change-parent self *entity-pool*)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! mech-mech-idle-ja)
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
0.0
|
||||
(let ((f30-0 20480.0))
|
||||
(until #f
|
||||
(when (and (logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
(time-elapsed? (-> self probe-time) (seconds 1))
|
||||
)
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
(set-time! (-> self probe-time))
|
||||
)
|
||||
(when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (focus-test? *target* in-head pole light board mech dark))
|
||||
(can-display-query? self "mech" -99.0)
|
||||
(-> *setting-control* user-current pilot)
|
||||
)
|
||||
(let ((gp-0
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-31 gp-0))
|
||||
(set! (-> v1-31 width) (the float 340))
|
||||
)
|
||||
(let ((v1-32 gp-0))
|
||||
(set! (-> v1-32 height) (the float 80))
|
||||
)
|
||||
(let ((v1-33 gp-0)
|
||||
(a0-19 (-> *setting-control* user-default language))
|
||||
)
|
||||
(set! (-> v1-33 scale) (if (or (= a0-19 (language-enum korean)) (= a0-19 (language-enum russian)))
|
||||
0.9
|
||||
0.7
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning large))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (text-id text-0083) #f)
|
||||
gp-0
|
||||
#f
|
||||
44
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
)
|
||||
(if (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'mech self (-> self shield-value)))
|
||||
(go-virtual pickup (method-of-object self wait-for-return))
|
||||
)
|
||||
)
|
||||
(if *target*
|
||||
(look-at!
|
||||
(-> *target* neck)
|
||||
(vector+!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(the-as vector (-> self root root-prim prim-core))
|
||||
(new 'static 'vector :y 2048.0 :w 1.0)
|
||||
)
|
||||
'nothing-special
|
||||
self
|
||||
)
|
||||
)
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pickup (mech)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('draw)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! mech-mech-idle-ja)
|
||||
(set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> self root penetrated-by) (penetrate))
|
||||
(transform-post)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('touch 'attack 'bonk)
|
||||
#f
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 (state mech)))
|
||||
(let ((t9-0 (-> arg0 enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 (state mech)))
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(while (zero? (ja-group-size))
|
||||
(if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
(while (and *target* (focus-test? *target* mech))
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
(let ((s5-0 (current-time)))
|
||||
(until (time-elapsed? s5-0 (seconds 1))
|
||||
(mech-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go arg0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-for-return (mech)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans))
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(let ((v0-1 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as structure #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function mech-init
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior mech-init mech ((arg0 entity-actor) (arg1 matrix3) (arg2 handle) (arg3 float))
|
||||
(let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s2-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s2-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0))))
|
||||
(set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak))
|
||||
(set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon))
|
||||
(set! (-> v1-6 transform-index) 0)
|
||||
(set-vector! (-> v1-6 local-sphere) 0.0 6553.6 5324.8 6553.6)
|
||||
(set! (-> s2-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s2-0 root-prim) v1-6)
|
||||
)
|
||||
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
|
||||
(let ((v1-9 (-> s2-0 root-prim)))
|
||||
(set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as))
|
||||
(set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) s2-0)
|
||||
)
|
||||
(set! (-> self rider) arg2)
|
||||
(when arg0
|
||||
(process-entity-set! self arg0)
|
||||
(process-drawable-from-entity! self arg0)
|
||||
(set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset))
|
||||
)
|
||||
(when arg1
|
||||
(set! (-> self root trans quad) (-> arg1 vector 0 quad))
|
||||
(quaternion-copy! (-> self root quat) (the-as quaternion (-> arg1 vector 1)))
|
||||
)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-mech" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self shadow-backup) (-> self draw shadow))
|
||||
(set! (-> self draw shadow-ctrl) *mech-shadow-control*)
|
||||
(let ((v1-27 (-> self node-list data)))
|
||||
(set! (-> v1-27 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
|
||||
(set! (-> v1-27 0 param1) (the-as basic (-> self root trans)))
|
||||
(set! (-> v1-27 0 param2) (the-as basic (-> self extra-trans)))
|
||||
)
|
||||
(set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0))
|
||||
(set! (-> self fact)
|
||||
(new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
|
||||
)
|
||||
(set! (-> self shield-value) arg3)
|
||||
(set! (-> self nav-sphere-handle) (the-as handle #f))
|
||||
(if (-> self entity)
|
||||
(move-to-ground
|
||||
(-> self root)
|
||||
8192.0
|
||||
40960.0
|
||||
#t
|
||||
(collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher)
|
||||
)
|
||||
)
|
||||
(set! (-> self sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0)
|
||||
)
|
||||
(set! (-> self draw light-index) (the-as uint 30))
|
||||
(if (handle->process arg2)
|
||||
(go-virtual idle)
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type mech
|
||||
(defmethod init-from-entity! ((this mech) (arg0 entity-actor))
|
||||
(mech-init arg0 (the-as matrix3 #f) (the-as handle #f) 100.0)
|
||||
)
|
||||
|
||||
;; definition of type mech-target
|
||||
(deftype mech-target (process-drawable)
|
||||
((parent (pointer target) :override)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
active
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mech-target
|
||||
(defmethod inspect ((this mech-target))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-mech-target mech mech-target-lod0-jg mech-target-idle-ja
|
||||
((mech-target-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (mech-target)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('look-at-point)
|
||||
(set-time! (-> self state-time))
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (and *target* (and (>= 98304.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(focus-test? *target* mech)
|
||||
)
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(while (< 0.0 (-> self root scale x))
|
||||
(seek! (-> self root scale x) 0.0 (* 8.0 (seconds-per-frame)))
|
||||
(set! (-> self root scale y) (-> self root scale x))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(ja-post)
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (mech-target)
|
||||
:virtual #t
|
||||
:event (-> (method-of-type mech-target idle) event)
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (or (or (not *target*) (or (< 106496.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(not (logtest? (focus-status mech) (-> *target* focus-status)))
|
||||
)
|
||||
(time-elapsed? (-> self state-time) (seconds 10))
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(sound-play "mech-target")
|
||||
(let ((f30-0 0.0))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(while (< (-> self root scale x) 1.0)
|
||||
(seek! (-> self root scale x) 1.0 (* 8.0 (seconds-per-frame)))
|
||||
(set! (-> self root scale y) (-> self root scale x))
|
||||
(set! f30-0 (seek f30-0 1.0 (* 2.0 (seconds-per-frame))))
|
||||
(ja :num! (loop! f30-0))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
(until #f
|
||||
(set! f30-0 (seek f30-0 1.0 (* 0.25 (seconds-per-frame))))
|
||||
(ja :num! (loop! f30-0))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function mech-target-init
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior mech-target-init mech ((arg0 vector) (arg1 quaternion) (arg2 entity-actor))
|
||||
(process-entity-set! self arg2)
|
||||
(when (not (and (-> self level) (logtest? (level-flags lf16) (-> self level info level-flags))))
|
||||
(dotimes (v1-4 (-> *level* length))
|
||||
(let ((a0-7 (-> *level* level v1-4)))
|
||||
(when (= (-> a0-7 status) 'active)
|
||||
(when (logtest? (level-flags lf16) (-> a0-7 info level-flags))
|
||||
(set! (-> self level) a0-7)
|
||||
(goto cfg-12)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-12)
|
||||
(set! (-> self root) (the-as collide-shape-moving (new 'process 'trsqv)))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(quaternion-copy! (-> self root quat) arg1)
|
||||
(set! (-> self root scale x) 0.0)
|
||||
(set! (-> self root scale y) 0.0)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-mech-target" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go-virtual wait-for-start)
|
||||
)
|
||||
|
||||
;; definition for function mech-target-spawn
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer mech-target).
|
||||
(defun mech-target-spawn ((arg0 vector) (arg1 process) (arg2 quaternion) (arg3 entity-actor))
|
||||
(process-spawn mech-target :init mech-target-init arg0 arg2 arg3 :name "mech-target" :to arg1)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
1875
test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc
generated
vendored
Normal file
1875
test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
58
test/decompiler/reference/jak3/engine/target/target-h_REF.gc
generated
vendored
58
test/decompiler/reference/jak3/engine/target/target-h_REF.gc
generated
vendored
@ -18,7 +18,8 @@
|
||||
(leg-ik joint-mod-ik 2)
|
||||
(foot joint-mod 2)
|
||||
(cloth symbol)
|
||||
(init-time time-frame)
|
||||
(mech-ik joint-mod-ik 2)
|
||||
(init-time time-frame :overlay-at (-> mech-ik 0))
|
||||
(teleport-time time-frame)
|
||||
(state-hook-time time-frame)
|
||||
(state-hook (function none :behavior target))
|
||||
@ -53,9 +54,9 @@
|
||||
(mode-param1 handle)
|
||||
(mode-param2 uint64)
|
||||
(mode-param3 uint64)
|
||||
(major-mode-exit-hook basic)
|
||||
(major-mode-event-hook basic)
|
||||
(sub-mode-exit-hook basic)
|
||||
(major-mode-exit-hook (function none :behavior target))
|
||||
(major-mode-event-hook (function none :behavior target))
|
||||
(sub-mode-exit-hook (function none :behavior target))
|
||||
(ext-geo-control external-art-buffer)
|
||||
(pending-ext-geo target-geo)
|
||||
(ext-geo target-geo)
|
||||
@ -151,25 +152,26 @@
|
||||
target-edge-grab
|
||||
(target-edge-grab-jump float float symbol)
|
||||
target-edge-grab-off
|
||||
(target-falling symbol)
|
||||
(target-falling object)
|
||||
target-float
|
||||
(target-flop float float float object)
|
||||
(target-flop-hit-ground symbol)
|
||||
target-flut-air-attack
|
||||
(target-flut-air-attack float)
|
||||
target-flut-air-attack-hit-ground
|
||||
target-flut-clone-anim
|
||||
target-flut-death
|
||||
target-flut-double-jump
|
||||
target-flut-eject
|
||||
target-flut-falling
|
||||
target-flut-get-off
|
||||
(target-flut-clone-anim handle)
|
||||
(target-flut-death symbol)
|
||||
(target-flut-double-jump float float)
|
||||
(target-flut-eject symbol)
|
||||
(target-flut-falling object)
|
||||
(target-flut-get-off handle)
|
||||
target-flut-get-off-jump
|
||||
target-flut-get-on
|
||||
(target-flut-get-on handle)
|
||||
target-flut-grab
|
||||
target-flut-hit
|
||||
(target-flut-hit symbol attack-info)
|
||||
target-flut-hit-ground
|
||||
target-flut-jump
|
||||
target-flut-kanga-catch
|
||||
(target-flut-jump float float)
|
||||
(target-flut-kanga-catch handle symbol)
|
||||
target-flut-run-wild
|
||||
target-flut-running-attack
|
||||
target-flut-stance
|
||||
(target-flut-start handle symbol int)
|
||||
@ -227,22 +229,22 @@
|
||||
target-mech-carry-drag
|
||||
target-mech-carry-drop
|
||||
target-mech-carry-falling
|
||||
target-mech-carry-hit-ground
|
||||
target-mech-carry-jump
|
||||
(target-mech-carry-hit-ground symbol)
|
||||
(target-mech-carry-jump float float)
|
||||
target-mech-carry-pickup
|
||||
target-mech-carry-stance
|
||||
target-mech-carry-throw
|
||||
target-mech-carry-walk
|
||||
target-mech-clone-anim
|
||||
target-mech-death
|
||||
target-mech-falling
|
||||
(target-mech-clone-anim handle)
|
||||
(target-mech-death symbol)
|
||||
(target-mech-falling symbol)
|
||||
target-mech-get-off
|
||||
target-mech-get-on
|
||||
target-mech-get-up
|
||||
(target-mech-get-on handle)
|
||||
(target-mech-get-up handle)
|
||||
target-mech-grab
|
||||
target-mech-hit
|
||||
target-mech-hit-ground
|
||||
target-mech-jump
|
||||
(target-mech-hit symbol attack-info)
|
||||
(target-mech-hit-ground symbol)
|
||||
(target-mech-jump float float surface)
|
||||
target-mech-punch
|
||||
target-mech-shield
|
||||
target-mech-stance
|
||||
@ -285,7 +287,11 @@
|
||||
target-swim-walk
|
||||
target-title
|
||||
target-tube
|
||||
(target-tube-death symbol)
|
||||
(target-tube-hit symbol attack-info)
|
||||
(target-tube-jump float float)
|
||||
(target-tube-start handle)
|
||||
target-tube-walk
|
||||
target-turn-around
|
||||
target-turret-get-off
|
||||
(target-turret-get-on handle)
|
||||
|
4
test/decompiler/reference/jak3/engine/target/target-ladder_REF.gc
generated
vendored
4
test/decompiler/reference/jak3/engine/target/target-ladder_REF.gc
generated
vendored
@ -639,7 +639,3 @@
|
||||
(go target-jump-forward (-> *TARGET-bank* jump-height-max) (-> *TARGET-bank* jump-height-max) #f)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
test/decompiler/reference/jak3/engine/target/target-launch_REF.gc
generated
vendored
6
test/decompiler/reference/jak3/engine/target/target-launch_REF.gc
generated
vendored
@ -76,7 +76,7 @@
|
||||
(a0-19 (-> self control))
|
||||
)
|
||||
(set! (-> a0-19 status) v1-53)
|
||||
(go target-falling (the-as symbol a0-19))
|
||||
(go target-falling a0-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -145,7 +145,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
1256
test/decompiler/reference/jak3/engine/target/target-tube_REF.gc
generated
vendored
Normal file
1256
test/decompiler/reference/jak3/engine/target/target-tube_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
test/decompiler/reference/jak3/engine/target/target-util_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/target/target-util_REF.gc
generated
vendored
@ -1539,7 +1539,7 @@
|
||||
|
||||
;; definition for function fall-test
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior fall-test target ((arg0 (state symbol target)) (arg1 float))
|
||||
(defbehavior fall-test target ((arg0 (state object target)) (arg1 float))
|
||||
(when (and (not (logtest? (-> self control status) (collide-status on-surface)))
|
||||
(time-elapsed? (-> self control last-time-on-surface) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
|
4
test/decompiler/reference/jak3/engine/target/target_REF.gc
generated
vendored
4
test/decompiler/reference/jak3/engine/target/target_REF.gc
generated
vendored
@ -1863,7 +1863,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-falling (target)
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 symbol))
|
||||
:enter (behavior ((arg0 object))
|
||||
(case arg0
|
||||
(('uppercut)
|
||||
(set! (-> self control mod-surface) *uppercut-jump-mods*)
|
||||
@ -1886,7 +1886,7 @@
|
||||
#t
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 object))
|
||||
(case arg0
|
||||
(('uppercut)
|
||||
(ja-no-eval :num! (seek!))
|
||||
|
@ -2,7 +2,10 @@
|
||||
"dgos": [
|
||||
"CGO/KERNEL.CGO",
|
||||
"CGO/GAME.CGO",
|
||||
"DGO/HALFPIPE.DGO"
|
||||
"DGO/HALFPIPE.DGO",
|
||||
"DGO/PRECC.DGO",
|
||||
"DGO/LMECH.DGO",
|
||||
"DGO/WWD.DGO"
|
||||
],
|
||||
|
||||
"skip_compile_files": [
|
||||
@ -174,8 +177,13 @@
|
||||
// script
|
||||
"command-get-process",
|
||||
// mood
|
||||
"update-mood-direction"
|
||||
"update-mood-direction",
|
||||
// eyes
|
||||
"debug-eyes"
|
||||
],
|
||||
|
||||
"skip_compile_states": {}
|
||||
"skip_compile_states": {
|
||||
"(target-flut-kanga-catch target)": ["post", "code"], // setting pp
|
||||
"(target-flut-death target)": ["code"]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user