d/jak2: finish strip mine files (#2111)

The level crashes similarly to drill-platform though, unclear what is
the root cause of it.

Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
Tyler Wilding
2023-01-14 11:30:58 -05:00
committed by GitHub
parent 88c39217e1
commit d6f9af7a20
22 changed files with 6902 additions and 140 deletions
+76 -106
View File
@@ -39889,23 +39889,22 @@
;; strip-rescue ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype cntrlrm-door (process-drawable)
((root collide-shape :offset-assert 124)
((root-override collide-shape :offset 128 :score 100) ;; originally called 'root' proof that they had some ability to override with the same name
(unknown-pad-k1jhb2n3k1j int32 52 :offset-assert 200) ;; ??
)
:method-count-assert 22
:size-assert #x198
:size-assert #x198 ;; 408
:flag-assert #x1601200198
(:methods
(idle () _type_ :state 20)
(opened () _type_ :state 21)
)
)
|#
#|
(deftype cntrlrm-button (process-drawable)
((root collide-shape :offset-assert 124)
((root-override collide-shape :offset 128 :score 100) ;; originally called 'root' proof that they had some ability to override with the same name
(unknown-pad-n12jn3123123 int32 52 :offset-assert 200) ;; ??
)
:method-count-assert 21
:size-assert #x198
@@ -39914,17 +39913,15 @@
(idle () _type_ :state 20)
)
)
|#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; strip-drop ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype strip-game-crate (process-drawable)
((local-offset vector :inline :offset-assert 204)
(swing-angle vector :inline :offset-assert 220)
((local-offset vector :inline :offset-assert 208)
(swing-angle vector :inline :offset-assert 224)
)
:method-count-assert 23
:size-assert #xf0
@@ -39932,18 +39929,16 @@
(:methods
(idle () _type_ :state 20)
(final-position () _type_ :state 21)
(strip-game-crate-method-22 () none 22)
(strip-game-crate-method-22 (_type_ vector quaternion) none 22)
)
)
|#
#|
(deftype crane (process-drawable)
((angle-vel float :offset-assert 196)
(angle float :offset-assert 200)
(init-quat quaternion :inline :offset-assert 204)
(final-quat quaternion :inline :offset-assert 220)
(crate uint32 :offset-assert 236)
((angle-vel float :offset-assert 200)
(angle float :offset-assert 204)
(init-quat quaternion :inline :offset-assert 208)
(final-quat quaternion :inline :offset-assert 224)
(crate (pointer strip-game-crate) :offset-assert 240)
)
:method-count-assert 23
:size-assert #xf4
@@ -39954,11 +39949,11 @@
(final-position () _type_ :state 22)
)
)
|#
#|
(deftype cranecrate (process-drawable)
((root collide-shape :offset-assert 124)
(
(root-override collide-shape :offset 128 :score 100)
(unknown-pad-n12jn3123123 int32 52 :offset-assert 200) ;; ??
)
:method-count-assert 22
:size-assert #x198
@@ -39968,12 +39963,10 @@
(hidden () _type_ :state 21)
)
)
|#
#|
(deftype grunt-egg (process-drawable)
((idle-anim-player idle-control :inline :offset-assert 204)
(attack-id uint32 :offset-assert 220)
((idle-anim-player idle-control :inline :offset-assert 208)
(attack-id uint32 :offset-assert 224)
)
:method-count-assert 24
:size-assert #xe4
@@ -39981,13 +39974,11 @@
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(grunt-egg-method-22 () none 22)
(grunt-egg-method-23 () none 23)
(grunt-egg-method-22 (_type_) none 22)
(grunt-egg-method-23 (_type_) vector4w-2 23) ;; TODO - the script type
)
)
|#
#|
(deftype grunt-egg-a (grunt-egg)
()
:method-count-assert 24
@@ -39996,9 +39987,7 @@
(:methods
)
)
|#
#|
(deftype grunt-egg-b (grunt-egg)
()
:method-count-assert 24
@@ -40007,9 +39996,7 @@
(:methods
)
)
|#
#|
(deftype grunt-egg-c (grunt-egg)
()
:method-count-assert 24
@@ -40018,9 +40005,7 @@
(:methods
)
)
|#
#|
(deftype grunt-egg-d (grunt-egg)
()
:method-count-assert 24
@@ -40029,26 +40014,25 @@
(:methods
)
)
|#
;; (define-extern check-drop-level-strip-crate-drop-userdata-nosplat (function sparticle-system sparticle-cpuinfo matrix none))
;; (define-extern check-drop-level-strip-crate-drop-userdata (function sparticle-system sparticle-cpuinfo matrix none))
;; (define-extern strip-game-crate-init-by-other function)
;; (define-extern *grunt-egg-a-script* object)
;; (define-extern *grunt-egg-b-script* object)
;; (define-extern *grunt-egg-c-script* object)
;; (define-extern *grunt-egg-d-script* object)
(define-extern check-drop-level-strip-crate-drop-userdata-nosplat (function sparticle-system sparticle-cpuinfo matrix none))
(define-extern check-drop-level-strip-crate-drop-userdata (function sparticle-system sparticle-cpuinfo matrix none))
(define-extern strip-game-crate-init-by-other (function vector quaternion none :behavior strip-game-crate))
(define-extern *grunt-egg-a-script* vector4w-2) ;; types wrong, investigate later
(define-extern *grunt-egg-b-script* vector4w-2)
(define-extern *grunt-egg-c-script* vector4w-2)
(define-extern *grunt-egg-d-script* vector4w-2)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; strip-obs ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype strip-hazard (process-drawable)
((sync sync-linear :inline :offset-assert 196)
(shove-vec vector :inline :offset-assert 220)
(no-collision-timer uint64 :offset-assert 236)
(attack-id uint32 :offset-assert 244)
((root-override collide-shape-moving :offset 128 :score 100)
(sync sync-linear :inline :offset-assert 200)
(shove-vec vector :inline :offset-assert 224)
(no-collision-timer uint64 :offset-assert 240)
(attack-id uint32 :offset-assert 248)
)
:method-count-assert 21
:size-assert #xfc
@@ -40057,14 +40041,12 @@
(idle () _type_ :state 20)
)
)
|#
#|
(deftype fencespikes (strip-hazard)
((start-quat quaternion :inline :offset-assert 252)
(spin float :offset-assert 268)
(offset float :offset-assert 272)
(sparks-group uint32 :offset-assert 276)
((start-quat quaternion :inline :offset-assert 256)
(spin float :offset-assert 272)
(offset float :offset-assert 276)
(sparks-group uint32 :offset-assert 280)
)
:method-count-assert 21
:size-assert #x11c
@@ -40072,11 +40054,9 @@
(:methods
)
)
|#
#|
(deftype pitspikes (strip-hazard)
((spinner basic :offset-assert 248)
((spinner basic :offset-assert 252)
)
:method-count-assert 21
:size-assert #x100
@@ -40084,9 +40064,7 @@
(:methods
)
)
|#
#|
(deftype curtainsaw (strip-hazard)
()
:method-count-assert 21
@@ -40095,21 +40073,20 @@
(:methods
)
)
|#
#|
(deftype grenade-point (process-drawable)
((camera-name basic :offset-assert 196)
(parented? basic :offset-assert 200)
(lightning-time time-frame :offset-assert 204)
(strike-table basic :offset-assert 212)
(last-strike-index int32 :offset-assert 216)
(speed meters :offset-assert 220)
(part2 basic :offset-assert 224)
(part3 basic :offset-assert 228)
(part-lightning-hit basic :offset-assert 232)
(enter-time time-frame :offset-assert 236)
(minimap connection-minimap :offset-assert 244)
((root-override collide-shape :offset 128 :score 100)
(camera-name string :offset-assert 200)
(parented? symbol :offset-assert 204)
(lightning-time time-frame :offset-assert 208)
(strike-table (array vector) :offset-assert 216)
(last-strike-index int32 :offset-assert 220)
(speed meters :offset-assert 224)
(part2 sparticle-launch-control :offset-assert 228)
(part3 sparticle-launch-control :offset-assert 232)
(part-lightning-hit sparticle-launch-control :offset-assert 236)
(enter-time time-frame :offset-assert 240)
(minimap connection-minimap :offset-assert 248)
)
:method-count-assert 22
:size-assert #xfc
@@ -40119,25 +40096,23 @@
(die () _type_ :state 21)
)
)
|#
(deftype grenade (projectile)
((tumble-quat quaternion :inline :offset-assert 480)
(blast-radius float :offset-assert 496)
(end-target uint64 :offset-assert 504)
(end-target handle :offset-assert 504)
)
:method-count-assert 42
:size-assert #x200
:flag-assert #x2a01800200
(:methods
(grenade-method-40 () none 40)
(grenade-method-41 () none 41)
(grenade-method-40 (_type_) none 40)
(grenade-method-41 (_type_) none 41)
)
)
#|
(deftype drill-plat (strip-hazard)
((plat-sound basic :offset-assert 248)
((plat-sound ambient-sound :offset-assert 252)
)
:method-count-assert 21
:size-assert #x100
@@ -40145,28 +40120,26 @@
(:methods
)
)
|#
;; (define-extern strip-handler function)
;; (define-extern strip-trans function)
;; (define-extern *pitspikes-rotate-pos* object)
;; (define-extern pitspikes-birth-func function)
;; (define-extern *grenade-point-strike-table* array)
;; (define-extern strip-login function)
;; (define-extern strip-activate function)
;; (define-extern strip-deactivate function)
(define-extern strip-handler (function process int symbol event-message-block object :behavior strip-hazard))
(define-extern strip-trans (function none :behavior strip-hazard))
(define-extern *pitspikes-rotate-pos* vector)
(define-extern pitspikes-birth-func (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state float))
(define-extern *grenade-point-strike-table* (array (array vector)))
(define-extern strip-login (function none))
(define-extern strip-activate (function none))
(define-extern strip-deactivate (function none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; chaincrate ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype strip-chain-crate-slave (process-drawable)
((part2 basic :offset-assert 196)
(path-u float :offset-assert 200)
(path-speed float :offset-assert 204)
(guide-sound-mask uint32 :offset-assert 208)
(guide-num int8 :offset-assert 212)
((part2 sparticle-launch-control :offset-assert 200)
(path-u float :offset-assert 204)
(path-speed float :offset-assert 208)
(guide-sound-mask uint32 :offset-assert 212)
(guide-num int8 :offset-assert 216)
)
:method-count-assert 23
:size-assert #xd9
@@ -40174,32 +40147,29 @@
(:methods
(die-fast () _type_ :state 20)
(moving () _type_ :state 21)
(strip-chain-crate-slave-method-22 () none 22)
(strip-chain-crate-slave-method-22 (_type_) none 22)
)
)
|#
#|
(deftype strip-chain-crate (process-drawable)
((spawn-pos vector :inline :offset-assert 204)
(next-spawn-time time-frame :offset-assert 220)
(spawn-delay uint32 :offset-assert 228)
(spawn-offset uint32 :offset-assert 232)
(dist-apart float :offset-assert 236)
(crate-speed float :offset-assert 240)
((spawn-pos vector :inline :offset-assert 208)
(next-spawn-time time-frame :offset-assert 224)
(spawn-delay uint32 :offset-assert 232)
(spawn-offset uint32 :offset-assert 236)
(dist-apart float :offset-assert 240)
(crate-speed float :offset-assert 244)
)
:method-count-assert 22
:size-assert #xf8
:flag-assert #x16008000f8
(:methods
(idle () _type_ :state 20)
(strip-chain-crate-method-21 () none 21)
(strip-chain-crate-method-21 (_type_) none 21)
)
)
|#
;; (define-extern *strip-chain-crate-guides* object)
;; (define-extern strip-chain-crate-slave-init-by-other function)
(define-extern *strip-chain-crate-guides* vector4s-3)
(define-extern strip-chain-crate-slave-init-by-other (function float float none :behavior strip-chain-crate-slave))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; gun-buoy ;;
@@ -701,5 +701,11 @@
[23, "(function float :behavior scene-player)"],
[24, "(function float :behavior scene-player)"]
],
"mountain-obs2": [[0, "(function symbol :behavior task-manager)"]]
"mountain-obs2": [[0, "(function symbol :behavior task-manager)"]],
"strip-obs": [
[3, "(function none :behavior task-manager)"],
[11, "(function none :behavior task-manager)"],
[12, "(function entity-actor :behavior task-manager)"],
[13, "(function entity-actor :behavior task-manager)"]
]
}
+1 -1
View File
@@ -657,7 +657,7 @@
// there are some missing textures. I don't know what the game actually does here.
// the format for entries is [level, tpage, index]
"missing_textures": [],
"missing_textures": [["vinroom", 0, 0]],
// some object files have garbage pad data at the end which makes the decompiler
// assume they must be different files, such as the art group for orb-cache-top.
+3 -1
View File
@@ -221,10 +221,12 @@
"SEW.DGO",
"SKA.DGO",
"STA.DGO",
"STR.DGO",
"TOA.DGO",
"TOB.DGO",
"TOC.DGO",
"TOD.DGO",
"VI1.DGO"
"VI1.DGO",
"VIN.DGO"
]
}
+13
View File
@@ -989,5 +989,18 @@
["L359", "vector"],
["L599", "attack-info"],
["L696", "uint64", true]
],
"strip-drop": [
["L105", "vector"],
["L87", "attack-info"],
["L81", "vector"],
["L80", "vector"],
["L78", "vector"],
["L76", "vector"]
],
"strip-obs": [
["L409", "attack-info"],
["L221", "attack-info"],
["L203", "attack-info"]
]
}
+10 -1
View File
@@ -1467,5 +1467,14 @@
[400, "vector"],
[480, "vector"]
],
"(event idle mtn-dice)": [[16, "matrix"]]
"(event idle mtn-dice)": [[16, "matrix"]],
"check-drop-level-strip-crate-drop-userdata-nosplat": [[16, "vector"]],
"check-drop-level-strip-crate-drop-userdata": [[16, "vector"]],
// hang without!
"(post idle grenade-point)": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"]
]
}
+22 -1
View File
@@ -6814,5 +6814,26 @@
"(code idle mincan-lighthouse)": [[14, "v1", "art-joint-anim"]],
"(code erect mincan-lighthouse)": [[14, "v1", "art-joint-anim"]],
"(code closed mincan-lens)": [[14, "v1", "art-joint-anim"]],
"(code open mincan-lens)": [[14, "v1", "art-joint-anim"]]
"(code open mincan-lens)": [[14, "v1", "art-joint-anim"]],
"(event idle grunt-egg)": [[16, "s4", "process-focusable"]],
"strip-handler": [[15, "s4", "process-focusable"]],
"(post idle pitspikes)": [[4, "t9", "(function none)"]],
"(method 7 pitspikes)": [
[14, "t9", "(function strip-hazard int strip-hazard)"]
],
"(post idle curtainsaw)": [[4, "t9", "(function none)"]],
"(event impact grenade)": [
[11, "s4", "process-drawable"],
[18, "a0", "collide-shape"]
],
"(method 40 grenade)": [[[3, 53], "s5", "process-drawable"]],
"(method 31 grenade)": [[98, "s5", "process-drawable"]],
"(post idle drill-plat)": [[4, "t9", "(function none)"]],
"(post idle grenade-point)": [[122, "v1", "lightning-tracker"]],
"(anon-function 12 strip-obs)": [
[103, "a0", "(pointer entity-actor)"],
[287, "v1", "int"]
],
"(method 11 strip-hazard)": [[34, "v0", "(pointer float)"], ["_stack_", 64, "res-tag"]],
"(method 11 strip-chain-crate)": [[38, "v0", "(pointer float)"]]
}
+1 -1
View File
@@ -166,7 +166,7 @@ std::vector<level_tools::TextureRemap> extract_bsp_from_level(const ObjectFileDB
}
extract_tfrag(as_tfrag_tree, fmt::format("{}-{}", dgo_name, i++),
bsp_header.texture_remap_table, tex_db, expected_missing_textures, level_data,
false);
false, level_name);
} else if (draw_tree->my_type() == "drawable-tree-instance-tie") {
auto as_tie_tree = dynamic_cast<level_tools::DrawableTreeInstanceTie*>(draw_tree.get());
ASSERT(as_tie_tree);
+11 -7
View File
@@ -1994,7 +1994,8 @@ void make_tfrag3_data(std::map<u32, std::vector<GroupedDraw>>& draws,
std::vector<tfrag3::PreloadedVertex>& vertices,
std::vector<tfrag3::Texture>& texture_pool,
const TextureDB& tdb,
const std::vector<std::pair<int, int>>& expected_missing_textures) {
const std::vector<std::pair<int, int>>& expected_missing_textures,
const std::string& level_name) {
// we will set:
// draws
// color_indices_per_vertex
@@ -2028,9 +2029,9 @@ void make_tfrag3_data(std::map<u32, std::vector<GroupedDraw>>& draws,
fmt::format("texture {} wasn't found. make sure it is loaded somehow. You may need "
"to include "
"ART.DGO or GAME.DGO in addition to the level DGOs for shared textures."
"tpage is {}. id is {} (0x{:x})",
"tpage is {}. id is {} (0x{:x}) for level {}",
combo_tex_id, combo_tex_id >> 16, combo_tex_id & 0xffff,
combo_tex_id & 0xffff));
combo_tex_id & 0xffff, level_name));
}
}
tfrag3_tex_id = texture_pool.size();
@@ -2095,7 +2096,8 @@ void emulate_tfrags(int geom,
std::vector<tfrag3::PreloadedVertex>& vertices,
const TextureDB& tdb,
const std::vector<std::pair<int, int>>& expected_missing_textures,
bool dump_level) {
bool dump_level,
const std::string& level_name) {
TFragExtractStats stats;
std::vector<u8> vu_mem;
@@ -2114,7 +2116,8 @@ void emulate_tfrags(int geom,
process_draw_mode(all_draws, map, tree_out.kind);
auto groups = make_draw_groups(all_draws);
make_tfrag3_data(groups, tree_out, vertices, level_out.textures, tdb, expected_missing_textures);
make_tfrag3_data(groups, tree_out, vertices, level_out.textures, tdb, expected_missing_textures,
level_name);
if (dump_level) {
auto debug_out = debug_dump_to_obj(all_draws);
@@ -2155,7 +2158,8 @@ void extract_tfrag(const level_tools::DrawableTreeTfrag* tree,
const TextureDB& tex_db,
const std::vector<std::pair<int, int>>& expected_missing_textures,
tfrag3::Level& out,
bool dump_level) {
bool dump_level,
const std::string& level_name) {
// go through 3 lods(?)
for (int geom = 0; geom < GEOM_MAX; ++geom) {
tfrag3::TfragTree this_tree;
@@ -2218,7 +2222,7 @@ void extract_tfrag(const level_tools::DrawableTreeTfrag* tree,
std::vector<tfrag3::PreloadedVertex> vertices;
emulate_tfrags(geom, as_tfrag_array->tfragments, debug_name, map, out, this_tree, vertices,
tex_db, expected_missing_textures, dump_level);
tex_db, expected_missing_textures, dump_level, level_name);
pack_tfrag_vertices(&this_tree.packed_vertices, vertices);
extract_time_of_day(tree, this_tree);
+2 -1
View File
@@ -28,6 +28,7 @@ void extract_tfrag(const level_tools::DrawableTreeTfrag* tree,
const TextureDB& tex_db,
const std::vector<std::pair<int, int>>& expected_missing_textures,
tfrag3::Level& out,
bool dump_level);
bool dump_level,
const std::string& level_name);
} // namespace decompiler
@@ -162,6 +162,8 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
BucketId::TFRAG_T_L1_ALPHA,
std::vector{tfrag3::TFragmentTreeKind::TRANS}, false, 1);
// 140
init_bucket_renderer<TextureUploadHandler>("merc-l1-alpha", BucketCategory::MERC,
BucketId::MERC_L1_ALPHA);
// 150
// 160
// 170
@@ -194,6 +196,8 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
init_bucket_renderer<TextureUploadHandler>("tex-lcom-pris", BucketCategory::TEX,
BucketId::TEX_LCOM_PRIS);
init_bucket_renderer<Merc2>("merc-lcom-pris", BucketCategory::MERC, BucketId::MERC_LCOM_PRIS);
init_bucket_renderer<TextureUploadHandler>("tex-l0-pris2", BucketCategory::TEX,
BucketId::TEX_L0_PRIS2);
init_bucket_renderer<TextureUploadHandler>("tex-l1-pris2", BucketCategory::TEX,
BucketId::TEX_L1_PRIS2);
// 230
+2
View File
@@ -117,6 +117,7 @@ enum class BucketId {
TEX_L0_ALPHA = 127,
TFRAG_T_L0_ALPHA = 128,
TEX_L1_ALPHA = 137,
MERC_L1_ALPHA = 141,
TFRAG_T_L1_ALPHA = 138,
TEX_LCOM_TFRAG = 187,
MERC_LCOM_TFRAG = 188,
@@ -134,6 +135,7 @@ enum class BucketId {
MERC_L4_PRIS = 213,
TEX_LCOM_PRIS = 220,
MERC_LCOM_PRIS = 221,
TEX_L0_PRIS2 = 224,
TEX_L1_PRIS2 = 228,
TEX_L0_WATER = 252,
MERC_L0_WATER = 253,
-16
View File
@@ -4140,19 +4140,6 @@
(goal-src-sequence
""
:deps ("$OUT/obj/los-control.o")
;; "levels/common/enemy/hover/hover-formation-h.gc"
;; "levels/common/enemy/hover/hover-nav-control-h.gc"
;; "levels/common/enemy/hover/hover-enemy-h.gc"
;; "levels/common/enemy/hover/hover-nav-network.gc"
;; "levels/common/enemy/hover/hover-nav-control.gc"
;; "levels/common/enemy/hover/hover-enemy.gc"
;; "levels/common/enemy/hover/hover-enemy-battle.gc"
;; "levels/common/enemy/hover/hover-formation.gc"
;; "levels/common/enemy/hover/hover-nav-edit.gc"
;; "levels/common/enemy/hover/wasp-part.gc"
;; "levels/common/enemy/hover/wasp.gc"
;; "levels/common/enemy/hover/crimson-guard-hover.gc"
;; "levels/common/enemy/hover/flamer.gc"
"levels/strip/strip-scenes.gc"
"levels/strip/strip-part.gc"
"levels/strip/strip-ocean.gc"
@@ -4165,8 +4152,6 @@
(copy-textures 787 789 788 786 1272 2854)
(copy-gos
;; "grunt-ag"
;; "flitter-ag"
"flamer-ag"
"water-anim-strip-dark-eco-ag"
"cranecrate-ag"
@@ -4177,7 +4162,6 @@
"lgconveyor-ag"
"pitspikes-ag"
"grunt-egg-b-ag"
;; "warp-gate-ag"
"grunt-egg-a-ag"
"grunt-egg-d-ag"
"crane-ag"
+4 -4
View File
@@ -1586,7 +1586,7 @@
)
;; run the trans function.
;; (format 0 "Trans | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" arg0 (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
;; (format 0 "Trans | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
(when (-> arg0 trans-hook)
(let ((s4-0 (new 'process 'cpu-thread arg0 'trans 256 (-> arg0 main-thread stack-top))))
(with-pc-profiler "trans"
@@ -1602,14 +1602,14 @@
)
;; run the main thread!
;; (format 0 "Code | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" arg0 (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
;; (format 0 "Code | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
(if (logtest? (-> arg0 mask) (process-mask sleep-code))
(set! (-> arg0 status) 'suspended)
(with-pc-profiler "code"
((-> arg0 main-thread resume-hook) (-> arg0 main-thread))
)
)
;; (format 0 "Finished Code | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" arg0 (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
;; (format 0 "Finished Code | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
(cond
@@ -1621,7 +1621,7 @@
(else
;; run post.
;; NOTE: post always runs on the dram stack, so you can use ja-post and use the scratchpad for anims.
;; (format 0 "Post | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" arg0 (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
;; (format 0 "Post | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
(when (-> arg0 post-hook)
(let ((s4-1 (new 'process 'cpu-thread arg0 'post 256 *kernel-dram-stack*)))
(with-pc-profiler "post"
+359
View File
@@ -7,3 +7,362 @@
;; DECOMP BEGINS
(defpartgroup group-chain-crate-cable-sparks
:id 238
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 1127 :fade-after (meters 100)))
)
(defpart 1127
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
(sp-rnd-flt spt-num 5.0 5.0 1.0)
(sp-flt spt-scale-x (meters 2.5))
(sp-int spt-rot-x 4)
(sp-flt spt-scale-y (meters 0.1))
(sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
(sp-flt spt-b 255.0)
(sp-flt spt-a 128.0)
(sp-flt spt-omega 14.336)
(sp-rnd-flt spt-vel-y (meters 0.06666667) (meters 0.06666667) 1.0)
(sp-rnd-flt spt-fade-g -0.85 -1.7 1.0)
(sp-flt spt-fade-b -8.0)
(sp-rnd-flt spt-fade-a -0.21333334 -0.21333334 1.0)
(sp-rnd-flt spt-accel-y -6.826667 -2.7306666 1.0)
(sp-flt spt-friction 0.97)
(sp-int-plain-rnd spt-timer 50 149 1)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
(sp-func spt-func 'sparticle-motion-blur)
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 80.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
)
)
(defpartgroup group-chain-crate-guide-sparks
:id 239
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 1128 :fade-after (meters 100)))
)
(defpart 1128
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
(sp-rnd-int spt-num 1073741824 2 3.0)
(sp-flt spt-scale-x (meters 2.5))
(sp-int spt-rot-x 4)
(sp-flt spt-scale-y (meters 0.1))
(sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
(sp-flt spt-b 255.0)
(sp-flt spt-a 128.0)
(sp-flt spt-omega 14.336)
(sp-rnd-flt spt-vel-y (meters 0.06666667) (meters 0.06666667) 1.0)
(sp-rnd-flt spt-fade-g -0.85 -1.7 1.0)
(sp-flt spt-fade-b -8.0)
(sp-rnd-flt spt-fade-a -0.21333334 -0.21333334 1.0)
(sp-rnd-flt spt-accel-y -6.826667 -2.7306666 1.0)
(sp-flt spt-friction 0.97)
(sp-int-plain-rnd spt-timer 50 149 1)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
(sp-func spt-func 'sparticle-motion-blur)
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 80.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
)
)
(defskelgroup skel-strip-chain-crate strip-chain-crate 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 -16.5 0 19)
:longest-edge (meters 23.3238)
:origin-joint-index 3
)
(deftype strip-chain-crate-slave (process-drawable)
((part2 sparticle-launch-control :offset-assert 200)
(path-u float :offset-assert 204)
(path-speed float :offset-assert 208)
(guide-sound-mask uint32 :offset-assert 212)
(guide-num int8 :offset-assert 216)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xd9
:flag-assert #x17006000d9
(:methods
(die-fast () _type_ :state 20)
(moving () _type_ :state 21)
(strip-chain-crate-slave-method-22 (_type_) none 22)
)
)
(define *strip-chain-crate-guides* (new 'static 'vector4s-3 :data (new 'static 'array float 12
0.0827
0.1351
0.2022
0.2655
0.6085
0.6169
0.6955
0.7531
0.8589
0.9175
100.0
101.0
)
)
)
;; WARN: Return type mismatch rgbaf vs none.
(defmethod strip-chain-crate-slave-method-22 strip-chain-crate-slave ((obj strip-chain-crate-slave))
(let ((f0-0 (-> obj path-u)))
(cond
((>= 0.09 f0-0)
(let ((f0-1 (* 11.111111 f0-0)))
(set-vector! (-> obj draw color-mult) f0-1 f0-1 f0-1 1.0)
)
)
((>= f0-0 0.87)
(let ((f0-5 (- 1.0 (* 7.692308 (+ -0.87 f0-0)))))
(set-vector! (-> obj draw color-mult) f0-5 f0-5 f0-5 1.0)
)
)
)
)
(none)
)
(defstate moving (strip-chain-crate-slave)
:virtual #t
:trans (behavior ()
(if (>= (-> self path-u) 1.0)
(go-virtual die-fast)
)
(rider-trans)
(let ((f30-0 (fmin 1.0 (+ (-> self path-u) (* (-> self path-speed) (-> self clock seconds-per-frame))))))
(set! (-> self path-u) f30-0)
(strip-chain-crate-slave-method-22 self)
(let ((a0-1 (* (-> self guide-num) 2))
(v1-10 *strip-chain-crate-guides*)
)
(while (< (-> v1-10 data (+ a0-1 1)) f30-0)
(+! a0-1 2)
)
(set! (-> self guide-num) (/ a0-1 2))
(cond
((and (>= f30-0 (-> v1-10 data a0-1)) (>= (-> v1-10 data (+ a0-1 1)) f30-0))
(let ((v1-13 (-> self guide-sound-mask))
(a0-5 (ash 1 (-> self guide-num)))
)
(when (not (logtest? v1-13 a0-5))
(set! (-> self guide-sound-mask) (logior v1-13 a0-5))
(sound-play "crate-guide")
)
)
(if (zero? (rand-vu-int-count 4))
(spawn (-> self part2) (-> self root trans))
)
)
(else
(if (zero? (rand-vu-int-count 45))
(spawn (-> self part) (-> self root trans))
)
)
)
)
(get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp)
(set! (-> self root trans y) (-> self root trans y))
(let ((gp-1 (new 'stack-no-clear 'vector)))
(displacement-between-points-at-percent-normalized! (-> self path) gp-1 f30-0)
(seek-toward-heading-vec! (-> self root) gp-1 6371.5557 (seconds 0.1))
)
)
(update-trans! (-> self sound) (-> self root trans))
(update! (-> self sound))
(none)
)
:code (the-as (function none :behavior strip-chain-crate-slave) sleep-code)
:post (the-as (function none :behavior strip-chain-crate-slave) rider-post)
)
(defstate die-fast (strip-chain-crate-slave)
:virtual #t
:code (the-as (function none :behavior strip-chain-crate-slave) nothing)
)
;; WARN: Return type mismatch object vs none.
(defbehavior strip-chain-crate-slave-init-by-other strip-chain-crate-slave ((arg0 float) (arg1 float))
(set! (-> self path-u) arg0)
(let ((s5-0 (new 'process 'collide-shape-moving self (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-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 -67584.0 0.0 77824.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) s4-0)
)
(pusher-init s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-16 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> self root) s5-0)
)
(process-drawable-from-entity! self (-> self entity))
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-strip-chain-crate" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 238) self))
(set! (-> self part2) (create-launch-control (-> *part-group-id-table* 239) self))
(set! (-> self path) (new 'process 'curve-control self 'path -1000000000.0))
(logior! (-> self path flags) (path-control-flag display draw-line draw-point draw-text))
(let ((f0-7 (total-distance (-> self path))))
(set! (-> self path-speed) (/ arg1 f0-7))
)
(get-point-in-path! (-> self path) (-> self root trans) (-> self path-u) 'interp)
(set! (-> self root trans y) (-> self root trans y))
(let ((gp-1 (new 'stack-no-clear 'vector)))
(displacement-between-points-at-percent-normalized! (-> self path) gp-1 (-> self path-u))
(set-heading-vec! (-> self root) gp-1)
)
(set! (-> self sound)
(new 'process 'ambient-sound (static-sound-spec "crate-loop" :fo-max 100) (-> self root trans))
)
(ja-channel-push! 1 0)
(ja :group! (-> self draw art-group data 2) :num! min)
(transform-post)
(logclear! (-> self mask) (process-mask actor-pause))
(strip-chain-crate-slave-method-22 self)
(go-virtual moving)
(none)
)
(defmethod deactivate strip-chain-crate-slave ((obj strip-chain-crate-slave))
(if (nonzero? (-> obj part2))
(kill-and-free-particles (-> obj part2))
)
((method-of-type process-drawable deactivate) obj)
(none)
)
;; WARN: Return type mismatch process-drawable vs strip-chain-crate-slave.
(defmethod relocate strip-chain-crate-slave ((obj strip-chain-crate-slave) (arg0 int))
(if (nonzero? (-> obj part2))
(&+! (-> obj part2) arg0)
)
(the-as strip-chain-crate-slave ((method-of-type process-drawable relocate) obj arg0))
)
(deftype strip-chain-crate (process-drawable)
((spawn-pos vector :inline :offset-assert 208)
(next-spawn-time time-frame :offset-assert 224)
(spawn-delay uint32 :offset-assert 232)
(spawn-offset uint32 :offset-assert 236)
(dist-apart float :offset-assert 240)
(crate-speed float :offset-assert 244)
)
:heap-base #x80
:method-count-assert 22
:size-assert #xf8
:flag-assert #x16008000f8
(:methods
(idle () _type_ :state 20)
(strip-chain-crate-method-21 (_type_) none 21)
)
)
;; WARN: Return type mismatch symbol vs none.
(defmethod strip-chain-crate-method-21 strip-chain-crate ((obj strip-chain-crate))
(with-pp
(let ((f30-0 (total-distance (-> obj path)))
(f28-0
(* (/ (the float (mod
(the-as uint (+ (-> pp clock frame-counter) (the-as time-frame (-> obj spawn-offset))))
(-> obj spawn-delay)
)
)
(the float (-> obj spawn-delay))
)
(-> obj dist-apart)
)
)
)
(while (>= f30-0 f28-0)
(let ((f26-0 (/ f28-0 f30-0)))
(process-spawn strip-chain-crate-slave f26-0 (-> obj crate-speed) :to obj)
)
(+! f28-0 (-> obj dist-apart))
)
)
(none)
)
)
(defstate idle (strip-chain-crate)
:virtual #t
:code (behavior ()
(until #f
(when (>= (-> self clock frame-counter) (-> self next-spawn-time))
(process-spawn strip-chain-crate-slave 0 (-> self crate-speed) :to self)
(+! (-> self next-spawn-time) (the-as time-frame (-> self spawn-delay)))
)
(suspend)
)
#f
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! strip-chain-crate ((obj strip-chain-crate) (arg0 entity-actor))
(local-vars (sv-16 int))
(with-pp
(set! (-> obj root) (new 'process 'trsqv))
(set! (-> obj path) (new 'process 'curve-control obj 'path -1000000000.0))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(let ((f28-0 53248.0)
(f26-0 131072.0)
(f30-0 0.0)
)
(set! sv-16 0)
(let ((v1-8 (res-lump-data arg0 'speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16)))))
(when v1-8
(set! f28-0 (-> v1-8 0))
(set! f26-0 (-> v1-8 1))
(set! f30-0 (-> v1-8 2))
)
)
(set! (-> obj crate-speed) f28-0)
(set! (-> obj dist-apart) f26-0)
(set! (-> obj spawn-delay) (the-as uint (the int (* 300.0 (/ f26-0 f28-0)))))
(set! (-> obj spawn-offset) (the-as uint (the int (* f30-0 (the float (-> obj spawn-delay))))))
)
(set! (-> obj next-spawn-time)
(+ (-> pp clock frame-counter)
(the-as
time-frame
(- (-> obj spawn-delay)
(mod
(the-as uint (+ (-> pp clock frame-counter) (the-as time-frame (-> obj spawn-offset))))
(-> obj spawn-delay)
)
)
)
)
)
(logclear! (-> obj mask) (process-mask actor-pause))
(strip-chain-crate-method-21 obj)
(go (method-of-object obj idle))
(none)
)
)
+827
View File
@@ -7,3 +7,830 @@
;; DECOMP BEGINS
(defpartgroup group-strip-drop-splash
:id 234
:duration (seconds 2)
:flags (use-local-clock)
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 1111 :period 900 :length 40)
(sp-item 1111 :period 900 :length 30)
(sp-item 1111 :period 900 :length 20)
(sp-item 1111 :period 900 :length 10)
(sp-item 1111 :period 900 :length 5)
(sp-item 1112 :flags (is-3d) :period 900 :length 5)
)
)
(defpart 1112
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x33 :page #xc))
(sp-flt spt-num 3.0)
(sp-rnd-flt spt-y (meters 0) (meters 4) 1.0)
(sp-flt spt-scale-x (meters 40))
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 128.0)
(sp-rnd-flt spt-vel-y (meters 0.05) (meters 0.016666668) 1.0)
(sp-rnd-flt spt-scalevel-x (meters 0.5) (meters 0.5) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -1.0666667)
(sp-flt spt-accel-y -6.826667)
(sp-int spt-timer 120)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
)
)
(defpart 1111
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 32.0)
(sp-flt spt-y (meters 3))
(sp-rnd-flt spt-scale-x (meters 0.4) (meters 0.2) 1.0)
(sp-int spt-rot-x 4)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 128.0)
(sp-rnd-flt spt-omega 4.096 2.048 1.0)
(sp-rnd-flt spt-vel-y (meters 0.16666667) (meters 0.33333334) 1.0)
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 1200)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-flt spt-userdata 290611.2)
(sp-func spt-func 'check-drop-level-strip-crate-drop-userdata)
(sp-int-plain-rnd spt-next-time 0 174 1)
(sp-launcher-by-id spt-next-launcher 1113)
(sp-rnd-flt spt-conerot-x (degrees 75.0) (degrees 15.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees -100.00001) (degrees 120.0) 1.0)
(sp-flt spt-conerot-radius (meters 16))
)
)
(defpart 1113
:init-specs ((sp-rnd-flt spt-r 64.0 64.0 1.0)
(sp-flt spt-g 0.0)
(sp-rnd-flt spt-b 128.0 128.0 1.0)
(sp-flt spt-fade-r -6.4)
(sp-flt spt-fade-b -12.8)
(sp-int-plain-rnd spt-next-time 0 224 1)
(sp-launcher-by-id spt-next-launcher 1113)
)
)
(defpart 1114
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x33 :page #xc))
(sp-flt spt-num 0.3)
(sp-rnd-flt spt-scale-x (meters 3) (meters 0.5) 1.0)
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-scalevel-x (meters 0.35) (meters 0.35) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-rnd-flt spt-fade-a 0.8 0.8 1.0)
(sp-int spt-timer 450)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-int spt-next-time 20)
(sp-launcher-by-id spt-next-launcher 1115)
)
)
(defpart 1115
:init-specs ((sp-flt spt-scalevel-x (meters 0)) (sp-copy-from-other spt-scalevel-y -4) (sp-flt spt-fade-a 0.0))
)
(defpart 1116
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-rnd-flt spt-num 0.0 2.5 1.0)
(sp-rnd-flt spt-scale-x (meters 0.35) (meters 0.2) 1.0)
(sp-int spt-rot-x 4)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-flt spt-omega 8.192)
(sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.1) 1.0)
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 600)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-flt spt-userdata 290611.2)
(sp-func spt-func 'check-drop-level-strip-crate-drop-userdata-nosplat)
(sp-int-plain-rnd spt-next-time 0 99 1)
(sp-launcher-by-id spt-next-launcher 1113)
(sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 40.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
)
)
(defpart 1117
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-rnd-flt spt-num 0.0 2.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
(sp-int spt-rot-x 4)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-flt spt-omega 12.288)
(sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.1) 1.0)
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 600)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-int-plain-rnd spt-next-time 0 74 1)
(sp-launcher-by-id spt-next-launcher 1113)
(sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 40.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
)
)
(defun check-drop-level-strip-crate-drop-userdata-nosplat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
(when (< (-> arg2 vector 0 y) (-> arg1 user-float))
(let ((s3-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(set-vector! s3-0 (-> arg2 vector 0 x) (-> arg1 user-float) (-> arg2 vector 0 z) 1.0)
(let ((t9-1 sp-launch-particles-var)
(a0-3 *sp-particle-system-2d*)
(a1-2 (-> *part-id-table* 1117))
(a2-1 *launch-matrix*)
)
(set! (-> a2-1 trans quad) (-> s3-0 quad))
(t9-1 a0-3 a1-2 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
)
)
(sparticle-motion-blur arg0 arg1 (the-as vector arg2))
(none)
)
(defun check-drop-level-strip-crate-drop-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
(when (< (-> arg2 vector 0 y) (-> arg1 user-float))
(let ((s3-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(set-vector! s3-0 (-> arg2 vector 0 x) (-> arg1 user-float) (-> arg2 vector 0 z) 1.0)
(let ((t9-1 sp-launch-particles-var)
(a0-3 *sp-particle-system-3d*)
(a1-2 (-> *part-id-table* 1114))
(a2-1 *launch-matrix*)
)
(set! (-> a2-1 trans quad) (-> s3-0 quad))
(t9-1 a0-3 a1-2 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
(let ((t9-2 sp-launch-particles-var)
(a0-4 *sp-particle-system-2d*)
(a1-3 (-> *part-id-table* 1116))
(a2-2 *launch-matrix*)
)
(set! (-> a2-2 trans quad) (-> s3-0 quad))
(t9-2 a0-4 a1-3 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
)
)
(sparticle-motion-blur arg0 arg1 (the-as vector arg2))
(none)
)
(defskelgroup skel-cable cable 0 -1
((1 (meters 999999)))
:bounds (static-spherem 0 44 0 44)
:origin-joint-index 3
)
(defskelgroup skel-cranecrate cranecrate 0 3
((1 (meters 20)) (2 (meters 999999)))
:bounds (static-spherem 0 -5 0 20)
:origin-joint-index 3
)
(defskelgroup skel-crane crane 0 2 ((1 (meters 999999))) :bounds (static-spherem 75 20 0 120))
(deftype strip-game-crate (process-drawable)
((local-offset vector :inline :offset-assert 208)
(swing-angle vector :inline :offset-assert 224)
)
:heap-base #x70
:method-count-assert 23
:size-assert #xf0
:flag-assert #x17007000f0
(:methods
(idle () _type_ :state 20)
(final-position () _type_ :state 21)
(strip-game-crate-method-22 (_type_ vector quaternion) none 22)
)
)
(defskelgroup skel-strip-game-crate strip-game-crate 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 9.8 0 27)
)
(defstate idle (strip-game-crate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('go-final)
(go-virtual final-position)
)
)
)
:trans (the-as (function none :behavior strip-game-crate) rider-trans)
:code (the-as (function none :behavior strip-game-crate) sleep-code)
:post (behavior ()
(let* ((f30-1 (* 333.14133 (cos (* 66.8053 (the float (mod (-> self clock frame-counter) 981))))))
(f28-1 (* 358.62756 (cos (* 48.65331 (the float (mod (-> self clock frame-counter) 1346))))))
(f0-6 30.0)
(gp-0 (+ (-> self clock frame-counter) (seconds -15.24)))
(f26-1
(+ 637.1556 (* 637.1556 (cos (* 65536.0 (/ (the float (mod gp-0 (the int (* 300.0 f0-6)))) (* 300.0 f0-6))))))
)
(f0-15 (* 1092.2667 (cos (* 3.640889 (the float (mod gp-0 #x4650))))))
)
(set! (-> self swing-angle z) (+ f30-1 f26-1))
(set! (-> self swing-angle x) (+ f28-1 f0-15))
)
(rider-post)
(none)
)
)
(defstate final-position (strip-game-crate)
:virtual #t
:enter (behavior ()
(ja :group! (-> self draw art-group data 3) :num! min)
(ja-post)
(none)
)
:code (the-as (function none :behavior strip-game-crate) sleep-code)
)
;; WARN: Return type mismatch vector vs none.
(defmethod strip-game-crate-method-22 strip-game-crate ((obj strip-game-crate) (arg0 vector) (arg1 quaternion))
(set! (-> obj root trans quad) (-> arg0 quad))
(let ((s4-0 (new 'stack-no-clear 'quaternion)))
(quaternion-rotate-z! s4-0 arg1 (-> obj swing-angle z))
(quaternion-rotate-x! s4-0 s4-0 (-> obj swing-angle x))
(quaternion-copy! (-> obj root quat) s4-0)
)
(none)
)
;; WARN: Return type mismatch object vs none.
(defbehavior strip-game-crate-init-by-other strip-game-crate ((arg0 vector) (arg1 quaternion))
(let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 14)
(set-vector! (-> v1-2 local-sphere) 0.0 -22528.0 0.0 65536.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-2)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-5 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> self root) s4-0)
)
(set! (-> self root trans quad) (-> arg0 quad))
(quaternion-copy! (-> self root quat) arg1)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-strip-game-crate" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set-vector! (-> self swing-angle) 0.0 0.0 0.0 0.0)
(set-vector! (-> self local-offset) 0.0 -163840.0 0.0 1.0)
(let ((v1-16 (-> self node-list data)))
(set! (-> v1-16 0 param0) (the-as (function cspace transformq none) cspace<-transformq+rot-offset!))
(set! (-> v1-16 0 param1) (the-as basic (-> self root trans)))
(set! (-> v1-16 0 param2) (the-as basic (-> self local-offset)))
)
(logclear! (-> self mask) (process-mask actor-pause))
(if (task-complete? *game-info* (game-task strip-drop))
(go-virtual final-position)
(go-virtual idle)
)
(none)
)
(deftype crane (process-drawable)
((angle-vel float :offset-assert 200)
(angle float :offset-assert 204)
(init-quat quaternion :inline :offset-assert 208)
(final-quat quaternion :inline :offset-assert 224)
(crate (pointer strip-game-crate) :offset-assert 240)
)
:heap-base #x80
:method-count-assert 23
:size-assert #xf4
:flag-assert #x17008000f4
(:methods
(idle () _type_ :state 20)
(swinging () _type_ :state 21)
(final-position () _type_ :state 22)
)
)
(defmethod deactivate crane ((obj crane))
(if (-> obj crate)
(deactivate (-> obj crate 0))
)
((method-of-type process-drawable deactivate) obj)
(none)
)
(defstate idle (crane)
:virtual #t
:code (behavior ()
(ja :group! (ja-group) :num! min)
(ja-post)
(go-virtual swinging)
(until #f
(suspend)
)
#f
(none)
)
)
(defstate swinging (crane)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(the-as
object
(case event-type
(('notice)
(when (and *target*
(not (task-complete? *game-info* (game-task strip-drop)))
(or (demo?) (and (task-node-closed? (game-task-node strip-drop-introduction))
(not (task-node-closed? (game-task-node strip-drop-resolution)))
)
)
)
(let ((gp-0 (if (demo?)
"crane-victory-demo"
"crane-victory"
)
)
)
(process-spawn scene-player :init scene-player-init gp-0 #t #f)
)
)
)
)
)
)
:enter (behavior ()
(set! (-> self angle) 0.0)
(set! (-> self angle-vel) 0.0)
(quaternion-copy! (-> self init-quat) (-> self root quat))
(none)
)
:trans (behavior ()
(if (task-complete? *game-info* (game-task strip-drop))
(go-virtual final-position)
)
(none)
)
:code (behavior ()
(until #f
(suspend)
)
#f
(none)
)
:post (behavior ()
(let* ((f0-1 (* 3.640889 (the float (mod (-> self clock frame-counter) #x4650))))
(f0-5 (+ -16384.0 (* 8192.0 (+ 1.0 (cos f0-1)))))
)
(quaternion-rotate-y! (-> self root quat) (-> self init-quat) f0-5)
)
(ja-post)
(let ((a1-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4))))
(strip-game-crate-method-22 (-> self crate 0) a1-2 (-> self root quat))
)
(none)
)
)
(defstate final-position (crane)
:virtual #t
:event (-> (method-of-type crane swinging) event)
:enter (behavior ()
(quaternion-copy! (-> self root quat) (-> self final-quat))
(when (-> self crate)
(send-event (ppointer->process (-> self crate)) 'go-final)
(let ((a1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4))))
(strip-game-crate-method-22 (-> self crate 0) a1-3 (-> self root quat))
)
)
(none)
)
:code (the-as (function none :behavior crane) sleep-code)
:post (the-as (function none :behavior crane) ja-post)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! crane ((obj crane) (arg0 entity-actor))
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-crane" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(quaternion-rotate-y! (-> obj root quat) (-> obj root quat) 910.2222)
(quaternion-copy! (-> obj final-quat) (-> obj root quat))
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj draw light-index) (the-as uint 10))
(ja-post)
(let ((s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj node-list data 4))))
(set! (-> obj crate) (process-spawn strip-game-crate s5-2 (-> obj root quat) :to obj))
)
(if (or (task-complete? *game-info* (game-task strip-rescue)) (demo?))
(go (method-of-object obj final-position))
(go (method-of-object obj idle))
)
(none)
)
(deftype cranecrate (process-drawable)
((root-override collide-shape :offset 128)
(unknown-pad-n12jn3123123 int32 52 :offset-assert 200)
)
:heap-base #x120
:method-count-assert 22
:size-assert #x198
:flag-assert #x1601200198
(:methods
(idle () _type_ :state 20)
(hidden () _type_ :state 21)
)
)
(defstate idle (cranecrate)
:virtual #t
:code (behavior ()
(ja-channel-set! 1)
(ja :group! (-> self draw art-group data 3))
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
(defstate hidden (cranecrate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('wake-up)
(go-virtual idle)
)
)
)
:code (behavior ()
(ja-channel-set! 0)
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! cranecrate ((obj cranecrate) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 3)
(set-vector! (-> v1-2 local-sphere) 0.0 -20480.0 0.0 81920.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-2)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-5 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-cranecrate" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj root-override trans y) (+ -163348.48 (-> obj root-override trans y)))
(when (or (demo?) (and (= *kernel-boot-message* 'kiosk) (task-node-open? (game-task-node strip-drop-resolution))))
(let ((s5-2 (new 'stack-no-clear 'task-arrow-params)))
(set! (-> s5-2 pos quad) (-> (new 'static 'vector :x 9920120.0 :y 288036.03 :z -179639.1 :w 1.0) quad))
(quaternion-copy!
(-> s5-2 quat)
(eul->quat (new 'stack-no-clear 'quaternion) (new 'static 'euler-angles :x -16384.0 :y 16384.0))
)
(set! (-> s5-2 flags) (task-arrow-flags task-arrow-flag-02))
(set! (-> s5-2 map-icon) (the-as uint 15))
(task-arrow-spawn s5-2 (the-as task-arrow obj))
)
)
(if (task-node-closed? (game-task-node strip-drop-resolution))
(go (method-of-object obj idle))
(go (method-of-object obj hidden))
)
(none)
)
(deftype grunt-egg (process-drawable)
((idle-anim-player idle-control :inline :offset-assert 208)
(attack-id uint32 :offset-assert 224)
)
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(grunt-egg-method-22 (_type_) none 22)
(grunt-egg-method-23 (_type_) vector4w-2 23)
)
)
(defskelgroup skel-grunt-egg-a grunt-egg-a 0 -1
((1 (meters 20)) (2 (meters 999999)))
:bounds (static-spherem 0 2 0 4)
)
(defskelgroup skel-grunt-egg-b grunt-egg-b 0 -1
((1 (meters 20)) (2 (meters 999999)))
:bounds (static-spherem 0 2.5 0 4)
)
(defskelgroup skel-grunt-egg-c grunt-egg-c 0 -1
((1 (meters 20)) (2 (meters 999999)))
:bounds (static-spherem 0 2.2 0 4)
)
(defskelgroup skel-grunt-egg-d grunt-egg-d 0 -1
((1 (meters 20)) (2 (meters 999999)))
:bounds (static-spherem 0 4 0 8)
)
(define *grunt-egg-a-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010301 :z #x1e0002 :w #x2010401)
(new 'static 'vector4w)
)
)
)
(define *grunt-egg-b-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010401 :z #x1e0002 :w #x2010301)
(new 'static 'vector4w)
)
)
)
(define *grunt-egg-c-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010301 :z #x1e0002 :w #x2010401)
(new 'static 'vector4w)
)
)
)
(define *grunt-egg-d-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010301 :z #x1e0002 :w #x2010401)
(new 'static 'vector4w)
)
)
)
(defstate idle (grunt-egg)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('touch 'attack)
(let* ((s5-0 (-> event param 0))
(s4-0 proc)
(v1-2 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(when (and v1-2 ((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s5-0)
(-> v1-2 root-override)
(collide-action solid)
(collide-action)
)
)
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-5 from) (process->ppointer self))
(set! (-> a1-5 num-params) 2)
(set! (-> a1-5 message) 'attack-or-shove)
(set! (-> a1-5 param 0) s5-0)
(let ((v1-7 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
(set! (-> v1-7 id) (-> self attack-id))
(set! (-> v1-7 shove-back) 12288.0)
(set! (-> v1-7 shove-up) 8192.0)
(set! (-> v1-7 mode) 'deadly)
(set! (-> v1-7 knock) (the-as uint 8))
(set! (-> v1-7 damage) 4.0)
(set! (-> a1-5 param 1) (the-as uint v1-7))
)
(send-event-function proc a1-5)
)
)
)
)
)
)
:code (the-as (function none :behavior grunt-egg) sleep-code)
:post (behavior ()
(if (nonzero? (-> self sound))
(update! (-> self sound))
)
(idle-control-method-10 (-> self idle-anim-player) self)
(ja-post)
(none)
)
)
(defstate die (grunt-egg)
:virtual #t
:code (behavior ()
(cleanup-for-death self)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! grunt-egg ((obj grunt-egg) (arg0 entity-actor))
(cond
((>= (res-lump-value arg0 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0)
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-4 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-4 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-4 prim-core action) (collide-action solid deadly))
(set! (-> v1-4 transform-index) 0)
(set-vector! (-> v1-4 local-sphere) 0.0 -20480.0 0.0 53248.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-4)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-7 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-7 prim-core collide-with))
)
(set! (-> obj root) s4-0)
)
)
(else
(set! (-> obj root) (new 'process 'trsqv))
)
)
(grunt-egg-method-22 obj)
(process-drawable-from-entity! obj arg0)
(let* ((v1-12 *game-info*)
(a0-14 (+ (-> v1-12 attack-id) 1))
)
(set! (-> v1-12 attack-id) a0-14)
(set! (-> obj attack-id) a0-14)
)
(let ((a1-8 (grunt-egg-method-23 obj)))
(if a1-8
(idle-control-method-9 (-> obj idle-anim-player) (the-as (pointer uint32) a1-8))
)
)
(if (>= (res-lump-value arg0 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0)
(set! (-> obj sound)
(new 'process 'ambient-sound (static-sound-spec "grunt-eggs" :fo-min 5 :fo-max 45) (-> obj root trans))
)
)
(if (task-complete? *game-info* (game-task strip-drop))
(go (method-of-object obj die))
(go (method-of-object obj idle))
)
(none)
)
(deftype grunt-egg-a (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
(deftype grunt-egg-b (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
(deftype grunt-egg-c (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
(deftype grunt-egg-d (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
;; WARN: Return type mismatch draw-control vs none.
(defmethod grunt-egg-method-22 grunt-egg-a ((obj grunt-egg-a))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-a" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(none)
)
(defmethod grunt-egg-method-23 grunt-egg-a ((obj grunt-egg-a))
*grunt-egg-a-script*
)
;; WARN: Return type mismatch connection vs none.
(defmethod grunt-egg-method-22 grunt-egg-b ((obj grunt-egg-b))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-b" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(add-connection *part-engine* obj 9 obj 1035 (new 'static 'vector :w 163840.0))
(add-connection *part-engine* obj 14 obj 1035 (new 'static 'vector :w 163840.0))
(none)
)
(defmethod grunt-egg-method-23 grunt-egg-b ((obj grunt-egg-b))
*grunt-egg-b-script*
)
;; WARN: Return type mismatch connection vs none.
(defmethod grunt-egg-method-22 grunt-egg-c ((obj grunt-egg-c))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-c" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(add-connection *part-engine* obj 7 obj 1036 (new 'static 'vector :w 163840.0))
(none)
)
(defmethod grunt-egg-method-23 grunt-egg-c ((obj grunt-egg-c))
*grunt-egg-c-script*
)
;; WARN: Return type mismatch connection vs none.
(defmethod grunt-egg-method-22 grunt-egg-d ((obj grunt-egg-d))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-d" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(add-connection *part-engine* obj 10 obj 1037 (new 'static 'vector :w 163840.0))
(none)
)
(defmethod grunt-egg-method-23 grunt-egg-d ((obj grunt-egg-d))
*grunt-egg-d-script*
)
File diff suppressed because it is too large Load Diff
+165
View File
@@ -7,3 +7,168 @@
;; DECOMP BEGINS
(defskelgroup skel-cntrlrm-door cntrlrm-door 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 1.8 0 3.6))
(deftype cntrlrm-door (process-drawable)
((root-override collide-shape :offset 128)
(unknown-pad-k1jhb2n3k1j int32 52 :offset-assert 200)
)
:heap-base #x120
:method-count-assert 22
:size-assert #x198
:flag-assert #x1601200198
(:methods
(idle () _type_ :state 20)
(opened () _type_ :state 21)
)
)
(defstate idle (cntrlrm-door)
:virtual #t
:code (behavior ()
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
(defstate opened (cntrlrm-door)
:virtual #t
:code (behavior ()
(ja :group! (-> self draw art-group data 3))
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! cntrlrm-door ((obj cntrlrm-door) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s4-0 total-prims) (the-as uint 4))
(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))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 10240.0 0.0 16384.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 0))))
(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))
(set! (-> v1-8 transform-index) 3)
(set-vector! (-> v1-8 local-sphere) 0.0 -3072.0 0.0 8192.0)
)
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-10 prim-core action) (collide-action solid))
(set! (-> v1-10 transform-index) 4)
(set-vector! (-> v1-10 local-sphere) 0.0 6144.0 0.0 10240.0)
)
(let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-12 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-12 prim-core action) (collide-action solid))
(set! (-> v1-12 transform-index) 4)
(set-vector! (-> v1-12 local-sphere) 0.0 7168.0 0.0 10240.0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-15 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-15 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-15 prim-core collide-with))
)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-cntrlrm-door" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(if (task-node-closed? (game-task-node strip-rescue-resolution))
(go (method-of-object obj opened))
(go (method-of-object obj idle))
)
(none)
)
(defskelgroup skel-cntrlrm-button cntrlrm-button 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 10))
(deftype cntrlrm-button (process-drawable)
((root-override collide-shape :offset 128)
(unknown-pad-n12jn3123123 int32 52 :offset-assert 200)
)
:heap-base #x120
:method-count-assert 21
:size-assert #x198
:flag-assert #x1501200198
(:methods
(idle () _type_ :state 20)
)
)
(defstate idle (cntrlrm-button)
:virtual #t
:code (behavior ()
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! cntrlrm-button ((obj cntrlrm-button) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
(set! (-> s4-0 total-prims) (the-as uint 3))
(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))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 3276.8)
(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 0))))
(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))
(set! (-> v1-8 transform-index) 3)
(set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 2867.2)
)
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-10 prim-core action) (collide-action solid))
(set! (-> v1-10 transform-index) 4)
(set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 1638.4)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-13 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-13 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-13 prim-core collide-with))
)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-cntrlrm-button" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(go (method-of-object obj idle))
(none)
)
+415
View File
@@ -0,0 +1,415 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defpartgroup group-chain-crate-cable-sparks
:id 238
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 1127 :fade-after (meters 100)))
)
;; failed to figure out what this is:
(defpart 1127
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
(sp-rnd-flt spt-num 5.0 5.0 1.0)
(sp-flt spt-scale-x (meters 2.5))
(sp-int spt-rot-x 4)
(sp-flt spt-scale-y (meters 0.1))
(sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
(sp-flt spt-b 255.0)
(sp-flt spt-a 128.0)
(sp-flt spt-omega 14.336)
(sp-rnd-flt spt-vel-y (meters 0.06666667) (meters 0.06666667) 1.0)
(sp-rnd-flt spt-fade-g -0.85 -1.7 1.0)
(sp-flt spt-fade-b -8.0)
(sp-rnd-flt spt-fade-a -0.21333334 -0.21333334 1.0)
(sp-rnd-flt spt-accel-y -6.826667 -2.7306666 1.0)
(sp-flt spt-friction 0.97)
(sp-int-plain-rnd spt-timer 50 149 1)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
(sp-func spt-func 'sparticle-motion-blur)
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 80.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
)
)
;; failed to figure out what this is:
(defpartgroup group-chain-crate-guide-sparks
:id 239
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 1128 :fade-after (meters 100)))
)
;; failed to figure out what this is:
(defpart 1128
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
(sp-rnd-int spt-num 1073741824 2 3.0)
(sp-flt spt-scale-x (meters 2.5))
(sp-int spt-rot-x 4)
(sp-flt spt-scale-y (meters 0.1))
(sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
(sp-flt spt-b 255.0)
(sp-flt spt-a 128.0)
(sp-flt spt-omega 14.336)
(sp-rnd-flt spt-vel-y (meters 0.06666667) (meters 0.06666667) 1.0)
(sp-rnd-flt spt-fade-g -0.85 -1.7 1.0)
(sp-flt spt-fade-b -8.0)
(sp-rnd-flt spt-fade-a -0.21333334 -0.21333334 1.0)
(sp-rnd-flt spt-accel-y -6.826667 -2.7306666 1.0)
(sp-flt spt-friction 0.97)
(sp-int-plain-rnd spt-timer 50 149 1)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
(sp-func spt-func 'sparticle-motion-blur)
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 80.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
)
)
;; failed to figure out what this is:
(defskelgroup skel-strip-chain-crate strip-chain-crate strip-chain-crate-lod0-jg strip-chain-crate-idle-ja
((strip-chain-crate-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -16.5 0 19)
:longest-edge (meters 23.3238)
:origin-joint-index 3
)
;; definition of type strip-chain-crate-slave
(deftype strip-chain-crate-slave (process-drawable)
((part2 sparticle-launch-control :offset-assert 200)
(path-u float :offset-assert 204)
(path-speed float :offset-assert 208)
(guide-sound-mask uint32 :offset-assert 212)
(guide-num int8 :offset-assert 216)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xd9
:flag-assert #x17006000d9
(:methods
(die-fast () _type_ :state 20)
(moving () _type_ :state 21)
(strip-chain-crate-slave-method-22 (_type_) none 22)
)
)
;; definition for method 3 of type strip-chain-crate-slave
(defmethod inspect strip-chain-crate-slave ((obj strip-chain-crate-slave))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tpart2: ~A~%" (-> obj part2))
(format #t "~2Tpath-u: ~f~%" (-> obj path-u))
(format #t "~2Tpath-speed: ~f~%" (-> obj path-speed))
(format #t "~2Tguide-sound-mask: ~D~%" (-> obj guide-sound-mask))
(format #t "~2Tguide-num: ~D~%" (-> obj guide-num))
(label cfg-4)
obj
)
;; definition for symbol *strip-chain-crate-guides*, type vector4s-3
(define *strip-chain-crate-guides* (new 'static 'vector4s-3 :data (new 'static 'array float 12
0.0827
0.1351
0.2022
0.2655
0.6085
0.6169
0.6955
0.7531
0.8589
0.9175
100.0
101.0
)
)
)
;; definition for method 22 of type strip-chain-crate-slave
;; WARN: Return type mismatch rgbaf vs none.
(defmethod strip-chain-crate-slave-method-22 strip-chain-crate-slave ((obj strip-chain-crate-slave))
(let ((f0-0 (-> obj path-u)))
(cond
((>= 0.09 f0-0)
(let ((f0-1 (* 11.111111 f0-0)))
(set-vector! (-> obj draw color-mult) f0-1 f0-1 f0-1 1.0)
)
)
((>= f0-0 0.87)
(let ((f0-5 (- 1.0 (* 7.692308 (+ -0.87 f0-0)))))
(set-vector! (-> obj draw color-mult) f0-5 f0-5 f0-5 1.0)
)
)
)
)
(none)
)
;; failed to figure out what this is:
(defstate moving (strip-chain-crate-slave)
:virtual #t
:trans (behavior ()
(if (>= (-> self path-u) 1.0)
(go-virtual die-fast)
)
(rider-trans)
(let ((f30-0 (fmin 1.0 (+ (-> self path-u) (* (-> self path-speed) (-> self clock seconds-per-frame))))))
(set! (-> self path-u) f30-0)
(strip-chain-crate-slave-method-22 self)
(let ((a0-1 (* (-> self guide-num) 2))
(v1-10 *strip-chain-crate-guides*)
)
(while (< (-> v1-10 data (+ a0-1 1)) f30-0)
(+! a0-1 2)
)
(set! (-> self guide-num) (/ a0-1 2))
(cond
((and (>= f30-0 (-> v1-10 data a0-1)) (>= (-> v1-10 data (+ a0-1 1)) f30-0))
(let ((v1-13 (-> self guide-sound-mask))
(a0-5 (ash 1 (-> self guide-num)))
)
(when (not (logtest? v1-13 a0-5))
(set! (-> self guide-sound-mask) (logior v1-13 a0-5))
(sound-play "crate-guide")
)
)
(if (zero? (rand-vu-int-count 4))
(spawn (-> self part2) (-> self root trans))
)
)
(else
(if (zero? (rand-vu-int-count 45))
(spawn (-> self part) (-> self root trans))
)
)
)
)
(get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp)
(set! (-> self root trans y) (-> self root trans y))
(let ((gp-1 (new 'stack-no-clear 'vector)))
(displacement-between-points-at-percent-normalized! (-> self path) gp-1 f30-0)
(seek-toward-heading-vec! (-> self root) gp-1 6371.5557 (seconds 0.1))
)
)
(update-trans! (-> self sound) (-> self root trans))
(update! (-> self sound))
(none)
)
:code (the-as (function none :behavior strip-chain-crate-slave) sleep-code)
:post (the-as (function none :behavior strip-chain-crate-slave) rider-post)
)
;; failed to figure out what this is:
(defstate die-fast (strip-chain-crate-slave)
:virtual #t
:code (the-as (function none :behavior strip-chain-crate-slave) nothing)
)
;; definition for function strip-chain-crate-slave-init-by-other
;; WARN: Return type mismatch object vs none.
(defbehavior strip-chain-crate-slave-init-by-other strip-chain-crate-slave ((arg0 float) (arg1 float))
(set! (-> self path-u) arg0)
(let ((s5-0 (new 'process 'collide-shape-moving self (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-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 -67584.0 0.0 77824.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) s4-0)
)
(pusher-init s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-16 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> self root) s5-0)
)
(process-drawable-from-entity! self (-> self entity))
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-strip-chain-crate" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 238) self))
(set! (-> self part2) (create-launch-control (-> *part-group-id-table* 239) self))
(set! (-> self path) (new 'process 'curve-control self 'path -1000000000.0))
(logior! (-> self path flags) (path-control-flag display draw-line draw-point draw-text))
(let ((f0-7 (total-distance (-> self path))))
(set! (-> self path-speed) (/ arg1 f0-7))
)
(get-point-in-path! (-> self path) (-> self root trans) (-> self path-u) 'interp)
(set! (-> self root trans y) (-> self root trans y))
(let ((gp-1 (new 'stack-no-clear 'vector)))
(displacement-between-points-at-percent-normalized! (-> self path) gp-1 (-> self path-u))
(set-heading-vec! (-> self root) gp-1)
)
(set! (-> self sound)
(new 'process 'ambient-sound (static-sound-spec "crate-loop" :fo-max 100) (-> self root trans))
)
(ja-channel-push! 1 0)
(ja :group! (-> self draw art-group data 2) :num! min)
(transform-post)
(logclear! (-> self mask) (process-mask actor-pause))
(strip-chain-crate-slave-method-22 self)
(go-virtual moving)
(none)
)
;; definition for method 10 of type strip-chain-crate-slave
(defmethod deactivate strip-chain-crate-slave ((obj strip-chain-crate-slave))
(if (nonzero? (-> obj part2))
(kill-and-free-particles (-> obj part2))
)
((method-of-type process-drawable deactivate) obj)
(none)
)
;; definition for method 7 of type strip-chain-crate-slave
;; WARN: Return type mismatch process-drawable vs strip-chain-crate-slave.
(defmethod relocate strip-chain-crate-slave ((obj strip-chain-crate-slave) (arg0 int))
(if (nonzero? (-> obj part2))
(&+! (-> obj part2) arg0)
)
(the-as strip-chain-crate-slave ((method-of-type process-drawable relocate) obj arg0))
)
;; definition of type strip-chain-crate
(deftype strip-chain-crate (process-drawable)
((spawn-pos vector :inline :offset-assert 208)
(next-spawn-time time-frame :offset-assert 224)
(spawn-delay uint32 :offset-assert 232)
(spawn-offset uint32 :offset-assert 236)
(dist-apart float :offset-assert 240)
(crate-speed float :offset-assert 244)
)
:heap-base #x80
:method-count-assert 22
:size-assert #xf8
:flag-assert #x16008000f8
(:methods
(idle () _type_ :state 20)
(strip-chain-crate-method-21 (_type_) none 21)
)
)
;; definition for method 3 of type strip-chain-crate
(defmethod inspect strip-chain-crate ((obj strip-chain-crate))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tspawn-pos: #<vector @ #x~X>~%" (-> obj spawn-pos))
(format #t "~2Tnext-spawn-time: ~D~%" (-> obj next-spawn-time))
(format #t "~2Tspawn-delay: ~D~%" (-> obj spawn-delay))
(format #t "~2Tspawn-offset: ~D~%" (-> obj spawn-offset))
(format #t "~2Tdist-apart: ~f~%" (-> obj dist-apart))
(format #t "~2Tcrate-speed: ~f~%" (-> obj crate-speed))
(label cfg-4)
obj
)
;; definition for method 21 of type strip-chain-crate
;; WARN: Return type mismatch symbol vs none.
(defmethod strip-chain-crate-method-21 strip-chain-crate ((obj strip-chain-crate))
(with-pp
(let ((f30-0 (total-distance (-> obj path)))
(f28-0
(* (/ (the float (mod
(the-as uint (+ (-> pp clock frame-counter) (the-as time-frame (-> obj spawn-offset))))
(-> obj spawn-delay)
)
)
(the float (-> obj spawn-delay))
)
(-> obj dist-apart)
)
)
)
(while (>= f30-0 f28-0)
(let ((f26-0 (/ f28-0 f30-0)))
(process-spawn strip-chain-crate-slave f26-0 (-> obj crate-speed) :to obj)
)
(+! f28-0 (-> obj dist-apart))
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (strip-chain-crate)
:virtual #t
:code (behavior ()
(until #f
(when (>= (-> self clock frame-counter) (-> self next-spawn-time))
(process-spawn strip-chain-crate-slave 0 (-> self crate-speed) :to self)
(+! (-> self next-spawn-time) (the-as time-frame (-> self spawn-delay)))
)
(suspend)
)
#f
(none)
)
)
;; definition for method 11 of type strip-chain-crate
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! strip-chain-crate ((obj strip-chain-crate) (arg0 entity-actor))
(local-vars (sv-16 int))
(with-pp
(set! (-> obj root) (new 'process 'trsqv))
(set! (-> obj path) (new 'process 'curve-control obj 'path -1000000000.0))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(let ((f28-0 53248.0)
(f26-0 131072.0)
(f30-0 0.0)
)
(set! sv-16 0)
(let ((v1-8 (res-lump-data arg0 'speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16)))))
(when v1-8
(set! f28-0 (-> v1-8 0))
(set! f26-0 (-> v1-8 1))
(set! f30-0 (-> v1-8 2))
)
)
(set! (-> obj crate-speed) f28-0)
(set! (-> obj dist-apart) f26-0)
(set! (-> obj spawn-delay) (the-as uint (the int (* 300.0 (/ f26-0 f28-0)))))
(set! (-> obj spawn-offset) (the-as uint (the int (* f30-0 (the float (-> obj spawn-delay))))))
)
(set! (-> obj next-spawn-time)
(+ (-> pp clock frame-counter)
(the-as
time-frame
(- (-> obj spawn-delay)
(mod
(the-as uint (+ (-> pp clock frame-counter) (the-as time-frame (-> obj spawn-offset))))
(-> obj spawn-delay)
)
)
)
)
)
(logclear! (-> obj mask) (process-mask actor-pause))
(strip-chain-crate-method-21 obj)
(go (method-of-object obj idle))
(none)
)
)
+997
View File
@@ -0,0 +1,997 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defpartgroup group-strip-drop-splash
:id 234
:duration (seconds 2)
:flags (use-local-clock)
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 1111 :period 900 :length 40)
(sp-item 1111 :period 900 :length 30)
(sp-item 1111 :period 900 :length 20)
(sp-item 1111 :period 900 :length 10)
(sp-item 1111 :period 900 :length 5)
(sp-item 1112 :flags (is-3d) :period 900 :length 5)
)
)
;; failed to figure out what this is:
(defpart 1112
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x33 :page #xc))
(sp-flt spt-num 3.0)
(sp-rnd-flt spt-y (meters 0) (meters 4) 1.0)
(sp-flt spt-scale-x (meters 40))
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 128.0)
(sp-rnd-flt spt-vel-y (meters 0.05) (meters 0.016666668) 1.0)
(sp-rnd-flt spt-scalevel-x (meters 0.5) (meters 0.5) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -1.0666667)
(sp-flt spt-accel-y -6.826667)
(sp-int spt-timer 120)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
)
)
;; failed to figure out what this is:
(defpart 1111
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 32.0)
(sp-flt spt-y (meters 3))
(sp-rnd-flt spt-scale-x (meters 0.4) (meters 0.2) 1.0)
(sp-int spt-rot-x 4)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 128.0)
(sp-rnd-flt spt-omega 4.096 2.048 1.0)
(sp-rnd-flt spt-vel-y (meters 0.16666667) (meters 0.33333334) 1.0)
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 1200)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-flt spt-userdata 290611.2)
(sp-func spt-func 'check-drop-level-strip-crate-drop-userdata)
(sp-int-plain-rnd spt-next-time 0 174 1)
(sp-launcher-by-id spt-next-launcher 1113)
(sp-rnd-flt spt-conerot-x (degrees 75.0) (degrees 15.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees -100.00001) (degrees 120.0) 1.0)
(sp-flt spt-conerot-radius (meters 16))
)
)
;; failed to figure out what this is:
(defpart 1113
:init-specs ((sp-rnd-flt spt-r 64.0 64.0 1.0)
(sp-flt spt-g 0.0)
(sp-rnd-flt spt-b 128.0 128.0 1.0)
(sp-flt spt-fade-r -6.4)
(sp-flt spt-fade-b -12.8)
(sp-int-plain-rnd spt-next-time 0 224 1)
(sp-launcher-by-id spt-next-launcher 1113)
)
)
;; failed to figure out what this is:
(defpart 1114
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x33 :page #xc))
(sp-flt spt-num 0.3)
(sp-rnd-flt spt-scale-x (meters 3) (meters 0.5) 1.0)
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-scalevel-x (meters 0.35) (meters 0.35) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-rnd-flt spt-fade-a 0.8 0.8 1.0)
(sp-int spt-timer 450)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-int spt-next-time 20)
(sp-launcher-by-id spt-next-launcher 1115)
)
)
;; failed to figure out what this is:
(defpart 1115
:init-specs ((sp-flt spt-scalevel-x (meters 0)) (sp-copy-from-other spt-scalevel-y -4) (sp-flt spt-fade-a 0.0))
)
;; failed to figure out what this is:
(defpart 1116
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-rnd-flt spt-num 0.0 2.5 1.0)
(sp-rnd-flt spt-scale-x (meters 0.35) (meters 0.2) 1.0)
(sp-int spt-rot-x 4)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-flt spt-omega 8.192)
(sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.1) 1.0)
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 600)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-flt spt-userdata 290611.2)
(sp-func spt-func 'check-drop-level-strip-crate-drop-userdata-nosplat)
(sp-int-plain-rnd spt-next-time 0 99 1)
(sp-launcher-by-id spt-next-launcher 1113)
(sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 40.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
)
)
;; failed to figure out what this is:
(defpart 1117
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-rnd-flt spt-num 0.0 2.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
(sp-int spt-rot-x 4)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-flt spt-omega 12.288)
(sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.1) 1.0)
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 600)
(sp-cpuinfo-flags sp-cpuinfo-flag-2)
(sp-int-plain-rnd spt-next-time 0 74 1)
(sp-launcher-by-id spt-next-launcher 1113)
(sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 40.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
)
)
;; definition for function check-drop-level-strip-crate-drop-userdata-nosplat
;; INFO: Used lq/sq
(defun check-drop-level-strip-crate-drop-userdata-nosplat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
(when (< (-> arg2 vector 0 y) (-> arg1 user-float))
(let ((s3-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(set-vector! s3-0 (-> arg2 vector 0 x) (-> arg1 user-float) (-> arg2 vector 0 z) 1.0)
(let ((t9-1 sp-launch-particles-var)
(a0-3 *sp-particle-system-2d*)
(a1-2 (-> *part-id-table* 1117))
(a2-1 *launch-matrix*)
)
(set! (-> a2-1 trans quad) (-> s3-0 quad))
(t9-1 a0-3 a1-2 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
)
)
(sparticle-motion-blur arg0 arg1 (the-as vector arg2))
(none)
)
;; definition for function check-drop-level-strip-crate-drop-userdata
;; INFO: Used lq/sq
(defun check-drop-level-strip-crate-drop-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
(when (< (-> arg2 vector 0 y) (-> arg1 user-float))
(let ((s3-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(set-vector! s3-0 (-> arg2 vector 0 x) (-> arg1 user-float) (-> arg2 vector 0 z) 1.0)
(let ((t9-1 sp-launch-particles-var)
(a0-3 *sp-particle-system-3d*)
(a1-2 (-> *part-id-table* 1114))
(a2-1 *launch-matrix*)
)
(set! (-> a2-1 trans quad) (-> s3-0 quad))
(t9-1 a0-3 a1-2 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
(let ((t9-2 sp-launch-particles-var)
(a0-4 *sp-particle-system-2d*)
(a1-3 (-> *part-id-table* 1116))
(a2-2 *launch-matrix*)
)
(set! (-> a2-2 trans quad) (-> s3-0 quad))
(t9-2 a0-4 a1-3 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
)
)
(sparticle-motion-blur arg0 arg1 (the-as vector arg2))
(none)
)
;; failed to figure out what this is:
(defskelgroup skel-cable cable cable-lod0-jg -1
((cable-lod0-mg (meters 999999)))
:bounds (static-spherem 0 44 0 44)
:origin-joint-index 3
)
;; failed to figure out what this is:
(defskelgroup skel-cranecrate cranecrate cranecrate-lod0-jg cranecrate-idle-ja
((cranecrate-lod0-mg (meters 20)) (cranecrate-lod1-mg (meters 999999)))
:bounds (static-spherem 0 -5 0 20)
:origin-joint-index 3
)
;; failed to figure out what this is:
(defskelgroup skel-crane crane crane-lod0-jg crane-idle-ja
((crane-lod0-mg (meters 999999)))
:bounds (static-spherem 75 20 0 120)
)
;; definition of type strip-game-crate
(deftype strip-game-crate (process-drawable)
((local-offset vector :inline :offset-assert 208)
(swing-angle vector :inline :offset-assert 224)
)
:heap-base #x70
:method-count-assert 23
:size-assert #xf0
:flag-assert #x17007000f0
(:methods
(idle () _type_ :state 20)
(final-position () _type_ :state 21)
(strip-game-crate-method-22 (_type_ vector quaternion) none 22)
)
)
;; definition for method 3 of type strip-game-crate
(defmethod inspect strip-game-crate ((obj strip-game-crate))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tlocal-offset: #<vector @ #x~X>~%" (-> obj local-offset))
(format #t "~2Tswing-angle: #<vector @ #x~X>~%" (-> obj swing-angle))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-strip-game-crate strip-game-crate strip-game-crate-lod0-jg strip-game-crate-idle-ja
((strip-game-crate-lod0-mg (meters 999999)))
:bounds (static-spherem 0 9.8 0 27)
)
;; failed to figure out what this is:
(defstate idle (strip-game-crate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('go-final)
(go-virtual final-position)
)
)
)
:trans (the-as (function none :behavior strip-game-crate) rider-trans)
:code (the-as (function none :behavior strip-game-crate) sleep-code)
:post (behavior ()
(let* ((f30-1 (* 333.14133 (cos (* 66.8053 (the float (mod (-> self clock frame-counter) 981))))))
(f28-1 (* 358.62756 (cos (* 48.65331 (the float (mod (-> self clock frame-counter) 1346))))))
(f0-6 30.0)
(gp-0 (+ (-> self clock frame-counter) (seconds -15.24)))
(f26-1
(+ 637.1556 (* 637.1556 (cos (* 65536.0 (/ (the float (mod gp-0 (the int (* 300.0 f0-6)))) (* 300.0 f0-6))))))
)
(f0-15 (* 1092.2667 (cos (* 3.640889 (the float (mod gp-0 #x4650))))))
)
(set! (-> self swing-angle z) (+ f30-1 f26-1))
(set! (-> self swing-angle x) (+ f28-1 f0-15))
)
(rider-post)
(none)
)
)
;; failed to figure out what this is:
(defstate final-position (strip-game-crate)
:virtual #t
:enter (behavior ()
(ja :group! (-> self draw art-group data 3) :num! min)
(ja-post)
(none)
)
:code (the-as (function none :behavior strip-game-crate) sleep-code)
)
;; definition for method 22 of type strip-game-crate
;; INFO: Used lq/sq
;; WARN: Return type mismatch vector vs none.
(defmethod strip-game-crate-method-22 strip-game-crate ((obj strip-game-crate) (arg0 vector) (arg1 quaternion))
(set! (-> obj root trans quad) (-> arg0 quad))
(let ((s4-0 (new 'stack-no-clear 'quaternion)))
(quaternion-rotate-z! s4-0 arg1 (-> obj swing-angle z))
(quaternion-rotate-x! s4-0 s4-0 (-> obj swing-angle x))
(quaternion-copy! (-> obj root quat) s4-0)
)
(none)
)
;; definition for function strip-game-crate-init-by-other
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defbehavior strip-game-crate-init-by-other strip-game-crate ((arg0 vector) (arg1 quaternion))
(let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 14)
(set-vector! (-> v1-2 local-sphere) 0.0 -22528.0 0.0 65536.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-2)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-5 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> self root) s4-0)
)
(set! (-> self root trans quad) (-> arg0 quad))
(quaternion-copy! (-> self root quat) arg1)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-strip-game-crate" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set-vector! (-> self swing-angle) 0.0 0.0 0.0 0.0)
(set-vector! (-> self local-offset) 0.0 -163840.0 0.0 1.0)
(let ((v1-16 (-> self node-list data)))
(set! (-> v1-16 0 param0) (the-as (function cspace transformq none) cspace<-transformq+rot-offset!))
(set! (-> v1-16 0 param1) (the-as basic (-> self root trans)))
(set! (-> v1-16 0 param2) (the-as basic (-> self local-offset)))
)
(logclear! (-> self mask) (process-mask actor-pause))
(if (task-complete? *game-info* (game-task strip-drop))
(go-virtual final-position)
(go-virtual idle)
)
(none)
)
;; definition of type crane
(deftype crane (process-drawable)
((angle-vel float :offset-assert 200)
(angle float :offset-assert 204)
(init-quat quaternion :inline :offset-assert 208)
(final-quat quaternion :inline :offset-assert 224)
(crate (pointer strip-game-crate) :offset-assert 240)
)
:heap-base #x80
:method-count-assert 23
:size-assert #xf4
:flag-assert #x17008000f4
(:methods
(idle () _type_ :state 20)
(swinging () _type_ :state 21)
(final-position () _type_ :state 22)
)
)
;; definition for method 3 of type crane
(defmethod inspect crane ((obj crane))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tangle-vel: ~f~%" (-> obj angle-vel))
(format #t "~2Tangle: ~f~%" (-> obj angle))
(format #t "~2Tinit-quat: #<quaternion @ #x~X>~%" (-> obj init-quat))
(format #t "~2Tfinal-quat: #<quaternion @ #x~X>~%" (-> obj final-quat))
(format #t "~2Tcrate: #x~X~%" (-> obj crate))
(label cfg-4)
obj
)
;; definition for method 10 of type crane
(defmethod deactivate crane ((obj crane))
(if (-> obj crate)
(deactivate (-> obj crate 0))
)
((method-of-type process-drawable deactivate) obj)
(none)
)
;; failed to figure out what this is:
(defstate idle (crane)
:virtual #t
:code (behavior ()
(ja :group! (ja-group) :num! min)
(ja-post)
(go-virtual swinging)
(until #f
(suspend)
)
#f
(none)
)
)
;; failed to figure out what this is:
(defstate swinging (crane)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(the-as
object
(case event-type
(('notice)
(when (and *target*
(not (task-complete? *game-info* (game-task strip-drop)))
(or (demo?) (and (task-node-closed? (game-task-node strip-drop-introduction))
(not (task-node-closed? (game-task-node strip-drop-resolution)))
)
)
)
(let ((gp-0 (if (demo?)
"crane-victory-demo"
"crane-victory"
)
)
)
(process-spawn scene-player :init scene-player-init gp-0 #t #f)
)
)
)
)
)
)
:enter (behavior ()
(set! (-> self angle) 0.0)
(set! (-> self angle-vel) 0.0)
(quaternion-copy! (-> self init-quat) (-> self root quat))
(none)
)
:trans (behavior ()
(if (task-complete? *game-info* (game-task strip-drop))
(go-virtual final-position)
)
(none)
)
:code (behavior ()
(until #f
(suspend)
)
#f
(none)
)
:post (behavior ()
(let* ((f0-1 (* 3.640889 (the float (mod (-> self clock frame-counter) #x4650))))
(f0-5 (+ -16384.0 (* 8192.0 (+ 1.0 (cos f0-1)))))
)
(quaternion-rotate-y! (-> self root quat) (-> self init-quat) f0-5)
)
(ja-post)
(let ((a1-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4))))
(strip-game-crate-method-22 (-> self crate 0) a1-2 (-> self root quat))
)
(none)
)
)
;; failed to figure out what this is:
(defstate final-position (crane)
:virtual #t
:event (-> (method-of-type crane swinging) event)
:enter (behavior ()
(quaternion-copy! (-> self root quat) (-> self final-quat))
(when (-> self crate)
(send-event (ppointer->process (-> self crate)) 'go-final)
(let ((a1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4))))
(strip-game-crate-method-22 (-> self crate 0) a1-3 (-> self root quat))
)
)
(none)
)
:code (the-as (function none :behavior crane) sleep-code)
:post (the-as (function none :behavior crane) ja-post)
)
;; definition for method 11 of type crane
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! crane ((obj crane) (arg0 entity-actor))
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-crane" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(quaternion-rotate-y! (-> obj root quat) (-> obj root quat) 910.2222)
(quaternion-copy! (-> obj final-quat) (-> obj root quat))
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj draw light-index) (the-as uint 10))
(ja-post)
(let ((s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj node-list data 4))))
(set! (-> obj crate) (process-spawn strip-game-crate s5-2 (-> obj root quat) :to obj))
)
(if (or (task-complete? *game-info* (game-task strip-rescue)) (demo?))
(go (method-of-object obj final-position))
(go (method-of-object obj idle))
)
(none)
)
;; definition of type cranecrate
(deftype cranecrate (process-drawable)
((root-override collide-shape :offset 128)
(unknown-pad-n12jn3123123 int32 52 :offset-assert 200)
)
:heap-base #x120
:method-count-assert 22
:size-assert #x198
:flag-assert #x1601200198
(:methods
(idle () _type_ :state 20)
(hidden () _type_ :state 21)
)
)
;; definition for method 3 of type cranecrate
(defmethod inspect cranecrate ((obj cranecrate))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Troot: #<collide-shape @ #x~X>~%" (-> obj root-override))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defstate idle (cranecrate)
:virtual #t
:code (behavior ()
(ja-channel-set! 1)
(ja :group! (-> self draw art-group data 3))
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; failed to figure out what this is:
(defstate hidden (cranecrate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('wake-up)
(go-virtual idle)
)
)
)
:code (behavior ()
(ja-channel-set! 0)
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; definition for method 11 of type cranecrate
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! cranecrate ((obj cranecrate) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 3)
(set-vector! (-> v1-2 local-sphere) 0.0 -20480.0 0.0 81920.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-2)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-5 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-cranecrate" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj root-override trans y) (+ -163348.48 (-> obj root-override trans y)))
(when (or (demo?) (and (= *kernel-boot-message* 'kiosk) (task-node-open? (game-task-node strip-drop-resolution))))
(let ((s5-2 (new 'stack-no-clear 'task-arrow-params)))
(set! (-> s5-2 pos quad) (-> (new 'static 'vector :x 9920120.0 :y 288036.03 :z -179639.1 :w 1.0) quad))
(quaternion-copy!
(-> s5-2 quat)
(eul->quat (new 'stack-no-clear 'quaternion) (new 'static 'euler-angles :x -16384.0 :y 16384.0))
)
(set! (-> s5-2 flags) (task-arrow-flags task-arrow-flag-02))
(set! (-> s5-2 map-icon) (the-as uint 15))
(task-arrow-spawn s5-2 (the-as task-arrow obj))
)
)
(if (task-node-closed? (game-task-node strip-drop-resolution))
(go (method-of-object obj idle))
(go (method-of-object obj hidden))
)
(none)
)
;; definition of type grunt-egg
(deftype grunt-egg (process-drawable)
((idle-anim-player idle-control :inline :offset-assert 208)
(attack-id uint32 :offset-assert 224)
)
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
(:methods
(idle () _type_ :state 20)
(die () _type_ :state 21)
(grunt-egg-method-22 (_type_) none 22)
(grunt-egg-method-23 (_type_) vector4w-2 23)
)
)
;; definition for method 3 of type grunt-egg
(defmethod inspect grunt-egg ((obj grunt-egg))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tidle-anim-player: #<idle-control @ #x~X>~%" (-> obj idle-anim-player))
(format #t "~2Tattack-id: ~D~%" (-> obj attack-id))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-grunt-egg-a grunt-egg-a grunt-egg-a-lod0-jg -1
((grunt-egg-a-lod0-mg (meters 20)) (grunt-egg-a-lod1-mg (meters 999999)))
:bounds (static-spherem 0 2 0 4)
)
;; failed to figure out what this is:
(defskelgroup skel-grunt-egg-b grunt-egg-b grunt-egg-b-lod0-jg -1
((grunt-egg-b-lod0-mg (meters 20)) (grunt-egg-b-lod1-mg (meters 999999)))
:bounds (static-spherem 0 2.5 0 4)
)
;; failed to figure out what this is:
(defskelgroup skel-grunt-egg-c grunt-egg-c grunt-egg-c-lod0-jg -1
((grunt-egg-c-lod0-mg (meters 20)) (grunt-egg-c-lod1-mg (meters 999999)))
:bounds (static-spherem 0 2.2 0 4)
)
;; failed to figure out what this is:
(defskelgroup skel-grunt-egg-d grunt-egg-d grunt-egg-d-lod0-jg -1
((grunt-egg-d-lod0-mg (meters 20)) (grunt-egg-d-lod1-mg (meters 999999)))
:bounds (static-spherem 0 4 0 8)
)
;; definition for symbol *grunt-egg-a-script*, type vector4w-2
(define *grunt-egg-a-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010301 :z #x1e0002 :w #x2010401)
(new 'static 'vector4w)
)
)
)
;; definition for symbol *grunt-egg-b-script*, type vector4w-2
(define *grunt-egg-b-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010401 :z #x1e0002 :w #x2010301)
(new 'static 'vector4w)
)
)
)
;; definition for symbol *grunt-egg-c-script*, type vector4w-2
(define *grunt-egg-c-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010301 :z #x1e0002 :w #x2010401)
(new 'static 'vector4w)
)
)
)
;; definition for symbol *grunt-egg-d-script*, type vector4w-2
(define *grunt-egg-d-script*
(new 'static 'vector4w-2 :vector (new 'static 'inline-array vector4w 2
(new 'static 'vector4w :x #x1e0002 :y #x2010301 :z #x1e0002 :w #x2010401)
(new 'static 'vector4w)
)
)
)
;; failed to figure out what this is:
(defstate idle (grunt-egg)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('touch 'attack)
(let* ((s5-0 (-> event param 0))
(s4-0 proc)
(v1-2 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(when (and v1-2 ((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s5-0)
(-> v1-2 root-override)
(collide-action solid)
(collide-action)
)
)
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-5 from) (process->ppointer self))
(set! (-> a1-5 num-params) 2)
(set! (-> a1-5 message) 'attack-or-shove)
(set! (-> a1-5 param 0) s5-0)
(let ((v1-7 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
(set! (-> v1-7 id) (-> self attack-id))
(set! (-> v1-7 shove-back) 12288.0)
(set! (-> v1-7 shove-up) 8192.0)
(set! (-> v1-7 mode) 'deadly)
(set! (-> v1-7 knock) (the-as uint 8))
(set! (-> v1-7 damage) 4.0)
(set! (-> a1-5 param 1) (the-as uint v1-7))
)
(send-event-function proc a1-5)
)
)
)
)
)
)
:code (the-as (function none :behavior grunt-egg) sleep-code)
:post (behavior ()
(if (nonzero? (-> self sound))
(update! (-> self sound))
)
(idle-control-method-10 (-> self idle-anim-player) self)
(ja-post)
(none)
)
)
;; failed to figure out what this is:
(defstate die (grunt-egg)
:virtual #t
:code (behavior ()
(cleanup-for-death self)
(none)
)
)
;; definition for method 11 of type grunt-egg
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! grunt-egg ((obj grunt-egg) (arg0 entity-actor))
(cond
((>= (res-lump-value arg0 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0)
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-4 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-4 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-4 prim-core action) (collide-action solid deadly))
(set! (-> v1-4 transform-index) 0)
(set-vector! (-> v1-4 local-sphere) 0.0 -20480.0 0.0 53248.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-4)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-7 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-7 prim-core collide-with))
)
(set! (-> obj root) s4-0)
)
)
(else
(set! (-> obj root) (new 'process 'trsqv))
)
)
(grunt-egg-method-22 obj)
(process-drawable-from-entity! obj arg0)
(let* ((v1-12 *game-info*)
(a0-14 (+ (-> v1-12 attack-id) 1))
)
(set! (-> v1-12 attack-id) a0-14)
(set! (-> obj attack-id) a0-14)
)
(let ((a1-8 (grunt-egg-method-23 obj)))
(if a1-8
(idle-control-method-9 (-> obj idle-anim-player) (the-as (pointer uint32) a1-8))
)
)
(if (>= (res-lump-value arg0 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0)
(set! (-> obj sound)
(new 'process 'ambient-sound (static-sound-spec "grunt-eggs" :fo-min 5 :fo-max 45) (-> obj root trans))
)
)
(if (task-complete? *game-info* (game-task strip-drop))
(go (method-of-object obj die))
(go (method-of-object obj idle))
)
(none)
)
;; definition of type grunt-egg-a
(deftype grunt-egg-a (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
;; definition for method 3 of type grunt-egg-a
(defmethod inspect grunt-egg-a ((obj grunt-egg-a))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type grunt-egg inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition of type grunt-egg-b
(deftype grunt-egg-b (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
;; definition for method 3 of type grunt-egg-b
(defmethod inspect grunt-egg-b ((obj grunt-egg-b))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type grunt-egg inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition of type grunt-egg-c
(deftype grunt-egg-c (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
;; definition for method 3 of type grunt-egg-c
(defmethod inspect grunt-egg-c ((obj grunt-egg-c))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type grunt-egg inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition of type grunt-egg-d
(deftype grunt-egg-d (grunt-egg)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe4
:flag-assert #x18007000e4
)
;; definition for method 3 of type grunt-egg-d
(defmethod inspect grunt-egg-d ((obj grunt-egg-d))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type grunt-egg inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition for method 22 of type grunt-egg-a
;; WARN: Return type mismatch draw-control vs none.
(defmethod grunt-egg-method-22 grunt-egg-a ((obj grunt-egg-a))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-a" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(none)
)
;; definition for method 23 of type grunt-egg-a
(defmethod grunt-egg-method-23 grunt-egg-a ((obj grunt-egg-a))
*grunt-egg-a-script*
)
;; definition for method 22 of type grunt-egg-b
;; WARN: Return type mismatch connection vs none.
(defmethod grunt-egg-method-22 grunt-egg-b ((obj grunt-egg-b))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-b" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(add-connection *part-engine* obj 9 obj 1035 (new 'static 'vector :w 163840.0))
(add-connection *part-engine* obj 14 obj 1035 (new 'static 'vector :w 163840.0))
(none)
)
;; definition for method 23 of type grunt-egg-b
(defmethod grunt-egg-method-23 grunt-egg-b ((obj grunt-egg-b))
*grunt-egg-b-script*
)
;; definition for method 22 of type grunt-egg-c
;; WARN: Return type mismatch connection vs none.
(defmethod grunt-egg-method-22 grunt-egg-c ((obj grunt-egg-c))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-c" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(add-connection *part-engine* obj 7 obj 1036 (new 'static 'vector :w 163840.0))
(none)
)
;; definition for method 23 of type grunt-egg-c
(defmethod grunt-egg-method-23 grunt-egg-c ((obj grunt-egg-c))
*grunt-egg-c-script*
)
;; definition for method 22 of type grunt-egg-d
;; WARN: Return type mismatch connection vs none.
(defmethod grunt-egg-method-22 grunt-egg-d ((obj grunt-egg-d))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-grunt-egg-d" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(add-connection *part-engine* obj 10 obj 1037 (new 'static 'vector :w 163840.0))
(none)
)
;; definition for method 23 of type grunt-egg-d
(defmethod grunt-egg-method-23 grunt-egg-d ((obj grunt-egg-d))
*grunt-egg-d-script*
)
File diff suppressed because it is too large Load Diff
+209
View File
@@ -0,0 +1,209 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defskelgroup skel-cntrlrm-door cntrlrm-door cntrlrm-door-lod0-jg cntrlrm-door-idle-ja
((cntrlrm-door-lod0-mg (meters 999999)))
:bounds (static-spherem 0 1.8 0 3.6)
)
;; definition of type cntrlrm-door
(deftype cntrlrm-door (process-drawable)
((root-override collide-shape :offset 128)
(unknown-pad-k1jhb2n3k1j int32 52 :offset-assert 200)
)
:heap-base #x120
:method-count-assert 22
:size-assert #x198
:flag-assert #x1601200198
(:methods
(idle () _type_ :state 20)
(opened () _type_ :state 21)
)
)
;; definition for method 3 of type cntrlrm-door
(defmethod inspect cntrlrm-door ((obj cntrlrm-door))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Troot: #<collide-shape @ #x~X>~%" (-> obj root-override))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defstate idle (cntrlrm-door)
:virtual #t
:code (behavior ()
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; failed to figure out what this is:
(defstate opened (cntrlrm-door)
:virtual #t
:code (behavior ()
(ja :group! (-> self draw art-group data 3))
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; definition for method 11 of type cntrlrm-door
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! cntrlrm-door ((obj cntrlrm-door) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s4-0 total-prims) (the-as uint 4))
(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))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 10240.0 0.0 16384.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 0))))
(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))
(set! (-> v1-8 transform-index) 3)
(set-vector! (-> v1-8 local-sphere) 0.0 -3072.0 0.0 8192.0)
)
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-10 prim-core action) (collide-action solid))
(set! (-> v1-10 transform-index) 4)
(set-vector! (-> v1-10 local-sphere) 0.0 6144.0 0.0 10240.0)
)
(let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-12 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-12 prim-core action) (collide-action solid))
(set! (-> v1-12 transform-index) 4)
(set-vector! (-> v1-12 local-sphere) 0.0 7168.0 0.0 10240.0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-15 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-15 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-15 prim-core collide-with))
)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-cntrlrm-door" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(if (task-node-closed? (game-task-node strip-rescue-resolution))
(go (method-of-object obj opened))
(go (method-of-object obj idle))
)
(none)
)
;; failed to figure out what this is:
(defskelgroup skel-cntrlrm-button cntrlrm-button cntrlrm-button-lod0-jg cntrlrm-button-idle-ja
((cntrlrm-button-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
)
;; definition of type cntrlrm-button
(deftype cntrlrm-button (process-drawable)
((root-override collide-shape :offset 128)
(unknown-pad-n12jn3123123 int32 52 :offset-assert 200)
)
:heap-base #x120
:method-count-assert 21
:size-assert #x198
:flag-assert #x1501200198
(:methods
(idle () _type_ :state 20)
)
)
;; definition for method 3 of type cntrlrm-button
(defmethod inspect cntrlrm-button ((obj cntrlrm-button))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Troot: #<collide-shape @ #x~X>~%" (-> obj root-override))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defstate idle (cntrlrm-button)
:virtual #t
:code (behavior ()
(dotimes (gp-0 2)
(transform-post)
(suspend)
)
(sleep-code)
(none)
)
)
;; definition for method 11 of type cntrlrm-button
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! cntrlrm-button ((obj cntrlrm-button) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
(set! (-> s4-0 total-prims) (the-as uint 3))
(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))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 3276.8)
(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 0))))
(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))
(set! (-> v1-8 transform-index) 3)
(set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 2867.2)
)
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-10 prim-core action) (collide-action solid))
(set! (-> v1-10 transform-index) 4)
(set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 1638.4)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-13 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-13 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-13 prim-core collide-with))
)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-cntrlrm-button" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(go (method-of-object obj idle))
(none)
)