mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-27 00:10:31 +00:00
d/jak2: get portrun
working and decompile a bunch of miscellaneous files (#2169)
This commit is contained in:
parent
4876b6af21
commit
18507bc78e
@ -55,7 +55,7 @@ void find_functions(LabelDB* db, LinkedObjectFile* file) {
|
||||
int offset_of_function = func.start_word * 4 + 4;
|
||||
auto idx_of_label = db->try_get_index_by_offset(seg, offset_of_function);
|
||||
if (!idx_of_label) {
|
||||
func.warnings.error("Could not find any references to this function: {}", func.name());
|
||||
func.warnings.warning("Could not find any references to this function: {}", func.name());
|
||||
} else {
|
||||
auto old = db->set_and_get_previous(*idx_of_label, func.type, false, {});
|
||||
if (old.known) {
|
||||
|
@ -7000,8 +7000,16 @@
|
||||
(text-x24e #x024e)
|
||||
(text-x24f #x024f)
|
||||
(text-x277 #x0277)
|
||||
(text-x278 #x0278)
|
||||
(text-x27a #x027a)
|
||||
(text-x27b #x027b)
|
||||
(text-x27c #x027c)
|
||||
(text-x27d #x027d)
|
||||
(text-x27e #x027e)
|
||||
(text-x27f #x027f)
|
||||
(scene-subtitles-enabled #x30d)
|
||||
(scene-subtitles-disabled #x30e)
|
||||
(text-x30f #x30f)
|
||||
(progress-unknown-continue #x310)
|
||||
)
|
||||
;; ---text-id-h:game-text-id
|
||||
@ -7375,7 +7383,6 @@
|
||||
:method-count-assert 9
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|
||||
|
||||
@ -7393,7 +7400,6 @@
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
:flag-assert #x900000050
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|
||||
(deftype engine-minimap (engine-pers)
|
||||
@ -9848,7 +9854,7 @@
|
||||
(data-float float 32)
|
||||
(data-vector vector 32 :inline :offset-assert 800 :score 100)
|
||||
(actor-group (pointer entity-actor) 4 :offset-assert 1312)
|
||||
(minimap uint32 8 :offset-assert 1328)
|
||||
(minimap connection-minimap 8 :offset-assert 1328)
|
||||
(hud handle 4 :offset-assert 1360)
|
||||
(hud-timer handle :offset 1360)
|
||||
(hud-counter handle :offset 1368)
|
||||
@ -33100,7 +33106,7 @@
|
||||
)
|
||||
|
||||
(deftype rigid-body-object-constants (structure)
|
||||
((info rigid-body-info :inline :offset-assert 0 :score -1)
|
||||
((info rigid-body-info :inline :offset-assert 0)
|
||||
(mass float :offset 0)
|
||||
(inv-mass float :offset 4)
|
||||
(cm-joint vector :inline :offset 32)
|
||||
@ -41718,7 +41724,7 @@
|
||||
;; ctypower ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *city-power-switch-on-position* array)
|
||||
(define-extern *city-power-switch-on-position* (array vector))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ctyindb-part ;;
|
||||
@ -43439,7 +43445,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern death-precursor death-info)
|
||||
(define-extern start-precursor-effect (function object none))
|
||||
(define-extern start-precursor-effect (function manipy none))
|
||||
(define-extern birth-func-pecker-feather-color (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -44991,9 +44997,8 @@
|
||||
;; searchlight ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype searchlight (process-drawable)
|
||||
((sync sync-eased :inline :offset-assert 196)
|
||||
((sync sync-eased :inline :offset-assert 200)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #xf4
|
||||
@ -45002,7 +45007,6 @@
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -46604,31 +46608,29 @@
|
||||
;; com-elevator ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype com-elevator (elevator)
|
||||
((camera-startup UNKNOWN 2 :offset-assert 364)
|
||||
(use-camera-startup? UNKNOWN 2 :offset-assert 396)
|
||||
(sound-id uint32 :offset-assert 404)
|
||||
((camera-startup vector 2 :inline :offset-assert 368)
|
||||
(use-camera-startup? symbol 2 :offset-assert 400)
|
||||
(sound-id sound-id :offset-assert 408)
|
||||
)
|
||||
:method-count-assert 50
|
||||
:size-assert #x19c
|
||||
:flag-assert #x320120019c
|
||||
(:methods
|
||||
(com-elevator-method-49 () none 49)
|
||||
(com-elevator-method-49 (_type_ symbol) none 49)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype tomb-trans-elevator (com-elevator)
|
||||
()
|
||||
(
|
||||
(unknown-gijh1bn2i3hb1 int32 :offset-assert 412)
|
||||
)
|
||||
:method-count-assert 50
|
||||
:size-assert #x1a0
|
||||
:flag-assert #x32012001a0
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -46776,9 +46778,8 @@
|
||||
;; portrun ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype city-port-run-mine-info (structure)
|
||||
((handle uint64 :offset-assert 0)
|
||||
((handle handle :offset-assert 0)
|
||||
(pos1-x float :offset-assert 8)
|
||||
(pos1-y float :offset-assert 12)
|
||||
(pos1-z float :offset-assert 16)
|
||||
@ -46788,30 +46789,29 @@
|
||||
(pos2-z float :offset-assert 32)
|
||||
(speed float :offset-assert 36)
|
||||
(offset float :offset-assert 40)
|
||||
(center-x float :offset-assert 8)
|
||||
(center-y float :offset-assert 12)
|
||||
(center-z float :offset-assert 16)
|
||||
(radius float :offset-assert 24)
|
||||
(center-x float :offset 8)
|
||||
(center-y float :offset 12)
|
||||
(center-z float :offset 16)
|
||||
(radius float :offset 24)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x2c
|
||||
:flag-assert #x90000002c
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype ctyport-mine (process-drawable)
|
||||
((info city-port-run-mine-info :offset-assert 196)
|
||||
(base-height float :offset-assert 200)
|
||||
(center vector :inline :offset-assert 204)
|
||||
(time-skew uint64 :offset-assert 220)
|
||||
(period float :offset-assert 228)
|
||||
(trans-y float :offset-assert 232)
|
||||
(speed-y float :offset-assert 236)
|
||||
(acc-y float :offset-assert 240)
|
||||
(beep basic :offset-assert 244)
|
||||
(beep-time time-frame :offset-assert 252)
|
||||
(beep-color vector :inline :offset-assert 268)
|
||||
((root-override collide-shape-moving :offset 128 :score 100)
|
||||
(info city-port-run-mine-info :offset-assert 200)
|
||||
(base-height float :offset-assert 204)
|
||||
(center vector :inline :offset-assert 208)
|
||||
(time-skew uint64 :offset-assert 224)
|
||||
(period float :offset-assert 232)
|
||||
(trans-y float :offset-assert 236)
|
||||
(speed-y float :offset-assert 240)
|
||||
(acc-y float :offset-assert 244)
|
||||
(beep basic :offset-assert 248)
|
||||
(beep-time time-frame :offset-assert 256)
|
||||
(beep-color vector :inline :offset-assert 272)
|
||||
)
|
||||
:method-count-assert 24
|
||||
:size-assert #x120
|
||||
@ -46820,14 +46820,12 @@
|
||||
(idle () _type_ :state 20)
|
||||
(die () _type_ :state 21)
|
||||
(fall () _type_ :state 22)
|
||||
(ctyport-mine-method-23 () none 23)
|
||||
(ctyport-mine-method-23 (_type_) none 23)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype ctyport-spy (process-drawable)
|
||||
((trans-y float :offset-assert 196)
|
||||
((trans-y float :offset-assert 200)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #xcc
|
||||
@ -46836,13 +46834,11 @@
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype ctyport-cargo (process-focusable)
|
||||
((minimap connection-minimap :offset-assert 200)
|
||||
(trans-y float :offset-assert 204)
|
||||
(speed-y float :offset-assert 208)
|
||||
((minimap connection-minimap :offset-assert 204)
|
||||
(trans-y float :offset-assert 208)
|
||||
(speed-y float :offset-assert 212)
|
||||
)
|
||||
:method-count-assert 31
|
||||
:size-assert #xd8
|
||||
@ -46851,12 +46847,10 @@
|
||||
(idle () _type_ :state 27)
|
||||
(focus-camera () _type_ :state 28)
|
||||
(die () _type_ :state 29)
|
||||
(ctyport-cargo-method-30 () none 30)
|
||||
(ctyport-cargo-method-30 (_type_) none 30)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype city-port-run-cargo-info (structure)
|
||||
((pos vector :inline :offset-assert 0)
|
||||
)
|
||||
@ -46864,19 +46858,18 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern check-cargo-piece-ground function)
|
||||
;; (define-extern *city-port-run-mine-info* array)
|
||||
;; (define-extern ctyport-mine-init-by-other function)
|
||||
;; (define-extern ctyport-mine-spawn function)
|
||||
;; (define-extern ctyport-spy-init-by-other function)
|
||||
;; (define-extern ctyport-spy-spawn function)
|
||||
;; (define-extern *city-port-position* object)
|
||||
;; (define-extern *ctyport-cargo-exploder-params* joint-exploder-static-params)
|
||||
;; (define-extern ctyport-cargo-init-by-other function)
|
||||
;; (define-extern ctyport-cargo-spawn function)
|
||||
;; (define-extern *city-port-run-cargo-info* array)
|
||||
(define-extern check-cargo-piece-ground (function sparticle-system sparticle-cpuinfo matrix none))
|
||||
(define-extern *city-port-run-mine-info* (array city-port-run-mine-info))
|
||||
(define-extern ctyport-mine-init-by-other (function city-port-run-mine-info none :behavior ctyport-mine))
|
||||
(define-extern ctyport-mine-spawn (function task-manager city-port-run-mine-info process))
|
||||
(define-extern ctyport-spy-init-by-other (function vector none :behavior ctyport-spy))
|
||||
(define-extern ctyport-spy-spawn (function process vector vector float process))
|
||||
(define-extern *city-port-position* vector)
|
||||
(define-extern *ctyport-cargo-exploder-params* joint-exploder-static-params)
|
||||
(define-extern ctyport-cargo-init-by-other (function vector nav-mesh none :behavior ctyport-cargo))
|
||||
(define-extern ctyport-cargo-spawn (function task-manager vector nav-mesh process))
|
||||
(define-extern *city-port-run-cargo-info* (array city-port-run-cargo-info))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ctygenb-part ;;
|
||||
@ -47338,12 +47331,11 @@
|
||||
;; vinroom-obs ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype vin-turbine (process-drawable)
|
||||
((dont-draw-outside? basic :offset-assert 196)
|
||||
(lightning-timer uint64 :offset-assert 204)
|
||||
(outside-plane plane :inline :offset-assert 220)
|
||||
(lightning-plane plane :inline :offset-assert 236)
|
||||
((dont-draw-outside? symbol :offset-assert 200)
|
||||
(lightning-timer uint64 :offset-assert 208)
|
||||
(outside-plane plane :inline :offset-assert 224)
|
||||
(lightning-plane plane :inline :offset-assert 240)
|
||||
)
|
||||
:method-count-assert 22
|
||||
:size-assert #x100
|
||||
@ -47353,9 +47345,7 @@
|
||||
(dormant () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype vin-door (com-airlock)
|
||||
()
|
||||
:method-count-assert 28
|
||||
@ -47364,7 +47354,6 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -47421,7 +47410,6 @@
|
||||
;; ctypal-obs ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype water-anim-ctypal (water-anim)
|
||||
()
|
||||
:method-count-assert 29
|
||||
@ -47430,9 +47418,7 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype palace-door (com-airlock)
|
||||
()
|
||||
:method-count-assert 28
|
||||
@ -47441,11 +47427,9 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype ctypal-broke-wall (process-drawable)
|
||||
((ent basic :offset-assert 196)
|
||||
((ent basic :offset-assert 200)
|
||||
)
|
||||
:method-count-assert 22
|
||||
:size-assert #xcc
|
||||
@ -47455,9 +47439,7 @@
|
||||
(done () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype ctypal-baron-statue-broken (process-drawable)
|
||||
()
|
||||
:method-count-assert 21
|
||||
@ -47467,10 +47449,9 @@
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern ripple-for-water-anim-ctypal ripple-wave-set)
|
||||
;; (define-extern ripple-ctypal-smlground-pool ripple-wave-set)
|
||||
(define-extern ripple-for-water-anim-ctypal ripple-wave-set)
|
||||
(define-extern ripple-ctypal-smlground-pool ripple-wave-set)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; under-shoot-block ;;
|
||||
@ -49207,7 +49188,7 @@
|
||||
(section-count int8 :offset-assert 421)
|
||||
(rider-stance uint8 :offset-assert 422)
|
||||
(grab-rail-count int8 :offset-assert 423)
|
||||
(grab-rail-array uint32 :offset-assert 424)
|
||||
(grab-rail-array (inline-array vehicle-grab-rail-info) :offset-assert 424)
|
||||
(seat-array vehicle-seat-info 4 :inline :offset-assert 432)
|
||||
(rider-hand-offset vector 2 :inline :offset-assert 496)
|
||||
(section-array vehicle-section-info 4 :inline :offset-assert 528 :score -999)
|
||||
@ -49222,12 +49203,12 @@
|
||||
(engine-pitch-offset float :offset-assert 664)
|
||||
(engine-pitch-mod-amp float :offset-assert 668)
|
||||
(engine-sound-select int8 :offset-assert 672)
|
||||
(engine-sound uint128 :offset-assert 688)
|
||||
(thrust-sound uint128 :offset-assert 704)
|
||||
(scrape-sound uint128 :offset-assert 720)
|
||||
(glance-sound uint128 :offset-assert 736)
|
||||
(impact-sound uint128 :offset-assert 752)
|
||||
(extra-sound uint128 :offset-assert 768)
|
||||
(engine-sound sound-name :offset-assert 688)
|
||||
(thrust-sound sound-name :offset-assert 704)
|
||||
(scrape-sound sound-name :offset-assert 720)
|
||||
(glance-sound sound-name :offset-assert 736)
|
||||
(impact-sound sound-name :offset-assert 752)
|
||||
(extra-sound sound-name :offset-assert 768)
|
||||
(explosion-part int32 :offset-assert 784)
|
||||
(headlight-count int8 :offset-assert 788)
|
||||
(taillight-count int8 :offset-assert 789)
|
||||
@ -49261,7 +49242,7 @@
|
||||
(part-vel vector :offset-assert 1496)
|
||||
(color-option-count int8 :offset-assert 1500)
|
||||
(color-option-select int8 :offset-assert 1501)
|
||||
(color-option-array (array rgba) :offset-assert 1504)
|
||||
(color-option-array (inline-array vector) :offset-assert 1504) ;; making this a vector is a bit of a guess, but it's a bunch of floats
|
||||
(sample-dir vector :inline :offset-assert 1520)
|
||||
(sample-time time-frame :offset-assert 1536)
|
||||
(sample-index int32 :offset-assert 1544)
|
||||
@ -49519,7 +49500,7 @@
|
||||
(vehicle-method-132 (_type_) none 132)
|
||||
(check-player-get-on (_type_) none 133)
|
||||
(vehicle-method-134 "Stubbed" (_type_ process) none 134)
|
||||
(vehicle-method-135 () none 135)
|
||||
(vehicle-method-135 (_type_ traffic-object-spawn-params) none 135)
|
||||
(vehicle-method-136 (_type_ traffic-object-spawn-params) none 136)
|
||||
(vehicle-method-137 (_type_ traffic-object-spawn-params) none 137)
|
||||
(vehicle-method-138 (_type_) none 138)
|
||||
@ -49672,7 +49653,7 @@
|
||||
:size-assert #x18
|
||||
:flag-assert #xa00000018
|
||||
(:methods
|
||||
(city-race-ring-info-method-9 () none 9)
|
||||
(city-race-ring-info-method-9 (_type_ symbol) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@ -49687,13 +49668,13 @@
|
||||
|
||||
(deftype city-ambush-info (structure)
|
||||
((count int16 :offset-assert 0)
|
||||
(array uint32 :offset-assert 4)
|
||||
(array (inline-array city-ambush-spot) :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(city-ambush-info-method-9 () none 9)
|
||||
(city-ambush-info-method-9 (_type_ traffic-object-spawn-params) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@ -50654,7 +50635,7 @@
|
||||
;; (define-extern race-manager-event-handler function)
|
||||
(define-extern *race-manager* race-manager)
|
||||
;; (define-extern race-manager-init-by-other function)
|
||||
(define-extern race-start (function int symbol symbol object))
|
||||
(define-extern race-start (function int symbol symbol process))
|
||||
;; (define-extern race-kill function)
|
||||
(define-extern type-from-race-vehicle-type (function int type))
|
||||
;; (define-extern race-vehicle-entity-hack function)
|
||||
@ -51686,6 +51667,7 @@
|
||||
|
||||
(deftype security-wall (process-drawable)
|
||||
(
|
||||
(root-override collide-shape :offset 128 :score 100)
|
||||
(pass int32 :offset-assert 200)
|
||||
(incoming-attack-id uint32 :offset-assert 204)
|
||||
(next-message-time int64 :offset-assert 208)
|
||||
@ -51701,11 +51683,11 @@
|
||||
:size-assert #x11c
|
||||
:flag-assert #x1900a0011c
|
||||
(:methods
|
||||
(security-wall-method-20 () none 20)
|
||||
(security-wall-method-21 () none 21)
|
||||
(security-wall-method-22 () none 22)
|
||||
(security-wall-method-23 () none 23)
|
||||
(security-wall-method-24 () none 24)
|
||||
(idle-open () _type_ :state 20)
|
||||
(idle-close () _type_ :state 21)
|
||||
(security-wall-method-22 (_type_ path-control float) vector 22)
|
||||
(security-wall-method-23 (_type_) none 23)
|
||||
(security-wall-method-24 (_type_) none 24)
|
||||
)
|
||||
)
|
||||
|
||||
@ -51723,137 +51705,192 @@
|
||||
:size-assert #x130
|
||||
:flag-assert #x1e00b00130
|
||||
(:methods
|
||||
(fruit-stand-method-27 () none 27)
|
||||
(fruit-stand-method-28 () none 28)
|
||||
(fruit-stand-method-29 () none 29)
|
||||
(idle () _type_ :state 27)
|
||||
(fruit-stand-method-28 (_type_) none 28)
|
||||
(fruit-stand-method-29 (_type_) none 29)
|
||||
)
|
||||
)
|
||||
|
||||
#|
|
||||
(deftype cty-fruit-stand (UNKNOWN)
|
||||
(deftype cty-fruit-stand (fruit-stand)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
:method-count-assert 30
|
||||
:size-assert #x130 ;; 304
|
||||
:flag-assert #x1e00b00130
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype cty-guard-turret (UNKNOWN)
|
||||
(deftype cty-guard-turret (process-focusable)
|
||||
(
|
||||
(incoming-attack-id uint32 :offset-assert 204)
|
||||
(jm-turret joint-mod :offset-assert 208)
|
||||
(jm-gunsL joint-mod :offset-assert 212)
|
||||
(jm-gunsR joint-mod :offset-assert 216)
|
||||
(angle-turret degrees :offset-assert 220)
|
||||
(angle-guns degrees :offset-assert 224)
|
||||
(last-no-zero int64 :offset-assert 232)
|
||||
(next-time-shot time-frame :offset-assert 240)
|
||||
(num-shots uint32 :offset-assert 248)
|
||||
(focus focus :inline :offset-assert 256)
|
||||
(id int32 :offset-assert 268)
|
||||
(destroyed symbol :offset-assert 272)
|
||||
(button-down? symbol :offset-assert 276)
|
||||
(hit-points int32 :offset-assert 280)
|
||||
)
|
||||
:method-count-assert 36
|
||||
:size-assert #x11c ;; 284
|
||||
:flag-assert #x2400a0011c
|
||||
(:methods
|
||||
(idle () _type_ :state 27)
|
||||
(hostile () _type_ :state 28)
|
||||
(explode () _type_ :state 29)
|
||||
(wait-for-pushing () _type_ :state 30)
|
||||
(pushed () _type_ :state 31)
|
||||
(cty-guard-turret-method-32 (_type_) none 32)
|
||||
(cty-guard-turret-method-33 (_type_) none 33)
|
||||
(cty-guard-turret-method-34 (_type_) none 34)
|
||||
(cty-guard-turret-method-35 (_type_) quaternion 35))
|
||||
)
|
||||
|
||||
(deftype parking-spot (process-drawable)
|
||||
(
|
||||
(vehicle handle :offset-assert 200)
|
||||
(spawned symbol :offset-assert 208)
|
||||
(minimap connection-minimap :offset-assert 212)
|
||||
(test-sphere sphere :inline :offset-assert 224)
|
||||
)
|
||||
:method-count-assert 25
|
||||
:size-assert #xf0 ;; 240
|
||||
:flag-assert #x19007000f0
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(parking-spot-method-21 (_type_) none 21)
|
||||
(parking-spot-method-22 (_type_) none 22)
|
||||
(parking-spot-method-23 (_type_ uint) none 23)
|
||||
(parking-spot-method-24 (_type_) none 24))
|
||||
)
|
||||
|
||||
(deftype propa (process-focusable)
|
||||
(
|
||||
(sound-id uint32 :offset-assert 204)
|
||||
(sound-index uint32 :offset-assert 208)
|
||||
(handle handle :offset-assert 216)
|
||||
(y-rot float :offset-assert 224)
|
||||
(hit-points int32 :offset-assert 228)
|
||||
(incoming-attack-id uint32 :offset-assert 232)
|
||||
)
|
||||
:method-count-assert 32
|
||||
:size-assert #xec ;; 236
|
||||
:flag-assert #x20007000ec
|
||||
(:methods
|
||||
(idle () _type_ :state 27)
|
||||
(broken () _type_ :state 28)
|
||||
(propa-method-29 (_type_) none 29)
|
||||
(propa-method-30 (_type_) none 30)
|
||||
(propa-method-31 (_type_ vector) none 31))
|
||||
)
|
||||
|
||||
(deftype baron-statue (process-drawable)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
:method-count-assert 21
|
||||
:size-assert #xc8 ;; 200
|
||||
:flag-assert #x15005000c8
|
||||
(:methods
|
||||
(idle () _type_ :state 20))
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype parking-spot (UNKNOWN)
|
||||
(deftype burning-bush (process-focusable)
|
||||
(
|
||||
(task game-task-control :offset-assert 204)
|
||||
(part-off sparticle-launch-control :offset-assert 208)
|
||||
(part-alert sparticle-launch-control :offset-assert 212)
|
||||
(angle degrees :offset-assert 216)
|
||||
(time float :offset-assert 220)
|
||||
)
|
||||
:method-count-assert 33
|
||||
:size-assert #xe0 ;; 224
|
||||
:flag-assert #x21006000e0
|
||||
(:methods
|
||||
(idle () _type_ :state 27)
|
||||
(talking () _type_ :state 28)
|
||||
(menu () _type_ :state 29)
|
||||
(burning-bush-method-30 (_type_) none 30)
|
||||
(burning-bush-method-31 (_type_) none 31)
|
||||
(burning-bush-method-32 (_type_) object 32))
|
||||
)
|
||||
|
||||
(deftype barons-ship-lores (process-drawable)
|
||||
(
|
||||
(paths path-control 3 :offset-assert 200) ;; elt size: 5.333333333333333
|
||||
(sync sync-eased :inline :offset-assert 216)
|
||||
(current-path int32 :offset-assert 260)
|
||||
(forward-backward symbol :offset-assert 264)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #x10c ;; 268
|
||||
:flag-assert #x150090010c
|
||||
(:methods
|
||||
(idle () _type_ :state 20))
|
||||
)
|
||||
|
||||
(deftype lurker-pipe-lid (process-focusable)
|
||||
(
|
||||
(angle degrees :offset-assert 204)
|
||||
(rot float :offset-assert 208)
|
||||
)
|
||||
:method-count-assert 31
|
||||
:size-assert #xd4 ;; 212
|
||||
:flag-assert #x1f006000d4
|
||||
(:methods
|
||||
(idle () _type_ :state 27)
|
||||
(lurker-pipe-lid-method-28 (_type_) none 28)
|
||||
(lurker-pipe-lid-method-29 (_type_) none 29)
|
||||
(lurker-pipe-lid-method-30 (_type_) none 30))
|
||||
)
|
||||
|
||||
(deftype ctyn-lamp (process-focusable)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
:method-count-assert 31
|
||||
:size-assert #xcc ;; 204
|
||||
:flag-assert #x1f005000cc
|
||||
(:methods
|
||||
(idle () _type_ :state 27)
|
||||
(die () _type_ :state 28)
|
||||
(ctyn-lamp-method-29 (_type_) none 29)
|
||||
(ctyn-lamp-method-30 (_type_) none 30))
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype propa (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype baron-statue (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype burning-bush (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype barons-ship-lores (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype lurker-pipe-lid (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype ctyn-lamp (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *fruit-check-ground-counter* object)
|
||||
;; (define-extern fruit-check-ground-bounce function)
|
||||
;; (define-extern fruit-sparticle-next-on-mode-1 function)
|
||||
;; (define-extern fruit-stand-event-handler function)
|
||||
;; (define-extern *cty-guard-turret-exploder-params* joint-exploder-static-params)
|
||||
;; (define-extern cty-guard-turret-event-handler function)
|
||||
;; (define-extern *propa-sounds* array)
|
||||
;; (define-extern *propa-sounds-class-3* array)
|
||||
;; (define-extern *propa-sounds-class-2* array)
|
||||
;; (define-extern *propa-sounds-class-1* array)
|
||||
;; (define-extern *propa-sounds-metalheads* array)
|
||||
;; (define-extern *propa-sounds-baron-construction* array)
|
||||
;; (define-extern propa-pu->knocked-type function)
|
||||
;; (define-extern *ctyn-lamp-exploder-params* joint-exploder-static-params)
|
||||
(define-extern *fruit-check-ground-counter* int)
|
||||
(define-extern fruit-check-ground-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo matrix float))
|
||||
(define-extern fruit-sparticle-next-on-mode-1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float))
|
||||
(define-extern fruit-stand-event-handler (function process int symbol event-message-block object :behavior fruit-stand))
|
||||
(define-extern *cty-guard-turret-exploder-params* joint-exploder-static-params)
|
||||
(define-extern cty-guard-turret-event-handler (function process int symbol event-message-block object :behavior cty-guard-turret))
|
||||
(define-extern *propa-sounds* (array string))
|
||||
(define-extern *propa-sounds-class-3* (array string))
|
||||
(define-extern *propa-sounds-class-2* (array string))
|
||||
(define-extern *propa-sounds-class-1* (array string))
|
||||
(define-extern *propa-sounds-metalheads* (array string))
|
||||
(define-extern *propa-sounds-baron-construction* (array string))
|
||||
(define-extern propa-pu->knocked-type (function penetrate knocked-type))
|
||||
(define-extern *ctyn-lamp-exploder-params* joint-exploder-static-params)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ctywide-tasks ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype city-bb-racepoint-info (structure)
|
||||
((bike-pos vector :inline :offset-assert 0)
|
||||
(end-pos vector :inline :offset-assert 16)
|
||||
(bike-angle float :offset-assert 32)
|
||||
(map basic :offset-assert 36)
|
||||
(map symbol :offset-assert 36)
|
||||
(time float :offset-assert 40)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x2c
|
||||
:flag-assert #x90000002c
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern wait-for-speech-end function)
|
||||
;; (define-extern *city-bb-racepoint-info* array)
|
||||
(define-extern wait-for-speech-end (function sound-id none))
|
||||
(define-extern *city-bb-racepoint-info* (array city-bb-racepoint-info))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ctywide-scenes ;;
|
||||
@ -51870,50 +51907,40 @@
|
||||
;; ctyport-obs ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype boat-manager (process)
|
||||
((mesh basic :offset-assert 124)
|
||||
(paths UNKNOWN 4 :offset-assert 128)
|
||||
((mesh basic :offset-assert 128)
|
||||
(paths path-control 4 :offset-assert 132)
|
||||
)
|
||||
:method-count-assert 16
|
||||
:size-assert #x94
|
||||
:flag-assert #x1000200094
|
||||
(:methods
|
||||
(boat-manager-method-9 () none 9)
|
||||
(boat-manager-method-10 () none 10)
|
||||
(boat-manager-method-11 () none 11)
|
||||
(boat-manager-method-12 () none 12)
|
||||
(boat-manager-method-13 () none 13)
|
||||
(idle () _type_ :state 14)
|
||||
(boat-manager-method-15 () none 15)
|
||||
(boat-manager-method-15 (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype boat-base (vehicle)
|
||||
((angle float :offset-assert 876)
|
||||
(y-rot float :offset-assert 880)
|
||||
(path-num uint32 :offset-assert 884)
|
||||
(path-index float :offset-assert 888)
|
||||
((angle float :offset-assert 880)
|
||||
(y-rot float :offset-assert 884)
|
||||
(path-num uint32 :offset-assert 888)
|
||||
(path-index float :offset-assert 892)
|
||||
)
|
||||
:method-count-assert 149
|
||||
:size-assert #x380
|
||||
:flag-assert #x9503000380
|
||||
(:methods
|
||||
(boat-base-method-144 () none 144)
|
||||
(boat-base-method-145 () none 145)
|
||||
(boat-base-method-146 () none 146)
|
||||
(boat-base-method-147 () none 147)
|
||||
(boat-base-method-148 () none 148)
|
||||
(boat-base-method-144 (_type_ nav-control) none 144)
|
||||
(boat-base-method-145 (_type_ nav-control) none 145)
|
||||
(boat-base-method-146 (_type_ nav-control) none 146)
|
||||
(boat-base-method-147 (_type_ nav-control) none 147)
|
||||
(boat-base-method-148 (_type_ nav-control) none 148)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype barge (boat-base)
|
||||
((engine uint32 :offset-assert 892)
|
||||
(bow-wash uint32 :offset-assert 896)
|
||||
((engine uint32 :offset-assert 896)
|
||||
(bow-wash uint32 :offset-assert 900)
|
||||
)
|
||||
:method-count-assert 149
|
||||
:size-assert #x388
|
||||
@ -51921,10 +51948,9 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *barge-constants* object)
|
||||
;; (define-extern *boat-nav-callback-info* object)
|
||||
(define-extern *barge-constants* rigid-body-vehicle-constants)
|
||||
(define-extern *boat-nav-callback-info* nav-callback-info)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; target-pilot ;;
|
||||
@ -52439,21 +52465,16 @@
|
||||
;; ctyasha-obs ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype tanker-grunt (grunt)
|
||||
((expensive-gnd-collide? basic :offset-assert 688)
|
||||
((expensive-gnd-collide? symbol :offset 692)
|
||||
)
|
||||
:method-count-assert 186
|
||||
:size-assert #x2b8
|
||||
:flag-assert #xba024002b8
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype tanker-juicer (juicer)
|
||||
((expensive-gnd-collide? basic :offset-assert 844)
|
||||
((expensive-gnd-collide? symbol :offset-assert 848)
|
||||
)
|
||||
:method-count-assert 185
|
||||
:size-assert #x354
|
||||
@ -52461,25 +52482,21 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype tanker-container (process-drawable)
|
||||
()
|
||||
((root-override collide-shape :offset 128 :score 100))
|
||||
:method-count-assert 23
|
||||
:size-assert #xc8
|
||||
:flag-assert #x17005000c8
|
||||
(:methods
|
||||
(dormant () _type_ :state 20)
|
||||
(idle () _type_ :state 21)
|
||||
(tanker-container-method-22 () none 22)
|
||||
(tanker-container-method-22 (_type_) none 22)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype tanker-crash (process-drawable)
|
||||
()
|
||||
((root-override collide-shape :offset 128 :score 100))
|
||||
:method-count-assert 22
|
||||
:size-assert #xc8
|
||||
:flag-assert #x16005000c8
|
||||
@ -52488,14 +52505,13 @@
|
||||
(idle () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype tanker-deadly (process-drawable)
|
||||
((track-joint int32 :offset-assert 196)
|
||||
(attack-id uint32 :offset-assert 200)
|
||||
(die-time time-frame :offset-assert 204)
|
||||
(prev-pos vector :inline :offset-assert 220)
|
||||
((root-override collide-shape :offset 128 :score 100)
|
||||
(track-joint int32 :offset-assert 200)
|
||||
(attack-id uint32 :offset-assert 204)
|
||||
(die-time time-frame :offset-assert 208)
|
||||
(prev-pos vector :inline :offset-assert 224)
|
||||
)
|
||||
:method-count-assert 22
|
||||
:size-assert #xf0
|
||||
@ -52505,14 +52521,13 @@
|
||||
(die-fast () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern tanker-container-event-handler function)
|
||||
;; (define-extern tanker-deadly-init-by-other function)
|
||||
;; (define-extern tanker-spawn-deadly-barrels function)
|
||||
;; (define-extern tanker-spawn-deadly-cab function)
|
||||
;; (define-extern tanker-spawn-deadly-trailers function)
|
||||
;; (define-extern tanker-spawn-deadly-container function)
|
||||
(define-extern tanker-container-event-handler (function process int symbol event-message-block object :behavior tanker-container))
|
||||
(define-extern tanker-deadly-init-by-other (function vector int int none :behavior tanker-deadly))
|
||||
(define-extern tanker-spawn-deadly-barrels (function process-tree (pointer process)))
|
||||
(define-extern tanker-spawn-deadly-cab (function process-tree (pointer process)))
|
||||
(define-extern tanker-spawn-deadly-trailers (function process-tree (pointer process)))
|
||||
(define-extern tanker-spawn-deadly-container (function process-tree (pointer process)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ash4-course ;;
|
||||
|
@ -1022,5 +1022,78 @@
|
||||
[55, "(function object sig-under symbol)"],
|
||||
[56, "(function sig-under none)"],
|
||||
[57, "(function object sig-under symbol)"]
|
||||
],
|
||||
"ctywide-obs": [
|
||||
[33, "(function entity-perm-status :behavior task-manager)"],
|
||||
[38, "(function none)"],
|
||||
[101, "(function symbol)"]
|
||||
],
|
||||
"ctywide-tasks": [
|
||||
[0, "(function none :behavior task-manager)"],
|
||||
[1, "(function none :behavior task-manager)"],
|
||||
[2, "(function none :behavior task-manager)"],
|
||||
[3, "(function none :behavior task-manager)"],
|
||||
[4, "(function none :behavior task-manager)"],
|
||||
[5, "(function none :behavior task-manager)"],
|
||||
[6, "(function none :behavior task-manager)"],
|
||||
[7, "(function none :behavior task-manager)"],
|
||||
[8, "(function none :behavior task-manager)"],
|
||||
[9, "(function none :behavior task-manager)"],
|
||||
[10, "(function none :behavior task-manager)"],
|
||||
[11, "(function none :behavior task-manager)"],
|
||||
[12, "(function none :behavior task-manager)"],
|
||||
[13, "(function none :behavior task-manager)"],
|
||||
[14, "(function none :behavior task-manager)"],
|
||||
[15, "(function none :behavior task-manager)"],
|
||||
[16, "(function none :behavior task-manager)"],
|
||||
[17, "(function none :behavior task-manager)"],
|
||||
[18, "(function none :behavior task-manager)"],
|
||||
[19, "(function none :behavior task-manager)"],
|
||||
[20, "(function none :behavior task-manager)"],
|
||||
[21, "(function none :behavior task-manager)"],
|
||||
[
|
||||
23,
|
||||
"(function process int symbol event-message-block object :behavior task-manager)"
|
||||
],
|
||||
[24, "(function none :behavior task-manager)"],
|
||||
[25, "(function none :behavior task-manager)"],
|
||||
[26, "(function none :behavior task-manager)"],
|
||||
[27, "(function none :behavior task-manager)"],
|
||||
[28, "(function none :behavior task-manager)"],
|
||||
[29, "(function none :behavior task-manager)"],
|
||||
[30, "(function none :behavior task-manager)"],
|
||||
[31, "(function none :behavior task-manager)"],
|
||||
[32, "(function none :behavior task-manager)"]
|
||||
],
|
||||
"ctyport-obs": [
|
||||
[6, "(function collide-shape-prim none)"],
|
||||
[26, "(function object nav-control none)"],
|
||||
[27, "(function object nav-control none)"],
|
||||
[28, "(function object nav-control none)"],
|
||||
[29, "(function object nav-control none)"],
|
||||
[30, "(function object nav-control none)"]
|
||||
],
|
||||
"castle-tasks": [[0, "(function none :behavior task-manager)"]],
|
||||
"portrun": [
|
||||
[0, "(function none :behavior task-manager)"],
|
||||
[1, "(function none :behavior task-manager)"],
|
||||
[2, "(function none :behavior task-manager)"],
|
||||
[3, "(function object object symbol none :behavior task-manager)"],
|
||||
[4, "(function none :behavior task-manager)"],
|
||||
[5, "(function none :behavior task-manager)"],
|
||||
[6, "(function none :behavior task-manager)"],
|
||||
[33, "(function none :behavior task-manager)"]
|
||||
],
|
||||
"ctypower": [
|
||||
[
|
||||
0,
|
||||
"(function process-drawable int symbol event-message-block object :behavior task-manager)"
|
||||
],
|
||||
[1, "(function none :behavior task-manager)"],
|
||||
[2, "(function none :behavior task-manager)"],
|
||||
[3, "(function none :behavior task-manager)"],
|
||||
[4, "(function none :behavior task-manager)"],
|
||||
[5, "(function none :behavior task-manager)"],
|
||||
[6, "(function none :behavior task-manager)"]
|
||||
]
|
||||
}
|
||||
|
@ -582,7 +582,18 @@
|
||||
[431, 0],
|
||||
[477, 0],
|
||||
[508, 0]
|
||||
]
|
||||
],
|
||||
"(trans menu burning-bush)": [
|
||||
[294, 0],
|
||||
[378, 0],
|
||||
[406, 0],
|
||||
[434, 0],
|
||||
[462, 0],
|
||||
[490, 0],
|
||||
[518, 0],
|
||||
[350, 0]
|
||||
],
|
||||
"(trans idle burning-bush)": [[171, 0]]
|
||||
},
|
||||
|
||||
"mips2c_functions_by_name": [
|
||||
|
@ -43,7 +43,7 @@
|
||||
"DGO/ATE.DGO",
|
||||
// "DGO/LERROL.DGO",
|
||||
"DGO/LTRNYSAM.DGO",
|
||||
// "DGO/LOUTCSTB.DGO",
|
||||
"DGO/LOUTCSTB.DGO",
|
||||
// "DGO/LASHTHRN.DGO",
|
||||
"DGO/TOC.DGO",
|
||||
"DGO/CFB.DGO",
|
||||
@ -54,7 +54,7 @@
|
||||
"DGO/SEB.DGO",
|
||||
// "DGO/LPRSNCST.DGO",
|
||||
"DGO/SWB.DGO",
|
||||
// "DGO/LPOWER.DGO",
|
||||
"DGO/LPOWER.DGO",
|
||||
"DGO/FOB.DGO",
|
||||
"DGO/CIB.DGO",
|
||||
// "DGO/LSHUTTLE.DGO",
|
||||
@ -74,7 +74,7 @@
|
||||
// "DGO/DEMO.DGO",
|
||||
// "DGO/LRACEDF.DGO",
|
||||
"DGO/LERLCHAL.DGO",
|
||||
// "DGO/LHIPOUT.DGO",
|
||||
"DGO/LHIPOUT.DGO",
|
||||
"DGO/OUTROCST.DGO",
|
||||
"DGO/NES.DGO",
|
||||
"DGO/PAR.DGO",
|
||||
@ -86,7 +86,7 @@
|
||||
// "DGO/LJKDXASH.DGO",
|
||||
"DGO/CAS.DGO",
|
||||
"DGO/COA.DGO",
|
||||
// "DGO/LTESS.DGO",
|
||||
"DGO/LTESS.DGO",
|
||||
"DGO/CFA.DGO",
|
||||
"DGO/TOMBEXT.DGO",
|
||||
"DGO/LCGUARD.DGO",
|
||||
@ -124,14 +124,14 @@
|
||||
"DGO/LBBUSH.DGO",
|
||||
"DGO/LPACKAGE.DGO",
|
||||
"DGO/LINTCSTB.DGO",
|
||||
// "DGO/LPORTRUN.DGO",
|
||||
"DGO/LPORTRUN.DGO",
|
||||
// "DGO/LASHGRD.DGO",
|
||||
"DGO/CGB.DGO",
|
||||
"DGO/D3B.DGO",
|
||||
// "DGO/STB.DGO",
|
||||
// "DGO/GARAGE.DGO",
|
||||
// "DGO/PORTWALL.DGO",
|
||||
// "DGO/LHELLDOG.DGO",
|
||||
"DGO/PORTWALL.DGO",
|
||||
"DGO/LHELLDOG.DGO",
|
||||
"DGO/SWE.DGO",
|
||||
// "DGO/LRACECB.DGO",
|
||||
"DGO/GGA.DGO",
|
||||
@ -152,7 +152,7 @@
|
||||
"DGO/CTYKORA.DGO",
|
||||
"DGO/RUI.DGO",
|
||||
"DGO/LSACK.DGO",
|
||||
// "DGO/CTYASHA.DGO",
|
||||
"DGO/CTYASHA.DGO",
|
||||
// "DGO/LPRTRACE.DGO",
|
||||
"DGO/LWIDEA.DGO",
|
||||
"DGO/HIPHOG.DGO",
|
||||
@ -233,9 +233,15 @@
|
||||
"LCITYLOW.DGO",
|
||||
"LDJAKBRN.DGO",
|
||||
"LGUARD.DGO",
|
||||
"LHELLDOG.DGO",
|
||||
"LHIPOUT.DGO",
|
||||
"LINTCSTB.DGO",
|
||||
"LOUTCSTB.DGO",
|
||||
"LPORTRUN.DGO",
|
||||
"LPOWER.DGO",
|
||||
"LPROTECT.DGO",
|
||||
"LSACK.DGO",
|
||||
"LTESS.DGO",
|
||||
"LTRNYSAM.DGO",
|
||||
"LWHACK.DGO",
|
||||
"LWIDEA.DGO",
|
||||
@ -247,10 +253,13 @@
|
||||
"NES.DGO",
|
||||
"ONINTENT.DGO",
|
||||
"ORACLE.DGO",
|
||||
"OUTROCST.DGO",
|
||||
"PAC.DGO",
|
||||
"PAE.DGO",
|
||||
"PALBOSS.DGO",
|
||||
"PAR.DGO",
|
||||
"PAS.DGO",
|
||||
"PORTWALL.DGO",
|
||||
"PRI.DGO",
|
||||
"RUI.DGO",
|
||||
"SAG.DGO",
|
||||
|
@ -1230,5 +1230,72 @@
|
||||
"squid-states": [
|
||||
["L451", "vector"],
|
||||
["L450", "vector"]
|
||||
]
|
||||
],
|
||||
"ctywide-obs": [
|
||||
["L867", "uint64", true],
|
||||
["L861", "uint64", true],
|
||||
["L868", "uint64", true],
|
||||
["L862", "uint64", true],
|
||||
["L866", "uint64", true],
|
||||
["L860", "uint64", true],
|
||||
["L864", "uint64", true],
|
||||
["L865", "uint64", true],
|
||||
["L863", "uint64", true],
|
||||
["L869", "uint64", true],
|
||||
["L774", "uint64", true],
|
||||
["L771", "uint64", true],
|
||||
["L777", "uint64", true],
|
||||
["L773", "uint64", true],
|
||||
["L776", "uint64", true],
|
||||
["L775", "uint64", true],
|
||||
["L772", "uint64", true],
|
||||
["L751", "vector"],
|
||||
["L750", "vector"],
|
||||
["L756", "attack-info"],
|
||||
["L749", "vector"]
|
||||
],
|
||||
"ctywide-tasks": [
|
||||
["L197", "vector"],
|
||||
["L196", "vector"],
|
||||
["L198", "vector"]
|
||||
],
|
||||
"ctyport-obs": [["L96", "vector"]],
|
||||
"ctyasha-obs": [
|
||||
["L146", "vector"],
|
||||
["L153", "vector"],
|
||||
["L160", "vector"],
|
||||
["L167", "vector"],
|
||||
["L661", "vector"],
|
||||
["L714", "vector"],
|
||||
["L728", "vector"],
|
||||
["L742", "vector"],
|
||||
["L756", "vector"],
|
||||
["L763", "vector"],
|
||||
["L777", "vector"],
|
||||
["L879", "vector"],
|
||||
["L878", "vector"],
|
||||
["L877", "vector"],
|
||||
["L876", "vector"],
|
||||
["L875", "vector"],
|
||||
["L874", "vector"],
|
||||
["L873", "vector"],
|
||||
["L872", "vector"],
|
||||
["L871", "vector"],
|
||||
["L870", "vector"],
|
||||
["L869", "vector"],
|
||||
["L868", "vector"],
|
||||
["L867", "vector"],
|
||||
["L866", "vector"],
|
||||
["L865", "vector"],
|
||||
["L855", "attack-info"],
|
||||
["L852", "vector"],
|
||||
["L851", "vector"],
|
||||
["L850", "vector"],
|
||||
["L849", "vector"]
|
||||
],
|
||||
"portrun": [
|
||||
["L274", "attack-info"],
|
||||
["L220", "vector"]
|
||||
],
|
||||
"ctypower": [["L71", "vector"]]
|
||||
}
|
||||
|
@ -1816,5 +1816,30 @@
|
||||
[16, "collide-query"],
|
||||
[560, "bounding-box"]
|
||||
],
|
||||
"squid-grenade-move": [[48, "matrix"]]
|
||||
"squid-grenade-move": [[48, "matrix"]],
|
||||
"(method 12 city-level-info)": [[16, ["inline-array", "vector", 7]]],
|
||||
"(method 24 security-wall)": [[16, ["inline-array", "vector", 1]]],
|
||||
"(method 35 cty-guard-turret)": [
|
||||
[144, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"(method 24 parking-spot)": [[16, "collide-query-with-2vec"]],
|
||||
"(method 23 parking-spot)": [
|
||||
[16, ["inline-array", "collide-query", 1]],
|
||||
[560, ["inline-array", "vector", 1]]
|
||||
],
|
||||
"(event idle propa)": [[16, "vector"]],
|
||||
"(post idle propa)": [[16, "vector"]],
|
||||
"(trans talking burning-bush)": [
|
||||
[32, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(trans menu burning-bush)": [[128, "vector"]],
|
||||
"fruit-check-ground-bounce": [[16, "vector"]],
|
||||
"(method 120 boat-base)": [[80, "vector"]],
|
||||
"(method 29 boat-base)": [[16, "matrix"]],
|
||||
"(method 23 ctyport-mine)": [
|
||||
[32, "vector"],
|
||||
[48, "vector"]
|
||||
]
|
||||
}
|
||||
|
@ -8610,5 +8610,85 @@
|
||||
"(event idle squid-baron)": [[13, "v1", "rgbaf"]],
|
||||
"(event idle squid-driver)": [[[11, 15], "v0", "matrix"]],
|
||||
"(trans idle squid-baron)": [[4, "a0", "squid"]],
|
||||
"(method 23 squid-tentacle)": [["_stack_", 1584, "vector"]]
|
||||
"(method 23 squid-tentacle)": [["_stack_", 1584, "vector"]],
|
||||
"(event idle-close security-wall)": [
|
||||
[[25, 28], "v1", "attack-info"],
|
||||
[35, "s5", "process-drawable"],
|
||||
[136, "v1", "process-drawable"],
|
||||
[152, "v1", "process-drawable"],
|
||||
[159, "v1", "process-drawable"],
|
||||
[162, "a0", "process-drawable"],
|
||||
[176, "v1", "process-drawable"],
|
||||
[183, "v1", "process-drawable"],
|
||||
[186, "a0", "process-drawable"],
|
||||
[202, "a0", "process-drawable"],
|
||||
[199, "v1", "process-drawable"],
|
||||
[282, "gp", "process-focusable"],
|
||||
[210, "a2", "float"]
|
||||
],
|
||||
"cty-guard-turret-event-handler": [
|
||||
[[18, 21], "v1", "attack-info"],
|
||||
[[30, 35], "v1", "attack-info"]
|
||||
],
|
||||
"(post idle cty-guard-turret)": [
|
||||
[88, "gp", "process-focusable"],
|
||||
[129, "gp", "process-focusable"]
|
||||
],
|
||||
"(method 35 cty-guard-turret)": [
|
||||
[15, "s5", "process-focusable"],
|
||||
[47, "s5", "process-focusable"],
|
||||
[168, "s5", "process-focusable"]
|
||||
],
|
||||
"(code hostile cty-guard-turret)": [
|
||||
[88, "gp", "process-focusable"],
|
||||
[119, "gp", "process-focusable"]
|
||||
],
|
||||
"(method 7 cty-guard-turret)": [
|
||||
[24, "t9", "(function process-focusable int process-focusable)"]
|
||||
],
|
||||
"(method 21 parking-spot)": [[[13, 38], "s5", "vehicle"]],
|
||||
"(event idle propa)": [
|
||||
[[12, 15], "v1", "attack-info"],
|
||||
[[59, 62], "a0", "collide-shape-prim-group"]
|
||||
],
|
||||
"(post idle propa)": [
|
||||
[190, "s3", "process-focusable"],
|
||||
[92, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(method 31 propa)": [
|
||||
[26, "a0", "collide-shape"],
|
||||
[32, "s0", "process-focusable"],
|
||||
[10, "s3", "uint32"]
|
||||
],
|
||||
"(method 7 barons-ship-lores)": [
|
||||
[24, "t9", "(function process-drawable int process-drawable)"]
|
||||
],
|
||||
"(event idle ctyn-lamp)": [[4, "a0", "process-drawable"]],
|
||||
"fruit-check-ground-bounce": [[[5, 40], "v1", "fruit-stand"]],
|
||||
"fruit-stand-event-handler": [[[5, 8], "v1", "attack-info"]],
|
||||
"(code idle-close security-wall)": [[[60, 999], "v0", "symbol"]],
|
||||
"(anon-function 15 ctywide-tasks)": [[65, "v1", "vehicle"]],
|
||||
"(anon-function 16 ctywide-tasks)": [[26, "v1", "vehicle"]],
|
||||
"(anon-function 19 ctywide-tasks)": [[136, "v1", "vehicle"]],
|
||||
"(method 120 boat-base)": [[282, "v1", "boat-manager"]],
|
||||
"(post active tanker-deadly)": [[15, "v1", "process-drawable"]],
|
||||
"tanker-deadly-init-by-other": [[70, "v1", "process-drawable"]],
|
||||
"(post idle vin-turbine)": [[205, "a0", "lightning-tracker"]],
|
||||
"(method 49 com-elevator)": [[2, "v1", "collide-shape-prim-group"]],
|
||||
"(enter dormant com-elevator)": [
|
||||
[4, "v0", "state"],
|
||||
[6, "t9", "(function none)"]
|
||||
],
|
||||
"(method 10 com-elevator)": [[10, "t9", "(function elevator none)"]],
|
||||
"(method 10 tomb-trans-elevator)": [
|
||||
[10, "t9", "(function com-elevator none)"]
|
||||
],
|
||||
"(method 33 tomb-trans-elevator)": [
|
||||
[7, "t9", "(function com-elevator none)"]
|
||||
],
|
||||
"(anon-function 4 ctypower)": [[137, "gp", "process-drawable"]],
|
||||
"(anon-function 0 ctypower)": [
|
||||
[19, "a0", "vector"],
|
||||
[81, "v1", "basebutton"]
|
||||
]
|
||||
}
|
||||
|
@ -736,6 +736,10 @@ const std::unordered_map<
|
||||
{"nav-network-info",
|
||||
{{"adjacency", ArrayFieldDecompMeta(TypeSpec("nav-network-adjacency"), 16)}}},
|
||||
{"sig-path", {{"samples", ArrayFieldDecompMeta(TypeSpec("sig-path-sample"), 64)}}},
|
||||
{"rigid-body-vehicle-constants",
|
||||
{{"color-option-array", ArrayFieldDecompMeta(TypeSpec("vector"), 16)},
|
||||
{"grab-rail-array", ArrayFieldDecompMeta(TypeSpec("vehicle-grab-rail-info"), 48)}}},
|
||||
{"city-ambush-info", {{"array", ArrayFieldDecompMeta(TypeSpec("city-ambush-spot"), 32)}}},
|
||||
{"fort-robotank-segment",
|
||||
{{"event-tbl", ArrayFieldDecompMeta(TypeSpec("fort-robotank-segment-event"), 32)}}},
|
||||
{"race-info",
|
||||
|
@ -149,6 +149,7 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
|
||||
// 90
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l2-shrub", BucketCategory::TEX,
|
||||
BucketId::TEX_L2_SHRUB);
|
||||
init_bucket_renderer<Merc2>("merc-l2-shrub", BucketCategory::MERC, BucketId::MERC_L2_SHRUB);
|
||||
init_bucket_renderer<Shrub>("shrub-l2-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L2_SHRUB);
|
||||
// 100
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l3-shrub", BucketCategory::TEX,
|
||||
|
@ -115,6 +115,7 @@ enum class BucketId {
|
||||
SHRUB_L1_SHRUB = 83,
|
||||
TEX_L2_SHRUB = 91,
|
||||
SHRUB_L2_SHRUB = 92,
|
||||
MERC_L2_SHRUB = 97,
|
||||
TEX_L3_SHRUB = 100,
|
||||
SHRUB_L3_SHRUB = 101,
|
||||
TEX_L4_SHRUB = 109,
|
||||
|
@ -355,12 +355,12 @@
|
||||
)
|
||||
(update-transforms (-> obj root-override-2))
|
||||
(let ((v1-5 (-> obj rbody))
|
||||
(a1-3 (&-> (-> obj info-override) mass))
|
||||
(a1-3 (-> obj info-override info))
|
||||
(a2-2 (-> obj root-override-2 trans))
|
||||
(a3-0 (-> obj root-override-2 quat))
|
||||
(t0-0 (method-of-object obj rigid-body-object-method-29))
|
||||
)
|
||||
(rigid-body-method-25 (-> v1-5 state) (the-as rigid-body-info a1-3) a2-2 a3-0 t0-0)
|
||||
(rigid-body-method-25 (-> v1-5 state) a1-3 a2-2 a3-0 t0-0)
|
||||
)
|
||||
(set! (-> obj player-bonk-timeout) (the-as uint (-> pp clock frame-counter)))
|
||||
(set! (-> obj player-force quad) (-> *null-vector* quad))
|
||||
@ -403,16 +403,16 @@
|
||||
)
|
||||
|
||||
(define *rigid-body-platform-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 4)
|
||||
:inertial-tensor-y (meters 4)
|
||||
:inertial-tensor-z (meters 4)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 4) (meters 4))
|
||||
)
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
|
@ -100,7 +100,7 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref burning-bush :method-count 35)
|
||||
:ptype (type-ref burning-bush :method-count 33)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
@ -114,14 +114,14 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref barge :method-count 151)
|
||||
:ptype (type-ref barge :method-count 149)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref propa :method-count 35)
|
||||
:ptype (type-ref propa :method-count 32)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
@ -142,7 +142,7 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref parking-spot :method-count 27)
|
||||
:ptype (type-ref parking-spot :method-count 25)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
@ -156,14 +156,14 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref cty-guard-turret :method-count 39)
|
||||
:ptype (type-ref cty-guard-turret :method-count 36)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref cty-fruit-stand :method-count 31)
|
||||
:ptype (type-ref cty-fruit-stand :method-count 30)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
|
@ -1473,7 +1473,7 @@
|
||||
(data-float float 32 :offset-assert 672)
|
||||
(data-vector vector 32 :inline :offset-assert 800)
|
||||
(actor-group (pointer entity-actor) 4 :offset-assert 1312)
|
||||
(minimap uint32 8 :offset-assert 1328)
|
||||
(minimap connection-minimap 8 :offset-assert 1328)
|
||||
(hud handle 4 :offset-assert 1360)
|
||||
(hud-timer handle :offset 1360)
|
||||
(hud-counter handle :offset 1368)
|
||||
|
@ -1894,7 +1894,7 @@
|
||||
)
|
||||
(set! (-> obj arrow) (the-as handle #f))
|
||||
(countdown (v1-8 4)
|
||||
(set! (-> obj minimap v1-8) (the-as uint #f))
|
||||
(set! (-> obj minimap v1-8) #f)
|
||||
)
|
||||
(countdown (v1-11 4)
|
||||
(set! (-> obj actor-group v1-11) (the-as (pointer entity-actor) #f))
|
||||
|
@ -857,17 +857,17 @@
|
||||
)
|
||||
|
||||
(defmethod get-inv-mass rigid-body-object ((obj rigid-body-object))
|
||||
(-> obj info inv-mass)
|
||||
(-> obj info info inv-mass)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-35 rigid-body-object ((obj rigid-body-object))
|
||||
(let ((a0-1 (-> obj info name)))
|
||||
(when (nonzero? a0-1)
|
||||
(set! (-> obj info) (the-as rigid-body-object-constants (-> a0-1 value)))
|
||||
(set! (-> obj rbody state info) (the-as rigid-body-info (&-> (-> obj info) mass)))
|
||||
(set! (-> obj rbody state info) (-> obj info info))
|
||||
)
|
||||
)
|
||||
((method-of-type rigid-body-info rigid-body-info-method-9) (the-as rigid-body-info (&-> (-> obj info) mass)))
|
||||
(rigid-body-info-method-9 (-> obj info info))
|
||||
(set! (-> obj rbody state force-callback) (method-of-object obj rigid-body-object-method-29))
|
||||
0
|
||||
(none)
|
||||
@ -933,7 +933,7 @@
|
||||
(update-transforms (-> obj root-override-2))
|
||||
(rigid-body-method-25
|
||||
(-> obj rbody state)
|
||||
(the-as rigid-body-info (&-> (-> obj info) mass))
|
||||
(-> obj info info)
|
||||
(-> obj root-override-2 trans)
|
||||
(-> obj root-override-2 quat)
|
||||
(method-of-object obj rigid-body-object-method-29)
|
||||
@ -978,16 +978,16 @@
|
||||
)
|
||||
|
||||
(define *rigid-body-object-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 4)
|
||||
:inertial-tensor-y (meters 4)
|
||||
:inertial-tensor-z (meters 4)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 4) (meters 4))
|
||||
)
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
@ -1060,7 +1060,7 @@ This commonly includes things such as:
|
||||
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-physics))
|
||||
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override-2 trans) (-> obj root-override-2 quat))
|
||||
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info mass))
|
||||
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info info mass))
|
||||
(vector-reset! (-> obj rbody state ang-momentum))
|
||||
)
|
||||
0
|
||||
@ -1242,7 +1242,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(let ((f0-1 (vector-dot (-> s5-0 velocity) (-> s5-0 normal))))
|
||||
(when (< f0-1 0.0)
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info inv-mass))))
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info info inv-mass))))
|
||||
(vector+float*! s4-0 s4-0 (-> s5-0 normal) (* -3.1 f30-0 (-> s5-0 impulse)))
|
||||
(set! (-> s4-0 y) (fmax (* 49152.0 f30-0) (-> s4-0 y)))
|
||||
(rigid-body-object-method-42 obj)
|
||||
|
@ -373,8 +373,16 @@
|
||||
(text-x24e #x024e)
|
||||
(text-x24f #x024f)
|
||||
(text-x277 #x0277)
|
||||
(text-x278 #x0278)
|
||||
(text-x27a #x027a)
|
||||
(text-x27b #x027b)
|
||||
(text-x27c #x027c)
|
||||
(text-x27d #x027d)
|
||||
(text-x27e #x027e)
|
||||
(text-x27f #x027f)
|
||||
(scene-subtitles-enabled #x30d)
|
||||
(scene-subtitles-disabled #x30e)
|
||||
(text-x30f #x30f)
|
||||
(progress-unknown-continue #x310)
|
||||
)
|
||||
;; ---game-text-id
|
||||
|
@ -2702,22 +2702,17 @@
|
||||
;; ;; LHIPOUT
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (cgo "LHIPOUT.DGO" "lhipout.gd")
|
||||
(cgo "LHIPOUT.DGO" "lhipout.gd")
|
||||
|
||||
;; (copy-textures 3440 3199 3200 3486 3242 3544)
|
||||
(copy-textures 3440 3199 3200 3486 3242 3544)
|
||||
|
||||
;; (copy-gos
|
||||
;; "pecker-highres-ag"
|
||||
;; "crocadog-highres-ag"
|
||||
;; "sig-highres-ag"
|
||||
;; "metalkor-chopped-ag"
|
||||
;; "gold-key-ag"
|
||||
;; "kid-medallion-ag"
|
||||
;; "hip-bottle-c-ag"
|
||||
;; "hip-mug-ag"
|
||||
;; "particleman-ag"
|
||||
;; "lhipout"
|
||||
;; )
|
||||
(copy-gos
|
||||
"kid-medallion-ag"
|
||||
"hip-mug-ag"
|
||||
"lhipout"
|
||||
)
|
||||
|
||||
(copy-strs "OUPORT")
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
;; LINTCSTB
|
||||
@ -2831,22 +2826,17 @@
|
||||
;; ;; LOUTCSTB
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (cgo "LOUTCSTB.DGO" "loutcstb.gd")
|
||||
(cgo "LOUTCSTB.DGO" "loutcstb.gd")
|
||||
|
||||
;; (copy-textures 3186 3185 3187 3245)
|
||||
(copy-textures 3186 3185 3187 3245)
|
||||
|
||||
;; (copy-gos
|
||||
;; "youngsamos-highres-ag"
|
||||
;; "brutter-highres-ag"
|
||||
;; "kid-highres-ag"
|
||||
;; "rift-ring-ag"
|
||||
;; "brutter-balloon-norift-ag"
|
||||
;; "metalkor-chopped-ag"
|
||||
;; "rift-rider-ag"
|
||||
;; "precursor-stone-ag"
|
||||
;; "particleman-ag"
|
||||
;; "loutcstb"
|
||||
;; )
|
||||
(copy-gos
|
||||
"brutter-balloon-norift-ag"
|
||||
"metalkor-chopped-ag"
|
||||
"loutcstb"
|
||||
)
|
||||
|
||||
(copy-strs "OUNEST")
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
;; LPACKAGE
|
||||
@ -2871,42 +2861,40 @@
|
||||
;; ;; LPORTRUN
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (cgo "LPORTRUN.DGO" "lportrun.gd")
|
||||
(cgo "LPORTRUN.DGO" "lportrun.gd")
|
||||
|
||||
;; (goal-src-sequence
|
||||
;; ""
|
||||
;; :deps ("$OUT/obj/los-control.o")
|
||||
;; "levels/city/port/mines/portrun.gc"
|
||||
;; )
|
||||
(goal-src-sequence
|
||||
""
|
||||
:deps ("$OUT/obj/los-control.o")
|
||||
"levels/city/port/mines/portrun.gc"
|
||||
)
|
||||
|
||||
;; (copy-textures 2817 2373)
|
||||
(copy-textures 2817 2373)
|
||||
|
||||
;; (copy-gos
|
||||
;; "ctyport-cargo-ag"
|
||||
;; "ctyport-spy-ag"
|
||||
;; "mine-b-ag"
|
||||
;; "ctyport-mine-ag"
|
||||
;; "lportrun"
|
||||
;; )
|
||||
(copy-gos
|
||||
"ctyport-cargo-ag"
|
||||
"ctyport-spy-ag"
|
||||
"ctyport-mine-ag"
|
||||
"lportrun"
|
||||
)
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;; LPOWER
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (cgo "LPOWER.DGO" "lpower.gd")
|
||||
(cgo "LPOWER.DGO" "lpower.gd")
|
||||
|
||||
;; (goal-src-sequence
|
||||
;; ""
|
||||
;; :deps ("$OUT/obj/los-control.o")
|
||||
;; "levels/power_station/power_switches/ctypower.gc"
|
||||
;; )
|
||||
(goal-src-sequence
|
||||
""
|
||||
:deps ("$OUT/obj/los-control.o")
|
||||
"levels/power_station/power_switches/ctypower.gc"
|
||||
)
|
||||
|
||||
;; (copy-textures 3348)
|
||||
(copy-textures 3348)
|
||||
|
||||
;; (copy-gos
|
||||
;; "cty-guard-turret-button-ag"
|
||||
;; "lpower"
|
||||
;; )
|
||||
(copy-gos
|
||||
"lpower"
|
||||
)
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;; LPROTECT
|
||||
@ -3157,19 +3145,16 @@
|
||||
;; ;; LTESS
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (cgo "LTESS.DGO" "ltess.gd")
|
||||
(cgo "LTESS.DGO" "ltess.gd")
|
||||
|
||||
;; (copy-textures 1862 1756 2881 3241)
|
||||
(copy-textures 1862 1756 2881 3241)
|
||||
|
||||
;; (copy-gos
|
||||
;; "tess-lhiphog+0-ag"
|
||||
;; "krew-highres-ag"
|
||||
;; "sig-highres-ag"
|
||||
;; "tess-highres-ag"
|
||||
;; "hip-bottle-c-ag"
|
||||
;; "hip-bottle-b-ag"
|
||||
;; "ltess"
|
||||
;; )
|
||||
(copy-gos
|
||||
"tess-lhiphog+0-ag"
|
||||
"hip-bottle-c-ag"
|
||||
"hip-bottle-b-ag"
|
||||
"ltess"
|
||||
)
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;; LTHRNOUT
|
||||
@ -3651,8 +3636,6 @@
|
||||
"7credits-tx"
|
||||
"keira-highres-ag"
|
||||
"samos-highres-ag"
|
||||
;; "tess-highres-ag"
|
||||
;; "onin-highres-ag"
|
||||
"rift-break-ring-ag"
|
||||
"precursor-ag"
|
||||
"outrocst"
|
||||
@ -3817,14 +3800,13 @@
|
||||
;; ;; PORTWALL
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (cgo "PORTWALL.DGO" "portwall.gd")
|
||||
(cgo "PORTWALL.DGO" "portwall.gd")
|
||||
|
||||
;; (copy-textures 3181 3323)
|
||||
(copy-textures 3181 3323)
|
||||
|
||||
;; (copy-gos
|
||||
;; "mecha-daxter-ag"
|
||||
;; "portwall"
|
||||
;; )
|
||||
(copy-gos
|
||||
"portwall"
|
||||
)
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;; RUI
|
||||
|
@ -7,3 +7,35 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
219
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(let ((gp-0 (new 'stack-no-clear 'task-arrow-params)))
|
||||
(set! (-> gp-0 pos quad) (-> self info end-sphere quad))
|
||||
(quaternion-identity! (-> gp-0 quat))
|
||||
(set! (-> gp-0 flags) (task-arrow-flags))
|
||||
(set! (-> gp-0 map-icon) (the-as uint 15))
|
||||
(set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 (the-as task-arrow self))))
|
||||
)
|
||||
(until #f
|
||||
(when (< (vector-vector-distance (target-pos 0) (-> self info end-sphere)) (-> self info end-sphere r))
|
||||
(send-event (handle->process (-> self arrow)) 'leave)
|
||||
(let ((gp-2 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 0.007))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go-virtual complete)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -7,3 +7,966 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype boat-manager (process)
|
||||
((mesh basic :offset-assert 128)
|
||||
(paths path-control 4 :offset-assert 132)
|
||||
)
|
||||
:heap-base #x20
|
||||
:method-count-assert 16
|
||||
:size-assert #x94
|
||||
:flag-assert #x1000200094
|
||||
(:methods
|
||||
(idle () _type_ :state 14)
|
||||
(boat-manager-method-15 (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *barge-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 100.0
|
||||
:inv-mass 0.01
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.1
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :z 8192.0 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 16) (meters 6) (meters 20))
|
||||
)
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
:name '*barge-constants*
|
||||
:flags #x8
|
||||
:object-type #x11
|
||||
:guard-type #x7
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 10.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 1.0
|
||||
:turbo-boost-factor 1.0
|
||||
:max-xz-speed (meters 30)
|
||||
:ground-probe-distance (meters 3)
|
||||
:cos-ground-effect-angle 0.42261824
|
||||
:spring-lift-factor 1.0
|
||||
:air-drag-factor 1.0
|
||||
:steering-fin-angle 1820.4445
|
||||
:steering-thruster-factor 1.0
|
||||
:steering-thruster-max-gain 1.0
|
||||
:steering-thruster-half-gain-speed (meters 30)
|
||||
:tire-steering-angle 1274.3112
|
||||
:tire-friction-factor 1.0
|
||||
: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 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.7
|
||||
:pitch-control-factor 1.0
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.5
|
||||
:buoyancy-factor 0.5
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:turning-accel (meters 20)
|
||||
:toughness-factor 1.0
|
||||
:damage-factor 0.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 182.04445
|
||||
:camera-air-max-angle-offset 5461.3335
|
||||
:camera-max-lookaround-speed 40960.0
|
||||
:rider-stance #x1
|
||||
:grab-rail-array #f
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:explosion #f
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
: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-1")
|
||||
:explosion-part #xa1
|
||||
:thruster-flame-width (meters 0.25)
|
||||
:thruster-flame-length (meters 4)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :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 :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:inv-lift-thruster-count 1.0
|
||||
:engine-thrust-local-pos (new 'static 'vector :z 22118.4 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :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))
|
||||
)
|
||||
)
|
||||
|
||||
(deftype boat-base (vehicle)
|
||||
((angle float :offset-assert 880)
|
||||
(y-rot float :offset-assert 884)
|
||||
(path-num uint32 :offset-assert 888)
|
||||
(path-index float :offset-assert 892)
|
||||
)
|
||||
:heap-base #x300
|
||||
:method-count-assert 149
|
||||
:size-assert #x380
|
||||
:flag-assert #x9503000380
|
||||
(:methods
|
||||
(boat-base-method-144 (_type_ nav-control) none 144)
|
||||
(boat-base-method-145 (_type_ nav-control) none 145)
|
||||
(boat-base-method-146 (_type_ nav-control) none 146)
|
||||
(boat-base-method-147 (_type_ nav-control) none 147)
|
||||
(boat-base-method-148 (_type_ nav-control) none 148)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod boat-base-method-144 boat-base ((obj boat-base) (arg0 nav-control))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((gp-0 (-> arg0 state)))
|
||||
(set! (-> gp-0 rotation-rate) (-> gp-0 nav max-rotation-rate))
|
||||
(if (< 0.0 (-> gp-0 speed))
|
||||
(set! (-> gp-0 rotation-rate)
|
||||
(fmin
|
||||
(-> gp-0 rotation-rate)
|
||||
(* (/ (-> gp-0 nav turning-acceleration) (-> gp-0 speed)) (-> gp-0 mesh work rad-to-deg))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> gp-0 nav flags) (nav-control-flag update-heading-from-facing))
|
||||
(vector-z-quaternion! (-> gp-0 heading) (-> gp-0 nav shape quat))
|
||||
(set! (-> gp-0 heading y) 0.0)
|
||||
(let ((v1-12 (-> gp-0 heading)))
|
||||
(let ((f0-5 1.0))
|
||||
(.lvf vf1 (&-> v1-12 quad))
|
||||
(.mul.vf vf2 vf1 vf1 :mask #b111)
|
||||
(let ((a0-3 f0-5))
|
||||
(.mov vf3 a0-3)
|
||||
)
|
||||
)
|
||||
(.mul.x.vf acc vf0 vf2 :mask #b1000)
|
||||
(.add.mul.y.vf acc vf0 vf2 acc :mask #b1000)
|
||||
(.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000)
|
||||
(.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11)
|
||||
(.wait.vf)
|
||||
(.mul.vf vf1 vf1 Q :mask #b111)
|
||||
(.nop.vf)
|
||||
(.nop.vf)
|
||||
(.nop.vf)
|
||||
(.svf (&-> v1-12 quad) vf1)
|
||||
)
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> gp-0 nav shape trans quad))
|
||||
(if (or (not (-> gp-0 current-poly))
|
||||
(!= (-> gp-0 current-pos x) (-> a1-2 x))
|
||||
(!= (-> gp-0 current-pos z) (-> a1-2 z))
|
||||
)
|
||||
(do-navigation-to-destination gp-0 a1-2)
|
||||
)
|
||||
)
|
||||
(logclear!
|
||||
(-> gp-0 flags)
|
||||
(nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap)
|
||||
)
|
||||
)
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod boat-base-method-145 boat-base ((obj boat-base) (arg0 nav-control))
|
||||
(navigate-using-route-portals (-> arg0 state))
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod boat-base-method-146 boat-base ((obj boat-base) (arg0 nav-control))
|
||||
(navigate-using-best-dir-recompute-avoid-spheres-2 (-> arg0 state))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod boat-base-method-147 boat-base ((obj boat-base) (arg0 nav-control))
|
||||
(update-travel-dir-from-spheres (-> arg0 state))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod boat-base-method-148 boat-base ((obj boat-base) (arg0 nav-control))
|
||||
(compute-speed-simple (-> arg0 state))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *boat-nav-callback-info*
|
||||
(new 'static 'nav-callback-info
|
||||
:callback-count 5
|
||||
:callback-array (new 'static 'array (function object nav-control none) 10
|
||||
(lambda ((arg0 object) (arg1 nav-control))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((gp-0 (-> arg1 state)))
|
||||
(set! (-> gp-0 rotation-rate) (-> gp-0 nav max-rotation-rate))
|
||||
(if (< 0.0 (-> gp-0 speed))
|
||||
(set! (-> gp-0 rotation-rate)
|
||||
(fmin
|
||||
(-> gp-0 rotation-rate)
|
||||
(* (/ (-> gp-0 nav turning-acceleration) (-> gp-0 speed)) (-> gp-0 mesh work rad-to-deg))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> gp-0 nav flags) (nav-control-flag update-heading-from-facing))
|
||||
(vector-z-quaternion! (-> gp-0 heading) (-> gp-0 nav shape quat))
|
||||
(set! (-> gp-0 heading y) 0.0)
|
||||
(let ((v1-14 (-> gp-0 heading)))
|
||||
(let ((f0-5 1.0))
|
||||
(.lvf vf1 (&-> v1-14 quad))
|
||||
(.mul.vf vf2 vf1 vf1 :mask #b111)
|
||||
(let ((a0-3 f0-5))
|
||||
(.mov vf3 a0-3)
|
||||
)
|
||||
)
|
||||
(.mul.x.vf acc vf0 vf2 :mask #b1000)
|
||||
(.add.mul.y.vf acc vf0 vf2 acc :mask #b1000)
|
||||
(.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000)
|
||||
(.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11)
|
||||
(.wait.vf)
|
||||
(.mul.vf vf1 vf1 Q :mask #b111)
|
||||
(.nop.vf)
|
||||
(.nop.vf)
|
||||
(.nop.vf)
|
||||
(.svf (&-> v1-14 quad) vf1)
|
||||
)
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> gp-0 nav shape trans quad))
|
||||
(if (or (not (-> gp-0 current-poly))
|
||||
(!= (-> gp-0 current-pos x) (-> a1-2 x))
|
||||
(!= (-> gp-0 current-pos z) (-> a1-2 z))
|
||||
)
|
||||
(do-navigation-to-destination gp-0 a1-2)
|
||||
)
|
||||
)
|
||||
(logclear!
|
||||
(-> gp-0 flags)
|
||||
(nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap)
|
||||
)
|
||||
)
|
||||
0
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 object) (arg1 nav-control)) (navigate-using-route-portals (-> arg1 state)) 0 0 0 (none))
|
||||
(lambda ((arg0 object) (arg1 nav-control))
|
||||
(let* ((v1-0 arg1)
|
||||
(a2-2 (-> v1-0 state mesh sphere-hash sphere-array))
|
||||
(a3-0 (-> v1-0 sphere-id-array))
|
||||
(t0-1 (-> v1-0 state mesh bounds))
|
||||
(t1-0 (-> v1-0 root-nav-sphere))
|
||||
(t2-0 (-> v1-0 sphere-count))
|
||||
)
|
||||
(dotimes (t3-0 t2-0)
|
||||
(let ((t5-0 (-> a2-2 (-> a3-0 t3-0)))
|
||||
(t4-4 (-> v1-0 sphere-array t3-0))
|
||||
)
|
||||
(vector-! (the-as vector t4-4) (the-as vector t5-0) t0-1)
|
||||
(set! (-> t4-4 r) (+ (-> t5-0 r) (-> t1-0 w)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(navigate-using-best-dir-recompute-avoid-spheres-2 (-> arg1 state))
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
(lambda ((arg0 object) (arg1 nav-control))
|
||||
(let* ((v1-0 arg1)
|
||||
(a2-2 (-> v1-0 state mesh sphere-hash sphere-array))
|
||||
(a3-0 (-> v1-0 sphere-id-array))
|
||||
(t0-1 (-> v1-0 state mesh bounds))
|
||||
(t1-0 (-> v1-0 root-nav-sphere))
|
||||
(t2-0 (-> v1-0 sphere-count))
|
||||
)
|
||||
(dotimes (t3-0 t2-0)
|
||||
(let ((t5-0 (-> a2-2 (-> a3-0 t3-0)))
|
||||
(t4-4 (-> v1-0 sphere-array t3-0))
|
||||
)
|
||||
(vector-! (the-as vector t4-4) (the-as vector t5-0) t0-1)
|
||||
(set! (-> t4-4 r) (+ (-> t5-0 r) (-> t1-0 w)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(update-travel-dir-from-spheres (-> arg1 state))
|
||||
0
|
||||
0
|
||||
(none)
|
||||
)
|
||||
(lambda ((arg0 object) (arg1 nav-control)) (compute-speed-simple (-> arg1 state)) 0 0 (none))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod apply-damage boat-base ((obj boat-base) (arg0 float) (arg1 rigid-body-impact))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-47 boat-base ((obj boat-base) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate))
|
||||
((method-of-type vehicle rigid-body-object-method-47) obj arg0 arg1 arg2 arg3)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-120 boat-base ((obj boat-base))
|
||||
(with-pp
|
||||
(let ((t9-0 (method-of-type vehicle vehicle-method-120)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
|
||||
(let ((a1-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override-2 quat)))
|
||||
(s5-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(quaternion-from-two-vectors-max-angle! s5-0 a1-1 *up-vector* (* 728.1778 (-> pp clock seconds-per-frame)))
|
||||
(quaternion*! (-> obj root-override-2 quat) s5-0 (-> obj root-override-2 quat))
|
||||
)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override-2 quat)))
|
||||
)
|
||||
(new 'stack-no-clear 'vector)
|
||||
(let ((a1-4 (-> obj nav state)))
|
||||
(set! (-> s4-0 quad) (-> a1-4 velocity quad))
|
||||
)
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info))
|
||||
)
|
||||
(let ((s0-0 (-> obj nav state current-poly)))
|
||||
(vector-xz-normalize-copy! s1-0 s4-0 163840.0)
|
||||
(set! (-> s2-0 quad) (-> s1-0 quad))
|
||||
(clamp-vector-to-mesh-no-gaps (-> obj nav) (-> obj root-override-2 trans) s0-0 s2-0 s3-0)
|
||||
)
|
||||
(when (-> s3-0 found-boundary)
|
||||
(let ((f30-0 (vector-length s4-0)))
|
||||
(vector-flatten! s4-0 s4-0 (-> s3-0 boundary-normal))
|
||||
(vector-rotate90-around-y! s4-0 (-> s3-0 boundary-normal))
|
||||
(vector-normalize! s4-0 f30-0)
|
||||
)
|
||||
(when (= obj *debug-actor*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf1) (-> obj root-override-2 trans) s4-0 (meters 10) *color-blue*)
|
||||
(format *stdcon* "avoid border~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj y-rot) (- (-> obj y-rot) (* 2.0 (-> pp clock seconds-per-frame) (-> obj y-rot))))
|
||||
(+! (-> obj y-rot)
|
||||
(* 10.0
|
||||
(-> pp clock seconds-per-frame)
|
||||
(deg- (deg- (vector-y-angle s4-0) (quaternion-y-angle (-> obj root-override-2 quat))) (-> obj y-rot))
|
||||
)
|
||||
)
|
||||
(set! (-> obj y-rot) (fmax -10922.667 (fmin 10922.667 (-> obj y-rot))))
|
||||
(set! (-> obj y-rot) (deg- (vector-y-angle s4-0) (quaternion-y-angle (-> obj root-override-2 quat))))
|
||||
(quaternion-rotate-local-y!
|
||||
(-> obj root-override-2 quat)
|
||||
(-> obj root-override-2 quat)
|
||||
(* (-> obj y-rot) (-> pp clock seconds-per-frame))
|
||||
)
|
||||
(vector-v*float+! (-> obj root-override-2 trans) (-> obj root-override-2 trans) s5-1 8954.266)
|
||||
)
|
||||
(seek! (-> obj root-override-2 trans y) 4096.0 (* 4096.0 (-> pp clock seconds-per-frame)))
|
||||
(when (= obj *debug-actor*)
|
||||
(format *stdcon* "no physics~%")
|
||||
(format *stdcon* "~M~%" (-> obj root-override-2 trans y))
|
||||
)
|
||||
)
|
||||
(if (= obj *debug-actor*)
|
||||
(format *stdcon* "speed ~M~%" (vector-length (-> obj root-override-2 transv)))
|
||||
)
|
||||
(let ((s4-2 (ppointer->process (-> obj parent)))
|
||||
(s5-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when s4-2
|
||||
(let ((a1-24 (-> obj nav state)))
|
||||
(set! (-> s5-2 quad) (-> a1-24 target-post quad))
|
||||
)
|
||||
(when (< (vector-vector-xz-distance (-> obj root-override-2 trans) s5-2) 163840.0)
|
||||
(set! (-> obj path-index) (+ 0.01 (-> obj path-index)))
|
||||
(let ((f0-22 (-> obj path-index)))
|
||||
(set! (-> obj path-index) (- f0-22 (* (the float (the int (/ f0-22 1.0))) 1.0)))
|
||||
)
|
||||
)
|
||||
(get-point-at-percent-along-path!
|
||||
(-> (the-as boat-manager (+ (* (-> obj path-num) 4) (the-as uint s4-2))) paths 0)
|
||||
s5-2
|
||||
(-> obj path-index)
|
||||
'interp
|
||||
)
|
||||
(let ((v1-76 (-> obj nav state)))
|
||||
(logclear! (-> v1-76 flags) (nav-state-flag directional-mode))
|
||||
(logior! (-> v1-76 flags) (nav-state-flag target-poly-dirty))
|
||||
(set! (-> v1-76 target-post quad) (-> s5-2 quad))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(vehicle-method-85 obj)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-29 boat-base ((obj boat-base) (arg0 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s3-0 (-> obj rbody))
|
||||
(s2-0 (-> obj info-override))
|
||||
(s4-0 (new 'stack-no-clear 'matrix))
|
||||
)
|
||||
(let ((a1-1 (-> obj nav state)))
|
||||
(set! (-> s4-0 vector 1 quad) (-> a1-1 velocity quad))
|
||||
)
|
||||
(vector-! (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1) (-> s3-0 state lin-velocity))
|
||||
(vector-float*! (the-as vector (-> s4-0 vector)) (the-as vector (-> s4-0 vector)) (* 4.0 (-> s2-0 info mass)))
|
||||
(let ((s1-0 (-> s4-0 vector 2)))
|
||||
(let ((s0-0 (-> obj root-override-2 trans)))
|
||||
(let ((v1-7 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override-2 quat))))
|
||||
(let ((a0-6 40960.0))
|
||||
(.mov vf7 a0-6)
|
||||
)
|
||||
(.lvf vf5 (&-> v1-7 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> s0-0 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> s1-0 quad) vf6)
|
||||
)
|
||||
(let ((s0-1 (-> s4-0 vector 2)))
|
||||
(let ((s1-1 (-> s4-0 vector 2)))
|
||||
(let ((v1-9 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override-2 quat))))
|
||||
(let ((a0-9 -32768.0))
|
||||
(.mov vf7 a0-9)
|
||||
)
|
||||
(.lvf vf5 (&-> v1-9 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> s1-1 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> s0-1 quad) vf6)
|
||||
)
|
||||
(let ((v1-10 s3-0)
|
||||
(a1-9 (-> s4-0 vector 2))
|
||||
(a2-0 (-> s4-0 vector))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-10 state) a1-9 (the-as vector a2-0))
|
||||
)
|
||||
(.svf (&-> (-> s4-0 vector) 0 quad) vf0)
|
||||
(set! (-> s4-0 vector 0 y) (* -4.0 (-> s2-0 gravity) (-> s2-0 info mass)))
|
||||
(let ((a1-10 (-> s4-0 vector)))
|
||||
(rigid-body-method-20 (-> s3-0 state) (the-as vector a1-10))
|
||||
)
|
||||
)
|
||||
(rigid-body-object-method-50 obj arg0)
|
||||
(vehicle-method-99 obj arg0)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-96 boat-base ((obj boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-36 boat-base ((obj boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-135 boat-base ((obj boat-base) (arg0 traffic-object-spawn-params))
|
||||
(get-nav-control obj (-> arg0 nav-mesh))
|
||||
(set! (-> obj nav callback-info) *boat-nav-callback-info*)
|
||||
(logior! (-> obj nav flags) (nav-control-flag display-marks limit-rotation-rate update-heading-from-facing))
|
||||
(let ((v1-4 (-> obj nav)))
|
||||
(set! (-> v1-4 target-speed) 40960.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-6 (-> obj nav)))
|
||||
(set! (-> v1-6 acceleration) 8192.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-8 (-> obj nav)))
|
||||
(set! (-> v1-8 turning-acceleration) 8192.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-10 (-> obj nav)))
|
||||
(set! (-> v1-10 max-rotation-rate) 9102.223)
|
||||
)
|
||||
0
|
||||
(let ((v1-12 (-> obj nav)))
|
||||
(set! (-> v1-12 nav-cull-radius) 122880.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-14 (-> obj nav)))
|
||||
(set! (-> v1-14 sphere-mask) (the-as uint 64))
|
||||
)
|
||||
0
|
||||
(set! (-> obj path-num) (-> arg0 user-data))
|
||||
(set! (-> obj path-index) (+ 0.05 (-> arg0 position w)))
|
||||
(set! (-> obj root-override-2 root-prim prim-core collide-as)
|
||||
(logior (collide-spec pusher) (-> obj root-override-2 root-prim prim-core collide-as))
|
||||
)
|
||||
(let ((v1-21 (-> obj root-override-2 root-prim)))
|
||||
(set! (-> obj root-override-2 backup-collide-as) (-> v1-21 prim-core collide-as))
|
||||
(set! (-> obj root-override-2 backup-collide-with) (-> v1-21 prim-core collide-with))
|
||||
)
|
||||
0
|
||||
(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)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod vehicle-method-113 boat-base ((obj boat-base))
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate waiting (boat-base)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate inactive (boat-base)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (boat-base)
|
||||
:virtual #t
|
||||
:event (the-as (function process int symbol event-message-block object :behavior boat-base) vehicle-event-handler)
|
||||
:enter (behavior ()
|
||||
(logior! (-> self flags) (rigid-body-object-flag riding))
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
:post (behavior ()
|
||||
(rigid-body-object-method-37 self)
|
||||
(update-transforms (-> self root-override-2))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defskelgroup skel-barge barge barge-lod0-jg barge-idle-ja
|
||||
((barge-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 20)
|
||||
)
|
||||
|
||||
(deftype barge (boat-base)
|
||||
((engine uint32 :offset-assert 896)
|
||||
(bow-wash uint32 :offset-assert 900)
|
||||
)
|
||||
:heap-base #x310
|
||||
:method-count-assert 149
|
||||
:size-assert #x388
|
||||
:flag-assert #x9503100388
|
||||
)
|
||||
|
||||
|
||||
(defmethod vehicle-method-120 barge ((obj barge))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((t9-0 (method-of-type boat-base vehicle-method-120)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s4-0 (-> obj root-override-2 trans)))
|
||||
(let ((v1-3 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override-2 quat))))
|
||||
(let ((a0-4 -61440.0))
|
||||
(.mov vf7 a0-4)
|
||||
)
|
||||
(.lvf vf5 (&-> v1-3 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> s4-0 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> s5-0 quad) vf6)
|
||||
(cond
|
||||
((< (vector-vector-distance s5-0 (camera-pos)) 614400.0)
|
||||
(let ((a0-6 (static-sound-spec "barge-engine")))
|
||||
(sound-play-by-spec a0-6 (the-as sound-id (-> obj engine)) s5-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-stop (the-as sound-id (-> obj engine)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(let ((s4-2 (-> obj root-override-2 trans)))
|
||||
(let ((v1-9 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override-2 quat))))
|
||||
(let ((a0-10 61440.0))
|
||||
(.mov vf7 a0-10)
|
||||
)
|
||||
(.lvf vf5 (&-> v1-9 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> s4-2 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> s5-1 quad) vf6)
|
||||
(cond
|
||||
((< (vector-vector-distance s5-1 (camera-pos)) 614400.0)
|
||||
(let ((a0-12 (static-sound-spec "bow-wash")))
|
||||
(sound-play-by-spec a0-12 (the-as sound-id (-> obj bow-wash)) s5-1)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-stop (the-as sound-id (-> obj bow-wash)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-32 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)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate vehicle))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 19) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 20))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 81920.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-11 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-11 transform-index) 3)
|
||||
(set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 81920.0)
|
||||
)
|
||||
(let ((v1-13 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-13 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-13 transform-index) 3)
|
||||
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 81920.0)
|
||||
)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-15 transform-index) 0)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 -32768.0 16384.0)
|
||||
)
|
||||
(let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-17 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-17 transform-index) 0)
|
||||
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 -8192.0 16384.0)
|
||||
)
|
||||
(let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-19 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-19 transform-index) 0)
|
||||
(set-vector! (-> v1-19 local-sphere) 0.0 0.0 16384.0 16384.0)
|
||||
)
|
||||
(let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-21 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-21 transform-index) 0)
|
||||
(set-vector! (-> v1-21 local-sphere) 0.0 0.0 40960.0 16384.0)
|
||||
)
|
||||
(let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-23 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-23 transform-index) 0)
|
||||
(set-vector! (-> v1-23 local-sphere) 24576.0 0.0 -32768.0 16384.0)
|
||||
)
|
||||
(let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-25 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-25 transform-index) 0)
|
||||
(set-vector! (-> v1-25 local-sphere) 24576.0 0.0 -8192.0 16384.0)
|
||||
)
|
||||
(let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-27 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-27 transform-index) 0)
|
||||
(set-vector! (-> v1-27 local-sphere) 24576.0 0.0 16384.0 16384.0)
|
||||
)
|
||||
(let ((v1-29 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-29 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-29 transform-index) 0)
|
||||
(set-vector! (-> v1-29 local-sphere) 24576.0 0.0 40960.0 16384.0)
|
||||
)
|
||||
(let ((v1-31 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-31 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-31 transform-index) 0)
|
||||
(set-vector! (-> v1-31 local-sphere) -24576.0 0.0 -32768.0 16384.0)
|
||||
)
|
||||
(let ((v1-33 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-33 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-33 transform-index) 0)
|
||||
(set-vector! (-> v1-33 local-sphere) -24576.0 0.0 -8192.0 16384.0)
|
||||
)
|
||||
(let ((v1-35 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-35 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-35 transform-index) 0)
|
||||
(set-vector! (-> v1-35 local-sphere) -24576.0 0.0 16384.0 16384.0)
|
||||
)
|
||||
(let ((v1-37 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-37 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-37 transform-index) 0)
|
||||
(set-vector! (-> v1-37 local-sphere) -24576.0 0.0 40960.0 16384.0)
|
||||
)
|
||||
(let ((v1-39 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-39 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-39 transform-index) 0)
|
||||
(set-vector! (-> v1-39 local-sphere) 16384.0 0.0 -57344.0 16384.0)
|
||||
)
|
||||
(let ((v1-41 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-41 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-41 transform-index) 0)
|
||||
(set-vector! (-> v1-41 local-sphere) -16384.0 0.0 -57344.0 16384.0)
|
||||
)
|
||||
(let ((v1-43 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-43 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-43 transform-index) 0)
|
||||
(set-vector! (-> v1-43 local-sphere) 0.0 8192.0 -61440.0 16384.0)
|
||||
)
|
||||
(let ((v1-45 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-45 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-45 transform-index) 0)
|
||||
(set-vector! (-> v1-45 local-sphere) -40960.0 0.0 -53248.0 16384.0)
|
||||
)
|
||||
(let ((v1-47 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-47 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-47 transform-index) 0)
|
||||
(set-vector! (-> v1-47 local-sphere) 40960.0 0.0 -53248.0 16384.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) 81920.0)
|
||||
(let ((v1-49 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-49 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-49 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override-2) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-33 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*)
|
||||
(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)))
|
||||
(iterate-prims
|
||||
(-> obj root-override-2)
|
||||
(lambda ((arg0 collide-shape-prim))
|
||||
(case (-> arg0 prim-core prim-type)
|
||||
(((prim-type sphere))
|
||||
(set! (-> arg0 prim-core collide-with) (collide-spec
|
||||
backgnd
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
collectable
|
||||
pusher
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere))
|
||||
)
|
||||
(((prim-type mesh))
|
||||
(set! (-> arg0 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> arg0 prim-core collide-as) (collide-spec camera-blocker vehicle-mesh vehicle-mesh-probeable))
|
||||
)
|
||||
(((prim-type group))
|
||||
(set! (-> arg0 prim-core collide-with)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
player-list
|
||||
collectable
|
||||
pusher
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 prim-core collide-as)
|
||||
(collide-spec vehicle-sphere camera-blocker vehicle-mesh vehicle-mesh-probeable)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs boat-manager.
|
||||
(defmethod relocate boat-manager ((obj boat-manager) (arg0 int))
|
||||
(dotimes (v1-0 4)
|
||||
(if (-> obj paths v1-0)
|
||||
(&+! (-> obj paths v1-0) arg0)
|
||||
)
|
||||
)
|
||||
(the-as boat-manager ((method-of-type process relocate) obj arg0))
|
||||
)
|
||||
|
||||
(defstate idle (boat-manager)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(dotimes (gp-0 4)
|
||||
(let ((a0-0 (-> self paths gp-0)))
|
||||
(if a0-0
|
||||
(debug-draw a0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (the-as (function none :behavior boat-manager) sleep-code)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! boat-manager ((obj boat-manager) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj mesh) (nav-mesh-from-res-tag arg0 'nav-mesh-actor 0))
|
||||
(set! (-> obj entity) arg0)
|
||||
(when (-> obj mesh)
|
||||
(dotimes (s5-1 4)
|
||||
(set! (-> obj paths s5-1) (new 'process 'curve-control obj 'path (the float s5-1)))
|
||||
(when (-> obj paths s5-1)
|
||||
(logior! (-> obj paths s5-1 flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(let ((s4-0 (-> obj paths s5-1))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(f30-0 0.0)
|
||||
)
|
||||
1
|
||||
(the int (* 0.0000016276042 (total-distance s4-0)))
|
||||
(while (< f30-0 0.8)
|
||||
(displacement-between-points-at-percent-normalized! s4-0 s2-0 f30-0)
|
||||
(get-point-at-percent-along-path! s4-0 s3-0 f30-0 'interp)
|
||||
(vector-normalize! s2-0 1.0)
|
||||
(let ((s1-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s1-0 behavior) (the-as uint 1))
|
||||
(set! (-> s1-0 id) (the-as uint 0))
|
||||
(set! (-> s1-0 nav-mesh) (the-as nav-mesh (-> obj mesh)))
|
||||
(set! (-> s1-0 position quad) (-> s3-0 quad))
|
||||
(quaternion-look-at! (-> s1-0 rotation) s2-0 *up-vector*)
|
||||
(set! (-> s1-0 user-data) (the-as uint s5-1))
|
||||
(set! (-> s1-0 position w) f30-0)
|
||||
(logior! (-> s1-0 flags) 1)
|
||||
(process->handle (vehicle-spawn obj barge s1-0))
|
||||
)
|
||||
(+! f30-0 (/ (* 4096.0 (+ 150.0 (* 150.0 (rand-vu)))) (total-distance s4-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
@ -17,7 +17,7 @@
|
||||
:size-assert #x18
|
||||
:flag-assert #xa00000018
|
||||
(:methods
|
||||
(city-race-ring-info-method-9 () none 9)
|
||||
(city-race-ring-info-method-9 (_type_ symbol) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@ -33,13 +33,13 @@
|
||||
|
||||
|
||||
(deftype city-ambush-info (structure)
|
||||
((count int16 :offset-assert 0)
|
||||
(array uint32 :offset-assert 4)
|
||||
((count int16 :offset-assert 0)
|
||||
(array (inline-array city-ambush-spot) :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(city-ambush-info-method-9 () none 9)
|
||||
(city-ambush-info-method-9 (_type_ traffic-object-spawn-params) none 9)
|
||||
)
|
||||
)
|
||||
|
@ -6,4 +6,3 @@
|
||||
;; dgos: CWI
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
@ -7,3 +7,106 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype searchlight (process-drawable)
|
||||
((sync sync-eased :inline :offset-assert 200)
|
||||
)
|
||||
:heap-base #x80
|
||||
:method-count-assert 21
|
||||
:size-assert #xf4
|
||||
:flag-assert #x15008000f4
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-searchlight searchlight searchlight-lod0-jg searchlight-idle-ja
|
||||
((searchlight-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 60 0 120)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defstate idle (searchlight)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((gp-1 (quaternion-vector-angle!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
(new 'static 'vector :z 1.0 :w 1.0)
|
||||
(+ -4004.9778 (* 8192.0 (get-norm! (-> self sync) 0)))
|
||||
)
|
||||
)
|
||||
(s5-2 (quaternion-axis-angle!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
(vector-y-angle (-> (math-camera-matrix) vector 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-3 (calc-fade-from-fog (-> self root trans))))
|
||||
(set-vector! (-> self draw color-emissive) f0-3 f0-3 f0-3 1.0)
|
||||
)
|
||||
(quaternion-normalize! (quaternion*! (-> self root quat) s5-2 gp-1))
|
||||
)
|
||||
(when (rand-vu-percent? 0.05)
|
||||
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-4 from) (process->ppointer self))
|
||||
(set! (-> a1-4 num-params) 0)
|
||||
(set! (-> a1-4 message) 'hour)
|
||||
(let ((v1-13 (send-event-function (ppointer->process *time-of-day*) a1-4)))
|
||||
(if (and v1-13 (>= (the-as int v1-13) 7) (>= 18 (the-as int v1-13)))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post (the-as (function none :behavior searchlight) ja-post)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! searchlight ((obj searchlight) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-searchlight" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logior! (-> obj draw status) (draw-control-status disable-fog))
|
||||
(set! (-> obj root scale y) (rand-vu-float-range 1.8 2.0))
|
||||
(set-vector! (-> obj draw color-mult) 0.0 0.0 0.0 0.0)
|
||||
(let ((s4-1 (new 'stack-no-clear 'sync-info-params)))
|
||||
(let ((v1-12 0))
|
||||
(if #t
|
||||
(set! v1-12 (logior v1-12 1))
|
||||
)
|
||||
(set! (-> s4-1 sync-type) 'sync-eased)
|
||||
(set! (-> s4-1 sync-flags) (the-as sync-flags v1-12))
|
||||
)
|
||||
(set! (-> s4-1 period) (the-as uint (rand-vu-int-range 3000 6000)))
|
||||
(set! (-> s4-1 entity) arg0)
|
||||
(set! (-> s4-1 percent) 0.0)
|
||||
(set! (-> s4-1 ease-in) 0.15)
|
||||
(set! (-> s4-1 ease-out) 0.15)
|
||||
(set! (-> s4-1 pause-in) 0.0)
|
||||
(set! (-> s4-1 pause-out) 0.0)
|
||||
(initialize! (-> obj sync) s4-1)
|
||||
)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
@ -26,7 +26,7 @@
|
||||
(set! (-> obj scrape-sound-id) (new-sound-id))
|
||||
)
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override scrape-sound))
|
||||
(-> obj info-override scrape-sound)
|
||||
(-> obj scrape-sound-id)
|
||||
(the int (* 1024.0 (-> obj scrape-sound-envelope)))
|
||||
0
|
||||
@ -62,7 +62,7 @@
|
||||
)
|
||||
(a0-9 (static-sound-spec "vehicle-engine" :volume 0.0 :mask (pitch reg0)))
|
||||
)
|
||||
(set! (-> a0-9 sound-name) (the-as sound-name (-> obj info-override engine-sound)))
|
||||
(set! (-> a0-9 sound-name) (-> obj info-override engine-sound))
|
||||
(set! (-> obj engine-sound-factor) f30-0)
|
||||
(cond
|
||||
(#f
|
||||
@ -144,7 +144,7 @@
|
||||
(f0-38 0.0)
|
||||
)
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override thrust-sound))
|
||||
(-> obj info-override thrust-sound)
|
||||
(-> obj thrust-sound-id)
|
||||
(the int (* 1024.0 f1-25))
|
||||
(the int (* 1524.0 f0-38))
|
||||
|
@ -125,122 +125,122 @@
|
||||
|
||||
|
||||
(deftype rigid-body-vehicle-constants (rigid-body-object-constants)
|
||||
((flags uint32 :offset-assert 208)
|
||||
(object-type uint8 :offset-assert 212)
|
||||
(guard-type uint8 :offset-assert 213)
|
||||
(max-engine-thrust meters :offset-assert 216)
|
||||
(inv-max-engine-thrust float :offset-assert 220)
|
||||
(engine-response-rate float :offset-assert 224)
|
||||
(engine-intake-factor float :offset-assert 228)
|
||||
(brake-factor float :offset-assert 232)
|
||||
(turbo-boost-factor float :offset-assert 236)
|
||||
(max-xz-speed meters :offset-assert 240)
|
||||
(ground-probe-distance meters :offset-assert 244)
|
||||
(ground-probe-offset meters :offset-assert 248)
|
||||
(cos-ground-effect-angle float :offset-assert 252)
|
||||
(spring-lift-factor float :offset-assert 256)
|
||||
(air-steering-factor float :offset-assert 260)
|
||||
(air-drag-factor float :offset-assert 264)
|
||||
(steering-fin-angle float :offset-assert 268)
|
||||
(steering-thruster-factor float :offset-assert 272)
|
||||
(steering-thruster-max-gain float :offset-assert 276)
|
||||
(steering-thruster-half-gain-speed meters :offset-assert 280)
|
||||
(tire-steering-angle float :offset-assert 284)
|
||||
(tire-friction-factor float :offset-assert 288)
|
||||
(tire-static-friction float :offset-assert 292)
|
||||
(tire-static-friction-speed meters :offset-assert 296)
|
||||
(tire-dynamic-friction float :offset-assert 300)
|
||||
(tire-dynamic-friction-speed meters :offset-assert 304)
|
||||
(tire-inv-max-friction-speed float :offset-assert 308)
|
||||
(airfoil-factor float :offset-assert 312)
|
||||
(drag-force-factor float :offset-assert 316)
|
||||
(speed-scrubbing-drag float :offset-assert 320)
|
||||
(speed-limiting-drag float :offset-assert 324)
|
||||
(pitch-control-factor float :offset-assert 328)
|
||||
(roll-control-factor float :offset-assert 332)
|
||||
(roll-angle float :offset-assert 336)
|
||||
(jump-thrust-factor float :offset-assert 340)
|
||||
(buoyancy-factor float :offset-assert 344)
|
||||
(player-weight float :offset-assert 348)
|
||||
(player-shift-x meters :offset-assert 352)
|
||||
(player-shift-z meters :offset-assert 356)
|
||||
(target-speed-offset meters :offset-assert 360)
|
||||
(turning-accel meters :offset-assert 364)
|
||||
(toughness-factor float :offset-assert 368)
|
||||
(damage-factor float :offset-assert 372)
|
||||
(camera-string-min-height meters :offset-assert 376)
|
||||
(camera-string-max-height meters :offset-assert 380)
|
||||
(camera-string-min-length meters :offset-assert 384)
|
||||
(camera-string-max-length meters :offset-assert 388)
|
||||
(camera-min-fov float :offset-assert 392)
|
||||
(camera-max-fov float :offset-assert 396)
|
||||
(camera-head-offset float :offset-assert 400)
|
||||
(camera-foot-offset float :offset-assert 404)
|
||||
(camera-normal-max-angle-offset float :offset-assert 408)
|
||||
(camera-air-max-angle-offset float :offset-assert 412)
|
||||
(camera-max-lookaround-speed float :offset-assert 416)
|
||||
(seat-count int8 :offset-assert 420)
|
||||
(section-count int8 :offset-assert 421)
|
||||
(rider-stance uint8 :offset-assert 422)
|
||||
(grab-rail-count int8 :offset-assert 423)
|
||||
(grab-rail-array uint32 :offset-assert 424)
|
||||
(seat-array vehicle-seat-info 4 :inline :offset-assert 432)
|
||||
(rider-hand-offset vector 2 :inline :offset-assert 496)
|
||||
(section-array vehicle-section-info 4 :inline :offset-assert 528)
|
||||
(section-bike-front vehicle-section-info :inline :offset 528)
|
||||
(section-bike-rear vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-left vehicle-section-info :inline :offset 528)
|
||||
(section-car-rear-left vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-right vehicle-section-info :inline :offset 592)
|
||||
(section-car-rear-right vehicle-section-info :inline :offset 624)
|
||||
(explosion vehicle-explosion-info :offset-assert 656)
|
||||
(engine-pitch-scale float :offset-assert 660)
|
||||
(engine-pitch-offset float :offset-assert 664)
|
||||
(engine-pitch-mod-amp float :offset-assert 668)
|
||||
(engine-sound-select int8 :offset-assert 672)
|
||||
(engine-sound uint128 :offset-assert 688)
|
||||
(thrust-sound uint128 :offset-assert 704)
|
||||
(scrape-sound uint128 :offset-assert 720)
|
||||
(glance-sound uint128 :offset-assert 736)
|
||||
(impact-sound uint128 :offset-assert 752)
|
||||
(extra-sound uint128 :offset-assert 768)
|
||||
(explosion-part int32 :offset-assert 784)
|
||||
(headlight-count int8 :offset-assert 788)
|
||||
(taillight-count int8 :offset-assert 789)
|
||||
(thruster-flame-width meters :offset-assert 792)
|
||||
(thruster-flame-length meters :offset-assert 796)
|
||||
(thruster-local-pos vector 2 :inline :offset-assert 800)
|
||||
(exhaust-local-pos vector 2 :inline :offset-assert 832)
|
||||
(exhaust-local-dir vector 2 :inline :offset-assert 864)
|
||||
(smoke-local-pos vector 2 :inline :offset-assert 896)
|
||||
(smoke-local-vel vector 2 :inline :offset-assert 928)
|
||||
(headlight-local-pos vector 3 :inline :offset-assert 960)
|
||||
(taillight-local-pos vector 2 :inline :offset-assert 1008)
|
||||
(lift-thruster-count int8 :offset-assert 1040)
|
||||
(roll-thruster-count int8 :offset-assert 1041)
|
||||
(steering-thruster-count int8 :offset-assert 1042)
|
||||
(stabilizer-count int8 :offset-assert 1043)
|
||||
(inv-lift-thruster-count float :offset-assert 1044)
|
||||
(pad int8 8 :offset-assert 1048)
|
||||
(lift-thruster-array vehicle-control-point 2 :inline :offset-assert 1056)
|
||||
(roll-thruster-array vehicle-control-point 2 :inline :offset-assert 1120)
|
||||
(steering-thruster-array vehicle-control-point 2 :inline :offset-assert 1184)
|
||||
(stabilizer-array vehicle-control-point 6 :inline :offset-assert 1248)
|
||||
(engine-thrust-local-pos vector :inline :offset-assert 1440)
|
||||
(brake-local-pos vector :inline :offset-assert 1456)
|
||||
(particle-system-2d basic :offset-assert 1472)
|
||||
(particle-system-3d basic :offset-assert 1476)
|
||||
(part-thruster basic :offset-assert 1480)
|
||||
(part-thruster-scale-x sp-field-init-spec :offset-assert 1484)
|
||||
(part-thruster-scale-y sp-field-init-spec :offset-assert 1488)
|
||||
(part-quat quaternion :offset-assert 1492)
|
||||
(part-vel vector :offset-assert 1496)
|
||||
(color-option-count int8 :offset-assert 1500)
|
||||
(color-option-select int8 :offset-assert 1501)
|
||||
(color-option-array (array rgba) :offset-assert 1504)
|
||||
(sample-dir vector :inline :offset-assert 1520)
|
||||
(sample-time time-frame :offset-assert 1536)
|
||||
(sample-index int32 :offset-assert 1544)
|
||||
((flags uint32 :offset-assert 208)
|
||||
(object-type uint8 :offset-assert 212)
|
||||
(guard-type uint8 :offset-assert 213)
|
||||
(max-engine-thrust meters :offset-assert 216)
|
||||
(inv-max-engine-thrust float :offset-assert 220)
|
||||
(engine-response-rate float :offset-assert 224)
|
||||
(engine-intake-factor float :offset-assert 228)
|
||||
(brake-factor float :offset-assert 232)
|
||||
(turbo-boost-factor float :offset-assert 236)
|
||||
(max-xz-speed meters :offset-assert 240)
|
||||
(ground-probe-distance meters :offset-assert 244)
|
||||
(ground-probe-offset meters :offset-assert 248)
|
||||
(cos-ground-effect-angle float :offset-assert 252)
|
||||
(spring-lift-factor float :offset-assert 256)
|
||||
(air-steering-factor float :offset-assert 260)
|
||||
(air-drag-factor float :offset-assert 264)
|
||||
(steering-fin-angle float :offset-assert 268)
|
||||
(steering-thruster-factor float :offset-assert 272)
|
||||
(steering-thruster-max-gain float :offset-assert 276)
|
||||
(steering-thruster-half-gain-speed meters :offset-assert 280)
|
||||
(tire-steering-angle float :offset-assert 284)
|
||||
(tire-friction-factor float :offset-assert 288)
|
||||
(tire-static-friction float :offset-assert 292)
|
||||
(tire-static-friction-speed meters :offset-assert 296)
|
||||
(tire-dynamic-friction float :offset-assert 300)
|
||||
(tire-dynamic-friction-speed meters :offset-assert 304)
|
||||
(tire-inv-max-friction-speed float :offset-assert 308)
|
||||
(airfoil-factor float :offset-assert 312)
|
||||
(drag-force-factor float :offset-assert 316)
|
||||
(speed-scrubbing-drag float :offset-assert 320)
|
||||
(speed-limiting-drag float :offset-assert 324)
|
||||
(pitch-control-factor float :offset-assert 328)
|
||||
(roll-control-factor float :offset-assert 332)
|
||||
(roll-angle float :offset-assert 336)
|
||||
(jump-thrust-factor float :offset-assert 340)
|
||||
(buoyancy-factor float :offset-assert 344)
|
||||
(player-weight float :offset-assert 348)
|
||||
(player-shift-x meters :offset-assert 352)
|
||||
(player-shift-z meters :offset-assert 356)
|
||||
(target-speed-offset meters :offset-assert 360)
|
||||
(turning-accel meters :offset-assert 364)
|
||||
(toughness-factor float :offset-assert 368)
|
||||
(damage-factor float :offset-assert 372)
|
||||
(camera-string-min-height meters :offset-assert 376)
|
||||
(camera-string-max-height meters :offset-assert 380)
|
||||
(camera-string-min-length meters :offset-assert 384)
|
||||
(camera-string-max-length meters :offset-assert 388)
|
||||
(camera-min-fov float :offset-assert 392)
|
||||
(camera-max-fov float :offset-assert 396)
|
||||
(camera-head-offset float :offset-assert 400)
|
||||
(camera-foot-offset float :offset-assert 404)
|
||||
(camera-normal-max-angle-offset float :offset-assert 408)
|
||||
(camera-air-max-angle-offset float :offset-assert 412)
|
||||
(camera-max-lookaround-speed float :offset-assert 416)
|
||||
(seat-count int8 :offset-assert 420)
|
||||
(section-count int8 :offset-assert 421)
|
||||
(rider-stance uint8 :offset-assert 422)
|
||||
(grab-rail-count int8 :offset-assert 423)
|
||||
(grab-rail-array (inline-array vehicle-grab-rail-info) :offset-assert 424)
|
||||
(seat-array vehicle-seat-info 4 :inline :offset-assert 432)
|
||||
(rider-hand-offset vector 2 :inline :offset-assert 496)
|
||||
(section-array vehicle-section-info 4 :inline :offset-assert 528)
|
||||
(section-bike-front vehicle-section-info :inline :offset 528)
|
||||
(section-bike-rear vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-left vehicle-section-info :inline :offset 528)
|
||||
(section-car-rear-left vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-right vehicle-section-info :inline :offset 592)
|
||||
(section-car-rear-right vehicle-section-info :inline :offset 624)
|
||||
(explosion vehicle-explosion-info :offset-assert 656)
|
||||
(engine-pitch-scale float :offset-assert 660)
|
||||
(engine-pitch-offset float :offset-assert 664)
|
||||
(engine-pitch-mod-amp float :offset-assert 668)
|
||||
(engine-sound-select int8 :offset-assert 672)
|
||||
(engine-sound sound-name :offset-assert 688)
|
||||
(thrust-sound sound-name :offset-assert 704)
|
||||
(scrape-sound sound-name :offset-assert 720)
|
||||
(glance-sound sound-name :offset-assert 736)
|
||||
(impact-sound sound-name :offset-assert 752)
|
||||
(extra-sound sound-name :offset-assert 768)
|
||||
(explosion-part int32 :offset-assert 784)
|
||||
(headlight-count int8 :offset-assert 788)
|
||||
(taillight-count int8 :offset-assert 789)
|
||||
(thruster-flame-width meters :offset-assert 792)
|
||||
(thruster-flame-length meters :offset-assert 796)
|
||||
(thruster-local-pos vector 2 :inline :offset-assert 800)
|
||||
(exhaust-local-pos vector 2 :inline :offset-assert 832)
|
||||
(exhaust-local-dir vector 2 :inline :offset-assert 864)
|
||||
(smoke-local-pos vector 2 :inline :offset-assert 896)
|
||||
(smoke-local-vel vector 2 :inline :offset-assert 928)
|
||||
(headlight-local-pos vector 3 :inline :offset-assert 960)
|
||||
(taillight-local-pos vector 2 :inline :offset-assert 1008)
|
||||
(lift-thruster-count int8 :offset-assert 1040)
|
||||
(roll-thruster-count int8 :offset-assert 1041)
|
||||
(steering-thruster-count int8 :offset-assert 1042)
|
||||
(stabilizer-count int8 :offset-assert 1043)
|
||||
(inv-lift-thruster-count float :offset-assert 1044)
|
||||
(pad int8 8 :offset-assert 1048)
|
||||
(lift-thruster-array vehicle-control-point 2 :inline :offset-assert 1056)
|
||||
(roll-thruster-array vehicle-control-point 2 :inline :offset-assert 1120)
|
||||
(steering-thruster-array vehicle-control-point 2 :inline :offset-assert 1184)
|
||||
(stabilizer-array vehicle-control-point 6 :inline :offset-assert 1248)
|
||||
(engine-thrust-local-pos vector :inline :offset-assert 1440)
|
||||
(brake-local-pos vector :inline :offset-assert 1456)
|
||||
(particle-system-2d basic :offset-assert 1472)
|
||||
(particle-system-3d basic :offset-assert 1476)
|
||||
(part-thruster basic :offset-assert 1480)
|
||||
(part-thruster-scale-x sp-field-init-spec :offset-assert 1484)
|
||||
(part-thruster-scale-y sp-field-init-spec :offset-assert 1488)
|
||||
(part-quat quaternion :offset-assert 1492)
|
||||
(part-vel vector :offset-assert 1496)
|
||||
(color-option-count int8 :offset-assert 1500)
|
||||
(color-option-select int8 :offset-assert 1501)
|
||||
(color-option-array (inline-array vector) :offset-assert 1504)
|
||||
(sample-dir vector :inline :offset-assert 1520)
|
||||
(sample-time time-frame :offset-assert 1536)
|
||||
(sample-index int32 :offset-assert 1544)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x60c
|
||||
@ -460,7 +460,7 @@
|
||||
(vehicle-method-132 (_type_) none 132)
|
||||
(check-player-get-on (_type_) none 133)
|
||||
(vehicle-method-134 (_type_ process) none 134)
|
||||
(vehicle-method-135 () none 135)
|
||||
(vehicle-method-135 (_type_ traffic-object-spawn-params) none 135)
|
||||
(vehicle-method-136 (_type_ traffic-object-spawn-params) none 136)
|
||||
(vehicle-method-137 (_type_ traffic-object-spawn-params) none 137)
|
||||
(vehicle-method-138 (_type_) none 138)
|
||||
|
@ -6,814 +6,3 @@
|
||||
;; dgos: CWI
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod vehicle-method-99 vehicle ((obj vehicle) (arg0 float))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vehicle-grab-rail-info))
|
||||
(s3-0 (-> obj root-override-2 root-prim))
|
||||
(s2-0 1)
|
||||
)
|
||||
(when (< (-> obj rbody state position y) (+ (-> obj water-height) (-> s3-0 local-sphere w)))
|
||||
(when (= (-> s3-0 prim-core prim-type) (prim-type group))
|
||||
(let ((v1-5 (the-as collide-shape-prim-group s3-0)))
|
||||
(set! s3-0 (-> v1-5 child 0))
|
||||
(set! s2-0 (the-as int (-> v1-5 num-children)))
|
||||
)
|
||||
)
|
||||
(countdown (s1-0 s2-0)
|
||||
(when (= (-> s3-0 prim-core prim-type) (prim-type sphere))
|
||||
(let* ((s0-0 (-> s3-0 prim-core))
|
||||
(f0-2 (- (-> s0-0 world-sphere y) (-> s0-0 world-sphere w)))
|
||||
)
|
||||
(when (< f0-2 (-> obj water-height))
|
||||
(set! (-> s4-0 local-pos 0 quad) (-> s0-0 world-sphere quad))
|
||||
(let ((f1-5 (fmin (-> obj water-height) (+ (-> s0-0 world-sphere y) (-> s0-0 world-sphere w)))))
|
||||
0.0
|
||||
(let* ((f2-5 (fmax -1.0 (fmin 1.0 (/ (- (-> obj water-height) (-> s0-0 world-sphere y)) (-> s0-0 world-sphere w)))))
|
||||
(f30-0 (+ 0.5 (* -0.25 f2-5 f2-5 f2-5) (* 0.75 f2-5)))
|
||||
)
|
||||
(set! (-> s4-0 local-pos 0 y) (* 0.5 (+ f0-2 f1-5)))
|
||||
(let ((v1-18 (-> obj rbody))
|
||||
(a1-1 (-> s4-0 local-pos))
|
||||
(a2-0 (-> s4-0 normal))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-18 state) (the-as vector a1-1) a2-0)
|
||||
)
|
||||
(let* ((f0-7 (* 0.062831804 (fmin 200.0 (vector-length (-> s4-0 normal))) f30-0))
|
||||
(f1-8 (-> s0-0 world-sphere w))
|
||||
(f0-8 (* f0-7 (* f1-8 f1-8)))
|
||||
(f1-11 4096.0)
|
||||
(f1-13 (* f1-11 f1-11))
|
||||
(f0-10 (fmin (* f0-8 (/ 1.0 f1-13)) (/ (-> obj info-override mass) (* 2.0 arg0 (the float s2-0)))))
|
||||
)
|
||||
(vector-float*! (-> s4-0 local-pos 1) (-> s4-0 normal) (* -1.0 f0-10))
|
||||
)
|
||||
(let ((v1-34 (-> obj rbody))
|
||||
(a1-3 (-> s4-0 local-pos))
|
||||
(a2-1 (-> s4-0 local-pos 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-34 state) (the-as vector a1-3) a2-1)
|
||||
)
|
||||
(vector-reset! (-> s4-0 local-pos 1))
|
||||
(let* ((f0-12 549018.94)
|
||||
(f1-19 4096.0)
|
||||
(f2-13 4096.0)
|
||||
(f1-20 (* f1-19 (* f2-13 f2-13)))
|
||||
(f0-16 (* f0-12 (/ 1.0 f1-20) (-> obj info-override buoyancy-factor) f30-0 (-> s0-0 world-sphere w)))
|
||||
(f1-25 (-> s0-0 world-sphere w))
|
||||
)
|
||||
(set! (-> s4-0 local-pos 1 y) (* f0-16 (* f1-25 f1-25)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-46 (-> obj rbody))
|
||||
(a1-4 (-> s4-0 local-pos))
|
||||
(a2-2 (-> s4-0 local-pos 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-46 state) (the-as vector a1-4) a2-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! s3-0 80)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype vehicle-probe-work (structure)
|
||||
((local-pos vector :inline :offset-assert 0)
|
||||
(local-normal vector :inline :offset-assert 16)
|
||||
(world-pos vector :inline :offset-assert 32)
|
||||
(world-normal vector :inline :offset-assert 48)
|
||||
(probe-pos vector :inline :offset-assert 64)
|
||||
(ground-pos vector :inline :offset-assert 80)
|
||||
(ground-normal vector :inline :offset-assert 96)
|
||||
(velocity vector :inline :offset-assert 112)
|
||||
(tire-force vector :inline :offset-assert 128)
|
||||
(wheel-axis vector :inline :offset-assert 144)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xa0
|
||||
:flag-assert #x9000000a0
|
||||
)
|
||||
|
||||
|
||||
(deftype vehicle-physics-work (structure)
|
||||
((mat matrix :inline :offset-assert 0)
|
||||
(force vector :inline :offset-assert 64)
|
||||
(velocity vector :inline :offset-assert 80)
|
||||
(world-pos vector :inline :offset-assert 96)
|
||||
(world-normal vector :inline :offset-assert 112)
|
||||
(local-pos vector :inline :offset-assert 128)
|
||||
(steering-axis vector :inline :offset-assert 144)
|
||||
(lift-dir vector :inline :offset-assert 160)
|
||||
(normal vector :inline :offset-assert 176)
|
||||
(tmp vector :inline :offset-assert 192)
|
||||
(p-body vector :inline :offset-assert 208)
|
||||
(axis vector :inline :offset-assert 224)
|
||||
(dir vector :inline :offset-assert 240)
|
||||
(ground-normal vector :inline :offset-assert 256)
|
||||
(impulse float :offset-assert 272)
|
||||
(vel-dot-norm float :offset-assert 276)
|
||||
(friction-coef float :offset-assert 280)
|
||||
(speed-factor float :offset-assert 284)
|
||||
(probe-work-array vehicle-probe-work 2 :inline :offset-assert 288)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x260
|
||||
:flag-assert #x900000260
|
||||
)
|
||||
|
||||
|
||||
(defmethod vehicle-method-100 vehicle ((obj vehicle) (arg0 float) (arg1 vehicle-physics-work))
|
||||
(local-vars (v1-81 float) (v1-184 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(+! (-> obj physics-counter) 1)
|
||||
(let ((s3-0 (-> obj rbody)))
|
||||
(mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 state matrix)) 64)
|
||||
(let* ((f28-0 (* -1.0 (-> obj controls steering) (-> obj info-override tire-steering-angle)))
|
||||
(f30-0 (cos f28-0))
|
||||
(f0-2 (sin f28-0))
|
||||
)
|
||||
(set! (-> arg1 steering-axis x) f30-0)
|
||||
(set! (-> arg1 steering-axis y) 0.0)
|
||||
(set! (-> arg1 steering-axis z) f0-2)
|
||||
)
|
||||
(vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(logclear! (-> obj flags) (rigid-body-object-flag on-ground on-flight-level))
|
||||
(vector-reset! (-> arg1 ground-normal))
|
||||
(set! (-> arg1 ground-normal y) 1.0)
|
||||
(let ((f30-1 (-> obj info-override ground-probe-distance)))
|
||||
(let ((s2-0 (new 'stack-no-clear 'collide-query)))
|
||||
(vector-reset! (-> arg1 lift-dir))
|
||||
(set! (-> arg1 lift-dir y) -1.0)
|
||||
(set! (-> arg1 speed-factor)
|
||||
(fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 state lin-velocity))))))
|
||||
)
|
||||
(when (logtest? (-> obj info-override flags) 1)
|
||||
(vector-float*! (-> arg1 tmp) (-> arg1 mat vector 1) -1.0)
|
||||
(let ((t9-4 vector-lerp!)
|
||||
(a0-7 (-> arg1 lift-dir))
|
||||
(a1-4 (-> arg1 lift-dir))
|
||||
(a2-3 (-> arg1 tmp))
|
||||
(f0-8 (-> arg1 speed-factor))
|
||||
)
|
||||
(t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8))
|
||||
)
|
||||
(vector-normalize! (-> arg1 lift-dir) 1.0)
|
||||
)
|
||||
(vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1))
|
||||
(let ((v1-28 s2-0))
|
||||
(set! (-> v1-28 radius) 409.6)
|
||||
(set! (-> v1-28 collide-with) (collide-spec
|
||||
backgnd
|
||||
obstacle
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
water
|
||||
collectable
|
||||
blocking-plane
|
||||
pusher
|
||||
vehicle-mesh-probeable
|
||||
)
|
||||
)
|
||||
(set! (-> v1-28 ignore-process0) #f)
|
||||
(set! (-> v1-28 ignore-process1) #f)
|
||||
(set! (-> v1-28 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1))
|
||||
(set! (-> v1-28 action-mask) (collide-action solid))
|
||||
)
|
||||
(dotimes (s1-0 (-> obj info-override lift-thruster-count))
|
||||
(let ((v1-31 (-> obj info-override lift-thruster-array s1-0))
|
||||
(s0-0 (-> arg1 probe-work-array s1-0))
|
||||
)
|
||||
(vector-reset! (-> s0-0 tire-force))
|
||||
(set! (-> s0-0 local-pos quad) (-> v1-31 local-pos quad))
|
||||
(set! (-> s0-0 local-normal quad) (-> v1-31 normal quad))
|
||||
(vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat))
|
||||
(let ((a1-9 (-> s0-0 probe-pos)))
|
||||
(let ((v1-34 (-> s0-0 world-pos)))
|
||||
(let ((a0-22 (-> arg1 mat vector 1)))
|
||||
(let ((a2-6 (-> obj info-override ground-probe-offset)))
|
||||
(.mov vf7 a2-6)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-22 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-34 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a1-9 quad) vf6)
|
||||
)
|
||||
(let ((v1-35 s3-0)
|
||||
(a1-10 (-> s0-0 probe-pos))
|
||||
(a2-7 (-> s0-0 velocity))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-35 state) a1-10 a2-7)
|
||||
)
|
||||
(set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z))
|
||||
(-> arg1 steering-axis)
|
||||
(the-as vector (-> arg1 mat))
|
||||
)
|
||||
)
|
||||
quad
|
||||
)
|
||||
)
|
||||
(set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad))
|
||||
(set! (-> s0-0 ground-pos y) 0.0)
|
||||
(vector-reset! (-> s0-0 ground-normal))
|
||||
(when (logtest? (-> obj flags) (rigid-body-object-flag enable-collision))
|
||||
(set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad))
|
||||
(let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0)))
|
||||
(cond
|
||||
((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1))
|
||||
(logclear! (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag on-ground))
|
||||
(set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1)))
|
||||
(set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad))
|
||||
(set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad))
|
||||
)
|
||||
(else
|
||||
(set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 state position y)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj lift-thrust 0) 0.0)
|
||||
(set! (-> obj lift-thrust 1) 0.0)
|
||||
(set! (-> obj roll-thrust 0) 0.0)
|
||||
(set! (-> obj roll-thrust 1) 0.0)
|
||||
(set! (-> obj roll-thrust 0) 0.0)
|
||||
(set! (-> obj roll-thrust 1) 0.0)
|
||||
(when (>= 1 (-> obj force-level))
|
||||
(dotimes (s2-1 (-> obj info-override lift-thruster-count))
|
||||
(let ((s1-1 (-> arg1 probe-work-array s2-1)))
|
||||
(set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad))
|
||||
(set! (-> arg1 velocity quad) (-> s1-1 velocity quad))
|
||||
(let ((f28-1 (-> s1-1 probe-pos y)))
|
||||
(when (> (-> obj flight-level-index) 0)
|
||||
(set! f28-1 (- f28-1 (+ 6144.0 (-> obj flight-level))))
|
||||
(when (>= 0.0 f28-1)
|
||||
(logclear! (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag on-flight-level))
|
||||
(.lvf vf1 (&-> (-> s1-1 ground-normal) quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
||||
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
||||
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
||||
(.mov v1-81 vf1)
|
||||
(if (= v1-81 0.0)
|
||||
(set! (-> s1-1 ground-normal y) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (or (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(and (> (-> obj flight-level-index) 0) (< f28-1 0.0))
|
||||
)
|
||||
(if (zero? (-> obj flight-level-index))
|
||||
(set! f28-1 40960.0)
|
||||
)
|
||||
(let* ((f0-37 (* -1.0
|
||||
(-> obj force-scale)
|
||||
(-> obj info-override inv-lift-thruster-count)
|
||||
(-> obj info-override mass)
|
||||
(-> obj info-override gravity)
|
||||
(+ 1.0 (* 2.0 (the float (-> obj flight-level-index))))
|
||||
)
|
||||
)
|
||||
(f1-17 -1.0)
|
||||
(f2-4 1.0)
|
||||
(f3-4 16384.0)
|
||||
(f3-7 (* f28-1 (/ 1.0 f3-4)))
|
||||
(f4-2 0.5)
|
||||
(f5-0 81920.0)
|
||||
(f0-38 (* f0-37 (fmax f1-17 (fmin f2-4 (+ f3-7 (* f4-2 (/ 1.0 f5-0) (-> arg1 velocity y)))))))
|
||||
)
|
||||
(let ((f1-20 (fmax 0.0 f0-38)))
|
||||
(+! (-> obj lift-thrust s2-1) f1-20)
|
||||
(when (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(+! (-> obj roll-thrust 0) (* 0.05 f1-20))
|
||||
(+! (-> obj roll-thrust 1) (* 0.05 f1-20))
|
||||
)
|
||||
)
|
||||
(vector-reset! (-> arg1 force))
|
||||
(set! (-> arg1 force y) f0-38)
|
||||
)
|
||||
(let ((v1-122 s3-0)
|
||||
(a1-12 (-> arg1 world-pos))
|
||||
(a2-8 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-122 state) a1-12 a2-8)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
)
|
||||
(let ((f0-40 (+ 4096.0 f28-1)))
|
||||
(when (or (and (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(< 0.0 f0-40)
|
||||
(< 0.0 (-> arg1 velocity y))
|
||||
)
|
||||
(and (> (-> obj flight-level-index) 0) (< f0-40 0.0) (< (-> arg1 velocity y) 0.0))
|
||||
)
|
||||
(vector-reset! (-> arg1 force))
|
||||
(let ((f0-43 (* -0.25 (-> obj info-override inv-lift-thruster-count)))
|
||||
(f1-28 arg0)
|
||||
)
|
||||
(set! (-> arg1 force y) (* f0-43 (/ 1.0 f1-28) (-> obj info-override mass) (-> arg1 velocity y)))
|
||||
)
|
||||
(let ((v1-140 s3-0)
|
||||
(a1-16 (-> arg1 world-pos))
|
||||
(a2-9 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-140 state) a1-16 a2-9)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((f1-36 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1)))
|
||||
(f28-2 (- 1.0 (/ (+ -4096.0 f1-36) (+ -4096.0 f30-1))))
|
||||
)
|
||||
(if (>= (-> obj info-override cos-ground-effect-angle)
|
||||
(vector-dot (-> s1-1 ground-normal) (-> arg1 mat vector 1))
|
||||
)
|
||||
(set! f28-2 0.0)
|
||||
)
|
||||
(set! (-> arg1 tmp y) 0.0)
|
||||
(set! (-> arg1 tmp x) (-> arg1 velocity z))
|
||||
(set! (-> arg1 tmp z) (- (-> arg1 velocity x)))
|
||||
(vector-normalize! (-> arg1 tmp) 1.0)
|
||||
(vector+float*!
|
||||
(-> arg1 normal)
|
||||
(-> s1-1 ground-normal)
|
||||
(-> arg1 tmp)
|
||||
(- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp)))
|
||||
)
|
||||
(let ((v1-155 (-> arg1 force))
|
||||
(a0-55 (-> arg1 normal))
|
||||
(f0-58 (* 2.0 f28-2))
|
||||
(f1-41 arg0)
|
||||
)
|
||||
(vector-float*! v1-155 a0-55 (* f0-58
|
||||
(/ 1.0 f1-41)
|
||||
(-> obj info-override inv-lift-thruster-count)
|
||||
(-> obj info-override mass)
|
||||
(fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-157 s3-0)
|
||||
(a1-28 (-> arg1 world-pos))
|
||||
(a2-13 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-157 state) a1-28 a2-13)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
(let ((f0-72 (* 8.0
|
||||
(-> obj info-override mass)
|
||||
(-> obj info-override gravity)
|
||||
(-> obj info-override inv-lift-thruster-count)
|
||||
(+ (* (-> obj info-override spring-lift-factor) f28-2)
|
||||
(* 0.75 (-> obj jump-thrust) (-> obj info-override jump-thrust-factor))
|
||||
)
|
||||
(- (+ 1.0 (* 2.0 (rand-vu) (-> obj power-fluctuation-factor))) (-> obj power-fluctuation-factor))
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> obj lift-thrust s2-1) f0-72)
|
||||
(vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-72))
|
||||
)
|
||||
)
|
||||
(let ((v1-176 s3-0)
|
||||
(a1-32 (-> arg1 world-pos))
|
||||
(a2-14 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-176 state) a1-32 a2-14)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
(when (and (< 0.0 (-> obj info-override tire-friction-factor)) (let ((f0-75 0.0))
|
||||
(.lvf vf1 (&-> (-> s1-1 ground-normal) quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
||||
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
||||
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
||||
(.mov v1-184 vf1)
|
||||
(< f0-75 v1-184)
|
||||
)
|
||||
)
|
||||
(vector+float*!
|
||||
(-> arg1 normal)
|
||||
(-> s1-1 wheel-axis)
|
||||
(-> s1-1 ground-normal)
|
||||
(- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal)))
|
||||
)
|
||||
(vector-normalize! (-> arg1 normal) 1.0)
|
||||
(set! (-> arg1 world-pos quad) (-> s3-0 state position quad))
|
||||
(set! (-> arg1 velocity quad) (-> s3-0 state lin-velocity quad))
|
||||
(vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 state position))
|
||||
(vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal))
|
||||
(vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 state inv-i-world))
|
||||
(vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body))
|
||||
(set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal)))
|
||||
(let ((f0-82 (fabs (-> arg1 vel-dot-norm))))
|
||||
(set! (-> arg1 friction-coef)
|
||||
(smooth-interp
|
||||
(-> obj info-override tire-static-friction)
|
||||
(-> obj info-override tire-dynamic-friction)
|
||||
f0-82
|
||||
(-> obj info-override tire-static-friction-speed)
|
||||
(-> obj info-override tire-dynamic-friction-speed)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 friction-coef)
|
||||
(* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> obj engine-thrust))))))
|
||||
)
|
||||
(let ((f0-90
|
||||
(* (-> arg1 friction-coef)
|
||||
(-> obj info-override tire-friction-factor)
|
||||
(fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 impulse)
|
||||
(/ (* -1.0 (-> arg1 vel-dot-norm))
|
||||
(* arg0 (+ (-> s3-0 state info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp))))
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-90) (- f0-90)))
|
||||
)
|
||||
(vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse))
|
||||
(let ((v1-213 s3-0)
|
||||
(a1-45 (-> arg1 world-pos))
|
||||
(a2-19 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-213 state) a1-45 a2-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-29 vehicle ((obj vehicle) (arg0 float))
|
||||
(local-vars (sv-624 float) (sv-720 float) (sv-724 float))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((gp-0 (new 'stack-no-clear 'inline-array 'matrix 9))
|
||||
(s5-0 (-> obj rbody))
|
||||
(s4-0 (-> obj info-override))
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> gp-0 0)) (the-as pointer (-> s5-0 state matrix)) 64)
|
||||
(when (not (logtest? (-> obj flags) (rigid-body-object-flag dead)))
|
||||
(vehicle-method-100 obj arg0 (the-as vehicle-physics-work gp-0))
|
||||
(when (>= 1 (-> obj force-level))
|
||||
(set! sv-624 (* (-> s4-0 mass) (-> s4-0 gravity)))
|
||||
(when (!= (-> s4-0 pitch-control-factor) 0.0)
|
||||
(set! (-> gp-0 3 vector 2 quad) (-> gp-0 0 quad 0))
|
||||
(set! (-> gp-0 3 vector 2 y) 0.0)
|
||||
(let ((f30-0 (vector-dot (-> gp-0 3 vector 2) (-> s5-0 state ang-velocity))))
|
||||
(dotimes (s1-0 (-> s4-0 lift-thruster-count))
|
||||
(let ((s0-0 (-> s4-0 lift-thruster-array s1-0)))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s0-0 local-pos) (-> gp-0 0))
|
||||
(vector-rotate*! (-> gp-0 1 trans) (-> s0-0 normal) (-> gp-0 0))
|
||||
(let* ((f0-5 -1.0)
|
||||
(f1-2 1.0)
|
||||
(f2-0 0.2)
|
||||
(a0-9 (the-as number (-> s0-0 local-pos z)))
|
||||
(a1-5 #xffffffff80000000)
|
||||
(v1-16 #x3f800000)
|
||||
(f0-7
|
||||
(* (fmax
|
||||
f0-5
|
||||
(fmin
|
||||
f1-2
|
||||
(* f2-0 (the-as float (logior (logand (the-as uint a0-9) a1-5) v1-16)) (-> s4-0 pitch-control-factor) f30-0)
|
||||
)
|
||||
)
|
||||
sv-624
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) (* -1.0 f0-7))
|
||||
)
|
||||
)
|
||||
(let ((v1-21 s5-0)
|
||||
(a1-7 (-> gp-0 1 vector 2))
|
||||
(a2-4 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-21 state) a1-7 (the-as vector a2-4))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (new 'stack-no-clear 'inline-array 'vector 5)))
|
||||
(let ((f0-12 (* -1.0 (-> obj controls steering) (-> gp-0 4 vector 1 w) (-> s4-0 roll-angle))))
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! f0-12 0.0)
|
||||
)
|
||||
(quaternion-vector-angle! (the-as quaternion (-> s1-1 0)) (-> gp-0 0 vector 2) f0-12)
|
||||
)
|
||||
(quaternion->matrix (the-as matrix (-> s1-1 1)) (the-as quaternion (-> s1-1 0)))
|
||||
(set! (-> gp-0 3 trans quad) (-> s1-1 2 quad))
|
||||
)
|
||||
(let ((f0-14 (vector-dot (the-as vector (-> gp-0 0)) (-> gp-0 3 trans))))
|
||||
(set! sv-720 (* (-> s4-0 mass) (-> s4-0 gravity)))
|
||||
(let ((f1-11 f0-14))
|
||||
(set! sv-724
|
||||
(+ (* f1-11 f1-11 f0-14) (* 0.075 (vector-dot (-> gp-0 0 vector 2) (-> s5-0 state ang-velocity))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s1-2 (-> s4-0 roll-thruster-count))
|
||||
(let* ((s0-1 (-> s4-0 roll-thruster-array s1-2))
|
||||
(f0-17 0.0)
|
||||
(f1-16 1.0)
|
||||
(f2-7 -1.0)
|
||||
(a0-19 (the-as number (-> s0-1 local-pos x)))
|
||||
(a1-10 #xffffffff80000000)
|
||||
(v1-44 #x3f800000)
|
||||
(f30-1
|
||||
(fmax f0-17 (fmin f1-16 (* f2-7 (the-as float (logior (logand (the-as uint a0-19) a1-10) v1-44)) sv-724)))
|
||||
)
|
||||
)
|
||||
(when (< 0.0 f30-1)
|
||||
(let ((f30-2
|
||||
(* (+ f30-1 (+ (- (-> obj power-fluctuation-factor)) (* 2.0 (rand-vu) (-> obj power-fluctuation-factor))))
|
||||
(-> s4-0 roll-control-factor)
|
||||
sv-720
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> obj roll-thrust s1-2) (fmax 0.0 f30-2))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s0-1 local-pos) (-> gp-0 0))
|
||||
(vector-rotate*! (-> gp-0 1 trans) (-> s0-1 normal) (-> gp-0 0))
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) (* -1.0 f30-2))
|
||||
)
|
||||
(let ((v1-56 s5-0)
|
||||
(a1-14 (-> gp-0 1 vector 2))
|
||||
(a2-8 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-56 state) a1-14 (the-as vector a2-8))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when #t
|
||||
(let* ((f0-30 (-> obj controls steering))
|
||||
(f1-23 (-> s4-0 steering-thruster-half-gain-speed))
|
||||
(f2-10 (-> s4-0 steering-thruster-half-gain-speed))
|
||||
(v1-65 (-> s5-0 state lin-velocity))
|
||||
(f2-12 (/ f1-23 (+ f2-10 (sqrtf (+ (* (-> v1-65 x) (-> v1-65 x)) (* (-> v1-65 z) (-> v1-65 z)))))))
|
||||
)
|
||||
(if (< (-> obj controls throttle) 0.0)
|
||||
(set! f0-30 (* -1.0 f0-30))
|
||||
)
|
||||
(set! (-> gp-0 3 vector 2 quad) (-> gp-0 0 vector 1 quad))
|
||||
(let ((f30-3 (* 8192.0
|
||||
(-> s4-0 mass)
|
||||
(-> obj power-level)
|
||||
(- (* f0-30 f2-12 (-> s4-0 steering-thruster-max-gain))
|
||||
(vector-dot (-> gp-0 3 vector 2) (-> s5-0 state ang-velocity))
|
||||
)
|
||||
(-> s4-0 steering-thruster-factor)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! f30-3 (* f30-3 (-> s4-0 air-steering-factor)))
|
||||
)
|
||||
(let ((s1-3 (the-as object (-> s4-0 steering-thruster-array))))
|
||||
(countdown (s0-2 (-> s4-0 steering-thruster-count))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> (the-as vehicle-control-point s1-3) local-pos) (-> gp-0 0))
|
||||
(vector-rotate*!
|
||||
(-> gp-0 1 trans)
|
||||
(-> (the-as (inline-array vehicle-control-point) s1-3) 0 normal)
|
||||
(-> gp-0 0)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) f30-3)
|
||||
(let ((v1-80 s5-0)
|
||||
(a1-17 (-> gp-0 1 vector 2))
|
||||
(a2-11 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-80 state) a1-17 (the-as vector a2-11))
|
||||
)
|
||||
(set! s1-3 (-> (the-as (inline-array vehicle-control-point) s1-3) 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(seek! (-> obj jump-thrust) 0.0 (* 6.0 arg0))
|
||||
(when (logtest? (rigid-body-object-flag ignition) (-> obj flags))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s4-0 engine-thrust-local-pos) (-> gp-0 0))
|
||||
(set! (-> gp-0 3 trans quad) (-> gp-0 0 vector 2 quad))
|
||||
(let ((f0-45 (* (-> obj engine-thrust)
|
||||
(-> s4-0 max-engine-thrust)
|
||||
(-> s4-0 mass)
|
||||
(-> obj power-level)
|
||||
(-> obj force-scale)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 3 trans) f0-45)
|
||||
)
|
||||
(when #t
|
||||
(let ((v1-94 s5-0)
|
||||
(a1-20 (-> gp-0 1 vector 2))
|
||||
(a2-14 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-94 state) a1-20 (the-as vector a2-14))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f30-4 (-> obj controls brake)))
|
||||
(when (< 0.0 f30-4)
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s4-0 brake-local-pos) (-> gp-0 0))
|
||||
(let ((v1-98 s5-0)
|
||||
(a1-22 (-> gp-0 1 vector 2))
|
||||
(a2-16 (-> gp-0 1 vector 1))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-98 state) a1-22 a2-16)
|
||||
)
|
||||
(let* ((v1-101 (-> gp-0 1 vector 1))
|
||||
(f1-38 (sqrtf (+ (* (-> v1-101 x) (-> v1-101 x)) (* (-> v1-101 z) (-> v1-101 z)))))
|
||||
(f0-53 (* -98304.0 (-> s4-0 brake-factor) (-> s4-0 mass)))
|
||||
(f1-39 (fmax 16384.0 f1-38))
|
||||
(f0-55 (* f0-53 (/ 1.0 f1-39) f30-4))
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 vector 1) f0-55)
|
||||
)
|
||||
(let ((v1-109 s5-0)
|
||||
(a1-23 (-> gp-0 1 vector 2))
|
||||
(a2-17 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-109 state) a1-23 (the-as vector a2-17))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-4 (new 'stack-no-clear 'rigid-body-vehicle-constants)))
|
||||
(quad-copy!
|
||||
(the-as pointer s1-4)
|
||||
(the-as pointer (-> s4-0 stabilizer-array))
|
||||
(* (-> s4-0 stabilizer-count) 2)
|
||||
)
|
||||
(let ((s0-3 (-> s1-4 info inertial-tensor)))
|
||||
(let ((f0-57 (* -3640.889 (-> obj controls lean-z))))
|
||||
(vector-rotate-around-x! (the-as vector s0-3) (the-as vector s0-3) f0-57)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! (-> s0-3 vector 0 w) (* 10.0 (-> s0-3 vector 0 w)))
|
||||
)
|
||||
(if (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(set! (-> s0-3 vector 0 w) 0.0)
|
||||
)
|
||||
)
|
||||
(let ((f30-5 (* -0.0000006103516 (-> obj force-scale) (-> s4-0 mass) (-> s4-0 drag-force-factor))))
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! f30-5 (* f30-5 (-> s4-0 air-drag-factor)))
|
||||
)
|
||||
(let ((s1-5 (&-> s1-4 mass)))
|
||||
(countdown (s0-4 (-> s4-0 stabilizer-count))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (the-as vector (&-> s1-5 0)) (-> gp-0 0))
|
||||
(vector-rotate*! (-> gp-0 1 trans) (the-as vector (&-> s1-5 4)) (-> gp-0 0))
|
||||
(let ((v1-128 s5-0)
|
||||
(a1-28 (-> gp-0 1 vector 2))
|
||||
(a2-22 (-> gp-0 1 vector 1))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-128 state) a1-28 a2-22)
|
||||
)
|
||||
(let ((f0-70
|
||||
(* -0.06125
|
||||
(vector-dot (-> gp-0 1 trans) (-> gp-0 1 vector 1))
|
||||
(-> s1-5 7)
|
||||
(-> obj force-scale)
|
||||
(-> s4-0 mass)
|
||||
(-> s4-0 airfoil-factor)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) f0-70)
|
||||
)
|
||||
(when (<= (-> obj force-level) 0)
|
||||
(let ((v1-138 s5-0)
|
||||
(a1-29 (-> gp-0 1 vector 2))
|
||||
(a2-23 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-138 state) a1-29 (the-as vector a2-23))
|
||||
)
|
||||
)
|
||||
(vector-float*!
|
||||
(the-as vector (-> gp-0 1))
|
||||
(-> gp-0 1 vector 1)
|
||||
(* f30-5
|
||||
(-> s1-5 7)
|
||||
(+ (* 0.15 (vector-length (-> gp-0 1 vector 1))) (fabs (vector-dot (-> gp-0 1 trans) (-> gp-0 1 vector 1))))
|
||||
)
|
||||
)
|
||||
(when (<= (-> obj force-level) 0)
|
||||
(let ((v1-145 s5-0)
|
||||
(a1-35 (-> gp-0 1 vector 2))
|
||||
(a2-25 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-145 state) a1-35 (the-as vector a2-25))
|
||||
)
|
||||
)
|
||||
(set! s1-5 (&-> s1-5 8))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(.svf (&-> (-> gp-0 1) quad 0) vf0)
|
||||
(set! (-> gp-0 1 vector 0 y) (* -1.0
|
||||
(-> s4-0 gravity)
|
||||
(if (< 1 (-> obj force-level))
|
||||
2.0
|
||||
1.0
|
||||
)
|
||||
(-> s4-0 mass)
|
||||
)
|
||||
)
|
||||
(let ((v1-154 s5-0)
|
||||
(a1-36 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-20 (-> v1-154 state) (the-as vector a1-36))
|
||||
)
|
||||
(when (logtest? (-> obj flags) (rigid-body-object-flag riding))
|
||||
(set! (-> gp-0 2 quad 0) (-> s4-0 cm-joint quad))
|
||||
(+! (-> gp-0 2 vector 0 x) (* (-> obj controls steering) (-> s4-0 player-shift-x)))
|
||||
(+! (-> gp-0 2 vector 0 z) (* (-> obj controls lean-z) (-> s4-0 player-shift-z)))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (the-as vector (-> gp-0 2)) (-> gp-0 0))
|
||||
(.svf (&-> (-> gp-0 1) quad 0) vf0)
|
||||
(set! (-> gp-0 1 vector 0 y) (- (-> s4-0 player-weight)))
|
||||
(let ((v1-162 s5-0)
|
||||
(a1-38 (-> gp-0 1 vector 2))
|
||||
(a2-27 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-162 state) a1-38 (the-as vector a2-27))
|
||||
)
|
||||
0
|
||||
)
|
||||
(rigid-body-object-method-50 obj arg0)
|
||||
(vehicle-method-99 obj arg0)
|
||||
(when (not (logtest? (-> obj flags) (rigid-body-object-flag dead)))
|
||||
(set! (-> gp-0 1 trans quad) (-> s5-0 state lin-momentum quad))
|
||||
(set! (-> gp-0 1 trans y) 0.0)
|
||||
(vector-normalize! (-> gp-0 1 trans) 1.0)
|
||||
(let* ((v1-174 (-> s5-0 state lin-velocity))
|
||||
(f0-90 (/ (sqrtf (+ (* (-> v1-174 x) (-> v1-174 x)) (* (-> v1-174 z) (-> v1-174 z)))) (-> s4-0 max-xz-speed)))
|
||||
(v1-176 (-> gp-0 1))
|
||||
(a0-65 (-> gp-0 1 trans))
|
||||
(f1-67 -1.0)
|
||||
(f2-29 (* (-> s4-0 speed-limiting-drag) (vector-dot (-> s5-0 state force) (-> gp-0 1 trans))))
|
||||
(f3-19
|
||||
(* (fabs (-> obj engine-thrust)) (-> s4-0 speed-scrubbing-drag) (vector-length (-> s5-0 state lin-momentum)))
|
||||
)
|
||||
(f4-6 (- 1.0 (fabs (vector-dot (-> s5-0 state matrix vector 2) (-> gp-0 1 trans)))))
|
||||
)
|
||||
(vector-float*! (the-as vector v1-176) a0-65 (* f1-67 (+ f2-29 (* f3-19 (* f4-6 f4-6))) (sqrtf f0-90)))
|
||||
)
|
||||
(let ((a1-51 (-> gp-0 1)))
|
||||
(rigid-body-method-20 (-> s5-0 state) (the-as vector a1-51))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-125 vehicle ((obj vehicle) (arg0 float))
|
||||
(rigid-body-object-method-29 obj arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-126 vehicle ((obj vehicle) (arg0 float))
|
||||
(rigid-body-object-method-29 obj arg0)
|
||||
(none)
|
||||
)
|
||||
|
@ -323,7 +323,7 @@
|
||||
(cond
|
||||
((logtest? (-> self rbody state flags) (rigid-body-flag enable-physics))
|
||||
(let ((gp-2 (new 'stack-no-clear 'rigid-body-info)))
|
||||
(mem-copy! (&-> gp-2 mass) (&-> (-> self info-override) mass) 188)
|
||||
(mem-copy! (&-> gp-2 mass) (the-as pointer (-> self info-override info)) 188)
|
||||
(set! (-> self rbody state info) (the-as rigid-body-info (&-> gp-2 mass)))
|
||||
(set! (-> gp-2 bounce-mult-factor) 0.0)
|
||||
(set! (-> gp-2 bounce-factor) 0.4)
|
||||
@ -332,7 +332,7 @@
|
||||
(set! (-> gp-2 friction-factor) 0.05)
|
||||
)
|
||||
(vehicle-method-121 self)
|
||||
(set! (-> self rbody state info) (the-as rigid-body-info (&-> (-> self info-override) mass)))
|
||||
(set! (-> self rbody state info) (-> self info-override info))
|
||||
(when (logtest? (-> self flags) (rigid-body-object-flag disturbed))
|
||||
(let* ((f0-14 (* 0.0033333334 (the float (- (-> self clock frame-counter) (-> self disturbed-time)))))
|
||||
(f0-17 (* f0-14 f0-14 (-> self camera-dist2)))
|
||||
|
@ -308,13 +308,13 @@ This commonly includes things such as:
|
||||
(vector-matrix*! (the-as vector (-> s5-0 matrices)) (-> s5-0 matrices 0 vector 1) (-> s5-0 matrices 2))
|
||||
(set! (-> s5-0 floats 0) 81920.0)
|
||||
(dotimes (s2-1 (-> obj info-override grab-rail-count))
|
||||
(let ((s1-0 (+ (-> obj info-override grab-rail-array) (* 48 s2-1))))
|
||||
(vector-! (-> s5-0 matrices 0 trans) (the-as vector (-> s5-0 matrices)) (the-as vector (+ s1-0 0)))
|
||||
(let ((s1-0 (-> obj info-override grab-rail-array s2-1)))
|
||||
(vector-! (-> s5-0 matrices 0 trans) (the-as vector (-> s5-0 matrices)) (the-as vector (-> s1-0 local-pos)))
|
||||
(when #t
|
||||
(let ((f30-0 (vector-segment-distance-point!
|
||||
(the-as vector (-> s5-0 matrices))
|
||||
(the-as vector (+ s1-0 0))
|
||||
(the-as vector (+ s1-0 16))
|
||||
(the-as vector (-> s1-0 local-pos))
|
||||
(-> s1-0 local-pos 1)
|
||||
(-> s5-0 matrices 0 trans)
|
||||
)
|
||||
)
|
||||
@ -322,7 +322,7 @@ This commonly includes things such as:
|
||||
(when (< f30-0 (-> s5-0 floats 0))
|
||||
(set! (-> s5-0 floats 0) f30-0)
|
||||
(set! (-> s5-0 vectors 0 quad) (-> s5-0 matrices 0 trans quad))
|
||||
(vector-! (-> s5-0 vectors 1) (the-as vector (+ s1-0 16)) (the-as vector (+ s1-0 0)))
|
||||
(vector-! (-> s5-0 vectors 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos)))
|
||||
(vector-normalize! (-> s5-0 vectors 1) 1.0)
|
||||
(set! s3-0 #t)
|
||||
(set! (-> s5-0 floats 3) (* (-> obj hit-points) (/ 40960.0 f30-0)))
|
||||
@ -699,9 +699,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(set! (-> obj lights-factor) 0.0)
|
||||
(let ((a0-8 (-> obj info-override color-option-select)))
|
||||
(set! (-> obj draw color-mult quad)
|
||||
(-> (the-as (pointer uint128) (+ (the-as uint (-> obj info-override color-option-array)) (* a0-8 16))))
|
||||
)
|
||||
(set! (-> obj draw color-mult quad) (-> obj info-override color-option-array a0-8 quad))
|
||||
)
|
||||
(+! (-> obj info-override color-option-select) 1)
|
||||
(when (>= (-> obj info-override color-option-select) (-> obj info-override color-option-count))
|
||||
@ -1054,7 +1052,11 @@ This commonly includes things such as:
|
||||
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-physics))
|
||||
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override-2 trans) (-> obj root-override-2 quat))
|
||||
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info-override mass))
|
||||
(vector-float*!
|
||||
(-> obj rbody state lin-momentum)
|
||||
(-> obj root-override-2 transv)
|
||||
(-> obj info-override info mass)
|
||||
)
|
||||
(vector-reset! (-> obj rbody state ang-momentum))
|
||||
(vector-reset! (-> obj lin-acceleration))
|
||||
)
|
||||
@ -1217,7 +1219,7 @@ This commonly includes things such as:
|
||||
(let ((v1-0 (-> arg0 behavior)))
|
||||
(cond
|
||||
((= v1-0 1)
|
||||
((method-of-object obj vehicle-method-135))
|
||||
(vehicle-method-135 obj arg0)
|
||||
(vehicle-method-113 obj)
|
||||
)
|
||||
((zero? v1-0)
|
||||
|
@ -90,8 +90,8 @@
|
||||
(let* ((f0-0 1.0)
|
||||
(f1-0 (-> arg0 impulse))
|
||||
(f2-0 61440.0)
|
||||
(f30-0 (fmin f0-0 (* f1-0 (/ 1.0 f2-0) (-> obj info-override inv-mass))))
|
||||
(f28-0 (* (-> obj info-override mass) (-> obj info-override toughness-factor)))
|
||||
(f30-0 (fmin f0-0 (* f1-0 (/ 1.0 f2-0) (-> obj info-override info inv-mass))))
|
||||
(f28-0 (* (-> obj info-override info mass) (-> obj info-override toughness-factor)))
|
||||
)
|
||||
(set! (-> obj crash-impulse) (-> arg0 impulse))
|
||||
(cond
|
||||
@ -131,7 +131,7 @@
|
||||
)
|
||||
(if (< 0.1 f30-0)
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override glance-sound))
|
||||
(-> obj info-override glance-sound)
|
||||
(new-sound-id)
|
||||
(the int (* 1024.0 f30-0))
|
||||
0
|
||||
@ -144,7 +144,7 @@
|
||||
)
|
||||
(when (< (* 102400.0 f28-0) (-> arg0 impulse))
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override impact-sound))
|
||||
(-> obj info-override impact-sound)
|
||||
(new-sound-id)
|
||||
(the int (* 1024.0 f30-0))
|
||||
0
|
||||
@ -1541,13 +1541,13 @@
|
||||
(and (logtest? (-> arg1 mask) (attack-info-mask mode)) (= (-> arg1 mode) 'eco-dark))
|
||||
)
|
||||
(set! (-> s5-0 vector 2 y) (* 0.1 (-> s5-0 vector 2 y)))
|
||||
(set! f0-2 (* 409600.0 (-> obj info-override mass)))
|
||||
(set! f0-2 (* 409600.0 (-> obj info-override info mass)))
|
||||
(/ 0.4 (-> obj info-override damage-factor))
|
||||
)
|
||||
((or (logtest? (penetrate dark-punch dark-bomb) arg3)
|
||||
(and (logtest? (penetrate dark-skin) arg3) (logtest? arg3 (penetrate punch spin)))
|
||||
)
|
||||
(set! f0-2 (* 204800.0 (-> obj info-override mass)))
|
||||
(set! f0-2 (* 204800.0 (-> obj info-override info mass)))
|
||||
(/ 0.2 (-> obj info-override damage-factor))
|
||||
)
|
||||
((logtest? (penetrate enemy-yellow-shot) arg3)
|
||||
@ -1679,7 +1679,7 @@
|
||||
)
|
||||
(let ((f0-1 (vector-dot (-> s5-0 velocity) (-> s5-0 normal))))
|
||||
(b! (>= f0-1 0.0) cfg-32 :delay #f)
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info-override inv-mass))))
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info-override info inv-mass))))
|
||||
)
|
||||
(vector+float*! s2-0 s2-0 (-> s5-0 normal) (* -3.1 f30-0 (-> s5-0 impulse)))
|
||||
(set! (-> s2-0 y) (fmax (* 49152.0 f30-0) (-> s2-0 y)))
|
||||
@ -1884,7 +1884,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-135 vehicle ()
|
||||
(defmethod vehicle-method-135 vehicle ((obj vehicle) (arg0 traffic-object-spawn-params))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
@ -6,4 +6,3 @@
|
||||
;; dgos: CIA
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
@ -6,4 +6,3 @@
|
||||
;; dgos: CIB
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,3 +7,270 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype water-anim-ctypal (water-anim)
|
||||
()
|
||||
:heap-base #x80
|
||||
:method-count-assert 29
|
||||
:size-assert #x100
|
||||
:flag-assert #x1d00800100
|
||||
)
|
||||
|
||||
|
||||
(define ripple-for-water-anim-ctypal (new 'static 'ripple-wave-set
|
||||
:count 3
|
||||
:converted #f
|
||||
:normal-scale 1.0
|
||||
:wave (new 'static 'inline-array ripple-wave 4
|
||||
(new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75)
|
||||
(new 'static 'ripple-wave)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define ripple-ctypal-smlground-pool (new 'static 'ripple-wave-set
|
||||
:count 3
|
||||
:converted #f
|
||||
:normal-scale 1.0
|
||||
:wave (new 'static 'inline-array ripple-wave 4
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv -1 :zdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv 1 :zdiv 1 :speed 0.75)
|
||||
(new 'static 'ripple-wave)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch ripple-wave-set vs none.
|
||||
(defmethod init-water! water-anim-ctypal ((obj water-anim-ctypal))
|
||||
"Initialize a [[water-anim]]'s default settings, this may include applying a [[riple-control]]"
|
||||
(let ((t9-0 (method-of-type water-anim init-water!)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((v1-2 (new 'process 'ripple-control)))
|
||||
(set! (-> obj draw ripple) v1-2)
|
||||
(set-vector! (-> obj draw color-mult) 0.01 0.45 0.5 0.75)
|
||||
(set! (-> v1-2 global-scale) 3072.0)
|
||||
(set! (-> v1-2 close-fade-dist) 163840.0)
|
||||
(set! (-> v1-2 far-fade-dist) 245760.0)
|
||||
(set! (-> v1-2 waveform) ripple-for-water-anim-ctypal)
|
||||
(case (-> obj look)
|
||||
((32 30)
|
||||
(set! (-> v1-2 waveform) ripple-ctypal-smlground-pool)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defskelgroup skel-palace-door palace-door palace-door-lod0-jg palace-door-idle-ja
|
||||
((palace-door-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 30 0 36)
|
||||
)
|
||||
|
||||
(deftype palace-door (com-airlock)
|
||||
()
|
||||
:heap-base #x100
|
||||
:method-count-assert 28
|
||||
:size-assert #x174
|
||||
:flag-assert #x1c01000174
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! palace-door ((obj palace-door) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 122880.0 0.0 147456.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-7 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-7 transform-index) 3)
|
||||
(set-vector! (-> v1-7 local-sphere) 0.0 57344.0 0.0 90112.0)
|
||||
)
|
||||
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-9 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-9 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-9 transform-index) 5)
|
||||
(set-vector! (-> v1-9 local-sphere) 0.0 -61440.0 0.0 73728.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-12 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override) s5-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-palace-door" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(init-airlock! obj)
|
||||
(set! (-> obj pre-open-frame) 48.0)
|
||||
(set! (-> obj lock-frame) 60.0)
|
||||
(set! (-> obj open-frame) 60.0)
|
||||
(set! (-> obj sound-pre-open) (static-sound-spec "pal-door-open-1"))
|
||||
(set! (-> obj sound-open) (static-sound-spec "pal-door-open-2"))
|
||||
(set! (-> obj sound-close) (static-sound-spec "pal-door-close"))
|
||||
(set! (-> obj sound-post-close) (static-sound-spec "pal-door-close2"))
|
||||
(set! (-> obj sound-behind?) #t)
|
||||
(set! (-> obj door-radius) 40960.0)
|
||||
(go (method-of-object obj close) #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctypal-broke-wall (process-drawable)
|
||||
((ent basic :offset-assert 200)
|
||||
)
|
||||
:heap-base #x50
|
||||
:method-count-assert 22
|
||||
:size-assert #xcc
|
||||
:flag-assert #x16005000cc
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(done () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-ctypal-broke-wall ctypal-broke-wall ctypal-broke-wall-lod0-jg ctypal-broke-wall-idle-ja
|
||||
((ctypal-broke-wall-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 10 0 20)
|
||||
)
|
||||
|
||||
(defstate idle (ctypal-broke-wall)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (task-node-closed? (game-task-node canyon-insert-items-resolution))
|
||||
(format 0 "~A canyon-insert-items-resolution done~%" (-> self name))
|
||||
(process-drawable-from-entity! self (the-as entity-actor (-> self ent)))
|
||||
(go-virtual done)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (the-as (function none :behavior ctypal-broke-wall) sleep-code)
|
||||
:post (behavior ()
|
||||
(transform-post)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate done (ctypal-broke-wall)
|
||||
:virtual #t
|
||||
:code (the-as (function none :behavior ctypal-broke-wall) sleep-code)
|
||||
:post (behavior ()
|
||||
(transform-post)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ctypal-broke-wall ((obj ctypal-broke-wall) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(format #t "~A initialising~%" (-> obj name))
|
||||
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 40960.0 0.0 122880.0)
|
||||
(set! (-> s4-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s4-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root) s4-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctypal-broke-wall" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(let ((v1-10 (-> obj root)))
|
||||
(format
|
||||
0
|
||||
"trans ~F ~F ~F~%"
|
||||
(* 0.00024414062 (-> v1-10 trans x))
|
||||
(* 0.00024414062 (-> v1-10 trans y))
|
||||
(* 0.00024414062 (-> v1-10 trans z))
|
||||
)
|
||||
)
|
||||
(set! (-> obj ent) arg0)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctypal-baron-statue-broken (process-drawable)
|
||||
()
|
||||
:heap-base #x50
|
||||
:method-count-assert 21
|
||||
:size-assert #xc8
|
||||
:flag-assert #x15005000c8
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-ctypal-baron-statue-broken ctypal-baron-statue-broken ctypal-baron-statue-broken-lod0-jg ctypal-baron-statue-broken-idle-ja
|
||||
((ctypal-baron-statue-broken-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 5 0 72)
|
||||
)
|
||||
|
||||
(defmethod run-logic? ctypal-baron-statue-broken ((obj ctypal-baron-statue-broken))
|
||||
#t
|
||||
)
|
||||
|
||||
(defstate idle (ctypal-baron-statue-broken)
|
||||
:virtual #t
|
||||
:code (the-as (function none :behavior ctypal-baron-statue-broken) sleep-code)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ctypal-baron-statue-broken ((obj ctypal-baron-statue-broken) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-ctypal-baron-statue-broken" (the-as (pointer uint32) #f))
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(if (not (task-node-closed? (game-task-node canyon-insert-items-resolution)))
|
||||
(logior! (-> obj draw status) (draw-control-status no-draw))
|
||||
)
|
||||
(ja-post)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,3 +7,334 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype com-elevator (elevator)
|
||||
((camera-startup vector 2 :inline :offset-assert 368)
|
||||
(use-camera-startup? symbol 2 :offset-assert 400)
|
||||
(sound-id sound-id :offset-assert 408)
|
||||
)
|
||||
:heap-base #x120
|
||||
:method-count-assert 50
|
||||
:size-assert #x19c
|
||||
:flag-assert #x320120019c
|
||||
(:methods
|
||||
(com-elevator-method-49 (_type_ symbol) none 49)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-com-elevator com-elevator com-elevator-lod0-jg com-elevator-idle-ja
|
||||
((com-elevator-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 5.6 9.2)
|
||||
)
|
||||
|
||||
(defmethod get-art-group com-elevator ((obj com-elevator))
|
||||
"@returns The associated [[art-group]]"
|
||||
(art-group-get-by-name *level* "skel-com-elevator" (the-as (pointer uint32) #f))
|
||||
)
|
||||
|
||||
(defmethod move-between-points com-elevator ((obj com-elevator) (arg0 vector) (arg1 float) (arg2 float))
|
||||
"Move between two points on the elevator's path
|
||||
@param vec TODO not sure
|
||||
@param point-a The first point fetched from the elevator's path
|
||||
@param point-b The second point fetched from the path
|
||||
@see [[path-control]] and [[elevator]]"
|
||||
(let ((s4-0 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg1 'interp))
|
||||
(a0-3 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg2 'interp))
|
||||
(v1-3 (-> obj root-override trans))
|
||||
)
|
||||
(when (and (< (-> a0-3 y) (-> s4-0 y)) (< (-> arg0 y) (+ -8192.0 (-> v1-3 y))))
|
||||
(let ((s4-2 (vector-! (new 'stack-no-clear 'vector) arg0 v1-3)))
|
||||
(vector-inv-orient-by-quat! s4-2 s4-2 (-> obj root-override quat))
|
||||
(and (< (fabs (-> s4-2 x)) 24576.0) (< 0.0 (-> s4-2 z)) (< (-> s4-2 z) 49152.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod commited-to-ride? com-elevator ((obj com-elevator))
|
||||
"@returns if the target is considered within the elevator area enough to begin descending/ascending"
|
||||
(with-pp
|
||||
(let* ((s5-0 *target*)
|
||||
(a0-2 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(and (when a0-2
|
||||
(let* ((v1-2 (get-trans a0-2 0))
|
||||
(s5-2 (vector-! (new 'stack-no-clear 'vector) v1-2 (-> obj root-override trans)))
|
||||
)
|
||||
(vector-inv-orient-by-quat! s5-2 s5-2 (-> obj root-override quat))
|
||||
(and (< (fabs (-> s5-2 x)) 20480.0) (< 0.0 (-> s5-2 z)) (< (-> s5-2 z) 40960.0))
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (res-lump-struct (-> obj entity) 'on-notice structure)))
|
||||
(not (if gp-1
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (the-as vector #f))
|
||||
(the-as pair gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod com-elevator-method-49 com-elevator ((obj com-elevator) (arg0 symbol))
|
||||
(let ((v1-3 (-> (the-as collide-shape-prim-group (-> obj root-override root-prim)) child 1)))
|
||||
(cond
|
||||
(arg0
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-3 prim-core collide-with) (collide-spec jak player-list))
|
||||
)
|
||||
(else
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-3 prim-core collide-with) (collide-spec))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate dormant (com-elevator)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-1 (-> (the-as state (find-parent-method com-elevator 34)) enter)))
|
||||
(if t9-1
|
||||
((the-as (function none) t9-1))
|
||||
)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #t)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate running (com-elevator)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type elevator running) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(com-elevator-method-49 self #t)
|
||||
(if (not (logtest? (-> self elevator-status) (elevator-status moving)))
|
||||
(set-setting! 'allow-look-around #f 0 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(sound-stop (-> self sound-id))
|
||||
(sound-play "com-elevator-e")
|
||||
(let ((t9-3 (-> (method-of-type elevator running) exit)))
|
||||
(if t9-3
|
||||
(t9-3)
|
||||
)
|
||||
)
|
||||
(com-elevator-method-49 self #f)
|
||||
(remove-setting! 'allow-look-around)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(sound-play "com-elevator-s")
|
||||
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
(until #f
|
||||
(suspend)
|
||||
(sound-play "com-elevator-lp" :id (-> self sound-id))
|
||||
(when (= (-> self path-pos) 1.0)
|
||||
(let ((v1-11 (the int (-> self move-pos 1))))
|
||||
(if (-> self use-camera-startup? v1-11)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
'string-startup-vector
|
||||
(seconds 0.05)
|
||||
'string-startup-vector
|
||||
'abs
|
||||
(the-as float (-> self camera-startup v1-11))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod activate-elevator com-elevator ((obj com-elevator))
|
||||
"Puts the elevator initially into the correct state. This is typically based upon game completion"
|
||||
(cond
|
||||
((logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete))
|
||||
(go (method-of-object obj dormant))
|
||||
)
|
||||
((logtest? (-> obj params flags) (elevator-flags elevator-flags-6))
|
||||
(go (method-of-object obj arrived))
|
||||
)
|
||||
(else
|
||||
(go (method-of-object obj waiting))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod deactivate com-elevator ((obj com-elevator))
|
||||
(sound-stop (-> obj sound-id))
|
||||
((the-as (function elevator none) (find-parent-method com-elevator 10)) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod init-plat! com-elevator ((obj com-elevator))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
(dotimes (s5-0 (-> obj path curve num-cverts))
|
||||
(let ((a1-1 (res-lump-struct (-> obj entity) 'string-startup-vector structure :time (the float s5-0))))
|
||||
(cond
|
||||
(a1-1
|
||||
(vector-normalize-copy! (-> obj camera-startup s5-0) (the-as vector a1-1) 1.0)
|
||||
(set! (-> obj use-camera-startup? s5-0) #t)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj use-camera-startup? s5-0) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-plat-collision! com-elevator ((obj com-elevator))
|
||||
"TODO - collision stuff for setting up the platform"
|
||||
(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)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> s4-0 transform-index) 3)
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 22937.6 37683.2)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(pusher-init s5-0)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
|
||||
(set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-15 transform-index) 3)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 22937.6 37683.2)
|
||||
)
|
||||
(let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-17 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-17 transform-index) 3)
|
||||
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 22937.6 39321.6)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-20 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override) s5-0)
|
||||
)
|
||||
(com-elevator-method-49 obj #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype tomb-trans-elevator (com-elevator)
|
||||
((unknown-gijh1bn2i3hb1 int32 :offset-assert 412)
|
||||
)
|
||||
:heap-base #x120
|
||||
:method-count-assert 50
|
||||
:size-assert #x1a0
|
||||
:flag-assert #x32012001a0
|
||||
)
|
||||
|
||||
|
||||
(defstate running (tomb-trans-elevator)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type com-elevator running) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self elevator-status) (elevator-status waiting-to-descend))
|
||||
(set-setting! 'jump #f 0 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type com-elevator running) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(sound-stop (-> self sound-id))
|
||||
(sound-play "tmb-elev-stop")
|
||||
(if (logtest? (-> self elevator-status) (elevator-status waiting-to-descend))
|
||||
(remove-setting! 'jump)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
(until #f
|
||||
(sound-play "tmb-elevator-lp" :id (-> self sound-id))
|
||||
(suspend)
|
||||
(when (= (-> self path-pos) 1.0)
|
||||
(let ((v1-10 (the int (-> self move-pos 1))))
|
||||
(if (-> self use-camera-startup? v1-10)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
'string-startup-vector
|
||||
(seconds 0.05)
|
||||
'string-startup-vector
|
||||
'abs
|
||||
(the-as float (-> self camera-startup v1-10))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod deactivate tomb-trans-elevator ((obj tomb-trans-elevator))
|
||||
(sound-stop (-> obj sound-id))
|
||||
((the-as (function com-elevator none) (find-parent-method tomb-trans-elevator 10)) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod init-plat! tomb-trans-elevator ((obj tomb-trans-elevator))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
((the-as (function com-elevator none) (find-parent-method tomb-trans-elevator 33)) obj)
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(none)
|
||||
)
|
||||
|
@ -5,7 +5,7 @@
|
||||
;; name in dgo: race-manager
|
||||
;; dgos: STD, STC, LERLCHAL, STB, LPRTRACE
|
||||
|
||||
(define-extern race-start (function int symbol symbol object))
|
||||
(define-extern race-start (function int symbol symbol process))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
@ -66,15 +66,15 @@
|
||||
)
|
||||
|
||||
(define *dig-sinking-platform-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:cm-joint (new 'static 'vector :y -8192.0 :w 1.0)
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 6)
|
||||
:inertial-tensor-y (meters 4)
|
||||
:inertial-tensor-z (meters 6)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :y -8192.0 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 4) (meters 6))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
|
@ -373,24 +373,25 @@
|
||||
:bounds (static-spherem 0 0 0 1.5)
|
||||
)
|
||||
|
||||
(define *dig-bomb-crate-cylinder-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 1)
|
||||
:inertial-tensor-y (meters 3)
|
||||
:inertial-tensor-z (meters 1)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
:attack-force-scale 2.0
|
||||
:name '*dig-bomb-crate-cylinder-constants*
|
||||
)
|
||||
)
|
||||
(define *dig-bomb-crate-cylinder-constants*
|
||||
(new 'static 'rigid-body-object-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1) (meters 3) (meters 1))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
:attack-force-scale 2.0
|
||||
:name '*dig-bomb-crate-cylinder-constants*
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (dig-bomb-crate-cylinder)
|
||||
:virtual #t
|
||||
@ -656,9 +657,9 @@
|
||||
(defmethod rigid-body-object-method-45 dig-bomb-crate-cylinder ((obj dig-bomb-crate-cylinder) (arg0 rigid-body-impact))
|
||||
(let* ((f0-0 (-> arg0 impulse))
|
||||
(f1-0 28672.0)
|
||||
(f30-0 (* f0-0 (/ 1.0 f1-0) (-> obj info inv-mass)))
|
||||
(f30-0 (* f0-0 (/ 1.0 f1-0) (-> obj info info inv-mass)))
|
||||
)
|
||||
(if (< (* 28672.0 (-> obj info mass)) (-> arg0 impulse))
|
||||
(if (< (* 28672.0 (-> obj info info mass)) (-> arg0 impulse))
|
||||
(sound-play-by-name
|
||||
(static-sound-name "barrel-bomb-hit")
|
||||
(new-sound-id)
|
||||
@ -781,8 +782,8 @@
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 quat))
|
||||
(rigid-body-object-method-33 self)
|
||||
(set! (-> self mask) (logior (process-mask platform) (-> self mask)))
|
||||
(vector-float*! (-> self rbody state lin-momentum) (-> arg0 vel) (-> self info mass))
|
||||
(vector-float*! (-> self rbody state ang-momentum) (-> arg0 avel) (-> self info mass))
|
||||
(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))
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
|
@ -524,8 +524,7 @@ This commonly includes things such as:
|
||||
|
||||
;; WARN: Return type mismatch time-frame vs sound-id.
|
||||
(defmethod play-impact-sound! dig-spikey-sphere ((obj dig-spikey-sphere))
|
||||
"Plays impact sound
|
||||
:virtual"
|
||||
"Plays impact sound"
|
||||
(let* ((a0-1 (-> obj root-override))
|
||||
(s5-0 (-> a0-1 status))
|
||||
)
|
||||
@ -622,8 +621,7 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
(defmethod init-proj-settings! dig-spikey-sphere ((obj dig-spikey-sphere))
|
||||
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
|
||||
:virtual"
|
||||
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
|
||||
(with-pp
|
||||
(set! (-> obj attack-mode) 'eco-dark)
|
||||
(initialize-skeleton
|
||||
@ -1340,15 +1338,15 @@ This commonly includes things such as:
|
||||
|
||||
|
||||
(define *dig-tipping-rock-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:cm-joint (new 'static 'vector :z -24576.0 :w 1.0)
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 4)
|
||||
:inertial-tensor-y (meters 3)
|
||||
:inertial-tensor-z (meters 21)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :z -24576.0 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 21))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
@ -1613,16 +1611,16 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
(define *dig-stomp-block-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 1)
|
||||
:inertial-tensor-y (meters 3)
|
||||
:inertial-tensor-z (meters 1)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1) (meters 3) (meters 1))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
@ -1706,11 +1704,11 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 x) (rand-vu-float-range -40960.0 40960.0))
|
||||
(set! (-> s5-0 y) (rand-vu-float-range -40960.0 0.0))
|
||||
(set! (-> s5-0 z) (rand-vu-float-range -40960.0 40960.0))
|
||||
(vector-float*! (-> self rbody state lin-momentum) s5-0 (-> self info mass))
|
||||
(vector-float*! (-> self rbody state lin-momentum) s5-0 (-> self info info mass))
|
||||
(set! (-> gp-0 x) (rand-vu-float-range -10000.0 10000.0))
|
||||
(set! (-> gp-0 y) (rand-vu-float-range -10000.0 10000.0))
|
||||
(set! (-> gp-0 z) (rand-vu-float-range -10000.0 10000.0))
|
||||
(vector-float*! (-> self rbody state ang-momentum) gp-0 (-> self info mass))
|
||||
(vector-float*! (-> self rbody state ang-momentum) gp-0 (-> self info info mass))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,3 +7,283 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod draw hud-turret ((obj hud-turret))
|
||||
(set-hud-piece-position!
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
(the int (+ 457.0 (* 130.0 (-> obj offset))))
|
||||
205
|
||||
)
|
||||
(format (clear (-> obj strings 0 text)) "~D" (-> obj values 0 current))
|
||||
(set-as-offset-from! (the-as hud-sprite (-> obj strings 0 pos)) (the-as vector4w (-> obj sprites)) -19 22)
|
||||
((method-of-type hud draw) obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod update-values hud-turret ((obj hud-turret))
|
||||
(set! (-> obj values 0 target) (the int (-> *game-info* counter)))
|
||||
((method-of-type hud update-values) obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-callback hud-turret ((obj hud-turret))
|
||||
(set! (-> obj level) (level-get *level* 'ctywide))
|
||||
(set! (-> obj gui-id)
|
||||
(add-process *gui-control* obj (gui-channel hud-middle-right) (gui-action hidden) (-> obj name) 81920.0 0)
|
||||
)
|
||||
(logior! (-> obj flags) (hud-flags show))
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x8 :page #x679)))
|
||||
(set! (-> obj sprites 0 flags) (the-as uint 4))
|
||||
(set! (-> obj sprites 0 scale-x) 1.2)
|
||||
(set! (-> obj sprites 0 scale-y) 1.2)
|
||||
(alloc-string-if-needed obj 0)
|
||||
(set! (-> obj strings 0 scale) 0.6)
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *city-power-switch-on-position* (new 'static 'boxed-array :type vector
|
||||
(new 'static 'vector :x 2336358.5 :y 32768.0 :z -935526.4 :w 1.0)
|
||||
(new 'static 'vector :x 4273357.0 :y 32645.12 :z 4159078.5 :w 1.0)
|
||||
(new 'static 'vector :x 4059136.0 :y 32768.0 :z 2203648.0 :w 1.0)
|
||||
(new 'static 'vector :x 3387392.0 :y 32768.0 :z 2748416.0 :w 1.0)
|
||||
(new 'static 'vector :x 3854336.0 :y 32768.0 :z 745472.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(when (not (task-node-closed? (game-task-node city-power-resolution)))
|
||||
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
|
||||
(set! (-> self begin-pos quad) (-> (new 'static 'vector :x -282624.0 :y 45056.0 :z 5464064.0 :w 1.0) quad))
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(set! (-> self max-count) 5)
|
||||
(set! (-> self count) 0)
|
||||
(set! (-> *game-info* counter) 5.0)
|
||||
(dotimes (v1-9 5)
|
||||
(set! (-> self data-int32 v1-9) 0)
|
||||
)
|
||||
(set! (-> self slave 10) (the-as handle #f))
|
||||
(dotimes (gp-0 (-> self max-count))
|
||||
(set! (-> self data-vector gp-0 quad) (-> *city-power-switch-on-position* gp-0 quad))
|
||||
(set! (-> self minimap gp-0)
|
||||
(add-icon! *minimap* self (the-as uint 15) (the-as int #f) (-> *city-power-switch-on-position* gp-0) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
1
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(send-event *traffic-manager* 'restore-default-settings)
|
||||
(dotimes (v1-3 (-> self max-count))
|
||||
(when (-> self minimap v1-3)
|
||||
(logior! (-> self minimap v1-3 flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap v1-3) #f)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
2
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(when (not (task-node-closed? (game-task-node city-power-resolution)))
|
||||
(check-time self)
|
||||
(set! (-> self count) 0)
|
||||
(dotimes (v1-3 (-> self max-count))
|
||||
(if (>= 1 (-> self data-int32 v1-3))
|
||||
(+! (-> self count) 1)
|
||||
)
|
||||
)
|
||||
(if (= (-> self count) (-> self max-count))
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
)
|
||||
(set! (-> *game-info* counter) (the float (-> self count)))
|
||||
)
|
||||
(when (or (zero? (-> self count)) (task-node-closed? (game-task-node city-power-resolution)))
|
||||
(when (zero? (-> self count))
|
||||
(talker-spawn-func (-> *talker-speech* 92) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(task-node-close! (game-task-node city-power-resolution))
|
||||
(send-event (handle->process (-> self hud-timer)) 'hide-and-die)
|
||||
(send-event (handle->process (-> self hud-counter)) 'hide-and-die)
|
||||
(set! (-> self fail-on-death?) #f)
|
||||
)
|
||||
(cond
|
||||
((handle->process (-> self slave 10))
|
||||
(let ((gp-1 (handle->process (-> self slave 10))))
|
||||
(when (and gp-1
|
||||
(< 40960.0 (vector-vector-xz-distance (-> (the-as process-drawable gp-1) root trans) (target-pos 0)))
|
||||
)
|
||||
(send-event gp-1 'close)
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set! (-> self hud-counter) (ppointer->handle (process-spawn hud-turret :init hud-init-by-other :to self)))
|
||||
(send-event *traffic-manager* 'set-target-level #x3f800000)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 5))
|
||||
(suspend)
|
||||
)
|
||||
(send-event *traffic-manager* 'set-alert-level 1)
|
||||
(send-event *traffic-manager* 'set-alert-duration #xa4cb80)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
5
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(dotimes (v1-0 (-> self max-count))
|
||||
(when (-> self minimap v1-0)
|
||||
(logior! (-> self minimap v1-0 flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap v1-0) #f)
|
||||
)
|
||||
)
|
||||
(kill-all-children self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
(task-node-close! (game-task-node city-power-post-win))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
6
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
((arg0 process-drawable) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((gp-0 (-> (level-get *level* 'lpower) entity data 0 entity)))
|
||||
(cond
|
||||
((= arg2 'guard-turret-status)
|
||||
(let ((v1-5 (-> arg3 param 0)))
|
||||
(let ((a0-2 (the-as object (-> arg3 param 1))))
|
||||
(set! (-> *city-power-switch-on-position* v1-5 quad) (-> (the-as vector a0-2) quad))
|
||||
)
|
||||
(-> self data-int32 v1-5)
|
||||
)
|
||||
)
|
||||
((= arg2 'guard-turret-killed)
|
||||
(let ((s4-1 (-> arg3 param 0)))
|
||||
(set! (-> self data-int32 s4-1) 1)
|
||||
(let ((v1-12 (process-spawn
|
||||
cty-guard-turret-button
|
||||
:init basebutton-init-by-other
|
||||
gp-0
|
||||
(-> arg0 root trans)
|
||||
(-> arg0 root quat)
|
||||
(-> arg0 entity)
|
||||
#f
|
||||
0
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self slave (-> self data-int32 s4-1)) (ppointer->handle v1-12))
|
||||
(set! (-> (the-as basebutton (-> v1-12 0)) event-down) 'button-down)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
((= arg2 'guard-turret-button-pushed)
|
||||
(let ((v1-21 (-> arg3 param 0)))
|
||||
(set! (-> self data-int32 v1-21) 2)
|
||||
(set! (-> self slave 10) (process->handle arg0))
|
||||
(logior! (-> self minimap v1-21 flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap v1-21) #f)
|
||||
)
|
||||
#t
|
||||
)
|
||||
((= arg2 'spawn-button)
|
||||
(let ((s4-2 (-> arg3 param 0))
|
||||
(s3-2 (-> arg3 param 1))
|
||||
)
|
||||
(when (not (handle->process (-> self slave (-> self data-int32 s4-2))))
|
||||
(let ((v0-1 (the-as object (ppointer->handle (process-spawn
|
||||
cty-guard-turret-button
|
||||
:init basebutton-init-by-other
|
||||
gp-0
|
||||
(-> arg0 root trans)
|
||||
(-> arg0 root quat)
|
||||
(-> arg0 entity)
|
||||
s3-2
|
||||
0
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self slave (-> self data-int32 s4-2)) (the-as handle v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -7,3 +7,301 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype vin-turbine (process-drawable)
|
||||
((dont-draw-outside? symbol :offset-assert 200)
|
||||
(lightning-timer uint64 :offset-assert 208)
|
||||
(outside-plane plane :inline :offset-assert 224)
|
||||
(lightning-plane plane :inline :offset-assert 240)
|
||||
)
|
||||
:heap-base #x80
|
||||
:method-count-assert 22
|
||||
:size-assert #x100
|
||||
:flag-assert #x1600800100
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(dormant () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defpart 1245
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 60))
|
||||
(sp-flt spt-rot-x 2048.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 64.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-g 128.0 64.0 1.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 32.0)
|
||||
(sp-int spt-timer 300)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
||||
(sp-flt spt-userdata 1638.4)
|
||||
(sp-int spt-next-time 5)
|
||||
(sp-launcher-by-id spt-next-launcher 167)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1246
|
||||
:init-specs ((sp-flt spt-scale-x (meters 60))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 64.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-g 128.0 64.0 1.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-rnd-flt spt-a 24.0 32.0 1.0)
|
||||
(sp-int spt-next-time 5)
|
||||
(sp-launcher-by-id spt-next-launcher 167)
|
||||
)
|
||||
)
|
||||
|
||||
(set! (-> *lightning-spec-id-table* 17) (new 'static 'lightning-spec
|
||||
:name "lightning-turbine"
|
||||
:flags (lightning-spec-flags lsf2)
|
||||
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
:end-color (new 'static 'rgba :a #x80)
|
||||
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
||||
:fade-start-factor 0.2
|
||||
:fade-time 120.0
|
||||
:texture (new 'static 'texture-id :index #x83 :page #xc)
|
||||
:reduction 0.42
|
||||
:num-points 16
|
||||
:box-size 12288.0
|
||||
:merge-factor 0.5
|
||||
:merge-count 4
|
||||
:radius 2048.0
|
||||
:duration 300.0
|
||||
:sound #f
|
||||
)
|
||||
)
|
||||
|
||||
(defskelgroup skel-vin-turbine vin-turbine vin-turbine-lod0-jg vin-turbine-idle-ja
|
||||
((vin-turbine-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 6)
|
||||
)
|
||||
|
||||
(defstate dormant (vin-turbine)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (>= (vector4-dot (the-as vector (-> self outside-plane)) (math-camera-pos)) 0.0)
|
||||
(go-virtual idle)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (the-as (function none :behavior vin-turbine) sleep-code)
|
||||
)
|
||||
|
||||
(defstate idle (vin-turbine)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(if (and (-> self dont-draw-outside?)
|
||||
(< (vector4-dot (the-as vector (-> self outside-plane)) (math-camera-pos)) 0.0)
|
||||
)
|
||||
(go-virtual dormant)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group)
|
||||
:num! (seek! (the float (+ (-> (ja-group) frames num-frames) -1)))
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post (behavior ()
|
||||
(when (and (or (not (-> self dont-draw-outside?))
|
||||
(>= (vector4-dot (the-as vector (-> self lightning-plane)) (math-camera-pos)) 0.0)
|
||||
)
|
||||
(< (the-as time-frame (-> self lightning-timer)) (-> self clock frame-counter))
|
||||
)
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix))
|
||||
(s3-1
|
||||
(vector-rotate-x! (new 'stack-no-clear 'vector) *y-vector* (* 182.04445 (rand-vu-float-range 10.0 40.0)))
|
||||
)
|
||||
(gp-2 (new 'stack-no-clear 'vector))
|
||||
(s5-1 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(if (rand-vu-percent? 0.5)
|
||||
(vector-negate! s3-1 s3-1)
|
||||
)
|
||||
(vector-rotate-y! s3-1 s3-1 (* 182.04445 (rand-vu-float-range 0.0 360.0)))
|
||||
(vector+float*! gp-2 (-> self root trans) s3-1 15564.8)
|
||||
(set! (-> s5-1 start-pos quad) (-> gp-2 quad))
|
||||
(set-vector!
|
||||
(-> s5-1 move-dist)
|
||||
(rand-vu-float-range -4551.1113 4551.1113)
|
||||
0.0
|
||||
(rand-vu-float-range -910.2222 910.2222)
|
||||
1.0
|
||||
)
|
||||
(matrix-rotate-zyx! s4-0 (-> s5-1 move-dist))
|
||||
(let ((s4-1 (vector-rotate*! (new 'stack-no-clear 'vector) s3-1 s4-0)))
|
||||
(vector-normalize! s4-1 6144.0)
|
||||
(vector+! (-> s5-1 start-pos) (-> s5-1 start-pos) s4-1)
|
||||
(vector-normalize-copy! (-> s5-1 move-dist) s4-1 81920.0)
|
||||
)
|
||||
(let ((v1-17 s5-1))
|
||||
(set! (-> v1-17 radius) 409.6)
|
||||
(set! (-> v1-17 collide-with) (collide-spec backgnd))
|
||||
(set! (-> v1-17 ignore-process0) self)
|
||||
(set! (-> v1-17 ignore-process1) #f)
|
||||
(set! (-> v1-17 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-17 action-mask) (collide-action solid))
|
||||
)
|
||||
(when (>= (fill-and-probe-using-line-sphere *collide-cache* s5-1) 0.0)
|
||||
(set! (-> self lightning-timer)
|
||||
(the-as uint (+ (-> self clock frame-counter) (the int (* 300.0 (rand-vu-float-range 0.1 0.4)))))
|
||||
)
|
||||
(let ((s4-3 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-3 quad) (-> s5-1 best-other-tri intersect quad))
|
||||
(when (< 8192.0 (vector-vector-distance gp-2 s4-3))
|
||||
(let ((s3-2 (process-spawn
|
||||
lightning-tracker
|
||||
:init lightning-tracker-init
|
||||
(-> *lightning-spec-id-table* 17)
|
||||
0
|
||||
#f
|
||||
self
|
||||
gp-2
|
||||
s4-3
|
||||
:to self
|
||||
)
|
||||
)
|
||||
(v1-36 (get-field-spec-by-id (-> *part-id-table* 1245) (sp-field-id spt-timer)))
|
||||
)
|
||||
(if v1-36
|
||||
(set! (-> v1-36 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> s3-2 0)) duration)))
|
||||
)
|
||||
)
|
||||
(let ((t9-20 sp-launch-particles-var)
|
||||
(a0-33 *sp-particle-system-2d*)
|
||||
(a1-21 (-> *part-id-table* 1245))
|
||||
(a2-10 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-10 trans quad) (-> s4-3 quad))
|
||||
(t9-20 a0-33 a1-21 a2-10 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-post)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! vin-turbine ((obj vin-turbine) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vin-turbine" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set-vector! (-> obj outside-plane) 0.707 0.0 0.707 -6377922.5)
|
||||
(set! (-> obj lightning-plane quad) (-> obj outside-plane quad))
|
||||
(set! (-> obj lightning-plane w) -6419865.5)
|
||||
(set! (-> obj dont-draw-outside?)
|
||||
(nonzero? (res-lump-value (-> obj entity) 'extra-id uint128 :time -1000000000.0))
|
||||
)
|
||||
(set! (-> obj lightning-timer) (the-as uint 0))
|
||||
(if (and (-> obj dont-draw-outside?)
|
||||
(< (vector4-dot (the-as vector (-> obj outside-plane)) (math-camera-pos)) 0.0)
|
||||
)
|
||||
(go (method-of-object obj dormant))
|
||||
(go (method-of-object obj idle))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defskelgroup skel-vin-door vin-door vin-door-lod0-jg vin-door-idle-ja
|
||||
((vin-door-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 3 0 6)
|
||||
)
|
||||
|
||||
(deftype vin-door (com-airlock)
|
||||
()
|
||||
:heap-base #x100
|
||||
:method-count-assert 28
|
||||
:size-assert #x174
|
||||
:flag-assert #x1c01000174
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! vin-door ((obj vin-door) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 24576.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-8 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-8 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-8 transform-index) 4)
|
||||
(set-vector! (-> v1-8 local-sphere) 8192.0 16384.0 0.0 20480.0)
|
||||
)
|
||||
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-10 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-10 transform-index) 5)
|
||||
(set-vector! (-> v1-10 local-sphere) -8192.0 16384.0 0.0 20480.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-13 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override) s5-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vin-door" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(init-airlock! obj)
|
||||
(set! (-> obj sound-open-loop) (static-sound-spec "wood-door-open"))
|
||||
(set! (-> obj sound-open-stop) (static-sound-spec "wood-open-hit"))
|
||||
(set! (-> obj sound-close-loop) (static-sound-spec "wood-door-close"))
|
||||
(set! (-> obj sound-close-stop) (static-sound-spec "wood-close-hit"))
|
||||
(set! (-> obj door-radius) 12288.0)
|
||||
(go (method-of-object obj close) #t)
|
||||
(none)
|
||||
)
|
||||
|
@ -58,15 +58,15 @@
|
||||
)
|
||||
|
||||
(define *ruins-sinking-platform-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 1.48
|
||||
:inv-mass 0.6756757
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.8
|
||||
:angular-damping 1.0
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 2)
|
||||
:inertial-tensor-y (meters 1)
|
||||
:inertial-tensor-z (meters 2)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.48
|
||||
:inv-mass 0.6756757
|
||||
:linear-damping 0.8
|
||||
:angular-damping 1.0
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 2) (meters 1) (meters 2))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
@ -135,7 +135,7 @@
|
||||
)
|
||||
:post (behavior ()
|
||||
(set! (-> self info-override) *ruins-sinking-platform-constants*)
|
||||
(set! (-> self rbody state info) (the-as rigid-body-info (&-> (-> self info-override) mass)))
|
||||
(set! (-> self rbody state info) (-> self info-override info))
|
||||
(rigid-body-object-method-37 self)
|
||||
(none)
|
||||
)
|
||||
|
@ -1945,7 +1945,7 @@
|
||||
(set! (-> gp-0 info sky) #f)
|
||||
)
|
||||
)
|
||||
(race-start 2 #f #t)
|
||||
(the-as object (race-start 2 #f #t))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
44
test/decompiler/reference/jak2/engine/common_objs/rigid-body-plat_REF.gc
generated
vendored
44
test/decompiler/reference/jak2/engine/common_objs/rigid-body-plat_REF.gc
generated
vendored
@ -29,16 +29,16 @@
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'rigid-body-platform-constants)
|
||||
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (&-> obj mass))
|
||||
(format #t "~1Tmass: ~f~%" (-> obj mass))
|
||||
(format #t "~1Tinv-mass: ~f~%" (-> obj inv-mass))
|
||||
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> obj cm-joint x))
|
||||
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> obj cm-joint y))
|
||||
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> obj cm-joint z))
|
||||
(format #t "~1Tlinear-damping: ~f~%" (-> obj linear-damping))
|
||||
(format #t "~1Tangular-damping: ~f~%" (-> obj angular-damping))
|
||||
(format #t "~1Tbounce-factor: ~f~%" (-> obj bounce-factor))
|
||||
(format #t "~1Tfriction-factor: ~f~%" (-> obj friction-factor))
|
||||
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (-> obj info))
|
||||
(format #t "~1Tmass: ~f~%" (-> obj info mass))
|
||||
(format #t "~1Tinv-mass: ~f~%" (-> obj info inv-mass))
|
||||
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> obj info cm-offset-joint x))
|
||||
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> obj info cm-offset-joint y))
|
||||
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> obj info cm-offset-joint z))
|
||||
(format #t "~1Tlinear-damping: ~f~%" (-> obj info linear-damping))
|
||||
(format #t "~1Tangular-damping: ~f~%" (-> obj info angular-damping))
|
||||
(format #t "~1Tbounce-factor: ~f~%" (-> obj info bounce-factor))
|
||||
(format #t "~1Tfriction-factor: ~f~%" (-> obj info friction-factor))
|
||||
(format #t "~1Tinertial-tensor-x: (meters ~m)~%" (-> obj inertial-tensor-x))
|
||||
(format #t "~1Tinertial-tensor-y: (meters ~m)~%" (-> obj inertial-tensor-y))
|
||||
(format #t "~1Tinertial-tensor-z: (meters ~m)~%" (-> obj inertial-tensor-z))
|
||||
@ -464,12 +464,12 @@
|
||||
)
|
||||
(update-transforms (-> obj root-override-2))
|
||||
(let ((v1-5 (-> obj rbody))
|
||||
(a1-3 (&-> (-> obj info-override) mass))
|
||||
(a1-3 (-> obj info-override info))
|
||||
(a2-2 (-> obj root-override-2 trans))
|
||||
(a3-0 (-> obj root-override-2 quat))
|
||||
(t0-0 (method-of-object obj rigid-body-object-method-29))
|
||||
)
|
||||
(rigid-body-method-25 (-> v1-5 state) (the-as rigid-body-info a1-3) a2-2 a3-0 t0-0)
|
||||
(rigid-body-method-25 (-> v1-5 state) a1-3 a2-2 a3-0 t0-0)
|
||||
)
|
||||
(set! (-> obj player-bonk-timeout) (the-as uint (-> pp clock frame-counter)))
|
||||
(set! (-> obj player-force quad) (-> *null-vector* quad))
|
||||
@ -515,16 +515,16 @@
|
||||
|
||||
;; definition for symbol *rigid-body-platform-constants*, type rigid-body-platform-constants
|
||||
(define *rigid-body-platform-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 4)
|
||||
:inertial-tensor-y (meters 4)
|
||||
:inertial-tensor-z (meters 4)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 4) (meters 4))
|
||||
)
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
|
12
test/decompiler/reference/jak2/engine/entity/entity-table_REF.gc
generated
vendored
12
test/decompiler/reference/jak2/engine/entity/entity-table_REF.gc
generated
vendored
@ -95,7 +95,7 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref burning-bush :method-count 35)
|
||||
:ptype (type-ref burning-bush :method-count 33)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
@ -109,14 +109,14 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref barge :method-count 151)
|
||||
:ptype (type-ref barge :method-count 149)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref propa :method-count 35)
|
||||
:ptype (type-ref propa :method-count 32)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
@ -137,7 +137,7 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref parking-spot :method-count 27)
|
||||
:ptype (type-ref parking-spot :method-count 25)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
@ -151,14 +151,14 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref cty-guard-turret :method-count 39)
|
||||
:ptype (type-ref cty-guard-turret :method-count 36)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref cty-fruit-stand :method-count 31)
|
||||
:ptype (type-ref cty-fruit-stand :method-count 30)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
|
2
test/decompiler/reference/jak2/engine/game/task/task-control-h_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/game/task/task-control-h_REF.gc
generated
vendored
@ -1424,7 +1424,7 @@
|
||||
(data-float float 32 :offset-assert 672)
|
||||
(data-vector vector 32 :inline :offset-assert 800)
|
||||
(actor-group (pointer entity-actor) 4 :offset-assert 1312)
|
||||
(minimap uint32 8 :offset-assert 1328)
|
||||
(minimap connection-minimap 8 :offset-assert 1328)
|
||||
(hud handle 4 :offset-assert 1360)
|
||||
(hud-timer handle :offset 1360)
|
||||
(hud-counter handle :offset 1368)
|
||||
|
2
test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc
generated
vendored
@ -1960,7 +1960,7 @@
|
||||
)
|
||||
(set! (-> obj arrow) (the-as handle #f))
|
||||
(countdown (v1-8 4)
|
||||
(set! (-> obj minimap v1-8) (the-as uint #f))
|
||||
(set! (-> obj minimap v1-8) #f)
|
||||
)
|
||||
(countdown (v1-11 4)
|
||||
(set! (-> obj actor-group v1-11) (the-as (pointer entity-actor) #f))
|
||||
|
20
test/decompiler/reference/jak2/engine/physics/rigid-body-h_REF.gc
generated
vendored
20
test/decompiler/reference/jak2/engine/physics/rigid-body-h_REF.gc
generated
vendored
@ -109,16 +109,16 @@
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'rigid-body-object-constants)
|
||||
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (&-> obj mass))
|
||||
(format #t "~1Tmass: ~f~%" (-> obj mass))
|
||||
(format #t "~1Tinv-mass: ~f~%" (-> obj inv-mass))
|
||||
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> obj cm-joint x))
|
||||
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> obj cm-joint y))
|
||||
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> obj cm-joint z))
|
||||
(format #t "~1Tlinear-damping: ~f~%" (-> obj linear-damping))
|
||||
(format #t "~1Tangular-damping: ~f~%" (-> obj angular-damping))
|
||||
(format #t "~1Tbounce-factor: ~f~%" (-> obj bounce-factor))
|
||||
(format #t "~1Tfriction-factor: ~f~%" (-> obj friction-factor))
|
||||
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (-> obj info))
|
||||
(format #t "~1Tmass: ~f~%" (-> obj info mass))
|
||||
(format #t "~1Tinv-mass: ~f~%" (-> obj info inv-mass))
|
||||
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> obj info cm-offset-joint x))
|
||||
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> obj info cm-offset-joint y))
|
||||
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> obj info cm-offset-joint z))
|
||||
(format #t "~1Tlinear-damping: ~f~%" (-> obj info linear-damping))
|
||||
(format #t "~1Tangular-damping: ~f~%" (-> obj info angular-damping))
|
||||
(format #t "~1Tbounce-factor: ~f~%" (-> obj info bounce-factor))
|
||||
(format #t "~1Tfriction-factor: ~f~%" (-> obj info friction-factor))
|
||||
(format #t "~1Tinertial-tensor-x: (meters ~m)~%" (-> obj inertial-tensor-x))
|
||||
(format #t "~1Tinertial-tensor-y: (meters ~m)~%" (-> obj inertial-tensor-y))
|
||||
(format #t "~1Tinertial-tensor-z: (meters ~m)~%" (-> obj inertial-tensor-z))
|
||||
|
32
test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc
generated
vendored
32
test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc
generated
vendored
@ -910,7 +910,7 @@
|
||||
|
||||
;; definition for method 26 of type rigid-body-object
|
||||
(defmethod get-inv-mass rigid-body-object ((obj rigid-body-object))
|
||||
(-> obj info inv-mass)
|
||||
(-> obj info info inv-mass)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type rigid-body-object
|
||||
@ -919,10 +919,10 @@
|
||||
(let ((a0-1 (-> obj info name)))
|
||||
(when (nonzero? a0-1)
|
||||
(set! (-> obj info) (the-as rigid-body-object-constants (-> a0-1 value)))
|
||||
(set! (-> obj rbody state info) (the-as rigid-body-info (&-> (-> obj info) mass)))
|
||||
(set! (-> obj rbody state info) (-> obj info info))
|
||||
)
|
||||
)
|
||||
((method-of-type rigid-body-info rigid-body-info-method-9) (the-as rigid-body-info (&-> (-> obj info) mass)))
|
||||
(rigid-body-info-method-9 (-> obj info info))
|
||||
(set! (-> obj rbody state force-callback) (method-of-object obj rigid-body-object-method-29))
|
||||
0
|
||||
(none)
|
||||
@ -1002,7 +1002,7 @@
|
||||
(update-transforms (-> obj root-override-2))
|
||||
(rigid-body-method-25
|
||||
(-> obj rbody state)
|
||||
(the-as rigid-body-info (&-> (-> obj info) mass))
|
||||
(-> obj info info)
|
||||
(-> obj root-override-2 trans)
|
||||
(-> obj root-override-2 quat)
|
||||
(method-of-object obj rigid-body-object-method-29)
|
||||
@ -1050,16 +1050,16 @@
|
||||
|
||||
;; definition for symbol *rigid-body-object-constants*, type rigid-body-object-constants
|
||||
(define *rigid-body-object-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 4)
|
||||
:inertial-tensor-y (meters 4)
|
||||
:inertial-tensor-z (meters 4)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 1.0
|
||||
:angular-damping 1.0
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 4) (meters 4))
|
||||
)
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
@ -1146,7 +1146,7 @@ This commonly includes things such as:
|
||||
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-physics))
|
||||
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override-2 trans) (-> obj root-override-2 quat))
|
||||
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info mass))
|
||||
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info info mass))
|
||||
(vector-reset! (-> obj rbody state ang-momentum))
|
||||
)
|
||||
0
|
||||
@ -1345,7 +1345,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(let ((f0-1 (vector-dot (-> s5-0 velocity) (-> s5-0 normal))))
|
||||
(when (< f0-1 0.0)
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info inv-mass))))
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info info inv-mass))))
|
||||
(vector+float*! s4-0 s4-0 (-> s5-0 normal) (* -3.1 f30-0 (-> s5-0 impulse)))
|
||||
(set! (-> s4-0 y) (fmax (* 49152.0 f30-0) (-> s4-0 y)))
|
||||
(rigid-body-object-method-42 obj)
|
||||
|
1070
test/decompiler/reference/jak2/engine/ui/credits_REF.gc
generated
vendored
Normal file
1070
test/decompiler/reference/jak2/engine/ui/credits_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
40
test/decompiler/reference/jak2/levels/castle/pad/castle-tasks_REF.gc
generated
vendored
Normal file
40
test/decompiler/reference/jak2/levels/castle/pad/castle-tasks_REF.gc
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
219
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(let ((gp-0 (new 'stack-no-clear 'task-arrow-params)))
|
||||
(set! (-> gp-0 pos quad) (-> self info end-sphere quad))
|
||||
(quaternion-identity! (-> gp-0 quat))
|
||||
(set! (-> gp-0 flags) (task-arrow-flags))
|
||||
(set! (-> gp-0 map-icon) (the-as uint 15))
|
||||
(set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 (the-as task-arrow self))))
|
||||
)
|
||||
(until #f
|
||||
(when (< (vector-vector-distance (target-pos 0) (-> self info end-sphere)) (-> self info end-sphere r))
|
||||
(send-event (handle->process (-> self arrow)) 'leave)
|
||||
(let ((gp-2 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 0.007))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go-virtual complete)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
1056
test/decompiler/reference/jak2/levels/city/common/ctyport-obs_REF.gc
generated
vendored
Normal file
1056
test/decompiler/reference/jak2/levels/city/common/ctyport-obs_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12
test/decompiler/reference/jak2/levels/city/common/ctywide-obs-h_REF.gc
generated
vendored
12
test/decompiler/reference/jak2/levels/city/common/ctywide-obs-h_REF.gc
generated
vendored
@ -12,7 +12,7 @@
|
||||
:size-assert #x18
|
||||
:flag-assert #xa00000018
|
||||
(:methods
|
||||
(city-race-ring-info-method-9 () none 9)
|
||||
(city-race-ring-info-method-9 (_type_ symbol) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@ -56,14 +56,14 @@
|
||||
|
||||
;; definition of type city-ambush-info
|
||||
(deftype city-ambush-info (structure)
|
||||
((count int16 :offset-assert 0)
|
||||
(array uint32 :offset-assert 4)
|
||||
((count int16 :offset-assert 0)
|
||||
(array (inline-array city-ambush-spot) :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(city-ambush-info-method-9 () none 9)
|
||||
(city-ambush-info-method-9 (_type_ traffic-object-spawn-params) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@ -82,7 +82,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
913
test/decompiler/reference/jak2/levels/city/common/ctywide-tasks_REF.gc
generated
vendored
Normal file
913
test/decompiler/reference/jak2/levels/city/common/ctywide-tasks_REF.gc
generated
vendored
Normal file
@ -0,0 +1,913 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
68
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(set! (-> self minimap 0) (add-icon! *minimap* self (the-as uint 12) (the-as int #f) (the-as vector #f) 0))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook! *game-info* 68 2 (the-as (function object) (lambda :behavior task-manager () (none))))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
64
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(set! (-> self minimap 0) (add-icon! *minimap* self (the-as uint 39) (the-as int #f) (the-as vector #f) 0))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
64
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
140
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(let ((gp-0 (new 'stack-no-clear 'task-arrow-params)))
|
||||
(set! (-> gp-0 pos quad) (-> (new 'static 'vector :x 3132661.8 :y 33669.12 :z -2965708.8 :w 1.0) quad))
|
||||
(quaternion-identity! (-> gp-0 quat))
|
||||
(set! (-> gp-0 flags) (task-arrow-flags))
|
||||
(set! (-> gp-0 map-icon) (the-as uint 15))
|
||||
(set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 (the-as task-arrow self))))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
140
|
||||
2
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(when (movie?)
|
||||
(if (handle->process (-> self arrow))
|
||||
(send-event (handle->process (-> self arrow)) 'leave)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
140
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(send-event (handle->process (-> self arrow)) 'leave)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
4
|
||||
3
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(while (not *traffic-manager*)
|
||||
(suspend)
|
||||
)
|
||||
(suspend)
|
||||
(let ((gp-0 *traffic-manager*))
|
||||
(send-event gp-0 'deactivate-by-type 6)
|
||||
(send-event gp-0 'deactivate-by-type 18)
|
||||
(send-event gp-0 'deactivate-by-type 19)
|
||||
(send-event gp-0 'deactivate-by-type 20)
|
||||
(send-event gp-0 'set-guard-target-level 0)
|
||||
)
|
||||
(set-setting! 'pilot #f 0 0)
|
||||
(set-setting! 'vehicle-hijacking #f 0 0)
|
||||
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
|
||||
(while (let ((a0-9 (level-get-target-inside *level*)))
|
||||
(not (and a0-9 (logtest? (-> a0-9 info level-flags) 1)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(set-setting! 'airlock #f 0 0)
|
||||
(apply-settings *setting-control*)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook! *game-info* 4 1 (the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(let ((a0-0 *traffic-manager*))
|
||||
(send-event a0-0 'restore-default-settings)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
4
|
||||
6
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('target)
|
||||
(case (-> arg3 param 0)
|
||||
(('normal)
|
||||
(send-event (handle->process (-> self slave 0)) 'request 'scene-player)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function wait-for-speech-end
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun wait-for-speech-end ((arg0 sound-id))
|
||||
(while (nonzero? (get-status *gui-control* arg0))
|
||||
(suspend)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
7
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 38) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(let ((gp-1 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (logtest? (focus-status dead teleporting) (-> *target* focus-status)))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 39) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(go-virtual complete)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
8
|
||||
2
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(when (and (= (-> self sub-state) 1)
|
||||
(not (and *target* (logtest? (focus-status pilot) (-> *target* focus-status))))
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 46) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(go-virtual fail)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
8
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(local-vars (v1-1 object))
|
||||
(until v1-1
|
||||
(suspend)
|
||||
(set! v1-1 (and *target* (logtest? (focus-status pilot) (-> *target* focus-status))))
|
||||
)
|
||||
(set! (-> self slave 0) (-> *target* pilot vehicle))
|
||||
(set! (-> self sub-state) (the-as uint 1))
|
||||
(while (or (not *target*) (logtest? (focus-status dead teleporting) (-> *target* focus-status)))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 31) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(let ((gp-1 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (logtest? (focus-status dead teleporting) (-> *target* focus-status)))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 35) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(let ((gp-3 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-3) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (logtest? (focus-status dead teleporting) (-> *target* focus-status)))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 36) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(while (let ((v1-34 (handle->process (-> self slave 0))))
|
||||
(zero? (logand (rigid-body-object-flag flight-level-transition) (-> (the-as vehicle v1-34) flags)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(while (or (not *target*) (logtest? (focus-status dead teleporting) (-> *target* focus-status)))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 37) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(set! (-> self sub-state) (the-as uint 2))
|
||||
(let ((gp-6 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-6) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go-virtual complete)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
8
|
||||
5
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(task-node-close! (game-task-node city-vehicle-training-hover-zone-1))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
8
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(task-node-close! (game-task-node city-vehicle-training-hover-zone-2))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
9
|
||||
2
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(cond
|
||||
((zero? (-> self sub-state))
|
||||
(cond
|
||||
((and *target* (logtest? (focus-status pilot) (-> *target* focus-status)))
|
||||
(let ((v1-8 (handle->process (-> *target* pilot vehicle))))
|
||||
(if (logtest? (rigid-body-object-flag flight-level-transition) (-> (the-as vehicle v1-8) flags))
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> self sub-state) 1)
|
||||
(if (not (and *target* (logtest? (focus-status pilot) (-> *target* focus-status))))
|
||||
(go-virtual fail)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
9
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 60))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self sub-state) (the-as uint 1))
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 35) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(let ((gp-1 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 36) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(while (let ((v1-15 (handle->process (-> *target* pilot vehicle))))
|
||||
(zero? (logand (rigid-body-object-flag flight-level-transition) (-> (the-as vehicle v1-15) flags)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(set! (-> self sound-id 0)
|
||||
(the-as sound-id (talker-spawn-func (-> *talker-speech* 37) *entity-pool* (target-pos 0) (the-as region #f)))
|
||||
)
|
||||
(wait-for-speech-end (-> self sound-id 0))
|
||||
(let ((gp-4 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-4) (seconds 3))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go-virtual complete)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
61
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
|
||||
(set! (-> self begin-pos quad) (-> (new 'static 'vector :x -245760.0 :y 45056.0 :z 5468160.0 :w 1.0) quad))
|
||||
(set! (-> self end-pos quad) (-> (new 'static 'vector :x 579584.0 :y 49152.0 :z -1985331.2 :w 1.0) quad))
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(let ((s5-0 *traffic-manager*)
|
||||
(gp-0 (new 'stack 'traffic-object-spawn-params))
|
||||
)
|
||||
(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 behavior) (the-as uint 0))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 proc) #f)
|
||||
(send-event s5-0 'spawn-object gp-0)
|
||||
(if (-> gp-0 proc)
|
||||
(set! (-> self slave 0) (process->handle (-> gp-0 proc)))
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (new 'stack-no-clear 'task-arrow-params)))
|
||||
(set! (-> gp-1 pos quad) (-> self end-pos quad))
|
||||
(quaternion-identity! (-> gp-1 quat))
|
||||
(set! (-> gp-1 flags) (task-arrow-flags task-arrow-flag-00))
|
||||
(set! (-> gp-1 map-icon) (the-as uint 12))
|
||||
(label cfg-10)
|
||||
(let ((a0-20 (task-arrow-spawn gp-1 (the-as task-arrow self))))
|
||||
(when (not a0-20)
|
||||
(suspend)
|
||||
(goto cfg-10)
|
||||
)
|
||||
(set! (-> self arrow) (process->handle a0-20))
|
||||
)
|
||||
)
|
||||
(set! (-> self start-time) 0)
|
||||
(set! (-> self time-limit) (seconds 180))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
61
|
||||
1
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager () (send-event *traffic-manager* 'restore-default-settings) (none))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
61
|
||||
2
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(check-time self)
|
||||
(let ((f0-0 (vector-vector-distance-squared (target-pos 0) (-> self end-pos)))
|
||||
(f1-0 49152.0)
|
||||
)
|
||||
(if (>= (* f1-0 f1-0) f0-0)
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
61
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(local-vars (v1-7 symbol))
|
||||
(send-event *traffic-manager* 'set-target-level #x3f800000)
|
||||
(until (or v1-7 (and *target* (logtest? (focus-status pilot) (-> *target* focus-status))))
|
||||
(suspend)
|
||||
(let ((f0-0 122880.0))
|
||||
(set! v1-7 (< (* f0-0 f0-0) (vector-vector-distance-squared (-> self begin-pos) (target-pos 0))))
|
||||
)
|
||||
)
|
||||
(set-setting! 'airlock #f 0 0)
|
||||
(set! (-> self start-time) (-> self clock frame-counter))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
61
|
||||
4
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(send-event *traffic-manager* 'decrease-alert-level 0)
|
||||
(send-event *traffic-manager* 'set-alert-duration 9000)
|
||||
(send-event *target* 'end-mode)
|
||||
(set-setting! 'pilot #f 0 0)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
'(send-event "keira-npc-1" 'say)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
136
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(set! (-> self minimap 0) (add-icon! *minimap* self (the-as uint 39) (the-as int #f) (the-as vector #f) 0))
|
||||
(set! (-> self sub-state) (the-as uint 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
136
|
||||
1
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager () (send-event *traffic-manager* 'restore-default-settings) (none))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
136
|
||||
2
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(let* ((v1-1 (-> self info index))
|
||||
(a1-2 (cond
|
||||
((or (zero? v1-1) (= v1-1 4) (= v1-1 9))
|
||||
'stadiumb
|
||||
)
|
||||
((or (= v1-1 1) (= v1-1 5) (= v1-1 10))
|
||||
'stadiumc
|
||||
)
|
||||
((or (= v1-1 2) (= v1-1 6) (= v1-1 11))
|
||||
'stadiumd
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (level-status *level* a1-2) 'active)
|
||||
(when (zero? (-> self sub-state))
|
||||
(set! (-> self sub-state) (the-as uint 1))
|
||||
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
|
||||
(set! (-> self slave 0) (process->handle (race-start (-> self info index) (the-as symbol self) #f)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (nonzero? (-> self sub-state))
|
||||
(remove-setting! 'exclusive-task)
|
||||
(set! (-> self sub-state) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
136
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(case (-> self info index)
|
||||
((2)
|
||||
(format #t "kill race manager~%")
|
||||
(send-event (handle->process (-> self slave 0)) 'die)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 182) (-> *game-info* sub-task-list 136))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 210) (-> *game-info* sub-task-list 136))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 313) (-> *game-info* sub-task-list 136))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 315) (-> *game-info* sub-task-list 182))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 317) (-> *game-info* sub-task-list 210))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 319) (-> *game-info* sub-task-list 136))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 321) (-> *game-info* sub-task-list 182))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(copy-hooks! (-> *game-info* sub-task-list 323) (-> *game-info* sub-task-list 210))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
211
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(let ((gp-0 *traffic-manager*))
|
||||
(send-event gp-0 'set-guard-target-count-range 0 0 0)
|
||||
(send-event gp-0 'set-guard-target-count-range 1 0 0)
|
||||
(send-event gp-0 'set-guard-target-count-range 2 0 0)
|
||||
(format #t "class-1 race complete~%")
|
||||
(send-event gp-0 'set-alert-level 3)
|
||||
)
|
||||
(while (!= (level-status *level* 'lwidea) 'active)
|
||||
(suspend)
|
||||
)
|
||||
(send-event *traffic-manager* 'spawn-all)
|
||||
(suspend)
|
||||
(suspend)
|
||||
(let ((gp-2 (new 'static 'city-ambush-info
|
||||
:count 5
|
||||
:array (new 'static 'inline-array city-ambush-spot 5
|
||||
(new 'static 'city-ambush-spot
|
||||
:pos (new 'static 'vector :x 503808.0 :y 49152.0 :z -2805760.0 :w 1.0)
|
||||
:obj-type #x6
|
||||
)
|
||||
(new 'static 'city-ambush-spot
|
||||
:pos (new 'static 'vector :x 458752.0 :y 49152.0 :z -2838528.0 :w 1.0)
|
||||
:obj-type #x6
|
||||
)
|
||||
(new 'static 'city-ambush-spot
|
||||
:pos (new 'static 'vector :x 450560.0 :y 49152.0 :z -2871296.0 :w 1.0)
|
||||
:obj-type #x6
|
||||
)
|
||||
(new 'static 'city-ambush-spot
|
||||
:pos (new 'static 'vector :x 413696.0 :y 49152.0 :z -2879488.0 :w 1.0)
|
||||
:obj-type #x6
|
||||
)
|
||||
(new 'static 'city-ambush-spot
|
||||
:pos (new 'static 'vector :x 368640.0 :y 49152.0 :z -2916352.0 :w 1.0)
|
||||
:obj-type #x6
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traffic-object-spawn-params))
|
||||
)
|
||||
(set! (-> s5-0 object-type) (the-as uint 6))
|
||||
(set! (-> s5-0 behavior) (the-as uint 9))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 nav-mesh) #f)
|
||||
(set! (-> s5-0 nav-branch) #f)
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (the-as uint (process->handle *target*)))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 0))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(quaternion-identity! (-> s5-0 rotation))
|
||||
(city-ambush-info-method-9 gp-2 s5-0)
|
||||
)
|
||||
(go-virtual complete)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type city-bb-racepoint-info
|
||||
(deftype city-bb-racepoint-info (structure)
|
||||
((bike-pos vector :inline :offset-assert 0)
|
||||
(end-pos vector :inline :offset-assert 16)
|
||||
(bike-angle float :offset-assert 32)
|
||||
(map symbol :offset-assert 36)
|
||||
(time float :offset-assert 40)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x2c
|
||||
:flag-assert #x90000002c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type city-bb-racepoint-info
|
||||
(defmethod inspect city-bb-racepoint-info ((obj city-bb-racepoint-info))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'city-bb-racepoint-info)
|
||||
(format #t "~1Tbike-pos: #<vector @ #x~X>~%" (-> obj bike-pos))
|
||||
(format #t "~1Tend-pos: #<vector @ #x~X>~%" (-> obj end-pos))
|
||||
(format #t "~1Tbike-angle: ~f~%" (-> obj bike-angle))
|
||||
(format #t "~1Tmap: ~A~%" (-> obj map))
|
||||
(format #t "~1Ttime: ~f~%" (-> obj time))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *city-bb-racepoint-info*, type (array city-bb-racepoint-info)
|
||||
(define *city-bb-racepoint-info* (new 'static 'boxed-array :type city-bb-racepoint-info
|
||||
(new 'static 'city-bb-racepoint-info
|
||||
:bike-pos (new 'static 'vector :x -687431.7 :y 40960.0 :z 3485491.2 :w 1.0)
|
||||
:end-pos (new 'static 'vector :x 4694794.0 :y 33341.44 :z 137297.92 :w 1.0)
|
||||
:bike-angle 32768.0
|
||||
:map #t
|
||||
:time 27000.0
|
||||
)
|
||||
(new 'static 'city-bb-racepoint-info
|
||||
:bike-pos (new 'static 'vector :x 3399843.8 :y 40960.0 :z 1019863.06 :w 1.0)
|
||||
:end-pos (new 'static 'vector :x 47308.8 :y 32768.0 :z 573440.0 :w 1.0)
|
||||
:bike-angle 8192.0
|
||||
:map #t
|
||||
:time 22500.0
|
||||
)
|
||||
(new 'static 'city-bb-racepoint-info
|
||||
:bike-pos (new 'static 'vector :x 1773486.1 :y 40960.0 :z -284180.47 :w 1.0)
|
||||
:end-pos (new 'static 'vector :x -282624.0 :y 45056.0 :z 5464064.0 :w 1.0)
|
||||
:bike-angle 8192.0
|
||||
:map #f
|
||||
:time 33000.0
|
||||
)
|
||||
(new 'static 'city-bb-racepoint-info
|
||||
:bike-pos (new 'static 'vector :x 3190005.8 :y 40960.0 :z 2962514.0 :w 1.0)
|
||||
:end-pos (new 'static 'vector :x 2532597.8 :y -9338.88 :z -2062909.5 :w 1.0)
|
||||
:bike-angle 8192.0
|
||||
:map #t
|
||||
:time 29400.0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
271
|
||||
0
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
|
||||
(set-setting! 'airlock #f 0 0)
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(let ((gp-0 (-> *city-bb-racepoint-info* (-> self info index))))
|
||||
(set! (-> self end-pos quad) (-> gp-0 end-pos quad))
|
||||
(let ((s4-0 *traffic-manager*)
|
||||
(s5-0 (new 'stack 'traffic-object-spawn-params))
|
||||
)
|
||||
(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 behavior) (the-as uint 0))
|
||||
(set! (-> s5-0 id) (the-as uint 0))
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(send-event s4-0 'spawn-object s5-0)
|
||||
(if (-> s5-0 proc)
|
||||
(set! (-> self slave 0) (process->handle (-> s5-0 proc)))
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'task-arrow-params)))
|
||||
(set! (-> s5-1 pos quad) (-> self end-pos quad))
|
||||
(quaternion-identity! (-> s5-1 quat))
|
||||
(set! (-> s5-1 flags) (task-arrow-flags task-arrow-flag-00))
|
||||
(set! (-> s5-1 map-icon) (the-as uint 15))
|
||||
(cond
|
||||
((-> gp-0 map)
|
||||
(set! (-> s5-1 map-icon) (the-as uint 15))
|
||||
)
|
||||
(else
|
||||
(set! (-> s5-1 map-icon) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
(label cfg-12)
|
||||
(let ((a0-20 (task-arrow-spawn s5-1 (the-as task-arrow self))))
|
||||
(when (not a0-20)
|
||||
(suspend)
|
||||
(goto cfg-12)
|
||||
)
|
||||
(set! (-> self arrow) (process->handle a0-20))
|
||||
)
|
||||
)
|
||||
(set! (-> self start-time) (-> self clock frame-counter))
|
||||
(set! (-> self time-limit) (the-as time-frame (the int (-> gp-0 time))))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
271
|
||||
1
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager () (send-event *traffic-manager* 'restore-default-settings) (none))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
271
|
||||
2
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(check-time self)
|
||||
(let ((f0-0 (vector-vector-distance-squared (target-pos 0) (-> self end-pos)))
|
||||
(f1-0 49152.0)
|
||||
)
|
||||
(if (>= (* f1-0 f1-0) f0-0)
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
271
|
||||
3
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(send-event *traffic-manager* 'restore-default-settings)
|
||||
(send-event *traffic-manager* 'set-target-level #x3f800000)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
271
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(send-event *target* 'end-mode)
|
||||
(set-setting! 'pilot #f 0 0)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
(close! (-> self node-info) 'event)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
127
test/decompiler/reference/jak2/levels/city/common/searchlight_REF.gc
generated
vendored
Normal file
127
test/decompiler/reference/jak2/levels/city/common/searchlight_REF.gc
generated
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type searchlight
|
||||
(deftype searchlight (process-drawable)
|
||||
((sync sync-eased :inline :offset-assert 200)
|
||||
)
|
||||
:heap-base #x80
|
||||
:method-count-assert 21
|
||||
:size-assert #xf4
|
||||
:flag-assert #x15008000f4
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type searchlight
|
||||
(defmethod inspect searchlight ((obj searchlight))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Tsync: #<sync-eased @ #x~X>~%" (-> obj sync))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-searchlight searchlight searchlight-lod0-jg searchlight-idle-ja
|
||||
((searchlight-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 60 0 120)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (searchlight)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((gp-1 (quaternion-vector-angle!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
(new 'static 'vector :z 1.0 :w 1.0)
|
||||
(+ -4004.9778 (* 8192.0 (get-norm! (-> self sync) 0)))
|
||||
)
|
||||
)
|
||||
(s5-2 (quaternion-axis-angle!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
(vector-y-angle (-> (math-camera-matrix) vector 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-3 (calc-fade-from-fog (-> self root trans))))
|
||||
(set-vector! (-> self draw color-emissive) f0-3 f0-3 f0-3 1.0)
|
||||
)
|
||||
(quaternion-normalize! (quaternion*! (-> self root quat) s5-2 gp-1))
|
||||
)
|
||||
(when (rand-vu-percent? 0.05)
|
||||
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-4 from) (process->ppointer self))
|
||||
(set! (-> a1-4 num-params) 0)
|
||||
(set! (-> a1-4 message) 'hour)
|
||||
(let ((v1-13 (send-event-function (ppointer->process *time-of-day*) a1-4)))
|
||||
(if (and v1-13 (>= (the-as int v1-13) 7) (>= 18 (the-as int v1-13)))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post (the-as (function none :behavior searchlight) ja-post)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type searchlight
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! searchlight ((obj searchlight) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-searchlight" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logior! (-> obj draw status) (draw-control-status disable-fog))
|
||||
(set! (-> obj root scale y) (rand-vu-float-range 1.8 2.0))
|
||||
(set-vector! (-> obj draw color-mult) 0.0 0.0 0.0 0.0)
|
||||
(let ((s4-1 (new 'stack-no-clear 'sync-info-params)))
|
||||
(let ((v1-12 0))
|
||||
(if #t
|
||||
(set! v1-12 (logior v1-12 1))
|
||||
)
|
||||
(set! (-> s4-1 sync-type) 'sync-eased)
|
||||
(set! (-> s4-1 sync-flags) (the-as sync-flags v1-12))
|
||||
)
|
||||
(set! (-> s4-1 period) (the-as uint (rand-vu-int-range 3000 6000)))
|
||||
(set! (-> s4-1 entity) arg0)
|
||||
(set! (-> s4-1 percent) 0.0)
|
||||
(set! (-> s4-1 ease-in) 0.15)
|
||||
(set! (-> s4-1 ease-out) 0.15)
|
||||
(set! (-> s4-1 pause-in) 0.0)
|
||||
(set! (-> s4-1 pause-out) 0.0)
|
||||
(initialize! (-> obj sync) s4-1)
|
||||
)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
6
test/decompiler/reference/jak2/levels/city/common/vehicle-effects_REF.gc
generated
vendored
6
test/decompiler/reference/jak2/levels/city/common/vehicle-effects_REF.gc
generated
vendored
@ -23,7 +23,7 @@
|
||||
(set! (-> obj scrape-sound-id) (new-sound-id))
|
||||
)
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override scrape-sound))
|
||||
(-> obj info-override scrape-sound)
|
||||
(-> obj scrape-sound-id)
|
||||
(the int (* 1024.0 (-> obj scrape-sound-envelope)))
|
||||
0
|
||||
@ -59,7 +59,7 @@
|
||||
)
|
||||
(a0-9 (static-sound-spec "vehicle-engine" :volume 0.0 :mask (pitch reg0)))
|
||||
)
|
||||
(set! (-> a0-9 sound-name) (the-as sound-name (-> obj info-override engine-sound)))
|
||||
(set! (-> a0-9 sound-name) (-> obj info-override engine-sound))
|
||||
(set! (-> obj engine-sound-factor) f30-0)
|
||||
(cond
|
||||
(#f
|
||||
@ -141,7 +141,7 @@
|
||||
(f0-38 0.0)
|
||||
)
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override thrust-sound))
|
||||
(-> obj info-override thrust-sound)
|
||||
(-> obj thrust-sound-id)
|
||||
(the int (* 1024.0 f1-25))
|
||||
(the int (* 1524.0 f0-38))
|
||||
|
254
test/decompiler/reference/jak2/levels/city/common/vehicle-h_REF.gc
generated
vendored
254
test/decompiler/reference/jak2/levels/city/common/vehicle-h_REF.gc
generated
vendored
@ -158,122 +158,122 @@
|
||||
|
||||
;; definition of type rigid-body-vehicle-constants
|
||||
(deftype rigid-body-vehicle-constants (rigid-body-object-constants)
|
||||
((flags uint32 :offset-assert 208)
|
||||
(object-type uint8 :offset-assert 212)
|
||||
(guard-type uint8 :offset-assert 213)
|
||||
(max-engine-thrust meters :offset-assert 216)
|
||||
(inv-max-engine-thrust float :offset-assert 220)
|
||||
(engine-response-rate float :offset-assert 224)
|
||||
(engine-intake-factor float :offset-assert 228)
|
||||
(brake-factor float :offset-assert 232)
|
||||
(turbo-boost-factor float :offset-assert 236)
|
||||
(max-xz-speed meters :offset-assert 240)
|
||||
(ground-probe-distance meters :offset-assert 244)
|
||||
(ground-probe-offset meters :offset-assert 248)
|
||||
(cos-ground-effect-angle float :offset-assert 252)
|
||||
(spring-lift-factor float :offset-assert 256)
|
||||
(air-steering-factor float :offset-assert 260)
|
||||
(air-drag-factor float :offset-assert 264)
|
||||
(steering-fin-angle float :offset-assert 268)
|
||||
(steering-thruster-factor float :offset-assert 272)
|
||||
(steering-thruster-max-gain float :offset-assert 276)
|
||||
(steering-thruster-half-gain-speed meters :offset-assert 280)
|
||||
(tire-steering-angle float :offset-assert 284)
|
||||
(tire-friction-factor float :offset-assert 288)
|
||||
(tire-static-friction float :offset-assert 292)
|
||||
(tire-static-friction-speed meters :offset-assert 296)
|
||||
(tire-dynamic-friction float :offset-assert 300)
|
||||
(tire-dynamic-friction-speed meters :offset-assert 304)
|
||||
(tire-inv-max-friction-speed float :offset-assert 308)
|
||||
(airfoil-factor float :offset-assert 312)
|
||||
(drag-force-factor float :offset-assert 316)
|
||||
(speed-scrubbing-drag float :offset-assert 320)
|
||||
(speed-limiting-drag float :offset-assert 324)
|
||||
(pitch-control-factor float :offset-assert 328)
|
||||
(roll-control-factor float :offset-assert 332)
|
||||
(roll-angle float :offset-assert 336)
|
||||
(jump-thrust-factor float :offset-assert 340)
|
||||
(buoyancy-factor float :offset-assert 344)
|
||||
(player-weight float :offset-assert 348)
|
||||
(player-shift-x meters :offset-assert 352)
|
||||
(player-shift-z meters :offset-assert 356)
|
||||
(target-speed-offset meters :offset-assert 360)
|
||||
(turning-accel meters :offset-assert 364)
|
||||
(toughness-factor float :offset-assert 368)
|
||||
(damage-factor float :offset-assert 372)
|
||||
(camera-string-min-height meters :offset-assert 376)
|
||||
(camera-string-max-height meters :offset-assert 380)
|
||||
(camera-string-min-length meters :offset-assert 384)
|
||||
(camera-string-max-length meters :offset-assert 388)
|
||||
(camera-min-fov float :offset-assert 392)
|
||||
(camera-max-fov float :offset-assert 396)
|
||||
(camera-head-offset float :offset-assert 400)
|
||||
(camera-foot-offset float :offset-assert 404)
|
||||
(camera-normal-max-angle-offset float :offset-assert 408)
|
||||
(camera-air-max-angle-offset float :offset-assert 412)
|
||||
(camera-max-lookaround-speed float :offset-assert 416)
|
||||
(seat-count int8 :offset-assert 420)
|
||||
(section-count int8 :offset-assert 421)
|
||||
(rider-stance uint8 :offset-assert 422)
|
||||
(grab-rail-count int8 :offset-assert 423)
|
||||
(grab-rail-array uint32 :offset-assert 424)
|
||||
(seat-array vehicle-seat-info 4 :inline :offset-assert 432)
|
||||
(rider-hand-offset vector 2 :inline :offset-assert 496)
|
||||
(section-array vehicle-section-info 4 :inline :offset-assert 528)
|
||||
(section-bike-front vehicle-section-info :inline :offset 528)
|
||||
(section-bike-rear vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-left vehicle-section-info :inline :offset 528)
|
||||
(section-car-rear-left vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-right vehicle-section-info :inline :offset 592)
|
||||
(section-car-rear-right vehicle-section-info :inline :offset 624)
|
||||
(explosion vehicle-explosion-info :offset-assert 656)
|
||||
(engine-pitch-scale float :offset-assert 660)
|
||||
(engine-pitch-offset float :offset-assert 664)
|
||||
(engine-pitch-mod-amp float :offset-assert 668)
|
||||
(engine-sound-select int8 :offset-assert 672)
|
||||
(engine-sound uint128 :offset-assert 688)
|
||||
(thrust-sound uint128 :offset-assert 704)
|
||||
(scrape-sound uint128 :offset-assert 720)
|
||||
(glance-sound uint128 :offset-assert 736)
|
||||
(impact-sound uint128 :offset-assert 752)
|
||||
(extra-sound uint128 :offset-assert 768)
|
||||
(explosion-part int32 :offset-assert 784)
|
||||
(headlight-count int8 :offset-assert 788)
|
||||
(taillight-count int8 :offset-assert 789)
|
||||
(thruster-flame-width meters :offset-assert 792)
|
||||
(thruster-flame-length meters :offset-assert 796)
|
||||
(thruster-local-pos vector 2 :inline :offset-assert 800)
|
||||
(exhaust-local-pos vector 2 :inline :offset-assert 832)
|
||||
(exhaust-local-dir vector 2 :inline :offset-assert 864)
|
||||
(smoke-local-pos vector 2 :inline :offset-assert 896)
|
||||
(smoke-local-vel vector 2 :inline :offset-assert 928)
|
||||
(headlight-local-pos vector 3 :inline :offset-assert 960)
|
||||
(taillight-local-pos vector 2 :inline :offset-assert 1008)
|
||||
(lift-thruster-count int8 :offset-assert 1040)
|
||||
(roll-thruster-count int8 :offset-assert 1041)
|
||||
(steering-thruster-count int8 :offset-assert 1042)
|
||||
(stabilizer-count int8 :offset-assert 1043)
|
||||
(inv-lift-thruster-count float :offset-assert 1044)
|
||||
(pad int8 8 :offset-assert 1048)
|
||||
(lift-thruster-array vehicle-control-point 2 :inline :offset-assert 1056)
|
||||
(roll-thruster-array vehicle-control-point 2 :inline :offset-assert 1120)
|
||||
(steering-thruster-array vehicle-control-point 2 :inline :offset-assert 1184)
|
||||
(stabilizer-array vehicle-control-point 6 :inline :offset-assert 1248)
|
||||
(engine-thrust-local-pos vector :inline :offset-assert 1440)
|
||||
(brake-local-pos vector :inline :offset-assert 1456)
|
||||
(particle-system-2d basic :offset-assert 1472)
|
||||
(particle-system-3d basic :offset-assert 1476)
|
||||
(part-thruster basic :offset-assert 1480)
|
||||
(part-thruster-scale-x sp-field-init-spec :offset-assert 1484)
|
||||
(part-thruster-scale-y sp-field-init-spec :offset-assert 1488)
|
||||
(part-quat quaternion :offset-assert 1492)
|
||||
(part-vel vector :offset-assert 1496)
|
||||
(color-option-count int8 :offset-assert 1500)
|
||||
(color-option-select int8 :offset-assert 1501)
|
||||
(color-option-array (array rgba) :offset-assert 1504)
|
||||
(sample-dir vector :inline :offset-assert 1520)
|
||||
(sample-time time-frame :offset-assert 1536)
|
||||
(sample-index int32 :offset-assert 1544)
|
||||
((flags uint32 :offset-assert 208)
|
||||
(object-type uint8 :offset-assert 212)
|
||||
(guard-type uint8 :offset-assert 213)
|
||||
(max-engine-thrust meters :offset-assert 216)
|
||||
(inv-max-engine-thrust float :offset-assert 220)
|
||||
(engine-response-rate float :offset-assert 224)
|
||||
(engine-intake-factor float :offset-assert 228)
|
||||
(brake-factor float :offset-assert 232)
|
||||
(turbo-boost-factor float :offset-assert 236)
|
||||
(max-xz-speed meters :offset-assert 240)
|
||||
(ground-probe-distance meters :offset-assert 244)
|
||||
(ground-probe-offset meters :offset-assert 248)
|
||||
(cos-ground-effect-angle float :offset-assert 252)
|
||||
(spring-lift-factor float :offset-assert 256)
|
||||
(air-steering-factor float :offset-assert 260)
|
||||
(air-drag-factor float :offset-assert 264)
|
||||
(steering-fin-angle float :offset-assert 268)
|
||||
(steering-thruster-factor float :offset-assert 272)
|
||||
(steering-thruster-max-gain float :offset-assert 276)
|
||||
(steering-thruster-half-gain-speed meters :offset-assert 280)
|
||||
(tire-steering-angle float :offset-assert 284)
|
||||
(tire-friction-factor float :offset-assert 288)
|
||||
(tire-static-friction float :offset-assert 292)
|
||||
(tire-static-friction-speed meters :offset-assert 296)
|
||||
(tire-dynamic-friction float :offset-assert 300)
|
||||
(tire-dynamic-friction-speed meters :offset-assert 304)
|
||||
(tire-inv-max-friction-speed float :offset-assert 308)
|
||||
(airfoil-factor float :offset-assert 312)
|
||||
(drag-force-factor float :offset-assert 316)
|
||||
(speed-scrubbing-drag float :offset-assert 320)
|
||||
(speed-limiting-drag float :offset-assert 324)
|
||||
(pitch-control-factor float :offset-assert 328)
|
||||
(roll-control-factor float :offset-assert 332)
|
||||
(roll-angle float :offset-assert 336)
|
||||
(jump-thrust-factor float :offset-assert 340)
|
||||
(buoyancy-factor float :offset-assert 344)
|
||||
(player-weight float :offset-assert 348)
|
||||
(player-shift-x meters :offset-assert 352)
|
||||
(player-shift-z meters :offset-assert 356)
|
||||
(target-speed-offset meters :offset-assert 360)
|
||||
(turning-accel meters :offset-assert 364)
|
||||
(toughness-factor float :offset-assert 368)
|
||||
(damage-factor float :offset-assert 372)
|
||||
(camera-string-min-height meters :offset-assert 376)
|
||||
(camera-string-max-height meters :offset-assert 380)
|
||||
(camera-string-min-length meters :offset-assert 384)
|
||||
(camera-string-max-length meters :offset-assert 388)
|
||||
(camera-min-fov float :offset-assert 392)
|
||||
(camera-max-fov float :offset-assert 396)
|
||||
(camera-head-offset float :offset-assert 400)
|
||||
(camera-foot-offset float :offset-assert 404)
|
||||
(camera-normal-max-angle-offset float :offset-assert 408)
|
||||
(camera-air-max-angle-offset float :offset-assert 412)
|
||||
(camera-max-lookaround-speed float :offset-assert 416)
|
||||
(seat-count int8 :offset-assert 420)
|
||||
(section-count int8 :offset-assert 421)
|
||||
(rider-stance uint8 :offset-assert 422)
|
||||
(grab-rail-count int8 :offset-assert 423)
|
||||
(grab-rail-array (inline-array vehicle-grab-rail-info) :offset-assert 424)
|
||||
(seat-array vehicle-seat-info 4 :inline :offset-assert 432)
|
||||
(rider-hand-offset vector 2 :inline :offset-assert 496)
|
||||
(section-array vehicle-section-info 4 :inline :offset-assert 528)
|
||||
(section-bike-front vehicle-section-info :inline :offset 528)
|
||||
(section-bike-rear vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-left vehicle-section-info :inline :offset 528)
|
||||
(section-car-rear-left vehicle-section-info :inline :offset 560)
|
||||
(section-car-front-right vehicle-section-info :inline :offset 592)
|
||||
(section-car-rear-right vehicle-section-info :inline :offset 624)
|
||||
(explosion vehicle-explosion-info :offset-assert 656)
|
||||
(engine-pitch-scale float :offset-assert 660)
|
||||
(engine-pitch-offset float :offset-assert 664)
|
||||
(engine-pitch-mod-amp float :offset-assert 668)
|
||||
(engine-sound-select int8 :offset-assert 672)
|
||||
(engine-sound sound-name :offset-assert 688)
|
||||
(thrust-sound sound-name :offset-assert 704)
|
||||
(scrape-sound sound-name :offset-assert 720)
|
||||
(glance-sound sound-name :offset-assert 736)
|
||||
(impact-sound sound-name :offset-assert 752)
|
||||
(extra-sound sound-name :offset-assert 768)
|
||||
(explosion-part int32 :offset-assert 784)
|
||||
(headlight-count int8 :offset-assert 788)
|
||||
(taillight-count int8 :offset-assert 789)
|
||||
(thruster-flame-width meters :offset-assert 792)
|
||||
(thruster-flame-length meters :offset-assert 796)
|
||||
(thruster-local-pos vector 2 :inline :offset-assert 800)
|
||||
(exhaust-local-pos vector 2 :inline :offset-assert 832)
|
||||
(exhaust-local-dir vector 2 :inline :offset-assert 864)
|
||||
(smoke-local-pos vector 2 :inline :offset-assert 896)
|
||||
(smoke-local-vel vector 2 :inline :offset-assert 928)
|
||||
(headlight-local-pos vector 3 :inline :offset-assert 960)
|
||||
(taillight-local-pos vector 2 :inline :offset-assert 1008)
|
||||
(lift-thruster-count int8 :offset-assert 1040)
|
||||
(roll-thruster-count int8 :offset-assert 1041)
|
||||
(steering-thruster-count int8 :offset-assert 1042)
|
||||
(stabilizer-count int8 :offset-assert 1043)
|
||||
(inv-lift-thruster-count float :offset-assert 1044)
|
||||
(pad int8 8 :offset-assert 1048)
|
||||
(lift-thruster-array vehicle-control-point 2 :inline :offset-assert 1056)
|
||||
(roll-thruster-array vehicle-control-point 2 :inline :offset-assert 1120)
|
||||
(steering-thruster-array vehicle-control-point 2 :inline :offset-assert 1184)
|
||||
(stabilizer-array vehicle-control-point 6 :inline :offset-assert 1248)
|
||||
(engine-thrust-local-pos vector :inline :offset-assert 1440)
|
||||
(brake-local-pos vector :inline :offset-assert 1456)
|
||||
(particle-system-2d basic :offset-assert 1472)
|
||||
(particle-system-3d basic :offset-assert 1476)
|
||||
(part-thruster basic :offset-assert 1480)
|
||||
(part-thruster-scale-x sp-field-init-spec :offset-assert 1484)
|
||||
(part-thruster-scale-y sp-field-init-spec :offset-assert 1488)
|
||||
(part-quat quaternion :offset-assert 1492)
|
||||
(part-vel vector :offset-assert 1496)
|
||||
(color-option-count int8 :offset-assert 1500)
|
||||
(color-option-select int8 :offset-assert 1501)
|
||||
(color-option-array (inline-array vector) :offset-assert 1504)
|
||||
(sample-dir vector :inline :offset-assert 1520)
|
||||
(sample-time time-frame :offset-assert 1536)
|
||||
(sample-index int32 :offset-assert 1544)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x60c
|
||||
@ -292,16 +292,16 @@
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'rigid-body-vehicle-constants)
|
||||
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (&-> obj mass))
|
||||
(format #t "~1Tmass: ~f~%" (-> obj mass))
|
||||
(format #t "~1Tinv-mass: ~f~%" (-> obj inv-mass))
|
||||
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> obj cm-joint x))
|
||||
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> obj cm-joint y))
|
||||
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> obj cm-joint z))
|
||||
(format #t "~1Tlinear-damping: ~f~%" (-> obj linear-damping))
|
||||
(format #t "~1Tangular-damping: ~f~%" (-> obj angular-damping))
|
||||
(format #t "~1Tbounce-factor: ~f~%" (-> obj bounce-factor))
|
||||
(format #t "~1Tfriction-factor: ~f~%" (-> obj friction-factor))
|
||||
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (-> obj info))
|
||||
(format #t "~1Tmass: ~f~%" (-> obj info mass))
|
||||
(format #t "~1Tinv-mass: ~f~%" (-> obj info inv-mass))
|
||||
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> obj info cm-offset-joint x))
|
||||
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> obj info cm-offset-joint y))
|
||||
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> obj info cm-offset-joint z))
|
||||
(format #t "~1Tlinear-damping: ~f~%" (-> obj info linear-damping))
|
||||
(format #t "~1Tangular-damping: ~f~%" (-> obj info angular-damping))
|
||||
(format #t "~1Tbounce-factor: ~f~%" (-> obj info bounce-factor))
|
||||
(format #t "~1Tfriction-factor: ~f~%" (-> obj info friction-factor))
|
||||
(format #t "~1Tinertial-tensor-x: (meters ~m)~%" (-> obj inertial-tensor-x))
|
||||
(format #t "~1Tinertial-tensor-y: (meters ~m)~%" (-> obj inertial-tensor-y))
|
||||
(format #t "~1Tinertial-tensor-z: (meters ~m)~%" (-> obj inertial-tensor-z))
|
||||
@ -719,7 +719,7 @@
|
||||
(vehicle-method-132 (_type_) none 132)
|
||||
(check-player-get-on (_type_) none 133)
|
||||
(vehicle-method-134 (_type_ process) none 134)
|
||||
(vehicle-method-135 () none 135)
|
||||
(vehicle-method-135 (_type_ traffic-object-spawn-params) none 135)
|
||||
(vehicle-method-136 (_type_ traffic-object-spawn-params) none 136)
|
||||
(vehicle-method-137 (_type_ traffic-object-spawn-params) none 137)
|
||||
(vehicle-method-138 (_type_) none 138)
|
||||
|
887
test/decompiler/reference/jak2/levels/city/common/vehicle-physics_REF.gc
generated
vendored
887
test/decompiler/reference/jak2/levels/city/common/vehicle-physics_REF.gc
generated
vendored
@ -1,887 +0,0 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 99 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-99 vehicle ((obj vehicle) (arg0 float))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vehicle-grab-rail-info))
|
||||
(s3-0 (-> obj root-override-2 root-prim))
|
||||
(s2-0 1)
|
||||
)
|
||||
(when (< (-> obj rbody state position y) (+ (-> obj water-height) (-> s3-0 local-sphere w)))
|
||||
(when (= (-> s3-0 prim-core prim-type) (prim-type group))
|
||||
(let ((v1-5 (the-as collide-shape-prim-group s3-0)))
|
||||
(set! s3-0 (-> v1-5 child 0))
|
||||
(set! s2-0 (the-as int (-> v1-5 num-children)))
|
||||
)
|
||||
)
|
||||
(countdown (s1-0 s2-0)
|
||||
(when (= (-> s3-0 prim-core prim-type) (prim-type sphere))
|
||||
(let* ((s0-0 (-> s3-0 prim-core))
|
||||
(f0-2 (- (-> s0-0 world-sphere y) (-> s0-0 world-sphere w)))
|
||||
)
|
||||
(when (< f0-2 (-> obj water-height))
|
||||
(set! (-> s4-0 local-pos 0 quad) (-> s0-0 world-sphere quad))
|
||||
(let ((f1-5 (fmin (-> obj water-height) (+ (-> s0-0 world-sphere y) (-> s0-0 world-sphere w)))))
|
||||
0.0
|
||||
(let* ((f2-5 (fmax -1.0 (fmin 1.0 (/ (- (-> obj water-height) (-> s0-0 world-sphere y)) (-> s0-0 world-sphere w)))))
|
||||
(f30-0 (+ 0.5 (* -0.25 f2-5 f2-5 f2-5) (* 0.75 f2-5)))
|
||||
)
|
||||
(set! (-> s4-0 local-pos 0 y) (* 0.5 (+ f0-2 f1-5)))
|
||||
(let ((v1-18 (-> obj rbody))
|
||||
(a1-1 (-> s4-0 local-pos))
|
||||
(a2-0 (-> s4-0 normal))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-18 state) (the-as vector a1-1) a2-0)
|
||||
)
|
||||
(let* ((f0-7 (* 0.062831804 (fmin 200.0 (vector-length (-> s4-0 normal))) f30-0))
|
||||
(f1-8 (-> s0-0 world-sphere w))
|
||||
(f0-8 (* f0-7 (* f1-8 f1-8)))
|
||||
(f1-11 4096.0)
|
||||
(f1-13 (* f1-11 f1-11))
|
||||
(f0-10 (fmin (* f0-8 (/ 1.0 f1-13)) (/ (-> obj info-override mass) (* 2.0 arg0 (the float s2-0)))))
|
||||
)
|
||||
(vector-float*! (-> s4-0 local-pos 1) (-> s4-0 normal) (* -1.0 f0-10))
|
||||
)
|
||||
(let ((v1-34 (-> obj rbody))
|
||||
(a1-3 (-> s4-0 local-pos))
|
||||
(a2-1 (-> s4-0 local-pos 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-34 state) (the-as vector a1-3) a2-1)
|
||||
)
|
||||
(vector-reset! (-> s4-0 local-pos 1))
|
||||
(let* ((f0-12 549018.94)
|
||||
(f1-19 4096.0)
|
||||
(f2-13 4096.0)
|
||||
(f1-20 (* f1-19 (* f2-13 f2-13)))
|
||||
(f0-16 (* f0-12 (/ 1.0 f1-20) (-> obj info-override buoyancy-factor) f30-0 (-> s0-0 world-sphere w)))
|
||||
(f1-25 (-> s0-0 world-sphere w))
|
||||
)
|
||||
(set! (-> s4-0 local-pos 1 y) (* f0-16 (* f1-25 f1-25)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-46 (-> obj rbody))
|
||||
(a1-4 (-> s4-0 local-pos))
|
||||
(a2-2 (-> s4-0 local-pos 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-46 state) (the-as vector a1-4) a2-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! s3-0 80)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type vehicle-probe-work
|
||||
(deftype vehicle-probe-work (structure)
|
||||
((local-pos vector :inline :offset-assert 0)
|
||||
(local-normal vector :inline :offset-assert 16)
|
||||
(world-pos vector :inline :offset-assert 32)
|
||||
(world-normal vector :inline :offset-assert 48)
|
||||
(probe-pos vector :inline :offset-assert 64)
|
||||
(ground-pos vector :inline :offset-assert 80)
|
||||
(ground-normal vector :inline :offset-assert 96)
|
||||
(velocity vector :inline :offset-assert 112)
|
||||
(tire-force vector :inline :offset-assert 128)
|
||||
(wheel-axis vector :inline :offset-assert 144)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xa0
|
||||
:flag-assert #x9000000a0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vehicle-probe-work
|
||||
(defmethod inspect vehicle-probe-work ((obj vehicle-probe-work))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'vehicle-probe-work)
|
||||
(format #t "~1Tlocal-pos: #<vector @ #x~X>~%" (-> obj local-pos))
|
||||
(format #t "~1Tlocal-normal: #<vector @ #x~X>~%" (-> obj local-normal))
|
||||
(format #t "~1Tworld-pos: #<vector @ #x~X>~%" (-> obj world-pos))
|
||||
(format #t "~1Tworld-normal: #<vector @ #x~X>~%" (-> obj world-normal))
|
||||
(format #t "~1Tprobe-pos: #<vector @ #x~X>~%" (-> obj probe-pos))
|
||||
(format #t "~1Tground-pos: #<vector @ #x~X>~%" (-> obj ground-pos))
|
||||
(format #t "~1Tground-normal: #<vector @ #x~X>~%" (-> obj ground-normal))
|
||||
(format #t "~1Tvelocity: #<vector @ #x~X>~%" (-> obj velocity))
|
||||
(format #t "~1Ttire-force: #<vector @ #x~X>~%" (-> obj tire-force))
|
||||
(format #t "~1Twheel-axis: #<vector @ #x~X>~%" (-> obj wheel-axis))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type vehicle-physics-work
|
||||
(deftype vehicle-physics-work (structure)
|
||||
((mat matrix :inline :offset-assert 0)
|
||||
(force vector :inline :offset-assert 64)
|
||||
(velocity vector :inline :offset-assert 80)
|
||||
(world-pos vector :inline :offset-assert 96)
|
||||
(world-normal vector :inline :offset-assert 112)
|
||||
(local-pos vector :inline :offset-assert 128)
|
||||
(steering-axis vector :inline :offset-assert 144)
|
||||
(lift-dir vector :inline :offset-assert 160)
|
||||
(normal vector :inline :offset-assert 176)
|
||||
(tmp vector :inline :offset-assert 192)
|
||||
(p-body vector :inline :offset-assert 208)
|
||||
(axis vector :inline :offset-assert 224)
|
||||
(dir vector :inline :offset-assert 240)
|
||||
(ground-normal vector :inline :offset-assert 256)
|
||||
(impulse float :offset-assert 272)
|
||||
(vel-dot-norm float :offset-assert 276)
|
||||
(friction-coef float :offset-assert 280)
|
||||
(speed-factor float :offset-assert 284)
|
||||
(probe-work-array vehicle-probe-work 2 :inline :offset-assert 288)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x260
|
||||
:flag-assert #x900000260
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vehicle-physics-work
|
||||
(defmethod inspect vehicle-physics-work ((obj vehicle-physics-work))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'vehicle-physics-work)
|
||||
(format #t "~1Tmat: #<matrix @ #x~X>~%" (-> obj mat))
|
||||
(format #t "~1Tforce: #<vector @ #x~X>~%" (-> obj force))
|
||||
(format #t "~1Tvelocity: #<vector @ #x~X>~%" (-> obj velocity))
|
||||
(format #t "~1Tworld-pos: #<vector @ #x~X>~%" (-> obj world-pos))
|
||||
(format #t "~1Tworld-normal: #<vector @ #x~X>~%" (-> obj world-normal))
|
||||
(format #t "~1Tlocal-pos: #<vector @ #x~X>~%" (-> obj local-pos))
|
||||
(format #t "~1Tsteering-axis: #<vector @ #x~X>~%" (-> obj steering-axis))
|
||||
(format #t "~1Tlift-dir: #<vector @ #x~X>~%" (-> obj lift-dir))
|
||||
(format #t "~1Tnormal: #<vector @ #x~X>~%" (-> obj normal))
|
||||
(format #t "~1Ttmp: #<vector @ #x~X>~%" (-> obj tmp))
|
||||
(format #t "~1Tp-body: #<vector @ #x~X>~%" (-> obj p-body))
|
||||
(format #t "~1Taxis: #<vector @ #x~X>~%" (-> obj axis))
|
||||
(format #t "~1Tdir: #<vector @ #x~X>~%" (-> obj dir))
|
||||
(format #t "~1Tground-normal: #<vector @ #x~X>~%" (-> obj ground-normal))
|
||||
(format #t "~1Timpulse: ~f~%" (-> obj impulse))
|
||||
(format #t "~1Tvel-dot-norm: ~f~%" (-> obj vel-dot-norm))
|
||||
(format #t "~1Tfriction-coef: ~f~%" (-> obj friction-coef))
|
||||
(format #t "~1Tspeed-factor: ~f~%" (-> obj speed-factor))
|
||||
(format #t "~1Tprobe-work-array[2] @ #x~X~%" (-> obj probe-work-array))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 100 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-100 vehicle ((obj vehicle) (arg0 float) (arg1 vehicle-physics-work))
|
||||
(local-vars (v1-81 float) (v1-184 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(+! (-> obj physics-counter) 1)
|
||||
(let ((s3-0 (-> obj rbody)))
|
||||
(mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 state matrix)) 64)
|
||||
(let* ((f28-0 (* -1.0 (-> obj controls steering) (-> obj info-override tire-steering-angle)))
|
||||
(f30-0 (cos f28-0))
|
||||
(f0-2 (sin f28-0))
|
||||
)
|
||||
(set! (-> arg1 steering-axis x) f30-0)
|
||||
(set! (-> arg1 steering-axis y) 0.0)
|
||||
(set! (-> arg1 steering-axis z) f0-2)
|
||||
)
|
||||
(vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(logclear! (-> obj flags) (rigid-body-object-flag on-ground on-flight-level))
|
||||
(vector-reset! (-> arg1 ground-normal))
|
||||
(set! (-> arg1 ground-normal y) 1.0)
|
||||
(let ((f30-1 (-> obj info-override ground-probe-distance)))
|
||||
(let ((s2-0 (new 'stack-no-clear 'collide-query)))
|
||||
(vector-reset! (-> arg1 lift-dir))
|
||||
(set! (-> arg1 lift-dir y) -1.0)
|
||||
(set! (-> arg1 speed-factor)
|
||||
(fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 state lin-velocity))))))
|
||||
)
|
||||
(when (logtest? (-> obj info-override flags) 1)
|
||||
(vector-float*! (-> arg1 tmp) (-> arg1 mat vector 1) -1.0)
|
||||
(let ((t9-4 vector-lerp!)
|
||||
(a0-7 (-> arg1 lift-dir))
|
||||
(a1-4 (-> arg1 lift-dir))
|
||||
(a2-3 (-> arg1 tmp))
|
||||
(f0-8 (-> arg1 speed-factor))
|
||||
)
|
||||
(t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8))
|
||||
)
|
||||
(vector-normalize! (-> arg1 lift-dir) 1.0)
|
||||
)
|
||||
(vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1))
|
||||
(let ((v1-28 s2-0))
|
||||
(set! (-> v1-28 radius) 409.6)
|
||||
(set! (-> v1-28 collide-with) (collide-spec
|
||||
backgnd
|
||||
obstacle
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
water
|
||||
collectable
|
||||
blocking-plane
|
||||
pusher
|
||||
vehicle-mesh-probeable
|
||||
)
|
||||
)
|
||||
(set! (-> v1-28 ignore-process0) #f)
|
||||
(set! (-> v1-28 ignore-process1) #f)
|
||||
(set! (-> v1-28 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1))
|
||||
(set! (-> v1-28 action-mask) (collide-action solid))
|
||||
)
|
||||
(dotimes (s1-0 (-> obj info-override lift-thruster-count))
|
||||
(let ((v1-31 (-> obj info-override lift-thruster-array s1-0))
|
||||
(s0-0 (-> arg1 probe-work-array s1-0))
|
||||
)
|
||||
(vector-reset! (-> s0-0 tire-force))
|
||||
(set! (-> s0-0 local-pos quad) (-> v1-31 local-pos quad))
|
||||
(set! (-> s0-0 local-normal quad) (-> v1-31 normal quad))
|
||||
(vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat))
|
||||
(let ((a1-9 (-> s0-0 probe-pos)))
|
||||
(let ((v1-34 (-> s0-0 world-pos)))
|
||||
(let ((a0-22 (-> arg1 mat vector 1)))
|
||||
(let ((a2-6 (-> obj info-override ground-probe-offset)))
|
||||
(.mov vf7 a2-6)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-22 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-34 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a1-9 quad) vf6)
|
||||
)
|
||||
(let ((v1-35 s3-0)
|
||||
(a1-10 (-> s0-0 probe-pos))
|
||||
(a2-7 (-> s0-0 velocity))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-35 state) a1-10 a2-7)
|
||||
)
|
||||
(set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z))
|
||||
(-> arg1 steering-axis)
|
||||
(the-as vector (-> arg1 mat))
|
||||
)
|
||||
)
|
||||
quad
|
||||
)
|
||||
)
|
||||
(set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad))
|
||||
(set! (-> s0-0 ground-pos y) 0.0)
|
||||
(vector-reset! (-> s0-0 ground-normal))
|
||||
(when (logtest? (-> obj flags) (rigid-body-object-flag enable-collision))
|
||||
(set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad))
|
||||
(let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0)))
|
||||
(cond
|
||||
((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1))
|
||||
(logclear! (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag on-ground))
|
||||
(set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1)))
|
||||
(set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad))
|
||||
(set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad))
|
||||
)
|
||||
(else
|
||||
(set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 state position y)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj lift-thrust 0) 0.0)
|
||||
(set! (-> obj lift-thrust 1) 0.0)
|
||||
(set! (-> obj roll-thrust 0) 0.0)
|
||||
(set! (-> obj roll-thrust 1) 0.0)
|
||||
(set! (-> obj roll-thrust 0) 0.0)
|
||||
(set! (-> obj roll-thrust 1) 0.0)
|
||||
(when (>= 1 (-> obj force-level))
|
||||
(dotimes (s2-1 (-> obj info-override lift-thruster-count))
|
||||
(let ((s1-1 (-> arg1 probe-work-array s2-1)))
|
||||
(set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad))
|
||||
(set! (-> arg1 velocity quad) (-> s1-1 velocity quad))
|
||||
(let ((f28-1 (-> s1-1 probe-pos y)))
|
||||
(when (> (-> obj flight-level-index) 0)
|
||||
(set! f28-1 (- f28-1 (+ 6144.0 (-> obj flight-level))))
|
||||
(when (>= 0.0 f28-1)
|
||||
(logclear! (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag on-flight-level))
|
||||
(.lvf vf1 (&-> (-> s1-1 ground-normal) quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
||||
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
||||
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
||||
(.mov v1-81 vf1)
|
||||
(if (= v1-81 0.0)
|
||||
(set! (-> s1-1 ground-normal y) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (or (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(and (> (-> obj flight-level-index) 0) (< f28-1 0.0))
|
||||
)
|
||||
(if (zero? (-> obj flight-level-index))
|
||||
(set! f28-1 40960.0)
|
||||
)
|
||||
(let* ((f0-37 (* -1.0
|
||||
(-> obj force-scale)
|
||||
(-> obj info-override inv-lift-thruster-count)
|
||||
(-> obj info-override mass)
|
||||
(-> obj info-override gravity)
|
||||
(+ 1.0 (* 2.0 (the float (-> obj flight-level-index))))
|
||||
)
|
||||
)
|
||||
(f1-17 -1.0)
|
||||
(f2-4 1.0)
|
||||
(f3-4 16384.0)
|
||||
(f3-7 (* f28-1 (/ 1.0 f3-4)))
|
||||
(f4-2 0.5)
|
||||
(f5-0 81920.0)
|
||||
(f0-38 (* f0-37 (fmax f1-17 (fmin f2-4 (+ f3-7 (* f4-2 (/ 1.0 f5-0) (-> arg1 velocity y)))))))
|
||||
)
|
||||
(let ((f1-20 (fmax 0.0 f0-38)))
|
||||
(+! (-> obj lift-thrust s2-1) f1-20)
|
||||
(when (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(+! (-> obj roll-thrust 0) (* 0.05 f1-20))
|
||||
(+! (-> obj roll-thrust 1) (* 0.05 f1-20))
|
||||
)
|
||||
)
|
||||
(vector-reset! (-> arg1 force))
|
||||
(set! (-> arg1 force y) f0-38)
|
||||
)
|
||||
(let ((v1-122 s3-0)
|
||||
(a1-12 (-> arg1 world-pos))
|
||||
(a2-8 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-122 state) a1-12 a2-8)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
)
|
||||
(let ((f0-40 (+ 4096.0 f28-1)))
|
||||
(when (or (and (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(< 0.0 f0-40)
|
||||
(< 0.0 (-> arg1 velocity y))
|
||||
)
|
||||
(and (> (-> obj flight-level-index) 0) (< f0-40 0.0) (< (-> arg1 velocity y) 0.0))
|
||||
)
|
||||
(vector-reset! (-> arg1 force))
|
||||
(let ((f0-43 (* -0.25 (-> obj info-override inv-lift-thruster-count)))
|
||||
(f1-28 arg0)
|
||||
)
|
||||
(set! (-> arg1 force y) (* f0-43 (/ 1.0 f1-28) (-> obj info-override mass) (-> arg1 velocity y)))
|
||||
)
|
||||
(let ((v1-140 s3-0)
|
||||
(a1-16 (-> arg1 world-pos))
|
||||
(a2-9 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-140 state) a1-16 a2-9)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((f1-36 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1)))
|
||||
(f28-2 (- 1.0 (/ (+ -4096.0 f1-36) (+ -4096.0 f30-1))))
|
||||
)
|
||||
(if (>= (-> obj info-override cos-ground-effect-angle)
|
||||
(vector-dot (-> s1-1 ground-normal) (-> arg1 mat vector 1))
|
||||
)
|
||||
(set! f28-2 0.0)
|
||||
)
|
||||
(set! (-> arg1 tmp y) 0.0)
|
||||
(set! (-> arg1 tmp x) (-> arg1 velocity z))
|
||||
(set! (-> arg1 tmp z) (- (-> arg1 velocity x)))
|
||||
(vector-normalize! (-> arg1 tmp) 1.0)
|
||||
(vector+float*!
|
||||
(-> arg1 normal)
|
||||
(-> s1-1 ground-normal)
|
||||
(-> arg1 tmp)
|
||||
(- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp)))
|
||||
)
|
||||
(let ((v1-155 (-> arg1 force))
|
||||
(a0-55 (-> arg1 normal))
|
||||
(f0-58 (* 2.0 f28-2))
|
||||
(f1-41 arg0)
|
||||
)
|
||||
(vector-float*! v1-155 a0-55 (* f0-58
|
||||
(/ 1.0 f1-41)
|
||||
(-> obj info-override inv-lift-thruster-count)
|
||||
(-> obj info-override mass)
|
||||
(fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-157 s3-0)
|
||||
(a1-28 (-> arg1 world-pos))
|
||||
(a2-13 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-157 state) a1-28 a2-13)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
(let ((f0-72 (* 8.0
|
||||
(-> obj info-override mass)
|
||||
(-> obj info-override gravity)
|
||||
(-> obj info-override inv-lift-thruster-count)
|
||||
(+ (* (-> obj info-override spring-lift-factor) f28-2)
|
||||
(* 0.75 (-> obj jump-thrust) (-> obj info-override jump-thrust-factor))
|
||||
)
|
||||
(- (+ 1.0 (* 2.0 (rand-vu) (-> obj power-fluctuation-factor))) (-> obj power-fluctuation-factor))
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> obj lift-thrust s2-1) f0-72)
|
||||
(vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-72))
|
||||
)
|
||||
)
|
||||
(let ((v1-176 s3-0)
|
||||
(a1-32 (-> arg1 world-pos))
|
||||
(a2-14 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-176 state) a1-32 a2-14)
|
||||
)
|
||||
(vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force))
|
||||
(when (and (< 0.0 (-> obj info-override tire-friction-factor)) (let ((f0-75 0.0))
|
||||
(.lvf vf1 (&-> (-> s1-1 ground-normal) quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
||||
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
||||
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
||||
(.mov v1-184 vf1)
|
||||
(< f0-75 v1-184)
|
||||
)
|
||||
)
|
||||
(vector+float*!
|
||||
(-> arg1 normal)
|
||||
(-> s1-1 wheel-axis)
|
||||
(-> s1-1 ground-normal)
|
||||
(- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal)))
|
||||
)
|
||||
(vector-normalize! (-> arg1 normal) 1.0)
|
||||
(set! (-> arg1 world-pos quad) (-> s3-0 state position quad))
|
||||
(set! (-> arg1 velocity quad) (-> s3-0 state lin-velocity quad))
|
||||
(vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 state position))
|
||||
(vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal))
|
||||
(vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 state inv-i-world))
|
||||
(vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body))
|
||||
(set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal)))
|
||||
(let ((f0-82 (fabs (-> arg1 vel-dot-norm))))
|
||||
(set! (-> arg1 friction-coef)
|
||||
(smooth-interp
|
||||
(-> obj info-override tire-static-friction)
|
||||
(-> obj info-override tire-dynamic-friction)
|
||||
f0-82
|
||||
(-> obj info-override tire-static-friction-speed)
|
||||
(-> obj info-override tire-dynamic-friction-speed)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 friction-coef)
|
||||
(* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> obj engine-thrust))))))
|
||||
)
|
||||
(let ((f0-90
|
||||
(* (-> arg1 friction-coef)
|
||||
(-> obj info-override tire-friction-factor)
|
||||
(fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 impulse)
|
||||
(/ (* -1.0 (-> arg1 vel-dot-norm))
|
||||
(* arg0 (+ (-> s3-0 state info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp))))
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-90) (- f0-90)))
|
||||
)
|
||||
(vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse))
|
||||
(let ((v1-213 s3-0)
|
||||
(a1-45 (-> arg1 world-pos))
|
||||
(a2-19 (-> arg1 force))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-213 state) a1-45 a2-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 29 of type vehicle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Stack slot offset 624 signed mismatch
|
||||
;; WARN: Stack slot offset 724 signed mismatch
|
||||
;; WARN: Stack slot offset 720 signed mismatch
|
||||
;; WARN: Stack slot offset 624 signed mismatch
|
||||
;; WARN: Stack slot offset 724 signed mismatch
|
||||
;; WARN: Stack slot offset 720 signed mismatch
|
||||
;; WARN: Stack slot offset 624 signed mismatch
|
||||
;; WARN: Stack slot offset 724 signed mismatch
|
||||
;; WARN: Stack slot offset 720 signed mismatch
|
||||
;; WARN: Stack slot offset 624 signed mismatch
|
||||
;; WARN: Stack slot offset 724 signed mismatch
|
||||
;; WARN: Stack slot offset 720 signed mismatch
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-29 vehicle ((obj vehicle) (arg0 float))
|
||||
(local-vars (sv-624 float) (sv-720 float) (sv-724 float))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((gp-0 (new 'stack-no-clear 'inline-array 'matrix 9))
|
||||
(s5-0 (-> obj rbody))
|
||||
(s4-0 (-> obj info-override))
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> gp-0 0)) (the-as pointer (-> s5-0 state matrix)) 64)
|
||||
(when (not (logtest? (-> obj flags) (rigid-body-object-flag dead)))
|
||||
(vehicle-method-100 obj arg0 (the-as vehicle-physics-work gp-0))
|
||||
(when (>= 1 (-> obj force-level))
|
||||
(set! sv-624 (* (-> s4-0 mass) (-> s4-0 gravity)))
|
||||
(when (!= (-> s4-0 pitch-control-factor) 0.0)
|
||||
(set! (-> gp-0 3 vector 2 quad) (-> gp-0 0 quad 0))
|
||||
(set! (-> gp-0 3 vector 2 y) 0.0)
|
||||
(let ((f30-0 (vector-dot (-> gp-0 3 vector 2) (-> s5-0 state ang-velocity))))
|
||||
(dotimes (s1-0 (-> s4-0 lift-thruster-count))
|
||||
(let ((s0-0 (-> s4-0 lift-thruster-array s1-0)))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s0-0 local-pos) (-> gp-0 0))
|
||||
(vector-rotate*! (-> gp-0 1 trans) (-> s0-0 normal) (-> gp-0 0))
|
||||
(let* ((f0-5 -1.0)
|
||||
(f1-2 1.0)
|
||||
(f2-0 0.2)
|
||||
(a0-9 (the-as number (-> s0-0 local-pos z)))
|
||||
(a1-5 #xffffffff80000000)
|
||||
(v1-16 #x3f800000)
|
||||
(f0-7
|
||||
(* (fmax
|
||||
f0-5
|
||||
(fmin
|
||||
f1-2
|
||||
(* f2-0 (the-as float (logior (logand (the-as uint a0-9) a1-5) v1-16)) (-> s4-0 pitch-control-factor) f30-0)
|
||||
)
|
||||
)
|
||||
sv-624
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) (* -1.0 f0-7))
|
||||
)
|
||||
)
|
||||
(let ((v1-21 s5-0)
|
||||
(a1-7 (-> gp-0 1 vector 2))
|
||||
(a2-4 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-21 state) a1-7 (the-as vector a2-4))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (new 'stack-no-clear 'inline-array 'vector 5)))
|
||||
(let ((f0-12 (* -1.0 (-> obj controls steering) (-> gp-0 4 vector 1 w) (-> s4-0 roll-angle))))
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! f0-12 0.0)
|
||||
)
|
||||
(quaternion-vector-angle! (the-as quaternion (-> s1-1 0)) (-> gp-0 0 vector 2) f0-12)
|
||||
)
|
||||
(quaternion->matrix (the-as matrix (-> s1-1 1)) (the-as quaternion (-> s1-1 0)))
|
||||
(set! (-> gp-0 3 trans quad) (-> s1-1 2 quad))
|
||||
)
|
||||
(let ((f0-14 (vector-dot (the-as vector (-> gp-0 0)) (-> gp-0 3 trans))))
|
||||
(set! sv-720 (* (-> s4-0 mass) (-> s4-0 gravity)))
|
||||
(let ((f1-11 f0-14))
|
||||
(set! sv-724
|
||||
(+ (* f1-11 f1-11 f0-14) (* 0.075 (vector-dot (-> gp-0 0 vector 2) (-> s5-0 state ang-velocity))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s1-2 (-> s4-0 roll-thruster-count))
|
||||
(let* ((s0-1 (-> s4-0 roll-thruster-array s1-2))
|
||||
(f0-17 0.0)
|
||||
(f1-16 1.0)
|
||||
(f2-7 -1.0)
|
||||
(a0-19 (the-as number (-> s0-1 local-pos x)))
|
||||
(a1-10 #xffffffff80000000)
|
||||
(v1-44 #x3f800000)
|
||||
(f30-1
|
||||
(fmax f0-17 (fmin f1-16 (* f2-7 (the-as float (logior (logand (the-as uint a0-19) a1-10) v1-44)) sv-724)))
|
||||
)
|
||||
)
|
||||
(when (< 0.0 f30-1)
|
||||
(let ((f30-2
|
||||
(* (+ f30-1 (+ (- (-> obj power-fluctuation-factor)) (* 2.0 (rand-vu) (-> obj power-fluctuation-factor))))
|
||||
(-> s4-0 roll-control-factor)
|
||||
sv-720
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> obj roll-thrust s1-2) (fmax 0.0 f30-2))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s0-1 local-pos) (-> gp-0 0))
|
||||
(vector-rotate*! (-> gp-0 1 trans) (-> s0-1 normal) (-> gp-0 0))
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) (* -1.0 f30-2))
|
||||
)
|
||||
(let ((v1-56 s5-0)
|
||||
(a1-14 (-> gp-0 1 vector 2))
|
||||
(a2-8 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-56 state) a1-14 (the-as vector a2-8))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when #t
|
||||
(let* ((f0-30 (-> obj controls steering))
|
||||
(f1-23 (-> s4-0 steering-thruster-half-gain-speed))
|
||||
(f2-10 (-> s4-0 steering-thruster-half-gain-speed))
|
||||
(v1-65 (-> s5-0 state lin-velocity))
|
||||
(f2-12 (/ f1-23 (+ f2-10 (sqrtf (+ (* (-> v1-65 x) (-> v1-65 x)) (* (-> v1-65 z) (-> v1-65 z)))))))
|
||||
)
|
||||
(if (< (-> obj controls throttle) 0.0)
|
||||
(set! f0-30 (* -1.0 f0-30))
|
||||
)
|
||||
(set! (-> gp-0 3 vector 2 quad) (-> gp-0 0 vector 1 quad))
|
||||
(let ((f30-3 (* 8192.0
|
||||
(-> s4-0 mass)
|
||||
(-> obj power-level)
|
||||
(- (* f0-30 f2-12 (-> s4-0 steering-thruster-max-gain))
|
||||
(vector-dot (-> gp-0 3 vector 2) (-> s5-0 state ang-velocity))
|
||||
)
|
||||
(-> s4-0 steering-thruster-factor)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! f30-3 (* f30-3 (-> s4-0 air-steering-factor)))
|
||||
)
|
||||
(let ((s1-3 (the-as object (-> s4-0 steering-thruster-array))))
|
||||
(countdown (s0-2 (-> s4-0 steering-thruster-count))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> (the-as vehicle-control-point s1-3) local-pos) (-> gp-0 0))
|
||||
(vector-rotate*!
|
||||
(-> gp-0 1 trans)
|
||||
(-> (the-as (inline-array vehicle-control-point) s1-3) 0 normal)
|
||||
(-> gp-0 0)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) f30-3)
|
||||
(let ((v1-80 s5-0)
|
||||
(a1-17 (-> gp-0 1 vector 2))
|
||||
(a2-11 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-80 state) a1-17 (the-as vector a2-11))
|
||||
)
|
||||
(set! s1-3 (-> (the-as (inline-array vehicle-control-point) s1-3) 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(seek! (-> obj jump-thrust) 0.0 (* 6.0 arg0))
|
||||
(when (logtest? (rigid-body-object-flag ignition) (-> obj flags))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s4-0 engine-thrust-local-pos) (-> gp-0 0))
|
||||
(set! (-> gp-0 3 trans quad) (-> gp-0 0 vector 2 quad))
|
||||
(let ((f0-45 (* (-> obj engine-thrust)
|
||||
(-> s4-0 max-engine-thrust)
|
||||
(-> s4-0 mass)
|
||||
(-> obj power-level)
|
||||
(-> obj force-scale)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 3 trans) f0-45)
|
||||
)
|
||||
(when #t
|
||||
(let ((v1-94 s5-0)
|
||||
(a1-20 (-> gp-0 1 vector 2))
|
||||
(a2-14 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-94 state) a1-20 (the-as vector a2-14))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f30-4 (-> obj controls brake)))
|
||||
(when (< 0.0 f30-4)
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (-> s4-0 brake-local-pos) (-> gp-0 0))
|
||||
(let ((v1-98 s5-0)
|
||||
(a1-22 (-> gp-0 1 vector 2))
|
||||
(a2-16 (-> gp-0 1 vector 1))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-98 state) a1-22 a2-16)
|
||||
)
|
||||
(let* ((v1-101 (-> gp-0 1 vector 1))
|
||||
(f1-38 (sqrtf (+ (* (-> v1-101 x) (-> v1-101 x)) (* (-> v1-101 z) (-> v1-101 z)))))
|
||||
(f0-53 (* -98304.0 (-> s4-0 brake-factor) (-> s4-0 mass)))
|
||||
(f1-39 (fmax 16384.0 f1-38))
|
||||
(f0-55 (* f0-53 (/ 1.0 f1-39) f30-4))
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 vector 1) f0-55)
|
||||
)
|
||||
(let ((v1-109 s5-0)
|
||||
(a1-23 (-> gp-0 1 vector 2))
|
||||
(a2-17 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-109 state) a1-23 (the-as vector a2-17))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-4 (new 'stack-no-clear 'rigid-body-vehicle-constants)))
|
||||
(quad-copy!
|
||||
(the-as pointer s1-4)
|
||||
(the-as pointer (-> s4-0 stabilizer-array))
|
||||
(* (-> s4-0 stabilizer-count) 2)
|
||||
)
|
||||
(let ((s0-3 (-> s1-4 info inertial-tensor)))
|
||||
(let ((f0-57 (* -3640.889 (-> obj controls lean-z))))
|
||||
(vector-rotate-around-x! (the-as vector s0-3) (the-as vector s0-3) f0-57)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! (-> s0-3 vector 0 w) (* 10.0 (-> s0-3 vector 0 w)))
|
||||
)
|
||||
(if (logtest? (rigid-body-object-flag flight-level-transition) (-> obj flags))
|
||||
(set! (-> s0-3 vector 0 w) 0.0)
|
||||
)
|
||||
)
|
||||
(let ((f30-5 (* -0.0000006103516 (-> obj force-scale) (-> s4-0 mass) (-> s4-0 drag-force-factor))))
|
||||
(if (logtest? (-> obj flags) (rigid-body-object-flag in-air))
|
||||
(set! f30-5 (* f30-5 (-> s4-0 air-drag-factor)))
|
||||
)
|
||||
(let ((s1-5 (&-> s1-4 mass)))
|
||||
(countdown (s0-4 (-> s4-0 stabilizer-count))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (the-as vector (&-> s1-5 0)) (-> gp-0 0))
|
||||
(vector-rotate*! (-> gp-0 1 trans) (the-as vector (&-> s1-5 4)) (-> gp-0 0))
|
||||
(let ((v1-128 s5-0)
|
||||
(a1-28 (-> gp-0 1 vector 2))
|
||||
(a2-22 (-> gp-0 1 vector 1))
|
||||
)
|
||||
(rigid-body-method-22 (-> v1-128 state) a1-28 a2-22)
|
||||
)
|
||||
(let ((f0-70
|
||||
(* -0.06125
|
||||
(vector-dot (-> gp-0 1 trans) (-> gp-0 1 vector 1))
|
||||
(-> s1-5 7)
|
||||
(-> obj force-scale)
|
||||
(-> s4-0 mass)
|
||||
(-> s4-0 airfoil-factor)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 1)) (-> gp-0 1 trans) f0-70)
|
||||
)
|
||||
(when (<= (-> obj force-level) 0)
|
||||
(let ((v1-138 s5-0)
|
||||
(a1-29 (-> gp-0 1 vector 2))
|
||||
(a2-23 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-138 state) a1-29 (the-as vector a2-23))
|
||||
)
|
||||
)
|
||||
(vector-float*!
|
||||
(the-as vector (-> gp-0 1))
|
||||
(-> gp-0 1 vector 1)
|
||||
(* f30-5
|
||||
(-> s1-5 7)
|
||||
(+ (* 0.15 (vector-length (-> gp-0 1 vector 1))) (fabs (vector-dot (-> gp-0 1 trans) (-> gp-0 1 vector 1))))
|
||||
)
|
||||
)
|
||||
(when (<= (-> obj force-level) 0)
|
||||
(let ((v1-145 s5-0)
|
||||
(a1-35 (-> gp-0 1 vector 2))
|
||||
(a2-25 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-145 state) a1-35 (the-as vector a2-25))
|
||||
)
|
||||
)
|
||||
(set! s1-5 (&-> s1-5 8))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(.svf (&-> (-> gp-0 1) quad 0) vf0)
|
||||
(set! (-> gp-0 1 vector 0 y) (* -1.0
|
||||
(-> s4-0 gravity)
|
||||
(if (< 1 (-> obj force-level))
|
||||
2.0
|
||||
1.0
|
||||
)
|
||||
(-> s4-0 mass)
|
||||
)
|
||||
)
|
||||
(let ((v1-154 s5-0)
|
||||
(a1-36 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-20 (-> v1-154 state) (the-as vector a1-36))
|
||||
)
|
||||
(when (logtest? (-> obj flags) (rigid-body-object-flag riding))
|
||||
(set! (-> gp-0 2 quad 0) (-> s4-0 cm-joint quad))
|
||||
(+! (-> gp-0 2 vector 0 x) (* (-> obj controls steering) (-> s4-0 player-shift-x)))
|
||||
(+! (-> gp-0 2 vector 0 z) (* (-> obj controls lean-z) (-> s4-0 player-shift-z)))
|
||||
(vector-matrix*! (-> gp-0 1 vector 2) (the-as vector (-> gp-0 2)) (-> gp-0 0))
|
||||
(.svf (&-> (-> gp-0 1) quad 0) vf0)
|
||||
(set! (-> gp-0 1 vector 0 y) (- (-> s4-0 player-weight)))
|
||||
(let ((v1-162 s5-0)
|
||||
(a1-38 (-> gp-0 1 vector 2))
|
||||
(a2-27 (-> gp-0 1))
|
||||
)
|
||||
(rigid-body-method-18 (-> v1-162 state) a1-38 (the-as vector a2-27))
|
||||
)
|
||||
0
|
||||
)
|
||||
(rigid-body-object-method-50 obj arg0)
|
||||
(vehicle-method-99 obj arg0)
|
||||
(when (not (logtest? (-> obj flags) (rigid-body-object-flag dead)))
|
||||
(set! (-> gp-0 1 trans quad) (-> s5-0 state lin-momentum quad))
|
||||
(set! (-> gp-0 1 trans y) 0.0)
|
||||
(vector-normalize! (-> gp-0 1 trans) 1.0)
|
||||
(let* ((v1-174 (-> s5-0 state lin-velocity))
|
||||
(f0-90 (/ (sqrtf (+ (* (-> v1-174 x) (-> v1-174 x)) (* (-> v1-174 z) (-> v1-174 z)))) (-> s4-0 max-xz-speed)))
|
||||
(v1-176 (-> gp-0 1))
|
||||
(a0-65 (-> gp-0 1 trans))
|
||||
(f1-67 -1.0)
|
||||
(f2-29 (* (-> s4-0 speed-limiting-drag) (vector-dot (-> s5-0 state force) (-> gp-0 1 trans))))
|
||||
(f3-19
|
||||
(* (fabs (-> obj engine-thrust)) (-> s4-0 speed-scrubbing-drag) (vector-length (-> s5-0 state lin-momentum)))
|
||||
)
|
||||
(f4-6 (- 1.0 (fabs (vector-dot (-> s5-0 state matrix vector 2) (-> gp-0 1 trans)))))
|
||||
)
|
||||
(vector-float*! (the-as vector v1-176) a0-65 (* f1-67 (+ f2-29 (* f3-19 (* f4-6 f4-6))) (sqrtf f0-90)))
|
||||
)
|
||||
(let ((a1-51 (-> gp-0 1)))
|
||||
(rigid-body-method-20 (-> s5-0 state) (the-as vector a1-51))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 125 of type vehicle
|
||||
(defmethod vehicle-method-125 vehicle ((obj vehicle) (arg0 float))
|
||||
(rigid-body-object-method-29 obj arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 126 of type vehicle
|
||||
(defmethod vehicle-method-126 vehicle ((obj vehicle) (arg0 float))
|
||||
(rigid-body-object-method-29 obj arg0)
|
||||
(none)
|
||||
)
|
4
test/decompiler/reference/jak2/levels/city/common/vehicle-states_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/levels/city/common/vehicle-states_REF.gc
generated
vendored
@ -327,7 +327,7 @@
|
||||
(cond
|
||||
((logtest? (-> self rbody state flags) (rigid-body-flag enable-physics))
|
||||
(let ((gp-2 (new 'stack-no-clear 'rigid-body-info)))
|
||||
(mem-copy! (&-> gp-2 mass) (&-> (-> self info-override) mass) 188)
|
||||
(mem-copy! (&-> gp-2 mass) (the-as pointer (-> self info-override info)) 188)
|
||||
(set! (-> self rbody state info) (the-as rigid-body-info (&-> gp-2 mass)))
|
||||
(set! (-> gp-2 bounce-mult-factor) 0.0)
|
||||
(set! (-> gp-2 bounce-factor) 0.4)
|
||||
@ -336,7 +336,7 @@
|
||||
(set! (-> gp-2 friction-factor) 0.05)
|
||||
)
|
||||
(vehicle-method-121 self)
|
||||
(set! (-> self rbody state info) (the-as rigid-body-info (&-> (-> self info-override) mass)))
|
||||
(set! (-> self rbody state info) (-> self info-override info))
|
||||
(when (logtest? (-> self flags) (rigid-body-object-flag disturbed))
|
||||
(let* ((f0-14 (* 0.0033333334 (the float (- (-> self clock frame-counter) (-> self disturbed-time)))))
|
||||
(f0-17 (* f0-14 f0-14 (-> self camera-dist2)))
|
||||
|
22
test/decompiler/reference/jak2/levels/city/common/vehicle-util_REF.gc
generated
vendored
22
test/decompiler/reference/jak2/levels/city/common/vehicle-util_REF.gc
generated
vendored
@ -359,13 +359,13 @@ This commonly includes things such as:
|
||||
(vector-matrix*! (the-as vector (-> s5-0 matrices)) (-> s5-0 matrices 0 vector 1) (-> s5-0 matrices 2))
|
||||
(set! (-> s5-0 floats 0) 81920.0)
|
||||
(dotimes (s2-1 (-> obj info-override grab-rail-count))
|
||||
(let ((s1-0 (+ (-> obj info-override grab-rail-array) (* 48 s2-1))))
|
||||
(vector-! (-> s5-0 matrices 0 trans) (the-as vector (-> s5-0 matrices)) (the-as vector (+ s1-0 0)))
|
||||
(let ((s1-0 (-> obj info-override grab-rail-array s2-1)))
|
||||
(vector-! (-> s5-0 matrices 0 trans) (the-as vector (-> s5-0 matrices)) (the-as vector (-> s1-0 local-pos)))
|
||||
(when #t
|
||||
(let ((f30-0 (vector-segment-distance-point!
|
||||
(the-as vector (-> s5-0 matrices))
|
||||
(the-as vector (+ s1-0 0))
|
||||
(the-as vector (+ s1-0 16))
|
||||
(the-as vector (-> s1-0 local-pos))
|
||||
(-> s1-0 local-pos 1)
|
||||
(-> s5-0 matrices 0 trans)
|
||||
)
|
||||
)
|
||||
@ -373,7 +373,7 @@ This commonly includes things such as:
|
||||
(when (< f30-0 (-> s5-0 floats 0))
|
||||
(set! (-> s5-0 floats 0) f30-0)
|
||||
(set! (-> s5-0 vectors 0 quad) (-> s5-0 matrices 0 trans quad))
|
||||
(vector-! (-> s5-0 vectors 1) (the-as vector (+ s1-0 16)) (the-as vector (+ s1-0 0)))
|
||||
(vector-! (-> s5-0 vectors 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos)))
|
||||
(vector-normalize! (-> s5-0 vectors 1) 1.0)
|
||||
(set! s3-0 #t)
|
||||
(set! (-> s5-0 floats 3) (* (-> obj hit-points) (/ 40960.0 f30-0)))
|
||||
@ -790,9 +790,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(set! (-> obj lights-factor) 0.0)
|
||||
(let ((a0-8 (-> obj info-override color-option-select)))
|
||||
(set! (-> obj draw color-mult quad)
|
||||
(-> (the-as (pointer uint128) (+ (the-as uint (-> obj info-override color-option-array)) (* a0-8 16))))
|
||||
)
|
||||
(set! (-> obj draw color-mult quad) (-> obj info-override color-option-array a0-8 quad))
|
||||
)
|
||||
(+! (-> obj info-override color-option-select) 1)
|
||||
(when (>= (-> obj info-override color-option-select) (-> obj info-override color-option-count))
|
||||
@ -1194,7 +1192,11 @@ This commonly includes things such as:
|
||||
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
|
||||
(logior! (-> obj rbody state flags) (rigid-body-flag enable-physics))
|
||||
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override-2 trans) (-> obj root-override-2 quat))
|
||||
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info-override mass))
|
||||
(vector-float*!
|
||||
(-> obj rbody state lin-momentum)
|
||||
(-> obj root-override-2 transv)
|
||||
(-> obj info-override info mass)
|
||||
)
|
||||
(vector-reset! (-> obj rbody state ang-momentum))
|
||||
(vector-reset! (-> obj lin-acceleration))
|
||||
)
|
||||
@ -1386,7 +1388,7 @@ This commonly includes things such as:
|
||||
(let ((v1-0 (-> arg0 behavior)))
|
||||
(cond
|
||||
((= v1-0 1)
|
||||
((method-of-object obj vehicle-method-135))
|
||||
(vehicle-method-135 obj arg0)
|
||||
(vehicle-method-113 obj)
|
||||
)
|
||||
((zero? v1-0)
|
||||
|
16
test/decompiler/reference/jak2/levels/city/common/vehicle_REF.gc
generated
vendored
16
test/decompiler/reference/jak2/levels/city/common/vehicle_REF.gc
generated
vendored
@ -104,8 +104,8 @@
|
||||
(let* ((f0-0 1.0)
|
||||
(f1-0 (-> arg0 impulse))
|
||||
(f2-0 61440.0)
|
||||
(f30-0 (fmin f0-0 (* f1-0 (/ 1.0 f2-0) (-> obj info-override inv-mass))))
|
||||
(f28-0 (* (-> obj info-override mass) (-> obj info-override toughness-factor)))
|
||||
(f30-0 (fmin f0-0 (* f1-0 (/ 1.0 f2-0) (-> obj info-override info inv-mass))))
|
||||
(f28-0 (* (-> obj info-override info mass) (-> obj info-override toughness-factor)))
|
||||
)
|
||||
(set! (-> obj crash-impulse) (-> arg0 impulse))
|
||||
(cond
|
||||
@ -145,7 +145,7 @@
|
||||
)
|
||||
(if (< 0.1 f30-0)
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override glance-sound))
|
||||
(-> obj info-override glance-sound)
|
||||
(new-sound-id)
|
||||
(the int (* 1024.0 f30-0))
|
||||
0
|
||||
@ -158,7 +158,7 @@
|
||||
)
|
||||
(when (< (* 102400.0 f28-0) (-> arg0 impulse))
|
||||
(sound-play-by-name
|
||||
(the-as sound-name (-> obj info-override impact-sound))
|
||||
(-> obj info-override impact-sound)
|
||||
(new-sound-id)
|
||||
(the int (* 1024.0 f30-0))
|
||||
0
|
||||
@ -1593,13 +1593,13 @@
|
||||
(and (logtest? (-> arg1 mask) (attack-info-mask mode)) (= (-> arg1 mode) 'eco-dark))
|
||||
)
|
||||
(set! (-> s5-0 vector 2 y) (* 0.1 (-> s5-0 vector 2 y)))
|
||||
(set! f0-2 (* 409600.0 (-> obj info-override mass)))
|
||||
(set! f0-2 (* 409600.0 (-> obj info-override info mass)))
|
||||
(/ 0.4 (-> obj info-override damage-factor))
|
||||
)
|
||||
((or (logtest? (penetrate dark-punch dark-bomb) arg3)
|
||||
(and (logtest? (penetrate dark-skin) arg3) (logtest? arg3 (penetrate punch spin)))
|
||||
)
|
||||
(set! f0-2 (* 204800.0 (-> obj info-override mass)))
|
||||
(set! f0-2 (* 204800.0 (-> obj info-override info mass)))
|
||||
(/ 0.2 (-> obj info-override damage-factor))
|
||||
)
|
||||
((logtest? (penetrate enemy-yellow-shot) arg3)
|
||||
@ -1733,7 +1733,7 @@
|
||||
)
|
||||
(let ((f0-1 (vector-dot (-> s5-0 velocity) (-> s5-0 normal))))
|
||||
(b! (>= f0-1 0.0) cfg-32 :delay #f)
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info-override inv-mass))))
|
||||
(set! (-> s5-0 impulse) (/ f0-1 (+ f30-0 (-> obj info-override info inv-mass))))
|
||||
)
|
||||
(vector+float*! s2-0 s2-0 (-> s5-0 normal) (* -3.1 f30-0 (-> s5-0 impulse)))
|
||||
(set! (-> s2-0 y) (fmax (* 49152.0 f30-0) (-> s2-0 y)))
|
||||
@ -1942,7 +1942,7 @@
|
||||
|
||||
;; definition for method 135 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-135 vehicle ()
|
||||
(defmethod vehicle-method-135 vehicle ((obj vehicle) (arg0 traffic-object-spawn-params))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
9
test/decompiler/reference/jak2/levels/city/industrial/ctyinda-obs_REF.gc
generated
vendored
Normal file
9
test/decompiler/reference/jak2/levels/city/industrial/ctyinda-obs_REF.gc
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
9
test/decompiler/reference/jak2/levels/city/industrial/ctyindb-obs_REF.gc
generated
vendored
Normal file
9
test/decompiler/reference/jak2/levels/city/industrial/ctyindb-obs_REF.gc
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
2336
test/decompiler/reference/jak2/levels/city/market/east/ashelin/ctyasha-obs_REF.gc
generated
vendored
Normal file
2336
test/decompiler/reference/jak2/levels/city/market/east/ashelin/ctyasha-obs_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
340
test/decompiler/reference/jak2/levels/city/palace/ctypal-obs_REF.gc
generated
vendored
Normal file
340
test/decompiler/reference/jak2/levels/city/palace/ctypal-obs_REF.gc
generated
vendored
Normal file
@ -0,0 +1,340 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type water-anim-ctypal
|
||||
(deftype water-anim-ctypal (water-anim)
|
||||
()
|
||||
:heap-base #x80
|
||||
:method-count-assert 29
|
||||
:size-assert #x100
|
||||
:flag-assert #x1d00800100
|
||||
)
|
||||
|
||||
;; definition for method 3 of type water-anim-ctypal
|
||||
(defmethod inspect water-anim-ctypal ((obj water-anim-ctypal))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type water-anim inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol ripple-for-water-anim-ctypal, type ripple-wave-set
|
||||
(define ripple-for-water-anim-ctypal (new 'static 'ripple-wave-set
|
||||
:count 3
|
||||
:converted #f
|
||||
:normal-scale 1.0
|
||||
:wave (new 'static 'inline-array ripple-wave 4
|
||||
(new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75)
|
||||
(new 'static 'ripple-wave)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol ripple-ctypal-smlground-pool, type ripple-wave-set
|
||||
(define ripple-ctypal-smlground-pool (new 'static 'ripple-wave-set
|
||||
:count 3
|
||||
:converted #f
|
||||
:normal-scale 1.0
|
||||
:wave (new 'static 'inline-array ripple-wave 4
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv -1 :zdiv 1 :speed 1.5)
|
||||
(new 'static 'ripple-wave :scale 10.0 :xdiv 1 :zdiv 1 :speed 0.75)
|
||||
(new 'static 'ripple-wave)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 24 of type water-anim-ctypal
|
||||
;; WARN: Return type mismatch ripple-wave-set vs none.
|
||||
(defmethod init-water! water-anim-ctypal ((obj water-anim-ctypal))
|
||||
"Initialize a [[water-anim]]'s default settings, this may include applying a [[riple-control]]"
|
||||
(let ((t9-0 (method-of-type water-anim init-water!)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((v1-2 (new 'process 'ripple-control)))
|
||||
(set! (-> obj draw ripple) v1-2)
|
||||
(set-vector! (-> obj draw color-mult) 0.01 0.45 0.5 0.75)
|
||||
(set! (-> v1-2 global-scale) 3072.0)
|
||||
(set! (-> v1-2 close-fade-dist) 163840.0)
|
||||
(set! (-> v1-2 far-fade-dist) 245760.0)
|
||||
(set! (-> v1-2 waveform) ripple-for-water-anim-ctypal)
|
||||
(case (-> obj look)
|
||||
((32 30)
|
||||
(set! (-> v1-2 waveform) ripple-ctypal-smlground-pool)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-palace-door palace-door palace-door-lod0-jg palace-door-idle-ja
|
||||
((palace-door-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 30 0 36)
|
||||
)
|
||||
|
||||
;; definition of type palace-door
|
||||
(deftype palace-door (com-airlock)
|
||||
()
|
||||
:heap-base #x100
|
||||
:method-count-assert 28
|
||||
:size-assert #x174
|
||||
:flag-assert #x1c01000174
|
||||
)
|
||||
|
||||
;; definition for method 3 of type palace-door
|
||||
(defmethod inspect palace-door ((obj palace-door))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type com-airlock inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 11 of type palace-door
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! palace-door ((obj palace-door) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 122880.0 0.0 147456.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-7 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-7 transform-index) 3)
|
||||
(set-vector! (-> v1-7 local-sphere) 0.0 57344.0 0.0 90112.0)
|
||||
)
|
||||
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-9 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-9 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-9 transform-index) 5)
|
||||
(set-vector! (-> v1-9 local-sphere) 0.0 -61440.0 0.0 73728.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-12 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override) s5-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-palace-door" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(init-airlock! obj)
|
||||
(set! (-> obj pre-open-frame) 48.0)
|
||||
(set! (-> obj lock-frame) 60.0)
|
||||
(set! (-> obj open-frame) 60.0)
|
||||
(set! (-> obj sound-pre-open) (static-sound-spec "pal-door-open-1"))
|
||||
(set! (-> obj sound-open) (static-sound-spec "pal-door-open-2"))
|
||||
(set! (-> obj sound-close) (static-sound-spec "pal-door-close"))
|
||||
(set! (-> obj sound-post-close) (static-sound-spec "pal-door-close2"))
|
||||
(set! (-> obj sound-behind?) #t)
|
||||
(set! (-> obj door-radius) 40960.0)
|
||||
(go (method-of-object obj close) #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type ctypal-broke-wall
|
||||
(deftype ctypal-broke-wall (process-drawable)
|
||||
((ent basic :offset-assert 200)
|
||||
)
|
||||
:heap-base #x50
|
||||
:method-count-assert 22
|
||||
:size-assert #xcc
|
||||
:flag-assert #x16005000cc
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(done () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ctypal-broke-wall
|
||||
(defmethod inspect ctypal-broke-wall ((obj ctypal-broke-wall))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Tent: ~A~%" (-> obj ent))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-ctypal-broke-wall ctypal-broke-wall ctypal-broke-wall-lod0-jg ctypal-broke-wall-idle-ja
|
||||
((ctypal-broke-wall-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 10 0 20)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (ctypal-broke-wall)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (task-node-closed? (game-task-node canyon-insert-items-resolution))
|
||||
(format 0 "~A canyon-insert-items-resolution done~%" (-> self name))
|
||||
(process-drawable-from-entity! self (the-as entity-actor (-> self ent)))
|
||||
(go-virtual done)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (the-as (function none :behavior ctypal-broke-wall) sleep-code)
|
||||
:post (behavior ()
|
||||
(transform-post)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate done (ctypal-broke-wall)
|
||||
:virtual #t
|
||||
:code (the-as (function none :behavior ctypal-broke-wall) sleep-code)
|
||||
:post (behavior ()
|
||||
(transform-post)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type ctypal-broke-wall
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ctypal-broke-wall ((obj ctypal-broke-wall) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(format #t "~A initialising~%" (-> obj name))
|
||||
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 40960.0 0.0 122880.0)
|
||||
(set! (-> s4-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s4-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root) s4-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctypal-broke-wall" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(let ((v1-10 (-> obj root)))
|
||||
(format
|
||||
0
|
||||
"trans ~F ~F ~F~%"
|
||||
(* 0.00024414062 (-> v1-10 trans x))
|
||||
(* 0.00024414062 (-> v1-10 trans y))
|
||||
(* 0.00024414062 (-> v1-10 trans z))
|
||||
)
|
||||
)
|
||||
(set! (-> obj ent) arg0)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type ctypal-baron-statue-broken
|
||||
(deftype ctypal-baron-statue-broken (process-drawable)
|
||||
()
|
||||
:heap-base #x50
|
||||
:method-count-assert 21
|
||||
:size-assert #xc8
|
||||
:flag-assert #x15005000c8
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ctypal-baron-statue-broken
|
||||
(defmethod inspect ctypal-baron-statue-broken ((obj ctypal-baron-statue-broken))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-ctypal-baron-statue-broken ctypal-baron-statue-broken ctypal-baron-statue-broken-lod0-jg ctypal-baron-statue-broken-idle-ja
|
||||
((ctypal-baron-statue-broken-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 5 0 72)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type ctypal-baron-statue-broken
|
||||
(defmethod run-logic? ctypal-baron-statue-broken ((obj ctypal-baron-statue-broken))
|
||||
#t
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (ctypal-baron-statue-broken)
|
||||
:virtual #t
|
||||
:code (the-as (function none :behavior ctypal-baron-statue-broken) sleep-code)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type ctypal-baron-statue-broken
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ctypal-baron-statue-broken ((obj ctypal-baron-statue-broken) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-ctypal-baron-statue-broken" (the-as (pointer uint32) #f))
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(if (not (task-node-closed? (game-task-node canyon-insert-items-resolution)))
|
||||
(logior! (-> obj draw status) (draw-control-status no-draw))
|
||||
)
|
||||
(ja-post)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
2114
test/decompiler/reference/jak2/levels/city/port/mines/portrun_REF.gc
generated
vendored
Normal file
2114
test/decompiler/reference/jak2/levels/city/port/mines/portrun_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
383
test/decompiler/reference/jak2/levels/common/entities/com-elevator_REF.gc
generated
vendored
Normal file
383
test/decompiler/reference/jak2/levels/common/entities/com-elevator_REF.gc
generated
vendored
Normal file
@ -0,0 +1,383 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type com-elevator
|
||||
(deftype com-elevator (elevator)
|
||||
((camera-startup vector 2 :inline :offset-assert 368)
|
||||
(use-camera-startup? symbol 2 :offset-assert 400)
|
||||
(sound-id sound-id :offset-assert 408)
|
||||
)
|
||||
:heap-base #x120
|
||||
:method-count-assert 50
|
||||
:size-assert #x19c
|
||||
:flag-assert #x320120019c
|
||||
(:methods
|
||||
(com-elevator-method-49 (_type_ symbol) none 49)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type com-elevator
|
||||
(defmethod inspect com-elevator ((obj com-elevator))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type elevator inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Tcamera-startup[2] @ #x~X~%" (-> obj camera-startup))
|
||||
(format #t "~2Tuse-camera-startup?[2] @ #x~X~%" (-> obj use-camera-startup?))
|
||||
(format #t "~2Tsound-id: ~D~%" (-> obj sound-id))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-com-elevator com-elevator com-elevator-lod0-jg com-elevator-idle-ja
|
||||
((com-elevator-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 5.6 9.2)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type com-elevator
|
||||
(defmethod get-art-group com-elevator ((obj com-elevator))
|
||||
"@returns The associated [[art-group]]"
|
||||
(art-group-get-by-name *level* "skel-com-elevator" (the-as (pointer uint32) #f))
|
||||
)
|
||||
|
||||
;; definition for method 43 of type com-elevator
|
||||
(defmethod move-between-points com-elevator ((obj com-elevator) (arg0 vector) (arg1 float) (arg2 float))
|
||||
"Move between two points on the elevator's path
|
||||
@param vec TODO not sure
|
||||
@param point-a The first point fetched from the elevator's path
|
||||
@param point-b The second point fetched from the path
|
||||
@see [[path-control]] and [[elevator]]"
|
||||
(let ((s4-0 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg1 'interp))
|
||||
(a0-3 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg2 'interp))
|
||||
(v1-3 (-> obj root-override trans))
|
||||
)
|
||||
(when (and (< (-> a0-3 y) (-> s4-0 y)) (< (-> arg0 y) (+ -8192.0 (-> v1-3 y))))
|
||||
(let ((s4-2 (vector-! (new 'stack-no-clear 'vector) arg0 v1-3)))
|
||||
(vector-inv-orient-by-quat! s4-2 s4-2 (-> obj root-override quat))
|
||||
(and (< (fabs (-> s4-2 x)) 24576.0) (< 0.0 (-> s4-2 z)) (< (-> s4-2 z) 49152.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 45 of type com-elevator
|
||||
(defmethod commited-to-ride? com-elevator ((obj com-elevator))
|
||||
"@returns if the target is considered within the elevator area enough to begin descending/ascending"
|
||||
(with-pp
|
||||
(let* ((s5-0 *target*)
|
||||
(a0-2 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(and (when a0-2
|
||||
(let* ((v1-2 (get-trans a0-2 0))
|
||||
(s5-2 (vector-! (new 'stack-no-clear 'vector) v1-2 (-> obj root-override trans)))
|
||||
)
|
||||
(vector-inv-orient-by-quat! s5-2 s5-2 (-> obj root-override quat))
|
||||
(and (< (fabs (-> s5-2 x)) 20480.0) (< 0.0 (-> s5-2 z)) (< (-> s5-2 z) 40960.0))
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (res-lump-struct (-> obj entity) 'on-notice structure)))
|
||||
(not (if gp-1
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (the-as vector #f))
|
||||
(the-as pair gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 49 of type com-elevator
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod com-elevator-method-49 com-elevator ((obj com-elevator) (arg0 symbol))
|
||||
(let ((v1-3 (-> (the-as collide-shape-prim-group (-> obj root-override root-prim)) child 1)))
|
||||
(cond
|
||||
(arg0
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-3 prim-core collide-with) (collide-spec jak player-list))
|
||||
)
|
||||
(else
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-3 prim-core collide-with) (collide-spec))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate dormant (com-elevator)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-1 (-> (the-as state (find-parent-method com-elevator 34)) enter)))
|
||||
(if t9-1
|
||||
((the-as (function none) t9-1))
|
||||
)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #t)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate running (com-elevator)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type elevator running) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(com-elevator-method-49 self #t)
|
||||
(if (not (logtest? (-> self elevator-status) (elevator-status moving)))
|
||||
(set-setting! 'allow-look-around #f 0 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(sound-stop (-> self sound-id))
|
||||
(sound-play "com-elevator-e")
|
||||
(let ((t9-3 (-> (method-of-type elevator running) exit)))
|
||||
(if t9-3
|
||||
(t9-3)
|
||||
)
|
||||
)
|
||||
(com-elevator-method-49 self #f)
|
||||
(remove-setting! 'allow-look-around)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(sound-play "com-elevator-s")
|
||||
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
(until #f
|
||||
(suspend)
|
||||
(sound-play "com-elevator-lp" :id (-> self sound-id))
|
||||
(when (= (-> self path-pos) 1.0)
|
||||
(let ((v1-11 (the int (-> self move-pos 1))))
|
||||
(if (-> self use-camera-startup? v1-11)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
'string-startup-vector
|
||||
(seconds 0.05)
|
||||
'string-startup-vector
|
||||
'abs
|
||||
(the-as float (-> self camera-startup v1-11))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 40 of type com-elevator
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod activate-elevator com-elevator ((obj com-elevator))
|
||||
"Puts the elevator initially into the correct state. This is typically based upon game completion"
|
||||
(cond
|
||||
((logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete))
|
||||
(go (method-of-object obj dormant))
|
||||
)
|
||||
((logtest? (-> obj params flags) (elevator-flags elevator-flags-6))
|
||||
(go (method-of-object obj arrived))
|
||||
)
|
||||
(else
|
||||
(go (method-of-object obj waiting))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type com-elevator
|
||||
(defmethod deactivate com-elevator ((obj com-elevator))
|
||||
(sound-stop (-> obj sound-id))
|
||||
((the-as (function elevator none) (find-parent-method com-elevator 10)) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type com-elevator
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod init-plat! com-elevator ((obj com-elevator))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
(dotimes (s5-0 (-> obj path curve num-cverts))
|
||||
(let ((a1-1 (res-lump-struct (-> obj entity) 'string-startup-vector structure :time (the float s5-0))))
|
||||
(cond
|
||||
(a1-1
|
||||
(vector-normalize-copy! (-> obj camera-startup s5-0) (the-as vector a1-1) 1.0)
|
||||
(set! (-> obj use-camera-startup? s5-0) #t)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj use-camera-startup? s5-0) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 31 of type com-elevator
|
||||
(defmethod init-plat-collision! com-elevator ((obj com-elevator))
|
||||
"TODO - collision stuff for setting up the platform"
|
||||
(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)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> s4-0 transform-index) 3)
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 22937.6 37683.2)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(pusher-init s5-0)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
|
||||
(set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-15 transform-index) 3)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 22937.6 37683.2)
|
||||
)
|
||||
(let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-17 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-17 transform-index) 3)
|
||||
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 22937.6 39321.6)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-20 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override) s5-0)
|
||||
)
|
||||
(com-elevator-method-49 obj #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type tomb-trans-elevator
|
||||
(deftype tomb-trans-elevator (com-elevator)
|
||||
((unknown-gijh1bn2i3hb1 int32 :offset-assert 412)
|
||||
)
|
||||
:heap-base #x120
|
||||
:method-count-assert 50
|
||||
:size-assert #x1a0
|
||||
:flag-assert #x32012001a0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type tomb-trans-elevator
|
||||
(defmethod inspect tomb-trans-elevator ((obj tomb-trans-elevator))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type com-elevator inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Tsound-id: ~D~%" (-> obj sound-id))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate running (tomb-trans-elevator)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type com-elevator running) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self elevator-status) (elevator-status waiting-to-descend))
|
||||
(set-setting! 'jump #f 0 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type com-elevator running) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(sound-stop (-> self sound-id))
|
||||
(sound-play "tmb-elev-stop")
|
||||
(if (logtest? (-> self elevator-status) (elevator-status waiting-to-descend))
|
||||
(remove-setting! 'jump)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> self clock frame-counter)))
|
||||
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
(until #f
|
||||
(sound-play "tmb-elevator-lp" :id (-> self sound-id))
|
||||
(suspend)
|
||||
(when (= (-> self path-pos) 1.0)
|
||||
(let ((v1-10 (the int (-> self move-pos 1))))
|
||||
(if (-> self use-camera-startup? v1-10)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
'string-startup-vector
|
||||
(seconds 0.05)
|
||||
'string-startup-vector
|
||||
'abs
|
||||
(the-as float (-> self camera-startup v1-10))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self elevator-status) (elevator-status waiting-to-ascend))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type tomb-trans-elevator
|
||||
(defmethod deactivate tomb-trans-elevator ((obj tomb-trans-elevator))
|
||||
(sound-stop (-> obj sound-id))
|
||||
((the-as (function com-elevator none) (find-parent-method tomb-trans-elevator 10)) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type tomb-trans-elevator
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod init-plat! tomb-trans-elevator ((obj tomb-trans-elevator))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
((the-as (function com-elevator none) (find-parent-method tomb-trans-elevator 33)) obj)
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
18
test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc
generated
vendored
18
test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc
generated
vendored
@ -87,15 +87,15 @@
|
||||
|
||||
;; definition for symbol *dig-sinking-platform-constants*, type rigid-body-object-constants
|
||||
(define *dig-sinking-platform-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:cm-joint (new 'static 'vector :y -8192.0 :w 1.0)
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 6)
|
||||
:inertial-tensor-y (meters 4)
|
||||
:inertial-tensor-z (meters 6)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :y -8192.0 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 4) (meters 6))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
|
45
test/decompiler/reference/jak2/levels/dig/dig1-obs_REF.gc
generated
vendored
45
test/decompiler/reference/jak2/levels/dig/dig1-obs_REF.gc
generated
vendored
@ -436,24 +436,25 @@
|
||||
)
|
||||
|
||||
;; definition for symbol *dig-bomb-crate-cylinder-constants*, type rigid-body-object-constants
|
||||
(define *dig-bomb-crate-cylinder-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 1)
|
||||
:inertial-tensor-y (meters 3)
|
||||
:inertial-tensor-z (meters 1)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
:attack-force-scale 2.0
|
||||
:name '*dig-bomb-crate-cylinder-constants*
|
||||
)
|
||||
)
|
||||
(define *dig-bomb-crate-cylinder-constants*
|
||||
(new 'static 'rigid-body-object-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1) (meters 3) (meters 1))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
:attack-force-scale 2.0
|
||||
:name '*dig-bomb-crate-cylinder-constants*
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (dig-bomb-crate-cylinder)
|
||||
@ -725,9 +726,9 @@
|
||||
(defmethod rigid-body-object-method-45 dig-bomb-crate-cylinder ((obj dig-bomb-crate-cylinder) (arg0 rigid-body-impact))
|
||||
(let* ((f0-0 (-> arg0 impulse))
|
||||
(f1-0 28672.0)
|
||||
(f30-0 (* f0-0 (/ 1.0 f1-0) (-> obj info inv-mass)))
|
||||
(f30-0 (* f0-0 (/ 1.0 f1-0) (-> obj info info inv-mass)))
|
||||
)
|
||||
(if (< (* 28672.0 (-> obj info mass)) (-> arg0 impulse))
|
||||
(if (< (* 28672.0 (-> obj info info mass)) (-> arg0 impulse))
|
||||
(sound-play-by-name
|
||||
(static-sound-name "barrel-bomb-hit")
|
||||
(new-sound-id)
|
||||
@ -859,8 +860,8 @@
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 quat))
|
||||
(rigid-body-object-method-33 self)
|
||||
(set! (-> self mask) (logior (process-mask platform) (-> self mask)))
|
||||
(vector-float*! (-> self rbody state lin-momentum) (-> arg0 vel) (-> self info mass))
|
||||
(vector-float*! (-> self rbody state ang-momentum) (-> arg0 avel) (-> self info mass))
|
||||
(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))
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
|
42
test/decompiler/reference/jak2/levels/dig/dig3-obs_REF.gc
generated
vendored
42
test/decompiler/reference/jak2/levels/dig/dig3-obs_REF.gc
generated
vendored
@ -1502,15 +1502,15 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for symbol *dig-tipping-rock-constants*, type rigid-body-platform-constants
|
||||
(define *dig-tipping-rock-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:cm-joint (new 'static 'vector :z -24576.0 :w 1.0)
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 4)
|
||||
:inertial-tensor-y (meters 3)
|
||||
:inertial-tensor-z (meters 21)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 4.0
|
||||
:inv-mass 0.25
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.48
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :z -24576.0 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 21))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
@ -1823,16 +1823,16 @@ This commonly includes things such as:
|
||||
|
||||
;; definition for symbol *dig-stomp-block-constants*, type rigid-body-object-constants
|
||||
(define *dig-stomp-block-constants* (new 'static 'rigid-body-object-constants
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 1)
|
||||
:inertial-tensor-y (meters 3)
|
||||
:inertial-tensor-z (meters 1)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.0
|
||||
:inv-mass 1.0
|
||||
:linear-damping 0.99
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1) (meters 3) (meters 1))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 200)
|
||||
@ -1919,11 +1919,11 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 x) (rand-vu-float-range -40960.0 40960.0))
|
||||
(set! (-> s5-0 y) (rand-vu-float-range -40960.0 0.0))
|
||||
(set! (-> s5-0 z) (rand-vu-float-range -40960.0 40960.0))
|
||||
(vector-float*! (-> self rbody state lin-momentum) s5-0 (-> self info mass))
|
||||
(vector-float*! (-> self rbody state lin-momentum) s5-0 (-> self info info mass))
|
||||
(set! (-> gp-0 x) (rand-vu-float-range -10000.0 10000.0))
|
||||
(set! (-> gp-0 y) (rand-vu-float-range -10000.0 10000.0))
|
||||
(set! (-> gp-0 z) (rand-vu-float-range -10000.0 10000.0))
|
||||
(vector-float*! (-> self rbody state ang-momentum) gp-0 (-> self info mass))
|
||||
(vector-float*! (-> self rbody state ang-momentum) gp-0 (-> self info info mass))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
1809
test/decompiler/reference/jak2/levels/outro/outro-scenes_REF.gc
generated
vendored
Normal file
1809
test/decompiler/reference/jak2/levels/outro/outro-scenes_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
301
test/decompiler/reference/jak2/levels/power_station/power_switches/ctypower_REF.gc
generated
vendored
Normal file
301
test/decompiler/reference/jak2/levels/power_station/power_switches/ctypower_REF.gc
generated
vendored
Normal file
@ -0,0 +1,301 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 15 of type hud-turret
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw hud-turret ((obj hud-turret))
|
||||
(set-hud-piece-position!
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
(the int (+ 457.0 (* 130.0 (-> obj offset))))
|
||||
205
|
||||
)
|
||||
(format (clear (-> obj strings 0 text)) "~D" (-> obj values 0 current))
|
||||
(set-as-offset-from! (the-as hud-sprite (-> obj strings 0 pos)) (the-as vector4w (-> obj sprites)) -19 22)
|
||||
((method-of-type hud draw) obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 16 of type hud-turret
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update-values hud-turret ((obj hud-turret))
|
||||
(set! (-> obj values 0 target) (the int (-> *game-info* counter)))
|
||||
((method-of-type hud update-values) obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 17 of type hud-turret
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-callback hud-turret ((obj hud-turret))
|
||||
(set! (-> obj level) (level-get *level* 'ctywide))
|
||||
(set! (-> obj gui-id)
|
||||
(add-process *gui-control* obj (gui-channel hud-middle-right) (gui-action hidden) (-> obj name) 81920.0 0)
|
||||
)
|
||||
(logior! (-> obj flags) (hud-flags show))
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x8 :page #x679)))
|
||||
(set! (-> obj sprites 0 flags) (the-as uint 4))
|
||||
(set! (-> obj sprites 0 scale-x) 1.2)
|
||||
(set! (-> obj sprites 0 scale-y) 1.2)
|
||||
(alloc-string-if-needed obj 0)
|
||||
(set! (-> obj strings 0 scale) 0.6)
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for symbol *city-power-switch-on-position*, type (array vector)
|
||||
(define *city-power-switch-on-position* (new 'static 'boxed-array :type vector
|
||||
(new 'static 'vector :x 2336358.5 :y 32768.0 :z -935526.4 :w 1.0)
|
||||
(new 'static 'vector :x 4273357.0 :y 32645.12 :z 4159078.5 :w 1.0)
|
||||
(new 'static 'vector :x 4059136.0 :y 32768.0 :z 2203648.0 :w 1.0)
|
||||
(new 'static 'vector :x 3387392.0 :y 32768.0 :z 2748416.0 :w 1.0)
|
||||
(new 'static 'vector :x 3854336.0 :y 32768.0 :z 745472.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
0
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(when (not (task-node-closed? (game-task-node city-power-resolution)))
|
||||
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
|
||||
(set! (-> self begin-pos quad) (-> (new 'static 'vector :x -282624.0 :y 45056.0 :z 5464064.0 :w 1.0) quad))
|
||||
(set-setting! 'minimap 'clear 0 32)
|
||||
(set! (-> self max-count) 5)
|
||||
(set! (-> self count) 0)
|
||||
(set! (-> *game-info* counter) 5.0)
|
||||
(dotimes (v1-9 5)
|
||||
(set! (-> self data-int32 v1-9) 0)
|
||||
)
|
||||
(set! (-> self slave 10) (the-as handle #f))
|
||||
(dotimes (gp-0 (-> self max-count))
|
||||
(set! (-> self data-vector gp-0 quad) (-> *city-power-switch-on-position* gp-0 quad))
|
||||
(set! (-> self minimap gp-0)
|
||||
(add-icon! *minimap* self (the-as uint 15) (the-as int #f) (-> *city-power-switch-on-position* gp-0) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
1
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(send-event *traffic-manager* 'restore-default-settings)
|
||||
(dotimes (v1-3 (-> self max-count))
|
||||
(when (-> self minimap v1-3)
|
||||
(logior! (-> self minimap v1-3 flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap v1-3) #f)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
2
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(when (not (task-node-closed? (game-task-node city-power-resolution)))
|
||||
(check-time self)
|
||||
(set! (-> self count) 0)
|
||||
(dotimes (v1-3 (-> self max-count))
|
||||
(if (>= 1 (-> self data-int32 v1-3))
|
||||
(+! (-> self count) 1)
|
||||
)
|
||||
)
|
||||
(if (= (-> self count) (-> self max-count))
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
)
|
||||
(set! (-> *game-info* counter) (the float (-> self count)))
|
||||
)
|
||||
(when (or (zero? (-> self count)) (task-node-closed? (game-task-node city-power-resolution)))
|
||||
(when (zero? (-> self count))
|
||||
(talker-spawn-func (-> *talker-speech* 92) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(task-node-close! (game-task-node city-power-resolution))
|
||||
(send-event (handle->process (-> self hud-timer)) 'hide-and-die)
|
||||
(send-event (handle->process (-> self hud-counter)) 'hide-and-die)
|
||||
(set! (-> self fail-on-death?) #f)
|
||||
)
|
||||
(cond
|
||||
((handle->process (-> self slave 10))
|
||||
(let ((gp-1 (handle->process (-> self slave 10))))
|
||||
(when (and gp-1
|
||||
(< 40960.0 (vector-vector-xz-distance (-> (the-as process-drawable gp-1) root trans) (target-pos 0)))
|
||||
)
|
||||
(send-event gp-1 'close)
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
3
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
()
|
||||
(set! (-> self hud-counter) (ppointer->handle (process-spawn hud-turret :init hud-init-by-other :to self)))
|
||||
(send-event *traffic-manager* 'set-target-level #x3f800000)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 5))
|
||||
(suspend)
|
||||
)
|
||||
(send-event *traffic-manager* 'set-alert-level 1)
|
||||
(send-event *traffic-manager* 'set-alert-duration #xa4cb80)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
5
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(dotimes (v1-0 (-> self max-count))
|
||||
(when (-> self minimap v1-0)
|
||||
(logior! (-> self minimap v1-0 flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap v1-0) #f)
|
||||
)
|
||||
)
|
||||
(kill-all-children self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
4
|
||||
(the-as (function object) (lambda :behavior task-manager
|
||||
()
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
(task-node-close! (game-task-node city-power-post-win))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set-subtask-hook!
|
||||
*game-info*
|
||||
87
|
||||
6
|
||||
(the-as
|
||||
(function object)
|
||||
(lambda :behavior task-manager
|
||||
((arg0 process-drawable) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((gp-0 (-> (level-get *level* 'lpower) entity data 0 entity)))
|
||||
(cond
|
||||
((= arg2 'guard-turret-status)
|
||||
(let ((v1-5 (-> arg3 param 0)))
|
||||
(let ((a0-2 (the-as object (-> arg3 param 1))))
|
||||
(set! (-> *city-power-switch-on-position* v1-5 quad) (-> (the-as vector a0-2) quad))
|
||||
)
|
||||
(-> self data-int32 v1-5)
|
||||
)
|
||||
)
|
||||
((= arg2 'guard-turret-killed)
|
||||
(let ((s4-1 (-> arg3 param 0)))
|
||||
(set! (-> self data-int32 s4-1) 1)
|
||||
(let ((v1-12 (process-spawn
|
||||
cty-guard-turret-button
|
||||
:init basebutton-init-by-other
|
||||
gp-0
|
||||
(-> arg0 root trans)
|
||||
(-> arg0 root quat)
|
||||
(-> arg0 entity)
|
||||
#f
|
||||
0
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self slave (-> self data-int32 s4-1)) (ppointer->handle v1-12))
|
||||
(set! (-> (the-as basebutton (-> v1-12 0)) event-down) 'button-down)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
((= arg2 'guard-turret-button-pushed)
|
||||
(let ((v1-21 (-> arg3 param 0)))
|
||||
(set! (-> self data-int32 v1-21) 2)
|
||||
(set! (-> self slave 10) (process->handle arg0))
|
||||
(logior! (-> self minimap v1-21 flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap v1-21) #f)
|
||||
)
|
||||
#t
|
||||
)
|
||||
((= arg2 'spawn-button)
|
||||
(let ((s4-2 (-> arg3 param 0))
|
||||
(s3-2 (-> arg3 param 1))
|
||||
)
|
||||
(when (not (handle->process (-> self slave (-> self data-int32 s4-2))))
|
||||
(let ((v0-1 (the-as object (ppointer->handle (process-spawn
|
||||
cty-guard-turret-button
|
||||
:init basebutton-init-by-other
|
||||
gp-0
|
||||
(-> arg0 root trans)
|
||||
(-> arg0 root quat)
|
||||
(-> arg0 entity)
|
||||
s3-2
|
||||
0
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self slave (-> self data-int32 s4-2)) (the-as handle v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
345
test/decompiler/reference/jak2/levels/power_station/vinroom-obs_REF.gc
generated
vendored
Normal file
345
test/decompiler/reference/jak2/levels/power_station/vinroom-obs_REF.gc
generated
vendored
Normal file
@ -0,0 +1,345 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type vin-turbine
|
||||
(deftype vin-turbine (process-drawable)
|
||||
((dont-draw-outside? symbol :offset-assert 200)
|
||||
(lightning-timer uint64 :offset-assert 208)
|
||||
(outside-plane plane :inline :offset-assert 224)
|
||||
(lightning-plane plane :inline :offset-assert 240)
|
||||
)
|
||||
:heap-base #x80
|
||||
:method-count-assert 22
|
||||
:size-assert #x100
|
||||
:flag-assert #x1600800100
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(dormant () _type_ :state 21)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vin-turbine
|
||||
(defmethod inspect vin-turbine ((obj vin-turbine))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Tdont-draw-outside?: ~A~%" (-> obj dont-draw-outside?))
|
||||
(format #t "~2Tlightning-timer: ~D~%" (-> obj lightning-timer))
|
||||
(format #t "~2Toutside-plane: #<plane @ #x~X>~%" (-> obj outside-plane))
|
||||
(format #t "~2Tlightning-plane: #<plane @ #x~X>~%" (-> obj lightning-plane))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1245
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 60))
|
||||
(sp-flt spt-rot-x 2048.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 64.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-g 128.0 64.0 1.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 32.0)
|
||||
(sp-int spt-timer 300)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
||||
(sp-flt spt-userdata 1638.4)
|
||||
(sp-int spt-next-time 5)
|
||||
(sp-launcher-by-id spt-next-launcher 167)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1246
|
||||
:init-specs ((sp-flt spt-scale-x (meters 60))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 64.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-g 128.0 64.0 1.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-rnd-flt spt-a 24.0 32.0 1.0)
|
||||
(sp-int spt-next-time 5)
|
||||
(sp-launcher-by-id spt-next-launcher 167)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *lightning-spec-id-table* 17) (new 'static 'lightning-spec
|
||||
:name "lightning-turbine"
|
||||
:flags (lightning-spec-flags lsf2)
|
||||
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
:end-color (new 'static 'rgba :a #x80)
|
||||
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
||||
:fade-start-factor 0.2
|
||||
:fade-time 120.0
|
||||
:texture (new 'static 'texture-id :index #x83 :page #xc)
|
||||
:reduction 0.42
|
||||
:num-points 16
|
||||
:box-size 12288.0
|
||||
:merge-factor 0.5
|
||||
:merge-count 4
|
||||
:radius 2048.0
|
||||
:duration 300.0
|
||||
:sound #f
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-vin-turbine vin-turbine vin-turbine-lod0-jg vin-turbine-idle-ja
|
||||
((vin-turbine-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 6)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate dormant (vin-turbine)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (>= (vector4-dot (the-as vector (-> self outside-plane)) (math-camera-pos)) 0.0)
|
||||
(go-virtual idle)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (the-as (function none :behavior vin-turbine) sleep-code)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (vin-turbine)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(if (and (-> self dont-draw-outside?)
|
||||
(< (vector4-dot (the-as vector (-> self outside-plane)) (math-camera-pos)) 0.0)
|
||||
)
|
||||
(go-virtual dormant)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group)
|
||||
:num! (seek! (the float (+ (-> (ja-group) frames num-frames) -1)))
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
:post (behavior ()
|
||||
(when (and (or (not (-> self dont-draw-outside?))
|
||||
(>= (vector4-dot (the-as vector (-> self lightning-plane)) (math-camera-pos)) 0.0)
|
||||
)
|
||||
(< (the-as time-frame (-> self lightning-timer)) (-> self clock frame-counter))
|
||||
)
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix))
|
||||
(s3-1
|
||||
(vector-rotate-x! (new 'stack-no-clear 'vector) *y-vector* (* 182.04445 (rand-vu-float-range 10.0 40.0)))
|
||||
)
|
||||
(gp-2 (new 'stack-no-clear 'vector))
|
||||
(s5-1 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(if (rand-vu-percent? 0.5)
|
||||
(vector-negate! s3-1 s3-1)
|
||||
)
|
||||
(vector-rotate-y! s3-1 s3-1 (* 182.04445 (rand-vu-float-range 0.0 360.0)))
|
||||
(vector+float*! gp-2 (-> self root trans) s3-1 15564.8)
|
||||
(set! (-> s5-1 start-pos quad) (-> gp-2 quad))
|
||||
(set-vector!
|
||||
(-> s5-1 move-dist)
|
||||
(rand-vu-float-range -4551.1113 4551.1113)
|
||||
0.0
|
||||
(rand-vu-float-range -910.2222 910.2222)
|
||||
1.0
|
||||
)
|
||||
(matrix-rotate-zyx! s4-0 (-> s5-1 move-dist))
|
||||
(let ((s4-1 (vector-rotate*! (new 'stack-no-clear 'vector) s3-1 s4-0)))
|
||||
(vector-normalize! s4-1 6144.0)
|
||||
(vector+! (-> s5-1 start-pos) (-> s5-1 start-pos) s4-1)
|
||||
(vector-normalize-copy! (-> s5-1 move-dist) s4-1 81920.0)
|
||||
)
|
||||
(let ((v1-17 s5-1))
|
||||
(set! (-> v1-17 radius) 409.6)
|
||||
(set! (-> v1-17 collide-with) (collide-spec backgnd))
|
||||
(set! (-> v1-17 ignore-process0) self)
|
||||
(set! (-> v1-17 ignore-process1) #f)
|
||||
(set! (-> v1-17 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-17 action-mask) (collide-action solid))
|
||||
)
|
||||
(when (>= (fill-and-probe-using-line-sphere *collide-cache* s5-1) 0.0)
|
||||
(set! (-> self lightning-timer)
|
||||
(the-as uint (+ (-> self clock frame-counter) (the int (* 300.0 (rand-vu-float-range 0.1 0.4)))))
|
||||
)
|
||||
(let ((s4-3 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-3 quad) (-> s5-1 best-other-tri intersect quad))
|
||||
(when (< 8192.0 (vector-vector-distance gp-2 s4-3))
|
||||
(let ((s3-2 (process-spawn
|
||||
lightning-tracker
|
||||
:init lightning-tracker-init
|
||||
(-> *lightning-spec-id-table* 17)
|
||||
0
|
||||
#f
|
||||
self
|
||||
gp-2
|
||||
s4-3
|
||||
:to self
|
||||
)
|
||||
)
|
||||
(v1-36 (get-field-spec-by-id (-> *part-id-table* 1245) (sp-field-id spt-timer)))
|
||||
)
|
||||
(if v1-36
|
||||
(set! (-> v1-36 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> s3-2 0)) duration)))
|
||||
)
|
||||
)
|
||||
(let ((t9-20 sp-launch-particles-var)
|
||||
(a0-33 *sp-particle-system-2d*)
|
||||
(a1-21 (-> *part-id-table* 1245))
|
||||
(a2-10 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-10 trans quad) (-> s4-3 quad))
|
||||
(t9-20 a0-33 a1-21 a2-10 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-post)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type vin-turbine
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! vin-turbine ((obj vin-turbine) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vin-turbine" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set-vector! (-> obj outside-plane) 0.707 0.0 0.707 -6377922.5)
|
||||
(set! (-> obj lightning-plane quad) (-> obj outside-plane quad))
|
||||
(set! (-> obj lightning-plane w) -6419865.5)
|
||||
(set! (-> obj dont-draw-outside?)
|
||||
(nonzero? (res-lump-value (-> obj entity) 'extra-id uint128 :time -1000000000.0))
|
||||
)
|
||||
(set! (-> obj lightning-timer) (the-as uint 0))
|
||||
(if (and (-> obj dont-draw-outside?)
|
||||
(< (vector4-dot (the-as vector (-> obj outside-plane)) (math-camera-pos)) 0.0)
|
||||
)
|
||||
(go (method-of-object obj dormant))
|
||||
(go (method-of-object obj idle))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-vin-door vin-door vin-door-lod0-jg vin-door-idle-ja
|
||||
((vin-door-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 3 0 6)
|
||||
)
|
||||
|
||||
;; definition of type vin-door
|
||||
(deftype vin-door (com-airlock)
|
||||
()
|
||||
:heap-base #x100
|
||||
:method-count-assert 28
|
||||
:size-assert #x174
|
||||
:flag-assert #x1c01000174
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vin-door
|
||||
(defmethod inspect vin-door ((obj vin-door))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type com-airlock inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 11 of type vin-door
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! vin-door ((obj vin-door) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 24576.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-8 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-8 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-8 transform-index) 4)
|
||||
(set-vector! (-> v1-8 local-sphere) 8192.0 16384.0 0.0 20480.0)
|
||||
)
|
||||
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-10 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-10 transform-index) 5)
|
||||
(set-vector! (-> v1-10 local-sphere) -8192.0 16384.0 0.0 20480.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-13 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root-override) s5-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
obj
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vin-door" (the-as (pointer uint32) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(init-airlock! obj)
|
||||
(set! (-> obj sound-open-loop) (static-sound-spec "wood-door-open"))
|
||||
(set! (-> obj sound-open-stop) (static-sound-spec "wood-open-hit"))
|
||||
(set! (-> obj sound-close-loop) (static-sound-spec "wood-door-close"))
|
||||
(set! (-> obj sound-close-stop) (static-sound-spec "wood-close-hit"))
|
||||
(set! (-> obj door-radius) 12288.0)
|
||||
(go (method-of-object obj close) #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
20
test/decompiler/reference/jak2/levels/ruins/ruins-obs_REF.gc
generated
vendored
20
test/decompiler/reference/jak2/levels/ruins/ruins-obs_REF.gc
generated
vendored
@ -72,15 +72,15 @@
|
||||
|
||||
;; definition for symbol *ruins-sinking-platform-constants*, type rigid-body-platform-constants
|
||||
(define *ruins-sinking-platform-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 1.48
|
||||
:inv-mass 0.6756757
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.8
|
||||
:angular-damping 1.0
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 2)
|
||||
:inertial-tensor-y (meters 1)
|
||||
:inertial-tensor-z (meters 2)
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.48
|
||||
:inv-mass 0.6756757
|
||||
:linear-damping 0.8
|
||||
:angular-damping 1.0
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 2) (meters 1) (meters 2))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
@ -153,7 +153,7 @@
|
||||
)
|
||||
:post (behavior ()
|
||||
(set! (-> self info-override) *ruins-sinking-platform-constants*)
|
||||
(set! (-> self rbody state info) (the-as rigid-body-info (&-> (-> self info-override) mass)))
|
||||
(set! (-> self rbody state info) (-> self info-override info))
|
||||
(rigid-body-object-method-37 self)
|
||||
(none)
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/levels/stadium/stadium-scenes_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/stadium/stadium-scenes_REF.gc
generated
vendored
@ -1999,7 +1999,7 @@
|
||||
(set! (-> gp-0 info sky) #f)
|
||||
)
|
||||
)
|
||||
(race-start 2 #f #t)
|
||||
(the-as object (race-start 2 #f #t))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
63
test/decompiler/reference/jak2/levels/underport/under-obs_REF.gc
generated
vendored
63
test/decompiler/reference/jak2/levels/underport/under-obs_REF.gc
generated
vendored
@ -1043,36 +1043,37 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for symbol *under-buoy-plat-platform-constants*, type rigid-body-platform-constants
|
||||
(define *under-buoy-plat-platform-constants* (new 'static 'rigid-body-platform-constants
|
||||
:mass 1.48
|
||||
:inv-mass 0.6756757
|
||||
:cm-joint (new 'static 'vector :w 1.0)
|
||||
:linear-damping 0.8
|
||||
:angular-damping 0.5
|
||||
:friction-factor 0.1
|
||||
:inertial-tensor-x (meters 5)
|
||||
:inertial-tensor-y (meters 1)
|
||||
:inertial-tensor-z (meters 5)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
:name '*under-buoy-plat-platform-constants*
|
||||
:drag-factor 2.0
|
||||
:buoyancy-factor 2.3
|
||||
:max-buoyancy-depth (meters 1.5)
|
||||
:player-weight (meters 150)
|
||||
:player-bonk-factor 0.5
|
||||
:player-dive-factor 1.0
|
||||
:player-force-distance (meters 2)
|
||||
:player-force-clamp (meters 1000000)
|
||||
:player-force-timeout #x1e
|
||||
:explosion-force (meters 1000)
|
||||
:control-point-count 5
|
||||
:platform #t
|
||||
:sound-name "ruins-plat"
|
||||
)
|
||||
)
|
||||
(define *under-buoy-plat-platform-constants*
|
||||
(new 'static 'rigid-body-platform-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 1.48
|
||||
:inv-mass 0.6756757
|
||||
:linear-damping 0.8
|
||||
:angular-damping 0.5
|
||||
:friction-factor 0.1
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 1) (meters 5))
|
||||
)
|
||||
:max-time-step 0.02
|
||||
:gravity (meters 80)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
:name '*under-buoy-plat-platform-constants*
|
||||
:drag-factor 2.0
|
||||
:buoyancy-factor 2.3
|
||||
:max-buoyancy-depth (meters 1.5)
|
||||
:player-weight (meters 150)
|
||||
:player-bonk-factor 0.5
|
||||
:player-dive-factor 1.0
|
||||
:player-force-distance (meters 2)
|
||||
:player-force-clamp (meters 1000000)
|
||||
:player-force-timeout #x1e
|
||||
:explosion-force (meters 1000)
|
||||
:control-point-count 5
|
||||
:platform #t
|
||||
:sound-name "ruins-plat"
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 53 of type under-buoy-plat
|
||||
(defmethod rigid-body-platform-method-53 under-buoy-plat ((obj under-buoy-plat) (arg0 vector))
|
||||
@ -1111,7 +1112,7 @@ This commonly includes things such as:
|
||||
(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))
|
||||
(set! (-> obj info-override cm-joint y) 6144.0)
|
||||
(set! (-> obj info-override info cm-offset-joint y) 6144.0)
|
||||
(let ((s5-1 (-> obj info-override control-point-count)))
|
||||
(dotimes (s4-1 s5-1)
|
||||
(let ((s3-0 (-> obj control-point-array data s4-1)))
|
||||
|
@ -21,6 +21,7 @@
|
||||
"DGO/CTA.DGO",
|
||||
"DGO/CTB.DGO",
|
||||
"DGO/CTC.DGO",
|
||||
"DGO/CTYASHA.DGO",
|
||||
"DGO/CTYKORA.DGO",
|
||||
"DGO/CWI.DGO",
|
||||
"DGO/DG1.DGO",
|
||||
@ -44,6 +45,7 @@
|
||||
"DGO/LBOMBBOT.DGO",
|
||||
"DGO/LERLCHAL.DGO",
|
||||
"DGO/LKIDDOGE.DGO",
|
||||
"DGO/LPORTRUN.DGO",
|
||||
"DGO/LSACK.DGO",
|
||||
"DGO/MCN.DGO",
|
||||
"DGO/MTN.DGO",
|
||||
@ -51,6 +53,8 @@
|
||||
"DGO/NES.DGO",
|
||||
"DGO/ONINTENT.DGO",
|
||||
"DGO/ORACLE.DGO",
|
||||
"DGO/OUTROCST.DGO",
|
||||
"DGO/LPOWER.DGO",
|
||||
"DGO/PAC.DGO",
|
||||
"DGO/PAE.DGO",
|
||||
"DGO/PALOUT.DGO",
|
||||
|
Loading…
Reference in New Issue
Block a user