mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 02:14:07 -04:00
decomp3: traffic/citizen/faction code, desert-rescue (#3506)
- `cty-faction-h` - `nav-graph` - `citizen-h` - `citizen` - `civilian` - `traffic-engine` - `traffic-manager` - `cty-attack-controller` - `cty-faction` - `formation-object` - `formations` - `squad-control-city-h` - `squad-control-city` - `traffic-util` - `wlander-female` - `wlander-h` - `wlander-male` - `speech-manager` - `desert-rescue` - `desresc-path` - `neo-satellite` - `rope-prim-system-h` - `rope-prim-system` - `rope-system` - `wland-passenger` - `cty-guard-projectile` - `ctywide-init` - `ff-squad-control` - `guard-grenade` - `guard-rifle` - `guard-states` - `guard-tazer` - `ctywide-speech` - `citizen-chick` - `citizen-fat` - `citizen-norm` - `guard` - `bike` - `car` - `test-bike` - `vehicle-rider` - `desert-rescue-bbush` - `ff-squad-control-h` - `flee-info` - `guard-h` - `mission-squad-control` - `kg-squad-control` - `kg-squad-member-h` - `kg-squad-member` - `mh-squad-control` - `mh-squad-member-h` - `mh-squad-member` - `ctywide-obs-h` - `ctywide-obs` - `ctywide-part` - `ctywide-scenes` - `ctywide-tasks` - `ctywide-texture` - `billiards` - `guide-arrow` - `kg-vehicles` - `flying-turret` - `roboguard-city` - `citizen-enemy` - `metalhead-flitter` - `metalhead-grunt` - `metalhead-predator` - `spydroid` - `kg-squad-control-h` - `mh-squad-control-h` - `krimson-wall` - `ctyport-obs` - `ctyinda-obs` - `ctyinda-part` - `ctyindb-obs` - `ctyindb-part` - `ctyport-attack` - `h-torpedo` - `ctyport-part` - `ctyport-scenes` - `external-player-control` - `desert-chase-path-h` - `desert-chase-path` - `desert-chase` - `desert-jump` - `wcar-catapult` - `bombbot-h` - `bombbot` - `bombbot-path` - `cty-hijack-missile` - `cty-hijack` - `ctyport-attack-bbush` - `ctysluma-part` - `ctyslumb-part` - `ctyslumc-obs` - `ctyslumc-part` - `searchlight` - `cty-destroy-grid` - `ctyfarm-obs` - `ctyfarma-part` - `ctyfarmb-part` - `freehq-part` - `freehq-scenes` - `onintent-scenes` - `onintent-part` - `cty-sniper-battery` - `cty-sniper-turret` - `intro-obs` - `intro-part` - `intro-scenes` - `palcab-part` - `palroof-part`
This commit is contained in:
+1
-1
@@ -440,7 +440,7 @@
|
||||
(get-damage-from-attack (_type_ object event-message-block) float)
|
||||
(enemy-method-63 (_type_ float) float)
|
||||
(update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware)
|
||||
(penetrate->next-state (_type_) symbol)
|
||||
(penetrate->next-state (_type_ process event-message-block float) symbol)
|
||||
(get-penetrated-by (_type_) penetrate)
|
||||
(coin-flip? (_type_) symbol)
|
||||
(get-enemy-aware (_type_ enemy-aware) enemy-aware)
|
||||
|
||||
+19
-19
@@ -1775,28 +1775,28 @@
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> this parent)) 'child-hit)
|
||||
(let ((f0-1 (the-as number 0.0)))
|
||||
(let ((f0-1 0.0))
|
||||
(if (not *debug-unkillable*)
|
||||
(set! f0-1 (damage-enemy! this proc block))
|
||||
)
|
||||
)
|
||||
(let ((s2-2 (penetrate->next-state this)))
|
||||
(when s2-2
|
||||
(logclear! (-> this enemy-flags) (enemy-flag use-trigger))
|
||||
(send-attack-to-all-tshapes this (the-as process-focusable proc) block)
|
||||
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-17 from) (process->ppointer proc))
|
||||
(set! (-> a1-17 num-params) argc)
|
||||
(set! (-> a1-17 message) s2-2)
|
||||
(set! (-> a1-17 param 0) (-> block param 0))
|
||||
(set! (-> a1-17 param 1) (-> block param 1))
|
||||
(set! (-> a1-17 param 2) (-> block param 2))
|
||||
(set! (-> a1-17 param 3) (-> block param 3))
|
||||
(set! (-> a1-17 param 4) (-> block param 4))
|
||||
(set! (-> a1-17 param 5) (-> block param 5))
|
||||
(send-event-function this a1-17)
|
||||
(let ((s2-2 (penetrate->next-state this proc block f0-1)))
|
||||
(when s2-2
|
||||
(logclear! (-> this enemy-flags) (enemy-flag use-trigger))
|
||||
(send-attack-to-all-tshapes this (the-as process-focusable proc) block)
|
||||
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-17 from) (process->ppointer proc))
|
||||
(set! (-> a1-17 num-params) argc)
|
||||
(set! (-> a1-17 message) s2-2)
|
||||
(set! (-> a1-17 param 0) (-> block param 0))
|
||||
(set! (-> a1-17 param 1) (-> block param 1))
|
||||
(set! (-> a1-17 param 2) (-> block param 2))
|
||||
(set! (-> a1-17 param 3) (-> block param 3))
|
||||
(set! (-> a1-17 param 4) (-> block param 4))
|
||||
(set! (-> a1-17 param 5) (-> block param 5))
|
||||
(send-event-function this a1-17)
|
||||
)
|
||||
#t
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2196,7 +2196,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 65 of type enemy
|
||||
(defmethod penetrate->next-state ((this enemy))
|
||||
(defmethod penetrate->next-state ((this enemy) (arg0 process) (arg1 event-message-block) (arg2 float))
|
||||
(let ((gp-0 (-> this incoming penetrate-using)))
|
||||
(cond
|
||||
((and (logtest? (penetrate jak-dark-blackhole) gp-0) #t)
|
||||
|
||||
+3
-7
@@ -74,7 +74,7 @@
|
||||
|
||||
;; definition of type traffic-object-spawn-params
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type uint8)
|
||||
((object-type traffic-type)
|
||||
(behavior uint64)
|
||||
(id uint32)
|
||||
(nav-mesh nav-mesh)
|
||||
@@ -83,10 +83,10 @@
|
||||
(rotation quaternion :inline)
|
||||
(velocity vector :inline)
|
||||
(handle handle)
|
||||
(handle-parent uint64)
|
||||
(handle-parent handle)
|
||||
(guard-type uint8)
|
||||
(user-data uint32)
|
||||
(entity basic)
|
||||
(entity entity)
|
||||
(flags traffic-spawn-flags)
|
||||
(proc process)
|
||||
)
|
||||
@@ -183,7 +183,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+6
-10
@@ -15,8 +15,8 @@
|
||||
smush
|
||||
)
|
||||
(:methods
|
||||
(bouncer-method-23 (_type_) none)
|
||||
(bouncer-method-24 (_type_) none)
|
||||
(init-skel! (_type_) none)
|
||||
(init-collision! (_type_) none)
|
||||
(play-sound (_type_) none)
|
||||
(bouncer-method-26 (_type_) none)
|
||||
)
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
;; definition for method 23 of type bouncer
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod bouncer-method-23 ((this bouncer))
|
||||
(defmethod init-skel! ((this bouncer))
|
||||
(break!)
|
||||
0
|
||||
(none)
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
;; definition for method 24 of type bouncer
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod bouncer-method-24 ((this bouncer))
|
||||
(defmethod init-collision! ((this bouncer))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec crate))
|
||||
@@ -263,15 +263,11 @@
|
||||
;; definition for method 11 of type bouncer
|
||||
(defmethod init-from-entity! ((this bouncer) (arg0 entity-actor))
|
||||
(set! (-> this mods) #f)
|
||||
(bouncer-method-24 this)
|
||||
(init-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(bouncer-method-23 this)
|
||||
(init-skel! this)
|
||||
(nav-mesh-connect-from-ent this)
|
||||
(set! (-> this spring-height) (res-lump-float arg0 'spring-height :default 45056.0))
|
||||
(set! (-> this use-alternate-jump?) (= (res-lump-value arg0 'behavior-type uint128 :time -1000000000.0) 1))
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+7
-6
@@ -119,13 +119,14 @@
|
||||
|
||||
;; definition of type part-tracker
|
||||
(deftype part-tracker (process)
|
||||
((root trsqv)
|
||||
(mat matrix :inline)
|
||||
(offset vector :inline)
|
||||
((parent (pointer process) :override)
|
||||
(root trsqv)
|
||||
(mat matrix :inline)
|
||||
(offset vector :inline)
|
||||
(userdata uint64)
|
||||
(user-time time-frame 2)
|
||||
(user-vector vector :inline)
|
||||
(user-handle uint32 2 :offset 288)
|
||||
(user-time time-frame 2)
|
||||
(user-vector vector :inline)
|
||||
(user-handle uint32 2 :offset 288)
|
||||
(part sparticle-launch-control)
|
||||
(callback (function part-tracker vector))
|
||||
(linger-callback (function part-tracker vector))
|
||||
|
||||
+4
@@ -662,3 +662,7 @@
|
||||
(the-as (pointer guard-shot) (spawn-projectile guard-shot gp-0 arg0 *default-dead-pool*))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type speech-instance
|
||||
(deftype speech-instance (structure)
|
||||
((speech uint16)
|
||||
(num-play-times int8)
|
||||
(probability float)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type speech-instance
|
||||
(defmethod inspect ((this speech-instance))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'speech-instance)
|
||||
(format #t "~1Tspeech: ~D~%" (-> this speech))
|
||||
(format #t "~1Tnum-play-times: ~D~%" (-> this num-play-times))
|
||||
(format #t "~1Tprobability: ~f~%" (-> this probability))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type speech-info
|
||||
(deftype speech-info (structure)
|
||||
((speeches (array speech-instance))
|
||||
(flags speech-info-flag)
|
||||
(play-time time-frame)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type speech-info
|
||||
(defmethod inspect ((this speech-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'speech-info)
|
||||
(format #t "~1Tspeeches: ~A~%" (-> this speeches))
|
||||
(format #t "~1Tflags: ~D~%" (-> this flags))
|
||||
(format #t "~1Tplay-time: ~D~%" (-> this play-time))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function mark-speech-played
|
||||
(defun mark-speech-played ((arg0 speech-info) (arg1 int))
|
||||
(logior! (-> arg0 flags) (speech-info-flag si6 si7))
|
||||
(+! (-> arg0 speeches arg1 num-play-times) 1)
|
||||
(let ((v0-0 (current-time)))
|
||||
(set! (-> arg0 play-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function speech-play
|
||||
(defun speech-play ((arg0 (array speech-info)) (arg1 int) (arg2 (inline-array talker-speech-class)) (arg3 vector))
|
||||
(local-vars (v0-0 int))
|
||||
(let ((s1-0 (-> arg0 arg1))
|
||||
(v1-2 #xf4240)
|
||||
(a1-1 0)
|
||||
(s2-0 #f)
|
||||
)
|
||||
(if (and (logtest? (-> s1-0 flags) (speech-info-flag si0)) (logtest? (-> s1-0 flags) (speech-info-flag si6)))
|
||||
(return -1)
|
||||
)
|
||||
(when (and (logtest? (-> s1-0 flags) (speech-info-flag si3)) (logtest? (-> s1-0 flags) (speech-info-flag si7)))
|
||||
(set! s2-0 #t)
|
||||
(set! s1-0 (-> arg0 (+ arg1 1)))
|
||||
)
|
||||
(if (and (logtest? (-> s1-0 flags) (speech-info-flag si0)) (logtest? (-> s1-0 flags) (speech-info-flag si6)))
|
||||
(return -1)
|
||||
)
|
||||
(dotimes (a0-20 (-> s1-0 speeches length))
|
||||
(set! v1-2 (min (-> s1-0 speeches a0-20 num-play-times) v1-2))
|
||||
)
|
||||
(if (and (> v1-2 0) (logtest? (-> s1-0 flags) (speech-info-flag si4)))
|
||||
(return -1)
|
||||
)
|
||||
(dotimes (a0-26 (-> s1-0 speeches length))
|
||||
(if (< v1-2 (-> s1-0 speeches a0-26 num-play-times))
|
||||
(set! a1-1 (logior a1-1 (ash 1 a0-26)))
|
||||
)
|
||||
)
|
||||
(let ((s0-0 0))
|
||||
(set! s0-0 (cond
|
||||
((logtest? (-> s1-0 flags) (speech-info-flag si5))
|
||||
(dotimes (v1-7 (-> s1-0 speeches length))
|
||||
(when (not (logtest? a1-1 (ash 1 v1-7)))
|
||||
(set! s0-0 v1-7)
|
||||
0
|
||||
(goto cfg-45)
|
||||
)
|
||||
)
|
||||
(label cfg-45)
|
||||
s0-0
|
||||
)
|
||||
(else
|
||||
(rand-vu-int-count-excluding (-> s1-0 speeches length) a1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> s1-0 flags) (speech-info-flag si8))
|
||||
(set! arg2 *talker-speech*)
|
||||
)
|
||||
(mark-speech-played s1-0 s0-0)
|
||||
(talker-spawn-func (-> arg2 (-> s1-0 speeches s0-0 speech)) *entity-pool* arg3 (the-as region #f))
|
||||
(if s2-0
|
||||
(set-time! (-> arg0 arg1 play-time))
|
||||
)
|
||||
(return s0-0)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
|
||||
;; definition for function speeches-reset
|
||||
(defun speeches-reset ((arg0 (array speech-info)))
|
||||
(dotimes (v1-0 (-> arg0 length))
|
||||
(logclear! (-> arg0 v1-0 flags) (speech-info-flag si6))
|
||||
(set! (-> arg0 v1-0 play-time) 0)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function speeches-debug-reset
|
||||
(defun speeches-debug-reset ((arg0 (array speech-info)))
|
||||
(dotimes (v1-0 (-> arg0 length))
|
||||
(logclear! (-> arg0 v1-0 flags) (speech-info-flag si6 si7))
|
||||
(set! (-> arg0 0 play-time) 0)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -1927,7 +1927,7 @@
|
||||
;; definition for method 9 of type cpad-info
|
||||
(defmethod adjust-to-screen-flip ((this cpad-info))
|
||||
(if (and (not (paused?)) (zero? (-> this number)) (-> *setting-control* user-current player-control-override))
|
||||
(override-player-controls)
|
||||
(override-player-controls this)
|
||||
)
|
||||
(when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
(set! (-> this leftx) (- 255 (the-as int (-> this leftx))))
|
||||
@@ -2226,3 +2226,7 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(kmemclose)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@
|
||||
(borrow-hold-count uint32)
|
||||
(borrow-hold pair 3)
|
||||
(cloth symbol)
|
||||
(player-control-override symbol)
|
||||
(player-control-override cpad-info)
|
||||
(player-control-mask uint32)
|
||||
(gun-special-mode symbol)
|
||||
(airlock-command pair)
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@
|
||||
(set! (-> this mh-enemy-settings) (the-as symbol arg3))
|
||||
)
|
||||
(('player-control-override)
|
||||
(set! (-> this player-control-override) (the-as symbol arg3))
|
||||
(set! (-> this player-control-override) (the-as cpad-info arg3))
|
||||
)
|
||||
(('player-control-mask)
|
||||
(set! (-> this player-control-mask) arg3)
|
||||
|
||||
+1074
File diff suppressed because it is too large
Load Diff
+5
-1
@@ -69,7 +69,7 @@
|
||||
|
||||
;; definition for function matrix-u-r-compose
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrix-u-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(defun matrix-u-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 uvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 fvec) arg2 arg1)
|
||||
(vector-normalize! (-> arg0 fvec) 1.0)
|
||||
@@ -126,3 +126,7 @@
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-9
@@ -789,16 +789,16 @@
|
||||
;; definition for function quaternion-smooth-seek!
|
||||
(defun quaternion-smooth-seek! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"Another hacky rotation interpolation."
|
||||
(let ((gp-0 (new 'stack-no-clear 'quaternion)))
|
||||
(quaternion-copy! (the-as quaternion (&-> gp-0 x)) arg2)
|
||||
(if (< (quaternion-dot (the-as quaternion (&-> gp-0 x)) arg1) 0.0)
|
||||
(quaternion-negate! (the-as quaternion (&-> gp-0 x)) (the-as quaternion (&-> gp-0 x)))
|
||||
(let ((gp-0 (new 'stack-no-clear 'inline-array 'quaternion 2)))
|
||||
(quaternion-copy! (-> gp-0 0) arg2)
|
||||
(if (< (quaternion-dot (-> gp-0 0) arg1) 0.0)
|
||||
(quaternion-negate! (-> gp-0 0) (-> gp-0 0))
|
||||
)
|
||||
(quaternion-! (&+ gp-0 16) (the-as quaternion (&-> gp-0 x)) arg1)
|
||||
(quaternion-float*! (&+ gp-0 16) (&+ gp-0 16) (fmin 1.0 arg3))
|
||||
(quaternion+! (the-as quaternion (&-> gp-0 x)) arg1 (&+ gp-0 16))
|
||||
(quaternion-normalize! (the-as quaternion (&-> gp-0 x)))
|
||||
(quaternion-copy! arg0 (the-as quaternion (&-> gp-0 x)))
|
||||
(quaternion-! (-> gp-0 1) (-> gp-0 0) arg1)
|
||||
(quaternion-float*! (-> gp-0 1) (-> gp-0 1) (fmin 1.0 arg3))
|
||||
(quaternion+! (-> gp-0 0) arg1 (-> gp-0 1))
|
||||
(quaternion-normalize! (-> gp-0 0))
|
||||
(quaternion-copy! arg0 (-> gp-0 0))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1086,3 +1086,7 @@
|
||||
(vector-y-angle s5-0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+2
@@ -175,6 +175,8 @@
|
||||
debug-control
|
||||
)
|
||||
(:methods
|
||||
(init-enemy-info! (_type_ nav-enemy-info) none :replace)
|
||||
(init-enemy-defaults! (_type_ nav-enemy-info) object :replace)
|
||||
(normalize-heading! (_type_ nav-control) none)
|
||||
(nav-enemy-method-161 (_type_ nav-control) none)
|
||||
(nav-enemy-method-162 (_type_) none)
|
||||
|
||||
+6
-7
@@ -668,9 +668,9 @@
|
||||
|
||||
;; definition for method 118 of type nav-enemy
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defmethod init-enemy-info! ((this nav-enemy) (arg0 enemy-info))
|
||||
(set! (-> this enemy-info) (the-as nav-enemy-info arg0))
|
||||
(set! (-> (the-as nav-enemy-info arg0) callback-info) *default-nav-callback-info*)
|
||||
(defmethod init-enemy-info! ((this nav-enemy) (arg0 nav-enemy-info))
|
||||
(set! (-> this enemy-info) arg0)
|
||||
(set! (-> arg0 callback-info) *default-nav-callback-info*)
|
||||
(when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck)))
|
||||
(set! (-> this neck)
|
||||
(new 'process 'joint-mod (joint-mod-mode flex-blend) this (-> this enemy-info neck-joint))
|
||||
@@ -687,8 +687,8 @@
|
||||
|
||||
;; definition for method 119 of type nav-enemy
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-enemy-defaults! ((this nav-enemy) (arg0 enemy-info))
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod init-enemy-defaults! ((this nav-enemy) (arg0 nav-enemy-info))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -732,7 +732,7 @@
|
||||
)
|
||||
(set! (-> this draw shadow-ctrl) *nav-enemy-dummy-shadow-control*)
|
||||
)
|
||||
(get-nav-control this (-> (the-as nav-enemy-info arg0) nav-mesh))
|
||||
(get-nav-control this (-> arg0 nav-mesh))
|
||||
(set! (-> this water-max-height) (-> this nav state mesh water-max-height))
|
||||
(let ((v1-32 this))
|
||||
(set! (-> v1-32 enemy-flags) (the-as enemy-flag (logclear (-> v1-32 enemy-flags) (enemy-flag ef37))))
|
||||
@@ -906,7 +906,6 @@
|
||||
(set! (-> this draw light-index) (the-as uint 10))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -194,7 +194,7 @@
|
||||
(rigid-body-control-method-22 (_type_ vector vector) none)
|
||||
(rigid-body-control-method-23 (_type_ vector vector) none)
|
||||
(rigid-body-control-method-24 (_type_ vector vector) none)
|
||||
(rigid-body-control-method-25 (_type_ vector) none)
|
||||
(rigid-body-control-method-25 (_type_ vector) vector)
|
||||
(rigid-body-control-method-26 (_type_) none)
|
||||
(init! (_type_ rigid-body-info vector quaternion (function rigid-body-object float)) none)
|
||||
(rigid-body-control-method-28 (_type_ vector quaternion) none)
|
||||
@@ -277,7 +277,7 @@
|
||||
active
|
||||
)
|
||||
(:methods
|
||||
(rigid-body-object-method-30 (_type_) none)
|
||||
(rigid-body-object-method-30 (_type_) object)
|
||||
(apply-gravity! (_type_ float) none)
|
||||
(rigid-body-object-method-32 (_type_) none)
|
||||
(alloc-rbody-control! (_type_ rigid-body-object-constants) none)
|
||||
|
||||
+2
-4
@@ -863,13 +863,12 @@
|
||||
)
|
||||
|
||||
;; definition for method 25 of type rigid-body-control
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defmethod rigid-body-control-method-25 ((this rigid-body-control) (arg0 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-rotate*! gp-0 (-> this info cm-offset-joint) (-> this matrix))
|
||||
(vector-! arg0 (-> this position) gp-0)
|
||||
)
|
||||
(none)
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for method 30 of type rigid-body-control
|
||||
@@ -1140,11 +1139,10 @@
|
||||
)
|
||||
|
||||
;; definition for method 30 of type rigid-body-object
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod rigid-body-object-method-30 ((this rigid-body-object))
|
||||
(ja-post)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 39 of type rigid-body-object
|
||||
|
||||
+2
-2
@@ -145,7 +145,7 @@ O(n^2) 'check everybody against everybody' collision loop."
|
||||
(update-from-spheres (_type_) none)
|
||||
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none)
|
||||
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol)
|
||||
(add-sphere-with-mask-and-id (_type_ vector int int) symbol)
|
||||
(add-sphere-with-mask-and-id (_type_ vector vector float int) symbol)
|
||||
(sphere-hash-method-32 (_type_ sphere int) symbol)
|
||||
)
|
||||
)
|
||||
@@ -215,7 +215,7 @@ O(n^2) 'check everybody against everybody' collision loop."
|
||||
(fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int)
|
||||
(fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
|
||||
(fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
|
||||
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int)
|
||||
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape)) int)
|
||||
(spatial-hash-method-39 (_type_ object hash-object-info) int)
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -1344,7 +1344,7 @@
|
||||
(let ((s5-1 (the-as object (-> arg3 param 1))))
|
||||
(when (not (the-as uint s5-1))
|
||||
(let ((s4-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s4-0 object-type) (the-as uint 6))
|
||||
(set! (-> s4-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> s4-0 behavior) (the-as uint 4))
|
||||
(set! (-> s4-0 id) (the-as uint 0))
|
||||
(set! (-> s4-0 nav-mesh) #f)
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type bombbot-node
|
||||
(deftype bombbot-node (structure)
|
||||
((position vector :inline)
|
||||
(nav-mesh-id uint32)
|
||||
(pos-x float :overlay-at (-> position data 0))
|
||||
(pos-y float :overlay-at (-> position data 1))
|
||||
(pos-z float :overlay-at (-> position data 2))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type bombbot-node
|
||||
(defmethod inspect ((this bombbot-node))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'bombbot-node)
|
||||
(format #t "~1Tposition: ~`vector`P~%" (-> this position))
|
||||
(format #t "~1Tnav-mesh-id: ~D~%" (-> this nav-mesh-id))
|
||||
(format #t "~1Tpos-x: ~f~%" (-> this position x))
|
||||
(format #t "~1Tpos-y: ~f~%" (-> this position y))
|
||||
(format #t "~1Tpos-z: ~f~%" (-> this position z))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type bombbot-path
|
||||
(deftype bombbot-path (structure)
|
||||
((node-count uint16)
|
||||
(node (inline-array bombbot-node))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type bombbot-path
|
||||
(defmethod inspect ((this bombbot-path))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'bombbot-path)
|
||||
(format #t "~1Tnode-count: ~D~%" (-> this node-count))
|
||||
(format #t "~1Tnode: #x~X~%" (-> this node))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
+330
@@ -0,0 +1,330 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *bombbot-path-1*, type bombbot-path
|
||||
(define *bombbot-path-1* (new 'static 'bombbot-path
|
||||
:node-count #x1a
|
||||
:node (new 'static 'inline-array bombbot-node 26
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3188752.0 :y 36837.375 :z 4562738.5)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3368644.2 :y 38390.58 :z 4564130.5)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3344854.8 :y 37134.336 :z 4787486.0)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3156208.8 :y 36825.906 :z 4910489.0)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3129548.5 :y 21854.617 :z 4974263.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3042602.5 :y 21854.617 :z 5196430.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3041685.0 :y 23431.578 :z 5524438.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2993126.5 :y 37686.887 :z 5613157.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2495119.0 :y 35662.645 :z 5980937.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2339598.0 :y 21355.725 :z 6003916.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2262150.2 :y 59038.105 :z 5923388.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2180239.0 :y 35246.08 :z 5821602.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1952091.8 :y 35853.516 :z 5631917.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1751604.9 :y 35736.37 :z 5485034.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1448083.0 :y 35713.023 :z 5357034.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1314705.0 :y 35742.105 :z 5355600.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1213759.1 :y 35739.24 :z 5574696.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1029807.7 :y 21646.541 :z 5602098.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 859164.25 :y 35728.18 :z 5558681.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 599088.75 :y 35690.496 :z 5614919.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 425897.56 :y 21671.936 :z 5574573.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 319768.56 :y 35787.57 :z 5516492.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 198957.06 :y 35702.375 :z 5363874.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -16781.72 :y 35688.86 :z 5447925.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -171277.92 :y 35687.63 :z 5526486.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -245257.83 :y 35740.47 :z 5498510.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *bombbot-path-2*, type bombbot-path
|
||||
(define *bombbot-path-2* (new 'static 'bombbot-path
|
||||
:node-count #x13
|
||||
:node (new 'static 'inline-array bombbot-node 19
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 678289.0 :y 75894.375 :z 7158250.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 456621.66 :y 38754.305 :z 7149895.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 306988.66 :y 35926.426 :z 7006288.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 90236.11 :y 35590.965 :z 6990314.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -12922.471 :y 37856.05 :z 7003176.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -181574.86 :y 38684.67 :z 6889676.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -353365.2 :y 38691.227 :z 6788505.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -536272.5 :y 38694.91 :z 6712606.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -716230.25 :y 38694.91 :z 6647766.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -971501.2 :y 35638.887 :z 6573997.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -944987.75 :y 39357.234 :z 6461029.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -891641.44 :y 35729.0 :z 6265159.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -728891.0 :y 22151.578 :z 6013049.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -691502.7 :y 58701.414 :z 5967584.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -663629.44 :y 59321.14 :z 5927321.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -627445.4 :y 36782.9 :z 5872270.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -499105.38 :y 39462.91 :z 5756435.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -312820.12 :y 39460.863 :z 5599559.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -285647.66 :y 35911.68 :z 5513133.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *bombbot-path-3*, type bombbot-path
|
||||
(define *bombbot-path-3* (new 'static 'bombbot-path
|
||||
:node-count #x1e
|
||||
:node (new 'static 'inline-array bombbot-node 30
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 898383.44 :y 75904.2 :z 7154400.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1118834.2 :y 37430.066 :z 7158537.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1231044.2 :y 35595.06 :z 7033977.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1379135.1 :y 35604.89 :z 6973930.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1589264.0 :y 38142.363 :z 7005346.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1762479.8 :y 38840.32 :z 6881197.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1929727.6 :y 38840.32 :z 6786538.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2108796.0 :y 38839.91 :z 6696426.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2299584.0 :y 38838.68 :z 6626221.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2481209.0 :y 38954.598 :z 6580919.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2566069.8 :y 35751.527 :z 6524190.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2466766.5 :y 35799.86 :z 6277282.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2411699.5 :y 21411.84 :z 6167714.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2305486.5 :y 27477.197 :z 5986835.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2269335.2 :y 58792.754 :z 5942926.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2240413.0 :y 59187.2 :z 5908069.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2206146.2 :y 38379.52 :z 5861088.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2025377.4 :y 35845.734 :z 5707038.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1818201.8 :y 35773.234 :z 5546884.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1670160.0 :y 35714.664 :z 5444770.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1417973.4 :y 35841.23 :z 5324144.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1311366.8 :y 35716.71 :z 5391236.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1236283.0 :y 39460.863 :z 5595545.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 915504.75 :y 39461.273 :z 5583134.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 672419.44 :y 39462.504 :z 5586779.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 337580.03 :y 39460.863 :z 5599272.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 211252.02 :y 39461.273 :z 5322137.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -17915.904 :y 39462.504 :z 5413191.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -151299.28 :y 35697.05 :z 5497281.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -220205.47 :y 35749.477 :z 5472501.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+5543
File diff suppressed because it is too large
Load Diff
+214
@@ -0,0 +1,214 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type cty-faction-info
|
||||
(deftype cty-faction-info (structure)
|
||||
((data int8 6)
|
||||
(ff-guard int8 :overlay-at (-> data 0))
|
||||
(ff-ped int8 :overlay-at (-> data 1))
|
||||
(kg-guard int8 :overlay-at (-> data 2))
|
||||
(kg-ped int8 :overlay-at (-> data 3))
|
||||
(mh-guard int8 :overlay-at (-> data 4))
|
||||
(mh-ped int8 :overlay-at (-> data 5))
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cty-faction-info
|
||||
(defmethod inspect ((this cty-faction-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'cty-faction-info)
|
||||
(format #t "~1Tdata[6] @ #x~X~%" (&-> this ff-guard))
|
||||
(format #t "~1Tff-guard: ~D~%" (-> this ff-guard))
|
||||
(format #t "~1Tff-ped: ~D~%" (-> this ff-ped))
|
||||
(format #t "~1Tkg-guard: ~D~%" (-> this kg-guard))
|
||||
(format #t "~1Tkg-ped: ~D~%" (-> this kg-ped))
|
||||
(format #t "~1Tmh-guard: ~D~%" (-> this mh-guard))
|
||||
(format #t "~1Tmh-ped: ~D~%" (-> this mh-ped))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type cty-faction-strength
|
||||
(deftype cty-faction-strength (structure)
|
||||
((data int8 3)
|
||||
(ff-strength int8 :overlay-at (-> data 0))
|
||||
(kg-strength int8 :overlay-at (-> data 1))
|
||||
(mh-strength int8 :overlay-at (-> data 2))
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cty-faction-strength
|
||||
(defmethod inspect ((this cty-faction-strength))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'cty-faction-strength)
|
||||
(format #t "~1Tdata[3] @ #x~X~%" (&-> this ff-strength))
|
||||
(format #t "~1Tff-strength: ~D~%" (-> this ff-strength))
|
||||
(format #t "~1Tkg-strength: ~D~%" (-> this kg-strength))
|
||||
(format #t "~1Tmh-strength: ~D~%" (-> this mh-strength))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type territory-faction-mode
|
||||
(deftype territory-faction-mode (structure)
|
||||
((data int8 3)
|
||||
(ff-mode uint8 :overlay-at (-> data 0))
|
||||
(kg-mode uint8 :overlay-at (-> data 1))
|
||||
(mh-mode uint8 :overlay-at (-> data 2))
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
;; definition for method 3 of type territory-faction-mode
|
||||
(defmethod inspect ((this territory-faction-mode))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'territory-faction-mode)
|
||||
(format #t "~1Tdata[3] @ #x~X~%" (&-> this ff-mode))
|
||||
(format #t "~1Tff-mode: ~D~%" (-> this ff-mode))
|
||||
(format #t "~1Tkg-mode: ~D~%" (-> this kg-mode))
|
||||
(format #t "~1Tmh-mode: ~D~%" (-> this mh-mode))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type territory-faction-flag
|
||||
(deftype territory-faction-flag (structure)
|
||||
((data uint8 3)
|
||||
(ff-mode uint8 :overlay-at (-> data 0))
|
||||
(kg-mode uint8 :overlay-at (-> data 1))
|
||||
(mh-mode uint8 :overlay-at (-> data 2))
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
;; definition for method 3 of type territory-faction-flag
|
||||
(defmethod inspect ((this territory-faction-flag))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'territory-faction-flag)
|
||||
(format #t "~1Tdata[3] @ #x~X~%" (&-> this ff-mode))
|
||||
(format #t "~1Tff-mode: ~D~%" (-> this ff-mode))
|
||||
(format #t "~1Tkg-mode: ~D~%" (-> this kg-mode))
|
||||
(format #t "~1Tmh-mode: ~D~%" (-> this mh-mode))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type faction-spawn-info
|
||||
(deftype faction-spawn-info (structure)
|
||||
((faction-type uint8)
|
||||
(current-level uint8)
|
||||
(requested-level uint8)
|
||||
(flags faction-spawn-flag)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
;; definition for method 3 of type faction-spawn-info
|
||||
(defmethod inspect ((this faction-spawn-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'faction-spawn-info)
|
||||
(format #t "~1Tfaction-type: ~D~%" (-> this faction-type))
|
||||
(format #t "~1Tcurrent-level: ~D~%" (-> this current-level))
|
||||
(format #t "~1Trequested-level: ~D~%" (-> this requested-level))
|
||||
(format #t "~1Tflags: ~D~%" (-> this flags))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type cty-faction-manager
|
||||
(deftype cty-faction-manager (basic)
|
||||
((faction-array cty-faction-info 30)
|
||||
(faction-mod-array cty-faction-info 30 :inline)
|
||||
(global-faction-strength-mod cty-faction-strength :inline)
|
||||
(territory-faction-strength-mod cty-faction-strength 4 :inline)
|
||||
(permission-cache uint8 30 :offset 671)
|
||||
(last-requested-level symbol)
|
||||
(territory-faction-modes territory-faction-mode 30 :inline)
|
||||
(territory-flags uint8 30)
|
||||
(last-active-territories uint32)
|
||||
(update-flags cty-faction-update-flag)
|
||||
(target-exclusive-branch-index uint8)
|
||||
(territory-faction-flags territory-faction-flag :inline)
|
||||
(faction-spawn faction-spawn-info 7 :inline)
|
||||
(last-change-music-time time-frame :offset 1344)
|
||||
(start-fight-music-time time-frame)
|
||||
)
|
||||
(:methods
|
||||
(cty-faction-manager-method-9 (_type_ int symbol) int)
|
||||
(cty-faction-manager-method-10 (_type_ int symbol) int)
|
||||
(cty-faction-manager-method-11 (_type_ int) uint)
|
||||
(cty-faction-manager-method-12 (_type_ int int) int)
|
||||
(cty-faction-manager-method-13 (_type_) symbol)
|
||||
(cty-faction-manager-method-14 (_type_ nav-territory-type int int) int)
|
||||
(restore-defaults (_type_) cty-faction-update-flag)
|
||||
(cty-faction-manager-method-16 (_type_ nav-territory-type) int)
|
||||
(cty-faction-manager-method-17 (_type_ symbol) int)
|
||||
(cty-faction-manager-method-18 (_type_ symbol) int)
|
||||
(cty-faction-manager-method-19 (_type_) symbol)
|
||||
(cty-faction-manager-method-20 (_type_ uint) int)
|
||||
(cty-faction-manager-method-21 (_type_ int) symbol)
|
||||
(cty-faction-manager-method-22 (_type_) cty-faction-update-flag)
|
||||
(cty-faction-manager-method-23 (_type_ uint) symbol)
|
||||
(cty-faction-manager-method-24 (_type_) symbol)
|
||||
(faction-spawn (_type_ int int symbol symbol) faction-spawn-flag)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cty-faction-manager
|
||||
(defmethod inspect ((this cty-faction-manager))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tfaction-array[30] @ #x~X~%" (-> this faction-array))
|
||||
(format #t "~1Tfaction-mod-array[30] @ #x~X~%" (-> this faction-mod-array))
|
||||
(format
|
||||
#t
|
||||
"~1Tglobal-faction-strength-mod: #<cty-faction-strength @ #x~X>~%"
|
||||
(-> this global-faction-strength-mod)
|
||||
)
|
||||
(format #t "~1Tterritory-faction-strength-mod[4] @ #x~X~%" (-> this territory-faction-strength-mod))
|
||||
(format #t "~1Tpermission-cache[30] @ #x~X~%" (-> this permission-cache))
|
||||
(format #t "~1Tlast-requested-level: ~A~%" (-> this last-requested-level))
|
||||
(format #t "~1Tterritory-faction-modes[30] @ #x~X~%" (-> this territory-faction-modes))
|
||||
(format #t "~1Tterritory-flags[30] @ #x~X~%" (-> this territory-flags))
|
||||
(format #t "~1Tlast-active-territories: ~D~%" (-> this last-active-territories))
|
||||
(format #t "~1Tupdate-flags: ~D~%" (-> this update-flags))
|
||||
(format #t "~1Ttarget-exclusive-branch-index: ~D~%" (-> this target-exclusive-branch-index))
|
||||
(format #t "~1Tterritory-faction-flags: #<territory-faction-flag @ #x~X>~%" (-> this territory-faction-flags))
|
||||
(format #t "~1Tfaction-spawn[7] @ #x~X~%" (-> this faction-spawn))
|
||||
(format #t "~1Tlast-change-music-time: ~D~%" (-> this last-change-music-time))
|
||||
(format #t "~1Tstart-fight-music-time: ~D~%" (-> this start-fight-music-time))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 12 of type cty-faction-manager
|
||||
(defmethod cty-faction-manager-method-12 ((this cty-faction-manager) (arg0 int) (arg1 int))
|
||||
(-> this territory-faction-modes 0 data (+ arg1 (* arg0 16)))
|
||||
)
|
||||
|
||||
;; definition for symbol *cty-faction-manager*, type cty-faction-manager
|
||||
(define *cty-faction-manager* (the-as cty-faction-manager #f))
|
||||
|
||||
|
||||
|
||||
|
||||
+673
@@ -0,0 +1,673 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type vehicle-grenade
|
||||
(deftype vehicle-grenade (projectile-bounce)
|
||||
((blast-radius float)
|
||||
)
|
||||
(:methods
|
||||
(vehicle-grenade-method-44 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vehicle-grenade
|
||||
(defmethod inspect ((this vehicle-grenade))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type projectile-bounce inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tblast-radius: ~f~%" (-> this blast-radius))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-vehicle-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja
|
||||
((gun-grenade-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 2)
|
||||
:texture-level 10
|
||||
)
|
||||
|
||||
;; definition for method 28 of type vehicle-grenade
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod play-impact-sound ((this vehicle-grenade) (arg0 projectile-options))
|
||||
(let ((v1-0 arg0))
|
||||
(cond
|
||||
((zero? v1-0)
|
||||
(sound-play "grenade-fire")
|
||||
)
|
||||
((= v1-0 (projectile-options po0))
|
||||
(sound-play "grenade-explode")
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type vehicle-grenade
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-collision! ((this vehicle-grenade))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) projectile-bounce-reaction)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate explode))
|
||||
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-7 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 819.2)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-7)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-10 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
|
||||
(set! (-> s5-0 event-self) 'touched)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
(set-collide-with!
|
||||
(-> this root)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-others-list
|
||||
player-list
|
||||
pusher
|
||||
shield
|
||||
)
|
||||
)
|
||||
(set-collide-as! (-> this root) (collide-spec enemy))
|
||||
(set! (-> this root pat-ignore-mask)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 40 of type vehicle-grenade
|
||||
(defmethod projectile-method-40 ((this vehicle-grenade))
|
||||
256
|
||||
)
|
||||
|
||||
;; definition for method 31 of type vehicle-grenade
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-proj-settings! ((this vehicle-grenade))
|
||||
(ctywide-entity-hack)
|
||||
(set! (-> this attack-mode) 'eco-dark)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vehicle-grenade" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(let ((t9-3 (method-of-type projectile-bounce init-proj-settings!)))
|
||||
(t9-3 this)
|
||||
)
|
||||
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 213) this))
|
||||
(set! (-> this blast-radius) 16384.0)
|
||||
(set! (-> this max-speed) 90112.0)
|
||||
(set! (-> this timeout) (seconds 4))
|
||||
(let ((v1-11 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-11 x) 2.0)
|
||||
(set! (-> v1-11 y) 2.0)
|
||||
(set! (-> v1-11 z) 2.0)
|
||||
(set! (-> v1-11 w) 1.0)
|
||||
(set! (-> this root scale quad) (-> v1-11 quad))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 25 of type vehicle-grenade
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod projectile-method-25 ((this vehicle-grenade))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
(ja-post)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 42 of type vehicle-grenade
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod projectile-bounce-method-42 ((this vehicle-grenade))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 39 of type vehicle-grenade
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod projectile-method-39 ((this vehicle-grenade))
|
||||
(let* ((a2-0 (-> this root))
|
||||
(v1-0 (-> a2-0 status))
|
||||
)
|
||||
(if (logtest? v1-0 (collide-status touch-surface))
|
||||
(vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.2)
|
||||
)
|
||||
(when (and (logtest? v1-0 (collide-status impact-surface))
|
||||
(time-elapsed? (-> this played-bounce-time) (seconds 0.3))
|
||||
)
|
||||
(set-time! (-> this played-bounce-time))
|
||||
(sound-play "grenade-bounce")
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate impact (vehicle-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('touched)
|
||||
(if (send-event
|
||||
proc
|
||||
'attack
|
||||
(-> block param 0)
|
||||
(static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(mode 'explode)
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'explosion-init-params)))
|
||||
(set! (-> gp-0 spawn-point quad) (-> self root trans quad))
|
||||
(quaternion-identity! (-> gp-0 spawn-quat))
|
||||
(set! (-> gp-0 radius) (-> self blast-radius))
|
||||
(set! (-> gp-0 scale) 1.0)
|
||||
(set! (-> gp-0 group) (-> *part-group-id-table* 104))
|
||||
(set! (-> gp-0 collide-with)
|
||||
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
||||
)
|
||||
(set! (-> gp-0 damage) 6.0)
|
||||
(set! (-> gp-0 damage-scale) 1.0)
|
||||
(set! (-> gp-0 vehicle-damage-factor) 1.0)
|
||||
(set! (-> gp-0 vehicle-impulse-factor) 1.0)
|
||||
(set! (-> gp-0 ignore-proc) (process->handle #f))
|
||||
(explosion-spawn gp-0 self)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(let ((v1-17 (-> self root root-prim)))
|
||||
(set! (-> v1-17 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-17 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 44 of type vehicle-grenade
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod vehicle-grenade-method-44 ((this vehicle-grenade))
|
||||
(when *traffic-manager*
|
||||
(let ((v1-1 (new 'stack-no-clear 'traffic-danger-info)))
|
||||
(set! (-> v1-1 sphere quad) (-> this root trans quad))
|
||||
(set! (-> v1-1 sphere r) (-> this blast-radius))
|
||||
(set! (-> v1-1 velocity quad) (-> this root transv quad))
|
||||
(set! (-> v1-1 notify-radius) 122880.0)
|
||||
(set! (-> v1-1 danger-level) 2.0)
|
||||
(set! (-> v1-1 decay-rate) 0.0)
|
||||
(set! (-> v1-1 flags) (the-as uint 1))
|
||||
(set! (-> v1-1 danger-type) (the-as uint 6))
|
||||
(set! (-> v1-1 handle) (the-as handle #f))
|
||||
(send-event *traffic-manager* 'add-danger-sphere v1-1)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate sitting (vehicle-grenade)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
(vehicle-grenade-method-44 self)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(when (time-elapsed? (-> self state-time) (seconds 0.5))
|
||||
(set-time! (-> self state-time))
|
||||
(vehicle-grenade-method-44 self)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(when *traffic-manager*
|
||||
(let ((v1-10 (new 'stack-no-clear 'traffic-danger-info)))
|
||||
(set! (-> v1-10 sphere quad) (-> self root trans quad))
|
||||
(set! (-> v1-10 sphere r) (the-as float (* (the int (-> self blast-radius)) 2)))
|
||||
(set! (-> v1-10 velocity quad) (-> self root transv quad))
|
||||
(set! (-> v1-10 notify-radius) 122880.0)
|
||||
(set! (-> v1-10 danger-level) 2.0)
|
||||
(set! (-> v1-10 decay-rate) 0.0)
|
||||
(set! (-> v1-10 flags) (the-as uint 1))
|
||||
(set! (-> v1-10 danger-type) (the-as uint 6))
|
||||
(set! (-> v1-10 handle) (the-as handle #f))
|
||||
(send-event *traffic-manager* 'add-danger-sphere v1-10)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type vehicle-grenade-deflect
|
||||
(deftype vehicle-grenade-deflect (vehicle-grenade)
|
||||
((has-been-deflected symbol)
|
||||
(has-hit-ground symbol)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vehicle-grenade-deflect
|
||||
(defmethod inspect ((this vehicle-grenade-deflect))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type vehicle-grenade inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Thas-been-deflected: ~A~%" (-> this has-been-deflected))
|
||||
(format #t "~2Thas-hit-ground: ~A~%" (-> this has-hit-ground))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 31 of type vehicle-grenade-deflect
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init-proj-settings! ((this vehicle-grenade-deflect))
|
||||
(set! (-> this has-been-deflected) #f)
|
||||
(let ((t9-0 (method-of-type vehicle-grenade init-proj-settings!)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this has-hit-ground) #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate moving (vehicle-grenade-deflect)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) trans)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) code)))
|
||||
(if t9-0
|
||||
((the-as (function none) t9-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self root status) (collide-status on-ground))
|
||||
(set! (-> self has-hit-ground) #t)
|
||||
(if (= (-> self charge-level) 0.0)
|
||||
(go-virtual impact)
|
||||
)
|
||||
)
|
||||
(let ((t9-1 (-> (method-of-type vehicle-grenade moving) post)))
|
||||
(if t9-1
|
||||
((the-as (function none) t9-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type vehicle-grenade-deflect
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod proj-event-handler ((this vehicle-grenade-deflect) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('attack)
|
||||
(format #t "attack")
|
||||
(when (and (!= (-> this owner-handle) arg0)
|
||||
(not (-> this has-been-deflected))
|
||||
(logtest? (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3) (penetrate spin))
|
||||
(-> this next-state)
|
||||
(let ((v1-7 (-> this next-state name)))
|
||||
(or (= v1-7 'moving) (= v1-7 'sitting))
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (handle->process (-> this owner-handle)))
|
||||
(s4-2 (vector-!
|
||||
s4-1
|
||||
(get-trans
|
||||
(the-as process-focusable (if (type? s3-0 process-focusable)
|
||||
(the-as process-focusable s3-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(-> this root trans)
|
||||
)
|
||||
)
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-1 quad) (the-as uint128 0))
|
||||
(set! (-> s4-2 y) 0.0)
|
||||
(let ((f28-0 1274.3112)
|
||||
(f30-0 245760.0)
|
||||
)
|
||||
(vector-normalize! s4-2 1.0)
|
||||
(when (-> this has-hit-ground)
|
||||
(set! f28-0 3276.8)
|
||||
(set! f30-0 204800.0)
|
||||
)
|
||||
(let* ((s2-0 arg0)
|
||||
(a0-16 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
0.0
|
||||
(let ((f26-0 -0.3)
|
||||
(v1-22 a0-16)
|
||||
)
|
||||
(when (= (-> a0-16 type) target)
|
||||
(if (-> this has-hit-ground)
|
||||
(set! f26-0 0.7)
|
||||
)
|
||||
(set! (-> s3-1 quad) (-> (the-as target v1-22) control to-target-pt-xz quad))
|
||||
(vector-normalize! s3-1 1.0)
|
||||
(set! (-> s3-1 y) 0.0)
|
||||
(if (< (vector-dot s3-1 s4-2) f26-0)
|
||||
(set! (-> s4-2 quad) (-> s3-1 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-2 y) (tan f28-0))
|
||||
(vector-normalize! s4-2 1.0)
|
||||
(let ((v1-29 (-> s4-2 quad)))
|
||||
(set! (-> this root transv quad) v1-29)
|
||||
)
|
||||
(vector-normalize! (-> this root transv) f30-0)
|
||||
)
|
||||
)
|
||||
(set! (-> this has-been-deflected) #t)
|
||||
(set! (-> this owner-handle) (process->handle arg0))
|
||||
(set! (-> this ignore-handle) (-> this owner-handle))
|
||||
(if (and (-> this next-state) (= (-> this next-state name) 'sitting))
|
||||
(go (method-of-object this moving))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touched 'touch)
|
||||
(if (or (not (-> this has-been-deflected)) (!= (process->handle arg0) (-> this owner-handle)))
|
||||
((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *lightning-spec-id-table* 19) (new 'static 'lightning-spec
|
||||
:name "lightning-trail-crimson-guard"
|
||||
:flags (lightning-spec-flags lsf1)
|
||||
:rand-func #x2
|
||||
:start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x3f :page #x4)
|
||||
:reduction 0.6
|
||||
:num-points 16
|
||||
:box-size 2048.0
|
||||
:merge-factor 0.5
|
||||
:merge-count 2
|
||||
:radius 1638.4
|
||||
:duration -1.0
|
||||
:sound #f
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *lightning-spec-id-table* 20) (new 'static 'lightning-spec
|
||||
:name "lightning-fractal-crimson-guard"
|
||||
:flags (lightning-spec-flags lsf1)
|
||||
:start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x3f :page #x4)
|
||||
:reduction 0.6
|
||||
:num-points 16
|
||||
:box-size 2048.0
|
||||
:merge-factor 0.5
|
||||
:merge-count 2
|
||||
:radius 1638.4
|
||||
:duration -1.0
|
||||
:sound #f
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1163
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.8) (meters 0.2))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 32.0 96.0)
|
||||
(:g :copy r)
|
||||
(:b 255.0)
|
||||
(:a 32.0 16.0)
|
||||
(:omega (degrees 2265.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1164
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2.5) (meters 1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0 64.0)
|
||||
(:g :copy r)
|
||||
(:b 255.0)
|
||||
(:a 16.0 16.0)
|
||||
(:omega (degrees 2265.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup part-crimson-lightning-glow
|
||||
:id 254
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 0.035)
|
||||
:bounds (static-bspherem 0 0 0 4)
|
||||
:parts ((sp-item 1164 :fade-after (meters 100) :flags (sp6)) (sp-item 1163 :fade-after (meters 100) :flags (sp6)))
|
||||
)
|
||||
|
||||
;; definition of type guard-lazer-shot
|
||||
(deftype guard-lazer-shot (projectile)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type guard-lazer-shot
|
||||
(defmethod inspect ((this guard-lazer-shot))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type projectile inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate dissipate (guard-lazer-shot)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual impact)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 38 of type guard-lazer-shot
|
||||
(defmethod made-impact? ((this guard-lazer-shot))
|
||||
(let ((gp-0 (-> this root))
|
||||
(s5-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((v1-0 s5-0))
|
||||
(set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w))
|
||||
(set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with))
|
||||
(set! (-> v1-0 ignore-process0) this)
|
||||
(set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent)))
|
||||
(set! (-> v1-0 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-0 action-mask) (collide-action solid))
|
||||
)
|
||||
(let ((a0-2 (the-as process-focusable (handle->process (-> this notify-handle)))))
|
||||
(when a0-2
|
||||
(let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans a0-2 3)))
|
||||
(f0-2 (- (vector-length s4-1)))
|
||||
)
|
||||
(fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function guard-lazer-shot-move
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun guard-lazer-shot-move ((arg0 guard-lazer-shot))
|
||||
(projectile-move-fill-line-sphere arg0)
|
||||
(if (logtest? (-> arg0 root status) (collide-status touch-surface))
|
||||
(go (method-of-object arg0 impact))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type guard-lazer-shot
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-collision! ((this guard-lazer-shot))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 enemy-yellow-shot))
|
||||
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-7 prim-core collide-as) (collide-spec projectile))
|
||||
(set! (-> v1-7 prim-core collide-with)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
bot
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-others-list
|
||||
player-list
|
||||
pusher
|
||||
shield
|
||||
)
|
||||
)
|
||||
(set! (-> v1-7 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-7)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-10 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
|
||||
(set! (-> s5-0 event-self) 'touched)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
(set! (-> this root pat-ignore-mask)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 31 of type guard-lazer-shot
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-proj-settings! ((this guard-lazer-shot))
|
||||
(set! (-> this attack-mode) 'shock)
|
||||
(set! (-> this max-speed) 131072.0)
|
||||
(set! (-> this timeout) (seconds 0.125))
|
||||
(set! (-> this move) guard-lazer-shot-move)
|
||||
(set! (-> this damage) 3.0)
|
||||
(set! (-> this root dynam gravity y) 0.0)
|
||||
(set! (-> this root dynam gravity-length) 0.0)
|
||||
(set! (-> this root dynam gravity-max) 0.0)
|
||||
(set! (-> this vehicle-damage-factor) 0.5)
|
||||
(logior! (-> this options) (projectile-options po13))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 37 of type guard-lazer-shot
|
||||
(defmethod deal-damage! ((this guard-lazer-shot) (arg0 process) (arg1 event-message-block))
|
||||
(if (logtest? (process-mask kg-robot) (-> arg0 mask))
|
||||
(set! (-> this damage) 5.0)
|
||||
)
|
||||
(call-parent-method this arg0 arg1)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function update-level-info
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-level-info ((arg0 level))
|
||||
(let ((v1-0 *traffic-info*))
|
||||
(dotimes (a0-1 44)
|
||||
(let ((a1-1 (-> v1-0 traffic-object-type-from-vehicle-type a0-1)))
|
||||
(if (< (the-as uint a1-1) (the-as uint 29))
|
||||
(set! (-> v1-0 traffic-object-levels a1-1) (-> v1-0 vehicle-levels a0-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-4 *traffic-engine*))
|
||||
(when a0-4
|
||||
(dotimes (a1-5 29)
|
||||
(set! (-> a0-4 object-type-info-array a1-5 level) (-> v1-0 traffic-object-levels a1-5))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type dummy-alloc
|
||||
(deftype dummy-alloc (structure)
|
||||
((val uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dummy-alloc
|
||||
(defmethod inspect ((this dummy-alloc))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dummy-alloc)
|
||||
(format #t "~1Tval: ~D~%" (-> this val))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function ctywide-login
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun ctywide-login ((arg0 level))
|
||||
(format 0 "citywide-login~%")
|
||||
(malloc 'loading-level #x1b800)
|
||||
(set! *traffic-engine* (new 'loading-level 'traffic-engine))
|
||||
(set! *ff-squad-control* (new 'loading-level 'ff-squad-control))
|
||||
(set! *kg-squad-control* (new 'loading-level 'kg-squad-control))
|
||||
(set! *mh-squad-control* (new 'loading-level 'mh-squad-control))
|
||||
(set! *city-borrow-manager* (new 'loading-level 'cty-borrow-manager))
|
||||
(set! *cty-faction-manager* (new 'loading-level 'cty-faction-manager))
|
||||
(initialize-cty-attack-controller)
|
||||
(let ((t9-9 cty-attack-reset)
|
||||
(a0-9 #f)
|
||||
(a1-8 #f)
|
||||
)
|
||||
(t9-9 a0-9 a1-8 #f)
|
||||
(init! *city-borrow-manager*)
|
||||
(initialize *ff-squad-control* (the-as process a1-8))
|
||||
(initialize *kg-squad-control* (the-as process a1-8))
|
||||
(initialize *mh-squad-control* (the-as process a1-8))
|
||||
)
|
||||
(clear-borrow-holds! *city-borrow-manager*)
|
||||
(set! *city-mode* 'ctywide)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function ctywide-activate
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun ctywide-activate ((arg0 level) (arg1 symbol))
|
||||
(cty-attack-reset #f #f #f)
|
||||
(format 0 "ctywide-activate (mode ~s, *spawn-actors* ~s)~%" arg1 (if *spawn-actors*
|
||||
"#t"
|
||||
"#f"
|
||||
)
|
||||
)
|
||||
(let ((v1-1 *traffic-info*))
|
||||
(when v1-1
|
||||
(set! (-> v1-1 ctywide-level) arg0)
|
||||
(set! (-> v1-1 vehicle-level) arg0)
|
||||
(set! (-> v1-1 restore-speech-callback) restore-city-speeches)
|
||||
)
|
||||
)
|
||||
(vehicle-manager-kill)
|
||||
(set! *traffic-fast-spawn* (or (= arg1 'life) (= arg1 'debug)))
|
||||
(cond
|
||||
((and (= arg1 'debug) (not *spawn-actors*))
|
||||
(traffic-kill)
|
||||
)
|
||||
(else
|
||||
(restore-defaults *cty-faction-manager*)
|
||||
(traffic-start)
|
||||
(clear-borrow-holds! *city-borrow-manager*)
|
||||
(add-squad-to-traffic-engine *ff-squad-control* *traffic-engine*)
|
||||
(squad-control-method-10 *ff-squad-control*)
|
||||
(add-squad-to-traffic-engine *kg-squad-control* *traffic-engine*)
|
||||
(squad-control-method-10 *kg-squad-control*)
|
||||
(add-squad-to-traffic-engine *mh-squad-control* *traffic-engine*)
|
||||
(squad-control-method-10 *mh-squad-control*)
|
||||
(restore-default-settings *traffic-engine*)
|
||||
)
|
||||
)
|
||||
(let ((v1-27 *traffic-info*))
|
||||
(if (not (-> v1-27 vehicle-levels 6))
|
||||
(set! (-> v1-27 vehicle-levels 6) 'ctywide)
|
||||
)
|
||||
)
|
||||
(when *traffic-engine*
|
||||
(let ((v1-31 (-> *traffic-engine* object-type-info-array 28)))
|
||||
(logior! (-> v1-31 flags) (traffic-type-flag ttf3))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function ctywide-deactivate
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun ctywide-deactivate ((arg0 level))
|
||||
(format 0 "ctywide-deactivate~%")
|
||||
(set! (-> *traffic-info* ctywide-level) #f)
|
||||
(persist-with-delay *setting-control* 'cty-faction-music 0 'music 'city1 0.0 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function ctywide-logout
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun ctywide-logout ((arg0 level))
|
||||
(set! *traffic-engine* #f)
|
||||
(set! *ff-squad-control* #f)
|
||||
(set! *kg-squad-control* #f)
|
||||
(set! *mh-squad-control* #f)
|
||||
(clear-callback! *city-borrow-manager*)
|
||||
(set! *city-borrow-manager* #f)
|
||||
(set! *cty-faction-manager* #f)
|
||||
(set! *trail-graph* #f)
|
||||
(set! *city-mode* #f)
|
||||
(set! *cty-attack-controller* #f)
|
||||
(let ((v1-2 *traffic-info*))
|
||||
(set! (-> v1-2 vehicle-levels 6) #f)
|
||||
(set! (-> v1-2 restore-speech-callback) #f)
|
||||
)
|
||||
(when *traffic-engine*
|
||||
(let ((v1-7 (-> *traffic-engine* object-type-info-array 28)))
|
||||
(logclear! (-> v1-7 flags) (traffic-type-flag ttf3))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for symbol *traffic-alert-level-force*, type symbol
|
||||
(define *traffic-alert-level-force* #f)
|
||||
|
||||
;; definition for function lwide-activate
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun lwide-activate ((arg0 level) (arg1 symbol))
|
||||
(format #t "lwide-activate ~s~%" arg0)
|
||||
(let ((v1-0 *traffic-info*)
|
||||
(a0-2 (-> arg0 name))
|
||||
)
|
||||
(set! (-> v1-0 restore-speech-callback) restore-city-speeches)
|
||||
(case (-> arg0 name)
|
||||
(('ctycara)
|
||||
(set! (-> v1-0 vehicle-levels 3) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 4) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 5) a0-2)
|
||||
)
|
||||
(('ctycarb)
|
||||
(set! (-> v1-0 vehicle-levels 0) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 1) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 2) a0-2)
|
||||
)
|
||||
(('ctypepa)
|
||||
(set! (-> v1-0 traffic-object-levels 0) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 1) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 2) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 3) a0-2)
|
||||
)
|
||||
(('ctypesb)
|
||||
(set! (-> v1-0 traffic-object-levels 8) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 9) a0-2)
|
||||
)
|
||||
(('ctypepb)
|
||||
(set! (-> v1-0 traffic-object-levels 10) a0-2)
|
||||
)
|
||||
(('ctypesa)
|
||||
(set! (-> v1-0 traffic-object-levels 4) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 6) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 13) a0-2)
|
||||
)
|
||||
(('ctypesc)
|
||||
(set! (-> v1-0 traffic-object-levels 14) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 15) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 16) a0-2)
|
||||
)
|
||||
(('lctyhijk)
|
||||
(set! (-> v1-0 vehicle-levels 11) a0-2)
|
||||
)
|
||||
)
|
||||
(update-level-info (the-as level a0-2))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function lwide-deactivate
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun lwide-deactivate ((arg0 level))
|
||||
(let ((v1-0 *traffic-info*))
|
||||
(dotimes (a1-0 44)
|
||||
(if (= (-> v1-0 vehicle-levels a1-0) (-> arg0 name))
|
||||
(set! (-> v1-0 vehicle-levels a1-0) #f)
|
||||
)
|
||||
)
|
||||
(dotimes (a1-3 29)
|
||||
(if (= (-> v1-0 traffic-object-levels a1-3) (-> arg0 name))
|
||||
(set! (-> v1-0 traffic-object-levels a1-3) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 *traffic-info*))
|
||||
(set! (-> v1-3 vehicle-level) #f)
|
||||
(set! (-> v1-3 restore-speech-callback) #f)
|
||||
)
|
||||
(update-level-info arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+686
@@ -0,0 +1,686 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *alert-level-settings*, type squad-alert-state-settings
|
||||
(define *alert-level-settings* (new 'static 'squad-alert-state-settings
|
||||
:ped-tazer (new 'static 'squad-unit-settings
|
||||
:target-count 3
|
||||
:shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-rifle (new 'static 'squad-unit-settings
|
||||
:target-count 3
|
||||
:shot-count 2
|
||||
:rand-shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-grenade (new 'static 'squad-unit-settings
|
||||
:target-count 1
|
||||
:shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:bike-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 5)
|
||||
)
|
||||
:hellcat-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 5)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *ff-war-alert-state-settings*, type squad-alert-state-settings
|
||||
(define *ff-war-alert-state-settings* (new 'static 'squad-alert-state-settings
|
||||
:ped-tazer (new 'static 'squad-unit-settings
|
||||
:target-count 4
|
||||
:shot-count 1
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-rifle (new 'static 'squad-unit-settings
|
||||
:target-count 7
|
||||
:shot-count 2
|
||||
:rand-shot-count 2
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.15)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-grenade (new 'static 'squad-unit-settings
|
||||
:target-count 3
|
||||
:shot-count 1
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 3)
|
||||
)
|
||||
:bike-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 2
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 3)
|
||||
)
|
||||
:hellcat-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 2
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *ff-guard-type-mask*, type int
|
||||
(define *ff-guard-type-mask* 63)
|
||||
|
||||
;; definition for method 10 of type ff-squad-control
|
||||
(defmethod squad-control-method-10 ((this ff-squad-control))
|
||||
(call-parent-method this)
|
||||
(dotimes (v1-0 3)
|
||||
(set! (-> this guard-type-info-array 0 data v1-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> this guard-type-info-array 1 data v1-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> this guard-type-info-array 2 data v1-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> this guard-type-info-array 3 data v1-0 object-type) (traffic-type wlander-male))
|
||||
(set! (-> this guard-type-info-array 4 data v1-0 object-type) (traffic-type guard-bike))
|
||||
(set! (-> this guard-type-info-array 5 data v1-0 object-type) (traffic-type guard-car))
|
||||
)
|
||||
(dotimes (v1-3 29)
|
||||
(set! (-> this guard-type-mask-from-object-type v1-3) (the-as uint 0))
|
||||
)
|
||||
(dotimes (v1-6 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 v1-6))
|
||||
(let ((a0-17 (-> this guard-type-info-array v1-6 guard-info-normal object-type)))
|
||||
(set! (-> this guard-type-mask-from-object-type a0-17)
|
||||
(the-as uint (logior (ash 1 v1-6) (-> this guard-type-mask-from-object-type a0-17)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(init-alert this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-alert ((this ff-squad-control))
|
||||
(let ((t9-0 (-> *traffic-info* restore-speech-callback)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(let ((t9-1 (method-of-type squad-control init-alert)))
|
||||
(t9-1 this)
|
||||
)
|
||||
(dotimes (v1-4 3)
|
||||
(dotimes (a0-2 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 a0-2))
|
||||
(let ((a1-6 (the-as traffic-guard-type-array (+ (+ (* v1-4 16) 1780 (* 48 a0-2)) (the-as int this)))))
|
||||
(set! (-> a1-6 guard-info-normal min-target-count) 0)
|
||||
(set! (-> a1-6 guard-info-normal max-target-count) 127)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-guard-target-level this 1.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 56 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod ff-squad-control-method-56 ((this ff-squad-control) (arg0 int) (arg1 int) (arg2 int))
|
||||
(let ((v1-3 (-> this guard-type-info-array (the-as uint arg0))))
|
||||
(set! (-> v1-3 guard-info-normal min-target-count) (max 0 (min 127 arg1)))
|
||||
(set! (-> v1-3 guard-info-normal max-target-count) (max 0 (min 127 arg2)))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 16 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod squad-control-method-16 ((this ff-squad-control) (arg0 vector) (arg1 process-focusable) (arg2 squad-target-status))
|
||||
(local-vars (sv-176 (array crimson-guard)) (sv-180 (array float)) (sv-184 int))
|
||||
(let ((t9-0 (method-of-type squad-control squad-control-method-16)))
|
||||
(t9-0 this arg0 arg1 arg2)
|
||||
)
|
||||
(let ((s4-0 (get-idx-in-status-arr this (-> arg2 handle))))
|
||||
(set! sv-176 (the-as (array crimson-guard) (new 'stack 'boxed-array crimson-guard 16)))
|
||||
(set! sv-180 (the-as (array float) (new 'stack 'boxed-array float 16)))
|
||||
(set! sv-184 0)
|
||||
(dotimes (s3-0 (the-as int (-> this traffic tracker1 active-object-count)))
|
||||
(case (-> this traffic tracker1 active-object-type-list s3-0)
|
||||
(((traffic-type guard-a))
|
||||
(let ((s2-0 (the-as crimson-guard (handle->process (-> this traffic tracker1 active-object-list s3-0)))))
|
||||
(when (and s2-0 (not (focus-test? s2-0 dead inactive)) (= (-> s2-0 target-status handle) (-> arg2 handle)))
|
||||
(set! (-> sv-176 sv-184) s2-0)
|
||||
(set! (-> sv-180 sv-184) (vector-vector-distance (-> s2-0 root trans) (-> arg2 position)))
|
||||
(set! sv-184 (+ sv-184 1))
|
||||
(set! (-> s2-0 move-index) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-14 #t))
|
||||
(while a0-14
|
||||
(set! a0-14 #f)
|
||||
(dotimes (v1-32 (+ sv-184 -1))
|
||||
(when (< (-> sv-180 (+ v1-32 1)) (-> sv-180 v1-32))
|
||||
(let ((a0-17 (-> sv-176 v1-32))
|
||||
(f0-2 (-> sv-180 v1-32))
|
||||
)
|
||||
(set! (-> sv-176 v1-32) (-> sv-176 (+ v1-32 1)))
|
||||
(set! (-> sv-176 (+ v1-32 1)) a0-17)
|
||||
(set! (-> sv-180 v1-32) (-> sv-180 (+ v1-32 1)))
|
||||
(set! (-> sv-180 (+ v1-32 1)) f0-2)
|
||||
)
|
||||
(set! a0-14 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< s4-0 0)
|
||||
)
|
||||
(else
|
||||
(let ((s3-1 (new 'stack-no-clear 'array 'float 16)))
|
||||
(dotimes (v1-37 16)
|
||||
(set! (-> s3-1 v1-37) 0.0)
|
||||
)
|
||||
(dotimes (s2-1 sv-184)
|
||||
(crimson-guard-method-282 (-> sv-176 s2-1) (-> arg2 position) (-> this target-formation-array s4-0) s3-1 16)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type ff-squad-control
|
||||
(defmethod squad-control-city-method-35 ((this ff-squad-control) (arg0 citizen) (arg1 handle))
|
||||
(cond
|
||||
((type? arg0 citizen)
|
||||
(let ((a0-2 arg0))
|
||||
(cond
|
||||
((!= (-> a0-2 faction-mode) 1)
|
||||
(if (zero? (-> this alert-state level))
|
||||
(the-as process-focusable #f)
|
||||
(get-focus-in-range this arg0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(call-parent-method this arg0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(ff-squad-control-method-51
|
||||
this
|
||||
arg0
|
||||
(collide-spec jak enemy hit-by-others-list player-list bot-targetable jak-vehicle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 51 of type ff-squad-control
|
||||
;; WARN: Return type mismatch process-drawable vs process-focusable.
|
||||
(defmethod ff-squad-control-method-51 ((this ff-squad-control) (arg0 process-focusable) (arg1 collide-spec))
|
||||
(let ((gp-0 (the-as process-drawable #f)))
|
||||
(let ((f30-0 (the-as float #x7f800000)))
|
||||
(when (logtest? arg1 (collide-spec player-list))
|
||||
(let ((v1-4 (-> *collide-player-list* alive-list next0)))
|
||||
*collide-player-list*
|
||||
(let ((s3-0 (-> v1-4 next0)))
|
||||
(while (!= v1-4 (-> *collide-player-list* alive-list-end))
|
||||
(let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1))))
|
||||
(when (logtest? arg1 (-> v1-5 root-prim prim-core collide-as))
|
||||
(let* ((s1-0 (-> v1-5 process))
|
||||
(s2-0 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s2-0 (not (focus-test? (the-as process-focusable s2-0) disable dead inactive)) (!= arg0 s2-0))
|
||||
(let ((f0-0 (vector-vector-xz-distance (-> arg0 root trans) (-> (the-as process-focusable s2-0) root trans))))
|
||||
(when (or (not gp-0) (< f0-0 f30-0))
|
||||
(set! gp-0 s2-0)
|
||||
(set! f30-0 f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-4 s3-0)
|
||||
*collide-player-list*
|
||||
(set! s3-0 (-> (the-as connection s3-0) next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? arg1 (collide-spec hit-by-player-list hit-by-others-list))
|
||||
(when (logtest? arg1 (collide-spec hit-by-player-list))
|
||||
(let ((v1-22 (-> *collide-hit-by-player-list* alive-list next0)))
|
||||
*collide-hit-by-player-list*
|
||||
(let ((s3-1 (-> v1-22 next0)))
|
||||
(while (!= v1-22 (-> *collide-hit-by-player-list* alive-list-end))
|
||||
(let ((v1-23 (the-as collide-shape (-> (the-as connection v1-22) param1))))
|
||||
(when (logtest? arg1 (-> v1-23 root-prim prim-core collide-as))
|
||||
(let* ((s1-1 (-> v1-23 process))
|
||||
(s2-1 (if (type? s1-1 process-focusable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s2-1 (not (focus-test? (the-as process-focusable s2-1) disable dead inactive)) (!= arg0 s2-1))
|
||||
(let ((f0-1 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-1 root trans))))
|
||||
(when (or (not gp-0) (< f0-1 f30-0))
|
||||
(set! gp-0 s2-1)
|
||||
(set! f30-0 f0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-22 s3-1)
|
||||
*collide-hit-by-player-list*
|
||||
(set! s3-1 (-> s3-1 next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? arg1 (collide-spec hit-by-others-list))
|
||||
(let ((v1-38 (-> *collide-hit-by-others-list* alive-list next0)))
|
||||
*collide-hit-by-others-list*
|
||||
(let ((s3-2 (-> v1-38 next0)))
|
||||
(while (!= v1-38 (-> *collide-hit-by-others-list* alive-list-end))
|
||||
(let ((v1-39 (the-as collide-shape (-> (the-as connection v1-38) param1))))
|
||||
(when (logtest? arg1 (-> v1-39 root-prim prim-core collide-as))
|
||||
(let* ((s1-2 (-> v1-39 process))
|
||||
(s2-2 (if (type? s1-2 process-focusable)
|
||||
s1-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s2-2 (not (focus-test? (the-as process-focusable s2-2) disable dead inactive)) (!= arg0 s2-2))
|
||||
(let ((f0-2 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-2 root trans))))
|
||||
(when (or (not gp-0) (< f0-2 f30-0))
|
||||
(set! gp-0 s2-2)
|
||||
(set! f30-0 f0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-38 s3-2)
|
||||
*collide-hit-by-others-list*
|
||||
(set! s3-2 (-> s3-2 next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 48 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod ff-squad-control-method-48 ((this ff-squad-control))
|
||||
(let ((v0-0 0))
|
||||
(dotimes (v1-0 10)
|
||||
(if (logtest? *ff-guard-type-mask* (ash 1 v1-0))
|
||||
(+! v0-0 (-> this guard-type-info-array v1-0 guard-info-normal count))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 50 of type ff-squad-control
|
||||
(defmethod get-focus ((this ff-squad-control))
|
||||
(get-target-focus this)
|
||||
)
|
||||
|
||||
;; definition for method 49 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-guard-target-level ((this ff-squad-control) (arg0 float))
|
||||
(set! (-> this alert-state guard-target-level) arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 53 of type ff-squad-control
|
||||
(defmethod get-unit-settings-by-idx ((this ff-squad-control) (arg0 int))
|
||||
(-> this settings guard-settings-array arg0)
|
||||
)
|
||||
|
||||
;; definition for method 54 of type ff-squad-control
|
||||
;; WARN: Return type mismatch uint vs none.
|
||||
(defmethod ff-squad-control-method-54 ((this ff-squad-control) (arg0 int))
|
||||
(-> this traffic object-type-info-array arg0 guard-type)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 55 of type ff-squad-control
|
||||
(defmethod ff-squad-control-method-55 ((this ff-squad-control) (arg0 int) (arg1 int))
|
||||
(-> (the-as ff-squad-control (+ (the-as uint this) (* (the-as uint 48) (the-as uint arg0)) (* arg1 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
change-to-type
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 46 of type ff-squad-control
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for method 45 of type ff-squad-control
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod ff-squad-control-method-45 ((this ff-squad-control))
|
||||
(let ((s5-0 (get-target-focus this)))
|
||||
(let ((a1-0 (-> this alert-state level)))
|
||||
(mem-copy!
|
||||
(the-as pointer (-> this settings))
|
||||
(the-as pointer (+ (the-as uint *alert-level-settings*) (* 320 (the-as int a1-0))))
|
||||
320
|
||||
)
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> this settings-war)) (the-as pointer *ff-war-alert-state-settings*) 320)
|
||||
(dotimes (v1-2 3)
|
||||
(dotimes (a0-4 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 a0-4))
|
||||
(let ((a2-7 (the-as squad-alert-state-settings (+ (+ (* a0-4 32) 820 (* 320 v1-2)) (the-as int this))))
|
||||
(a1-13 (the-as traffic-guard-type-array (+ (+ (* v1-2 16) 1780 (* 48 a0-4)) (the-as int this))))
|
||||
)
|
||||
(set! (-> a2-7 ped-tazer inaccuracy)
|
||||
(fmax 0.0 (fmin 1.0 (* (-> a2-7 ped-tazer inaccuracy) (-> this alert-state guard-inaccuracy-factor))))
|
||||
)
|
||||
(when (and s5-0 (= (-> s5-0 type) target))
|
||||
(when (focus-test? *target* pilot)
|
||||
(set! (-> a2-7 ped-tazer acquire-delay)
|
||||
(the-as uint (the int (* 0.75 (the float (-> a2-7 ped-tazer acquire-delay)))))
|
||||
)
|
||||
(set! (-> a2-7 ped-tazer shot-delay)
|
||||
(the-as uint (the int (* 0.6 (the float (-> a2-7 ped-tazer shot-delay)))))
|
||||
)
|
||||
(set! (-> a2-7 ped-tazer burst-delay)
|
||||
(the-as uint (the int (* 0.8 (the float (-> a2-7 ped-tazer burst-delay)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a1-13 guard-info-normal target-count)
|
||||
(max
|
||||
(min
|
||||
(the int (* (the float (-> a2-7 ped-tazer target-count)) (-> this alert-state guard-target-level)))
|
||||
(-> a1-13 guard-info-normal max-target-count)
|
||||
)
|
||||
(-> a1-13 guard-info-normal min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-5 3)
|
||||
(dotimes (a0-7 29)
|
||||
(let ((a2-12 (-> this guard-type-mask-from-object-type a0-7)))
|
||||
(when (nonzero? a2-12)
|
||||
(let ((a3-20 0)
|
||||
(a1-17 0)
|
||||
)
|
||||
(while (nonzero? a2-12)
|
||||
(if (logtest? a2-12 1)
|
||||
(+! a1-17 (-> (the-as ff-squad-control (+ (the-as uint this) (* 48 a3-20) (* v1-5 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
target-count
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! a3-20 1)
|
||||
(set! a2-12 (shr a2-12 1))
|
||||
)
|
||||
(set! (-> this traffic object-type-info-array 0 target-counts (+ v1-5 (* a0-7 32))) a1-17)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 #f))
|
||||
(when (not (logtest? (-> this alert-state flags) (squad-alert-flag war)))
|
||||
(when *traffic-alert-level-force*
|
||||
(set! (-> this alert-state level) (the-as uint 3))
|
||||
(logclear! (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
(set-time! (-> this alert-state start-time))
|
||||
)
|
||||
(when (>= (-> this alert-state level) (the-as uint 1))
|
||||
(set! s5-1 #t)
|
||||
(cond
|
||||
((logtest? (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
(cond
|
||||
((> (the-as int (ff-squad-control-method-48 this)) 0)
|
||||
(set-time! (-> this alert-state start-time))
|
||||
)
|
||||
(else
|
||||
(when (time-elapsed? (-> this alert-state start-time) (seconds 3))
|
||||
(set! s5-1 #f)
|
||||
(set! (-> this alert-state level) (the-as uint 0))
|
||||
(logclear! (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s4-0
|
||||
(+ (- (-> this alert-state start-time) (current-time)) (the-as time-frame (-> this alert-state duration)))
|
||||
)
|
||||
)
|
||||
(if (and (get-target-focus this)
|
||||
(= (-> (get-target-focus this) type) target)
|
||||
(-> *target* next-state)
|
||||
(= (-> *target* next-state name) 'target-hide)
|
||||
)
|
||||
(set! s4-0 (- s4-0 (the-as time-frame (* (- (current-time) (-> *target* state-time)) 2))))
|
||||
)
|
||||
(if (> s4-0 0)
|
||||
0
|
||||
(logior! (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(s5-1
|
||||
(if (not (logtest? (-> this alert-state flags) (squad-alert-flag alarm-on)))
|
||||
(logior! (-> this alert-state flags) (squad-alert-flag alarm-on))
|
||||
)
|
||||
(set! (-> (new 'stack-no-clear 'vector) quad) (-> (target-pos 0) quad))
|
||||
(if #t
|
||||
(ff-squad-control-method-47 this)
|
||||
)
|
||||
(let ((v1-65 0))
|
||||
(dotimes (a0-26 29)
|
||||
(let ((a1-20 (-> this traffic object-type-info-array a0-26)))
|
||||
(if #t
|
||||
(+! v1-65 (-> a1-20 killed-count))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (>= v1-65 (the-as int (* (-> this alert-state level) 8)))
|
||||
(< (-> this alert-state level) (-> this alert-state max-level))
|
||||
)
|
||||
(start-alert this (the-as int (+ (-> this alert-state level) 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (logtest? (-> this alert-state flags) (squad-alert-flag alarm-on))
|
||||
(logclear! (-> this alert-state flags) (squad-alert-flag alarm-on))
|
||||
(ff-squad-control-method-47 this)
|
||||
(let ((v1-79 (-> this alert-state target-status-array)))
|
||||
(logclear! (-> v1-79 0 flags) (squad-target-flag visible-now visible-recently visible-ever))
|
||||
)
|
||||
(dotimes (v1-80 29)
|
||||
(set! (-> this traffic object-type-info-array v1-80 killed-count) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 47 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod ff-squad-control-method-47 ((this ff-squad-control))
|
||||
(set-time! (-> this alert-state notify-time))
|
||||
(cond
|
||||
((> (-> this alert-state level) 0)
|
||||
(if (and (not (logtest? (-> this alert-state flags) (squad-alert-flag alert-ending))) (get-target-focus this))
|
||||
(for-all-active-processes
|
||||
(-> this traffic)
|
||||
(lambda ((arg0 crimson-guard) (arg1 traffic-object-type-info))
|
||||
(when (logtest? (-> arg1 flags) (traffic-type-flag ttf0))
|
||||
(let ((a0-1 arg0))
|
||||
(if (!= (-> a0-1 faction-mode) 1)
|
||||
(send-event arg0 'alert-begin (get-target-focus *ff-squad-control*))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(for-all-active-processes
|
||||
(-> this traffic)
|
||||
(lambda ((arg0 process-focusable) (arg1 traffic-object-type-info))
|
||||
(if (logtest? (-> arg1 flags) (traffic-type-flag ttf0))
|
||||
(send-event arg0 'alert-end)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 52 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod end-pursuit-for-all ((this ff-squad-control) (arg0 int))
|
||||
(for-all-active-processes-of-type
|
||||
(-> this traffic tracker-array (-> this traffic object-type-info-array arg0 tracker-index))
|
||||
(the-as traffic-type arg0)
|
||||
(lambda ((arg0 process-focusable) (arg1 traffic-object-type-info)) (send-event arg0 'end-pursuit) (none))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 26 of type ff-squad-control
|
||||
(defmethod set-pos-vel ((this ff-squad-control) (arg0 primary-target-pos-vel))
|
||||
(squad-control-method-25 this arg0 (seconds 0.45))
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for method 13 of type ff-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update ((this ff-squad-control))
|
||||
(call-parent-method this)
|
||||
(ff-squad-control-method-45 this)
|
||||
(ff-squad-control-method-46 this)
|
||||
(when *cty-faction-manager*
|
||||
(let ((a2-0 (if (> (-> this alert-state level) 0)
|
||||
(the-as int (+ (-> this alert-state level) 3))
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(faction-spawn *cty-faction-manager* 2 a2-0 #f #f)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 39 of type ff-squad-control
|
||||
(defmethod squad-control-city-method-39 ((this ff-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(if (type? arg0 crimson-guard)
|
||||
(crimson-guard-method-288 (the-as crimson-guard arg0) arg1)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 43 of type ff-squad-control
|
||||
(defmethod squad-control-city-method-43 ((this ff-squad-control) (arg0 process-focusable))
|
||||
(if (type? arg0 crimson-guard)
|
||||
(time-elapsed? (-> (the-as crimson-guard arg0) last-choose-new-enemy-time) (seconds 4))
|
||||
#t
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function set-ff-primary-target
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-ff-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *ff-squad-control*
|
||||
(let* ((s5-0 *ff-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+565
@@ -0,0 +1,565 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 264 of type crimson-guard
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod crimson-guard-method-264 ((this crimson-guard))
|
||||
(let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14))))
|
||||
(new 'stack-no-clear 'vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'traj3d-params))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) (-> this target-pos-predict-miss) s4-0))
|
||||
(f30-0 1.0)
|
||||
)
|
||||
(set! (-> s3-1 y) 0.0)
|
||||
(vector-rotate-around-y! s3-1 s3-1 (* 182.04445 (+ (if (zero? (rand-vu-int-count 2))
|
||||
90.0
|
||||
-90.0
|
||||
)
|
||||
(rand-vu-float-range -45.0 45.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! f30-0
|
||||
(cond
|
||||
((!= (-> (handle->process (-> this focus handle)) type) target)
|
||||
(set! (-> s3-1 quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 dest quad)
|
||||
(-> (get-trans (the-as process-focusable (handle->process (-> this focus handle))) 3) quad)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
(else
|
||||
(if (logtest? (-> this draw status) (draw-control-status on-screen))
|
||||
(vector-normalize! s3-1 (* 4096.0 (rand-vu-float-range 1.0 2.0)))
|
||||
(vector-normalize! s3-1 (* 4096.0 (rand-vu-float-range 1.0 3.0)))
|
||||
)
|
||||
(set! (-> s5-0 dest quad)
|
||||
(-> (vector+! (new 'stack-no-clear 'vector) s3-1 (-> this target-pos-predict-miss)) quad)
|
||||
)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 src quad) (-> s4-0 quad))
|
||||
(set! (-> s5-0 initial-tilt) 8192.0)
|
||||
(set! (-> s5-0 gravity) 184320.0)
|
||||
(when (traj3d-calc-initial-velocity-using-tilt s5-0)
|
||||
(let ((a1-14 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
||||
(set! (-> a1-14 ent) (-> this entity))
|
||||
(set! (-> a1-14 charge) f30-0)
|
||||
(set! (-> a1-14 options) (projectile-options))
|
||||
(logclear! (-> a1-14 options) (projectile-options po14 po15 po16))
|
||||
(set! (-> a1-14 pos quad) (-> s5-0 src quad))
|
||||
(set! (-> a1-14 vel quad) (-> s5-0 initial-velocity quad))
|
||||
(set! (-> a1-14 notify-handle) (the-as handle #f))
|
||||
(set! (-> a1-14 owner-handle) (process->handle this))
|
||||
(set! (-> a1-14 target-handle) (the-as handle #f))
|
||||
(set! (-> a1-14 target-pos quad) (the-as uint128 0))
|
||||
(set! (-> a1-14 ignore-handle) (process->handle this))
|
||||
(let* ((v1-38 *game-info*)
|
||||
(a0-37 (+ (-> v1-38 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-38 attack-id) a0-37)
|
||||
(set! (-> a1-14 attack-id) a0-37)
|
||||
)
|
||||
(set! (-> a1-14 timeout) (seconds 4))
|
||||
(spawn-projectile vehicle-grenade-deflect a1-14 this *default-dead-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate grenade-throw-post-retreating (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-4 self))
|
||||
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags))))
|
||||
)
|
||||
0
|
||||
(let ((v1-6 self))
|
||||
(if (not (logtest? (enemy-flag ef37) (-> v1-6 enemy-flags)))
|
||||
(set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-6 enemy-flags))))
|
||||
)
|
||||
(set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-6 enemy-flags))))
|
||||
(set! (-> v1-6 nav callback-info) (-> v1-6 enemy-info callback-info))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
(nav-enemy-method-177 self)
|
||||
(flee-info-method-12 (-> self flee-behavior) self)
|
||||
(set-time! (-> self last-check-player-time))
|
||||
(go-active-if-necessary)
|
||||
(set! (-> self danger-pos quad) (-> self focus-pos quad))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(go-active-if-necessary)
|
||||
(+! (-> self total-flee-time)
|
||||
(- (-> *display* game-clock frame-counter) (-> *display* game-clock old-frame-counter))
|
||||
)
|
||||
(when (time-elapsed? (-> self last-check-player-time) (seconds 0.5))
|
||||
(set-time! (-> self last-check-player-time))
|
||||
(set! (-> self danger-pos quad) (-> self focus-pos quad))
|
||||
)
|
||||
(flee-info-method-11 (-> self flee-behavior) self)
|
||||
(cond
|
||||
((< (seconds 2) (-> self total-flee-time))
|
||||
(set! (-> self urgent-fire) #t)
|
||||
(go-hostile self)
|
||||
)
|
||||
((>= (-> self target-self-xz-dist) (* 1.2 (-> self grenade-guard-min-player-dist)))
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
((< (-> self target-self-xz-dist) 16384.0)
|
||||
(go-virtual close-attack)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(let ((a2-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((a1-0 (-> self nav state)))
|
||||
(set! (-> a2-0 quad) (-> a1-0 target-pos quad))
|
||||
)
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf1) a2-0 (meters 2) *color-red*)
|
||||
)
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info run-anim))) 60)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(flee-info-method-13 (-> self flee-behavior) self)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type reload-grenade-spawn-params
|
||||
(deftype reload-grenade-spawn-params (structure)
|
||||
((owner handle)
|
||||
(joint-index uint16)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type reload-grenade-spawn-params
|
||||
(defmethod inspect ((this reload-grenade-spawn-params))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'reload-grenade-spawn-params)
|
||||
(format #t "~1Towner: ~D~%" (-> this owner))
|
||||
(format #t "~1Tjoint-index: ~D~%" (-> this joint-index))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type reload-grenade
|
||||
(deftype reload-grenade (process-drawable)
|
||||
((owner handle)
|
||||
(joint-index uint16)
|
||||
)
|
||||
(:state-methods
|
||||
dormant
|
||||
visible
|
||||
shrinking
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(move-to-joint (_type_) quaternion)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type reload-grenade
|
||||
(defmethod inspect ((this reload-grenade))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Towner: ~D~%" (-> this owner))
|
||||
(format #t "~2Tjoint-index: ~D~%" (-> this joint-index))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function reload-grenade-init-by-other
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defbehavior reload-grenade-init-by-other reload-grenade ((arg0 reload-grenade-spawn-params))
|
||||
(ctywide-entity-hack)
|
||||
(stack-size-set! (-> self main-thread) 128)
|
||||
(set! (-> self owner) (-> arg0 owner))
|
||||
(set! (-> self joint-index) (-> arg0 joint-index))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vehicle-grenade" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set-vector! (-> self root scale) 1.4 1.4 1.4 1.0)
|
||||
(go-virtual dormant)
|
||||
0
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate dormant (reload-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('wake-up)
|
||||
(go-virtual visible)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate visible (reload-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('sleep)
|
||||
(go-virtual shrinking)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((f0-1 (fmin 1.0 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))
|
||||
(f0-2 (lerp 0.01 1.4 f0-1))
|
||||
)
|
||||
(set-vector! (-> self root scale) f0-2 f0-2 f0-2 1.0)
|
||||
)
|
||||
(move-to-joint self)
|
||||
)
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate shrinking (reload-grenade)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((f0-1 (fmin 1.0 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))
|
||||
(f0-2 (lerp 1.4 0.01 f0-1))
|
||||
)
|
||||
(set-vector! (-> self root scale) f0-2 f0-2 f0-2 1.0)
|
||||
)
|
||||
(move-to-joint self)
|
||||
(if (time-elapsed? (-> self state-time) (seconds 0.2))
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate die (reload-grenade)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:code (behavior ()
|
||||
'()
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 24 of type reload-grenade
|
||||
(defmethod move-to-joint ((this reload-grenade))
|
||||
(let ((s5-0 (the-as process-focusable (handle->process (-> this owner)))))
|
||||
(when s5-0
|
||||
(vector<-cspace! (-> this root trans) (-> s5-0 node-list data (-> this joint-index)))
|
||||
(matrix->quaternion (-> this root quat) (-> s5-0 node-list data (-> this joint-index) bone transform))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function reload-grenade-spawn
|
||||
;; WARN: Return type mismatch process vs reload-grenade.
|
||||
(defun reload-grenade-spawn ((arg0 crimson-guard) (arg1 type) (arg2 reload-grenade-spawn-params))
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(let* ((s3-0 (get-process *default-dead-pool* arg1 #x4000 1))
|
||||
(v1-1 (when s3-0
|
||||
(let ((t9-1 (method-of-type process activate)))
|
||||
(t9-1 s3-0 arg0 "grenade" (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-0 reload-grenade-init-by-other arg2)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-1
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(the-as reload-grenade gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate grenade-throw-post-reloading (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(let ((v1-0 self))
|
||||
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-0 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-7 self))
|
||||
(set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
(set! (-> self urgent-fire) #f)
|
||||
(let ((a2-0 (new 'stack-no-clear 'reload-grenade-spawn-params)))
|
||||
(set! (-> a2-0 owner) (process->handle self))
|
||||
(set! (-> a2-0 joint-index) (the-as uint 9))
|
||||
(set! (-> self reloading-ammo) (process->handle (reload-grenade-spawn self reload-grenade a2-0)))
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
(let ((a0-3 (handle->process (-> self reloading-ammo))))
|
||||
(if a0-3
|
||||
(send-event a0-3 'sleep)
|
||||
)
|
||||
)
|
||||
(set! (-> self reloading-ammo) (the-as handle #f))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (>= (* 0.5 (-> self grenade-guard-min-player-dist)) (-> self target-self-xz-dist))
|
||||
(cond
|
||||
((not (time-elapsed? (-> self state-time) (seconds 1.5)))
|
||||
(+! (-> self num-times-reloading-interrupted) 1)
|
||||
(cond
|
||||
((>= (-> self num-times-reloading-interrupted) 2)
|
||||
(set! (-> self num-times-reloading-interrupted) 0)
|
||||
(set! (-> self urgent-fire) #t)
|
||||
(go-hostile self)
|
||||
)
|
||||
(else
|
||||
(go-virtual grenade-throw-post-retreating)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self urgent-fire) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! crimson-guard-grenade-reload-ja :num! (seek! max 0.92) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((gp-0 (handle->process (-> self reloading-ammo)))
|
||||
(f0-4 (ja-frame-num 0))
|
||||
)
|
||||
(when gp-0
|
||||
(cond
|
||||
((and (>= f0-4 4.0) (< f0-4 13.0))
|
||||
(send-event gp-0 'wake-up)
|
||||
)
|
||||
((< 14.0 f0-4)
|
||||
(send-event gp-0 'sleep)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.92))
|
||||
)
|
||||
(ja-channel-push! 1 0)
|
||||
(ja-no-eval :group! crimson-guard-cock-gun-ja :num! (seek! max 0.5) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.5))
|
||||
)
|
||||
(crimson-guard-method-285 self 1)
|
||||
(go-hostile self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate grenade-throw (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-4 self))
|
||||
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(let ((v1-6 self))
|
||||
(set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-6 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-9 (-> self nav)))
|
||||
(set! (-> v1-9 target-speed) 0.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-12 (-> self nav state)))
|
||||
(set! (-> v1-12 speed) 0.0)
|
||||
)
|
||||
0
|
||||
(let ((a0-8 (-> self nav state))
|
||||
(v1-15 *null-vector*)
|
||||
)
|
||||
(set! (-> a0-8 velocity quad) (-> v1-15 quad))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
(set-time! (-> self last-fire-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! crimson-guard-grenade-attack-ja
|
||||
:num! (seek! (ja-aframe 12.0 0) 1.5)
|
||||
:frame-num (ja-aframe 1.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 12.0 0) 1.5))
|
||||
)
|
||||
(go-active-if-necessary)
|
||||
(crimson-guard-method-264 self)
|
||||
(crimson-guard-method-285 self -1)
|
||||
(set! (-> self urgent-fire) #f)
|
||||
(set! (-> self grenade-guard-min-player-dist) 81920.0)
|
||||
(ja-no-eval :group! crimson-guard-grenade-attack-ja
|
||||
:num! (seek! (ja-aframe 32.0 0))
|
||||
:frame-num (ja-aframe 22.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 32.0 0)))
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-grenade-attack-ja
|
||||
:num! (seek! (ja-aframe 37.0 0))
|
||||
:frame-num (ja-aframe 33.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 37.0 0)))
|
||||
)
|
||||
(set! (-> self total-flee-time) 0)
|
||||
(cond
|
||||
((crimson-guard-method-272 self)
|
||||
(crimson-guard-method-275 self)
|
||||
)
|
||||
((>= (-> self target-self-xz-dist) (-> self grenade-guard-min-player-dist))
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
(else
|
||||
(go-virtual grenade-throw-post-retreating)
|
||||
)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate grenade-hostile (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(crimson-guard-method-251 self)
|
||||
(let* ((f30-0 150.0)
|
||||
(v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-5 (the-as number (logior #x3f800000 v1-4)))
|
||||
)
|
||||
(set! (-> self rand-state-time) (the-as time-frame (the int (* f30-0 (+ -1.0 (the-as float v1-5))))))
|
||||
)
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(crimson-guard-method-252 self)
|
||||
(cond
|
||||
((> (-> self ammo-count) 0)
|
||||
(if (and (or (time-elapsed? (-> self state-time) (-> self rand-state-time)) (-> self urgent-fire))
|
||||
(and (logtest? (-> self flags) (citizen-flag target-in-sight)) (< (-> self target-self-xz-dist) 81920.0))
|
||||
)
|
||||
(go-virtual grenade-throw)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (or (and (time-elapsed? (-> self state-time) (seconds 1.5)) (not (-> self urgent-fire)))
|
||||
(>= (-> self target-self-xz-dist) (* 0.75 (-> self grenade-guard-min-player-dist)))
|
||||
)
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 8192.0)
|
||||
(crimson-guard-method-289 self (-> self last-quick-target-spot-angle))
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info walk-anim))) 60)
|
||||
)
|
||||
:post (behavior ()
|
||||
(crimson-guard-method-253 self)
|
||||
(crimson-guard-method-254 self)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+352
@@ -0,0 +1,352 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 255 of type crimson-guard
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod crimson-guard-method-255 ((this crimson-guard))
|
||||
(let ((s5-0 (-> this target-pos-predict-miss))
|
||||
(s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14)))
|
||||
(s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 15)))
|
||||
)
|
||||
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) s5-0 s3-0) 1.0)
|
||||
(new 'stack-no-clear 'vector)
|
||||
(spawn-guard-projectile this s3-0 s5-0 819200.0 s4-0)
|
||||
)
|
||||
(crimson-guard-method-285 this -1)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 257 of type crimson-guard
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod crimson-guard-method-257 ((this crimson-guard))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> this target-pos-predict-miss quad))
|
||||
(let* ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14)))
|
||||
(a0-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 15)))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) s5-0 a0-3))
|
||||
)
|
||||
(vector-normalize! s3-1 409600.0)
|
||||
(and (crimson-guard-method-256 this)
|
||||
(zero? (crimson-guard-method-258 this s4-0 (vector+! (new 'stack-no-clear 'vector) s4-0 s3-1) s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate gun-shoot (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(if (zero? (-> self ammo-count))
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(set! (-> self other-side) (if (< (rand-vu) 0.5)
|
||||
#t
|
||||
#f
|
||||
)
|
||||
)
|
||||
(nav-enemy-method-177 self)
|
||||
(let ((v1-11 self))
|
||||
(set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-11 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-14 self))
|
||||
(set! (-> v1-14 enemy-flags) (the-as enemy-flag (logclear (-> v1-14 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(let ((v1-17 (-> self nav state)))
|
||||
(set! (-> v1-17 speed) 0.0)
|
||||
)
|
||||
0
|
||||
(let ((a0-9 (-> self nav state))
|
||||
(v1-20 *null-vector*)
|
||||
)
|
||||
(set! (-> a0-9 velocity quad) (-> v1-20 quad))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
(set-time! (-> self last-time-see-target))
|
||||
(set! (-> self miss-amount) (lerp-scale 0.0 16384.0 (-> self target-self-dist) 40960.0 122880.0))
|
||||
(set! (-> self miss-amount) 16384.0)
|
||||
(let ((v1-30 (handle->process (-> self focus handle))))
|
||||
(if (and v1-30 (logtest? (process-mask enemy) (-> v1-30 mask)))
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
)
|
||||
)
|
||||
(set-time! (-> self next-shot))
|
||||
(set! (-> self joint-enable) #t)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self joint-enable) #f)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(go-active-if-necessary)
|
||||
(let ((gp-0 (the-as process-focusable (handle->process (-> self focus handle)))))
|
||||
(when gp-0
|
||||
(when (not (and gp-0 (not (logtest? (-> gp-0 focus-status) (focus-status disable dead ignore grabbed)))))
|
||||
(set! (-> self miss-amount) (lerp-scale 0.0 16384.0 (-> self target-self-dist) 40960.0 122880.0))
|
||||
(set! (-> self miss-amount) 16384.0)
|
||||
)
|
||||
(if (and (< (-> self target-self-xz-dist) 16384.0)
|
||||
(and (< (fabs (-> self target-y-angle)) 7281.778)
|
||||
gp-0
|
||||
(not (logtest? (-> gp-0 focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
(go-virtual close-attack)
|
||||
)
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(or (not (logtest? (-> self flags) (citizen-flag target-in-sight)))
|
||||
(< 184320.0 (-> self target-self-xz-dist))
|
||||
(< 10922.667 (fabs (-> self target-y-angle)))
|
||||
)
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-33 object))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(let ((f30-0 (rnd-float-range self 0.9 1.1)))
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self anim-shoot 0 anim-index))
|
||||
:num! (seek! max f30-0)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
(label cfg-3)
|
||||
(when (crimson-guard-method-257 self)
|
||||
(set! v1-33 #t)
|
||||
(goto cfg-10)
|
||||
)
|
||||
(when (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(set! v1-33 #f)
|
||||
(goto cfg-10)
|
||||
)
|
||||
(suspend)
|
||||
(b! (not #f) cfg-3 :delay (set! v1-33 #f))
|
||||
(label cfg-10)
|
||||
(when v1-33
|
||||
(set-time! (-> self state-time))
|
||||
(let ((gp-1 (min 3 (the-as int (+ (logand (rand-uint31-gen *random-generator*) 3) 1)))))
|
||||
(until #f
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self anim-shoot 1 anim-index)) :num! min)
|
||||
(set! (-> self already-shot) #t)
|
||||
(lerp-scale 1.0 0.2 (-> self target-self-dist) 20480.0 122880.0)
|
||||
(let ((f0-8 1.0))
|
||||
(cond
|
||||
((logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
(let ((v1-58 (handle->process (-> self focus handle))))
|
||||
(when v1-58
|
||||
(if (or (< (-> self target-vel) 40.96)
|
||||
(and (focus-test? (the-as process-focusable v1-58) pilot) (< (-> self target-pos y) 49152.0))
|
||||
)
|
||||
(set! (-> self miss-amount) (- (-> self miss-amount) (* 12288.0 f0-8)))
|
||||
(set! (-> self miss-amount) (- (-> self miss-amount) (* 4096.0 f0-8)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self miss-amount) (- (-> self miss-amount) (* 3276.8 f0-8)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< (-> self miss-amount) 0.0)
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
)
|
||||
(crimson-guard-method-255 self)
|
||||
(set-time! (-> self last-fire-time))
|
||||
(until (ja-done? 0)
|
||||
(ja :num! (seek!))
|
||||
(suspend)
|
||||
)
|
||||
(if (zero? (-> self ammo-count))
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
(+! gp-1 -1)
|
||||
(if (or (< gp-1 0)
|
||||
(not (and (handle->process (-> self focus handle))
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(goto cfg-59)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(label cfg-59)
|
||||
(let ((f30-1 (rnd-float-range self 0.9 1.1)))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self anim-shoot 2 anim-index))
|
||||
:num! (seek! max f30-1)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-1))
|
||||
)
|
||||
)
|
||||
(crimson-guard-method-268 self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(citizen-method-213 self)
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate rifle-reload (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(let ((v1-0 self))
|
||||
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-0 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-7 self))
|
||||
(set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(until #f
|
||||
(let ((gp-0 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-0 frame-group) (the-as art-joint-anim crimson-guard-grenade-reload-ja))
|
||||
(set! (-> gp-0 param 0)
|
||||
(the float (+ (-> (the-as art-joint-anim crimson-guard-grenade-reload-ja) frames num-frames) -1))
|
||||
)
|
||||
(let* ((f30-0 1.1)
|
||||
(f28-0 0.39999998)
|
||||
(v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-15 (the-as number (logior #x3f800000 v1-14)))
|
||||
)
|
||||
(set! (-> gp-0 param 1) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-15)))))
|
||||
)
|
||||
(set! (-> gp-0 frame-num) 0.0)
|
||||
(joint-control-channel-group! gp-0 (the-as art-joint-anim crimson-guard-grenade-reload-ja) num-func-seek!)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(let ((gp-1 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1)))
|
||||
(let* ((f30-1 1.1)
|
||||
(f28-1 0.39999998)
|
||||
(v1-29 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-30 (the-as number (logior #x3f800000 v1-29)))
|
||||
)
|
||||
(set! (-> gp-1 param 1) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-30)))))
|
||||
)
|
||||
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(crimson-guard-method-285 self 3)
|
||||
(set! (-> self last-fire-time) 0)
|
||||
(let ((v1-36 #f))
|
||||
(let ((a0-13 (handle->process (-> self focus handle))))
|
||||
(if (and a0-13 (focus-test? (the-as process-focusable a0-13) ignore))
|
||||
(set! v1-36 #t)
|
||||
)
|
||||
)
|
||||
(when (and (not v1-36) (or (>= 40960.0 (-> self target-self-xz-dist))
|
||||
(= (-> self ammo-count) (crimson-guard-method-286 self))
|
||||
(time-elapsed? (-> self last-fire-time) (-> self rand-state-time))
|
||||
)
|
||||
)
|
||||
0
|
||||
(goto cfg-26)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
(label cfg-26)
|
||||
(ja-channel-push! 1 0)
|
||||
(ja-no-eval :group! crimson-guard-cock-gun-ja :num! (seek! max 0.5) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.5))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(enemy-common-post self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate rifle-hostile (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(crimson-guard-method-251 self)
|
||||
(set! (-> self rand-state-time) (the-as time-frame (the int (* 300.0 (rnd-float-range self 2.5 4.5)))))
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(crimson-guard-method-252 self)
|
||||
(let ((v1-4 (handle->process (-> self focus handle))))
|
||||
(if (or (not v1-4)
|
||||
(not (and v1-4
|
||||
(not (logtest? (-> (the-as process-focusable v1-4) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
)
|
||||
(when (and (< (-> self target-self-xz-dist) 163840.0)
|
||||
(or (< 40960.0 (-> self target-self-xz-dist)) (>= 2 (the-as int (-> self focus aware))))
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (citizen-flag target-in-sight))
|
||||
(< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 20480.0)
|
||||
)
|
||||
(if (or (time-elapsed? (-> self last-fire-time) (-> self rand-state-time)) (= (-> self faction-mode) 1))
|
||||
(go-virtual gun-shoot)
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 8192.0)
|
||||
(crimson-guard-method-289 self (-> self last-quick-target-spot-angle))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info walk-anim))) 60)
|
||||
)
|
||||
:post (behavior ()
|
||||
(crimson-guard-method-253 self)
|
||||
(crimson-guard-method-254 self)
|
||||
)
|
||||
)
|
||||
+1202
File diff suppressed because it is too large
Load Diff
+649
@@ -0,0 +1,649 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function spread-lightning-lazer
|
||||
;; INFO: Used lq/sq
|
||||
(defun spread-lightning-lazer ((arg0 lightning-control) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(local-vars (sv-640 int) (sv-656 vector))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> arg1 quad))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> arg2 quad))
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(vector-length arg2)
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-0 quad) (-> arg3 quad))
|
||||
(let ((s0-0 (new 'stack-no-clear 'collide-query)))
|
||||
(set! sv-640 0)
|
||||
(while (< sv-640 6)
|
||||
(let ((v1-6 s0-0))
|
||||
(set! (-> v1-6 radius) 2867.2)
|
||||
(set! (-> v1-6 collide-with)
|
||||
(collide-spec jak bot civilian enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(set! (-> v1-6 ignore-process0) #f)
|
||||
(set! (-> v1-6 ignore-process1) #f)
|
||||
(set! (-> v1-6 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-6 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s0-0 start-pos quad) (-> s5-0 quad))
|
||||
(set! (-> s0-0 move-dist quad) (-> s4-0 quad))
|
||||
(set-from-point-offset-pad! (-> s0-0 bbox) (-> s0-0 start-pos) (-> s0-0 move-dist) (-> s0-0 radius))
|
||||
(fill-using-bounding-box *collide-cache* s0-0)
|
||||
(set! (-> s0-0 radius) 409.6)
|
||||
(let ((f0-4 (probe-using-line-sphere *collide-cache* s0-0)))
|
||||
(cond
|
||||
((>= f0-4 0.0)
|
||||
(let ((a1-4 s3-0))
|
||||
(let ((v1-13 (-> s0-0 start-pos)))
|
||||
(let ((a0-12 (-> s0-0 move-dist)))
|
||||
(let ((a2-2 f0-4))
|
||||
(.mov vf7 a2-2)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-12 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-13 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-4 quad) vf6)
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
)
|
||||
(else
|
||||
(vector+! (-> s0-0 start-pos) s5-0 s4-0)
|
||||
(let ((a1-7 (-> s0-0 start-pos)))
|
||||
(let ((v1-16 (-> s0-0 start-pos)))
|
||||
(let ((a0-16 s1-0))
|
||||
(let ((a2-4 -2048.0))
|
||||
(.mov vf7 a2-4)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-16 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-16 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-7 quad) vf6)
|
||||
)
|
||||
(vector-negate! (-> s0-0 move-dist) s4-0)
|
||||
(set! f0-4 (probe-using-line-sphere *collide-cache* s0-0))
|
||||
(when (>= f0-4 0.0)
|
||||
(let ((a1-10 s3-0))
|
||||
(let ((v1-19 (-> s0-0 start-pos)))
|
||||
(let ((a0-19 (-> s0-0 move-dist)))
|
||||
(let ((a2-5 f0-4))
|
||||
(.mov vf7 a2-5)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-19 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-19 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-10 quad) vf6)
|
||||
)
|
||||
(let ((a1-11 s3-0))
|
||||
(let ((v1-20 s3-0))
|
||||
(let ((a0-20 s1-0))
|
||||
(let ((a2-7 2048.0))
|
||||
(.mov vf7 a2-7)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-20 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-20 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-11 quad) vf6)
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((>= f0-4 0.0)
|
||||
(+! (-> s3-0 x) (rand-vu-float-range -819.2 819.2))
|
||||
(+! (-> s3-0 y) (rand-vu-float-range -819.2 819.2))
|
||||
(+! (-> s3-0 z) (rand-vu-float-range -819.2 819.2))
|
||||
(set-point! arg0 (-> arg0 state points-to-draw) s3-0)
|
||||
(+! (-> arg0 state points-to-draw) 1)
|
||||
(set! sv-656 (-> s0-0 best-other-tri normal))
|
||||
(quaternion-from-two-vectors! s2-0 s1-0 sv-656)
|
||||
(vector-orient-by-quat! s4-0 s4-0 s2-0)
|
||||
(set! (-> s1-0 quad) (-> sv-656 quad))
|
||||
(vector-flatten! s4-0 s4-0 sv-656)
|
||||
)
|
||||
(else
|
||||
(vector+! s5-0 s5-0 s4-0)
|
||||
(when (< sv-640 6)
|
||||
(set-point! arg0 (-> arg0 state points-to-draw) s5-0)
|
||||
(+! (-> arg0 state points-to-draw) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-640 (+ sv-640 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 263 of type crimson-guard
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod crimson-guard-method-263 ((this crimson-guard))
|
||||
(local-vars (sv-832 vector))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14)))
|
||||
(v0-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 15)))
|
||||
(s2-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s4-0 v0-1) 16384.0))
|
||||
(s1-0
|
||||
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this target-pos-predict-miss) s4-0) 16384.0)
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(when (< 1820.4445 (vector-vector-angle-safe s2-0 s1-0))
|
||||
(let* ((a1-9 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) s2-0 s1-0) 1.0))
|
||||
(a2-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) a1-9 1820.4445))
|
||||
)
|
||||
(vector-orient-by-quat! s1-0 s2-0 a2-1)
|
||||
)
|
||||
)
|
||||
(let ((a0-12 s4-0))
|
||||
(let ((v1-8 s4-0))
|
||||
(let ((a1-12 0.2))
|
||||
(.mov vf7 a1-12)
|
||||
)
|
||||
(.lvf vf5 (&-> s2-0 quad))
|
||||
(.lvf vf4 (&-> v1-8 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a0-12 quad) vf6)
|
||||
)
|
||||
(vector+! s5-0 s4-0 s1-0)
|
||||
(let ((v1-10 s3-0))
|
||||
(set! (-> v1-10 radius) 409.6)
|
||||
(set! (-> v1-10 collide-with)
|
||||
(collide-spec jak bot civilian enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(set! (-> v1-10 ignore-process0) #f)
|
||||
(set! (-> v1-10 ignore-process1) #f)
|
||||
(set! (-> v1-10 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-10 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s3-0 start-pos quad) (-> s4-0 quad))
|
||||
(set! (-> s3-0 move-dist quad) (-> s1-0 quad))
|
||||
(set! (-> this l-control state points-to-draw) 0)
|
||||
(let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* s3-0))
|
||||
(s2-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(cond
|
||||
((>= f0-3 0.0)
|
||||
(vector-float*! s1-0 (-> s3-0 move-dist) f0-3)
|
||||
(vector+! s5-0 s4-0 s1-0)
|
||||
(point-in-plane-<-point+normal! s2-1 s5-0 (-> s3-0 best-other-tri normal))
|
||||
(vector-! s2-1 s2-1 s5-0)
|
||||
(let ((s1-1 quaternion-vector-angle!)
|
||||
(s0-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(set! sv-832 (-> s3-0 best-other-tri normal))
|
||||
(let* ((a2-3 (rand-vu-float-range 0.0 65536.0))
|
||||
(a2-4 (s1-1 s0-0 sv-832 a2-3))
|
||||
)
|
||||
(vector-orient-by-quat! s2-1 s2-1 a2-4)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(set-point! (-> this l-control) 0 s4-0)
|
||||
(set-point! (-> this l-control) 1 s5-0)
|
||||
(set! (-> this l-control spec) (-> *lightning-spec-id-table* 19))
|
||||
(+! (-> this l-control state points-to-draw) 2)
|
||||
(let* ((s1-6 (-> s3-0 best-other-tri collide-ptr))
|
||||
(v1-91 (if (type? s1-6 collide-shape-prim)
|
||||
s1-6
|
||||
)
|
||||
)
|
||||
(s1-7 #t)
|
||||
)
|
||||
(when v1-91
|
||||
(set! s1-7 #f)
|
||||
(let ((s0-1 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
||||
(set! (-> s0-1 ent) (-> this entity))
|
||||
(set! (-> s0-1 charge) 1.0)
|
||||
(set! (-> s0-1 options) (projectile-options))
|
||||
(logclear! (-> s0-1 options) (projectile-options po14 po15 po16))
|
||||
(set! (-> s0-1 notify-handle) (process->handle this))
|
||||
(set! (-> s0-1 owner-handle) (the-as handle #f))
|
||||
(set! (-> s0-1 target-handle) (the-as handle #f))
|
||||
(set! (-> s0-1 target-pos quad) (the-as uint128 0))
|
||||
(set! (-> s0-1 ignore-handle) (process->handle this))
|
||||
(set! (-> s0-1 attack-id) (-> this attack-id))
|
||||
(set! (-> s0-1 timeout) (seconds 4))
|
||||
(set! (-> s0-1 pos quad) (-> s4-0 quad))
|
||||
(vector-! (-> s0-1 vel) s5-0 s4-0)
|
||||
(vector-normalize! (-> s0-1 vel) 131072.0)
|
||||
(spawn-projectile guard-lazer-shot s0-1 this *default-dead-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(spread-lightning-lazer (-> this l-control) s5-0 s2-1 (-> s3-0 best-other-tri normal))
|
||||
)
|
||||
(else
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(set! (-> this l-control state points-to-draw) 9)
|
||||
(set! (-> this l-control spec) (-> *lightning-spec-id-table* 20))
|
||||
(let ((v1-176 s4-0))
|
||||
(set! (-> this l-control state meet data 0 quad) (-> v1-176 quad))
|
||||
)
|
||||
(let ((a0-97 (-> this l-control))
|
||||
(v1-178 s5-0)
|
||||
)
|
||||
(set! (-> a0-97 state meet data (+ (-> a0-97 state points-to-draw) -1) quad) (-> v1-178 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate attack (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(set! (-> self joint-enable) #t)
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-5 self))
|
||||
(set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-5 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-8 self))
|
||||
(set! (-> v1-8 enemy-flags) (the-as enemy-flag (logclear (-> v1-8 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
(set-time! (-> self state-time))
|
||||
(set! (-> self lazer-sound) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self lazer-sound))
|
||||
(sound-stop (-> self lazer-sound))
|
||||
)
|
||||
(iterate-prims
|
||||
(-> self root)
|
||||
(lambda ((arg0 collide-shape-prim)) (logclear! (-> arg0 prim-core action) (collide-action deadly)) (none))
|
||||
)
|
||||
(let ((v1-5 (-> self l-control))
|
||||
(a0-2 0)
|
||||
)
|
||||
(let ((a1-2 (!= a0-2 (-> v1-5 state mode))))
|
||||
(case a0-2
|
||||
((3)
|
||||
(if a1-2
|
||||
(set! (-> v1-5 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-5 state start-color) (-> v1-5 spec start-color))
|
||||
(set! (-> v1-5 state end-color) (-> v1-5 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-5 state mode) (the-as uint a0-2))
|
||||
)
|
||||
(set! (-> self joint-enable) #f)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(or (< 32768.0 (-> self target-self-xz-dist)) (not (logtest? (-> self flags) (citizen-flag target-in-sight))))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
(let ((v1-12 (handle->process (-> self focus handle))))
|
||||
(if (and v1-12 (or (focus-test? (the-as process-focusable v1-12) inactive)
|
||||
(focus-test? (the-as process-focusable v1-12) disable)
|
||||
)
|
||||
)
|
||||
(set! v1-12 (the-as process #f))
|
||||
)
|
||||
(cond
|
||||
((not v1-12)
|
||||
(go-virtual active)
|
||||
)
|
||||
((and (and (handle->process (-> self focus handle))
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
(< (fabs (-> self target-y-angle)) 8192.0)
|
||||
)
|
||||
(if (< (-> self target-self-xz-dist) 16384.0)
|
||||
(go-virtual close-attack)
|
||||
(go-virtual attack-tazer)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self next-shot) (+ (current-time) (seconds 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-37 symbol))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! crimson-guard-idle-to-stab-idle-ja :num! (seek! (ja-aframe 7.0 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 7.0 0)))
|
||||
)
|
||||
(until #f
|
||||
(while (or (< 7281.778 (fabs (-> self target-y-angle))) (>= (-> self next-shot) (current-time)))
|
||||
(when (not (orient-towards-code (the-as degrees #x45e38e39)))
|
||||
(let ((v1-17 (ja-group)))
|
||||
(if (not (and v1-17 (= v1-17 crimson-guard-stab-idle-loop-ja)))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
)
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-stab-idle-loop-ja :num! (loop!))
|
||||
(until v1-37
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
(set! v1-37
|
||||
(or (< (current-time) (-> self next-shot))
|
||||
(< (-> self target-self-xz-dist) 16384.0)
|
||||
(not (and (handle->process (-> self focus handle))
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= (fabs (-> self target-y-angle)) 7281.778)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (-> self target-self-xz-dist) 16384.0)
|
||||
(set! (-> self next-shot) 0)
|
||||
0
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post (behavior ()
|
||||
(citizen-method-213 self)
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate attack-tazer (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(set! (-> self joint-enable) #t)
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-5 self))
|
||||
(set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-5 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-8 self))
|
||||
(set! (-> v1-8 enemy-flags) (the-as enemy-flag (logclear (-> v1-8 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
(set-time! (-> self state-time))
|
||||
(set! (-> self lazer-sound) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self lazer-sound))
|
||||
(sound-stop (-> self lazer-sound))
|
||||
)
|
||||
(iterate-prims
|
||||
(-> self root)
|
||||
(lambda ((arg0 collide-shape-prim)) (logclear! (-> arg0 prim-core action) (collide-action deadly)) (none))
|
||||
)
|
||||
(let ((v1-5 (-> self l-control))
|
||||
(a0-2 0)
|
||||
)
|
||||
(let ((a1-2 (!= a0-2 (-> v1-5 state mode))))
|
||||
(case a0-2
|
||||
((3)
|
||||
(if a1-2
|
||||
(set! (-> v1-5 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-5 state start-color) (-> v1-5 spec start-color))
|
||||
(set! (-> v1-5 state end-color) (-> v1-5 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-5 state mode) (the-as uint a0-2))
|
||||
)
|
||||
(set! (-> self joint-enable) #f)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(or (< 32768.0 (-> self target-self-xz-dist)) (not (logtest? (-> self flags) (citizen-flag target-in-sight))))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
(let ((v1-12 (handle->process (-> self focus handle))))
|
||||
(if (and v1-12 (or (focus-test? (the-as process-focusable v1-12) inactive)
|
||||
(focus-test? (the-as process-focusable v1-12) disable)
|
||||
)
|
||||
)
|
||||
(set! v1-12 (the-as process #f))
|
||||
)
|
||||
(if (not v1-12)
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja-no-eval :group! crimson-guard-stab-idle-to-attack-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(crimson-guard-method-262 self)
|
||||
(set! (-> self next-shot) (+ (current-time) (seconds 0.1)))
|
||||
(let ((v1-32 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 2)))
|
||||
(logior! (-> v1-32 prim-core action) (collide-action deadly))
|
||||
)
|
||||
(let* ((v1-33 *game-info*)
|
||||
(a0-8 (+ (-> v1-33 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-33 attack-id) a0-8)
|
||||
(set! (-> self attack-id) a0-8)
|
||||
)
|
||||
(set! (-> self lazer-sound) (sound-play "guard-zap"))
|
||||
(let ((v1-35 (-> self l-control))
|
||||
(a0-11 1)
|
||||
)
|
||||
(let ((a1-5 (!= a0-11 (-> v1-35 state mode))))
|
||||
(case a0-11
|
||||
((3)
|
||||
(if a1-5
|
||||
(set! (-> v1-35 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-35 state start-color) (-> v1-35 spec start-color))
|
||||
(set! (-> v1-35 state end-color) (-> v1-35 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-35 state mode) (the-as uint a0-11))
|
||||
)
|
||||
(let ((gp-1 (current-time))
|
||||
(s5-1 150)
|
||||
(f30-0 1.0)
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-stab-attack-ja :num! (loop! f30-0) :frame-num 0.0)
|
||||
(until (time-elapsed? gp-1 s5-1)
|
||||
(crimson-guard-method-263 self)
|
||||
(suspend)
|
||||
(ja :num! (loop! f30-0))
|
||||
)
|
||||
)
|
||||
(let ((v1-58 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 2)))
|
||||
(logclear! (-> v1-58 prim-core action) (collide-action deadly))
|
||||
)
|
||||
(let ((v1-59 (-> self l-control))
|
||||
(a0-17 3)
|
||||
)
|
||||
(let ((a1-18 (!= a0-17 (-> v1-59 state mode))))
|
||||
(case a0-17
|
||||
((3)
|
||||
(if a1-18
|
||||
(set! (-> v1-59 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-59 state start-color) (-> v1-59 spec start-color))
|
||||
(set! (-> v1-59 state end-color) (-> v1-59 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-59 state mode) (the-as uint a0-17))
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-stab-attack-to-stab-idle-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(citizen-method-213 self)
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate tazer-hostile (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(crimson-guard-method-251 self)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(crimson-guard-method-252 self)
|
||||
(if (or (< (-> self target-self-xz-dist) 32768.0) (>= 2 (the-as int (-> self focus aware))))
|
||||
(go-virtual attack)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 8192.0)
|
||||
(crimson-guard-method-289 self (-> self last-quick-target-spot-angle))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info walk-anim))) 60)
|
||||
)
|
||||
:post (behavior ()
|
||||
(crimson-guard-method-253 self)
|
||||
(crimson-guard-method-254 self)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+397
@@ -0,0 +1,397 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *default-kg-squad-member-settings*, type (inline-array kg-squad-member-settings)
|
||||
(define *default-kg-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 4
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-a)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-b)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type flying-turret)
|
||||
:max-target-count #x7f
|
||||
:target-count 1
|
||||
:enemy-type (traffic-type metalhead-grunt)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type spydroid)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
:enemy-type (traffic-type metalhead-flitter)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *alert-kg-squad-member-settings*, type (inline-array kg-squad-member-settings)
|
||||
(define *alert-kg-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 4
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:target-count 3
|
||||
:enemy-type (traffic-type guard-a)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-b)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type flying-turret)
|
||||
:max-target-count #x7f
|
||||
:target-count 3
|
||||
:enemy-type (traffic-type metalhead-grunt)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type spydroid)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
:enemy-type (traffic-type metalhead-flitter)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *war-kg-squad-member-settings*, type (inline-array kg-squad-member-settings)
|
||||
(define *war-kg-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 4
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
:enemy-type (traffic-type guard-a)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-b)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type flying-turret)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
:enemy-type (traffic-type metalhead-grunt)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type spydroid)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
:enemy-type (traffic-type metalhead-flitter)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 50 of type kg-squad-control
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defmethod copy-squad-settings-to-idx ((this kg-squad-control) (arg0 (inline-array kg-squad-member-settings)) (arg1 int))
|
||||
(mem-copy! (the-as pointer (-> this squad-settings arg1)) (the-as pointer arg0) 64)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type kg-squad-control
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init-alert ((this kg-squad-control))
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 0)
|
||||
(copy-squad-settings-to-idx this *war-kg-squad-member-settings* 1)
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 2)
|
||||
(set! (-> this alert-level) 0)
|
||||
(call-parent-method this)
|
||||
(kg-squad-control-method-51 this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type kg-squad-control
|
||||
(defmethod squad-control-method-10 ((this kg-squad-control))
|
||||
(set! (-> this active-squad-member-list length) 0)
|
||||
(set! (-> this guard-to-traffic-mapping 6) (traffic-type roboguard))
|
||||
(set! (-> this guard-to-traffic-mapping 7) (traffic-type roboguard))
|
||||
(set! (-> this guard-to-traffic-mapping 8) (traffic-type flying-turret))
|
||||
(set! (-> this guard-to-traffic-mapping 9) (traffic-type spydroid))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg6))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg7))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg8))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg9))
|
||||
(set! (-> this guard-to-squad-setting-mapping 6) (the-as uint 0))
|
||||
(set! (-> this guard-to-squad-setting-mapping 7) (the-as uint 1))
|
||||
(set! (-> this guard-to-squad-setting-mapping 8) (the-as uint 2))
|
||||
(set! (-> this guard-to-squad-setting-mapping 9) (the-as uint 3))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type kg-squad-control
|
||||
;; WARN: Return type mismatch handle-array vs none.
|
||||
(defmethod initialize ((this kg-squad-control) (arg0 process))
|
||||
(set! (-> this active-squad-member-list) (new 'loading-level 'handle-array 126))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 47 of type kg-squad-control
|
||||
(defmethod add-squad-member ((this kg-squad-control) (arg0 process))
|
||||
(push-back (-> this active-squad-member-list) (process->handle arg0))
|
||||
)
|
||||
|
||||
;; definition for method 48 of type kg-squad-control
|
||||
(defmethod pop-squad-member-from-list ((this kg-squad-control) (arg0 process))
|
||||
(let ((v1-2 (process->handle arg0)))
|
||||
(dotimes (a1-4 (-> this active-squad-member-list length))
|
||||
(when (= (-> this active-squad-member-list data0 a1-4) v1-2)
|
||||
(pop-front (-> this active-squad-member-list) a1-4)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
|
||||
;; definition for method 52 of type kg-squad-control
|
||||
(defmethod kg-squad-control-method-52 ((this kg-squad-control) (arg0 process) (arg1 process))
|
||||
(let ((v1-2 (process->handle arg1))
|
||||
(v0-0 0)
|
||||
)
|
||||
(dotimes (a2-4 (-> this active-squad-member-list length))
|
||||
(let ((a3-3 (the-as kg-squad-member (handle->process (-> this active-squad-member-list data0 a2-4)))))
|
||||
(if (and a3-3 (!= a3-3 arg0) (= (-> a3-3 current-enemy) v1-2))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 51 of type kg-squad-control
|
||||
(defmethod kg-squad-control-method-51 ((this kg-squad-control))
|
||||
(local-vars (a1-8 symbol))
|
||||
(dotimes (v1-0 3)
|
||||
(dotimes (a1-0 10)
|
||||
(when (logtest? (-> this used-guard-types) (ash 1 a1-0))
|
||||
(set! (-> this
|
||||
traffic
|
||||
object-type-info-array
|
||||
0
|
||||
target-counts
|
||||
(+ v1-0 (* (-> this guard-to-traffic-mapping a1-0) 32))
|
||||
)
|
||||
0
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-3 3)
|
||||
(dotimes (a1-3 4)
|
||||
(let ((a2-12 (the-as kg-squad-settings (+ (+ (* a1-3 16) 860 (* v1-3 64)) (the-as int this)))))
|
||||
(+! (-> this
|
||||
traffic
|
||||
object-type-info-array
|
||||
0
|
||||
target-counts
|
||||
(+ v1-3 (* (-> a2-12 roboguard-settings object-type) 32))
|
||||
)
|
||||
(max
|
||||
(min (-> a2-12 roboguard-settings target-count) (-> a2-12 roboguard-settings max-target-count))
|
||||
(-> a2-12 roboguard-settings min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-6 3)
|
||||
(let ((a1-6 (new 'static 'boxed-array :type int8 :length 0 :allocated-length 10))
|
||||
(a2-17 (new 'static 'boxed-array :type int8 :length 0 :allocated-length 10))
|
||||
)
|
||||
(dotimes (a3-10 10)
|
||||
(set! (-> a1-6 a3-10) 0)
|
||||
(set! (-> a2-17 a3-10) 0)
|
||||
)
|
||||
(dotimes (a3-13 4)
|
||||
(let ((t0-13 (the-as kg-squad-settings (+ (+ (* a3-13 16) 860 (* v1-6 64)) (the-as int this)))))
|
||||
(set! (-> a2-17 (-> t0-13 roboguard-settings enemy-type))
|
||||
(max
|
||||
(min (-> t0-13 roboguard-settings target-count) (-> t0-13 roboguard-settings max-target-count))
|
||||
(-> t0-13 roboguard-settings min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (a3-16 (-> this active-squad-member-list length))
|
||||
(let ((t0-19 (the-as kg-squad-member (handle->process (-> this active-squad-member-list data0 a3-16)))))
|
||||
(when t0-19
|
||||
(if (= (-> t0-19 faction-mode) v1-6)
|
||||
(+! (-> a1-6 (-> t0-19 kg-type)) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (a3-19 10)
|
||||
(when (< (-> a1-6 a3-19) (-> a2-17 a3-19))
|
||||
(dotimes (t0-28 10)
|
||||
(when (< (-> a2-17 t0-28) (-> a1-6 t0-28))
|
||||
(set! (-> this enemy-type-seek-from) (the-as uint t0-28))
|
||||
(set! (-> this enemy-type-seek-to) (the-as uint a3-19))
|
||||
(set! a1-8 #t)
|
||||
(goto cfg-47)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! a1-8 #f)
|
||||
(label cfg-47)
|
||||
(when (not a1-8)
|
||||
(set! (-> this enemy-type-seek-from-list v1-6) (the-as uint 11))
|
||||
(set! (-> this enemy-type-seek-to-list v1-6) (the-as uint 11))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 13 of type kg-squad-control
|
||||
(defmethod update ((this kg-squad-control))
|
||||
(cond
|
||||
((-> *setting-control* user-current kg-enemy-settings)
|
||||
(set! (-> this city-mode) (squad-city-mode two))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array kg-squad-member-settings) (-> *setting-control* user-current kg-enemy-settings))
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this city-mode) (squad-city-mode zero))
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 0)
|
||||
)
|
||||
)
|
||||
(kg-squad-control-method-51 this)
|
||||
(kg-squad-control-method-53 this)
|
||||
(when *cty-faction-manager*
|
||||
(let ((a2-2 (cond
|
||||
((-> *setting-control* user-current kg-enemy-settings)
|
||||
7
|
||||
)
|
||||
((> (-> this alert-level) 0)
|
||||
7
|
||||
)
|
||||
(else
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(faction-spawn *cty-faction-manager* 0 a2-2 #f (if (-> *setting-control* user-current kg-enemy-settings)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 45 of type kg-squad-control
|
||||
(defmethod increment-alert-level ((this kg-squad-control) (arg0 int))
|
||||
(let ((v0-0 (+ (-> this alert-level) arg0)))
|
||||
(set! (-> this alert-level) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 46 of type kg-squad-control
|
||||
(defmethod set-alert-level1 ((this kg-squad-control) (arg0 int))
|
||||
(set! (-> this alert-level) arg0)
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for method 53 of type kg-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod kg-squad-control-method-53 ((this kg-squad-control))
|
||||
(cond
|
||||
((> (-> this alert-level) 0)
|
||||
(if (not (-> *setting-control* user-current kg-enemy-settings))
|
||||
(copy-squad-settings-to-idx this *alert-kg-squad-member-settings* 0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 49 of type kg-squad-control
|
||||
(defmethod get-alert-level1 ((this kg-squad-control))
|
||||
(-> this alert-level)
|
||||
)
|
||||
|
||||
;; definition for method 38 of type kg-squad-control
|
||||
(defmethod squad-control-city-method-38 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(kg-squad-member-method-219 (the-as kg-squad-member arg0) arg1)
|
||||
)
|
||||
|
||||
;; definition for method 40 of type kg-squad-control
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod squad-control-city-method-40 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(if (not (logtest? (process-mask kg-robot) (-> arg1 mask)))
|
||||
(set! (-> this current-target-attackers) (kg-squad-control-method-52 this arg0 arg1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 41 of type kg-squad-control
|
||||
(defmethod squad-control-city-method-41 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(not (logtest? (process-mask kg-robot) (-> arg1 mask)))
|
||||
)
|
||||
|
||||
;; definition for method 42 of type kg-squad-control
|
||||
(defmethod squad-control-city-method-42 ((this kg-squad-control))
|
||||
(if (< 4 (-> this current-target-attackers))
|
||||
100000.0
|
||||
(+ 1.0 (the float (-> this current-target-attackers)))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 43 of type kg-squad-control
|
||||
(defmethod squad-control-city-method-43 ((this kg-squad-control) (arg0 process-focusable))
|
||||
(let ((v1-0 arg0))
|
||||
(time-elapsed?
|
||||
(-> (the-as kg-squad-member v1-0) last-choose-new-enemy-time)
|
||||
(-> (the-as kg-squad-member v1-0) choose-new-enemy-delay-time)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 39 of type kg-squad-control
|
||||
(defmethod squad-control-city-method-39 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(kg-squad-member-method-216 (the-as kg-squad-member arg0) arg1)
|
||||
)
|
||||
|
||||
;; definition for function set-kg-primary-target
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-kg-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *kg-squad-control*
|
||||
(let* ((s5-0 *kg-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 54 of type kg-squad-control
|
||||
(defmethod kg-squad-control-method-54 ((this kg-squad-control))
|
||||
(-> *setting-control* user-current kg-difficulty)
|
||||
)
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type hatred-instance-info
|
||||
(deftype hatred-instance-info (structure)
|
||||
((hated-target handle)
|
||||
(hatred-value float)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
;; definition for method 3 of type hatred-instance-info
|
||||
(defmethod inspect ((this hatred-instance-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'hatred-instance-info)
|
||||
(format #t "~1Thated-target: ~D~%" (-> this hated-target))
|
||||
(format #t "~1Thatred-value: ~f~%" (-> this hatred-value))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type kg-squad-member
|
||||
(deftype kg-squad-member (citizen)
|
||||
((squad kg-squad-control :override)
|
||||
(hatred-memory hatred-instance-info 3 :inline)
|
||||
(last-choose-new-enemy-time time-frame)
|
||||
(current-enemy handle)
|
||||
(kg-type uint8)
|
||||
(choose-new-enemy-delay-time time-frame)
|
||||
(next-update-target-time time-frame)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:methods
|
||||
(kg-squad-member-method-216 (_type_ process) float)
|
||||
(enemy->hatred-val (_type_ process) float)
|
||||
(get-hatred-val-for-target (_type_ handle) float)
|
||||
(kg-squad-member-method-219 (_type_ process-focusable) symbol)
|
||||
(kg-squad-member-method-220 (_type_) symbol)
|
||||
(get-current-enemy (_type_) process)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type kg-squad-member
|
||||
(defmethod inspect ((this kg-squad-member))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type citizen inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Thatred-memory[3] @ #x~X~%" (-> this hatred-memory))
|
||||
(format #t "~2Tlast-choose-new-enemy-time: ~D~%" (-> this last-choose-new-enemy-time))
|
||||
(format #t "~2Tcurrent-enemy: ~D~%" (-> this current-enemy))
|
||||
(format #t "~2Tkg-type: ~D~%" (-> this kg-type))
|
||||
(format #t "~2Tchoose-new-enemy-delay-time: ~D~%" (-> this choose-new-enemy-delay-time))
|
||||
(format #t "~2Tnext-update-target-time: ~D~%" (-> this next-update-target-time))
|
||||
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> this minimap))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 193 of type kg-squad-member
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod set-squad ((this kg-squad-member))
|
||||
(set! (-> this squad) *kg-squad-control*)
|
||||
(set! (-> this minimap) #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 194 of type kg-squad-member
|
||||
(defmethod citizen-method-194 ((this kg-squad-member))
|
||||
(dotimes (v1-0 3)
|
||||
(set! (-> this hatred-memory v1-0 hated-target) (the-as handle #f))
|
||||
(set! (-> this hatred-memory v1-0 hatred-value) 0.0)
|
||||
)
|
||||
(set! (-> this last-choose-new-enemy-time) 0)
|
||||
(set! (-> this choose-new-enemy-delay-time) (seconds 3))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
(logior! (-> this mask) (process-mask kg-robot))
|
||||
(set! (-> this next-update-target-time) 0)
|
||||
(set! (-> this faction-mode) (the-as uint 0))
|
||||
(set! (-> this fact fade-time) (seconds 10))
|
||||
(logior! (-> this fact options) (actor-option fade-out no-distance-check-fadeout))
|
||||
(if (not (-> this minimap))
|
||||
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 139) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 221 of type kg-squad-member
|
||||
;; WARN: disable def twice: 6. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod get-current-enemy ((this kg-squad-member))
|
||||
(if #t
|
||||
(handle->process (-> this attacker-info enemy))
|
||||
(squad-control-city-method-35 (-> this squad) this (-> this current-enemy))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 212 of type kg-squad-member
|
||||
(defmethod go-from-behavior ((this kg-squad-member) (arg0 traffic-object-spawn-params))
|
||||
(add-squad-member (-> this squad) this)
|
||||
(call-parent-method this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 196 of type kg-squad-member
|
||||
(defmethod go-inactive ((this kg-squad-member))
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate inactive (kg-squad-member)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(let ((t9-0 (-> (method-of-type citizen inactive) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type kg-squad-member
|
||||
(defmethod deactivate ((this kg-squad-member))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 217 of type kg-squad-member
|
||||
(defmethod enemy->hatred-val ((this kg-squad-member) (arg0 process))
|
||||
(cond
|
||||
((logtest? (process-mask guard) (-> arg0 mask))
|
||||
0.5
|
||||
)
|
||||
((logtest? (process-mask metalhead) (-> arg0 mask))
|
||||
-0.01
|
||||
)
|
||||
((= (-> arg0 type) target)
|
||||
0.3
|
||||
)
|
||||
((logtest? (process-mask civilian) (-> arg0 mask))
|
||||
0.02
|
||||
)
|
||||
((logtest? (process-mask kg-robot) (-> arg0 mask))
|
||||
-1.0
|
||||
)
|
||||
((and (logtest? (process-mask vehicle) (-> arg0 mask)) (not (logtest? (process-mask enemy) (-> arg0 mask))))
|
||||
0.01
|
||||
)
|
||||
(else
|
||||
-1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 218 of type kg-squad-member
|
||||
(defmethod get-hatred-val-for-target ((this kg-squad-member) (arg0 handle))
|
||||
(dotimes (v1-0 3)
|
||||
(if (= arg0 (-> this hatred-memory v1-0 hated-target))
|
||||
(return (-> this hatred-memory v1-0 hatred-value))
|
||||
)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
|
||||
;; definition for method 216 of type kg-squad-member
|
||||
(defmethod kg-squad-member-method-216 ((this kg-squad-member) (arg0 process))
|
||||
(let ((f30-0 (enemy->hatred-val this arg0))
|
||||
(f0-0 (get-hatred-val-for-target this (process->handle arg0)))
|
||||
)
|
||||
0.0
|
||||
(+ f0-0 f30-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 219 of type kg-squad-member
|
||||
(defmethod kg-squad-member-method-219 ((this kg-squad-member) (arg0 process-focusable))
|
||||
(let* ((s4-0 (get-trans arg0 0))
|
||||
(f0-0 (vector-vector-xz-distance-squared (-> this root trans) s4-0))
|
||||
(f1-0 409600.0)
|
||||
)
|
||||
(or (and (< f0-0 (* f1-0 f1-0)) (< (fabs (- (-> s4-0 y) (-> this root trans y))) 61440.0))
|
||||
(< 0.0 (get-hatred-val-for-target this (process->handle arg0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 59 of type kg-squad-member
|
||||
(defmethod enemy-common-post ((this kg-squad-member))
|
||||
(local-vars (s5-0 int))
|
||||
(when (focus-test? this dangerous)
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-0 options) (overlaps-others-options))
|
||||
(set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter))
|
||||
(set! (-> a1-0 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> this root) a1-0)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> this flags) (citizen-flag in-mission))
|
||||
(set! (-> this faction-mode) (the-as uint 2))
|
||||
)
|
||||
((nonzero? (-> this controller branch))
|
||||
(let ((v1-15 (get-city-mode (-> this squad))))
|
||||
0
|
||||
(cond
|
||||
((= v1-15 (squad-city-mode two))
|
||||
(set! s5-0 2)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 *cty-faction-manager*)
|
||||
(a1-2 (-> this controller branch clock-type))
|
||||
)
|
||||
(set! s5-0 (-> v1-17 territory-faction-modes 0 data (+ 1 (* a1-2 16))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> this faction-mode) s5-0)
|
||||
(if (not (send-event this 'change-faction-mode s5-0 (-> this faction-mode)))
|
||||
(set! (-> this faction-mode) (the-as uint s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 84 of type kg-squad-member
|
||||
(defmethod send-attack-on-jump-or-knocked ((this kg-squad-member) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
(#f
|
||||
((method-of-type citizen send-attack-on-jump-or-knocked) this arg0 arg1)
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-2 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask enemy guard civilian metalhead) (-> arg0 mask))
|
||||
(not (logtest? (process-mask kg-robot) (-> arg0 mask)))
|
||||
(and v1-2
|
||||
(not (logtest? (-> (the-as process-focusable v1-2) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> this persistent-attack-id)
|
||||
(-> this attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(send-event arg0 'touch (-> arg1 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 220 of type kg-squad-member
|
||||
(defmethod kg-squad-member-method-220 ((this kg-squad-member))
|
||||
(if (or (not (-> this draw)) (not (logtest? (-> this draw status) (draw-control-status on-screen))))
|
||||
(return #f)
|
||||
)
|
||||
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (math-camera-pos)))
|
||||
(f1-0 122880.0)
|
||||
)
|
||||
(if (< f0-0 (* f1-0 f1-0))
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate in-ditch (kg-squad-member)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-inactive self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate die-fast (kg-squad-member)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-inactive self)
|
||||
)
|
||||
)
|
||||
+492
@@ -0,0 +1,492 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-krimson-wall
|
||||
:id 329
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:parts ((sp-item 1419 :flags (is-3d sp7) :period (seconds 2) :length (seconds 0.035))
|
||||
(sp-item 1420 :fade-after (meters 40) :flags (is-3d sp7))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1419
|
||||
:init-specs ((:texture (lasersmoke-00 level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 11))
|
||||
(:scale-x (meters 18))
|
||||
(:rot-x (degrees 0) 1 (degrees 180))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 54))
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 16.0)
|
||||
(:timer (seconds 2))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32
|
||||
20
|
||||
1
|
||||
0
|
||||
#x401b00
|
||||
#x401c00
|
||||
#x401d00
|
||||
#x401e00
|
||||
#x401f00
|
||||
#x402000
|
||||
#x402100
|
||||
#x402200
|
||||
#x402300
|
||||
#x402400
|
||||
#x402500
|
||||
#x402600
|
||||
#x402700
|
||||
#x402800
|
||||
#x402900
|
||||
#x402a00
|
||||
#x402b00
|
||||
#x402c00
|
||||
#x402d00
|
||||
#x402e00
|
||||
#x402f00
|
||||
#x403000
|
||||
#x403100
|
||||
#x403200
|
||||
#x403300
|
||||
#x403400
|
||||
#x403500
|
||||
#x403600
|
||||
#x403700
|
||||
#x403800
|
||||
)
|
||||
)
|
||||
(:func 'sparticle-texture-animate)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 1420
|
||||
:init-specs ((:texture (static1 level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 11))
|
||||
(:scale-x (meters 18))
|
||||
(:rot-x (degrees 0) 1 (degrees 180))
|
||||
(:rot-z (degrees 90) 1 (degrees 180))
|
||||
(:scale-y (meters 180))
|
||||
(:r 255.0)
|
||||
(:g 10.0)
|
||||
(:b 10.0)
|
||||
(:a 4.0 16.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-krimson-wall-break krimson-wall-break krimson-wall-break-lod0-jg krimson-wall-break-idle-ja
|
||||
((krimson-wall-break-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem -40 0 0 400)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
;; definition of type krimson-wall-break
|
||||
(deftype krimson-wall-break (process-drawable)
|
||||
((art-name string)
|
||||
(anim spool-anim)
|
||||
(pillar (pointer manipy) 2)
|
||||
(level-name symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
explode
|
||||
done
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type krimson-wall-break
|
||||
(defmethod inspect ((this krimson-wall-break))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tart-name: ~A~%" (-> this art-name))
|
||||
(format #t "~2Tanim: ~A~%" (-> this anim))
|
||||
(format #t "~2Tpillar[2] @ #x~X~%" (-> this pillar))
|
||||
(format #t "~2Tlevel-name: ~A~%" (-> this level-name))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (krimson-wall-break)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('break)
|
||||
(go-virtual explode)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((v1-0 (new 'stack-no-clear 'matrix))
|
||||
(a3-0 (-> self node-list data 2 bone transform))
|
||||
(a0-2 (-> a3-0 rvec quad))
|
||||
(a1-0 (-> a3-0 uvec quad))
|
||||
(a2-0 (-> a3-0 fvec quad))
|
||||
(a3-1 (-> a3-0 trans quad))
|
||||
)
|
||||
(set! (-> v1-0 rvec quad) a0-2)
|
||||
(set! (-> v1-0 uvec quad) a1-0)
|
||||
(set! (-> v1-0 fvec quad) a2-0)
|
||||
(set! (-> v1-0 trans quad) a3-1)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate explode (krimson-wall-break)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (not (time-elapsed? (-> self state-time) (seconds 0.5)))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self root trans quad))
|
||||
(+! (-> gp-0 z) (* 4096.0 (rand-vu-float-range -60.0 60.0)))
|
||||
(+! (-> gp-0 x) (* 4096.0 (rand-vu-float-range -20.0 20.0)))
|
||||
(+! (-> gp-0 y) (* 4096.0 (rand-vu-float-range 0.0 25.0)))
|
||||
(let ((v1-9 (rand-vu-int-count 2)))
|
||||
(cond
|
||||
((zero? v1-9)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 217 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 217))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 217))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-9 1)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 218 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 218))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 218))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate done (krimson-wall-break)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('done)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; definition for method 11 of type krimson-wall-break
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod init-from-entity! ((this krimson-wall-break) (arg0 entity-actor))
|
||||
(local-vars (sv-96 entity))
|
||||
(set! (-> this level) (level-get *level* (-> this level-name)))
|
||||
(stack-size-set! (-> this main-thread) 512)
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-krimson-wall-break" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this anim)
|
||||
(new 'static 'spool-anim :name "krimson-wall-break-1" :anim-name "break" :parts 2 :command-list '())
|
||||
)
|
||||
(set! (-> this art-name) (res-lump-struct arg0 'art-name string))
|
||||
(let ((s4-1 (-> this root trans))
|
||||
(s5-1 (-> this root trans))
|
||||
)
|
||||
(let ((s2-0 (entity-actor-lookup arg0 'alt-actor 0))
|
||||
(v0-8 (entity-actor-lookup arg0 'alt-actor 1))
|
||||
)
|
||||
(if s2-0
|
||||
(set! s4-1 (-> s2-0 extra trans))
|
||||
)
|
||||
(if v0-8
|
||||
(set! s5-1 (-> v0-8 extra trans))
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (get-process *default-dead-pool* manipy #x20000 1)))
|
||||
(set! (-> this pillar 0)
|
||||
(the-as
|
||||
(pointer manipy)
|
||||
(when s3-1
|
||||
(let ((t9-10 (method-of-type manipy activate)))
|
||||
(t9-10 (the-as manipy s3-1) this "krimson-wall-break" (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s2-1 run-function-in-process)
|
||||
(s1-0 s3-1)
|
||||
(s0-0 manipy-init)
|
||||
)
|
||||
(set! sv-96 (-> this level entity data 0 entity))
|
||||
(let ((t0-1 (art-group-get-by-name *level* "skel-krimson-wall-break" (the-as (pointer level) #f)))
|
||||
(t1-1 #f)
|
||||
(t2-1 0)
|
||||
)
|
||||
((the-as (function object object object object object object object none) s2-1)
|
||||
s1-0
|
||||
s0-0
|
||||
s4-1
|
||||
sv-96
|
||||
t0-1
|
||||
t1-1
|
||||
t2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s3-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> this pillar 0)) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process (-> this pillar 0)) 'prefix "a-")
|
||||
(set! (-> this pillar 1)
|
||||
(process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
s5-1
|
||||
(-> this level entity data 0 entity)
|
||||
(art-group-get-by-name *level* "skel-krimson-wall-break" (the-as (pointer level) #f))
|
||||
#f
|
||||
0
|
||||
:name "krimson-wall-break"
|
||||
:to this
|
||||
:stack-size #x20000
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> this pillar 1)) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process (-> this pillar 1)) 'prefix "b-")
|
||||
(add-process *gui-control* this (gui-channel art-load) (gui-action queue) (-> this anim name) -99.0 0)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
;; definition for function krimson-wall-break-init-by-other
|
||||
(defbehavior krimson-wall-break-init-by-other krimson-wall-break ((arg0 entity-actor) (arg1 symbol))
|
||||
(set! (-> self level-name) arg1)
|
||||
(init-from-entity! self arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-krimson-wall krimson-wall krimson-wall-lod0-jg krimson-wall-idle-ja
|
||||
((krimson-wall-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 13 0 16)
|
||||
)
|
||||
|
||||
;; definition of type krimson-wall
|
||||
(deftype krimson-wall (process-focusable)
|
||||
((alt-actor entity-actor 2)
|
||||
(collision-part int32)
|
||||
(width float)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(krimson-wall-method-30 (_type_ symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type krimson-wall
|
||||
(defmethod inspect ((this krimson-wall))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-focusable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Talt-actor[2] @ #x~X~%" (-> this alt-actor))
|
||||
(format #t "~2Tcollision-part: ~D~%" (-> this collision-part))
|
||||
(format #t "~2Twidth: ~f~%" (-> this width))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (krimson-wall)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('break)
|
||||
(when (and (-> self alt-actor 0) (-> self alt-actor 1))
|
||||
(send-event (-> self alt-actor 0 extra process) 'kill)
|
||||
(send-event (-> self alt-actor 1 extra process) 'kill)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
(('kill)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (nonzero? (-> self collision-part))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate die (krimson-wall)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type krimson-wall
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod krimson-wall-method-30 ((this krimson-wall) (arg0 symbol))
|
||||
(cond
|
||||
(arg0
|
||||
(let ((gp-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector))))
|
||||
(let ((f30-0 (-> this width)))
|
||||
(let ((t9-0 vector-matrix*!)
|
||||
(a0-1 (-> gp-0 0))
|
||||
(a1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-1 x) 0.0)
|
||||
(set! (-> a1-1 y) 0.0)
|
||||
(set! (-> a1-1 z) f30-0)
|
||||
(set! (-> a1-1 w) 1.0)
|
||||
(t9-0 a0-1 a1-1 (-> this node-list data 2 bone transform))
|
||||
)
|
||||
(let ((t9-1 vector-matrix*!)
|
||||
(a0-2 (-> gp-0 1))
|
||||
(a1-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-2 x) 0.0)
|
||||
(set! (-> a1-2 y) 0.0)
|
||||
(set! (-> a1-2 z) (- f30-0))
|
||||
(set! (-> a1-2 w) 1.0)
|
||||
(t9-1 a0-2 a1-2 (-> this node-list data 2 bone transform))
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> this alt-actor 0))
|
||||
(set! (-> gp-0 0 quad) (-> this alt-actor 0 extra trans quad))
|
||||
)
|
||||
(if (nonzero? (-> this alt-actor 1))
|
||||
(set! (-> gp-0 1 quad) (-> this alt-actor 1 extra trans quad))
|
||||
)
|
||||
(spawn-security-wall this (-> gp-0 0) (-> gp-0 1) 77824.0 #f)
|
||||
(let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 1) (-> gp-0 0))))
|
||||
(vector-normalize! s4-1 40960.0)
|
||||
(vector+float*! (-> gp-0 0) (-> gp-0 0) s4-1 -1.0)
|
||||
(vector+float*! (-> gp-0 1) (-> gp-0 1) s4-1 1.0)
|
||||
)
|
||||
(+! (-> gp-0 0 y) 61440.0)
|
||||
(+! (-> gp-0 1 y) 61440.0)
|
||||
(spawn-security-wall this (-> gp-0 0) (-> gp-0 1) 102400.0 #t)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((gp-1 (-> this child)))
|
||||
(while gp-1
|
||||
(send-event (ppointer->process gp-1) 'off)
|
||||
(set! gp-1 (-> gp-1 0 brother))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type krimson-wall
|
||||
(defmethod init-from-entity! ((this krimson-wall) (arg0 entity-actor))
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0)))
|
||||
(set! (-> s4-0 total-prims) (the-as uint 2))
|
||||
(set! (-> s3-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> s3-0 prim-core action) (collide-action solid rideable no-standon))
|
||||
(set-vector! (-> s3-0 local-sphere) 0.0 53248.0 0.0 65536.0)
|
||||
(set! (-> s4-0 root-prim) s3-0)
|
||||
)
|
||||
(let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 1))))
|
||||
(set! (-> v1-8 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-8 prim-core action) (collide-action solid no-standon))
|
||||
(set! (-> v1-8 transform-index) 3)
|
||||
(set-vector! (-> v1-8 local-sphere) 0.0 53248.0 0.0 65536.0)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-11 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s4-0)
|
||||
)
|
||||
(set! (-> this entity) arg0)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-krimson-wall" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(transform-post)
|
||||
(set! (-> this collision-part) (res-lump-value arg0 'extra-id int :time -1000000000.0))
|
||||
(set! (-> this width) (res-lump-float arg0 'dist :default 81920.0))
|
||||
(set! (-> this alt-actor 0) (entity-actor-lookup arg0 'alt-actor 0))
|
||||
(set! (-> this alt-actor 1) (entity-actor-lookup arg0 'alt-actor 1))
|
||||
(format #t "collision part ~D~%" (-> this collision-part))
|
||||
(if (nonzero? (-> this collision-part))
|
||||
(krimson-wall-method-30 this #t)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *default-mh-squad-member-settings*, type (inline-array kg-squad-member-settings)
|
||||
(define *default-mh-squad-member-settings*
|
||||
(new 'static 'inline-array kg-squad-member-settings 3
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-grunt)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-flitter)
|
||||
:max-target-count #x7f
|
||||
:target-count 3
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings :object-type (traffic-type metalhead-predator) :max-target-count #x7f)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *war-mh-squad-member-settings*, type (inline-array kg-squad-member-settings)
|
||||
(define *war-mh-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 3
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-grunt)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-flitter)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-predator)
|
||||
:max-target-count #x7f
|
||||
:target-count 2
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 47 of type mh-squad-control
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defmethod copy-squad-settings-to-idx ((this mh-squad-control) (arg0 (inline-array mh-squad-member-settings)) (arg1 int))
|
||||
(mem-copy! (the-as pointer (-> this squad-settings (the-as uint arg1))) (the-as pointer arg0) 48)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type mh-squad-control
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init-alert ((this mh-squad-control))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *default-mh-squad-member-settings*)
|
||||
0
|
||||
)
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *war-mh-squad-member-settings*)
|
||||
1
|
||||
)
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *default-mh-squad-member-settings*)
|
||||
2
|
||||
)
|
||||
(set! (-> this alert-level) 0)
|
||||
(call-parent-method this)
|
||||
(mh-squad-control-method-48 this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type mh-squad-control
|
||||
(defmethod squad-control-method-10 ((this mh-squad-control))
|
||||
(set! (-> this active-squad-member-list length) 0)
|
||||
(dotimes (v1-1 29)
|
||||
(set! (-> this map-traffic-object-type-to-squad v1-1) (traffic-type invalid0))
|
||||
)
|
||||
(set! (-> this map-traffic-object-type-to-squad 8) (traffic-type civilian-male))
|
||||
(set! (-> this map-traffic-object-type-to-squad 9) (traffic-type civilian-female))
|
||||
(set! (-> this map-traffic-object-type-to-squad 10) (traffic-type civilian-fat))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type mh-squad-control
|
||||
;; WARN: Return type mismatch handle-array vs none.
|
||||
(defmethod initialize ((this mh-squad-control) (arg0 process))
|
||||
(set! (-> this active-squad-member-list) (new 'loading-level 'handle-array 126))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 45 of type mh-squad-control
|
||||
(defmethod add-squad-member ((this mh-squad-control) (arg0 process))
|
||||
(push-back (-> this active-squad-member-list) (process->handle arg0))
|
||||
)
|
||||
|
||||
;; definition for method 46 of type mh-squad-control
|
||||
(defmethod pop-squad-member-from-list ((this mh-squad-control) (arg0 process))
|
||||
(let ((v1-2 (process->handle arg0)))
|
||||
(dotimes (a1-4 (-> this active-squad-member-list length))
|
||||
(when (= (-> this active-squad-member-list data0 a1-4) v1-2)
|
||||
(pop-front (-> this active-squad-member-list) a1-4)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
|
||||
;; definition for method 48 of type mh-squad-control
|
||||
(defmethod mh-squad-control-method-48 ((this mh-squad-control))
|
||||
(dotimes (v1-0 3)
|
||||
(dotimes (a1-0 3)
|
||||
(let ((a3-2 (the-as mh-squad-settings (+ (+ (* a1-0 16) 828 (* 48 v1-0)) (the-as int this)))))
|
||||
(set! (-> this traffic object-type-info-array 0 target-counts (+ v1-0 (* (-> a3-2 grunt-settings object-type) 32)))
|
||||
(max
|
||||
(min (-> a3-2 grunt-settings target-count) (-> a3-2 grunt-settings max-target-count))
|
||||
(-> a3-2 grunt-settings min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 13 of type mh-squad-control
|
||||
(defmethod update ((this mh-squad-control))
|
||||
(cond
|
||||
((-> *setting-control* user-current mh-enemy-settings)
|
||||
(set! (-> this city-mode) (squad-city-mode two))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) (-> *setting-control* user-current mh-enemy-settings))
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this city-mode) (squad-city-mode zero))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *default-mh-squad-member-settings*)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when *cty-faction-manager*
|
||||
(let ((a2-2 (if (-> *setting-control* user-current mh-enemy-settings)
|
||||
7
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(faction-spawn *cty-faction-manager* 1 a2-2 #f (if (-> *setting-control* user-current mh-enemy-settings)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(mh-squad-control-method-48 this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 41 of type mh-squad-control
|
||||
(defmethod squad-control-city-method-41 ((this mh-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(not (logtest? (process-mask metalhead) (-> arg1 mask)))
|
||||
)
|
||||
|
||||
;; definition for method 39 of type mh-squad-control
|
||||
(defmethod squad-control-city-method-39 ((this mh-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(get-hatred-val-for-proc (the-as mh-squad-member arg0) arg1)
|
||||
)
|
||||
|
||||
;; definition for function set-mh-primary-target
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-mh-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *mh-squad-control*
|
||||
(let* ((s5-0 *mh-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type mh-squad-member
|
||||
(deftype mh-squad-member (citizen-enemy)
|
||||
((squad mh-squad-control :override)
|
||||
(last-choose-new-enemy-time time-frame)
|
||||
(current-enemy handle)
|
||||
(choose-new-enemy-delay-time time-frame)
|
||||
(next-update-target-time time-frame)
|
||||
)
|
||||
(:methods
|
||||
(get-hatred-val-for-proc (_type_ process) float)
|
||||
(pfoc-in-range? (_type_ process-focusable) symbol)
|
||||
(enemy->hatred-val (_type_ process) float)
|
||||
(get-current-enemy (_type_) process)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mh-squad-member
|
||||
(defmethod inspect ((this mh-squad-member))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type citizen-enemy inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tlast-choose-new-enemy-time: ~D~%" (-> this last-choose-new-enemy-time))
|
||||
(format #t "~2Tcurrent-enemy: ~D~%" (-> this current-enemy))
|
||||
(format #t "~2Tchoose-new-enemy-delay-time: ~D~%" (-> this choose-new-enemy-delay-time))
|
||||
(format #t "~2Tnext-update-target-time: ~D~%" (-> this next-update-target-time))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
+296
@@ -0,0 +1,296 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 193 of type mh-squad-member
|
||||
;; WARN: Return type mismatch mh-squad-control vs none.
|
||||
(defmethod set-squad ((this mh-squad-member))
|
||||
(set! (-> this squad) *mh-squad-control*)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 194 of type mh-squad-member
|
||||
(defmethod citizen-method-194 ((this mh-squad-member))
|
||||
(set! (-> this last-choose-new-enemy-time) 0)
|
||||
(set! (-> this choose-new-enemy-delay-time) (seconds 3))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
(set! (-> this mask) (the-as process-mask (logior (process-mask metalhead) (-> this mask))))
|
||||
(set! (-> this faction-mode) (the-as uint 0))
|
||||
(set! (-> this next-update-target-time) 0)
|
||||
(set! (-> this fact pickup-type) (pickup-type eco-pill-dark))
|
||||
(if (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 11))
|
||||
(set! (-> this fact pickup-type) (pickup-type eco-pill-light))
|
||||
)
|
||||
(set! (-> this fact pickup-amount) 1.0)
|
||||
(set! (-> this fact pickup-spawn-amount) 1.0)
|
||||
(set! (-> this fact fade-time) (seconds 10))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 212 of type mh-squad-member
|
||||
(defmethod go-from-behavior ((this mh-squad-member) (arg0 traffic-object-spawn-params))
|
||||
(add-squad-member (-> this squad) this)
|
||||
(call-parent-method this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 196 of type mh-squad-member
|
||||
(defmethod go-inactive ((this mh-squad-member))
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type mh-squad-member
|
||||
(defmethod deactivate ((this mh-squad-member))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 220 of type mh-squad-member
|
||||
(defmethod enemy->hatred-val ((this mh-squad-member) (arg0 process))
|
||||
(cond
|
||||
((logtest? (process-mask metalhead) (-> arg0 mask))
|
||||
-1.0
|
||||
)
|
||||
((logtest? (process-mask guard) (-> arg0 mask))
|
||||
0.5
|
||||
)
|
||||
((= (-> arg0 type) target)
|
||||
0.49
|
||||
)
|
||||
((logtest? (process-mask civilian) (-> arg0 mask))
|
||||
0.2
|
||||
)
|
||||
((logtest? (process-mask kg-robot) (-> arg0 mask))
|
||||
-0.01
|
||||
)
|
||||
((and (logtest? (process-mask vehicle) (-> arg0 mask)) (not (logtest? (process-mask enemy) (-> arg0 mask))))
|
||||
0.01
|
||||
)
|
||||
(else
|
||||
-1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 218 of type mh-squad-member
|
||||
(defmethod get-hatred-val-for-proc ((this mh-squad-member) (arg0 process))
|
||||
(let ((f1-0 (enemy->hatred-val this arg0)))
|
||||
0.0
|
||||
f1-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 219 of type mh-squad-member
|
||||
(defmethod pfoc-in-range? ((this mh-squad-member) (arg0 process-focusable))
|
||||
(let* ((s5-0 (get-trans arg0 0))
|
||||
(f0-0 (vector-vector-xz-distance-squared (-> this root trans) s5-0))
|
||||
(f1-0 245760.0)
|
||||
)
|
||||
(and (< f0-0 (* f1-0 f1-0)) (< (fabs (- (-> s5-0 y) (-> this root trans y))) 61440.0))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 59 of type mh-squad-member
|
||||
(defmethod enemy-common-post ((this mh-squad-member))
|
||||
(local-vars (s5-0 int))
|
||||
(when (focus-test? this dangerous)
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-0 options) (overlaps-others-options))
|
||||
(set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter))
|
||||
(set! (-> a1-0 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> this root) a1-0)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> this flags) (citizen-flag in-mission))
|
||||
(set! (-> this faction-mode) (the-as uint 2))
|
||||
)
|
||||
((nonzero? (-> this controller branch))
|
||||
(let ((v1-15 (get-city-mode (-> this squad))))
|
||||
0
|
||||
(cond
|
||||
((= v1-15 (squad-city-mode two))
|
||||
(set! s5-0 2)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 *cty-faction-manager*)
|
||||
(a1-2 (-> this controller branch clock-type))
|
||||
)
|
||||
(set! s5-0 (-> v1-17 territory-faction-modes 0 data (+ 1 (* a1-2 16))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> this faction-mode) s5-0)
|
||||
(if (not (send-event this 'change-faction-mode s5-0 (-> this faction-mode)))
|
||||
(set! (-> this faction-mode) (the-as uint s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(find-new-focus this)
|
||||
((method-of-type citizen enemy-common-post) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 84 of type mh-squad-member
|
||||
(defmethod send-attack-on-jump-or-knocked ((this mh-squad-member) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
(#f
|
||||
((method-of-type citizen send-attack-on-jump-or-knocked) this arg0 arg1)
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-2 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask enemy guard civilian kg-robot) (-> arg0 mask))
|
||||
(not (logtest? (process-mask metalhead) (-> arg0 mask)))
|
||||
(and v1-2
|
||||
(not (logtest? (-> (the-as process-focusable v1-2) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> this persistent-attack-id)
|
||||
(-> this attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(send-event arg0 'touch (-> arg1 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 221 of type mh-squad-member
|
||||
;; WARN: disable def twice: 6. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod get-current-enemy ((this mh-squad-member))
|
||||
(if #t
|
||||
(handle->process (-> this attacker-info enemy))
|
||||
(squad-control-city-method-35 (-> this squad) this (-> this current-enemy))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 217 of type mh-squad-member
|
||||
;; WARN: disable def twice: 120. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod find-new-focus ((this mh-squad-member))
|
||||
(local-vars (v0-6 object))
|
||||
(when (not (handle->process (-> this current-enemy)))
|
||||
(set! (-> this focus handle) (the-as handle #f))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
)
|
||||
(let ((a0-6 (get-current-enemy this)))
|
||||
(if a0-6
|
||||
(set! (-> this current-enemy) (process->handle a0-6))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> this attacker-info flags) (city-attacker-info-flag cai2))
|
||||
(set! (-> this attacker-info next-update-target-time) (+ (current-time) (seconds 3)))
|
||||
(logclear! (-> this attacker-info flags) (city-attacker-info-flag cai2))
|
||||
)
|
||||
(let* ((s5-0 (handle->process (-> this current-enemy)))
|
||||
(a0-18 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and a0-18
|
||||
(not (logtest? (-> (the-as process-focusable a0-18) focus-status) (focus-status disable dead inactive)))
|
||||
)
|
||||
(let* ((s5-1 this)
|
||||
(s4-0 (method-of-object s5-1 enemy-method-70))
|
||||
(s3-0 (handle->process (-> this current-enemy)))
|
||||
)
|
||||
(s4-0
|
||||
s5-1
|
||||
(the-as process-focusable (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(the-as enemy-aware #f)
|
||||
)
|
||||
)
|
||||
(update-focus this)
|
||||
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
|
||||
(f1-0 266240.0)
|
||||
)
|
||||
(cond
|
||||
((< f0-0 (* f1-0 f1-0))
|
||||
(when (not (logtest? (-> this squad alert-state flags) (squad-alert-flag war)))
|
||||
(set! v0-6 (logior (-> this flags) (citizen-flag persistent)))
|
||||
(set! (-> this flags) (the-as citizen-flag v0-6))
|
||||
v0-6
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! v0-6 (logclear (-> this flags) (citizen-flag persistent)))
|
||||
(set! (-> this flags) (the-as citizen-flag v0-6))
|
||||
v0-6
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this focus handle) (the-as handle #f))
|
||||
(logclear! (-> this flags) (citizen-flag persistent))
|
||||
(if (and (-> this next-state) (= (-> this next-state name) 'hostile))
|
||||
(go (method-of-object this active))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (mh-squad-member)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (handle->process (-> self current-enemy))
|
||||
(let* ((gp-0 (handle->process (-> self current-enemy)))
|
||||
(v1-7 (if (type? gp-0 process-focusable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (not (or (focus-test? v1-7 inactive) (focus-test? v1-7 disable)))
|
||||
(go-virtual hostile)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-3 (-> (find-parent-state) trans)))
|
||||
(if t9-3
|
||||
(t9-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
+53
-53
@@ -16,21 +16,21 @@
|
||||
(max-user-count uint8)
|
||||
(user-count uint8)
|
||||
(width uint8)
|
||||
(flags uint8)
|
||||
(flags nav-branch-flags)
|
||||
)
|
||||
(:methods
|
||||
(nav-branch-method-9 () none)
|
||||
(nav-branch-method-10 () none)
|
||||
(set-default-density-speed-and-width (_type_) none)
|
||||
(debug-print (_type_ object int) none)
|
||||
(get-density (_type_) float)
|
||||
(get-speed-limit (_type_) float)
|
||||
(get-width (_type_) float)
|
||||
(user-limit-reached? (_type_) symbol)
|
||||
(dest-node-id-at-max? (_type_) symbol)
|
||||
(nav-branch-method-16 () none)
|
||||
(nav-branch-method-17 () none)
|
||||
(nav-branch-method-18 () none)
|
||||
(nav-branch-method-19 () none)
|
||||
(nav-branch-method-20 () none)
|
||||
(set-density (_type_ float) none)
|
||||
(set-speed-limit (_type_ float) none)
|
||||
(set-width (_type_ float) none)
|
||||
(set-src-node (_type_ nav-node) none)
|
||||
(set-dst-node (_type_ nav-node) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -77,15 +77,15 @@
|
||||
(level symbol :overlay-at (-> data 7))
|
||||
)
|
||||
(:methods
|
||||
(nav-node-method-9 () none)
|
||||
(nav-node-method-10 () none)
|
||||
(nav-node-method-11 () none)
|
||||
(nav-node-method-12 () none)
|
||||
(nav-node-method-13 () none)
|
||||
(nav-node-method-14 () none)
|
||||
(nav-node-method-15 () none)
|
||||
(nav-node-method-16 () none)
|
||||
(nav-node-method-17 () none)
|
||||
(debug-draw (_type_) none)
|
||||
(debug-print (_type_ symbol string) none)
|
||||
(remove-branch-by-idx (_type_ int) none)
|
||||
(init-from-pt-and-heading (_type_ vector vector) none)
|
||||
(set-pos-xyz (_type_ vector) none)
|
||||
(set-angle-from-heading (_type_ vector) none)
|
||||
(set-id-and-link-branches-back (_type_ uint) none)
|
||||
(set-radius (_type_ float) none)
|
||||
(set-angle (_type_ float) none)
|
||||
(get-position (_type_ vector) vector)
|
||||
(calc-sine-and-cosine! (_type_ vector) vector)
|
||||
(get-angle (_type_) float)
|
||||
@@ -232,43 +232,43 @@
|
||||
(pad1 uint32 6)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(nav-graph-method-9 () none)
|
||||
(nav-graph-method-10 () none)
|
||||
(nav-graph-method-11 () none)
|
||||
(nav-graph-method-12 () none)
|
||||
(nav-graph-method-13 () none)
|
||||
(nav-graph-method-14 () none)
|
||||
(nav-graph-method-15 () none)
|
||||
(nav-graph-method-16 () none)
|
||||
(nav-graph-method-17 () none)
|
||||
(nav-graph-method-18 () none)
|
||||
(nav-graph-method-19 () none)
|
||||
(nav-graph-method-20 () none)
|
||||
(nav-graph-method-21 () none)
|
||||
(nav-graph-method-22 () none)
|
||||
(nav-graph-method-23 () none)
|
||||
(nav-graph-method-24 () none)
|
||||
(nav-graph-method-25 () none)
|
||||
(nav-graph-method-26 () none)
|
||||
(nav-graph-method-27 () none)
|
||||
(nav-graph-method-28 () none)
|
||||
(nav-graph-method-29 () none)
|
||||
(nav-graph-method-30 () none)
|
||||
(nav-graph-method-31 () none)
|
||||
(nav-graph-method-32 () none)
|
||||
(nav-graph-method-33 () none)
|
||||
(nav-graph-method-34 () none)
|
||||
(nav-graph-method-35 () none)
|
||||
(nav-graph-method-36 () none)
|
||||
(nav-graph-method-37 () none)
|
||||
(nav-graph-method-38 () none)
|
||||
(nav-graph-method-39 () none)
|
||||
(nav-graph-method-40 () none)
|
||||
(new (symbol type int int int uint) _type_)
|
||||
(debug-draw-nodes (_type_) none)
|
||||
(find-nearest-nav-node (_type_ vector symbol) nav-node)
|
||||
(print-nav-graph (_type_) none)
|
||||
(set-first-node (_type_) none)
|
||||
(nav-graph-method-13 (_type_ int int) none)
|
||||
(nav-graph-method-14 (_type_ int int) none)
|
||||
(reset! (_type_) none)
|
||||
(add-node (_type_ int) nav-node)
|
||||
(link-node-to-graph (_type_ nav-node) none)
|
||||
(reset-branch-array (_type_ nav-node int) none)
|
||||
(nav-graph-method-19 (_type_ int int int int int int) none)
|
||||
(nav-graph-method-20 (_type_ int int) none)
|
||||
(move-selected-to-height-map-height (_type_) none)
|
||||
(select-nodes-in-range (_type_ int int) none)
|
||||
(deselect-nodes-in-range (_type_ int int) none)
|
||||
(toggle-select-nodes-in-range (_type_ int int) none)
|
||||
(select-nodes-in-level (_type_ symbol symbol) none)
|
||||
(select-nodes-by-nav-mesh-id (_type_ int symbol) none)
|
||||
(select-nodes-by-flags (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none)
|
||||
(print-selected-nodes (_type_) none)
|
||||
(assign-selected-nodes-to-level (_type_ symbol) none)
|
||||
(assign-selected-nodes-to-nav-mesh (_type_ uint) none)
|
||||
(set-radius-of-selected-nodes (_type_ float) none)
|
||||
(set-speed-limit-of-selected (_type_ float) none)
|
||||
(set-density-of-selected (_type_ float) none)
|
||||
(set-width-of-selected (_type_ float) none)
|
||||
(or-flags-of-selected-nodes (_type_ nav-node-flag-byte) none)
|
||||
(and-flags-of-selected-nodes (_type_ nav-node-flag-byte) none)
|
||||
(offset-pos-of-selected (_type_ vector) none)
|
||||
(nav-graph-method-38 (_type_) none)
|
||||
(nav-graph-method-39 (_type_) none)
|
||||
(nav-graph-method-40 (_type_ int) int)
|
||||
(node-at-idx (_type_ int) nav-node)
|
||||
(nav-graph-method-42 () none)
|
||||
(nav-graph-method-43 () none)
|
||||
(nav-graph-method-44 () none)
|
||||
(patch-nodes (_type_) none)
|
||||
(copy-to-mysql-graph (_type_ mysql-nav-graph string) none)
|
||||
(from-editor (_type_ mysql-nav-graph symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+1468
File diff suppressed because it is too large
Load Diff
+114
@@ -0,0 +1,114 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type searchlight
|
||||
(deftype searchlight (process-drawable)
|
||||
((sync sync-eased :inline)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type searchlight
|
||||
(defmethod inspect ((this searchlight))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tsync: #<sync-eased @ #x~X>~%" (-> this sync))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; 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) fvec))
|
||||
)
|
||||
)
|
||||
)
|
||||
(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
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; definition for method 11 of type searchlight
|
||||
(defmethod init-from-entity! ((this searchlight) (arg0 entity-actor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-searchlight" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logior! (-> this draw status) (draw-control-status disable-fog))
|
||||
(set! (-> this root scale y) (rand-vu-float-range 1.8 2.0))
|
||||
(set-vector! (-> this 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! (-> this sync) s4-1)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+960
@@ -0,0 +1,960 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type boat-manager
|
||||
(deftype boat-manager (process)
|
||||
((mesh nav-mesh)
|
||||
(paths path-control 4)
|
||||
(boats-stop? symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
(:methods
|
||||
(boat-manager-method-15 (_type_) none)
|
||||
(boat-manager-method-16 (_type_) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type boat-manager
|
||||
(defmethod inspect ((this boat-manager))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tmesh: ~A~%" (-> this mesh))
|
||||
(format #t "~2Tpaths[4] @ #x~X~%" (-> this paths))
|
||||
(format #t "~2Tboats-stop?: ~A~%" (-> this boats-stop?))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *barge-constants*, type rigid-body-vehicle-constants
|
||||
(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))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*barge-constants*
|
||||
:flags #x8
|
||||
:object-type (traffic-type vehicle-task)
|
||||
:guard-type #xb
|
||||
:vehicle-type (vehicle-type-u8 vt27)
|
||||
:transmission (new 'static 'vehicle-transmission-info :gear-count 1)
|
||||
:handling (new 'static 'vehicle-handling-info
|
||||
: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
|
||||
:turbo-boost-duration (seconds 1)
|
||||
:max-xz-speed (meters 30)
|
||||
:player-turn-anim-min -1.0
|
||||
:player-turn-anim-max 1.0
|
||||
:pilot-x-accel-factor 1.0
|
||||
:pilot-y-accel-factor 1.0
|
||||
:pilot-z-accel-factor 1.0
|
||||
:ground-probe-distance (meters 3)
|
||||
:cos-ground-effect-angle 0.42261827
|
||||
: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-steering-speed-factor 61440.0
|
||||
: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
|
||||
:water-drag-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:air-angular-damping 1.0
|
||||
:ground-torque-scale 1.0
|
||||
:ai-steering-factor 1.0
|
||||
:ai-throttle-factor 1.0
|
||||
)
|
||||
:turning-accel (meters 20)
|
||||
:camera (new 'static 'vehicle-camera-info
|
||||
:string-min-height (meters 4.5)
|
||||
:string-max-height (meters 4.5)
|
||||
:string-min-length (meters 5)
|
||||
:string-max-length (meters 12.5)
|
||||
:min-fov 15109.688
|
||||
:max-fov 17476.268
|
||||
:head-offset 8192.0
|
||||
:foot-offset 4096.0
|
||||
:normal-max-angle-offset 182.04445
|
||||
:air-max-angle-offset 5461.3335
|
||||
:max-lookaround-speed 40960.0
|
||||
:look-pos-array (new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :y 8192.0 :z -10240.0 :w 1.0)
|
||||
(new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:sound (new 'static 'vehicle-sound-info
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
: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")
|
||||
:explode-sound (static-sound-name "vehicle-explode")
|
||||
:explode2-sound (static-sound-name "vehicle-explo-b")
|
||||
:extra-sound (static-sound-name "car-by-1")
|
||||
:bank-replace '()
|
||||
:idle-pitch-scale 1.0
|
||||
:idle-crossover-rpm 1000.0
|
||||
:engine-crossover-rpm 4000.0
|
||||
:start-sound (static-sound-name "vehicl-ignition")
|
||||
:susp-speed-threshold 40960.0
|
||||
:tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
:tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
)
|
||||
:particles (new 'static 'vehicle-particle-info
|
||||
: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))
|
||||
)
|
||||
:damage (new 'static 'vehicle-damage-info
|
||||
:inv-toughness-factor 1.0
|
||||
:hit-points 2000.0
|
||||
:inv-hit-points 0.0005
|
||||
:hit-small 102400.0
|
||||
:hit-big 131072.0
|
||||
:hit-deadly 286720.0
|
||||
:impact-damage-factor 1.0
|
||||
)
|
||||
:physics-model (new 'static 'vehicle-physics-model-info
|
||||
: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)
|
||||
:wheel-count 4
|
||||
:drive-wheel-count 2
|
||||
:front-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
:rear-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
)
|
||||
:setup (new 'static 'vehicle-setup-info
|
||||
:settle-height 6144.0
|
||||
:shadow-bot-clip -40960.0
|
||||
:shadow-locus-dist 409600.0
|
||||
:color-option-count 1
|
||||
:color (new 'static 'inline-array vector 1 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0))
|
||||
:gun-yaw-min -65536.0
|
||||
:gun-yaw-max 65536.0
|
||||
:gun-pitch-min -16384.0
|
||||
:gun-pitch-max 16384.0
|
||||
)
|
||||
:rider (new 'static 'vehicle-rider-info
|
||||
: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))
|
||||
:attach-point-array #f
|
||||
)
|
||||
:explosion #f
|
||||
:explosion-part #xdb
|
||||
:debris #f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type boat-base
|
||||
(deftype boat-base (vehicle)
|
||||
((manager handle)
|
||||
(angle float)
|
||||
(y-rot float)
|
||||
(path-num uint32)
|
||||
(path-index float)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type boat-base
|
||||
(defmethod inspect ((this boat-base))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type vehicle inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tmanager: ~D~%" (-> this manager))
|
||||
(format #t "~2Tangle: ~f~%" (-> this angle))
|
||||
(format #t "~2Ty-rot: ~f~%" (-> this y-rot))
|
||||
(format #t "~2Tpath-num: ~D~%" (-> this path-num))
|
||||
(format #t "~2Tpath-index: ~f~%" (-> this path-index))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 46 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod apply-damage ((this boat-base) (arg0 float) (arg1 rigid-body-impact))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 50 of type boat-base
|
||||
(defmethod attack-handler ((this boat-base) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate))
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 103 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-103 ((this boat-base))
|
||||
(local-vars (v1-8 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(when (time-elapsed? (-> this disturbed-time) (seconds 2))
|
||||
(let* ((f0-0 (-> this camera-dist2))
|
||||
(f1-0 0.000024414063)
|
||||
(f0-1 (* f0-0 (* f1-0 f1-0)))
|
||||
)
|
||||
(.lvf vf1 (&-> (-> this rbody ang-velocity) 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-8 vf1)
|
||||
(when (< v1-8 f0-1)
|
||||
(logclear! (-> this v-flags) (vehicle-flag disturbed))
|
||||
(vehicle-method-142 this)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type boat-base
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod rigid-body-object-method-30 ((this boat-base))
|
||||
(local-vars (v1-42 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(rider-trans)
|
||||
(let ((t9-1 (method-of-type vehicle rigid-body-object-method-30)))
|
||||
(t9-1 this)
|
||||
)
|
||||
(let ((s5-0 (-> this root)))
|
||||
(pull-riders! s5-0)
|
||||
(cond
|
||||
((logtest? (do-push-aways s5-0) (collide-spec jak))
|
||||
(+! (-> this overlap-player-counter) 1)
|
||||
(when (< (the-as uint 60) (-> this overlap-player-counter))
|
||||
(send-event
|
||||
*target*
|
||||
'attack-invinc
|
||||
#f
|
||||
(static-attack-info
|
||||
:mask (vehicle-impulse-factor)
|
||||
((id (new-attack-id)) (damage 1000.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'smush))
|
||||
)
|
||||
)
|
||||
(set! (-> this overlap-player-counter) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this overlap-player-counter) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)))
|
||||
(let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
(let ((a1-1 (-> this nav state)))
|
||||
(set! (-> s5-1 0 quad) (-> a1-1 velocity quad))
|
||||
)
|
||||
(let ((s4-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info)))
|
||||
(let ((s3-0 (-> this nav state current-poly)))
|
||||
(vector-xz-normalize-copy! (-> s5-1 3) (-> s5-1 0) 163840.0)
|
||||
(set! (-> s5-1 4 quad) (-> s5-1 3 quad))
|
||||
(clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) s3-0 (-> s5-1 4) s4-0)
|
||||
)
|
||||
(when (-> s4-0 found-boundary)
|
||||
(let ((f30-0 (vector-length (-> s5-1 0))))
|
||||
(vector-flatten! (-> s5-1 0) (-> s5-1 0) (-> s4-0 boundary-normal))
|
||||
(vector-rotate90-around-y! (-> s5-1 0) (-> s4-0 boundary-normal))
|
||||
(vector-normalize! (-> s5-1 0) f30-0)
|
||||
)
|
||||
(when (= this *debug-actor*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this root trans) (-> s5-1 0) (meters 10) *color-blue*)
|
||||
(format *stdebug* "avoid border~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((f0-3 4.096)
|
||||
(f0-5 (* f0-3 f0-3))
|
||||
)
|
||||
(.lvf vf1 (&-> (-> s5-1 0) 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-42 vf1)
|
||||
(when (< f0-5 v1-42)
|
||||
(set! (-> s5-1 5 quad) (-> s5-1 0 quad))
|
||||
(vector-normalize! (-> s5-1 5) 1.0)
|
||||
(let ((s4-1 (-> this root quat)))
|
||||
(quaternion-set! (the-as quaternion (-> s5-1 2)) 0.0 (-> s5-1 5 x) 0.0 (+ 1.0 (-> s5-1 5 z)))
|
||||
(quaternion-normalize! (the-as quaternion (-> s5-1 2)))
|
||||
(quaternion-smooth-seek! s4-1 s4-1 (the-as quaternion (-> s5-1 2)) (* 1.2 (seconds-per-frame)))
|
||||
)
|
||||
(vector-z-quaternion! (-> s5-1 1) (-> this root quat))
|
||||
(vector-v*float+! (-> this root trans) (-> this root trans) (-> s5-1 1) 8954.266)
|
||||
(seek! (-> this root trans y) 4096.0 (* 4096.0 (seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (= this *debug-actor*)
|
||||
(format *stdebug* "no physics~%")
|
||||
(format *stdebug* "~M~%" (-> this root trans y))
|
||||
)
|
||||
)
|
||||
(if (= this *debug-actor*)
|
||||
(format *stdebug* "speed ~M~%" (vector-length (-> this root transv)))
|
||||
)
|
||||
(let ((s4-2 (handle->process (-> this manager)))
|
||||
(s5-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when s4-2
|
||||
(let ((a1-22 (-> this nav state)))
|
||||
(set! (-> s5-2 quad) (-> a1-22 target-pos quad))
|
||||
)
|
||||
(if (or (= (-> this path-num) 2) (-> *setting-control* user-current stop-boats?))
|
||||
(get-point-at-percent-along-path!
|
||||
(-> (the-as boat-manager (+ (* (-> this path-num) 4) (the-as uint s4-2))) paths 0)
|
||||
(-> this root trans)
|
||||
(-> this path-index)
|
||||
'interp
|
||||
)
|
||||
)
|
||||
(when (and (not (or (= (-> this path-num) 2) (-> *setting-control* user-current stop-boats?)))
|
||||
(< (vector-vector-xz-distance (-> this root trans) s5-2) 163840.0)
|
||||
)
|
||||
(+! (-> this path-index) 0.01)
|
||||
(let ((f0-20 (-> this path-index)))
|
||||
(set! (-> this path-index) (- f0-20 (* (the float (the int (/ f0-20 1.0))) 1.0)))
|
||||
)
|
||||
)
|
||||
(get-point-at-percent-along-path!
|
||||
(-> (the-as boat-manager (+ (* (-> this path-num) 4) (the-as uint s4-2))) paths 0)
|
||||
s5-2
|
||||
(-> this path-index)
|
||||
'interp
|
||||
)
|
||||
(let ((v1-102 (-> this nav state)))
|
||||
(logclear! (-> v1-102 flags) (nav-state-flag directional-mode))
|
||||
(logior! (-> v1-102 flags) (nav-state-flag target-poly-dirty))
|
||||
(set! (-> v1-102 target-pos quad) (-> s5-2 quad))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(vehicle-method-78 this)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 55 of type boat-base
|
||||
(defmethod clear-impulse-force-flag! ((this boat-base))
|
||||
((method-of-type vehicle clear-impulse-force-flag!) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 31 of type boat-base
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod apply-gravity! ((this boat-base) (arg0 float))
|
||||
(let ((s3-0 (-> this rbody))
|
||||
(s2-0 (-> this info))
|
||||
(s4-0 (new 'stack-no-clear 'matrix))
|
||||
)
|
||||
(let ((a1-1 (-> this nav state)))
|
||||
(set! (-> s4-0 uvec quad) (-> a1-1 velocity quad))
|
||||
)
|
||||
(vector-! (-> s4-0 rvec) (-> s4-0 uvec) (-> s3-0 lin-velocity))
|
||||
(vector-float*! (-> s4-0 rvec) (-> s4-0 rvec) (* 4.0 (-> s2-0 info mass)))
|
||||
(set-vector! (-> s4-0 trans) 0.0 -122880.0 40960.0 1.0)
|
||||
(vector-matrix*! (-> s4-0 fvec) (-> s4-0 trans) (-> s3-0 matrix))
|
||||
(apply-impact! s3-0 (-> s4-0 fvec) (-> s4-0 rvec))
|
||||
(vector-reset! (-> s4-0 rvec))
|
||||
(set! (-> s4-0 rvec y) (* -4.0 (-> s2-0 extra gravity) (-> s2-0 info mass)))
|
||||
(add-force! s3-0 (-> s4-0 rvec))
|
||||
)
|
||||
(rigid-body-object-method-53 this arg0)
|
||||
(vehicle-method-96 this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 93 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-93 ((this boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 38 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-object-method-38 ((this boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 131 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-131 ((this boat-base) (arg0 traffic-object-spawn-params))
|
||||
(get-nav-control this (-> arg0 nav-mesh))
|
||||
(set! (-> this manager) (-> arg0 handle))
|
||||
(set! (-> this nav callback-info) *physics-nav-callback-info*)
|
||||
(logior! (-> this nav flags) (nav-control-flag display-marks limit-rotation-rate update-heading-from-facing))
|
||||
(let ((v1-5 (-> this nav)))
|
||||
(set! (-> v1-5 target-speed) 40960.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-7 (-> this nav)))
|
||||
(set! (-> v1-7 acceleration) 8192.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-9 (-> this nav)))
|
||||
(set! (-> v1-9 turning-acceleration) 8192.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-11 (-> this nav)))
|
||||
(set! (-> v1-11 max-rotation-rate) 9102.223)
|
||||
)
|
||||
0
|
||||
(let ((v1-13 (-> this nav)))
|
||||
(set! (-> v1-13 nav-cull-radius) 122880.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-15 (-> this nav)))
|
||||
(set! (-> v1-15 sphere-mask) (the-as uint 64))
|
||||
)
|
||||
0
|
||||
(set! (-> this path-num) (-> arg0 user-data))
|
||||
(set! (-> this path-index) (+ 0.05 (-> arg0 position w)))
|
||||
(when (-> *setting-control* user-current stop-boats?)
|
||||
)
|
||||
(logior! (-> this root root-prim prim-core collide-as) (collide-spec pusher))
|
||||
(let ((v1-26 (-> this root root-prim)))
|
||||
(set! (-> this root backup-collide-as) (-> v1-26 prim-core collide-as))
|
||||
(set! (-> this root backup-collide-with) (-> v1-26 prim-core collide-with))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type boat-base
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod alloc-rbody-control! ((this boat-base) (arg0 rigid-body-object-constants))
|
||||
((method-of-type vehicle alloc-rbody-control!) this arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 109 of type boat-base
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod vehicle-method-109 ((this boat-base))
|
||||
(go (method-of-object this idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 102 of type boat-base
|
||||
(defmethod vehicle-method-102 ((this boat-base))
|
||||
#f
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate waiting (boat-base)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual idle)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate inactive (boat-base)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual idle)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (boat-base)
|
||||
:virtual #t
|
||||
:event vehicle-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self v-flags) (vehicle-flag riding))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:post (behavior ()
|
||||
(rbody-post self)
|
||||
(update-transforms (-> self root))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-barge barge barge-lod0-jg barge-idle-ja
|
||||
((barge-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 21)
|
||||
)
|
||||
|
||||
;; definition of type barge
|
||||
(deftype barge (boat-base)
|
||||
((engine sound-id)
|
||||
(bow-wash sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type barge
|
||||
(defmethod inspect ((this barge))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type boat-base inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tengine: ~D~%" (-> this engine))
|
||||
(format #t "~2Tbow-wash: ~D~%" (-> this bow-wash))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 34 of type barge
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-collision! ((this barge))
|
||||
(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 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! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type barge
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-rbody-control! ((this barge))
|
||||
(with-pp
|
||||
(set! (-> pp level) (level-get *level* 'ctyport))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-barge" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-rbody-control! this *barge-constants*)
|
||||
(set! (-> this draw lod-set lod 0 dist) 1228800.0)
|
||||
(set! (-> this engine) (new-sound-id))
|
||||
(set! (-> this bow-wash) (new-sound-id))
|
||||
(set-vector! (-> this draw color-emissive) 0.3 0.3 0.0 0.0)
|
||||
(iterate-prims
|
||||
(-> this root)
|
||||
(lambda ((arg0 collide-shape-prim))
|
||||
(let ((v1-0 (-> arg0 prim-core prim-type)))
|
||||
(cond
|
||||
((= v1-0 -1)
|
||||
(set! (-> arg0 prim-core collide-with) (collide-spec
|
||||
backgnd
|
||||
bot
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
collectable
|
||||
pusher
|
||||
shield
|
||||
vehicle-sphere-no-probe
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere))
|
||||
)
|
||||
((= v1-0 1)
|
||||
(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))
|
||||
)
|
||||
((zero? v1-0)
|
||||
(set! (-> arg0 prim-core collide-with)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
bot
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
player-list
|
||||
collectable
|
||||
pusher
|
||||
shield
|
||||
vehicle-sphere-no-probe
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 prim-core collide-as)
|
||||
(collide-spec vehicle-sphere camera-blocker vehicle-mesh vehicle-mesh-probeable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 7 of type boat-manager
|
||||
;; WARN: Return type mismatch process vs boat-manager.
|
||||
(defmethod relocate ((this boat-manager) (offset int))
|
||||
(dotimes (v1-0 4)
|
||||
(if (-> this paths v1-0)
|
||||
(&+! (-> this paths v1-0) offset)
|
||||
)
|
||||
)
|
||||
(the-as boat-manager ((method-of-type process relocate) this offset))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (boat-manager)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (and (not (-> self boats-stop?)) (-> *setting-control* user-current stop-boats?))
|
||||
(kill-by-type barge *active-pool*)
|
||||
(boat-manager-method-16 self)
|
||||
(set! (-> self boats-stop?) #t)
|
||||
)
|
||||
(dotimes (gp-0 4)
|
||||
(let ((a0-2 (-> self paths gp-0)))
|
||||
(if a0-2
|
||||
(debug-draw a0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; definition for method 16 of type boat-manager
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod boat-manager-method-16 ((this boat-manager))
|
||||
(when (-> this mesh)
|
||||
(dotimes (s5-0 4)
|
||||
(when (-> this paths s5-0)
|
||||
(when #t
|
||||
(logior! (-> this paths s5-0 flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(let ((s4-0 (-> this paths s5-0))
|
||||
(f30-0 0.0)
|
||||
)
|
||||
1
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(vector-reset! (-> s3-0 fvec))
|
||||
(set! (-> s3-0 fvec y) 1.0)
|
||||
(the int (* 0.0000016276042 (total-distance s4-0)))
|
||||
(while (< f30-0 0.8)
|
||||
(displacement-between-points-at-percent-normalized! s4-0 (-> s3-0 uvec) f30-0)
|
||||
(get-point-at-percent-along-path! s4-0 (-> s3-0 rvec) f30-0 'interp)
|
||||
(vector-normalize! (-> s3-0 uvec) 1.0)
|
||||
(quaternion-look-at! (the-as quaternion (-> s3-0 trans)) (-> s3-0 uvec) (-> s3-0 fvec))
|
||||
(let ((s2-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s2-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> s2-0 behavior) (the-as uint 1))
|
||||
(set! (-> s2-0 id) (the-as uint 0))
|
||||
(set! (-> s2-0 nav-mesh) (-> this mesh))
|
||||
(set! (-> s2-0 nav-branch) #f)
|
||||
(set! (-> s2-0 proc) #f)
|
||||
(set! (-> s2-0 handle) (process->handle this))
|
||||
(set! (-> s2-0 user-data) (the-as uint s5-0))
|
||||
(set! (-> s2-0 flags) (traffic-spawn-flags tsf0))
|
||||
(set! (-> s2-0 guard-type) (the-as uint 11))
|
||||
(set! (-> s2-0 entity) #f)
|
||||
(set! (-> s2-0 velocity quad) (-> s3-0 uvec quad))
|
||||
(set! (-> s2-0 position quad) (-> s3-0 rvec quad))
|
||||
(quaternion-copy! (-> s2-0 rotation) (the-as quaternion (-> s3-0 trans)))
|
||||
(set! (-> s2-0 position w) f30-0)
|
||||
(when (vehicle-spawn-hack barge s2-0 this)
|
||||
)
|
||||
)
|
||||
(let ((f0-4 0.25))
|
||||
(if (and (!= s5-0 2) (not (-> *setting-control* user-current stop-boats?)))
|
||||
(set! f0-4 (rand-vu))
|
||||
)
|
||||
(+! f30-0 (/ (* 4096.0 (+ 150.0 (* 150.0 f0-4))) (total-distance s4-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type boat-manager
|
||||
(defmethod init-from-entity! ((this boat-manager) (arg0 entity-actor))
|
||||
(set! (-> this mesh) (nav-mesh-from-res-tag arg0 'nav-mesh-actor 0))
|
||||
(set! (-> this entity) arg0)
|
||||
(set! (-> this boats-stop?) (-> *setting-control* user-current stop-boats?))
|
||||
(when (-> this mesh)
|
||||
(dotimes (s5-1 4)
|
||||
(set! (-> this paths s5-1) (new 'process 'curve-control this 'path (the float s5-1)))
|
||||
)
|
||||
(boat-manager-method-16 this)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type city-race-ring-info
|
||||
(deftype city-race-ring-info (structure)
|
||||
((pos vector :inline)
|
||||
(angle float :overlay-at (-> pos data 3))
|
||||
(boost float)
|
||||
(dist float)
|
||||
)
|
||||
(:methods
|
||||
(gen-static-macro (_type_ object) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type city-race-ring-info
|
||||
(defmethod inspect ((this city-race-ring-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'city-race-ring-info)
|
||||
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
|
||||
(format #t "~1Tangle: ~f~%" (-> this pos w))
|
||||
(format #t "~1Tboost: ~f~%" (-> this boost))
|
||||
(format #t "~1Tdist: ~f~%" (-> this dist))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type city-ambush-spot
|
||||
(deftype city-ambush-spot (structure)
|
||||
((pos vector :inline)
|
||||
(obj-type traffic-type)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type city-ambush-spot
|
||||
(defmethod inspect ((this city-ambush-spot))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'city-ambush-spot)
|
||||
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
|
||||
(format #t "~1Tobj-type: ~D~%" (-> this obj-type))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type city-ambush-info
|
||||
(deftype city-ambush-info (structure)
|
||||
((count int16)
|
||||
(array (inline-array city-ambush-spot))
|
||||
)
|
||||
(:methods
|
||||
(init (_type_ traffic-object-spawn-params) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type city-ambush-info
|
||||
(defmethod inspect ((this city-ambush-info))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'city-ambush-info)
|
||||
(format #t "~1Tcount: ~D~%" (-> this count))
|
||||
(format #t "~1Tarray: #x~X~%" (-> this array))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
+3961
File diff suppressed because it is too large
Load Diff
+3094
File diff suppressed because it is too large
Load Diff
+2305
File diff suppressed because it is too large
Load Diff
+329
@@ -0,0 +1,329 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function restore-city-speeches
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun restore-city-speeches ()
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-generic-battle)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 3
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 15)
|
||||
:max-delay (seconds 25)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds109a"
|
||||
"grds111a"
|
||||
"grds112a"
|
||||
"grds113a"
|
||||
"grds114a"
|
||||
"grds115a"
|
||||
"grds116a"
|
||||
"grds121a"
|
||||
"grds124a"
|
||||
"grds133a"
|
||||
"grds144a"
|
||||
"grds126a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-battle-victory)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.5)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 5)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds127a"
|
||||
"grds129a"
|
||||
"grds128a"
|
||||
"grds151a"
|
||||
"grds152a"
|
||||
"grds153a"
|
||||
"grds157a"
|
||||
"grds155a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-change-targets)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next skip-first-time)
|
||||
:priority 4
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 20)
|
||||
:list (new 'static 'boxed-array :type string "grds141a" "grds146a" "grds142a" "grds143a" "grds147a" "grds120a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-go-hostile)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 5
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 20)
|
||||
:max-delay (seconds 40)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds144a"
|
||||
"grds122a"
|
||||
"grds104a"
|
||||
"grds145a"
|
||||
"grds126a"
|
||||
"grds130a"
|
||||
"grds164a"
|
||||
"grds163a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-hit)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.1)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds134a" "grds135a" "grds136a" "grds137a" "grds138a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-witness-death)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next skip-first-time)
|
||||
:priority 6
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds148a" "grds149a" "grds187a" "grds117a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 1
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds181a"
|
||||
"grds171a"
|
||||
"grds172a"
|
||||
"grds173a"
|
||||
"grds174a"
|
||||
"grds165a"
|
||||
"grds158a"
|
||||
"grds162a"
|
||||
"grds183a"
|
||||
"grds161a"
|
||||
"grds182a"
|
||||
"grds160a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter-jak)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 2
|
||||
:request-timeout (seconds 0.3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string "grds180a" "grds186a" "grds176a" "grds175a" "grds177a" "grds184a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-bumped-by-jak)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next skip-first-time)
|
||||
:priority 5
|
||||
:request-timeout (seconds 1)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 6)
|
||||
:list (new 'static 'boxed-array :type string "grds167a" "grds168a" "grds169a" "grds170a" "grds179a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-generic-battle-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 3
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 15)
|
||||
:max-delay (seconds 25)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds109b"
|
||||
"grds111b"
|
||||
"grds112b"
|
||||
"grds113b"
|
||||
"grds114b"
|
||||
"grds115b"
|
||||
"grds116b"
|
||||
"grds121b"
|
||||
"grds124b"
|
||||
"grds133b"
|
||||
"grds144b"
|
||||
"grds126b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-battle-victory-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.5)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 5)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds127b"
|
||||
"grds129b"
|
||||
"grds128b"
|
||||
"grds151b"
|
||||
"grds152b"
|
||||
"grds153b"
|
||||
"grds157b"
|
||||
"grds155b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-change-targets-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order skip-first-time)
|
||||
:priority 4
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 20)
|
||||
:list (new 'static 'boxed-array :type string "grds141b" "grds146b" "grds142b" "grds143b" "grds147b" "grds120b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-go-hostile-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 5
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 20)
|
||||
:max-delay (seconds 40)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds144b"
|
||||
"grds122b"
|
||||
"grds104b"
|
||||
"grds145b"
|
||||
"grds126b"
|
||||
"grds130b"
|
||||
"grds164b"
|
||||
"grds163b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-hit-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.1)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds134b" "grds135b" "grds136b" "grds137b" "grds138b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-witness-death-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 6
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds148b" "grds149b" "grds187b" "grds117b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 1
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds181b"
|
||||
"grds171b"
|
||||
"grds172b"
|
||||
"grds173b"
|
||||
"grds174b"
|
||||
"grds165b"
|
||||
"grds158b"
|
||||
"grds162b"
|
||||
"grds183b"
|
||||
"grds161b"
|
||||
"grds182b"
|
||||
"grds160b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter-jak-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 2
|
||||
:request-timeout (seconds 0.3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string "grds180b" "grds186b" "grds176b" "grds175b" "grds177b" "grds184b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-bumped-by-jak-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 5
|
||||
:request-timeout (seconds 1)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 6)
|
||||
:list (new 'static 'boxed-array :type string "grds167b" "grds168b" "grds169b" "grds170b" "grds179b")
|
||||
)
|
||||
)
|
||||
(speech-control-method-17 *speech-control* (speech-type guard-chatter) 0.5)
|
||||
(speech-control-method-17 *speech-control* (speech-type guard-witness-death) 1.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+376
@@ -0,0 +1,376 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function wait-for-speech-end
|
||||
(defun wait-for-speech-end ((arg0 sound-id))
|
||||
(while (nonzero? (get-status *gui-control* arg0))
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition of type task-manager-city-vehicle-training-hover-zone-1
|
||||
(deftype task-manager-city-vehicle-training-hover-zone-1 (task-manager)
|
||||
((speech-id sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type task-manager-city-vehicle-training-hover-zone-1
|
||||
(defmethod inspect ((this task-manager-city-vehicle-training-hover-zone-1))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type task-manager inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tspeech-id: ~D~%" (-> this speech-id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 26 of type task-manager-city-vehicle-training-hover-zone-1
|
||||
(defmethod task-manager-method-26 ((this task-manager-city-vehicle-training-hover-zone-1))
|
||||
(when (and (!= (-> this player-vehicle) #f) (not (and *target* (focus-test? *target* pilot))))
|
||||
(set! (-> this speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 30) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(send-event this 'fail)
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (task-manager-city-vehicle-training-hover-zone-1)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(if (and *target* (focus-test? *target* pilot))
|
||||
(goto cfg-7)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-7)
|
||||
(set! (-> self player-vehicle) (-> *target* pilot vehicle))
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 26) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-1 (current-time)))
|
||||
(until (time-elapsed? gp-1 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 27) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-3 (current-time)))
|
||||
(until (time-elapsed? gp-3 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 28) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(while (let ((v1-36 (handle->process (-> self player-vehicle))))
|
||||
(not (logtest? (vehicle-flag flight-level-transition) (-> (the-as vehicle v1-36) v-flags)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 29) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(set! (-> self player-vehicle) (the-as handle #f))
|
||||
(let ((gp-6 (current-time)))
|
||||
(until (time-elapsed? gp-6 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
(let ((t9-14 (-> (find-parent-state) code)))
|
||||
(if t9-14
|
||||
((the-as (function none) t9-14))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate fail (task-manager-city-vehicle-training-hover-zone-1)
|
||||
:virtual #t
|
||||
:code (behavior ((arg0 resetter-params))
|
||||
(task-node-close! (game-task-node city-vehicle-training-hover-zone-1) 'event)
|
||||
(sleep-code)
|
||||
(let ((t9-3 (-> (find-parent-state) code)))
|
||||
(if t9-3
|
||||
((the-as (function none) t9-3))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate complete (task-manager-city-vehicle-training-hover-zone-1)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(task-node-close! (game-task-node city-vehicle-training-hover-zone-2) 'event)
|
||||
(let ((t9-2 (-> (find-parent-state) code)))
|
||||
(if t9-2
|
||||
((the-as (function none) t9-2))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type task-manager-city-vehicle-training-hover-zone-2
|
||||
(deftype task-manager-city-vehicle-training-hover-zone-2 (task-manager)
|
||||
((speech-id sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type task-manager-city-vehicle-training-hover-zone-2
|
||||
(defmethod inspect ((this task-manager-city-vehicle-training-hover-zone-2))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type task-manager inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tspeech-id: ~D~%" (-> this speech-id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 26 of type task-manager-city-vehicle-training-hover-zone-2
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod task-manager-method-26 ((this task-manager-city-vehicle-training-hover-zone-2))
|
||||
(if (not (and *target* (focus-test? *target* pilot)))
|
||||
(send-event this 'fail)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (task-manager-city-vehicle-training-hover-zone-2)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
(until #f
|
||||
(cond
|
||||
((and *target* (focus-test? *target* pilot))
|
||||
(let ((v1-8 (the-as vehicle (handle->process (-> *target* pilot vehicle)))))
|
||||
(if (logtest? (vehicle-flag flight-level-transition) (-> v1-8 v-flags))
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
)
|
||||
(if (time-elapsed? (-> self state-time) (seconds 60))
|
||||
(goto cfg-18)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-18)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 27) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-1 (current-time)))
|
||||
(until (time-elapsed? gp-1 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 28) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(until #f
|
||||
(let ((v1-35 (handle->process (-> *target* pilot vehicle))))
|
||||
(if (logtest? (vehicle-flag flight-level-transition) (-> (the-as vehicle v1-35) v-flags))
|
||||
(goto cfg-30)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-30)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 29) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-4 (current-time)))
|
||||
(until (time-elapsed? gp-4 (seconds 3))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type cty-hijack-intro
|
||||
(deftype cty-hijack-intro (task-manager)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cty-hijack-intro
|
||||
(defmethod inspect ((this cty-hijack-intro))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type task-manager inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (cty-hijack-intro)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
((-> (method-of-object self wait) trans))
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 5))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until (< 327680.0
|
||||
(vector-vector-xz-distance (target-pos 0) (new 'static 'vector :x -285696.0 :y 36044.8 :z 5443625.0 :w 1.0))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(set-setting! 'airlock-command '(("hip-door-a-6" close)) 0.0 0)
|
||||
(talker-spawn-func (-> *talker-speech* 162) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(let ((gp-3 (current-time)))
|
||||
(until (time-elapsed? gp-3 (seconds 5))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until (handle-command-list *gui-control* (gui-channel voicebox) (the-as gui-connection #f))
|
||||
(suspend)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 25 of type cty-hijack-intro
|
||||
(defmethod task-manager-method-25 ((this cty-hijack-intro))
|
||||
(nop!)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type task-manager-force-load-borrows
|
||||
(deftype task-manager-force-load-borrows (task-manager)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type task-manager-force-load-borrows
|
||||
(defmethod inspect ((this task-manager-force-load-borrows))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type task-manager inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (task-manager-force-load-borrows)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0)
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-22 symbol))
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'hour 8)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0)
|
||||
(when (> (-> (task-perm-by-index *game-info* 46) user-uint64) 0)
|
||||
(set-blackout-frames (seconds 100))
|
||||
(until (process-grab? *target* #f)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until v1-22
|
||||
(suspend)
|
||||
(set! v1-22 (and (= (status-of-level-and-borrows *level* 'ctypesb #f) 'active)
|
||||
(= (status-of-level-and-borrows *level* 'ctypesc #f) 'active)
|
||||
(= (status-of-level-and-borrows *level* 'ctypesa #f) 'active)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type task-manager-blackout
|
||||
(deftype task-manager-blackout (task-manager)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type task-manager-blackout
|
||||
(defmethod inspect ((this task-manager-blackout))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type task-manager inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (task-manager-blackout)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(persist-with-delay *setting-control* 'task-manager-blackout (seconds 10) 'music 'portattk 0.0 0)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
'task-manager-blackout2
|
||||
(seconds 10)
|
||||
'city-sound
|
||||
(the-as symbol '(portatk1))
|
||||
0.0
|
||||
2
|
||||
)
|
||||
(set-blackout-frames (seconds 100))
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *security-texture-anim-array*, type (texture-anim-array texture-anim)
|
||||
(define *security-texture-anim-array*
|
||||
(the-as (texture-anim-array texture-anim)
|
||||
(new 'static 'texture-anim-array :type texture-anim
|
||||
(new 'static 'texture-anim
|
||||
:num-layers #x2
|
||||
:func #f
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:tex-name "security-env-dest"
|
||||
:color (new 'static 'rgba :a #x80)
|
||||
:frame-delta 300.0
|
||||
:frame-mod 4800.0
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
:clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
:data (new 'static 'array texture-anim-layer 2
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 4800.0
|
||||
:tex-name "security-env-uscroll"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0 0.5))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 4.0 0.5))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 4800.0
|
||||
:tex-name "security-env-uscroll"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0 3.0))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'texture-anim
|
||||
:num-layers #x3
|
||||
:func #f
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:tex-name "security-dot-dest"
|
||||
:color (new 'static 'rgba :a #x80)
|
||||
:frame-delta 300.0
|
||||
:frame-mod 600.0
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
:data (new 'static 'array texture-anim-layer 6
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 4800.0
|
||||
:tex-name "common-white"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 600.0
|
||||
:tex-name "security-dot-src"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.015625))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.0078125 0.015625))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 600.0
|
||||
:tex-name "security-dot-src"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.140625))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0078125 0.140625))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function set-security-color!
|
||||
;; INFO: Used lq/sq
|
||||
(defun set-security-color! ((arg0 vector))
|
||||
(let ((v1-1 (-> *security-texture-anim-array* array-data 0)))
|
||||
(set! (-> v1-1 data 0 start-color quad) (-> arg0 quad))
|
||||
(set! (-> v1-1 data 0 end-color quad) (-> arg0 quad))
|
||||
(set! (-> v1-1 data 1 start-color quad) (-> arg0 quad))
|
||||
(set! (-> v1-1 data 1 end-color quad) (-> arg0 quad))
|
||||
)
|
||||
(let ((v1-5 (-> *security-texture-anim-array* array-data 1)))
|
||||
(set! (-> v1-5 data 1 start-color quad) (-> arg0 quad))
|
||||
(set! (-> v1-5 data 1 end-color quad) (-> arg0 quad))
|
||||
(set! (-> v1-5 data 2 start-color quad) (-> arg0 quad))
|
||||
(let ((v0-0 (-> v1-5 data 2 end-color)))
|
||||
(set! (-> v0-0 quad) (-> arg0 quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function set-security-flash!
|
||||
;; INFO: Used lq/sq
|
||||
(defun set-security-flash! ((arg0 vector))
|
||||
(let ((v1-1 (-> *security-texture-anim-array* array-data 1)))
|
||||
(set! (-> v1-1 data 0 start-color quad) (-> arg0 quad))
|
||||
(let ((v0-0 (-> v1-1 data 0 end-color)))
|
||||
(set! (-> v0-0 quad) (-> arg0 quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function set-security-texture-masks!
|
||||
;; INFO: Used lq/sq
|
||||
(defun set-security-texture-masks! ((arg0 vector))
|
||||
(local-vars (a3-3 uint128) (a3-4 uint128))
|
||||
(let ((v1-3 (-> *security-texture-anim-array* array-data 0 data 0 tex))
|
||||
(a1-3 (-> *security-texture-anim-array* array-data 1 data 1 tex))
|
||||
)
|
||||
(when (and v1-3 a1-3)
|
||||
(dotimes (a2-1 3)
|
||||
(let ((a3-2 (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16)))))
|
||||
(t0-2 (-> v1-3 masks data a2-1 mask quad))
|
||||
)
|
||||
(.por a3-3 a3-2 t0-2)
|
||||
)
|
||||
(let ((t0-5 (-> a1-3 masks data a2-1 mask quad)))
|
||||
(.por a3-4 a3-3 t0-5)
|
||||
)
|
||||
(set! (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16)))) a3-4)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+2460
File diff suppressed because it is too large
Load Diff
+1771
File diff suppressed because it is too large
Load Diff
+9
@@ -0,0 +1,9 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
+2836
File diff suppressed because it is too large
Load Diff
+1046
File diff suppressed because it is too large
Load Diff
+324
@@ -0,0 +1,324 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type billiard-ball
|
||||
(deftype billiard-ball (structure)
|
||||
((pos vector :inline)
|
||||
(prev-pos vector :inline)
|
||||
(size float)
|
||||
(flags billiard-ball-flag)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type billiard-ball
|
||||
(defmethod inspect ((this billiard-ball))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'billiard-ball)
|
||||
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
|
||||
(format #t "~1Tprev-pos: #<vector @ #x~X>~%" (-> this prev-pos))
|
||||
(format #t "~1Tsize: ~f~%" (-> this size))
|
||||
(format #t "~1Tflags: ~D~%" (-> this flags))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type billiard-ball-array
|
||||
(deftype billiard-ball-array (inline-array-class)
|
||||
((data billiard-ball :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type billiard-ball-array
|
||||
(defmethod inspect ((this billiard-ball-array))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tlength: ~D~%" (-> this length))
|
||||
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
|
||||
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> billiard-ball-array heap-base) (the-as uint 48))
|
||||
|
||||
;; definition of type billiard-table
|
||||
(deftype billiard-table (basic)
|
||||
((billiards billiard-ball-array)
|
||||
(accum-force vector :inline)
|
||||
(drag float)
|
||||
(bounds vector 2 :inline)
|
||||
(min-xyz vector :inline :overlay-at (-> bounds 0))
|
||||
(max-xyz vector :inline :overlay-at (-> bounds 1))
|
||||
(bounce-wall-friction float)
|
||||
(ball-friction float)
|
||||
)
|
||||
(:methods
|
||||
(init! (_type_ int vector vector) none)
|
||||
(billiard-table-method-10 (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
(reset-accum-force (_type_) none)
|
||||
(billiard-table-method-13 (_type_) symbol)
|
||||
(billiard-table-method-14 (_type_) symbol)
|
||||
(billiard-table-method-15 (_type_ float) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type billiard-table
|
||||
(defmethod inspect ((this billiard-table))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tbilliards: ~A~%" (-> this billiards))
|
||||
(format #t "~1Taccum-force: #<vector @ #x~X>~%" (-> this accum-force))
|
||||
(format #t "~1Tdrag: ~f~%" (-> this drag))
|
||||
(format #t "~1Tbounds[2] @ #x~X~%" (-> this min-xyz))
|
||||
(format #t "~1Tmin-xyz: #<vector @ #x~X>~%" (-> this min-xyz))
|
||||
(format #t "~1Tmax-xyz: #<vector @ #x~X>~%" (-> this max-xyz))
|
||||
(format #t "~1Tbounce-wall-friction: ~f~%" (-> this bounce-wall-friction))
|
||||
(format #t "~1Tball-friction: ~f~%" (-> this ball-friction))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 12 of type billiard-table
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod reset-accum-force ((this billiard-table))
|
||||
(set! (-> this accum-force quad) (the-as uint128 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type billiard-table
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init! ((this billiard-table) (arg0 int) (arg1 vector) (arg2 vector))
|
||||
(set! (-> this billiards) (new 'process 'billiard-ball-array arg0))
|
||||
(set! (-> this billiards length) arg0)
|
||||
(set! (-> this min-xyz quad) (-> arg1 quad))
|
||||
(set! (-> this max-xyz quad) (-> arg2 quad))
|
||||
(dotimes (v1-4 (-> this billiards length))
|
||||
(set! (-> this billiards data v1-4 size) 4096.0)
|
||||
)
|
||||
(billiard-table-method-13 this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type billiard-table
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod billiard-table-method-13 ((this billiard-table))
|
||||
(dotimes (s5-0 (-> this billiards length))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> this max-xyz) (-> this min-xyz)))
|
||||
(s3-0 s4-0)
|
||||
)
|
||||
(let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-3 (the-as number (logior #x3f800000 v1-2)))
|
||||
)
|
||||
(set! (-> s3-0 x) (* (+ -1.0 (the-as float v1-3)) (-> s2-1 x)))
|
||||
)
|
||||
(let* ((v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-7 (the-as number (logior #x3f800000 v1-6)))
|
||||
)
|
||||
(set! (-> s3-0 y) (* (+ -1.0 (the-as float v1-7)) (-> s2-1 y)))
|
||||
)
|
||||
(let* ((v1-10 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-11 (the-as number (logior #x3f800000 v1-10)))
|
||||
)
|
||||
(set! (-> s3-0 z) (* (+ -1.0 (the-as float v1-11)) (-> s2-1 z)))
|
||||
)
|
||||
(set! (-> s3-0 w) 1.0)
|
||||
)
|
||||
(vector+! (the-as vector (-> this billiards data s5-0)) (-> this min-xyz) s4-0)
|
||||
)
|
||||
)
|
||||
(billiard-table-method-14 this)
|
||||
(dotimes (v1-23 (-> this billiards length))
|
||||
(set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this billiards data 0 prev-pos)) (* 48 v1-23))))
|
||||
(-> this billiards data v1-23 pos quad)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 10 of type billiard-table
|
||||
(defmethod billiard-table-method-10 ((this billiard-table))
|
||||
(with-pp
|
||||
(dotimes (v1-0 (-> this billiards length))
|
||||
(set! (-> this billiards data v1-0 flags) (billiard-ball-flag))
|
||||
)
|
||||
(reset-accum-force this)
|
||||
(billiard-table-method-15
|
||||
this
|
||||
(* 0.0033333334 (the float (- (current-time) (-> pp clock old-frame-counter))))
|
||||
)
|
||||
(billiard-table-method-14 this)
|
||||
(debug-draw this)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type billiard-table
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod billiard-table-method-15 ((this billiard-table) (arg0 float))
|
||||
(let ((f0-1 (* arg0 arg0))
|
||||
(f1-1 (-> this drag))
|
||||
)
|
||||
(dotimes (v1-0 (-> this billiards length))
|
||||
(let ((a2-1 (-> this billiards data v1-0))
|
||||
(a1-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((a3-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a3-0 quad) (-> this accum-force quad))
|
||||
(vector-float*! a1-4 (-> a2-1 pos) (- 2.0 f1-1))
|
||||
(vector-! a1-4 a1-4 (vector-float*! (new 'stack-no-clear 'vector) (-> a2-1 prev-pos) (- 1.0 f1-1)))
|
||||
(vector+float*! a1-4 a1-4 a3-0 f0-1)
|
||||
)
|
||||
(set! (-> a2-1 prev-pos quad) (-> a2-1 pos quad))
|
||||
(set! (-> a2-1 pos quad) (-> a1-4 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 7 of type billiard-table
|
||||
(defmethod relocate ((this billiard-table) (offset int))
|
||||
(if (nonzero? (-> this billiards))
|
||||
(&+! (-> this billiards) offset)
|
||||
)
|
||||
(call-parent-method this offset)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type billiard-table
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod billiard-table-method-14 ((this billiard-table))
|
||||
(dotimes (s5-0 (-> this billiards length))
|
||||
(let ((s4-0 (+ s5-0 1))
|
||||
(s3-0 (+ (-> this billiards length) -1))
|
||||
)
|
||||
(while (>= s3-0 s4-0)
|
||||
(let* ((s1-0 (-> this billiards data s5-0))
|
||||
(s2-0 (-> this billiards data s4-0))
|
||||
(s0-1 (vector-! (new 'stack-no-clear 'vector) (-> s2-0 pos) (-> s1-0 pos)))
|
||||
)
|
||||
0.0
|
||||
(let ((f0-2 (+ (-> s1-0 size) (-> s2-0 size)))
|
||||
(f1-1 (vector-length s0-1))
|
||||
)
|
||||
(when (< f1-1 f0-2)
|
||||
(let ((f28-0 (/ (-> s2-0 size) f0-2))
|
||||
(f30-0 (/ (-> s1-0 size) f0-2))
|
||||
)
|
||||
(logior! (-> s1-0 flags) (billiard-ball-flag bb1))
|
||||
(logior! (-> s2-0 flags) (billiard-ball-flag bb1))
|
||||
(vector-normalize! s0-1 (- f0-2 f1-1))
|
||||
(vector+float*! (-> s1-0 pos) (-> s1-0 pos) s0-1 (- f28-0))
|
||||
(vector+float*! (-> s2-0 pos) (-> s2-0 pos) s0-1 f30-0)
|
||||
)
|
||||
(let ((a0-9 (vector-! (new 'stack-no-clear 'vector) (-> s1-0 prev-pos) (-> s1-0 pos)))
|
||||
(v1-21 (vector-! (new 'stack-no-clear 'vector) (-> s2-0 prev-pos) (-> s2-0 pos)))
|
||||
)
|
||||
(vector+float*! (-> s1-0 prev-pos) (-> s1-0 pos) a0-9 (- 1.0 (-> this ball-friction)))
|
||||
(vector+float*! (-> s2-0 prev-pos) (-> s2-0 pos) v1-21 (- 1.0 (-> this ball-friction)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s4-0 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 1)
|
||||
(dotimes (s4-1 (-> this billiards length))
|
||||
(let ((s3-1 (-> this billiards data s4-1))
|
||||
(s1-1 #f)
|
||||
(f30-1 2.0)
|
||||
(s2-1 -1)
|
||||
)
|
||||
-1
|
||||
(add-debug-line #t (bucket-id debug) (-> s3-1 prev-pos) (-> s3-1 pos) *color-blue* #f *color-green*)
|
||||
(dotimes (v1-33 3)
|
||||
(when (!= v1-33 1)
|
||||
(let ((f0-10 (- (-> s3-1 prev-pos data v1-33) (-> s3-1 pos data v1-33))))
|
||||
0.0
|
||||
(dotimes (a0-20 2)
|
||||
(let ((f1-8 (/ (- (-> s3-1 prev-pos data v1-33)
|
||||
(-> (the-as billiard-table (+ (+ (* v1-33 4) (* a0-20 16)) (the-as int this))) min-xyz x)
|
||||
)
|
||||
f0-10
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (< f1-8 f30-1) (>= f1-8 0.0) (< f1-8 1.0))
|
||||
(set! s1-1 #t)
|
||||
(set! f30-1 f1-8)
|
||||
(set! s2-1 v1-33)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s1-1
|
||||
(let ((a0-24 (vector-! (new 'stack-no-clear 'vector) (-> s3-1 pos) (-> s3-1 prev-pos)))
|
||||
(v1-38 (new 'stack-no-clear 'vector))
|
||||
(s1-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(logior! (-> s3-1 flags) (billiard-ball-flag bb0))
|
||||
(vector+float*! v1-38 (-> s3-1 prev-pos) a0-24 f30-1)
|
||||
(set! (-> s1-2 quad) (-> a0-24 quad))
|
||||
(set! (-> s1-2 data s2-1) (* -1.0 (-> s1-2 data s2-1)))
|
||||
(vector+float*! (-> s3-1 pos) v1-38 s1-2 (- 1.0 f30-1))
|
||||
(let ((v1-39 (vector-normalize-copy! (new 'stack-no-clear 'vector) s1-2 1.0)))
|
||||
0.0
|
||||
(let* ((f0-18 (fabs (-> v1-39 data s2-1)))
|
||||
(f1-10 (* f0-18 f0-18))
|
||||
)
|
||||
(vector-float*! s1-2 s1-2 (* -1.0 (- 1.0 (* f1-10 (-> this bounce-wall-friction)))))
|
||||
)
|
||||
)
|
||||
(vector+! (-> s3-1 prev-pos) (-> s3-1 pos) s1-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-51 (-> this billiards length))
|
||||
(let ((a0-40 (-> this billiards data v1-51)))
|
||||
(dotimes (a1-30 3)
|
||||
(set! (-> a0-40 pos data a1-30)
|
||||
(fmax (fmin (-> a0-40 pos data a1-30) (-> this max-xyz data a1-30)) (-> this min-xyz data a1-30))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 11 of type billiard-table
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw ((this billiard-table))
|
||||
(dotimes (s5-0 (-> this billiards length))
|
||||
(let ((v1-3 (-> this billiards data s5-0)))
|
||||
(add-debug-sphere #t (bucket-id debug) (-> v1-3 pos) (-> v1-3 size) *color-red*)
|
||||
)
|
||||
)
|
||||
(add-debug-box #t (bucket-id debug) (-> this min-xyz) (-> this max-xyz) *color-red*)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1618
File diff suppressed because it is too large
Load Diff
+2336
File diff suppressed because it is too large
Load Diff
+159
@@ -0,0 +1,159 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-guide-arrow ctywide-arrow ctywide-arrow-lod0-jg ctywide-arrow-idle-ja
|
||||
((ctywide-arrow-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
)
|
||||
|
||||
;; definition of type guide-arrow
|
||||
(deftype guide-arrow (process-drawable)
|
||||
((bob-dir vector :inline)
|
||||
(base-pos vector :inline)
|
||||
(pad uint8 8)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(guide-arrow-method-22 (_type_) vector)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type guide-arrow
|
||||
(defmethod inspect ((this guide-arrow))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tbob-dir: #<vector @ #x~X>~%" (-> this bob-dir))
|
||||
(format #t "~2Tbase-pos: #<vector @ #x~X>~%" (-> this base-pos))
|
||||
(format #t "~2Tstate-time: ~D~%" (-> this state-time))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type guide-arrow-init-params
|
||||
(deftype guide-arrow-init-params (structure)
|
||||
((pos vector :inline)
|
||||
(facing vector :inline)
|
||||
(twist float)
|
||||
(xz? symbol)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type guide-arrow-init-params
|
||||
(defmethod inspect ((this guide-arrow-init-params))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'guide-arrow-init-params)
|
||||
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
|
||||
(format #t "~1Tfacing: #<vector @ #x~X>~%" (-> this facing))
|
||||
(format #t "~1Ttwist: ~f~%" (-> this twist))
|
||||
(format #t "~1Txz?: ~A~%" (-> this xz?))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function guide-arrow-init-by-other
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior guide-arrow-init-by-other guide-arrow ((arg0 guide-arrow-init-params))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-guide-arrow" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 pos quad))
|
||||
(cond
|
||||
((-> arg0 xz?)
|
||||
(let ((a1-5 (matrix-u-r-compose
|
||||
(new 'stack-no-clear 'matrix)
|
||||
(vector-float*! (new 'stack-no-clear 'vector) (-> arg0 facing) -1.0)
|
||||
*up-vector*
|
||||
)
|
||||
)
|
||||
)
|
||||
(matrix->quaternion (-> self root quat) a1-5)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(quaternion-identity! (-> self root quat))
|
||||
)
|
||||
)
|
||||
(quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> arg0 twist))
|
||||
(logclear! (-> self mask) (process-mask actor-pause movie))
|
||||
(process-entity-status! self (entity-perm-status no-kill) #t)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
;; definition for method 22 of type guide-arrow
|
||||
(defmethod guide-arrow-method-22 ((this guide-arrow))
|
||||
(set-vector! (-> this root scale) 1.5 1.5 1.5 1.0)
|
||||
(set-vector! (-> this draw color-mult) 1.0 0.0 0.0 1.0)
|
||||
(logior! (-> this draw status) (draw-control-status force-fade))
|
||||
(let ((f0-8 (vector-vector-distance (-> this root trans) (math-camera-pos))))
|
||||
0.0
|
||||
(let* ((f1-2 (* 0.0000027126737 f0-8))
|
||||
(f1-4 (fmax 0.0 (fmin 1.0 f1-2)))
|
||||
(f0-11 (- 1.0 (* (- 1.0 f1-4) (- 1.0 f1-4))))
|
||||
)
|
||||
(set! (-> this draw force-fade) (the-as uint (the int (lerp 0.0 96.0 f0-11))))
|
||||
)
|
||||
)
|
||||
(let* ((f0-14 1.5)
|
||||
(f1-8 (* 0.0033333334 (the float (- (current-time) (-> this state-time)))))
|
||||
(f30-0 (/ (- f1-8 (* (the float (the int (/ f1-8 f0-14))) f0-14)) f0-14))
|
||||
)
|
||||
0.0
|
||||
(let ((s5-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))
|
||||
(f0-19 (* 4096.0 (cos (* 65536.0 f30-0))))
|
||||
)
|
||||
(vector+float*! (-> this root trans) (-> this base-pos) s5-1 f0-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (guide-arrow)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self base-pos quad) (-> self root trans quad))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(guide-arrow-method-22 self)
|
||||
)
|
||||
:code sleep-code
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate die (guide-arrow)
|
||||
:virtual #t
|
||||
:code nothing
|
||||
)
|
||||
|
||||
;; definition for function spawn-guide-arrow
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer guide-arrow).
|
||||
(defun spawn-guide-arrow ((arg0 guide-arrow-init-params) (arg1 process))
|
||||
(process-spawn guide-arrow arg0 :name "guide-arrow" :to arg1)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1018
File diff suppressed because it is too large
Load Diff
+185
@@ -0,0 +1,185 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type ctyinda-vingate
|
||||
(deftype ctyinda-vingate (elec-gate)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ctyinda-vingate
|
||||
(defmethod inspect ((this ctyinda-vingate))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type elec-gate inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *vingate-elec-gate-params*, type elec-gate-params
|
||||
(define *vingate-elec-gate-params* (new 'static 'elec-gate-params
|
||||
:bolt-spec (new 'static 'lightning-spec
|
||||
:name #f
|
||||
: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 #x8f :page #x4)
|
||||
:reduction 0.42
|
||||
:num-points 16
|
||||
:box-size 8601.6
|
||||
:merge-factor 0.5
|
||||
:merge-count 2
|
||||
:radius 1638.4
|
||||
:duration -1.0
|
||||
:sound #f
|
||||
)
|
||||
:ring-spec #f
|
||||
:ring-radius-min 1638.4
|
||||
:ring-radius-max 2867.2
|
||||
:speed-mult 1.0
|
||||
:min-dist 163840.0
|
||||
:max-dist 491520.0
|
||||
:plane-expand-xz 8192.0
|
||||
:plane-expand-y 81920.0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 24 of type ctyinda-vingate
|
||||
(defmethod get-params ((this ctyinda-vingate))
|
||||
*vingate-elec-gate-params*
|
||||
)
|
||||
|
||||
;; definition for method 26 of type ctyinda-vingate
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod elec-gate-method-26 ((this ctyinda-vingate))
|
||||
(call-parent-method this)
|
||||
(set! (-> this quality-enabled?) #f)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type ctyinda-vingate
|
||||
(defmethod init-from-entity! ((this ctyinda-vingate) (arg0 entity-actor))
|
||||
(when (task-node-closed? (game-task-node sewer-hum-kg-resolution))
|
||||
(process-entity-status! this (entity-perm-status dead) #t)
|
||||
(deactivate this)
|
||||
)
|
||||
(call-parent-method this arg0)
|
||||
)
|
||||
|
||||
;; definition of type industrial-board-vent
|
||||
(deftype industrial-board-vent (bouncer)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type industrial-board-vent
|
||||
(defmethod inspect ((this industrial-board-vent))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type bouncer inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 24 of type industrial-board-vent
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-collision! ((this industrial-board-vent))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec crate))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action))
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 10240.0)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 23 of type industrial-board-vent
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-skel! ((this industrial-board-vent))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type ctyinda-evil-streetlamp
|
||||
(deftype ctyinda-evil-streetlamp (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ctyinda-evil-streetlamp
|
||||
(defmethod inspect ((this ctyinda-evil-streetlamp))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-ctyinda-evil-streetlamp ctyinda-evil-streetlamp ctyinda-evil-streetlamp-lod0-jg ctyinda-evil-streetlamp-idle-ja
|
||||
((ctyinda-evil-streetlamp-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 8 15)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (ctyinda-evil-streetlamp)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; definition for method 11 of type ctyinda-evil-streetlamp
|
||||
(defmethod init-from-entity! ((this ctyinda-evil-streetlamp) (arg0 entity-actor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-ctyinda-evil-streetlamp" (the-as (pointer level) #f))
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this root pause-adjust-distance) 327680.0)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1145
File diff suppressed because it is too large
Load Diff
+54
@@ -0,0 +1,54 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type industrialb-board-vent
|
||||
(deftype industrialb-board-vent (bouncer)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type industrialb-board-vent
|
||||
(defmethod inspect ((this industrialb-board-vent))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type bouncer inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 24 of type industrialb-board-vent
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-collision! ((this industrialb-board-vent))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec crate))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action))
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 10240.0)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 23 of type industrialb-board-vent
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-skel! ((this industrialb-board-vent))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1272
File diff suppressed because it is too large
Load Diff
+1544
File diff suppressed because it is too large
Load Diff
+691
@@ -0,0 +1,691 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-onin-clap-effect
|
||||
:id 925
|
||||
:duration (seconds 1)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3314 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.017))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.017))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3314
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 6.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.033333335))
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.00008333333))
|
||||
(:friction 0.9 0.02)
|
||||
(:timer (seconds 1) (seconds 1.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
(:conerot-x (degrees 30) (degrees 90))
|
||||
(:conerot-y (degrees -32) (degrees 64))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3315
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 15.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.033333335))
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.008888889 -0.008888889)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:friction 0.9 0.02)
|
||||
(:timer (seconds 3))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 30) (degrees 90))
|
||||
(:conerot-y (degrees -32) (degrees 64))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-onin-big-clap-effect
|
||||
:id 926
|
||||
:duration (seconds 1)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3317 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.017))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.017))
|
||||
(sp-item 3319 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 15)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3319
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 3))
|
||||
(:rot-x (degrees 1.125))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 100.0)
|
||||
(:omega (degrees 1361.25))
|
||||
(:fade-a -1.25)
|
||||
(:timer (seconds 0.267))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 409.6)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3317
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 6.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:vel-y (meters 0.1) (meters 0.016666668))
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.00008333333))
|
||||
(:friction 0.9 0.01)
|
||||
(:timer (seconds 1) (seconds 1.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
(:conerot-x (degrees 82) (degrees 10))
|
||||
(:conerot-y (degrees -10) (degrees 10))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3318
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 10.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:vel-y (meters 0.1) (meters 0.016666668))
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.008888889 -0.008888889)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:friction 0.9 0.01)
|
||||
(:timer (seconds 3))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 82) (degrees 10))
|
||||
(:conerot-y (degrees -10) (degrees 10))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-onin-finger-effect
|
||||
:id 927
|
||||
:duration (seconds 0.15)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3320 :falloff-to (meters 20)) (sp-item 3321 :falloff-to (meters 20)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3320
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 0.0 1.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:timer (seconds 1) (seconds 2.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3316
|
||||
:init-specs ((:scale-x (meters 0.01) (meters 0.02))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 255.0)
|
||||
(:scalevel-x (meters 0))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r 0.0)
|
||||
(:fade-g 0.0)
|
||||
(:next-time (seconds 0.017))
|
||||
(:next-launcher 3322)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3322
|
||||
:init-specs ((:r 0.0) (:g 64.0 64.0) (:b 255.0) (:a 64.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 3316))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3321
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 8.0)
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.026666667 -0.026666667)
|
||||
(:timer (seconds 0.5) (seconds 1.497))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-onin-small-finger-effect
|
||||
:id 928
|
||||
:duration (seconds 0.15)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3323 :falloff-to (meters 15)) (sp-item 3324 :falloff-to (meters 15)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3323
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 0.0 1.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:timer (seconds 0.5) (seconds 1.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3324
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 8.0)
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.026666667 -0.026666667)
|
||||
(:timer (seconds 0.5) (seconds 0.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(load-scene (new 'static 'scene
|
||||
:name "city-find-catacomb-ent-intro"
|
||||
:extra #f
|
||||
:info #f
|
||||
:scene-flags (scene-flags scf1 scf2 scf3 scf4)
|
||||
:mask-to-clear (process-mask movie projectile)
|
||||
:entity "scene-stage-32"
|
||||
:art-group "scenecamera"
|
||||
:anim "city-find-catacomb-ent-intro"
|
||||
:parts 15
|
||||
:command-list '((100
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
)
|
||||
(640
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
)
|
||||
(857
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
)
|
||||
(998
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
)
|
||||
(1750 (fadeout (frame-time-30 30)))
|
||||
(10000 (task-close! "palace-ruins-patrol-introduction"))
|
||||
)
|
||||
:cut-list '(44 352 456 509 550 612 640 768 857 998 1241 1342 1485 1660)
|
||||
:wait-ground-time (seconds 1)
|
||||
:actor (new 'static 'boxed-array :type scene-actor
|
||||
(new 'static 'scene-actor
|
||||
:name "scenecamera"
|
||||
:level #f
|
||||
:art-group "skel-scenecamera"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:camera 4
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "jakc-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-jakc-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min 1241) (1342 max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
:no-draw-seg #x280
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "sidekick-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-sidekick-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "onin-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-onin-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "pecker-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-pecker-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "samos-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-samos-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min 768) (857 max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
)
|
||||
:load-point "onintent-start"
|
||||
:end-point "onintent-end"
|
||||
:borrow '()
|
||||
:sfx-volume -1.0
|
||||
:ambient-volume 0.5
|
||||
:music-delay 1500.0
|
||||
:on-running #f
|
||||
:on-complete #f
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
Generated
Vendored
+640
@@ -0,0 +1,640 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *ctyport-attack-bbush-positions*, type (array ctyport-attack-package-info)
|
||||
(define *ctyport-attack-bbush-positions* (new 'loading-level 'boxed-array ctyport-attack-package-info 64))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(dotimes (gp-0 (-> *ctyport-attack-bbush-positions* allocated-length))
|
||||
(set! (-> *ctyport-attack-bbush-positions* gp-0) (new 'loading-level 'ctyport-attack-package-info))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *ctyport-attack-bbush-positions* length) 0)
|
||||
|
||||
;; definition for symbol *ctyport-bbush-mine-positions*, type (array ctyport-mine-layout)
|
||||
(define *ctyport-bbush-mine-positions*
|
||||
(new 'static 'boxed-array :type ctyport-mine-layout
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 7
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1984389.1 :z 6423224.5)
|
||||
:initial-angle 16384.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 7
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 5
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1924341.8 :z 7077519.5)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 5
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1087733.8 :z 7747666.0)
|
||||
:initial-angle 16384.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 4
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x -262144.0 :z 5992448.0)
|
||||
:initial-angle 24576.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 4
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 7
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 205496.31 :z 5999370.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 8
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 7
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 965550.06 :z 6243574.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 8
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 507904.0 :z 6541312.0)
|
||||
:initial-angle 16384.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 958177.25 :z 7158210.5)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 623411.2 :z 7167959.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x -81920.0 :z 5771264.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 81920.0 :z 5578752.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 156999.69 :z 5603287.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 4
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 639508.5 :z 5754306.5)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 4
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 3
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1331200.0 :z 5947392.0)
|
||||
:initial-angle 8192.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 4
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 2
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1544192.0 :z 5701632.0)
|
||||
:initial-angle 24576.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x -593920.0 :z 6385664.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1454080.0 :z 6524928.0)
|
||||
:initial-angle 8192.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 442368.0 :z 7557120.0)
|
||||
:initial-angle 10922.667
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type ctyport-attack-manager-bbush
|
||||
(deftype ctyport-attack-manager-bbush (ctyport-attack-manager)
|
||||
((actor-group (pointer actor-group))
|
||||
(actor-group-count int32)
|
||||
(clock-speed float)
|
||||
(countdown-timer handle :offset 336)
|
||||
)
|
||||
(:state-methods
|
||||
wait-award
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ctyport-attack-manager-bbush
|
||||
(defmethod inspect ((this ctyport-attack-manager-bbush))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-7)
|
||||
)
|
||||
(let ((t9-0 (method-of-type ctyport-attack-manager inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tactor-group: #x~X~%" (-> this actor-group))
|
||||
(dotimes (s5-0 (-> this actor-group-count))
|
||||
(format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0))
|
||||
)
|
||||
(format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count))
|
||||
(format #t "~2Tclock-speed: ~f~%" (-> this clock-speed))
|
||||
(format #t "~2Thud-timer: ~D~%" (-> this hud-timer))
|
||||
(format #t "~2Tcountdown-timer: ~D~%" (-> this countdown-timer))
|
||||
(label cfg-7)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 20 of type ctyport-attack-manager-bbush
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init! ((this ctyport-attack-manager-bbush))
|
||||
(local-vars (sv-96 res-tag))
|
||||
(let ((t9-0 (method-of-type task-manager init!)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set-setting! 'stop-boats? #t 0.0 0)
|
||||
(set-setting! 'extra-bank '((ctywide2 cityff) (ctywide3 portatk1)) 0.0 0)
|
||||
(set-setting! 'lock-sound-camera-to-target #t 0.0 0)
|
||||
(set! (-> this hud-timer)
|
||||
(ppointer->handle (process-spawn hud-timer :init hud-init-by-other :name "hud-timer" :to this))
|
||||
)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'hour 16)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0)
|
||||
(set! (-> this inactive-mine-list) (new 'process 'handle-array 80))
|
||||
(set! (-> this inactive-mine-list length) 0)
|
||||
(set! (-> this clock-speed) 1.0)
|
||||
(dotimes (s5-1 80)
|
||||
(let ((v1-31 (process-spawn
|
||||
ctyport-mine
|
||||
:name "ctyport-mine"
|
||||
:from (if (>= s5-1 40)
|
||||
*port-attack-dead-pool*
|
||||
*default-dead-pool*
|
||||
)
|
||||
:to this
|
||||
:stack-size 2048
|
||||
)
|
||||
)
|
||||
)
|
||||
(push-back (-> this inactive-mine-list) (process->handle (-> v1-31 0)))
|
||||
)
|
||||
)
|
||||
(set! (-> this mine-layout) *ctyport-bbush-mine-positions*)
|
||||
(set! sv-96 (new 'static 'res-tag))
|
||||
(let ((v1-40 (res-lump-data (entity-by-name "port-attack-bbush-1") 'actor-groups pointer :tag-ptr (& sv-96))))
|
||||
(cond
|
||||
((and v1-40 (nonzero? (-> sv-96 elt-count)))
|
||||
(set! (-> this actor-group) (the-as (pointer actor-group) v1-40))
|
||||
(set! (-> this actor-group-count) (the-as int (-> sv-96 elt-count)))
|
||||
)
|
||||
(else
|
||||
(set! (-> this actor-group) (the-as (pointer actor-group) #f))
|
||||
(set! (-> this actor-group-count) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-46 (-> *ctyport-package-positions* length))
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-46 pos quad) (-> *ctyport-package-positions* v1-46 pos quad))
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-46 on-water?) (-> *ctyport-package-positions* v1-46 on-water?))
|
||||
)
|
||||
(set! (-> *ctyport-attack-bbush-positions* length) (-> *ctyport-package-positions* length))
|
||||
(when (-> this actor-group)
|
||||
(let ((v1-53 0))
|
||||
(dotimes (a0-35 (-> this actor-group 0 length))
|
||||
(let ((a1-36 (-> this actor-group 0 data a0-35 actor)))
|
||||
(when a1-36
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-53 pos quad) (-> a1-36 extra trans quad))
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-53 on-water?) #f)
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-53 probe?) #t)
|
||||
(+! v1-53 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> *ctyport-attack-bbush-positions* length) v1-53)
|
||||
)
|
||||
)
|
||||
(set! (-> this package-positions) *ctyport-attack-bbush-positions*)
|
||||
(dotimes (v1-55 (-> this mine-layout length))
|
||||
(set! (-> this mine-layout v1-55 active?) #f)
|
||||
(dotimes (a0-42 (-> this mine-layout v1-55 num-mines))
|
||||
(set! (-> this mine-layout v1-55 stored-handles a0-42) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 50 of type ctyport-attack-manager-bbush
|
||||
(defmethod play-speech ((this ctyport-attack-manager-bbush) (arg0 int))
|
||||
(let ((v1-0 arg0))
|
||||
(if (or (zero? v1-0)
|
||||
(= v1-0 1)
|
||||
(= v1-0 2)
|
||||
(= v1-0 3)
|
||||
(= v1-0 4)
|
||||
(= v1-0 5)
|
||||
(= v1-0 6)
|
||||
(= v1-0 7)
|
||||
(= v1-0 8)
|
||||
(= v1-0 13)
|
||||
)
|
||||
(the-as int #f)
|
||||
(call-parent-method this arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(set-setting! 'board #f 0.0 0)
|
||||
(send-event *target* 'end-mode 'board)
|
||||
(suspend)
|
||||
(while (or (not *target*)
|
||||
(not *spawn-actors*)
|
||||
(!= (status-of-level-and-borrows *level* 'lpatkcs #f) 'active)
|
||||
(focus-test? *target* board)
|
||||
)
|
||||
(if *target*
|
||||
(process-grab? *target* #f)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(process-release? *target*)
|
||||
(set-time-limit self)
|
||||
(ctyport-attack-setup)
|
||||
(set-setting! 'exclusive-load '((ignore all)) 0.0 0)
|
||||
(let ((a1-7 (new 'stack-no-clear 'array 'symbol 10)))
|
||||
(set! (-> a1-7 9) #f)
|
||||
(set! (-> a1-7 8) #f)
|
||||
(set! (-> a1-7 7) #f)
|
||||
(set! (-> a1-7 6) #f)
|
||||
(set! (-> a1-7 5) #f)
|
||||
(set! (-> a1-7 4) #f)
|
||||
(set! (-> a1-7 3) #f)
|
||||
(set! (-> a1-7 2) 'ctyinda)
|
||||
(set! (-> a1-7 1) 'ctyport)
|
||||
(set! (-> a1-7 0) 'ctywide-ff)
|
||||
(want-levels *load-state* a1-7)
|
||||
)
|
||||
(want-display-level *load-state* 'ctyport 'display)
|
||||
(want-display-level *load-state* 'ctyinda 'display)
|
||||
(set! (-> self current-package-index) 0)
|
||||
(let* ((a0-15 *setting-control*)
|
||||
(t9-11 (method-of-object a0-15 set-setting))
|
||||
(a2-5 'stop-boats?)
|
||||
(a3-2 #t)
|
||||
)
|
||||
(t9-11 a0-15 self a2-5 a3-2 0 0)
|
||||
(let ((t9-12 kill-by-type)
|
||||
(a0-16 barge)
|
||||
(a1-11 *active-pool*)
|
||||
)
|
||||
(t9-12 a0-16 a1-11)
|
||||
(apply-settings *setting-control*)
|
||||
(let* ((v1-34 (the-as entity-actor (entity-by-name "boat-manager-1")))
|
||||
(a0-19 (if v1-34
|
||||
(-> v1-34 extra process)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-19
|
||||
(apply-alignment
|
||||
(the-as process-focusable a0-19)
|
||||
(the-as align-opts a1-11)
|
||||
(the-as transformq a2-5)
|
||||
(the-as vector a3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ctyport-attack-manager-method-45 self)
|
||||
(send-event *target* 'change-mode 'pilot-daxter (handle->process (-> self active-torpedo)))
|
||||
(go-virtual pickup-nukes)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *port-attack-bbush-fail-sphere*, type sphere
|
||||
(define *port-attack-bbush-fail-sphere* (new 'static 'sphere :x 2651996.2 :y 31539.2 :z 5880709.0 :r 1.0))
|
||||
|
||||
;; definition for symbol *port-attack-bbush-fail-radius*, type float
|
||||
(define *port-attack-bbush-fail-radius* 163840.0)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pickup-nukes (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-1 (-> (find-parent-state) enter)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
)
|
||||
(set! (-> self countdown-timer) (the-as handle (current-time)))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance (target-pos 0) *port-attack-bbush-fail-sphere*) *port-attack-bbush-fail-radius*)
|
||||
(send-event self 'fail)
|
||||
)
|
||||
(set! (-> *game-info* timer) (- (seconds 140) (- (current-time) (the-as int (-> self countdown-timer)))))
|
||||
(if (<= (-> *game-info* timer) 0)
|
||||
(send-event self 'fail)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate head-to-wall (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:event ctyport-attack-manager-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* game-clock frame-counter))
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> (method-of-type task-manager active) trans))
|
||||
(let ((f30-0
|
||||
(fmax
|
||||
0.0
|
||||
(fmin 1.0 (* 0.0022222223 (the float (- (-> *display* game-clock frame-counter) (-> self state-time)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self clock-speed) (lerp 1.0 0.0 f30-0))
|
||||
(update-rates! (-> *display* entity-clock) (-> self clock-speed))
|
||||
(update-rates! (-> *display* target-clock) (-> self clock-speed))
|
||||
(set-setting! 'bg-r 'abs 1.0 0)
|
||||
(set-setting! 'bg-g 'abs 1.0 0)
|
||||
(set-setting! 'bg-b 'abs 1.0 0)
|
||||
(set-setting! 'bg-a 'abs f30-0 0)
|
||||
(when (= f30-0 1.0)
|
||||
(update-rates! (-> *display* entity-clock) 1.0)
|
||||
(update-rates! (-> *display* target-clock) 1.0)
|
||||
(let ((a1-10 (get-continue-by-name *game-info* "ctyport-bbush-port-4")))
|
||||
(when a1-10
|
||||
(start 'play a1-10)
|
||||
(go-virtual wait-award)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 51 of type ctyport-attack-manager-bbush
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch quaternion vs object.
|
||||
(defmethod ctyport-attack-manager-method-51 ((this ctyport-attack-manager-bbush) (arg0 traffic-object-spawn-params))
|
||||
(set! (-> arg0 position quad) (-> (new 'static 'vector :x 2492384.8 :y 34605.055 :z 6578958.5 :w 1.0) quad))
|
||||
(quaternion-copy! (-> arg0 rotation) (new 'static 'quaternion :x 0.0002 :y 0.6305 :z 0.0011 :w -0.7761))
|
||||
(let ((v1-1 (the-as entity-actor (entity-by-name "port-attack-bbush-1"))))
|
||||
(when v1-1
|
||||
(set! (-> arg0 position quad) (-> v1-1 extra trans quad))
|
||||
(quaternion-copy! (-> arg0 rotation) (-> v1-1 quat))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 25 of type ctyport-attack-manager-bbush
|
||||
(defmethod task-manager-method-25 ((this ctyport-attack-manager-bbush))
|
||||
(update-rates! (-> *display* entity-clock) 1.0)
|
||||
(update-rates! (-> *display* target-clock) 1.0)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-award (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:event task-manager-event-handler
|
||||
:code (behavior ()
|
||||
(while (or (not *target*) (not *spawn-actors*) (not (entity-by-name "burning-bush-36")))
|
||||
(if *target*
|
||||
(process-grab? *target* #f)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(remove-setting! 'bg-r)
|
||||
(remove-setting! 'bg-g)
|
||||
(remove-setting! 'bg-b)
|
||||
(remove-setting! 'bg-a)
|
||||
(remove-setting! 'music)
|
||||
(until (process-grab? *target* #f)
|
||||
(suspend)
|
||||
)
|
||||
(until (= (-> *setting-control* user-current bg-a) 0.0)
|
||||
(suspend)
|
||||
)
|
||||
(give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f))
|
||||
(until (process-release? *target*)
|
||||
(suspend)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+3307
File diff suppressed because it is too large
Load Diff
+2097
File diff suppressed because it is too large
Load Diff
+2864
File diff suppressed because it is too large
Load Diff
+1784
File diff suppressed because it is too large
Load Diff
+1548
File diff suppressed because it is too large
Load Diff
+2508
File diff suppressed because it is too large
Load Diff
+1792
File diff suppressed because it is too large
Load Diff
+1462
File diff suppressed because it is too large
Load Diff
+317
@@ -0,0 +1,317 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type cty-elevator
|
||||
(deftype cty-elevator (elevator)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cty-elevator
|
||||
(defmethod inspect ((this cty-elevator))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type elevator inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-cty-elevator cty-elevator cty-elevator-lod0-jg cty-elevator-idle-ja
|
||||
((cty-elevator-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 10)
|
||||
)
|
||||
|
||||
;; definition for method 31 of type cty-elevator
|
||||
(defmethod get-art-group ((this cty-elevator))
|
||||
(art-group-get-by-name *level* "skel-cty-elevator" (the-as (pointer level) #f))
|
||||
)
|
||||
|
||||
;; definition for method 32 of type cty-elevator
|
||||
;; WARN: Return type mismatch collide-shape-moving vs none.
|
||||
(defmethod init-collision! ((this cty-elevator))
|
||||
(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)
|
||||
)
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 2))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec camera-blocker pusher))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec jak 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 0.0 40960.0)
|
||||
(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 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 0.0 40960.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-18 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 44 of type cty-elevator
|
||||
(defmethod init-sound! ((this cty-elevator))
|
||||
(set! (-> this sound-running-loop) (static-sound-spec "hqlift-loop" :group 0))
|
||||
(set! (-> this sound-arrived) (static-sound-spec "hqlift-stop" :group 0))
|
||||
(set! (-> this sound-start) (static-sound-spec "hqlift-start" :group 0))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for symbol *ctyslumc-water-texture-anim-array*, type texture-anim-array
|
||||
(define *ctyslumc-water-texture-anim-array*
|
||||
(new 'static 'texture-anim-array :type texture-anim
|
||||
(new 'static 'texture-anim
|
||||
:num-layers #x3
|
||||
:func #f
|
||||
:init-func-id 'texture-anim-overide-size-init
|
||||
:tex #f
|
||||
:tex-name "ctyslumc-water-dest"
|
||||
:extra (new 'static 'vector :x 128.0 :y 128.0 :z 4.0)
|
||||
:color (new 'static 'rgba :a #x80)
|
||||
:frame-delta 300.0
|
||||
:frame-mod 2100.0
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
:clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
:data (new 'static 'array texture-anim-layer 6
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 2100.0
|
||||
:tex-name "ctyslumc-water"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.33 0.33))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-st-rot (degrees 180)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.33 1.33))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-st-rot (degrees 180)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 2100.0
|
||||
:tex-name "ctyslumc-water"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.67 0.67))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-st-rot (degrees 90)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.67 1.67))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-st-rot (degrees 90)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 2100.0
|
||||
:tex-name "ctyslumc-water"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.0))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 1.0))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'texture-anim
|
||||
:num-layers #x3
|
||||
:func #f
|
||||
:init-func-id 'texture-anim-overide-size-init
|
||||
:tex #f
|
||||
:tex-name "ctyslumc-fountain-fall-dest"
|
||||
:extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0)
|
||||
:color (new 'static 'rgba :a #x80)
|
||||
:frame-delta 300.0
|
||||
:frame-mod 600.0
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
:clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
:data (new 'static 'array texture-anim-layer 6
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 600.0
|
||||
:tex-name "ctyslumc-fountain-fall"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -0.3 0.0))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -1.3 -1.0))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 600.0
|
||||
:tex-name "ctyslumc-fountain-fall"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.3 -0.5))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.3 -2.5))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'texture-anim-layer
|
||||
:func-id 'default-texture-anim-layer-func
|
||||
:init-func #f
|
||||
:tex #f
|
||||
:end-time 600.0
|
||||
:tex-name "ctyslumc-fountain-fall"
|
||||
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 -0.25))
|
||||
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 -3.25))
|
||||
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type ctyslumc-flag
|
||||
(deftype ctyslumc-flag (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ctyslumc-flag
|
||||
(defmethod inspect ((this ctyslumc-flag))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-ctyslumc-flag ctyslumc-flag ctyslumc-flag-lod0-jg ctyslumc-flag-idle-ja
|
||||
((ctyslumc-flag-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 -7 0 12)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (ctyslumc-flag)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; definition for method 11 of type ctyslumc-flag
|
||||
(defmethod init-from-entity! ((this ctyslumc-flag) (arg0 entity-actor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctyslumc-flag" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
;; definition for function ctyslumc-flag-init-by-other
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior ctyslumc-flag-init-by-other ctyslumc-flag ((arg0 vector) (arg1 entity-actor))
|
||||
(process-entity-set! self arg1)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctyslumc-flag" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+898
@@ -0,0 +1,898 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ctyslumc-streetlight-glows
|
||||
:id 986
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 6 :fade-after (meters 120) :flags (sp6) :hour-mask #b111111111110000000)
|
||||
(sp-item 7 :fade-after (meters 120) :flags (sp6) :hour-mask #b111111111110000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 6
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2.5) (meters 0.1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 32.0)
|
||||
(:omega (degrees 2715.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 7
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 16) (meters 0.1))
|
||||
(:rot-x (degrees 4.5))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0 255.0)
|
||||
(:b 255.0)
|
||||
(:a 16.0)
|
||||
(:omega (degrees 2715.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ctyslumc-chimney
|
||||
:id 987
|
||||
:bounds (static-bspherem 0 0 -10 24)
|
||||
:parts ((sp-item 3605 :fade-after (meters 200) :falloff-to (meters 300))
|
||||
(sp-item 3606 :fade-after (meters 200) :flags (sp6))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3606
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 16) (meters 0.1))
|
||||
(:rot-x (degrees 6.7500005))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 240.0)
|
||||
(:b 100.0)
|
||||
(:a 12.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 6144.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3605
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:birth-func 'birth-func-texture-group)
|
||||
(:num 0.0 0.5)
|
||||
(:scale-x (meters 1) (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 32.0 32.0)
|
||||
(:vel-y (meters 0.03) (meters 0.01))
|
||||
(:scalevel-x (meters 0.026666667) (meters 0.006666667))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r 0.0)
|
||||
(:fade-g -0.36)
|
||||
(:fade-b -4.24)
|
||||
(:fade-a -0.053333335 -0.053333335)
|
||||
(:accel-x (meters -0.00066666666) (meters -0.00033333333))
|
||||
(:accel-y (meters 0.0001) (meters 0.0001))
|
||||
(:friction 0.96)
|
||||
(:timer (seconds 8))
|
||||
(:flags (sp-cpuinfo-flag-2))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700))
|
||||
(:next-time (seconds 0.085) (seconds 0.015))
|
||||
(:next-launcher 3607)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3607
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.035) (seconds 0.13)) (:next-launcher 3608))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3608
|
||||
:init-specs ((:scalevel-x (meters 0.013333334) (meters 0.0033333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.14666666)
|
||||
(:fade-g -0.7866667)
|
||||
(:fade-b -0.88)
|
||||
(:next-time (seconds 0.35) (seconds 0.147))
|
||||
(:next-launcher 3609)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3609
|
||||
:init-specs ((:scalevel-x (meters 0.006666667) (meters 0.0016666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -1.2944444)
|
||||
(:fade-g -0.7111111)
|
||||
(:fade-b -0.094444446)
|
||||
(:next-time (seconds 0.5) (seconds 0.097))
|
||||
(:next-launcher 3610)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3610
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.024))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ctyslumc-chimney-smoke
|
||||
:id 988
|
||||
:bounds (static-bspherem 0 0 -12 24)
|
||||
:parts ((sp-item 3611 :fade-after (meters 200) :falloff-to (meters 300)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3611
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:birth-func 'birth-func-texture-group)
|
||||
(:num 0.0 0.4)
|
||||
(:scale-x (meters 1) (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0 128.0)
|
||||
(:g :copy r)
|
||||
(:b :copy g)
|
||||
(:a 24.0 24.0)
|
||||
(:vel-y (meters 0.03) (meters 0.01))
|
||||
(:scalevel-x (meters 0.026666667) (meters 0.006666667))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.21333334)
|
||||
(:fade-g -0.21333334)
|
||||
(:fade-b -0.21333334)
|
||||
(:fade-a -0.026666667 -0.026666667)
|
||||
(:accel-x (meters -0.00066666666) (meters -0.00033333333))
|
||||
(:accel-y (meters 0.0001) (meters 0.0001))
|
||||
(:friction 0.96)
|
||||
(:timer (seconds 6))
|
||||
(:flags (sp-cpuinfo-flag-2))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700))
|
||||
(:next-time (seconds 0.25) (seconds 0.015))
|
||||
(:next-launcher 3612)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3612
|
||||
:init-specs ((:scalevel-x (meters 0.013333334) (meters 0.0033333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:next-time (seconds 0.35) (seconds 0.147))
|
||||
(:next-launcher 3613)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3613
|
||||
:init-specs ((:scalevel-x (meters 0.006666667) (meters 0.0016666667)) (:scalevel-y :copy scalevel-x))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-big-a
|
||||
:id 989
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3614 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3615 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3614
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0))
|
||||
(:scale-x (meters 34))
|
||||
(:rot-x (degrees 180))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 19))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3615
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-big-b
|
||||
:id 990
|
||||
:flags (sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 3616 :flags (is-3d sp7))
|
||||
(sp-item 3617 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3616
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:y (meters 0))
|
||||
(:z (meters -0.5))
|
||||
(:scale-x (meters 31.5))
|
||||
(:rot-x (degrees 180))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 0))
|
||||
(:scale-y (meters 9.5))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3617
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-square-a
|
||||
:id 991
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3618 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3619 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3620 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3618
|
||||
:init-specs ((:texture (sign-square-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00100 -2139062144 0 1 #xaa00100 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3619
|
||||
:init-specs ((:texture (sign-square-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 180))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00100 -2139062144 0 1 #xaa00100 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3620
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-square-b
|
||||
:id 992
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3621 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3622 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3623 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3621
|
||||
:init-specs ((:texture (sign-square-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00300 -2139062144 0 1 #xaa00300 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3622
|
||||
:init-specs ((:texture (sign-square-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00300 -2139062144 0 1 #xaa00300 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3623
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-wide-a
|
||||
:id 993
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3624 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3625 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3626 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3624
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 17))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3625
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 17))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3626
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-wide-b
|
||||
:id 994
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3627 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3628 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3629 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3627
|
||||
:init-specs ((:texture (sign-wide-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 15))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00d00 -2139062144 0 1 #xaa00d00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3628
|
||||
:init-specs ((:texture (sign-wide-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 15))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00d00 -2139062144 0 1 #xaa00d00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3629
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-tall-a
|
||||
:id 995
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3630 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3631 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3632 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3630
|
||||
:init-specs ((:texture (sign-tall-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 15))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00a00 -2139062144 0 1 #xaa00a00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3631
|
||||
:init-specs ((:texture (sign-tall-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 15))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00a00 -2139062144 0 1 #xaa00a00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3632
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sign-ctyslumc-tall-b
|
||||
:id 996
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3633 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3634 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3635 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3633
|
||||
:init-specs ((:texture (sign-tall-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.1))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 14))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00b00 -2139062144 0 1 #xaa00b00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3634
|
||||
:init-specs ((:texture (sign-tall-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.05))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 14))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00b00 -2139062144 0 1 #xaa00b00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3635
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-gunship-target-explode
|
||||
:id 997
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 3636 :flags (sp3) :period (seconds 30) :length (seconds 0.017))
|
||||
(sp-item 3637 :flags (sp7) :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 3638 :flags (sp7) :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 3639 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 3640 :period (seconds 30) :length (seconds 0.035))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3640
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 50.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 0.4) (meters 0.6))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 30.0)
|
||||
(:g 30.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0.1125))
|
||||
(:vel-y (meters 0.16666667) (meters 0.33333334))
|
||||
(:scalevel-x (meters -0.00083333335))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.28444445 -0.28444445)
|
||||
(:accel-y (meters -0.008333334))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 1.5))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-motion-blur)
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3636
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 225))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 40.0)
|
||||
(:g 40.0)
|
||||
(:b 200.0)
|
||||
(:a 64.0)
|
||||
(:fade-a -0.21333334)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 40960.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3637
|
||||
:init-specs ((:texture (colorflash level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2) (meters 6))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:scalevel-x (meters -0.033333335))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:timer (seconds 0.067))
|
||||
(:flags (sp-cpuinfo-flag-3 glow))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3638
|
||||
:init-specs ((:texture (ring level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 15))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 32.0)
|
||||
(:b 128.0)
|
||||
(:a 8.0)
|
||||
(:timer (seconds 0.035))
|
||||
(:flags (sp-cpuinfo-flag-3 glow))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 3639
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 40))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 64.0)
|
||||
(:fade-a -3.2)
|
||||
(:timer (seconds 0.067))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1057
File diff suppressed because it is too large
Load Diff
+3657
File diff suppressed because it is too large
Load Diff
+1010
File diff suppressed because it is too large
Load Diff
+321
@@ -0,0 +1,321 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type citizen-enemy
|
||||
(deftype citizen-enemy (citizen)
|
||||
((next-update-target time-frame)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:methods
|
||||
(set-traffic-danger (_type_) none)
|
||||
(find-new-focus (_type_) object)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type citizen-enemy
|
||||
(defmethod inspect ((this citizen-enemy))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type citizen inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tnext-update-target: ~D~%" (-> this next-update-target))
|
||||
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> this minimap))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 59 of type citizen-enemy
|
||||
(defmethod enemy-common-post ((this citizen-enemy))
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-0 options) (overlaps-others-options))
|
||||
(set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter))
|
||||
(set! (-> a1-0 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> this root) a1-0)
|
||||
)
|
||||
(when (and (not (focus-test? this disable dead ignore inactive))
|
||||
(< (-> this next-update-target) (current-time))
|
||||
(not (logtest? (enemy-flag lock-focus) (-> this enemy-flags)))
|
||||
(-> this next-state)
|
||||
(= (-> this next-state name) 'active)
|
||||
)
|
||||
(find-new-focus this)
|
||||
(set! (-> this next-update-target) (+ (current-time) (seconds 0.2)))
|
||||
(set-traffic-danger this)
|
||||
)
|
||||
((method-of-type citizen enemy-common-post) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 84 of type citizen-enemy
|
||||
(defmethod send-attack-on-jump-or-knocked ((this citizen-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
((and (-> this next-state) (let ((v1-3 (-> this next-state name)))
|
||||
(or (= v1-3 'knocked) (= v1-3 'jump))
|
||||
)
|
||||
)
|
||||
((method-of-type citizen send-attack-on-jump-or-knocked) this arg0 arg1)
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-6 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask guard civilian) (-> arg0 mask))
|
||||
(and v1-6
|
||||
(not (logtest? (-> (the-as process-focusable v1-6) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> this persistent-attack-id)
|
||||
(-> this attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(send-event arg0 'touch (-> arg1 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 82 of type citizen-enemy
|
||||
(defmethod event-handler ((this citizen-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('event-death)
|
||||
#f
|
||||
)
|
||||
(('effect-control)
|
||||
(let ((a0-3 (-> arg3 param 0)))
|
||||
(cond
|
||||
((string= (the-as string a0-3) "death-default")
|
||||
(cond
|
||||
((< 0.0 (-> this hit-points))
|
||||
#t
|
||||
)
|
||||
(else
|
||||
(let ((v1-2 (-> this root root-prim)))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('end-task)
|
||||
(let ((v0-0 (the-as object (logclear (-> this flags) (citizen-flag persistent)))))
|
||||
(set! (-> this flags) (the-as citizen-flag v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type citizen event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 216 of type citizen-enemy
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-traffic-danger ((this citizen-enemy))
|
||||
(let ((a1-0 (new 'stack-no-clear 'traffic-danger-info)))
|
||||
(set! (-> a1-0 sphere quad) (-> this root trans quad))
|
||||
(set! (-> a1-0 sphere r) 40960.0)
|
||||
(set! (-> a1-0 velocity quad) (-> this root transv quad))
|
||||
(set! (-> a1-0 notify-radius) 122880.0)
|
||||
(set! (-> a1-0 danger-level) 1.0)
|
||||
(set! (-> a1-0 decay-rate) 0.0)
|
||||
(set! (-> a1-0 flags) (the-as uint 1))
|
||||
(set! (-> a1-0 danger-type) (the-as uint 7))
|
||||
(set! (-> a1-0 handle) (process->handle this))
|
||||
(add-danger (-> this controller traffic) a1-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 217 of type citizen-enemy
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod find-new-focus ((this citizen-enemy))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> this root trans quad))
|
||||
(set! (-> s5-0 w) 122880.0)
|
||||
(let ((s4-0 (the-as process-drawable #f)))
|
||||
(let ((f30-0 122880.0))
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 64)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 64))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(a0-6 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when a0-6
|
||||
(let* ((s0-0 (-> a0-6 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s1-1
|
||||
(!= this s1-1)
|
||||
(not (focus-test? (the-as process-focusable s1-1) inactive))
|
||||
(not (focus-test? (the-as process-focusable s1-1) disable))
|
||||
(not (logtest? (process-mask enemy) (-> s1-1 mask)))
|
||||
(not (logtest? (process-mask crate) (-> s1-1 mask)))
|
||||
(not (logtest? (process-mask vehicle) (-> s1-1 mask)))
|
||||
s1-1
|
||||
(not (logtest? (-> (the-as process-focusable s1-1) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
(let ((f0-1 (vector-vector-xz-distance (-> this root trans) (-> s1-1 root trans))))
|
||||
(when (or (not s4-0) (< f0-1 f30-0))
|
||||
(set! s4-0 s1-1)
|
||||
(set! f30-0 f0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and *target* (< (vector-vector-distance (target-pos 0) s5-0) f30-0))
|
||||
(set! s4-0 *target*)
|
||||
)
|
||||
)
|
||||
(when s4-0
|
||||
(try-update-focus (-> this focus) (the-as process-focusable s4-0) this)
|
||||
(go-hostile this)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (citizen-enemy)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
(let ((f30-0 (rnd-float-range self 0.8 1.2)))
|
||||
(until #f
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim))
|
||||
:num! (seek! max f30-0)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate inactive (citizen-enemy)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(let ((t9-0 (-> (method-of-type citizen inactive) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 194 of type citizen-enemy
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod citizen-method-194 ((this citizen-enemy))
|
||||
(let ((t9-0 (method-of-type citizen citizen-method-194)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(if (-> this skel effect)
|
||||
(logior! (-> this skel effect flags) (effect-control-flag ecf0))
|
||||
)
|
||||
(logior! (-> this mask) (process-mask enemy))
|
||||
(reset-to-collide-spec (-> this focus) (collide-spec jak civilian player-list bot-targetable jak-vehicle))
|
||||
(let ((v1-12 (-> this nav)))
|
||||
(set! (-> v1-12 sphere-mask) (the-as uint #x1000e8))
|
||||
)
|
||||
0
|
||||
(set! (-> this anim-shuffle) (-> this enemy-info walk-anim))
|
||||
(set! (-> this anim-walk) (-> this enemy-info walk-anim))
|
||||
(set! (-> this speed-walk) (-> this enemy-info walk-travel-speed))
|
||||
(set! (-> this dist-walk-anim) (-> this enemy-info walk-travel-speed))
|
||||
(set! (-> this anim-run) (-> this enemy-info run-anim))
|
||||
(set! (-> this dist-run-anim) (-> this enemy-info run-travel-speed))
|
||||
(set! (-> this speed-run) (-> this enemy-info run-travel-speed))
|
||||
(set! (-> this fated-time) 0)
|
||||
(logior! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
||||
(logior! (-> this focus-status) (focus-status dangerous))
|
||||
(logior! (-> this enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> this enemy-flags) (enemy-flag trackable trackable-backup))
|
||||
(logclear! (-> this focus-status) (focus-status dead))
|
||||
(logior! (-> this enemy-flags) (enemy-flag attackable attackable-backup))
|
||||
(if (not (-> this minimap))
|
||||
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 81 of type citizen-enemy
|
||||
(defmethod go-die ((this citizen-enemy))
|
||||
((method-of-type nav-enemy go-die) this)
|
||||
)
|
||||
|
||||
;; definition for method 78 of type citizen-enemy
|
||||
(defmethod go-hostile ((this citizen-enemy))
|
||||
(if (not (and (-> this next-state) (= (-> this next-state name) 'hostile)))
|
||||
(go (method-of-object this hostile))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 75 of type citizen-enemy
|
||||
(defmethod go-stare ((this citizen-enemy))
|
||||
(go (method-of-object this active))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1059
File diff suppressed because it is too large
Load Diff
+188
@@ -0,0 +1,188 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type citizen
|
||||
(deftype citizen (nav-enemy)
|
||||
((self citizen :override)
|
||||
(ppointer (pointer citizen) :override)
|
||||
(flags citizen-flag)
|
||||
(traffic-id int8)
|
||||
(hit-by-player-count int8)
|
||||
(gnd-height float)
|
||||
(speed-scale float)
|
||||
(controller vehicle-controller :inline)
|
||||
(squad squad-control)
|
||||
(danger-pos sphere :inline)
|
||||
(dest-point vector :inline :overlay-at (-> controller turn-exit-point))
|
||||
(vehicle handle)
|
||||
(formation handle :overlay-at vehicle)
|
||||
(formation-index int8)
|
||||
(anim-shuffle int32)
|
||||
(dist-walk-anim float)
|
||||
(speed-walk float)
|
||||
(anim-walk int32)
|
||||
(dist-run-anim float)
|
||||
(speed-run float)
|
||||
(anim-run int32)
|
||||
(travel-anim-scale-speed float)
|
||||
(water-anim int32)
|
||||
(interp float)
|
||||
(last-danger-time time-frame)
|
||||
(next-time-look-at time-frame)
|
||||
(stop-time-look-at time-frame)
|
||||
(wait-return-state (state citizen))
|
||||
(wait-time time-frame)
|
||||
(shield-handle handle)
|
||||
(cp-valid? symbol)
|
||||
(cp-sphere sphere :inline)
|
||||
(cp-vec vector :inline)
|
||||
(cp-next-time time-frame)
|
||||
(cp-exit-time time-frame)
|
||||
(cp-force vector :inline)
|
||||
(cp-plane plane :inline)
|
||||
(cp-factor float)
|
||||
(faction-mode uint8)
|
||||
(attacker-info city-attacker-info)
|
||||
(mission-squad mission-squad-control)
|
||||
(probe-counter uint32)
|
||||
)
|
||||
(:state-methods
|
||||
wait
|
||||
inactive
|
||||
in-ditch
|
||||
)
|
||||
(:methods
|
||||
(init-enemy-defaults! (_type_ nav-enemy-info) none :replace)
|
||||
(set-squad (_type_) none)
|
||||
(citizen-method-194 (_type_) none)
|
||||
(citizen-method-195 (_type_) none)
|
||||
(go-inactive (_type_) none)
|
||||
(find-segment (_type_ vector vector) nav-segment)
|
||||
(nav-segment-callback (_type_ vector traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none)
|
||||
(citizen-method-199 (_type_ nav-segment) none)
|
||||
(citizen-method-200 (_type_) symbol)
|
||||
(citizen-method-201 (_type_ vector) none)
|
||||
(citizen-method-202 (_type_ vector vector) none)
|
||||
(citizen-method-203 (_type_ vector) none)
|
||||
(gen-clear-path (_type_) nav-segment)
|
||||
(citizen-method-205 (_type_) none)
|
||||
(citizen-method-206 (_type_) none)
|
||||
(citizen-method-207 (_type_ vector float) nav-segment)
|
||||
(citizen-method-208 (_type_ vector) none)
|
||||
(get-run-anim (_type_) int)
|
||||
(citizen-method-210 (_type_ int process) none)
|
||||
(set-alert-level (_type_ int) none)
|
||||
(go-from-behavior (_type_ traffic-object-spawn-params) none)
|
||||
(citizen-method-213 (_type_) none)
|
||||
(citizen-method-214 (_type_ nav-control vector) none)
|
||||
(citizen-method-215 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type citizen
|
||||
(defmethod inspect ((this citizen))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-34)
|
||||
)
|
||||
(let ((t9-0 (method-of-type nav-enemy inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tflags: #x~X : (citizen-flag " (-> this flags))
|
||||
(let ((s5-0 (-> this flags)))
|
||||
(if (= (logand s5-0 (citizen-flag neck-no-auto-look-at)) (citizen-flag neck-no-auto-look-at))
|
||||
(format #t "neck-no-auto-look-at ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag in-formation)) (citizen-flag in-formation))
|
||||
(format #t "in-formation ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag talking)) (citizen-flag talking))
|
||||
(format #t "talking ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag female)) (citizen-flag female))
|
||||
(format #t "female ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag knocked-out-car)) (citizen-flag knocked-out-car))
|
||||
(format #t "knocked-out-car ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag sticky-weapon)) (citizen-flag sticky-weapon))
|
||||
(format #t "sticky-weapon ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag in-pursuit)) (citizen-flag in-pursuit))
|
||||
(format #t "in-pursuit ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag dark-guard)) (citizen-flag dark-guard))
|
||||
(format #t "dark-guard ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag hostile)) (citizen-flag hostile))
|
||||
(format #t "hostile ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag persistent)) (citizen-flag persistent))
|
||||
(format #t "persistent ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag shuffle-mode)) (citizen-flag shuffle-mode))
|
||||
(format #t "shuffle-mode ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag knocked-out-bike)) (citizen-flag knocked-out-bike))
|
||||
(format #t "knocked-out-bike ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag target-in-sight)) (citizen-flag target-in-sight))
|
||||
(format #t "target-in-sight ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag in-mission)) (citizen-flag in-mission))
|
||||
(format #t "in-mission ")
|
||||
)
|
||||
(if (= (logand s5-0 (citizen-flag run-mode)) (citizen-flag run-mode))
|
||||
(format #t "run-mode ")
|
||||
)
|
||||
)
|
||||
(format #t ")~%")
|
||||
(format #t "~2Ttraffic-id: ~D~%" (-> this traffic-id))
|
||||
(format #t "~2Thit-by-player-count: ~D~%" (-> this hit-by-player-count))
|
||||
(format #t "~2Tgnd-height: ~f~%" (-> this gnd-height))
|
||||
(format #t "~2Tspeed-scale: ~f~%" (-> this speed-scale))
|
||||
(format #t "~2Tcontroller: #<vehicle-controller @ #x~X>~%" (-> this controller))
|
||||
(format #t "~2Tsquad: ~A~%" (-> this squad))
|
||||
(format #t "~2Tdanger-pos: #<sphere @ #x~X>~%" (-> this danger-pos))
|
||||
(format #t "~2Tdest-point: #<vector @ #x~X>~%" (-> this dest-point))
|
||||
(format #t "~2Tvehicle: ~D~%" (-> this vehicle))
|
||||
(format #t "~2Tformation: ~D~%" (-> this vehicle))
|
||||
(format #t "~2Tformation-index: ~D~%" (-> this formation-index))
|
||||
(format #t "~2Tanim-shuffle: ~D~%" (-> this anim-shuffle))
|
||||
(format #t "~2Tdist-walk-anim: ~f~%" (-> this dist-walk-anim))
|
||||
(format #t "~2Tspeed-walk: ~f~%" (-> this speed-walk))
|
||||
(format #t "~2Tanim-walk: ~D~%" (-> this anim-walk))
|
||||
(format #t "~2Tdist-run-anim: ~f~%" (-> this dist-run-anim))
|
||||
(format #t "~2Tspeed-run: ~f~%" (-> this speed-run))
|
||||
(format #t "~2Tanim-run: ~D~%" (-> this anim-run))
|
||||
(format #t "~2Ttravel-anim-scale-speed: ~f~%" (-> this travel-anim-scale-speed))
|
||||
(format #t "~2Twater-anim: ~D~%" (-> this water-anim))
|
||||
(format #t "~2Tinterp: ~f~%" (-> this interp))
|
||||
(format #t "~2Tlast-danger-time: ~D~%" (-> this last-danger-time))
|
||||
(format #t "~2Tnext-time-look-at: ~D~%" (-> this next-time-look-at))
|
||||
(format #t "~2Tstop-time-look-at: ~D~%" (-> this stop-time-look-at))
|
||||
(format #t "~2Twait-return-state: ~A~%" (-> this wait-return-state))
|
||||
(format #t "~2Twait-time: ~D~%" (-> this wait-time))
|
||||
(format #t "~2Tshield-handle: ~D~%" (-> this shield-handle))
|
||||
(format #t "~2Tcp-valid?: ~A~%" (-> this cp-valid?))
|
||||
(format #t "~2Tcp-sphere: #<sphere @ #x~X>~%" (-> this cp-sphere))
|
||||
(format #t "~2Tcp-vec: #<vector @ #x~X>~%" (-> this cp-vec))
|
||||
(format #t "~2Tcp-next-time: ~D~%" (-> this cp-next-time))
|
||||
(format #t "~2Tcp-exit-time: ~D~%" (-> this cp-exit-time))
|
||||
(format #t "~2Tcp-force: #<vector @ #x~X>~%" (-> this cp-force))
|
||||
(format #t "~2Tcp-plane: #<plane @ #x~X>~%" (-> this cp-plane))
|
||||
(format #t "~2Tcp-factor: ~f~%" (-> this cp-factor))
|
||||
(format #t "~2Tfaction-mode: ~D~%" (-> this faction-mode))
|
||||
(format #t "~2Tattacker-info: #<city-attacker-info @ #x~X>~%" (-> this attacker-info))
|
||||
(format #t "~2Tmission-squad: ~A~%" (-> this mission-squad))
|
||||
(format #t "~2Tprobe-counter: ~D~%" (-> this probe-counter))
|
||||
(label cfg-34)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
+1174
File diff suppressed because it is too large
Load Diff
+1949
File diff suppressed because it is too large
Load Diff
+2246
File diff suppressed because it is too large
Load Diff
+2337
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1111
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1633
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1265
File diff suppressed because it is too large
Load Diff
+95
-93
@@ -51,8 +51,8 @@
|
||||
(nav-territories uint32)
|
||||
)
|
||||
(:methods
|
||||
(vis-cell-method-9 () none)
|
||||
(vis-cell-method-10 () none)
|
||||
(reset-segment-counts (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -185,9 +185,9 @@
|
||||
(cell-size vector :inline)
|
||||
)
|
||||
(:methods
|
||||
(grid-info-method-9 () none)
|
||||
(grid-info-method-10 () none)
|
||||
(grid-info-method-11 () none)
|
||||
(setup-grid-from-bounding-box (_type_ (pointer bounding-box) int int) none)
|
||||
(lookup-cell-for-point (_type_ vis-grid-pos vector) none)
|
||||
(lookup-box-for-sphere (_type_ vis-grid-box vector) none)
|
||||
(debug-draw-grid (_type_ rgba) none)
|
||||
(debug-draw-cell (_type_ vis-grid-pos rgba) none)
|
||||
)
|
||||
@@ -221,16 +221,16 @@
|
||||
(pad-array int8 56)
|
||||
)
|
||||
(:methods
|
||||
(city-level-info-method-9 () none)
|
||||
(city-level-info-method-10 () none)
|
||||
(city-level-info-method-11 () none)
|
||||
(city-level-info-method-12 () none)
|
||||
(city-level-info-method-13 () none)
|
||||
(city-level-info-method-14 () none)
|
||||
(city-level-info-method-15 () none)
|
||||
(city-level-info-method-16 () none)
|
||||
(city-level-info-method-17 () none)
|
||||
(city-level-info-method-18 () none)
|
||||
(city-level-info-method-9 (_type_) object)
|
||||
(init-vis-ray (_type_ vis-ray vector vector) none)
|
||||
(city-level-info-method-11 (_type_ vis-ray) none)
|
||||
(city-level-info-method-12 (_type_ vector nav-branch vector) vector)
|
||||
(lookup-cell-by-position (_type_ vector) vis-cell)
|
||||
(get-first-cell-in-box (_type_ vis-grid-box) vis-cell)
|
||||
(sphere-in-grid? (_type_ vector int) symbol)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none)
|
||||
(update-suppressions-from-traffic-engine (_type_ traffic-engine) none)
|
||||
(city-level-info-method-18 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -263,12 +263,12 @@
|
||||
(active-cell-box bounding-box :inline)
|
||||
)
|
||||
(:methods
|
||||
(traffic-level-data-method-9 () none)
|
||||
(traffic-level-data-method-10 () none)
|
||||
(traffic-level-data-method-11 () none)
|
||||
(traffic-level-data-method-12 () none)
|
||||
(traffic-level-data-method-13 () none)
|
||||
(traffic-level-data-method-14 () none)
|
||||
(reset! (_type_) none)
|
||||
(add-active-cell (_type_ vis-cell) none)
|
||||
(remove-active-cell (_type_ int) none)
|
||||
(add-newly-active-cell (_type_ vis-cell) none)
|
||||
(per-frame-cell-update (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
|
||||
;; definition of type traffic-object-type-info
|
||||
(deftype traffic-object-type-info (structure)
|
||||
((flags uint8)
|
||||
((flags traffic-type-flag)
|
||||
(active-count int8)
|
||||
(inactive-count int8)
|
||||
(reserve-count uint16)
|
||||
@@ -366,11 +366,11 @@
|
||||
(array traffic-suppression-box 16 :inline)
|
||||
)
|
||||
(:methods
|
||||
(traffic-suppressor-method-9 () none)
|
||||
(traffic-suppressor-method-10 () none)
|
||||
(traffic-suppressor-method-11 () none)
|
||||
(traffic-suppressor-method-12 () none)
|
||||
(traffic-suppressor-method-13 () none)
|
||||
(reset-boxes (_type_) none)
|
||||
(add-new-supression-box (_type_ traffic-suppression-params) none)
|
||||
(remove-box-by-id (_type_ int) none)
|
||||
(update-box-from-params (_type_ traffic-suppression-params) none)
|
||||
(debug-draw (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -400,24 +400,24 @@
|
||||
(active-object-type-list traffic-type 126)
|
||||
)
|
||||
(:methods
|
||||
(traffic-tracker-method-9 () none)
|
||||
(traffic-tracker-method-10 () none)
|
||||
(traffic-tracker-method-11 () none)
|
||||
(traffic-tracker-method-12 () none)
|
||||
(traffic-tracker-method-13 () none)
|
||||
(traffic-tracker-method-14 () none)
|
||||
(traffic-tracker-method-9 (_type_) none)
|
||||
(traffic-tracker-method-10 (_type_) none)
|
||||
(traffic-tracker-method-11 (_type_) none)
|
||||
(add-active-process (_type_ traffic-type handle) none)
|
||||
(remove-active-process (_type_ int) handle)
|
||||
(add-reserved-process (_type_ traffic-type handle) none)
|
||||
(get-from-inactive-by-type (_type_ traffic-type) handle)
|
||||
(traffic-tracker-method-16 () none)
|
||||
(traffic-tracker-method-17 () none)
|
||||
(traffic-tracker-method-18 () none)
|
||||
(traffic-tracker-method-19 () none)
|
||||
(traffic-tracker-method-20 () none)
|
||||
(traffic-tracker-method-21 () none)
|
||||
(traffic-tracker-method-22 () none)
|
||||
(traffic-tracker-method-23 () none)
|
||||
(traffic-tracker-method-24 () none)
|
||||
(traffic-tracker-method-25 () none)
|
||||
(traffic-tracker-method-26 () none)
|
||||
(get-from-inactive-by-handle (_type_ traffic-type handle) handle)
|
||||
(deactivate-object (_type_ int symbol) none)
|
||||
(set-process-to-killed (_type_ process) none)
|
||||
(deactivate-all (_type_ symbol) none)
|
||||
(deactivate-all-of-type (_type_ traffic-type symbol) none)
|
||||
(activate-from-params (_type_ traffic-object-spawn-params) none)
|
||||
(activate-by-type (_type_ traffic-type nav-segment float) none)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none)
|
||||
(reset (_type_ uint traffic-engine) none)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none)
|
||||
(for-all-active-processes-of-type (_type_ traffic-type (function process-focusable traffic-object-type-info none)) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -455,63 +455,65 @@
|
||||
(level-data-array traffic-level-data 2 :inline)
|
||||
(object-type-info-array traffic-object-type-info 29 :inline)
|
||||
(tracker-array traffic-tracker 2 :inline)
|
||||
(inactive-object-array handle 580 :offset 7456)
|
||||
(tracker0 traffic-tracker :inline :overlay-at (-> tracker-array 0))
|
||||
(tracker1 traffic-tracker :inline :offset 6304)
|
||||
(inactive-object-array handle 580 :offset 7456)
|
||||
(suppressor traffic-suppressor :inline)
|
||||
(danger-sphere-count int8 :offset 12656)
|
||||
(danger-sphere-count int8 :offset 12656)
|
||||
(danger-sphere-array traffic-danger-info 4 :inline)
|
||||
(allow-spawning? symbol :offset 12928)
|
||||
(allow-spawning? symbol :offset 12928)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(traffic-engine-method-9 () none)
|
||||
(update-traffic (_type_) none)
|
||||
(reset-and-init-from-manager (_type_ process) none)
|
||||
(traffic-engine-method-11 () none)
|
||||
(traffic-engine-method-12 () none)
|
||||
(traffic-engine-method-13 () none)
|
||||
(traffic-engine-method-14 () none)
|
||||
(traffic-engine-method-15 () none)
|
||||
(traffic-engine-method-16 () none)
|
||||
(traffic-engine-method-17 () none)
|
||||
(traffic-engine-method-18 () none)
|
||||
(traffic-engine-method-19 () none)
|
||||
(squad-stop-alarm-sound (_type_) none)
|
||||
(stub (_type_) none)
|
||||
(add-object (_type_ traffic-type process) none)
|
||||
(sphere-in-loaded-city-infos? (_type_ vector int) symbol)
|
||||
(activate-one-citizen (_type_ nav-segment float) none)
|
||||
(activate-one-vehicle (_type_ nav-segment float) none)
|
||||
(can-dest-be-used? (_type_ nav-branch) symbol)
|
||||
(child-killed (_type_ process) none)
|
||||
(deactivate-all-from-level (_type_ symbol) none)
|
||||
(find-best-segment (_type_ vector vector int) nav-segment)
|
||||
(callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none)
|
||||
(add-danger (_type_ traffic-danger-info) none)
|
||||
(traffic-engine-method-23 () none)
|
||||
(traffic-engine-method-24 () none)
|
||||
(traffic-engine-method-25 () none)
|
||||
(traffic-engine-method-26 () none)
|
||||
(traffic-engine-method-27 () none)
|
||||
(traffic-engine-method-28 () none)
|
||||
(traffic-engine-method-29 () none)
|
||||
(traffic-engine-method-30 () none)
|
||||
(traffic-engine-method-31 () none)
|
||||
(traffic-engine-method-32 () none)
|
||||
(traffic-engine-method-33 () none)
|
||||
(traffic-engine-method-34 () none)
|
||||
(traffic-engine-method-35 () none)
|
||||
(traffic-engine-method-36 () none)
|
||||
(traffic-engine-method-37 () none)
|
||||
(traffic-engine-method-38 () none)
|
||||
(traffic-engine-method-39 () none)
|
||||
(traffic-engine-method-40 () none)
|
||||
(traffic-engine-method-41 () none)
|
||||
(traffic-engine-method-42 () none)
|
||||
(traffic-engine-method-43 () none)
|
||||
(traffic-engine-method-44 () none)
|
||||
(traffic-engine-method-45 () none)
|
||||
(traffic-engine-method-46 () none)
|
||||
(traffic-engine-method-47 () none)
|
||||
(traffic-engine-method-48 () none)
|
||||
(traffic-engine-method-49 () none)
|
||||
(traffic-engine-method-50 () none)
|
||||
(traffic-engine-method-51 () none)
|
||||
(traffic-engine-method-52 () none)
|
||||
(traffic-engine-method-53 () none)
|
||||
(traffic-engine-method-54 () none)
|
||||
(traffic-engine-method-55 () none)
|
||||
(traffic-engine-method-56 () none)
|
||||
(traffic-engine-method-57 () none)
|
||||
(target-count (_type_ float) none)
|
||||
(deactivate-all (_type_) none)
|
||||
(deactivate-by-type (_type_ traffic-type) none)
|
||||
(restore-default-settings (_type_) none)
|
||||
(set-object-target-level (_type_ int float) none)
|
||||
(set-object-target-count (_type_ int int) none)
|
||||
(set-object-reserve-count (_type_ int uint) none)
|
||||
(get-object-reserve-count (_type_ int) uint)
|
||||
(get-object-remaining-count (_type_ int) int)
|
||||
(activate-object (_type_ traffic-object-spawn-params) none)
|
||||
(activate-by-handle (_type_ traffic-object-spawn-params) none)
|
||||
(set-parking-spot-prob (_type_ int float) none)
|
||||
(get-random-parking-spot-type (_type_) traffic-type)
|
||||
(new-suppression-box (_type_ traffic-suppression-params) none)
|
||||
(remove-suppression-box (_type_ traffic-suppression-params) none)
|
||||
(update-suppression-box (_type_ traffic-suppression-params) none)
|
||||
(stub1 (_type_) none)
|
||||
(for-all-active-processes (_type_ (function process-focusable traffic-object-type-info none)) none)
|
||||
(set-object-auto-activate (_type_ int symbol) none)
|
||||
(check-proc-in-tracker (_type_ process int) none)
|
||||
(kill-traffic-sphere (_type_ vector) none)
|
||||
(level-link (_type_ level) none)
|
||||
(level-unlink (_type_ level) none)
|
||||
(add-squad-ctrl (_type_ squad-control) none)
|
||||
(stub2 (_type_) none)
|
||||
(stub3 (_type_) none)
|
||||
(handle-new-vis-cell (_type_ vis-cell) none)
|
||||
(init-sync-masks (_type_) none)
|
||||
(stub4 (_type_) none)
|
||||
(update-traffic-amount (_type_) none)
|
||||
(update-danger (_type_) none)
|
||||
(update-danger-from-target (_type_) none)
|
||||
(stub5 (_type_) none)
|
||||
(update-suppressor (_type_) none)
|
||||
(recompute-suppressions (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -534,7 +536,7 @@
|
||||
(format #t "~1Tsquad-control-array[4] @ #x~X~%" (-> this squad-control-array))
|
||||
(format #t "~1Tlevel-data-array[2] @ #x~X~%" (-> this level-data-array))
|
||||
(format #t "~1Tobject-type-info-array[29] @ #x~X~%" (-> this object-type-info-array))
|
||||
(format #t "~1Ttracker-array[2] @ #x~X~%" (-> this tracker-array))
|
||||
(format #t "~1Ttracker-array[2] @ #x~X~%" (-> this tracker0))
|
||||
(format #t "~1Tinactive-object-array[580] @ #x~X~%" (-> this inactive-object-array))
|
||||
(format #t "~1Tsuppressor: #<traffic-suppressor @ #x~X>~%" (-> this suppressor))
|
||||
(format #t "~1Tdanger-sphere-count: ~D~%" (-> this danger-sphere-count))
|
||||
|
||||
+1935
File diff suppressed because it is too large
Load Diff
+1327
File diff suppressed because it is too large
Load Diff
+2009
File diff suppressed because it is too large
Load Diff
+2076
File diff suppressed because it is too large
Load Diff
+758
@@ -0,0 +1,758 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type test-bike
|
||||
(deftype test-bike (h-bike-c)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type test-bike
|
||||
(defmethod inspect ((this test-bike))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type h-bike-c inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *test-bike-constants*, type rigid-body-vehicle-constants
|
||||
(define *test-bike-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:friction-factor 0.516
|
||||
:cm-offset-joint (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 1.5) (meters 2) (meters 5))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*test-bike-constants*
|
||||
:flags #x11
|
||||
:object-type (traffic-type civilian-bike-c)
|
||||
:guard-type #xb
|
||||
:vehicle-type (vehicle-type-u8 vt27)
|
||||
:transmission (new 'static 'vehicle-transmission-info :gear-count 1)
|
||||
:handling (new 'static 'vehicle-handling-info
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 32.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.0
|
||||
:turbo-boost-factor 1.0
|
||||
:turbo-boost-duration (seconds 1)
|
||||
:max-xz-speed (meters 100)
|
||||
:player-turn-anim-min -1.0
|
||||
:player-turn-anim-max 1.0
|
||||
:pilot-x-accel-factor 1.0
|
||||
:pilot-y-accel-factor 1.0
|
||||
:pilot-z-accel-factor 1.0
|
||||
:ground-probe-distance (meters 5)
|
||||
:ground-probe-offset (meters 0.5)
|
||||
:cos-ground-effect-angle 0.00000000000000006123032
|
||||
:spring-lift-factor 0.35
|
||||
:air-drag-factor 1.2
|
||||
:steering-fin-angle 1820.4445
|
||||
:steering-thruster-factor 6.0
|
||||
:steering-thruster-max-gain 2.0
|
||||
:steering-thruster-half-gain-speed (meters 80)
|
||||
:tire-steering-angle 1274.3112
|
||||
:tire-steering-speed-factor 61440.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 8.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-limiting-drag 0.75
|
||||
:pitch-control-factor 0.5
|
||||
:roll-control-factor 1.0
|
||||
:roll-angle 7281.778
|
||||
:jump-thrust-factor 0.625
|
||||
:buoyancy-factor 1.0
|
||||
:water-drag-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 0.125)
|
||||
:air-angular-damping 1.0
|
||||
:ground-torque-scale 1.0
|
||||
:ai-steering-factor 1.0
|
||||
:ai-throttle-factor 1.0
|
||||
)
|
||||
:turning-accel (meters 20)
|
||||
:camera (new 'static 'vehicle-camera-info
|
||||
:string-min-height (meters 2.5)
|
||||
:string-max-height (meters 2.5)
|
||||
:string-min-length (meters 5)
|
||||
:string-max-length (meters 5.5)
|
||||
:min-fov 16384.0
|
||||
:max-fov 18204.445
|
||||
:head-offset 4096.0
|
||||
:foot-offset -4096.0
|
||||
:air-max-angle-offset 5461.3335
|
||||
:max-lookaround-speed 40960.0
|
||||
:look-pos-array (new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :y 8192.0 :z -10240.0 :w 1.0)
|
||||
(new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:sound (new 'static 'vehicle-sound-info
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-offset -0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:engine-sound-select 2
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "bike-scrape-stn")
|
||||
:glance-sound (static-sound-name "bike-glance-stn")
|
||||
:impact-sound (static-sound-name "bike-impact-stn")
|
||||
:explode-sound (static-sound-name "vehicle-explode")
|
||||
:explode2-sound (static-sound-name "vehicle-explo-b")
|
||||
:extra-sound (static-sound-name "car-by-1")
|
||||
:bank-replace '()
|
||||
:idle-pitch-scale 1.0
|
||||
:idle-crossover-rpm 1000.0
|
||||
:engine-crossover-rpm 4000.0
|
||||
:start-sound (static-sound-name "vehicl-ignition")
|
||||
:susp-speed-threshold 40960.0
|
||||
:tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
:tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
)
|
||||
:particles (new 'static 'vehicle-particle-info
|
||||
:headlight-count 1
|
||||
:taillight-count 1
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y -614.4 :z 13721.6 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :y 614.4 :z -7168.0 :w 1.0) (new 'static 'vector))
|
||||
)
|
||||
:damage (new 'static 'vehicle-damage-info
|
||||
:inv-toughness-factor 1.0
|
||||
:hit-points 15.0
|
||||
:inv-hit-points 0.06666667
|
||||
:hit-small 102400.0
|
||||
:hit-big 131072.0
|
||||
:hit-deadly 286720.0
|
||||
:impact-damage-factor 1.0
|
||||
:section-count 2
|
||||
:section-array (new 'static 'inline-array vehicle-section-info 4
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x8 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x40 #x10 #x4)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
(new 'static 'vehicle-section-info)
|
||||
(new 'static 'vehicle-section-info)
|
||||
)
|
||||
)
|
||||
:physics-model (new 'static 'vehicle-physics-model-info
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z 7372.8003 :w 1.0)
|
||||
:rot (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-attach-point 6
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z 10649.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 0.25)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 0.75)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:rot (new 'static 'vector :y 1.0 :w 0.25)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:wheel-count 4
|
||||
:drive-wheel-count 2
|
||||
:front-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
:rear-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
)
|
||||
:setup (new 'static 'vehicle-setup-info
|
||||
:settle-height 6144.0
|
||||
:shadow-bot-clip -40960.0
|
||||
:shadow-locus-dist 409600.0
|
||||
:color-option-count 1
|
||||
:color (new 'static 'inline-array vector 1 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0))
|
||||
:gun-yaw-min -65536.0
|
||||
:gun-yaw-max 65536.0
|
||||
:gun-pitch-min -16384.0
|
||||
:gun-pitch-max 16384.0
|
||||
)
|
||||
:rider (new 'static 'vehicle-rider-info
|
||||
:seat-count 2
|
||||
:grab-rail-count 2
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 2
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2048.0 :w 1.0)
|
||||
(new 'static 'vector :x 2048.0 :z 8192.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -2048.0 :z 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x -2048.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 802.816 :z 1318.912 :w (the-as float #x10000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 2048.0 :z -4096.0 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
(new 'static 'vector :x -2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
)
|
||||
:attach-point-array #f
|
||||
)
|
||||
:explosion #f
|
||||
:explosion-part #xdb
|
||||
:debris #f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type test-bike
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-rbody-control! ((this test-bike))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-h-bike-c" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-rbody-control! this *test-bike-constants*)
|
||||
(init (-> this fin-fl) this (the-as uint 7) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-fr) this (the-as uint 6) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-rl) this (the-as uint 9) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-rr) this (the-as uint 10) (joint-mod-base-flags attached))
|
||||
(init (-> this fin2-fl) this (the-as uint 4) (joint-mod-base-flags attached))
|
||||
(init (-> this fin2-fr) this (the-as uint 5) (joint-mod-base-flags attached))
|
||||
(init (-> this rudder) this (the-as uint 8) (joint-mod-base-flags attached))
|
||||
(init (-> this brake-l) this (the-as uint 11) (joint-mod-base-flags attached))
|
||||
(init (-> this brake-r) this (the-as uint 12) (joint-mod-base-flags attached))
|
||||
(init (-> this spoiler-l) this (the-as uint 13) (joint-mod-base-flags attached))
|
||||
(init (-> this spoiler-r) this (the-as uint 14) (joint-mod-base-flags attached))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type evan-test-bike
|
||||
(deftype evan-test-bike (h-bike-a)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type evan-test-bike
|
||||
(defmethod inspect ((this evan-test-bike))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type h-bike-a inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *evan-test-bike-constants*, type rigid-body-vehicle-constants
|
||||
(define *evan-test-bike-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 2.0
|
||||
:inv-mass 0.5
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:bounce-factor 0.4
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 3) (meters 4) (meters 6))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*evan-test-bike-constants*
|
||||
:flags #x70
|
||||
:object-type (traffic-type civilian-bike-a)
|
||||
:guard-type #xb
|
||||
:vehicle-type (vehicle-type-u8 vt27)
|
||||
:transmission (new 'static 'vehicle-transmission-info :gear-count 1)
|
||||
:handling (new 'static 'vehicle-handling-info
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 30.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.0
|
||||
:turbo-boost-factor 1.0
|
||||
:turbo-boost-duration (seconds 1)
|
||||
:max-xz-speed (meters 40)
|
||||
:player-turn-anim-min -1.0
|
||||
:player-turn-anim-max 1.0
|
||||
:pilot-x-accel-factor 1.0
|
||||
:pilot-y-accel-factor 1.0
|
||||
:pilot-z-accel-factor 1.0
|
||||
:ground-probe-distance (meters 5)
|
||||
:cos-ground-effect-angle 0.42261827
|
||||
:spring-lift-factor 0.3
|
||||
:air-drag-factor 1.0
|
||||
:steering-thruster-factor 5.0
|
||||
:steering-thruster-max-gain 4.0
|
||||
:steering-thruster-half-gain-speed (meters 15)
|
||||
:tire-steering-speed-factor 61440.0
|
||||
:tire-friction-factor 0.5
|
||||
:tire-static-friction 0.55
|
||||
:tire-dynamic-friction 0.4
|
||||
:tire-dynamic-friction-speed (meters 2)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.75
|
||||
:pitch-control-factor 1.0
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.625
|
||||
:buoyancy-factor 1.0
|
||||
:water-drag-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:air-angular-damping 1.0
|
||||
:ground-torque-scale 1.0
|
||||
:ai-steering-factor 1.0
|
||||
:ai-throttle-factor 1.0
|
||||
)
|
||||
:turning-accel (meters 20)
|
||||
:camera (new 'static 'vehicle-camera-info
|
||||
:string-min-height (meters 4.5)
|
||||
:string-max-height (meters 4.5)
|
||||
:string-min-length (meters 5)
|
||||
:string-max-length (meters 12.5)
|
||||
:min-fov 15109.688
|
||||
:max-fov 17476.268
|
||||
:head-offset 8192.0
|
||||
:foot-offset 4096.0
|
||||
:normal-max-angle-offset 5461.3335
|
||||
:air-max-angle-offset 5461.3335
|
||||
:max-lookaround-speed 40960.0
|
||||
:look-pos-array (new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :y 8192.0 :z -10240.0 :w 1.0)
|
||||
(new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:sound (new 'static 'vehicle-sound-info
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-offset -0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:engine-sound-select 1
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "bike-scrape-stn")
|
||||
:glance-sound (static-sound-name "bike-glance-stn")
|
||||
:impact-sound (static-sound-name "bike-impact-stn")
|
||||
:explode-sound (static-sound-name "vehicle-explode")
|
||||
:explode2-sound (static-sound-name "vehicle-explo-b")
|
||||
:extra-sound (static-sound-name "bike-by-1")
|
||||
:bank-replace '()
|
||||
:idle-pitch-scale 1.0
|
||||
:idle-crossover-rpm 1000.0
|
||||
:engine-crossover-rpm 4000.0
|
||||
:start-sound (static-sound-name "vehicl-ignition")
|
||||
:susp-speed-threshold 40960.0
|
||||
:tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
:tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
)
|
||||
:particles (new 'static 'vehicle-particle-info
|
||||
:headlight-count 1
|
||||
:taillight-count 1
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
(new 'static 'vector :x -1024.0 :y 204.8 :z -3276.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -1638.4 :y -2048.0 :z 7372.8 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y -819.2 :z 10240.0 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :y 1433.6 :z -10240.0 :w 1.0) (new 'static 'vector))
|
||||
)
|
||||
:damage (new 'static 'vehicle-damage-info
|
||||
:inv-toughness-factor 1.0
|
||||
:hit-points 15.0
|
||||
:inv-hit-points 0.06666667
|
||||
:hit-small 102400.0
|
||||
:hit-big 131072.0
|
||||
:hit-deadly 286720.0
|
||||
:impact-damage-factor 1.0
|
||||
:section-count 2
|
||||
:section-array (new 'static 'inline-array vehicle-section-info 4
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x10 #x8 #x2)
|
||||
:damage-seg-count 3
|
||||
)
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x4 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
(new 'static 'vehicle-section-info)
|
||||
(new 'static 'vehicle-section-info)
|
||||
)
|
||||
)
|
||||
:physics-model (new 'static 'vehicle-physics-model-info
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z 7372.8003 :w 1.0)
|
||||
:rot (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z -2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :z 2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-attach-point 6
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z 10649.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z 2457.6 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 2.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:rot (new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -3276.7998 :w 1.0)
|
||||
:wheel-count 4
|
||||
:drive-wheel-count 2
|
||||
:front-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
:rear-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
)
|
||||
:setup (new 'static 'vehicle-setup-info
|
||||
:settle-height 6144.0
|
||||
:shadow-bot-clip -40960.0
|
||||
:shadow-locus-dist 409600.0
|
||||
:color-option-count 1
|
||||
:color (new 'static 'inline-array vector 1 (new 'static 'vector :x 0.6 :y 0.6 :z 1.5 :w 1.0))
|
||||
:gun-yaw-min -65536.0
|
||||
:gun-yaw-max 65536.0
|
||||
:gun-pitch-min -16384.0
|
||||
:gun-pitch-max 16384.0
|
||||
)
|
||||
:rider (new 'static 'vehicle-rider-info
|
||||
:seat-count 2
|
||||
:grab-rail-count 2
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 2
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2048.0 :w 1.0)
|
||||
(new 'static 'vector :x 2048.0 :z 4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -2048.0 :z 4096.0 :w 1.0)
|
||||
(new 'static 'vector :x -2048.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info :position (new 'static 'vector :w (the-as float #x10000)))
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 2048.0 :z -4096.0 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
(new 'static 'vector :x -2457.6 :y 409.6 :z 4710.4 :w 1.0)
|
||||
)
|
||||
:attach-point-array #f
|
||||
)
|
||||
:explosion #f
|
||||
:explosion-part #xdb
|
||||
:debris #f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type evan-test-bike
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-rbody-control! ((this evan-test-bike))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-h-bike-a" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-rbody-control! this *evan-test-bike-constants*)
|
||||
(init (-> this fin-fl) this (the-as uint 8) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-fr) this (the-as uint 7) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-rl) this (the-as uint 6) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-rr) this (the-as uint 5) (joint-mod-base-flags attached))
|
||||
(init (-> this rudder) this (the-as uint 4) (joint-mod-base-flags attached))
|
||||
(init (-> this brake-l) this (the-as uint 9) (joint-mod-base-flags attached))
|
||||
(init (-> this brake-r) this (the-as uint 10) (joint-mod-base-flags attached))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
Generated
Vendored
+4
-4
@@ -22,7 +22,7 @@
|
||||
)
|
||||
(:methods
|
||||
(vehicle-controller-method-9 (_type_) none)
|
||||
(vehicle-controller-method-10 (_type_ traffic-tracker) none)
|
||||
(vehicle-controller-method-10 (_type_ nav-branch) none)
|
||||
(vehicle-controller-method-11 (_type_) none)
|
||||
(vehicle-controller-method-12 (_type_ rigid-body-vehicle-constants vector float int float) none)
|
||||
(vehicle-controller-method-13 (_type_ nav-branch vector) none)
|
||||
@@ -219,7 +219,7 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-controller-method-13 ((this vehicle-controller) (arg0 nav-branch) (arg1 vector))
|
||||
(vehicle-controller-method-10 this (the-as traffic-tracker arg0))
|
||||
(vehicle-controller-method-10 this arg0)
|
||||
(set! (-> this path-prev-point quad) (-> arg1 quad))
|
||||
(set! (-> this branch) arg0)
|
||||
(let ((v1-3 arg0))
|
||||
@@ -384,10 +384,10 @@
|
||||
|
||||
;; definition for method 10 of type vehicle-controller
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-controller-method-10 ((this vehicle-controller) (arg0 traffic-tracker))
|
||||
(defmethod vehicle-controller-method-10 ((this vehicle-controller) (arg0 nav-branch))
|
||||
(when (not (logtest? (-> this flags) (vehicle-controller-flag attached)))
|
||||
(logior! (-> this flags) (vehicle-controller-flag attached))
|
||||
(+! (-> arg0 active-object-count) 1)
|
||||
(+! (-> arg0 user-count) 1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
|
||||
+6
-5
@@ -663,7 +663,7 @@
|
||||
(look-select uint8)
|
||||
(color-option-count int8)
|
||||
(color-option-select int8)
|
||||
(color vector)
|
||||
(color (inline-array vector))
|
||||
(gun-yaw-min float)
|
||||
(gun-yaw-max float)
|
||||
(gun-pitch-min float)
|
||||
@@ -841,7 +841,7 @@
|
||||
;; definition of type rigid-body-vehicle-constants
|
||||
(deftype rigid-body-vehicle-constants (rigid-body-object-constants)
|
||||
((flags uint32)
|
||||
(object-type uint8)
|
||||
(object-type traffic-type)
|
||||
(guard-type uint8)
|
||||
(vehicle-type vehicle-type-u8)
|
||||
(engine vehicle-engine-info :inline)
|
||||
@@ -939,7 +939,8 @@
|
||||
|
||||
;; definition of type vehicle
|
||||
(deftype vehicle (rigid-body-object)
|
||||
((info rigid-body-vehicle-constants :override)
|
||||
((self vehicle :override)
|
||||
(info rigid-body-vehicle-constants :override)
|
||||
(v-flags vehicle-flag :overlay-at flags)
|
||||
(unknown-flags vehicle-flag :offset 296)
|
||||
(squad squad-control)
|
||||
@@ -1017,7 +1018,7 @@
|
||||
(vehicle-method-70 (_type_) uint)
|
||||
(get-best-seat (_type_ vector vehicle-seat-flag int) int)
|
||||
(remove-riders (_type_ handle) none)
|
||||
(vehicle-method-73 (_type_) none)
|
||||
(vehicle-method-73 (_type_) float)
|
||||
(vehicle-method-74 (_type_ int time-frame) none)
|
||||
(vehicle-method-75 (_type_) none)
|
||||
(vehicle-method-76 (_type_) none)
|
||||
@@ -1075,7 +1076,7 @@
|
||||
(vehicle-method-128 (_type_) symbol)
|
||||
(vehicle-method-129 (_type_) none)
|
||||
(vehicle-method-130 (_type_) none)
|
||||
(vehicle-method-131 (_type_) none)
|
||||
(vehicle-method-131 (_type_ traffic-object-spawn-params) none)
|
||||
(vehicle-method-132 (_type_ traffic-object-spawn-params) none)
|
||||
(vehicle-method-133 (_type_ traffic-object-spawn-params) none)
|
||||
(vehicle-method-134 (_type_) none)
|
||||
|
||||
+416
@@ -0,0 +1,416 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type vehicle-rider
|
||||
(deftype vehicle-rider (process-focusable)
|
||||
((parent (pointer vehicle) :override)
|
||||
(squad squad-control)
|
||||
(flags vehicle-rider-flag)
|
||||
(riding-anim int32)
|
||||
(anim-t float)
|
||||
(anim-speed float)
|
||||
(seat-index int8)
|
||||
)
|
||||
(:state-methods
|
||||
inactive
|
||||
active
|
||||
taunt
|
||||
got-passed
|
||||
)
|
||||
(:methods
|
||||
(initialize-collision (_type_) none)
|
||||
(setup-lods (_type_) none)
|
||||
(setup (_type_) none)
|
||||
(vehicle-rider-post (_type_) none)
|
||||
(go-inactive (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vehicle-rider
|
||||
(defmethod inspect ((this vehicle-rider))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process-focusable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(format #t "~2Tsquad: ~A~%" (-> this squad))
|
||||
(format #t "~2Tflags: ~D~%" (-> this flags))
|
||||
(format #t "~2Triding-anim: ~D~%" (-> this riding-anim))
|
||||
(format #t "~2Tanim-t: ~f~%" (-> this anim-t))
|
||||
(format #t "~2Tanim-speed: ~f~%" (-> this anim-speed))
|
||||
(format #t "~2Tseat-index: ~D~%" (-> this seat-index))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 21 of type vehicle-rider
|
||||
(defmethod get-trans ((this vehicle-rider) (arg0 int))
|
||||
"Get the `trans` for this process."
|
||||
(-> this root trans)
|
||||
)
|
||||
|
||||
;; definition for method 34 of type vehicle-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup ((this vehicle-rider))
|
||||
(let* ((s4-0 (ppointer->process (-> this parent)))
|
||||
(s5-0 (if (type? s4-0 vehicle)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> this flags) (vehicle-rider-flag vr2))
|
||||
(if (and s5-0 (nonzero? (vehicle-method-70 s5-0)))
|
||||
(logior! (-> this flags) (vehicle-rider-flag vr2))
|
||||
)
|
||||
(put-rider-in-seat s5-0 (-> this seat-index) this)
|
||||
)
|
||||
(set! (-> this anim-speed) (rand-vu-float-range 0.8 1.2))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 36 of type vehicle-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod go-inactive ((this vehicle-rider))
|
||||
(logior! (-> this draw status) (draw-control-status no-draw))
|
||||
(put-rider-in-seat (ppointer->process (-> this parent)) (-> this seat-index) (the-as process #f))
|
||||
(go (method-of-object this inactive))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 32 of type vehicle-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod initialize-collision ((this vehicle-rider))
|
||||
(stack-size-set! (-> this main-thread) 16)
|
||||
(ctywide-entity-hack)
|
||||
(when (not (-> this level))
|
||||
(format 0 "vehicle-rider::initialize-collision: ERROR, no lwide level found~%")
|
||||
(stack-size-set! (-> this main-thread) 256)
|
||||
(go process-drawable-art-error "no lwide level found")
|
||||
)
|
||||
(set! (-> this root) (the-as collide-shape (new 'process 'trsqv)))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type vehicle-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-lods ((this vehicle-rider))
|
||||
(logior! (-> this flags) (vehicle-rider-flag vr0))
|
||||
(set! (-> this draw lod-set lod 0 dist) 40960.0)
|
||||
(set! (-> this draw lod-set lod 1 dist) 122880.0)
|
||||
(set! (-> this draw lod-set lod 2 dist) 245760.0)
|
||||
(set! (-> this draw lod-set lod 3 dist) 614400.0)
|
||||
(set! (-> this seat-index) 0)
|
||||
(set! (-> this anim-t) (* 65536.0 (rand-vu)))
|
||||
(setup this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type vehicle-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-rider-post ((this vehicle-rider))
|
||||
(let ((a0-1 (ppointer->process (-> this parent))))
|
||||
(when a0-1
|
||||
(+! (-> this anim-t) (* 41870.223 (-> this anim-speed) (seconds-per-frame)))
|
||||
(if (< 65536.0 (-> this anim-t))
|
||||
(+! (-> this anim-t) -65536.0)
|
||||
)
|
||||
(let* ((f0-5 (vehicle-method-73 a0-1))
|
||||
(f0-9 (+ (* 5.0 (- 1.0 f0-5)) (sin (-> this anim-t))))
|
||||
(gp-1 (-> this skel root-channel 0))
|
||||
)
|
||||
(set! (-> gp-1 num-func) num-func-identity)
|
||||
(set! (-> gp-1 frame-num) (ja-aframe f0-9 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-post)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function vehicle-rider-event-handler
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior vehicle-rider-event-handler vehicle-rider ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('traffic-on)
|
||||
(logior! (-> self flags) (vehicle-rider-flag vr1))
|
||||
(when (logtest? (-> self flags) (vehicle-rider-flag vr0))
|
||||
(setup self)
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
(('traffic-off)
|
||||
(logclear! (-> self flags) (vehicle-rider-flag vr1))
|
||||
(go-inactive self)
|
||||
)
|
||||
(('knocked-off)
|
||||
(let ((gp-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(let ((v1-14 (find-nearest-nav-mesh (-> self root trans) (the-as float #x7f800000))))
|
||||
(set! (-> gp-0 object-type) (traffic-type civilian-male))
|
||||
(set! (-> gp-0 behavior) (the-as uint 11))
|
||||
(set! (-> gp-0 id) (the-as uint 0))
|
||||
(set! (-> gp-0 nav-mesh) v1-14)
|
||||
)
|
||||
(set! (-> gp-0 nav-branch) #f)
|
||||
(set! (-> gp-0 proc) #f)
|
||||
(set! (-> gp-0 handle) (process->handle (-> self parent 0)))
|
||||
(set! (-> gp-0 user-data) (-> self draw seg-mask))
|
||||
(set! (-> gp-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> gp-0 guard-type) (the-as uint 11))
|
||||
(set! (-> gp-0 entity) #f)
|
||||
(vector-reset! (-> gp-0 velocity))
|
||||
(when (logtest? (-> self flags) (vehicle-rider-flag vr3))
|
||||
(squad-control-method-18 (-> self squad) 2 *target*)
|
||||
(set! (-> gp-0 object-type) (traffic-type guard-a))
|
||||
)
|
||||
(set! (-> gp-0 position quad) (-> self root trans quad))
|
||||
(quaternion-copy! (-> gp-0 rotation) (-> self root quat))
|
||||
(send-event *traffic-manager* 'activate-object gp-0)
|
||||
)
|
||||
(logclear! (-> self flags) (vehicle-rider-flag vr1))
|
||||
(go-inactive self)
|
||||
)
|
||||
(('race-pass 'taunt)
|
||||
(go-virtual taunt)
|
||||
)
|
||||
(('race-got-passed)
|
||||
(go-virtual got-passed)
|
||||
)
|
||||
(('hide)
|
||||
(set! v0-0 (logior (-> self draw status) (draw-control-status no-draw)))
|
||||
(set! (-> self draw status) (the-as draw-control-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('unhide)
|
||||
(set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw)))
|
||||
(set! (-> self draw status) (the-as draw-control-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('rider-on)
|
||||
(logior! (-> self flags) (vehicle-rider-flag vr0))
|
||||
(if (logtest? (-> self flags) (vehicle-rider-flag vr1))
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
(('rider-off)
|
||||
(logclear! (-> self flags) (vehicle-rider-flag vr0))
|
||||
(go-inactive self)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate active (vehicle-rider)
|
||||
:virtual #t
|
||||
:event vehicle-rider-event-handler
|
||||
:enter (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.05))
|
||||
(ja :group! (-> self draw art-group data (-> self riding-anim)))
|
||||
)
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(vehicle-rider-post self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate taunt (vehicle-rider)
|
||||
:virtual #t
|
||||
:event vehicle-rider-event-handler
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(go-virtual active)
|
||||
(vehicle-rider-post self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate got-passed (vehicle-rider)
|
||||
:virtual #t
|
||||
:event vehicle-rider-event-handler
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(go-virtual active)
|
||||
(vehicle-rider-post self)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate inactive (vehicle-rider)
|
||||
:virtual #t
|
||||
:event vehicle-rider-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
;; definition for method 11 of type vehicle-rider
|
||||
;; WARN: Return type mismatch entity-perm-status vs object.
|
||||
(defmethod init-from-entity! ((this vehicle-rider) (arg0 entity-actor))
|
||||
(process-entity-status! this (entity-perm-status dead) #t)
|
||||
)
|
||||
|
||||
;; definition for function vehicle-rider-init-by-other
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior vehicle-rider-init-by-other vehicle-rider ((arg0 traffic-object-spawn-params))
|
||||
(set! (-> self squad) *ff-squad-control*)
|
||||
(initialize-collision self)
|
||||
(set! (-> self root trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root quat) (-> arg0 rotation))
|
||||
(logior! (-> self focus-status) (focus-status pilot-riding))
|
||||
(setup-lods self)
|
||||
(cond
|
||||
((= (-> arg0 behavior) 1)
|
||||
(go-inactive self)
|
||||
)
|
||||
(else
|
||||
(logior! (-> self flags) (vehicle-rider-flag vr1))
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function vehicle-rider-spawn
|
||||
(defun vehicle-rider-spawn ((arg0 vehicle) (arg1 type) (arg2 traffic-object-spawn-params))
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(let* ((s3-0 (get-process *default-dead-pool* arg1 #x4000 1))
|
||||
(v1-1 (when s3-0
|
||||
(let ((t9-1 (method-of-type process activate)))
|
||||
(t9-1 s3-0 arg0 "rider" (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-0 vehicle-rider-init-by-other arg2)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-1
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type citizen-norm-rider
|
||||
(deftype citizen-norm-rider (vehicle-rider)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type citizen-norm-rider
|
||||
(defmethod inspect ((this citizen-norm-rider))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type vehicle-rider inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup skel-citizen-norm-rider citizen-norm-rider citizen-norm-rider-lod0-jg citizen-norm-rider-idle-ja
|
||||
((citizen-norm-rider-lod0-mg (meters 20)) (citizen-norm-rider-lod2-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 3)
|
||||
)
|
||||
|
||||
;; definition for method 34 of type citizen-norm-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup ((this citizen-norm-rider))
|
||||
(call-parent-method this)
|
||||
(setup-masks (-> this draw) 0 -1)
|
||||
(setup-masks (-> this draw) 32 0)
|
||||
(cond
|
||||
((logtest? (-> this flags) (vehicle-rider-flag vr2))
|
||||
(set! (-> this riding-anim) 5)
|
||||
(setup-masks (-> this draw) #x40000 0)
|
||||
)
|
||||
(else
|
||||
(set! (-> this riding-anim) 4)
|
||||
(setup-masks (-> this draw) #x20000 0)
|
||||
)
|
||||
)
|
||||
(let ((v1-12 (rand-vu-int-count 2)))
|
||||
(cond
|
||||
((zero? v1-12)
|
||||
(setup-masks (-> this draw) 2 0)
|
||||
)
|
||||
((= v1-12 1)
|
||||
(setup-masks (-> this draw) 4096 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-18 (rand-vu-int-count 3)))
|
||||
(cond
|
||||
((zero? v1-18)
|
||||
(setup-masks (-> this draw) 8 0)
|
||||
)
|
||||
((= v1-18 1)
|
||||
(setup-masks (-> this draw) 512 0)
|
||||
)
|
||||
((= v1-18 2)
|
||||
(setup-masks (-> this draw) #x4000 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-26 (rand-vu-int-count 4)))
|
||||
(cond
|
||||
((zero? v1-26)
|
||||
(setup-masks (-> this draw) 4 0)
|
||||
)
|
||||
((= v1-26 1)
|
||||
(setup-masks (-> this draw) 256 0)
|
||||
)
|
||||
((= v1-26 2)
|
||||
(setup-masks (-> this draw) 8192 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-34 (rand-vu-int-count 3)))
|
||||
(cond
|
||||
((zero? v1-34)
|
||||
(setup-masks (-> this draw) 64 0)
|
||||
)
|
||||
((= v1-34 1)
|
||||
(setup-masks (-> this draw) 2048 0)
|
||||
)
|
||||
((= v1-34 2)
|
||||
(setup-masks (-> this draw) #x10000 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(setup-masks (-> this draw) 16 0)
|
||||
(if (zero? (rand-vu-int-count 3))
|
||||
(setup-masks (-> this draw) 128 0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 33 of type citizen-norm-rider
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-lods ((this citizen-norm-rider))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-citizen-norm-rider" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logior! (-> this flags) (vehicle-rider-flag vr0))
|
||||
(set! (-> this draw lod-set lod 0 dist) 122880.0)
|
||||
(set! (-> this draw lod-set lod 1 dist) 286720.0)
|
||||
(setup this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
+2
-6
@@ -603,10 +603,8 @@
|
||||
)
|
||||
|
||||
;; definition for method 73 of type vehicle
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defmethod vehicle-method-73 ((this vehicle))
|
||||
(-> this controls steering)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 111 of type vehicle
|
||||
@@ -767,9 +765,7 @@
|
||||
(set-time! (-> this state-time))
|
||||
(let ((v1-19 (-> this info setup)))
|
||||
(let ((a1-0 (-> v1-19 color-option-select)))
|
||||
(set! (-> this draw color-mult quad)
|
||||
(-> (the-as (pointer uint128) (+ (the-as uint (-> v1-19 color)) (* a1-0 16))))
|
||||
)
|
||||
(set! (-> this draw color-mult quad) (-> v1-19 color a1-0 quad))
|
||||
)
|
||||
(+! (-> v1-19 color-option-select) 1)
|
||||
(when (>= (-> v1-19 color-option-select) (-> v1-19 color-option-count))
|
||||
@@ -1257,7 +1253,7 @@
|
||||
(let ((v1-0 (-> arg0 behavior)))
|
||||
(cond
|
||||
((= v1-0 1)
|
||||
(vehicle-method-131 this)
|
||||
(vehicle-method-131 this arg0)
|
||||
(vehicle-method-109 this)
|
||||
)
|
||||
((zero? v1-0)
|
||||
|
||||
+2
-3
@@ -579,7 +579,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 30 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod rigid-body-object-method-30 ((this vehicle))
|
||||
(cond
|
||||
((logtest? (vehicle-flag sounds) (-> this v-flags))
|
||||
@@ -613,7 +613,6 @@
|
||||
(set! (-> this unknown-flags) (-> this v-flags))
|
||||
(ja-post)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 54 of type vehicle
|
||||
@@ -1392,7 +1391,7 @@
|
||||
|
||||
;; definition for method 131 of type vehicle
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod vehicle-method-131 ((this vehicle))
|
||||
(defmethod vehicle-method-131 ((this vehicle) (arg0 traffic-object-spawn-params))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user