mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 10:11:44 -04:00
d/jak2: finish process-drawable, collide-reaction-target, target-anim, almost target-part and gun-part (#2012)
- target-part - ;; ERROR: Failed to convert to atomic ops: Variable could not be constructed from register r0 in `process-drawable-shock-wall-effect` - gun-part - missing sparticle decompiling case it seems related to `L155` This is pretty rough but...im excited to see it working :)
This commit is contained in:
@@ -8427,7 +8427,7 @@
|
||||
((parent cspace :offset-assert 0)
|
||||
(joint joint :offset-assert 4) ;; guessed by decompiler
|
||||
(joint-num int16 :offset-assert 8)
|
||||
(geo basic :offset-assert 12)
|
||||
(geo drawable :offset-assert 12)
|
||||
(bone bone :offset-assert 16)
|
||||
(param0 (function cspace matrix none) :offset-assert 20) ;; guessed by decompiler
|
||||
(param1 basic :offset-assert 24)
|
||||
@@ -8438,8 +8438,8 @@
|
||||
:flag-assert #xa00000020
|
||||
;; field param1 uses ~A with a signed load field param2 uses ~A with a signed load
|
||||
(:methods
|
||||
(new (symbol type basic) _type_ 0)
|
||||
(reset-and-assign-geo! (_type_ basic) _type_ 9)
|
||||
(new (symbol type drawable) _type_ 0)
|
||||
(reset-and-assign-geo! (_type_ drawable) _type_ 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -13369,12 +13369,13 @@
|
||||
;; joint-h ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; +++joint-h:joint-control-command
|
||||
(defenum joint-control-command
|
||||
:type int64
|
||||
(zero 0)
|
||||
(push 1)
|
||||
(blend 2)
|
||||
(four 4)
|
||||
(joint-control-command-4 4)
|
||||
(eight 8)
|
||||
(push1 19)
|
||||
(thirty-two 32)
|
||||
@@ -13382,6 +13383,7 @@
|
||||
(float 42)
|
||||
(stack1 52)
|
||||
)
|
||||
;; ---joint-h:joint-control-command
|
||||
|
||||
(declare-type joint-control basic)
|
||||
(deftype joint-control-channel (structure)
|
||||
@@ -14069,6 +14071,7 @@
|
||||
(gun-turn-fast 28) ;; hi 4096
|
||||
)
|
||||
|
||||
(declare-type control-info basic)
|
||||
(deftype surface (basic)
|
||||
((name symbol)
|
||||
;(data float 30 :score -1)
|
||||
@@ -14106,8 +14109,8 @@
|
||||
|
||||
;; hook
|
||||
(active-hook (function none) :offset 128)
|
||||
(touch-hook (function none))
|
||||
(impact-hook function)
|
||||
(touch-hook (function none) :offset 132)
|
||||
(impact-hook (function control-info (pointer float) vector none) :offset 136)
|
||||
(mult-hook (function surface surface surface int none))
|
||||
(exit-hook function)
|
||||
|
||||
@@ -16337,7 +16340,7 @@
|
||||
(:methods
|
||||
(new (symbol type process-drawable collide-list-enum) _type_ 0)
|
||||
(find-ground (_type_ collide-query collide-spec float float float) symbol 55)
|
||||
(react-to-pat! (_type_ pat-surface) none 56)
|
||||
(react-to-pat! (_type_ pat-surface) int 56)
|
||||
(integrate-no-collide! (_type_ vector) none 57)
|
||||
(integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol 58)
|
||||
(move-above-ground (_type_ vector move-above-ground-params) none 59)
|
||||
@@ -16443,7 +16446,8 @@
|
||||
)
|
||||
|
||||
(deftype lightning-tracker (process)
|
||||
((root trsqv :offset-assert 128)
|
||||
((ppointer-override (pointer lightning-tracker) :offset 28 :score 100)
|
||||
(root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
@@ -16805,6 +16809,8 @@
|
||||
|
||||
;; the last safe ground (got on-surf flag)
|
||||
(last-trans-on-surf vector :inline :offset 4576) ;; logic-target::flag-setup
|
||||
(unknown-vector-kjh1n23k1 vector :inline :offset 4592)
|
||||
(unknown-vector-kj1n231 vector :inline :offset 4608)
|
||||
(unknown-time-frame05 time-frame :offset 4624) ;; board-h::want-to-board?
|
||||
(unknown-float0000 float :offset 4632) ;; target-util::can-duck?
|
||||
(unknown-float17 float :offset 4636) ;; logic-target::target-print-stats
|
||||
@@ -16816,8 +16822,10 @@
|
||||
(unknown-time-frame07 time-frame :offset 4672) ;; logic-target::turn-around?
|
||||
(unknown-pat-surface00 pat-surface :offset 4680) ;; logic-target::target-print-stats
|
||||
(unknown-vector24 vector :inline :offset 4688) ;; logic-target::add-thrust
|
||||
(unknown-vector-kj1hj2b3 vector :inline :offset 4704)
|
||||
(unknown-vector25 vector :inline :offset 4720) ;; logic-target::wall-hide?
|
||||
(unknown-vector001 vector :inline :offset 4736) ;; target2::target-bonk-event-handler
|
||||
(unknown-vector-kij1b231 vector :inline :offset 4752)
|
||||
(unknown-handle00 handle :offset 4768) ;; logic-target::reset-target-state
|
||||
(unknown-pat-surface01 pat-surface :offset 4776) ;; logic-target::target-print-stats
|
||||
(unknown-float22 float :offset 4780) ;; logic-target::target-compute-slopes
|
||||
@@ -16827,8 +16835,18 @@
|
||||
(unknown-float26 float :offset 4796) ;; logic-target::target-compute-slopes
|
||||
(unknown-word000 int32 :offset 4800) ;; (anon-function 16 target-darkjak)
|
||||
(unknown-float002 float :offset 4804) ;; target-gun::target-gun-joint-pre
|
||||
(unknown-float-n12iuh3n1 float :offset 4808)
|
||||
(unknown-float-ki1jhbn23hj float :offset 4812)
|
||||
(unknown-time-frame08 time-frame :offset 4816) ;; logic-target::turn-around?
|
||||
(unknown-float-kj1n23j float :offset 4828)
|
||||
(unknown-float-n234n23 float :offset 4832)
|
||||
(unknown-float-m32j45nhn float :offset 4836)
|
||||
(unknown-float-kj1n23k1 float :offset 4824)
|
||||
(unknown-vector-l1jn23j vector :inline :offset 4848)
|
||||
(unknown-vector-kj1n23k vector :inline :offset 4864)
|
||||
(unknown-vector-kjh1n23kj1n23 vector :inline :offset 4912)
|
||||
(unknown-vector26 vector :inline :offset 4928) ;; logic-target::target-add-slide-factor
|
||||
(unknown-vector-lkjk12nj3n vector :inline :offset 4944)
|
||||
|
||||
;; this is a bit weird
|
||||
;; I believe it's supposed to set the velocity of jak when he first becomes blocked.
|
||||
@@ -16844,6 +16862,7 @@
|
||||
(blocked-in-air-factor float :offset 4996)
|
||||
|
||||
(unknown-time-frame09 time-frame :offset 5000) ;; logic-target::add-thrust
|
||||
(unknown-time-frame-kjh1n23hkjn time-frame :offset 5008)
|
||||
(unknown-sphere-array00 collide-shape-prim-sphere 10 :offset 5016) ;; (method 28 target)
|
||||
(unknown-word02 int32 :offset 5064) ;; (enter target-roll)
|
||||
(unknown-time-frame10 time-frame :offset 5072) ;; (exit target-roll)
|
||||
@@ -18392,7 +18411,7 @@
|
||||
(num-spheres uint32 :offset 116)
|
||||
(solid-only symbol :offset 120)
|
||||
(best-dist float :offset 112 :score 2)
|
||||
(best-other-prim basic :offset 116)
|
||||
(best-other-prim collide-shape-prim :offset 116)
|
||||
(best-my-prim collide-shape-prim :offset 120 :score 1)
|
||||
(move-vec vector :inline :offset 224)
|
||||
(best-u float :offset 112 :score -1)
|
||||
@@ -23461,6 +23480,10 @@
|
||||
(define-extern add-debug-light (function symbol bucket-id light vector string symbol))
|
||||
(define-extern add-debug-lights (function symbol bucket-id (inline-array light) vector symbol))
|
||||
(define-extern drawable-frag-count (function drawable int))
|
||||
|
||||
(define-extern drawable-tri-count (function drawable int)) ;; NOTE - defined in kernel?
|
||||
(define-extern drawable-vertex-ratio (function drawable debug-vertex-stats int)) ;; NOTE - defined in kernel?
|
||||
|
||||
(define-extern history-init (function pos-history int pos-history))
|
||||
(define-extern history-draw-and-update (function pos-history symbol vector symbol))
|
||||
(define-extern dma-timeout-cam (function vector))
|
||||
@@ -27391,8 +27414,8 @@
|
||||
(define-extern vector<-cspace! (function vector cspace vector))
|
||||
(define-extern vector<-matrix! (function vector matrix vector))
|
||||
(define-extern vector<-cspace+vector! (function vector cspace vector vector))
|
||||
;; (define-extern cspace-children function) ;; (function process-drawable int pair)
|
||||
(define-extern cspace-inspect-tree (function process-drawable cspace int int object object))
|
||||
(define-extern cspace-children (function process-drawable int pair)) ;;
|
||||
(define-extern cspace-inspect-tree (function process-drawable cspace int int object process-drawable))
|
||||
(define-extern execute-math-engine (function int))
|
||||
(define-extern draw-joint-axes (function process-drawable none))
|
||||
(define-extern draw-root (function process-drawable none))
|
||||
@@ -27427,7 +27450,7 @@
|
||||
(define-extern process-drawable-delay-player (function time-frame int :behavior process-drawable))
|
||||
(define-extern process-drawable-fuel-cell-handler (function process int symbol event-message-block none :behavior process-drawable))
|
||||
(define-extern process-drawable-birth-fuel-cell (function entity vector symbol none :behavior process-drawable))
|
||||
(define-extern find-offending-process-focusable (function process-tree process-focusable))
|
||||
(define-extern find-offending-process-focusable (function process-tree attack-info process-focusable :behavior process-drawable))
|
||||
(define-extern *valid-con* string)
|
||||
(define-extern process-drawable-valid? (function process-drawable symbol))
|
||||
|
||||
@@ -28275,17 +28298,17 @@
|
||||
;; target-part ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern birth-func-copy-target-y-rot function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern birth-func-ground-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern birth-func-target-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern birth-func-vector-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern birth-func-set-alpha-from-userdata function)
|
||||
;; (define-extern part-tracker-track-target-joint function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern process-drawable-burn-effect (function time-frame none :behavior target)) ;;
|
||||
(define-extern birth-func-copy-target-y-rot (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern birth-func-ground-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern birth-func-target-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern birth-func-vector-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern birth-func-set-alpha-from-userdata (function int sparticle-cpuinfo sparticle-launchinfo float))
|
||||
(define-extern part-tracker-track-target-joint (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern process-drawable-burn-effect (function time-frame rgbaf :behavior target)) ;;
|
||||
(define-extern lightning-probe-callback (function lightning-tracker none))
|
||||
(define-extern process-drawable-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float object)) ;; guess
|
||||
(define-extern process-drawable-shock-wall-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float none))
|
||||
(define-extern process-drawable2-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float none))
|
||||
(define-extern process-drawable2-shock-effect (function process-drawable process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher none))
|
||||
;; (define-extern process-drawable-shock-skel-effect function)
|
||||
(define-extern *lightning-darkjak-pill* lightning-spec)
|
||||
|
||||
@@ -28293,21 +28316,21 @@
|
||||
;; gun-part ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *red-shot-colors* object)
|
||||
;; (define-extern check-shell-level1 function)
|
||||
;; (define-extern check-shell-level2 function)
|
||||
;; (define-extern sparticle-dark-shot-lightning function)
|
||||
(define-extern *red-shot-colors* (pointer rgba))
|
||||
(define-extern check-shell-level1 (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern check-shell-level2 (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-dark-shot-lightning (function sparticle-system sparticle-cpuinfo vector none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; collide-reaction-target ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern poly-find-nearest-edge (function vector (inline-array vector) vector vector vector))
|
||||
;; (define-extern target-collision-low-coverage function) ;; (function control-info collide-shape-intersect vector (pointer uint32) (pointer uint64) (pointer symbol) uint)
|
||||
(define-extern target-collision-reaction (function control-info collide-query vector vector collide-status)) ;; (function control-info collide-shape-intersect vector vector collide-status)
|
||||
(define-extern poly-find-nearest-edge "TODO- Not 100% sure here, but unused" (function nav-poly (inline-array vector) vector vector nav-poly))
|
||||
(define-extern target-collision-low-coverage (function control-info collide-query vector (pointer uint32) (pointer int64) (pointer symbol) none)) ;;
|
||||
(define-extern target-collision-reaction (function control-info collide-query vector vector collide-status :behavior target)) ;; (function control-info collide-shape-intersect vector vector collide-status)
|
||||
(define-extern target-collision-no-reaction (function control-info collide-query vector vector none)) ;; (function control-info collide-shape-intersect vector vector none)
|
||||
(define-extern *collide-edge-board-spec* collide-edge-spec)
|
||||
(define-extern rail-surface-touch (function none))
|
||||
(define-extern rail-surface-touch (function none :behavior target))
|
||||
(define-extern gravel-surface-touch (function none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -28602,14 +28625,14 @@
|
||||
;; target-anim ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern target-land-anim function)
|
||||
(define-extern target-land-anim (function art-element :behavior target))
|
||||
(define-extern target-stance-anim (function none :behavior target))
|
||||
(define-extern target-stance-push (function none :behavior target))
|
||||
(define-extern target-stance-push (function int none :behavior target))
|
||||
(define-extern target-falling-anim (function int time-frame symbol :behavior target))
|
||||
(define-extern target-falling-anim-trans (function none :behavior target))
|
||||
(define-extern target-walk-anim (function int none :behavior target))
|
||||
;; (define-extern target-hit-ground-flop-anim function)
|
||||
(define-extern target-hit-ground-anim (function symbol symbol :behavior target))
|
||||
(define-extern target-hit-ground-flop-anim (function symbol symbol none :behavior target))
|
||||
(define-extern target-hit-ground-anim (function symbol symbol none :behavior target))
|
||||
(define-extern target-attack-air-anim (function none :behavior target))
|
||||
(define-extern target-edge-grab-anim (function none :behavior target))
|
||||
|
||||
@@ -29326,7 +29349,7 @@
|
||||
;; (define-extern set-shadow-by-name function)
|
||||
;; (define-extern get-shadow-by-name function)
|
||||
;; (define-extern teleport-camera-by-name function)
|
||||
(define-extern dma-add-process-drawable function) ;; (function process-drawable draw-control symbol dma-buffer none)
|
||||
(define-extern dma-add-process-drawable (function process-drawable draw-control symbol dma-buffer none))
|
||||
(define-extern *hud-lights* vu-lights)
|
||||
;; (define-extern dma-add-process-drawable-hud function) ;; (function process-drawable draw-control symbol dma-buffer none)
|
||||
(define-extern add-process-drawable (function process-drawable draw-control symbol dma-buffer none))
|
||||
@@ -32513,7 +32536,7 @@
|
||||
(enemy-method-131 (_type_) none 131)
|
||||
(enemy-method-132 (_type_) none 132)
|
||||
(enemy-method-133 (_type_) none 133)
|
||||
(enemy-method-134 (_type_ process symbol) process-focusable 134)
|
||||
(enemy-method-134 (_type_ process attack-info) process-focusable 134)
|
||||
(enemy-method-135 (_type_ int) sound-id 135)
|
||||
(enemy-method-136 (_type_) enemy-flag 136)
|
||||
)
|
||||
|
||||
@@ -418,7 +418,6 @@
|
||||
"target-gun": [
|
||||
[22, "(function surface object object int object :behavior target)"]
|
||||
],
|
||||
"scene": [[4, "(function symbol :behavior scene-player)"]],
|
||||
"enemy": [[37, "(function enemy-jump-info none :behavior enemy)"]],
|
||||
"nav-enemy": [
|
||||
[7, "(function enemy-jump-info none :behavior nav-enemy)"],
|
||||
@@ -455,7 +454,14 @@
|
||||
"crimson-guard-level": [
|
||||
[28, "(function crimson-guard-level collide-shape-moving vector symbol)"]
|
||||
],
|
||||
"merc-death": [
|
||||
[3, "(function none :behavior process-drawable)"]
|
||||
"merc-death": [[3, "(function none :behavior process-drawable)"]],
|
||||
"target-anim": [
|
||||
[3, "(function none :behavior target)"],
|
||||
[4, "(function none :behavior target)"],
|
||||
[7, "(function none :behavior target)"],
|
||||
[8, "(function none :behavior target)"],
|
||||
[13, "(function none :behavior target)"],
|
||||
[14, "(function none :behavior target)"],
|
||||
[15, "(function none :behavior target)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -223,7 +223,8 @@
|
||||
"scene-player-init",
|
||||
"next-continue",
|
||||
"(method 25 warp-gate)",
|
||||
"(code use warp-gate)"
|
||||
"(code use warp-gate)",
|
||||
"cspace-inspect-tree"
|
||||
],
|
||||
|
||||
// If format is used with the wrong number of arguments,
|
||||
@@ -380,13 +381,19 @@
|
||||
"(method 36 collide-shape)": [8, 9],
|
||||
"(method 45 collide-shape)": [33],
|
||||
"(method 40 collide-shape)": [
|
||||
0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],
|
||||
0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
|
||||
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
||||
],
|
||||
"(method 12 collide-shape-prim-group)": [1, 2, 3, 4, 5, 6],
|
||||
"(method 13 collide-shape-prim)": [1, 2, 3, 4, 5, 6],
|
||||
"(method 12 collide-shape-prim-sphere)": [1, 2, 3, 4, 5, 8, 10, 11, 13, 14, 15],
|
||||
"(method 12 collide-shape-prim-mesh)": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16],
|
||||
"(method 12 collide-shape-prim-sphere)": [
|
||||
1, 2, 3, 4, 5, 8, 10, 11, 13, 14, 15
|
||||
],
|
||||
"(method 12 collide-shape-prim-mesh)": [
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16
|
||||
],
|
||||
"(method 24 grid-hash)": [39, 35, 22, 15],
|
||||
"(method 12 flow-control)": [11, 12, 13, 14, 15, 18, 20, 22, 29],
|
||||
"(method 12 flow-control)": [11, 12, 13, 14, 15, 18, 20, 22, 29],
|
||||
"(method 19 process-drawable)": [0, 2, 3, 7, 10, 11, 30],
|
||||
"find-offending-process-focusable": [16, 19]
|
||||
},
|
||||
@@ -485,7 +492,6 @@
|
||||
"(method 36 spatial-hash)",
|
||||
"(method 37 spatial-hash)",
|
||||
"(method 35 spatial-hash)"
|
||||
|
||||
],
|
||||
|
||||
"mips2c_jump_table_functions": {},
|
||||
|
||||
@@ -516,5 +516,8 @@
|
||||
"process-drawable": [
|
||||
["L366", "vector"],
|
||||
["L365", "vector"]
|
||||
]
|
||||
],
|
||||
"gun-part": [["L192", "(pointer rgba)", 36]],
|
||||
"target-part": [["L452", "uint64", true]],
|
||||
"target-anim": [["L423", "uint64", true]]
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@
|
||||
"target-collision-reaction": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"]
|
||||
[48, "matrix"]
|
||||
],
|
||||
"turn-to-vector": [
|
||||
[16, "vector"],
|
||||
@@ -770,7 +770,10 @@
|
||||
[80, "vector"]
|
||||
],
|
||||
"(event target-board-halfpipe)": [[16, "vector"]],
|
||||
"process-drawable-shock-effect": [[16, "matrix"]],
|
||||
"process-drawable-shock-effect": [
|
||||
[16, "matrix"],
|
||||
[80, "collide-query"]
|
||||
],
|
||||
"(code target-board-get-on)": [[16, "event-message-block"]],
|
||||
"(enter target-board-get-on)": [
|
||||
[16, "vector"],
|
||||
@@ -1151,26 +1154,13 @@
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 67 ocean)": [[16, "vector"]],
|
||||
"(method 18 collide-shape-prim-mesh)": [
|
||||
[16, "collide-tri-result"]
|
||||
],
|
||||
"(method 15 collide-shape-prim-sphere)": [
|
||||
[16, "collide-tri-result"]],
|
||||
"target-attack-up": [
|
||||
[16, "event-message-block"]
|
||||
],
|
||||
"(method 37 control-info)": [
|
||||
[48, "vector"]
|
||||
],
|
||||
"(method 45 collide-shape)": [
|
||||
[16, "do-push-aways-work"]
|
||||
],
|
||||
"(method 50 collide-shape)": [
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 44 collide-shape)": [
|
||||
[16, "pull-rider-info"]
|
||||
],
|
||||
"(method 18 collide-shape-prim-mesh)": [[16, "collide-tri-result"]],
|
||||
"(method 15 collide-shape-prim-sphere)": [[16, "collide-tri-result"]],
|
||||
"target-attack-up": [[16, "event-message-block"]],
|
||||
"(method 37 control-info)": [[48, "vector"]],
|
||||
"(method 45 collide-shape)": [[16, "do-push-aways-work"]],
|
||||
"(method 50 collide-shape)": [[32, "vector"]],
|
||||
"(method 44 collide-shape)": [[16, "pull-rider-info"]],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": [],
|
||||
"(method 25 guard-shot)": [[32, "vector"]],
|
||||
@@ -1188,8 +1178,16 @@
|
||||
"spawn-metalhead-projectile": [[16, "projectile-init-by-other-params"]],
|
||||
"(method 24 grid-hash)": [[16, "vector"]],
|
||||
"(method 11 grid-hash)": [
|
||||
[16, "vector"], [32, "vector"]
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 11 flow-control)": [[80, "vector"], [128, "vector"]],
|
||||
"(method 9 joint-control)": [[16, "vector"]]
|
||||
"(method 11 flow-control)": [
|
||||
[80, "vector"],
|
||||
[128, "vector"]
|
||||
],
|
||||
"(method 9 joint-control)": [[16, "vector"]],
|
||||
"check-shell-level1": [[16, "vector"]],
|
||||
"check-shell-level2": [[16, "vector"]],
|
||||
"birth-func-target-orient": [[48, "vector"]],
|
||||
"birth-func-vector-orient": [[32, "vector"]]
|
||||
}
|
||||
|
||||
@@ -4528,9 +4528,7 @@
|
||||
"(method 18 collide-shape-prim-group)": [
|
||||
[[3, 32], "s4", "collide-shape-prim"]
|
||||
],
|
||||
"(method 19 collide-shape-prim)": [
|
||||
[[3, 32], "s4", "collide-shape-prim"]
|
||||
],
|
||||
"(method 19 collide-shape-prim)": [[[3, 32], "s4", "collide-shape-prim"]],
|
||||
"collide-shape-draw-debug-marks": [
|
||||
[24, "v1", "connection"],
|
||||
[[24, 41], "a0", "collide-shape"],
|
||||
@@ -4546,12 +4544,8 @@
|
||||
[68, "a0", "process-focusable"],
|
||||
[153, "a0", "process-focusable"]
|
||||
],
|
||||
"(method 66 collide-shape-moving)": [
|
||||
[[29, 58], "s0", "collide-cache-prim"]
|
||||
],
|
||||
"(method 36 collide-shape)": [
|
||||
[[1, 40], "v1", "collide-shape-prim"]
|
||||
],
|
||||
"(method 66 collide-shape-moving)": [[[29, 58], "s0", "collide-cache-prim"]],
|
||||
"(method 36 collide-shape)": [[[1, 40], "v1", "collide-shape-prim"]],
|
||||
"(method 38 collide-shape)": [
|
||||
[[42, 80], "s5", "collide-shape-prim-mesh"],
|
||||
[34, "v0", "(array collide-mesh)"]
|
||||
@@ -4570,21 +4564,15 @@
|
||||
[80, "a0", "collide-shape-moving"],
|
||||
[156, "s4", "(pointer uint64)"]
|
||||
],
|
||||
"(method 12 collide-shape-prim-group)":[
|
||||
[[12, 43], "s4", "collide-shape-prim"]
|
||||
],
|
||||
"(method 13 collide-shape-prim)":[
|
||||
"(method 12 collide-shape-prim-group)": [
|
||||
[[12, 43], "s4", "collide-shape-prim"]
|
||||
],
|
||||
"(method 13 collide-shape-prim)": [[[12, 43], "s4", "collide-shape-prim"]],
|
||||
"(method 12 collide-shape-prim-sphere)": [
|
||||
[17, "gp", "collide-shape-prim-mesh"]
|
||||
],
|
||||
"(method 50 collide-shape)": [
|
||||
[[30, 100], "gp", "process-focusable"]
|
||||
],
|
||||
"cshape-reaction-update-state": [
|
||||
["_stack_", 56, "collide-status"]
|
||||
],
|
||||
"(method 50 collide-shape)": [[[30, 100], "gp", "process-focusable"]],
|
||||
"cshape-reaction-update-state": [["_stack_", 56, "collide-status"]],
|
||||
"(method 17 collide-shape-prim-mesh)": [
|
||||
[[6, 11], "s2", "collide-shape-prim-group"]
|
||||
],
|
||||
@@ -4594,9 +4582,7 @@
|
||||
[76, "a0", "connection"],
|
||||
[77, "a0", "collide-shape"]
|
||||
],
|
||||
"(method 44 collide-shape)": [
|
||||
[25, "a0", "process-drawable"]
|
||||
],
|
||||
"(method 44 collide-shape)": [[25, "a0", "process-drawable"]],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": [],
|
||||
"(method 38 guard-lazer-shot)": [[[33, 37], "a0", "process-focusable"]],
|
||||
@@ -4673,9 +4659,7 @@
|
||||
[366, "v1", "art-joint-anim"],
|
||||
[463, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(method 10 grid-hash)": [
|
||||
[12, "a0", "(pointer uint128)"]
|
||||
],
|
||||
"(method 10 grid-hash)": [[12, "a0", "(pointer uint128)"]],
|
||||
"(method 24 grid-hash)": [
|
||||
[78, "v1", "(pointer uint128)"],
|
||||
[191, "t0", "(pointer int8)"],
|
||||
@@ -4688,9 +4672,7 @@
|
||||
[149, "t4", "pointer"],
|
||||
[152, "t1", "pointer"]
|
||||
],
|
||||
"(method 27 sphere-hash)": [
|
||||
[44, "s2", "(pointer int8)"]
|
||||
],
|
||||
"(method 27 sphere-hash)": [[44, "s2", "(pointer int8)"]],
|
||||
"(method 9 actor-hash-buckets)": [
|
||||
[19, "v1", "connection"],
|
||||
[[16, 160], "s4", "collide-shape"],
|
||||
@@ -4703,33 +4685,15 @@
|
||||
[71, "a0", "connection"],
|
||||
[72, "a0", "collide-shape"]
|
||||
],
|
||||
"(method 10 flow-control)": [
|
||||
["_stack_", 32, "flow-section"]
|
||||
],
|
||||
"(method 9 lod-set)": [
|
||||
["_stack_", 16, "res-tag"]
|
||||
],
|
||||
"execute-math-engine": [
|
||||
[[15, 28], "v1", "process-drawable"]
|
||||
],
|
||||
"(method 14 draw-control)": [
|
||||
[13, "v1", "process-drawable"]
|
||||
],
|
||||
"(method 17 process-drawable)": [
|
||||
[7, "v1", "collide-shape"]
|
||||
],
|
||||
"(method 10 process-drawable)": [
|
||||
[32, "a0", "collide-shape"]
|
||||
],
|
||||
"(code process-drawable-art-error)": [
|
||||
[[18, 50], "v1", "collide-shape"]
|
||||
],
|
||||
"(method 18 process-drawable)": [
|
||||
[1, "v1", "pointer"]
|
||||
],
|
||||
"skeleton-group->draw-control": [
|
||||
[[239, 249], "v1", "process-drawable"]
|
||||
],
|
||||
"(method 10 flow-control)": [["_stack_", 32, "flow-section"]],
|
||||
"(method 9 lod-set)": [["_stack_", 16, "res-tag"]],
|
||||
"execute-math-engine": [[[15, 28], "v1", "process-drawable"]],
|
||||
"(method 14 draw-control)": [[13, "v1", "process-drawable"]],
|
||||
"(method 17 process-drawable)": [[7, "v1", "collide-shape"]],
|
||||
"(method 10 process-drawable)": [[32, "a0", "collide-shape"]],
|
||||
"(code process-drawable-art-error)": [[[18, 50], "v1", "collide-shape"]],
|
||||
"(method 18 process-drawable)": [[1, "v1", "pointer"]],
|
||||
"skeleton-group->draw-control": [[[239, 249], "v1", "process-drawable"]],
|
||||
"(method 14 process-drawable)": [
|
||||
[[124, 129], "s5", "collide-shape"],
|
||||
[111, "v1", "vector"]
|
||||
@@ -4744,9 +4708,7 @@
|
||||
[7, "a1", "int"],
|
||||
[[11, 35], "v1", "joint-control-channel"]
|
||||
],
|
||||
"ja-blend-eval": [
|
||||
[[3, 26], "s5", "joint-control-channel"]
|
||||
],
|
||||
"ja-blend-eval": [[[3, 26], "s5", "joint-control-channel"]],
|
||||
"(method 9 joint-control)": [
|
||||
[[12, 68], "s3", "joint-control-channel"],
|
||||
[[13, 70], "s5", "(pointer float)"]
|
||||
@@ -4755,22 +4717,96 @@
|
||||
[5, "a0", "process-drawable"],
|
||||
[162, "s2", "art-joint-anim"]
|
||||
],
|
||||
"transform-and-sleep": [
|
||||
[[9, 13], "a0", "collide-shape"]
|
||||
"transform-and-sleep": [[[9, 13], "a0", "collide-shape"]],
|
||||
"transform-and-sleep-code": [[[9, 13], "a0", "collide-shape"]],
|
||||
"transform-post": [[[2, 6], "a0", "collide-shape"]],
|
||||
"rider-trans": [[[0, 4], "a0", "collide-shape"]],
|
||||
"rider-post": [[[3, 17], "gp", "collide-shape"]],
|
||||
"pusher-post": [[[2, 14], "gp", "collide-shape"]],
|
||||
"birth-func-vector-orient": [[[7, 23], "s3", "sprite-vec-data-2d"]],
|
||||
"process-drawable-burn-effect": [
|
||||
[28, "a0", "process-drawable"],
|
||||
[108, "v1", "process-drawable"],
|
||||
[49, "a0", "process-drawable"],
|
||||
[64, "a0", "process-drawable"]
|
||||
],
|
||||
"transform-and-sleep-code": [
|
||||
[[9, 13], "a0", "collide-shape"]
|
||||
"process-drawable2-shock-effect": [[59, "v0", "lightning-tracker"]],
|
||||
"process-drawable-shock-effect": [[156, "v0", "lightning-tracker"]],
|
||||
"(method 12 top-anim-joint-control)": [
|
||||
[8, "a1", "art-joint-anim"],
|
||||
[40, "a1", "art-joint-anim"]
|
||||
],
|
||||
"transform-post": [
|
||||
[[2, 6], "a0", "collide-shape"]
|
||||
"(method 13 draw-control)": [[44, "a0", "process-drawable"]],
|
||||
"target-collision-reaction": [
|
||||
[349, "v1", "collide-shape-prim"],
|
||||
[400, "a0", "process-focusable"],
|
||||
[573, "a0", "process-focusable"],
|
||||
[579, "a0", "process-focusable"]
|
||||
],
|
||||
"rider-trans": [
|
||||
[[0, 4], "a0", "collide-shape"]
|
||||
"cspace-inspect-tree": [[[27, 89], "s2", "cspace"]],
|
||||
"poly-find-nearest-edge": [
|
||||
[8, "f0", "float"],
|
||||
[12, "f0", "float"]
|
||||
],
|
||||
"rider-post": [
|
||||
[[3, 17], "gp", "collide-shape"]
|
||||
"(anon-function 15 target-anim)": [
|
||||
[103, "gp", "art-joint-anim"],
|
||||
[161, "gp", "art-joint-anim"],
|
||||
[161, "v1", "art-joint-anim"],
|
||||
[213, "v1", "art-joint-anim"]
|
||||
],
|
||||
"pusher-post": [
|
||||
[[2, 14], "gp", "collide-shape"]
|
||||
"(anon-function 14 target-anim)": [
|
||||
[52, "a1", "art-joint-anim"],
|
||||
[186, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(anon-function 13 target-anim)": [[127, "a1", "art-joint-anim"]],
|
||||
"target-stance-anim": [
|
||||
[98, "v1", "art-joint-anim"],
|
||||
[164, "v1", "art-joint-anim"],
|
||||
[261, "v1", "art-joint-anim"],
|
||||
[385, "a1", "art-joint-anim"],
|
||||
[475, "a1", "art-joint-anim"],
|
||||
[635, "v1", "art-joint-anim"],
|
||||
[772, "v1", "art-joint-anim"],
|
||||
[1047, "v1", "art-joint-anim"]
|
||||
],
|
||||
"target-stance-push": [
|
||||
[73, "v1", "art-joint-anim"],
|
||||
[125, "v1", "art-joint-anim"]
|
||||
],
|
||||
"target-falling-anim": [[61, "v1", "art-joint-anim"]],
|
||||
"(anon-function 8 target-anim)": [
|
||||
[79, "v1", "art-joint-anim"],
|
||||
[174, "v1", "art-joint-anim"]
|
||||
],
|
||||
"target-hit-ground-flop-anim": [[39, "v1", "art-joint-anim"]],
|
||||
"(anon-function 4 target-anim)": [
|
||||
[101, "v1", "art-joint-anim"],
|
||||
[168, "v1", "art-joint-anim"],
|
||||
[235, "v1", "art-joint-anim"],
|
||||
[292, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(anon-function 3 target-anim)": [
|
||||
[102, "v1", "art-joint-anim"],
|
||||
[162, "v1", "art-joint-anim"],
|
||||
[231, "v1", "art-joint-anim"],
|
||||
[289, "v1", "art-joint-anim"]
|
||||
],
|
||||
"target-hit-ground-anim": [
|
||||
[132, "a1", "art-joint-anim"],
|
||||
[284, "v1", "art-joint-anim"],
|
||||
[336, "v1", "art-joint-anim"],
|
||||
[472, "v1", "art-joint-anim"],
|
||||
[532, "v1", "art-joint-anim"],
|
||||
[687, "v1", "art-joint-anim"],
|
||||
[848, "v1", "art-joint-anim"],
|
||||
[947, "v1", "art-joint-anim"]
|
||||
],
|
||||
"target-attack-air-anim": [
|
||||
[80, "v1", "art-joint-anim"],
|
||||
[248, "v1", "art-joint-anim"]
|
||||
],
|
||||
"target-edge-grab-anim": [
|
||||
[54, "v1", "art-joint-anim"],
|
||||
[111, "v1", "art-joint-anim"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2162,7 +2162,7 @@
|
||||
}
|
||||
},
|
||||
"(method 54 collide-shape)": {
|
||||
"vars": {"v1-3":"proc"}
|
||||
"vars": { "v1-3": "proc" }
|
||||
},
|
||||
"(method 42 collide-shape)": {
|
||||
"args": ["obj", "other", "cquery"]
|
||||
@@ -2180,11 +2180,11 @@
|
||||
"args": ["obj", "other", "cquery"]
|
||||
},
|
||||
"(method 64 collide-shape-moving)": {
|
||||
"args":["obj", "vel", "check-dist", "amt", "bounce-dist"],
|
||||
"args": ["obj", "vel", "check-dist", "amt", "bounce-dist"],
|
||||
"vars": {
|
||||
"gp-0":"initial-trans",
|
||||
"s2-0":"collide-vel",
|
||||
"s1-1":"vel-dir"
|
||||
"gp-0": "initial-trans",
|
||||
"s2-0": "collide-vel",
|
||||
"s1-1": "vel-dir"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
(enemy-method-131 (_type_) none 131)
|
||||
(enemy-method-132 (_type_) none 132)
|
||||
(enemy-method-133 (_type_) none 133)
|
||||
(enemy-method-134 (_type_ process symbol) process-focusable 134)
|
||||
(enemy-method-134 (_type_ process attack-info) process-focusable 134)
|
||||
(enemy-method-135 (_type_ int) sound-id 135)
|
||||
(enemy-method-136 (_type_) enemy-flag 136)
|
||||
)
|
||||
|
||||
@@ -5,20 +5,6 @@
|
||||
;; name in dgo: joint-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(defenum joint-control-command
|
||||
:type int64
|
||||
(zero 0)
|
||||
(push 1)
|
||||
(blend 2)
|
||||
(four 4)
|
||||
(eight 8)
|
||||
(push1 19)
|
||||
(thirty-two 32)
|
||||
(stack 36)
|
||||
(float 42)
|
||||
(stack1 52)
|
||||
)
|
||||
|
||||
(declare-type joint-control basic)
|
||||
|
||||
(defenum joint-control-status
|
||||
@@ -35,6 +21,23 @@
|
||||
(eye-anim-valid 7) ;; 128
|
||||
(eye-anim 8) ;; 256
|
||||
)
|
||||
;; +++joint-control-command
|
||||
(defenum joint-control-command
|
||||
:type int64
|
||||
(zero 0)
|
||||
(push 1)
|
||||
(blend 2)
|
||||
(joint-control-command-4 4)
|
||||
(eight 8)
|
||||
(push1 19)
|
||||
(thirty-two 32)
|
||||
(stack 36)
|
||||
(float 42)
|
||||
(stack1 52)
|
||||
)
|
||||
;; ---joint-control-command
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype joint-control-channel (structure)
|
||||
|
||||
@@ -1089,17 +1089,17 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod reset-and-assign-geo! cspace ((obj cspace) (arg0 basic))
|
||||
(defmethod reset-and-assign-geo! cspace ((obj cspace) (arg0 drawable))
|
||||
(set! (-> obj parent) #f)
|
||||
(set! (-> obj joint) #f)
|
||||
(set! (-> obj geo) arg0)
|
||||
(set! (-> obj geo) (the-as drawable arg0))
|
||||
(set! (-> obj param0) #f)
|
||||
(set! (-> obj param1) #f)
|
||||
(set! (-> obj param2) #f)
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod new cspace ((allocation symbol) (type-to-make type) (arg0 basic))
|
||||
(defmethod new cspace ((allocation symbol) (type-to-make type) (arg0 drawable))
|
||||
(let ((t9-0 (method-of-type structure new))
|
||||
(v1-1 type-to-make)
|
||||
)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
((parent cspace :offset-assert 0)
|
||||
(joint joint :offset-assert 4)
|
||||
(joint-num int16 :offset-assert 8)
|
||||
(geo basic :offset-assert 12)
|
||||
(geo drawable :offset-assert 12)
|
||||
(bone bone :offset-assert 16)
|
||||
(param0 (function cspace matrix none) :offset-assert 20)
|
||||
(param1 basic :offset-assert 24)
|
||||
@@ -73,8 +73,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xa00000020
|
||||
(:methods
|
||||
(new (symbol type basic) _type_ 0)
|
||||
(reset-and-assign-geo! (_type_ basic) _type_ 9)
|
||||
(new (symbol type drawable) _type_ 0)
|
||||
(reset-and-assign-geo! (_type_ drawable) _type_ 9)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
(num-spheres uint32 :offset 116)
|
||||
(solid-only symbol :offset 120)
|
||||
(best-dist float :offset 112)
|
||||
(best-other-prim basic :offset 116)
|
||||
(best-other-prim collide-shape-prim :offset 116)
|
||||
(best-my-prim collide-shape-prim :offset 120)
|
||||
(move-vec vector :inline :offset 224)
|
||||
(best-u float :offset 112)
|
||||
|
||||
@@ -282,19 +282,20 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-rider (structure)
|
||||
((rider-handle handle :offset-assert 0)
|
||||
(sticky-prim collide-shape-prim :offset-assert 8)
|
||||
(prim-ry float :offset-assert 12)
|
||||
(rider-local-pos vector :inline :offset-assert 16)
|
||||
((rider-handle handle :offset-assert 0)
|
||||
(sticky-prim collide-shape-prim :offset-assert 8)
|
||||
(prim-ry float :offset-assert 12)
|
||||
(rider-local-pos vector :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-rider-pool (basic)
|
||||
((alloc-count int32 :offset-assert 4)
|
||||
(riders collide-rider 20 :inline :offset-assert 16)
|
||||
((alloc-count int32 :offset-assert 4)
|
||||
(riders collide-rider 20 :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x290
|
||||
@@ -461,23 +462,23 @@
|
||||
|
||||
|
||||
(deftype collide-shape (trsqv)
|
||||
((actor-hash-index int16 :offset 12)
|
||||
(process process-drawable :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags nav-flags :offset-assert 145)
|
||||
(total-prims uint8 :offset-assert 146)
|
||||
(num-riders uint8 :offset-assert 147)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self symbol :offset-assert 152)
|
||||
(event-other symbol :offset-assert 156)
|
||||
(root-prim collide-shape-prim :offset-assert 160)
|
||||
((actor-hash-index int16 :offset 12)
|
||||
(process process-drawable :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags nav-flags :offset-assert 145)
|
||||
(total-prims uint8 :offset-assert 146)
|
||||
(num-riders uint8 :offset-assert 147)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self symbol :offset-assert 152)
|
||||
(event-other symbol :offset-assert 156)
|
||||
(root-prim collide-shape-prim :offset-assert 160)
|
||||
(riders (inline-array collide-rider) :offset-assert 164)
|
||||
(penetrate-using penetrate :offset-assert 168)
|
||||
(penetrated-by penetrate :offset-assert 176)
|
||||
(backup-collide-as collide-spec :offset-assert 184)
|
||||
(backup-collide-with collide-spec :offset-assert 188)
|
||||
(event-priority uint8 :offset-assert 192)
|
||||
(rider-max-momentum float :offset-assert 196)
|
||||
(penetrate-using penetrate :offset-assert 168)
|
||||
(penetrated-by penetrate :offset-assert 176)
|
||||
(backup-collide-as collide-spec :offset-assert 184)
|
||||
(backup-collide-with collide-spec :offset-assert 188)
|
||||
(event-priority uint8 :offset-assert 192)
|
||||
(rider-max-momentum float :offset-assert 196)
|
||||
)
|
||||
:method-count-assert 55
|
||||
:size-assert #xc8
|
||||
@@ -551,7 +552,7 @@
|
||||
(:methods
|
||||
(new (symbol type process-drawable collide-list-enum) _type_ 0)
|
||||
(find-ground (_type_ collide-query collide-spec float float float) symbol 55)
|
||||
(react-to-pat! (_type_ pat-surface) none 56)
|
||||
(react-to-pat! (_type_ pat-surface) int 56)
|
||||
(integrate-no-collide! (_type_ vector) none 57)
|
||||
(integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol 58)
|
||||
(move-above-ground (_type_ vector move-above-ground-params) none 59)
|
||||
@@ -628,7 +629,7 @@
|
||||
(set! (-> s5-0 nav-flags) (nav-flags nav-flags0))
|
||||
(set! (-> s5-0 event-self) #f)
|
||||
(set! (-> s5-0 event-other) #f)
|
||||
(set! (-> s5-0 riders) #f)
|
||||
(set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f))
|
||||
(set! (-> s5-0 root-prim) #f)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
|
||||
@@ -975,8 +975,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
(unknown-time-frame-array00 time-frame 128 :offset 2688)
|
||||
(unknown-word00 int32 :offset 3712)
|
||||
(draw-offset vector :inline :offset 3728)
|
||||
(cspace-offset vector :inline :offset 3744)
|
||||
(cspace-offset vector :inline :offset 3744)
|
||||
(anim-collide-offset-local vector :inline :offset 3760)
|
||||
(anim-collide-offset-world vector :inline :offset 3776)
|
||||
(old-anim-collide-offset-world vector :inline :offset 3792)
|
||||
@@ -77,6 +77,8 @@
|
||||
(unknown-float16 float :offset 4548)
|
||||
(unknown-vector22 vector :inline :offset 4560)
|
||||
(last-trans-on-surf vector :inline :offset 4576)
|
||||
(unknown-vector-kjh1n23k1 vector :inline :offset 4592)
|
||||
(unknown-vector-kj1n231 vector :inline :offset 4608)
|
||||
(unknown-time-frame05 time-frame :offset 4624)
|
||||
(unknown-float0000 float :offset 4632)
|
||||
(unknown-float17 float :offset 4636)
|
||||
@@ -88,8 +90,10 @@
|
||||
(unknown-time-frame07 time-frame :offset 4672)
|
||||
(unknown-pat-surface00 pat-surface :offset 4680)
|
||||
(unknown-vector24 vector :inline :offset 4688)
|
||||
(unknown-vector-kj1hj2b3 vector :inline :offset 4704)
|
||||
(unknown-vector25 vector :inline :offset 4720)
|
||||
(unknown-vector001 vector :inline :offset 4736)
|
||||
(unknown-vector-kij1b231 vector :inline :offset 4752)
|
||||
(unknown-handle00 handle :offset 4768)
|
||||
(unknown-pat-surface01 pat-surface :offset 4776)
|
||||
(unknown-float22 float :offset 4780)
|
||||
@@ -99,12 +103,23 @@
|
||||
(unknown-float26 float :offset 4796)
|
||||
(unknown-word000 int32 :offset 4800)
|
||||
(unknown-float002 float :offset 4804)
|
||||
(unknown-float-n12iuh3n1 float :offset 4808)
|
||||
(unknown-float-ki1jhbn23hj float :offset 4812)
|
||||
(unknown-time-frame08 time-frame :offset 4816)
|
||||
(unknown-float-kj1n23j float :offset 4828)
|
||||
(unknown-float-n234n23 float :offset 4832)
|
||||
(unknown-float-m32j45nhn float :offset 4836)
|
||||
(unknown-float-kj1n23k1 float :offset 4824)
|
||||
(unknown-vector-l1jn23j vector :inline :offset 4848)
|
||||
(unknown-vector-kj1n23k vector :inline :offset 4864)
|
||||
(unknown-vector-kjh1n23kj1n23 vector :inline :offset 4912)
|
||||
(unknown-vector26 vector :inline :offset 4928)
|
||||
(unknown-vector-lkjk12nj3n vector :inline :offset 4944)
|
||||
(btransv vector :inline :offset 4976)
|
||||
(blocked-factor float :offset 4992)
|
||||
(blocked-in-air-factor float :offset 4996)
|
||||
(unknown-time-frame09 time-frame :offset 5000)
|
||||
(unknown-time-frame-kjh1n23hkjn time-frame :offset 5008)
|
||||
(unknown-sphere-array00 collide-shape-prim-sphere 10 :offset 5016)
|
||||
(unknown-word02 int32 :offset 5064)
|
||||
(unknown-time-frame10 time-frame :offset 5072)
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
|
||||
(define-extern birth-pickup-at-point (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process))
|
||||
|
||||
;; NOTE - for process-drawable
|
||||
(define-extern process-grab? (function process symbol symbol :behavior process))
|
||||
(define-extern process-release? (function process symbol :behavior process))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype manipy (process-drawable)
|
||||
@@ -107,22 +111,23 @@
|
||||
|
||||
|
||||
(deftype lightning-tracker (process)
|
||||
((root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
(start-time time-frame :offset-assert 152)
|
||||
(offset0 vector :inline :offset-assert 160)
|
||||
(offset1 vector :inline :offset-assert 176)
|
||||
(target0 uint64 :offset-assert 192)
|
||||
(target1 uint64 :offset-assert 200)
|
||||
(target-joint0 int32 :offset-assert 208)
|
||||
(target-joint1 int32 :offset-assert 212)
|
||||
(sound uint32 :offset-assert 216)
|
||||
(userdata uint64 :offset-assert 224)
|
||||
(user-time time-frame 2 :offset-assert 232)
|
||||
(user-vector vector :inline :offset-assert 256)
|
||||
(user-handle handle 2 :offset 288)
|
||||
((ppointer-override (pointer lightning-tracker) :offset 28)
|
||||
(root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
(start-time time-frame :offset-assert 152)
|
||||
(offset0 vector :inline :offset-assert 160)
|
||||
(offset1 vector :inline :offset-assert 176)
|
||||
(target0 uint64 :offset-assert 192)
|
||||
(target1 uint64 :offset-assert 200)
|
||||
(target-joint0 int32 :offset-assert 208)
|
||||
(target-joint1 int32 :offset-assert 212)
|
||||
(sound uint32 :offset-assert 216)
|
||||
(userdata uint64 :offset-assert 224)
|
||||
(user-time time-frame 2 :offset-assert 232)
|
||||
(user-vector vector :inline :offset-assert 256)
|
||||
(user-handle handle 2 :offset 288)
|
||||
)
|
||||
:heap-base #xb0
|
||||
:method-count-assert 17
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
(define-extern vis-cull (function int symbol))
|
||||
(define-extern sphere-cull (function vector symbol))
|
||||
|
||||
(define-extern drawable-tri-count (function drawable int)) ;; NOTE - defined in kernel?
|
||||
(declare-type debug-vertex-stats basic)
|
||||
(define-extern drawable-vertex-ratio (function drawable debug-vertex-stats int)) ;; NOTE - defined in kernel?
|
||||
|
||||
(declare-type draw-control basic)
|
||||
(define-extern add-process-drawable (function process-drawable draw-control symbol dma-buffer none))
|
||||
(define-extern dma-add-process-drawable (function process-drawable draw-control symbol dma-buffer none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable (basic)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: foreground-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern *foreground-draw-engine* engine)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype mercneric-chain (structure)
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
;; NOTE - for default-menu
|
||||
(define-extern merc-stats (function none))
|
||||
|
||||
;; NOTE - for process-drawable
|
||||
(define-extern merc-blend-shape (function process-drawable object))
|
||||
(define-extern merc-eye-anim (function process-drawable none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype ripple-merc-query (inline-array-class)
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
|
||||
(define-extern ja-post (function none :behavior process-drawable))
|
||||
|
||||
(declare-type debug-vertex-stats basic)
|
||||
(define-extern *debug-vertex-stats* debug-vertex-stats)
|
||||
|
||||
;; TODO - this shouldn't really be needed...but recursive call fails otherwise
|
||||
(define-extern cspace-inspect-tree (function process-drawable cspace int int object process-drawable))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun cspace-by-name-no-fail ((arg0 process-drawable) (arg1 string))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,614 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun poly-find-nearest-edge ((arg0 nav-poly) (arg1 (inline-array vector)) (arg2 vector) (arg3 vector))
|
||||
"TODO- Not 100% sure here, but unused"
|
||||
(local-vars (sv-32 vector) (sv-36 float) (sv-40 int) (sv-48 float) (sv-80 vector))
|
||||
(set! sv-32 (new 'stack-no-clear 'vector))
|
||||
(set! sv-36 (the-as float 4095996000.0))
|
||||
(set! sv-40 -1)
|
||||
(set! sv-48 (the-as float 0.0))
|
||||
(dotimes (s2-0 3)
|
||||
(let ((s0-0 (-> arg1 s2-0)))
|
||||
(set! sv-80 (-> arg1 (mod (+ s2-0 1) 3)))
|
||||
(let ((f30-0 (vector-line-distance-point! arg2 s0-0 sv-80 sv-32))
|
||||
(s1-1 (vector-! (new 'stack-no-clear 'vector) sv-80 s0-0))
|
||||
)
|
||||
0.0
|
||||
(vector-normalize! s1-1 1.0)
|
||||
(let ((f0-5 (fabs (vector-dot arg3 s1-1))))
|
||||
(when (or (< f30-0 sv-36) (and (= f30-0 sv-36) (< sv-48 f0-5)))
|
||||
(set! sv-36 f30-0)
|
||||
(set! sv-40 s2-0)
|
||||
(set! sv-48 f0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 vertex 0 quad) (-> arg1 sv-40 quad))
|
||||
(set! (-> arg0 vertex1 quad) (-> arg1 (mod (+ sv-40 1) 3) quad))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun target-collision-low-coverage ((arg0 control-info)
|
||||
(arg1 collide-query)
|
||||
(arg2 vector)
|
||||
(arg3 (pointer uint32))
|
||||
(arg4 (pointer int64))
|
||||
(arg5 (pointer symbol))
|
||||
)
|
||||
(local-vars
|
||||
(sv-16 vector)
|
||||
(sv-20 (pointer uint32))
|
||||
(sv-24 (pointer int64))
|
||||
(sv-28 (pointer symbol))
|
||||
(sv-32 uint)
|
||||
(sv-40 int)
|
||||
(sv-48 symbol)
|
||||
(sv-52 vector)
|
||||
(sv-56 vector)
|
||||
)
|
||||
(with-pp
|
||||
(set! sv-16 arg2)
|
||||
(set! sv-20 arg3)
|
||||
(set! sv-24 arg4)
|
||||
(set! sv-28 arg5)
|
||||
(set! sv-32 (-> arg3 0))
|
||||
(set! sv-40 (-> arg4 0))
|
||||
(set! sv-48 (-> arg5 0))
|
||||
(set! sv-52 (-> arg0 unknown-vector26))
|
||||
(set! sv-56 (vector-cross! (-> arg0 unknown-vector-kjh1n23kj1n23) (-> arg0 poly-normal) sv-16))
|
||||
(vector-normalize! sv-56 1.0)
|
||||
(if (>= (fabs (vector-dot (-> arg0 dynam gravity-normal) sv-56)) 0.866)
|
||||
(set! sv-32 (logior sv-32 512))
|
||||
)
|
||||
(vector-cross! sv-52 sv-16 sv-56)
|
||||
(if (< 0.0 (vector-dot (-> arg0 dynam gravity-normal) sv-52))
|
||||
(vector-negate! sv-52 sv-52)
|
||||
)
|
||||
(vector-normalize! sv-52 1.0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'collide-query)))
|
||||
(let ((s3-0 (vector-flatten! (-> arg0 unknown-vector-lkjk12nj3n) sv-52 (-> arg0 dynam gravity-normal))))
|
||||
(let ((v1-19 s4-0))
|
||||
(set! (-> v1-19 radius) 409.6)
|
||||
(set! (-> v1-19 collide-with) (-> arg1 best-my-prim prim-core collide-with))
|
||||
(set! (-> v1-19 ignore-process0) #f)
|
||||
(set! (-> v1-19 ignore-process1) #f)
|
||||
(set! (-> v1-19 ignore-pat) (-> arg0 pat-ignore-mask))
|
||||
(set! (-> v1-19 action-mask) (collide-action solid))
|
||||
)
|
||||
(vector-normalize! s3-0 1.0)
|
||||
(if (< (vector-dot s3-0 sv-16) 0.0)
|
||||
(vector-negate! s3-0 s3-0)
|
||||
)
|
||||
(set! (-> arg0 unknown-float-kj1n23k1) 4095996000.0)
|
||||
(set! (-> arg0 unknown-float-n234n23) 4095996000.0)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> arg1 best-other-tri intersect) s3-0 2867.2)
|
||||
(vector-normalize-copy! (-> s4-0 move-dist) (-> arg0 dynam gravity-normal) -20480.0)
|
||||
(vector+float*! (-> s4-0 move-dist) (-> s4-0 move-dist) s3-0 4096.0)
|
||||
(when (>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
|
||||
(set! (-> arg0 unknown-float-kj1n23k1)
|
||||
(vector-dot
|
||||
(-> arg0 dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-other-tri intersect) (-> s4-0 best-other-tri intersect))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 unknown-float-kj1n23j) (the-as float (-> s4-0 best-other-tri pat)))
|
||||
(set! (-> arg0 unknown-vector-l1jn23j quad) (-> s4-0 best-other-tri normal quad))
|
||||
0
|
||||
)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> arg1 best-other-tri intersect) (-> arg0 dynam gravity-normal) 819.2)
|
||||
(vector-normalize-copy! (-> s4-0 move-dist) (-> arg0 dynam gravity-normal) -20480.0)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) s3-0 -819.2)
|
||||
(vector+float*! (-> s4-0 move-dist) (-> s4-0 move-dist) s3-0 -4096.0)
|
||||
)
|
||||
(when (>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
|
||||
(set! (-> arg0 unknown-float-n234n23)
|
||||
(vector-vector-distance (-> s4-0 start-pos) (-> s4-0 best-other-tri intersect))
|
||||
)
|
||||
(set! (-> arg0 unknown-float-m32j45nhn) (the-as float (-> s4-0 best-other-tri pat)))
|
||||
(set! (-> arg0 unknown-vector-kj1n23k quad) (-> s4-0 best-other-tri normal quad))
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (and (not (logtest? sv-32 512))
|
||||
(and (or (< (* 1.25 (-> arg1 best-my-prim local-sphere w)) (-> arg0 unknown-float-kj1n23k1))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-kj1n23j)) 54) 61) 1)
|
||||
)
|
||||
(and (< (-> arg0 unknown-float-n234n23) (* 2.0 (-> arg1 best-my-prim local-sphere w)))
|
||||
(or (zero? (shr (shl (the-as int (-> arg0 unknown-float-m32j45nhn)) 54) 61))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-m32j45nhn)) 54) 61) 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-32 (logior sv-32 128))
|
||||
(set! (-> arg0 unknown-time-frame-kjh1n23hkjn) (-> pp clock frame-counter))
|
||||
(set! sv-40 (logior sv-40 128))
|
||||
(set! (-> arg0 unknown-time-frame08) (-> pp clock frame-counter))
|
||||
(let ((f30-0 (vector-dot sv-52 (-> arg0 unknown-vector10)))
|
||||
(f0-27 (if (logtest? sv-32 2)
|
||||
(cos (- 16384.0 (acos (-> arg0 coverage))))
|
||||
(-> arg0 coverage)
|
||||
)
|
||||
)
|
||||
(f1-11 (vector-dot
|
||||
(-> arg0 dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg0 trans) (-> arg1 best-other-tri intersect))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (or (not (logtest? sv-32 32)) (< 0.5 f0-27))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
)
|
||||
(when (and (or (and (< f0-27 0.95) (>= f30-0 0.0))
|
||||
(and (logtest? sv-32 32) (< f0-27 0.3))
|
||||
(< f1-11 (* -0.25 (-> arg1 best-my-prim local-sphere w)))
|
||||
)
|
||||
(>= (vector-dot sv-52 sv-16) -0.000001)
|
||||
)
|
||||
(set! (-> arg0 surf) *edge-surface*)
|
||||
(set! sv-32 (logior sv-32 1024))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
(when (logtest? sv-32 32)
|
||||
(set! sv-48 #t)
|
||||
(set! sv-32 (logior sv-32 4096))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< (-> arg0 surface-angle) 0.0)
|
||||
(set! sv-48 #t)
|
||||
)
|
||||
(when sv-48
|
||||
(cond
|
||||
((and (or (or (= (-> arg0 poly-pat mode) (pat-mode ground)) (= (-> arg0 poly-pat mode) (pat-mode halfpipe)))
|
||||
(and (logtest? sv-32 8)
|
||||
(>= (* 1.25 (-> arg1 best-my-prim local-sphere w)) (-> arg0 unknown-float-kj1n23k1))
|
||||
(or (zero? (shr (shl (the-as int (-> arg0 unknown-float-kj1n23j)) 54) 61))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-kj1n23j)) 54) 61) 3)
|
||||
)
|
||||
(< 0.3 (fabs (-> arg0 surface-angle)))
|
||||
)
|
||||
)
|
||||
(zero? (logand sv-32 128))
|
||||
)
|
||||
(set! sv-32 (logior sv-32 64))
|
||||
(set! sv-40 (logior sv-40 128))
|
||||
(set! (-> arg0 unknown-time-frame08) (-> pp clock frame-counter))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
)
|
||||
(#t
|
||||
(set! sv-32 (logior sv-32 64))
|
||||
(set! sv-40 (logior sv-40 128))
|
||||
(set! (-> arg0 unknown-time-frame08) (-> pp clock frame-counter))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> sv-24 0) sv-40)
|
||||
(set! (-> sv-20 0) sv-32)
|
||||
(set! (-> sv-28 0) sv-48)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs collide-status.
|
||||
(defbehavior target-collision-reaction target ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector))
|
||||
(local-vars (sv-80 vector) (sv-84 vector) (sv-88 matrix) (sv-96 int) (sv-104 int) (sv-240 symbol))
|
||||
(set! sv-80 (new-stack-vector0))
|
||||
(set! sv-84 (new-stack-vector0))
|
||||
(let ((v1-2 (new 'stack-no-clear 'matrix)))
|
||||
(dotimes (a0-1 2)
|
||||
(set! (-> v1-2 vector a0-1 quad) (the-as uint128 0))
|
||||
)
|
||||
(set! sv-88 v1-2)
|
||||
)
|
||||
(set! sv-96 0)
|
||||
(set! sv-104 0)
|
||||
(set! (-> sv-88 vector 0 quad) (-> arg3 quad))
|
||||
(set! (-> sv-88 vector 1 quad) (-> arg3 quad))
|
||||
(let ((a1-3 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! a1-3 (-> arg1 move-dist) (-> arg1 best-dist))
|
||||
(move-by-vector! arg0 a1-3)
|
||||
)
|
||||
(set! sv-104 (logior sv-104 (react-to-pat! arg0 (-> arg1 best-other-tri pat))))
|
||||
(if (= (-> arg0 poly-pat mode) (pat-mode wall))
|
||||
(set! sv-104 (logior sv-104 1))
|
||||
)
|
||||
(if (logtest? (-> arg0 unknown-surface00 flags) (surface-flag air))
|
||||
(set! sv-104 (logior sv-104 32))
|
||||
)
|
||||
(let ((v1-24 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-24 quad) (-> arg1 best-my-prim prim-core world-sphere quad))
|
||||
(vector-! sv-80 v1-24 (-> arg1 best-other-tri intersect))
|
||||
)
|
||||
(vector-normalize! sv-80 1.0)
|
||||
(set! (-> arg0 coverage) (vector-dot sv-80 (-> arg1 best-other-tri normal)))
|
||||
(when (< (-> arg0 coverage) 0.0)
|
||||
(set! (-> arg0 coverage) 0.0)
|
||||
(vector-flatten! sv-80 sv-80 (-> arg1 best-other-tri normal))
|
||||
(vector-normalize! sv-80 1.0)
|
||||
)
|
||||
(if (< (-> arg0 coverage) 0.9999)
|
||||
(set! sv-104 (logior sv-104 24))
|
||||
)
|
||||
(let ((v1-35 (-> sv-80 quad)))
|
||||
(set! (-> sv-84 quad) v1-35)
|
||||
)
|
||||
(if (= (-> arg1 best-dist) 0.0)
|
||||
(move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-84 3.0))
|
||||
)
|
||||
(set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad))
|
||||
(collide-shape-moving-angle-set! arg0 sv-84 (the-as vector (-> sv-88 vector)))
|
||||
(if (< (-> arg0 poly-angle) -0.2)
|
||||
(set! sv-96 (logior sv-96 16))
|
||||
)
|
||||
(if (< (-> arg0 poly-angle) 0.0)
|
||||
(set! sv-96 (logior sv-96 #x4000))
|
||||
)
|
||||
(if (!= (-> arg1 best-my-prim prim-id) 6)
|
||||
(set! sv-104 (logior sv-104 #x8000))
|
||||
)
|
||||
(if (and (= (-> arg0 cur-pat mode) (pat-mode halfpipe)) (< (-> arg0 poly-angle) 0.75))
|
||||
(send-event (-> arg0 process) 'slide)
|
||||
)
|
||||
(set! sv-240 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle)))
|
||||
(if (and sv-240 (and (= (-> arg0 unknown-surface00 mode) 'dive) (< 0.4 (fabs (-> arg0 surface-angle)))))
|
||||
(set! sv-240 (the-as symbol #f))
|
||||
)
|
||||
(if (and (logtest? sv-104 #x8000) (logtest? sv-104 32) (>= (-> arg0 poly-angle) 0.0) (not sv-240))
|
||||
(set! sv-240 #t)
|
||||
)
|
||||
(if sv-240
|
||||
(set! sv-104 (logior sv-104 2))
|
||||
)
|
||||
(if (logtest? sv-104 8)
|
||||
(target-collision-low-coverage
|
||||
arg0
|
||||
arg1
|
||||
sv-84
|
||||
(the-as (pointer uint32) (& sv-104))
|
||||
(the-as (pointer int64) (& sv-96))
|
||||
(& sv-240)
|
||||
)
|
||||
)
|
||||
(when (not (logtest? (-> arg0 prev-status) (collide-status on-surface)))
|
||||
(set! (-> arg0 unknown-vector-kj1n231 quad) (-> arg0 transv quad))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
(set! (-> arg0 unknown-float21) (- (vector-dot (-> arg0 transv) sv-84)))
|
||||
(set! sv-96 (logior sv-96 2048))
|
||||
(if (nonzero? (-> arg0 unknown-surface01 impact-hook))
|
||||
((-> arg0 unknown-surface01 impact-hook) arg0 (the-as (pointer float) (-> sv-88 vector)) sv-84)
|
||||
)
|
||||
(when (not sv-240)
|
||||
(let ((f0-21 (- 1.0 (-> arg0 unknown-surface01 impact-fric))))
|
||||
(when (< f0-21 1.0)
|
||||
(let ((v1-113 (new-stack-vector0))
|
||||
(f1-13 (vector-dot (-> arg0 dynam gravity-normal) (the-as vector (-> sv-88 vector))))
|
||||
)
|
||||
0.0
|
||||
(vector-!
|
||||
v1-113
|
||||
(the-as vector (-> sv-88 vector))
|
||||
(vector-float*! v1-113 (-> arg0 dynam gravity-normal) f1-13)
|
||||
)
|
||||
(let* ((f2-2 (vector-length v1-113))
|
||||
(f3-0 f2-2)
|
||||
)
|
||||
(if (< f1-13 0.0)
|
||||
(set! f1-13 (* f1-13 f0-21))
|
||||
)
|
||||
(vector+!
|
||||
(the-as vector (-> sv-88 vector))
|
||||
(vector-float*! (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal) f1-13)
|
||||
(vector-float*! v1-113 v1-113 (/ f2-2 f3-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-96 (logior sv-96 4))
|
||||
(cond
|
||||
((-> arg1 num-spheres)
|
||||
(set! sv-96 (logior sv-96 32))
|
||||
(set! (-> arg0 unknown-vector001 quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> arg0 unknown-vector-kij1b231 quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-handle00)
|
||||
(process->handle (-> (the-as collide-shape-prim (-> arg1 num-spheres)) cshape process))
|
||||
)
|
||||
)
|
||||
((= (-> arg0 poly-pat material) (pat-material waterbottom))
|
||||
)
|
||||
(else
|
||||
(set! sv-96 (logior sv-96 4096))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(sv-240
|
||||
(set! sv-104 (logior sv-104 4))
|
||||
(set! sv-96 (logior sv-96 8))
|
||||
(set! (-> arg0 cur-pat mode) 1)
|
||||
(set! (-> arg0 unknown-vector24 quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> arg0 unknown-vector-kj1hj2b3 quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-vector25 quad) (-> sv-84 quad))
|
||||
(set! (-> arg0 unknown-pat-surface00) (-> arg1 best-other-tri pat))
|
||||
(cond
|
||||
((and (logtest? (focus-status mech) (-> (the-as process-focusable (-> arg0 process)) focus-status))
|
||||
(logtest? sv-104 #x8000)
|
||||
(logtest? sv-104 32)
|
||||
(< 0.0 (vector-dot sv-84 (-> arg0 dynam gravity-normal)))
|
||||
(< 0.0 (vector-dot (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal)))
|
||||
)
|
||||
(set! (-> arg0 surf) *edge-surface*)
|
||||
(set! sv-104 (logior #x10000 sv-104))
|
||||
(vector-flatten! arg2 (vector-negate! (new 'stack-no-clear 'vector) (-> arg0 dynam gravity-normal)) sv-84)
|
||||
(vector-normalize! arg2 (vector-dot arg2 (the-as vector (-> sv-88 vector))))
|
||||
)
|
||||
(else
|
||||
(vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (or (and (>= (-> arg1 best-my-prim local-sphere w)
|
||||
(vector-dot
|
||||
(-> arg0 ground-poly-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-other-tri intersect) (-> arg0 grount-touch-point))
|
||||
)
|
||||
)
|
||||
(< (- (-> self clock frame-counter) (-> arg0 unknown-time-frame05)) (seconds 0.3))
|
||||
)
|
||||
(logtest? sv-104 #x8000)
|
||||
)
|
||||
(>= (vector-dot
|
||||
(-> arg0 dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-other-tri intersect) (-> arg0 grount-touch-point))
|
||||
)
|
||||
0.0
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2)) (zero? (logand sv-104 32)))
|
||||
)
|
||||
(set! sv-104 (logior sv-104 256))
|
||||
(set! sv-104 (logand -65 sv-104))
|
||||
(let ((s3-4 (vector-cross! (new 'stack-no-clear 'vector) (-> arg0 poly-normal) (-> arg0 ground-poly-normal))))
|
||||
(vector-normalize! s3-4 1.0)
|
||||
(vector-float*! arg2 s3-4 (vector-dot (the-as vector (-> sv-88 vector)) s3-4))
|
||||
)
|
||||
(vector+! arg2 arg2 (-> arg0 poly-normal))
|
||||
)
|
||||
(else
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! sv-96 (logior sv-96 1))
|
||||
(set! (-> arg0 cur-pat mode) 0)
|
||||
(if (= (-> arg1 best-my-prim prim-id) 6)
|
||||
(set! (-> arg0 local-normal quad) (-> sv-84 quad))
|
||||
)
|
||||
(if (and (logtest? (focus-status board) (-> (the-as process-focusable (-> arg0 process)) focus-status))
|
||||
(not (logtest? (focus-status halfpipe) (-> (the-as process-focusable (-> arg0 process)) focus-status)))
|
||||
(!= (-> arg0 cur-pat mode) 3)
|
||||
(!= (-> arg0 ground-pat mode) 3)
|
||||
)
|
||||
(vector-reflect-flat-gravity! arg2 (the-as vector (-> sv-88 vector)) sv-84 (-> arg0 dynam gravity-normal))
|
||||
(vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84)
|
||||
)
|
||||
(vector+! arg2 arg2 sv-84)
|
||||
(let ((f0-32 (-> arg0 unknown-surface01 slope-change-preserve)))
|
||||
(when (< 0.0 f0-32)
|
||||
(let ((v1-223 (new-stack-vector0)))
|
||||
(let ((f1-25 (vector-dot (-> arg0 unknown-vector14) (the-as vector (-> sv-88 vector)))))
|
||||
0.0
|
||||
(vector-! v1-223 (the-as vector (-> sv-88 vector)) (vector-float*! v1-223 (-> arg0 unknown-vector14) f1-25))
|
||||
)
|
||||
(let ((f1-26 (vector-length v1-223)))
|
||||
f1-26
|
||||
(let ((f1-27 f1-26)
|
||||
(f2-5 (vector-length arg2))
|
||||
)
|
||||
(if (and (< 409.6 (fabs (- f2-5 f1-27))) (< f2-5 f1-27))
|
||||
(vector-normalize! arg2 (lerp-scale f2-5 f1-27 f0-32 0.0 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 grount-touch-point w) 0.0)
|
||||
(when (not (logtest? sv-104 #x400f))
|
||||
(set! sv-96 (logior sv-96 2))
|
||||
(set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-vector22 quad) (-> sv-84 quad))
|
||||
(set! (-> arg0 unknown-float0000) (vector-dot sv-84 (-> arg0 dynam gravity-normal)))
|
||||
(set! (-> arg0 unknown-time-frame05) (-> self clock frame-counter))
|
||||
(set! (-> arg0 ground-pat) (-> arg0 poly-pat))
|
||||
(set! (-> arg0 grount-touch-point quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> arg0 unknown-vector-kjh1n23k1 quad) (-> arg1 best-my-prim prim-core world-sphere quad))
|
||||
(set! sv-104 (logior sv-104 2048))
|
||||
(if (= (-> arg0 poly-pat material) (pat-material waterbottom))
|
||||
(set! sv-96 (logior sv-96 1024))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 status) sv-96)
|
||||
(set! (-> arg0 reaction-flag) (the-as cshape-reaction-flags sv-104))
|
||||
(when *debug-segment*
|
||||
(+! (-> arg0 unknown-halfword00) 1)
|
||||
(let ((v1-260
|
||||
(clear-record-tags! *history* (history-channel surface-normal) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-260 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-260 vector quad) (-> arg0 surface-normal quad))
|
||||
)
|
||||
(let ((v1-263
|
||||
(clear-record-tags! *history* (history-channel local-normal) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-263 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-263 vector quad) (-> arg0 local-normal quad))
|
||||
)
|
||||
(set! (-> (clear-record-tags! *history* (history-channel intersect) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
vector
|
||||
quad
|
||||
)
|
||||
(-> arg1 best-other-tri intersect quad)
|
||||
)
|
||||
(let ((v1-269
|
||||
(clear-record-tags! *history* (history-channel transv-out) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-269 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-269 vector quad) (-> arg2 quad))
|
||||
)
|
||||
(let ((v1-272
|
||||
(clear-record-tags! *history* (history-channel transv-in) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-272 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-272 vector quad) (-> sv-88 vector 1 quad))
|
||||
)
|
||||
(let ((v1-275 (clear-record-tags! *history* (history-channel transv) (-> arg0 unknown-halfword00) (the-as uint 2)))
|
||||
)
|
||||
(set! (-> v1-275 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-275 vector quad) (-> arg0 transv quad))
|
||||
)
|
||||
(set! (-> (clear-record-tags! *history* (history-channel trans) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
vector
|
||||
quad
|
||||
)
|
||||
(-> arg0 trans quad)
|
||||
)
|
||||
(let ((v1-281 (clear-record-tags! *history* (history-channel pat) (-> arg0 unknown-halfword00) (the-as uint 2))))
|
||||
(set! (-> v1-281 vector x) (the-as float (-> arg0 cur-pat)))
|
||||
)
|
||||
(let ((v1-283
|
||||
(clear-record-tags! *history* (history-channel collide-status) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-283 collide-status) (-> arg0 status))
|
||||
(set! (-> v1-283 vector z) (the-as float (-> arg0 reaction-flag)))
|
||||
)
|
||||
)
|
||||
(the-as collide-status sv-96)
|
||||
)
|
||||
|
||||
(defun target-collision-no-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector))
|
||||
(if (= (-> arg0 unknown-surface00 mode) 'air)
|
||||
(logior! (-> arg0 reaction-flag) (cshape-reaction-flags csrf05))
|
||||
)
|
||||
(when *debug-segment*
|
||||
(+! (-> arg0 unknown-halfword00) 1)
|
||||
(let ((v1-9
|
||||
(clear-record-tags! *history* (history-channel transv-out) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-9 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-9 vector quad) (-> arg2 quad))
|
||||
)
|
||||
(let ((v1-12
|
||||
(clear-record-tags! *history* (history-channel transv-in) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-12 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-12 vector quad) (-> arg3 quad))
|
||||
)
|
||||
(let ((v1-15 (clear-record-tags! *history* (history-channel transv) (-> arg0 unknown-halfword00) (the-as uint 2))))
|
||||
(set! (-> v1-15 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-15 vector quad) (-> arg0 transv quad))
|
||||
)
|
||||
(set! (-> (clear-record-tags! *history* (history-channel trans) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
vector
|
||||
quad
|
||||
)
|
||||
(-> arg0 trans quad)
|
||||
)
|
||||
(let ((v1-21
|
||||
(clear-record-tags! *history* (history-channel collide-status) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-21 collide-status) (logior (-> arg0 status) (collide-status no-touch)))
|
||||
(set! (-> v1-21 vector z) (the-as float (-> arg0 reaction-flag)))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *collide-edge-board-spec* (new 'static 'collide-edge-spec
|
||||
:split-dists (new 'static 'array float 2 1024.0 1433.6)
|
||||
:outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0)
|
||||
:flags (collide-edge-spec-flags find-adjacent-edge send-event)
|
||||
:ignore-pat (new 'static 'pat-surface :noentity #x1 :nogrind #x1 :probe #x1)
|
||||
:max-dist-sqrd-to-outward-pt 67108864.0
|
||||
:max-dir-cosa-delta -1.0
|
||||
:max-dir-cosa-player -2.0
|
||||
:touching-segment #f
|
||||
:local-cache-fill-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -12288.0 :y -11059.2 :z -12288.0 :w 1.0)
|
||||
:max (new 'static 'vector :x 12288.0 :y 16384.0 :z 12288.0 :w 1.0)
|
||||
)
|
||||
:local-within-reach-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -11878.4 :y -2867.2 :z -11878.4 :w 1.0)
|
||||
:max (new 'static 'vector :x 11878.4 :y 2867.2 :z 11878.4 :w 1.0)
|
||||
)
|
||||
:local-player-spheres (new 'static 'inline-array sphere 12
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x -737.28 :y 4096.0 :r 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 6553.6 :r 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 9420.8 :r 3072.0)
|
||||
(new 'static 'sphere :x 1720.32 :y 3686.4 :r 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 5734.4 :r 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 8601.6 :r 2949.12)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior rail-surface-touch target ()
|
||||
(when (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame02)) (seconds 0.2))
|
||||
(logclear! (-> *collide-edge-board-spec* flags) (collide-edge-spec-flags one send-event))
|
||||
(set! (-> *collide-edge-board-spec* touching-segment) #f)
|
||||
(do-edge-grabs *target* *collide-cache* *collide-edge-board-spec*)
|
||||
(logior! (-> *collide-edge-board-spec* flags) (collide-edge-spec-flags send-event))
|
||||
(let ((gp-0 *edge-grab-info*))
|
||||
(when (-> gp-0 found-edge?)
|
||||
(vector-normalize!
|
||||
(vector-! (-> self control unknown-vector34) (the-as vector (-> gp-0 world-vertex)) (-> gp-0 world-vertex 1))
|
||||
1.0
|
||||
)
|
||||
(set! (-> self control unknown-vector36 quad) (-> gp-0 hanging-matrix vector 0 quad))
|
||||
(send-event
|
||||
self
|
||||
'push-transv
|
||||
(vector-float*!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(-> self control unknown-vector36)
|
||||
(seek
|
||||
(vector-length (-> self control unknown-vector18))
|
||||
40960.0
|
||||
(* 81920.0 (-> self clock seconds-per-frame))
|
||||
)
|
||||
)
|
||||
90
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun gravel-surface-touch ()
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
(define-extern target-gun-joint-points (function none :behavior target))
|
||||
(define-extern target-board-joint-points (function none :behavior target))
|
||||
(define-extern debounce-speed (function float float vector vector float :behavior target))
|
||||
(define-extern target-collision-reaction (function control-info collide-query vector vector collide-status))
|
||||
(define-extern ja-post (function none :behavior process-drawable))
|
||||
(define-extern target-powerup-process (function none :behavior target))
|
||||
(define-extern target-exit (function none :behavior target))
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
;; name in dgo: surface-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern rail-surface-touch (function none))
|
||||
(declare-type target process-focusable)
|
||||
(define-extern rail-surface-touch (function none :behavior target))
|
||||
(define-extern gravel-surface-touch (function none))
|
||||
|
||||
(defenum surface-flag
|
||||
@@ -44,55 +45,74 @@
|
||||
(gun-turn-fast 28) ;; hi 4096
|
||||
)
|
||||
|
||||
(declare-type collide-shape trsqv)
|
||||
(declare-type collide-shape-moving collide-shape)
|
||||
(declare-type control-info collide-shape-moving)
|
||||
|
||||
(declare-type surface basic)
|
||||
(define-extern *dark-jump-mods* surface)
|
||||
(define-extern *flop-land-mods* surface)
|
||||
(define-extern *pole-mods* surface)
|
||||
(define-extern *grab-mods* surface)
|
||||
(define-extern *edge-grab-mods* surface)
|
||||
(define-extern *stone-surface* surface)
|
||||
(define-extern *gravel-surface* surface)
|
||||
(define-extern *edge-surface* surface)
|
||||
(define-extern *wade-surface* surface)
|
||||
(define-extern *quicksand-surface* surface)
|
||||
(define-extern *tar-surface* surface)
|
||||
(define-extern *ice-surface* surface)
|
||||
(define-extern *rail-surface* surface)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype surface (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(turnv float :offset-assert 8)
|
||||
(turnvv float :offset-assert 12)
|
||||
(tiltv float :offset-assert 16)
|
||||
(tiltvv float :offset-assert 20)
|
||||
(transv-max float :offset-assert 24)
|
||||
(target-speed float :offset-assert 28)
|
||||
(seek0 float :offset-assert 32)
|
||||
(seek90 float :offset-assert 36)
|
||||
(seek180 float :offset-assert 40)
|
||||
(fric float :offset-assert 44)
|
||||
(nonlin-fric-dist float :offset-assert 48)
|
||||
(slip-factor float :offset-assert 52)
|
||||
(slide-factor float :offset-assert 56)
|
||||
(slope-up-factor float :offset-assert 60)
|
||||
(slope-down-factor float :offset-assert 64)
|
||||
(slope-slip-angle float :offset-assert 68)
|
||||
(impact-fric float :offset-assert 72)
|
||||
(bend-factor float :offset-assert 76)
|
||||
(bend-speed float :offset-assert 80)
|
||||
(alignv float :offset-assert 84)
|
||||
(slope-up-traction float :offset-assert 88)
|
||||
(align-speed float :offset-assert 92)
|
||||
(slope-change-preserve float :offset-assert 96)
|
||||
(turnvf float :offset-assert 100)
|
||||
(turnvvf float :offset-assert 104)
|
||||
(tiltvf float :offset-assert 108)
|
||||
(tiltvvf float :offset-assert 112)
|
||||
(vel-turn float :offset-assert 116)
|
||||
(active-hook (function none) :offset 128)
|
||||
(touch-hook (function none) :offset-assert 132)
|
||||
(impact-hook function :offset-assert 136)
|
||||
(mult-hook (function surface surface surface int none) :offset-assert 140)
|
||||
(exit-hook function :offset-assert 144)
|
||||
(mode symbol :offset-assert 148)
|
||||
(flags surface-flag :offset-assert 152)
|
||||
(data float 30 :offset 8)
|
||||
(hook function 4 :offset 128)
|
||||
(dataw uint32 2 :offset 148)
|
||||
((name symbol :offset-assert 4)
|
||||
(turnv float :offset-assert 8)
|
||||
(turnvv float :offset-assert 12)
|
||||
(tiltv float :offset-assert 16)
|
||||
(tiltvv float :offset-assert 20)
|
||||
(transv-max float :offset-assert 24)
|
||||
(target-speed float :offset-assert 28)
|
||||
(seek0 float :offset-assert 32)
|
||||
(seek90 float :offset-assert 36)
|
||||
(seek180 float :offset-assert 40)
|
||||
(fric float :offset-assert 44)
|
||||
(nonlin-fric-dist float :offset-assert 48)
|
||||
(slip-factor float :offset-assert 52)
|
||||
(slide-factor float :offset-assert 56)
|
||||
(slope-up-factor float :offset-assert 60)
|
||||
(slope-down-factor float :offset-assert 64)
|
||||
(slope-slip-angle float :offset-assert 68)
|
||||
(impact-fric float :offset-assert 72)
|
||||
(bend-factor float :offset-assert 76)
|
||||
(bend-speed float :offset-assert 80)
|
||||
(alignv float :offset-assert 84)
|
||||
(slope-up-traction float :offset-assert 88)
|
||||
(align-speed float :offset-assert 92)
|
||||
(slope-change-preserve float :offset-assert 96)
|
||||
(turnvf float :offset-assert 100)
|
||||
(turnvvf float :offset-assert 104)
|
||||
(tiltvf float :offset-assert 108)
|
||||
(tiltvvf float :offset-assert 112)
|
||||
(vel-turn float :offset-assert 116)
|
||||
(active-hook (function none) :offset 128)
|
||||
(touch-hook (function none) :offset 132)
|
||||
(impact-hook (function control-info (pointer float) vector none) :offset 136)
|
||||
(mult-hook (function surface surface surface int none) :offset-assert 140)
|
||||
(exit-hook function :offset-assert 144)
|
||||
(mode symbol :offset-assert 148)
|
||||
(flags surface-flag :offset-assert 152)
|
||||
(data float 30 :offset 8)
|
||||
(hook function 4 :offset 128)
|
||||
(dataw uint32 2 :offset 148)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x9c
|
||||
:flag-assert #x90000009c
|
||||
)
|
||||
|
||||
|
||||
(defun calc-terminal-vel ((arg0 float) (arg1 float) (arg2 float))
|
||||
(- (* (/ (- (* 0.016666668 arg0) arg1) arg2) (- 1.0 arg2)) arg1)
|
||||
)
|
||||
@@ -109,7 +129,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 2 of type surface
|
||||
;; ERROR: Function may read a register that is not set: t3
|
||||
(defmethod print surface ((obj surface))
|
||||
(local-vars (t3-0 none))
|
||||
@@ -177,6 +196,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun surface-clamp-speed ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int))
|
||||
(when (= arg3 1)
|
||||
(set! (-> arg0 transv-max) (fmin (-> arg0 transv-max) (-> arg1 transv-max)))
|
||||
@@ -571,7 +591,7 @@
|
||||
(set! (-> v1-20 target-speed) 245760.0)
|
||||
(set! (-> v1-20 transv-max) 245760.0)
|
||||
(set! (-> v1-20 seek0) 0.9)
|
||||
(define *dark-jump-mods* v1-20)
|
||||
(set! *dark-jump-mods* v1-20)
|
||||
)
|
||||
|
||||
(define *roll-mods* (new 'static 'surface
|
||||
@@ -693,7 +713,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> a0-9 mult-hook) surface-clamp-speed)
|
||||
(define *flop-land-mods* a0-9)
|
||||
(set! *flop-land-mods* a0-9)
|
||||
)
|
||||
|
||||
(define *wade-mods* (new 'static 'surface
|
||||
@@ -825,19 +845,19 @@
|
||||
(let ((v1-30 (copy *walk-mods* 'global)))
|
||||
(set! (-> v1-30 name) 'pole)
|
||||
(set! (-> v1-30 flags) (surface-flag gun-hide gun-fast-exit))
|
||||
(define *pole-mods* v1-30)
|
||||
(set! *pole-mods* v1-30)
|
||||
)
|
||||
|
||||
(let ((a0-14 (copy *walk-mods* 'global)))
|
||||
(set! (-> a0-14 name) 'grab)
|
||||
(set! (-> a0-14 flags) (surface-flag))
|
||||
(define *grab-mods* a0-14)
|
||||
(set! *grab-mods* a0-14)
|
||||
)
|
||||
|
||||
(let ((v1-34 (copy *walk-mods* 'global)))
|
||||
(set! (-> v1-34 name) 'edge-grab)
|
||||
(set! (-> v1-34 flags) (surface-flag gun-inactive gun-no-twist))
|
||||
(define *edge-grab-mods* v1-34)
|
||||
(set! *edge-grab-mods* v1-34)
|
||||
)
|
||||
|
||||
(define *empty-mods* (new 'static 'surface
|
||||
@@ -906,7 +926,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *stone-surface* v1-37)
|
||||
(set! *stone-surface* v1-37)
|
||||
(set! (-> v1-37 exit-hook) nothing)
|
||||
(set! (-> v1-37 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-37 touch-hook) nothing)
|
||||
@@ -945,7 +965,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *gravel-surface* v1-38)
|
||||
(set! *gravel-surface* v1-38)
|
||||
(set! (-> v1-38 exit-hook) nothing)
|
||||
(set! (-> v1-38 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-38 touch-hook) (lambda () (gravel-surface-touch) (none)))
|
||||
@@ -980,7 +1000,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *edge-surface* v1-39)
|
||||
(set! *edge-surface* v1-39)
|
||||
(set! (-> v1-39 exit-hook) nothing)
|
||||
(set! (-> v1-39 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-39 touch-hook) nothing)
|
||||
@@ -1017,7 +1037,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *wade-surface* v1-40)
|
||||
(set! *wade-surface* v1-40)
|
||||
(set! (-> v1-40 exit-hook) nothing)
|
||||
(set! (-> v1-40 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-40 touch-hook) nothing)
|
||||
@@ -1054,7 +1074,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *quicksand-surface* v1-41)
|
||||
(set! *quicksand-surface* v1-41)
|
||||
(set! (-> v1-41 exit-hook) nothing)
|
||||
(set! (-> v1-41 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-41 touch-hook) nothing)
|
||||
@@ -1091,7 +1111,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *tar-surface* v1-42)
|
||||
(set! *tar-surface* v1-42)
|
||||
(set! (-> v1-42 exit-hook) nothing)
|
||||
(set! (-> v1-42 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-42 touch-hook) nothing)
|
||||
@@ -1126,7 +1146,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *ice-surface* v1-43)
|
||||
(set! *ice-surface* v1-43)
|
||||
(set! (-> v1-43 exit-hook) nothing)
|
||||
(set! (-> v1-43 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-43 touch-hook) nothing)
|
||||
@@ -1165,7 +1185,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *rail-surface* v1-44)
|
||||
(set! *rail-surface* v1-44)
|
||||
(set! (-> v1-44 exit-hook) nothing)
|
||||
(set! (-> v1-44 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-44 touch-hook) (lambda () (rail-surface-touch) (none)))
|
||||
@@ -1175,4 +1195,3 @@
|
||||
(define *standard-ground-surface* *stone-surface*)
|
||||
|
||||
(define *swim-surface* *stone-surface*)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -658,12 +658,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 #f)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(target-hit-ground-anim #f (are-still?))
|
||||
(go target-carry-stance)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
(define-extern target-wade-walk (state target))
|
||||
(define-extern target-hit-ground-hard (state float target))
|
||||
(define-extern target-land-effect (function none :behavior target))
|
||||
(define-extern target-hit-ground-anim (function symbol symbol :behavior target))
|
||||
(define-extern target-hit-ground-anim (function symbol symbol none :behavior target))
|
||||
(define-extern are-still? (function symbol :behavior target))
|
||||
(define-extern *attack-end-mods* surface)
|
||||
(define-extern target-send-attack (function process uint uint int int uint symbol :behavior target))
|
||||
@@ -139,6 +139,9 @@
|
||||
(define-extern target-pos (function int vector))
|
||||
(define-extern stop (function symbol int))
|
||||
|
||||
;; target-anim
|
||||
(define-extern target-stance-ambient (state target))
|
||||
|
||||
;; og:ignore-form:(new 'static 'boxed-array
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -2006,12 +2006,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 #f)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(target-hit-ground-anim #f (are-still?))
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
@@ -3780,12 +3775,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 arg0)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(target-hit-ground-anim arg0 (are-still?))
|
||||
(go target-falling #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
+2
-2
@@ -1162,7 +1162,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 9 of type cspace
|
||||
(defmethod reset-and-assign-geo! cspace ((obj cspace) (arg0 basic))
|
||||
(defmethod reset-and-assign-geo! cspace ((obj cspace) (arg0 drawable))
|
||||
(set! (-> obj parent) #f)
|
||||
(set! (-> obj joint) #f)
|
||||
(set! (-> obj geo) arg0)
|
||||
@@ -1173,7 +1173,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 0 of type cspace
|
||||
(defmethod new cspace ((allocation symbol) (type-to-make type) (arg0 basic))
|
||||
(defmethod new cspace ((allocation symbol) (type-to-make type) (arg0 drawable))
|
||||
(let ((t9-0 (method-of-type structure new))
|
||||
(v1-1 type-to-make)
|
||||
)
|
||||
|
||||
+3
-3
@@ -111,7 +111,7 @@
|
||||
((parent cspace :offset-assert 0)
|
||||
(joint joint :offset-assert 4)
|
||||
(joint-num int16 :offset-assert 8)
|
||||
(geo basic :offset-assert 12)
|
||||
(geo drawable :offset-assert 12)
|
||||
(bone bone :offset-assert 16)
|
||||
(param0 (function cspace matrix none) :offset-assert 20)
|
||||
(param1 basic :offset-assert 24)
|
||||
@@ -121,8 +121,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xa00000020
|
||||
(:methods
|
||||
(new (symbol type basic) _type_ 0)
|
||||
(reset-and-assign-geo! (_type_ basic) _type_ 9)
|
||||
(new (symbol type drawable) _type_ 0)
|
||||
(reset-and-assign-geo! (_type_ drawable) _type_ 9)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
(num-spheres uint32 :offset 116)
|
||||
(solid-only symbol :offset 120)
|
||||
(best-dist float :offset 112)
|
||||
(best-other-prim basic :offset 116)
|
||||
(best-other-prim collide-shape-prim :offset 116)
|
||||
(best-my-prim collide-shape-prim :offset 120)
|
||||
(move-vec vector :inline :offset 224)
|
||||
(best-u float :offset 112)
|
||||
|
||||
+1
-1
@@ -1617,7 +1617,7 @@
|
||||
(:methods
|
||||
(new (symbol type process-drawable collide-list-enum) _type_ 0)
|
||||
(find-ground (_type_ collide-query collide-spec float float float) symbol 55)
|
||||
(react-to-pat! (_type_ pat-surface) none 56)
|
||||
(react-to-pat! (_type_ pat-surface) int 56)
|
||||
(integrate-no-collide! (_type_ vector) none 57)
|
||||
(integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol 58)
|
||||
(move-above-ground (_type_ vector move-above-ground-params) none 59)
|
||||
|
||||
+1
-6
@@ -790,7 +790,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 56 of type collide-shape-moving
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod react-to-pat! collide-shape-moving ((obj collide-shape-moving) (arg0 pat-surface))
|
||||
(with-pp
|
||||
(let ((s5-0 0))
|
||||
@@ -933,8 +932,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -3124,7 +3123,3 @@
|
||||
)
|
||||
(the-as vector 0)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+15
@@ -72,6 +72,8 @@
|
||||
(unknown-float16 float :offset 4548)
|
||||
(unknown-vector22 vector :inline :offset 4560)
|
||||
(last-trans-on-surf vector :inline :offset 4576)
|
||||
(unknown-vector-kjh1n23k1 vector :inline :offset 4592)
|
||||
(unknown-vector-kj1n231 vector :inline :offset 4608)
|
||||
(unknown-time-frame05 time-frame :offset 4624)
|
||||
(unknown-float0000 float :offset 4632)
|
||||
(unknown-float17 float :offset 4636)
|
||||
@@ -83,8 +85,10 @@
|
||||
(unknown-time-frame07 time-frame :offset 4672)
|
||||
(unknown-pat-surface00 pat-surface :offset 4680)
|
||||
(unknown-vector24 vector :inline :offset 4688)
|
||||
(unknown-vector-kj1hj2b3 vector :inline :offset 4704)
|
||||
(unknown-vector25 vector :inline :offset 4720)
|
||||
(unknown-vector001 vector :inline :offset 4736)
|
||||
(unknown-vector-kij1b231 vector :inline :offset 4752)
|
||||
(unknown-handle00 handle :offset 4768)
|
||||
(unknown-pat-surface01 pat-surface :offset 4776)
|
||||
(unknown-float22 float :offset 4780)
|
||||
@@ -94,12 +98,23 @@
|
||||
(unknown-float26 float :offset 4796)
|
||||
(unknown-word000 int32 :offset 4800)
|
||||
(unknown-float002 float :offset 4804)
|
||||
(unknown-float-n12iuh3n1 float :offset 4808)
|
||||
(unknown-float-ki1jhbn23hj float :offset 4812)
|
||||
(unknown-time-frame08 time-frame :offset 4816)
|
||||
(unknown-float-kj1n23j float :offset 4828)
|
||||
(unknown-float-n234n23 float :offset 4832)
|
||||
(unknown-float-m32j45nhn float :offset 4836)
|
||||
(unknown-float-kj1n23k1 float :offset 4824)
|
||||
(unknown-vector-l1jn23j vector :inline :offset 4848)
|
||||
(unknown-vector-kj1n23k vector :inline :offset 4864)
|
||||
(unknown-vector-kjh1n23kj1n23 vector :inline :offset 4912)
|
||||
(unknown-vector26 vector :inline :offset 4928)
|
||||
(unknown-vector-lkjk12nj3n vector :inline :offset 4944)
|
||||
(btransv vector :inline :offset 4976)
|
||||
(blocked-factor float :offset 4992)
|
||||
(blocked-in-air-factor float :offset 4996)
|
||||
(unknown-time-frame09 time-frame :offset 5000)
|
||||
(unknown-time-frame-kjh1n23hkjn time-frame :offset 5008)
|
||||
(unknown-sphere-array00 collide-shape-prim-sphere 10 :offset 5016)
|
||||
(unknown-word02 int32 :offset 5064)
|
||||
(unknown-time-frame10 time-frame :offset 5072)
|
||||
|
||||
+17
-16
@@ -166,22 +166,23 @@
|
||||
|
||||
;; definition of type lightning-tracker
|
||||
(deftype lightning-tracker (process)
|
||||
((root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
(start-time time-frame :offset-assert 152)
|
||||
(offset0 vector :inline :offset-assert 160)
|
||||
(offset1 vector :inline :offset-assert 176)
|
||||
(target0 uint64 :offset-assert 192)
|
||||
(target1 uint64 :offset-assert 200)
|
||||
(target-joint0 int32 :offset-assert 208)
|
||||
(target-joint1 int32 :offset-assert 212)
|
||||
(sound uint32 :offset-assert 216)
|
||||
(userdata uint64 :offset-assert 224)
|
||||
(user-time time-frame 2 :offset-assert 232)
|
||||
(user-vector vector :inline :offset-assert 256)
|
||||
(user-handle handle 2 :offset 288)
|
||||
((ppointer-override (pointer lightning-tracker) :offset 28)
|
||||
(root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
(start-time time-frame :offset-assert 152)
|
||||
(offset0 vector :inline :offset-assert 160)
|
||||
(offset1 vector :inline :offset-assert 176)
|
||||
(target0 uint64 :offset-assert 192)
|
||||
(target1 uint64 :offset-assert 200)
|
||||
(target-joint0 int32 :offset-assert 208)
|
||||
(target-joint1 int32 :offset-assert 212)
|
||||
(sound uint32 :offset-assert 216)
|
||||
(userdata uint64 :offset-assert 224)
|
||||
(user-time time-frame 2 :offset-assert 232)
|
||||
(user-vector vector :inline :offset-assert 256)
|
||||
(user-handle handle 2 :offset 288)
|
||||
)
|
||||
:heap-base #xb0
|
||||
:method-count-assert 17
|
||||
|
||||
+2033
File diff suppressed because it is too large
Load Diff
+642
@@ -0,0 +1,642 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function poly-find-nearest-edge
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 48 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 48 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 48 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 36 signed mismatch
|
||||
;; WARN: Stack slot offset 48 signed mismatch
|
||||
(defun poly-find-nearest-edge ((arg0 nav-poly) (arg1 (inline-array vector)) (arg2 vector) (arg3 vector))
|
||||
"TODO- Not 100% sure here, but unused"
|
||||
(local-vars (sv-32 vector) (sv-36 float) (sv-40 int) (sv-48 float) (sv-80 vector))
|
||||
(set! sv-32 (new 'stack-no-clear 'vector))
|
||||
(set! sv-36 (the-as float 4095996000.0))
|
||||
(set! sv-40 -1)
|
||||
(set! sv-48 (the-as float 0.0))
|
||||
(dotimes (s2-0 3)
|
||||
(let ((s0-0 (-> arg1 s2-0)))
|
||||
(set! sv-80 (-> arg1 (mod (+ s2-0 1) 3)))
|
||||
(let ((f30-0 (vector-line-distance-point! arg2 s0-0 sv-80 sv-32))
|
||||
(s1-1 (vector-! (new 'stack-no-clear 'vector) sv-80 s0-0))
|
||||
)
|
||||
0.0
|
||||
(vector-normalize! s1-1 1.0)
|
||||
(let ((f0-5 (fabs (vector-dot arg3 s1-1))))
|
||||
(when (or (< f30-0 sv-36) (and (= f30-0 sv-36) (< sv-48 f0-5)))
|
||||
(set! sv-36 f30-0)
|
||||
(set! sv-40 s2-0)
|
||||
(set! sv-48 f0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 vertex 0 quad) (-> arg1 sv-40 quad))
|
||||
(set! (-> arg0 vertex1 quad) (-> arg1 (mod (+ sv-40 1) 3) quad))
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function target-collision-low-coverage
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun target-collision-low-coverage ((arg0 control-info)
|
||||
(arg1 collide-query)
|
||||
(arg2 vector)
|
||||
(arg3 (pointer uint32))
|
||||
(arg4 (pointer int64))
|
||||
(arg5 (pointer symbol))
|
||||
)
|
||||
(local-vars
|
||||
(sv-16 vector)
|
||||
(sv-20 (pointer uint32))
|
||||
(sv-24 (pointer int64))
|
||||
(sv-28 (pointer symbol))
|
||||
(sv-32 uint)
|
||||
(sv-40 int)
|
||||
(sv-48 symbol)
|
||||
(sv-52 vector)
|
||||
(sv-56 vector)
|
||||
)
|
||||
(with-pp
|
||||
(set! sv-16 arg2)
|
||||
(set! sv-20 arg3)
|
||||
(set! sv-24 arg4)
|
||||
(set! sv-28 arg5)
|
||||
(set! sv-32 (-> arg3 0))
|
||||
(set! sv-40 (-> arg4 0))
|
||||
(set! sv-48 (-> arg5 0))
|
||||
(set! sv-52 (-> arg0 unknown-vector26))
|
||||
(set! sv-56 (vector-cross! (-> arg0 unknown-vector-kjh1n23kj1n23) (-> arg0 poly-normal) sv-16))
|
||||
(vector-normalize! sv-56 1.0)
|
||||
(if (>= (fabs (vector-dot (-> arg0 dynam gravity-normal) sv-56)) 0.866)
|
||||
(set! sv-32 (logior sv-32 512))
|
||||
)
|
||||
(vector-cross! sv-52 sv-16 sv-56)
|
||||
(if (< 0.0 (vector-dot (-> arg0 dynam gravity-normal) sv-52))
|
||||
(vector-negate! sv-52 sv-52)
|
||||
)
|
||||
(vector-normalize! sv-52 1.0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'collide-query)))
|
||||
(let ((s3-0 (vector-flatten! (-> arg0 unknown-vector-lkjk12nj3n) sv-52 (-> arg0 dynam gravity-normal))))
|
||||
(let ((v1-19 s4-0))
|
||||
(set! (-> v1-19 radius) 409.6)
|
||||
(set! (-> v1-19 collide-with) (-> arg1 best-my-prim prim-core collide-with))
|
||||
(set! (-> v1-19 ignore-process0) #f)
|
||||
(set! (-> v1-19 ignore-process1) #f)
|
||||
(set! (-> v1-19 ignore-pat) (-> arg0 pat-ignore-mask))
|
||||
(set! (-> v1-19 action-mask) (collide-action solid))
|
||||
)
|
||||
(vector-normalize! s3-0 1.0)
|
||||
(if (< (vector-dot s3-0 sv-16) 0.0)
|
||||
(vector-negate! s3-0 s3-0)
|
||||
)
|
||||
(set! (-> arg0 unknown-float-kj1n23k1) 4095996000.0)
|
||||
(set! (-> arg0 unknown-float-n234n23) 4095996000.0)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> arg1 best-other-tri intersect) s3-0 2867.2)
|
||||
(vector-normalize-copy! (-> s4-0 move-dist) (-> arg0 dynam gravity-normal) -20480.0)
|
||||
(vector+float*! (-> s4-0 move-dist) (-> s4-0 move-dist) s3-0 4096.0)
|
||||
(when (>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
|
||||
(set! (-> arg0 unknown-float-kj1n23k1)
|
||||
(vector-dot
|
||||
(-> arg0 dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-other-tri intersect) (-> s4-0 best-other-tri intersect))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 unknown-float-kj1n23j) (the-as float (-> s4-0 best-other-tri pat)))
|
||||
(set! (-> arg0 unknown-vector-l1jn23j quad) (-> s4-0 best-other-tri normal quad))
|
||||
0
|
||||
)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> arg1 best-other-tri intersect) (-> arg0 dynam gravity-normal) 819.2)
|
||||
(vector-normalize-copy! (-> s4-0 move-dist) (-> arg0 dynam gravity-normal) -20480.0)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) s3-0 -819.2)
|
||||
(vector+float*! (-> s4-0 move-dist) (-> s4-0 move-dist) s3-0 -4096.0)
|
||||
)
|
||||
(when (>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
|
||||
(set! (-> arg0 unknown-float-n234n23)
|
||||
(vector-vector-distance (-> s4-0 start-pos) (-> s4-0 best-other-tri intersect))
|
||||
)
|
||||
(set! (-> arg0 unknown-float-m32j45nhn) (the-as float (-> s4-0 best-other-tri pat)))
|
||||
(set! (-> arg0 unknown-vector-kj1n23k quad) (-> s4-0 best-other-tri normal quad))
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (and (not (logtest? sv-32 512))
|
||||
(and (or (< (* 1.25 (-> arg1 best-my-prim local-sphere w)) (-> arg0 unknown-float-kj1n23k1))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-kj1n23j)) 54) 61) 1)
|
||||
)
|
||||
(and (< (-> arg0 unknown-float-n234n23) (* 2.0 (-> arg1 best-my-prim local-sphere w)))
|
||||
(or (zero? (shr (shl (the-as int (-> arg0 unknown-float-m32j45nhn)) 54) 61))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-m32j45nhn)) 54) 61) 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-32 (logior sv-32 128))
|
||||
(set! (-> arg0 unknown-time-frame-kjh1n23hkjn) (-> pp clock frame-counter))
|
||||
(set! sv-40 (logior sv-40 128))
|
||||
(set! (-> arg0 unknown-time-frame08) (-> pp clock frame-counter))
|
||||
(let ((f30-0 (vector-dot sv-52 (-> arg0 unknown-vector10)))
|
||||
(f0-27 (if (logtest? sv-32 2)
|
||||
(cos (- 16384.0 (acos (-> arg0 coverage))))
|
||||
(-> arg0 coverage)
|
||||
)
|
||||
)
|
||||
(f1-11 (vector-dot
|
||||
(-> arg0 dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg0 trans) (-> arg1 best-other-tri intersect))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (or (not (logtest? sv-32 32)) (< 0.5 f0-27))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
)
|
||||
(when (and (or (and (< f0-27 0.95) (>= f30-0 0.0))
|
||||
(and (logtest? sv-32 32) (< f0-27 0.3))
|
||||
(< f1-11 (* -0.25 (-> arg1 best-my-prim local-sphere w)))
|
||||
)
|
||||
(>= (vector-dot sv-52 sv-16) -0.000001)
|
||||
)
|
||||
(set! (-> arg0 surf) *edge-surface*)
|
||||
(set! sv-32 (logior sv-32 1024))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
(when (logtest? sv-32 32)
|
||||
(set! sv-48 #t)
|
||||
(set! sv-32 (logior sv-32 4096))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< (-> arg0 surface-angle) 0.0)
|
||||
(set! sv-48 #t)
|
||||
)
|
||||
(when sv-48
|
||||
(cond
|
||||
((and (or (or (= (-> arg0 poly-pat mode) (pat-mode ground)) (= (-> arg0 poly-pat mode) (pat-mode halfpipe)))
|
||||
(and (logtest? sv-32 8)
|
||||
(>= (* 1.25 (-> arg1 best-my-prim local-sphere w)) (-> arg0 unknown-float-kj1n23k1))
|
||||
(or (zero? (shr (shl (the-as int (-> arg0 unknown-float-kj1n23j)) 54) 61))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-kj1n23j)) 54) 61) 3)
|
||||
)
|
||||
(< 0.3 (fabs (-> arg0 surface-angle)))
|
||||
)
|
||||
)
|
||||
(zero? (logand sv-32 128))
|
||||
)
|
||||
(set! sv-32 (logior sv-32 64))
|
||||
(set! sv-40 (logior sv-40 128))
|
||||
(set! (-> arg0 unknown-time-frame08) (-> pp clock frame-counter))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
)
|
||||
(#t
|
||||
(set! sv-32 (logior sv-32 64))
|
||||
(set! sv-40 (logior sv-40 128))
|
||||
(set! (-> arg0 unknown-time-frame08) (-> pp clock frame-counter))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> sv-24 0) sv-40)
|
||||
(set! (-> sv-20 0) sv-32)
|
||||
(set! (-> sv-28 0) sv-48)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-collision-reaction
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs collide-status.
|
||||
(defbehavior target-collision-reaction target ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector))
|
||||
(local-vars (sv-80 vector) (sv-84 vector) (sv-88 matrix) (sv-96 int) (sv-104 int) (sv-240 symbol))
|
||||
(set! sv-80 (new-stack-vector0))
|
||||
(set! sv-84 (new-stack-vector0))
|
||||
(let ((v1-2 (new 'stack-no-clear 'matrix)))
|
||||
(dotimes (a0-1 2)
|
||||
(set! (-> v1-2 vector a0-1 quad) (the-as uint128 0))
|
||||
)
|
||||
(set! sv-88 v1-2)
|
||||
)
|
||||
(set! sv-96 0)
|
||||
(set! sv-104 0)
|
||||
(set! (-> sv-88 vector 0 quad) (-> arg3 quad))
|
||||
(set! (-> sv-88 vector 1 quad) (-> arg3 quad))
|
||||
(let ((a1-3 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! a1-3 (-> arg1 move-dist) (-> arg1 best-dist))
|
||||
(move-by-vector! arg0 a1-3)
|
||||
)
|
||||
(set! sv-104 (logior sv-104 (react-to-pat! arg0 (-> arg1 best-other-tri pat))))
|
||||
(if (= (-> arg0 poly-pat mode) (pat-mode wall))
|
||||
(set! sv-104 (logior sv-104 1))
|
||||
)
|
||||
(if (logtest? (-> arg0 unknown-surface00 flags) (surface-flag air))
|
||||
(set! sv-104 (logior sv-104 32))
|
||||
)
|
||||
(let ((v1-24 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-24 quad) (-> arg1 best-my-prim prim-core world-sphere quad))
|
||||
(vector-! sv-80 v1-24 (-> arg1 best-other-tri intersect))
|
||||
)
|
||||
(vector-normalize! sv-80 1.0)
|
||||
(set! (-> arg0 coverage) (vector-dot sv-80 (-> arg1 best-other-tri normal)))
|
||||
(when (< (-> arg0 coverage) 0.0)
|
||||
(set! (-> arg0 coverage) 0.0)
|
||||
(vector-flatten! sv-80 sv-80 (-> arg1 best-other-tri normal))
|
||||
(vector-normalize! sv-80 1.0)
|
||||
)
|
||||
(if (< (-> arg0 coverage) 0.9999)
|
||||
(set! sv-104 (logior sv-104 24))
|
||||
)
|
||||
(let ((v1-35 (-> sv-80 quad)))
|
||||
(set! (-> sv-84 quad) v1-35)
|
||||
)
|
||||
(if (= (-> arg1 best-dist) 0.0)
|
||||
(move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-84 3.0))
|
||||
)
|
||||
(set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad))
|
||||
(collide-shape-moving-angle-set! arg0 sv-84 (the-as vector (-> sv-88 vector)))
|
||||
(if (< (-> arg0 poly-angle) -0.2)
|
||||
(set! sv-96 (logior sv-96 16))
|
||||
)
|
||||
(if (< (-> arg0 poly-angle) 0.0)
|
||||
(set! sv-96 (logior sv-96 #x4000))
|
||||
)
|
||||
(if (!= (-> arg1 best-my-prim prim-id) 6)
|
||||
(set! sv-104 (logior sv-104 #x8000))
|
||||
)
|
||||
(if (and (= (-> arg0 cur-pat mode) (pat-mode halfpipe)) (< (-> arg0 poly-angle) 0.75))
|
||||
(send-event (-> arg0 process) 'slide)
|
||||
)
|
||||
(set! sv-240 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle)))
|
||||
(if (and sv-240 (and (= (-> arg0 unknown-surface00 mode) 'dive) (< 0.4 (fabs (-> arg0 surface-angle)))))
|
||||
(set! sv-240 (the-as symbol #f))
|
||||
)
|
||||
(if (and (logtest? sv-104 #x8000) (logtest? sv-104 32) (>= (-> arg0 poly-angle) 0.0) (not sv-240))
|
||||
(set! sv-240 #t)
|
||||
)
|
||||
(if sv-240
|
||||
(set! sv-104 (logior sv-104 2))
|
||||
)
|
||||
(if (logtest? sv-104 8)
|
||||
(target-collision-low-coverage
|
||||
arg0
|
||||
arg1
|
||||
sv-84
|
||||
(the-as (pointer uint32) (& sv-104))
|
||||
(the-as (pointer int64) (& sv-96))
|
||||
(& sv-240)
|
||||
)
|
||||
)
|
||||
(when (not (logtest? (-> arg0 prev-status) (collide-status on-surface)))
|
||||
(set! (-> arg0 unknown-vector-kj1n231 quad) (-> arg0 transv quad))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
(set! (-> arg0 unknown-float21) (- (vector-dot (-> arg0 transv) sv-84)))
|
||||
(set! sv-96 (logior sv-96 2048))
|
||||
(if (nonzero? (-> arg0 unknown-surface01 impact-hook))
|
||||
((-> arg0 unknown-surface01 impact-hook) arg0 (the-as (pointer float) (-> sv-88 vector)) sv-84)
|
||||
)
|
||||
(when (not sv-240)
|
||||
(let ((f0-21 (- 1.0 (-> arg0 unknown-surface01 impact-fric))))
|
||||
(when (< f0-21 1.0)
|
||||
(let ((v1-113 (new-stack-vector0))
|
||||
(f1-13 (vector-dot (-> arg0 dynam gravity-normal) (the-as vector (-> sv-88 vector))))
|
||||
)
|
||||
0.0
|
||||
(vector-!
|
||||
v1-113
|
||||
(the-as vector (-> sv-88 vector))
|
||||
(vector-float*! v1-113 (-> arg0 dynam gravity-normal) f1-13)
|
||||
)
|
||||
(let* ((f2-2 (vector-length v1-113))
|
||||
(f3-0 f2-2)
|
||||
)
|
||||
(if (< f1-13 0.0)
|
||||
(set! f1-13 (* f1-13 f0-21))
|
||||
)
|
||||
(vector+!
|
||||
(the-as vector (-> sv-88 vector))
|
||||
(vector-float*! (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal) f1-13)
|
||||
(vector-float*! v1-113 v1-113 (/ f2-2 f3-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-96 (logior sv-96 4))
|
||||
(cond
|
||||
((-> arg1 num-spheres)
|
||||
(set! sv-96 (logior sv-96 32))
|
||||
(set! (-> arg0 unknown-vector001 quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> arg0 unknown-vector-kij1b231 quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-handle00)
|
||||
(process->handle (-> (the-as collide-shape-prim (-> arg1 num-spheres)) cshape process))
|
||||
)
|
||||
)
|
||||
((= (-> arg0 poly-pat material) (pat-material waterbottom))
|
||||
)
|
||||
(else
|
||||
(set! sv-96 (logior sv-96 4096))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(sv-240
|
||||
(set! sv-104 (logior sv-104 4))
|
||||
(set! sv-96 (logior sv-96 8))
|
||||
(set! (-> arg0 cur-pat mode) 1)
|
||||
(set! (-> arg0 unknown-vector24 quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> arg0 unknown-vector-kj1hj2b3 quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-vector25 quad) (-> sv-84 quad))
|
||||
(set! (-> arg0 unknown-pat-surface00) (-> arg1 best-other-tri pat))
|
||||
(cond
|
||||
((and (logtest? (focus-status mech) (-> (the-as process-focusable (-> arg0 process)) focus-status))
|
||||
(logtest? sv-104 #x8000)
|
||||
(logtest? sv-104 32)
|
||||
(< 0.0 (vector-dot sv-84 (-> arg0 dynam gravity-normal)))
|
||||
(< 0.0 (vector-dot (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal)))
|
||||
)
|
||||
(set! (-> arg0 surf) *edge-surface*)
|
||||
(set! sv-104 (logior #x10000 sv-104))
|
||||
(vector-flatten! arg2 (vector-negate! (new 'stack-no-clear 'vector) (-> arg0 dynam gravity-normal)) sv-84)
|
||||
(vector-normalize! arg2 (vector-dot arg2 (the-as vector (-> sv-88 vector))))
|
||||
)
|
||||
(else
|
||||
(vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (or (and (>= (-> arg1 best-my-prim local-sphere w)
|
||||
(vector-dot
|
||||
(-> arg0 ground-poly-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-other-tri intersect) (-> arg0 grount-touch-point))
|
||||
)
|
||||
)
|
||||
(< (- (-> self clock frame-counter) (-> arg0 unknown-time-frame05)) (seconds 0.3))
|
||||
)
|
||||
(logtest? sv-104 #x8000)
|
||||
)
|
||||
(>= (vector-dot
|
||||
(-> arg0 dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-other-tri intersect) (-> arg0 grount-touch-point))
|
||||
)
|
||||
0.0
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2)) (zero? (logand sv-104 32)))
|
||||
)
|
||||
(set! sv-104 (logior sv-104 256))
|
||||
(set! sv-104 (logand -65 sv-104))
|
||||
(let ((s3-4 (vector-cross! (new 'stack-no-clear 'vector) (-> arg0 poly-normal) (-> arg0 ground-poly-normal))))
|
||||
(vector-normalize! s3-4 1.0)
|
||||
(vector-float*! arg2 s3-4 (vector-dot (the-as vector (-> sv-88 vector)) s3-4))
|
||||
)
|
||||
(vector+! arg2 arg2 (-> arg0 poly-normal))
|
||||
)
|
||||
(else
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! sv-96 (logior sv-96 1))
|
||||
(set! (-> arg0 cur-pat mode) 0)
|
||||
(if (= (-> arg1 best-my-prim prim-id) 6)
|
||||
(set! (-> arg0 local-normal quad) (-> sv-84 quad))
|
||||
)
|
||||
(if (and (logtest? (focus-status board) (-> (the-as process-focusable (-> arg0 process)) focus-status))
|
||||
(not (logtest? (focus-status halfpipe) (-> (the-as process-focusable (-> arg0 process)) focus-status)))
|
||||
(!= (-> arg0 cur-pat mode) 3)
|
||||
(!= (-> arg0 ground-pat mode) 3)
|
||||
)
|
||||
(vector-reflect-flat-gravity! arg2 (the-as vector (-> sv-88 vector)) sv-84 (-> arg0 dynam gravity-normal))
|
||||
(vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84)
|
||||
)
|
||||
(vector+! arg2 arg2 sv-84)
|
||||
(let ((f0-32 (-> arg0 unknown-surface01 slope-change-preserve)))
|
||||
(when (< 0.0 f0-32)
|
||||
(let ((v1-223 (new-stack-vector0)))
|
||||
(let ((f1-25 (vector-dot (-> arg0 unknown-vector14) (the-as vector (-> sv-88 vector)))))
|
||||
0.0
|
||||
(vector-! v1-223 (the-as vector (-> sv-88 vector)) (vector-float*! v1-223 (-> arg0 unknown-vector14) f1-25))
|
||||
)
|
||||
(let ((f1-26 (vector-length v1-223)))
|
||||
f1-26
|
||||
(let ((f1-27 f1-26)
|
||||
(f2-5 (vector-length arg2))
|
||||
)
|
||||
(if (and (< 409.6 (fabs (- f2-5 f1-27))) (< f2-5 f1-27))
|
||||
(vector-normalize! arg2 (lerp-scale f2-5 f1-27 f0-32 0.0 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 grount-touch-point w) 0.0)
|
||||
(when (not (logtest? sv-104 #x400f))
|
||||
(set! sv-96 (logior sv-96 2))
|
||||
(set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-vector22 quad) (-> sv-84 quad))
|
||||
(set! (-> arg0 unknown-float0000) (vector-dot sv-84 (-> arg0 dynam gravity-normal)))
|
||||
(set! (-> arg0 unknown-time-frame05) (-> self clock frame-counter))
|
||||
(set! (-> arg0 ground-pat) (-> arg0 poly-pat))
|
||||
(set! (-> arg0 grount-touch-point quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> arg0 unknown-vector-kjh1n23k1 quad) (-> arg1 best-my-prim prim-core world-sphere quad))
|
||||
(set! sv-104 (logior sv-104 2048))
|
||||
(if (= (-> arg0 poly-pat material) (pat-material waterbottom))
|
||||
(set! sv-96 (logior sv-96 1024))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 status) sv-96)
|
||||
(set! (-> arg0 reaction-flag) (the-as cshape-reaction-flags sv-104))
|
||||
(when *debug-segment*
|
||||
(+! (-> arg0 unknown-halfword00) 1)
|
||||
(let ((v1-260
|
||||
(clear-record-tags! *history* (history-channel surface-normal) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-260 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-260 vector quad) (-> arg0 surface-normal quad))
|
||||
)
|
||||
(let ((v1-263
|
||||
(clear-record-tags! *history* (history-channel local-normal) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-263 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-263 vector quad) (-> arg0 local-normal quad))
|
||||
)
|
||||
(set! (-> (clear-record-tags! *history* (history-channel intersect) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
vector
|
||||
quad
|
||||
)
|
||||
(-> arg1 best-other-tri intersect quad)
|
||||
)
|
||||
(let ((v1-269
|
||||
(clear-record-tags! *history* (history-channel transv-out) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-269 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-269 vector quad) (-> arg2 quad))
|
||||
)
|
||||
(let ((v1-272
|
||||
(clear-record-tags! *history* (history-channel transv-in) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-272 origin quad) (-> arg1 best-other-tri intersect quad))
|
||||
(set! (-> v1-272 vector quad) (-> sv-88 vector 1 quad))
|
||||
)
|
||||
(let ((v1-275 (clear-record-tags! *history* (history-channel transv) (-> arg0 unknown-halfword00) (the-as uint 2)))
|
||||
)
|
||||
(set! (-> v1-275 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-275 vector quad) (-> arg0 transv quad))
|
||||
)
|
||||
(set! (-> (clear-record-tags! *history* (history-channel trans) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
vector
|
||||
quad
|
||||
)
|
||||
(-> arg0 trans quad)
|
||||
)
|
||||
(let ((v1-281 (clear-record-tags! *history* (history-channel pat) (-> arg0 unknown-halfword00) (the-as uint 2))))
|
||||
(set! (-> v1-281 vector x) (the-as float (-> arg0 cur-pat)))
|
||||
)
|
||||
(let ((v1-283
|
||||
(clear-record-tags! *history* (history-channel collide-status) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-283 collide-status) (-> arg0 status))
|
||||
(set! (-> v1-283 vector z) (the-as float (-> arg0 reaction-flag)))
|
||||
)
|
||||
)
|
||||
(the-as collide-status sv-96)
|
||||
)
|
||||
|
||||
;; definition for function target-collision-no-reaction
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun target-collision-no-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector))
|
||||
(if (= (-> arg0 unknown-surface00 mode) 'air)
|
||||
(logior! (-> arg0 reaction-flag) (cshape-reaction-flags csrf05))
|
||||
)
|
||||
(when *debug-segment*
|
||||
(+! (-> arg0 unknown-halfword00) 1)
|
||||
(let ((v1-9
|
||||
(clear-record-tags! *history* (history-channel transv-out) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-9 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-9 vector quad) (-> arg2 quad))
|
||||
)
|
||||
(let ((v1-12
|
||||
(clear-record-tags! *history* (history-channel transv-in) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-12 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-12 vector quad) (-> arg3 quad))
|
||||
)
|
||||
(let ((v1-15 (clear-record-tags! *history* (history-channel transv) (-> arg0 unknown-halfword00) (the-as uint 2))))
|
||||
(set! (-> v1-15 origin quad) (-> arg0 trans quad))
|
||||
(set! (-> v1-15 vector quad) (-> arg0 transv quad))
|
||||
)
|
||||
(set! (-> (clear-record-tags! *history* (history-channel trans) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
vector
|
||||
quad
|
||||
)
|
||||
(-> arg0 trans quad)
|
||||
)
|
||||
(let ((v1-21
|
||||
(clear-record-tags! *history* (history-channel collide-status) (-> arg0 unknown-halfword00) (the-as uint 2))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-21 collide-status) (logior (-> arg0 status) (collide-status no-touch)))
|
||||
(set! (-> v1-21 vector z) (the-as float (-> arg0 reaction-flag)))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for symbol *collide-edge-board-spec*, type collide-edge-spec
|
||||
(define *collide-edge-board-spec* (new 'static 'collide-edge-spec
|
||||
:split-dists (new 'static 'array float 2 1024.0 1433.6)
|
||||
:outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0)
|
||||
:flags (collide-edge-spec-flags find-adjacent-edge send-event)
|
||||
:ignore-pat (new 'static 'pat-surface :noentity #x1 :nogrind #x1 :probe #x1)
|
||||
:max-dist-sqrd-to-outward-pt 67108864.0
|
||||
:max-dir-cosa-delta -1.0
|
||||
:max-dir-cosa-player -2.0
|
||||
:touching-segment #f
|
||||
:local-cache-fill-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -12288.0 :y -11059.2 :z -12288.0 :w 1.0)
|
||||
:max (new 'static 'vector :x 12288.0 :y 16384.0 :z 12288.0 :w 1.0)
|
||||
)
|
||||
:local-within-reach-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -11878.4 :y -2867.2 :z -11878.4 :w 1.0)
|
||||
:max (new 'static 'vector :x 11878.4 :y 2867.2 :z 11878.4 :w 1.0)
|
||||
)
|
||||
:local-player-spheres (new 'static 'inline-array sphere 12
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x 2539.52 :y -819.2 :r 1433.6)
|
||||
(new 'static 'sphere :x -737.28 :y 4096.0 :r 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 6553.6 :r 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 9420.8 :r 3072.0)
|
||||
(new 'static 'sphere :x 1720.32 :y 3686.4 :r 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 5734.4 :r 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 8601.6 :r 2949.12)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function rail-surface-touch
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior rail-surface-touch target ()
|
||||
(when (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame02)) (seconds 0.2))
|
||||
(logclear! (-> *collide-edge-board-spec* flags) (collide-edge-spec-flags one send-event))
|
||||
(set! (-> *collide-edge-board-spec* touching-segment) #f)
|
||||
(do-edge-grabs *target* *collide-cache* *collide-edge-board-spec*)
|
||||
(logior! (-> *collide-edge-board-spec* flags) (collide-edge-spec-flags send-event))
|
||||
(let ((gp-0 *edge-grab-info*))
|
||||
(when (-> gp-0 found-edge?)
|
||||
(vector-normalize!
|
||||
(vector-! (-> self control unknown-vector34) (the-as vector (-> gp-0 world-vertex)) (-> gp-0 world-vertex 1))
|
||||
1.0
|
||||
)
|
||||
(set! (-> self control unknown-vector36 quad) (-> gp-0 hanging-matrix vector 0 quad))
|
||||
(send-event
|
||||
self
|
||||
'push-transv
|
||||
(vector-float*!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(-> self control unknown-vector36)
|
||||
(seek
|
||||
(vector-length (-> self control unknown-vector18))
|
||||
40960.0
|
||||
(* 81920.0 (-> self clock seconds-per-frame))
|
||||
)
|
||||
)
|
||||
90
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function gravel-surface-touch
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun gravel-surface-touch ()
|
||||
0
|
||||
(none)
|
||||
)
|
||||
+39
-39
@@ -3,45 +3,45 @@
|
||||
|
||||
;; definition of type surface
|
||||
(deftype surface (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(turnv float :offset-assert 8)
|
||||
(turnvv float :offset-assert 12)
|
||||
(tiltv float :offset-assert 16)
|
||||
(tiltvv float :offset-assert 20)
|
||||
(transv-max float :offset-assert 24)
|
||||
(target-speed float :offset-assert 28)
|
||||
(seek0 float :offset-assert 32)
|
||||
(seek90 float :offset-assert 36)
|
||||
(seek180 float :offset-assert 40)
|
||||
(fric float :offset-assert 44)
|
||||
(nonlin-fric-dist float :offset-assert 48)
|
||||
(slip-factor float :offset-assert 52)
|
||||
(slide-factor float :offset-assert 56)
|
||||
(slope-up-factor float :offset-assert 60)
|
||||
(slope-down-factor float :offset-assert 64)
|
||||
(slope-slip-angle float :offset-assert 68)
|
||||
(impact-fric float :offset-assert 72)
|
||||
(bend-factor float :offset-assert 76)
|
||||
(bend-speed float :offset-assert 80)
|
||||
(alignv float :offset-assert 84)
|
||||
(slope-up-traction float :offset-assert 88)
|
||||
(align-speed float :offset-assert 92)
|
||||
(slope-change-preserve float :offset-assert 96)
|
||||
(turnvf float :offset-assert 100)
|
||||
(turnvvf float :offset-assert 104)
|
||||
(tiltvf float :offset-assert 108)
|
||||
(tiltvvf float :offset-assert 112)
|
||||
(vel-turn float :offset-assert 116)
|
||||
(active-hook (function none) :offset 128)
|
||||
(touch-hook (function none) :offset-assert 132)
|
||||
(impact-hook function :offset-assert 136)
|
||||
(mult-hook (function surface surface surface int none) :offset-assert 140)
|
||||
(exit-hook function :offset-assert 144)
|
||||
(mode symbol :offset-assert 148)
|
||||
(flags surface-flag :offset-assert 152)
|
||||
(data float 30 :offset 8)
|
||||
(hook function 4 :offset 128)
|
||||
(dataw uint32 2 :offset 148)
|
||||
((name symbol :offset-assert 4)
|
||||
(turnv float :offset-assert 8)
|
||||
(turnvv float :offset-assert 12)
|
||||
(tiltv float :offset-assert 16)
|
||||
(tiltvv float :offset-assert 20)
|
||||
(transv-max float :offset-assert 24)
|
||||
(target-speed float :offset-assert 28)
|
||||
(seek0 float :offset-assert 32)
|
||||
(seek90 float :offset-assert 36)
|
||||
(seek180 float :offset-assert 40)
|
||||
(fric float :offset-assert 44)
|
||||
(nonlin-fric-dist float :offset-assert 48)
|
||||
(slip-factor float :offset-assert 52)
|
||||
(slide-factor float :offset-assert 56)
|
||||
(slope-up-factor float :offset-assert 60)
|
||||
(slope-down-factor float :offset-assert 64)
|
||||
(slope-slip-angle float :offset-assert 68)
|
||||
(impact-fric float :offset-assert 72)
|
||||
(bend-factor float :offset-assert 76)
|
||||
(bend-speed float :offset-assert 80)
|
||||
(alignv float :offset-assert 84)
|
||||
(slope-up-traction float :offset-assert 88)
|
||||
(align-speed float :offset-assert 92)
|
||||
(slope-change-preserve float :offset-assert 96)
|
||||
(turnvf float :offset-assert 100)
|
||||
(turnvvf float :offset-assert 104)
|
||||
(tiltvf float :offset-assert 108)
|
||||
(tiltvvf float :offset-assert 112)
|
||||
(vel-turn float :offset-assert 116)
|
||||
(active-hook (function none) :offset 128)
|
||||
(touch-hook (function none) :offset 132)
|
||||
(impact-hook (function control-info (pointer float) vector none) :offset 136)
|
||||
(mult-hook (function surface surface surface int none) :offset-assert 140)
|
||||
(exit-hook function :offset-assert 144)
|
||||
(mode symbol :offset-assert 148)
|
||||
(flags surface-flag :offset-assert 152)
|
||||
(data float 30 :offset 8)
|
||||
(hook function 4 :offset 128)
|
||||
(dataw uint32 2 :offset 148)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x9c
|
||||
|
||||
+1885
File diff suppressed because it is too large
Load Diff
+1
-6
@@ -663,12 +663,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 #f)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(target-hit-ground-anim #f (are-still?))
|
||||
(go target-carry-stance)
|
||||
(none)
|
||||
)
|
||||
|
||||
+2
-12
@@ -2027,12 +2027,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 #f)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(target-hit-ground-anim #f (are-still?))
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
@@ -3814,12 +3809,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((gp-0 target-hit-ground-anim)
|
||||
(s5-0 arg0)
|
||||
)
|
||||
(are-still?)
|
||||
(gp-0 s5-0)
|
||||
)
|
||||
(target-hit-ground-anim arg0 (are-still?))
|
||||
(go target-falling #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -201,9 +201,9 @@
|
||||
"(method 11 grid-hash)",
|
||||
"(method 15 sphere-hash)",
|
||||
|
||||
|
||||
|
||||
"i-hopefully-will-never-exist-dont-add-anything-after-me-please"
|
||||
// process-drawable - return from thread
|
||||
"(method 19 process-drawable)",
|
||||
"(method 10 joint-control)"
|
||||
],
|
||||
|
||||
"skip_compile_states": {
|
||||
|
||||
Reference in New Issue
Block a user