d/jak2: seal-at-waterslums working, and do a pass through all missions (#2199)

I did a pass through all missions, fixing issues as they came up. Also
got `seal-at-waterslums` working -- the best mission in the game 🥳

Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
Tyler Wilding
2023-02-09 18:40:01 -05:00
committed by GitHub
parent 67d4eda169
commit 65812f722c
17 changed files with 3068 additions and 53 deletions
+39 -48
View File
@@ -9032,6 +9032,8 @@
(carc 16)
(guard-bike 18)
(hellcat 19)
(traffic-type-20 20)
(traffic-type-21 21)
)
;; ---traffic-h:traffic-type
@@ -45071,11 +45073,10 @@
;; protect ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype seal-of-mar (process-drawable)
((attach-object uint64 :offset-assert 196)
(scale float :offset-assert 204)
(trans-y float :offset-assert 208)
((attach-object uint64 :offset-assert 200)
(scale float :offset-assert 208)
(trans-y float :offset-assert 212)
)
:method-count-assert 24
:size-assert #xd8
@@ -45083,13 +45084,11 @@
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(seal-of-mar-method-22 () none 22)
(seal-of-mar-method-23 () none 23)
(seal-of-mar-method-22 (_type_) none 22)
(seal-of-mar-method-23 (_type_) none 23)
)
)
|#
#|
(deftype city-slums-transport-info (structure)
((id uint32 :offset-assert 0)
(spawned basic :offset-assert 4)
@@ -45103,11 +45102,10 @@
:size-assert #x54
:flag-assert #x900000054
)
|#
;; (define-extern seal-of-mar-init-by-other function)
;; (define-extern seal-of-mar-spawn function)
;; (define-extern *city-slums-transport-info* array)
(define-extern seal-of-mar-init-by-other (function vector vector vector none :behavior seal-of-mar))
(define-extern seal-of-mar-spawn (function task-manager vector vector vector (pointer seal-of-mar)))
(define-extern *city-slums-transport-info* (array city-slums-transport-info))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; forexita-part ;;
@@ -50682,9 +50680,8 @@
)
|#
#|
(deftype stadium-racer (vehicle-rider)
((rider-type uint8 :offset-assert 217)
((rider-type uint8 :offset-assert 221)
)
:method-count-assert 36
:size-assert #xde
@@ -50692,9 +50689,7 @@
(:methods
)
)
|#
#|
(deftype errol-rider (stadium-racer)
()
:method-count-assert 36
@@ -50703,7 +50698,6 @@
(:methods
)
)
|#
#|
(deftype turbo-pickup (process-drawable)
@@ -50773,14 +50767,14 @@
(waiting-for-start () _type_ :state 145)
(racing () _type_ :state 146)
(race-finished () _type_ :state 147)
(vehicle-racer-method-148 () none 148)
(vehicle-racer-method-149 () none 149)
(vehicle-racer-method-150 () none 150)
(vehicle-racer-method-151 () none 151)
(vehicle-racer-method-152 () none 152)
(vehicle-racer-method-153 () none 153)
(vehicle-racer-method-154 () none 154)
(vehicle-racer-method-155 () none 155)
(vehicle-racer-method-148 (_type_) none 148)
(vehicle-racer-method-149 (_type_) none 149)
(vehicle-racer-method-150 (_type_) none 150)
(vehicle-racer-method-151 (_type_) none 151)
(vehicle-racer-method-152 (_type_) none 152)
(vehicle-racer-method-153 (_type_) none 153)
(vehicle-racer-method-154 (_type_) none 154)
(vehicle-racer-method-155 (_type_) none 155)
)
)
@@ -51676,9 +51670,8 @@
;; errol-chal ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype errol-racer (vehicle-rider)
((minimap connection-minimap :offset-assert 220)
((minimap connection-minimap :offset-assert 224)
)
:method-count-assert 36
:size-assert #xe4
@@ -51686,7 +51679,6 @@
(:methods
)
)
|#
(deftype vehicle-city-racer (vehicle-racer)
()
@@ -51725,17 +51717,17 @@
)
)
#|
(deftype turbo-ring (process-drawable)
((touch-time time-frame :offset-assert 196)
(minimap connection-minimap :offset-assert 204)
(player-got basic :offset-assert 208)
(persistent basic :offset-assert 212)
(id int8 :offset-assert 216)
(boost float :offset-assert 220)
(plane vector :inline :offset-assert 236)
(part-track uint64 :offset-assert 252)
(mat matrix :inline :offset-assert 268)
((root-override collide-shape :offset 128 :score 100)
(touch-time time-frame :offset-assert 200)
(minimap connection-minimap :offset-assert 208)
(player-got symbol :offset-assert 212)
(persistent symbol :offset-assert 216)
(id int8 :offset-assert 220)
(boost float :offset-assert 224)
(plane vector :inline :offset-assert 240)
(part-track handle :offset-assert 256)
(mat matrix :inline :offset-assert 272)
)
:method-count-assert 25
:size-assert #x150
@@ -51743,19 +51735,18 @@
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(turbo-ring-method-22 () none 22)
(turbo-ring-method-23 () none 23)
(turbo-ring-method-24 () none 24)
(turbo-ring-method-22 (_type_) none 22)
(turbo-ring-method-23 (_type_) none 23)
(turbo-ring-method-24 (_type_) none 24)
)
)
|#
;; (define-extern *race-bike-a-constants* object)
;; (define-extern *race-bike-b-constants* object)
;; (define-extern turbo-ring-init-by-other function)
;; (define-extern turbo-ring-spawn function)
;; (define-extern *city-errol-challenge-rings* array)
;; (define-extern *city-bush-port-rings* array)
(define-extern *race-bike-a-constants* rigid-body-vehicle-constants)
(define-extern *race-bike-b-constants* rigid-body-vehicle-constants)
(define-extern turbo-ring-init-by-other (function city-race-ring-info int symbol none :behavior turbo-ring))
(define-extern turbo-ring-spawn (function task-manager city-race-ring-info int symbol turbo-ring))
(define-extern *city-errol-challenge-rings* (array city-race-ring-info))
(define-extern *city-bush-port-rings* (array city-race-ring-info))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1188,5 +1188,38 @@
13,
"(function crimson-guard-hover cspace float float vector vector int none)"
]
],
"protect": [
[0, "(function none :behavior task-manager)"],
[1, "(function none :behavior task-manager)"],
[2, "(function none :behavior task-manager)"],
[3, "(function none :behavior task-manager)"],
[4, "(function none :behavior task-manager)"],
[5, "(function none :behavior task-manager)"],
[6, "(function none :behavior task-manager)"],
[7, "(function none :behavior task-manager)"],
[8, "(function none :behavior task-manager)"]
],
"errol-chal": [
[0, "(function none :behavior task-manager)"],
[1, "(function none :behavior task-manager)"],
[2, "(function none :behavior task-manager)"],
[3, "(function none :behavior task-manager)"],
[
4,
"(function process int symbol event-message-block object :behavior task-manager)"
],
[5, "(function none :behavior task-manager)"],
[6, "(function none :behavior task-manager)"],
[7, "(function none :behavior task-manager)"],
[8, "(function none :behavior task-manager)"],
[9, "(function none :behavior task-manager)"],
[10, "(function none :behavior task-manager)"],
[
11,
"(function process int symbol event-message-block object :behavior task-manager)"
],
[12, "(function none :behavior task-manager)"],
[13, "(function none :behavior task-manager)"]
]
}
+2 -2
View File
@@ -101,7 +101,6 @@
"(anon-function 10 meet-brutter)",
"(method 154 vehicle-racer)",
"(method 228 hal-sewer)",
"(method 154 vehicle-city-racer)",
"test-to-from-spr",
"test-from-spr",
"test-to-spr",
@@ -525,7 +524,8 @@
"(method 18 vehicle-controller)": [0, 1, 74, 75],
"(method 15 vehicle-controller)": [0, 3, 5, 6, 7, 10],
"(anon-function 41 guard)": [9],
"(anon-function 10 metalhead-predator)": [24, 25]
"(anon-function 10 metalhead-predator)": [24, 25],
"(anon-function 10 errol-chal)": [6]
},
// Sometimes the game might use format strings that are fetched dynamically,
+9
View File
@@ -206,6 +206,7 @@
"CTA.DGO",
"CTB.DGO",
"CTC.DGO",
"CTYASHA.DGO",
"CTYKORA.DGO",
"CWI.DGO",
"D3A.DGO",
@@ -226,6 +227,7 @@
"FORDUMPD.DGO",
"FRA.DGO",
"FRB.DGO",
"GARAGE.DGO",
"GGA.DGO",
"HIDEOUT.DGO",
"HIPHOG.DGO",
@@ -238,6 +240,8 @@
"LCGUARD.DGO",
"LCITYLOW.DGO",
"LDJAKBRN.DGO",
"LERLCHAL.DGO",
"LERLTESS.DGO",
"LERROL.DGO",
"LGUARD.DGO",
"LHELLDOG.DGO",
@@ -246,6 +250,7 @@
"LJAKDAX.DGO",
"LJKDXASH.DGO",
"LKEIRIFT.DGO",
"LMEETBRT.DGO",
"LOUTCSTB.DGO",
"LPACKAGE.DGO",
"LPORTRUN.DGO",
@@ -276,6 +281,7 @@
"LWIDEC.DGO",
"LYSAMSAM.DGO",
"LYSKDCD.DGO",
"MCN.DGO",
"MTN.DGO",
"MTX.DGO",
"NEB.DGO",
@@ -287,6 +293,7 @@
"PAC.DGO",
"PAE.DGO",
"PALBOSS.DGO",
"PALOUT.DGO",
"PAR.DGO",
"PAS.DGO",
"PORTWALL.DGO",
@@ -301,7 +308,9 @@
"STB.DGO",
"STC.DGO",
"STR.DGO",
"SWB.DGO",
"TBO.DGO",
"THR.DGO",
"TITLE.DGO",
"TOA.DGO",
"TOB.DGO",
+6 -1
View File
@@ -1604,5 +1604,10 @@
["L138", "turret-path", true],
["L119", "turret-path", true]
],
"drill-baron": [["L183", "turret-path-event", true]]
"drill-baron": [["L183", "turret-path-event", true]],
"protect": [["L127", "vector"]],
"errol-chal": [
["L142", "vector"],
["L119", "vector"]
]
}
+11 -1
View File
@@ -2082,5 +2082,15 @@
"(event attack drill-barons-ship-turret)": [[16, "vector"]],
"(post attack drill-barons-ship-turret)": [
[16, "projectile-init-by-other-params"]
]
],
"(anon-function 6 protect)": [
[112, "vector"],
[48, "vector"],
[128, "vector"],
[144, "vector"],
[160, "transport-params"],
[224, "vector"]
],
"(anon-function 10 errol-chal)": [[16, ["inline-array", "vector", 1]]],
"(event idle turbo-ring)": [[16, "vehicle-control-point"]]
}
+7 -1
View File
@@ -9821,5 +9821,11 @@
"(method 37 drill-ship-shot)": [
[2, "v1", "drill-barons-ship"],
[7, "v1", "drill-barons-ship"]
]
],
"(code taunt errol-racer)": [
[19, "v1", "art-joint-anim"],
[72, "v1", "art-joint-anim"]
],
"(event idle turbo-ring)": [[4, "s5", "vehicle"]],
"(anon-function 2 errol-chal)": [[17, "v1", "process-drawable"]]
}
@@ -155,6 +155,7 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
init_bucket_renderer<TextureUploadHandler>("tex-l3-shrub", BucketCategory::TEX,
BucketId::TEX_L3_SHRUB);
init_bucket_renderer<Shrub>("shrub-l3-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L3_SHRUB);
init_bucket_renderer<Merc2>("merc-l3-shrub", BucketCategory::MERC, BucketId::MERC_L3_SHRUB);
init_bucket_renderer<TextureUploadHandler>("tex-l4-shrub", BucketCategory::TEX,
BucketId::TEX_L4_SHRUB);
// 110
@@ -280,6 +281,8 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
BucketId::TEX_L4_WATER);
init_bucket_renderer<Merc2>("merc-l4-water", BucketCategory::MERC, BucketId::MERC_L4_WATER);
// 290
init_bucket_renderer<TextureUploadHandler>("tex-l5-water", BucketCategory::TEX,
BucketId::TEX_L5_WATER);
// 300
init_bucket_renderer<TextureUploadHandler>("tex-lcom-water", BucketCategory::TEX,
BucketId::TEX_LCOM_WATER);
+2
View File
@@ -118,6 +118,7 @@ enum class BucketId {
MERC_L2_SHRUB = 97,
TEX_L3_SHRUB = 100,
SHRUB_L3_SHRUB = 101,
MERC_L3_SHRUB = 106,
TEX_L4_SHRUB = 109,
SHRUB_L4_SHRUB = 110,
TEX_L5_SHRUB = 118,
@@ -179,6 +180,7 @@ enum class BucketId {
MERC_L3_WATER = 280,
TEX_L4_WATER = 288,
MERC_L4_WATER = 289,
TEX_L5_WATER = 297,
TEX_LCOM_WATER = 306,
MERC_LCOM_WATER = 307,
TEX_LCOM_SKY_POST = 309,
+2
View File
@@ -48,6 +48,8 @@
(carc 16)
(guard-bike 18)
(hellcat 19)
(traffic-type-20 20)
(traffic-type-21 21)
)
;; ---traffic-h:traffic-type
+1
View File
@@ -1193,6 +1193,7 @@ This commonly includes things such as:
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> obj main-thread) 1024)
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
@@ -7,3 +7,616 @@
;; DECOMP BEGINS
(defskelgroup skel-seal-of-mar-game seal-of-mar-top seal-of-mar-top-lod0-jg seal-of-mar-top-idle-ja
((seal-of-mar-top-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
)
(deftype seal-of-mar (process-drawable)
((attach-object uint64 :offset-assert 200)
(scale float :offset-assert 208)
(trans-y float :offset-assert 212)
)
:heap-base #x60
:method-count-assert 24
:size-assert #xd8
:flag-assert #x18006000d8
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(seal-of-mar-method-22 (_type_) none 22)
(seal-of-mar-method-23 (_type_) none 23)
)
)
(defmethod seal-of-mar-method-22 seal-of-mar ((obj seal-of-mar))
(set! (-> obj root) (new 'process 'trsqv))
0
(none)
)
(defmethod seal-of-mar-method-23 seal-of-mar ((obj seal-of-mar))
(with-pp
(set! (-> pp level) (level-get *level* 'lprotect))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-seal-of-mar-game" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj draw force-lod) 0)
(set! (-> obj scale) 1.0)
(set! (-> obj draw lod-set lod 0 dist) 409600.0)
0
(none)
)
)
(defstate idle (seal-of-mar)
:virtual #t
:code (the-as (function none :behavior seal-of-mar) sleep-code)
:post (behavior ()
(spawn (-> self part) (-> self node-list data 3 bone transform trans))
(ja-post)
(none)
)
)
(defstate die (seal-of-mar)
:virtual #t
:code (behavior ()
(cleanup-for-death self)
(none)
)
)
;; WARN: Return type mismatch entity-perm-status vs none.
(defmethod init-from-entity! seal-of-mar ((obj seal-of-mar) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(process-entity-status! obj (entity-perm-status dead) #t)
(none)
)
;; WARN: Return type mismatch object vs none.
(defbehavior seal-of-mar-init-by-other seal-of-mar ((arg0 vector) (arg1 vector) (arg2 vector))
(stack-size-set! (-> self main-thread) 16)
(set! (-> self mask) (logior (process-mask crate) (-> self mask)))
(logclear! (-> self mask) (process-mask actor-pause movie))
(seal-of-mar-method-22 self)
(set! (-> self root trans quad) (-> arg0 quad))
(quaternion-copy! (-> self root quat) (the-as quaternion arg1))
(set! (-> self root scale quad) (-> arg2 quad))
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 182) self))
(set! (-> self trans-y) (-> arg0 y))
(seal-of-mar-method-23 self)
(go-virtual idle)
(none)
)
;; WARN: Return type mismatch (pointer process) vs (pointer seal-of-mar).
(defun seal-of-mar-spawn ((arg0 task-manager) (arg1 vector) (arg2 vector) (arg3 vector))
(process-spawn seal-of-mar arg1 arg2 arg3 :to arg0)
)
(deftype city-slums-transport-info (structure)
((id uint32 :offset-assert 0)
(spawned basic :offset-assert 4)
(plane-pos vector :inline :offset-assert 16)
(plane-quat quaternion :inline :offset-assert 32)
(t-pos vector :inline :offset-assert 48)
(t-quat quaternion :inline :offset-assert 64)
(num-guard uint32 :offset-assert 80)
)
:method-count-assert 9
:size-assert #x54
:flag-assert #x900000054
)
(define *city-slums-transport-info* (new 'static 'boxed-array :type city-slums-transport-info
(new 'static 'city-slums-transport-info
:plane-pos (new 'static 'vector :x 3095165.2 :y 37526.324 :z -2934498.0 :w 1.0)
:plane-quat (new 'static 'quaternion :y 0.0178 :w 0.9998)
:t-pos (new 'static 'vector :x 2939573.8 :y 61440.0 :z -2691468.5 :w 1.0)
:t-quat (new 'static 'quaternion :y 0.3598 :w -0.933)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x1
:plane-pos (new 'static 'vector :x 2892557.0 :y 29433.447 :z -2661706.2 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0007 :y -0.4948 :z 0.0013 :w 0.869)
:t-pos (new 'static 'vector :x 2679873.2 :y 77824.0 :z -2581594.0 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.001 :y -0.5269 :z 0.0011 :w 0.8498)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x2
:plane-pos (new 'static 'vector :x 2990101.2 :y 38305.793 :z -2735072.0 :w 1.0)
:plane-quat (new 'static 'quaternion :y 0.4134 :z -0.0015 :w -0.9105)
:t-pos (new 'static 'vector :x 3044893.0 :y 65536.0 :z -2410427.2 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0014 :y -0.3754 :z 0.0005 :w 0.9268)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x3
:plane-pos (new 'static 'vector :x 3058367.2 :y 27387.084 :z -2246145.2 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0011 :y -0.0362 :z 0.0009 :w 0.9993)
:t-pos (new 'static 'vector :x 2994847.0 :y 57344.0 :z -2093633.5 :w 1.0)
:t-quat (new 'static 'quaternion :y 0.7931 :w -0.609)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x4
:plane-pos (new 'static 'vector :x 3053228.5 :y 26790.297 :z -2491042.2 :w 1.0)
:plane-quat (new 'static 'quaternion :x -0.0006 :y -0.2174 :z -0.0012 :w -0.976)
:t-pos (new 'static 'vector :x 2986468.5 :y 65536.0 :z -2262228.2 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.001 :y -0.0806 :z 0.0008 :w 0.9967)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x5
:plane-pos (new 'static 'vector :x 3006777.0 :y 17257.678 :z -2312612.8 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.3316 :z -0.0013 :w 0.9434)
:t-pos (new 'static 'vector :x 2676877.8 :y 69632.0 :z -2161058.2 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0001 :y 0.4182 :z -0.0013 :w -0.9083)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x6
:plane-pos (new 'static 'vector :x 2715756.5 :y 30702.387 :z -2200581.8 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.4639 :z 0.0013 :w 0.8858)
:t-pos (new 'static 'vector :x 2460337.0 :y 77824.0 :z -2301717.8 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0002 :y 0.6653 :z -0.0013 :w -0.7465)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x7
:plane-pos (new 'static 'vector :x 2520547.8 :y 37126.965 :z -2310556.0 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0014 :y 0.6249 :z -0.0006 :w -0.7806)
:t-pos (new 'static 'vector :x 2274454.2 :y 73728.0 :z -2308863.2 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0008 :y -0.9106 :z -0.0011 :w 0.413)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x8
:plane-pos (new 'static 'vector :x 2477350.0 :y 30634.395 :z -2239698.5 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0012 :y 0.1168 :z -0.0008 :w 0.9931)
:t-pos (new 'static 'vector :x 2533168.2 :y 77824.0 :z -2036614.4 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0008 :y -0.1427 :z 0.0011 :w -0.9897)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x9
:plane-pos (new 'static 'vector :x 2285256.0 :y 33538.457 :z -2189906.8 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.6014 :w 0.7989)
:t-pos (new 'static 'vector :x 2091575.2 :y 73728.0 :z -2066113.8 :w 1.0)
:t-quat (new 'static 'quaternion :y -0.7502 :w 0.6611)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xa
:plane-pos (new 'static 'vector :x 2153970.0 :y 34320.383 :z -2080023.4 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.1532 :w 0.9881)
:t-pos (new 'static 'vector :x 2116023.5 :y 90112.0 :z -1830102.6 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0013 :y 0.0828 :z 0.0003 :w -0.9965)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xb
:plane-pos (new 'static 'vector :x 2169575.5 :y 47590.605 :z -1779327.0 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0015 :y 0.1973 :z 0.0003 :w -0.9803)
:t-pos (new 'static 'vector :x 2094825.9 :y 77824.0 :z -1617763.5 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0012 :y 0.172 :z -0.0008 :w 0.985)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xc
:plane-pos (new 'static 'vector :x 1921790.8 :y 30183.014 :z -1487026.6 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0015 :y 0.1582 :z 0.0004 :w -0.9874)
:t-pos (new 'static 'vector :x 1823168.1 :y 69632.0 :z -1394735.1 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.001 :y -0.9566 :z 0.0011 :w 0.2913)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xd
:plane-pos (new 'static 'vector :x 1703265.9 :y 20098.252 :z -1322308.9 :w 1.0)
:plane-quat (new 'static 'quaternion :x -0.0014 :y -0.1073 :z -0.0005 :w 0.9942)
:t-pos (new 'static 'vector :x 1664688.5 :y 90112.0 :z -1180704.4 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0014 :y -0.0343 :z -0.0006 :w 0.9994)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xe
:plane-pos (new 'static 'vector :x 1749161.1 :y 22818.816 :z -1555168.9 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0014 :y 0.0245 :z 0.0006 :w -0.9996)
:t-pos (new 'static 'vector :x 1678245.1 :y 77824.0 :z -1422948.4 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0013 :y -0.7978 :z 0.0007 :w 0.6028)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xf
:plane-pos (new 'static 'vector :x 1852649.5 :y 17886.822 :z -1740609.1 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.001 :y 0.3503 :z -0.0009 :w -0.9366)
:t-pos (new 'static 'vector :x 1762047.1 :y 69632.0 :z -1603024.1 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0007 :y 0.1395 :z 0.0011 :w -0.9902)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x10
:plane-pos (new 'static 'vector :x 2073022.5 :y 30489.395 :z -1919885.8 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0013 :y -0.7611 :z 0.0008 :w 0.6486)
:t-pos (new 'static 'vector :x 1964806.5 :y 61440.0 :z -1930829.9 :w 1.0)
:t-quat (new 'static 'quaternion :y -0.6727 :w 0.7398)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x11
:plane-pos (new 'static 'vector :x 1850323.0 :y 29569.844 :z -1880109.0 :w 1.0)
:plane-quat (new 'static 'quaternion :y 0.1031 :z 0.0015 :w 0.9946)
:t-pos (new 'static 'vector :x 1879482.4 :y 61440.0 :z -1762779.1 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0001 :y 0.0476 :z 0.0015 :w 0.9988)
:num-guard #x14
)
)
)
(set-subtask-hook!
*game-info*
142
0
(the-as
(function object)
(lambda :behavior task-manager
()
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
(set-setting! 'airlock #f 0 0)
(let ((v1-5 (entity-by-name "parking-spot-1")))
(if v1-5
(logior! (-> v1-5 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-7 (entity-by-name "parking-spot-2")))
(if v1-7
(logior! (-> v1-7 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-9 (entity-by-name "parking-spot-12")))
(if v1-9
(logior! (-> v1-9 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-11 (entity-by-name "parking-spot-59")))
(if v1-11
(logior! (-> v1-11 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-13 (entity-by-name "parking-spot-60")))
(if v1-13
(logior! (-> v1-13 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-15 (entity-by-name "parking-spot-61")))
(if v1-15
(logior! (-> v1-15 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-17 (entity-by-name "parking-spot-62")))
(if v1-17
(logior! (-> v1-17 extra perm status) (entity-perm-status bit-9))
)
)
(let ((gp-0 *traffic-manager*))
(send-event gp-0 'set-alert-level 2)
(send-event gp-0 'set-alert-duration #xa4cb80)
(send-event gp-0 'deactivate-by-type 6)
(send-event gp-0 'deactivate-by-type 18)
(send-event gp-0 'deactivate-by-type 19)
(send-event gp-0 'deactivate-by-type 20)
(send-event gp-0 'deactivate-by-type 11)
(send-event gp-0 'deactivate-by-type 12)
(send-event gp-0 'deactivate-by-type 13)
(send-event gp-0 'deactivate-by-type 14)
(send-event gp-0 'deactivate-by-type 15)
(send-event gp-0 'deactivate-by-type 16)
(send-event gp-0 'set-object-target-count 6 0)
(send-event gp-0 'set-object-target-count 18 0)
(send-event gp-0 'set-object-target-count 19 0)
(send-event gp-0 'set-object-target-count 11 0)
(send-event gp-0 'set-object-target-count 12 0)
(send-event gp-0 'set-object-target-count 13 0)
(send-event gp-0 'set-object-target-count 14 0)
(send-event gp-0 'set-object-target-count 15 0)
(send-event gp-0 'set-object-target-count 16 0)
(send-event gp-0 'set-object-auto-activate 6 #f)
(send-event gp-0 'set-guard-target-count-range 0 4 4)
(send-event gp-0 'set-guard-target-count-range 1 5 5)
(send-event gp-0 'set-guard-target-count-range 4 0 0)
(send-event gp-0 'set-guard-target-count-range 5 0 0)
)
(speech-control-method-10 *speech-control* 6 (new 'static 'speech-type-info
:channel #x1
:priority -2
:min-delay #x258
:max-delay #x4b0
:list (new 'static 'boxed-array :type string
"kg320a"
"kg321a"
"kg322a"
"kg323a"
"kg324a"
"kg325a"
"kg326a"
"kg327a"
"kg328a"
"kg329a"
"kg330a"
"kg331a"
"kg332a"
"kg333a"
"kg334a"
"kg335a"
"kg336a"
"kg337a"
"kg338a"
"kg339a"
"kg340a"
"kg341a"
"kg342a"
"kg343a"
"kg344a"
"kg345a"
"kg347a"
)
)
)
(dotimes (gp-1 (length *city-slums-transport-info*))
(set! (-> *city-slums-transport-info* gp-1 spawned) #f)
)
(let ((gp-2 (new 'stack-no-clear 'task-arrow-params)))
(set! (-> gp-2 pos quad) (-> (new 'static 'vector :x 1666621.9 :y 32766.771 :z -1103984.6 :w 1.0) quad))
(quaternion-identity! (-> gp-2 quat))
(set! (-> gp-2 flags) (task-arrow-flags))
(set! (-> gp-2 map-icon) (the-as uint 15))
(set! (-> self arrow) (process->handle (task-arrow-spawn gp-2 (the-as task-arrow self))))
)
(set! (-> self data-int32 0) 0)
0
(none)
)
)
)
(set-subtask-hook!
*game-info*
142
1
(the-as (function object) (lambda :behavior task-manager
()
(let ((a0-0 *traffic-manager*))
(send-event a0-0 'restore-default-settings)
)
(none)
)
)
)
(set-subtask-hook!
*game-info*
142
2
(the-as
(function object)
(lambda :behavior task-manager
()
(local-vars (s5-4 object))
(let ((s4-0 (new 'static 'vector :x 1666621.9 :y 32766.771 :z -1103984.6 :w 1.0))
(gp-0 (vector-z-quaternion!
(new 'stack-no-clear 'vector)
(new 'static 'quaternion :x -0.0015 :y -0.199 :z 0.0002 :w -0.9799)
)
)
(s5-0 (new 'stack-no-clear 'vector))
)
(vector-! s5-0 (target-pos 0) s4-0)
(let ((v1-1 s5-0))
(if (and (< (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))) 122880.0)
(< 0.0 (vector-dot s5-0 gp-0))
)
(set! (-> self data-int32 0) 1)
)
)
)
(cond
((zero? (-> self data-int32 0))
(dotimes (gp-1 (length *city-slums-transport-info*))
(let ((s5-1 (-> *city-slums-transport-info* gp-1)))
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
0.0
(let ((f0-7 (vector-vector-xz-distance (target-pos 0) (-> s5-1 t-pos))))
(cond
((and (< f0-7 327680.0) (< 204800.0 f0-7))
(when (and (not (handle->process (-> self slave gp-1)))
(< (the int (-> self data-float gp-1)) (-> self clock frame-counter))
)
(let ((s4-2 (new 'stack-no-clear 'transport-params)))
(let ((s3-2 (new 'stack-no-clear 'vector)))
(set! (-> s3-2 quad) (-> s5-1 t-pos quad))
(set! (-> s4-2 spawn-pos quad) (-> s5-1 t-pos quad))
(quaternion-copy! (-> s4-2 quat) (-> s5-1 t-quat))
(set! (-> s4-2 max-guard) (-> s5-1 num-guard))
(set! (-> s4-2 max-guard) (the-as uint 8))
(set! (-> s4-2 turret?) #t)
(set! (-> s4-2 speeches?) #t)
(set! (-> s3-2 y) 0.0)
)
(let* ((s5-2 (entity-nav-mesh-by-aid (the-as actor-id 9070)))
(a0-16 (if (type? s5-2 entity-nav-mesh)
s5-2
)
)
)
(when a0-16
(set! (-> s4-2 nav-mesh) (-> a0-16 nav-mesh))
(set! (-> self slave gp-1) (ppointer->handle (process-spawn transport s4-2 :to self)))
)
)
)
)
)
((< 368640.0 f0-7)
(if (handle->process (-> self slave gp-1))
(send-event (handle->process (-> self slave gp-1)) 'leave)
)
)
)
)
)
(if (and (handle->process (-> self slave gp-1))
(begin
(let ((s5-5 #t)
(a1-11 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-11 from) (process->ppointer self))
(set! (-> a1-11 num-params) 0)
(set! (-> a1-11 message) 'guards-left)
(let ((v1-75 (the-as object (send-event-function (handle->process (-> self slave gp-1)) a1-11))))
(cmove-#f-nonzero s5-4 v1-75 s5-5)
)
)
s5-4
)
)
(set! (-> self data-float gp-1) (the float (+ (-> self clock frame-counter) (seconds 20))))
)
)
)
(else
(let ((gp-2 0))
(dotimes (s5-6 (length *city-slums-transport-info*))
(when (handle->process (-> self slave s5-6))
(send-event (handle->process (-> self slave s5-6)) 'leave)
(+! gp-2 1)
)
)
(if (zero? gp-2)
(go-virtual complete)
)
)
)
)
(none)
)
)
)
(set-subtask-hook! *game-info* 142 3 (the-as (function object) (lambda :behavior task-manager
()
(until #f
(suspend)
)
#f
(none)
)
)
)
(set-subtask-hook!
*game-info*
142
4
(the-as
(function object)
(lambda :behavior task-manager
()
(send-event (handle->process (-> self arrow)) 'leave)
(set! (-> self state-time) (-> self clock frame-counter))
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
(suspend)
)
(talker-spawn-func (-> *talker-speech* 185) *entity-pool* (target-pos 0) (the-as region #f))
(none)
)
)
)
(set-subtask-hook! *game-info* 142 5 (the-as (function object) (lambda :behavior task-manager () (none))))
(set-subtask-hook!
*game-info*
142
1
(the-as
(function object)
(lambda :behavior task-manager () (send-event *traffic-manager* 'restore-default-settings) (none))
)
)
(set-subtask-hook!
*game-info*
141
0
(the-as
(function object)
(lambda :behavior task-manager
()
(set! (-> self slave 0)
(ppointer->handle (seal-of-mar-spawn
self
(new 'static 'vector :x 3150154.5 :y 41696.617 :z -2989634.8 :w 1.0)
(new 'static 'vector :x -0.0086 :y -0.0227 :z -0.691 :w 0.7223)
(new 'static 'vector :x 0.06 :y 0.06 :z 0.06 :w 1.0)
)
)
)
(set! (-> self slave 1) (the-as handle #f))
(none)
)
)
)
(set-subtask-hook!
*game-info*
141
2
(the-as
(function object)
(lambda :behavior task-manager
()
(when (handle->process (-> self slave 0))
(let ((f0-0
(vector-vector-xz-distance (new 'static 'vector :x 3132661.8 :y 33669.12 :z -2965708.8 :w 1.0) (target-pos 0))
)
)
(cond
((< f0-0 20480.0)
(when (!= (-> self slave 0) #f)
(deactivate (handle->process (-> self slave 0)))
(set! (-> self slave 0) (the-as handle #f))
)
(if (= (-> self slave 1) #f)
(set! (-> self slave 1)
(ppointer->handle (process-spawn scene-player :init scene-player-init "city-protect-slums-intro" #t #f))
)
)
)
((< f0-0 163840.0)
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
'(want-anim "city-protect-slums-intro")
)
)
)
)
)
(none)
)
)
)
+3
View File
@@ -5,6 +5,8 @@
;; name in dgo: pal-obs
;; dgos: PAE, PAC
;; og:update-with-merge:substr
;; DECOMP BEGINS
(deftype pal-falling-plat (process-drawable)
@@ -190,6 +192,7 @@ This commonly includes things such as:
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> obj main-thread) 1024)
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
@@ -260,6 +260,7 @@ This commonly includes things such as:
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> obj main-thread) 1024)
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
File diff suppressed because it is too large Load Diff
+675
View File
@@ -0,0 +1,675 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defskelgroup skel-seal-of-mar-game seal-of-mar-top seal-of-mar-top-lod0-jg seal-of-mar-top-idle-ja
((seal-of-mar-top-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
)
;; definition of type seal-of-mar
(deftype seal-of-mar (process-drawable)
((attach-object uint64 :offset-assert 200)
(scale float :offset-assert 208)
(trans-y float :offset-assert 212)
)
:heap-base #x60
:method-count-assert 24
:size-assert #xd8
:flag-assert #x18006000d8
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(seal-of-mar-method-22 (_type_) none 22)
(seal-of-mar-method-23 (_type_) none 23)
)
)
;; definition for method 3 of type seal-of-mar
(defmethod inspect seal-of-mar ((obj seal-of-mar))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tattach-object: ~D~%" (-> obj attach-object))
(format #t "~2Tscale: ~f~%" (-> obj scale))
(format #t "~2Ttrans-y: ~f~%" (-> obj trans-y))
(label cfg-4)
obj
)
;; definition for method 22 of type seal-of-mar
;; WARN: Return type mismatch int vs none.
(defmethod seal-of-mar-method-22 seal-of-mar ((obj seal-of-mar))
(set! (-> obj root) (new 'process 'trsqv))
0
(none)
)
;; definition for method 23 of type seal-of-mar
;; WARN: Return type mismatch int vs none.
(defmethod seal-of-mar-method-23 seal-of-mar ((obj seal-of-mar))
(with-pp
(set! (-> pp level) (level-get *level* 'lprotect))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-seal-of-mar-game" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj draw force-lod) 0)
(set! (-> obj scale) 1.0)
(set! (-> obj draw lod-set lod 0 dist) 409600.0)
0
(none)
)
)
;; failed to figure out what this is:
(defstate idle (seal-of-mar)
:virtual #t
:code (the-as (function none :behavior seal-of-mar) sleep-code)
:post (behavior ()
(spawn (-> self part) (-> self node-list data 3 bone transform trans))
(ja-post)
(none)
)
)
;; failed to figure out what this is:
(defstate die (seal-of-mar)
:virtual #t
:code (behavior ()
(cleanup-for-death self)
(none)
)
)
;; definition for method 11 of type seal-of-mar
;; WARN: Return type mismatch entity-perm-status vs none.
(defmethod init-from-entity! seal-of-mar ((obj seal-of-mar) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(process-entity-status! obj (entity-perm-status dead) #t)
(none)
)
;; definition for function seal-of-mar-init-by-other
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defbehavior seal-of-mar-init-by-other seal-of-mar ((arg0 vector) (arg1 vector) (arg2 vector))
(stack-size-set! (-> self main-thread) 16)
(set! (-> self mask) (logior (process-mask crate) (-> self mask)))
(logclear! (-> self mask) (process-mask actor-pause movie))
(seal-of-mar-method-22 self)
(set! (-> self root trans quad) (-> arg0 quad))
(quaternion-copy! (-> self root quat) (the-as quaternion arg1))
(set! (-> self root scale quad) (-> arg2 quad))
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 182) self))
(set! (-> self trans-y) (-> arg0 y))
(seal-of-mar-method-23 self)
(go-virtual idle)
(none)
)
;; definition for function seal-of-mar-spawn
;; WARN: Return type mismatch (pointer process) vs (pointer seal-of-mar).
(defun seal-of-mar-spawn ((arg0 task-manager) (arg1 vector) (arg2 vector) (arg3 vector))
(process-spawn seal-of-mar arg1 arg2 arg3 :to arg0)
)
;; definition of type city-slums-transport-info
(deftype city-slums-transport-info (structure)
((id uint32 :offset-assert 0)
(spawned basic :offset-assert 4)
(plane-pos vector :inline :offset-assert 16)
(plane-quat quaternion :inline :offset-assert 32)
(t-pos vector :inline :offset-assert 48)
(t-quat quaternion :inline :offset-assert 64)
(num-guard uint32 :offset-assert 80)
)
:method-count-assert 9
:size-assert #x54
:flag-assert #x900000054
)
;; definition for method 3 of type city-slums-transport-info
(defmethod inspect city-slums-transport-info ((obj city-slums-transport-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'city-slums-transport-info)
(format #t "~1Tid: ~D~%" (-> obj id))
(format #t "~1Tspawned: ~A~%" (-> obj spawned))
(format #t "~1Tplane-pos: #<vector @ #x~X>~%" (-> obj plane-pos))
(format #t "~1Tplane-quat: #<quaternion @ #x~X>~%" (-> obj plane-quat))
(format #t "~1Tt-pos: #<vector @ #x~X>~%" (-> obj t-pos))
(format #t "~1Tt-quat: #<quaternion @ #x~X>~%" (-> obj t-quat))
(format #t "~1Tnum-guard: ~D~%" (-> obj num-guard))
(label cfg-4)
obj
)
;; definition for symbol *city-slums-transport-info*, type (array city-slums-transport-info)
(define *city-slums-transport-info* (new 'static 'boxed-array :type city-slums-transport-info
(new 'static 'city-slums-transport-info
:plane-pos (new 'static 'vector :x 3095165.2 :y 37526.324 :z -2934498.0 :w 1.0)
:plane-quat (new 'static 'quaternion :y 0.0178 :w 0.9998)
:t-pos (new 'static 'vector :x 2939573.8 :y 61440.0 :z -2691468.5 :w 1.0)
:t-quat (new 'static 'quaternion :y 0.3598 :w -0.933)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x1
:plane-pos (new 'static 'vector :x 2892557.0 :y 29433.447 :z -2661706.2 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0007 :y -0.4948 :z 0.0013 :w 0.869)
:t-pos (new 'static 'vector :x 2679873.2 :y 77824.0 :z -2581594.0 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.001 :y -0.5269 :z 0.0011 :w 0.8498)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x2
:plane-pos (new 'static 'vector :x 2990101.2 :y 38305.793 :z -2735072.0 :w 1.0)
:plane-quat (new 'static 'quaternion :y 0.4134 :z -0.0015 :w -0.9105)
:t-pos (new 'static 'vector :x 3044893.0 :y 65536.0 :z -2410427.2 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0014 :y -0.3754 :z 0.0005 :w 0.9268)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x3
:plane-pos (new 'static 'vector :x 3058367.2 :y 27387.084 :z -2246145.2 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0011 :y -0.0362 :z 0.0009 :w 0.9993)
:t-pos (new 'static 'vector :x 2994847.0 :y 57344.0 :z -2093633.5 :w 1.0)
:t-quat (new 'static 'quaternion :y 0.7931 :w -0.609)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x4
:plane-pos (new 'static 'vector :x 3053228.5 :y 26790.297 :z -2491042.2 :w 1.0)
:plane-quat (new 'static 'quaternion :x -0.0006 :y -0.2174 :z -0.0012 :w -0.976)
:t-pos (new 'static 'vector :x 2986468.5 :y 65536.0 :z -2262228.2 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.001 :y -0.0806 :z 0.0008 :w 0.9967)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x5
:plane-pos (new 'static 'vector :x 3006777.0 :y 17257.678 :z -2312612.8 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.3316 :z -0.0013 :w 0.9434)
:t-pos (new 'static 'vector :x 2676877.8 :y 69632.0 :z -2161058.2 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0001 :y 0.4182 :z -0.0013 :w -0.9083)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x6
:plane-pos (new 'static 'vector :x 2715756.5 :y 30702.387 :z -2200581.8 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.4639 :z 0.0013 :w 0.8858)
:t-pos (new 'static 'vector :x 2460337.0 :y 77824.0 :z -2301717.8 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0002 :y 0.6653 :z -0.0013 :w -0.7465)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x7
:plane-pos (new 'static 'vector :x 2520547.8 :y 37126.965 :z -2310556.0 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0014 :y 0.6249 :z -0.0006 :w -0.7806)
:t-pos (new 'static 'vector :x 2274454.2 :y 73728.0 :z -2308863.2 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0008 :y -0.9106 :z -0.0011 :w 0.413)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x8
:plane-pos (new 'static 'vector :x 2477350.0 :y 30634.395 :z -2239698.5 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0012 :y 0.1168 :z -0.0008 :w 0.9931)
:t-pos (new 'static 'vector :x 2533168.2 :y 77824.0 :z -2036614.4 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0008 :y -0.1427 :z 0.0011 :w -0.9897)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x9
:plane-pos (new 'static 'vector :x 2285256.0 :y 33538.457 :z -2189906.8 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.6014 :w 0.7989)
:t-pos (new 'static 'vector :x 2091575.2 :y 73728.0 :z -2066113.8 :w 1.0)
:t-quat (new 'static 'quaternion :y -0.7502 :w 0.6611)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xa
:plane-pos (new 'static 'vector :x 2153970.0 :y 34320.383 :z -2080023.4 :w 1.0)
:plane-quat (new 'static 'quaternion :y -0.1532 :w 0.9881)
:t-pos (new 'static 'vector :x 2116023.5 :y 90112.0 :z -1830102.6 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0013 :y 0.0828 :z 0.0003 :w -0.9965)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xb
:plane-pos (new 'static 'vector :x 2169575.5 :y 47590.605 :z -1779327.0 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0015 :y 0.1973 :z 0.0003 :w -0.9803)
:t-pos (new 'static 'vector :x 2094825.9 :y 77824.0 :z -1617763.5 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0012 :y 0.172 :z -0.0008 :w 0.985)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xc
:plane-pos (new 'static 'vector :x 1921790.8 :y 30183.014 :z -1487026.6 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0015 :y 0.1582 :z 0.0004 :w -0.9874)
:t-pos (new 'static 'vector :x 1823168.1 :y 69632.0 :z -1394735.1 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.001 :y -0.9566 :z 0.0011 :w 0.2913)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xd
:plane-pos (new 'static 'vector :x 1703265.9 :y 20098.252 :z -1322308.9 :w 1.0)
:plane-quat (new 'static 'quaternion :x -0.0014 :y -0.1073 :z -0.0005 :w 0.9942)
:t-pos (new 'static 'vector :x 1664688.5 :y 90112.0 :z -1180704.4 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0014 :y -0.0343 :z -0.0006 :w 0.9994)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xe
:plane-pos (new 'static 'vector :x 1749161.1 :y 22818.816 :z -1555168.9 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0014 :y 0.0245 :z 0.0006 :w -0.9996)
:t-pos (new 'static 'vector :x 1678245.1 :y 77824.0 :z -1422948.4 :w 1.0)
:t-quat (new 'static 'quaternion :x -0.0013 :y -0.7978 :z 0.0007 :w 0.6028)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #xf
:plane-pos (new 'static 'vector :x 1852649.5 :y 17886.822 :z -1740609.1 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.001 :y 0.3503 :z -0.0009 :w -0.9366)
:t-pos (new 'static 'vector :x 1762047.1 :y 69632.0 :z -1603024.1 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0007 :y 0.1395 :z 0.0011 :w -0.9902)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x10
:plane-pos (new 'static 'vector :x 2073022.5 :y 30489.395 :z -1919885.8 :w 1.0)
:plane-quat (new 'static 'quaternion :x 0.0013 :y -0.7611 :z 0.0008 :w 0.6486)
:t-pos (new 'static 'vector :x 1964806.5 :y 61440.0 :z -1930829.9 :w 1.0)
:t-quat (new 'static 'quaternion :y -0.6727 :w 0.7398)
:num-guard #x14
)
(new 'static 'city-slums-transport-info
:id #x11
:plane-pos (new 'static 'vector :x 1850323.0 :y 29569.844 :z -1880109.0 :w 1.0)
:plane-quat (new 'static 'quaternion :y 0.1031 :z 0.0015 :w 0.9946)
:t-pos (new 'static 'vector :x 1879482.4 :y 61440.0 :z -1762779.1 :w 1.0)
:t-quat (new 'static 'quaternion :x 0.0001 :y 0.0476 :z 0.0015 :w 0.9988)
:num-guard #x14
)
)
)
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
142
0
(the-as
(function object)
(lambda :behavior task-manager
()
(set-setting! 'exclusive-task #f 0 (-> self node-info task))
(set-setting! 'airlock #f 0 0)
(let ((v1-5 (entity-by-name "parking-spot-1")))
(if v1-5
(logior! (-> v1-5 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-7 (entity-by-name "parking-spot-2")))
(if v1-7
(logior! (-> v1-7 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-9 (entity-by-name "parking-spot-12")))
(if v1-9
(logior! (-> v1-9 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-11 (entity-by-name "parking-spot-59")))
(if v1-11
(logior! (-> v1-11 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-13 (entity-by-name "parking-spot-60")))
(if v1-13
(logior! (-> v1-13 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-15 (entity-by-name "parking-spot-61")))
(if v1-15
(logior! (-> v1-15 extra perm status) (entity-perm-status bit-9))
)
)
(let ((v1-17 (entity-by-name "parking-spot-62")))
(if v1-17
(logior! (-> v1-17 extra perm status) (entity-perm-status bit-9))
)
)
(let ((gp-0 *traffic-manager*))
(send-event gp-0 'set-alert-level 2)
(send-event gp-0 'set-alert-duration #xa4cb80)
(send-event gp-0 'deactivate-by-type 6)
(send-event gp-0 'deactivate-by-type 18)
(send-event gp-0 'deactivate-by-type 19)
(send-event gp-0 'deactivate-by-type 20)
(send-event gp-0 'deactivate-by-type 11)
(send-event gp-0 'deactivate-by-type 12)
(send-event gp-0 'deactivate-by-type 13)
(send-event gp-0 'deactivate-by-type 14)
(send-event gp-0 'deactivate-by-type 15)
(send-event gp-0 'deactivate-by-type 16)
(send-event gp-0 'set-object-target-count 6 0)
(send-event gp-0 'set-object-target-count 18 0)
(send-event gp-0 'set-object-target-count 19 0)
(send-event gp-0 'set-object-target-count 11 0)
(send-event gp-0 'set-object-target-count 12 0)
(send-event gp-0 'set-object-target-count 13 0)
(send-event gp-0 'set-object-target-count 14 0)
(send-event gp-0 'set-object-target-count 15 0)
(send-event gp-0 'set-object-target-count 16 0)
(send-event gp-0 'set-object-auto-activate 6 #f)
(send-event gp-0 'set-guard-target-count-range 0 4 4)
(send-event gp-0 'set-guard-target-count-range 1 5 5)
(send-event gp-0 'set-guard-target-count-range 4 0 0)
(send-event gp-0 'set-guard-target-count-range 5 0 0)
)
(speech-control-method-10 *speech-control* 6 (new 'static 'speech-type-info
:channel #x1
:priority -2
:min-delay #x258
:max-delay #x4b0
:list (new 'static 'boxed-array :type string
"kg320a"
"kg321a"
"kg322a"
"kg323a"
"kg324a"
"kg325a"
"kg326a"
"kg327a"
"kg328a"
"kg329a"
"kg330a"
"kg331a"
"kg332a"
"kg333a"
"kg334a"
"kg335a"
"kg336a"
"kg337a"
"kg338a"
"kg339a"
"kg340a"
"kg341a"
"kg342a"
"kg343a"
"kg344a"
"kg345a"
"kg347a"
)
)
)
(dotimes (gp-1 (length *city-slums-transport-info*))
(set! (-> *city-slums-transport-info* gp-1 spawned) #f)
)
(let ((gp-2 (new 'stack-no-clear 'task-arrow-params)))
(set! (-> gp-2 pos quad) (-> (new 'static 'vector :x 1666621.9 :y 32766.771 :z -1103984.6 :w 1.0) quad))
(quaternion-identity! (-> gp-2 quat))
(set! (-> gp-2 flags) (task-arrow-flags))
(set! (-> gp-2 map-icon) (the-as uint 15))
(set! (-> self arrow) (process->handle (task-arrow-spawn gp-2 (the-as task-arrow self))))
)
(set! (-> self data-int32 0) 0)
0
(none)
)
)
)
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
142
1
(the-as (function object) (lambda :behavior task-manager
()
(let ((a0-0 *traffic-manager*))
(send-event a0-0 'restore-default-settings)
)
(none)
)
)
)
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
142
2
(the-as
(function object)
(lambda :behavior task-manager
()
(local-vars (s5-4 object))
(let ((s4-0 (new 'static 'vector :x 1666621.9 :y 32766.771 :z -1103984.6 :w 1.0))
(gp-0 (vector-z-quaternion!
(new 'stack-no-clear 'vector)
(new 'static 'quaternion :x -0.0015 :y -0.199 :z 0.0002 :w -0.9799)
)
)
(s5-0 (new 'stack-no-clear 'vector))
)
(vector-! s5-0 (target-pos 0) s4-0)
(let ((v1-1 s5-0))
(if (and (< (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))) 122880.0)
(< 0.0 (vector-dot s5-0 gp-0))
)
(set! (-> self data-int32 0) 1)
)
)
)
(cond
((zero? (-> self data-int32 0))
(dotimes (gp-1 (length *city-slums-transport-info*))
(let ((s5-1 (-> *city-slums-transport-info* gp-1)))
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
0.0
(let ((f0-7 (vector-vector-xz-distance (target-pos 0) (-> s5-1 t-pos))))
(cond
((and (< f0-7 327680.0) (< 204800.0 f0-7))
(when (and (not (handle->process (-> self slave gp-1)))
(< (the int (-> self data-float gp-1)) (-> self clock frame-counter))
)
(let ((s4-2 (new 'stack-no-clear 'transport-params)))
(let ((s3-2 (new 'stack-no-clear 'vector)))
(set! (-> s3-2 quad) (-> s5-1 t-pos quad))
(set! (-> s4-2 spawn-pos quad) (-> s5-1 t-pos quad))
(quaternion-copy! (-> s4-2 quat) (-> s5-1 t-quat))
(set! (-> s4-2 max-guard) (-> s5-1 num-guard))
(set! (-> s4-2 max-guard) (the-as uint 8))
(set! (-> s4-2 turret?) #t)
(set! (-> s4-2 speeches?) #t)
(set! (-> s3-2 y) 0.0)
)
(let* ((s5-2 (entity-nav-mesh-by-aid (the-as actor-id 9070)))
(a0-16 (if (type? s5-2 entity-nav-mesh)
s5-2
)
)
)
(when a0-16
(set! (-> s4-2 nav-mesh) (-> a0-16 nav-mesh))
(set! (-> self slave gp-1) (ppointer->handle (process-spawn transport s4-2 :to self)))
)
)
)
)
)
((< 368640.0 f0-7)
(if (handle->process (-> self slave gp-1))
(send-event (handle->process (-> self slave gp-1)) 'leave)
)
)
)
)
)
(if (and (handle->process (-> self slave gp-1))
(begin
(let ((s5-5 #t)
(a1-11 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-11 from) (process->ppointer self))
(set! (-> a1-11 num-params) 0)
(set! (-> a1-11 message) 'guards-left)
(let ((v1-75 (the-as object (send-event-function (handle->process (-> self slave gp-1)) a1-11))))
(cmove-#f-nonzero s5-4 v1-75 s5-5)
)
)
s5-4
)
)
(set! (-> self data-float gp-1) (the float (+ (-> self clock frame-counter) (seconds 20))))
)
)
)
(else
(let ((gp-2 0))
(dotimes (s5-6 (length *city-slums-transport-info*))
(when (handle->process (-> self slave s5-6))
(send-event (handle->process (-> self slave s5-6)) 'leave)
(+! gp-2 1)
)
)
(if (zero? gp-2)
(go-virtual complete)
)
)
)
)
(none)
)
)
)
;; failed to figure out what this is:
(set-subtask-hook! *game-info* 142 3 (the-as (function object) (lambda :behavior task-manager
()
(until #f
(suspend)
)
#f
(none)
)
)
)
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
142
4
(the-as
(function object)
(lambda :behavior task-manager
()
(send-event (handle->process (-> self arrow)) 'leave)
(set! (-> self state-time) (-> self clock frame-counter))
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
(suspend)
)
(talker-spawn-func (-> *talker-speech* 185) *entity-pool* (target-pos 0) (the-as region #f))
(none)
)
)
)
;; failed to figure out what this is:
(set-subtask-hook! *game-info* 142 5 (the-as (function object) (lambda :behavior task-manager () (none))))
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
142
1
(the-as
(function object)
(lambda :behavior task-manager () (send-event *traffic-manager* 'restore-default-settings) (none))
)
)
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
141
0
(the-as
(function object)
(lambda :behavior task-manager
()
(set! (-> self slave 0)
(ppointer->handle (seal-of-mar-spawn
self
(new 'static 'vector :x 3150154.5 :y 41696.617 :z -2989634.8 :w 1.0)
(new 'static 'vector :x -0.0086 :y -0.0227 :z -0.691 :w 0.7223)
(new 'static 'vector :x 0.06 :y 0.06 :z 0.06 :w 1.0)
)
)
)
(set! (-> self slave 1) (the-as handle #f))
(none)
)
)
)
;; failed to figure out what this is:
(set-subtask-hook!
*game-info*
141
2
(the-as
(function object)
(lambda :behavior task-manager
()
(when (handle->process (-> self slave 0))
(let ((f0-0
(vector-vector-xz-distance (new 'static 'vector :x 3132661.8 :y 33669.12 :z -2965708.8 :w 1.0) (target-pos 0))
)
)
(cond
((< f0-0 20480.0)
(when (!= (-> self slave 0) #f)
(deactivate (handle->process (-> self slave 0)))
(set! (-> self slave 0) (the-as handle #f))
)
(if (= (-> self slave 1) #f)
(set! (-> self slave 1)
(ppointer->handle (process-spawn scene-player :init scene-player-init "city-protect-slums-intro" #t #f))
)
)
)
((< f0-0 163840.0)
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
'(want-anim "city-protect-slums-intro")
)
)
)
)
)
(none)
)
)
)
+1
View File
@@ -19,6 +19,7 @@
"DGO/COB.DGO",
"DGO/CPA.DGO",
"DGO/CTA.DGO",
"DGO/LPROTECT.DGO",
"DGO/CPO.DGO",
"DGO/CTB.DGO",
"DGO/CTC.DGO",