mirror of
https://github.com/open-goal/jak-project
synced 2026-08-28 16:52:26 -04:00
[decomp] finish up nav-graph, traffic-engine, traffic-manager, height-map (#2191)
Some of these were almost done, just needed a few more types.
This commit is contained in:
+348
-260
@@ -9003,17 +9003,41 @@
|
||||
:size-assert #x29
|
||||
:flag-assert #xd00000029
|
||||
(:methods
|
||||
(traffic-suppression-params-method-9 (_type_) symbol 9)
|
||||
(traffic-suppression-params-method-10 (_type_) symbol 10)
|
||||
(try-creating-new-suppression-box "Try getting new suppression box, return if it succeeded. ID is stored in the params." (_type_) symbol 9)
|
||||
(create-or-update-suppression-box "If the params are already associated with a box, update. Otherwise, attempt to create a new one." (_type_) symbol 10)
|
||||
(has-valid-id? (_type_) none 11)
|
||||
(traffic-suppression-params-method-12 (_type_) none 12)
|
||||
(kill-suppression-box "Kill a suppression box, and inform the traffic manager by setting duration to 0." (_type_) none 12)
|
||||
)
|
||||
)
|
||||
|
||||
;; +++traffic-h:traffic-type
|
||||
(defenum traffic-type
|
||||
:type uint8
|
||||
(citizen-norm-1 0)
|
||||
(citizen-chick 1)
|
||||
(citizen-fat 2)
|
||||
(citizen-norm-2 3)
|
||||
(crimson-guard-0 4)
|
||||
(crimson-guard-1 6)
|
||||
(crimson-guard-2 7)
|
||||
(metalhead-grunt 8)
|
||||
(metalhead-flitter 9)
|
||||
(metalhead-predator 10)
|
||||
(bikea 11)
|
||||
(bikeb 12)
|
||||
(bikec 13)
|
||||
(cara 14)
|
||||
(carb 15)
|
||||
(carc 16)
|
||||
(guard-bike 18)
|
||||
(hellcat 19)
|
||||
)
|
||||
;; ---traffic-h:traffic-type
|
||||
|
||||
(declare-type nav-mesh basic)
|
||||
(declare-type nav-branch structure)
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type uint8 :offset-assert 0)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
@@ -13308,6 +13332,9 @@
|
||||
(speech-type-1 1)
|
||||
(speech-type-2 2)
|
||||
(speech-type-3 3)
|
||||
(speech-type-4 4)
|
||||
(speech-type-5 5)
|
||||
|
||||
)
|
||||
;; ---speech-h:speech-type
|
||||
|
||||
@@ -18389,8 +18416,8 @@
|
||||
target-mech-stance
|
||||
(target-mech-start handle float symbol)
|
||||
target-mech-walk
|
||||
target-pilot-edge-grab
|
||||
(target-pilot-start handle)
|
||||
(target-pilot-edge-grab pilot-edge-grab-info)
|
||||
(target-pilot-start handle symbol symbol)
|
||||
(target-play-anim string handle)
|
||||
(target-pole-cycle handle)
|
||||
(target-pole-flip-forward float float float)
|
||||
@@ -18427,6 +18454,14 @@
|
||||
(target-warp-in vector vector target) ;; (define-extern target-warp-in state) ;; (state vector vector target)
|
||||
(target-warp-out vector vector target) ;; (define-extern target-warp-out state) ;; (state vector vector target)
|
||||
target-yellow-jump-blast ;; called in (code target-flop), but not defined, causes crash on PCSX2
|
||||
target-pilot-stance
|
||||
target-pilot-impact
|
||||
target-pilot-get-on
|
||||
target-pilot-get-off
|
||||
target-pilot-grab
|
||||
(target-pilot-clone-anim handle)
|
||||
(target-pilot-hit symbol attack-info)
|
||||
(target-pilot-death symbol)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -18619,6 +18654,7 @@
|
||||
(declare-type entity-race-mesh entity)
|
||||
(declare-type entity-nav-mesh entity)
|
||||
(declare-type actor-group basic)
|
||||
(declare-type city-level-info structure)
|
||||
|
||||
(defenum texture-page-flag
|
||||
:type uint16
|
||||
@@ -18673,8 +18709,7 @@
|
||||
;; 200 is some array
|
||||
;; 204 is maybe that array's length
|
||||
(wind-array-length int32 :offset 204)
|
||||
;; 208 is a structure of some sort - (method 97 vehicle)
|
||||
(bsp-header-jkh1b23 clock :offset 208)
|
||||
(city-level-info city-level-info :offset 208)
|
||||
(vis-spheres vector-array :offset 216)
|
||||
(region-tree drawable-tree-region-prim :offset 252)
|
||||
|
||||
@@ -18936,6 +18971,13 @@
|
||||
)
|
||||
)
|
||||
|
||||
(deftype collide-query-with-5vec (structure)
|
||||
"A custom type"
|
||||
((cquery collide-query :inline)
|
||||
(vec vector 5 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype do-push-aways-work (structure)
|
||||
"Added"
|
||||
((cquery collide-query :inline)
|
||||
@@ -28251,7 +28293,7 @@
|
||||
(seat-index int8 :offset-assert 41)
|
||||
(backup-nav-radius float :offset-assert 44)
|
||||
(cam-side-shift float :offset-assert 48)
|
||||
(enable-cam-side-shift basic :offset-assert 52)
|
||||
(enable-cam-side-shift symbol :offset-assert 52)
|
||||
(gun? symbol :offset-assert 56)
|
||||
(controls vehicle-controls :inline :offset-assert 60)
|
||||
(accel-array vector 8 :inline :offset-assert 80)
|
||||
@@ -31783,7 +31825,7 @@
|
||||
(width float :offset-assert 60)
|
||||
(minimap_edge_flag nav-minimap-edge-flag :offset-assert 64)
|
||||
)
|
||||
:pack-me
|
||||
:allow-misaligned
|
||||
:method-count-assert 10
|
||||
:size-assert #x44
|
||||
:flag-assert #xa00000044
|
||||
@@ -31826,7 +31868,7 @@
|
||||
)
|
||||
|
||||
(deftype mysql-nav-graph-level-info (structure)
|
||||
((level string :offset-assert 0)
|
||||
((level symbol :offset-assert 0) ;; ??
|
||||
(level-id uint32 :offset-assert 4)
|
||||
(node-count int32 :offset-assert 8)
|
||||
(branch-count int32 :offset-assert 12)
|
||||
@@ -33316,12 +33358,12 @@
|
||||
(active () _type_ :state 28)
|
||||
(rigid-body-object-method-29 (_type_ float) none 29)
|
||||
(rigid-body-object-method-30 (_type_) none 30)
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-object-constants) none 31)
|
||||
(rigid-body-object-method-32 (_type_) none 32)
|
||||
(rigid-body-object-method-33 (_type_) none 33)
|
||||
(alloc-and-init-rigid-body-control (_type_ rigid-body-object-constants) none 31)
|
||||
(allocate-and-init-cshape (_type_) none 32)
|
||||
(init-skel-and-rigid-body (_type_) none 33)
|
||||
(rigid-body-object-method-34 (_type_) none 34)
|
||||
(rigid-body-object-method-35 (_type_) none 35)
|
||||
(rigid-body-object-method-36 (_type_) none 36)
|
||||
(do-engine-sounds (_type_) none 36)
|
||||
(rigid-body-object-method-37 (_type_) none 37)
|
||||
(rigid-body-object-method-38 (_type_) none 38)
|
||||
(rigid-body-object-method-39 (_type_) none 39)
|
||||
@@ -34039,7 +34081,7 @@
|
||||
(deftype joint-exploder-static-params (basic)
|
||||
((joints (array joint-exploder-static-joint-params) :offset-assert 4) ;; guessed by decompiler
|
||||
(collide-spec uint32 :offset-assert 8)
|
||||
(art-level basic :offset-assert 12)
|
||||
(art-level symbol :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
@@ -48472,16 +48514,37 @@
|
||||
;; nav-graph-h ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defenum nav-branch-clock-type
|
||||
:type uint8
|
||||
(no-clock 0)
|
||||
(clock2 1)
|
||||
(clock3 2)
|
||||
(clock4 3)
|
||||
)
|
||||
|
||||
(defenum nav-branch-clock-mask
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(phase-1 0)
|
||||
(phase-1a 1)
|
||||
(phase-2 2)
|
||||
(phase-2a 3)
|
||||
(phase-3 4)
|
||||
(phase-3a 5)
|
||||
(phase-4 6)
|
||||
(phase-4a 7)
|
||||
)
|
||||
|
||||
(declare-type nav-node structure)
|
||||
(deftype nav-branch (structure)
|
||||
((node int32 2 :offset-assert 0)
|
||||
((node nav-node 2 :offset-assert 0)
|
||||
(src-node nav-node :offset 0)
|
||||
(dest-node nav-node :offset 4)
|
||||
(temp-dest-node-id int32 :offset 4)
|
||||
(speed-limit uint8 :offset-assert 8)
|
||||
(density uint8 :offset-assert 9)
|
||||
(clock-type uint8 :offset-assert 10)
|
||||
(clock-mask uint8 :offset-assert 11)
|
||||
(clock-type nav-branch-clock-type :offset-assert 10)
|
||||
(clock-mask nav-branch-clock-mask :offset-assert 11)
|
||||
(max-user-count uint8 :offset-assert 12)
|
||||
(user-count uint8 :offset-assert 13)
|
||||
(width uint8 :offset-assert 14)
|
||||
@@ -48491,8 +48554,8 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #x1500000010
|
||||
(:methods
|
||||
(nav-branch-method-9 (_type_) none 9)
|
||||
(nav-branch-method-10 (_type_ object int) none 10)
|
||||
(set-default-density-speed-and-width (_type_) none 9)
|
||||
(debug-print (_type_ object int) none 10)
|
||||
(get-density
|
||||
"TODO
|
||||
@returns `density * 0.0078125` - is this some kind of trick?"
|
||||
@@ -48510,11 +48573,11 @@
|
||||
"@returns if `dest-node`'s `id` is equal to `#FFFF`
|
||||
@see [[nav-node]]"
|
||||
(_type_) symbol 15)
|
||||
(nav-branch-method-16 (_type_ float) none 16)
|
||||
(nav-branch-method-17 (_type_ float) none 17)
|
||||
(nav-branch-method-18 (_type_ float) none 18)
|
||||
(nav-branch-method-19 (_type_ nav-node) none 19)
|
||||
(nav-branch-method-20 (_type_ nav-node) none 20)
|
||||
(set-density (_type_ float) none 16)
|
||||
(set-speed-limit (_type_ float) none 17)
|
||||
(set-width (_type_ float) none 18)
|
||||
(set-src-node (_type_ nav-node) none 19)
|
||||
(set-dst-node (_type_ nav-node) none 20)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48550,15 +48613,15 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x1600000020
|
||||
(:methods
|
||||
(nav-node-method-9 (_type_) none 9)
|
||||
(nav-node-method-10 (_type_ symbol string) none 10)
|
||||
(nav-node-method-11 (_type_ int) none 11)
|
||||
(nav-node-method-12 (_type_ vector nav-node) none 12)
|
||||
(nav-node-method-13 (_type_ vector) none 13)
|
||||
(nav-node-method-14 (_type_ vector) none 14)
|
||||
(nav-node-method-15 (_type_ uint) none 15)
|
||||
(nav-node-method-16 (_type_ float) none 16)
|
||||
(nav-node-method-17 (_type_ float) none 17)
|
||||
(debug-draw (_type_) none 9)
|
||||
(debug-print (_type_ symbol string) none 10)
|
||||
(remove-branch-by-idx (_type_ int) none 11)
|
||||
(init-from-pt-and-heading (_type_ vector vector) none 12)
|
||||
(set-pos-xyz (_type_ vector) none 13)
|
||||
(set-angle-from-heading (_type_ vector) none 14)
|
||||
(set-id-and-link-branches-back (_type_ uint) none 15)
|
||||
(set-radius (_type_ float) none 16)
|
||||
(set-angle (_type_ float) none 17)
|
||||
(get-position
|
||||
"@param! ret The [[vector]] that is modified to hold the result
|
||||
@returns the `position` [[vector]] with a `w` component of `1.0`"
|
||||
@@ -48608,35 +48671,35 @@
|
||||
:flag-assert #x2d0000003c
|
||||
(:methods
|
||||
(new (symbol type int int int uint) _type_ 0)
|
||||
(nav-graph-method-9 (_type_) none 9)
|
||||
(debug-draw-nodes (_type_) none 9)
|
||||
(nav-graph-method-10 (_type_ vector int) none 10)
|
||||
(nav-graph-method-11 (_type_) none 11)
|
||||
(nav-graph-method-12 (_type_) none 12)
|
||||
(nav-graph-method-13 (_type_ int int) none 13)
|
||||
(nav-graph-method-14 (_type_ int int) none 14)
|
||||
(nav-graph-method-15 (_type_) none 15)
|
||||
(nav-graph-method-16 (_type_ int) nav-node 16)
|
||||
(nav-graph-method-17 (_type_ nav-node) none 17)
|
||||
(nav-graph-method-18 (_type_ nav-node int) none 18)
|
||||
(debug-reset (_type_) none 15)
|
||||
(debug-add-node (_type_ int) nav-node 16)
|
||||
(debug-link-node-to-graph (_type_ nav-node) none 17)
|
||||
(debug-reset-branch-array "kinda dangerous" (_type_ nav-node int) none 18)
|
||||
(nav-graph-method-19 (_type_ int int int int int int) none 19)
|
||||
(nav-graph-method-20 (_type_ int int) none 20)
|
||||
(nav-graph-method-21 (_type_) none 21)
|
||||
(nav-graph-method-22 (_type_ int int) none 22)
|
||||
(nav-graph-method-23 (_type_ int int) none 23)
|
||||
(nav-graph-method-24 (_type_ int int) none 24)
|
||||
(nav-graph-method-25 (_type_ symbol symbol) none 25)
|
||||
(nav-graph-method-26 (_type_ symbol symbol) none 26)
|
||||
(nav-graph-method-27 (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none 27)
|
||||
(nav-graph-method-28 (_type_) none 28)
|
||||
(nav-graph-method-29 (_type_ symbol) none 29)
|
||||
(nav-graph-method-30 (_type_ uint) none 30)
|
||||
(nav-graph-method-31 (_type_ float) none 31)
|
||||
(nav-graph-method-32 (_type_ float) none 32)
|
||||
(nav-graph-method-33 (_type_ float) none 33)
|
||||
(nav-graph-method-34 (_type_ float) none 34)
|
||||
(nav-graph-method-35 (_type_ int) none 35)
|
||||
(nav-graph-method-36 (_type_ int) none 36)
|
||||
(nav-graph-method-37 (_type_ vector) none 37)
|
||||
(move-selected-to-height-map-height (_type_) none 21)
|
||||
(select-nodes-in-range (_type_ int int) none 22)
|
||||
(deselect-nodes-in-range (_type_ int int) none 23)
|
||||
(toggle-select-nodes-in-range (_type_ int int) none 24)
|
||||
(select-nodes-in-level (_type_ symbol symbol) none 25)
|
||||
(select-nodes-by-nav-mesh-id (_type_ int symbol) none 26)
|
||||
(select-nodes-by-flags (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none 27)
|
||||
(print-selected-nodes (_type_) none 28)
|
||||
(assign-selected-nodes-to-level (_type_ symbol) none 29)
|
||||
(assign-selected-nodes-to-nav-mesh (_type_ uint) none 30)
|
||||
(set-radius-of-selected-nodes (_type_ float) none 31)
|
||||
(set-speed-limit-of-selected (_type_ float) none 32)
|
||||
(set-density-of-selected (_type_ float) none 33)
|
||||
(set-width-of-selected (_type_ float) none 34)
|
||||
(or-flags-of-selected-nodes (_type_ nav-node-flag-byte) none 35)
|
||||
(and-flags-of-selected-nodes (_type_ nav-node-flag-byte) none 36)
|
||||
(offset-pos-of-selected (_type_ vector) none 37)
|
||||
(nav-graph-method-38 (_type_) none 38)
|
||||
(nav-graph-method-39 (_type_) none 39)
|
||||
(nav-graph-method-40 (_type_ int) int 40)
|
||||
@@ -48645,9 +48708,10 @@
|
||||
@param idx The position in the `node-array` to return
|
||||
@returns the [[nav-node]] if it can be found, otherwise return [[#f]]"
|
||||
(_type_ int) nav-node 41)
|
||||
(nav-graph-method-42 (_type_) none 42)
|
||||
(nav-graph-method-43 (_type_ nav-graph-link string) none 43)
|
||||
(from-editor (_type_ nav-node symbol) none 44)
|
||||
(patch-nodes "Patch nodes. Node pointers are stored as indices into arrays to be allocated on the level heap
|
||||
and patched at runtime after loading." (_type_) none 42)
|
||||
(copy-to-mysql-graph (_type_ mysql-nav-graph string) none 43)
|
||||
(from-editor (_type_ mysql-nav-graph symbol) none 44)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48700,8 +48764,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xb00000020
|
||||
(:methods
|
||||
(vis-cell-method-9 (_type_) none 9)
|
||||
(vis-cell-method-10 (_type_) none 10)
|
||||
(reset-segment-counts (_type_) none 9)
|
||||
(debug-draw (_type_) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48751,11 +48815,11 @@
|
||||
:size-assert #x40
|
||||
:flag-assert #xe00000040
|
||||
(:methods
|
||||
(grid-info-method-9 (_type_ (pointer bounding-box) int int) none 9)
|
||||
(grid-info-method-10 (_type_ vis-grid-pos vector) none 10)
|
||||
(grid-info-method-11 (_type_ vis-grid-box vector) none 11)
|
||||
(grid-info-method-12 (_type_ rgba) none 12)
|
||||
(grid-info-method-13 (_type_ vis-grid-pos rgba) none 13) ;; vis-grid-pos is a total guess
|
||||
(setup-grid-from-bounding-box "Set up a grid which fills the given bounding box" (_type_ (pointer bounding-box) int int) none 9)
|
||||
(lookup-cell-for-point "Get the grid cell containing the point (or closest, if outside the grid)" (_type_ vis-grid-pos vector) none 10)
|
||||
(lookup-box-for-sphere "Get the box of cells containing the given sphere" (_type_ vis-grid-box vector) none 11)
|
||||
(debug-draw-grid (_type_ rgba) none 12)
|
||||
(debug-draw-cell (_type_ vis-grid-pos rgba) none 13) ;; vis-grid-pos is a total guess
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48766,7 +48830,7 @@
|
||||
(cell-array (inline-array vis-cell) :offset-assert 64)
|
||||
(segment-count int16 :offset-assert 68)
|
||||
(cell-count uint16 :offset-assert 70)
|
||||
(segment-array uint32 :offset-assert 72)
|
||||
(segment-array (inline-array nav-segment) :offset-assert 72) ;; elt size is 0x30
|
||||
(nav-graph nav-graph :offset-assert 76)
|
||||
(camera-ceiling meters :offset-assert 80)
|
||||
(pad-array int8 56 :offset-assert 84)
|
||||
@@ -48776,14 +48840,14 @@
|
||||
:flag-assert #x130000008c
|
||||
(:methods
|
||||
(city-level-info-method-9 (_type_) symbol 9)
|
||||
(city-level-info-method-10 (_type_ vis-ray vector vector) none 10)
|
||||
(init-vis-ray (_type_ vis-ray vector vector) none 10)
|
||||
(city-level-info-method-11 (_type_ vis-ray) none 11)
|
||||
(city-level-info-method-12 (_type_ vector nav-branch vector) vector 12)
|
||||
(city-level-info-method-13 (_type_ vector) none 13)
|
||||
(city-level-info-method-14 (_type_ vis-grid-box) vis-cell 14)
|
||||
(city-level-info-method-15 (_type_ int int) symbol 15)
|
||||
(city-level-info-method-16 (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct object none)) none 16)
|
||||
(city-level-info-method-17 (_type_ traffic-engine) none 17)
|
||||
(lookup-cell-by-position (_type_ vector) vis-cell 13)
|
||||
(get-first-cell-in-box (_type_ vis-grid-box) vis-cell 14)
|
||||
(sphere-in-grid? (_type_ int int) symbol 15)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none 16)
|
||||
(update-suppressions-from-traffic-engine (_type_ traffic-engine) none 17)
|
||||
(city-level-info-method-18 (_type_) none 18)
|
||||
)
|
||||
)
|
||||
@@ -48800,20 +48864,34 @@
|
||||
:size-assert #x820
|
||||
:flag-assert #xf00000820
|
||||
(:methods
|
||||
(traffic-level-data-method-9 (_type_) none 9)
|
||||
(traffic-level-data-method-10 (_type_ vis-cell) none 10)
|
||||
(traffic-level-data-method-11 (_type_ int) none 11)
|
||||
(traffic-level-data-method-12 (_type_ vis-cell) none 12)
|
||||
(traffic-level-data-method-13 (_type_) vis-cell 13)
|
||||
(traffic-level-data-method-14 (_type_) none 14)
|
||||
(reset (_type_) none 9)
|
||||
(add-active-cell (_type_ vis-cell) none 10)
|
||||
(remove-active-cell (_type_ int) none 11)
|
||||
(add-newly-active-cell (_type_ vis-cell) none 12)
|
||||
(per-frame-cell-update (_type_) none 13)
|
||||
(debug-draw (_type_) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
;; maybe the same as traffic-suppression-flags
|
||||
(defenum traffic-suppression-box-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(in-use 0)
|
||||
(tfsb1 1)
|
||||
(tfsb2 2)
|
||||
(tfsb3 3)
|
||||
(tfsb4 4)
|
||||
(tfsb5 5)
|
||||
(tfsb6 6)
|
||||
(tfsb7 7)
|
||||
)
|
||||
|
||||
(deftype traffic-suppression-box (structure)
|
||||
((data uint8 32 :offset-assert 0 :score -999)
|
||||
(bbox bounding-box :inline :offset 0)
|
||||
(flags uint8 :offset 12)
|
||||
(duration uint32 :offset 28)
|
||||
(flags traffic-suppression-box-flags :offset 12)
|
||||
(duration uint32 :offset 28 :score 1)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -48821,7 +48899,7 @@
|
||||
)
|
||||
|
||||
(deftype traffic-guard-type-info (structure)
|
||||
((object-type uint8 :offset-assert 0)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(max-target-count int8 :offset-assert 1)
|
||||
(min-target-count int8 :offset-assert 2)
|
||||
(target-count int8 :offset-assert 3)
|
||||
@@ -48912,7 +48990,7 @@
|
||||
(duration uint32 :offset-assert 16)
|
||||
(start-time time-frame :offset-assert 24)
|
||||
(notify-time time-frame :offset-assert 32)
|
||||
(alarm-sound-id uint32 :offset-assert 40)
|
||||
(alarm-sound-id sound-id :offset-assert 40)
|
||||
(target-status-array traffic-target-status 3 :inline :offset-assert 48)
|
||||
(settings traffic-alert-state-settings :inline :offset-assert 288)
|
||||
(guard-type-info-array traffic-guard-type-info 6 :inline :offset-assert 384)
|
||||
@@ -48922,7 +49000,7 @@
|
||||
:size-assert #x3d8
|
||||
:flag-assert #xa000003d8
|
||||
(:methods
|
||||
(traffic-alert-state-method-9 (_type_) none 9)
|
||||
(reset (_type_) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48945,8 +49023,21 @@
|
||||
:flag-assert #x900000014
|
||||
)
|
||||
|
||||
(defenum traffic-suppression-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(tfs0 0)
|
||||
(needs-update 1)
|
||||
(tfs2 2)
|
||||
(tfs3 3)
|
||||
(tfs4 4)
|
||||
(tfs5 5)
|
||||
(tfs6 6)
|
||||
(tfs7 7)
|
||||
)
|
||||
|
||||
(deftype traffic-suppressor (structure)
|
||||
((flags uint8 :offset-assert 0)
|
||||
((flags traffic-suppression-flags :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset-assert 16)
|
||||
(array traffic-suppression-box 16 :inline :offset-assert 48)
|
||||
)
|
||||
@@ -48954,11 +49045,12 @@
|
||||
:size-assert #x230
|
||||
:flag-assert #xe00000230
|
||||
(:methods
|
||||
(traffic-suppressor-method-9 (_type_) none 9)
|
||||
(traffic-suppressor-method-10 (_type_ traffic-suppression-params) none 10)
|
||||
(traffic-suppressor-method-11 (_type_ int) none 11)
|
||||
(traffic-suppressor-method-12 (_type_ traffic-suppression-params) none 12)
|
||||
(traffic-suppressor-method-13 (_type_) none 13)
|
||||
(reset-boxes "Clears some flags, mark all boxes as disabled." (_type_) none 9) ;; clear flags 0, 1 on self and boxes.
|
||||
(add-new-supression-box "Create a suppression box for these params.
|
||||
The param object is updated with the ID of the box and can be later used with update-box-from-params." (_type_ traffic-suppression-params) none 10)
|
||||
(remove-box-by-id "Remove a box that was previously added, by its ID." (_type_ int) none 11)
|
||||
(update-box-from-params "Update a box that was previously added" (_type_ traffic-suppression-params) none 12)
|
||||
(debug-draw (_type_) none 13)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48971,7 +49063,7 @@
|
||||
(active-object-count uint8 :offset-assert 13)
|
||||
(inactive-object-count int8 :offset-assert 14)
|
||||
(active-object-list handle 126 :offset-assert 16)
|
||||
(active-object-type-list uint8 126 :offset-assert 1024)
|
||||
(active-object-type-list traffic-type 126 :offset-assert 1024)
|
||||
)
|
||||
:method-count-assert 27
|
||||
:size-assert #x47e
|
||||
@@ -48980,28 +49072,29 @@
|
||||
(traffic-tracker-method-9 (_type_) none 9)
|
||||
(traffic-tracker-method-10 (_type_) none 10)
|
||||
(traffic-tracker-method-11 (_type_) none 11)
|
||||
(traffic-tracker-method-12 (_type_ uint handle) none 12)
|
||||
(traffic-tracker-method-13 (_type_ int) handle 13)
|
||||
(traffic-tracker-method-14 (_type_ int handle) none 14)
|
||||
(traffic-tracker-method-15 (_type_ int) handle 15)
|
||||
(traffic-tracker-method-16 (_type_ int handle) handle 16)
|
||||
(traffic-tracker-method-17 (_type_ int handle) none 17)
|
||||
(traffic-tracker-method-18 (_type_ process) none 18)
|
||||
(traffic-tracker-method-19 (_type_ handle) none 19)
|
||||
(traffic-tracker-method-20 (_type_ int symbol) none 20)
|
||||
(traffic-tracker-method-21 (_type_ traffic-object-spawn-params) none 21)
|
||||
(traffic-tracker-method-22 (_type_ int nav-segment float) none 22)
|
||||
(traffic-tracker-method-23 (_type_ traffic-object-spawn-params) none 23)
|
||||
(traffic-tracker-method-24 (_type_ uint traffic-engine) none 24)
|
||||
(traffic-tracker-method-25 (_type_ (function process-focusable traffic-object-type-info none)) none 25)
|
||||
(traffic-tracker-method-26 (_type_ int (function process-tree none)) none 26)
|
||||
(add-active-process "Add a process as active." (_type_ traffic-type handle) none 12)
|
||||
(remove-active-process "Remove a process from the tracking list." (_type_ int) handle 13)
|
||||
(add-reserved-process "Add a process to the reserve list for a type. This process is allocated, but not yet activated." (_type_ traffic-type handle) none 14)
|
||||
(get-from-inactive-by-type "Get any handle from the inactive list of this type, and remove it from the list." (_type_ traffic-type) handle 15)
|
||||
(get-from-inactive-by-handle "Remove the given handle from the inactive list of the given type." (_type_ traffic-type handle) handle 16)
|
||||
(deactivate-object "Send a traffic-off event (or traffic-off-force) to deactivate an object, specified by index in active object array.
|
||||
Process is recycled and moved to reserved, if it deactivates." (_type_ int symbol) none 17)
|
||||
(set-process-to-killed "Move from active to killed. Separate from reserve." (_type_ process) none 18)
|
||||
(deactivate-all "Deactivate all processes that are tracked" (_type_ symbol) none 19)
|
||||
(deactivate-all-of-type "Deactivate all processes of given type" (_type_ traffic-type symbol) none 20)
|
||||
(activate-from-params "Get a reserved process, and activate with the given params." (_type_ traffic-object-spawn-params) none 21)
|
||||
(activate-by-type "If possible, activate a process of the given type." (_type_ traffic-type nav-segment float) none 22)
|
||||
(activate-by-handle "Activate, using the handle in the params." (_type_ traffic-object-spawn-params) none 23)
|
||||
(reset (_type_ uint traffic-engine) none 24)
|
||||
(for-all-active-processes "Call the given function on all active processes." (_type_ (function process-focusable traffic-object-type-info none)) none 25)
|
||||
(for-all-active-processes-of-type "Call the given function on all active processes matching the given type." (_type_ traffic-type (function process-focusable traffic-object-type-info none)) none 26)
|
||||
)
|
||||
)
|
||||
|
||||
(declare-type traffic-find-segment-struct structure)
|
||||
(deftype traffic-engine (basic)
|
||||
((object-hash spatial-hash :offset-assert 4) ;; either spatial-hash is wrong, or this is wrong
|
||||
(manager uint64 :offset-assert 8)
|
||||
(manager handle :offset-assert 8)
|
||||
(inv-density-factor float :offset-assert 16)
|
||||
(sync-clock uint8 :offset-assert 20)
|
||||
(sync-mask-8 uint8 :offset-assert 21)
|
||||
@@ -49013,6 +49106,8 @@
|
||||
(level-data-array traffic-level-data 2 :inline :offset-assert 1040)
|
||||
(object-type-info-array traffic-object-type-info 21 :inline :offset-assert 5200)
|
||||
(tracker-array traffic-tracker 2 :inline :offset-assert 5872)
|
||||
(citizen-tracker-array traffic-tracker :inline :offset 5872 :score 1)
|
||||
(vehicle-tracker-array traffic-tracker :inline :offset 7024 :score 1)
|
||||
(inactive-object-array handle 420 :offset-assert 8176)
|
||||
(suppressor traffic-suppressor :inline :offset-assert 11536)
|
||||
(danger-sphere-count int8 :offset-assert 12096)
|
||||
@@ -49025,33 +49120,34 @@
|
||||
(:methods
|
||||
;; NOTE - most of these names were taken from the symbols for the event-handler that calls them
|
||||
;; they may be wrong or misleading as a result, but they are a decent placeholder _for now_
|
||||
(traffic-engine-method-9 (_type_) none 9)
|
||||
(traffic-engine-method-10 (_type_ process) none 10)
|
||||
(traffic-engine-method-11 (_type_) none 11)
|
||||
(traffic-engine-method-12 (_type_) none 12)
|
||||
(add-object (_type_ int process) none 13)
|
||||
(traffic-engine-method-14 (_type_ object object) symbol 14)
|
||||
(traffic-engine-method-15 (_type_ nav-segment float) none 15)
|
||||
(traffic-engine-method-16 (_type_ nav-segment float) none 16)
|
||||
(traffic-engine-method-17 (_type_ nav-branch) symbol 17)
|
||||
(child-killed (_type_ process) none 18)
|
||||
(traffic-engine-method-19 (_type_ object) none 19)
|
||||
(traffic-engine-method-20 (_type_ vector vector int) nav-segment 20)
|
||||
(traffic-engine-method-21 (_type_ vector int traffic-find-segment-struct function) none 21)
|
||||
(add-danger-sphere (_type_ traffic-danger-info) none 22)
|
||||
(traffic-engine-method-23 (_type_) none 23)
|
||||
(new (symbol type) _type_ 0)
|
||||
(update-traffic (_type_) none 9)
|
||||
(reset-and-init-from-manager "Reset the traffic engine" (_type_ process) none 10)
|
||||
(stop-alarm-sound (_type_) none 11)
|
||||
(debug-unused (_type_) none 12)
|
||||
(add-object (_type_ traffic-type process) none 13)
|
||||
(sphere-in-loaded-city-infos? (_type_ int vector) symbol 14)
|
||||
(activate-one-citizen (_type_ nav-segment float) none 15)
|
||||
(activate-one-vehicle (_type_ nav-segment float) none 16)
|
||||
(can-dest-be-used? (_type_ nav-branch) symbol 17)
|
||||
(child-killed "handle killing a child process" (_type_ process) none 18)
|
||||
(deactivate-all-from-level (_type_ symbol) none 19)
|
||||
(find-best-segment (_type_ vector vector int) nav-segment 20)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none 21)
|
||||
(add-danger "Add a danger sphere and suppression box." (_type_ traffic-danger-info) none 22)
|
||||
(guard-count (_type_) int 23)
|
||||
(set-target-level (_type_ float) none 24)
|
||||
(set-guard-target-level (_type_ float) none 25)
|
||||
(deactivate-all (_type_) none 26)
|
||||
(deactivate-by-type (_type_ int) none 27)
|
||||
(traffic-engine-method-28 (_type_) symbol 28)
|
||||
(deactivate-by-type (_type_ traffic-type) none 27)
|
||||
(maybe-increase-guard-aim-count (_type_) symbol 28)
|
||||
(restore-default-settings (_type_) none 29)
|
||||
(increase-alert-level (_type_ object target) none 30)
|
||||
(decrease-alert-level (_type_ object) none 31)
|
||||
(set-alert-level (_type_ object) none 32)
|
||||
(set-max-alert-level (_type_ object) none 33)
|
||||
(set-alert-duration (_type_ object) none 34)
|
||||
(get-alert-level (_type_) symbol 35)
|
||||
(increase-alert-level (_type_ int target) none 30)
|
||||
(decrease-alert-level (_type_ int) none 31)
|
||||
(set-alert-level (_type_ int) none 32)
|
||||
(set-max-alert-level (_type_ int) none 33)
|
||||
(set-alert-duration (_type_ int) none 34)
|
||||
(get-alert-level (_type_) int 35)
|
||||
(get-target "@returns [[*target*]]" (_type_) target 36)
|
||||
(set-object-target-level (_type_ int float) none 37)
|
||||
(set-object-target-count (_type_ int int) none 38)
|
||||
@@ -49059,37 +49155,37 @@
|
||||
(get-object-reserve-count (_type_ int) int 40)
|
||||
(get-object-remaining-count (_type_ int) int 41)
|
||||
(activate-object (_type_ traffic-object-spawn-params) none 42)
|
||||
(traffic-engine-method-43 (_type_ traffic-object-spawn-params) none 43)
|
||||
(traffic-engine-method-44 (_type_ int float) none 44)
|
||||
(traffic-engine-method-45 (_type_) int 45)
|
||||
(new-suppression-box (_type_ object) none 46)
|
||||
(traffic-engine-method-47 (_type_ traffic-suppression-params) none 47)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none 43)
|
||||
(set-parking-spot-prob (_type_ int float) none 44)
|
||||
(get-random-parking-spot-type (_type_) traffic-type 45)
|
||||
(new-suppression-box (_type_ traffic-suppression-params) none 46)
|
||||
(remove-suppression-box (_type_ traffic-suppression-params) none 47)
|
||||
(update-suppression-box (_type_ traffic-suppression-params) none 48)
|
||||
(traffic-engine-method-49 (_type_ object int traffic-target-status) traffic-target-status 49)
|
||||
(traffic-engine-method-50 (_type_ process-drawable int) process-focusable 50)
|
||||
(traffic-engine-method-51 (_type_ (function none)) none 51)
|
||||
(traffic-engine-method-52 (_type_) none 52)
|
||||
(end-pursuit-by-type (_type_ int) none 53)
|
||||
(find-closest-to-with-collide-lists "Iterate through collide lists, find the closest thing to the given process." (_type_ process-drawable collide-spec) process-focusable 50)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none 51)
|
||||
(send-alert-events (_type_) none 52)
|
||||
(end-pursuit-by-type (_type_ traffic-type) none 53)
|
||||
(get-traffic-guard-type-settings "TODO - guard-type should be an enum" (_type_ int) traffic-guard-type-settings 54)
|
||||
(get-guard-type-for-traffic-obj "TODO - guard-type should be an enum" (_type_ int) uint 55)
|
||||
(get-traffic-guard-change-to-type "TODO - guard-type should be an enum" (_type_ int) uint 56)
|
||||
(set-guard-target-count-range (_type_ int int int) none 57)
|
||||
(set-object-auto-activate (_type_ object object) none 58)
|
||||
(traffic-engine-method-59 (_type_ object int) none 59)
|
||||
(kill-traffic-sphere (_type_ sphere) none 60)
|
||||
(level-loaded (_type_ level) none 61)
|
||||
(level-killed (_type_ level) none 62)
|
||||
(set-object-auto-activate (_type_ int object) none 58)
|
||||
(debug-check-proc-in-tracker (_type_ process int) none 59)
|
||||
(kill-traffic-sphere "Kill everything in the sphere with a traffic-off-force." (_type_ sphere) none 60)
|
||||
(level-loaded "Call after loading a level to patch the data in the bsp" (_type_ level) none 61)
|
||||
(level-killed "Call after removing a level. Kills processes and unlinks nav" (_type_ level) none 62)
|
||||
(traffic-engine-method-63 (_type_) none 63)
|
||||
(traffic-engine-method-64 (_type_) none 64)
|
||||
(traffic-engine-method-65 (_type_ vis-cell) none 65)
|
||||
(traffic-engine-method-66 (_type_) none 66)
|
||||
(traffic-engine-method-67 (_type_) none 67)
|
||||
(traffic-engine-method-68 (_type_) none 68)
|
||||
(traffic-engine-method-69 (_type_) none 69)
|
||||
(traffic-engine-method-70 (_type_) none 70)
|
||||
(traffic-engine-method-71 (_type_) none 71)
|
||||
(traffic-engine-method-72 (_type_) none 72)
|
||||
(traffic-engine-method-73 (_type_) none 73)
|
||||
(handle-new-vis-cell (_type_ vis-cell) none 65)
|
||||
(update-sync-from-frame-counter (_type_) none 66)
|
||||
(per-frame-guard-update (_type_) none 67)
|
||||
(per-frame-activate-deactivate "per-frame activate and deactivate processes." (_type_) none 68)
|
||||
(per-frame-danger-update "see what's dangerous and make people avoid it." (_type_) none 69)
|
||||
(update-danger-from-target "make people run away from jak when he is dangerous." (_type_) none 70)
|
||||
(per-frame-alert-update (_type_) none 71)
|
||||
(per-frame-suppressor-update (_type_) none 72)
|
||||
(recompute-supressions (_type_) none 73)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -49447,7 +49543,7 @@
|
||||
:size-assert #x370
|
||||
:flag-assert #x9002f00370
|
||||
(:methods
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-vehicle-constants) none :replace 31)
|
||||
(alloc-and-init-rigid-body-control (_type_ rigid-body-vehicle-constants) none :replace 31)
|
||||
(inactive () _type_ :state 53)
|
||||
(waiting () _type_ :state 54)
|
||||
(vehicle-method-55 () _type_ :state 55)
|
||||
@@ -49460,16 +49556,16 @@
|
||||
(vehicle-method-62 (_type_ float) none 62)
|
||||
(vehicle-method-63 (_type_ float) none 63)
|
||||
(vehicle-method-64 () none 64)
|
||||
(vehicle-method-65 (_type_) none 65)
|
||||
(start-jump (_type_) none 65)
|
||||
(vehicle-method-66 () none 66)
|
||||
(vehicle-method-67 (_type_) none 67)
|
||||
(vehicle-method-68 (_type_ vector int) none 68)
|
||||
(vehicle-method-69 (_type_ int) process 69)
|
||||
(get-seat-count (_type_) int 67)
|
||||
(compute-seat-position (_type_ vector int) none 68)
|
||||
(get-rider-in-seat (_type_ int) process 69)
|
||||
(vehicle-method-70 (_type_) process 70)
|
||||
(vehicle-method-71 (_type_ int process-focusable) none 71)
|
||||
(put-rider-in-seat (_type_ int process-focusable) none 71)
|
||||
(vehicle-method-72 (_type_) uint 72)
|
||||
(vehicle-method-73 (_type_ vector int int) int 73)
|
||||
(vehicle-method-74 (_type_ process) none 74)
|
||||
(get-best-seat-for-vehicle (_type_ vector int int) int 73)
|
||||
(remove-rider (_type_ process) none 74)
|
||||
(vehicle-method-75 (_type_) float 75)
|
||||
(vehicle-method-76 (_type_ int uint) none 76)
|
||||
(vehicle-method-77 (_type_) none 77)
|
||||
@@ -49479,9 +49575,9 @@
|
||||
(vehicle-method-81 (_type_) none 81)
|
||||
(vehicle-method-82 (_type_) none 82)
|
||||
(vehicle-method-83 (_type_) none 83)
|
||||
(vehicle-method-84 (_type_ vector vector float float) none 84)
|
||||
(vehicle-method-85 (_type_) none 85)
|
||||
(vehicle-method-86 () none 86)
|
||||
(draw-thruster (_type_ vector vector float float) none 84)
|
||||
(draw-thrusters (_type_) none 85)
|
||||
(update-joint-mods (_type_) none 86)
|
||||
(vehicle-method-87 (_type_) none 87)
|
||||
(vehicle-method-88 (_type_) none 88)
|
||||
(vehicle-method-89 (_type_) none 89)
|
||||
@@ -49654,12 +49750,12 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xf00000020
|
||||
(:methods
|
||||
(xz-height-map-method-9 (_type_ vector) float 9)
|
||||
(xz-height-map-method-10 (_type_ vector) none 10)
|
||||
(xz-height-map-method-11 (_type_) none 11)
|
||||
(xz-height-map-method-12 (_type_ vector) none 12)
|
||||
(xz-height-map-method-13 (_type_ vector) none 13)
|
||||
(xz-height-map-method-14 (_type_ vector int) none 14)
|
||||
(get-height-at-point (_type_ vector) float 9)
|
||||
(debug-draw-mesh (_type_ vector) none 10)
|
||||
(debug-print (_type_) none 11)
|
||||
(debug-draw-at-point (_type_ vector) none 12)
|
||||
(debug-draw (_type_ vector) none 13)
|
||||
(debug-add-offset "Add an offset to the given point, likely for debugging purposes." (_type_ vector int) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -49725,7 +49821,7 @@
|
||||
;; nav-graph ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern make-nav-graph (function nav-graph object none))
|
||||
(define-extern make-nav-graph (function mysql-nav-graph symbol none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; vehicle-rider ;;
|
||||
@@ -50032,10 +50128,10 @@
|
||||
(turret-control-method-9 (_type_ vehicle vector vector) none 9)
|
||||
(turret-control-method-10 (_type_ vehicle) none 10)
|
||||
(turret-control-method-11 (_type_ object object vector) none 11)
|
||||
(turret-control-method-12 (_type_ joint-mod-rotate-local) none 12)
|
||||
(update-joint-mod (_type_ joint-mod-rotate-local) none 12)
|
||||
(turret-control-method-13 (_type_) none 13)
|
||||
(turret-control-method-14 (_type_) none 14)
|
||||
(turret-control-method-15 (_type_ turret-control-info) none 15)
|
||||
(set-info (_type_ turret-control-info) none 15)
|
||||
(turret-control-method-16 (_type_ float float) none 16)
|
||||
(turret-control-method-17 (_type_ vehicle) none 17)
|
||||
)
|
||||
@@ -50837,13 +50933,13 @@
|
||||
)
|
||||
|
||||
(deftype bikea (bike-base)
|
||||
((fin-fl basic :offset-assert 880)
|
||||
(fin-fr basic :offset-assert 884)
|
||||
(fin-rl basic :offset-assert 888)
|
||||
(fin-rr basic :offset-assert 892)
|
||||
(rudder basic :offset-assert 896)
|
||||
(brake-l basic :offset-assert 900)
|
||||
(brake-r basic :offset-assert 904)
|
||||
((fin-fl joint-mod-rotate-local :offset-assert 880)
|
||||
(fin-fr joint-mod-rotate-local :offset-assert 884)
|
||||
(fin-rl joint-mod-rotate-local :offset-assert 888)
|
||||
(fin-rr joint-mod-rotate-local :offset-assert 892)
|
||||
(rudder joint-mod-rotate-local :offset-assert 896)
|
||||
(brake-l joint-mod-rotate-local :offset-assert 900)
|
||||
(brake-r joint-mod-rotate-local :offset-assert 904)
|
||||
)
|
||||
:method-count-assert 144
|
||||
:size-assert #x38c
|
||||
@@ -50853,14 +50949,14 @@
|
||||
)
|
||||
|
||||
(deftype bikeb (bike-base)
|
||||
((fin-rl basic :offset-assert 880)
|
||||
(fin-rr basic :offset-assert 884)
|
||||
(rudder basic :offset-assert 888)
|
||||
(rudder-f basic :offset-assert 892)
|
||||
(brake-l basic :offset-assert 896)
|
||||
(brake-r basic :offset-assert 900)
|
||||
(flap-l basic :offset-assert 904)
|
||||
(flap-r basic :offset-assert 908)
|
||||
((fin-rl joint-mod-rotate-local :offset-assert 880)
|
||||
(fin-rr joint-mod-rotate-local :offset-assert 884)
|
||||
(rudder joint-mod-rotate-local :offset-assert 888)
|
||||
(rudder-f joint-mod-rotate-local :offset-assert 892)
|
||||
(brake-l joint-mod-rotate-local :offset-assert 896)
|
||||
(brake-r joint-mod-rotate-local :offset-assert 900)
|
||||
(flap-l joint-mod-rotate-local :offset-assert 904)
|
||||
(flap-r joint-mod-rotate-local :offset-assert 908)
|
||||
)
|
||||
:method-count-assert 144
|
||||
:size-assert #x390
|
||||
@@ -50870,17 +50966,17 @@
|
||||
)
|
||||
|
||||
(deftype bikec (bike-base)
|
||||
((fin-fl basic :offset-assert 880)
|
||||
(fin-fr basic :offset-assert 884)
|
||||
(fin-rl basic :offset-assert 888)
|
||||
(fin-rr basic :offset-assert 892)
|
||||
(fin2-fl basic :offset-assert 896)
|
||||
(fin2-fr basic :offset-assert 900)
|
||||
(rudder basic :offset-assert 904)
|
||||
(brake-l basic :offset-assert 908)
|
||||
(brake-r basic :offset-assert 912)
|
||||
(spoiler-l basic :offset-assert 916)
|
||||
(spoiler-r basic :offset-assert 920)
|
||||
((fin-fl joint-mod-rotate-local :offset-assert 880)
|
||||
(fin-fr joint-mod-rotate-local :offset-assert 884)
|
||||
(fin-rl joint-mod-rotate-local :offset-assert 888)
|
||||
(fin-rr joint-mod-rotate-local :offset-assert 892)
|
||||
(fin2-fl joint-mod-rotate-local :offset-assert 896)
|
||||
(fin2-fr joint-mod-rotate-local :offset-assert 900)
|
||||
(rudder joint-mod-rotate-local :offset-assert 904)
|
||||
(brake-l joint-mod-rotate-local :offset-assert 908)
|
||||
(brake-r joint-mod-rotate-local :offset-assert 912)
|
||||
(spoiler-l joint-mod-rotate-local :offset-assert 916)
|
||||
(spoiler-r joint-mod-rotate-local :offset-assert 920)
|
||||
)
|
||||
:method-count-assert 144
|
||||
:size-assert #x39c
|
||||
@@ -50890,7 +50986,7 @@
|
||||
)
|
||||
|
||||
(deftype guard-bike (vehicle-guard)
|
||||
((turret-jm basic :offset-assert 1076)
|
||||
((turret-jm joint-mod-rotate-local :offset-assert 1076)
|
||||
)
|
||||
:method-count-assert 159
|
||||
:size-assert #x438
|
||||
@@ -50899,12 +50995,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; (define-extern *bike-explosion-info* vehicle-explosion-info)
|
||||
;; (define-extern *bikea-constants* object)
|
||||
;; (define-extern *bikeb-constants* object)
|
||||
;; (define-extern *bikec-constants* object)
|
||||
;; (define-extern *guard-bike-constants* object)
|
||||
;; (define-extern *guard-bike-turret-control-info* object)
|
||||
(define-extern *bike-explosion-info* vehicle-explosion-info)
|
||||
(define-extern *bikea-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *bikeb-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *bikec-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *guard-bike-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *guard-bike-turret-control-info* turret-control-info)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; car ;;
|
||||
@@ -50921,15 +51017,15 @@
|
||||
)
|
||||
|
||||
(deftype cara (car-base)
|
||||
((steering-wheel-l basic :offset-assert 884)
|
||||
(steering-wheel-r basic :offset-assert 888)
|
||||
(fin-fl basic :offset-assert 892)
|
||||
(fin-fr basic :offset-assert 896)
|
||||
(fin-rl basic :offset-assert 900)
|
||||
(fin-rr basic :offset-assert 904)
|
||||
(rudder-l basic :offset-assert 908)
|
||||
(rudder-r basic :offset-assert 912)
|
||||
(rudder basic :offset-assert 916)
|
||||
((steering-wheel-l joint-mod-rotate-local :offset-assert 884)
|
||||
(steering-wheel-r joint-mod-rotate-local :offset-assert 888)
|
||||
(fin-fl joint-mod-rotate-local :offset-assert 892)
|
||||
(fin-fr joint-mod-rotate-local :offset-assert 896)
|
||||
(fin-rl joint-mod-rotate-local :offset-assert 900)
|
||||
(fin-rr joint-mod-rotate-local :offset-assert 904)
|
||||
(rudder-l joint-mod-rotate-local :offset-assert 908)
|
||||
(rudder-r joint-mod-rotate-local :offset-assert 912)
|
||||
(rudder joint-mod-rotate-local :offset-assert 916)
|
||||
)
|
||||
:method-count-assert 144
|
||||
:size-assert #x398
|
||||
@@ -50939,12 +51035,12 @@
|
||||
)
|
||||
|
||||
(deftype carb (car-base)
|
||||
((steering-wheel-l basic :offset-assert 884)
|
||||
(steering-wheel-r basic :offset-assert 888)
|
||||
(fin-fl basic :offset-assert 892)
|
||||
(fin-fr basic :offset-assert 896)
|
||||
(fin-rl basic :offset-assert 900)
|
||||
(fin-rr basic :offset-assert 904)
|
||||
((steering-wheel-l joint-mod-rotate-local :offset-assert 884)
|
||||
(steering-wheel-r joint-mod-rotate-local :offset-assert 888)
|
||||
(fin-fl joint-mod-rotate-local :offset-assert 892)
|
||||
(fin-fr joint-mod-rotate-local :offset-assert 896)
|
||||
(fin-rl joint-mod-rotate-local :offset-assert 900)
|
||||
(fin-rr joint-mod-rotate-local :offset-assert 904)
|
||||
)
|
||||
:method-count-assert 144
|
||||
:size-assert #x38c
|
||||
@@ -50954,13 +51050,13 @@
|
||||
)
|
||||
|
||||
(deftype carc (car-base)
|
||||
((steering-wheel basic :offset-assert 884)
|
||||
(fin-fl basic :offset-assert 888)
|
||||
(fin-fr basic :offset-assert 892)
|
||||
(fin-rl basic :offset-assert 896)
|
||||
(fin-rr basic :offset-assert 900)
|
||||
(fin2-rl basic :offset-assert 904)
|
||||
(fin2-rr basic :offset-assert 908)
|
||||
((steering-wheel joint-mod-rotate-local :offset-assert 884)
|
||||
(fin-fl joint-mod-rotate-local :offset-assert 888)
|
||||
(fin-fr joint-mod-rotate-local :offset-assert 892)
|
||||
(fin-rl joint-mod-rotate-local :offset-assert 896)
|
||||
(fin-rr joint-mod-rotate-local :offset-assert 900)
|
||||
(fin2-rl joint-mod-rotate-local :offset-assert 904)
|
||||
(fin2-rr joint-mod-rotate-local :offset-assert 908)
|
||||
)
|
||||
:method-count-assert 144
|
||||
:size-assert #x390
|
||||
@@ -50970,7 +51066,7 @@
|
||||
)
|
||||
|
||||
(deftype hellcat (vehicle-guard)
|
||||
((turret-jm basic :offset-assert 1076)
|
||||
((turret-jm joint-mod-rotate-local :offset-assert 1076)
|
||||
)
|
||||
:method-count-assert 159
|
||||
:size-assert #x438
|
||||
@@ -50979,12 +51075,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; (define-extern *car-explosion-info* vehicle-explosion-info)
|
||||
;; (define-extern *cara-constants* object)
|
||||
;; (define-extern *carb-constants* object)
|
||||
;; (define-extern *carc-constants* object)
|
||||
;; (define-extern *hellcat-constants* object)
|
||||
;; (define-extern *hellcat-front-turret-control-info* object)
|
||||
(define-extern *car-explosion-info* vehicle-explosion-info)
|
||||
(define-extern *cara-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *carb-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *carc-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *hellcat-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *hellcat-front-turret-control-info* turret-control-info)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; test-bike ;;
|
||||
@@ -51008,8 +51104,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; (define-extern *test-bike-constants* object)
|
||||
;; (define-extern *evan-test-bike-constants* object)
|
||||
(define-extern *test-bike-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *evan-test-bike-constants* rigid-body-vehicle-constants)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; test-car ;;
|
||||
@@ -51024,7 +51120,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; (define-extern *test-car-constants* object)
|
||||
(define-extern *test-car-constants* rigid-body-vehicle-constants)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; citizen ;;
|
||||
@@ -51471,7 +51567,7 @@
|
||||
(define-extern *traffic-suppress-activation* symbol)
|
||||
(define-extern *mysql-nav-graph* mysql-nav-graph)
|
||||
(define-extern *traffic-rigid-body-queue* rigid-body-queue)
|
||||
(define-extern get-level-nav-graph-by-id (function object symbol))
|
||||
(define-extern get-level-nav-graph-by-id "Get the nav-graph with the given ID from any of the currently loaded levels" (function int nav-graph))
|
||||
(define-extern add-debug-line-arrow "Does nothing!" (function none))
|
||||
(define-extern traffic-los-clear? (function vector vector symbol))
|
||||
(define-extern *guard-target-spots* (array vector))
|
||||
@@ -52014,11 +52110,11 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern *pilot-mods* surface)
|
||||
;; (define-extern target-pilot-handler function)
|
||||
;; (define-extern target-pilot-pidax-enter function)
|
||||
;; (define-extern target-pilot-pidax-exit function)
|
||||
;; (define-extern target-pilot-exit function)
|
||||
;; (define-extern target-pilot-init function)
|
||||
(define-extern target-pilot-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern target-pilot-pidax-enter (function object :behavior target))
|
||||
(define-extern target-pilot-pidax-exit (function object :behavior target))
|
||||
(define-extern target-pilot-exit (function object :behavior target))
|
||||
(define-extern target-pilot-init (function handle symbol object :behavior target))
|
||||
(define-extern pilot-on-ground? (function symbol :behavior target))
|
||||
(define-extern target-pilot-post (function none :behavior target))
|
||||
|
||||
@@ -52026,21 +52122,13 @@
|
||||
;; pilot-states ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern target-pilot-bike-anim-loop function)
|
||||
;; (define-extern target-pilot-car-anim-loop function)
|
||||
;; (define-extern target-daxter-pilot-car-anim-loop function)
|
||||
;; (define-extern target-pilot-trans function)
|
||||
;; (define-extern target-pilot-signal-ready function)
|
||||
;; (define-extern target-pilot-stance state)
|
||||
;; (define-extern target-pilot-impact state)
|
||||
;; (define-extern *pilot-get-on-mods* object)
|
||||
;; (define-extern target-pilot-get-on state)
|
||||
;; (define-extern *pilot-get-off-mods* object)
|
||||
;; (define-extern target-pilot-get-off state)
|
||||
;; (define-extern target-pilot-grab state)
|
||||
;; (define-extern target-pilot-clone-anim state)
|
||||
;; (define-extern target-pilot-hit state)
|
||||
;; (define-extern target-pilot-death state)
|
||||
(define-extern target-pilot-bike-anim-loop (function none :behavior target))
|
||||
(define-extern target-pilot-car-anim-loop (function none :behavior target))
|
||||
(define-extern target-daxter-pilot-car-anim-loop (function none :behavior target))
|
||||
(define-extern target-pilot-trans (function none :behavior target))
|
||||
(define-extern target-pilot-signal-ready (function object :behavior target))
|
||||
(define-extern *pilot-get-on-mods* surface)
|
||||
(define-extern *pilot-get-off-mods* surface)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; kid-h ;;
|
||||
|
||||
@@ -720,7 +720,7 @@
|
||||
[35, "(function process-focusable traffic-object-type-info none)"],
|
||||
[36, "(function process-focusable traffic-object-type-info none)"],
|
||||
[45, "(function process-tree none)"],
|
||||
[61, "(function vector matrix matrix)"] // a guess
|
||||
[61, "(function traffic-find-segment-struct nav-segment none)"] // a guess
|
||||
],
|
||||
"ruins-obs": [
|
||||
[0, "(function object :behavior task-manager)"],
|
||||
@@ -1170,5 +1170,8 @@
|
||||
[11, "(function int int form-search-info uint)"],
|
||||
[14, "(function vector object)"],
|
||||
[15, "(function int int (pointer object) int)"]
|
||||
],
|
||||
"pilot-states": [
|
||||
[15, "(function object object object int none)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@
|
||||
2, 3, 7, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 30
|
||||
],
|
||||
"(method 10 simple-sprite-system)": [0, 1, 3, 4, 5, 6, 9, 11],
|
||||
"target-pilot-post": [0, 2, 4, 5, 13, 16, 22, 27, 41],
|
||||
"target-pilot-post": [0, 2, 4, 13, 16, 22, 27, 41],
|
||||
"(anon-function 0 ruins-obs)": [
|
||||
0, 5, 7, 12, 13, 15, 17, 23, 24, 33, 42, 45, 46, 53, 58
|
||||
],
|
||||
|
||||
@@ -1013,7 +1013,8 @@
|
||||
],
|
||||
"traffic-engine": [
|
||||
["L803", "uint64", true],
|
||||
["L733", "uint64", true]
|
||||
["L733", "uint64", true],
|
||||
["L734", "uint64", true]
|
||||
],
|
||||
"mechtest-obs": [["L79", "attack-info"]],
|
||||
"pillar-collapse": [["L193", "attack-info"]],
|
||||
@@ -1530,5 +1531,10 @@
|
||||
["L591", "uint64", true],
|
||||
["L592", "uint64", true],
|
||||
["L590", "uint64", true]
|
||||
],
|
||||
"bike": [
|
||||
["L63", "(inline-array vector)", 2],
|
||||
["L64", "(inline-array vector)", 2]
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1535,7 +1535,7 @@
|
||||
"(method 29 vehicle)": [
|
||||
[16, ["inline-array", "matrix", 9]],
|
||||
[640, ["inline-array", "vector", 5]],
|
||||
[736, ["inline-array", "vehicle-control-point", 2]]
|
||||
[736, ["inline-array", "vehicle-control-point", 24]]
|
||||
],
|
||||
"vehicle-guard-choose-branch": [[16, ["inline-array", "vector", 5]]],
|
||||
"(method 155 vehicle-guard)": [
|
||||
@@ -1543,9 +1543,10 @@
|
||||
[256, "turret-unknown-stack-structure2"]
|
||||
],
|
||||
"(method 70 traffic-engine)": [
|
||||
[16, ["inline-array", "traffic-suppression-box", 2]]
|
||||
[16, ["inline-array", "traffic-suppression-box", 2]],
|
||||
[80, ["array", "collide-shape", 40]]
|
||||
],
|
||||
"(method 22 traffic-engine)": [[16, "pilot-edge-grab-info"]],
|
||||
"(method 22 traffic-engine)": [[16, "traffic-suppression-params"]],
|
||||
"(method 14 traffic-level-data)": [
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
@@ -1944,5 +1945,24 @@
|
||||
],
|
||||
"(post draw-closest-minimap nav-graph-editor)": [
|
||||
[16, ["inline-array", "vector", 5]]
|
||||
],
|
||||
"(method 69 traffic-engine)": [
|
||||
[16, ["array", "collide-shape", 40]]
|
||||
],
|
||||
"(method 60 traffic-engine)": [
|
||||
[16, ["array", "collide-shape", 64]]
|
||||
],
|
||||
"(method 85 bike-base)": [
|
||||
[16, ["inline-array", "matrix", 3]]
|
||||
],
|
||||
"target-pilot-post": [
|
||||
[48, "collide-query-with-5vec"],
|
||||
[640, "matrix"]
|
||||
],
|
||||
"target-pilot-trans": [
|
||||
[16, ["inline-array", "vector", 10]]
|
||||
],
|
||||
"(code target-pilot-get-off)": [
|
||||
[96, ["inline-array", "vector", 10]]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6905,7 +6905,8 @@
|
||||
[321, "s2", "nav-segment"],
|
||||
[327, "s2", "nav-segment"],
|
||||
[[159, 191], "s3", "process-focusable"],
|
||||
[[89, 125], "s3", "vehicle"]
|
||||
[[89, 125], "s3", "vehicle"],
|
||||
[16, "v1", "(pointer uint128)"]
|
||||
],
|
||||
"(method 50 traffic-engine)": [
|
||||
[13, "v1", "connection"],
|
||||
@@ -8980,5 +8981,122 @@
|
||||
[49, "a0", "(pointer int32)"],
|
||||
[51, "a0", "(array object)"]
|
||||
],
|
||||
"(method 7 nav-graph-editor)": [[9, "t9", "(function process int none)"]]
|
||||
"(method 7 nav-graph-editor)": [[9, "t9", "(function process int none)"]],
|
||||
"(method 18 traffic-tracker)": [
|
||||
[[8, 12], "a1", "handle"],
|
||||
[[11, 19], "a0", "handle"]
|
||||
],
|
||||
"(method 10 traffic-engine)": [
|
||||
[102, "v1", "(pointer uint128)"]
|
||||
],
|
||||
"(method 61 traffic-engine)": [
|
||||
[95, "t0", "uint"],
|
||||
[111, "a2", "uint"],
|
||||
[79, "a3", "uint"],
|
||||
[64, "a3", "uint"],
|
||||
[48, "t0", "uint"]
|
||||
],
|
||||
"(method 9 xz-height-map)": [
|
||||
[36, "a2", "pointer"],
|
||||
[[37, 49], "a1", "(pointer int8)"]
|
||||
],
|
||||
"(method 10 xz-height-map)": [
|
||||
[121, "s0", "pointer"]
|
||||
],
|
||||
"(method 42 nav-graph)": [
|
||||
[27, "v1", "uint"]
|
||||
],
|
||||
"make-nav-graph": [
|
||||
[[28, 31], "v1", "mysql-nav-graph-level-info"],
|
||||
[31, "v1", "mysql-nav-graph-level-info"]
|
||||
],
|
||||
"(method 44 nav-graph)": [
|
||||
[[102, 125], "s0", "mysql-nav-edge"],
|
||||
[144, "s0", "mysql-nav-edge"],
|
||||
[236, "s0", "mysql-nav-edge"],
|
||||
[246, "v1", "mysql-nav-edge"],
|
||||
[254, "v1", "mysql-nav-edge"]
|
||||
],
|
||||
"(method 11 city-level-info)": [
|
||||
[27, "a3", "(pointer int8)"]
|
||||
],
|
||||
"(method 36 bike-base)": [
|
||||
[7, "t9", "(function object none)"]
|
||||
],
|
||||
"(method 85 bike-base)": [
|
||||
[7, "t9", "(function object none)"],
|
||||
[[22, 26], "v1", "(pointer uint128)"]
|
||||
],
|
||||
"(method 7 bikea)": [
|
||||
[44, "t9", "(function object int bikea)"]
|
||||
],
|
||||
"(method 7 bikeb)": [
|
||||
[49, "t9", "(function object int bikeb)"]
|
||||
],
|
||||
"(method 7 bikec)": [
|
||||
[64, "t9", "(function object int bikec)"]
|
||||
],
|
||||
"(method 7 guard-bike)": [
|
||||
[14, "t9", "(function object int guard-bike)"]
|
||||
],
|
||||
"target-pilot-exit": [
|
||||
[64, "gp", "vehicle"]
|
||||
],
|
||||
"target-pilot-init": [
|
||||
[[61, 68], "s4", "vehicle"],
|
||||
[[68, 138], "s4", "vehicle"]
|
||||
],
|
||||
"target-pilot-post": [
|
||||
[[96, 114], "s5", "vehicle"],
|
||||
[[279, 294], "s5", "vehicle"]
|
||||
],
|
||||
"target-pilot-trans": [
|
||||
[[53, 130], "s5", "vehicle"]
|
||||
],
|
||||
"(code target-pilot-impact)": [
|
||||
[83, "v1", "art-joint-anim"],
|
||||
[138, "v1", "art-joint-anim"],
|
||||
[192, "v1", "art-joint-anim"],
|
||||
[247, "v1", "art-joint-anim"],
|
||||
[300, "v1", "art-joint-anim"],
|
||||
[363, "v1", "art-joint-anim"],
|
||||
[418, "v1", "art-joint-anim"],
|
||||
[472, "v1", "art-joint-anim"],
|
||||
[532, "v1", "art-joint-anim"],
|
||||
[590, "v1", "art-joint-anim"],
|
||||
[655, "v1", "art-joint-anim"],
|
||||
[710, "v1", "art-joint-anim"],
|
||||
[764, "v1", "art-joint-anim"],
|
||||
[824, "v1", "art-joint-anim"],
|
||||
[882, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(trans target-pilot-get-on)": [
|
||||
[[28, 48], "gp", "vehicle"]
|
||||
],
|
||||
"(code target-pilot-get-on)": [
|
||||
[65, "gp", "art-joint-anim"],
|
||||
[173, "a1", "vehicle"]
|
||||
],
|
||||
"(event target-pilot-grab)": [
|
||||
[24, "a0", "process"]
|
||||
],
|
||||
"(enter target-pilot-edge-grab)": [
|
||||
[[40, 46], "a0", "process-focusable"]
|
||||
],
|
||||
"target-pilot-handler": [
|
||||
[[28, 33], "a0", "vehicle"],
|
||||
[103, "a0", "process"]
|
||||
],
|
||||
"(method 7 cara)": [
|
||||
[54, "t9", "(function object object cara)"]
|
||||
],
|
||||
"(method 7 carb)": [
|
||||
[39, "t9", "(function object object carb)"]
|
||||
],
|
||||
"(method 7 carc)": [
|
||||
[44, "t9", "(function object object carb)"]
|
||||
],
|
||||
"(method 7 hellcat)": [
|
||||
[14, "t9", "(function object object hellcat)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -26,6 +26,30 @@
|
||||
)
|
||||
;; ---traffic-danger-flags
|
||||
|
||||
;; +++traffic-h:traffic-type
|
||||
(defenum traffic-type
|
||||
:type uint8
|
||||
(citizen-norm-1 0)
|
||||
(citizen-chick 1)
|
||||
(citizen-fat 2)
|
||||
(citizen-norm-2 3)
|
||||
(crimson-guard-0 4)
|
||||
(crimson-guard-1 6)
|
||||
(crimson-guard-2 7)
|
||||
(metalhead-grunt 8)
|
||||
(metalhead-flitter 9)
|
||||
(metalhead-predator 10)
|
||||
(bikea 11)
|
||||
(bikeb 12)
|
||||
(bikec 13)
|
||||
(cara 14)
|
||||
(carb 15)
|
||||
(carc 16)
|
||||
(guard-bike 18)
|
||||
(hellcat 19)
|
||||
)
|
||||
;; ---traffic-h:traffic-type
|
||||
|
||||
;; NOTE - for default-menu
|
||||
(define-extern traffic-start (function none))
|
||||
(define-extern traffic-kill (function none))
|
||||
@@ -33,6 +57,8 @@
|
||||
;; NOTE - for vehicle-rider
|
||||
(define-extern lwide-entity-hack (function none))
|
||||
|
||||
(define-extern *traffic-alert-level-force* symbol)
|
||||
|
||||
(declare-type nav-mesh basic)
|
||||
(declare-type nav-branch structure)
|
||||
|
||||
@@ -46,6 +72,7 @@
|
||||
|
||||
(define *race-vehicle-entity* (the-as object #f))
|
||||
|
||||
|
||||
(deftype traffic-danger-info (structure)
|
||||
((sphere sphere :inline :offset-assert 0)
|
||||
(velocity vector :inline :offset-assert 16)
|
||||
@@ -71,10 +98,10 @@
|
||||
:size-assert #x29
|
||||
:flag-assert #xd00000029
|
||||
(:methods
|
||||
(traffic-suppression-params-method-9 (_type_) symbol 9)
|
||||
(traffic-suppression-params-method-10 (_type_) symbol 10)
|
||||
(try-creating-new-suppression-box (_type_) symbol 9)
|
||||
(create-or-update-suppression-box (_type_) symbol 10)
|
||||
(has-valid-id? (_type_) none 11)
|
||||
(traffic-suppression-params-method-12 (_type_) none 12)
|
||||
(kill-suppression-box (_type_) none 12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -86,21 +113,29 @@
|
||||
)
|
||||
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type uint8 :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle uint64 :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle uint64 :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x68
|
||||
:flag-assert #x900000068
|
||||
)
|
||||
|
||||
(deftype mystery-traffic-object-spawn-params (structure)
|
||||
"TODO - what is this!"
|
||||
((params traffic-object-spawn-params :inline :offset-assert 0)
|
||||
(vector vector 3 :inline :offset-assert 112)
|
||||
))
|
||||
|
||||
(define-extern traffic-object-spawn (function process traffic-object-spawn-params process-drawable))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
(deftype joint-exploder-static-params (basic)
|
||||
((joints (array joint-exploder-static-joint-params) :offset-assert 4)
|
||||
(collide-spec uint32 :offset-assert 8)
|
||||
(art-level basic :offset-assert 12)
|
||||
(art-level symbol :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-31 rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-object-constants))
|
||||
(defmethod alloc-and-init-rigid-body-control rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-object-constants))
|
||||
(with-pp
|
||||
(set! (-> obj info-override) (the-as rigid-body-platform-constants arg0))
|
||||
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
|
||||
@@ -374,7 +374,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod allocate-and-init-cshape rigid-body-platform ((obj rigid-body-platform))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -436,9 +436,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod init-skel-and-rigid-body rigid-body-platform ((obj rigid-body-platform))
|
||||
(set! (-> obj float-height-offset) 0.0)
|
||||
(rigid-body-object-method-31 obj *rigid-body-platform-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *rigid-body-platform-constants*)
|
||||
(let ((s5-0 (-> obj info-override control-point-count)))
|
||||
(dotimes (s4-0 s5-0)
|
||||
(let ((s3-0 (-> obj control-point-array data s4-0)))
|
||||
@@ -463,9 +463,9 @@ This commonly includes things such as:
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
|
||||
(rigid-body-object-method-32 obj)
|
||||
(allocate-and-init-cshape obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(rigid-body-object-method-33 obj)
|
||||
(init-skel-and-rigid-body obj)
|
||||
(rigid-body-object-method-34 obj)
|
||||
0
|
||||
(none)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
(width float :offset-assert 60)
|
||||
(minimap_edge_flag nav-minimap-edge-flag :offset-assert 64)
|
||||
)
|
||||
:pack-me
|
||||
:allow-misaligned
|
||||
:method-count-assert 10
|
||||
:size-assert #x44
|
||||
:flag-assert #xa00000044
|
||||
@@ -191,7 +191,7 @@
|
||||
(set! (-> mysql-nav-visnode-array heap-base) (the-as uint 32))
|
||||
|
||||
(deftype mysql-nav-graph-level-info (structure)
|
||||
((level string :offset-assert 0)
|
||||
((level symbol :offset-assert 0)
|
||||
(level-id uint32 :offset-assert 4)
|
||||
(node-count int32 :offset-assert 8)
|
||||
(branch-count int32 :offset-assert 12)
|
||||
@@ -293,7 +293,7 @@ otherwise, return the new size of the array"
|
||||
-1
|
||||
)
|
||||
(else
|
||||
(let ((v1-5 (the-as mysql-nav-edge (+ (+ (* 80 (-> obj edge-array length)) 12) (the-as int (-> obj edge-array)))))
|
||||
(let ((v1-5 (-> obj edge-array data (-> obj edge-array length)))
|
||||
(v0-1 (-> obj edge-array length))
|
||||
)
|
||||
(+! (-> obj edge-array length) 1)
|
||||
@@ -735,7 +735,7 @@ returns `-1` if none is found"
|
||||
"Iterate through the `edge-array` and return the index for the first [[mysql-nav-edge]] whom's `nav_edge_id` matches the provided id
|
||||
returns `-1` if none is found"
|
||||
(dotimes (v1-0 (-> obj edge-array length))
|
||||
(if (= edge-id (-> (the-as mysql-nav-edge (+ (+ (* 80 v1-0) 12) (the-as int (-> obj edge-array)))) nav_edge_id))
|
||||
(if (= edge-id (-> (the-as mysql-nav-edge (-> obj edge-array data v1-0)) nav_edge_id))
|
||||
(return v1-0)
|
||||
)
|
||||
)
|
||||
@@ -875,10 +875,7 @@ returns `-1` if none is found"
|
||||
(set! sv-32 (string->int (-> s3-3 data (+ s2-2 2))))
|
||||
(set! sv-48 (indexof-nav-node obj s0-2))
|
||||
(set! sv-64 (indexof-nav-node obj sv-32))
|
||||
(let ((nav-edge
|
||||
(the-as mysql-nav-edge (+ (+ (* 80 (-> obj edge-array length)) 12) (the-as int (-> obj edge-array))))
|
||||
)
|
||||
)
|
||||
(let ((nav-edge (-> obj edge-array data (-> obj edge-array length))))
|
||||
(when (and (!= sv-48 -1) (!= sv-64 -1))
|
||||
(set! (-> nav-edge nav_graph_id) (-> obj nav_graph_id))
|
||||
(set! (-> nav-edge nav_edge_id) (the-as uint (string->int (-> s3-3 data s2-2))))
|
||||
@@ -1104,10 +1101,10 @@ returns `-1` if none is found"
|
||||
)
|
||||
)
|
||||
(dotimes (v1-3 (-> obj edge-array length))
|
||||
(set! (-> (the-as mysql-nav-edge (+ (+ (* 80 v1-3) 12) (the-as int (-> obj edge-array)))) temp-next-edge) #f)
|
||||
(set! (-> (the-as mysql-nav-edge (-> obj edge-array data v1-3)) temp-next-edge) #f)
|
||||
)
|
||||
(countdown (v1-7 (-> obj edge-array length))
|
||||
(let ((a1-17 (the-as mysql-nav-edge (+ (+ (* 80 v1-7) 12) (the-as int (-> obj edge-array))))))
|
||||
(let ((a1-17 (-> obj edge-array data v1-7)))
|
||||
(when (not (logtest? (-> a1-17 mysql-save-flag) (mysql-save-flag delete)))
|
||||
(let ((a2-8 (-> obj node-array data (-> a1-17 runtime-node-id-1))))
|
||||
(when (not (logtest? (-> a2-8 mysql-save-flag) (mysql-save-flag delete)))
|
||||
@@ -1166,7 +1163,7 @@ returns `-1` if none is found"
|
||||
(set! (-> obj level-info-last-lookup) v1-9)
|
||||
)
|
||||
(set! s5-0 (-> obj level-info-array v1-9))
|
||||
(set! (-> s5-0 level) (the-as string (-> arg0 level_name)))
|
||||
(set! (-> s5-0 level) (-> arg0 level_name))
|
||||
(set! (-> s5-0 node-count) 0)
|
||||
(+! (-> obj level-info-array-length) 1)
|
||||
)
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
|
||||
(deftype nav-graph-command (structure)
|
||||
((com-type uint32 :offset-assert 0) ;; TODO - enum
|
||||
(id int32 :offset-assert 4)
|
||||
@@ -117,3 +119,9 @@
|
||||
(nav-graph-editor-method-63 (_type_) none 63)
|
||||
)
|
||||
)
|
||||
|
||||
;; hack
|
||||
;; stub
|
||||
(defun get-nav-graph-editor ()
|
||||
(the nav-graph-editor #f)
|
||||
)
|
||||
@@ -33,7 +33,7 @@
|
||||
(seat-index int8 :offset-assert 41)
|
||||
(backup-nav-radius float :offset-assert 44)
|
||||
(cam-side-shift float :offset-assert 48)
|
||||
(enable-cam-side-shift basic :offset-assert 52)
|
||||
(enable-cam-side-shift symbol :offset-assert 52)
|
||||
(gun? symbol :offset-assert 56)
|
||||
(controls vehicle-controls :inline :offset-assert 60)
|
||||
(accel-array vector 8 :inline :offset-assert 80)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
(declare-type entity-race-mesh entity)
|
||||
(declare-type entity-nav-mesh entity)
|
||||
(declare-type actor-group basic)
|
||||
(declare-type city-level-info structure)
|
||||
|
||||
(defenum texture-page-flag
|
||||
:type uint16
|
||||
@@ -84,8 +85,7 @@
|
||||
;; 200 is some array
|
||||
(wind-array-length int32 :offset 204)
|
||||
|
||||
;; 208 is a structure of some sort - (method 97 vehicle)
|
||||
(bsp-header-jkh1b23 clock :offset 208)
|
||||
(city-level-info city-level-info :offset 208)
|
||||
|
||||
(vis-spheres vector-array :offset 216)
|
||||
|
||||
|
||||
@@ -332,12 +332,12 @@
|
||||
(active () _type_ :state 28)
|
||||
(rigid-body-object-method-29 (_type_ float) none 29)
|
||||
(rigid-body-object-method-30 (_type_) none 30)
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-object-constants) none 31)
|
||||
(rigid-body-object-method-32 (_type_) none 32)
|
||||
(rigid-body-object-method-33 (_type_) none 33)
|
||||
(alloc-and-init-rigid-body-control (_type_ rigid-body-object-constants) none 31)
|
||||
(allocate-and-init-cshape (_type_) none 32)
|
||||
(init-skel-and-rigid-body (_type_) none 33)
|
||||
(rigid-body-object-method-34 (_type_) none 34)
|
||||
(rigid-body-object-method-35 (_type_) none 35)
|
||||
(rigid-body-object-method-36 (_type_) none 36)
|
||||
(do-engine-sounds (_type_) none 36)
|
||||
(rigid-body-object-method-37 (_type_) none 37)
|
||||
(rigid-body-object-method-38 (_type_) none 38)
|
||||
(rigid-body-object-method-39 (_type_) none 39)
|
||||
|
||||
@@ -932,7 +932,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-31 rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
|
||||
(defmethod alloc-and-init-rigid-body-control rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
|
||||
(set! (-> obj info) arg0)
|
||||
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
|
||||
(update-transforms (-> obj root-override-2))
|
||||
@@ -954,7 +954,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 rigid-body-object ((obj rigid-body-object))
|
||||
(defmethod allocate-and-init-cshape rigid-body-object ((obj rigid-body-object))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -1003,8 +1003,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 rigid-body-object ((obj rigid-body-object))
|
||||
(rigid-body-object-method-31 obj *rigid-body-object-constants*)
|
||||
(defmethod init-skel-and-rigid-body rigid-body-object ((obj rigid-body-object))
|
||||
(alloc-and-init-rigid-body-control obj *rigid-body-object-constants*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1016,22 +1016,22 @@ This commonly includes things such as:
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(rigid-body-object-method-32 obj)
|
||||
(allocate-and-init-cshape obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(rigid-body-object-method-33 obj)
|
||||
(init-skel-and-rigid-body obj)
|
||||
(rigid-body-object-method-34 obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-36 rigid-body-object ((obj rigid-body-object))
|
||||
(defmethod do-engine-sounds rigid-body-object ((obj rigid-body-object))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-37 rigid-body-object ((obj rigid-body-object))
|
||||
(rigid-body-object-method-30 obj)
|
||||
(rigid-body-object-method-36 obj)
|
||||
(do-engine-sounds obj)
|
||||
(let ((v1-4 (-> obj rbody))
|
||||
(a1-0 (-> obj root-override-2))
|
||||
)
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
(speech-type-1 1)
|
||||
(speech-type-2 2)
|
||||
(speech-type-3 3)
|
||||
(speech-type-4 4)
|
||||
(speech-type-5 5)
|
||||
|
||||
)
|
||||
;; ---speech-type
|
||||
|
||||
|
||||
@@ -165,12 +165,10 @@
|
||||
(define-extern target-powerup-effect (function symbol none :behavior target))
|
||||
(define-extern target-load-wait (state target))
|
||||
(define-extern target-board-start (state object target))
|
||||
(define-extern target-pilot-start (state handle target))
|
||||
(define-extern target-mech-start (state handle float symbol target))
|
||||
(define-extern target-turret-get-on (state handle target))
|
||||
(define-extern target-play-anim (state string handle target))
|
||||
(define-extern target-edge-grab (state target))
|
||||
(define-extern target-pilot-edge-grab (state target))
|
||||
(define-extern target-pole-cycle (state handle target))
|
||||
(define-extern target-slide-down-to-ground (state target))
|
||||
|
||||
@@ -363,8 +361,16 @@
|
||||
target-mech-stance
|
||||
(target-mech-start handle float symbol)
|
||||
target-mech-walk
|
||||
target-pilot-edge-grab
|
||||
(target-pilot-start handle)
|
||||
(target-pilot-clone-anim handle)
|
||||
(target-pilot-death symbol)
|
||||
(target-pilot-edge-grab pilot-edge-grab-info)
|
||||
target-pilot-get-off
|
||||
target-pilot-get-on
|
||||
target-pilot-grab
|
||||
(target-pilot-hit symbol attack-info)
|
||||
target-pilot-impact
|
||||
target-pilot-stance
|
||||
(target-pilot-start handle symbol symbol)
|
||||
(target-play-anim string handle)
|
||||
(target-pole-cycle handle)
|
||||
(target-pole-flip-forward float float float)
|
||||
|
||||
@@ -1217,17 +1217,14 @@
|
||||
)
|
||||
)
|
||||
(when s5-1
|
||||
(case (-> arg3 param 0)
|
||||
(('pilot-daxter 'pilot-race-daxter)
|
||||
#t
|
||||
)
|
||||
(else
|
||||
)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-93 (process->handle s5-1)))
|
||||
(-> arg3 param 3)
|
||||
(go target-pilot-start (the-as handle a0-93))
|
||||
(let* ((v1-83 (-> arg3 param 0))
|
||||
(a2-4 (if (or (= v1-83 'pilot-daxter) (= v1-83 'pilot-race-daxter))
|
||||
#t
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(go target-pilot-start (process->handle s5-1) (the-as symbol (-> arg3 param 3)) a2-4)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1354,9 +1351,7 @@
|
||||
(label cfg-238)
|
||||
(b! (!= v1-0 'pilot-edge-grab) cfg-242 :delay (nop!))
|
||||
(b! (logtest? (-> self focus-status) (focus-status dead hit grabbed)) cfg-241 :delay (set! v0-0 #f))
|
||||
enter-state
|
||||
(-> arg3 param 0)
|
||||
(set! v0-0 (go target-pilot-edge-grab))
|
||||
(set! v0-0 (go target-pilot-edge-grab (the-as pilot-edge-grab-info (-> arg3 param 0))))
|
||||
(label cfg-241)
|
||||
(b! #t cfg-291 :delay (nop!))
|
||||
(label cfg-242)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
;; TODO - can't use a variable because :deps downstream doesn't take a proper list (can't pass it in quoted)
|
||||
;; (define common-dep ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
|
||||
(cgo-file "cwi.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "lmeetbrt.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "cta.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "palout.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
@@ -150,7 +150,6 @@
|
||||
(cgo-file "unb.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "cpo.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "cap.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "cwi.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "lbbush.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "lpackage.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
(cgo-file "ctykora.gd" ("$OUT/obj/cty-guard-turret-button.o"))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,15 @@
|
||||
;; name in dgo: citizen-chick
|
||||
;; dgos: CWI
|
||||
|
||||
(deftype citizen-chick (civilian)
|
||||
()
|
||||
:method-count-assert 218
|
||||
:size-assert #x424
|
||||
:flag-assert #xda03b00424
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,19 @@
|
||||
;; name in dgo: citizen-enemy
|
||||
;; dgos: CWI
|
||||
|
||||
(deftype citizen-enemy (citizen)
|
||||
((next-update-target uint64 :offset-assert 968)
|
||||
(minimap connection-minimap :offset-assert 976)
|
||||
)
|
||||
:method-count-assert 203
|
||||
:size-assert #x3d4
|
||||
:flag-assert #xcb036003d4
|
||||
(:methods
|
||||
(citizen-enemy-method-201 () none 201)
|
||||
(citizen-enemy-method-202 () none 202)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,15 @@
|
||||
;; name in dgo: citizen-norm
|
||||
;; dgos: CWI
|
||||
|
||||
(deftype citizen-norm (civilian)
|
||||
()
|
||||
:method-count-assert 219
|
||||
:size-assert #x424
|
||||
:flag-assert #xdb03b00424
|
||||
(:methods
|
||||
(knocked-off-vehicle () _type_ :state 218)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
(vehicle-method-85 obj)
|
||||
(draw-thrusters obj)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -523,7 +523,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-36 boat-base ((obj boat-base))
|
||||
(defmethod do-engine-sounds boat-base ((obj boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -569,8 +569,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-31 boat-base ((obj boat-base) (arg0 rigid-body-vehicle-constants))
|
||||
((method-of-type vehicle rigid-body-object-method-31) obj arg0)
|
||||
(defmethod alloc-and-init-rigid-body-control boat-base ((obj boat-base) (arg0 rigid-body-vehicle-constants))
|
||||
((method-of-type vehicle alloc-and-init-rigid-body-control) obj arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -710,7 +710,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 barge ((obj barge))
|
||||
(defmethod allocate-and-init-cshape barge ((obj barge))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -830,13 +830,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 barge ((obj barge))
|
||||
(defmethod init-skel-and-rigid-body barge ((obj barge))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-barge" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(rigid-body-object-method-31 obj *barge-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *barge-constants*)
|
||||
(set! (-> obj draw lod-set lod 0 dist) 1228800.0)
|
||||
(set! (-> obj engine) (the-as uint (new-sound-id)))
|
||||
(set! (-> obj bow-wash) (the-as uint (new-sound-id)))
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: ctywide-obs-h
|
||||
;; dgos: CWI
|
||||
|
||||
(define-extern restore-city-speeches (function none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype city-race-ring-info (structure)
|
||||
|
||||
@@ -5,5 +5,9 @@
|
||||
;; name in dgo: ctywide-speech
|
||||
;; dgos: CWI
|
||||
|
||||
;; hack
|
||||
(defun restore-city-speeches ()
|
||||
(none)
|
||||
)
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,121 @@
|
||||
;; name in dgo: guard
|
||||
;; dgos: CWI
|
||||
|
||||
;; stub for now
|
||||
|
||||
(deftype guard-anim-info (structure)
|
||||
((anim-index int32 2 :offset-assert 0)
|
||||
(anim-index-front int32 :offset 0)
|
||||
(anim-index-back int32 :offset 4)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8 ;; 8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
#|
|
||||
(deftype guard-global-info (UNKNOWN)
|
||||
((prev-yellow-hit int8 :offset-assert 4)
|
||||
(prev-blue-hit int8 :offset-assert 5)
|
||||
(knocked UNKNOWN 2 :offset-assert 8)
|
||||
(knocked-land UNKNOWN 2 :offset-assert 16)
|
||||
(anim-knocked-front int32 :offset-assert 8)
|
||||
(anim-knocked-back int32 :offset-assert 12)
|
||||
(anim-knocked-front-land int32 :offset-assert 16)
|
||||
(anim-knocked-back-land int32 :offset-assert 20)
|
||||
(yellow-hit-anim UNKNOWN 2 :offset-assert 24)
|
||||
(yellow-land-anim UNKNOWN 2 :offset-assert 40)
|
||||
(blue-hit-anim UNKNOWN 1 :offset-assert 56)
|
||||
)
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
)
|
||||
|#
|
||||
|
||||
(deftype guard-shoot-info (structure)
|
||||
((anim-index int32 :offset-assert 0)
|
||||
(start float :offset-assert 4)
|
||||
(end float :offset-assert 8)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #xc ;; 12
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
(deftype crimson-guard (citizen)
|
||||
(
|
||||
(info symbol :offset-assert 964)
|
||||
(hit-face uint32 :offset-assert 968)
|
||||
(anim-get-up-front int32 :offset-assert 972)
|
||||
(anim-get-up-back int32 :offset-assert 976)
|
||||
(small-hit int32 :offset-assert 980)
|
||||
(yellow-anim uint32 :offset-assert 984)
|
||||
(guard-type uint8 :offset-assert 988)
|
||||
(settings traffic-guard-type-settings :offset-assert 992)
|
||||
(next-time time-frame :offset-assert 1000)
|
||||
(last-time-see-target time-frame :offset-assert 1008)
|
||||
(joint symbol :offset-assert 1016)
|
||||
(joint-enable symbol :offset-assert 1020)
|
||||
(already-shot symbol :offset-assert 1024)
|
||||
(miss-amount float :offset-assert 1028)
|
||||
(l-control symbol :offset-assert 1032)
|
||||
(next-shot int64 :offset-assert 1040)
|
||||
(anim-shoot guard-shoot-info 3 :inline :offset-assert 1048) ;; elt size: 13.333333333333334
|
||||
(transport int64 :offset-assert 1088)
|
||||
(transport-side uint32 :offset-assert 1096)
|
||||
(target-flags uint8 :offset-assert 1100)
|
||||
(target-pos vector :inline :offset-assert 1104)
|
||||
(target-pos-predict vector :inline :offset-assert 1120)
|
||||
(target-pos-predict-miss vector :inline :offset-assert 1136)
|
||||
(target-vel-vec vector :inline :offset-assert 1152)
|
||||
(target-vel float :offset-assert 1168)
|
||||
(target-self vector :inline :offset-assert 1184)
|
||||
(target-self-xz vector :inline :offset-assert 1200)
|
||||
(target-self-dist float :offset-assert 1216)
|
||||
(target-self-xz-dist float :offset-assert 1220)
|
||||
(target-y-angle degrees :offset-assert 1224)
|
||||
(last-visible-target-pos vector :inline :offset-assert 1232)
|
||||
(lazer-sound uint32 :offset-assert 1248)
|
||||
(move-position vector :inline :offset-assert 1264)
|
||||
(move-index int32 :offset-assert 1280)
|
||||
(traffic-target-status traffic-target-status :inline :offset-assert 1296)
|
||||
(minimap connection-minimap :offset-assert 1376)
|
||||
(other-side symbol :offset-assert 1380)
|
||||
)
|
||||
:method-count-assert 227
|
||||
:size-assert #x568 ;; 1384
|
||||
:flag-assert #xe304f00568
|
||||
(:methods
|
||||
(crimson-guard-method-201 () none 201)
|
||||
(crimson-guard-method-202 () none 202)
|
||||
(crimson-guard-method-203 () none 203)
|
||||
(crimson-guard-method-204 () none 204)
|
||||
(crimson-guard-method-205 () none 205)
|
||||
(crimson-guard-method-206 () none 206)
|
||||
(crimson-guard-method-207 () none 207)
|
||||
(crimson-guard-method-208 () none 208)
|
||||
(crimson-guard-method-209 () none 209)
|
||||
(crimson-guard-method-210 () none 210)
|
||||
(crimson-guard-method-211 () none 211)
|
||||
(crimson-guard-method-212 () none 212)
|
||||
(crimson-guard-method-213 () none 213)
|
||||
(crimson-guard-method-214 () none 214)
|
||||
(crimson-guard-method-215 () none 215)
|
||||
(crimson-guard-method-216 () none 216)
|
||||
(crimson-guard-method-217 () none 217)
|
||||
(crimson-guard-method-218 () none 218)
|
||||
(crimson-guard-method-219 () none 219)
|
||||
(crimson-guard-method-220 () none 220)
|
||||
(crimson-guard-method-221 () none 221)
|
||||
(crimson-guard-method-222 () none 222)
|
||||
(crimson-guard-method-223 () none 223)
|
||||
(crimson-guard-method-224 () none 224)
|
||||
(crimson-guard-method-225 () none 225)
|
||||
(crimson-guard-method-226 () none 226))
|
||||
)
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ all initialized from static data."
|
||||
:size-assert #x20
|
||||
:flag-assert #xf00000020
|
||||
(:methods
|
||||
(xz-height-map-method-9 (_type_ vector) float 9)
|
||||
(xz-height-map-method-10 (_type_ vector) none 10)
|
||||
(xz-height-map-method-11 (_type_) none 11)
|
||||
(xz-height-map-method-12 (_type_ vector) none 12)
|
||||
(xz-height-map-method-13 (_type_ vector) none 13)
|
||||
(xz-height-map-method-14 (_type_ vector int) none 14)
|
||||
(get-height-at-point (_type_ vector) float 9)
|
||||
(debug-draw-mesh (_type_ vector) none 10)
|
||||
(debug-print (_type_) none 11)
|
||||
(debug-draw-at-point (_type_ vector) none 12)
|
||||
(debug-draw (_type_ vector) none 13)
|
||||
(debug-add-offset (_type_ vector int) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -43,5 +43,5 @@ all initialized from static data."
|
||||
(defun get-traffic-height ((arg0 vector))
|
||||
"@returns The value of [[xz-height-map::9]] using [[*traffic-height-map*]] and the [[vector]] provided
|
||||
@see [[xz-height-map::9]]"
|
||||
(xz-height-map-method-9 *traffic-height-map* arg0)
|
||||
(get-height-at-point *traffic-height-map* arg0)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,247 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod debug-print xz-height-map ((obj xz-height-map))
|
||||
(format #t "(define *traffic-height-map*~%")
|
||||
(format #t " (static-height-map~%")
|
||||
(format
|
||||
#t
|
||||
" :offset ((meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> obj x-offset)
|
||||
(-> obj y-offset)
|
||||
(-> obj z-offset)
|
||||
)
|
||||
(format #t " :x-spacing (meters ~M)~%" (/ 1.0 (-> obj x-inv-spacing)))
|
||||
(format #t " :z-spacing (meters ~M)~%" (/ 1.0 (-> obj z-inv-spacing)))
|
||||
(format #t " :y-scale (meters ~M)~%" (-> obj y-scale))
|
||||
(format #t " :x-dim ~d~%" (-> obj x-dim))
|
||||
(format #t " :z-dim ~d~%" (-> obj z-dim))
|
||||
(format #t " :data~%")
|
||||
(format #t " (~%")
|
||||
(let ((s5-0 0))
|
||||
(dotimes (s4-0 (-> obj z-dim))
|
||||
(dotimes (s3-0 (-> obj x-dim))
|
||||
(format #t " ~2d" (-> obj data s5-0))
|
||||
(+! s5-0 1)
|
||||
)
|
||||
(format #t "~%")
|
||||
)
|
||||
)
|
||||
(format #t "~T)~%")
|
||||
(format #t " )~%")
|
||||
(format #t " )~%~%")
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod debug-add-offset xz-height-map ((obj xz-height-map) (arg0 vector) (arg1 int))
|
||||
"Add an offset to the given point, likely for debugging purposes."
|
||||
(let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> obj x-offset)) (-> obj x-inv-spacing)))))
|
||||
(a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> obj z-offset)) (-> obj z-inv-spacing)))))
|
||||
)
|
||||
(when (and (>= v1-1 0) (< v1-1 (-> obj x-dim)) (>= a1-1 0) (< a1-1 (-> obj z-dim)))
|
||||
(let ((v1-2 (+ v1-1 (* a1-1 (-> obj x-dim)))))
|
||||
(+! (-> obj data v1-2) arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod debug-draw-at-point xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> obj x-offset)) (-> obj x-inv-spacing)))))
|
||||
(a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> obj z-offset)) (-> obj z-inv-spacing)))))
|
||||
(a2-1 (-> obj x-dim))
|
||||
(a3-0 (-> obj z-dim))
|
||||
)
|
||||
(when (and (>= v1-1 0) (< v1-1 a2-1) (>= a1-1 0) (< a1-1 a3-0))
|
||||
(let* ((a2-3 (+ v1-1 (* a1-1 a2-1)))
|
||||
(gp-0 (-> obj data a2-3))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 x) (+ (-> obj x-offset) (/ (the float v1-1) (-> obj x-inv-spacing))))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(set! (-> s5-0 z) (+ (-> obj z-offset) (/ (the float a1-1) (-> obj z-inv-spacing))))
|
||||
(set! (-> s5-0 y) (get-height-at-point obj s5-0))
|
||||
(let ((s4-0 add-debug-text-3d)
|
||||
(s3-0 #t)
|
||||
(s2-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" gp-0)
|
||||
(s4-0
|
||||
s3-0
|
||||
(the-as bucket-id s2-0)
|
||||
*temp-string*
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-height-at-point xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(let* ((f0-1 (fmax 0.0 (* (-> obj x-inv-spacing) (- (-> arg0 x) (-> obj x-offset)))))
|
||||
(f2-4 (fmax 0.0 (* (-> obj z-inv-spacing) (- (-> arg0 z) (-> obj z-offset)))))
|
||||
(a2-0 (the int f0-1))
|
||||
(a1-1 (the int f2-4))
|
||||
(f1-7 (- f0-1 (the float a2-0)))
|
||||
(f0-4 (- f2-4 (the float a1-1)))
|
||||
(v1-0 (-> obj x-dim))
|
||||
(a3-0 (-> obj z-dim))
|
||||
(a1-7
|
||||
(the-as
|
||||
(pointer int8)
|
||||
(+ (+ (min a2-0 (+ v1-0 -2)) (* (min a1-1 (+ a3-0 -2)) v1-0) 0) (the-as int (the-as pointer (-> obj data))))
|
||||
)
|
||||
)
|
||||
(f3-3 (the float (-> a1-7 0)))
|
||||
(f4-1 (the float (-> a1-7 1)))
|
||||
(f2-8 (the float (-> a1-7 v1-0)))
|
||||
(f5-1 (the float (-> a1-7 (+ v1-0 1))))
|
||||
(f3-5 (+ (* f3-3 (- 1.0 f1-7)) (* f4-1 f1-7)))
|
||||
(f1-9 (+ (* f2-8 (- 1.0 f1-7)) (* f5-1 f1-7)))
|
||||
)
|
||||
(+ (* (+ (* f3-5 (- 1.0 f0-4)) (* f1-9 f0-4)) (-> obj y-scale)) (-> obj y-offset))
|
||||
)
|
||||
)
|
||||
|
||||
(defun point-in-bbox? ((arg0 bounding-box) (arg1 vector))
|
||||
(and (>= (-> arg1 x) (-> arg0 min x))
|
||||
(>= (-> arg1 y) (-> arg0 min y))
|
||||
(>= (-> arg1 z) (-> arg0 min z))
|
||||
(>= (-> arg0 max x) (-> arg1 x))
|
||||
(>= (-> arg0 max y) (-> arg1 y))
|
||||
(>= (-> arg0 max z) (-> arg1 z))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod debug-draw-mesh xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(local-vars (sv-80 int) (sv-96 int))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(mem-copy! (the-as pointer (-> s5-0 vector 2)) (the-as pointer arg0) 32)
|
||||
(.svf (&-> (-> s5-0 vector) 0 quad) vf0)
|
||||
(let ((f30-0 (/ 1.0 (-> obj z-inv-spacing)))
|
||||
(f28-0 (/ 1.0 (-> obj x-inv-spacing)))
|
||||
(s4-0 (-> obj x-dim))
|
||||
(s3-0 (-> obj z-dim))
|
||||
)
|
||||
(let ((s2-0 (&-> (-> obj data) 0)))
|
||||
(set! (-> s5-0 vector 0 z) (-> obj z-offset))
|
||||
(countdown (s1-0 s3-0)
|
||||
(let ((s0-0 s2-0))
|
||||
(set! (-> s5-0 vector 0 x) (-> obj x-offset))
|
||||
(set! (-> s5-0 vector 0 y) (+ (-> obj y-offset) (* (the float (-> s0-0 0)) (-> obj y-scale))))
|
||||
(set! sv-80 (+ s4-0 -1))
|
||||
(while (nonzero? sv-80)
|
||||
(set! sv-80 (+ sv-80 -1))
|
||||
(set! (-> s5-0 vector 1 quad) (-> s5-0 vector 0 quad))
|
||||
(+! (-> s5-0 vector 0 x) f28-0)
|
||||
(set! s0-0 (&-> s0-0 1))
|
||||
(set! (-> s5-0 vector 0 y) (+ (-> obj y-offset) (* (the float (-> s0-0 0)) (-> obj y-scale))))
|
||||
(if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (the-as vector (-> s5-0 vector)))
|
||||
(point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 1))
|
||||
)
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug2)
|
||||
(the-as vector (-> s5-0 vector))
|
||||
(-> s5-0 vector 1)
|
||||
*color-red*
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> s5-0 vector 0 z) f30-0)
|
||||
(&+! s2-0 s4-0)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (&-> (-> obj data) 0)))
|
||||
(set! (-> s5-0 vector 0 x) (-> obj x-offset))
|
||||
(countdown (s1-1 s4-0)
|
||||
(let ((s0-1 (the-as pointer s2-1)))
|
||||
(set! (-> s5-0 vector 0 z) (-> obj z-offset))
|
||||
(set! (-> s5-0 vector 0 y)
|
||||
(+ (-> obj y-offset) (* (the float (-> (the-as (pointer int8) s0-1) 0)) (-> obj y-scale)))
|
||||
)
|
||||
(set! sv-96 (+ s3-0 -1))
|
||||
(while (nonzero? sv-96)
|
||||
(set! sv-96 (+ sv-96 -1))
|
||||
(set! (-> s5-0 vector 1 quad) (-> s5-0 vector 0 quad))
|
||||
(+! (-> s5-0 vector 0 z) f30-0)
|
||||
(&+! s0-1 s4-0)
|
||||
(set! (-> s5-0 vector 0 y)
|
||||
(+ (-> obj y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> obj y-scale)))
|
||||
)
|
||||
(if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (the-as vector (-> s5-0 vector)))
|
||||
(point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 1))
|
||||
)
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug2)
|
||||
(the-as vector (-> s5-0 vector))
|
||||
(-> s5-0 vector 1)
|
||||
*color-blue*
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> s5-0 vector 0 x) f28-0)
|
||||
(set! s2-1 (&-> s2-1 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod debug-draw xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector4w-2)))
|
||||
(let ((a1-1 (-> v1-0 vector)))
|
||||
(let ((a0-1 arg0))
|
||||
(let ((a2-1 -573440.0))
|
||||
(.mov vf6 a2-1)
|
||||
)
|
||||
(.lvf vf4 (&-> a0-1 quad))
|
||||
)
|
||||
(.add.x.vf vf5 vf0 vf0 :mask #b1000)
|
||||
(.add.x.vf vf5 vf4 vf6 :mask #b111)
|
||||
(.svf (&-> a1-1 0 quad) vf5)
|
||||
)
|
||||
(let ((a1-2 (-> v1-0 vector 1)))
|
||||
(let ((a0-2 arg0))
|
||||
(let ((a2-3 573440.0))
|
||||
(.mov vf6 a2-3)
|
||||
)
|
||||
(.lvf vf4 (&-> a0-2 quad))
|
||||
)
|
||||
(.add.x.vf vf5 vf0 vf0 :mask #b1000)
|
||||
(.add.x.vf vf5 vf4 vf6 :mask #b111)
|
||||
(.svf (&-> a1-2 quad) vf5)
|
||||
)
|
||||
(debug-draw-mesh obj (the-as vector (-> v1-0 vector)))
|
||||
)
|
||||
(debug-draw-at-point obj arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,33 @@
|
||||
;; name in dgo: metalhead-flitter
|
||||
;; dgos: CWI
|
||||
|
||||
|
||||
(deftype metalhead-flitter (citizen-enemy)
|
||||
((move-angle float :offset-assert 980)
|
||||
(heading basic :offset-assert 984)
|
||||
(change-dir-time time-frame :offset-assert 992)
|
||||
(last-change-dir uint64 :offset-assert 1000)
|
||||
(off-screen-timer uint64 :offset-assert 1008)
|
||||
(amb-sound-timer uint64 :offset-assert 1016)
|
||||
(attack-time time-frame :offset-assert 1024)
|
||||
(target-pos vector :inline :offset-assert 1040)
|
||||
(attack-pos vector :inline :offset-assert 1056)
|
||||
(base-height float :offset-assert 1072)
|
||||
)
|
||||
:method-count-assert 210
|
||||
:size-assert #x434
|
||||
:flag-assert #xd203c00434
|
||||
(:methods
|
||||
(attack () _type_ :state 203)
|
||||
(ambush-jumping () _type_ :state 204)
|
||||
(metalhead-flitter-method-205 () none 205)
|
||||
(metalhead-flitter-method-206 () none 206)
|
||||
(metalhead-flitter-method-207 () none 207)
|
||||
(metalhead-flitter-method-208 () none 208)
|
||||
(metalhead-flitter-method-209 () none 209)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,39 @@
|
||||
;; name in dgo: metalhead-grunt
|
||||
;; dgos: CWI
|
||||
|
||||
(deftype metalhead-grunt (citizen-enemy)
|
||||
((patrol-anim grunt-anim-info :offset-assert 980)
|
||||
(charge-anim grunt-anim-info :offset-assert 984)
|
||||
(attack-anim grunt-anim-info :offset-assert 988)
|
||||
(knocked-anim grunt-anim-info :offset-assert 992)
|
||||
(yellow-hit-anim grunt-anim-info :offset-assert 996)
|
||||
(blue-hit-anim grunt-anim-info :offset-assert 1000)
|
||||
(intro-path basic :offset-assert 1004)
|
||||
(pad-jh1b23jhb13 uint32 :offset-assert 1008)
|
||||
(use-charge-anim-index int8 :offset-assert 1012)
|
||||
(knocked-anim-index int8 :offset-assert 1013)
|
||||
(jumping-ambush-path-pt int8 :offset-assert 1014)
|
||||
(grunt-flags uint8 :offset-assert 1015)
|
||||
(state-timeout2 uint64 :offset-assert 1016)
|
||||
(next-warn-time time-frame :offset-assert 1024)
|
||||
(dest vector :inline :offset-assert 1040)
|
||||
(pad-kj1n23kj1n23 uint32 4 :offset-assert 1056)
|
||||
)
|
||||
:method-count-assert 212
|
||||
:size-assert #x430
|
||||
:flag-assert #xd403b00430
|
||||
(:methods
|
||||
(attack () _type_ :state 203)
|
||||
(falling-ambush () _type_ :state 204)
|
||||
(jumping-ambush () _type_ :state 205)
|
||||
(jumping-ambush-cont () _type_ :state 206)
|
||||
(wait-for-focus () _type_ :state 207)
|
||||
(spin-attack () _type_ :state 208)
|
||||
(metalhead-grunt-method-209 () none 209)
|
||||
(metalhead-grunt-method-210 () none 210)
|
||||
(metalhead-grunt-method-211 () none 211)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,41 @@
|
||||
;; name in dgo: metalhead-predator
|
||||
;; dgos: CWI
|
||||
|
||||
|
||||
(deftype metalhead-predator-shot (metalhead-shot)
|
||||
()
|
||||
:method-count-assert 40
|
||||
:size-assert #x1f0 ;; 496
|
||||
:flag-assert #x28017001f0
|
||||
)
|
||||
|
||||
(deftype metalhead-predator (citizen-enemy)
|
||||
(
|
||||
(los los-control :inline :offset-assert 992)
|
||||
(want-stop symbol :offset-assert 1140)
|
||||
(target-pos vector :inline :offset-assert 1152)
|
||||
(curr-node int32 :offset-assert 1168)
|
||||
(hide-pos vector :inline :offset-assert 1184)
|
||||
(next-change int64 :offset-assert 1200)
|
||||
(shoot-angle degrees :offset-assert 1208)
|
||||
(miss-amount float :offset-assert 1212)
|
||||
(ambient-sound-id uint32 :offset-assert 1216)
|
||||
(shock-effect-time time-frame :offset-assert 1224)
|
||||
(shock-effect-end int64 :offset-assert 1232)
|
||||
(fade float :offset-assert 1240)
|
||||
(dest-fade float :offset-assert 1244)
|
||||
)
|
||||
:method-count-assert 209
|
||||
:size-assert #x4e0 ;; 1248
|
||||
:flag-assert #xd1046004e0
|
||||
(:methods
|
||||
(fire () _type_ :state 203)
|
||||
(close-attack () _type_ :state 204)
|
||||
(metalhead-predator-method-205 () none 205)
|
||||
(metalhead-predator-method-206 () none 206)
|
||||
(metalhead-predator-method-207 () none 207)
|
||||
(metalhead-predator-method-208 () none 208))
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -7,6 +7,27 @@
|
||||
|
||||
(declare-type nav-node structure)
|
||||
|
||||
(defenum nav-branch-clock-type
|
||||
:type uint8
|
||||
(no-clock 0)
|
||||
(clock2 1)
|
||||
(clock3 2)
|
||||
(clock4 3)
|
||||
)
|
||||
|
||||
(defenum nav-branch-clock-mask
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(phase-1 0)
|
||||
(phase-1a 1)
|
||||
(phase-2 2)
|
||||
(phase-2a 3)
|
||||
(phase-3 4)
|
||||
(phase-3a 5)
|
||||
(phase-4 6)
|
||||
(phase-4a 7)
|
||||
)
|
||||
|
||||
;; +++nav-node-flag-byte
|
||||
(defenum nav-node-flag-byte
|
||||
"The same as [[nav-node-flag]] but more compact"
|
||||
@@ -22,35 +43,35 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype nav-branch (structure)
|
||||
((node int32 2 :offset-assert 0)
|
||||
(src-node nav-node :offset 0)
|
||||
(dest-node nav-node :offset 4)
|
||||
(temp-dest-node-id int32 :offset 4)
|
||||
(speed-limit uint8 :offset-assert 8)
|
||||
(density uint8 :offset-assert 9)
|
||||
(clock-type uint8 :offset-assert 10)
|
||||
(clock-mask uint8 :offset-assert 11)
|
||||
(max-user-count uint8 :offset-assert 12)
|
||||
(user-count uint8 :offset-assert 13)
|
||||
(width uint8 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 15)
|
||||
((node nav-node 2 :offset-assert 0)
|
||||
(src-node nav-node :offset 0)
|
||||
(dest-node nav-node :offset 4)
|
||||
(temp-dest-node-id int32 :offset 4)
|
||||
(speed-limit uint8 :offset-assert 8)
|
||||
(density uint8 :offset-assert 9)
|
||||
(clock-type nav-branch-clock-type :offset-assert 10)
|
||||
(clock-mask nav-branch-clock-mask :offset-assert 11)
|
||||
(max-user-count uint8 :offset-assert 12)
|
||||
(user-count uint8 :offset-assert 13)
|
||||
(width uint8 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 15)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #x10
|
||||
:flag-assert #x1500000010
|
||||
(:methods
|
||||
(nav-branch-method-9 (_type_) none 9)
|
||||
(nav-branch-method-10 (_type_ object int) none 10)
|
||||
(set-default-density-speed-and-width (_type_) none 9)
|
||||
(debug-print (_type_ object int) none 10)
|
||||
(get-density (_type_) float 11)
|
||||
(get-speed-limit (_type_) float 12)
|
||||
(get-width (_type_) float 13)
|
||||
(user-limit-reached? (_type_) symbol 14)
|
||||
(dest-node-id-at-max? (_type_) symbol 15)
|
||||
(nav-branch-method-16 (_type_ float) none 16)
|
||||
(nav-branch-method-17 (_type_ float) none 17)
|
||||
(nav-branch-method-18 (_type_ float) none 18)
|
||||
(nav-branch-method-19 (_type_ nav-node) none 19)
|
||||
(nav-branch-method-20 (_type_ nav-node) none 20)
|
||||
(set-density (_type_ float) none 16)
|
||||
(set-speed-limit (_type_ float) none 17)
|
||||
(set-width (_type_ float) none 18)
|
||||
(set-src-node (_type_ nav-node) none 19)
|
||||
(set-dst-node (_type_ nav-node) none 20)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -75,15 +96,15 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x1600000020
|
||||
(:methods
|
||||
(nav-node-method-9 (_type_) none 9)
|
||||
(nav-node-method-10 (_type_ symbol string) none 10)
|
||||
(nav-node-method-11 (_type_ int) none 11)
|
||||
(nav-node-method-12 (_type_ vector nav-node) none 12)
|
||||
(nav-node-method-13 (_type_ vector) none 13)
|
||||
(nav-node-method-14 (_type_ vector) none 14)
|
||||
(nav-node-method-15 (_type_ uint) none 15)
|
||||
(nav-node-method-16 (_type_ float) none 16)
|
||||
(nav-node-method-17 (_type_ float) none 17)
|
||||
(debug-draw (_type_) none 9)
|
||||
(debug-print (_type_ symbol string) none 10)
|
||||
(remove-branch-by-idx (_type_ int) none 11)
|
||||
(init-from-pt-and-heading (_type_ vector vector) none 12)
|
||||
(set-pos-xyz (_type_ vector) none 13)
|
||||
(set-angle-from-heading (_type_ vector) none 14)
|
||||
(set-id-and-link-branches-back (_type_ uint) none 15)
|
||||
(set-radius (_type_ float) none 16)
|
||||
(set-angle (_type_ float) none 17)
|
||||
(get-position (_type_ vector) vector 18)
|
||||
(calc-sine-and-cosine! (_type_ vector) vector 19)
|
||||
(get-angle (_type_) float 20)
|
||||
@@ -187,42 +208,42 @@
|
||||
:flag-assert #x2d0000003c
|
||||
(:methods
|
||||
(new (symbol type int int int uint) _type_ 0)
|
||||
(nav-graph-method-9 (_type_) none 9)
|
||||
(debug-draw-nodes (_type_) none 9)
|
||||
(nav-graph-method-10 (_type_ vector int) none 10)
|
||||
(nav-graph-method-11 (_type_) none 11)
|
||||
(nav-graph-method-12 (_type_) none 12)
|
||||
(nav-graph-method-13 (_type_ int int) none 13)
|
||||
(nav-graph-method-14 (_type_ int int) none 14)
|
||||
(nav-graph-method-15 (_type_) none 15)
|
||||
(nav-graph-method-16 (_type_ int) nav-node 16)
|
||||
(nav-graph-method-17 (_type_ nav-node) none 17)
|
||||
(nav-graph-method-18 (_type_ nav-node int) none 18)
|
||||
(debug-reset (_type_) none 15)
|
||||
(debug-add-node (_type_ int) nav-node 16)
|
||||
(debug-link-node-to-graph (_type_ nav-node) none 17)
|
||||
(debug-reset-branch-array (_type_ nav-node int) none 18)
|
||||
(nav-graph-method-19 (_type_ int int int int int int) none 19)
|
||||
(nav-graph-method-20 (_type_ int int) none 20)
|
||||
(nav-graph-method-21 (_type_) none 21)
|
||||
(nav-graph-method-22 (_type_ int int) none 22)
|
||||
(nav-graph-method-23 (_type_ int int) none 23)
|
||||
(nav-graph-method-24 (_type_ int int) none 24)
|
||||
(nav-graph-method-25 (_type_ symbol symbol) none 25)
|
||||
(nav-graph-method-26 (_type_ symbol symbol) none 26)
|
||||
(nav-graph-method-27 (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none 27)
|
||||
(nav-graph-method-28 (_type_) none 28)
|
||||
(nav-graph-method-29 (_type_ symbol) none 29)
|
||||
(nav-graph-method-30 (_type_ uint) none 30)
|
||||
(nav-graph-method-31 (_type_ float) none 31)
|
||||
(nav-graph-method-32 (_type_ float) none 32)
|
||||
(nav-graph-method-33 (_type_ float) none 33)
|
||||
(nav-graph-method-34 (_type_ float) none 34)
|
||||
(nav-graph-method-35 (_type_ int) none 35)
|
||||
(nav-graph-method-36 (_type_ int) none 36)
|
||||
(nav-graph-method-37 (_type_ vector) none 37)
|
||||
(move-selected-to-height-map-height (_type_) none 21)
|
||||
(select-nodes-in-range (_type_ int int) none 22)
|
||||
(deselect-nodes-in-range (_type_ int int) none 23)
|
||||
(toggle-select-nodes-in-range (_type_ int int) none 24)
|
||||
(select-nodes-in-level (_type_ symbol symbol) none 25)
|
||||
(select-nodes-by-nav-mesh-id (_type_ int symbol) none 26)
|
||||
(select-nodes-by-flags (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none 27)
|
||||
(print-selected-nodes (_type_) none 28)
|
||||
(assign-selected-nodes-to-level (_type_ symbol) none 29)
|
||||
(assign-selected-nodes-to-nav-mesh (_type_ uint) none 30)
|
||||
(set-radius-of-selected-nodes (_type_ float) none 31)
|
||||
(set-speed-limit-of-selected (_type_ float) none 32)
|
||||
(set-density-of-selected (_type_ float) none 33)
|
||||
(set-width-of-selected (_type_ float) none 34)
|
||||
(or-flags-of-selected-nodes (_type_ nav-node-flag-byte) none 35)
|
||||
(and-flags-of-selected-nodes (_type_ nav-node-flag-byte) none 36)
|
||||
(offset-pos-of-selected (_type_ vector) none 37)
|
||||
(nav-graph-method-38 (_type_) none 38)
|
||||
(nav-graph-method-39 (_type_) none 39)
|
||||
(nav-graph-method-40 (_type_ int) int 40)
|
||||
(node-at-idx (_type_ int) nav-node 41)
|
||||
(nav-graph-method-42 (_type_) none 42)
|
||||
(nav-graph-method-43 (_type_ nav-graph-link string) none 43)
|
||||
(from-editor (_type_ nav-node symbol) none 44)
|
||||
(patch-nodes (_type_) none 42)
|
||||
(copy-to-mysql-graph (_type_ mysql-nav-graph string) none 43)
|
||||
(from-editor (_type_ mysql-nav-graph symbol) none 44)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,480 @@
|
||||
;; name in dgo: target-pilot
|
||||
;; dgos: CWI
|
||||
|
||||
(deftype collide-query-with-5vec (structure)
|
||||
"A custom type"
|
||||
((cquery collide-query :inline)
|
||||
(vec vector 5 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *pilot-mods* (new 'static 'surface :name 'empty :seek0 1.0 :seek90 1.0 :seek180 1.0 :fric 1.0))
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 59]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 64]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 82]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 130]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 150]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 182]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 96]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 114]
|
||||
;; WARN: disable def twice: 124. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 47]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 9]
|
||||
(defbehavior target-pilot-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
'pilot
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(('end-mode)
|
||||
(let ((v1-4 (-> self pilot)))
|
||||
(when (nonzero? v1-4)
|
||||
(let ((a0-5 (handle->process (-> v1-4 vehicle))))
|
||||
(if a0-5
|
||||
(put-rider-in-seat (the-as vehicle a0-5) (-> v1-4 seat-index) (the-as process-focusable #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
enter-state
|
||||
(process->handle arg0)
|
||||
(go target-pilot-get-off)
|
||||
)
|
||||
(('change-mode)
|
||||
(case (-> arg3 param 0)
|
||||
(('grab)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status dead)))
|
||||
(if (not (-> arg3 param 1))
|
||||
#t
|
||||
(go target-pilot-grab)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('normal)
|
||||
enter-state
|
||||
(process->handle arg0)
|
||||
(go target-pilot-get-off)
|
||||
)
|
||||
(('gun)
|
||||
(if (logtest? (-> self game features) (game-feature gun))
|
||||
(target-gun-init (the-as int (-> arg3 param 2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('swim)
|
||||
#f
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-pilot-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
)
|
||||
(('get-vehicle)
|
||||
(if (nonzero? (-> self pilot))
|
||||
(handle->process (-> self pilot vehicle))
|
||||
)
|
||||
)
|
||||
(('attack 'attack-or-shove 'attack-invinc)
|
||||
(target-attacked
|
||||
arg2
|
||||
(the-as attack-info (-> arg3 param 1))
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
target-pilot-hit
|
||||
)
|
||||
)
|
||||
(('vehicle-hit)
|
||||
(speech-control-method-12 *speech-control* self (if (-> self pilot as-daxter?)
|
||||
(speech-type speech-type-1 speech-type-3 speech-type-5)
|
||||
(speech-type speech-type-0 speech-type-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('vehicle-got-hit)
|
||||
(speech-control-method-12
|
||||
*speech-control*
|
||||
self
|
||||
(if (-> self pilot as-daxter?)
|
||||
(speech-type speech-type-0 speech-type-1 speech-type-3 speech-type-5)
|
||||
(speech-type speech-type-1 speech-type-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior target-pilot-pidax-enter target ()
|
||||
(set! (-> self pilot art-group-backup) (-> self draw art-group))
|
||||
(set! (-> self draw art-group) (-> self sidekick 0 draw art-group))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw-bounds2))
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix 'indax)
|
||||
)
|
||||
|
||||
(defbehavior target-pilot-pidax-exit target ()
|
||||
(ja-channel-set! 0)
|
||||
(set! (-> self draw art-group) (the-as art-group (-> self pilot art-group-backup)))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw-bounds2))
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix #f)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defbehavior target-pilot-exit target ()
|
||||
(the-as
|
||||
object
|
||||
(when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name)))
|
||||
(or (= v1-3 'target-pilot-stance)
|
||||
(= v1-3 'target-pilot-impact)
|
||||
(= v1-3 'target-pilot-get-off)
|
||||
(= v1-3 'target-pilot-grab)
|
||||
(= v1-3 'target-pilot-clone-anim)
|
||||
(= v1-3 'target-pilot-hit)
|
||||
(= v1-3 'target-pilot-death)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (-> self manipy)))
|
||||
(when v1-4
|
||||
(deactivate (-> v1-4 0))
|
||||
(set! (-> self manipy) (the-as (pointer manipy) #f))
|
||||
)
|
||||
)
|
||||
(if (-> self pilot as-daxter?)
|
||||
(target-pilot-pidax-exit)
|
||||
)
|
||||
(let ((v1-11 (-> self pilot)))
|
||||
(when (nonzero? v1-11)
|
||||
(set! (-> self control nav-radius) (-> v1-11 backup-nav-radius))
|
||||
(let ((gp-0 (handle->process (-> v1-11 vehicle))))
|
||||
(when gp-0
|
||||
(remove-rider (the-as vehicle gp-0) self)
|
||||
(send-event gp-0 'player-get-off)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self neck flex-blend) 1.0)
|
||||
(let ((v1-22 (-> self control root-prim)))
|
||||
(set! (-> v1-22 prim-core collide-as) (-> self control backup-collide-as))
|
||||
(set! (-> v1-22 prim-core collide-with) (-> self control backup-collide-with))
|
||||
)
|
||||
(logclear! (-> self focus-status) (focus-status pilot-riding pilot))
|
||||
(logclear! (-> self control root-prim prim-core action) (collide-action stuck-wall-escape))
|
||||
(set! (-> self control mod-surface) *walk-mods*)
|
||||
(logclear! (-> self state-flags) (state-flags sf6))
|
||||
(enable-set! (-> self arm-ik 0) #f)
|
||||
(enable-set! (-> self arm-ik 1) #f)
|
||||
(set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length))
|
||||
(let ((v1-43 (-> self node-list data)))
|
||||
(set! (-> v1-43 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
|
||||
(set! (-> v1-43 0 param1) (the-as basic (-> self control trans)))
|
||||
(set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset)))
|
||||
)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(set! (-> self control reaction) target-collision-reaction)
|
||||
(set! (-> self control cspace-offset quad) (the-as uint128 0))
|
||||
(target-exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defbehavior target-pilot-init target ((arg0 handle) (arg1 symbol))
|
||||
(target-exit)
|
||||
(if (zero? (-> self pilot))
|
||||
(set! (-> self pilot) (new 'process 'pilot-info))
|
||||
)
|
||||
(let ((s5-0 (-> self pilot)))
|
||||
(set! (-> s5-0 backup-nav-radius) (-> self control nav-radius))
|
||||
(set! (-> s5-0 gun?) #t)
|
||||
(set! (-> s5-0 enable-cam-side-shift) #f)
|
||||
(set! (-> s5-0 as-daxter?) arg1)
|
||||
(set! (-> s5-0 entity) #f)
|
||||
(set! (-> s5-0 cam-side-shift) 0.0)
|
||||
(if (-> self pilot as-daxter?)
|
||||
(target-pilot-pidax-enter)
|
||||
)
|
||||
(cond
|
||||
((handle->process arg0)
|
||||
(set! (-> s5-0 vehicle) arg0)
|
||||
)
|
||||
(else
|
||||
(break!)
|
||||
0
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (handle->process (-> s5-0 vehicle))))
|
||||
(when s4-1
|
||||
(set! (-> s5-0 entity) (-> s4-1 entity))
|
||||
(set! (-> s5-0 gun?) (logtest? (-> (the-as vehicle s4-1) info-override flags) 32))
|
||||
(set! (-> s5-0 enable-cam-side-shift) (logtest? (-> (the-as vehicle s4-1) info-override flags) 128))
|
||||
(send-event
|
||||
(ppointer->process (-> (the-as vehicle s4-1) parent))
|
||||
'player-got-on-vehicle-child
|
||||
(the-as vehicle s4-1)
|
||||
)
|
||||
(set! (-> s5-0 stance) (vehicle-method-72 (the-as vehicle s4-1)))
|
||||
(let ((s3-0 (get-seat-count (the-as vehicle s4-1))))
|
||||
(dotimes (s2-0 s3-0)
|
||||
(let ((a0-20 (get-rider-in-seat (the-as vehicle s4-1) s2-0)))
|
||||
(if (and a0-20 (send-event a0-20 'knocked-off))
|
||||
(put-rider-in-seat (the-as vehicle s4-1) s2-0 (the-as process-focusable #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-43 (get-best-seat-for-vehicle (the-as vehicle s4-1) (-> self control trans) 1 1)))
|
||||
(set! (-> s5-0 seat-index) (max 0 v1-43))
|
||||
)
|
||||
(cond
|
||||
((-> s5-0 as-daxter?)
|
||||
(set! (-> s5-0 left-right-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 front-back-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 up-down-accel-factor) 0.0000012207031)
|
||||
)
|
||||
((zero? (-> s5-0 stance))
|
||||
(set! (-> s5-0 left-right-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 front-back-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 up-down-accel-factor) 0.00000051879886)
|
||||
)
|
||||
(else
|
||||
(set! (-> s5-0 left-right-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 front-back-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 up-down-accel-factor) 0.00000061035155)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (-> s5-0 gun?))
|
||||
(if arg1
|
||||
(set! (-> self control current-surface flags)
|
||||
(logior (surface-flag gun-fast-exit) (-> self control current-surface flags))
|
||||
)
|
||||
)
|
||||
(target-gun-end-mode arg1)
|
||||
)
|
||||
)
|
||||
(set! (-> self board latch?) #f)
|
||||
(set! (-> self control reaction) target-collision-reaction)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(set! (-> self control ctrl-xz-vel) 0.0)
|
||||
(set! (-> self focus-status) (logior (focus-status pilot) (-> self focus-status)))
|
||||
(set! (-> self control bend-target) 0.0)
|
||||
(let ((v1-73 (-> self node-list data)))
|
||||
(set! (-> v1-73 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!))
|
||||
(set! (-> v1-73 0 param1) (the-as basic (-> self control trans)))
|
||||
(set! (-> v1-73 0 param2) (the-as basic (-> self control cspace-offset)))
|
||||
)
|
||||
(let ((v1-75 (-> self control root-prim)))
|
||||
(set! (-> v1-75 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-75 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(set! (-> self control root-prim prim-core collide-as) (collide-spec jak-vehicle))
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(set! (-> self control status) (collide-status))
|
||||
(the-as object 0)
|
||||
)
|
||||
|
||||
(defbehavior pilot-on-ground? target ()
|
||||
(logtest? (-> self control status) (collide-status on-surface))
|
||||
)
|
||||
|
||||
(defbehavior target-pilot-post target ()
|
||||
(local-vars (v1-55 symbol) (a0-44 object) (a0-56 int) (a0-58 int))
|
||||
(let* ((v1-1 (-> *perf-stats* data 17))
|
||||
(a0-0 (-> v1-1 ctrl))
|
||||
)
|
||||
(+! (-> v1-1 count) 1)
|
||||
(b! (zero? a0-0) cfg-2 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mtpc pcr0 0)
|
||||
(.mtpc pcr1 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mtc0 Perf a0-0)
|
||||
)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(label cfg-2)
|
||||
0
|
||||
(let ((f30-0 (-> self clock clock-ratio)))
|
||||
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
|
||||
(update-rates! (-> self clock) (/ f30-0 (the float gp-1)))
|
||||
(b! #t cfg-4 :delay (nop!))
|
||||
(label cfg-3)
|
||||
(+! gp-1 -1)
|
||||
(set! (-> self control remaining-ctrl-iterations) gp-1)
|
||||
(flag-setup)
|
||||
(build-conversions (-> self control transv))
|
||||
(do-rotations1)
|
||||
(do-rotations2)
|
||||
(reverse-conversions (-> self control transv))
|
||||
(vector-!
|
||||
(-> self control cspace-offset)
|
||||
(-> self control draw-offset)
|
||||
(-> self control anim-collide-offset-world)
|
||||
)
|
||||
(let ((a1-5 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-5 options) (overlaps-others-options oo0))
|
||||
(set! (-> a1-5 collide-with-filter) (the-as collide-spec -1))
|
||||
(set! (-> a1-5 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> self control) a1-5)
|
||||
)
|
||||
(post-flag-setup)
|
||||
(label cfg-4)
|
||||
(b! (nonzero? gp-1) cfg-3 :delay (nop!))
|
||||
)
|
||||
(update-rates! (-> self clock) f30-0)
|
||||
)
|
||||
(let* ((gp-2 (-> self pilot))
|
||||
(s5-0 (handle->process (-> gp-2 vehicle)))
|
||||
)
|
||||
(when s5-0
|
||||
(compute-seat-position (the-as vehicle s5-0) (-> self control trans) (-> gp-2 seat-index))
|
||||
(set! (-> self control transv quad) (-> (the-as vehicle s5-0) root-override-2 transv quad))
|
||||
(quaternion-copy! (-> self control quat) (-> (the-as vehicle s5-0) root-override-2 quat))
|
||||
(quaternion-copy! (-> self control quat-for-control) (-> self control quat))
|
||||
(quaternion-copy! (-> self control dir-targ) (-> self control quat))
|
||||
(let ((s4-0 (-> self alt-cam-pos)))
|
||||
(when (not (logtest? (-> self focus-status) (focus-status dead)))
|
||||
(let ((s3-0 (new 'stack-no-clear 'collide-query-with-5vec)))
|
||||
(set! (-> s3-0 vec 2 x) 0.0)
|
||||
(set! (-> s3-0 vec 2 y) 20480.0)
|
||||
(let ((a0-18 (-> self node-list data 0 bone transform)))
|
||||
(set! (-> s3-0 vec 1 quad) (-> a0-18 vector 2 quad))
|
||||
)
|
||||
(set! (-> s3-0 vec 1 y) 0.0)
|
||||
(vector-rotate90-around-y! (-> s3-0 vec 1) (-> s3-0 vec 1))
|
||||
(vector-normalize! (-> s3-0 vec 1) 1.0)
|
||||
(set! (-> s3-0 vec 0 quad) (-> self control trans quad))
|
||||
(when (-> gp-2 enable-cam-side-shift)
|
||||
(let ((s2-0 0))
|
||||
(b! #t cfg-22 :delay (nop!))
|
||||
(label cfg-14)
|
||||
(let ((v1-48 (-> s3-0 cquery)))
|
||||
(set! (-> v1-48 radius) 2048.0)
|
||||
(set! (-> v1-48 collide-with) (collide-spec backgnd))
|
||||
(set! (-> v1-48 ignore-process0) #f)
|
||||
(set! (-> v1-48 ignore-process1) #f)
|
||||
(set! (-> v1-48 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-48 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s3-0 cquery start-pos quad) (-> s3-0 vec 0 quad))
|
||||
(vector-float*! (-> s3-0 cquery move-dist) (-> s3-0 vec 1) (-> s3-0 vec 2 y))
|
||||
(let ((f0-10 (fill-and-probe-using-line-sphere *collide-cache* (-> s3-0 cquery))))
|
||||
(let ((v1-54 (>= f0-10 0.0)))
|
||||
(b! (not v1-54) cfg-19 :likely-delay (set! v1-55 v1-54))
|
||||
)
|
||||
(set! v1-55 (= (-> s3-0 cquery best-other-tri pat mode) (pat-mode wall)))
|
||||
(label cfg-19)
|
||||
(when v1-55
|
||||
(+! (-> s3-0 vec 2 x) (* -1.0 (-> s3-0 vec 2 y) (- 1.0 f0-10)))
|
||||
0
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 vec 2 y) (* -1.0 (-> s3-0 vec 2 y)))
|
||||
(+! s2-0 1)
|
||||
(label cfg-22)
|
||||
(b! (< s2-0 2) cfg-14)
|
||||
)
|
||||
(set! (-> s3-0 vec 2 x)
|
||||
(* (-> s3-0 vec 2 x) (fmax 0.25 (fmin 1.0 (* 0.000008138021 (vector-length (-> self control transv))))))
|
||||
)
|
||||
(seek! (-> gp-2 cam-side-shift) (-> s3-0 vec 2 x) (* 16384.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(set! (-> s4-0 x) (+ (-> s3-0 vec 0 x) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 x))))
|
||||
(set! (-> s4-0 z) (+ (-> s3-0 vec 0 z) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 z))))
|
||||
(set! (-> s4-0 y) (fmax (fmin (-> s4-0 y) (+ 2048.0 (-> s3-0 vec 0 y))) (+ -2048.0 (-> s3-0 vec 0 y))))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (new 'stack-no-clear 'matrix)))
|
||||
(vehicle-method-117 (the-as vehicle s5-0) (the-as vector (-> s4-1 vector)) (-> gp-2 seat-index) 0)
|
||||
(vehicle-method-117 (the-as vehicle s5-0) (-> s4-1 vector 1) (-> gp-2 seat-index) 1)
|
||||
(enable-set! (-> self arm-ik 0) #t)
|
||||
(enable-set! (-> self arm-ik 1) #t)
|
||||
(handle-copy! (-> self arm-ik 0) (the-as vector (-> s4-1 vector)))
|
||||
(handle-copy! (-> self arm-ik 1) (-> s4-1 vector 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when *debug-segment*
|
||||
(let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0))
|
||||
(v1-97 'target-post)
|
||||
(s5-1 *profile-target-post-color*)
|
||||
)
|
||||
(let ((a0-43 *dproc*))
|
||||
(b! (not a0-43) cfg-30 :likely-delay (set! a0-44 a0-43))
|
||||
)
|
||||
(set! a0-44 *debug-segment*)
|
||||
(label cfg-30)
|
||||
(when a0-44
|
||||
(let ((s4-2 (-> gp-3 data (-> gp-3 count))))
|
||||
(let ((s3-1 (-> gp-3 base-time)))
|
||||
(set! (-> s4-2 name) v1-97)
|
||||
(set! (-> s4-2 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1))))
|
||||
)
|
||||
(set! (-> s4-2 depth) (the-as uint (-> gp-3 depth)))
|
||||
(set! (-> s4-2 color) s5-1)
|
||||
(set! (-> gp-3 segment (-> gp-3 depth)) s4-2)
|
||||
)
|
||||
(+! (-> gp-3 count) 1)
|
||||
(+! (-> gp-3 depth) 1)
|
||||
(set! (-> gp-3 max-depth) (max (-> gp-3 max-depth) (-> gp-3 depth)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(ja-post)
|
||||
(when *debug-segment*
|
||||
(let ((gp-4 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let* ((v1-121 (+ (-> gp-4 depth) -1))
|
||||
(s5-2 (-> gp-4 segment v1-121))
|
||||
(s4-3 (-> gp-4 base-time))
|
||||
)
|
||||
(when (>= v1-121 0)
|
||||
(set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-3))))
|
||||
(+! (-> gp-4 depth) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(joint-points)
|
||||
(update-transforms (-> self control))
|
||||
(do-target-gspot)
|
||||
(target-powerup-process)
|
||||
(let ((v1-130 (-> *perf-stats* data 17)))
|
||||
(b! (zero? (-> v1-130 ctrl)) cfg-43 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mfpc a0-56 pcr0)
|
||||
(+! (-> v1-130 accum0) a0-56)
|
||||
(.mfpc a0-58 pcr1)
|
||||
(+! (-> v1-130 accum1) a0-58)
|
||||
)
|
||||
(label cfg-43)
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,472 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype test-bike (bikec)
|
||||
()
|
||||
:heap-base #x320
|
||||
:method-count-assert 144
|
||||
:size-assert #x39c
|
||||
:flag-assert #x900320039c
|
||||
)
|
||||
|
||||
|
||||
(define *test-bike-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:friction-factor 0.516
|
||||
:cm-offset-joint (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1.5) (meters 2) (meters 5))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*test-bike-constants*
|
||||
:flags #x11
|
||||
:object-type #xd
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 32.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 100)
|
||||
:ground-probe-distance (meters 5)
|
||||
:ground-probe-offset (meters 0.5)
|
||||
:cos-ground-effect-angle -0.00000004371139
|
||||
:spring-lift-factor 0.35
|
||||
:air-drag-factor 1.2
|
||||
:steering-fin-angle 1820.4445
|
||||
:steering-thruster-factor 6.0
|
||||
:steering-thruster-max-gain 2.0
|
||||
:steering-thruster-half-gain-speed (meters 80)
|
||||
:tire-steering-angle 1274.3112
|
||||
:tire-static-friction 0.5
|
||||
:tire-static-friction-speed (meters 1)
|
||||
:tire-dynamic-friction 0.25
|
||||
:tire-dynamic-friction-speed (meters 3)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 8.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-limiting-drag 0.75
|
||||
:pitch-control-factor 0.5
|
||||
:roll-control-factor 1.0
|
||||
:roll-angle 7281.778
|
||||
:jump-thrust-factor 0.625
|
||||
:buoyancy-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 0.125)
|
||||
:target-speed-offset (meters 4)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 4.0
|
||||
:camera-string-min-height (meters 2.5)
|
||||
:camera-string-max-height (meters 2.5)
|
||||
:camera-string-min-length (meters 5)
|
||||
:camera-string-max-length (meters 5.5)
|
||||
:camera-min-fov 16384.0
|
||||
:camera-max-fov 18204.445
|
||||
:camera-head-offset 4096.0
|
||||
:camera-foot-offset -4096.0
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:seat-count 2
|
||||
:section-count 2
|
||||
:grab-rail-count 2
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 2
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2048.0 :w 1.0)
|
||||
(new 'static 'vector :x 2048.0 :z 8192.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -2048.0 :z 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x -2048.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 802.816 :z 1318.912 :w (the-as float #x10000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 2048.0 :z -4096.0 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
(new 'static 'vector :x -2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
)
|
||||
:section-bike-front (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x8 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-bike-rear (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x40 #x10 #x4)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-offset -0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:engine-sound-select 2
|
||||
:engine-sound (static-sound-name "vehicle-engine")
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "bike-scrape-stn")
|
||||
:glance-sound (static-sound-name "bike-glance-stn")
|
||||
:impact-sound (static-sound-name "bike-impact-stn")
|
||||
:extra-sound (static-sound-name "car-by-1")
|
||||
:explosion-part #xa1
|
||||
:headlight-count 1
|
||||
:taillight-count 1
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y -614.4 :z 13721.6 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :y 614.4 :z -7168.0 :w 1.0) (new 'static 'vector))
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:steering-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 7372.8003 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:steering-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10240.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5324.8 :w 1.0)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-control-point 6
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10649.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.25)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.75)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :y 1.0 :w 0.25)
|
||||
)
|
||||
(new 'static 'vehicle-control-point)
|
||||
(new 'static 'vehicle-control-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:color-option-count 1
|
||||
:color-option-array (new 'static 'inline-array vector 1 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-skel-and-rigid-body test-bike ((obj test-bike))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-bikec" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-and-init-rigid-body-control obj *test-bike-constants*)
|
||||
(set! (-> obj fin-fl) (new 'process 'joint-mod-rotate-local obj 7 #t))
|
||||
(set! (-> obj fin-fr) (new 'process 'joint-mod-rotate-local obj 6 #t))
|
||||
(set! (-> obj fin-rl) (new 'process 'joint-mod-rotate-local obj 9 #t))
|
||||
(set! (-> obj fin-rr) (new 'process 'joint-mod-rotate-local obj 10 #t))
|
||||
(set! (-> obj fin2-fl) (new 'process 'joint-mod-rotate-local obj 4 #t))
|
||||
(set! (-> obj fin2-fr) (new 'process 'joint-mod-rotate-local obj 5 #t))
|
||||
(set! (-> obj rudder) (new 'process 'joint-mod-rotate-local obj 8 #t))
|
||||
(set! (-> obj brake-l) (new 'process 'joint-mod-rotate-local obj 11 #t))
|
||||
(set! (-> obj brake-r) (new 'process 'joint-mod-rotate-local obj 12 #t))
|
||||
(set! (-> obj spoiler-l) (new 'process 'joint-mod-rotate-local obj 13 #t))
|
||||
(set! (-> obj spoiler-r) (new 'process 'joint-mod-rotate-local obj 14 #t))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype evan-test-bike (bikea)
|
||||
()
|
||||
:heap-base #x310
|
||||
:method-count-assert 144
|
||||
:size-assert #x38c
|
||||
:flag-assert #x900310038c
|
||||
)
|
||||
|
||||
|
||||
(define *evan-test-bike-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:bounce-factor 0.4
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 3) (meters 4) (meters 6))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*evan-test-bike-constants*
|
||||
:flags #x70
|
||||
:object-type #xb
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 30.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 40)
|
||||
:ground-probe-distance (meters 5)
|
||||
:cos-ground-effect-angle 0.42261824
|
||||
:spring-lift-factor 0.3
|
||||
:air-drag-factor 1.0
|
||||
:steering-thruster-factor 5.0
|
||||
:steering-thruster-max-gain 4.0
|
||||
:steering-thruster-half-gain-speed (meters 15)
|
||||
:tire-friction-factor 0.5
|
||||
:tire-static-friction 0.55
|
||||
:tire-dynamic-friction 0.4
|
||||
:tire-dynamic-friction-speed (meters 2)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.75
|
||||
:pitch-control-factor 1.0
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.625
|
||||
:buoyancy-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:target-speed-offset (meters 4)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 4.0
|
||||
:camera-string-min-height (meters 4.5)
|
||||
:camera-string-max-height (meters 4.5)
|
||||
:camera-string-min-length (meters 5)
|
||||
:camera-string-max-length (meters 12.5)
|
||||
:camera-min-fov 15109.688
|
||||
:camera-max-fov 17476.268
|
||||
:camera-head-offset 8192.0
|
||||
:camera-foot-offset 4096.0
|
||||
:camera-normal-max-angle-offset 5461.3335
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:seat-count 2
|
||||
:section-count 2
|
||||
:grab-rail-count 2
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 2
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2048.0 :w 1.0)
|
||||
(new 'static 'vector :x 2048.0 :z 4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -2048.0 :z 4096.0 :w 1.0)
|
||||
(new 'static 'vector :x -2048.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info :position (new 'static 'vector :w (the-as float #x10000)))
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 2048.0 :z -4096.0 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
(new 'static 'vector :x -2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
)
|
||||
:section-bike-front (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x10 #x8 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-bike-rear (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x4 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-offset -0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:engine-sound-select 1
|
||||
:engine-sound (static-sound-name "vehicle-engine")
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "bike-scrape-stn")
|
||||
:glance-sound (static-sound-name "bike-glance-stn")
|
||||
:impact-sound (static-sound-name "bike-impact-stn")
|
||||
:extra-sound (static-sound-name "bike-by-1")
|
||||
:explosion-part #xa1
|
||||
:headlight-count 1
|
||||
:taillight-count 1
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y -819.2 :z 10240.0 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :y 1433.6 :z -10240.0 :w 1.0) (new 'static 'vector))
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:steering-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z 7372.8003 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z -2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:steering-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10240.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5324.8 :w 1.0)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-control-point 6
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10649.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 2.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point)
|
||||
(new 'static 'vehicle-control-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:color-option-count 1
|
||||
:color-option-array (new 'static 'inline-array vector 1 (new 'static 'vector :x 0.6 :y 0.6 :z 1.5 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-skel-and-rigid-body evan-test-bike ((obj evan-test-bike))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-bikea" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-and-init-rigid-body-control obj *evan-test-bike-constants*)
|
||||
(set! (-> obj fin-fl) (new 'process 'joint-mod-rotate-local obj 8 #t))
|
||||
(set! (-> obj fin-fr) (new 'process 'joint-mod-rotate-local obj 7 #t))
|
||||
(set! (-> obj fin-rl) (new 'process 'joint-mod-rotate-local obj 6 #t))
|
||||
(set! (-> obj fin-rr) (new 'process 'joint-mod-rotate-local obj 5 #t))
|
||||
(set! (-> obj rudder) (new 'process 'joint-mod-rotate-local obj 4 #t))
|
||||
(set! (-> obj brake-l) (new 'process 'joint-mod-rotate-local obj 9 #t))
|
||||
(set! (-> obj brake-r) (new 'process 'joint-mod-rotate-local obj 10 #t))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,284 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype test-car (cara)
|
||||
()
|
||||
:heap-base #x320
|
||||
:method-count-assert 144
|
||||
:size-assert #x398
|
||||
:flag-assert #x9003200398
|
||||
)
|
||||
|
||||
|
||||
(define *test-car-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 8.0
|
||||
:inv-mass 0.125
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:bounce-factor 0.4
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 6))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*test-car-constants*
|
||||
:flags #x68
|
||||
:object-type #xe
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 39)
|
||||
:inv-max-engine-thrust 0.000006260016
|
||||
:engine-response-rate 20.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 1.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 40)
|
||||
:ground-probe-distance (meters 4.5)
|
||||
:cos-ground-effect-angle 0.42261824
|
||||
:spring-lift-factor 0.4
|
||||
:air-drag-factor 1.0
|
||||
:steering-thruster-factor 3.0
|
||||
:steering-thruster-max-gain 3.5
|
||||
:steering-thruster-half-gain-speed (meters 15)
|
||||
:tire-friction-factor 0.6
|
||||
:tire-static-friction 0.55
|
||||
:tire-dynamic-friction 0.4
|
||||
:tire-dynamic-friction-speed (meters 2)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.7
|
||||
:pitch-control-factor 0.5
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.5
|
||||
:buoyancy-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:target-speed-offset (meters 3)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 2.5
|
||||
:camera-string-min-height (meters 4.5)
|
||||
:camera-string-max-height (meters 4.5)
|
||||
:camera-string-min-length (meters 5)
|
||||
:camera-string-max-length (meters 12.5)
|
||||
:camera-min-fov 15109.688
|
||||
:camera-max-fov 17476.268
|
||||
:camera-head-offset 8192.0
|
||||
:camera-foot-offset 4096.0
|
||||
:camera-normal-max-angle-offset 5461.3335
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:seat-count 3
|
||||
:section-count 4
|
||||
:rider-stance #x1
|
||||
:grab-rail-count #x6
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 4505.6 :y -2662.4 :z 15360.0 :w 1.0)
|
||||
(new 'static 'vector :x -4505.6 :y -2662.4 :z 15360.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 7372.8 :y -819.2 :z -4096.0 :w 1.0)
|
||||
(new 'static 'vector :x 7372.8 :y -819.2 :z 4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -7372.8 :y -819.2 :z 4096.0 :w 1.0)
|
||||
(new 'static 'vector :x -7372.8 :y -819.2 :z -4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -3686.4 :y -409.6 :z -14950.4 :w 1.0)
|
||||
(new 'static 'vector :x 3686.4 :y -409.6 :z -14950.4 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :z -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3837.952 :y -409.6 :z -14950.4 :w 1.0)
|
||||
(new 'static 'vector :x 6041.6 :y -614.4 :z -9011.2 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 0.707 :z -0.707 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -6041.6 :y -614.4 :z -9011.2 :w 1.0)
|
||||
(new 'static 'vector :x -3837.952 :y -409.6 :z -14950.4 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -0.707 :z -0.707 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :x 4079.616 :y 819.2 :z -311.296 :w (the-as float #x30000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :x -4079.616 :y 819.2 :z -311.296 :w (the-as float #x30000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 3751.936 :z -10563.584 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 614.4 :y 614.4 :z 1433.6 :w 1.0)
|
||||
(new 'static 'vector :x 614.4 :y 614.4 :z -1433.6 :w 1.0)
|
||||
)
|
||||
:section-bike-front (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x200 #x20 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-bike-rear (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x400 #x40 #x4)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-car-front-right (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x800 #x80 #x8)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-car-rear-right (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x1000 #x100 #x10)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.09
|
||||
:engine-pitch-mod-amp 0.01
|
||||
:engine-sound-select 5
|
||||
:engine-sound (static-sound-name "vehicle-engine")
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "car-scrape-stn")
|
||||
:glance-sound (static-sound-name "car-glance-stn")
|
||||
:impact-sound (static-sound-name "car-impact-stn")
|
||||
:extra-sound (static-sound-name "car-by-5")
|
||||
:explosion-part #xa1
|
||||
:headlight-count 2
|
||||
:taillight-count 2
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3072.0 :z -14336.0 :w 1.0)
|
||||
(new 'static 'vector :x -3072.0 :z -14336.0 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 6963.2 :y -1024.0 :z -7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -6963.2 :y -1024.0 :z -7372.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3072.0 :z -13926.4 :w 1.0)
|
||||
(new 'static 'vector :x -3072.0 :z -13926.4 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 12288.0 :w 1.0)
|
||||
(new 'static 'vector :x -12288.0 :w 1.0)
|
||||
)
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :x 4915.2 :z 15564.8 :w 1.0)
|
||||
(new 'static 'vector :x -4915.2 :z 15564.8 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3276.8 :y 3276.8 :z -14131.2 :w 1.0)
|
||||
(new 'static 'vector :x -3276.8 :y 3276.8 :z -14131.2 :w 1.0)
|
||||
)
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:steering-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z 8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z -8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :w 1.0)
|
||||
:normal (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :w 1.0)
|
||||
:normal (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:steering-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 7782.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -7782.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-control-point 6
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 2.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point)
|
||||
(new 'static 'vehicle-control-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:color-option-count 1
|
||||
:color-option-array (new 'static 'inline-array vector 1 (new 'static 'vector :x 0.5 :y 1.0 :z 0.5 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-skel-and-rigid-body test-car ((obj test-car))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-cara" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-and-init-rigid-body-control obj *test-car-constants*)
|
||||
(set! (-> obj rider-hand-joint-array 0) 11)
|
||||
(set! (-> obj rider-hand-joint-array 1) 12)
|
||||
(set! (-> obj steering-wheel-l) (new 'process 'joint-mod-rotate-local obj 11 #t))
|
||||
(set! (-> obj steering-wheel-r) (new 'process 'joint-mod-rotate-local obj 12 #t))
|
||||
(set! (-> obj fin-fl) (new 'process 'joint-mod-rotate-local obj 4 #t))
|
||||
(set! (-> obj fin-fr) (new 'process 'joint-mod-rotate-local obj 5 #t))
|
||||
(set! (-> obj fin-rl) (new 'process 'joint-mod-rotate-local obj 6 #t))
|
||||
(set! (-> obj fin-rr) (new 'process 'joint-mod-rotate-local obj 8 #t))
|
||||
(set! (-> obj rudder) (new 'process 'joint-mod-rotate-local obj 10 #t))
|
||||
(set! (-> obj rudder-l) (new 'process 'joint-mod-rotate-local obj 7 #t))
|
||||
(set! (-> obj rudder-r) (new 'process 'joint-mod-rotate-local obj 9 #t))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -42,6 +42,33 @@
|
||||
)
|
||||
;; ---traffic-alert-flag
|
||||
|
||||
(defenum traffic-suppression-box-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(in-use 0)
|
||||
(tfsb1 1)
|
||||
(tfsb2 2)
|
||||
(tfsb3 3)
|
||||
(tfsb4 4)
|
||||
(tfsb5 5)
|
||||
(tfsb6 6)
|
||||
(tfsb7 7)
|
||||
)
|
||||
|
||||
(defenum traffic-suppression-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(tfs0 0)
|
||||
(needs-update 1)
|
||||
(tfs2 2)
|
||||
(tfs3 3)
|
||||
(tfs4 4)
|
||||
(tfs5 5)
|
||||
(tfs6 6)
|
||||
(tfs7 7)
|
||||
)
|
||||
|
||||
|
||||
(declare-type traffic-find-segment-struct structure)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
@@ -80,8 +107,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xb00000020
|
||||
(:methods
|
||||
(vis-cell-method-9 (_type_) none 9)
|
||||
(vis-cell-method-10 (_type_) none 10)
|
||||
(reset-segment-counts (_type_) none 9)
|
||||
(debug-draw (_type_) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -135,38 +162,38 @@
|
||||
:size-assert #x40
|
||||
:flag-assert #xe00000040
|
||||
(:methods
|
||||
(grid-info-method-9 (_type_ (pointer bounding-box) int int) none 9)
|
||||
(grid-info-method-10 (_type_ vis-grid-pos vector) none 10)
|
||||
(grid-info-method-11 (_type_ vis-grid-box vector) none 11)
|
||||
(grid-info-method-12 (_type_ rgba) none 12)
|
||||
(grid-info-method-13 (_type_ vis-grid-pos rgba) none 13)
|
||||
(setup-grid-from-bounding-box (_type_ (pointer bounding-box) int int) none 9)
|
||||
(lookup-cell-for-point (_type_ vis-grid-pos vector) none 10)
|
||||
(lookup-box-for-sphere (_type_ vis-grid-box vector) none 11)
|
||||
(debug-draw-grid (_type_ rgba) none 12)
|
||||
(debug-draw-cell (_type_ vis-grid-pos rgba) none 13)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype city-level-info (structure)
|
||||
((grid-info grid-info :inline :offset-assert 0)
|
||||
(cell-array (inline-array vis-cell) :offset-assert 64)
|
||||
(segment-count int16 :offset-assert 68)
|
||||
(cell-count uint16 :offset-assert 70)
|
||||
(segment-array uint32 :offset-assert 72)
|
||||
(nav-graph nav-graph :offset-assert 76)
|
||||
(camera-ceiling meters :offset-assert 80)
|
||||
(pad-array int8 56 :offset-assert 84)
|
||||
((grid-info grid-info :inline :offset-assert 0)
|
||||
(cell-array (inline-array vis-cell) :offset-assert 64)
|
||||
(segment-count int16 :offset-assert 68)
|
||||
(cell-count uint16 :offset-assert 70)
|
||||
(segment-array (inline-array nav-segment) :offset-assert 72)
|
||||
(nav-graph nav-graph :offset-assert 76)
|
||||
(camera-ceiling meters :offset-assert 80)
|
||||
(pad-array int8 56 :offset-assert 84)
|
||||
)
|
||||
:method-count-assert 19
|
||||
:size-assert #x8c
|
||||
:flag-assert #x130000008c
|
||||
(:methods
|
||||
(city-level-info-method-9 (_type_) symbol 9)
|
||||
(city-level-info-method-10 (_type_ vis-ray vector vector) none 10)
|
||||
(init-vis-ray (_type_ vis-ray vector vector) none 10)
|
||||
(city-level-info-method-11 (_type_ vis-ray) none 11)
|
||||
(city-level-info-method-12 (_type_ vector nav-branch vector) vector 12)
|
||||
(city-level-info-method-13 (_type_ vector) none 13)
|
||||
(city-level-info-method-14 (_type_ vis-grid-box) vis-cell 14)
|
||||
(city-level-info-method-15 (_type_ int int) symbol 15)
|
||||
(city-level-info-method-16 (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct object none)) none 16)
|
||||
(city-level-info-method-17 (_type_ traffic-engine) none 17)
|
||||
(lookup-cell-by-position (_type_ vector) vis-cell 13)
|
||||
(get-first-cell-in-box (_type_ vis-grid-box) vis-cell 14)
|
||||
(sphere-in-grid? (_type_ int int) symbol 15)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none 16)
|
||||
(update-suppressions-from-traffic-engine (_type_ traffic-engine) none 17)
|
||||
(city-level-info-method-18 (_type_) none 18)
|
||||
)
|
||||
)
|
||||
@@ -184,21 +211,21 @@
|
||||
:size-assert #x820
|
||||
:flag-assert #xf00000820
|
||||
(:methods
|
||||
(traffic-level-data-method-9 (_type_) none 9)
|
||||
(traffic-level-data-method-10 (_type_ vis-cell) none 10)
|
||||
(traffic-level-data-method-11 (_type_ int) none 11)
|
||||
(traffic-level-data-method-12 (_type_ vis-cell) none 12)
|
||||
(traffic-level-data-method-13 (_type_) vis-cell 13)
|
||||
(traffic-level-data-method-14 (_type_) none 14)
|
||||
(reset (_type_) none 9)
|
||||
(add-active-cell (_type_ vis-cell) none 10)
|
||||
(remove-active-cell (_type_ int) none 11)
|
||||
(add-newly-active-cell (_type_ vis-cell) none 12)
|
||||
(per-frame-cell-update (_type_) none 13)
|
||||
(debug-draw (_type_) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype traffic-suppression-box (structure)
|
||||
((data uint8 32 :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset 0)
|
||||
(flags uint8 :offset 12)
|
||||
(duration uint32 :offset 28)
|
||||
((data uint8 32 :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset 0)
|
||||
(flags traffic-suppression-box-flags :offset 12)
|
||||
(duration uint32 :offset 28)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -207,12 +234,12 @@
|
||||
|
||||
|
||||
(deftype traffic-guard-type-info (structure)
|
||||
((object-type uint8 :offset-assert 0)
|
||||
(max-target-count int8 :offset-assert 1)
|
||||
(min-target-count int8 :offset-assert 2)
|
||||
(target-count int8 :offset-assert 3)
|
||||
(count int8 :offset-assert 4)
|
||||
(change-to-type uint8 :offset-assert 5)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(max-target-count int8 :offset-assert 1)
|
||||
(min-target-count int8 :offset-assert 2)
|
||||
(target-count int8 :offset-assert 3)
|
||||
(count int8 :offset-assert 4)
|
||||
(change-to-type uint8 :offset-assert 5)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x6
|
||||
@@ -275,7 +302,7 @@
|
||||
(duration uint32 :offset-assert 16)
|
||||
(start-time time-frame :offset-assert 24)
|
||||
(notify-time time-frame :offset-assert 32)
|
||||
(alarm-sound-id uint32 :offset-assert 40)
|
||||
(alarm-sound-id sound-id :offset-assert 40)
|
||||
(target-status-array traffic-target-status 3 :inline :offset-assert 48)
|
||||
(settings traffic-alert-state-settings :inline :offset-assert 288)
|
||||
(guard-type-info-array traffic-guard-type-info 6 :inline :offset-assert 384)
|
||||
@@ -285,7 +312,7 @@
|
||||
:size-assert #x3d8
|
||||
:flag-assert #xa000003d8
|
||||
(:methods
|
||||
(traffic-alert-state-method-9 (_type_) none 9)
|
||||
(reset (_type_) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -311,19 +338,19 @@
|
||||
|
||||
|
||||
(deftype traffic-suppressor (structure)
|
||||
((flags uint8 :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset-assert 16)
|
||||
(array traffic-suppression-box 16 :inline :offset-assert 48)
|
||||
((flags traffic-suppression-flags :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset-assert 16)
|
||||
(array traffic-suppression-box 16 :inline :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x230
|
||||
:flag-assert #xe00000230
|
||||
(:methods
|
||||
(traffic-suppressor-method-9 (_type_) none 9)
|
||||
(traffic-suppressor-method-10 (_type_ traffic-suppression-params) none 10)
|
||||
(traffic-suppressor-method-11 (_type_ int) none 11)
|
||||
(traffic-suppressor-method-12 (_type_ traffic-suppression-params) none 12)
|
||||
(traffic-suppressor-method-13 (_type_) none 13)
|
||||
(reset-boxes (_type_) none 9)
|
||||
(add-new-supression-box (_type_ traffic-suppression-params) none 10)
|
||||
(remove-box-by-id (_type_ int) none 11)
|
||||
(update-box-from-params (_type_ traffic-suppression-params) none 12)
|
||||
(debug-draw (_type_) none 13)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -336,7 +363,7 @@
|
||||
(active-object-count uint8 :offset-assert 13)
|
||||
(inactive-object-count int8 :offset-assert 14)
|
||||
(active-object-list handle 126 :offset-assert 16)
|
||||
(active-object-type-list uint8 126 :offset-assert 1024)
|
||||
(active-object-type-list traffic-type 126 :offset-assert 1024)
|
||||
)
|
||||
:method-count-assert 27
|
||||
:size-assert #x47e
|
||||
@@ -345,28 +372,28 @@
|
||||
(traffic-tracker-method-9 (_type_) none 9)
|
||||
(traffic-tracker-method-10 (_type_) none 10)
|
||||
(traffic-tracker-method-11 (_type_) none 11)
|
||||
(traffic-tracker-method-12 (_type_ uint handle) none 12)
|
||||
(traffic-tracker-method-13 (_type_ int) handle 13)
|
||||
(traffic-tracker-method-14 (_type_ int handle) none 14)
|
||||
(traffic-tracker-method-15 (_type_ int) handle 15)
|
||||
(traffic-tracker-method-16 (_type_ int handle) handle 16)
|
||||
(traffic-tracker-method-17 (_type_ int handle) none 17)
|
||||
(traffic-tracker-method-18 (_type_ process) none 18)
|
||||
(traffic-tracker-method-19 (_type_ handle) none 19)
|
||||
(traffic-tracker-method-20 (_type_ int symbol) none 20)
|
||||
(traffic-tracker-method-21 (_type_ traffic-object-spawn-params) none 21)
|
||||
(traffic-tracker-method-22 (_type_ int nav-segment float) none 22)
|
||||
(traffic-tracker-method-23 (_type_ traffic-object-spawn-params) none 23)
|
||||
(traffic-tracker-method-24 (_type_ uint traffic-engine) none 24)
|
||||
(traffic-tracker-method-25 (_type_ (function process-focusable traffic-object-type-info none)) none 25)
|
||||
(traffic-tracker-method-26 (_type_ int (function process-tree none)) none 26)
|
||||
(add-active-process (_type_ traffic-type handle) none 12)
|
||||
(remove-active-process (_type_ int) handle 13)
|
||||
(add-reserved-process (_type_ traffic-type handle) none 14)
|
||||
(get-from-inactive-by-type (_type_ traffic-type) handle 15)
|
||||
(get-from-inactive-by-handle (_type_ traffic-type handle) handle 16)
|
||||
(deactivate-object (_type_ int symbol) none 17)
|
||||
(set-process-to-killed (_type_ process) none 18)
|
||||
(deactivate-all (_type_ symbol) none 19)
|
||||
(deactivate-all-of-type (_type_ traffic-type symbol) none 20)
|
||||
(activate-from-params (_type_ traffic-object-spawn-params) none 21)
|
||||
(activate-by-type (_type_ traffic-type nav-segment float) none 22)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none 23)
|
||||
(reset (_type_ uint traffic-engine) none 24)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none 25)
|
||||
(for-all-active-processes-of-type (_type_ traffic-type (function process-focusable traffic-object-type-info none)) none 26)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype traffic-engine (basic)
|
||||
((object-hash spatial-hash :offset-assert 4)
|
||||
(manager uint64 :offset-assert 8)
|
||||
(manager handle :offset-assert 8)
|
||||
(inv-density-factor float :offset-assert 16)
|
||||
(sync-clock uint8 :offset-assert 20)
|
||||
(sync-mask-8 uint8 :offset-assert 21)
|
||||
@@ -378,6 +405,8 @@
|
||||
(level-data-array traffic-level-data 2 :inline :offset-assert 1040)
|
||||
(object-type-info-array traffic-object-type-info 21 :inline :offset-assert 5200)
|
||||
(tracker-array traffic-tracker 2 :inline :offset-assert 5872)
|
||||
(citizen-tracker-array traffic-tracker :inline :offset 5872)
|
||||
(vehicle-tracker-array traffic-tracker :inline :offset 7024)
|
||||
(inactive-object-array handle 420 :offset-assert 8176)
|
||||
(suppressor traffic-suppressor :inline :offset-assert 11536)
|
||||
(danger-sphere-count int8 :offset-assert 12096)
|
||||
@@ -388,33 +417,34 @@
|
||||
:size-assert #x3050
|
||||
:flag-assert #x4a00003050
|
||||
(:methods
|
||||
(traffic-engine-method-9 (_type_) none 9)
|
||||
(traffic-engine-method-10 (_type_ process) none 10)
|
||||
(traffic-engine-method-11 (_type_) none 11)
|
||||
(traffic-engine-method-12 (_type_) none 12)
|
||||
(add-object (_type_ int process) none 13)
|
||||
(traffic-engine-method-14 (_type_ object object) symbol 14)
|
||||
(traffic-engine-method-15 (_type_ nav-segment float) none 15)
|
||||
(traffic-engine-method-16 (_type_ nav-segment float) none 16)
|
||||
(traffic-engine-method-17 (_type_ nav-branch) symbol 17)
|
||||
(new (symbol type) _type_ 0)
|
||||
(update-traffic (_type_) none 9)
|
||||
(reset-and-init-from-manager (_type_ process) none 10)
|
||||
(stop-alarm-sound (_type_) none 11)
|
||||
(debug-unused (_type_) none 12)
|
||||
(add-object (_type_ traffic-type process) none 13)
|
||||
(sphere-in-loaded-city-infos? (_type_ int vector) symbol 14)
|
||||
(activate-one-citizen (_type_ nav-segment float) none 15)
|
||||
(activate-one-vehicle (_type_ nav-segment float) none 16)
|
||||
(can-dest-be-used? (_type_ nav-branch) symbol 17)
|
||||
(child-killed (_type_ process) none 18)
|
||||
(traffic-engine-method-19 (_type_ object) none 19)
|
||||
(traffic-engine-method-20 (_type_ vector vector int) nav-segment 20)
|
||||
(traffic-engine-method-21 (_type_ vector int traffic-find-segment-struct function) none 21)
|
||||
(add-danger-sphere (_type_ traffic-danger-info) none 22)
|
||||
(traffic-engine-method-23 (_type_) none 23)
|
||||
(deactivate-all-from-level (_type_ symbol) none 19)
|
||||
(find-best-segment (_type_ vector vector int) nav-segment 20)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none 21)
|
||||
(add-danger (_type_ traffic-danger-info) none 22)
|
||||
(guard-count (_type_) int 23)
|
||||
(set-target-level (_type_ float) none 24)
|
||||
(set-guard-target-level (_type_ float) none 25)
|
||||
(deactivate-all (_type_) none 26)
|
||||
(deactivate-by-type (_type_ int) none 27)
|
||||
(traffic-engine-method-28 (_type_) symbol 28)
|
||||
(deactivate-by-type (_type_ traffic-type) none 27)
|
||||
(maybe-increase-guard-aim-count (_type_) symbol 28)
|
||||
(restore-default-settings (_type_) none 29)
|
||||
(increase-alert-level (_type_ object target) none 30)
|
||||
(decrease-alert-level (_type_ object) none 31)
|
||||
(set-alert-level (_type_ object) none 32)
|
||||
(set-max-alert-level (_type_ object) none 33)
|
||||
(set-alert-duration (_type_ object) none 34)
|
||||
(get-alert-level (_type_) symbol 35)
|
||||
(increase-alert-level (_type_ int target) none 30)
|
||||
(decrease-alert-level (_type_ int) none 31)
|
||||
(set-alert-level (_type_ int) none 32)
|
||||
(set-max-alert-level (_type_ int) none 33)
|
||||
(set-alert-duration (_type_ int) none 34)
|
||||
(get-alert-level (_type_) int 35)
|
||||
(get-target (_type_) target 36)
|
||||
(set-object-target-level (_type_ int float) none 37)
|
||||
(set-object-target-count (_type_ int int) none 38)
|
||||
@@ -422,36 +452,36 @@
|
||||
(get-object-reserve-count (_type_ int) int 40)
|
||||
(get-object-remaining-count (_type_ int) int 41)
|
||||
(activate-object (_type_ traffic-object-spawn-params) none 42)
|
||||
(traffic-engine-method-43 (_type_ traffic-object-spawn-params) none 43)
|
||||
(traffic-engine-method-44 (_type_ int float) none 44)
|
||||
(traffic-engine-method-45 (_type_) int 45)
|
||||
(new-suppression-box (_type_ object) none 46)
|
||||
(traffic-engine-method-47 (_type_ traffic-suppression-params) none 47)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none 43)
|
||||
(set-parking-spot-prob (_type_ int float) none 44)
|
||||
(get-random-parking-spot-type (_type_) traffic-type 45)
|
||||
(new-suppression-box (_type_ traffic-suppression-params) none 46)
|
||||
(remove-suppression-box (_type_ traffic-suppression-params) none 47)
|
||||
(update-suppression-box (_type_ traffic-suppression-params) none 48)
|
||||
(traffic-engine-method-49 (_type_ object int traffic-target-status) traffic-target-status 49)
|
||||
(traffic-engine-method-50 (_type_ process-drawable int) process-focusable 50)
|
||||
(traffic-engine-method-51 (_type_ (function none)) none 51)
|
||||
(traffic-engine-method-52 (_type_) none 52)
|
||||
(end-pursuit-by-type (_type_ int) none 53)
|
||||
(find-closest-to-with-collide-lists (_type_ process-drawable collide-spec) process-focusable 50)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none 51)
|
||||
(send-alert-events (_type_) none 52)
|
||||
(end-pursuit-by-type (_type_ traffic-type) none 53)
|
||||
(get-traffic-guard-type-settings (_type_ int) traffic-guard-type-settings 54)
|
||||
(get-guard-type-for-traffic-obj (_type_ int) uint 55)
|
||||
(get-traffic-guard-change-to-type (_type_ int) uint 56)
|
||||
(set-guard-target-count-range (_type_ int int int) none 57)
|
||||
(set-object-auto-activate (_type_ object object) none 58)
|
||||
(traffic-engine-method-59 (_type_ object int) none 59)
|
||||
(set-object-auto-activate (_type_ int object) none 58)
|
||||
(debug-check-proc-in-tracker (_type_ process int) none 59)
|
||||
(kill-traffic-sphere (_type_ sphere) none 60)
|
||||
(level-loaded (_type_ level) none 61)
|
||||
(level-killed (_type_ level) none 62)
|
||||
(traffic-engine-method-63 (_type_) none 63)
|
||||
(traffic-engine-method-64 (_type_) none 64)
|
||||
(traffic-engine-method-65 (_type_ vis-cell) none 65)
|
||||
(traffic-engine-method-66 (_type_) none 66)
|
||||
(traffic-engine-method-67 (_type_) none 67)
|
||||
(traffic-engine-method-68 (_type_) none 68)
|
||||
(traffic-engine-method-69 (_type_) none 69)
|
||||
(traffic-engine-method-70 (_type_) none 70)
|
||||
(traffic-engine-method-71 (_type_) none 71)
|
||||
(traffic-engine-method-72 (_type_) none 72)
|
||||
(traffic-engine-method-73 (_type_) none 73)
|
||||
(handle-new-vis-cell (_type_ vis-cell) none 65)
|
||||
(update-sync-from-frame-counter (_type_) none 66)
|
||||
(per-frame-guard-update (_type_) none 67)
|
||||
(per-frame-activate-deactivate (_type_) none 68)
|
||||
(per-frame-danger-update (_type_) none 69)
|
||||
(update-danger-from-target (_type_) none 70)
|
||||
(per-frame-alert-update (_type_) none 71)
|
||||
(per-frame-suppressor-update (_type_) none 72)
|
||||
(recompute-supressions (_type_) none 73)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,3 +6,863 @@
|
||||
;; dgos: CWI
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *traffic-engine* (the-as traffic-engine #f))
|
||||
|
||||
(define *traffic-fast-spawn* #f)
|
||||
|
||||
(deftype traffic-manager (process)
|
||||
((traffic-engine traffic-engine :offset-assert 128)
|
||||
(fast-spawn basic :offset-assert 132)
|
||||
(dark-guard-ratio int32 :offset-assert 136)
|
||||
(spawn-params traffic-object-spawn-params :inline :offset-assert 144)
|
||||
)
|
||||
:heap-base #x80
|
||||
:method-count-assert 22
|
||||
:size-assert #xf8
|
||||
:flag-assert #x16008000f8
|
||||
(:methods
|
||||
(idle () _type_ :state 14)
|
||||
(active () _type_ :state 15)
|
||||
(traffic-manager-method-16 (_type_) none 16)
|
||||
(spawn-all (_type_) none 17)
|
||||
(traffic-manager-method-18 (_type_) none 18)
|
||||
(kill-all (_type_) none 19)
|
||||
(traffic-manager-method-20 (_type_) none 20)
|
||||
(traffic-manager-method-21 (_type_) none 21)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun draw-city-info ((arg0 city-level-info) (arg1 vis-grid-pos))
|
||||
"@unused - but would be cool to revive! TODO"
|
||||
(let ((v1-0 (-> arg0 grid-info box)))
|
||||
(add-debug-box #t (bucket-id debug2) (-> v1-0 min) (-> v1-0 max) *color-yellow*)
|
||||
)
|
||||
(debug-draw-grid (-> arg0 grid-info) *color-gray*)
|
||||
(debug-draw-cell (-> arg0 grid-info) arg1 *color-red*)
|
||||
(let* ((v1-8 (+ (-> arg1 x)
|
||||
(* (-> arg1 z) (-> arg0 grid-info dimension-array 0))
|
||||
(* (* (-> arg1 y) (-> arg0 grid-info dimension-array 0)) (-> arg0 grid-info dimension-array 2))
|
||||
)
|
||||
)
|
||||
(v1-10 (-> arg0 cell-array v1-8))
|
||||
)
|
||||
(add-debug-sphere #t (bucket-id debug2) (-> v1-10 sphere) (-> v1-10 sphere r) *color-green*)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod traffic-manager-method-16 traffic-manager ((obj traffic-manager))
|
||||
(update-traffic (-> obj traffic-engine))
|
||||
(traffic-manager-method-18 obj)
|
||||
(spawn-all obj)
|
||||
(if *debug-segment*
|
||||
(debug-unused (-> obj traffic-engine))
|
||||
)
|
||||
(if *display-traffic-height-map*
|
||||
(debug-draw *traffic-height-map* (target-pos 0))
|
||||
)
|
||||
(when *display-trail-graph*
|
||||
(let ((a0-7 *trail-graph*))
|
||||
(if a0-7
|
||||
(debug-draw a0-7)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod traffic-manager-method-18 traffic-manager ((obj traffic-manager))
|
||||
(let ((s5-0 0))
|
||||
(while (< (the-as uint s5-0) (the-as uint 21))
|
||||
(let ((v1-2 (-> obj traffic-engine object-type-info-array s5-0)))
|
||||
(when (logtest? (-> v1-2 flags) 2)
|
||||
(let ((a0-5 (+ (-> v1-2 active-count) (-> v1-2 inactive-count))))
|
||||
(when (< (-> v1-2 want-count) a0-5)
|
||||
(let ((a0-10 (handle->process (get-from-inactive-by-type
|
||||
(-> obj traffic-engine tracker-array (-> v1-2 tracker-index))
|
||||
(the-as traffic-type s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-10
|
||||
(deactivate a0-10)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s5-0 1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod kill-all traffic-manager ((obj traffic-manager))
|
||||
(let ((s5-0 0))
|
||||
(while (< (the-as uint s5-0) (the-as uint 21))
|
||||
(let ((s4-0 (-> obj traffic-engine object-type-info-array s5-0)))
|
||||
(countdown (s3-0 (-> s4-0 inactive-count))
|
||||
(let ((a0-6 (handle->process (get-from-inactive-by-type
|
||||
(-> obj traffic-engine tracker-array (-> s4-0 tracker-index))
|
||||
(the-as traffic-type s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-6
|
||||
(deactivate a0-6)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s5-0 1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod spawn-all traffic-manager ((obj traffic-manager))
|
||||
(let ((s5-0 0))
|
||||
(b! #t cfg-4 :delay (nop!))
|
||||
(label cfg-1)
|
||||
(let ((s4-0 (-> obj traffic-engine object-type-info-array s5-0)))
|
||||
(set! (-> s4-0 flags) (logand -9 (-> s4-0 flags)))
|
||||
(if (= (level-status *level* (the-as symbol (-> s4-0 level))) 'active)
|
||||
(logior! (-> s4-0 flags) 8)
|
||||
)
|
||||
)
|
||||
(+! s5-0 1)
|
||||
(label cfg-4)
|
||||
(b! (< s5-0 21) cfg-1)
|
||||
)
|
||||
(let ((s5-1 1)
|
||||
(s4-1 0)
|
||||
(s3-1 #x1fffff)
|
||||
)
|
||||
(if (-> obj fast-spawn)
|
||||
(set! s5-1 120)
|
||||
)
|
||||
(b! #t cfg-36 :delay (nop!))
|
||||
(label cfg-8)
|
||||
(let* ((s2-0 (-> obj spawn-params))
|
||||
(s1-0 (-> s2-0 object-type))
|
||||
)
|
||||
(when (logtest? s3-1 (ash 1 s1-0))
|
||||
(let ((s0-0 (-> obj traffic-engine object-type-info-array s1-0)))
|
||||
(let ((v1-21 (+ (-> s0-0 active-count) (-> s0-0 inactive-count))))
|
||||
(b!
|
||||
(not (and (logtest? (-> s0-0 flags) 2) (logtest? (-> s0-0 flags) 8) (< v1-21 (-> s0-0 want-count))))
|
||||
cfg-29
|
||||
:delay (nop!)
|
||||
)
|
||||
(set! (-> s2-0 flags) (logand -9 (-> s2-0 flags)))
|
||||
(b!
|
||||
(not (and (= (-> s2-0 object-type) (traffic-type crimson-guard-1))
|
||||
(> (-> obj dark-guard-ratio) 0)
|
||||
(zero? (mod v1-21 (-> obj dark-guard-ratio)))
|
||||
)
|
||||
)
|
||||
cfg-25
|
||||
:delay (empty-form)
|
||||
)
|
||||
)
|
||||
(logior! (-> s2-0 flags) 8)
|
||||
(label cfg-25)
|
||||
(let ((a2-0 (traffic-object-spawn obj s2-0)))
|
||||
(b! (not a2-0) cfg-27 :delay (nop!))
|
||||
(add-object (-> obj traffic-engine) s1-0 a2-0)
|
||||
)
|
||||
(+! (-> s0-0 reserve-count) -1)
|
||||
)
|
||||
(+! (-> s2-0 id) 1)
|
||||
(+! s4-1 1)
|
||||
(b! #t cfg-28 :delay (nop!))
|
||||
(label cfg-27)
|
||||
(format 0 "traffic-manager: unable to spawn~%")
|
||||
(b! #t cfg-41 :delay (nop!))
|
||||
(label cfg-28)
|
||||
(b! #t cfg-33 :delay (nop!))
|
||||
(label cfg-29)
|
||||
(set! s3-1 (logclear s3-1 (ash 1 s1-0)))
|
||||
)
|
||||
(label cfg-33)
|
||||
(let ((v1-37 (the-as int (+ s1-0 1))))
|
||||
(if (>= (the-as uint v1-37) (the-as uint 21))
|
||||
(set! v1-37 0)
|
||||
)
|
||||
(set! (-> s2-0 object-type) (the-as traffic-type v1-37))
|
||||
)
|
||||
)
|
||||
(label cfg-36)
|
||||
(b! (and (< s4-1 s5-1) (nonzero? s3-1)) cfg-8 :delay (nop!))
|
||||
)
|
||||
(label cfg-41)
|
||||
(set! (-> obj fast-spawn) #f)
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs process-drawable.
|
||||
(defun vehicle-spawn ((arg0 process) (arg1 type) (arg2 traffic-object-spawn-params))
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(let* ((s3-0 (get-process *default-dead-pool* arg1 #x4000))
|
||||
(v1-1 (when s3-0
|
||||
(let ((t9-1 (method-of-type process activate)))
|
||||
(t9-1 s3-0 arg0 (symbol->string (-> arg1 symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-0 vehicle-init-by-other arg2)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-1
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(if (and gp-0 (logtest? (-> arg2 flags) 2))
|
||||
(vehicle-method-137 (the-as vehicle gp-0) arg2)
|
||||
)
|
||||
(the-as process-drawable gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs process-drawable.
|
||||
(defun citizen-spawn ((arg0 process) (arg1 type) (arg2 traffic-object-spawn-params))
|
||||
;; added check
|
||||
(when (zero? citizen-init-by-other)
|
||||
(return (the process-drawable #f))
|
||||
)
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(let* ((s3-0 (get-process *default-dead-pool* arg1 #x4000))
|
||||
(v1-1 (when s3-0
|
||||
(let ((t9-1 (method-of-type process activate)))
|
||||
(t9-1 s3-0 arg0 (symbol->string (-> arg1 symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-0 citizen-init-by-other arg2)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-1
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(the-as process-drawable gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defun traffic-object-spawn ((arg0 process) (arg1 traffic-object-spawn-params))
|
||||
(let ((v0-0 (the-as process-drawable #f)))
|
||||
(case (-> arg1 object-type)
|
||||
(((traffic-type bikea))
|
||||
(set! v0-0 (vehicle-spawn arg0 bikea arg1))
|
||||
)
|
||||
(((traffic-type bikeb))
|
||||
(set! v0-0 (vehicle-spawn arg0 bikeb arg1))
|
||||
)
|
||||
(((traffic-type bikec))
|
||||
(set! v0-0 (vehicle-spawn arg0 bikec arg1))
|
||||
)
|
||||
(((traffic-type cara))
|
||||
(set! v0-0 (vehicle-spawn arg0 cara arg1))
|
||||
)
|
||||
(((traffic-type carb))
|
||||
(set! v0-0 (vehicle-spawn arg0 carb arg1))
|
||||
)
|
||||
(((traffic-type carc))
|
||||
(set! v0-0 (vehicle-spawn arg0 carc arg1))
|
||||
)
|
||||
(((traffic-type guard-bike))
|
||||
(set! v0-0 (vehicle-spawn arg0 guard-bike arg1))
|
||||
)
|
||||
(((traffic-type hellcat))
|
||||
(set! v0-0 (vehicle-spawn arg0 hellcat arg1))
|
||||
)
|
||||
(((traffic-type citizen-norm-1))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-norm arg1))
|
||||
)
|
||||
(((traffic-type citizen-chick))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-chick arg1))
|
||||
)
|
||||
(((traffic-type citizen-fat))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-fat arg1))
|
||||
)
|
||||
(((traffic-type citizen-norm-2))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-norm arg1))
|
||||
)
|
||||
(((traffic-type metalhead-predator))
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-predator arg1))
|
||||
)
|
||||
(((traffic-type metalhead-grunt))
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-grunt arg1))
|
||||
)
|
||||
(((traffic-type metalhead-flitter))
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-flitter arg1))
|
||||
)
|
||||
(((traffic-type crimson-guard-1))
|
||||
(set! v0-0 (citizen-spawn arg0 crimson-guard arg1))
|
||||
)
|
||||
(((traffic-type crimson-guard-0))
|
||||
(set! v0-0 (citizen-spawn arg0 crimson-guard arg1))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defun type-from-vehicle-type ((arg0 vehicle-type))
|
||||
(case arg0
|
||||
(((vehicle-type bikea))
|
||||
bikea
|
||||
)
|
||||
(((vehicle-type bikeb))
|
||||
bikeb
|
||||
)
|
||||
(((vehicle-type bikec))
|
||||
bikec
|
||||
)
|
||||
(((vehicle-type cara))
|
||||
cara
|
||||
)
|
||||
(((vehicle-type carb))
|
||||
carb
|
||||
)
|
||||
(((vehicle-type carc))
|
||||
carc
|
||||
)
|
||||
(((vehicle-type guard-bike))
|
||||
guard-bike
|
||||
)
|
||||
(((vehicle-type hellcat))
|
||||
hellcat
|
||||
)
|
||||
(((vehicle-type evan-test-bike))
|
||||
evan-test-bike
|
||||
)
|
||||
(((vehicle-type test-bike))
|
||||
test-bike
|
||||
)
|
||||
(((vehicle-type test-car))
|
||||
test-car
|
||||
)
|
||||
(else
|
||||
bikea
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod traffic-manager-method-20 traffic-manager ((obj traffic-manager))
|
||||
(set! (-> obj traffic-engine) *traffic-engine*)
|
||||
(reset-and-init-from-manager (-> obj traffic-engine) obj)
|
||||
(restore-city-speeches)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs traffic-manager.
|
||||
(defmethod relocate traffic-manager ((obj traffic-manager) (arg0 int))
|
||||
(set! *traffic-manager* obj)
|
||||
(if *traffic-manager*
|
||||
(set! *traffic-manager* (&+ *traffic-manager* arg0))
|
||||
)
|
||||
(the-as traffic-manager ((method-of-type process relocate) obj arg0))
|
||||
)
|
||||
|
||||
(defmethod deactivate traffic-manager ((obj traffic-manager))
|
||||
(stop-alarm-sound (-> obj traffic-engine))
|
||||
(set! *traffic-manager* #f)
|
||||
(remove-setting *setting-control* obj 'task-mask)
|
||||
(apply-settings *setting-control*)
|
||||
(speech-control-method-9 *speech-control*)
|
||||
((method-of-type process deactivate) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod traffic-manager-method-21 traffic-manager ((obj traffic-manager))
|
||||
(let ((s5-0 (new 'stack-no-clear 'array 'int8 21)))
|
||||
(set! (-> s5-0 11) 8)
|
||||
(set! (-> s5-0 12) 8)
|
||||
(set! (-> s5-0 13) 8)
|
||||
(set! (-> s5-0 14) 7)
|
||||
(set! (-> s5-0 15) 7)
|
||||
(set! (-> s5-0 16) 7)
|
||||
(set! (-> s5-0 18) 4)
|
||||
(set! (-> s5-0 19) 3)
|
||||
(set! (-> s5-0 20) 0)
|
||||
(set! (-> s5-0 0) 15)
|
||||
(set! (-> s5-0 1) 15)
|
||||
(set! (-> s5-0 2) 14)
|
||||
(set! (-> s5-0 3) 1)
|
||||
(set! (-> s5-0 4) 1)
|
||||
(set! (-> s5-0 6) 9)
|
||||
(set! (-> s5-0 7) 0)
|
||||
(set! (-> s5-0 8) 14)
|
||||
(set! (-> s5-0 9) 14)
|
||||
(set! (-> s5-0 10) 14)
|
||||
(set! (-> obj fast-spawn) (the-as basic *traffic-fast-spawn*))
|
||||
(traffic-manager-method-20 obj)
|
||||
(let ((v1-20 (-> obj traffic-engine)))
|
||||
(dotimes (a0-2 21)
|
||||
(set! (-> v1-20 object-type-info-array a0-2 want-count) (-> s5-0 a0-2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (-> obj spawn-params)))
|
||||
(set! (-> s5-1 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-1 behavior) (the-as uint 1))
|
||||
(set! (-> s5-1 id) (the-as uint 0))
|
||||
(set! (-> s5-1 nav-mesh) #f)
|
||||
(set! (-> s5-1 nav-branch) #f)
|
||||
(set! (-> s5-1 proc) #f)
|
||||
(set! (-> s5-1 handle) (the-as uint #f))
|
||||
(set! (-> s5-1 user-data) (the-as uint 0))
|
||||
(set! (-> s5-1 flags) (the-as uint 2))
|
||||
(set! (-> s5-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s5-1 velocity))
|
||||
(vector-reset! (-> s5-1 position))
|
||||
(forward-up-nopitch->quaternion
|
||||
(-> s5-1 rotation)
|
||||
(new 'static 'vector :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(set! (-> s5-1 id) (the-as uint 1))
|
||||
)
|
||||
(set! (-> obj dark-guard-ratio) (if (task-node-closed? (game-task-node tomb-boss-resolution))
|
||||
5
|
||||
0
|
||||
)
|
||||
)
|
||||
(restore-default-settings (-> obj traffic-engine))
|
||||
(set! *traffic-manager* obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior traffic-manager-event-handler traffic-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((gp-0 (the-as object #t)))
|
||||
(case arg2
|
||||
(('child-killed)
|
||||
(child-killed (-> self traffic-engine) arg0)
|
||||
)
|
||||
(('increase-alert-level)
|
||||
(when *target*
|
||||
(let ((a1-4 (-> arg3 param 0)))
|
||||
(increase-alert-level (-> self traffic-engine) (the-as int a1-4) *target*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('decrease-alert-level)
|
||||
(let ((a1-5 (-> arg3 param 0)))
|
||||
(decrease-alert-level (-> self traffic-engine) (the-as int a1-5))
|
||||
)
|
||||
)
|
||||
(('set-alert-level)
|
||||
(let ((a1-6 (-> arg3 param 0)))
|
||||
(set-alert-level (-> self traffic-engine) (the-as int a1-6))
|
||||
)
|
||||
)
|
||||
(('set-max-alert-level)
|
||||
(let ((a1-7 (-> arg3 param 0)))
|
||||
(set-max-alert-level (-> self traffic-engine) (the-as int a1-7))
|
||||
)
|
||||
)
|
||||
(('get-alert-level)
|
||||
(set! gp-0 (get-alert-level (-> self traffic-engine)))
|
||||
)
|
||||
(('set-alert-duration)
|
||||
(let ((a1-8 (-> arg3 param 0)))
|
||||
(set-alert-duration (-> self traffic-engine) (the-as int a1-8))
|
||||
)
|
||||
)
|
||||
(('deactivate-all)
|
||||
(deactivate-all (-> self traffic-engine))
|
||||
)
|
||||
(('set-target-level)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0))))
|
||||
(set-target-level (-> self traffic-engine) f0-0)
|
||||
)
|
||||
)
|
||||
(('set-guard-target-level)
|
||||
(let ((f0-1 (the-as float (-> arg3 param 0))))
|
||||
(set-guard-target-level (-> self traffic-engine) f0-1)
|
||||
)
|
||||
)
|
||||
(('restore-default-settings)
|
||||
(restore-default-settings (-> self traffic-engine))
|
||||
)
|
||||
(('add-danger-sphere)
|
||||
(let ((a1-11 (-> arg3 param 0)))
|
||||
(add-danger (-> self traffic-engine) (the-as traffic-danger-info a1-11))
|
||||
)
|
||||
)
|
||||
(('spawn-object)
|
||||
(let ((s5-0 (the-as traffic-object-spawn-params (-> arg3 param 0))))
|
||||
(set! (-> s5-0 proc) (traffic-object-spawn self s5-0))
|
||||
)
|
||||
)
|
||||
(('activate-object)
|
||||
(let ((a1-13 (-> arg3 param 0)))
|
||||
(activate-object (-> self traffic-engine) (the-as traffic-object-spawn-params a1-13))
|
||||
)
|
||||
)
|
||||
(('get-object-remaining-count)
|
||||
(let ((a1-14 (-> arg3 param 0)))
|
||||
(set! gp-0 (get-object-remaining-count (-> self traffic-engine) (the-as int a1-14)))
|
||||
)
|
||||
)
|
||||
(('set-object-reserve-count)
|
||||
(let ((a1-15 (-> arg3 param 0))
|
||||
(a2-2 (-> arg3 param 1))
|
||||
)
|
||||
(set-object-reserve-count (-> self traffic-engine) (the-as int a1-15) a2-2)
|
||||
)
|
||||
)
|
||||
(('get-object-reserve-count)
|
||||
(let ((a1-16 (-> arg3 param 0)))
|
||||
(set! gp-0 (get-object-reserve-count (-> self traffic-engine) (the-as int a1-16)))
|
||||
)
|
||||
)
|
||||
(('set-object-target-level)
|
||||
(let ((a1-17 (-> arg3 param 0))
|
||||
(f0-2 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(set-object-target-level (-> self traffic-engine) (the-as int a1-17) f0-2)
|
||||
)
|
||||
)
|
||||
(('set-object-target-count)
|
||||
(let ((a1-18 (-> arg3 param 0))
|
||||
(a2-4 (-> arg3 param 1))
|
||||
)
|
||||
(set-object-target-count (-> self traffic-engine) (the-as int a1-18) (the-as int a2-4))
|
||||
)
|
||||
)
|
||||
(('set-guard-target-count-range)
|
||||
(let ((a1-19 (-> arg3 param 0))
|
||||
(a2-5 (-> arg3 param 1))
|
||||
(a3-1 (-> arg3 param 2))
|
||||
)
|
||||
(set-guard-target-count-range (-> self traffic-engine) (the-as int a1-19) (the-as int a2-5) (the-as int a3-1))
|
||||
)
|
||||
)
|
||||
(('deactivate-by-type)
|
||||
(let ((a1-20 (-> arg3 param 0)))
|
||||
(deactivate-by-type (-> self traffic-engine) (the-as traffic-type a1-20))
|
||||
)
|
||||
)
|
||||
(('new-suppression-box)
|
||||
(let ((a1-21 (-> arg3 param 0)))
|
||||
(new-suppression-box (-> self traffic-engine) (the-as traffic-suppression-params a1-21))
|
||||
)
|
||||
)
|
||||
(('update-suppression-box)
|
||||
(let ((a1-22 (-> arg3 param 0)))
|
||||
(update-suppression-box (-> self traffic-engine) (the-as traffic-suppression-params a1-22))
|
||||
)
|
||||
)
|
||||
(('kill-traffic-sphere)
|
||||
(let ((a1-23 (-> arg3 param 0)))
|
||||
(kill-traffic-sphere (-> self traffic-engine) (the-as sphere a1-23))
|
||||
)
|
||||
)
|
||||
(('set-guard-multi-focus)
|
||||
(let ((a0-74 (-> arg3 param 0))
|
||||
(v1-29 (-> self traffic-engine alert-state))
|
||||
)
|
||||
(if a0-74
|
||||
(logior! (-> v1-29 flags) (traffic-alert-flag guard-multi-focus))
|
||||
(logclear! (-> v1-29 flags) (traffic-alert-flag guard-multi-focus))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('set-disable-pursuit-control)
|
||||
(let ((a0-80 (-> arg3 param 0))
|
||||
(v1-31 (-> self traffic-engine alert-state))
|
||||
)
|
||||
(if a0-80
|
||||
(logior! (-> v1-31 flags) (traffic-alert-flag disable-pursuit-control))
|
||||
(logclear! (-> v1-31 flags) (traffic-alert-flag disable-pursuit-control))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('set-object-auto-activate)
|
||||
(let ((a1-26 (-> arg3 param 0))
|
||||
(a2-6 (-> arg3 param 1))
|
||||
)
|
||||
(set-object-auto-activate (-> self traffic-engine) (the-as int a1-26) a2-6)
|
||||
)
|
||||
)
|
||||
(('set-guard-force-visible)
|
||||
(let ((a0-89 (-> arg3 param 0))
|
||||
(v1-34 (-> self traffic-engine alert-state target-status-array))
|
||||
)
|
||||
(if a0-89
|
||||
(logior! (-> v1-34 0 flags) (traffic-target-flag force-visible))
|
||||
(logclear! (-> v1-34 0 flags) (traffic-target-flag force-visible))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('end-pursuit-by-type)
|
||||
(let ((a1-28 (-> arg3 param 0)))
|
||||
(end-pursuit-by-type (-> self traffic-engine) (the-as traffic-type a1-28))
|
||||
)
|
||||
)
|
||||
(('level-loaded)
|
||||
(let ((a1-29 (-> arg3 param 0)))
|
||||
(level-loaded (-> self traffic-engine) (the-as level a1-29))
|
||||
)
|
||||
)
|
||||
(('level-killed)
|
||||
(let ((s5-1 (the-as object (-> arg3 param 0))))
|
||||
(level-killed (-> self traffic-engine) (the-as level s5-1))
|
||||
(format #t "traffic-manager : level killed ~S~%" (-> (the-as level s5-1) nickname))
|
||||
)
|
||||
)
|
||||
(('add-object)
|
||||
(let ((a1-32 (-> arg3 param 0))
|
||||
(a2-8 (-> arg3 param 1))
|
||||
)
|
||||
(add-object (-> self traffic-engine) (the-as traffic-type a1-32) (the-as process a2-8))
|
||||
)
|
||||
)
|
||||
(('kill-all)
|
||||
(format #t "traffic-manager::kill-all~%")
|
||||
(deactivate-all (-> self traffic-engine))
|
||||
(kill-all self)
|
||||
)
|
||||
(('spawn-all)
|
||||
(format #t "traffic-manager::spawn-all~%")
|
||||
(set! (-> self fast-spawn) (the-as basic #t))
|
||||
(spawn-all self)
|
||||
)
|
||||
(('set-density-factor)
|
||||
(let ((f0-3 (the-as float (-> arg3 param 0))))
|
||||
(set! (-> self traffic-engine inv-density-factor) (/ 5.0 f0-3))
|
||||
)
|
||||
)
|
||||
(('rider-off)
|
||||
(let ((s5-2 (-> self child)))
|
||||
(while s5-2
|
||||
(send-event (ppointer->process s5-2) 'rider-off)
|
||||
(set! s5-2 (-> s5-2 0 brother))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('rider-on)
|
||||
(let ((s5-3 (-> self child)))
|
||||
(while s5-3
|
||||
(send-event (ppointer->process s5-3) 'rider-on)
|
||||
(set! s5-3 (-> s5-3 0 brother))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! gp-0 #f)
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior traffic-manager-init-by-other traffic-manager ()
|
||||
(stack-size-set! (-> self main-thread) 128)
|
||||
(ctywide-entity-hack)
|
||||
(traffic-manager-method-21 self)
|
||||
(add-setting! 'task-mask 'clear 0 #x4000)
|
||||
(set! (-> self event-hook) traffic-manager-event-handler)
|
||||
(rigid-body-queue-manager-spawn *traffic-rigid-body-queue* self)
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun traffic-start ()
|
||||
(kill-by-type traffic-manager *active-pool*)
|
||||
(process-spawn traffic-manager :from *city-dead-pool* :to *entity-pool*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun traffic-kill ()
|
||||
(kill-by-type traffic-manager *active-pool*)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate idle (traffic-manager)
|
||||
:virtual #t
|
||||
:event traffic-manager-event-handler
|
||||
:enter (behavior ()
|
||||
(spawn-all self)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(suspend)
|
||||
(go-virtual active)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate active (traffic-manager)
|
||||
:virtual #t
|
||||
:event traffic-manager-event-handler
|
||||
:code (the-as (function none :behavior traffic-manager) sleep-code)
|
||||
:post (behavior ()
|
||||
(traffic-manager-method-16 self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun riders-on ()
|
||||
(send-event *traffic-manager* 'rider-on)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun riders-off ()
|
||||
(send-event *traffic-manager* 'rider-off)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-login ()
|
||||
(format 0 "citywide-login~%")
|
||||
(set! *traffic-engine* (new 'loading-level 'traffic-engine))
|
||||
(init *city-dead-pool* 'loading-level #x8000)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-activate ((arg0 level) (arg1 symbol))
|
||||
(when (zero? (-> arg0 entity length))
|
||||
(format 0 "ERROR: ctywide-activate: level ~s has no entities!!" (-> arg0 name))
|
||||
(break!)
|
||||
0
|
||||
)
|
||||
(set! *ctywide-entity* (-> arg0 entity data 0 entity))
|
||||
(set! *traffic-fast-spawn* (or (= arg1 'life) (= arg1 'debug)))
|
||||
(if (and (= arg1 'debug) (not *spawn-actors*))
|
||||
(traffic-kill)
|
||||
(traffic-start)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *traffic-alert-level-force* #f)
|
||||
|
||||
(defun lwide-activate ((arg0 level) (arg1 symbol))
|
||||
(format #t "lwide-activate~%")
|
||||
(set! *lwide-entity* (-> arg0 entity data 0 entity))
|
||||
(let ((gp-0 *traffic-engine*))
|
||||
(when gp-0
|
||||
(case (-> arg0 name)
|
||||
(('lwidea)
|
||||
(set! (-> gp-0 object-type-info-array 0 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 1 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 2 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 3 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 4 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 5 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 6 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 7 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 8 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 9 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 10 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 11 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 12 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 13 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 14 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 15 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 16 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 17 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 18 level) (the-as level 'lwidea))
|
||||
(set! (-> gp-0 object-type-info-array 19 level) (the-as level 'lwidea))
|
||||
(logior! (-> gp-0 alert-state flags) (traffic-alert-flag target-jak))
|
||||
(set! *traffic-alert-level-force* #f)
|
||||
)
|
||||
(('lwideb)
|
||||
(set! (-> gp-0 object-type-info-array 0 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 1 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 2 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 3 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 4 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 5 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 6 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 7 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 8 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 9 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 10 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 11 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 12 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 13 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 14 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 15 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 16 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 17 level) #f)
|
||||
(set! (-> gp-0 object-type-info-array 18 level) (the-as level 'lwideb))
|
||||
(set! (-> gp-0 object-type-info-array 19 level) #f)
|
||||
(logclear! (-> gp-0 alert-state flags) (traffic-alert-flag target-jak))
|
||||
(set-alert-level gp-0 3)
|
||||
(logior! (-> gp-0 alert-state flags) (traffic-alert-flag guard-multi-focus))
|
||||
(set-alert-duration gp-0 #x6c258c00)
|
||||
(set! *traffic-alert-level-force* #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun lwide-deactivate ()
|
||||
(set! *lwide-entity* (the-as object #f))
|
||||
(send-event *traffic-manager* 'kill-all)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-deactivate ()
|
||||
(set! *ctywide-entity* (the-as object #f))
|
||||
(set! *traffic-engine* #f)
|
||||
(set! *trail-graph* #f)
|
||||
(init *city-dead-pool* 'loading-level 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-entity-hack ()
|
||||
(with-pp
|
||||
(cond
|
||||
((and (-> pp entity) (= pp (-> pp entity extra process)))
|
||||
(let ((v1-6 (level-get *level* 'ctywide)))
|
||||
(if v1-6
|
||||
(set! (-> pp level) v1-6)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(process-entity-set! pp (the-as entity-actor *ctywide-entity*))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defun lwide-entity-hack ()
|
||||
(with-pp
|
||||
(process-entity-set! pp (the-as entity-actor *lwide-entity*))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
(defstate idle (vehicle-turret)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(turret-control-method-12 (-> self turret) (the-as joint-mod-rotate-local (-> self turret-jm)))
|
||||
(update-joint-mod (-> self turret) (the-as joint-mod-rotate-local (-> self turret-jm)))
|
||||
(vehicle-turret-method-29 self)
|
||||
(when (and (nonzero? (-> self target)) (handle->process (-> self target)))
|
||||
(let* ((s5-0 (handle->process (-> self target)))
|
||||
@@ -145,7 +145,7 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior vehicle-turret-init-by-other vehicle-turret ((arg0 turret-control-info))
|
||||
(vehicle-turret-method-28 self)
|
||||
(turret-control-method-15 (-> self turret) arg0)
|
||||
(set-info (-> self turret) arg0)
|
||||
(logior! (-> self turret flags) (turret-flag targetting-laser no-rot-y-clamp))
|
||||
(vehicle-turret-method-29 self)
|
||||
(vector-identity! (-> self root-override scale))
|
||||
@@ -434,7 +434,7 @@
|
||||
(with-pp
|
||||
(when (>= (- (-> pp clock frame-counter) (-> obj last-guard-spawn-time)) 0)
|
||||
(let ((s5-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 6))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) (-> obj nav-mesh))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod rigid-body-object-method-36 vehicle ((obj vehicle))
|
||||
(defmethod do-engine-sounds vehicle ((obj vehicle))
|
||||
(local-vars (v1-36 float))
|
||||
(with-pp
|
||||
(rlet ((acc :class vf)
|
||||
@@ -221,7 +221,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-84 vehicle ((obj vehicle) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
(defmethod draw-thruster vehicle ((obj vehicle) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
@@ -269,7 +269,10 @@
|
||||
(set! (-> s3-1 1 normal w) f0-14)
|
||||
(set! (-> s3-1 1 normal x) (* 0.025 f0-14))
|
||||
)
|
||||
(add! *simple-sprite-system* (the-as dma-buffer (-> s3-1 1)))
|
||||
(when (nonzero? *simple-sprite-system*)
|
||||
;; added nonzero check
|
||||
(add! *simple-sprite-system* (the-as dma-buffer (-> s3-1 1)))
|
||||
)
|
||||
(forward-up->quaternion (the-as quaternion (-> s3-1 0)) arg1 (the-as vector (-> obj rbody state matrix)))
|
||||
(quaternion-rotate-local-x! (the-as quaternion (-> s3-1 0)) (the-as quaternion (-> s3-1 0)) 32768.0)
|
||||
(let ((v1-16 (-> s3-1 0 normal)))
|
||||
@@ -310,7 +313,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-85 vehicle ((obj vehicle))
|
||||
(defmethod draw-thrusters vehicle ((obj vehicle))
|
||||
(local-vars (sv-272 sparticle-launcher) (sv-276 sparticle-launcher))
|
||||
(with-pp
|
||||
(when (= (-> obj controller traffic sync-mask-32) (ash 1 (logand (-> obj traffic-priority-id) 31)))
|
||||
@@ -433,7 +436,7 @@
|
||||
)
|
||||
(dotimes (s4-2 2)
|
||||
(vector-matrix*! (the-as vector (-> s5-0 0)) (-> obj info-override thruster-local-pos s4-2) (-> s5-0 1))
|
||||
(vehicle-method-84 obj (the-as vector (-> s5-0 0)) (-> s5-0 0 vector 1) f28-3 f30-2)
|
||||
(draw-thruster obj (the-as vector (-> s5-0 0)) (-> s5-0 0 vector 1) f28-3 f30-2)
|
||||
)
|
||||
)
|
||||
(when (logtest? (rigid-body-object-flag ignition) (-> obj flags))
|
||||
|
||||
@@ -106,24 +106,24 @@
|
||||
(turret-control-method-9 (_type_ vehicle vector vector) none 9)
|
||||
(turret-control-method-10 (_type_ vehicle) none 10)
|
||||
(turret-control-method-11 (_type_ object object vector) none 11)
|
||||
(turret-control-method-12 (_type_ joint-mod-rotate-local) none 12)
|
||||
(update-joint-mod (_type_ joint-mod-rotate-local) none 12)
|
||||
(turret-control-method-13 (_type_) none 13)
|
||||
(turret-control-method-14 (_type_) none 14)
|
||||
(turret-control-method-15 (_type_ turret-control-info) none 15)
|
||||
(set-info (_type_ turret-control-info) none 15)
|
||||
(turret-control-method-16 (_type_ float float) none 16)
|
||||
(turret-control-method-17 (_type_ vehicle) none 17)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod turret-control-method-15 turret-control ((obj turret-control) (arg0 turret-control-info))
|
||||
(defmethod set-info turret-control ((obj turret-control) (arg0 turret-control-info))
|
||||
(set! (-> obj info) arg0)
|
||||
(set! (-> obj owner-handle) (the-as handle #f))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod turret-control-method-12 turret-control ((obj turret-control) (arg0 joint-mod-rotate-local))
|
||||
(defmethod update-joint-mod turret-control ((obj turret-control) (arg0 joint-mod-rotate-local))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-0 x) (- (-> obj aim-rot-x)))
|
||||
(set! (-> v1-0 y) (-> obj aim-rot-y))
|
||||
@@ -815,7 +815,7 @@
|
||||
(set! (-> a1-2 flags) (traffic-danger-flags tdf0))
|
||||
(set! (-> a1-2 danger-type) (traffic-danger-type tdt6))
|
||||
(set! (-> a1-2 handle) (the-as uint #f))
|
||||
(add-danger-sphere (-> obj controller traffic) a1-2)
|
||||
(add-danger (-> obj controller traffic) a1-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -978,8 +978,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-31 vehicle-guard ((obj vehicle-guard) (arg0 rigid-body-vehicle-constants))
|
||||
(let ((t9-0 (method-of-type vehicle rigid-body-object-method-31)))
|
||||
(defmethod alloc-and-init-rigid-body-control vehicle-guard ((obj vehicle-guard) (arg0 rigid-body-vehicle-constants))
|
||||
(let ((t9-0 (method-of-type vehicle alloc-and-init-rigid-body-control)))
|
||||
(t9-0 obj arg0)
|
||||
)
|
||||
(set! (-> obj mask) (logior (process-mask enemy guard) (-> obj mask)))
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
:size-assert #x370
|
||||
:flag-assert #x9002f00370
|
||||
(:methods
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-vehicle-constants) none :replace 31)
|
||||
(alloc-and-init-rigid-body-control (_type_ rigid-body-vehicle-constants) none :replace 31)
|
||||
(inactive () _type_ :state 53)
|
||||
(waiting () _type_ :state 54)
|
||||
(vehicle-method-55 () _type_ :state 55)
|
||||
@@ -390,16 +390,16 @@
|
||||
(vehicle-method-62 (_type_ float) none 62)
|
||||
(vehicle-method-63 (_type_ float) none 63)
|
||||
(vehicle-method-64 () none 64)
|
||||
(vehicle-method-65 (_type_) none 65)
|
||||
(start-jump (_type_) none 65)
|
||||
(vehicle-method-66 () none 66)
|
||||
(vehicle-method-67 (_type_) none 67)
|
||||
(vehicle-method-68 (_type_ vector int) none 68)
|
||||
(vehicle-method-69 (_type_ int) process 69)
|
||||
(get-seat-count (_type_) int 67)
|
||||
(compute-seat-position (_type_ vector int) none 68)
|
||||
(get-rider-in-seat (_type_ int) process 69)
|
||||
(vehicle-method-70 (_type_) process 70)
|
||||
(vehicle-method-71 (_type_ int process-focusable) none 71)
|
||||
(put-rider-in-seat (_type_ int process-focusable) none 71)
|
||||
(vehicle-method-72 (_type_) uint 72)
|
||||
(vehicle-method-73 (_type_ vector int int) int 73)
|
||||
(vehicle-method-74 (_type_ process) none 74)
|
||||
(get-best-seat-for-vehicle (_type_ vector int int) int 73)
|
||||
(remove-rider (_type_ process) none 74)
|
||||
(vehicle-method-75 (_type_) float 75)
|
||||
(vehicle-method-76 (_type_ int uint) none 76)
|
||||
(vehicle-method-77 (_type_) none 77)
|
||||
@@ -409,9 +409,9 @@
|
||||
(vehicle-method-81 (_type_) none 81)
|
||||
(vehicle-method-82 (_type_) none 82)
|
||||
(vehicle-method-83 (_type_) none 83)
|
||||
(vehicle-method-84 (_type_ vector vector float float) none 84)
|
||||
(vehicle-method-85 (_type_) none 85)
|
||||
(vehicle-method-86 () none 86)
|
||||
(draw-thruster (_type_ vector vector float float) none 84)
|
||||
(draw-thrusters (_type_) none 85)
|
||||
(update-joint-mods (_type_) none 86)
|
||||
(vehicle-method-87 (_type_) none 87)
|
||||
(vehicle-method-88 (_type_) none 88)
|
||||
(vehicle-method-89 (_type_) none 89)
|
||||
|
||||
@@ -677,7 +677,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-4 (new 'stack-no-clear 'inline-array 'vehicle-control-point 2)))
|
||||
(let ((s1-4 (new 'stack-no-clear 'inline-array 'vehicle-control-point 24)))
|
||||
(quad-copy!
|
||||
(the-as pointer s1-4)
|
||||
(the-as pointer (-> s4-0 stabilizer-array))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
(if (and s5-0 (nonzero? (vehicle-method-72 s5-0)))
|
||||
(logior! (-> obj flags) 4)
|
||||
)
|
||||
(vehicle-method-71 s5-0 (-> obj seat-index) obj)
|
||||
(put-rider-in-seat s5-0 (-> obj seat-index) obj)
|
||||
)
|
||||
(set! (-> obj anim-speed) (rand-vu-float-range 0.8 1.2))
|
||||
0
|
||||
@@ -63,7 +63,7 @@
|
||||
(defmethod vehicle-rider-method-35 vehicle-rider ((obj vehicle-rider))
|
||||
(logior! (-> obj draw status) (draw-control-status no-draw))
|
||||
(let ((v1-3 (-> obj parent-override)))
|
||||
(vehicle-method-71
|
||||
(put-rider-in-seat
|
||||
(the-as vehicle (if v1-3
|
||||
(-> v1-3 0 self-override)
|
||||
)
|
||||
@@ -147,7 +147,7 @@
|
||||
(('knocked-off)
|
||||
(let ((gp-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(let ((v1-14 (find-nearest-nav-mesh (-> self root-override trans) (the-as float #x7f800000))))
|
||||
(set! (-> gp-0 object-type) (the-as uint 0))
|
||||
(set! (-> gp-0 object-type) (traffic-type citizen-norm-1))
|
||||
(set! (-> gp-0 behavior) (the-as uint 11))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 nav-mesh) v1-14)
|
||||
@@ -161,7 +161,7 @@
|
||||
(vector-reset! (-> gp-0 velocity))
|
||||
(when (logtest? (-> self flags) 8)
|
||||
(send-event *traffic-manager* 'increase-alert-level 2)
|
||||
(set! (-> gp-0 object-type) (the-as uint 6))
|
||||
(set! (-> gp-0 object-type) (traffic-type crimson-guard-1))
|
||||
)
|
||||
(set! (-> gp-0 position quad) (-> self root-override trans quad))
|
||||
(quaternion-copy! (-> gp-0 rotation) (-> self root-override quat))
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
)
|
||||
(send-event-function (handle->process (-> self rider-array gp-1)) a1-2)
|
||||
)
|
||||
(vehicle-method-71 self gp-1 (the-as process-focusable #f))
|
||||
(put-rider-in-seat self gp-1 (the-as process-focusable #f))
|
||||
)
|
||||
(logior! (-> self focus-status) (focus-status dead))
|
||||
(set! (-> self crash-level) 3)
|
||||
|
||||
@@ -246,9 +246,9 @@ This commonly includes things such as:
|
||||
(s4-1 #f)
|
||||
(s3-0 #f)
|
||||
)
|
||||
(let ((a2-2 (vehicle-method-73 obj (-> s5-0 matrices 0 vector 1) 1 0)))
|
||||
(let ((a2-2 (get-best-seat-for-vehicle obj (-> s5-0 matrices 0 vector 1) 1 0)))
|
||||
(when (!= a2-2 -1)
|
||||
(vehicle-method-68 obj (-> s5-0 matrices 0 vector 2) a2-2)
|
||||
(compute-seat-position obj (-> s5-0 matrices 0 vector 2) a2-2)
|
||||
(vector+float*!
|
||||
(-> s5-0 matrices 0 vector 2)
|
||||
(-> s5-0 matrices 0 vector 2)
|
||||
@@ -442,7 +442,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-65 vehicle ((obj vehicle))
|
||||
(defmethod start-jump vehicle ((obj vehicle))
|
||||
(when (logtest? (-> obj info-override flags) 16)
|
||||
(when (not (logtest? (rigid-body-object-flag jump-sound) (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (rigid-body-object-flag jump-sound) (-> obj flags)))
|
||||
@@ -459,12 +459,11 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-67 vehicle ((obj vehicle))
|
||||
(defmethod get-seat-count vehicle ((obj vehicle))
|
||||
(-> obj info-override seat-count)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-68 vehicle ((obj vehicle) (arg0 vector) (arg1 int))
|
||||
(defmethod compute-seat-position vehicle ((obj vehicle) (arg0 vector) (arg1 int))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-0 quad) (-> obj info-override seat-array arg1 position quad))
|
||||
(set! (-> v1-0 w) 1.0)
|
||||
@@ -474,7 +473,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-69 vehicle ((obj vehicle) (arg0 int))
|
||||
(defmethod get-rider-in-seat vehicle ((obj vehicle) (arg0 int))
|
||||
(let ((v0-0 (the-as process #f)))
|
||||
(if (< arg0 (-> obj info-override seat-count))
|
||||
(set! v0-0 (handle->process (-> obj rider-array arg0)))
|
||||
@@ -487,7 +486,7 @@ This commonly includes things such as:
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(countdown (s4-0 (-> obj info-override seat-count))
|
||||
(when (logtest? (-> obj info-override seat-array s4-0 flags) 1)
|
||||
(let ((v1-7 (vehicle-method-69 obj s4-0)))
|
||||
(let ((v1-7 (get-rider-in-seat obj s4-0)))
|
||||
(if v1-7
|
||||
(set! gp-0 v1-7)
|
||||
)
|
||||
@@ -498,7 +497,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-73 vehicle ((obj vehicle) (arg0 vector) (arg1 int) (arg2 int))
|
||||
(defmethod get-best-seat-for-vehicle vehicle ((obj vehicle) (arg0 vector) (arg1 int) (arg2 int))
|
||||
(let ((gp-0 -1))
|
||||
(let ((f30-0 (the-as float #x7f800000))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
@@ -511,16 +510,16 @@ This commonly includes things such as:
|
||||
#t
|
||||
)
|
||||
((= v1-7 1)
|
||||
(not (vehicle-method-69 obj s0-0))
|
||||
(not (get-rider-in-seat obj s0-0))
|
||||
)
|
||||
((= v1-7 2)
|
||||
(vehicle-method-69 obj s0-0)
|
||||
(get-rider-in-seat obj s0-0)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
(vehicle-method-68 obj s1-0 s0-0)
|
||||
(compute-seat-position obj s1-0 s0-0)
|
||||
(let ((f0-0 (vector-vector-distance-squared arg0 s1-0)))
|
||||
(when (< f0-0 f30-0)
|
||||
(set! f30-0 f0-0)
|
||||
@@ -536,7 +535,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-74 vehicle ((obj vehicle) (arg0 process))
|
||||
(defmethod remove-rider vehicle ((obj vehicle) (arg0 process))
|
||||
(let ((v1-1 (-> obj info-override seat-count)))
|
||||
(dotimes (a2-0 v1-1)
|
||||
(if (= arg0 (handle->process (-> obj rider-array a2-0)))
|
||||
@@ -548,7 +547,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-71 vehicle ((obj vehicle) (arg0 int) (arg1 process-focusable))
|
||||
(defmethod put-rider-in-seat vehicle ((obj vehicle) (arg0 int) (arg1 process-focusable))
|
||||
(if (< arg0 (-> obj info-override seat-count))
|
||||
(set! (-> obj rider-array arg0) (process->handle arg1))
|
||||
)
|
||||
@@ -695,7 +694,7 @@ This commonly includes things such as:
|
||||
(set! (-> obj power-level) 1.0)
|
||||
(set! (-> obj flight-level-index) 0)
|
||||
(let ((a1-0 (-> obj root-override-2 trans)))
|
||||
(set! (-> obj flight-level) (xz-height-map-method-9 *traffic-height-map* a1-0))
|
||||
(set! (-> obj flight-level) (get-height-at-point *traffic-height-map* a1-0))
|
||||
)
|
||||
(set! (-> obj lights-factor) 0.0)
|
||||
(let ((a0-8 (-> obj info-override color-option-select)))
|
||||
@@ -1076,7 +1075,7 @@ This commonly includes things such as:
|
||||
(let ((a0-1 (-> obj controller traffic)))
|
||||
(when (and (nonzero? a0-1) arg1)
|
||||
(if #t
|
||||
(increase-alert-level a0-1 arg0 arg1)
|
||||
(increase-alert-level a0-1 (the-as int arg0) arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1085,7 +1084,7 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-112 vehicle ((obj vehicle) (arg0 object))
|
||||
(decrease-alert-level (-> obj controller traffic) arg0)
|
||||
(decrease-alert-level (-> obj controller traffic) (the-as int arg0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1245,7 +1244,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 (-> obj info-override seat-count))
|
||||
(vehicle-method-71 obj s5-1 (the-as process-focusable #f))
|
||||
(put-rider-in-seat obj s5-1 (the-as process-focusable #f))
|
||||
)
|
||||
(vehicle-method-142 obj)
|
||||
(vehicle-controller-method-11 (-> obj controller))
|
||||
@@ -1371,7 +1370,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-86 vehicle ()
|
||||
(defmethod update-joint-mods vehicle ((obj vehicle))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1385,7 +1384,7 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 local-pos w) 40960.0)
|
||||
(let ((s4-0 0))
|
||||
(label cfg-1)
|
||||
(let ((v1-7 (traffic-engine-method-20 (-> obj controller traffic) (-> s5-0 local-pos) (-> s5-0 normal) 0)))
|
||||
(let ((v1-7 (find-best-segment (-> obj controller traffic) (-> s5-0 local-pos) (-> s5-0 normal) 0)))
|
||||
(when (and (not v1-7) (< s4-0 3))
|
||||
(set! (-> s5-0 local-pos w) (+ 40960.0 (-> s5-0 local-pos w)))
|
||||
(+! s4-0 1)
|
||||
@@ -1406,7 +1405,7 @@ This commonly includes things such as:
|
||||
(dotimes (s5-0 (-> obj info-override seat-count))
|
||||
(let ((s4-0 (handle->process (-> obj rider-array s5-0))))
|
||||
(when (and s4-0 (logtest? (-> (the-as vehicle-rider s4-0) focus-status) (focus-status pilot-riding)))
|
||||
(vehicle-method-68 obj (-> (the-as vehicle-rider s4-0) root-override trans) s5-0)
|
||||
(compute-seat-position obj (-> (the-as vehicle-rider s4-0) root-override trans) s5-0)
|
||||
(set! (-> (the-as vehicle-rider s4-0) root-override transv quad) (-> obj root-override-2 transv quad))
|
||||
(let ((f0-1 (the float (-> obj info-override seat-array s5-0 angle))))
|
||||
(quaternion-rotate-local-y!
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
(with-pp
|
||||
(when (= (-> obj controller traffic sync-mask-8) (ash 1 (logand (-> obj traffic-priority-id) 7)))
|
||||
(let ((a1-0 (-> obj root-override-2 trans)))
|
||||
(set! (-> obj flight-level) (xz-height-map-method-9 *traffic-height-map* a1-0))
|
||||
(set! (-> obj flight-level) (get-height-at-point *traffic-height-map* a1-0))
|
||||
)
|
||||
)
|
||||
(set! (-> obj target-acceleration y)
|
||||
@@ -394,7 +394,7 @@
|
||||
(vehicle-method-95 obj (the-as vector (&-> s5-0 x)))
|
||||
)
|
||||
(if (or (cpad-hold? 0 l1) (and (logtest? (-> obj info-override flags) 512) (cpad-hold? 0 r1)))
|
||||
(vehicle-method-65 obj)
|
||||
(start-jump obj)
|
||||
)
|
||||
(if (cpad-pressed? 0 circle)
|
||||
((method-of-object obj vehicle-method-66))
|
||||
@@ -592,10 +592,10 @@
|
||||
(dotimes (v1-4 (-> *level* length))
|
||||
(let ((a0-5 (-> *level* level v1-4)))
|
||||
(when (= (-> a0-5 status) 'active)
|
||||
(let ((a0-7 (-> a0-5 bsp bsp-header-jkh1b23)))
|
||||
(let ((a0-7 (-> a0-5 bsp city-level-info)))
|
||||
(when (nonzero? a0-7)
|
||||
(let ((f1-0 (-> a0-7 frames-per-second)))
|
||||
(if (= f1-0 0.0)
|
||||
(let ((f1-0 (the-as float (-> a0-7 camera-ceiling))))
|
||||
(if (= (the-as meters f1-0) 0.0)
|
||||
(set! f1-0 40960000.0)
|
||||
)
|
||||
(set! f0-0 (fmax f0-0 f1-0))
|
||||
@@ -906,18 +906,18 @@
|
||||
(f1-0 245760.0)
|
||||
)
|
||||
(if (< f0-1 (* f1-0 f1-0))
|
||||
(rigid-body-object-method-36 obj)
|
||||
(do-engine-sounds obj)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj draw status) (draw-control-status on-screen))
|
||||
(if #t
|
||||
(vehicle-method-85 obj)
|
||||
(draw-thrusters obj)
|
||||
)
|
||||
(let ((f0-2 (-> obj camera-dist2))
|
||||
(f1-3 245760.0)
|
||||
)
|
||||
(if (< f0-2 (* f1-3 f1-3))
|
||||
((method-of-object obj vehicle-method-86))
|
||||
(update-joint-mods obj)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -992,7 +992,7 @@
|
||||
)
|
||||
(vehicle-method-96 obj)
|
||||
(let ((a1-0 (-> obj rbody state position)))
|
||||
(set! (-> obj flight-level) (xz-height-map-method-9 *traffic-height-map* a1-0))
|
||||
(set! (-> obj flight-level) (get-height-at-point *traffic-height-map* a1-0))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -1275,13 +1275,13 @@
|
||||
(let ((f0-10 (vector-length (-> obj root-override-2 transv))))
|
||||
(seek! (-> obj engine-power-factor) (* 0.000016276043 f0-10) (* 6.0 (-> pp clock seconds-per-frame)))
|
||||
)
|
||||
(rigid-body-object-method-36 obj)
|
||||
(do-engine-sounds obj)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj draw status) (draw-control-status on-screen))
|
||||
(when #t
|
||||
(set! (-> obj node-list data 0 bone transform trans quad) (-> obj root-override-2 trans quad))
|
||||
(vehicle-method-85 obj)
|
||||
(draw-thrusters obj)
|
||||
)
|
||||
)
|
||||
(let ((v1-70 (-> *perf-stats* data 19)))
|
||||
@@ -1357,7 +1357,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-31 vehicle ((obj vehicle) (arg0 rigid-body-vehicle-constants))
|
||||
(defmethod alloc-and-init-rigid-body-control vehicle ((obj vehicle) (arg0 rigid-body-vehicle-constants))
|
||||
(if (logtest? (-> arg0 flags) 8)
|
||||
(iterate-prims
|
||||
(-> obj root-override-2)
|
||||
@@ -1443,7 +1443,7 @@
|
||||
(new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)
|
||||
)
|
||||
(set! (-> obj root-override-2 event-self) 'touched)
|
||||
(let ((t9-3 (method-of-type rigid-body-object rigid-body-object-method-31)))
|
||||
(let ((t9-3 (method-of-type rigid-body-object alloc-and-init-rigid-body-control)))
|
||||
(t9-3 obj arg0)
|
||||
)
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-collision))
|
||||
@@ -1857,7 +1857,7 @@
|
||||
(when s5-3
|
||||
(format #t "vehicle::event-handler: pilot-on (pid ~d) from pid ~d~%" (-> obj pid) (-> arg0 pid))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag riding))
|
||||
(vehicle-method-71 obj (the-as int s3-2) (the-as process-focusable s5-3))
|
||||
(put-rider-in-seat obj (the-as int s3-2) (the-as process-focusable s5-3))
|
||||
(if (logtest? (-> s5-3 mask) (process-mask target))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag player-driving))
|
||||
)
|
||||
@@ -1894,13 +1894,13 @@
|
||||
(defbehavior vehicle-init-by-other vehicle ((arg0 traffic-object-spawn-params))
|
||||
(stack-size-set! (-> self main-thread) 16)
|
||||
(set! (-> self mask) (logior (process-mask vehicle) (-> self mask)))
|
||||
(rigid-body-object-method-32 self)
|
||||
(allocate-and-init-cshape self)
|
||||
(set! (-> self root-override-2 trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 rotation))
|
||||
(if (not (logtest? (-> arg0 flags) 1))
|
||||
(lwide-entity-hack)
|
||||
)
|
||||
(rigid-body-object-method-33 self)
|
||||
(init-skel-and-rigid-body self)
|
||||
(set! (-> self traffic-priority-id) (the-as int (-> arg0 id)))
|
||||
(vehicle-method-136 self arg0)
|
||||
(none)
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
)
|
||||
(set! (-> traffic-obj-params position quad) (-> self begin-pos quad))
|
||||
(quaternion-axis-angle! (-> traffic-obj-params rotation) 0.0 1.0 0.0 16384.0)
|
||||
(set! (-> traffic-obj-params object-type) (the-as uint 13))
|
||||
(set! (-> traffic-obj-params object-type) (traffic-type bikec))
|
||||
(set! (-> traffic-obj-params behavior) (the-as uint 0))
|
||||
(set! (-> traffic-obj-params id) (the-as uint 0))
|
||||
(set! (-> traffic-obj-params proc) #f)
|
||||
|
||||
@@ -116,6 +116,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer krew-package).
|
||||
(defun krew-package-spawn ((arg0 process) (arg1 process))
|
||||
(process-spawn krew-package arg1 :to arg0)
|
||||
)
|
||||
@@ -142,7 +143,7 @@ This commonly includes things such as:
|
||||
(let ((s5-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s5-0 position quad) (-> (new 'static 'vector :x 4698112.0 :y 45875.2 :z 81920.0 :w 1.0) quad))
|
||||
(quaternion-axis-angle! (-> s5-0 rotation) 0.0 1.0 0.0 32768.0)
|
||||
(set! (-> s5-0 object-type) (the-as uint 11))
|
||||
(set! (-> s5-0 object-type) (traffic-type bikea))
|
||||
(set! (-> s5-0 behavior) (the-as uint 0))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 proc) #f)
|
||||
@@ -248,7 +249,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traffic-object-spawn-params))
|
||||
)
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 9))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) #f)
|
||||
@@ -320,7 +321,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traffic-object-spawn-params))
|
||||
)
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 9))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) #f)
|
||||
|
||||
@@ -1676,7 +1676,7 @@
|
||||
)
|
||||
(set! (-> s5-0 position quad) (-> self begin-pos quad))
|
||||
(quaternion-axis-angle! (-> s5-0 rotation) 0.0 1.0 0.0 0.0)
|
||||
(set! (-> s5-0 object-type) (the-as uint 13))
|
||||
(set! (-> s5-0 object-type) (traffic-type bikec))
|
||||
(set! (-> s5-0 behavior) (the-as uint 0))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 proc) #f)
|
||||
|
||||
@@ -1440,7 +1440,7 @@
|
||||
)
|
||||
(set! (-> gp-0 position quad) (-> *bb-ring-info* (-> self info index) start-pos quad))
|
||||
(quaternion-axis-angle! (-> gp-0 rotation) 0.0 1.0 0.0 (-> *bb-ring-info* (-> self info index) rotation))
|
||||
(set! (-> gp-0 object-type) (the-as uint 11))
|
||||
(set! (-> gp-0 object-type) (traffic-type bikea))
|
||||
(set! (-> gp-0 behavior) (the-as uint 0))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 proc) #f)
|
||||
@@ -1827,14 +1827,17 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer bush-collect).
|
||||
(defun bush-collect-spawn ((arg0 task-manager) (arg1 vector))
|
||||
(process-spawn bush-collect arg1 :to arg0)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer bush-collect).
|
||||
(defun bush-collect-homing-beacon-spawn ((arg0 task-manager) (arg1 vector))
|
||||
(process-spawn bush-collect :init bush-collect-homing-beacon-init-by-other arg1 :to arg0)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer bush-collect).
|
||||
(defun bush-collect-dark-eco-spawn ((arg0 task-manager) (arg1 vector))
|
||||
(process-spawn bush-collect :init bush-collect-dark-eco-init-by-other arg1 :to arg0)
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 dig-sinking-plat ((obj dig-sinking-plat))
|
||||
(defmethod allocate-and-init-cshape dig-sinking-plat ((obj dig-sinking-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -236,13 +236,13 @@
|
||||
:event (-> (method-of-type dig-sinking-plat idle) event)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 dig-sinking-plat ((obj dig-sinking-plat))
|
||||
(defmethod init-skel-and-rigid-body dig-sinking-plat ((obj dig-sinking-plat))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-dig-sinking-plat" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(rigid-body-object-method-31 obj *dig-sinking-platform-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *dig-sinking-platform-constants*)
|
||||
(set! (-> obj anchor-point quad) (-> obj root-override-2 trans quad))
|
||||
(set! (-> obj surface-height) (+ -4096.0 (-> obj root-override-2 trans y)))
|
||||
(let ((s5-1 (-> obj info-override control-point-count)))
|
||||
|
||||
@@ -710,7 +710,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 dig-bomb-crate-cylinder ((obj dig-bomb-crate-cylinder))
|
||||
(defmethod allocate-and-init-cshape dig-bomb-crate-cylinder ((obj dig-bomb-crate-cylinder))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -759,7 +759,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 dig-bomb-crate-cylinder ((obj dig-bomb-crate-cylinder))
|
||||
(defmethod init-skel-and-rigid-body dig-bomb-crate-cylinder ((obj dig-bomb-crate-cylinder))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as
|
||||
@@ -768,7 +768,7 @@
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(rigid-body-object-method-31 obj *dig-bomb-crate-cylinder-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *dig-bomb-crate-cylinder-constants*)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-collision))
|
||||
(set! (-> obj draw light-index) (the-as uint 10))
|
||||
@@ -779,10 +779,10 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior dig-bomb-crate-cylinder-init-by-other dig-bomb-crate-cylinder ((arg0 dig-bomb-crate-cylinder-spawn-params) (arg1 entity-actor))
|
||||
(process-entity-set! self arg1)
|
||||
(rigid-body-object-method-32 self)
|
||||
(allocate-and-init-cshape self)
|
||||
(set! (-> self root-override-2 trans quad) (-> arg0 pos quad))
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 quat))
|
||||
(rigid-body-object-method-33 self)
|
||||
(init-skel-and-rigid-body self)
|
||||
(set! (-> self mask) (logior (process-mask platform) (-> self mask)))
|
||||
(vector-float*! (-> self rbody state lin-momentum) (-> arg0 vel) (-> self info info mass))
|
||||
(vector-float*! (-> self rbody state ang-momentum) (-> arg0 avel) (-> self info info mass))
|
||||
|
||||
@@ -1437,7 +1437,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 dig-tipping-rock ((obj dig-tipping-rock))
|
||||
(defmethod allocate-and-init-cshape dig-tipping-rock ((obj dig-tipping-rock))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -1469,14 +1469,14 @@ This commonly includes things such as:
|
||||
(-> obj surface-height)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 dig-tipping-rock ((obj dig-tipping-rock))
|
||||
(defmethod init-skel-and-rigid-body dig-tipping-rock ((obj dig-tipping-rock))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-dig-tipping-rock" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(quaternion-rotate-local-x! (-> obj root-override-2 quat) (-> obj root-override-2 quat) -2555.2202)
|
||||
(rigid-body-object-method-31 obj *dig-tipping-rock-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *dig-tipping-rock-constants*)
|
||||
(set! (-> obj anchor-point quad) (-> obj rbody state position quad))
|
||||
(let ((v1-8 (-> obj control-point-array)))
|
||||
(let ((a0-8 (-> v1-8 data)))
|
||||
@@ -1770,7 +1770,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 dig-stomp-block ((obj dig-stomp-block))
|
||||
(defmethod allocate-and-init-cshape dig-stomp-block ((obj dig-stomp-block))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -1865,13 +1865,13 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 dig-stomp-block ((obj dig-stomp-block))
|
||||
(defmethod init-skel-and-rigid-body dig-stomp-block ((obj dig-stomp-block))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-dig-stomp-block" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(rigid-body-object-method-31 obj *dig-stomp-block-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *dig-stomp-block-constants*)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-collision))
|
||||
(set! (-> obj draw light-index) (the-as uint 10))
|
||||
@@ -1883,10 +1883,10 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior dig-stomp-block-init-by-other dig-stomp-block ((arg0 vector))
|
||||
(set! (-> self mask) (logior (process-mask platform) (-> self mask)))
|
||||
(rigid-body-object-method-32 self)
|
||||
(allocate-and-init-cshape self)
|
||||
(set! (-> self root-override-2 trans quad) (-> arg0 quad))
|
||||
(set-vector! (-> self root-override-2 quat) 0.0 1.0 0.0 0.0)
|
||||
(rigid-body-object-method-33 self)
|
||||
(init-skel-and-rigid-body self)
|
||||
(transform-post)
|
||||
(go-virtual waiting)
|
||||
(none)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 sinking-plat ((obj sinking-plat))
|
||||
(defmethod allocate-and-init-cshape sinking-plat ((obj sinking-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -90,14 +90,14 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 sinking-plat ((obj sinking-plat))
|
||||
(defmethod init-skel-and-rigid-body sinking-plat ((obj sinking-plat))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-sinking-plat" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> obj float-height-offset) 4096.0)
|
||||
(rigid-body-object-method-31 obj *ruins-sinking-platform-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *ruins-sinking-platform-constants*)
|
||||
(set! (-> obj anchor-point quad) (-> obj root-override-2 trans quad))
|
||||
(let ((s5-1 (-> obj info-override control-point-count)))
|
||||
(dotimes (s4-1 s5-1)
|
||||
|
||||
@@ -894,7 +894,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 under-buoy-plat ((obj under-buoy-plat))
|
||||
(defmethod allocate-and-init-cshape under-buoy-plat ((obj under-buoy-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -978,13 +978,13 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 under-buoy-plat ((obj under-buoy-plat))
|
||||
(defmethod init-skel-and-rigid-body under-buoy-plat ((obj under-buoy-plat))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-under-buoy-plat" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(rigid-body-object-method-31 obj *under-buoy-plat-platform-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *under-buoy-plat-platform-constants*)
|
||||
(set! (-> obj orig-trans quad) (-> obj root-override-2 trans quad))
|
||||
(set! (-> obj anchor-point quad) (-> obj root-override-2 trans quad))
|
||||
(set! (-> obj surface-height) (-> obj root-override-2 trans y))
|
||||
|
||||
@@ -1141,15 +1141,20 @@ Val* Compiler::compile_stack_new(const goos::Object& form,
|
||||
if (!info.can_deref) {
|
||||
throw_compiler_error(form, "Cannot make an {} of {}\n", type_of_object.print(), ts.print());
|
||||
}
|
||||
auto type_info = m_ts.lookup_type(ts.get_single_arg());
|
||||
if (!m_ts.lookup_type(elt_type)->is_reference()) {
|
||||
auto type_info = m_ts.lookup_type_allow_partial_def(ts.get_single_arg());
|
||||
if (!m_ts.lookup_type_allow_partial_def(elt_type)->is_reference()) {
|
||||
// not a reference type
|
||||
m_ts.lookup_type(elt_type); // should be fully defined
|
||||
int size_in_bytes = info.stride * constant_count;
|
||||
auto addr = fe->allocate_aligned_stack_variable(ts, size_in_bytes,
|
||||
type_info->get_in_memory_alignment());
|
||||
return addr;
|
||||
}
|
||||
|
||||
if (is_inline) {
|
||||
m_ts.lookup_type(elt_type); // should be fully defined
|
||||
}
|
||||
|
||||
int stride = is_inline ? align(type_info->get_size_in_memory(),
|
||||
type_info->get_inline_array_stride_alignment())
|
||||
: 4;
|
||||
|
||||
+16
-16
@@ -58,10 +58,10 @@
|
||||
:size-assert #x29
|
||||
:flag-assert #xd00000029
|
||||
(:methods
|
||||
(traffic-suppression-params-method-9 (_type_) symbol 9)
|
||||
(traffic-suppression-params-method-10 (_type_) symbol 10)
|
||||
(try-creating-new-suppression-box (_type_) symbol 9)
|
||||
(create-or-update-suppression-box (_type_) symbol 10)
|
||||
(has-valid-id? (_type_) none 11)
|
||||
(traffic-suppression-params-method-12 (_type_) none 12)
|
||||
(kill-suppression-box (_type_) none 12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -88,19 +88,19 @@
|
||||
|
||||
;; definition of type traffic-object-spawn-params
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type uint8 :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle uint64 :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle uint64 :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x68
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@
|
||||
(deftype joint-exploder-static-params (basic)
|
||||
((joints (array joint-exploder-static-joint-params) :offset-assert 4)
|
||||
(collide-spec uint32 :offset-assert 8)
|
||||
(art-level basic :offset-assert 12)
|
||||
(art-level symbol :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
|
||||
+6
-6
@@ -455,7 +455,7 @@
|
||||
;; definition for method 31 of type rigid-body-platform
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-31 rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-object-constants))
|
||||
(defmethod alloc-and-init-rigid-body-control rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-object-constants))
|
||||
(with-pp
|
||||
(set! (-> obj info-override) (the-as rigid-body-platform-constants arg0))
|
||||
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
|
||||
@@ -485,7 +485,7 @@
|
||||
|
||||
;; definition for method 32 of type rigid-body-platform
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-32 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod allocate-and-init-cshape rigid-body-platform ((obj rigid-body-platform))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -550,9 +550,9 @@
|
||||
|
||||
;; definition for method 33 of type rigid-body-platform
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-33 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod init-skel-and-rigid-body rigid-body-platform ((obj rigid-body-platform))
|
||||
(set! (-> obj float-height-offset) 0.0)
|
||||
(rigid-body-object-method-31 obj *rigid-body-platform-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *rigid-body-platform-constants*)
|
||||
(let ((s5-0 (-> obj info-override control-point-count)))
|
||||
(dotimes (s4-0 s5-0)
|
||||
(let ((s3-0 (-> obj control-point-array data s4-0)))
|
||||
@@ -579,9 +579,9 @@ This commonly includes things such as:
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
|
||||
(rigid-body-object-method-32 obj)
|
||||
(allocate-and-init-cshape obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(rigid-body-object-method-33 obj)
|
||||
(init-skel-and-rigid-body obj)
|
||||
(rigid-body-object-method-34 obj)
|
||||
0
|
||||
(none)
|
||||
|
||||
+9
-12
@@ -102,7 +102,7 @@
|
||||
(width float :offset-assert 60)
|
||||
(minimap_edge_flag nav-minimap-edge-flag :offset-assert 64)
|
||||
)
|
||||
:pack-me
|
||||
:allow-misaligned
|
||||
:method-count-assert 10
|
||||
:size-assert #x44
|
||||
:flag-assert #xa00000044
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
;; definition of type mysql-nav-graph-level-info
|
||||
(deftype mysql-nav-graph-level-info (structure)
|
||||
((level string :offset-assert 0)
|
||||
((level symbol :offset-assert 0)
|
||||
(level-id uint32 :offset-assert 4)
|
||||
(node-count int32 :offset-assert 8)
|
||||
(branch-count int32 :offset-assert 12)
|
||||
@@ -367,7 +367,7 @@ otherwise, return the new size of the array"
|
||||
-1
|
||||
)
|
||||
(else
|
||||
(let ((v1-5 (the-as mysql-nav-edge (+ (+ (* 80 (-> obj edge-array length)) 12) (the-as int (-> obj edge-array)))))
|
||||
(let ((v1-5 (-> obj edge-array data (-> obj edge-array length)))
|
||||
(v0-1 (-> obj edge-array length))
|
||||
)
|
||||
(+! (-> obj edge-array length) 1)
|
||||
@@ -816,7 +816,7 @@ returns `-1` if none is found"
|
||||
"Iterate through the `edge-array` and return the index for the first [[mysql-nav-edge]] whom's `nav_edge_id` matches the provided id
|
||||
returns `-1` if none is found"
|
||||
(dotimes (v1-0 (-> obj edge-array length))
|
||||
(if (= edge-id (-> (the-as mysql-nav-edge (+ (+ (* 80 v1-0) 12) (the-as int (-> obj edge-array)))) nav_edge_id))
|
||||
(if (= edge-id (-> (the-as mysql-nav-edge (-> obj edge-array data v1-0)) nav_edge_id))
|
||||
(return v1-0)
|
||||
)
|
||||
)
|
||||
@@ -958,10 +958,7 @@ returns `-1` if none is found"
|
||||
(set! sv-32 (string->int (-> s3-3 data (+ s2-2 2))))
|
||||
(set! sv-48 (indexof-nav-node obj s0-2))
|
||||
(set! sv-64 (indexof-nav-node obj sv-32))
|
||||
(let ((nav-edge
|
||||
(the-as mysql-nav-edge (+ (+ (* 80 (-> obj edge-array length)) 12) (the-as int (-> obj edge-array))))
|
||||
)
|
||||
)
|
||||
(let ((nav-edge (-> obj edge-array data (-> obj edge-array length))))
|
||||
(when (and (!= sv-48 -1) (!= sv-64 -1))
|
||||
(set! (-> nav-edge nav_graph_id) (-> obj nav_graph_id))
|
||||
(set! (-> nav-edge nav_edge_id) (the-as uint (string->int (-> s3-3 data s2-2))))
|
||||
@@ -1190,10 +1187,10 @@ returns `-1` if none is found"
|
||||
)
|
||||
)
|
||||
(dotimes (v1-3 (-> obj edge-array length))
|
||||
(set! (-> (the-as mysql-nav-edge (+ (+ (* 80 v1-3) 12) (the-as int (-> obj edge-array)))) temp-next-edge) #f)
|
||||
(set! (-> (the-as mysql-nav-edge (-> obj edge-array data v1-3)) temp-next-edge) #f)
|
||||
)
|
||||
(countdown (v1-7 (-> obj edge-array length))
|
||||
(let ((a1-17 (the-as mysql-nav-edge (+ (+ (* 80 v1-7) 12) (the-as int (-> obj edge-array))))))
|
||||
(let ((a1-17 (-> obj edge-array data v1-7)))
|
||||
(when (not (logtest? (-> a1-17 mysql-save-flag) (mysql-save-flag delete)))
|
||||
(let ((a2-8 (-> obj node-array data (-> a1-17 runtime-node-id-1))))
|
||||
(when (not (logtest? (-> a2-8 mysql-save-flag) (mysql-save-flag delete)))
|
||||
@@ -1253,7 +1250,7 @@ returns `-1` if none is found"
|
||||
(set! (-> obj level-info-last-lookup) v1-9)
|
||||
)
|
||||
(set! s5-0 (-> obj level-info-array v1-9))
|
||||
(set! (-> s5-0 level) (the-as string (-> arg0 level_name)))
|
||||
(set! (-> s5-0 level) (-> arg0 level_name))
|
||||
(set! (-> s5-0 node-count) 0)
|
||||
(+! (-> obj level-info-array-length) 1)
|
||||
)
|
||||
@@ -1346,7 +1343,7 @@ returns `-1` if none is found"
|
||||
(format #t "Done.~%")
|
||||
(format #t "Saving edges ...~%")
|
||||
(dotimes (s5-1 (-> obj edge-array length))
|
||||
(let ((a0-7 (the-as mysql-nav-edge (+ (+ (* 80 s5-1) 12) (the-as int (-> obj edge-array))))))
|
||||
(let ((a0-7 (-> obj edge-array data s5-1)))
|
||||
(set! (-> a0-7 nav_graph_id) (-> obj nav_graph_id))
|
||||
(set! (-> a0-7 nav_node_id_1) (-> obj node-array data (-> a0-7 runtime-node-id-1) nav_node_id))
|
||||
(set! (-> a0-7 nav_node_id_2) (-> obj node-array data (-> a0-7 runtime-node-id-2) nav_node_id))
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
(seat-index int8 :offset-assert 41)
|
||||
(backup-nav-radius float :offset-assert 44)
|
||||
(cam-side-shift float :offset-assert 48)
|
||||
(enable-cam-side-shift basic :offset-assert 52)
|
||||
(enable-cam-side-shift symbol :offset-assert 52)
|
||||
(gun? symbol :offset-assert 56)
|
||||
(controls vehicle-controls :inline :offset-assert 60)
|
||||
(accel-array vector 8 :inline :offset-assert 80)
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@
|
||||
(region-array region-array :offset-assert 192)
|
||||
(collide-hash collide-hash :offset-assert 196)
|
||||
(wind-array-length int32 :offset 204)
|
||||
(bsp-header-jkh1b23 clock :offset 208)
|
||||
(city-level-info city-level-info :offset 208)
|
||||
(vis-spheres vector-array :offset 216)
|
||||
(region-tree drawable-tree-region-prim :offset 252)
|
||||
(tfrag-masks texture-masks-array :offset-assert 256)
|
||||
|
||||
+2
-2
@@ -1145,7 +1145,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (!= (-> obj bsp bsp-header-jkh1b23) 0) *traffic-manager*)
|
||||
(if (and (!= (-> obj bsp city-level-info) 0) *traffic-manager*)
|
||||
(send-event *traffic-manager* 'level-loaded obj)
|
||||
)
|
||||
(when (-> obj info activate-func)
|
||||
@@ -1173,7 +1173,7 @@
|
||||
(case (-> obj status)
|
||||
(('active 'alive)
|
||||
(format 0 "----------- kill ~A (status ~A)~%" obj (-> obj status))
|
||||
(if (and (!= (-> obj bsp bsp-header-jkh1b23) 0) *traffic-manager*)
|
||||
(if (and (!= (-> obj bsp city-level-info) 0) *traffic-manager*)
|
||||
(send-event *traffic-manager* 'level-killed obj)
|
||||
)
|
||||
(when (-> obj info kill-func)
|
||||
|
||||
+4
-4
@@ -464,12 +464,12 @@
|
||||
(active () _type_ :state 28)
|
||||
(rigid-body-object-method-29 (_type_ float) none 29)
|
||||
(rigid-body-object-method-30 (_type_) none 30)
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-object-constants) none 31)
|
||||
(rigid-body-object-method-32 (_type_) none 32)
|
||||
(rigid-body-object-method-33 (_type_) none 33)
|
||||
(alloc-and-init-rigid-body-control (_type_ rigid-body-object-constants) none 31)
|
||||
(allocate-and-init-cshape (_type_) none 32)
|
||||
(init-skel-and-rigid-body (_type_) none 33)
|
||||
(rigid-body-object-method-34 (_type_) none 34)
|
||||
(rigid-body-object-method-35 (_type_) none 35)
|
||||
(rigid-body-object-method-36 (_type_) none 36)
|
||||
(do-engine-sounds (_type_) none 36)
|
||||
(rigid-body-object-method-37 (_type_) none 37)
|
||||
(rigid-body-object-method-38 (_type_) none 38)
|
||||
(rigid-body-object-method-39 (_type_) none 39)
|
||||
|
||||
+8
-8
@@ -1001,7 +1001,7 @@
|
||||
|
||||
;; definition for method 31 of type rigid-body-object
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-31 rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
|
||||
(defmethod alloc-and-init-rigid-body-control rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
|
||||
(set! (-> obj info) arg0)
|
||||
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
|
||||
(update-transforms (-> obj root-override-2))
|
||||
@@ -1025,7 +1025,7 @@
|
||||
|
||||
;; definition for method 32 of type rigid-body-object
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-32 rigid-body-object ((obj rigid-body-object))
|
||||
(defmethod allocate-and-init-cshape rigid-body-object ((obj rigid-body-object))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -1077,8 +1077,8 @@
|
||||
|
||||
;; definition for method 33 of type rigid-body-object
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-33 rigid-body-object ((obj rigid-body-object))
|
||||
(rigid-body-object-method-31 obj *rigid-body-object-constants*)
|
||||
(defmethod init-skel-and-rigid-body rigid-body-object ((obj rigid-body-object))
|
||||
(alloc-and-init-rigid-body-control obj *rigid-body-object-constants*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1092,9 +1092,9 @@ This commonly includes things such as:
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(rigid-body-object-method-32 obj)
|
||||
(allocate-and-init-cshape obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(rigid-body-object-method-33 obj)
|
||||
(init-skel-and-rigid-body obj)
|
||||
(rigid-body-object-method-34 obj)
|
||||
0
|
||||
(none)
|
||||
@@ -1102,7 +1102,7 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for method 36 of type rigid-body-object
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-36 rigid-body-object ((obj rigid-body-object))
|
||||
(defmethod do-engine-sounds rigid-body-object ((obj rigid-body-object))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1111,7 +1111,7 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-37 rigid-body-object ((obj rigid-body-object))
|
||||
(rigid-body-object-method-30 obj)
|
||||
(rigid-body-object-method-36 obj)
|
||||
(do-engine-sounds obj)
|
||||
(let ((v1-4 (-> obj rbody))
|
||||
(a1-0 (-> obj root-override-2))
|
||||
)
|
||||
|
||||
+10
-2
@@ -186,8 +186,16 @@
|
||||
target-mech-stance
|
||||
(target-mech-start handle float symbol)
|
||||
target-mech-walk
|
||||
target-pilot-edge-grab
|
||||
(target-pilot-start handle)
|
||||
(target-pilot-clone-anim handle)
|
||||
(target-pilot-death symbol)
|
||||
(target-pilot-edge-grab pilot-edge-grab-info)
|
||||
target-pilot-get-off
|
||||
target-pilot-get-on
|
||||
target-pilot-grab
|
||||
(target-pilot-hit symbol attack-info)
|
||||
target-pilot-impact
|
||||
target-pilot-stance
|
||||
(target-pilot-start handle symbol symbol)
|
||||
(target-play-anim string handle)
|
||||
(target-pole-cycle handle)
|
||||
(target-pole-flip-forward float float float)
|
||||
|
||||
+9
-14
@@ -1225,17 +1225,14 @@
|
||||
)
|
||||
)
|
||||
(when s5-1
|
||||
(case (-> arg3 param 0)
|
||||
(('pilot-daxter 'pilot-race-daxter)
|
||||
#t
|
||||
)
|
||||
(else
|
||||
)
|
||||
)
|
||||
enter-state
|
||||
(let ((a0-93 (process->handle s5-1)))
|
||||
(-> arg3 param 3)
|
||||
(go target-pilot-start (the-as handle a0-93))
|
||||
(let* ((v1-83 (-> arg3 param 0))
|
||||
(a2-4 (if (or (= v1-83 'pilot-daxter) (= v1-83 'pilot-race-daxter))
|
||||
#t
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(go target-pilot-start (process->handle s5-1) (the-as symbol (-> arg3 param 3)) a2-4)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1362,9 +1359,7 @@
|
||||
(label cfg-238)
|
||||
(b! (!= v1-0 'pilot-edge-grab) cfg-242 :delay (nop!))
|
||||
(b! (logtest? (-> self focus-status) (focus-status dead hit grabbed)) cfg-241 :delay (set! v0-0 #f))
|
||||
enter-state
|
||||
(-> arg3 param 0)
|
||||
(set! v0-0 (go target-pilot-edge-grab))
|
||||
(set! v0-0 (go target-pilot-edge-grab (the-as pilot-edge-grab-info (-> arg3 param 0))))
|
||||
(label cfg-241)
|
||||
(b! #t cfg-291 :delay (nop!))
|
||||
(label cfg-242)
|
||||
|
||||
+1689
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -491,7 +491,7 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
(vehicle-method-85 obj)
|
||||
(draw-thrusters obj)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -573,7 +573,7 @@
|
||||
|
||||
;; definition for method 36 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-36 boat-base ((obj boat-base))
|
||||
(defmethod do-engine-sounds boat-base ((obj boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -623,8 +623,8 @@
|
||||
|
||||
;; definition for method 31 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-31 boat-base ((obj boat-base) (arg0 rigid-body-vehicle-constants))
|
||||
((method-of-type vehicle rigid-body-object-method-31) obj arg0)
|
||||
(defmethod alloc-and-init-rigid-body-control boat-base ((obj boat-base) (arg0 rigid-body-vehicle-constants))
|
||||
((method-of-type vehicle alloc-and-init-rigid-body-control) obj arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -788,7 +788,7 @@
|
||||
|
||||
;; definition for method 32 of type barge
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-32 barge ((obj barge))
|
||||
(defmethod allocate-and-init-cshape barge ((obj barge))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
@@ -910,13 +910,13 @@
|
||||
|
||||
;; definition for method 33 of type barge
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-33 barge ((obj barge))
|
||||
(defmethod init-skel-and-rigid-body barge ((obj barge))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-barge" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(rigid-body-object-method-31 obj *barge-constants*)
|
||||
(alloc-and-init-rigid-body-control obj *barge-constants*)
|
||||
(set! (-> obj draw lod-set lod 0 dist) 1228800.0)
|
||||
(set! (-> obj engine) (the-as uint (new-sound-id)))
|
||||
(set! (-> obj bow-wash) (the-as uint (new-sound-id)))
|
||||
|
||||
+3
-3
@@ -429,7 +429,7 @@
|
||||
)
|
||||
(set! (-> gp-0 position quad) (-> self begin-pos quad))
|
||||
(quaternion-axis-angle! (-> gp-0 rotation) 0.0 1.0 0.0 16384.0)
|
||||
(set! (-> gp-0 object-type) (the-as uint 13))
|
||||
(set! (-> gp-0 object-type) (traffic-type bikec))
|
||||
(set! (-> gp-0 behavior) (the-as uint 0))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 proc) #f)
|
||||
@@ -709,7 +709,7 @@
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traffic-object-spawn-params))
|
||||
)
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 9))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) #f)
|
||||
@@ -808,7 +808,7 @@
|
||||
)
|
||||
(set! (-> s5-0 position quad) (-> gp-0 bike-pos quad))
|
||||
(quaternion-axis-angle! (-> s5-0 rotation) 0.0 1.0 0.0 (-> gp-0 bike-angle))
|
||||
(set! (-> s5-0 object-type) (the-as uint 11))
|
||||
(set! (-> s5-0 object-type) (traffic-type bikea))
|
||||
(set! (-> s5-0 behavior) (the-as uint 0))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 proc) #f)
|
||||
|
||||
+7
-7
@@ -22,12 +22,12 @@ all initialized from static data."
|
||||
:size-assert #x20
|
||||
:flag-assert #xf00000020
|
||||
(:methods
|
||||
(xz-height-map-method-9 (_type_ vector) float 9)
|
||||
(xz-height-map-method-10 (_type_ vector) none 10)
|
||||
(xz-height-map-method-11 (_type_) none 11)
|
||||
(xz-height-map-method-12 (_type_ vector) none 12)
|
||||
(xz-height-map-method-13 (_type_ vector) none 13)
|
||||
(xz-height-map-method-14 (_type_ vector int) none 14)
|
||||
(get-height-at-point (_type_ vector) float 9)
|
||||
(debug-draw-mesh (_type_ vector) none 10)
|
||||
(debug-print (_type_) none 11)
|
||||
(debug-draw-at-point (_type_ vector) none 12)
|
||||
(debug-draw (_type_ vector) none 13)
|
||||
(debug-add-offset (_type_ vector int) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -57,5 +57,5 @@ all initialized from static data."
|
||||
(defun get-traffic-height ((arg0 vector))
|
||||
"@returns The value of [[xz-height-map::9]] using [[*traffic-height-map*]] and the [[vector]] provided
|
||||
@see [[xz-height-map::9]]"
|
||||
(xz-height-map-method-9 *traffic-height-map* arg0)
|
||||
(get-height-at-point *traffic-height-map* arg0)
|
||||
)
|
||||
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 11 of type xz-height-map
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-print xz-height-map ((obj xz-height-map))
|
||||
(format #t "(define *traffic-height-map*~%")
|
||||
(format #t " (static-height-map~%")
|
||||
(format
|
||||
#t
|
||||
" :offset ((meters ~M) (meters ~M) (meters ~M))~%"
|
||||
(-> obj x-offset)
|
||||
(-> obj y-offset)
|
||||
(-> obj z-offset)
|
||||
)
|
||||
(format #t " :x-spacing (meters ~M)~%" (/ 1.0 (-> obj x-inv-spacing)))
|
||||
(format #t " :z-spacing (meters ~M)~%" (/ 1.0 (-> obj z-inv-spacing)))
|
||||
(format #t " :y-scale (meters ~M)~%" (-> obj y-scale))
|
||||
(format #t " :x-dim ~d~%" (-> obj x-dim))
|
||||
(format #t " :z-dim ~d~%" (-> obj z-dim))
|
||||
(format #t " :data~%")
|
||||
(format #t " (~%")
|
||||
(let ((s5-0 0))
|
||||
(dotimes (s4-0 (-> obj z-dim))
|
||||
(dotimes (s3-0 (-> obj x-dim))
|
||||
(format #t " ~2d" (-> obj data s5-0))
|
||||
(+! s5-0 1)
|
||||
)
|
||||
(format #t "~%")
|
||||
)
|
||||
)
|
||||
(format #t "~T)~%")
|
||||
(format #t " )~%")
|
||||
(format #t " )~%~%")
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type xz-height-map
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-add-offset xz-height-map ((obj xz-height-map) (arg0 vector) (arg1 int))
|
||||
"Add an offset to the given point, likely for debugging purposes."
|
||||
(let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> obj x-offset)) (-> obj x-inv-spacing)))))
|
||||
(a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> obj z-offset)) (-> obj z-inv-spacing)))))
|
||||
)
|
||||
(when (and (>= v1-1 0) (< v1-1 (-> obj x-dim)) (>= a1-1 0) (< a1-1 (-> obj z-dim)))
|
||||
(let ((v1-2 (+ v1-1 (* a1-1 (-> obj x-dim)))))
|
||||
(+! (-> obj data v1-2) arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type xz-height-map
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-draw-at-point xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> obj x-offset)) (-> obj x-inv-spacing)))))
|
||||
(a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> obj z-offset)) (-> obj z-inv-spacing)))))
|
||||
(a2-1 (-> obj x-dim))
|
||||
(a3-0 (-> obj z-dim))
|
||||
)
|
||||
(when (and (>= v1-1 0) (< v1-1 a2-1) (>= a1-1 0) (< a1-1 a3-0))
|
||||
(let* ((a2-3 (+ v1-1 (* a1-1 a2-1)))
|
||||
(gp-0 (-> obj data a2-3))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 x) (+ (-> obj x-offset) (/ (the float v1-1) (-> obj x-inv-spacing))))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(set! (-> s5-0 z) (+ (-> obj z-offset) (/ (the float a1-1) (-> obj z-inv-spacing))))
|
||||
(set! (-> s5-0 y) (get-height-at-point obj s5-0))
|
||||
(let ((s4-0 add-debug-text-3d)
|
||||
(s3-0 #t)
|
||||
(s2-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" gp-0)
|
||||
(s4-0
|
||||
s3-0
|
||||
(the-as bucket-id s2-0)
|
||||
*temp-string*
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type xz-height-map
|
||||
(defmethod get-height-at-point xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(let* ((f0-1 (fmax 0.0 (* (-> obj x-inv-spacing) (- (-> arg0 x) (-> obj x-offset)))))
|
||||
(f2-4 (fmax 0.0 (* (-> obj z-inv-spacing) (- (-> arg0 z) (-> obj z-offset)))))
|
||||
(a2-0 (the int f0-1))
|
||||
(a1-1 (the int f2-4))
|
||||
(f1-7 (- f0-1 (the float a2-0)))
|
||||
(f0-4 (- f2-4 (the float a1-1)))
|
||||
(v1-0 (-> obj x-dim))
|
||||
(a3-0 (-> obj z-dim))
|
||||
(a1-7
|
||||
(the-as
|
||||
(pointer int8)
|
||||
(+ (+ (min a2-0 (+ v1-0 -2)) (* (min a1-1 (+ a3-0 -2)) v1-0) 0) (the-as int (the-as pointer (-> obj data))))
|
||||
)
|
||||
)
|
||||
(f3-3 (the float (-> a1-7 0)))
|
||||
(f4-1 (the float (-> a1-7 1)))
|
||||
(f2-8 (the float (-> a1-7 v1-0)))
|
||||
(f5-1 (the float (-> a1-7 (+ v1-0 1))))
|
||||
(f3-5 (+ (* f3-3 (- 1.0 f1-7)) (* f4-1 f1-7)))
|
||||
(f1-9 (+ (* f2-8 (- 1.0 f1-7)) (* f5-1 f1-7)))
|
||||
)
|
||||
(+ (* (+ (* f3-5 (- 1.0 f0-4)) (* f1-9 f0-4)) (-> obj y-scale)) (-> obj y-offset))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function point-in-bbox?
|
||||
(defun point-in-bbox? ((arg0 bounding-box) (arg1 vector))
|
||||
(and (>= (-> arg1 x) (-> arg0 min x))
|
||||
(>= (-> arg1 y) (-> arg0 min y))
|
||||
(>= (-> arg1 z) (-> arg0 min z))
|
||||
(>= (-> arg0 max x) (-> arg1 x))
|
||||
(>= (-> arg0 max y) (-> arg1 y))
|
||||
(>= (-> arg0 max z) (-> arg1 z))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type xz-height-map
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-draw-mesh xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(local-vars (sv-80 int) (sv-96 int))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(mem-copy! (the-as pointer (-> s5-0 vector 2)) (the-as pointer arg0) 32)
|
||||
(.svf (&-> (-> s5-0 vector) 0 quad) vf0)
|
||||
(let ((f30-0 (/ 1.0 (-> obj z-inv-spacing)))
|
||||
(f28-0 (/ 1.0 (-> obj x-inv-spacing)))
|
||||
(s4-0 (-> obj x-dim))
|
||||
(s3-0 (-> obj z-dim))
|
||||
)
|
||||
(let ((s2-0 (&-> (-> obj data) 0)))
|
||||
(set! (-> s5-0 vector 0 z) (-> obj z-offset))
|
||||
(countdown (s1-0 s3-0)
|
||||
(let ((s0-0 s2-0))
|
||||
(set! (-> s5-0 vector 0 x) (-> obj x-offset))
|
||||
(set! (-> s5-0 vector 0 y) (+ (-> obj y-offset) (* (the float (-> s0-0 0)) (-> obj y-scale))))
|
||||
(set! sv-80 (+ s4-0 -1))
|
||||
(while (nonzero? sv-80)
|
||||
(set! sv-80 (+ sv-80 -1))
|
||||
(set! (-> s5-0 vector 1 quad) (-> s5-0 vector 0 quad))
|
||||
(+! (-> s5-0 vector 0 x) f28-0)
|
||||
(set! s0-0 (&-> s0-0 1))
|
||||
(set! (-> s5-0 vector 0 y) (+ (-> obj y-offset) (* (the float (-> s0-0 0)) (-> obj y-scale))))
|
||||
(if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (the-as vector (-> s5-0 vector)))
|
||||
(point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 1))
|
||||
)
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug2)
|
||||
(the-as vector (-> s5-0 vector))
|
||||
(-> s5-0 vector 1)
|
||||
*color-red*
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> s5-0 vector 0 z) f30-0)
|
||||
(&+! s2-0 s4-0)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (&-> (-> obj data) 0)))
|
||||
(set! (-> s5-0 vector 0 x) (-> obj x-offset))
|
||||
(countdown (s1-1 s4-0)
|
||||
(let ((s0-1 (the-as pointer s2-1)))
|
||||
(set! (-> s5-0 vector 0 z) (-> obj z-offset))
|
||||
(set! (-> s5-0 vector 0 y)
|
||||
(+ (-> obj y-offset) (* (the float (-> (the-as (pointer int8) s0-1) 0)) (-> obj y-scale)))
|
||||
)
|
||||
(set! sv-96 (+ s3-0 -1))
|
||||
(while (nonzero? sv-96)
|
||||
(set! sv-96 (+ sv-96 -1))
|
||||
(set! (-> s5-0 vector 1 quad) (-> s5-0 vector 0 quad))
|
||||
(+! (-> s5-0 vector 0 z) f30-0)
|
||||
(&+! s0-1 s4-0)
|
||||
(set! (-> s5-0 vector 0 y)
|
||||
(+ (-> obj y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> obj y-scale)))
|
||||
)
|
||||
(if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (the-as vector (-> s5-0 vector)))
|
||||
(point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 1))
|
||||
)
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug2)
|
||||
(the-as vector (-> s5-0 vector))
|
||||
(-> s5-0 vector 1)
|
||||
*color-blue*
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> s5-0 vector 0 x) f28-0)
|
||||
(set! s2-1 (&-> s2-1 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type xz-height-map
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-draw xz-height-map ((obj xz-height-map) (arg0 vector))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector4w-2)))
|
||||
(let ((a1-1 (-> v1-0 vector)))
|
||||
(let ((a0-1 arg0))
|
||||
(let ((a2-1 -573440.0))
|
||||
(.mov vf6 a2-1)
|
||||
)
|
||||
(.lvf vf4 (&-> a0-1 quad))
|
||||
)
|
||||
(.add.x.vf vf5 vf0 vf0 :mask #b1000)
|
||||
(.add.x.vf vf5 vf4 vf6 :mask #b111)
|
||||
(.svf (&-> a1-1 0 quad) vf5)
|
||||
)
|
||||
(let ((a1-2 (-> v1-0 vector 1)))
|
||||
(let ((a0-2 arg0))
|
||||
(let ((a2-3 573440.0))
|
||||
(.mov vf6 a2-3)
|
||||
)
|
||||
(.lvf vf4 (&-> a0-2 quad))
|
||||
)
|
||||
(.add.x.vf vf5 vf0 vf0 :mask #b1000)
|
||||
(.add.x.vf vf5 vf4 vf6 :mask #b111)
|
||||
(.svf (&-> a1-2 quad) vf5)
|
||||
)
|
||||
(debug-draw-mesh obj (the-as vector (-> v1-0 vector)))
|
||||
)
|
||||
(debug-draw-at-point obj arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+53
-53
@@ -3,35 +3,35 @@
|
||||
|
||||
;; definition of type nav-branch
|
||||
(deftype nav-branch (structure)
|
||||
((node int32 2 :offset-assert 0)
|
||||
(src-node nav-node :offset 0)
|
||||
(dest-node nav-node :offset 4)
|
||||
(temp-dest-node-id int32 :offset 4)
|
||||
(speed-limit uint8 :offset-assert 8)
|
||||
(density uint8 :offset-assert 9)
|
||||
(clock-type uint8 :offset-assert 10)
|
||||
(clock-mask uint8 :offset-assert 11)
|
||||
(max-user-count uint8 :offset-assert 12)
|
||||
(user-count uint8 :offset-assert 13)
|
||||
(width uint8 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 15)
|
||||
((node nav-node 2 :offset-assert 0)
|
||||
(src-node nav-node :offset 0)
|
||||
(dest-node nav-node :offset 4)
|
||||
(temp-dest-node-id int32 :offset 4)
|
||||
(speed-limit uint8 :offset-assert 8)
|
||||
(density uint8 :offset-assert 9)
|
||||
(clock-type nav-branch-clock-type :offset-assert 10)
|
||||
(clock-mask nav-branch-clock-mask :offset-assert 11)
|
||||
(max-user-count uint8 :offset-assert 12)
|
||||
(user-count uint8 :offset-assert 13)
|
||||
(width uint8 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 15)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #x10
|
||||
:flag-assert #x1500000010
|
||||
(:methods
|
||||
(nav-branch-method-9 (_type_) none 9)
|
||||
(nav-branch-method-10 (_type_ object int) none 10)
|
||||
(set-default-density-speed-and-width (_type_) none 9)
|
||||
(debug-print (_type_ object int) none 10)
|
||||
(get-density (_type_) float 11)
|
||||
(get-speed-limit (_type_) float 12)
|
||||
(get-width (_type_) float 13)
|
||||
(user-limit-reached? (_type_) symbol 14)
|
||||
(dest-node-id-at-max? (_type_) symbol 15)
|
||||
(nav-branch-method-16 (_type_ float) none 16)
|
||||
(nav-branch-method-17 (_type_ float) none 17)
|
||||
(nav-branch-method-18 (_type_ float) none 18)
|
||||
(nav-branch-method-19 (_type_ nav-node) none 19)
|
||||
(nav-branch-method-20 (_type_ nav-node) none 20)
|
||||
(set-density (_type_ float) none 16)
|
||||
(set-speed-limit (_type_ float) none 17)
|
||||
(set-width (_type_ float) none 18)
|
||||
(set-src-node (_type_ nav-node) none 19)
|
||||
(set-dst-node (_type_ nav-node) none 20)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -79,15 +79,15 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x1600000020
|
||||
(:methods
|
||||
(nav-node-method-9 (_type_) none 9)
|
||||
(nav-node-method-10 (_type_ symbol string) none 10)
|
||||
(nav-node-method-11 (_type_ int) none 11)
|
||||
(nav-node-method-12 (_type_ vector nav-node) none 12)
|
||||
(nav-node-method-13 (_type_ vector) none 13)
|
||||
(nav-node-method-14 (_type_ vector) none 14)
|
||||
(nav-node-method-15 (_type_ uint) none 15)
|
||||
(nav-node-method-16 (_type_ float) none 16)
|
||||
(nav-node-method-17 (_type_ float) none 17)
|
||||
(debug-draw (_type_) none 9)
|
||||
(debug-print (_type_ symbol string) none 10)
|
||||
(remove-branch-by-idx (_type_ int) none 11)
|
||||
(init-from-pt-and-heading (_type_ vector vector) none 12)
|
||||
(set-pos-xyz (_type_ vector) none 13)
|
||||
(set-angle-from-heading (_type_ vector) none 14)
|
||||
(set-id-and-link-branches-back (_type_ uint) none 15)
|
||||
(set-radius (_type_ float) none 16)
|
||||
(set-angle (_type_ float) none 17)
|
||||
(get-position (_type_ vector) vector 18)
|
||||
(calc-sine-and-cosine! (_type_ vector) vector 19)
|
||||
(get-angle (_type_) float 20)
|
||||
@@ -261,42 +261,42 @@
|
||||
:flag-assert #x2d0000003c
|
||||
(:methods
|
||||
(new (symbol type int int int uint) _type_ 0)
|
||||
(nav-graph-method-9 (_type_) none 9)
|
||||
(debug-draw-nodes (_type_) none 9)
|
||||
(nav-graph-method-10 (_type_ vector int) none 10)
|
||||
(nav-graph-method-11 (_type_) none 11)
|
||||
(nav-graph-method-12 (_type_) none 12)
|
||||
(nav-graph-method-13 (_type_ int int) none 13)
|
||||
(nav-graph-method-14 (_type_ int int) none 14)
|
||||
(nav-graph-method-15 (_type_) none 15)
|
||||
(nav-graph-method-16 (_type_ int) nav-node 16)
|
||||
(nav-graph-method-17 (_type_ nav-node) none 17)
|
||||
(nav-graph-method-18 (_type_ nav-node int) none 18)
|
||||
(debug-reset (_type_) none 15)
|
||||
(debug-add-node (_type_ int) nav-node 16)
|
||||
(debug-link-node-to-graph (_type_ nav-node) none 17)
|
||||
(debug-reset-branch-array (_type_ nav-node int) none 18)
|
||||
(nav-graph-method-19 (_type_ int int int int int int) none 19)
|
||||
(nav-graph-method-20 (_type_ int int) none 20)
|
||||
(nav-graph-method-21 (_type_) none 21)
|
||||
(nav-graph-method-22 (_type_ int int) none 22)
|
||||
(nav-graph-method-23 (_type_ int int) none 23)
|
||||
(nav-graph-method-24 (_type_ int int) none 24)
|
||||
(nav-graph-method-25 (_type_ symbol symbol) none 25)
|
||||
(nav-graph-method-26 (_type_ symbol symbol) none 26)
|
||||
(nav-graph-method-27 (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none 27)
|
||||
(nav-graph-method-28 (_type_) none 28)
|
||||
(nav-graph-method-29 (_type_ symbol) none 29)
|
||||
(nav-graph-method-30 (_type_ uint) none 30)
|
||||
(nav-graph-method-31 (_type_ float) none 31)
|
||||
(nav-graph-method-32 (_type_ float) none 32)
|
||||
(nav-graph-method-33 (_type_ float) none 33)
|
||||
(nav-graph-method-34 (_type_ float) none 34)
|
||||
(nav-graph-method-35 (_type_ int) none 35)
|
||||
(nav-graph-method-36 (_type_ int) none 36)
|
||||
(nav-graph-method-37 (_type_ vector) none 37)
|
||||
(move-selected-to-height-map-height (_type_) none 21)
|
||||
(select-nodes-in-range (_type_ int int) none 22)
|
||||
(deselect-nodes-in-range (_type_ int int) none 23)
|
||||
(toggle-select-nodes-in-range (_type_ int int) none 24)
|
||||
(select-nodes-in-level (_type_ symbol symbol) none 25)
|
||||
(select-nodes-by-nav-mesh-id (_type_ int symbol) none 26)
|
||||
(select-nodes-by-flags (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none 27)
|
||||
(print-selected-nodes (_type_) none 28)
|
||||
(assign-selected-nodes-to-level (_type_ symbol) none 29)
|
||||
(assign-selected-nodes-to-nav-mesh (_type_ uint) none 30)
|
||||
(set-radius-of-selected-nodes (_type_ float) none 31)
|
||||
(set-speed-limit-of-selected (_type_ float) none 32)
|
||||
(set-density-of-selected (_type_ float) none 33)
|
||||
(set-width-of-selected (_type_ float) none 34)
|
||||
(or-flags-of-selected-nodes (_type_ nav-node-flag-byte) none 35)
|
||||
(and-flags-of-selected-nodes (_type_ nav-node-flag-byte) none 36)
|
||||
(offset-pos-of-selected (_type_ vector) none 37)
|
||||
(nav-graph-method-38 (_type_) none 38)
|
||||
(nav-graph-method-39 (_type_) none 39)
|
||||
(nav-graph-method-40 (_type_ int) int 40)
|
||||
(node-at-idx (_type_ int) nav-node 41)
|
||||
(nav-graph-method-42 (_type_) none 42)
|
||||
(nav-graph-method-43 (_type_ nav-graph-link string) none 43)
|
||||
(from-editor (_type_ nav-node symbol) none 44)
|
||||
(patch-nodes (_type_) none 42)
|
||||
(copy-to-mysql-graph (_type_ mysql-nav-graph string) none 43)
|
||||
(from-editor (_type_ mysql-nav-graph symbol) none 44)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+1475
File diff suppressed because it is too large
Load Diff
+1072
File diff suppressed because it is too large
Load Diff
+487
@@ -0,0 +1,487 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *pilot-mods*, type surface
|
||||
(define *pilot-mods* (new 'static 'surface :name 'empty :seek0 1.0 :seek90 1.0 :seek180 1.0 :fric 1.0))
|
||||
|
||||
;; definition for function target-pilot-handler
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 59]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 64]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 82]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 130]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 150]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 182]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 96]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 114]
|
||||
;; WARN: disable def twice: 124. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 47]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 9]
|
||||
(defbehavior target-pilot-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
'pilot
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(('end-mode)
|
||||
(let ((v1-4 (-> self pilot)))
|
||||
(when (nonzero? v1-4)
|
||||
(let ((a0-5 (handle->process (-> v1-4 vehicle))))
|
||||
(if a0-5
|
||||
(put-rider-in-seat (the-as vehicle a0-5) (-> v1-4 seat-index) (the-as process-focusable #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
enter-state
|
||||
(process->handle arg0)
|
||||
(go target-pilot-get-off)
|
||||
)
|
||||
(('change-mode)
|
||||
(case (-> arg3 param 0)
|
||||
(('grab)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status dead)))
|
||||
(if (not (-> arg3 param 1))
|
||||
#t
|
||||
(go target-pilot-grab)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('normal)
|
||||
enter-state
|
||||
(process->handle arg0)
|
||||
(go target-pilot-get-off)
|
||||
)
|
||||
(('gun)
|
||||
(if (logtest? (-> self game features) (game-feature gun))
|
||||
(target-gun-init (the-as int (-> arg3 param 2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('swim)
|
||||
#f
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-pilot-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
)
|
||||
(('get-vehicle)
|
||||
(if (nonzero? (-> self pilot))
|
||||
(handle->process (-> self pilot vehicle))
|
||||
)
|
||||
)
|
||||
(('attack 'attack-or-shove 'attack-invinc)
|
||||
(target-attacked
|
||||
arg2
|
||||
(the-as attack-info (-> arg3 param 1))
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
target-pilot-hit
|
||||
)
|
||||
)
|
||||
(('vehicle-hit)
|
||||
(speech-control-method-12 *speech-control* self (if (-> self pilot as-daxter?)
|
||||
(speech-type speech-type-1 speech-type-3 speech-type-5)
|
||||
(speech-type speech-type-0 speech-type-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('vehicle-got-hit)
|
||||
(speech-control-method-12
|
||||
*speech-control*
|
||||
self
|
||||
(if (-> self pilot as-daxter?)
|
||||
(speech-type speech-type-0 speech-type-1 speech-type-3 speech-type-5)
|
||||
(speech-type speech-type-1 speech-type-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-pilot-pidax-enter
|
||||
(defbehavior target-pilot-pidax-enter target ()
|
||||
(set! (-> self pilot art-group-backup) (-> self draw art-group))
|
||||
(set! (-> self draw art-group) (-> self sidekick 0 draw art-group))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw-bounds2))
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix 'indax)
|
||||
)
|
||||
|
||||
;; definition for function target-pilot-pidax-exit
|
||||
(defbehavior target-pilot-pidax-exit target ()
|
||||
(ja-channel-set! 0)
|
||||
(set! (-> self draw art-group) (the-as art-group (-> self pilot art-group-backup)))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw-bounds2))
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix #f)
|
||||
)
|
||||
|
||||
;; definition for function target-pilot-exit
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defbehavior target-pilot-exit target ()
|
||||
(the-as
|
||||
object
|
||||
(when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name)))
|
||||
(or (= v1-3 'target-pilot-stance)
|
||||
(= v1-3 'target-pilot-impact)
|
||||
(= v1-3 'target-pilot-get-off)
|
||||
(= v1-3 'target-pilot-grab)
|
||||
(= v1-3 'target-pilot-clone-anim)
|
||||
(= v1-3 'target-pilot-hit)
|
||||
(= v1-3 'target-pilot-death)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (-> self manipy)))
|
||||
(when v1-4
|
||||
(deactivate (-> v1-4 0))
|
||||
(set! (-> self manipy) (the-as (pointer manipy) #f))
|
||||
)
|
||||
)
|
||||
(if (-> self pilot as-daxter?)
|
||||
(target-pilot-pidax-exit)
|
||||
)
|
||||
(let ((v1-11 (-> self pilot)))
|
||||
(when (nonzero? v1-11)
|
||||
(set! (-> self control nav-radius) (-> v1-11 backup-nav-radius))
|
||||
(let ((gp-0 (handle->process (-> v1-11 vehicle))))
|
||||
(when gp-0
|
||||
(remove-rider (the-as vehicle gp-0) self)
|
||||
(send-event gp-0 'player-get-off)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self neck flex-blend) 1.0)
|
||||
(let ((v1-22 (-> self control root-prim)))
|
||||
(set! (-> v1-22 prim-core collide-as) (-> self control backup-collide-as))
|
||||
(set! (-> v1-22 prim-core collide-with) (-> self control backup-collide-with))
|
||||
)
|
||||
(logclear! (-> self focus-status) (focus-status pilot-riding pilot))
|
||||
(logclear! (-> self control root-prim prim-core action) (collide-action stuck-wall-escape))
|
||||
(set! (-> self control mod-surface) *walk-mods*)
|
||||
(logclear! (-> self state-flags) (state-flags sf6))
|
||||
(enable-set! (-> self arm-ik 0) #f)
|
||||
(enable-set! (-> self arm-ik 1) #f)
|
||||
(set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length))
|
||||
(let ((v1-43 (-> self node-list data)))
|
||||
(set! (-> v1-43 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
|
||||
(set! (-> v1-43 0 param1) (the-as basic (-> self control trans)))
|
||||
(set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset)))
|
||||
)
|
||||
(target-collide-set! 'normal 0.0)
|
||||
(set! (-> self control reaction) target-collision-reaction)
|
||||
(set! (-> self control cspace-offset quad) (the-as uint128 0))
|
||||
(target-exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-pilot-init
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defbehavior target-pilot-init target ((arg0 handle) (arg1 symbol))
|
||||
(target-exit)
|
||||
(if (zero? (-> self pilot))
|
||||
(set! (-> self pilot) (new 'process 'pilot-info))
|
||||
)
|
||||
(let ((s5-0 (-> self pilot)))
|
||||
(set! (-> s5-0 backup-nav-radius) (-> self control nav-radius))
|
||||
(set! (-> s5-0 gun?) #t)
|
||||
(set! (-> s5-0 enable-cam-side-shift) #f)
|
||||
(set! (-> s5-0 as-daxter?) arg1)
|
||||
(set! (-> s5-0 entity) #f)
|
||||
(set! (-> s5-0 cam-side-shift) 0.0)
|
||||
(if (-> self pilot as-daxter?)
|
||||
(target-pilot-pidax-enter)
|
||||
)
|
||||
(cond
|
||||
((handle->process arg0)
|
||||
(set! (-> s5-0 vehicle) arg0)
|
||||
)
|
||||
(else
|
||||
(break!)
|
||||
0
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (handle->process (-> s5-0 vehicle))))
|
||||
(when s4-1
|
||||
(set! (-> s5-0 entity) (-> s4-1 entity))
|
||||
(set! (-> s5-0 gun?) (logtest? (-> (the-as vehicle s4-1) info-override flags) 32))
|
||||
(set! (-> s5-0 enable-cam-side-shift) (logtest? (-> (the-as vehicle s4-1) info-override flags) 128))
|
||||
(send-event
|
||||
(ppointer->process (-> (the-as vehicle s4-1) parent))
|
||||
'player-got-on-vehicle-child
|
||||
(the-as vehicle s4-1)
|
||||
)
|
||||
(set! (-> s5-0 stance) (vehicle-method-72 (the-as vehicle s4-1)))
|
||||
(let ((s3-0 (get-seat-count (the-as vehicle s4-1))))
|
||||
(dotimes (s2-0 s3-0)
|
||||
(let ((a0-20 (get-rider-in-seat (the-as vehicle s4-1) s2-0)))
|
||||
(if (and a0-20 (send-event a0-20 'knocked-off))
|
||||
(put-rider-in-seat (the-as vehicle s4-1) s2-0 (the-as process-focusable #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-43 (get-best-seat-for-vehicle s4-1 (-> self control trans) 1 1)))
|
||||
(set! (-> s5-0 seat-index) (max 0 v1-43))
|
||||
)
|
||||
(cond
|
||||
((-> s5-0 as-daxter?)
|
||||
(set! (-> s5-0 left-right-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 front-back-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 up-down-accel-factor) 0.0000012207031)
|
||||
)
|
||||
((zero? (-> s5-0 stance))
|
||||
(set! (-> s5-0 left-right-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 front-back-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 up-down-accel-factor) 0.00000051879886)
|
||||
)
|
||||
(else
|
||||
(set! (-> s5-0 left-right-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 front-back-accel-factor) 0.0000012207031)
|
||||
(set! (-> s5-0 up-down-accel-factor) 0.00000061035155)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (-> s5-0 gun?))
|
||||
(if arg1
|
||||
(set! (-> self control current-surface flags)
|
||||
(logior (surface-flag gun-fast-exit) (-> self control current-surface flags))
|
||||
)
|
||||
)
|
||||
(target-gun-end-mode arg1)
|
||||
)
|
||||
)
|
||||
(set! (-> self board latch?) #f)
|
||||
(set! (-> self control reaction) target-collision-reaction)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(set! (-> self control ctrl-xz-vel) 0.0)
|
||||
(set! (-> self focus-status) (logior (focus-status pilot) (-> self focus-status)))
|
||||
(set! (-> self control bend-target) 0.0)
|
||||
(let ((v1-73 (-> self node-list data)))
|
||||
(set! (-> v1-73 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!))
|
||||
(set! (-> v1-73 0 param1) (the-as basic (-> self control trans)))
|
||||
(set! (-> v1-73 0 param2) (the-as basic (-> self control cspace-offset)))
|
||||
)
|
||||
(let ((v1-75 (-> self control root-prim)))
|
||||
(set! (-> v1-75 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-75 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(set! (-> self control root-prim prim-core collide-as) (collide-spec jak-vehicle))
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(set! (-> self control status) (collide-status))
|
||||
(the-as object 0)
|
||||
)
|
||||
|
||||
;; definition for function pilot-on-ground?
|
||||
(defbehavior pilot-on-ground? target ()
|
||||
(logtest? (-> self control status) (collide-status on-surface))
|
||||
)
|
||||
|
||||
;; definition for function target-pilot-post
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-pilot-post target ()
|
||||
(local-vars (v1-55 symbol) (a0-44 object) (a0-56 int) (a0-58 int))
|
||||
(let* ((v1-1 (-> *perf-stats* data 17))
|
||||
(a0-0 (-> v1-1 ctrl))
|
||||
)
|
||||
(+! (-> v1-1 count) 1)
|
||||
(b! (zero? a0-0) cfg-2 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mtpc pcr0 0)
|
||||
(.mtpc pcr1 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mtc0 Perf a0-0)
|
||||
)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(label cfg-2)
|
||||
0
|
||||
(let ((f30-0 (-> self clock clock-ratio)))
|
||||
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
|
||||
(update-rates! (-> self clock) (/ f30-0 (the float gp-1)))
|
||||
(b! #t cfg-4 :delay (nop!))
|
||||
(label cfg-3)
|
||||
(+! gp-1 -1)
|
||||
(set! (-> self control remaining-ctrl-iterations) gp-1)
|
||||
(flag-setup)
|
||||
(build-conversions (-> self control transv))
|
||||
(do-rotations1)
|
||||
(do-rotations2)
|
||||
(reverse-conversions (-> self control transv))
|
||||
(vector-!
|
||||
(-> self control cspace-offset)
|
||||
(-> self control draw-offset)
|
||||
(-> self control anim-collide-offset-world)
|
||||
)
|
||||
(let ((a1-5 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-5 options) (overlaps-others-options oo0))
|
||||
(set! (-> a1-5 collide-with-filter) (the-as collide-spec -1))
|
||||
(set! (-> a1-5 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> self control) a1-5)
|
||||
)
|
||||
(post-flag-setup)
|
||||
(label cfg-4)
|
||||
(b! (nonzero? gp-1) cfg-3 :delay (nop!))
|
||||
)
|
||||
(update-rates! (-> self clock) f30-0)
|
||||
)
|
||||
(let* ((gp-2 (-> self pilot))
|
||||
(s5-0 (handle->process (-> gp-2 vehicle)))
|
||||
)
|
||||
(when s5-0
|
||||
(compute-seat-position (the-as vehicle s5-0) (-> self control trans) (-> gp-2 seat-index))
|
||||
(set! (-> self control transv quad) (-> (the-as vehicle s5-0) root-override-2 transv quad))
|
||||
(quaternion-copy! (-> self control quat) (-> (the-as vehicle s5-0) root-override-2 quat))
|
||||
(quaternion-copy! (-> self control quat-for-control) (-> self control quat))
|
||||
(quaternion-copy! (-> self control dir-targ) (-> self control quat))
|
||||
(let ((s4-0 (-> self alt-cam-pos)))
|
||||
(when (not (logtest? (-> self focus-status) (focus-status dead)))
|
||||
(let ((s3-0 (new 'stack-no-clear 'collide-query-with-5vec)))
|
||||
(set! (-> s3-0 vec 2 x) 0.0)
|
||||
(set! (-> s3-0 vec 2 y) 20480.0)
|
||||
(let ((a0-18 (-> self node-list data 0 bone transform)))
|
||||
(set! (-> s3-0 vec 1 quad) (-> a0-18 vector 2 quad))
|
||||
)
|
||||
(set! (-> s3-0 vec 1 y) 0.0)
|
||||
(vector-rotate90-around-y! (-> s3-0 vec 1) (-> s3-0 vec 1))
|
||||
(vector-normalize! (-> s3-0 vec 1) 1.0)
|
||||
(set! (-> s3-0 vec 0 quad) (-> self control trans quad))
|
||||
(when (-> gp-2 enable-cam-side-shift)
|
||||
(let ((s2-0 0))
|
||||
(b! #t cfg-22 :delay (nop!))
|
||||
(label cfg-14)
|
||||
(let ((v1-48 (-> s3-0 cquery)))
|
||||
(set! (-> v1-48 radius) 2048.0)
|
||||
(set! (-> v1-48 collide-with) (collide-spec backgnd))
|
||||
(set! (-> v1-48 ignore-process0) #f)
|
||||
(set! (-> v1-48 ignore-process1) #f)
|
||||
(set! (-> v1-48 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-48 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s3-0 cquery start-pos quad) (-> s3-0 vec 0 quad))
|
||||
(vector-float*! (-> s3-0 cquery move-dist) (-> s3-0 vec 1) (-> s3-0 vec 2 y))
|
||||
(let ((f0-10 (fill-and-probe-using-line-sphere *collide-cache* (-> s3-0 cquery))))
|
||||
(let ((v1-54 (>= f0-10 0.0)))
|
||||
(b! (not v1-54) cfg-19 :likely-delay (set! v1-55 v1-54))
|
||||
)
|
||||
(set! v1-55 (= (-> s3-0 cquery best-other-tri pat mode) (pat-mode wall)))
|
||||
(label cfg-19)
|
||||
(when v1-55
|
||||
(+! (-> s3-0 vec 2 x) (* -1.0 (-> s3-0 vec 2 y) (- 1.0 f0-10)))
|
||||
0
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 vec 2 y) (* -1.0 (-> s3-0 vec 2 y)))
|
||||
(+! s2-0 1)
|
||||
(label cfg-22)
|
||||
(b! (< s2-0 2) cfg-14)
|
||||
)
|
||||
(set! (-> s3-0 vec 2 x)
|
||||
(* (-> s3-0 vec 2 x) (fmax 0.25 (fmin 1.0 (* 0.000008138021 (vector-length (-> self control transv))))))
|
||||
)
|
||||
(seek! (-> gp-2 cam-side-shift) (-> s3-0 vec 2 x) (* 16384.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(set! (-> s4-0 x) (+ (-> s3-0 vec 0 x) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 x))))
|
||||
(set! (-> s4-0 z) (+ (-> s3-0 vec 0 z) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 z))))
|
||||
(set! (-> s4-0 y) (fmax (fmin (-> s4-0 y) (+ 2048.0 (-> s3-0 vec 0 y))) (+ -2048.0 (-> s3-0 vec 0 y))))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (new 'stack-no-clear 'matrix)))
|
||||
(vehicle-method-117 (the-as vehicle s5-0) (the-as vector (-> s4-1 vector)) (-> gp-2 seat-index) 0)
|
||||
(vehicle-method-117 (the-as vehicle s5-0) (-> s4-1 vector 1) (-> gp-2 seat-index) 1)
|
||||
(enable-set! (-> self arm-ik 0) #t)
|
||||
(enable-set! (-> self arm-ik 1) #t)
|
||||
(handle-copy! (-> self arm-ik 0) (the-as vector (-> s4-1 vector)))
|
||||
(handle-copy! (-> self arm-ik 1) (-> s4-1 vector 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when *debug-segment*
|
||||
(let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0))
|
||||
(v1-97 'target-post)
|
||||
(s5-1 *profile-target-post-color*)
|
||||
)
|
||||
(let ((a0-43 *dproc*))
|
||||
(b! (not a0-43) cfg-30 :likely-delay (set! a0-44 a0-43))
|
||||
)
|
||||
(set! a0-44 *debug-segment*)
|
||||
(label cfg-30)
|
||||
(when a0-44
|
||||
(let ((s4-2 (-> gp-3 data (-> gp-3 count))))
|
||||
(let ((s3-1 (-> gp-3 base-time)))
|
||||
(set! (-> s4-2 name) v1-97)
|
||||
(set! (-> s4-2 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1))))
|
||||
)
|
||||
(set! (-> s4-2 depth) (the-as uint (-> gp-3 depth)))
|
||||
(set! (-> s4-2 color) s5-1)
|
||||
(set! (-> gp-3 segment (-> gp-3 depth)) s4-2)
|
||||
)
|
||||
(+! (-> gp-3 count) 1)
|
||||
(+! (-> gp-3 depth) 1)
|
||||
(set! (-> gp-3 max-depth) (max (-> gp-3 max-depth) (-> gp-3 depth)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(ja-post)
|
||||
(when *debug-segment*
|
||||
(let ((gp-4 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let* ((v1-121 (+ (-> gp-4 depth) -1))
|
||||
(s5-2 (-> gp-4 segment v1-121))
|
||||
(s4-3 (-> gp-4 base-time))
|
||||
)
|
||||
(when (>= v1-121 0)
|
||||
(set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-3))))
|
||||
(+! (-> gp-4 depth) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(joint-points)
|
||||
(update-transforms (-> self control))
|
||||
(do-target-gspot)
|
||||
(target-powerup-process)
|
||||
(let ((v1-130 (-> *perf-stats* data 17)))
|
||||
(b! (zero? (-> v1-130 ctrl)) cfg-43 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mfpc a0-56 pcr0)
|
||||
(+! (-> v1-130 accum0) a0-56)
|
||||
(.mfpc a0-58 pcr1)
|
||||
(+! (-> v1-130 accum1) a0-58)
|
||||
)
|
||||
(label cfg-43)
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+508
@@ -0,0 +1,508 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type test-bike
|
||||
(deftype test-bike (bikec)
|
||||
()
|
||||
:heap-base #x320
|
||||
:method-count-assert 144
|
||||
:size-assert #x39c
|
||||
:flag-assert #x900320039c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type test-bike
|
||||
(defmethod inspect test-bike ((obj test-bike))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type bikec inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *test-bike-constants*, type rigid-body-vehicle-constants
|
||||
(define *test-bike-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:friction-factor 0.516
|
||||
:cm-offset-joint (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1.5) (meters 2) (meters 5))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*test-bike-constants*
|
||||
:flags #x11
|
||||
:object-type #xd
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 32.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 100)
|
||||
:ground-probe-distance (meters 5)
|
||||
:ground-probe-offset (meters 0.5)
|
||||
:cos-ground-effect-angle -0.00000004371139
|
||||
:spring-lift-factor 0.35
|
||||
:air-drag-factor 1.2
|
||||
:steering-fin-angle 1820.4445
|
||||
:steering-thruster-factor 6.0
|
||||
:steering-thruster-max-gain 2.0
|
||||
:steering-thruster-half-gain-speed (meters 80)
|
||||
:tire-steering-angle 1274.3112
|
||||
:tire-static-friction 0.5
|
||||
:tire-static-friction-speed (meters 1)
|
||||
:tire-dynamic-friction 0.25
|
||||
:tire-dynamic-friction-speed (meters 3)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 8.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-limiting-drag 0.75
|
||||
:pitch-control-factor 0.5
|
||||
:roll-control-factor 1.0
|
||||
:roll-angle 7281.778
|
||||
:jump-thrust-factor 0.625
|
||||
:buoyancy-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 0.125)
|
||||
:target-speed-offset (meters 4)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 4.0
|
||||
:camera-string-min-height (meters 2.5)
|
||||
:camera-string-max-height (meters 2.5)
|
||||
:camera-string-min-length (meters 5)
|
||||
:camera-string-max-length (meters 5.5)
|
||||
:camera-min-fov 16384.0
|
||||
:camera-max-fov 18204.445
|
||||
:camera-head-offset 4096.0
|
||||
:camera-foot-offset -4096.0
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:seat-count 2
|
||||
:section-count 2
|
||||
:grab-rail-count 2
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 2
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2048.0 :w 1.0)
|
||||
(new 'static 'vector :x 2048.0 :z 8192.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -2048.0 :z 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x -2048.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 802.816 :z 1318.912 :w (the-as float #x10000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 2048.0 :z -4096.0 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
(new 'static 'vector :x -2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
)
|
||||
:section-bike-front (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x8 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-bike-rear (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x40 #x10 #x4)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-offset -0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:engine-sound-select 2
|
||||
:engine-sound (static-sound-name "vehicle-engine")
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "bike-scrape-stn")
|
||||
:glance-sound (static-sound-name "bike-glance-stn")
|
||||
:impact-sound (static-sound-name "bike-impact-stn")
|
||||
:extra-sound (static-sound-name "car-by-1")
|
||||
:explosion-part #xa1
|
||||
:headlight-count 1
|
||||
:taillight-count 1
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y -614.4 :z 13721.6 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :y 614.4 :z -7168.0 :w 1.0) (new 'static 'vector))
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:steering-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 7372.8003 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:steering-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10240.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5324.8 :w 1.0)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-control-point 6
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10649.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.25)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.75)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :y 1.0 :w 0.25)
|
||||
)
|
||||
(new 'static 'vehicle-control-point)
|
||||
(new 'static 'vehicle-control-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:color-option-count 1
|
||||
:color-option-array (new 'static 'inline-array vector 1 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type test-bike
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-skel-and-rigid-body test-bike ((obj test-bike))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-bikec" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-and-init-rigid-body-control obj *test-bike-constants*)
|
||||
(set! (-> obj fin-fl) (new 'process 'joint-mod-rotate-local obj 7 #t))
|
||||
(set! (-> obj fin-fr) (new 'process 'joint-mod-rotate-local obj 6 #t))
|
||||
(set! (-> obj fin-rl) (new 'process 'joint-mod-rotate-local obj 9 #t))
|
||||
(set! (-> obj fin-rr) (new 'process 'joint-mod-rotate-local obj 10 #t))
|
||||
(set! (-> obj fin2-fl) (new 'process 'joint-mod-rotate-local obj 4 #t))
|
||||
(set! (-> obj fin2-fr) (new 'process 'joint-mod-rotate-local obj 5 #t))
|
||||
(set! (-> obj rudder) (new 'process 'joint-mod-rotate-local obj 8 #t))
|
||||
(set! (-> obj brake-l) (new 'process 'joint-mod-rotate-local obj 11 #t))
|
||||
(set! (-> obj brake-r) (new 'process 'joint-mod-rotate-local obj 12 #t))
|
||||
(set! (-> obj spoiler-l) (new 'process 'joint-mod-rotate-local obj 13 #t))
|
||||
(set! (-> obj spoiler-r) (new 'process 'joint-mod-rotate-local obj 14 #t))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type evan-test-bike
|
||||
(deftype evan-test-bike (bikea)
|
||||
()
|
||||
:heap-base #x310
|
||||
:method-count-assert 144
|
||||
:size-assert #x38c
|
||||
:flag-assert #x900310038c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type evan-test-bike
|
||||
(defmethod inspect evan-test-bike ((obj evan-test-bike))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type bikea inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *evan-test-bike-constants*, type rigid-body-vehicle-constants
|
||||
(define *evan-test-bike-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:bounce-factor 0.4
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 3) (meters 4) (meters 6))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*evan-test-bike-constants*
|
||||
:flags #x70
|
||||
:object-type #xb
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 30.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 40)
|
||||
:ground-probe-distance (meters 5)
|
||||
:cos-ground-effect-angle 0.42261824
|
||||
:spring-lift-factor 0.3
|
||||
:air-drag-factor 1.0
|
||||
:steering-thruster-factor 5.0
|
||||
:steering-thruster-max-gain 4.0
|
||||
:steering-thruster-half-gain-speed (meters 15)
|
||||
:tire-friction-factor 0.5
|
||||
:tire-static-friction 0.55
|
||||
:tire-dynamic-friction 0.4
|
||||
:tire-dynamic-friction-speed (meters 2)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.75
|
||||
:pitch-control-factor 1.0
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.625
|
||||
:buoyancy-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:target-speed-offset (meters 4)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 4.0
|
||||
:camera-string-min-height (meters 4.5)
|
||||
:camera-string-max-height (meters 4.5)
|
||||
:camera-string-min-length (meters 5)
|
||||
:camera-string-max-length (meters 12.5)
|
||||
:camera-min-fov 15109.688
|
||||
:camera-max-fov 17476.268
|
||||
:camera-head-offset 8192.0
|
||||
:camera-foot-offset 4096.0
|
||||
:camera-normal-max-angle-offset 5461.3335
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:seat-count 2
|
||||
:section-count 2
|
||||
:grab-rail-count 2
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 2
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2048.0 :w 1.0)
|
||||
(new 'static 'vector :x 2048.0 :z 4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -2048.0 :z 4096.0 :w 1.0)
|
||||
(new 'static 'vector :x -2048.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info :position (new 'static 'vector :w (the-as float #x10000)))
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 2048.0 :z -4096.0 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
(new 'static 'vector :x -2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
)
|
||||
:section-bike-front (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x10 #x8 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-bike-rear (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x4 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-offset -0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:engine-sound-select 1
|
||||
:engine-sound (static-sound-name "vehicle-engine")
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "bike-scrape-stn")
|
||||
:glance-sound (static-sound-name "bike-glance-stn")
|
||||
:impact-sound (static-sound-name "bike-impact-stn")
|
||||
:extra-sound (static-sound-name "bike-by-1")
|
||||
:explosion-part #xa1
|
||||
:headlight-count 1
|
||||
:taillight-count 1
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y -819.2 :z 10240.0 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :y 1433.6 :z -10240.0 :w 1.0) (new 'static 'vector))
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:steering-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z 7372.8003 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z -2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:steering-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10240.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5324.8 :w 1.0)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-control-point 6
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 10649.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 2.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:normal (new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point)
|
||||
(new 'static 'vehicle-control-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:color-option-count 1
|
||||
:color-option-array (new 'static 'inline-array vector 1 (new 'static 'vector :x 0.6 :y 0.6 :z 1.5 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type evan-test-bike
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-skel-and-rigid-body evan-test-bike ((obj evan-test-bike))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-bikea" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-and-init-rigid-body-control obj *evan-test-bike-constants*)
|
||||
(set! (-> obj fin-fl) (new 'process 'joint-mod-rotate-local obj 8 #t))
|
||||
(set! (-> obj fin-fr) (new 'process 'joint-mod-rotate-local obj 7 #t))
|
||||
(set! (-> obj fin-rl) (new 'process 'joint-mod-rotate-local obj 6 #t))
|
||||
(set! (-> obj fin-rr) (new 'process 'joint-mod-rotate-local obj 5 #t))
|
||||
(set! (-> obj rudder) (new 'process 'joint-mod-rotate-local obj 4 #t))
|
||||
(set! (-> obj brake-l) (new 'process 'joint-mod-rotate-local obj 9 #t))
|
||||
(set! (-> obj brake-r) (new 'process 'joint-mod-rotate-local obj 10 #t))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+304
@@ -0,0 +1,304 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type test-car
|
||||
(deftype test-car (cara)
|
||||
()
|
||||
:heap-base #x320
|
||||
:method-count-assert 144
|
||||
:size-assert #x398
|
||||
:flag-assert #x9003200398
|
||||
)
|
||||
|
||||
;; definition for method 3 of type test-car
|
||||
(defmethod inspect test-car ((obj test-car))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type cara inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *test-car-constants*, type rigid-body-vehicle-constants
|
||||
(define *test-car-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 8.0
|
||||
:inv-mass 0.125
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:bounce-factor 0.4
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 6))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*test-car-constants*
|
||||
:flags #x68
|
||||
:object-type #xe
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 39)
|
||||
:inv-max-engine-thrust 0.000006260016
|
||||
:engine-response-rate 20.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 1.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 40)
|
||||
:ground-probe-distance (meters 4.5)
|
||||
:cos-ground-effect-angle 0.42261824
|
||||
:spring-lift-factor 0.4
|
||||
:air-drag-factor 1.0
|
||||
:steering-thruster-factor 3.0
|
||||
:steering-thruster-max-gain 3.5
|
||||
:steering-thruster-half-gain-speed (meters 15)
|
||||
:tire-friction-factor 0.6
|
||||
:tire-static-friction 0.55
|
||||
:tire-dynamic-friction 0.4
|
||||
:tire-dynamic-friction-speed (meters 2)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.7
|
||||
:pitch-control-factor 0.5
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.5
|
||||
:buoyancy-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:target-speed-offset (meters 3)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 2.5
|
||||
:camera-string-min-height (meters 4.5)
|
||||
:camera-string-max-height (meters 4.5)
|
||||
:camera-string-min-length (meters 5)
|
||||
:camera-string-max-length (meters 12.5)
|
||||
:camera-min-fov 15109.688
|
||||
:camera-max-fov 17476.268
|
||||
:camera-head-offset 8192.0
|
||||
:camera-foot-offset 4096.0
|
||||
:camera-normal-max-angle-offset 5461.3335
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:seat-count 3
|
||||
:section-count 4
|
||||
:rider-stance #x1
|
||||
:grab-rail-count #x6
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 4505.6 :y -2662.4 :z 15360.0 :w 1.0)
|
||||
(new 'static 'vector :x -4505.6 :y -2662.4 :z 15360.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 7372.8 :y -819.2 :z -4096.0 :w 1.0)
|
||||
(new 'static 'vector :x 7372.8 :y -819.2 :z 4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -7372.8 :y -819.2 :z 4096.0 :w 1.0)
|
||||
(new 'static 'vector :x -7372.8 :y -819.2 :z -4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -3686.4 :y -409.6 :z -14950.4 :w 1.0)
|
||||
(new 'static 'vector :x 3686.4 :y -409.6 :z -14950.4 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :z -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3837.952 :y -409.6 :z -14950.4 :w 1.0)
|
||||
(new 'static 'vector :x 6041.6 :y -614.4 :z -9011.2 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 0.707 :z -0.707 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -6041.6 :y -614.4 :z -9011.2 :w 1.0)
|
||||
(new 'static 'vector :x -3837.952 :y -409.6 :z -14950.4 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -0.707 :z -0.707 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :x 4079.616 :y 819.2 :z -311.296 :w (the-as float #x30000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :x -4079.616 :y 819.2 :z -311.296 :w (the-as float #x30000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 3751.936 :z -10563.584 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 614.4 :y 614.4 :z 1433.6 :w 1.0)
|
||||
(new 'static 'vector :x 614.4 :y 614.4 :z -1433.6 :w 1.0)
|
||||
)
|
||||
:section-bike-front (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x200 #x20 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-bike-rear (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x400 #x40 #x4)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-car-front-right (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x800 #x80 #x8)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:section-car-rear-right (new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x1000 #x100 #x10)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.09
|
||||
:engine-pitch-mod-amp 0.01
|
||||
:engine-sound-select 5
|
||||
:engine-sound (static-sound-name "vehicle-engine")
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "car-scrape-stn")
|
||||
:glance-sound (static-sound-name "car-glance-stn")
|
||||
:impact-sound (static-sound-name "car-impact-stn")
|
||||
:extra-sound (static-sound-name "car-by-5")
|
||||
:explosion-part #xa1
|
||||
:headlight-count 2
|
||||
:taillight-count 2
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3072.0 :z -14336.0 :w 1.0)
|
||||
(new 'static 'vector :x -3072.0 :z -14336.0 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 6963.2 :y -1024.0 :z -7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -6963.2 :y -1024.0 :z -7372.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3072.0 :z -13926.4 :w 1.0)
|
||||
(new 'static 'vector :x -3072.0 :z -13926.4 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 12288.0 :w 1.0)
|
||||
(new 'static 'vector :x -12288.0 :w 1.0)
|
||||
)
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :x 4915.2 :z 15564.8 :w 1.0)
|
||||
(new 'static 'vector :x -4915.2 :z 15564.8 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3276.8 :y 3276.8 :z -14131.2 :w 1.0)
|
||||
(new 'static 'vector :x -3276.8 :y 3276.8 :z -14131.2 :w 1.0)
|
||||
)
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:steering-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z 8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z -8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :w 1.0)
|
||||
:normal (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :w 1.0)
|
||||
:normal (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:steering-thruster-array (new 'static 'inline-array vehicle-control-point 2
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 7782.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -7782.4 :w 1.0)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-control-point 6
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z 8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:normal (new 'static 'vector :x 1.0 :w 2.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point
|
||||
:local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:normal (new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-control-point)
|
||||
(new 'static 'vehicle-control-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:color-option-count 1
|
||||
:color-option-array (new 'static 'inline-array vector 1 (new 'static 'vector :x 0.5 :y 1.0 :z 0.5 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type test-car
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-skel-and-rigid-body test-car ((obj test-car))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-cara" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-and-init-rigid-body-control obj *test-car-constants*)
|
||||
(set! (-> obj rider-hand-joint-array 0) 11)
|
||||
(set! (-> obj rider-hand-joint-array 1) 12)
|
||||
(set! (-> obj steering-wheel-l) (new 'process 'joint-mod-rotate-local obj 11 #t))
|
||||
(set! (-> obj steering-wheel-r) (new 'process 'joint-mod-rotate-local obj 12 #t))
|
||||
(set! (-> obj fin-fl) (new 'process 'joint-mod-rotate-local obj 4 #t))
|
||||
(set! (-> obj fin-fr) (new 'process 'joint-mod-rotate-local obj 5 #t))
|
||||
(set! (-> obj fin-rl) (new 'process 'joint-mod-rotate-local obj 6 #t))
|
||||
(set! (-> obj fin-rr) (new 'process 'joint-mod-rotate-local obj 8 #t))
|
||||
(set! (-> obj rudder) (new 'process 'joint-mod-rotate-local obj 10 #t))
|
||||
(set! (-> obj rudder-l) (new 'process 'joint-mod-rotate-local obj 7 #t))
|
||||
(set! (-> obj rudder-r) (new 'process 'joint-mod-rotate-local obj 9 #t))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+111
-108
@@ -57,8 +57,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xb00000020
|
||||
(:methods
|
||||
(vis-cell-method-9 (_type_) none 9)
|
||||
(vis-cell-method-10 (_type_) none 10)
|
||||
(reset-segment-counts (_type_) none 9)
|
||||
(debug-draw (_type_) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -203,11 +203,11 @@
|
||||
:size-assert #x40
|
||||
:flag-assert #xe00000040
|
||||
(:methods
|
||||
(grid-info-method-9 (_type_ (pointer bounding-box) int int) none 9)
|
||||
(grid-info-method-10 (_type_ vis-grid-pos vector) none 10)
|
||||
(grid-info-method-11 (_type_ vis-grid-box vector) none 11)
|
||||
(grid-info-method-12 (_type_ rgba) none 12)
|
||||
(grid-info-method-13 (_type_ vis-grid-pos rgba) none 13)
|
||||
(setup-grid-from-bounding-box (_type_ (pointer bounding-box) int int) none 9)
|
||||
(lookup-cell-for-point (_type_ vis-grid-pos vector) none 10)
|
||||
(lookup-box-for-sphere (_type_ vis-grid-box vector) none 11)
|
||||
(debug-draw-grid (_type_ rgba) none 12)
|
||||
(debug-draw-cell (_type_ vis-grid-pos rgba) none 13)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -229,28 +229,28 @@
|
||||
|
||||
;; definition of type city-level-info
|
||||
(deftype city-level-info (structure)
|
||||
((grid-info grid-info :inline :offset-assert 0)
|
||||
(cell-array (inline-array vis-cell) :offset-assert 64)
|
||||
(segment-count int16 :offset-assert 68)
|
||||
(cell-count uint16 :offset-assert 70)
|
||||
(segment-array uint32 :offset-assert 72)
|
||||
(nav-graph nav-graph :offset-assert 76)
|
||||
(camera-ceiling meters :offset-assert 80)
|
||||
(pad-array int8 56 :offset-assert 84)
|
||||
((grid-info grid-info :inline :offset-assert 0)
|
||||
(cell-array (inline-array vis-cell) :offset-assert 64)
|
||||
(segment-count int16 :offset-assert 68)
|
||||
(cell-count uint16 :offset-assert 70)
|
||||
(segment-array (inline-array nav-segment) :offset-assert 72)
|
||||
(nav-graph nav-graph :offset-assert 76)
|
||||
(camera-ceiling meters :offset-assert 80)
|
||||
(pad-array int8 56 :offset-assert 84)
|
||||
)
|
||||
:method-count-assert 19
|
||||
:size-assert #x8c
|
||||
:flag-assert #x130000008c
|
||||
(:methods
|
||||
(city-level-info-method-9 (_type_) symbol 9)
|
||||
(city-level-info-method-10 (_type_ vis-ray vector vector) none 10)
|
||||
(init-vis-ray (_type_ vis-ray vector vector) none 10)
|
||||
(city-level-info-method-11 (_type_ vis-ray) none 11)
|
||||
(city-level-info-method-12 (_type_ vector nav-branch vector) vector 12)
|
||||
(city-level-info-method-13 (_type_ vector) none 13)
|
||||
(city-level-info-method-14 (_type_ vis-grid-box) vis-cell 14)
|
||||
(city-level-info-method-15 (_type_ int int) symbol 15)
|
||||
(city-level-info-method-16 (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct object none)) none 16)
|
||||
(city-level-info-method-17 (_type_ traffic-engine) none 17)
|
||||
(lookup-cell-by-position (_type_ vector) vis-cell 13)
|
||||
(get-first-cell-in-box (_type_ vis-grid-box) vis-cell 14)
|
||||
(sphere-in-grid? (_type_ int int) symbol 15)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none 16)
|
||||
(update-suppressions-from-traffic-engine (_type_ traffic-engine) none 17)
|
||||
(city-level-info-method-18 (_type_) none 18)
|
||||
)
|
||||
)
|
||||
@@ -287,12 +287,12 @@
|
||||
:size-assert #x820
|
||||
:flag-assert #xf00000820
|
||||
(:methods
|
||||
(traffic-level-data-method-9 (_type_) none 9)
|
||||
(traffic-level-data-method-10 (_type_ vis-cell) none 10)
|
||||
(traffic-level-data-method-11 (_type_ int) none 11)
|
||||
(traffic-level-data-method-12 (_type_ vis-cell) none 12)
|
||||
(traffic-level-data-method-13 (_type_) vis-cell 13)
|
||||
(traffic-level-data-method-14 (_type_) none 14)
|
||||
(reset (_type_) none 9)
|
||||
(add-active-cell (_type_ vis-cell) none 10)
|
||||
(remove-active-cell (_type_ int) none 11)
|
||||
(add-newly-active-cell (_type_ vis-cell) none 12)
|
||||
(per-frame-cell-update (_type_) none 13)
|
||||
(debug-draw (_type_) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -315,10 +315,10 @@
|
||||
|
||||
;; definition of type traffic-suppression-box
|
||||
(deftype traffic-suppression-box (structure)
|
||||
((data uint8 32 :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset 0)
|
||||
(flags uint8 :offset 12)
|
||||
(duration uint32 :offset 28)
|
||||
((data uint8 32 :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset 0)
|
||||
(flags traffic-suppression-box-flags :offset 12)
|
||||
(duration uint32 :offset 28)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -335,19 +335,19 @@
|
||||
(format #t "~1Tdata[32] @ #x~X~%" (-> obj bbox))
|
||||
(format #t "~1Tbbox: #<bounding-box @ #x~X>~%" (-> obj bbox))
|
||||
(format #t "~1Tflags: ~D~%" (-> obj flags))
|
||||
(format #t "~1Tduration: ~D~%" (-> obj bbox max w))
|
||||
(format #t "~1Tduration: ~D~%" (-> obj duration))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type traffic-guard-type-info
|
||||
(deftype traffic-guard-type-info (structure)
|
||||
((object-type uint8 :offset-assert 0)
|
||||
(max-target-count int8 :offset-assert 1)
|
||||
(min-target-count int8 :offset-assert 2)
|
||||
(target-count int8 :offset-assert 3)
|
||||
(count int8 :offset-assert 4)
|
||||
(change-to-type uint8 :offset-assert 5)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(max-target-count int8 :offset-assert 1)
|
||||
(min-target-count int8 :offset-assert 2)
|
||||
(target-count int8 :offset-assert 3)
|
||||
(count int8 :offset-assert 4)
|
||||
(change-to-type uint8 :offset-assert 5)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x6
|
||||
@@ -498,7 +498,7 @@
|
||||
(duration uint32 :offset-assert 16)
|
||||
(start-time time-frame :offset-assert 24)
|
||||
(notify-time time-frame :offset-assert 32)
|
||||
(alarm-sound-id uint32 :offset-assert 40)
|
||||
(alarm-sound-id sound-id :offset-assert 40)
|
||||
(target-status-array traffic-target-status 3 :inline :offset-assert 48)
|
||||
(settings traffic-alert-state-settings :inline :offset-assert 288)
|
||||
(guard-type-info-array traffic-guard-type-info 6 :inline :offset-assert 384)
|
||||
@@ -508,7 +508,7 @@
|
||||
:size-assert #x3d8
|
||||
:flag-assert #xa000003d8
|
||||
(:methods
|
||||
(traffic-alert-state-method-9 (_type_) none 9)
|
||||
(reset (_type_) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -604,19 +604,19 @@
|
||||
|
||||
;; definition of type traffic-suppressor
|
||||
(deftype traffic-suppressor (structure)
|
||||
((flags uint8 :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset-assert 16)
|
||||
(array traffic-suppression-box 16 :inline :offset-assert 48)
|
||||
((flags traffic-suppression-flags :offset-assert 0)
|
||||
(bbox bounding-box :inline :offset-assert 16)
|
||||
(array traffic-suppression-box 16 :inline :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x230
|
||||
:flag-assert #xe00000230
|
||||
(:methods
|
||||
(traffic-suppressor-method-9 (_type_) none 9)
|
||||
(traffic-suppressor-method-10 (_type_ traffic-suppression-params) none 10)
|
||||
(traffic-suppressor-method-11 (_type_ int) none 11)
|
||||
(traffic-suppressor-method-12 (_type_ traffic-suppression-params) none 12)
|
||||
(traffic-suppressor-method-13 (_type_) none 13)
|
||||
(reset-boxes (_type_) none 9)
|
||||
(add-new-supression-box (_type_ traffic-suppression-params) none 10)
|
||||
(remove-box-by-id (_type_ int) none 11)
|
||||
(update-box-from-params (_type_ traffic-suppression-params) none 12)
|
||||
(debug-draw (_type_) none 13)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -643,7 +643,7 @@
|
||||
(active-object-count uint8 :offset-assert 13)
|
||||
(inactive-object-count int8 :offset-assert 14)
|
||||
(active-object-list handle 126 :offset-assert 16)
|
||||
(active-object-type-list uint8 126 :offset-assert 1024)
|
||||
(active-object-type-list traffic-type 126 :offset-assert 1024)
|
||||
)
|
||||
:method-count-assert 27
|
||||
:size-assert #x47e
|
||||
@@ -652,21 +652,21 @@
|
||||
(traffic-tracker-method-9 (_type_) none 9)
|
||||
(traffic-tracker-method-10 (_type_) none 10)
|
||||
(traffic-tracker-method-11 (_type_) none 11)
|
||||
(traffic-tracker-method-12 (_type_ uint handle) none 12)
|
||||
(traffic-tracker-method-13 (_type_ int) handle 13)
|
||||
(traffic-tracker-method-14 (_type_ int handle) none 14)
|
||||
(traffic-tracker-method-15 (_type_ int) handle 15)
|
||||
(traffic-tracker-method-16 (_type_ int handle) handle 16)
|
||||
(traffic-tracker-method-17 (_type_ int handle) none 17)
|
||||
(traffic-tracker-method-18 (_type_ process) none 18)
|
||||
(traffic-tracker-method-19 (_type_ handle) none 19)
|
||||
(traffic-tracker-method-20 (_type_ int symbol) none 20)
|
||||
(traffic-tracker-method-21 (_type_ traffic-object-spawn-params) none 21)
|
||||
(traffic-tracker-method-22 (_type_ int nav-segment float) none 22)
|
||||
(traffic-tracker-method-23 (_type_ traffic-object-spawn-params) none 23)
|
||||
(traffic-tracker-method-24 (_type_ uint traffic-engine) none 24)
|
||||
(traffic-tracker-method-25 (_type_ (function process-focusable traffic-object-type-info none)) none 25)
|
||||
(traffic-tracker-method-26 (_type_ int (function process-tree none)) none 26)
|
||||
(add-active-process (_type_ traffic-type handle) none 12)
|
||||
(remove-active-process (_type_ int) handle 13)
|
||||
(add-reserved-process (_type_ traffic-type handle) none 14)
|
||||
(get-from-inactive-by-type (_type_ traffic-type) handle 15)
|
||||
(get-from-inactive-by-handle (_type_ traffic-type handle) handle 16)
|
||||
(deactivate-object (_type_ int symbol) none 17)
|
||||
(set-process-to-killed (_type_ process) none 18)
|
||||
(deactivate-all (_type_ symbol) none 19)
|
||||
(deactivate-all-of-type (_type_ traffic-type symbol) none 20)
|
||||
(activate-from-params (_type_ traffic-object-spawn-params) none 21)
|
||||
(activate-by-type (_type_ traffic-type nav-segment float) none 22)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none 23)
|
||||
(reset (_type_ uint traffic-engine) none 24)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none 25)
|
||||
(for-all-active-processes-of-type (_type_ traffic-type (function process-focusable traffic-object-type-info none)) none 26)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -692,7 +692,7 @@
|
||||
;; definition of type traffic-engine
|
||||
(deftype traffic-engine (basic)
|
||||
((object-hash spatial-hash :offset-assert 4)
|
||||
(manager uint64 :offset-assert 8)
|
||||
(manager handle :offset-assert 8)
|
||||
(inv-density-factor float :offset-assert 16)
|
||||
(sync-clock uint8 :offset-assert 20)
|
||||
(sync-mask-8 uint8 :offset-assert 21)
|
||||
@@ -704,6 +704,8 @@
|
||||
(level-data-array traffic-level-data 2 :inline :offset-assert 1040)
|
||||
(object-type-info-array traffic-object-type-info 21 :inline :offset-assert 5200)
|
||||
(tracker-array traffic-tracker 2 :inline :offset-assert 5872)
|
||||
(citizen-tracker-array traffic-tracker :inline :offset 5872)
|
||||
(vehicle-tracker-array traffic-tracker :inline :offset 7024)
|
||||
(inactive-object-array handle 420 :offset-assert 8176)
|
||||
(suppressor traffic-suppressor :inline :offset-assert 11536)
|
||||
(danger-sphere-count int8 :offset-assert 12096)
|
||||
@@ -714,33 +716,34 @@
|
||||
:size-assert #x3050
|
||||
:flag-assert #x4a00003050
|
||||
(:methods
|
||||
(traffic-engine-method-9 (_type_) none 9)
|
||||
(traffic-engine-method-10 (_type_ process) none 10)
|
||||
(traffic-engine-method-11 (_type_) none 11)
|
||||
(traffic-engine-method-12 (_type_) none 12)
|
||||
(add-object (_type_ int process) none 13)
|
||||
(traffic-engine-method-14 (_type_ object object) symbol 14)
|
||||
(traffic-engine-method-15 (_type_ nav-segment float) none 15)
|
||||
(traffic-engine-method-16 (_type_ nav-segment float) none 16)
|
||||
(traffic-engine-method-17 (_type_ nav-branch) symbol 17)
|
||||
(new (symbol type) _type_ 0)
|
||||
(update-traffic (_type_) none 9)
|
||||
(reset-and-init-from-manager (_type_ process) none 10)
|
||||
(stop-alarm-sound (_type_) none 11)
|
||||
(debug-unused (_type_) none 12)
|
||||
(add-object (_type_ traffic-type process) none 13)
|
||||
(sphere-in-loaded-city-infos? (_type_ int vector) symbol 14)
|
||||
(activate-one-citizen (_type_ nav-segment float) none 15)
|
||||
(activate-one-vehicle (_type_ nav-segment float) none 16)
|
||||
(can-dest-be-used? (_type_ nav-branch) symbol 17)
|
||||
(child-killed (_type_ process) none 18)
|
||||
(traffic-engine-method-19 (_type_ object) none 19)
|
||||
(traffic-engine-method-20 (_type_ vector vector int) nav-segment 20)
|
||||
(traffic-engine-method-21 (_type_ vector int traffic-find-segment-struct function) none 21)
|
||||
(add-danger-sphere (_type_ traffic-danger-info) none 22)
|
||||
(traffic-engine-method-23 (_type_) none 23)
|
||||
(deactivate-all-from-level (_type_ symbol) none 19)
|
||||
(find-best-segment (_type_ vector vector int) nav-segment 20)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none 21)
|
||||
(add-danger (_type_ traffic-danger-info) none 22)
|
||||
(guard-count (_type_) int 23)
|
||||
(set-target-level (_type_ float) none 24)
|
||||
(set-guard-target-level (_type_ float) none 25)
|
||||
(deactivate-all (_type_) none 26)
|
||||
(deactivate-by-type (_type_ int) none 27)
|
||||
(traffic-engine-method-28 (_type_) symbol 28)
|
||||
(deactivate-by-type (_type_ traffic-type) none 27)
|
||||
(maybe-increase-guard-aim-count (_type_) symbol 28)
|
||||
(restore-default-settings (_type_) none 29)
|
||||
(increase-alert-level (_type_ object target) none 30)
|
||||
(decrease-alert-level (_type_ object) none 31)
|
||||
(set-alert-level (_type_ object) none 32)
|
||||
(set-max-alert-level (_type_ object) none 33)
|
||||
(set-alert-duration (_type_ object) none 34)
|
||||
(get-alert-level (_type_) symbol 35)
|
||||
(increase-alert-level (_type_ int target) none 30)
|
||||
(decrease-alert-level (_type_ int) none 31)
|
||||
(set-alert-level (_type_ int) none 32)
|
||||
(set-max-alert-level (_type_ int) none 33)
|
||||
(set-alert-duration (_type_ int) none 34)
|
||||
(get-alert-level (_type_) int 35)
|
||||
(get-target (_type_) target 36)
|
||||
(set-object-target-level (_type_ int float) none 37)
|
||||
(set-object-target-count (_type_ int int) none 38)
|
||||
@@ -748,37 +751,37 @@
|
||||
(get-object-reserve-count (_type_ int) int 40)
|
||||
(get-object-remaining-count (_type_ int) int 41)
|
||||
(activate-object (_type_ traffic-object-spawn-params) none 42)
|
||||
(traffic-engine-method-43 (_type_ traffic-object-spawn-params) none 43)
|
||||
(traffic-engine-method-44 (_type_ int float) none 44)
|
||||
(traffic-engine-method-45 (_type_) int 45)
|
||||
(new-suppression-box (_type_ object) none 46)
|
||||
(traffic-engine-method-47 (_type_ traffic-suppression-params) none 47)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none 43)
|
||||
(set-parking-spot-prob (_type_ int float) none 44)
|
||||
(get-random-parking-spot-type (_type_) traffic-type 45)
|
||||
(new-suppression-box (_type_ traffic-suppression-params) none 46)
|
||||
(remove-suppression-box (_type_ traffic-suppression-params) none 47)
|
||||
(update-suppression-box (_type_ traffic-suppression-params) none 48)
|
||||
(traffic-engine-method-49 (_type_ object int traffic-target-status) traffic-target-status 49)
|
||||
(traffic-engine-method-50 (_type_ process-drawable int) process-focusable 50)
|
||||
(traffic-engine-method-51 (_type_ (function none)) none 51)
|
||||
(traffic-engine-method-52 (_type_) none 52)
|
||||
(end-pursuit-by-type (_type_ int) none 53)
|
||||
(find-closest-to-with-collide-lists (_type_ process-drawable collide-spec) process-focusable 50)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none 51)
|
||||
(send-alert-events (_type_) none 52)
|
||||
(end-pursuit-by-type (_type_ traffic-type) none 53)
|
||||
(get-traffic-guard-type-settings (_type_ int) traffic-guard-type-settings 54)
|
||||
(get-guard-type-for-traffic-obj (_type_ int) uint 55)
|
||||
(get-traffic-guard-change-to-type (_type_ int) uint 56)
|
||||
(set-guard-target-count-range (_type_ int int int) none 57)
|
||||
(set-object-auto-activate (_type_ object object) none 58)
|
||||
(traffic-engine-method-59 (_type_ object int) none 59)
|
||||
(set-object-auto-activate (_type_ int object) none 58)
|
||||
(debug-check-proc-in-tracker (_type_ process int) none 59)
|
||||
(kill-traffic-sphere (_type_ sphere) none 60)
|
||||
(level-loaded (_type_ level) none 61)
|
||||
(level-killed (_type_ level) none 62)
|
||||
(traffic-engine-method-63 (_type_) none 63)
|
||||
(traffic-engine-method-64 (_type_) none 64)
|
||||
(traffic-engine-method-65 (_type_ vis-cell) none 65)
|
||||
(traffic-engine-method-66 (_type_) none 66)
|
||||
(traffic-engine-method-67 (_type_) none 67)
|
||||
(traffic-engine-method-68 (_type_) none 68)
|
||||
(traffic-engine-method-69 (_type_) none 69)
|
||||
(traffic-engine-method-70 (_type_) none 70)
|
||||
(traffic-engine-method-71 (_type_) none 71)
|
||||
(traffic-engine-method-72 (_type_) none 72)
|
||||
(traffic-engine-method-73 (_type_) none 73)
|
||||
(handle-new-vis-cell (_type_ vis-cell) none 65)
|
||||
(update-sync-from-frame-counter (_type_) none 66)
|
||||
(per-frame-guard-update (_type_) none 67)
|
||||
(per-frame-activate-deactivate (_type_) none 68)
|
||||
(per-frame-danger-update (_type_) none 69)
|
||||
(update-danger-from-target (_type_) none 70)
|
||||
(per-frame-alert-update (_type_) none 71)
|
||||
(per-frame-suppressor-update (_type_) none 72)
|
||||
(recompute-supressions (_type_) none 73)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -801,7 +804,7 @@
|
||||
(format #t "~1Talert-state: #<traffic-alert-state @ #x~X>~%" (-> obj alert-state))
|
||||
(format #t "~1Tlevel-data-array[2] @ #x~X~%" (-> obj level-data-array))
|
||||
(format #t "~1Tobject-type-info-array[21] @ #x~X~%" (-> obj object-type-info-array))
|
||||
(format #t "~1Ttracker-array[2] @ #x~X~%" (-> obj tracker-array))
|
||||
(format #t "~1Ttracker-array[2] @ #x~X~%" (-> obj citizen-tracker-array))
|
||||
(format #t "~1Tinactive-object-array[420] @ #x~X~%" (-> obj inactive-object-array))
|
||||
(format #t "~1Tsuppressor: #<traffic-suppressor @ #x~X>~%" (-> obj suppressor))
|
||||
(format #t "~1Tdanger-sphere-count: ~D~%" (-> obj danger-sphere-count))
|
||||
|
||||
+4053
File diff suppressed because it is too large
Load Diff
+84
-82
@@ -54,8 +54,8 @@
|
||||
(let ((v1-0 (-> arg0 grid-info box)))
|
||||
(add-debug-box #t (bucket-id debug2) (-> v1-0 min) (-> v1-0 max) *color-yellow*)
|
||||
)
|
||||
(grid-info-method-12 (-> arg0 grid-info) *color-gray*)
|
||||
(grid-info-method-13 (-> arg0 grid-info) arg1 *color-red*)
|
||||
(debug-draw-grid (-> arg0 grid-info) *color-gray*)
|
||||
(debug-draw-cell (-> arg0 grid-info) arg1 *color-red*)
|
||||
(let* ((v1-8 (+ (-> arg1 x)
|
||||
(* (-> arg1 z) (-> arg0 grid-info dimension-array 0))
|
||||
(* (* (-> arg1 y) (-> arg0 grid-info dimension-array 0)) (-> arg0 grid-info dimension-array 2))
|
||||
@@ -72,14 +72,14 @@
|
||||
;; definition for method 16 of type traffic-manager
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod traffic-manager-method-16 traffic-manager ((obj traffic-manager))
|
||||
(traffic-engine-method-9 (-> obj traffic-engine))
|
||||
(update-traffic (-> obj traffic-engine))
|
||||
(traffic-manager-method-18 obj)
|
||||
(spawn-all obj)
|
||||
(if *debug-segment*
|
||||
(traffic-engine-method-12 (-> obj traffic-engine))
|
||||
(debug-unused (-> obj traffic-engine))
|
||||
)
|
||||
(if *display-traffic-height-map*
|
||||
(xz-height-map-method-13 *traffic-height-map* (target-pos 0))
|
||||
(debug-draw *traffic-height-map* (target-pos 0))
|
||||
)
|
||||
(when *display-trail-graph*
|
||||
(let ((a0-7 *trail-graph*))
|
||||
@@ -101,9 +101,11 @@
|
||||
(when (logtest? (-> v1-2 flags) 2)
|
||||
(let ((a0-5 (+ (-> v1-2 active-count) (-> v1-2 inactive-count))))
|
||||
(when (< (-> v1-2 want-count) a0-5)
|
||||
(let ((a0-10 (handle->process
|
||||
(traffic-tracker-method-15 (-> obj traffic-engine tracker-array (-> v1-2 tracker-index)) s5-0)
|
||||
)
|
||||
(let ((a0-10 (handle->process (get-from-inactive-by-type
|
||||
(-> obj traffic-engine tracker-array (-> v1-2 tracker-index))
|
||||
(the-as traffic-type s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-10
|
||||
@@ -128,9 +130,11 @@
|
||||
(while (< (the-as uint s5-0) (the-as uint 21))
|
||||
(let ((s4-0 (-> obj traffic-engine object-type-info-array s5-0)))
|
||||
(countdown (s3-0 (-> s4-0 inactive-count))
|
||||
(let ((a0-6 (handle->process
|
||||
(traffic-tracker-method-15 (-> obj traffic-engine tracker-array (-> s4-0 tracker-index)) s5-0)
|
||||
)
|
||||
(let ((a0-6 (handle->process (get-from-inactive-by-type
|
||||
(-> obj traffic-engine tracker-array (-> s4-0 tracker-index))
|
||||
(the-as traffic-type s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-6
|
||||
@@ -184,7 +188,7 @@
|
||||
)
|
||||
(set! (-> s2-0 flags) (logand -9 (-> s2-0 flags)))
|
||||
(b!
|
||||
(not (and (= (-> s2-0 object-type) 6)
|
||||
(not (and (= (-> s2-0 object-type) (traffic-type crimson-guard-1))
|
||||
(> (-> obj dark-guard-ratio) 0)
|
||||
(zero? (mod v1-21 (-> obj dark-guard-ratio)))
|
||||
)
|
||||
@@ -197,7 +201,7 @@
|
||||
(label cfg-25)
|
||||
(let ((a2-0 (traffic-object-spawn obj s2-0)))
|
||||
(b! (not a2-0) cfg-27 :delay (nop!))
|
||||
(add-object (-> obj traffic-engine) (the-as int s1-0) a2-0)
|
||||
(add-object (-> obj traffic-engine) s1-0 a2-0)
|
||||
)
|
||||
(+! (-> s0-0 reserve-count) -1)
|
||||
)
|
||||
@@ -217,7 +221,7 @@
|
||||
(if (>= (the-as uint v1-37) (the-as uint 21))
|
||||
(set! v1-37 0)
|
||||
)
|
||||
(set! (-> s2-0 object-type) (the-as uint v1-37))
|
||||
(set! (-> s2-0 object-type) (the-as traffic-type v1-37))
|
||||
)
|
||||
)
|
||||
(label cfg-36)
|
||||
@@ -280,60 +284,58 @@
|
||||
;; definition for function traffic-object-spawn
|
||||
(defun traffic-object-spawn ((arg0 process) (arg1 traffic-object-spawn-params))
|
||||
(let ((v0-0 (the-as process-drawable #f)))
|
||||
(let ((v1-0 (-> arg1 object-type)))
|
||||
(cond
|
||||
((= v1-0 11)
|
||||
(set! v0-0 (vehicle-spawn arg0 bikea arg1))
|
||||
)
|
||||
((= v1-0 12)
|
||||
(set! v0-0 (vehicle-spawn arg0 bikeb arg1))
|
||||
)
|
||||
((= v1-0 13)
|
||||
(set! v0-0 (vehicle-spawn arg0 bikec arg1))
|
||||
)
|
||||
((= v1-0 14)
|
||||
(set! v0-0 (vehicle-spawn arg0 cara arg1))
|
||||
)
|
||||
((= v1-0 15)
|
||||
(set! v0-0 (vehicle-spawn arg0 carb arg1))
|
||||
)
|
||||
((= v1-0 16)
|
||||
(set! v0-0 (vehicle-spawn arg0 carc arg1))
|
||||
)
|
||||
((= v1-0 18)
|
||||
(set! v0-0 (vehicle-spawn arg0 guard-bike arg1))
|
||||
)
|
||||
((= v1-0 19)
|
||||
(set! v0-0 (vehicle-spawn arg0 hellcat arg1))
|
||||
)
|
||||
((zero? v1-0)
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-norm arg1))
|
||||
)
|
||||
((= v1-0 1)
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-chick arg1))
|
||||
)
|
||||
((= v1-0 2)
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-fat arg1))
|
||||
)
|
||||
((= v1-0 3)
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-norm arg1))
|
||||
)
|
||||
((= v1-0 10)
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-predator arg1))
|
||||
)
|
||||
((= v1-0 8)
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-grunt arg1))
|
||||
)
|
||||
((= v1-0 9)
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-flitter arg1))
|
||||
)
|
||||
((= v1-0 6)
|
||||
(set! v0-0 (citizen-spawn arg0 crimson-guard arg1))
|
||||
)
|
||||
((= v1-0 4)
|
||||
(set! v0-0 (citizen-spawn arg0 crimson-guard arg1))
|
||||
)
|
||||
)
|
||||
(case (-> arg1 object-type)
|
||||
(((traffic-type bikea))
|
||||
(set! v0-0 (vehicle-spawn arg0 bikea arg1))
|
||||
)
|
||||
(((traffic-type bikeb))
|
||||
(set! v0-0 (vehicle-spawn arg0 bikeb arg1))
|
||||
)
|
||||
(((traffic-type bikec))
|
||||
(set! v0-0 (vehicle-spawn arg0 bikec arg1))
|
||||
)
|
||||
(((traffic-type cara))
|
||||
(set! v0-0 (vehicle-spawn arg0 cara arg1))
|
||||
)
|
||||
(((traffic-type carb))
|
||||
(set! v0-0 (vehicle-spawn arg0 carb arg1))
|
||||
)
|
||||
(((traffic-type carc))
|
||||
(set! v0-0 (vehicle-spawn arg0 carc arg1))
|
||||
)
|
||||
(((traffic-type guard-bike))
|
||||
(set! v0-0 (vehicle-spawn arg0 guard-bike arg1))
|
||||
)
|
||||
(((traffic-type hellcat))
|
||||
(set! v0-0 (vehicle-spawn arg0 hellcat arg1))
|
||||
)
|
||||
(((traffic-type citizen-norm-1))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-norm arg1))
|
||||
)
|
||||
(((traffic-type citizen-chick))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-chick arg1))
|
||||
)
|
||||
(((traffic-type citizen-fat))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-fat arg1))
|
||||
)
|
||||
(((traffic-type citizen-norm-2))
|
||||
(set! v0-0 (citizen-spawn arg0 citizen-norm arg1))
|
||||
)
|
||||
(((traffic-type metalhead-predator))
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-predator arg1))
|
||||
)
|
||||
(((traffic-type metalhead-grunt))
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-grunt arg1))
|
||||
)
|
||||
(((traffic-type metalhead-flitter))
|
||||
(set! v0-0 (citizen-spawn arg0 metalhead-flitter arg1))
|
||||
)
|
||||
(((traffic-type crimson-guard-1))
|
||||
(set! v0-0 (citizen-spawn arg0 crimson-guard arg1))
|
||||
)
|
||||
(((traffic-type crimson-guard-0))
|
||||
(set! v0-0 (citizen-spawn arg0 crimson-guard arg1))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
@@ -385,7 +387,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod traffic-manager-method-20 traffic-manager ((obj traffic-manager))
|
||||
(set! (-> obj traffic-engine) *traffic-engine*)
|
||||
(traffic-engine-method-10 (-> obj traffic-engine) obj)
|
||||
(reset-and-init-from-manager (-> obj traffic-engine) obj)
|
||||
(restore-city-speeches)
|
||||
0
|
||||
(none)
|
||||
@@ -403,7 +405,7 @@
|
||||
|
||||
;; definition for method 10 of type traffic-manager
|
||||
(defmethod deactivate traffic-manager ((obj traffic-manager))
|
||||
(traffic-engine-method-11 (-> obj traffic-engine))
|
||||
(stop-alarm-sound (-> obj traffic-engine))
|
||||
(set! *traffic-manager* #f)
|
||||
(remove-setting *setting-control* obj 'task-mask)
|
||||
(apply-settings *setting-control*)
|
||||
@@ -444,7 +446,7 @@
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (-> obj spawn-params)))
|
||||
(set! (-> s5-1 object-type) (the-as uint 6))
|
||||
(set! (-> s5-1 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-1 behavior) (the-as uint 1))
|
||||
(set! (-> s5-1 id) (the-as uint 0))
|
||||
(set! (-> s5-1 nav-mesh) #f)
|
||||
@@ -484,23 +486,23 @@
|
||||
(('increase-alert-level)
|
||||
(when *target*
|
||||
(let ((a1-4 (-> arg3 param 0)))
|
||||
(increase-alert-level (-> self traffic-engine) a1-4 *target*)
|
||||
(increase-alert-level (-> self traffic-engine) (the-as int a1-4) *target*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('decrease-alert-level)
|
||||
(let ((a1-5 (-> arg3 param 0)))
|
||||
(decrease-alert-level (-> self traffic-engine) a1-5)
|
||||
(decrease-alert-level (-> self traffic-engine) (the-as int a1-5))
|
||||
)
|
||||
)
|
||||
(('set-alert-level)
|
||||
(let ((a1-6 (-> arg3 param 0)))
|
||||
(set-alert-level (-> self traffic-engine) a1-6)
|
||||
(set-alert-level (-> self traffic-engine) (the-as int a1-6))
|
||||
)
|
||||
)
|
||||
(('set-max-alert-level)
|
||||
(let ((a1-7 (-> arg3 param 0)))
|
||||
(set-max-alert-level (-> self traffic-engine) a1-7)
|
||||
(set-max-alert-level (-> self traffic-engine) (the-as int a1-7))
|
||||
)
|
||||
)
|
||||
(('get-alert-level)
|
||||
@@ -508,7 +510,7 @@
|
||||
)
|
||||
(('set-alert-duration)
|
||||
(let ((a1-8 (-> arg3 param 0)))
|
||||
(set-alert-duration (-> self traffic-engine) a1-8)
|
||||
(set-alert-duration (-> self traffic-engine) (the-as int a1-8))
|
||||
)
|
||||
)
|
||||
(('deactivate-all)
|
||||
@@ -529,7 +531,7 @@
|
||||
)
|
||||
(('add-danger-sphere)
|
||||
(let ((a1-11 (-> arg3 param 0)))
|
||||
(add-danger-sphere (-> self traffic-engine) (the-as traffic-danger-info a1-11))
|
||||
(add-danger (-> self traffic-engine) (the-as traffic-danger-info a1-11))
|
||||
)
|
||||
)
|
||||
(('spawn-object)
|
||||
@@ -583,12 +585,12 @@
|
||||
)
|
||||
(('deactivate-by-type)
|
||||
(let ((a1-20 (-> arg3 param 0)))
|
||||
(deactivate-by-type (-> self traffic-engine) (the-as int a1-20))
|
||||
(deactivate-by-type (-> self traffic-engine) (the-as traffic-type a1-20))
|
||||
)
|
||||
)
|
||||
(('new-suppression-box)
|
||||
(let ((a1-21 (-> arg3 param 0)))
|
||||
(new-suppression-box (-> self traffic-engine) a1-21)
|
||||
(new-suppression-box (-> self traffic-engine) (the-as traffic-suppression-params a1-21))
|
||||
)
|
||||
)
|
||||
(('update-suppression-box)
|
||||
@@ -625,7 +627,7 @@
|
||||
(let ((a1-26 (-> arg3 param 0))
|
||||
(a2-6 (-> arg3 param 1))
|
||||
)
|
||||
(set-object-auto-activate (-> self traffic-engine) a1-26 a2-6)
|
||||
(set-object-auto-activate (-> self traffic-engine) (the-as int a1-26) a2-6)
|
||||
)
|
||||
)
|
||||
(('set-guard-force-visible)
|
||||
@@ -640,7 +642,7 @@
|
||||
)
|
||||
(('end-pursuit-by-type)
|
||||
(let ((a1-28 (-> arg3 param 0)))
|
||||
(end-pursuit-by-type (-> self traffic-engine) (the-as int a1-28))
|
||||
(end-pursuit-by-type (-> self traffic-engine) (the-as traffic-type a1-28))
|
||||
)
|
||||
)
|
||||
(('level-loaded)
|
||||
@@ -658,7 +660,7 @@
|
||||
(let ((a1-32 (-> arg3 param 0))
|
||||
(a2-8 (-> arg3 param 1))
|
||||
)
|
||||
(add-object (-> self traffic-engine) (the-as int a1-32) (the-as process a2-8))
|
||||
(add-object (-> self traffic-engine) (the-as traffic-type a1-32) (the-as process a2-8))
|
||||
)
|
||||
)
|
||||
(('kill-all)
|
||||
|
||||
+3
-3
@@ -83,7 +83,7 @@
|
||||
(defstate idle (vehicle-turret)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(turret-control-method-12 (-> self turret) (the-as joint-mod-rotate-local (-> self turret-jm)))
|
||||
(update-joint-mod (-> self turret) (the-as joint-mod-rotate-local (-> self turret-jm)))
|
||||
(vehicle-turret-method-29 self)
|
||||
(when (and (nonzero? (-> self target)) (handle->process (-> self target)))
|
||||
(let* ((s5-0 (handle->process (-> self target)))
|
||||
@@ -164,7 +164,7 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior vehicle-turret-init-by-other vehicle-turret ((arg0 turret-control-info))
|
||||
(vehicle-turret-method-28 self)
|
||||
(turret-control-method-15 (-> self turret) arg0)
|
||||
(set-info (-> self turret) arg0)
|
||||
(logior! (-> self turret flags) (turret-flag targetting-laser no-rot-y-clamp))
|
||||
(vehicle-turret-method-29 self)
|
||||
(vector-identity! (-> self root-override scale))
|
||||
@@ -509,7 +509,7 @@
|
||||
(with-pp
|
||||
(when (>= (- (-> pp clock frame-counter) (-> obj last-guard-spawn-time)) 0)
|
||||
(let ((s5-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 6))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) (-> obj nav-mesh))
|
||||
|
||||
+4
-4
@@ -4,7 +4,7 @@
|
||||
;; definition for method 36 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-36 vehicle ((obj vehicle))
|
||||
(defmethod do-engine-sounds vehicle ((obj vehicle))
|
||||
(local-vars (v1-36 float))
|
||||
(with-pp
|
||||
(rlet ((acc :class vf)
|
||||
@@ -225,7 +225,7 @@
|
||||
;; definition for method 84 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-84 vehicle ((obj vehicle) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
(defmethod draw-thruster vehicle ((obj vehicle) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
@@ -317,7 +317,7 @@
|
||||
;; definition for method 85 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-85 vehicle ((obj vehicle))
|
||||
(defmethod draw-thrusters vehicle ((obj vehicle))
|
||||
(local-vars (sv-272 sparticle-launcher) (sv-276 sparticle-launcher))
|
||||
(with-pp
|
||||
(when (= (-> obj controller traffic sync-mask-32) (ash 1 (logand (-> obj traffic-priority-id) 31)))
|
||||
@@ -440,7 +440,7 @@
|
||||
)
|
||||
(dotimes (s4-2 2)
|
||||
(vector-matrix*! (the-as vector (-> s5-0 0)) (-> obj info-override thruster-local-pos s4-2) (-> s5-0 1))
|
||||
(vehicle-method-84 obj (the-as vector (-> s5-0 0)) (-> s5-0 0 vector 1) f28-3 f30-2)
|
||||
(draw-thruster obj (the-as vector (-> s5-0 0)) (-> s5-0 0 vector 1) f28-3 f30-2)
|
||||
)
|
||||
)
|
||||
(when (logtest? (rigid-body-object-flag ignition) (-> obj flags))
|
||||
|
||||
+7
-7
@@ -99,10 +99,10 @@
|
||||
(turret-control-method-9 (_type_ vehicle vector vector) none 9)
|
||||
(turret-control-method-10 (_type_ vehicle) none 10)
|
||||
(turret-control-method-11 (_type_ object object vector) none 11)
|
||||
(turret-control-method-12 (_type_ joint-mod-rotate-local) none 12)
|
||||
(update-joint-mod (_type_ joint-mod-rotate-local) none 12)
|
||||
(turret-control-method-13 (_type_) none 13)
|
||||
(turret-control-method-14 (_type_) none 14)
|
||||
(turret-control-method-15 (_type_ turret-control-info) none 15)
|
||||
(set-info (_type_ turret-control-info) none 15)
|
||||
(turret-control-method-16 (_type_ float float) none 16)
|
||||
(turret-control-method-17 (_type_ vehicle) none 17)
|
||||
)
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
;; definition for method 15 of type turret-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod turret-control-method-15 turret-control ((obj turret-control) (arg0 turret-control-info))
|
||||
(defmethod set-info turret-control ((obj turret-control) (arg0 turret-control-info))
|
||||
(set! (-> obj info) arg0)
|
||||
(set! (-> obj owner-handle) (the-as handle #f))
|
||||
0
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
;; definition for method 12 of type turret-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod turret-control-method-12 turret-control ((obj turret-control) (arg0 joint-mod-rotate-local))
|
||||
(defmethod update-joint-mod turret-control ((obj turret-control) (arg0 joint-mod-rotate-local))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-0 x) (- (-> obj aim-rot-x)))
|
||||
(set! (-> v1-0 y) (-> obj aim-rot-y))
|
||||
@@ -967,7 +967,7 @@
|
||||
(set! (-> a1-2 flags) (traffic-danger-flags tdf0))
|
||||
(set! (-> a1-2 danger-type) (traffic-danger-type tdt6))
|
||||
(set! (-> a1-2 handle) (the-as uint #f))
|
||||
(add-danger-sphere (-> obj controller traffic) a1-2)
|
||||
(add-danger (-> obj controller traffic) a1-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1139,8 +1139,8 @@
|
||||
|
||||
;; definition for method 31 of type vehicle-guard
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-31 vehicle-guard ((obj vehicle-guard) (arg0 rigid-body-vehicle-constants))
|
||||
(let ((t9-0 (method-of-type vehicle rigid-body-object-method-31)))
|
||||
(defmethod alloc-and-init-rigid-body-control vehicle-guard ((obj vehicle-guard) (arg0 rigid-body-vehicle-constants))
|
||||
(let ((t9-0 (method-of-type vehicle alloc-and-init-rigid-body-control)))
|
||||
(t9-0 obj arg0)
|
||||
)
|
||||
(set! (-> obj mask) (logior (process-mask enemy guard) (-> obj mask)))
|
||||
|
||||
+11
-11
@@ -636,7 +636,7 @@
|
||||
:size-assert #x370
|
||||
:flag-assert #x9002f00370
|
||||
(:methods
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-vehicle-constants) none :replace 31)
|
||||
(alloc-and-init-rigid-body-control (_type_ rigid-body-vehicle-constants) none :replace 31)
|
||||
(inactive () _type_ :state 53)
|
||||
(waiting () _type_ :state 54)
|
||||
(vehicle-method-55 () _type_ :state 55)
|
||||
@@ -649,16 +649,16 @@
|
||||
(vehicle-method-62 (_type_ float) none 62)
|
||||
(vehicle-method-63 (_type_ float) none 63)
|
||||
(vehicle-method-64 () none 64)
|
||||
(vehicle-method-65 (_type_) none 65)
|
||||
(start-jump (_type_) none 65)
|
||||
(vehicle-method-66 () none 66)
|
||||
(vehicle-method-67 (_type_) none 67)
|
||||
(vehicle-method-68 (_type_ vector int) none 68)
|
||||
(vehicle-method-69 (_type_ int) process 69)
|
||||
(get-seat-count (_type_) int 67)
|
||||
(compute-seat-position (_type_ vector int) none 68)
|
||||
(get-rider-in-seat (_type_ int) process 69)
|
||||
(vehicle-method-70 (_type_) process 70)
|
||||
(vehicle-method-71 (_type_ int process-focusable) none 71)
|
||||
(put-rider-in-seat (_type_ int process-focusable) none 71)
|
||||
(vehicle-method-72 (_type_) uint 72)
|
||||
(vehicle-method-73 (_type_ vector int int) int 73)
|
||||
(vehicle-method-74 (_type_ process) none 74)
|
||||
(get-best-seat-for-vehicle (_type_ vector int int) int 73)
|
||||
(remove-rider (_type_ process) none 74)
|
||||
(vehicle-method-75 (_type_) float 75)
|
||||
(vehicle-method-76 (_type_ int uint) none 76)
|
||||
(vehicle-method-77 (_type_) none 77)
|
||||
@@ -668,9 +668,9 @@
|
||||
(vehicle-method-81 (_type_) none 81)
|
||||
(vehicle-method-82 (_type_) none 82)
|
||||
(vehicle-method-83 (_type_) none 83)
|
||||
(vehicle-method-84 (_type_ vector vector float float) none 84)
|
||||
(vehicle-method-85 (_type_) none 85)
|
||||
(vehicle-method-86 () none 86)
|
||||
(draw-thruster (_type_ vector vector float float) none 84)
|
||||
(draw-thrusters (_type_) none 85)
|
||||
(update-joint-mods (_type_) none 86)
|
||||
(vehicle-method-87 (_type_) none 87)
|
||||
(vehicle-method-88 (_type_) none 88)
|
||||
(vehicle-method-89 (_type_) none 89)
|
||||
|
||||
+1
-1
@@ -743,7 +743,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-4 (new 'stack-no-clear 'inline-array 'vehicle-control-point 2)))
|
||||
(let ((s1-4 (new 'stack-no-clear 'inline-array 'vehicle-control-point 24)))
|
||||
(quad-copy!
|
||||
(the-as pointer s1-4)
|
||||
(the-as pointer (-> s4-0 stabilizer-array))
|
||||
|
||||
+4
-4
@@ -68,7 +68,7 @@
|
||||
(if (and s5-0 (nonzero? (vehicle-method-72 s5-0)))
|
||||
(logior! (-> obj flags) 4)
|
||||
)
|
||||
(vehicle-method-71 s5-0 (-> obj seat-index) obj)
|
||||
(put-rider-in-seat s5-0 (-> obj seat-index) obj)
|
||||
)
|
||||
(set! (-> obj anim-speed) (rand-vu-float-range 0.8 1.2))
|
||||
0
|
||||
@@ -80,7 +80,7 @@
|
||||
(defmethod vehicle-rider-method-35 vehicle-rider ((obj vehicle-rider))
|
||||
(logior! (-> obj draw status) (draw-control-status no-draw))
|
||||
(let ((v1-3 (-> obj parent-override)))
|
||||
(vehicle-method-71
|
||||
(put-rider-in-seat
|
||||
(the-as vehicle (if v1-3
|
||||
(-> v1-3 0 self-override)
|
||||
)
|
||||
@@ -172,7 +172,7 @@
|
||||
(('knocked-off)
|
||||
(let ((gp-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(let ((v1-14 (find-nearest-nav-mesh (-> self root-override trans) (the-as float #x7f800000))))
|
||||
(set! (-> gp-0 object-type) (the-as uint 0))
|
||||
(set! (-> gp-0 object-type) (traffic-type citizen-norm-1))
|
||||
(set! (-> gp-0 behavior) (the-as uint 11))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 nav-mesh) v1-14)
|
||||
@@ -186,7 +186,7 @@
|
||||
(vector-reset! (-> gp-0 velocity))
|
||||
(when (logtest? (-> self flags) 8)
|
||||
(send-event *traffic-manager* 'increase-alert-level 2)
|
||||
(set! (-> gp-0 object-type) (the-as uint 6))
|
||||
(set! (-> gp-0 object-type) (traffic-type crimson-guard-1))
|
||||
)
|
||||
(set! (-> gp-0 position quad) (-> self root-override trans quad))
|
||||
(quaternion-copy! (-> gp-0 rotation) (-> self root-override quat))
|
||||
|
||||
+1
-1
@@ -429,7 +429,7 @@
|
||||
)
|
||||
(send-event-function (handle->process (-> self rider-array gp-1)) a1-2)
|
||||
)
|
||||
(vehicle-method-71 self gp-1 (the-as process-focusable #f))
|
||||
(put-rider-in-seat self gp-1 (the-as process-focusable #f))
|
||||
)
|
||||
(logior! (-> self focus-status) (focus-status dead))
|
||||
(set! (-> self crash-level) 3)
|
||||
|
||||
+20
-22
@@ -297,9 +297,9 @@ This commonly includes things such as:
|
||||
(s4-1 #f)
|
||||
(s3-0 #f)
|
||||
)
|
||||
(let ((a2-2 (vehicle-method-73 obj (-> s5-0 matrices 0 vector 1) 1 0)))
|
||||
(let ((a2-2 (get-best-seat-for-vehicle obj (-> s5-0 matrices 0 vector 1) 1 0)))
|
||||
(when (!= a2-2 -1)
|
||||
(vehicle-method-68 obj (-> s5-0 matrices 0 vector 2) a2-2)
|
||||
(compute-seat-position obj (-> s5-0 matrices 0 vector 2) a2-2)
|
||||
(vector+float*!
|
||||
(-> s5-0 matrices 0 vector 2)
|
||||
(-> s5-0 matrices 0 vector 2)
|
||||
@@ -503,7 +503,7 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for method 65 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-65 vehicle ((obj vehicle))
|
||||
(defmethod start-jump vehicle ((obj vehicle))
|
||||
(when (logtest? (-> obj info-override flags) 16)
|
||||
(when (not (logtest? (rigid-body-object-flag jump-sound) (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (rigid-body-object-flag jump-sound) (-> obj flags)))
|
||||
@@ -523,16 +523,14 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for method 67 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-67 vehicle ((obj vehicle))
|
||||
(defmethod get-seat-count vehicle ((obj vehicle))
|
||||
(-> obj info-override seat-count)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 68 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-68 vehicle ((obj vehicle) (arg0 vector) (arg1 int))
|
||||
(defmethod compute-seat-position vehicle ((obj vehicle) (arg0 vector) (arg1 int))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-0 quad) (-> obj info-override seat-array arg1 position quad))
|
||||
(set! (-> v1-0 w) 1.0)
|
||||
@@ -543,7 +541,7 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for method 69 of type vehicle
|
||||
(defmethod vehicle-method-69 vehicle ((obj vehicle) (arg0 int))
|
||||
(defmethod get-rider-in-seat vehicle ((obj vehicle) (arg0 int))
|
||||
(let ((v0-0 (the-as process #f)))
|
||||
(if (< arg0 (-> obj info-override seat-count))
|
||||
(set! v0-0 (handle->process (-> obj rider-array arg0)))
|
||||
@@ -557,7 +555,7 @@ This commonly includes things such as:
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(countdown (s4-0 (-> obj info-override seat-count))
|
||||
(when (logtest? (-> obj info-override seat-array s4-0 flags) 1)
|
||||
(let ((v1-7 (vehicle-method-69 obj s4-0)))
|
||||
(let ((v1-7 (get-rider-in-seat obj s4-0)))
|
||||
(if v1-7
|
||||
(set! gp-0 v1-7)
|
||||
)
|
||||
@@ -569,7 +567,7 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for method 73 of type vehicle
|
||||
(defmethod vehicle-method-73 vehicle ((obj vehicle) (arg0 vector) (arg1 int) (arg2 int))
|
||||
(defmethod get-best-seat-for-vehicle vehicle ((obj vehicle) (arg0 vector) (arg1 int) (arg2 int))
|
||||
(let ((gp-0 -1))
|
||||
(let ((f30-0 (the-as float #x7f800000))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
@@ -582,16 +580,16 @@ This commonly includes things such as:
|
||||
#t
|
||||
)
|
||||
((= v1-7 1)
|
||||
(not (vehicle-method-69 obj s0-0))
|
||||
(not (get-rider-in-seat obj s0-0))
|
||||
)
|
||||
((= v1-7 2)
|
||||
(vehicle-method-69 obj s0-0)
|
||||
(get-rider-in-seat obj s0-0)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
(vehicle-method-68 obj s1-0 s0-0)
|
||||
(compute-seat-position obj s1-0 s0-0)
|
||||
(let ((f0-0 (vector-vector-distance-squared arg0 s1-0)))
|
||||
(when (< f0-0 f30-0)
|
||||
(set! f30-0 f0-0)
|
||||
@@ -609,7 +607,7 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for method 74 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-74 vehicle ((obj vehicle) (arg0 process))
|
||||
(defmethod remove-rider vehicle ((obj vehicle) (arg0 process))
|
||||
(let ((v1-1 (-> obj info-override seat-count)))
|
||||
(dotimes (a2-0 v1-1)
|
||||
(if (= arg0 (handle->process (-> obj rider-array a2-0)))
|
||||
@@ -623,7 +621,7 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for method 71 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-71 vehicle ((obj vehicle) (arg0 int) (arg1 process-focusable))
|
||||
(defmethod put-rider-in-seat vehicle ((obj vehicle) (arg0 int) (arg1 process-focusable))
|
||||
(if (< arg0 (-> obj info-override seat-count))
|
||||
(set! (-> obj rider-array arg0) (process->handle arg1))
|
||||
)
|
||||
@@ -786,7 +784,7 @@ This commonly includes things such as:
|
||||
(set! (-> obj power-level) 1.0)
|
||||
(set! (-> obj flight-level-index) 0)
|
||||
(let ((a1-0 (-> obj root-override-2 trans)))
|
||||
(set! (-> obj flight-level) (xz-height-map-method-9 *traffic-height-map* a1-0))
|
||||
(set! (-> obj flight-level) (get-height-at-point *traffic-height-map* a1-0))
|
||||
)
|
||||
(set! (-> obj lights-factor) 0.0)
|
||||
(let ((a0-8 (-> obj info-override color-option-select)))
|
||||
@@ -1220,7 +1218,7 @@ This commonly includes things such as:
|
||||
(let ((a0-1 (-> obj controller traffic)))
|
||||
(when (and (nonzero? a0-1) arg1)
|
||||
(if #t
|
||||
(increase-alert-level a0-1 arg0 arg1)
|
||||
(increase-alert-level a0-1 (the-as int arg0) arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1231,7 +1229,7 @@ This commonly includes things such as:
|
||||
;; definition for method 112 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-112 vehicle ((obj vehicle) (arg0 object))
|
||||
(decrease-alert-level (-> obj controller traffic) arg0)
|
||||
(decrease-alert-level (-> obj controller traffic) (the-as int arg0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1416,7 +1414,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 (-> obj info-override seat-count))
|
||||
(vehicle-method-71 obj s5-1 (the-as process-focusable #f))
|
||||
(put-rider-in-seat obj s5-1 (the-as process-focusable #f))
|
||||
)
|
||||
(vehicle-method-142 obj)
|
||||
(vehicle-controller-method-11 (-> obj controller))
|
||||
@@ -1553,7 +1551,7 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for method 86 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-86 vehicle ()
|
||||
(defmethod update-joint-mods vehicle ((obj vehicle))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1570,7 +1568,7 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 local-pos w) 40960.0)
|
||||
(let ((s4-0 0))
|
||||
(label cfg-1)
|
||||
(let ((v1-7 (traffic-engine-method-20 (-> obj controller traffic) (-> s5-0 local-pos) (-> s5-0 normal) 0)))
|
||||
(let ((v1-7 (find-best-segment (-> obj controller traffic) (-> s5-0 local-pos) (-> s5-0 normal) 0)))
|
||||
(when (and (not v1-7) (< s4-0 3))
|
||||
(set! (-> s5-0 local-pos w) (+ 40960.0 (-> s5-0 local-pos w)))
|
||||
(+! s4-0 1)
|
||||
@@ -1594,7 +1592,7 @@ This commonly includes things such as:
|
||||
(dotimes (s5-0 (-> obj info-override seat-count))
|
||||
(let ((s4-0 (handle->process (-> obj rider-array s5-0))))
|
||||
(when (and s4-0 (logtest? (-> (the-as vehicle-rider s4-0) focus-status) (focus-status pilot-riding)))
|
||||
(vehicle-method-68 obj (-> (the-as vehicle-rider s4-0) root-override trans) s5-0)
|
||||
(compute-seat-position obj (-> (the-as vehicle-rider s4-0) root-override trans) s5-0)
|
||||
(set! (-> (the-as vehicle-rider s4-0) root-override transv quad) (-> obj root-override-2 transv quad))
|
||||
(let ((f0-1 (the float (-> obj info-override seat-array s5-0 angle))))
|
||||
(quaternion-rotate-local-y!
|
||||
|
||||
+16
-16
@@ -208,7 +208,7 @@
|
||||
(with-pp
|
||||
(when (= (-> obj controller traffic sync-mask-8) (ash 1 (logand (-> obj traffic-priority-id) 7)))
|
||||
(let ((a1-0 (-> obj root-override-2 trans)))
|
||||
(set! (-> obj flight-level) (xz-height-map-method-9 *traffic-height-map* a1-0))
|
||||
(set! (-> obj flight-level) (get-height-at-point *traffic-height-map* a1-0))
|
||||
)
|
||||
)
|
||||
(set! (-> obj target-acceleration y)
|
||||
@@ -417,7 +417,7 @@
|
||||
(vehicle-method-95 obj (the-as vector (&-> s5-0 x)))
|
||||
)
|
||||
(if (or (cpad-hold? 0 l1) (and (logtest? (-> obj info-override flags) 512) (cpad-hold? 0 r1)))
|
||||
(vehicle-method-65 obj)
|
||||
(start-jump obj)
|
||||
)
|
||||
(if (cpad-pressed? 0 circle)
|
||||
((method-of-object obj vehicle-method-66))
|
||||
@@ -620,10 +620,10 @@
|
||||
(dotimes (v1-4 (-> *level* length))
|
||||
(let ((a0-5 (-> *level* level v1-4)))
|
||||
(when (= (-> a0-5 status) 'active)
|
||||
(let ((a0-7 (-> a0-5 bsp bsp-header-jkh1b23)))
|
||||
(let ((a0-7 (-> a0-5 bsp city-level-info)))
|
||||
(when (nonzero? a0-7)
|
||||
(let ((f1-0 (-> a0-7 frames-per-second)))
|
||||
(if (= f1-0 0.0)
|
||||
(let ((f1-0 (the-as float (-> a0-7 camera-ceiling))))
|
||||
(if (= (the-as meters f1-0) 0.0)
|
||||
(set! f1-0 40960000.0)
|
||||
)
|
||||
(set! f0-0 (fmax f0-0 f1-0))
|
||||
@@ -943,18 +943,18 @@
|
||||
(f1-0 245760.0)
|
||||
)
|
||||
(if (< f0-1 (* f1-0 f1-0))
|
||||
(rigid-body-object-method-36 obj)
|
||||
(do-engine-sounds obj)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj draw status) (draw-control-status on-screen))
|
||||
(if #t
|
||||
(vehicle-method-85 obj)
|
||||
(draw-thrusters obj)
|
||||
)
|
||||
(let ((f0-2 (-> obj camera-dist2))
|
||||
(f1-3 245760.0)
|
||||
)
|
||||
(if (< f0-2 (* f1-3 f1-3))
|
||||
((method-of-object obj vehicle-method-86))
|
||||
(update-joint-mods obj)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1031,7 +1031,7 @@
|
||||
)
|
||||
(vehicle-method-96 obj)
|
||||
(let ((a1-0 (-> obj rbody state position)))
|
||||
(set! (-> obj flight-level) (xz-height-map-method-9 *traffic-height-map* a1-0))
|
||||
(set! (-> obj flight-level) (get-height-at-point *traffic-height-map* a1-0))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -1321,13 +1321,13 @@
|
||||
(let ((f0-10 (vector-length (-> obj root-override-2 transv))))
|
||||
(seek! (-> obj engine-power-factor) (* 0.000016276043 f0-10) (* 6.0 (-> pp clock seconds-per-frame)))
|
||||
)
|
||||
(rigid-body-object-method-36 obj)
|
||||
(do-engine-sounds obj)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj draw status) (draw-control-status on-screen))
|
||||
(when #t
|
||||
(set! (-> obj node-list data 0 bone transform trans quad) (-> obj root-override-2 trans quad))
|
||||
(vehicle-method-85 obj)
|
||||
(draw-thrusters obj)
|
||||
)
|
||||
)
|
||||
(let ((v1-70 (-> *perf-stats* data 19)))
|
||||
@@ -1407,7 +1407,7 @@
|
||||
|
||||
;; definition for method 31 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-31 vehicle ((obj vehicle) (arg0 rigid-body-vehicle-constants))
|
||||
(defmethod alloc-and-init-rigid-body-control vehicle ((obj vehicle) (arg0 rigid-body-vehicle-constants))
|
||||
(if (logtest? (-> arg0 flags) 8)
|
||||
(iterate-prims
|
||||
(-> obj root-override-2)
|
||||
@@ -1493,7 +1493,7 @@
|
||||
(new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)
|
||||
)
|
||||
(set! (-> obj root-override-2 event-self) 'touched)
|
||||
(let ((t9-3 (method-of-type rigid-body-object rigid-body-object-method-31)))
|
||||
(let ((t9-3 (method-of-type rigid-body-object alloc-and-init-rigid-body-control)))
|
||||
(t9-3 obj arg0)
|
||||
)
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-collision))
|
||||
@@ -1913,7 +1913,7 @@
|
||||
(when s5-3
|
||||
(format #t "vehicle::event-handler: pilot-on (pid ~d) from pid ~d~%" (-> obj pid) (-> arg0 pid))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag riding))
|
||||
(vehicle-method-71 obj (the-as int s3-2) (the-as process-focusable s5-3))
|
||||
(put-rider-in-seat obj (the-as int s3-2) (the-as process-focusable s5-3))
|
||||
(if (logtest? (-> s5-3 mask) (process-mask target))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag player-driving))
|
||||
)
|
||||
@@ -1954,13 +1954,13 @@
|
||||
(defbehavior vehicle-init-by-other vehicle ((arg0 traffic-object-spawn-params))
|
||||
(stack-size-set! (-> self main-thread) 16)
|
||||
(set! (-> self mask) (logior (process-mask vehicle) (-> self mask)))
|
||||
(rigid-body-object-method-32 self)
|
||||
(allocate-and-init-cshape self)
|
||||
(set! (-> self root-override-2 trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 rotation))
|
||||
(if (not (logtest? (-> arg0 flags) 1))
|
||||
(lwide-entity-hack)
|
||||
)
|
||||
(rigid-body-object-method-33 self)
|
||||
(init-skel-and-rigid-body self)
|
||||
(set! (-> self traffic-priority-id) (the-as int (-> arg0 id)))
|
||||
(vehicle-method-136 self arg0)
|
||||
(none)
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -241,7 +241,7 @@
|
||||
)
|
||||
(set! (-> traffic-obj-params position quad) (-> self begin-pos quad))
|
||||
(quaternion-axis-angle! (-> traffic-obj-params rotation) 0.0 1.0 0.0 16384.0)
|
||||
(set! (-> traffic-obj-params object-type) (the-as uint 13))
|
||||
(set! (-> traffic-obj-params object-type) (traffic-type bikec))
|
||||
(set! (-> traffic-obj-params behavior) (the-as uint 0))
|
||||
(set! (-> traffic-obj-params id) (the-as uint 0))
|
||||
(set! (-> traffic-obj-params proc) #f)
|
||||
|
||||
+4
-7
@@ -136,6 +136,7 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for function krew-package-spawn
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer krew-package).
|
||||
(defun krew-package-spawn ((arg0 process) (arg1 process))
|
||||
(process-spawn krew-package arg1 :to arg0)
|
||||
)
|
||||
@@ -163,7 +164,7 @@ This commonly includes things such as:
|
||||
(let ((s5-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s5-0 position quad) (-> (new 'static 'vector :x 4698112.0 :y 45875.2 :z 81920.0 :w 1.0) quad))
|
||||
(quaternion-axis-angle! (-> s5-0 rotation) 0.0 1.0 0.0 32768.0)
|
||||
(set! (-> s5-0 object-type) (the-as uint 11))
|
||||
(set! (-> s5-0 object-type) (traffic-type bikea))
|
||||
(set! (-> s5-0 behavior) (the-as uint 0))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 proc) #f)
|
||||
@@ -271,7 +272,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traffic-object-spawn-params))
|
||||
)
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 9))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) #f)
|
||||
@@ -344,7 +345,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traffic-object-spawn-params))
|
||||
)
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 object-type) (traffic-type crimson-guard-1))
|
||||
(set! (-> s5-0 behavior) (the-as uint 9))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) #f)
|
||||
@@ -567,7 +568,3 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1806,7 +1806,7 @@
|
||||
)
|
||||
(set! (-> s5-0 position quad) (-> self begin-pos quad))
|
||||
(quaternion-axis-angle! (-> s5-0 rotation) 0.0 1.0 0.0 0.0)
|
||||
(set! (-> s5-0 object-type) (the-as uint 13))
|
||||
(set! (-> s5-0 object-type) (traffic-type bikec))
|
||||
(set! (-> s5-0 behavior) (the-as uint 0))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 proc) #f)
|
||||
|
||||
+4
-5
@@ -1495,7 +1495,7 @@
|
||||
)
|
||||
(set! (-> gp-0 position quad) (-> *bb-ring-info* (-> self info index) start-pos quad))
|
||||
(quaternion-axis-angle! (-> gp-0 rotation) 0.0 1.0 0.0 (-> *bb-ring-info* (-> self info index) rotation))
|
||||
(set! (-> gp-0 object-type) (the-as uint 11))
|
||||
(set! (-> gp-0 object-type) (traffic-type bikea))
|
||||
(set! (-> gp-0 behavior) (the-as uint 0))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 proc) #f)
|
||||
@@ -1925,16 +1925,19 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for function bush-collect-spawn
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer bush-collect).
|
||||
(defun bush-collect-spawn ((arg0 task-manager) (arg1 vector))
|
||||
(process-spawn bush-collect arg1 :to arg0)
|
||||
)
|
||||
|
||||
;; definition for function bush-collect-homing-beacon-spawn
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer bush-collect).
|
||||
(defun bush-collect-homing-beacon-spawn ((arg0 task-manager) (arg1 vector))
|
||||
(process-spawn bush-collect :init bush-collect-homing-beacon-init-by-other arg1 :to arg0)
|
||||
)
|
||||
|
||||
;; definition for function bush-collect-dark-eco-spawn
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer bush-collect).
|
||||
(defun bush-collect-dark-eco-spawn ((arg0 task-manager) (arg1 vector))
|
||||
(process-spawn bush-collect :init bush-collect-dark-eco-init-by-other arg1 :to arg0)
|
||||
)
|
||||
@@ -3309,7 +3312,3 @@ This commonly includes things such as:
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -914,7 +914,7 @@
|
||||
(set! (-> a1-0 decay-rate) 0.0)
|
||||
(set! (-> a1-0 flags) (traffic-danger-flags tdf0))
|
||||
(set! (-> a1-0 danger-type) (traffic-danger-type tdt0))
|
||||
(add-danger-sphere *traffic-engine* a1-0)
|
||||
(add-danger *traffic-engine* a1-0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user