mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-21 07:37:45 -04:00
58a5440c8a
Makes a bunch of missions mostly playable, including: - `arena-training-1` - `arena-fight-1` - `wascity-chase` - `arena-fight-2` - `arena-fight-3` - `volcano-darkeco` - `desert-hover` - `nest-eggs` - `temple-climb` - `temple-oracle` - `temple-tests` - `desert-beast-battle` - `desert-turtle-training` - `desert-course-race` - `desert-artifact-race1` - `wascity-leaper-race` - `wascity-pre-game` - `sewer-met-hum` - `forest-kill-plants` - `forest-ring-chase` - `temple-defend` - `tower-destroy` - `desert-glide` --- Files: - `ripple` - `waswide-mood` - `sig-rider` - `nst-tasks` - `nst-part` - `nst-gas` - `nst-eggs-h` - `nst-obs` - `nst-mood` - `egg-spider` - `wasdoors-init` - `wasall-tasks` - `wvehicle-race` - `wcar-marauder` - `wcar-marauder-b` - `turret-control` - `was-squad-control` - `turtle-training` - `kleever-rider` - `course-race` - `artifact-race` - `desert-hover` - `desbeast-path-h` - `des-beast` - `desertg-obs` - `desertf-obs` - `desertd-obs` - `desert-dust-storm` - `des-cactus` - `race-hud` - `race-info` - `race-manager` - `tizard` - `flyingsaw` - `hover-training` - `temple-mood` - `temple-obs` - `temple-obs2` - `temple-part` - `temple-scenes` - `templex-mood` - `templex-obs` - `templex-part` - `tomb-baby-spider` - `target-turret-shot` - `target-turret` - `beast-battle-path` - `des-beast-2` - `mh-flyer` - `scorpion-gun` - `hover-enemy-h` - `hover-enemy` - `hover-formation-h` - `hover-formation` - `hover-nav-control-h` - `hover-nav-control` - `flamer-hover` - `hover-nav-templea` - `robo-hover` - `hover-nav-sewb` - `hover-nav-sewg` - `hover-nav-sewj` - `hover-nav-sewl` - `hover-nav-sewo` - `hover-nav-towera` - `tower-mood` - `tower-obs` - `tower-scenes` - `tower-part` - `eco-green-collider` - `forest-bridges` - `forest-kill-plants` - `forest-mood` - `forest-ring-chase` - `forest-tasks` - `forest-part` - `foresta-obs` - `hover-nav-foresta` - `mh-plant` - `dp-bipedal-part` - `dp-bipedal-shot` - `dp-bipedal` - `neo-spawner` - `for-turret` - `for-turret-shot` - `neo-wasp` - `neo-wasp-part` - `volcanox-scenes` - `volcanox-mood` - `volcano-scenes` - `volcano-mood` - `volcano-obs` - `volcano-obs2` - `chain-physics` - `rigid-body-plat` - `volcano-part` - `flamer-lava` - `flitter` - `spiky-frog` - `flut-wild` - `target-indax` - `target-indax-hang` - `mantis` - `volcanox-obs` - `spyder` - `wcar-faccar` - `mhcity-obs2` - `mhcity-part` - `mhcity-obs` - `dm-mine-spider` - `rapid-gunner` - `stadium-mood` - `stadium-scenes` - `stadiuma-mood` - `stadiuma-part` - `kanga-lizard` - `marauder` - `arena-scenes` - `wasstada-mood` - `wasstada-obs` - `wasstada-part` - `wasstadb-obs` - `wasstadc-obs` - `dm-flyer` - `maker-part` - `maker-projectile` - `skeet-part` - `wascity-turret` - `wasgun-h` - `wasgun-hud` - `wasgun-manager` - `nav-graph-h` - `traffic-engine-h` - `waswide-init` - `cty-borrow-manager-h` - `cty-borrow-manager` - `desert-part` - `height-map-h` - `height-map` - `traffic-height-map` - `vehicle-control` - `hvehicle-h` - `hvehicle` - `hvehicle-effects` - `hvehicle-physics` - `hvehicle-util` - `glider-h` - `glider-hud` - `glider-manager` - `glider-ring` - `glider-ring-part` - `h-glider` - `hanga-init` - `was-pre-game` - `was-leaper-race` - `flut-racer` - `desert-scenes` - `desert-lizard-h` - `desert-lizard-task` - `desert-lizard` - `throne-scenes` - `waspal-mood` - `waspala-obs` - `waspala-part` - `deswalk-obs` - `deswalk-part` - `terraformer-drone` - `terraformer-head` - `terraformer-part` - `terraformer-setup`
501 lines
20 KiB
Common Lisp
501 lines
20 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: wcar-marauder.gc
|
|
;; name in dgo: wcar-marauder
|
|
;; dgos: LPATK, LFACCAR, WASALL
|
|
|
|
(deftype wcar-marauder-stack-var0 (structure)
|
|
((time0 uint32 :offset 0)
|
|
(float0 float :offset 16)
|
|
(float1 float :offset 20)
|
|
(time uint32 :offset 24)
|
|
)
|
|
)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(defskelgroup skel-v-marauder interceptor interceptor-lod0-jg interceptor-idle-ja
|
|
((interceptor-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 5.5)
|
|
:longest-edge (meters 4.88)
|
|
:shadow interceptor-shadow-mg
|
|
:origin-joint-index 3
|
|
:shadow-joint-index 3
|
|
)
|
|
|
|
(defskelgroup skel-v-marauder-wheel interceptor interceptor-wheel-lod0-jg interceptor-wheel-idle-ja
|
|
((interceptor-wheel-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 1.5)
|
|
:longest-edge (meters 1.07)
|
|
:shadow interceptor-wheel-shadow-mg
|
|
)
|
|
|
|
(defskelgroup skel-v-marauder-wheel-blur interceptor interceptor-wheel-blur-lod0-jg interceptor-wheel-blur-idle-ja
|
|
((interceptor-wheel-blur-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 1.5)
|
|
:longest-edge (meters 1.07)
|
|
:shadow interceptor-wheel-blur-shadow-mg
|
|
)
|
|
|
|
(define *v-marauder-turret-control-info* (new 'static 'turret-control-info
|
|
:joint-index 8
|
|
:barrel-count 1
|
|
:shot-speed 819200.0
|
|
:attack-range 819200.0
|
|
:damage 2.0
|
|
:vehicle-damage-factor 1.0
|
|
:vehicle-impulse-factor 1.0
|
|
:rot-min (new 'static 'array float 2 -1820.4445 -32768.0)
|
|
:rot-max (new 'static 'array float 2 16384.0 32768.0)
|
|
:local-pos (new 'static 'vector :z 4096.0 :w 1.0)
|
|
:local-dir (new 'static 'vector :z 1.0 :w 1.0)
|
|
:barrel-array (new 'static 'inline-array turret-barrel-info 4
|
|
(new 'static 'turret-barrel-info
|
|
:local-pos (new 'static 'vector :w 1.0)
|
|
:local-dir (new 'static 'vector :z 1.0 :w 1.0)
|
|
)
|
|
(new 'static 'turret-barrel-info)
|
|
(new 'static 'turret-barrel-info)
|
|
(new 'static 'turret-barrel-info)
|
|
)
|
|
)
|
|
)
|
|
|
|
(set! (-> *v-marauder-turret-control-info* shot-type) v-marauder-shot)
|
|
|
|
(define *v-marauder-turret-guard-settings* (new 'static 'squad-unit-settings
|
|
:shot-count 2
|
|
:rand-shot-count 2
|
|
:inaccuracy 0.75
|
|
:acquire-delay (seconds 0.2)
|
|
:shot-delay (seconds 0.15)
|
|
:burst-delay (seconds 0.5)
|
|
:rand-burst-delay (seconds 1)
|
|
:rand-shot-delay (seconds 0.2)
|
|
)
|
|
)
|
|
|
|
(set! (-> *v-marauder-constants* debris)
|
|
(new 'static 'debris-static-params
|
|
:joints (new 'static 'boxed-array :type debris-static-joint-params
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-ring")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-ring")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-ring")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-ring")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-nut")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-nut")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-nut")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-nut")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-rod")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-rod")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-rod")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-rod")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-panel")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-panel")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-panel")
|
|
(new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-panel")
|
|
)
|
|
:collide-spec (collide-spec backgnd)
|
|
:sound-hit (static-sound-name "inter-pieces")
|
|
:art-level 'wasall
|
|
)
|
|
)
|
|
|
|
(deftype v-marauder (wcar-base)
|
|
((jmod-axles joint-mod-rotate-local 4 :inline)
|
|
(jmod-gun-x joint-mod-rotate-local :inline)
|
|
(jmod-gun-y joint-mod-rotate-local :inline)
|
|
(jmod-hatch joint-mod-rotate-local :inline)
|
|
(turret-control turret-control :inline)
|
|
(inaccuracy-factor float)
|
|
(sub-state-time uint32)
|
|
(sub-state int8)
|
|
)
|
|
(:methods
|
|
(setup-draw-masks (_type_ int) none)
|
|
)
|
|
)
|
|
|
|
|
|
(defmethod control-hook-ai ((this v-marauder) (arg0 vehicle-controls))
|
|
(let ((t9-0 (method-of-type wcar-base control-hook-ai)))
|
|
(t9-0 this arg0)
|
|
)
|
|
(let ((s5-0 (-> this target-status)))
|
|
(when (< 122880.0 (vector-vector-distance (-> s5-0 position) (-> this root trans)))
|
|
(let ((f1-0 (vector-length (-> s5-0 velocity))))
|
|
(set! (-> this turret-control inaccuracy) (* (-> this inaccuracy-factor) (fmax 1.0 (* 0.000012207031 f1-0))))
|
|
)
|
|
(turret-control-method-11 (-> this turret-control) this (-> s5-0 position) (-> s5-0 velocity))
|
|
)
|
|
)
|
|
(cond
|
|
((logtest? (vehicle-flag vf53) (-> this v-flags))
|
|
(let ((v1-14 (-> this sub-state)))
|
|
(cond
|
|
((zero? v1-14)
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
((= v1-14 1)
|
|
(attach-callback (-> this jmod-hatch))
|
|
(quaternion-identity! (-> this jmod-hatch rotation))
|
|
(set! (-> this sub-state-time) (the-as uint (current-time)))
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
((= v1-14 2)
|
|
(let ((s5-1 (new 'stack-no-clear 'wcar-marauder-stack-var0)))
|
|
(set! (-> s5-1 time) (the-as uint (current-time)))
|
|
(set! (-> s5-1 float1) (fmin 1.0 (* 0.026666667 (the float (- (-> s5-1 time) (-> this sub-state-time))))))
|
|
(set! (-> s5-1 float0) (* 16384.0 (-> s5-1 float1)))
|
|
(quaternion-axis-angle! (-> this jmod-hatch rotation) 1.0 0.0 0.0 (-> s5-1 float0))
|
|
(when (= (-> s5-1 float1) 1.0)
|
|
(set! (-> this sub-state-time) (the-as uint (current-time)))
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
)
|
|
)
|
|
((= v1-14 3)
|
|
(let ((s5-2 (new 'stack-no-clear 'inline-array 'vector 1)))
|
|
(vector-matrix*!
|
|
(-> s5-2 0)
|
|
(new 'static 'vector :y 2048.0 :z -409.6 :w 1.0)
|
|
(-> this node-list data 0 bone transform)
|
|
)
|
|
(send-event (handle->process (-> this other-proc)) 'drop-off (-> s5-2 0) (-> this other-pos))
|
|
)
|
|
(set! (-> this sub-state-time) (the-as uint (current-time)))
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
((= v1-14 4)
|
|
(let ((a0-19 (new 'stack-no-clear 'wcar-marauder-stack-var0)))
|
|
(set! (-> a0-19 time0) (the-as uint (current-time)))
|
|
(when (< (the-as uint 150) (- (-> a0-19 time0) (-> this sub-state-time)))
|
|
(set! (-> this sub-state-time) (the-as uint (current-time)))
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
)
|
|
)
|
|
((= v1-14 5)
|
|
(let ((s5-3 (new 'stack-no-clear 'wcar-marauder-stack-var0)))
|
|
(set! (-> s5-3 time) (the-as uint (current-time)))
|
|
(let ((f0-9 1.0)
|
|
(f1-7 1.0)
|
|
(f2-3 8.0)
|
|
(f3-2 (* 0.0033333334 (the float (- (-> s5-3 time) (-> this sub-state-time)))))
|
|
)
|
|
(set! (-> s5-3 float1) (- f0-9 (fmin f1-7 (* f2-3 (* f3-2 f3-2)))))
|
|
)
|
|
(set! (-> s5-3 float0) (* 16384.0 (-> s5-3 float1)))
|
|
(quaternion-axis-angle! (-> this jmod-hatch rotation) 1.0 0.0 0.0 (-> s5-3 float0))
|
|
(when (= (-> s5-3 float1) 0.0)
|
|
(remove-callback (-> this jmod-hatch))
|
|
(set! (-> this sub-state-time) (the-as uint (current-time)))
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
)
|
|
)
|
|
((= v1-14 6)
|
|
(let ((a0-27 (new 'stack-no-clear 'wcar-marauder-stack-var0)))
|
|
(set! (-> a0-27 time0) (the-as uint (current-time)))
|
|
(when (< (the-as uint 150) (- (-> a0-27 time0) (-> this sub-state-time)))
|
|
(set! (-> this sub-state-time) (the-as uint (current-time)))
|
|
(+! (-> this sub-state) 1)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag vf53))))
|
|
(set! (-> this sub-state) 0)
|
|
0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(set! (-> this sub-state) 0)
|
|
0
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod init-collision! ((this v-marauder))
|
|
(let ((s5-0 (new 'process 'collide-shape-moving this (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 9) 0)))
|
|
(set! (-> s5-0 total-prims) (the-as uint 10))
|
|
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
|
(set! (-> s5-0 root-prim) s4-0)
|
|
)
|
|
(let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
|
|
(set! (-> a0-5 prim-core action) (collide-action solid))
|
|
(set! (-> a0-5 transform-index) 0)
|
|
)
|
|
(let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4))))
|
|
(set! (-> a0-7 prim-core action) (collide-action solid))
|
|
(set! (-> a0-7 transform-index) 0)
|
|
)
|
|
(let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2))))
|
|
(set! (-> a0-9 prim-core action) (collide-action solid))
|
|
(set! (-> a0-9 transform-index) 0)
|
|
)
|
|
(let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
|
|
(set! (-> a0-11 prim-core action) (collide-action solid))
|
|
(set! (-> a0-11 transform-index) 0)
|
|
)
|
|
(let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5))))
|
|
(set! (-> a0-13 prim-core action) (collide-action solid))
|
|
(set! (-> a0-13 transform-index) 0)
|
|
)
|
|
(let ((a0-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 144))))
|
|
(set! (-> a0-15 prim-core action) (collide-action solid))
|
|
(set! (-> a0-15 transform-index) 0)
|
|
)
|
|
(let ((a0-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10))))
|
|
(set! (-> a0-17 prim-core action) (collide-action solid))
|
|
(set! (-> a0-17 transform-index) 0)
|
|
)
|
|
(let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
|
|
(set! (-> a0-19 prim-core action) (collide-action solid))
|
|
(set! (-> a0-19 transform-index) 0)
|
|
)
|
|
(let ((a0-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 12))))
|
|
(set! (-> a0-21 prim-core action) (collide-action solid))
|
|
(set! (-> a0-21 transform-index) 0)
|
|
)
|
|
(set! (-> s5-0 nav-radius) 20480.0)
|
|
(let ((v1-28 (-> s5-0 root-prim)))
|
|
(set! (-> s5-0 backup-collide-as) (-> v1-28 prim-core collide-as))
|
|
(set! (-> s5-0 backup-collide-with) (-> v1-28 prim-core collide-with))
|
|
)
|
|
(set! (-> this root) s5-0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod vehicle-method-62 ((this v-marauder))
|
|
(let ((s5-0 (-> this root root-prim)))
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere))
|
|
(the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z 7864.32 :w 3276.8))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere))
|
|
(the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z 7864.32 :w 3276.8))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere))
|
|
(the-as pointer (new 'static 'vector :x 9011.2 :y 2048.0 :z -11878.4 :w 4915.2))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere))
|
|
(the-as pointer (new 'static 'vector :x -9011.2 :y 2048.0 :z -11878.4 :w 4915.2))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere))
|
|
(the-as pointer (new 'static 'vector :y 3276.8 :z 9011.2 :w 4505.6))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere))
|
|
(the-as pointer (new 'static 'vector :y 3686.4 :z -1638.4 :w 6144.0))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere))
|
|
(the-as pointer (new 'static 'vector :y 3276.8 :z -11878.4 :w 5734.4))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere))
|
|
(the-as pointer (new 'static 'vector :x 8192.0 :y 3276.8 :z -1638.4 :w 5324.8))
|
|
16
|
|
)
|
|
(mem-copy!
|
|
(the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere))
|
|
(the-as pointer (new 'static 'vector :x -8192.0 :y 3276.8 :z -1638.4 :w 5324.8))
|
|
16
|
|
)
|
|
)
|
|
((method-of-type wcar-base vehicle-method-62) this)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod vehicle-method-79 ((this v-marauder))
|
|
(let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 3)))
|
|
(set-vector! (-> s5-0 2) 1092.2667 1092.2667 0.0 0.0)
|
|
(dotimes (s4-0 (-> this info physics-model wheel-count))
|
|
(let ((s3-0 (-> this wheel s4-0)))
|
|
(-> s3-0 info)
|
|
(quaternion-set!
|
|
(-> s5-0 0)
|
|
0.0
|
|
0.0
|
|
(* (-> s3-0 sin-susp-ang) (-> s3-0 x-scale))
|
|
(+ 1.0 (-> s3-0 cos-susp-ang))
|
|
)
|
|
(quaternion-normalize! (-> s5-0 0))
|
|
(quaternion-axis-angle! (-> s5-0 1) 0.0 0.0 (-> s3-0 x-scale) (-> (&-> s5-0 0 data s4-0) 8))
|
|
)
|
|
(let ((v1-10 (-> this jmod-axles s4-0)))
|
|
(quaternion*! (-> v1-10 rotation) (-> s5-0 0) (-> s5-0 1))
|
|
)
|
|
0
|
|
)
|
|
)
|
|
(quaternion-axis-angle! (-> this jmod-gun-x rotation) 1.0 0.0 0.0 (- (-> this turret-control aim-rot-x)))
|
|
(quaternion-axis-angle! (-> this jmod-gun-y rotation) 0.0 1.0 0.0 (-> this turret-control aim-rot-y))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod rigid-body-object-method-30 ((this v-marauder))
|
|
((method-of-type wvehicle rigid-body-object-method-30) this)
|
|
(new 'stack-no-clear 'vector)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod setup-draw-masks ((this v-marauder) (arg0 int))
|
|
(setup-masks (-> this draw) 0 -1)
|
|
(setup-masks (-> this draw) 1 0)
|
|
(let ((v1-4 (logand arg0 15)))
|
|
(cond
|
|
((or (zero? v1-4) (= v1-4 12))
|
|
(setup-masks (-> this draw) 2 0)
|
|
(setup-masks (-> this draw) 4 0)
|
|
)
|
|
((= v1-4 1)
|
|
(setup-masks (-> this draw) 8 0)
|
|
(setup-masks (-> this draw) 16 0)
|
|
)
|
|
((or (= v1-4 2) (= v1-4 13))
|
|
(setup-masks (-> this draw) 64 0)
|
|
)
|
|
((or (= v1-4 3) (= v1-4 14))
|
|
(setup-masks (-> this draw) 4 0)
|
|
)
|
|
((= v1-4 4)
|
|
(setup-masks (-> this draw) 2 0)
|
|
(setup-masks (-> this draw) 16 0)
|
|
)
|
|
((= v1-4 5)
|
|
(setup-masks (-> this draw) 8 0)
|
|
)
|
|
((= v1-4 6)
|
|
(setup-masks (-> this draw) 64 0)
|
|
(setup-masks (-> this draw) 4 0)
|
|
)
|
|
((= v1-4 7)
|
|
(setup-masks (-> this draw) 16 0)
|
|
)
|
|
((= v1-4 8)
|
|
(setup-masks (-> this draw) 2 0)
|
|
)
|
|
((= v1-4 9)
|
|
(setup-masks (-> this draw) 8 0)
|
|
(setup-masks (-> this draw) 4 0)
|
|
)
|
|
((or (= v1-4 10) (= v1-4 15))
|
|
(setup-masks (-> this draw) 64 0)
|
|
(setup-masks (-> this draw) 16 0)
|
|
)
|
|
((= v1-4 11)
|
|
)
|
|
)
|
|
)
|
|
(if (zero? (rand-vu-int-count 2))
|
|
(setup-masks (-> this draw) 32 0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod init-rbody-control! ((this v-marauder))
|
|
(initialize-skeleton
|
|
this
|
|
(the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder" (the-as (pointer level) #f)))
|
|
(the-as pair 0)
|
|
)
|
|
(alloc-rbody-control! this *v-marauder-constants*)
|
|
(set! (-> this draw lod-set lod 0 dist) 1105920.0)
|
|
(set! (-> this rider-hand-joint-array 0) 3)
|
|
(setup-draw-masks this (the-as int (-> this info setup look-select)))
|
|
(+! (-> this info setup look-select) 1)
|
|
((method-of-type joint-mod-rotate-local init)
|
|
(the-as joint-mod-rotate-local (-> this jmod-axles))
|
|
this
|
|
(the-as uint 5)
|
|
(joint-mod-base-flags attached)
|
|
)
|
|
(init (-> this jmod-axles 1) this (the-as uint 9) (joint-mod-base-flags attached))
|
|
(init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached))
|
|
(init (-> this jmod-axles 3) this (the-as uint 10) (joint-mod-base-flags attached))
|
|
(init (-> this jmod-gun-x) this (the-as uint 7) (joint-mod-base-flags attached))
|
|
(init (-> this jmod-gun-y) this (the-as uint 6) (joint-mod-base-flags attached))
|
|
(init (-> this jmod-hatch) this (the-as uint 11) (joint-mod-base-flags))
|
|
(set-info (-> this turret-control) *v-marauder-turret-control-info*)
|
|
(logior! (-> this turret-control flags) (turret-flag no-rot-y-clamp))
|
|
(set! (-> this turret-control ignore-handle) (process->handle this))
|
|
(set! (-> this turret-control guard-settings) *v-marauder-turret-guard-settings*)
|
|
(spawn-wheels!
|
|
this
|
|
(the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-wheel" (the-as (pointer level) #f)))
|
|
(the-as
|
|
skeleton-group
|
|
(art-group-get-by-name *level* "skel-v-marauder-wheel-blur" (the-as (pointer level) #f))
|
|
)
|
|
(the-as skeleton-group #f)
|
|
(the-as skeleton-group #f)
|
|
)
|
|
(set! (-> this eng-pitch-offset) (rand-vu-float-range -0.5 0.5))
|
|
(if (< (-> this eng-pitch-offset) 0.0)
|
|
(set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag vf54) (-> this v-flags))))
|
|
)
|
|
(if (-> this info debris)
|
|
(set! (-> this info debris art-level) (-> this level name))
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod wvehicle-method-201 ((this v-marauder) (arg0 float))
|
|
(set! (-> this turret-control burst-delay-factor) arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod wvehicle-method-202 ((this v-marauder) (arg0 float))
|
|
(set! (-> this inaccuracy-factor) arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defstate explode (v-marauder)
|
|
:virtual #t
|
|
:enter (behavior ()
|
|
(+! (-> *game-info* marauders-killed) 1.0)
|
|
(if (and *target* (focus-test? *target* pilot-riding))
|
|
(turbo-pickup-spawn (-> self root trans))
|
|
)
|
|
(let ((t9-2 (-> (find-parent-state) enter)))
|
|
(if t9-2
|
|
(t9-2)
|
|
)
|
|
)
|
|
)
|
|
)
|