d/jak2 - initial crimson-guard-level decomp and also the dig missions (#2092)

Finishes a bunch of files related to crimson guards / early missions:
- `crimson-guard-level`
- `dig-digger`
- `fordumpa-obs`
- `fort-robotank`
- `fort-robotank-turret`
- `fort-turret`
- `transport-level`
- `fordumpb-obs`
- `fort-floor-spike`
- `fordumpc-obs`
This commit is contained in:
Tyler Wilding
2023-01-11 19:07:35 -05:00
committed by GitHub
parent 22adecc222
commit e0d31a33bd
92 changed files with 38740 additions and 726 deletions
+1 -1
View File
@@ -82,7 +82,7 @@
"--game",
"jak2",
"--file",
"atoll-part"
"fort-turret"
]
},
{
+3
View File
@@ -123,6 +123,9 @@ tasks:
offline-tests: # ran by jenkins
cmds:
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --fail-on-cmp'
offline-test-file:
cmds:
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --file {{.FILE}}'
offline-tests-fast:
cmds:
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --pretty-print --num_threads 32 --dump_current_output --fail-on-cmp'
+6 -1
View File
@@ -3260,7 +3260,12 @@ goos::Object DefpartgroupElement::to_form_internal(const Env& env) const {
}
if (offset) {
result += fmt::format(" :offset {}", offset);
// jak2 has switched this field to a signed 16 bit number
if (env.version == GameVersion::Jak2) {
result += fmt::format(" :offset {}", (s16)offset);
} else {
result += fmt::format(" :offset {}", offset);
}
}
if (hour_mask) {
+2 -1
View File
@@ -736,7 +736,8 @@ void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
event_handler_hack = function.guessed_name.is_event_handler() ||
function.guessed_name.to_string() == "target-generic-event-handler" ||
function.guessed_name.to_string() == "target-standard-event-handler" ||
function.guessed_name.to_string() == "(method 74 pegasus)";
function.guessed_name.to_string() == "(method 74 pegasus)" ||
function.guessed_name.to_string() == "(method 74 crimson-guard-level)";
}
for (int block_id = 0; block_id < int(blocks.size()); block_id++) {
File diff suppressed because it is too large Load Diff
@@ -671,5 +671,10 @@
[0, "(function none)"],
[1, "(function none :behavior task-manager)"],
[2, "(function symbol :behavior task-manager)"]
],
"fort-robotank": [
[21, "(function fort-robotank none)"],
[22, "(function fort-robotank none)"],
[23, "(function none)"]
]
}
+11 -4
View File
@@ -115,7 +115,6 @@
"(method 228 hal-sewer)",
"(method 154 vehicle-city-racer)",
"(method 53 squid)",
"(anon-function 11 fort-floor-spike)",
"vehicle-explode-post",
"(method 158 vehicle-guard)",
"(method 207 metalhead-predator)",
@@ -215,7 +214,10 @@
"(method 11 mtn-step-plat-rocks-a)",
"(method 11 mtn-step-plat-rocks-b)",
"(method 11 mtn-step-plat-rocks-c)",
"prototypes-game-visible-set!"
"prototypes-game-visible-set!",
"(method 22 fort-floor-spike-a)",
"(method 22 fort-floor-spike-b)",
"(method 22 fort-floor-spike-c)"
],
// If format is used with the wrong number of arguments,
@@ -475,9 +477,14 @@
"(method 45 nav-mesh)": [5, 6],
"(method 43 nav-mesh)": [0, 1, 2, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"(anon-function 45 gungame-obs)": [0, 1, 6, 9, 14, 18, 21, 22, 30], // TODO - probably not the best
"(method 142 grenadier)": [0, 1, 3],
"(anon-function 34 predator)": [24]
"(anon-function 34 predator)": [24],
"(anon-function 57 crimson-guard-level)": [22],
"(method 48 rigid-body-object)": [0, 1, 2, 3, 4, 5],
"(method 15 rigid-body)": [0, 1, 2, 5],
"(method 63 collide-shape-moving)": [
0, 1, 2, 3, 4, 5, 6, 10, 12, 13, 14, 28, 38, 39, 40, 44
]
},
// Sometimes the game might use format strings that are fetched dynamically,
+23 -19
View File
@@ -127,7 +127,7 @@
// "DGO/LPORTRUN.DGO",
// "DGO/LASHGRD.DGO",
"DGO/CGB.DGO",
// "DGO/D3B.DGO",
"DGO/D3B.DGO",
// "DGO/STB.DGO",
// "DGO/GARAGE.DGO",
// "DGO/PORTWALL.DGO",
@@ -185,41 +185,45 @@
"streamed_audio_file_names": [],
"levels_to_extract": [
"CAP.DGO",
"CIB.DGO",
"CPO.DGO",
"CTA.DGO",
"CTB.DGO",
"CWI.DGO",
"D3A.DGO",
"D3B.DGO",
"DG1.DGO",
"DMI.DGO",
"DMI.DGO",
"DRI.DGO",
"DRILLMTN.DGO",
"FEA.DGO",
"FEB.DGO",
"FOB.DGO",
"FOR.DGO",
"GGA.DGO",
"HIDEOUT.DGO",
"HIDEOUT.DGO",
"KIOSK.DGO",
"KIOSK.DGO",
"LDJAKBRN.DGO",
"LDJAKBRN.DGO",
"LSACK.DGO",
"LWIDEA.DGO",
"LWIDEB.DGO",
"LWIDEC.DGO",
"FEA.DGO",
"FEB.DGO",
"DRI.DGO",
"TOC.DGO",
"FOB.DGO",
"SAG.DGO",
"MTX.DGO",
"TOB.DGO",
"TOA.DGO",
"TOD.DGO",
"DRILLMTN.DGO",
"FOR.DGO",
"LDJAKBRN.DGO",
"HIDEOUT.DGO",
"KIOSK.DGO",
"DMI.DGO",
"LSACK.DGO",
"MTN.DGO",
"MTX.DGO",
"PRI.DGO",
"RUI.DGO",
"SAG.DGO",
"SKA.DGO",
"STA.DGO",
"TOA.DGO",
"TOB.DGO",
"TOC.DGO",
"TOD.DGO",
"VI1.DGO"
]
}
+44 -2
View File
@@ -511,7 +511,10 @@
["L647", "uint64", true],
["L648", "uint64", true],
["L565", "uint64", true],
["L567", "uint64", true]
["L567", "uint64", true],
["L566", "uint64", true],
["L564", "uint64", true],
["L539", "attack-info"]
],
"collide-shape": [
["L383", "attack-info"],
@@ -896,5 +899,44 @@
"predator": [
["L252", "vector"],
["L251", "vector"]
]
],
"dig-digger": [["L192", "attack-info"]],
"fort-robotank-turret": [
["L315", "uint64", true],
["L313", "uint64", true],
["L316", "uint64", true],
["L314", "uint64", true],
["L258", "uint64", true],
["L263", "uint64", true],
["L259", "uint64", true],
["L262", "uint64", true],
["L256", "uint64", true],
["L261", "uint64", true],
["L257", "uint64", true],
["L264", "uint64", true],
["L260", "uint64", true]
],
"fort-robotank": [
["L315", "uint64", true],
["L314", "uint64", true],
["L312", "uint64", true],
["L317", "uint64", true],
["L313", "uint64", true],
["L316", "uint64", true],
["L221", "(inline-array fort-robotank-segment)", 4],
["L220", "(inline-array fort-robotank-segment)", 1],
["L215", "attack-info"]
],
"fort-floor-spike": [
["L203", "attack-info"],
["L159", "(inline-array vector)", 8],
["L117", "(inline-array vector)", 8],
["L55", "(inline-array vector)", 8]
],
"fordumpc-obs": [
["L138", "attack-info"],
["L135", "attack-info"]
],
"dig-obs": [["L111", "(inline-array vector)", 2]],
"dig1-obs": [["L91", "(inline-array vector)", 8]]
}
+65 -1
View File
@@ -1354,5 +1354,69 @@
[32, "transformq"],
[80, "vector"],
[112, "vector"]
]
],
"(method 196 crimson-guard-level)": [
[32, "vector"],
[48, "vector"],
[96, "vector"],
[160, "vector"],
[176, "vector"]
],
"(method 199 crimson-guard-level)": [
[608, "vector"],
[624, "vector"],
[640, "vector"],
[656, "vector"]
],
"(method 198 crimson-guard-level)": [
[80, "vector"],
[96, "collide-query"],
[672, "vector"]
],
"(method 202 crimson-guard-level)": [
[32, "vector"],
[656, "vector"],
[720, "vector"]
],
"(method 192 crimson-guard-level)": [[32, "vector"]],
"check-drop-level-dig-digger-rubble-sparks": [[16, "vector"]],
"(method 24 dig-tether)": [[128, "vector"]],
"(trans idle dig-digger)": [[16, "vector"]],
"(method 23 dig-digger)": [[16, "vector"]],
"(code die fort-elec-switch)": [[16, "vector"]],
"(method 11 fort-elec-switch)": [
[32, "vector"],
[48, "vector"]
],
"(method 24 fort-roboscreen)": [[32, "vector"]],
"fort-robotank-reticle-post": [
[16, "vector"],
[32, "vector"]
],
"robotank-turret-handler": [[96, "vector"]],
"fort-robotank-turret-init-by-other": [[16, "vector"]],
"(method 11 fort-robotank)": [[32, "vector"]],
"(method 26 fort-robotank)": [[16, "event-message-block"]],
"(method 31 fort-robotank-turret)": [[16, "collide-query"]],
"(method 33 fort-robotank-turret)": [
[16, ["inline-array", "vector", 2]],
[48, ["inline-array", "vector", 4]]
],
"draw-2d-hud": [
[16, ["inline-array", "vector4w", 4]],
[80, "vector"]
],
"fort-turret-draw-laser-spot": [[16, "vector"]],
"(method 141 fort-turret)": [[64, "collide-query"]],
"(method 33 transport-level)": [[16, "crimson-guard-level-params"]],
"joint-mod-set-y-callback": [[16, "transformq"]],
"(code die fort-dump-bomb-a)": [[16, "matrix"]],
"(code die fort-missile)": [[16, "matrix"]],
"birth-func-dig-digger-collide": [[16, ["inline-array", "vector", 5]]],
"(method 29 dig-bomb-crate)": [[16, "dig-bomb-crate-cylinder-spawn-params"]],
"(method 63 collide-shape-moving)": [[16, ["inline-array", "vector", 51]]],
"(code active dig-spikey-sphere-door)": [
[32, "projectile-init-by-other-params"]
],
"(enter idle dig-stomp-block-controller)": [[16, "vector"]]
}
+196 -6
View File
@@ -4619,16 +4619,26 @@
"(trans grenade-hostile crimson-guard-level)": [
[[62, 66], "a0", "process-focusable"]
],
"(code arrest crimson-guard-level)": [[29, "v1", "art-joint-anim"]],
"(code arrest crimson-guard-level)": [
[29, "v1", "art-joint-anim"],
[168, "v1", "art-joint-anim"],
[103, "v1", "art-joint-anim"]
],
"(code gun-shoot crimson-guard-level)": [
[28, "v1", "art-joint-anim"],
[[91, 97], "v1", "process-drawable"]
[[91, 97], "v1", "process-drawable"],
[324, "v1", "art-joint-anim"]
],
"(code close-attack crimson-guard-level)": [[14, "v1", "art-joint-anim"]],
"(code attack crimson-guard-level)": [
[257, "a0", "process-focusable"],
[535, "v1", "art-joint-anim"],
[286, "v1", "art-joint-anim"]
[286, "v1", "art-joint-anim"],
[334, "v1", "collide-shape-prim-group"],
[426, "v1", "collide-shape-prim-group"],
[463, "v1", "art-joint-anim"],
[78, "v1", "art-joint-anim"],
[146, "v1", "art-joint-anim"]
],
"(code get-up-front crimson-guard-level)": [[20, "v1", "art-joint-anim"]],
"(code get-up-back crimson-guard-level)": [[20, "v1", "art-joint-anim"]],
@@ -4645,14 +4655,16 @@
[100, "a1", "art-joint-anim"],
[129, "a1", "art-joint-anim"],
[160, "v1", "art-joint-anim"],
[196, "a1", "art-joint-anim"]
[196, "a1", "art-joint-anim"],
[90, "v1", "(array int32)"]
],
"(method 78 crimson-guard-level)": [
[18, "a1", "art-joint-anim"],
[72, "a1", "art-joint-anim"],
[104, "a1", "art-joint-anim"],
[136, "v1", "art-joint-anim"],
[175, "a1", "art-joint-anim"]
[175, "a1", "art-joint-anim"],
[62, "v1", "(array int32)"]
],
"(code die-falling crimson-guard-level)": [
[29, "gp", "art-joint-anim"],
@@ -6325,5 +6337,183 @@
"(method 11 predator-manager)": [
["_stack_", 16, "res-tag"],
[281, "s2", "process-drawable"]
]
],
"(trans gun-shoot crimson-guard-level)": [[21, "v1", "process-focusable"]],
"(enter close-attack crimson-guard-level)": [
[2, "v1", "collide-shape-prim-group"]
],
"(exit close-attack crimson-guard-level)": [
[2, "v1", "collide-shape-prim-group"]
],
"(exit attack crimson-guard-level)": [
[8, "v1", "collide-shape-prim-group"],
[16, "v1", "collide-shape-prim-group"]
],
"(exit get-up-front crimson-guard-level)": [
[3, "v1", "collide-shape-prim-group"],
[6, "v1", "collide-shape-prim-group"],
[8, "v1", "collide-shape-prim-group"],
[11, "v1", "collide-shape-prim-group"],
[14, "v1", "collide-shape-prim-group"],
[17, "v1", "collide-shape-prim-group"]
],
"(exit get-up-back crimson-guard-level)": [
[3, "v1", "collide-shape-prim-group"],
[6, "v1", "collide-shape-prim-group"],
[8, "v1", "collide-shape-prim-group"],
[11, "v1", "collide-shape-prim-group"],
[14, "v1", "collide-shape-prim-group"],
[17, "v1", "collide-shape-prim-group"]
],
"(enter knocked crimson-guard-level)": [
[8, "v1", "collide-shape-prim-group"],
[11, "v1", "collide-shape-prim-group"],
[14, "v1", "collide-shape-prim-group"],
[17, "v1", "collide-shape-prim-group"],
[19, "v1", "collide-shape-prim-group"],
[21, "v1", "collide-shape-prim-group"]
],
"(method 201 crimson-guard-level)": [[18, "s3", "process-focusable"]],
"(method 7 crimson-guard-level)": [
[19, "t9", "(function nav-enemy int nav-enemy)"]
],
"(method 115 crimson-guard-level)": [[33, "v0", "vector"]],
"(method 198 crimson-guard-level)": [[242, "s4", "collide-shape-prim"]],
"(enter broken dig-clasp)": [
[26, "v1", "art-joint-anim"],
[54, "v1", "art-joint-anim"]
],
"(event idle dig-clasp)": [[[11, 18], "v1", "attack-info"]],
"dig-tether-handler": [
[6, "a0", "vector"],
[10, "a0", "vector"],
[14, "v1", "vector"]
],
"(method 23 dig-digger)": [[[1, 23], "s5", "int"]],
"(enter breaking fort-fence)": [[[5, 9], "a0", "collide-shape-prim-group"]],
"(method 11 fort-elec-switch)": [["_stack_", 16, "res-tag"]],
"(method 10 fort-roboscreen)": [
[15, "t9", "(function process-drawable none)"]
],
"fort-robotank-reticle-handler": [
[6, "v1", "vector"],
[[17, 34], "s5", "vector"],
[56, "v1", "float"]
],
"(code lock fort-robotank-reticle)": [[14, "v1", "art-joint-anim"]],
"robotank-turret-handler": [
[71, "v1", "collide-shape-prim-group"],
[106, "v1", "collide-shape-prim-group"],
[167, "s4", "cspace"],
[162, "s4", "cspace"],
[37, "v1", "float"]
],
"(code ready fort-robotank-turret)": [[10, "v1", "art-joint-anim"]],
"(code fire fort-robotank-turret)": [
[79, "v1", "art-joint-anim"],
[136, "v1", "art-joint-anim"]
],
"fort-robotank-post": [
[471, "v1", "fort-robotank-turret"],
[498, "v1", "float"]
],
"fort-robotank-handler": [[171, "s4", "process-focusable"]],
"(method 26 fort-robotank)": [
[170, "v1", "collide-shape-prim-group"],
[236, "v1", "collide-shape-prim-group"],
[89, "t9", "(function fort-robotank none)"]
],
"(method 7 fort-robotank)": [
[89, "t9", "(function process-drawable int process-drawable)"],
[56, "gp", "(pointer uint32)"],
[59, "a1", "(pointer uint32)"],
[63, "gp", "(pointer uint32)"],
[66, "a1", "(pointer uint32)"],
[60, "a1", "joint-mod"],
[67, "a1", "joint-mod"],
[70, "gp", "(pointer uint32)"]
],
"(method 11 fort-robotank)": [[463, "s5", "fort-robotank-wheel-info"]],
"(method 31 fort-robotank-turret)": [[61, "s3", "collide-shape-prim"]],
"(method 139 fort-turret)": [[[15, 19], "a0", "process-focusable"]],
"(method 141 fort-turret)": [[59, "s3", "collide-shape-prim"]],
"(code attack fort-turret)": [
[25, "v1", "art-joint-anim"],
[113, "v1", "art-joint-anim"]
],
"(method 11 fort-plat-shuttle)": [[52, "v0", "(pointer float)"]],
"(event idle fort-floor-spike)": [[15, "s3", "process-drawable"]],
"joint-mod-set-y-callback": [
[19, "a1", "vector"],
[17, "a3", "int"]
],
"(event idle fort-dump-bomb-a)": [
[11, "s4", "process-drawable"],
[[4, 22], "gp", "attack-info"]
],
"(event idle fort-missile-target)": [
[[9, 22], "s5", "attack-info"],
[16, "s4", "projectile"]
],
"(enter die fort-missile-target)": [
[[2, 5], "v1", "collide-shape-prim-group"]
],
"(method 10 fort-missile-target)": [
[10, "t9", "(function process-drawable none)"]
],
"(code die fort-missile)": [
[156, "v1", "process-drawable"],
[227, "v1", "collide-shape-prim-group"],
[229, "v1", "collide-shape-prim-group"]
],
"(method 7 fort-missile)": [
[14, "t9", "(function process-drawable int process-drawable)"]
],
"birth-func-dig-digger-collide": [
[8, "v1", "process"],
[12, "s3", "process-drawable"]
],
"(method 23 dig-tether)": [[69, "v1", "vector"]],
"(method 11 dig-digger)": [["_stack_", 16, "res-tag"]],
"(method 29 dig-sinking-plat)": [
[9, "t9", "(function rigid-body-platform float none)"]
],
"(method 37 dig-sinking-plat)": [
[28, "v1", "art-joint-anim"],
[157, "v1", "art-joint-anim"],
[208, "v0", "sound-rpc-set-param"]
],
"(method 11 dig-log)": [
["_stack_", 16, "res-tag"],
[94, "v0", "(pointer actor-group)"]
],
"(event idle-up dig-button)": [[4, "v1", "attack-info"]],
"(code active dig-bomb-crate-cylinder)": [
[33, "v1", "art-joint-anim"],
[81, "v1", "art-joint-anim"],
[117, "v1", "art-joint-anim"],
[165, "v1", "art-joint-anim"],
[201, "v1", "art-joint-anim"],
[249, "v1", "art-joint-anim"],
[285, "v1", "art-joint-anim"],
[337, "v1", "art-joint-anim"],
[373, "v1", "art-joint-anim"],
[425, "v1", "art-joint-anim"],
[463, "v1", "art-joint-anim"],
[515, "v1", "art-joint-anim"]
],
"(code fire dig-jump-pad)": [[59, "t9", "(function none)"]],
"(code die dig-spikey-sphere)": [[72, "t9", "(function none)"]],
"(method 29 dig-tipping-rock)": [
[9, "t9", "(function rigid-body-platform float none)"]
],
"(event waiting dig-stomp-block)": [[14, "v1", "attack-info"]],
"(method 37 dig-stomp-block)": [
[[42, 62], "v1", "collide-cache-tri"],
[62, "v1", "(inline-array collide-cache-tri)"]
],
"(method 11 dig-spikey-step)": [[96, "v0", "(pointer float)"]],
"(method 37 dig-tipping-rock)": [[14, "v0", "sound-rpc-set-param"]],
"(method 49 cpad-elevator)": [[2, "v1", "collide-shape-prim-group"]],
"(method 10 cpad-elevator)": [[10, "t9", "(function elevator none)"]]
}
+2
View File
@@ -736,6 +736,8 @@ const std::unordered_map<
{"nav-network-info",
{{"adjacency", ArrayFieldDecompMeta(TypeSpec("nav-network-adjacency"), 16)}}},
{"sig-path", {{"samples", ArrayFieldDecompMeta(TypeSpec("sig-path-sample"), 64)}}},
{"fort-robotank-segment",
{{"event-tbl", ArrayFieldDecompMeta(TypeSpec("fort-robotank-segment-event"), 32)}}},
{"race-info",
{{"turbo-pad-array", ArrayFieldDecompMeta(TypeSpec("race-turbo-pad"), 32)},
{"racer-array", ArrayFieldDecompMeta(TypeSpec("race-racer-info"), 16)},
@@ -132,6 +132,7 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
init_bucket_renderer<TextureUploadHandler>("tex-l0-shrub", BucketCategory::TEX,
BucketId::TEX_L0_SHRUB);
init_bucket_renderer<Shrub>("shrub-l0-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L0_SHRUB);
init_bucket_renderer<Merc2>("merc-l0-shrub", BucketCategory::MERC, BucketId::MERC_L0_SHRUB);
// 80
init_bucket_renderer<TextureUploadHandler>("tex-l1-shrub", BucketCategory::TEX,
BucketId::TEX_L1_SHRUB);
@@ -184,6 +185,7 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
init_bucket_renderer<Merc2>("merc-l2-pris", BucketCategory::MERC, BucketId::MERC_L2_PRIS);
init_bucket_renderer<TextureUploadHandler>("tex-l3-pris", BucketCategory::TEX,
BucketId::TEX_L3_PRIS);
init_bucket_renderer<Merc2>("merc-l3-pris", BucketCategory::MERC, BucketId::MERC_L3_PRIS);
// 210
init_bucket_renderer<TextureUploadHandler>("tex-l4-pris", BucketCategory::TEX,
BucketId::TEX_L4_PRIS);
+2
View File
@@ -105,6 +105,7 @@ enum class BucketId {
TIE_L4_TFRAG = 53,
TEX_L0_SHRUB = 73,
SHRUB_L0_SHRUB = 74,
MERC_L0_SHRUB = 79,
TEX_L1_SHRUB = 82,
SHRUB_L1_SHRUB = 83,
TEX_L2_SHRUB = 91,
@@ -128,6 +129,7 @@ enum class BucketId {
TEX_L2_PRIS = 204,
MERC_L2_PRIS = 205,
TEX_L3_PRIS = 208,
MERC_L3_PRIS = 209,
TEX_L4_PRIS = 212,
MERC_L4_PRIS = 213,
TEX_LCOM_PRIS = 220,
+1 -1
View File
@@ -1030,7 +1030,7 @@
(local-vars (sv-16 res-tag))
(when (coin-flip? obj)
(let ((a0-2 (-> obj node-list data 2)))
(set! (-> a0-2 param0) (the-as (function cspace matrix none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param1) #f)
(set! (-> a0-2 param2) #f)
)
+8 -8
View File
@@ -197,7 +197,7 @@
(set! (-> v0-0 angle) 0.0)
(set-vector! (-> v0-0 last-position) 0.0 0.0 0.0 1.0)
(let ((a0-3 (-> arg0 node-list data arg1)))
(set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-wheel-callback))
(set! (-> a0-3 param0) joint-mod-wheel-callback)
(set! (-> a0-3 param1) v0-0)
)
v0-0
@@ -260,7 +260,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-local-callback))
(set! (-> a0-8 param0) joint-mod-set-local-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -318,7 +318,7 @@
(quaternion-copy! (-> gp-0 transform quat) *unity-quaternion*)
(set! (-> gp-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-7 (-> arg0 node-list data arg1)))
(set! (-> a0-7 param0) (the-as (function cspace matrix none) joint-mod-add-local-callback))
(set! (-> a0-7 param0) joint-mod-add-local-callback)
(set! (-> a0-7 param1) gp-0)
)
gp-0
@@ -357,7 +357,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-world-callback))
(set! (-> a0-8 param0) joint-mod-set-world-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -411,7 +411,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-local-callback))
(set! (-> a0-8 param0) joint-mod-blend-local-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -460,7 +460,7 @@
(set! (-> v0-0 enable) #t)
(set! (-> v0-0 angle) 0.0)
(let ((a0-3 (-> arg0 node-list data arg1)))
(set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-spinner-callback))
(set! (-> a0-3 param0) joint-mod-spinner-callback)
(set! (-> a0-3 param1) v0-0)
)
v0-0
@@ -570,7 +570,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-world-callback))
(set! (-> a0-8 param0) joint-mod-blend-world-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -606,7 +606,7 @@
(set! (-> gp-0 enable) arg2)
(quaternion-set! (-> gp-0 rotation) 0.0 0.0 0.0 1.0)
(let ((a0-3 (-> arg0 node-list data arg1)))
(set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-rotate-local-callback))
(set! (-> a0-3 param0) joint-mod-rotate-local-callback)
(set! (-> a0-3 param1) gp-0)
)
gp-0
+14 -15
View File
@@ -20,6 +20,7 @@
;; DECOMP BEGINS
;; WARN: Return type mismatch matrix vs none.
;; WARN: Function joint-mod-ik-callback has a return type of none, but the expression builder found a return statement.
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
@@ -313,7 +314,7 @@
(set! (-> v0-0 blend) 0.0)
(logclear! (-> v0-0 flags) (joint-mod-ik-flags enable))
(let ((a0-5 (-> arg0 node-list data arg1)))
(set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-ik-callback))
(set! (-> a0-5 param0) joint-mod-ik-callback)
(set! (-> a0-5 param1) v0-0)
(set! (-> a0-5 param2) (the-as basic arg1))
)
@@ -607,13 +608,13 @@
)
(((joint-mod-mode look-at))
(let ((a0-4 v1-0))
(set! (-> a0-4 param0) (the-as (function cspace matrix none) joint-mod-look-at-handler))
(set! (-> a0-4 param0) joint-mod-look-at-handler)
(set! (-> a0-4 param1) obj)
)
)
(((joint-mod-mode gun-look-at))
(let ((a0-5 v1-0))
(set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-gun-look-at-handler))
(set! (-> a0-5 param0) joint-mod-gun-look-at-handler)
(set! (-> a0-5 param1) obj)
)
)
@@ -621,23 +622,20 @@
(set-vector! (-> obj twist) 0.0 1.0 0.0 1.0)
(let ((a0-7 v1-0))
(set! (-> a0-7 param0)
(the-as
(function cspace matrix none)
(lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none))
)
(lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none))
)
(set! (-> a0-7 param1) obj)
)
)
(((joint-mod-mode world-look-at))
(let ((a0-8 v1-0))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-world-look-at-handler))
(set! (-> a0-8 param0) joint-mod-world-look-at-handler)
(set! (-> a0-8 param1) obj)
)
)
(((joint-mod-mode polar-look-at))
(let ((a0-9 v1-0))
(set! (-> a0-9 param0) (the-as (function cspace matrix none) joint-mod-polar-look-at-handler))
(set! (-> a0-9 param0) joint-mod-polar-look-at-handler)
(set! (-> a0-9 param1) obj)
)
(set! (-> obj polar-internal-tilt-max) 32768.0)
@@ -647,21 +645,21 @@
)
(((joint-mod-mode rotate))
(let ((a0-11 v1-0))
(set! (-> a0-11 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler))
(set! (-> a0-11 param0) joint-mod-rotate-handler)
(set! (-> a0-11 param1) obj)
)
(set! (-> obj blend) 1.0)
)
(((joint-mod-mode rotate2))
(let ((a0-13 v1-0))
(set! (-> a0-13 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler))
(set! (-> a0-13 param0) joint-mod-rotate-handler)
(set! (-> a0-13 param1) obj)
)
(set! (-> obj blend) 1.0)
)
(((joint-mod-mode joint-set))
(let ((a0-15 v1-0))
(set! (-> a0-15 param0) (the-as (function cspace matrix none) joint-mod-joint-set-handler))
(set! (-> a0-15 param0) joint-mod-joint-set-handler)
(set! (-> a0-15 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -670,7 +668,7 @@
)
(((joint-mod-mode joint-set-world))
(let ((a0-18 v1-0))
(set! (-> a0-18 param0) (the-as (function cspace matrix none) joint-mod-joint-set-world-handler))
(set! (-> a0-18 param0) joint-mod-joint-set-world-handler)
(set! (-> a0-18 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -680,7 +678,7 @@
)
(((joint-mod-mode joint-set*))
(let ((a0-25 v1-0))
(set! (-> a0-25 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-handler))
(set! (-> a0-25 param0) joint-mod-joint-set*-handler)
(set! (-> a0-25 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -689,7 +687,7 @@
)
(((joint-mod-mode joint-set*-world))
(let ((a0-29 v1-0))
(set! (-> a0-29 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-world-handler))
(set! (-> a0-29 param0) joint-mod-joint-set*-world-handler)
(set! (-> a0-29 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -701,6 +699,7 @@
(none)
)
;; WARN: Return type mismatch joint-mod vs none.
(defmethod shut-down joint-mod ((obj joint-mod))
(set! (-> obj shutting-down?) #t)
(set! (-> obj blend) 0.0)
+1 -1
View File
@@ -65,7 +65,7 @@
(joint-num int16 :offset-assert 8)
(geo drawable :offset-assert 12)
(bone bone :offset-assert 16)
(param0 (function cspace matrix none) :offset-assert 20)
(param0 (function cspace transformq none) :offset-assert 20)
(param1 basic :offset-assert 24)
(param2 basic :offset-assert 28)
)
@@ -15,6 +15,7 @@
(declare-type collide-cache-prim structure)
(declare-type collide-shape-prim basic)
(declare-type collide-cache basic)
(declare-type rigid-body structure)
(defenum penetrate
:bitfield #t
@@ -561,7 +562,7 @@
(move-to-ground (_type_ float float symbol collide-spec) none 60)
(move-to-ground-point (_type_ vector vector vector) none 61)
(compute-acc-due-to-gravity (_type_ vector float) vector 62)
(collide-shape-moving-method-63 () none 63)
(collide-shape-moving-method-63 (_type_ rigid-body float) none 63)
(try-snap-to-surface (_type_ vector float float float) symbol 64)
(fill-and-try-snap-to-surface (_type_ vector float float float collide-query) symbol 65)
(step-collison! (_type_ vector vector float int) float 66)
@@ -618,7 +619,7 @@
)
)
;; WARN: Return type mismatch uint8 vs int.
;; WARN: Return type mismatch uint vs int.
(defmethod length collide-shape-prim-group ((obj collide-shape-prim-group))
(the-as int (-> obj num-children))
)
@@ -2209,7 +2209,7 @@
(set-vector! (-> obj root-override2 scale) 3.0 3.0 3.0 1.0)
(logclear! (-> obj flags) (collectable-flag fadeout))
(let ((v1-34 (-> obj node-list data)))
(set! (-> v1-34 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-34 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-34 0 param1) (the-as basic (-> obj root-override2 trans)))
(set! (-> v1-34 0 param2) (the-as basic (-> obj extra-trans)))
)
@@ -2237,7 +2237,7 @@
)
(set-vector! (-> obj root-override2 scale) 2.0 2.0 2.0 1.0)
(let ((v1-52 (-> obj node-list data)))
(set! (-> v1-52 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-52 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-52 0 param1) (the-as basic (-> obj root-override2 trans)))
(set! (-> v1-52 0 param2) (the-as basic (-> obj extra-trans)))
)
@@ -743,7 +743,9 @@
(cond
((-> event param 0)
(set! s4-0 (-> self node-list data 2))
(set! (-> (the-as cspace s4-0) param0) (the-as (function cspace matrix none) cspace<-parented-matrix-mirror!))
(set! (-> (the-as cspace s4-0) param0)
(the-as (function cspace transformq none) cspace<-parented-matrix-mirror!)
)
(set! (-> (the-as cspace s4-0) param1) (the-as basic (-> *math-camera* mirror-trans)))
(set! (-> (the-as cspace s4-0) param2) (the-as basic (-> *math-camera* mirror-normal)))
)
@@ -2797,6 +2797,7 @@
)
(defun dm-play-task-with-continue ((arg0 game-task) (arg1 string))
(format 0 "hello world - ~D:~S~%" arg0 arg1)
(let* ((t9-0 play-task)
(a1-1 'debug)
(a2-0 (cond
@@ -2821,6 +2822,7 @@
)
(defun dm-play-task ((arg0 game-task))
(format 0 "DEBUG - ~D~%" arg0)
(dm-play-task-with-continue (the-as game-task (/ (the-as int arg0) 8)) (the-as string #f))
(none)
)
+1 -1
View File
@@ -1076,7 +1076,7 @@
(local-vars (sv-16 res-tag))
(when (coin-flip? obj)
(let ((a0-2 (-> obj node-list data 2)))
(set! (-> a0-2 param0) (the-as (function cspace matrix none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param1) #f)
(set! (-> a0-2 param2) #f)
)
+1 -1
View File
@@ -368,7 +368,7 @@
(rigid-body-object-method-42 (_type_) none :behavior rigid-body-object 42)
(rigid-body-object-method-43 (_type_) none 43)
(rigid-body-object-method-44 (_type_ float) none 44)
(rigid-body-object-method-45 () none 45)
(rigid-body-object-method-45 (_type_ rigid-body-object-constants) sound-id 45)
(rigid-body-object-method-46 (_type_ process-drawable int symbol event-message-block) none :behavior rigid-body-object 46)
(rigid-body-object-method-47 (_type_ process-drawable attack-info object penetrate) symbol 47)
(rigid-body-object-method-48 (_type_ object object) none 48)
+12 -10
View File
@@ -313,7 +313,8 @@
)
(rigid-body-method-13 obj)
(if (logtest? (-> obj flags) (rigid-body-flag enable-collision))
((method-of-object arg0 collide-shape-moving-method-63))
;; TODO - method 63!
;; ((method-of-object arg0 collide-shape-moving-method-63))
(rigid-body-method-14 obj arg1)
)
0
@@ -725,9 +726,9 @@
(none)
)
(defmethod rigid-body-object-method-45 rigid-body-object ()
0
(none)
;; WARN: Return type mismatch int vs sound-id.
(defmethod rigid-body-object-method-45 rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
(the-as sound-id 0)
)
(defmethod rigid-body-object-method-49 rigid-body-object ((obj rigid-body-object) (arg0 matrix) (arg1 touching-shapes-entry))
@@ -835,8 +836,8 @@
)
)
)
(rigid-body-object-method-45 obj (the-as rigid-body-object-constants s5-0))
)
((method-of-object obj rigid-body-object-method-45))
(if (and (-> obj next-state) (= (-> obj next-state name) 'idle))
(rigid-body-object-method-43 obj)
)
@@ -849,11 +850,12 @@
(defmethod rigid-body-object-method-46 rigid-body-object ((obj rigid-body-object) (arg0 process-drawable) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('impact-impulse)
(-> arg3 param 0)
(if (!= obj arg0)
(rigid-body-object-method-42 obj)
)
((method-of-object obj rigid-body-object-method-45))
(let ((s5-1 (-> arg3 param 0)))
(if (!= obj arg0)
(rigid-body-object-method-42 obj)
)
(rigid-body-object-method-45 obj (the-as rigid-body-object-constants s5-1))
)
(if (and (-> obj next-state) (= (-> obj next-state name) 'idle))
(rigid-body-object-method-43 obj)
)
@@ -308,7 +308,6 @@
obj
)
;; WARN: Return type mismatch cspace-array vs none.
(defmethod setup-cspace-and-add draw-control ((obj draw-control) (arg0 art-joint-geo) (arg1 symbol))
(let ((s5-0 ((method-of-type cspace-array new) arg1 cspace-array (+ (-> arg0 length) 1))))
(let ((v0-1 ((method-of-type skeleton new) arg1 skeleton (+ (-> arg0 length) 1))))
@@ -323,7 +322,7 @@
(set! (-> v1-9 bone) (the-as bone (-> s3-1 bones)))
)
(let ((v1-10 (-> s5-0 data)))
(set! (-> v1-10 0 param0) (the-as (function cspace matrix none) cspace<-transformq!))
(set! (-> v1-10 0 param0) (the-as (function cspace transformq none) cspace<-transformq!))
(set! (-> v1-10 0 param1) (the-as basic (-> (the-as process-drawable (-> obj process)) root trans)))
)
(let ((v1-12 (reset-and-assign-geo! (-> s5-0 data 1) (the-as drawable #f))))
@@ -335,7 +334,7 @@
(set! (-> v1-14 joint) (-> arg0 data 1))
(set! (-> v1-14 bone) (-> s3-1 bones 2))
(set! (-> v1-14 parent) (the-as cspace (-> s5-0 data)))
(set! (-> v1-14 param0) (the-as (function cspace matrix none) cspace<-parented-matrix-joint!))
(set! (-> v1-14 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint!))
(set! (-> v1-14 param1) (-> obj process))
)
(let ((s2-0 3))
@@ -409,7 +408,7 @@
(let* ((v1-20 (-> arg0 data s1-1))
(t9-3 (the-as function (-> v1-20 param0)))
)
(if (the-as (function cspace matrix none) t9-3)
(if (the-as (function cspace transformq none) t9-3)
((the-as (function object object object none) t9-3) v1-20 (-> v1-20 param1) (-> v1-20 param2))
)
)
@@ -420,7 +419,7 @@
(t9-4 (-> a0-11 param0))
)
(if t9-4
(t9-4 a0-11 (the-as matrix a1-7))
(t9-4 a0-11 (the-as transformq a1-7))
)
)
)
@@ -430,7 +429,7 @@
(a1-9 (+ (* 48 s0-0) 2528 (scratchpad-object int)))
)
(if (-> a0-12 param0)
((-> a0-12 param0) a0-12 (the-as matrix a1-9))
((-> a0-12 param0) a0-12 (the-as transformq a1-9))
(cspace<-parented-transformq-joint! a0-12 (the-as transformq a1-9))
)
)
@@ -715,7 +714,7 @@
(set! (-> s2-0 level-index) (the-as uint (-> s3-0 index)))
)
(set! (-> s2-0 dma-add-func) (the-as (function process-drawable draw-control symbol object none) nothing))
(set! (-> arg2 0) (the-as cspace-array (setup-cspace-and-add s2-0 (the-as art-joint-geo sv-16) 'process)))
(set! (-> arg2 0) (setup-cspace-and-add s2-0 (the-as art-joint-geo sv-16) 'process))
(set! (-> s2-0 dma-add-func) dma-add-process-drawable)
(set! (-> s2-0 shadow-mask) (res-lump-value (-> arg0 entity) 'shadow-mask uint :time -1000000000.0))
(set! (-> s2-0 shadow-values) (res-lump-value (-> arg0 entity) 'shadow-values uint :time -1000000000.0))
@@ -763,7 +763,7 @@
(logclear! (-> self control root-prim prim-core action) (collide-action can-ride))
(set! (-> self control bend-target) 1.0)
(let ((v1-82 (-> self node-list data)))
(set! (-> v1-82 0 param0) (the-as (function cspace matrix none) cspace<-transformq+world-trans!))
(set! (-> v1-82 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!))
(set! (-> v1-82 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-82 0 param2) (the-as basic (-> self control cspace-offset)))
)
@@ -840,7 +840,7 @@
(remove-setting! 'string-spline-max-move-player)
(remove-setting! 'string-spline-accel-player)
(let ((v1-43 (-> self node-list data)))
(set! (-> v1-43 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-43 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-43 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset)))
)
+1 -1
View File
@@ -3230,7 +3230,7 @@
)
(logior! (-> obj skel effect flags) (effect-control-flag ecf0 ecf1))
(let ((v1-94 (-> obj node-list data)))
(set! (-> v1-94 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-94 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-94 0 param1) (the-as basic (-> obj control trans)))
(set! (-> v1-94 0 param2) (the-as basic (-> obj control cspace-offset)))
)
@@ -368,7 +368,7 @@
(set! (-> self shadow-backup) (-> self draw shadow))
(set! (-> self draw shadow-ctrl) *mech-shadow-control*)
(let ((v1-27 (-> self node-list data)))
(set! (-> v1-27 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-27 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-27 0 param1) (the-as basic (-> self root-override trans)))
(set! (-> v1-27 0 param2) (the-as basic (-> self extra-trans)))
)
@@ -1160,7 +1160,7 @@
(set! (-> self focus-status) (logior (focus-status mech) (-> self focus-status)))
(set! (-> self control bend-target) 0.0)
(let ((v1-40 (-> self node-list data)))
(set! (-> v1-40 0 param0) (the-as (function cspace matrix none) cspace<-transformq+world-trans!))
(set! (-> v1-40 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!))
(set! (-> v1-40 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-40 0 param2) (the-as basic (-> self control cspace-offset)))
)
@@ -1359,7 +1359,7 @@
(set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max))
(set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length))
(let ((v1-39 (-> self node-list data)))
(set! (-> v1-39 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-39 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-39 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-39 0 param2) (the-as basic (-> self control cspace-offset)))
)
+8 -8
View File
@@ -182,7 +182,7 @@
(('play-anim)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace+transformq!)
(the-as (function cspace transformq none) cspace<-cspace+transformq!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
@@ -192,7 +192,7 @@
(('copy-parent)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace!)
(the-as (function cspace transformq none) cspace<-cspace!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
@@ -202,7 +202,7 @@
(('root)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace-normalized!)
(the-as (function cspace transformq none) cspace<-cspace-normalized!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
@@ -212,7 +212,7 @@
(('indax)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-transformq+trans!)
(the-as (function cspace transformq none) cspace<-transformq+trans!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 control trans))
@@ -224,7 +224,7 @@
(('board)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace-normalized!)
(the-as (function cspace transformq none) cspace<-cspace-normalized!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data 25))
@@ -234,7 +234,7 @@
(else
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace+transformq!)
(the-as (function cspace transformq none) cspace<-cspace+transformq!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 control sidekick-root parent))
@@ -485,7 +485,7 @@
(send-event (ppointer->process gp-4) 'mirror #t)
(set! (-> self mirror) gp-4)
(let ((v0-29 (-> gp-4 0 node-list data)))
(set! (-> v0-29 0 param0) (the-as (function cspace matrix none) cspace<-cspace!))
(set! (-> v0-29 0 param0) (the-as (function cspace transformq none) cspace<-cspace!))
(set! (-> v0-29 0 param1) (the-as basic (-> self node-list data)))
(set! (-> v0-29 0 param2) #f)
)
@@ -512,7 +512,7 @@
(logior! (-> self skel status) (joint-control-status sync-math blend-shape eye-anim))
(set! (-> self draw light-index) (the-as uint 30))
(let ((v1-14 (-> self node-list data)))
(set! (-> v1-14 0 param0) (the-as (function cspace matrix none) cspace<-cspace+transformq!))
(set! (-> v1-14 0 param0) (the-as (function cspace transformq none) cspace<-cspace+transformq!))
(set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control sidekick-root parent)))
(set! (-> v1-14 0 param2) (the-as basic (-> self offset)))
)
+4
View File
@@ -52,6 +52,7 @@
(deftype sync-linear (sync-info)
()
:pack-me
:method-count-assert 16
:size-assert #x10
:flag-assert #x1000000010
@@ -92,6 +93,7 @@
(start-time time-frame :offset-assert 16)
(value float :offset-assert 24)
)
:pack-me
:method-count-assert 13
:size-assert #x1c
:flag-assert #xd0000001c
@@ -112,6 +114,7 @@
(damping float :offset-assert 16)
(accel float :offset-assert 20)
)
:allow-misaligned
:method-count-assert 11
:size-assert #x18
:flag-assert #xb00000018
@@ -129,6 +132,7 @@
(elasticity float :offset-assert 32)
(state int32 :offset-assert 36)
)
:allow-misaligned
:method-count-assert 13
:size-assert #x28
:flag-assert #xd00000028
+25 -59
View File
@@ -1760,7 +1760,6 @@
"levels/common/enemy/hover/flamer.gc"
"levels/dig/dig-digger.gc"
"levels/dig/dig-obs.gc"
;; "levels/dig/dig1-obs.gc"
"levels/dig/dig2-obs.gc"
"levels/dig/dig3-obs.gc"
"levels/common/enemy/baby_spider/tomb-baby-spider.gc"
@@ -1796,16 +1795,13 @@
;; ;; D3B
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "D3B.DGO" "d3b.gd")
(cgo "D3B.DGO" "d3b.gd")
;; (copy-textures 2406 2407 3548)
(copy-textures 2406 2407 3548)
;; (copy-gos
;; "jak-pole+0-ag"
;; "daxter-highres-ag"
;; "jak-highres-ag"
;; "dig3b-vis"
;; )
(copy-gos
"dig3b-vis"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; DEMO
@@ -1837,31 +1833,19 @@
(goal-src-sequence
""
:deps ("$OUT/obj/los-control.o")
;; "levels/dig/dig-digger.gc"
;; "levels/dig/dig-obs.gc"
"levels/dig/dig1-obs.gc"
;; "levels/dig/dig2-obs.gc"
;; "levels/dig/dig3-obs.gc"
;; "levels/common/enemy/baby_spider/tomb-baby-spider.gc"
;; "levels/common/enemy/metalhead_slinger/grenadier.gc"
;; "levels/common/enemy/metalhead_brown/metalmonk.gc"
;; "levels/dig/dig-texture.gc"
;; "levels/dig/dig-scenes.gc"
;; "levels/dig/dig-part.gc"
)
(copy-textures 2282 2284 2283 2419 2844)
(copy-gos
"dig-digger-ag"
;; "crimson-guard-ag"
"dig-bomb-crate-ag"
"dig-conveyor-ag"
"dig-clasp-ag"
"dig-tether-ag"
"dig-jump-pad-ag"
"dig-breakable-door-ag"
;; "dig-sinking-plat-ag"
"dig-clasp-b-ag"
"dig-bomb-crate-cylinder-ag"
"dig1-vis"
@@ -2164,50 +2148,36 @@
;; ;; FORDUMPC
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "FORDUMPC.DGO" "fordumpc.gd")
(cgo "FORDUMPC.DGO" "fordumpc.gd")
;; (goal-src-sequence
;; ""
;; :deps ("$OUT/obj/los-control.o")
;; "levels/fortress/ammo_dump/fordumpa-texture.gc"
;; "levels/fortress/ammo_dump/fort-robotank-turret.gc"
;; "levels/fortress/ammo_dump/fort-robotank.gc"
;; "levels/fortress/ammo_dump/fordumpc-part.gc"
;; "levels/fortress/ammo_dump/fordumpc-obs.gc"
;; "levels/fortress/ammo_dump/fortress-scenes.gc"
;; )
(goal-src-sequence
""
:deps ("$OUT/obj/los-control.o")
"levels/fortress/ammo_dump/fordumpc-part.gc"
"levels/fortress/ammo_dump/fordumpc-obs.gc"
"levels/fortress/ammo_dump/fortress-scenes.gc"
)
;; (copy-textures 1570 1573 1571 2917 2847)
(copy-textures 1570 1573 1571 2917 2847)
;; (copy-gos
;; "daxter-highres-ag"
;; "jak-highres-ag"
;; "fort-robotank-ag"
;; "fort-missile-target-ag"
;; "fort-robotank-top-ag"
;; "fort-roboscreen-ag"
;; "fort-missile-ag"
;; "fort-robotank-sight-ag"
;; "fort-dump-bomb-a-ag"
;; "particleman-ag"
;; "fordumpc"
;; )
(copy-gos
"fort-missile-target-ag"
"fort-missile-ag"
"fort-dump-bomb-a-ag"
"fordumpc"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; FORDUMPD
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "FORDUMPD.DGO" "fordumpd.gd")
(cgo "FORDUMPD.DGO" "fordumpd.gd")
;; (copy-textures 1574)
(copy-textures 1574)
;; (copy-gos
;; "crimson-guard-highres-ag"
;; "crimson-guard-lowres-ag"
;; "grunt-fma-ag"
;; "palmpilot-ag"
;; "fordumpd"
;; )
(copy-gos
"fordumpd"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; FRA
@@ -2253,10 +2223,8 @@
(goal-src-sequence
""
:deps ("$OUT/obj/los-control.o")
;; "levels/common/entities/fort-floor-spike.gc"
"levels/fortress/rescue/forrescb-part.gc"
"levels/fortress/rescue/forrescb-obs.gc"
;; "levels/fortress/fort-turret.gc"
"levels/common/entities/spydroid.gc"
)
@@ -2264,8 +2232,6 @@
(copy-gos
"spydroid-ag"
;; "fort-turret-ag"
;; "cty-guard-turret-button-ag"
"fort-elec-belt-ag"
"forrescb-vis"
)
+10
View File
@@ -89,7 +89,9 @@
)
;; the main execution stack that's not on the scratchpad
;; (define *canary-1* (the-as (pointer uint64) (malloc 'global 8)))
(define *dram-stack* (the-as (pointer uint8) (malloc 'global DPROCESS_STACK_SIZE)))
;; (define *canary-2* (the-as (pointer uint64) (malloc 'global 8)))
;; DECOMP DEVIATION
;; the top of the stack.
@@ -119,6 +121,7 @@
;; use the same memory for the scratchpad stacks.
;; defining it as a separate thing so we can split them for debugging stack corruption easily.
(define *fake-scratchpad-stack* *fake-scratchpad-data*)
;; (define *canary-3* (the-as (pointer uint64) (malloc 'global 8)))
(defmacro scratchpad-start ()
"Get the start of the scratchpad. At least 64kB aligned."
@@ -1559,6 +1562,9 @@
(execute-process-tree
*active-pool*
(lambda ((arg0 process))
;; (+! (-> *canary-1*) 1)
;; (+! (-> *canary-2*) 1)
;; (+! (-> *canary-3*) 1)
(let ((s5-0 *kernel-context*))
(case (-> arg0 status)
(('waiting-to-run 'suspended)
@@ -1580,6 +1586,7 @@
)
;; run the trans function.
;; (format 0 "Trans | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" arg0 (-> *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))))
(reset-and-call s4-0 (-> arg0 trans-hook))
@@ -1593,10 +1600,12 @@
)
;; run the main thread!
;; (format 0 "Code | Proc '~A' | C1: ~X C2: ~X C3: ~X~%" arg0 (-> *canary-1*) (-> *canary-2*) (-> *canary-3*))
(if (logtest? (-> arg0 mask) (process-mask sleep-code))
(set! (-> arg0 status) 'suspended)
((-> 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*))
(cond
@@ -1608,6 +1617,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*))
(when (-> arg0 post-hook)
(let ((s4-1 (new 'process 'cpu-thread arg0 'post 256 *kernel-dram-stack*)))
(reset-and-call s4-1 (-> arg0 post-hook))
+2
View File
@@ -314,6 +314,8 @@ It type checks the arguments for the entry function.
(defun enter-state (arg0 arg1 arg2 arg3 arg4 arg5)
"Make the process stored in pp enter the state in pp next-state"
(with-pp
(if (zero? (-> pp next-state))
(break!))
;; unsleep us
(process-mask-clear! (-> pp mask) sleep sleep-code)
;; mark as going
@@ -7,3 +7,205 @@
;; DECOMP BEGINS
(deftype cpad-elevator (elevator)
((sound-id sound-id :offset-assert 368)
)
:heap-base #x100
:method-count-assert 50
:size-assert #x174
:flag-assert #x3201000174
(:methods
(cpad-elevator-method-49 (_type_ symbol) none 49)
)
)
(defskelgroup skel-cpad-elevator cpad-elevator 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 18))
(defmethod get-art-group cpad-elevator ((obj cpad-elevator))
"@returns The associated [[art-group]]"
(art-group-get-by-name *level* "skel-cpad-elevator" (the-as (pointer uint32) #f))
)
(defmethod elevator-method-43 cpad-elevator ((obj cpad-elevator) (arg0 vector) (arg1 float) (arg2 float))
(let ((s4-0 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg1 'interp))
(a0-3 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg2 'interp))
(v1-3 (-> obj root-override trans))
)
(when (and (< (-> a0-3 y) (-> s4-0 y)) (< (-> arg0 y) (+ -8192.0 (-> v1-3 y))))
(let ((s4-2 (vector-! (new 'stack-no-clear 'vector) arg0 v1-3)))
(vector-inv-orient-by-quat! s4-2 s4-2 (-> obj root-override quat))
(and (< (fabs (-> s4-2 x)) 49152.0) (< (fabs (-> s4-2 z)) 49152.0))
)
)
)
)
(defmethod elevator-method-45 cpad-elevator ((obj cpad-elevator))
"@returns Stub, or always returns [[#t]]"
(let* ((gp-0 *target*)
(a0-2 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(when a0-2
(let* ((v1-1 (get-trans a0-2 0))
(gp-2 (vector-! (new 'stack-no-clear 'vector) v1-1 (-> obj root-override trans)))
)
(vector-inv-orient-by-quat! gp-2 gp-2 (-> obj root-override quat))
(and (< (fabs (-> gp-2 x)) 40960.0) (< (fabs (-> gp-2 z)) 40960.0))
)
)
)
)
(defmethod cpad-elevator-method-49 cpad-elevator ((obj cpad-elevator) (arg0 symbol))
(let ((v1-3 (-> (the-as collide-shape-prim-group (-> obj root-override root-prim)) child 1)))
(cond
(arg0
(set! (-> v1-3 prim-core collide-as) (collide-spec obstacle pusher))
(set! (-> v1-3 prim-core collide-with) (collide-spec jak player-list))
)
(else
(set! (-> v1-3 prim-core collide-as) (collide-spec))
(set! (-> v1-3 prim-core collide-with) (collide-spec))
0
)
)
)
(none)
)
(defstate running (cpad-elevator)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type elevator running) enter)))
(if t9-0
(t9-0)
)
)
(when (logtest? (-> self elevator-status) (elevator-status elevator-status-0))
(cpad-elevator-method-49 self #t)
(set-setting! 'jump #f 0 0)
)
(none)
)
:exit (behavior ()
(sound-stop (-> self sound-id))
(sound-play "dig-elevate-end")
(let ((t9-3 (-> (method-of-type elevator running) exit)))
(if t9-3
(t9-3)
)
)
(none)
)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 1))
(suspend)
)
)
(logior! (-> self elevator-status) (elevator-status elevator-status-1))
(until #f
(sound-play "dig-elevate" :id (-> self sound-id))
(suspend)
(if (= (-> self path-pos) 1.0)
(logclear! (-> self elevator-status) (elevator-status elevator-status-1))
)
)
#f
(none)
)
)
(defstate arrived (cpad-elevator)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type elevator arrived) enter)))
(if t9-0
(t9-0)
)
)
(when (logtest? (-> self elevator-status) (elevator-status elevator-status-0))
(cpad-elevator-method-49 self #f)
(remove-setting! 'jump)
)
(none)
)
)
(defmethod elevator-method-40 cpad-elevator ((obj cpad-elevator))
"TODO - need to figure out some flags to be confident about this"
(if (task-node-closed? (game-task-node dig-knock-down-introduction))
(go (method-of-object obj arrived))
(go (method-of-object obj dormant))
)
)
(defmethod deactivate cpad-elevator ((obj cpad-elevator))
(sound-stop (-> obj sound-id))
((the-as (function elevator none) (find-parent-method cpad-elevator 10)) obj)
(none)
)
;; WARN: Return type mismatch ambient-sound vs none.
(defmethod clear-ambient-sound! cpad-elevator ((obj cpad-elevator))
"Might be a virtual function, but clears the object's [[ambient-sound]]"
(set! (-> obj sound)
(new 'process 'ambient-sound (static-sound-spec "cpad-elevator-l" :fo-max 70) (-> obj root-override trans))
)
(none)
)
;; WARN: Return type mismatch sound-id vs none.
(defmethod base-plat-method-33 cpad-elevator ((obj cpad-elevator))
(let ((s5-0 (+ (-> obj path curve num-cverts) -1)))
(calc-dist-between-points! obj 0 s5-0)
(calc-dist-between-points! obj s5-0 0)
)
(set! (-> obj sound-id) (new-sound-id))
(none)
)
;; WARN: Return type mismatch collide-shape-moving vs none.
(defmethod base-plat-method-31 cpad-elevator ((obj cpad-elevator))
"TODO - collision stuff"
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 73728.0)
(set! (-> s5-0 root-prim) s4-0)
)
(pusher-init s5-0)
(let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
(set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-15 prim-core action) (collide-action solid rideable))
(set! (-> v1-15 transform-index) 3)
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 73728.0)
)
(let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-17 prim-core action) (collide-action solid))
(set! (-> v1-17 transform-index) 3)
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 73728.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-20 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
(none)
)
@@ -304,7 +304,7 @@
;; WARN: Return type mismatch amphibian-joint-mod vs none.
(defmethod amphibian-joint-mod-method-9 amphibian-joint-mod ((obj amphibian-joint-mod))
(let ((v1-3 (-> obj proc node-list data (-> obj joint-index))))
(set! (-> v1-3 param0) (the-as (function cspace matrix none) amphibian-joint-mod-callback))
(set! (-> v1-3 param0) amphibian-joint-mod-callback)
(set! (-> v1-3 param1) obj)
)
(none)
File diff suppressed because it is too large Load Diff
@@ -7,3 +7,364 @@
;; DECOMP BEGINS
(deftype transport-level (process-focusable)
((y-dest float :offset-assert 204)
(last-guard-spawn-time time-frame :offset-assert 208)
(nav-mesh nav-mesh :offset-assert 216)
(spawn-side uint32 :offset-assert 220)
(spawn? symbol :offset-assert 224)
(leave-time time-frame :offset-assert 232)
(max-guard uint32 :offset-assert 240)
(count-guard uint32 :offset-assert 244)
(max-time float :offset-assert 248)
(spawn-time time-frame :offset-assert 256)
(ambient-sound-id uint32 :offset-assert 264)
(num-wanted-guards uint32 :offset-assert 268)
(guards handle 8 :offset-assert 272)
)
:heap-base #xd0
:method-count-assert 35
:size-assert #x150
:flag-assert #x2300d00150
(:methods
(come-down () _type_ :state 27)
(idle () _type_ :state 28)
(leave () _type_ :state 29)
(die-fast () _type_ :state 30)
(transport-level-method-31 (_type_) none 31)
(transport-level-method-32 (_type_) none 32)
(transport-level-method-33 (_type_) uint 33)
(transport-level-method-34 (_type_) none 34)
)
)
(defskelgroup skel-transport-level transport 0 4
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 5 0 17)
)
;; WARN: Return type mismatch object vs transport-level.
(defbehavior transport-level-event-handler transport-level ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-0 object))
(the-as transport-level (case arg2
(('die-fast)
(go-virtual die-fast)
)
(('leave)
(if (not (and (-> self next-state) (let ((v1-6 (-> self next-state name)))
(or (= v1-6 'leave) (= v1-6 'die-fast))
)
)
)
(go-virtual leave)
)
)
(('guards-left)
(- (-> self max-guard) (-> self count-guard))
)
(('guards-alive)
(set! v0-0 (-> arg3 param 0))
(set! (-> self num-wanted-guards) (the-as uint v0-0))
v0-0
)
(('guards-alive-count)
(set! v0-0 0)
(dotimes (v1-10 (the-as int (-> self num-wanted-guards)))
(if (handle->process (-> self guards v1-10))
(set! v0-0 (+ (the-as int v0-0) 1))
)
)
v0-0
)
(('spawn-time)
(set! v0-0 (-> arg3 param 0))
(set! (-> self spawn-time) (the-as time-frame v0-0))
v0-0
)
(('stop-spawning)
(set! (-> self spawn?) #f)
#f
)
)
)
)
(defmethod transport-level-method-34 transport-level ((obj transport-level))
(let ((f30-0 (lerp-scale 0.0 2.0 (fabs (-> obj root-override transv y)) 0.0 122880.0))
(f0-4 (lerp-scale 0.0 1.0 (- (-> obj root-override trans y) (-> obj y-dest)) 143360.0 20480.0))
(a0-3 (static-sound-spec "transport" :volume 0.0 :mask (pitch reg0)))
)
(set! (-> a0-3 volume) (the int (* 1024.0 f0-4)))
(set! (-> a0-3 pitch-mod) (the int (* 1524.0 f30-0)))
(sound-play-by-spec a0-3 (the-as sound-id (-> obj ambient-sound-id)) (-> obj root-override trans))
)
0
(none)
)
(defstate come-down (transport-level)
:virtual #t
:event transport-level-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self last-guard-spawn-time) (-> self clock frame-counter))
(none)
)
:code (behavior ()
(ja-channel-push! 1 0)
(ja-no-eval :group! (-> self draw art-group data 4)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) frames num-frames) -1)))
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
(sleep-code)
(none)
)
:post (behavior ()
(set! (-> self root-override transv y) (* 2.0 (- (-> self y-dest) (-> self root-override trans y))))
(set! (-> self root-override transv y) (fmax -122880.0 (fmin 122880.0 (-> self root-override transv y))))
(+! (-> self root-override trans y) (* (-> self root-override transv y) (-> self clock seconds-per-frame)))
(if (< (fabs (- (-> self root-override trans y) (-> self y-dest))) 409.6)
(go-virtual idle)
)
(transport-level-method-34 self)
(transform-post)
(none)
)
)
(defstate idle (transport-level)
:virtual #t
:event transport-level-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self root-override transv y) 0.0)
(set! (-> self last-guard-spawn-time) 0)
0
(none)
)
:exit (behavior ()
'()
(none)
)
:code (behavior ()
(ja-channel-push! 1 0)
(sound-play "tran-door-open")
(ja-no-eval :group! (-> self draw art-group data 5)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) frames num-frames) -1)) 0.5)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.5))
)
(sleep-code)
(none)
)
:post (behavior ()
(local-vars (gp-0 symbol))
(if (-> self spawn?)
(transport-level-method-33 self)
)
(if (and (zero? (-> self leave-time))
(begin
(let ((gp-1 #t)
(a1-0 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-0 from) (process->ppointer self))
(set! (-> a1-0 num-params) 1)
(set! (-> a1-0 message) 'get-object-reserve-count)
(set! (-> a1-0 param 0) (the-as uint 6))
(let ((v1-9 (the-as object (send-event-function *traffic-manager* a1-0))))
(cmove-#f-nonzero gp-0 v1-9 gp-1)
)
)
gp-0
)
)
(set! (-> self leave-time) (+ (-> self clock frame-counter) (seconds 3)))
)
(if (and (nonzero? (-> self leave-time)) (< (-> self leave-time) (-> self clock frame-counter)))
(go-virtual leave)
)
(when (and (zero? (-> self leave-time))
(nonzero? (-> self max-guard))
(>= (-> self count-guard) (-> self max-guard))
)
(set! (-> self leave-time) (+ (-> self clock frame-counter) (seconds 3)))
(send-event self 'stop-spawning)
)
(transport-level-method-34 self)
(transform-post)
(none)
)
)
(defstate die-fast (transport-level)
:virtual #t
:code (behavior ()
(sound-stop (the-as sound-id (-> self ambient-sound-id)))
(cleanup-for-death self)
(none)
)
)
(defstate leave (transport-level)
:virtual #t
:event transport-level-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self root-override transv y) 0.0)
(none)
)
:code (behavior ()
(ja-channel-push! 1 0)
(sound-play "tran-thrust")
(sound-play "tran-door-close")
(ja-no-eval :group! (-> self draw art-group data 6)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 6)) frames num-frames) -1)) 0.2)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.2))
)
(sleep-code)
(none)
)
:post (behavior ()
(transport-level-method-34 self)
(+! (-> self root-override transv y) (* 40960.0 (-> self clock seconds-per-frame)))
(set! (-> self root-override transv y) (fmax -122880.0 (fmin 122880.0 (-> self root-override transv y))))
(+! (-> self root-override trans y) (* (-> self root-override transv y) (-> self clock seconds-per-frame)))
(if (and (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(< 163840.0 (- (-> self root-override trans y) (-> self y-dest)))
)
(go-virtual die-fast)
)
(transform-post)
(none)
)
)
(defmethod transport-level-method-33 transport-level ((obj transport-level))
(with-pp
(let ((v1-0 0))
(dotimes (a0-1 8)
(if (handle->process (-> obj guards a0-1))
(+! v1-0 1)
)
)
(when (zero? (-> obj count-guard))
(set! (-> obj last-guard-spawn-time) 0)
0
)
(when (and (>= (- (-> pp clock frame-counter) (-> obj last-guard-spawn-time)) (-> obj spawn-time))
(< v1-0 (the-as int (-> obj num-wanted-guards)))
)
(let ((s5-0 (new 'stack-no-clear 'crimson-guard-level-params)))
(set! (-> s5-0 transport-side) (-> obj spawn-side))
(set! (-> s5-0 nav-mesh) (-> obj nav-mesh))
(set! (-> s5-0 pos quad) (-> obj root-override trans quad))
(set! (-> s5-0 pos y) (+ 8192.0 (-> s5-0 pos y)))
(quaternion-rotate-local-y! (-> s5-0 quat) (-> obj root-override quat) 32768.0)
(set! (-> s5-0 handle) (the-as uint (process->handle obj)))
(set! (-> s5-0 weapon) 1)
(dotimes (s4-0 (the-as int (-> obj num-wanted-guards)))
(when (not (handle->process (-> obj guards s4-0)))
(set! (-> obj guards s4-0) (ppointer->handle (process-spawn crimson-guard-level s5-0 :to obj)))
#t
(goto cfg-38)
)
)
(label cfg-38)
(when (-> s5-0 proc)
(set! (-> obj spawn-side) (- 1 (the-as int (-> obj spawn-side))))
(set! (-> obj last-guard-spawn-time) (-> pp clock frame-counter))
(let ((v0-0 (+ (-> obj count-guard) 1)))
(set! (-> obj count-guard) v0-0)
v0-0
)
)
)
)
)
)
)
(defmethod transport-level-method-31 transport-level ((obj transport-level))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 69632.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (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 0.0 0.0 40960.0)
)
(let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-14 prim-core action) (collide-action solid))
(set! (-> v1-14 transform-index) 3)
(set-vector! (-> v1-14 local-sphere) 0.0 20480.0 0.0 69632.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-17 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
(defmethod transport-level-method-32 transport-level ((obj transport-level))
(set! (-> obj spawn-side) (the-as uint 0))
0
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! transport-level ((obj transport-level) (arg0 entity-actor))
(transport-level-method-31 obj)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-transport-level" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(transport-level-method-32 obj)
(logclear! (-> obj mask) (process-mask actor-pause))
(process-entity-status! obj (entity-perm-status no-kill) #t)
(set! (-> obj spawn?) #t)
(set! (-> obj nav-mesh) (nav-mesh-from-res-tag arg0 'nav-mesh-actor 0))
(set! (-> obj num-wanted-guards) (the-as uint 4))
(dotimes (v1-11 8)
(set! (-> obj guards v1-11) (the-as handle #f))
)
(set! (-> obj spawn-time) (seconds 4))
(set! (-> obj root-override trans y) (+ 40960.0 (-> obj root-override trans y)))
(set! (-> obj y-dest) (-> obj root-override trans y))
(set! (-> obj root-override trans y) (+ 163840.0 (-> obj root-override trans y)))
(go (method-of-object obj come-down))
(none)
)
@@ -7,3 +7,656 @@
;; DECOMP BEGINS
(deftype spike-row-info (structure)
((sync sync-linear :inline :offset-assert 0)
(table-ptr (inline-array vector) :offset-assert 16)
(on-ratio float :offset-assert 20)
(state int32 :offset-assert 24)
)
:method-count-assert 9
:size-assert #x1c
:flag-assert #x90000001c
)
(deftype spike-row-info-array (inline-array-class)
((data spike-row-info :inline :dynamic :offset-assert 16)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(set! (-> spike-row-info-array heap-base) (the-as uint 32))
(deftype fort-floor-spike (process-drawable)
((pos-table (inline-array vector) :offset-assert 200)
(spike-row spike-row-info-array :offset-assert 204)
(spike-dim basic 2 :offset-assert 208)
(attack-id int32 :offset-assert 216)
(no-overlap-timer uint64 :offset-assert 224)
)
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
(:methods
(idle () _type_ :state 20)
(fort-floor-spike-method-21 (_type_) none 21)
(fort-floor-spike-method-22 (_type_) collide-shape-moving 22)
(fort-floor-spike-method-23 (_type_) symbol 23)
)
)
(defun joint-mod-set-y-callback ((arg0 cspace) (arg1 transformq))
"TODO - investigate weird casting"
(let ((a2-0 (-> arg0 param1))
(a3-0 (the-as object (-> arg0 param2)))
(v1-0 (new 'stack-no-clear 'transformq))
)
(set! (-> v1-0 trans quad) (-> arg1 trans quad))
(set! (-> v1-0 quat quad) (-> arg1 quat quad))
(set! (-> v1-0 scale quad) (-> arg1 scale quad))
(set! (-> v1-0 trans y) (fmin -4096.0 (-> (the-as vector (+ (* (the-as int a3-0) 16) (the-as int a2-0))) y)))
(cspace<-parented-transformq-joint! arg0 v1-0)
)
(none)
)
(defmethod fort-floor-spike-method-21 fort-floor-spike ((obj fort-floor-spike))
0
(none)
)
;; WARN: Return type mismatch int vs collide-shape-moving.
(defmethod fort-floor-spike-method-22 fort-floor-spike ((obj fort-floor-spike))
(the-as collide-shape-moving 0)
)
;; WARN: Return type mismatch int vs symbol.
(defmethod fort-floor-spike-method-23 fort-floor-spike ((obj fort-floor-spike))
(the-as symbol 0)
)
(defstate idle (fort-floor-spike)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(the-as
object
(case event-type
(('touched)
(when (+ (-> self clock frame-counter) (seconds -2))
(let* ((s3-0 proc)
(s4-0 (if (type? s3-0 process-drawable)
(the-as process-drawable s3-0)
)
)
)
(when s4-0
(let ((s3-1 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))
(s4-1
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s4-0 root trans) (-> self root trans)) 1.0)
)
)
(vector-flatten! s4-1 s4-1 s3-1)
(set! (-> s4-1 y) 0.0)
(vector-normalize! s4-1 1.0)
(let ((a1-8 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-8 from) (process->ppointer self))
(set! (-> a1-8 num-params) 2)
(set! (-> a1-8 message) 'attack)
(set! (-> a1-8 param 0) (-> event param 0))
(let ((v1-11 (new 'static 'attack-info :mask (attack-info-mask vector mode shove-back shove-up id))))
(set! (-> v1-11 id) (the-as uint (-> self attack-id)))
(set! (-> v1-11 mode) 'deadly)
(set! (-> v1-11 shove-up) 24576.0)
(set! (-> v1-11 shove-back) 16384.0)
(set! (-> v1-11 vector quad) (-> s4-1 quad))
(set! (-> a1-8 param 1) (the-as uint v1-11))
)
(send-event-function proc a1-8)
)
)
(let ((v0-0 (-> self clock frame-counter)))
(set! (-> self no-overlap-timer) (the-as uint v0-0))
v0-0
)
)
)
)
)
)
)
)
:enter (behavior ()
(set! (-> self no-overlap-timer) (the-as uint 0))
0
(none)
)
:code (the-as (function none :behavior fort-floor-spike) sleep-code)
:post (behavior ()
(dotimes (gp-0 (the-as int (-> self spike-dim 0)))
(let ((s5-0 (-> self spike-row data gp-0)))
(let ((f0-0 (get-norm! (-> s5-0 sync) 0)))
(cond
((< (-> s5-0 on-ratio) f0-0)
(set! (-> s5-0 state) 0)
0
)
(else
(set! (-> s5-0 state) 1)
)
)
)
(dotimes (s4-0 (the-as int (-> self spike-dim 1)))
(cond
((zero? (-> s5-0 state))
(seek!
(-> s5-0 table-ptr s4-0 y)
(* 4096.0 (- -4.0 (the float s4-0)))
(* 131072.0 (-> self clock seconds-per-frame))
)
)
(else
(let ((f30-0 (-> s5-0 table-ptr s4-0 y))
(f28-0 (* 4096.0 (+ -1.0 (the float s4-0))))
)
(seek! (-> s5-0 table-ptr s4-0 y) f28-0 (* 131072.0 (-> self clock seconds-per-frame)))
(if (and (< f30-0 f28-0) (= (-> s5-0 table-ptr gp-0 y) f28-0))
(sound-play "floor-spike" :position (-> s5-0 table-ptr gp-0))
)
)
)
)
)
)
)
(transform-post)
(none)
)
)
;; WARN: Return type mismatch process-drawable vs fort-floor-spike.
(defmethod relocate fort-floor-spike ((obj fort-floor-spike) (arg0 int))
(if (nonzero? (-> obj spike-row))
(&+! (-> obj spike-row) arg0)
)
(the-as fort-floor-spike ((method-of-type process-drawable relocate) obj arg0))
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-floor-spike ((obj fort-floor-spike) (arg0 entity-actor))
(fort-floor-spike-method-22 obj)
(process-drawable-from-entity! obj arg0)
(fort-floor-spike-method-21 obj)
(fort-floor-spike-method-23 obj)
(let* ((v1-6 *game-info*)
(a0-6 (+ (-> v1-6 attack-id) 1))
)
(set! (-> v1-6 attack-id) a0-6)
(set! (-> obj attack-id) (the-as int a0-6))
)
(go (method-of-object obj idle))
(none)
)
(defskelgroup skel-fort-floor-spike-a fort-floor-spike-a 0 4
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 0 0 12)
)
(defskelgroup skel-fort-floor-spike-b fort-floor-spike-b 0 4
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 0 0 12)
)
(defskelgroup skel-fort-floor-spike-c fort-floor-spike-c 0 4
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 0 0 12)
)
(deftype fort-floor-spike-a (fort-floor-spike)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
)
(defmethod fort-floor-spike-method-21 fort-floor-spike-a ((obj fort-floor-spike-a))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-floor-spike-a" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> obj draw art-group data 4))
num-func-identity
)
)
(transform-post)
(none)
)
(defmethod fort-floor-spike-method-22 fort-floor-spike-a ((obj fort-floor-spike-a))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0)))
(set! (-> s5-0 total-prims) (the-as uint 9))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set! (-> s5-0 root-prim) s4-0)
(let* ((s3-0 '((0 4 17203) (1 5 17203) (2 6 17203) (3 7 17203) (4 8 17203) (5 9 17203) (6 10 17203) (7 11 17203)))
(s2-0 (car s3-0))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (car s2-0) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (car (cdr s2-0)) 0))
)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 (command-get-float (car (cdr (cdr s2-0))) 0.0))
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-24 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root) s5-0)
s5-0
)
)
(defmethod fort-floor-spike-method-23 fort-floor-spike-a ((obj fort-floor-spike-a))
(local-vars (sv-64 cspace))
(let ((s5-0 2)
(s4-0 4)
)
(set! (-> obj spike-dim 0) (the-as basic s5-0))
(set! (-> obj spike-dim 1) (the-as basic s4-0))
(set! (-> obj spike-row) (new 'process 'spike-row-info-array s5-0))
(set! (-> obj pos-table) (new 'static 'inline-array vector 8
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
)
)
(let ((s3-0 (-> obj pos-table))
(s2-0 4)
(s1-0 11)
)
(dotimes (s0-0 (+ (- 1 s2-0) s1-0))
(set! sv-64 (-> obj node-list data (+ s2-0 s0-0)))
(vector<-cspace! (-> s3-0 s0-0) sv-64)
(set! (-> s3-0 s0-0 y) 0.0)
(set! (-> sv-64 param0) joint-mod-set-y-callback)
(set! (-> sv-64 param1) (the-as basic s3-0))
(set! (-> sv-64 param2) (the-as basic s0-0))
)
)
(dotimes (s3-1 s5-0)
(let ((s2-1 (-> obj spike-row data s3-1)))
(let ((a1-2 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-19 0))
(if #t
(set! v1-19 (logior v1-19 1))
)
(set! (-> a1-2 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-2 sync-flags) (the-as sync-flags v1-19))
)
(set! (-> a1-2 entity) #f)
(set! (-> a1-2 period) (the-as uint 1200))
(let ((f0-2 (* 0.25 (the float s3-1))))
(set! (-> a1-2 percent) (- f0-2 (* (the float (the int (/ f0-2 1.0))) 1.0)))
)
(initialize! (-> s2-1 sync) a1-2)
)
(set! (-> s2-1 on-ratio) 0.375)
(set! (-> s2-1 state) 0)
(set! (-> s2-1 table-ptr) (the-as (inline-array vector) (-> obj pos-table (* s3-1 s4-0))))
)
)
)
#f
)
(deftype fort-floor-spike-b (fort-floor-spike)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
)
(defmethod fort-floor-spike-method-21 fort-floor-spike-b ((obj fort-floor-spike-b))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-floor-spike-b" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> obj draw art-group data 4))
num-func-identity
)
)
(transform-post)
(none)
)
(defmethod fort-floor-spike-method-22 fort-floor-spike-b ((obj fort-floor-spike-b))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0)))
(set! (-> s5-0 total-prims) (the-as uint 11))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set! (-> s5-0 root-prim) s4-0)
(let* ((s3-0 '((0 4 16384)
(1 5 16384)
(2 6 16384)
(3 7 16384)
(4 8 16384)
(5 9 16384)
(6 10 16384)
(7 11 16384)
(8 12 16384)
(9 13 16384)
)
)
(s2-0 (car s3-0))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (car s2-0) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (car (cdr s2-0)) 0))
)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 (command-get-float (car (cdr (cdr s2-0))) 0.0))
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-24 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root) s5-0)
s5-0
)
)
(defmethod fort-floor-spike-method-23 fort-floor-spike-b ((obj fort-floor-spike-b))
(local-vars (sv-64 cspace))
(let ((s5-0 2)
(s4-0 5)
)
(set! (-> obj spike-dim 0) (the-as basic s5-0))
(set! (-> obj spike-dim 1) (the-as basic s4-0))
(set! (-> obj spike-row) (new 'process 'spike-row-info-array s5-0))
(set! (-> obj pos-table) (new 'static 'inline-array vector 8
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
)
)
(let ((s3-0 (-> obj pos-table))
(s2-0 4)
(s1-0 13)
)
(dotimes (s0-0 (+ (- 1 s2-0) s1-0))
(set! sv-64 (-> obj node-list data (+ s2-0 s0-0)))
(vector<-cspace! (-> s3-0 s0-0) sv-64)
(set! (-> s3-0 s0-0 y) 0.0)
(set! (-> sv-64 param0) joint-mod-set-y-callback)
(set! (-> sv-64 param1) (the-as basic s3-0))
(set! (-> sv-64 param2) (the-as basic s0-0))
)
)
(dotimes (s3-1 s5-0)
(let ((s2-1 (-> obj spike-row data s3-1)))
(let ((a1-2 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-19 0))
(if #t
(set! v1-19 (logior v1-19 1))
)
(set! (-> a1-2 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-2 sync-flags) (the-as sync-flags v1-19))
)
(set! (-> a1-2 entity) #f)
(set! (-> a1-2 period) (the-as uint 1200))
(let ((f0-2 (* 0.25 (the float s3-1))))
(set! (-> a1-2 percent) (- f0-2 (* (the float (the int (/ f0-2 1.0))) 1.0)))
)
(initialize! (-> s2-1 sync) a1-2)
)
(set! (-> s2-1 on-ratio) 0.375)
(set! (-> s2-1 state) 0)
(set! (-> s2-1 table-ptr) (the-as (inline-array vector) (-> obj pos-table (* s3-1 s4-0))))
)
)
)
#f
)
(deftype fort-floor-spike-c (fort-floor-spike)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
)
(defmethod fort-floor-spike-method-21 fort-floor-spike-c ((obj fort-floor-spike-c))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-floor-spike-c" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> obj draw art-group data 4))
num-func-identity
)
)
(transform-post)
(none)
)
(defmethod fort-floor-spike-method-22 fort-floor-spike-c ((obj fort-floor-spike-c))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 15) 0)))
(set! (-> s5-0 total-prims) (the-as uint 16))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set! (-> s5-0 root-prim) s4-0)
(let* ((s3-0 '((0 4 16384)
(1 5 16384)
(2 6 16384)
(3 7 16384)
(4 8 16384)
(5 9 16384)
(6 10 16384)
(7 11 16384)
(8 12 16384)
(9 13 16384)
(10 15 16384)
(11 16 16384)
(12 14 16384)
(13 15 16384)
(14 16 16384)
)
)
(s2-0 (car s3-0))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (car s2-0) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (car (cdr s2-0)) 0))
)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 (command-get-float (car (cdr (cdr s2-0))) 0.0))
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-24 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root) s5-0)
s5-0
)
)
(defmethod fort-floor-spike-method-23 fort-floor-spike-c ((obj fort-floor-spike-c))
(local-vars (sv-64 cspace))
(let ((s5-0 3)
(s4-0 5)
)
(set! (-> obj spike-dim 0) (the-as basic s5-0))
(set! (-> obj spike-dim 1) (the-as basic s4-0))
(set! (-> obj spike-row) (new 'process 'spike-row-info-array s5-0))
(set! (-> obj pos-table) (new 'static 'inline-array vector 8
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
)
)
(let ((s3-0 (-> obj pos-table))
(s2-0 4)
(s1-0 18)
)
(dotimes (s0-0 (+ (- 1 s2-0) s1-0))
(set! sv-64 (-> obj node-list data (+ s2-0 s0-0)))
(vector<-cspace! (-> s3-0 s0-0) sv-64)
(set! (-> s3-0 s0-0 y) 0.0)
(set! (-> sv-64 param0) joint-mod-set-y-callback)
(set! (-> sv-64 param1) (the-as basic s3-0))
(set! (-> sv-64 param2) (the-as basic s0-0))
)
)
(dotimes (s3-1 s5-0)
(let ((s2-1 (-> obj spike-row data s3-1)))
(let ((a1-2 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-19 0))
(if #t
(set! v1-19 (logior v1-19 1))
)
(set! (-> a1-2 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-2 sync-flags) (the-as sync-flags v1-19))
)
(set! (-> a1-2 entity) #f)
(set! (-> a1-2 period) (the-as uint 1200))
(let ((f0-2 (* 0.25 (the float s3-1))))
(set! (-> a1-2 percent) (- f0-2 (* (the float (the int (/ f0-2 1.0))) 1.0)))
)
(initialize! (-> s2-1 sync) a1-2)
)
(set! (-> s2-1 on-ratio) 0.375)
(set! (-> s2-1 state) 0)
(set! (-> s2-1 table-ptr) (the-as (inline-array vector) (-> obj pos-table (* s3-1 s4-0))))
)
)
)
#f
)
File diff suppressed because it is too large Load Diff
+903
View File
@@ -7,3 +7,906 @@
;; DECOMP BEGINS
(deftype dig-sinking-plat (rigid-body-platform)
((anchor-point vector :inline :offset-assert 384)
(sync sync-linear :inline :offset-assert 400)
(last-ridden-time time-frame :offset-assert 416)
(prev-pos float :offset-assert 424)
(path-pos float :offset-assert 428)
(surface-height float :offset-assert 432)
(once basic :offset-assert 436)
(bubbling-sound-id uint32 :offset-assert 440)
)
:heap-base #x140
:method-count-assert 57
:size-assert #x1bc
:flag-assert #x39014001bc
)
(defskelgroup skel-dig-sinking-plat dig-sinking-plat 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 -2 0 5.25)
)
(defmethod rigid-body-object-method-29 dig-sinking-plat ((obj dig-sinking-plat) (arg0 float))
((the-as (function rigid-body-platform float none) (find-parent-method dig-sinking-plat 29)) obj arg0)
(rigid-body-platform-method-56 obj (-> obj anchor-point))
0
(none)
)
(defmethod rigid-body-object-method-32 dig-sinking-plat ((obj dig-sinking-plat))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate))
(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 pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 -8192.0 0.0 21504.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! (-> obj root-override-2) s5-0)
)
0
(none)
)
(define *dig-sinking-platform-constants* (new 'static 'rigid-body-object-constants
:mass 4.0
:inv-mass 0.25
:cm-joint-y (meters -2)
:cm-joint-w 1.0
:linear-damping 0.9
:angular-damping 0.48
:friction-factor 0.1
:inertial-tensor-x (meters 6)
:inertial-tensor-y (meters 4)
:inertial-tensor-z (meters 6)
:max-time-step 0.02
:gravity (meters 80)
:idle-distance (meters 200)
:attack-force-scale 2.0
:name '*dig-sinking-platform-constants*
)
)
(defmethod rigid-body-platform-method-53 dig-sinking-plat ((obj dig-sinking-plat) (arg0 vector))
(-> obj surface-height)
)
(defmethod rigid-body-object-method-37 dig-sinking-plat ((obj dig-sinking-plat))
(with-pp
(when (not (logtest? (-> obj path flags) (path-control-flag not-found)))
(set! (-> obj prev-pos) (-> obj path-pos))
(set! (-> obj path-pos) (get-norm! (-> obj sync) 0))
(when (< (-> obj path-pos) (-> obj prev-pos))
(let ((a0-2 (-> obj skel root-channel 0)))
(set! (-> a0-2 frame-group) (the-as art-joint-anim (-> obj draw art-group data 2)))
(set! (-> a0-2 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 2)) frames num-frames) -1))
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group! a0-2 (the-as art-joint-anim (-> obj draw art-group data 2)) num-func-seek!)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group frames num-frames) -1)))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
)
)
(let ((f30-0 (/ 300.0 (the float (-> obj sync period)))))
(let* ((f0-12 (/ 1.0 (- 1.0 (* 2.0 f30-0))))
(f0-13 (* (fmax 0.0 (- (-> obj path-pos) f30-0)) f0-12))
)
(get-point-at-percent-along-path! (-> obj path) (-> obj anchor-point) f0-13 'interp)
)
(cond
((< (-> obj path-pos) f30-0)
(set! (-> obj float-height-offset) (* -8192.0 (/ (- f30-0 (-> obj path-pos)) f30-0)))
)
((< (- 1.0 (* 2.0 f30-0)) (-> obj path-pos))
(cond
((< (- 1.0 f30-0) (-> obj path-pos))
(set! (-> obj float-height-offset) (* -8192.0 (/ (- (-> obj path-pos) (- 1.0 f30-0)) f30-0)))
(let ((a0-5 (-> obj skel root-channel 0)))
(set! (-> a0-5 param 0) (the float (+ (-> a0-5 frame-group frames num-frames) -1)))
(set! (-> a0-5 param 1) 1.0)
(joint-control-channel-group-eval! a0-5 (the-as art-joint-anim #f) num-func-seek!)
)
)
(else
(when (-> obj once)
(let ((a0-6 (-> obj skel root-channel 0)))
(set! (-> a0-6 frame-group) (the-as art-joint-anim (-> obj draw art-group data 3)))
(set! (-> a0-6 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 3)) frames num-frames) -1))
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group! a0-6 (the-as art-joint-anim (-> obj draw art-group data 3)) num-func-seek!)
)
(set! (-> obj once) #f)
)
(let ((a0-7 (-> obj skel root-channel 0)))
(set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group frames num-frames) -1)))
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
)
(else
(set! (-> obj float-height-offset) 0.0)
)
)
)
)
(cond
((>= (- (-> pp clock frame-counter) (-> obj last-ridden-time)) (seconds 0.5))
(when (nonzero? (-> obj bubbling-sound-id))
(let ((v1-84 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-84 command) (sound-command set-param))
(set! (-> v1-84 id) (the-as sound-id (-> obj bubbling-sound-id)))
(set! (-> v1-84 params volume) -4)
(set! (-> v1-84 auto-time) 120)
(set! (-> v1-84 auto-from) 2)
(set! (-> v1-84 params mask) (the-as uint 17))
(-> v1-84 id)
)
(set! (-> obj bubbling-sound-id) (the-as uint 0))
0
)
)
(else
(if (zero? (-> obj bubbling-sound-id))
(set! (-> obj bubbling-sound-id) (the-as uint (sound-play "lava-plat-sink")))
)
)
)
((method-of-type rigid-body-platform rigid-body-object-method-37) obj)
(none)
)
)
(defmethod rigid-body-platform-method-56 dig-sinking-plat ((obj dig-sinking-plat) (arg0 vector))
(when (not (logtest? (-> obj path flags) (path-control-flag not-found)))
(let ((v1-4 (new 'stack-no-clear 'vector)))
(cond
((< (-> obj prev-pos) (-> obj path-pos))
(vector-! v1-4 arg0 (-> obj rbody state position))
(set! (-> v1-4 y) 0.0)
(let* ((f0-2 (vector-length v1-4))
(f1-2 (* 1000.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-2)))))
)
(when (< 0.0 f1-2)
(vector-float*! v1-4 v1-4 (/ f1-2 f0-2))
(rigid-body-method-20 (-> obj rbody state) v1-4)
)
)
)
(else
(let ((v1-5 (new 'stack-no-clear 'vector)))
(set! (-> v1-5 quad) (-> arg0 quad))
(set! (-> v1-5 y) (+ -8192.0 (-> v1-5 y)))
(let ((a0-16 (-> obj rbody))
(a2-2 (-> obj root-override-2 quat))
)
(rigid-body-method-26 (-> a0-16 state) v1-5 a2-2)
)
)
(set! (-> obj once) (the-as basic #t))
)
)
)
)
0
(none)
)
(defstate idle (dig-sinking-plat)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('ridden)
(set! (-> self last-ridden-time) (-> self clock frame-counter))
)
)
(the-as object (rigid-body-object-event-handler proc arg1 event-type event))
)
)
(defstate active (dig-sinking-plat)
:virtual #t
:event (-> (method-of-type dig-sinking-plat idle) event)
)
(defmethod rigid-body-object-method-33 dig-sinking-plat ((obj dig-sinking-plat))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-dig-sinking-plat" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(rigid-body-object-method-31 obj *dig-sinking-platform-constants*)
(set! (-> obj anchor-point quad) (-> obj root-override-2 trans quad))
(set! (-> obj surface-height) (+ -4096.0 (-> obj root-override-2 trans y)))
(let ((s5-1 (-> obj info-override control-point-count)))
(dotimes (s4-1 s5-1)
(let ((s3-0 (-> obj control-point-array data s4-1)))
(let ((f30-0 (* 65536.0 (/ (the float s4-1) (the float s5-1)))))
(set! (-> s3-0 local-pos x) (* 16384.0 (sin f30-0)))
(set! (-> s3-0 local-pos y) -8192.0)
(set! (-> s3-0 local-pos z) (* 16384.0 (cos f30-0)))
)
(set! (-> s3-0 local-pos w) 1.0)
)
)
)
(let ((s5-2 (-> obj entity)))
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0 s5-2 #f))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(set! (-> obj fact)
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
)
(let ((a1-5 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-25 0))
(if #f
(set! v1-25 (logior v1-25 1))
)
(set! (-> a1-5 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-5 sync-flags) (the-as sync-flags v1-25))
)
(set! (-> a1-5 entity) s5-2)
(set! (-> a1-5 period) (the-as uint 3000))
(set! (-> a1-5 percent) 0.0)
(initialize! (-> obj sync) a1-5)
)
)
(set! (-> obj bubbling-sound-id) (the-as uint 0))
(set! (-> obj once) (the-as basic #t))
0
(none)
)
(defpartgroup group-dig-log
:id 1145
:bounds (static-bspherem 0 0 0 2)
:parts ((sp-item 4956)
(sp-item 4957)
(sp-item 4958 :binding 4955)
(sp-item 4955 :flags (bit1 start-dead))
(sp-item 4955 :flags (bit1 start-dead))
(sp-item 4955 :flags (bit1 start-dead))
(sp-item 4955 :flags (bit1 start-dead))
(sp-item 4959)
)
)
(defpart 4956
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
(sp-rnd-flt spt-num 3.0 2.0 1.0)
(sp-flt spt-x (meters 4))
(sp-rnd-flt spt-scale-x (meters 2) (meters 1) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 128.0)
(sp-rnd-flt spt-g 96.0 32.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-rnd-flt spt-a 8.0 8.0 1.0)
(sp-rnd-flt spt-vel-x (meters 0.016666668) (meters 0.016666668) 1.0)
(sp-rnd-flt spt-vel-y (meters 0.02) (meters 0.02) 1.0)
(sp-flt spt-scalevel-x (meters 0.006666667))
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -0.053333335)
(sp-flt spt-friction 0.98)
(sp-int spt-timer 900)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
)
)
(defpart 4957
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #xade))
(sp-rnd-flt spt-num 1.0 1.0 1.0)
(sp-flt spt-x (meters 4))
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.3) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 180.0 32.0 1.0)
(sp-rnd-flt spt-g 150.0 32.0 1.0)
(sp-rnd-flt spt-b 130.0 32.0 1.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-rnd-flt spt-vel-x (meters 0.02) (meters 0.02) 1.0)
(sp-rnd-flt spt-vel-y (meters 0.026666667) (meters 0.026666667) 1.0)
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
(sp-flt spt-fade-a -0.35555556)
(sp-flt spt-accel-y -5.4613333)
(sp-flt spt-friction 0.98)
(sp-int spt-timer 300)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
)
)
(defpart 4958
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #xade))
(sp-rnd-flt spt-num 0.05 0.05 1.0)
(sp-rnd-flt spt-x (meters -10) (meters 12) 1.0)
(sp-flt spt-y (meters 38))
(sp-rnd-flt spt-scale-x (meters 0.6) (meters 0.3) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 180.0 32.0 1.0)
(sp-rnd-flt spt-g 150.0 32.0 1.0)
(sp-rnd-flt spt-b 130.0 32.0 1.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-rnd-flt spt-vel-x (meters -0.00066666666) (meters 0.0013333333) 1.0)
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
(sp-flt spt-fade-a -0.16)
(sp-flt spt-accel-y -17.749332)
(sp-flt spt-friction 0.98)
(sp-int spt-timer 600)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
(sp-flt spt-rotate-y (degrees 90.0))
)
)
(defpart 4959
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
(sp-rnd-flt spt-num 0.2 0.2 1.0)
(sp-rnd-flt spt-x (meters -8) (meters 8) 1.0)
(sp-flt spt-y (meters 38))
(sp-rnd-flt spt-scale-x (meters 2) (meters 0.3) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 180.0 32.0 1.0)
(sp-rnd-flt spt-g 150.0 32.0 1.0)
(sp-rnd-flt spt-b 130.0 32.0 1.0)
(sp-rnd-flt spt-a 8.0 8.0 1.0)
(sp-flt spt-scalevel-x (meters 0.033333335))
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -0.04)
(sp-flt spt-accel-y -5.4613333)
(sp-flt spt-friction 0.98)
(sp-int spt-timer 1200)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
(sp-flt spt-rotate-y (degrees 90.0))
)
)
(defpart 4955
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
(sp-flt spt-num 2.0)
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.3) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 180.0 32.0 1.0)
(sp-rnd-flt spt-g 150.0 32.0 1.0)
(sp-rnd-flt spt-b 130.0 32.0 1.0)
(sp-rnd-flt spt-a 8.0 4.0 1.0)
(sp-flt spt-scalevel-x (meters 0.01))
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -0.04)
(sp-int spt-timer 1200)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
)
)
(deftype dig-log-button-info (basic)
((cam-ret-mode symbol :offset-assert 4)
(cam-ret-dir vector :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
(define *dig-log-button-infos* (new 'static 'boxed-array :type dig-log-button-info
(new 'static 'dig-log-button-info
:cam-ret-mode 'instant
:cam-ret-dir (new 'static 'vector :x 0.1464 :z -0.9892 :w 1.0)
)
(new 'static 'dig-log-button-info
:cam-ret-mode 'normal
:cam-ret-dir (new 'static 'vector :x 0.9805 :z 0.1963 :w 1.0)
)
(new 'static 'dig-log-button-info
:cam-ret-mode 'normal
:cam-ret-dir (new 'static 'vector :x 0.8602 :z 0.5099 :w 1.0)
)
(new 'static 'dig-log-button-info
:cam-ret-mode 'instant
:cam-ret-dir (new 'static 'vector :x -0.9946 :z 0.1035 :w 1.0)
)
(new 'static 'dig-log-button-info
:cam-ret-mode 'normal
:cam-ret-dir (new 'static 'vector :x 0.9966 :z -0.0813 :w 1.0)
)
)
)
(define *dig-log-heights* (new 'static 'inline-array vector 2
(new 'static 'vector :x 56320.0 :y 32768.0 :z 23552.0 :w 14336.0)
(new 'static 'vector :x 5120.0 :y -4096.0)
)
)
(deftype dig-log (process-drawable)
((pressed-count int8 :offset-assert 200)
(total-buttons int8 :offset-assert 201)
(last-button-id int8 :offset-assert 202)
(base-y float :offset-assert 204)
(hud-handle handle :offset-assert 208)
(pad-ihj1bn234i1b int32 2 :offset-assert 216)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xe0
:flag-assert #x17006000e0
(:methods
(idle () _type_ :state 20)
(moving () _type_ :state 21)
(dig-log-method-22 (_type_ symbol) symbol 22)
)
)
(defskelgroup skel-dig-log dig-log 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 7.25 0 11)
:origin-joint-index 3
)
(defbehavior dig-log-event-handler dig-log ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('hit)
(set! (-> self last-button-id) (the-as int (/ (the-as int (-> arg3 param 0)) 8)))
(set! (-> self pressed-count) (min (+ (-> self pressed-count) 1) (-> self total-buttons)))
(set! (-> *game-info* counter) (the float (- (-> self total-buttons) (-> self pressed-count))))
(cond
((= (-> self pressed-count) (-> self total-buttons))
(dig-log-method-22 self #f)
(task-node-close! (game-task-node dig-find-totem-raise-log))
)
(else
(dig-log-method-22 self #t)
)
)
(go-virtual moving)
)
(('hud-dig-button)
(dig-log-method-22 self (the-as symbol (-> arg3 param 0)))
)
)
)
(defmethod run-logic? dig-log ((obj dig-log))
#t
)
;; WARN: Return type mismatch int vs symbol.
;; WARN: disable def twice: 16. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod dig-log-method-22 dig-log ((obj dig-log) (arg0 symbol))
(the-as
symbol
(cond
(arg0
(when (!= (-> obj pressed-count) (-> obj total-buttons))
(when (not (handle->process (-> obj hud-handle)))
(let ((v0-0 (ppointer->handle (process-spawn hud-dig-button :init hud-init-by-other :to obj))))
(set! (-> obj hud-handle) (the-as handle v0-0))
v0-0
)
)
)
)
(else
(send-event (handle->process (-> obj hud-handle)) 'hide-and-die)
(set! (-> obj hud-handle) (the-as handle #f))
(the-as int #f)
)
)
)
)
(defstate idle (dig-log)
:virtual #t
:event dig-log-event-handler
:code (the-as (function none :behavior dig-log) sleep-code)
)
(defstate moving (dig-log)
:virtual #t
:enter (behavior ()
(set-setting! 'ignore-target #t 0 0)
(none)
)
:exit (behavior ()
(remove-setting! 'ignore-target)
(none)
)
:code (behavior ()
(local-vars (v1-12 object))
(let ((gp-0 (-> *dig-log-button-infos* (-> self last-button-id))))
(let* ((t0-0 (if (= (-> self pressed-count) (-> self total-buttons))
"diglog5"
"diglog1"
)
)
(s5-0 (add-process *gui-control* self (gui-channel jak) (gui-action queue) t0-0 -99.0 0))
)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.15))
(suspend)
)
(until v1-12
(suspend)
(set! v1-12
(and *target* (not (logtest? (-> *target* focus-status) (focus-status in-air))) (process-grab? *target* #f))
)
)
(while (!= (get-status *gui-control* s5-0) (gui-status ready))
(suspend)
)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.2))
(suspend)
)
(set-setting! 'entity-name "camera-249" 0 0)
(set-action!
*gui-control*
(gui-action play)
s5-0
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
(suspend)
)
(let ((f30-0
(+ (-> (&-> *dig-log-heights* 0 data (- (-> self total-buttons) (-> self pressed-count))) 0) (-> self base-y))
)
(s5-1 (-> self clock frame-counter))
)
(until (>= (-> self root trans y) f30-0)
(set! (-> self root trans y)
(seek-with-smooth (-> self root trans y) f30-0 (* 4096.0 (-> self clock seconds-per-frame)) 0.25 40.96)
)
(when (>= (-> self clock frame-counter) s5-1)
(activate!
*camera-smush-control*
(rand-vu-float-range 614.4 1433.6)
45
75
1.0
0.95
(-> *display* camera-clock)
)
(set! s5-1 (+ (-> self clock frame-counter) (rand-vu-int-range (seconds 0.05) (seconds 0.15))))
)
(let ((a1-10 (new 'stack-no-clear 'vector)))
(set! (-> a1-10 quad) (-> self root trans quad))
(set! (-> a1-10 y) (+ 59592.703 (-> self base-y)))
(spawn (-> self part) a1-10)
)
(suspend)
)
)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 1))
(suspend)
)
(if (= (-> gp-0 cam-ret-mode) 'instant)
(persist-with-delay *setting-control* 'interp-time (seconds 0.05) 'interp-time 'abs 0.0 0)
)
(set-setting! 'string-startup-vector 'abs (-> gp-0 cam-ret-dir) 0)
(remove-setting! 'entity-name)
(when (!= (-> gp-0 cam-ret-mode) 'instant)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 1))
(suspend)
)
)
)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1))
(suspend)
)
(remove-setting! 'string-startup-vector)
(until (process-release? *target*)
(suspend)
)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 4))
(suspend)
)
(go-virtual idle)
(none)
)
:post (the-as (function none :behavior dig-log) transform-post)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! dig-log ((obj dig-log) (arg0 entity-actor))
(local-vars (r0-0 uint128) (a0-11 object) (a1-8 uint128) (sv-16 int))
(set! (-> obj hud-handle) (the-as handle #f))
(let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
(set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> s3-0 prim-core action) (collide-action solid))
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 29696.0 0.0 45056.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) s3-0)
)
(pusher-init s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-12 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(set! (-> obj base-y) (-> obj root trans y))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-dig-log" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj pressed-count) 0)
(set! (-> obj total-buttons) 0)
(set! sv-16 0)
(let ((v1-19
(res-lump-data
(-> obj entity)
'actor-groups
(pointer actor-group)
:tag-ptr (the-as (pointer res-tag) (& sv-16))
)
)
)
(when (and v1-19 (begin
(let ((a0-12 #t))
(let ((a1-7 (the-as uint128 sv-16)))
(.pcpyud a1-8 a1-7 r0-0)
)
(let ((a1-10 (the-as int (shr (* (the-as int a1-8) 2) 49))))
(cmove-#f-zero a0-11 a1-10 a0-12)
)
)
a0-11
)
)
(let ((s5-2 (-> v1-19 0)))
(countdown (s4-2 (-> s5-2 length))
(let ((s3-1 (-> s5-2 data s4-2 actor)))
(when s3-1
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector s3-1) 0)
(+! (-> obj total-buttons) 1)
(if (logtest? (-> s3-1 extra perm status) (entity-perm-status subtask-complete))
(+! (-> obj pressed-count) 1)
)
)
)
)
)
)
)
(if (task-node-closed? (game-task-node dig-find-totem-raise-log))
(set! (-> obj pressed-count) (-> obj total-buttons))
)
(set! (-> obj root trans y)
(+ (-> (&-> *dig-log-heights* 0 data (- (-> obj total-buttons) (-> obj pressed-count))) 0) (-> obj base-y))
)
(transform-post)
(when (!= (-> obj pressed-count) (-> obj total-buttons))
(set! (-> *game-info* counter) (the float (- (-> obj total-buttons) (-> obj pressed-count))))
(if (string= (-> *game-info* last-continue name) "dig3b-back-room")
(dig-log-method-22 obj #t)
)
)
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 1145) obj))
(set! (-> obj event-hook) dig-log-event-handler)
(go (method-of-object obj idle))
(none)
)
(deftype dig-button (process-drawable)
((down-y float :offset-assert 200)
)
:heap-base #x50
:method-count-assert 23
:size-assert #xcc
:flag-assert #x17005000cc
(:methods
(idle-up () _type_ :state 20)
(going-down () _type_ :state 21)
(idle-down () _type_ :state 22)
)
)
(defskelgroup skel-dig-button dig-button 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 3))
(defmethod run-logic? dig-button ((obj dig-button))
#t
)
(defstate idle-up (dig-button)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(the-as
object
(case event-type
(('attack)
(when (logtest? (-> (the-as attack-info (-> event param 1)) penetrate-using) (penetrate flop))
(go-virtual going-down)
#f
)
)
)
)
)
:code (behavior ()
(transform-post)
(suspend)
(transform-post)
(sleep-code)
(none)
)
)
(defstate going-down (dig-button)
:virtual #t
:code (behavior ()
(sound-play "dig-button")
(until (= (-> self root trans y) (-> self down-y))
(seek! (-> self root trans y) (-> self down-y) (* 16384.0 (-> self clock seconds-per-frame)))
(logior! (-> self skel status) (joint-control-status sync-math))
(transform-post)
(logclear! (-> self skel status) (joint-control-status sync-math))
(suspend)
)
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((gp-1 (res-lump-struct (-> self entity) 'on-activate structure)))
(if gp-1
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
(the-as pair gp-1)
)
)
)
(go-virtual idle-down)
(none)
)
)
(defstate idle-down (dig-button)
:virtual #t
:code (behavior ()
(set! (-> self root trans y) (-> self down-y))
(transform-post)
(suspend)
(transform-post)
(sleep-code)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! dig-button ((obj dig-button) (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 bot 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 0.0 0.0 12288.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-2)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-5 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-dig-button" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj down-y) (+ -2048.0 (-> obj root trans y)))
(if (task-node-closed? (game-task-node dig-find-totem-raise-log))
(process-entity-status! obj (entity-perm-status subtask-complete) #t)
)
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
(go (method-of-object obj idle-down))
(go (method-of-object obj idle-up))
)
(none)
)
(defmethod draw hud-dig-button ((obj hud-dig-button))
(set-hud-piece-position!
(the-as hud-sprite (-> obj sprites))
(the int (+ 487.0 (* 130.0 (-> obj offset))))
210
)
(format (clear (-> obj strings 0 text)) "~D" (-> obj values 0 current))
(set-as-offset-from! (the-as hud-sprite (-> obj strings 0 pos)) (the-as vector4w (-> obj sprites)) -16 20)
((method-of-type hud draw) obj)
0
(none)
)
(defmethod update-values hud-dig-button ((obj hud-dig-button))
(set! (-> obj values 0 target) (the int (-> *game-info* counter)))
((method-of-type hud update-values) obj)
0
(none)
)
(defmethod init-callback hud-dig-button ((obj hud-dig-button))
(set! (-> obj level) (level-get *level* 'dig3a))
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :page #xd21)))
(set! (-> obj gui-id)
(add-process *gui-control* obj (gui-channel hud-middle-right) (gui-action hidden) (-> obj name) 81920.0 0)
)
(logior! (-> obj flags) (hud-flags show))
(set! (-> obj sprites 0 flags) (the-as uint 4))
(set! (-> obj sprites 0 scale-x) 1.0)
(set! (-> obj sprites 0 scale-y) 1.0)
(alloc-string-if-needed obj 0)
(set! (-> obj strings 0 scale) 0.6)
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
0
(none)
)
(defun dig3-login ()
(set! *nav-network* (new 'loading-level 'nav-network))
0
(none)
)
(defun dig3-activate ()
(setup-user-array (-> *part-id-table* 1309) "grenadier-grenade-part")
(setup-user-array (-> *part-id-table* 638) "grenadier-grenade-part")
(setup-user-array (-> *part-id-table* 639) "grenadier-grenade-part")
0
(none)
)
(defun dig3-deactivate ()
(set! *nav-network* (the-as nav-network 0))
0
(none)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -7,3 +7,575 @@
;; DECOMP BEGINS
(deftype fort-elec-switch (process-drawable)
((root-override collide-shape :offset 128)
(l-bolt lightning-control :offset-assert 200)
(notify-actor entity-actor :offset-assert 204)
(tank-actor entity-actor :offset-assert 208)
(switch-group (pointer actor-group) :offset-assert 212)
(switch-group-count int32 :offset-assert 216)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xdc
:flag-assert #x17006000dc
(:methods
(idle () _type_ :state 20)
(play-hint () _type_ :state 21)
(die () _type_ :state 22)
)
)
(defskelgroup skel-fort-elec-switch fort-elec-switch 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 2 0 3)
)
(defstate idle (fort-elec-switch)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('attack)
(go-virtual die)
'push
)
(('hint)
(go-virtual play-hint)
)
)
)
:code (the-as (function none :behavior fort-elec-switch) sleep-code)
)
(defstate play-hint (fort-elec-switch)
:virtual #t
:event (-> (method-of-type fort-elec-switch idle) event)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 16))
(suspend)
)
)
(until (logtest? (-> self draw status) (draw-control-status on-screen))
(suspend)
)
(let ((gp-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 0.4))
(suspend)
)
)
(talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f))
(sleep-code)
(none)
)
:post (-> (method-of-type fort-elec-switch idle) post)
)
(defstate die (fort-elec-switch)
:virtual #t
:enter (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((v1-0 (-> self l-bolt))
(v0-1 3)
)
(let ((a0-2 (!= v0-1 (-> v1-0 state mode))))
(case v0-1
((3)
(if a0-2
(set! (-> v1-0 state counter) 0.0)
)
)
((1)
(set! (-> v1-0 state start-color) (-> v1-0 spec start-color))
(set! (-> v1-0 state end-color) (-> v1-0 spec end-color))
)
)
)
(set! (-> v1-0 state mode) (the-as lightning-mode v0-1))
)
(none)
)
:code (behavior ()
(let ((v1-1 (-> self root-override root-prim)))
(set! (-> v1-1 prim-core collide-as) (collide-spec))
(set! (-> v1-1 prim-core collide-with) (collide-spec))
)
0
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> self root-override trans quad))
(set! (-> gp-0 y) (+ 8192.0 (-> gp-0 y)))
(let ((s5-0 (get-process *default-dead-pool* part-tracker #x4000)))
(when s5-0
(let ((t9-1 (method-of-type part-tracker activate)))
(t9-1
(the-as part-tracker s5-0)
*entity-pool*
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(let ((t9-2 run-function-in-process)
(a0-6 s5-0)
(a1-2 part-tracker-init)
(a2-4 (-> *part-group-id-table* 125))
(a3-1 0)
(t0-0 #f)
(t1-0 #f)
(t2-0 #f)
(t3-0 *launch-matrix*)
)
(set! (-> t3-0 trans quad) (-> gp-0 quad))
((the-as (function object object object object object object object object none) t9-2)
a0-6
a1-2
a2-4
a3-1
t0-0
t1-0
t2-0
t3-0
)
)
(-> s5-0 ppointer)
)
)
)
(sound-play "elec-switch")
(let ((gp-2 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 0.5))
(suspend)
)
)
(let ((v1-22 #t))
(when (-> self switch-group)
(dotimes (a0-11 (-> self switch-group-count))
(let ((a1-6 (-> self switch-group a0-11)))
(dotimes (a2-7 (-> a1-6 length))
(if (not (logtest? (-> a1-6 data a2-7 actor extra perm status) (entity-perm-status subtask-complete)))
(set! v1-22 #f)
)
)
)
)
)
(when v1-22
(set-setting! 'entity-name "camera-180" 0 0)
(set-setting! 'process-mask 'set 0 (process-mask movie enemy))
(process-grab? *target* #f)
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer self))
(set! (-> a1-13 num-params) 0)
(set! (-> a1-13 message) 'fire-suppress-on)
(let ((t9-8 send-event-function)
(v1-30 (-> self tank-actor))
)
(t9-8
(if v1-30
(-> v1-30 extra process)
)
a1-13
)
)
)
(let ((gp-3 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-3) (seconds 0.75))
(suspend)
)
)
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-14 from) (process->ppointer self))
(set! (-> a1-14 num-params) 0)
(set! (-> a1-14 message) 'shutdown)
(let ((t9-9 send-event-function)
(v1-40 (-> self notify-actor))
)
(t9-9
(if v1-40
(-> v1-40 extra process)
)
a1-14
)
)
)
(let ((gp-4 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-4) (seconds 1.5))
(suspend)
)
)
(remove-setting! 'entity-name)
(remove-setting! 'process-mask)
(process-release? *target*)
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-17 from) (process->ppointer self))
(set! (-> a1-17 num-params) 0)
(set! (-> a1-17 message) 'fire-suppress-off)
(let ((t9-13 send-event-function)
(v1-54 (-> self tank-actor))
)
(t9-13
(if v1-54
(-> v1-54 extra process)
)
a1-17
)
)
)
)
)
(cleanup-for-death self)
(none)
)
)
;; WARN: Return type mismatch process-drawable vs fort-elec-switch.
(defmethod relocate fort-elec-switch ((obj fort-elec-switch) (arg0 int))
(if (nonzero? (-> obj l-bolt))
(&+! (-> obj l-bolt) arg0)
)
(the-as fort-elec-switch ((method-of-type process-drawable relocate) obj arg0))
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-elec-switch ((obj fort-elec-switch) (arg0 entity-actor))
(local-vars (sv-16 res-tag))
(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 bot 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 8192.0 0.0 12288.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-fort-elec-switch" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj notify-actor) (entity-actor-lookup arg0 'alt-actor 0))
(set! (-> obj tank-actor) (entity-actor-lookup arg0 'alt-actor 1))
(set! sv-16 (new 'static 'res-tag))
(let ((v1-11 (res-lump-data (-> obj entity) 'actor-groups pointer :tag-ptr (& sv-16))))
(cond
((and v1-11 (nonzero? (-> sv-16 elt-count)))
(set! (-> obj switch-group) (the-as (pointer actor-group) v1-11))
(set! (-> obj switch-group-count) (the-as int (-> sv-16 elt-count)))
)
(else
(set! (-> obj switch-group) (the-as (pointer actor-group) #f))
(set! (-> obj switch-group-count) 0)
0
)
)
)
(let ((a0-18 (-> obj skel root-channel 0)))
(set! (-> a0-18 frame-group) (the-as art-joint-anim (-> obj draw art-group data 2)))
(set! (-> a0-18 frame-num) 0.0)
(joint-control-channel-group! a0-18 (the-as art-joint-anim (-> obj draw art-group data 2)) num-func-identity)
)
(transform-post)
(let ((a2-8 (new 'static 'lightning-spec
:name #f
:flags (lightning-spec-flags lsf2)
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture (new 'static 'texture-id :index #x83 :page #xc)
:reduction 0.42
:num-points 8
:box-size 3072.0
:merge-factor 0.5
:merge-count 2
:radius 3072.0
:duration -1.0
:sound #f
)
)
)
(set! (-> obj l-bolt) (new 'process 'lightning-control a2-8 obj 0.0))
)
(let ((a0-20 (new 'stack-no-clear 'vector))
(v1-26 (new 'stack-no-clear 'vector))
)
(set! (-> a0-20 quad) (-> obj root-override trans quad))
(set! (-> v1-26 quad) (-> obj root-override trans quad))
(set! (-> a0-20 y) (+ 4915.2 (-> a0-20 y)))
(set! (-> v1-26 y) (+ 17203.2 (-> v1-26 y)))
(set! (-> obj l-bolt state meet data 0 quad) (-> a0-20 quad))
(let ((a0-22 (-> obj l-bolt)))
(set! (-> a0-22 state meet data (+ (-> a0-22 state points-to-draw) -1) quad) (-> v1-26 quad))
)
)
(go (method-of-object obj idle))
(none)
)
(deftype fort-fence (process-drawable)
((root-override collide-shape :offset 128)
(anim spool-anim :offset-assert 200)
(exit-anim basic :offset-assert 204)
(loading? symbol :offset-assert 208)
(tank handle :offset-assert 216)
)
:heap-base #x60
:method-count-assert 24
:size-assert #xe0
:flag-assert #x18006000e0
(:methods
(idle () _type_ :state 20)
(breaking () _type_ :state 21)
(fort-fence-method-22 (_type_) none 22)
(fort-fence-method-23 (_type_) none 23)
)
)
(defskelgroup skel-fort-fence-a fort-fence 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 5.6 0 16))
(defskelgroup skel-fort-fence-b fort-fence 5 7 ((6 (meters 999999))) :bounds (static-spherem 0 11 0 18))
(defmethod fort-fence-method-22 fort-fence ((obj fort-fence))
0
(none)
)
(defmethod fort-fence-method-23 fort-fence ((obj fort-fence))
0
(none)
)
(defstate idle (fort-fence)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('break)
(go-virtual breaking)
)
(('start-loading)
(set! (-> self tank) (process->handle proc))
(let ((v0-0 (the-as object #t)))
(set! (-> self loading?) (the-as symbol v0-0))
v0-0
)
)
)
)
:trans (behavior ()
(when (-> self loading?)
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) (process->ppointer self))
(set! (-> a1-0 num-params) 0)
(set! (-> a1-0 message) 'trans)
(let ((a1-1 (send-event-function (handle->process (-> self tank)) a1-0)))
(when a1-1
(let ((f0-0 (vector-vector-distance (-> self root-override trans) (the-as vector a1-1))))
(gui-control-method-12
*gui-control*
self
(gui-channel art-load)
(gui-action queue)
(-> self anim name)
0
(lerp-scale 1.0 100.0 f0-0 163840.0 327680.0)
(new 'static 'sound-id)
)
)
)
)
)
)
(none)
)
:code (the-as (function none :behavior fort-fence) sleep-code)
)
(defstate breaking (fort-fence)
:virtual #t
:enter (behavior ()
(set! (-> self draw bounds w) 327680.0)
(let* ((a0-0 (the-as collide-shape-prim-group (-> self root-override root-prim)))
(v1-4 (-> a0-0 child 0))
)
(let ((a0-2 (-> a0-0 child 1)))
(set! (-> a0-2 prim-core collide-as) (-> v1-4 prim-core collide-as))
)
(set! (-> v1-4 prim-core collide-as) (collide-spec))
)
0
(none)
)
:exit (behavior ()
(let ((a0-0 (-> self anim)))
(when (and a0-0 (= (-> *setting-control* user-current spooling) (process->ppointer self)))
(ja-abort-spooled-anim a0-0 (the-as art-joint-anim #f) -1)
(ja-channel-set! 1)
(ja :group! (-> self exit-anim) :num! min)
)
)
(none)
)
:code (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(ja-play-spooled-anim
(-> self anim)
(ja-group)
(the-as art-joint-anim (-> self exit-anim))
(the-as (function process-drawable symbol) false-func)
)
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
(none)
)
:post (the-as (function none :behavior fort-fence) transform-post)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-fence ((obj fort-fence) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(fort-fence-method-23 obj)
(process-drawable-from-entity! obj arg0)
(fort-fence-method-22 obj)
(process-entity-status! obj (entity-perm-status no-kill) #t)
(set! (-> obj loading?) #f)
(let ((a0-6 (-> obj skel root-channel 0)))
(set! (-> a0-6 frame-group) (if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
num-func-identity
)
)
(transform-post)
(go (method-of-object obj idle))
(none)
)
(deftype fort-fence-a (fort-fence)
()
:heap-base #x60
:method-count-assert 24
:size-assert #xe0
:flag-assert #x18006000e0
)
(deftype fort-fence-b (fort-fence)
()
:heap-base #x60
:method-count-assert 24
:size-assert #xe0
:flag-assert #x18006000e0
)
(defmethod fort-fence-method-22 fort-fence-a ((obj fort-fence-a))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-fence-a" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj anim)
(new 'static 'spool-anim :name "fort-fence-a" :anim-name "a-break" :parts 2 :command-list '())
)
(set! (-> obj exit-anim) (-> obj draw art-group data 3))
0
(none)
)
(defmethod fort-fence-method-22 fort-fence-b ((obj fort-fence-b))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-fence-b" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj anim)
(new 'static 'spool-anim :name "fort-fence-b" :anim-name "b-break" :parts 2 :command-list '())
)
(set! (-> obj exit-anim) (-> obj draw art-group data 8))
0
(none)
)
(defmethod fort-fence-method-23 fort-fence-a ((obj fort-fence-a))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 22937.6 0.0 65536.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 3)
(set-vector! (-> v1-7 local-sphere) 0.0 22937.6 0.0 65536.0)
)
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core action) (collide-action solid))
(set! (-> v1-9 transform-index) 3)
(set-vector! (-> v1-9 local-sphere) 0.0 22937.6 0.0 65536.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-12 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
(defmethod fort-fence-method-23 fort-fence-b ((obj fort-fence-b))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 22937.6 0.0 65536.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 13)
(set-vector! (-> v1-7 local-sphere) 0.0 -16384.0 0.0 73728.0)
)
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core action) (collide-action solid))
(set! (-> v1-9 transform-index) 13)
(set-vector! (-> v1-9 local-sphere) 0.0 -16384.0 0.0 73728.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-12 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
@@ -5,5 +5,9 @@
;; name in dgo: fordumpa-texture
;; dgos: FORDUMPC, FDA
;; TODO - temporary stub
(defun set-roboscreen-alpha! ((arg0 float))
(none))
;; DECOMP BEGINS
@@ -7,3 +7,433 @@
;; DECOMP BEGINS
(deftype fort-plat-orbit (process-drawable)
((sync sync-linear :inline :offset-assert 200)
)
:heap-base #x60
:method-count-assert 21
:size-assert #xd8
:flag-assert #x15006000d8
(:methods
(idle () _type_ :state 20)
)
)
(defskelgroup skel-fort-plat-orbit fort-plat-orbit 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 16 0 22)
)
(defstate idle (fort-plat-orbit)
:virtual #t
:trans (the-as (function none :behavior fort-plat-orbit) rider-trans)
:code (behavior ()
(until #f
(let ((f30-0 (the float (ja-num-frames 0))))
(cond
((logtest? (actor-option user17) (-> self fact options))
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 num-func) num-func-identity)
(let ((f0-4 (+ (- 0.5 (* (get-current-phase-no-mod (-> self sync)) f30-0)) f30-0)))
(set! (-> gp-0 frame-num) (- f0-4 (* (the float (the int (/ f0-4 f30-0))) f30-0)))
)
)
)
(else
(ja :num-func num-func-identity :frame-num (* (get-current-phase-no-mod (-> self sync)) f30-0))
)
)
)
(update! (-> self sound))
(suspend)
)
#f
(none)
)
:post (the-as (function none :behavior fort-plat-orbit) rider-post)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-plat-orbit ((obj fort-plat-orbit) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0)))
(set! (-> s4-0 total-prims) (the-as uint 6))
(set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher))
(set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> s3-0 prim-core action) (collide-action solid rideable))
(set-vector! (-> s3-0 local-sphere) 0.0 65536.0 0.0 90112.0)
(set! (-> s4-0 root-prim) s3-0)
)
(pusher-init s4-0)
(let ((v1-14 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-14 prim-core action) (collide-action solid rideable))
(set! (-> v1-14 transform-index) 5)
(set-vector! (-> v1-14 local-sphere) 0.0 0.0 -16384.0 36864.0)
)
(let ((v1-16 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-16 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-16 prim-core action) (collide-action solid rideable))
(set! (-> v1-16 transform-index) 6)
(set-vector! (-> v1-16 local-sphere) -16384.0 0.0 0.0 36864.0)
)
(let ((v1-18 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-18 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-18 prim-core action) (collide-action solid rideable))
(set! (-> v1-18 transform-index) 7)
(set-vector! (-> v1-18 local-sphere) 0.0 0.0 16384.0 36864.0)
)
(let ((v1-20 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-20 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-20 prim-core action) (collide-action solid rideable))
(set! (-> v1-20 transform-index) 8)
(set-vector! (-> v1-20 local-sphere) 16384.0 0.0 0.0 36864.0)
)
(let ((v1-22 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-22 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-22 prim-core action) (collide-action solid rideable))
(set! (-> v1-22 transform-index) 4)
(set-vector! (-> v1-22 local-sphere) 0.0 36864.0 0.0 49152.0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-25 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-25 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-25 prim-core collide-with))
)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-plat-orbit" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj fact)
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
)
(let ((a1-23 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-34 0))
(if #t
(set! v1-34 (logior v1-34 1))
)
(set! (-> a1-23 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-23 sync-flags) (the-as sync-flags v1-34))
)
(set! (-> a1-23 entity) (-> obj entity))
(set! (-> a1-23 period) (the-as uint 6000))
(set! (-> a1-23 percent) 0.0)
(initialize! (-> obj sync) a1-23)
)
(let ((a0-48 (-> obj skel root-channel 0)))
(set! (-> a0-48 frame-group) (the-as art-joint-anim (-> obj draw art-group data 2)))
(set! (-> a0-48 frame-num) 0.0)
(joint-control-channel-group! a0-48 (the-as art-joint-anim (-> obj draw art-group data 2)) num-func-identity)
)
(transform-post)
(set! (-> obj sound)
(new 'process 'ambient-sound (static-sound-spec "plat-orbit" :fo-max 70) (-> obj root trans))
)
(go (method-of-object obj idle))
(none)
)
(deftype fort-plat-shuttle-plat (process-drawable)
((path-pos float :offset-assert 200)
(path-speed float :offset-assert 204)
)
:heap-base #x50
:method-count-assert 21
:size-assert #xd0
:flag-assert #x15005000d0
(:methods
(idle () _type_ :state 20)
)
)
(defskelgroup skel-fort-plat-shuttle fort-plat-shuttle 0 3
((1 (meters 999999)))
:bounds (static-spherem 0 -0.5 0 7.6)
)
(defstate idle (fort-plat-shuttle-plat)
:virtual #t
:trans (the-as (function none :behavior fort-plat-shuttle-plat) rider-trans)
:code (behavior ()
(until (< 1.0 (-> self path-pos))
(suspend)
)
(cleanup-for-death self)
(none)
)
:post (behavior ()
(+! (-> self path-pos) (* (-> self path-speed) (-> self clock seconds-per-frame)))
(let* ((f0-2 (-> self path-pos))
(f30-0 (if (< 0.5 f0-2)
(- 1.0 f0-2)
f0-2
)
)
(f0-4 (total-distance (-> self path)))
(f0-6 (fmin 40960.0 (* f30-0 f0-4)))
(f0-7 (lerp-scale 0.0 1.0 f0-6 0.0 40960.0))
)
(set-vector! (-> self draw color-mult) f0-7 f0-7 f0-7 1.0)
)
(get-point-in-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp)
(update-trans! (-> self sound) (-> self root trans))
(update! (-> self sound))
(rider-post)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defbehavior fort-plat-shuttle-plat-init-by-other fort-plat-shuttle-plat ((arg0 float))
(rlet ((vf0 :class vf))
(init-vf0-vector)
(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 bot 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 -2048.0 0.0 31129.6)
(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)
)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-plat-shuttle" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> self path) (new 'process 'path-control self 'path 0.0 (the-as entity #f) #f))
(set! (-> self path-pos) arg0)
(get-point-in-path! (-> self path) (-> self root trans) arg0 'interp)
(set! (-> self path-speed) (/ 24576.0 (total-distance (-> self path))))
(.svf (&-> (-> self draw color-mult) quad) vf0)
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self draw light-index) (the-as uint 1))
(set! (-> self sound)
(new 'process 'ambient-sound (static-sound-spec "plat-shuttle" :fo-max 70) (-> self root trans))
)
(go-virtual idle)
(none)
)
)
(deftype fort-plat-shuttle (process-drawable)
((next-spawn-time time-frame :offset-assert 200)
(sync sync-linear :inline :offset-assert 208)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xe0
:flag-assert #x17006000e0
(:methods
(dormant () _type_ :state 20)
(idle () _type_ :state 21)
(fort-plat-shuttle-method-22 (_type_) symbol 22)
)
)
(defstate dormant (fort-plat-shuttle)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('trigger)
(go-virtual idle)
)
)
)
:code (the-as (function none :behavior fort-plat-shuttle) sleep-code)
)
(defstate idle (fort-plat-shuttle)
:virtual #t
:enter (behavior ()
(fort-plat-shuttle-method-22 self)
(set! (-> self next-spawn-time) (get-timeframe-offset! (-> self sync) 0))
(none)
)
:trans (behavior ()
(when (>= (-> self clock frame-counter) (-> self next-spawn-time))
(process-spawn fort-plat-shuttle-plat 0 :to self)
(set! (-> self next-spawn-time) (get-timeframe-offset! (-> self sync) 0))
)
(none)
)
:code (the-as (function none :behavior fort-plat-shuttle) sleep-code)
)
(defmethod fort-plat-shuttle-method-22 fort-plat-shuttle ((obj fort-plat-shuttle))
(with-pp
(let* ((f28-0 (total-distance (-> obj path)))
(s5-0 (-> obj sync))
(f26-0 81.92)
(a0-3 (- (-> pp clock frame-counter) (get-timeframe-offset! s5-0 0)))
(v1-6 (-> s5-0 period))
(f30-0 (/ (* f26-0 (the float a0-3)) f28-0))
(f28-1 (/ (* f26-0 (the float v1-6)) f28-0))
)
(while (>= 1.0 f30-0)
(if (>= f30-0 0.0)
(process-spawn fort-plat-shuttle-plat f30-0 :to obj)
)
(+! f30-0 f28-1)
)
)
#f
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-plat-shuttle ((obj fort-plat-shuttle) (arg0 entity-actor))
(local-vars (sv-64 int))
(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-fort-plat-shuttle" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj fact)
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
)
(let ((s4-1 (new 'stack-no-clear 'sync-info-params)))
(let ((s3-1 1200))
0.0
(set! sv-64 0)
(let ((v1-7 (res-lump-data arg0 'sync (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-64)))))
(when v1-7
(set! s3-1 (the int (* 300.0 (-> v1-7 0))))
(-> v1-7 1)
)
)
(let ((v1-8 0))
(if #t
(set! v1-8 (logior v1-8 1))
)
(set! (-> s4-1 sync-type) (the-as basic 'sync-linear))
(set! (-> s4-1 sync-flags) (the-as sync-flags v1-8))
)
(set! (-> s4-1 entity) arg0)
(set! (-> s4-1 period) (the-as uint s3-1))
)
(set! (-> s4-1 percent) 0.0)
(initialize! (-> obj sync) s4-1)
)
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0 (the-as entity #f) #f))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(logclear! (-> obj mask) (process-mask actor-pause))
(if (logtest? (actor-option user17) (-> obj fact options))
(go (method-of-object obj dormant))
(go (method-of-object obj idle))
)
(none)
)
(deftype fort-conveyor (conveyor)
()
:heap-base #x80
:method-count-assert 28
:size-assert #x100
:flag-assert #x1c00800100
)
(defskelgroup skel-fort-conveyor fort-conveyor 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 36))
(defmethod get-art-group fort-conveyor ((obj fort-conveyor))
"@returns The respective [[art-group]] for the [[conveyor]]"
(art-group-get-by-name *level* "skel-fort-conveyor" (the-as (pointer uint32) #f))
)
;; WARN: Return type mismatch collide-shape-moving vs none.
(defmethod reset-root! fort-conveyor ((obj fort-conveyor))
"Re-initializes the `root` [[trsqv]]"
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(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 pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 69632.0 90112.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-15 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-15 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-15 prim-core collide-with))
)
(set! (-> s5-0 rider-max-momentum) 8192.0)
(set! (-> obj root) s5-0)
)
(none)
)
;; WARN: Return type mismatch vector vs none.
(defmethod init! fort-conveyor ((obj fort-conveyor))
"Initializes defaults for things like the `speed` and `belt-radius`"
(set! (-> obj belt-radius) 24576.0)
(set! (-> obj pull-y-threshold) 16384.0)
(cond
((name= (-> obj name) "fort-conveyor-2")
(set! (-> obj speed) -21299.2)
(set-vector! (-> obj root scale) 1.0 1.0 0.9 1.0)
)
((name= (-> obj name) "fort-conveyor-3")
(set! (-> obj speed) -18432.0)
(set-vector! (-> obj root scale) 1.0 1.0 0.79 1.0)
)
)
(none)
)
(defmethod set-and-get-ambient-sound! fort-conveyor ((obj fort-conveyor))
"So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]]
and return it as well. Otherwise, set it to `0`"
(let* ((s5-0 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) 0.0 'interp))
(v1-2 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) 1.0 'interp))
(a3-3 (vector+! (new 'stack-no-clear 'vector) s5-0 v1-2))
)
(vector-float*! a3-3 a3-3 0.5)
(let ((v0-2 (new 'process 'ambient-sound (static-sound-spec "fort-conveyor" :fo-max 50) a3-3)))
(set! (-> obj sound) v0-2)
v0-2
)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -117,7 +117,7 @@
(lambda :behavior hide-light
()
(let ((v0-0 (-> self node-list data)))
(set! (-> v0-0 0 param0) (the-as (function cspace matrix none) cspace<-parent-joint!))
(set! (-> v0-0 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!))
(set! (-> v0-0 0 param1) (the-as basic (-> self parent)))
(set! (-> v0-0 0 param2) (the-as basic 12))
v0-0
+1 -1
View File
@@ -1102,7 +1102,7 @@
(local-vars (sv-16 res-tag))
(when (coin-flip? obj)
(let ((a0-2 (-> obj node-list data 2)))
(set! (-> a0-2 param0) (the-as (function cspace matrix none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param1) #f)
(set! (-> a0-2 param2) #f)
)
+8 -8
View File
@@ -248,7 +248,7 @@
(set! (-> v0-0 angle) 0.0)
(set-vector! (-> v0-0 last-position) 0.0 0.0 0.0 1.0)
(let ((a0-3 (-> arg0 node-list data arg1)))
(set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-wheel-callback))
(set! (-> a0-3 param0) joint-mod-wheel-callback)
(set! (-> a0-3 param1) v0-0)
)
v0-0
@@ -331,7 +331,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-local-callback))
(set! (-> a0-8 param0) joint-mod-set-local-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -408,7 +408,7 @@
(quaternion-copy! (-> gp-0 transform quat) *unity-quaternion*)
(set! (-> gp-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-7 (-> arg0 node-list data arg1)))
(set! (-> a0-7 param0) (the-as (function cspace matrix none) joint-mod-add-local-callback))
(set! (-> a0-7 param0) joint-mod-add-local-callback)
(set! (-> a0-7 param1) gp-0)
)
gp-0
@@ -464,7 +464,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-world-callback))
(set! (-> a0-8 param0) joint-mod-set-world-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -537,7 +537,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-local-callback))
(set! (-> a0-8 param0) joint-mod-blend-local-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -604,7 +604,7 @@
(set! (-> v0-0 enable) #t)
(set! (-> v0-0 angle) 0.0)
(let ((a0-3 (-> arg0 node-list data arg1)))
(set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-spinner-callback))
(set! (-> a0-3 param0) joint-mod-spinner-callback)
(set! (-> a0-3 param1) v0-0)
)
v0-0
@@ -734,7 +734,7 @@
(set! (-> v0-0 transform quat quad) (-> *null-vector* quad))
(set! (-> v0-0 transform scale quad) (-> *identity-vector* quad))
(let ((a0-8 (-> arg0 node-list data arg1)))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-world-callback))
(set! (-> a0-8 param0) joint-mod-blend-world-callback)
(set! (-> a0-8 param1) v0-0)
)
v0-0
@@ -785,7 +785,7 @@
(set! (-> gp-0 enable) arg2)
(quaternion-set! (-> gp-0 rotation) 0.0 0.0 0.0 1.0)
(let ((a0-3 (-> arg0 node-list data arg1)))
(set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-rotate-local-callback))
(set! (-> a0-3 param0) joint-mod-rotate-local-callback)
(set! (-> a0-3 param1) gp-0)
)
gp-0
+12 -15
View File
@@ -297,7 +297,7 @@
(set! (-> v0-0 blend) 0.0)
(logclear! (-> v0-0 flags) (joint-mod-ik-flags enable))
(let ((a0-5 (-> arg0 node-list data arg1)))
(set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-ik-callback))
(set! (-> a0-5 param0) joint-mod-ik-callback)
(set! (-> a0-5 param1) v0-0)
(set! (-> a0-5 param2) (the-as basic arg1))
)
@@ -604,13 +604,13 @@
)
(((joint-mod-mode look-at))
(let ((a0-4 v1-0))
(set! (-> a0-4 param0) (the-as (function cspace matrix none) joint-mod-look-at-handler))
(set! (-> a0-4 param0) joint-mod-look-at-handler)
(set! (-> a0-4 param1) obj)
)
)
(((joint-mod-mode gun-look-at))
(let ((a0-5 v1-0))
(set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-gun-look-at-handler))
(set! (-> a0-5 param0) joint-mod-gun-look-at-handler)
(set! (-> a0-5 param1) obj)
)
)
@@ -618,23 +618,20 @@
(set-vector! (-> obj twist) 0.0 1.0 0.0 1.0)
(let ((a0-7 v1-0))
(set! (-> a0-7 param0)
(the-as
(function cspace matrix none)
(lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none))
)
(lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none))
)
(set! (-> a0-7 param1) obj)
)
)
(((joint-mod-mode world-look-at))
(let ((a0-8 v1-0))
(set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-world-look-at-handler))
(set! (-> a0-8 param0) joint-mod-world-look-at-handler)
(set! (-> a0-8 param1) obj)
)
)
(((joint-mod-mode polar-look-at))
(let ((a0-9 v1-0))
(set! (-> a0-9 param0) (the-as (function cspace matrix none) joint-mod-polar-look-at-handler))
(set! (-> a0-9 param0) joint-mod-polar-look-at-handler)
(set! (-> a0-9 param1) obj)
)
(set! (-> obj polar-internal-tilt-max) 32768.0)
@@ -644,21 +641,21 @@
)
(((joint-mod-mode rotate))
(let ((a0-11 v1-0))
(set! (-> a0-11 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler))
(set! (-> a0-11 param0) joint-mod-rotate-handler)
(set! (-> a0-11 param1) obj)
)
(set! (-> obj blend) 1.0)
)
(((joint-mod-mode rotate2))
(let ((a0-13 v1-0))
(set! (-> a0-13 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler))
(set! (-> a0-13 param0) joint-mod-rotate-handler)
(set! (-> a0-13 param1) obj)
)
(set! (-> obj blend) 1.0)
)
(((joint-mod-mode joint-set))
(let ((a0-15 v1-0))
(set! (-> a0-15 param0) (the-as (function cspace matrix none) joint-mod-joint-set-handler))
(set! (-> a0-15 param0) joint-mod-joint-set-handler)
(set! (-> a0-15 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -667,7 +664,7 @@
)
(((joint-mod-mode joint-set-world))
(let ((a0-18 v1-0))
(set! (-> a0-18 param0) (the-as (function cspace matrix none) joint-mod-joint-set-world-handler))
(set! (-> a0-18 param0) joint-mod-joint-set-world-handler)
(set! (-> a0-18 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -677,7 +674,7 @@
)
(((joint-mod-mode joint-set*))
(let ((a0-25 v1-0))
(set! (-> a0-25 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-handler))
(set! (-> a0-25 param0) joint-mod-joint-set*-handler)
(set! (-> a0-25 param1) obj)
)
(vector-reset! (-> obj trans))
@@ -686,7 +683,7 @@
)
(((joint-mod-mode joint-set*-world))
(let ((a0-29 v1-0))
(set! (-> a0-29 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-world-handler))
(set! (-> a0-29 param0) joint-mod-joint-set*-world-handler)
(set! (-> a0-29 param1) obj)
)
(vector-reset! (-> obj trans))
+8 -8
View File
@@ -108,14 +108,14 @@
;; definition of type cspace
(deftype cspace (structure)
((parent cspace :offset-assert 0)
(joint joint :offset-assert 4)
(joint-num int16 :offset-assert 8)
(geo drawable :offset-assert 12)
(bone bone :offset-assert 16)
(param0 (function cspace matrix none) :offset-assert 20)
(param1 basic :offset-assert 24)
(param2 basic :offset-assert 28)
((parent cspace :offset-assert 0)
(joint joint :offset-assert 4)
(joint-num int16 :offset-assert 8)
(geo drawable :offset-assert 12)
(bone bone :offset-assert 16)
(param0 (function cspace transformq none) :offset-assert 20)
(param1 basic :offset-assert 24)
(param2 basic :offset-assert 28)
)
:method-count-assert 10
:size-assert #x20
+2 -2
View File
@@ -1194,9 +1194,9 @@
((= (-> arg0 blend-to-type) (camera-blend-to-type unknown-2))
(vector+float*! s5-1 s4-1 (the-as vector (-> *camera-combiner* tracking)) 2048.0)
(camera-line s4-1 s5-1 (new 'static 'vector4w :x #xff :w #x80))
(vector+float*! s5-1 s4-1 (the-as vector (&-> *camera-combiner* stack 176)) 2048.0)
(vector+float*! s5-1 s4-1 (-> *camera-combiner* tracking inv-mat vector 1) 2048.0)
(camera-line s4-1 s5-1 (new 'static 'vector4w :y #xff :w #x80))
(vector+float*! s5-1 s4-1 (the-as vector (&-> *camera-combiner* stack 192)) 2048.0)
(vector+float*! s5-1 s4-1 (-> *camera-combiner* tracking inv-mat vector 2) 2048.0)
(camera-line s4-1 s5-1 (new 'static 'vector4w :z #xff :w #x80))
)
(else
+1 -1
View File
@@ -185,7 +185,7 @@
(-> self local-down)
(-> self settings target-height)
)
(vector-float*! (-> s5-6 move-dist) (the-as vector (&-> self stack 256)) 4915.2)
(vector-float*! (-> s5-6 move-dist) (-> self tgt-rot-mat vector 2) 4915.2)
(vector-! (-> s5-6 start-pos) (-> s5-6 start-pos) (-> s5-6 move-dist))
(let ((s4-4 s5-6))
(set! (-> s4-4 radius) 4300.8)
+5 -5
View File
@@ -2726,7 +2726,7 @@
(vector-flatten! s5-3 (-> self butt-vector) (-> *camera* local-down))
)
(else
(vector-flatten! s5-3 (the-as vector (&-> *camera* stack 256)) (-> *camera* local-down))
(vector-flatten! s5-3 (-> *camera* tgt-rot-mat vector 2) (-> *camera* local-down))
)
)
)
@@ -2746,7 +2746,7 @@
)
(when (logtest? (-> *camera* settings slave-options) (cam-slave-options BIKE_MODE))
(vector-normalize-copy! gp-3 (-> self view-flat) 1.0)
(vector-flatten! s5-3 (the-as vector (&-> *camera* stack 256)) (-> *camera* local-down))
(vector-flatten! s5-3 (-> *camera* tgt-rot-mat vector 2) (-> *camera* local-down))
(vector-normalize! s5-3 -1.0)
(let ((f0-97 (acos (vector-dot s5-3 gp-3))))
(when (and (< (-> self max-angle-offset) f0-97) (< f0-97 32585.955))
@@ -3604,7 +3604,7 @@
((logtest? (-> self options) (cam-slave-options-u32 BUTT_CAM))
(set-vector! s5-0 0.0 0.0 1.0 1.0)
(vector-normalize-copy! s5-0 (-> self view-flat) 1.0)
(set! (-> s3-0 quad) (-> (the-as vector (&-> *camera* stack 256)) quad))
(set! (-> s3-0 quad) (-> (the-as vector (-> *camera* tgt-rot-mat vector 2)) quad))
(vector-flatten! s3-0 s3-0 (-> *camera* local-down))
(vector-negate! s3-0 s3-0)
(set! (-> s4-0 quad) (-> s5-0 quad))
@@ -3670,7 +3670,7 @@
;; definition for function cam-calc-bike-follow!
(defbehavior cam-calc-bike-follow! camera-slave ((arg0 cam-rotation-tracker) (arg1 vector) (arg2 symbol))
(vector-float*! (-> arg0 follow-off) (the-as vector (&-> *camera* stack 320)) 155648.0)
(vector-float*! (-> arg0 follow-off) (-> *camera* tgt-face-mat vector 2) 155648.0)
(vector+! (-> arg0 follow-pt) (-> *camera* tpos-curr-adj) (-> arg0 follow-off))
(vector--float*!
(-> arg0 follow-pt)
@@ -3689,7 +3689,7 @@
(s5-0 (new-stack-vector0))
)
(vector-normalize-copy! gp-0 (-> self view-flat) 1.0)
(vector-flatten! s5-0 (the-as vector (&-> *camera* stack 256)) (-> *camera* local-down))
(vector-flatten! s5-0 (-> *camera* tgt-rot-mat vector 2) (-> *camera* local-down))
(vector-normalize! s5-0 -1.0)
(matrix-from-two-vectors-partial-linear! s4-0 gp-0 s5-0 0.2)
)
+4 -4
View File
@@ -1227,12 +1227,12 @@
(f30-0 (vector-vector-distance (-> *camera* tpos-curr-adj) (-> *camera* tpos-old-adj)))
(s2-0 (new 'stack-no-clear 'vector))
)
(vector-flatten! s1-0 (the-as vector (&-> *camera* stack 320)) (-> *camera* local-down))
(vector-flatten! s1-0 (-> *camera* tgt-face-mat vector 2) (-> *camera* local-down))
(vector-normalize! s1-0 1.0)
(vector-! s0-0 (-> *camera* tpos-curr-adj) arg1)
(vector-flatten! s0-0 s0-0 (-> *camera* local-down))
(vector-normalize! s0-0 1.0)
(vector-float*! s2-0 (the-as vector (&-> *camera* stack 320)) 32768.0)
(vector-float*! s2-0 (-> *camera* tgt-face-mat vector 2) 32768.0)
(set! sv-128 lerp-clamp)
(set! sv-144 (the-as float 0.7))
(set! sv-160 (the-as float 0.4))
@@ -1300,7 +1300,7 @@
(else
(vector-! s2-1 (-> *camera* tpos-curr-adj) arg1)
(vector-normalize! s2-1 1.0)
(let* ((f0-32 (vector-dot (the-as vector (&-> *camera* stack 256)) s2-1))
(let* ((f0-32 (vector-dot (-> *camera* tgt-rot-mat vector 2) s2-1))
(f30-2 (cond
((< f0-32 0.0)
1.0
@@ -1320,7 +1320,7 @@
(let* ((f1-15 (* 0.000022194603 (+ -20480.0 (vector-length s2-1))))
(f0-37 (fmax 0.0 (fmin 1.0 f1-15)))
)
(vector-float*! s2-1 (the-as vector (&-> *camera* stack 256)) (* (lerp 2048.0 8192.0 f0-37) f30-2))
(vector-float*! s2-1 (-> *camera* tgt-rot-mat vector 2) (* (lerp 2048.0 8192.0 f0-37) f30-2))
)
)
)
+2 -2
View File
@@ -1624,7 +1624,7 @@
(move-to-ground (_type_ float float symbol collide-spec) none 60)
(move-to-ground-point (_type_ vector vector vector) none 61)
(compute-acc-due-to-gravity (_type_ vector float) vector 62)
(collide-shape-moving-method-63 () none 63)
(collide-shape-moving-method-63 (_type_ rigid-body float) none 63)
(try-snap-to-surface (_type_ vector float float float) symbol 64)
(fill-and-try-snap-to-surface (_type_ vector float float float collide-query) symbol 65)
(step-collison! (_type_ vector vector float int) float 66)
@@ -1955,7 +1955,7 @@
)
;; definition for method 4 of type collide-shape-prim-group
;; WARN: Return type mismatch uint8 vs int.
;; WARN: Return type mismatch uint vs int.
(defmethod length collide-shape-prim-group ((obj collide-shape-prim-group))
(the-as int (-> obj num-children))
)
+2 -2
View File
@@ -2635,7 +2635,7 @@
(set-vector! (-> obj root-override2 scale) 3.0 3.0 3.0 1.0)
(logclear! (-> obj flags) (collectable-flag fadeout))
(let ((v1-34 (-> obj node-list data)))
(set! (-> v1-34 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-34 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-34 0 param1) (the-as basic (-> obj root-override2 trans)))
(set! (-> v1-34 0 param2) (the-as basic (-> obj extra-trans)))
)
@@ -2663,7 +2663,7 @@
)
(set-vector! (-> obj root-override2 scale) 2.0 2.0 2.0 1.0)
(let ((v1-52 (-> obj node-list data)))
(set! (-> v1-52 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-52 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-52 0 param1) (the-as basic (-> obj root-override2 trans)))
(set! (-> v1-52 0 param2) (the-as basic (-> obj extra-trans)))
)
+3 -1
View File
@@ -1026,7 +1026,9 @@
(cond
((-> event param 0)
(set! s4-0 (-> self node-list data 2))
(set! (-> (the-as cspace s4-0) param0) (the-as (function cspace matrix none) cspace<-parented-matrix-mirror!))
(set! (-> (the-as cspace s4-0) param0)
(the-as (function cspace transformq none) cspace<-parented-matrix-mirror!)
)
(set! (-> (the-as cspace s4-0) param1) (the-as basic (-> *math-camera* mirror-trans)))
(set! (-> (the-as cspace s4-0) param2) (the-as basic (-> *math-camera* mirror-normal)))
)
+1 -1
View File
@@ -1154,7 +1154,7 @@
(local-vars (sv-16 res-tag))
(when (coin-flip? obj)
(let ((a0-2 (-> obj node-list data 2)))
(set! (-> a0-2 param0) (the-as (function cspace matrix none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!))
(set! (-> a0-2 param1) #f)
(set! (-> a0-2 param2) #f)
)
+37 -1
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type rigid-body-info
(deftype rigid-body-info (structure)
((mass float :offset-assert 0)
(inv-mass float :offset-assert 4)
@@ -21,6 +23,7 @@
)
)
;; definition for method 3 of type rigid-body-info
(defmethod inspect rigid-body-info ((obj rigid-body-info))
(when (not obj)
(set! obj obj)
@@ -42,6 +45,7 @@
obj
)
;; definition of type rigid-body-object-extra-info
(deftype rigid-body-object-extra-info (structure)
((max-time-step float :offset-assert 0)
(gravity meters :offset-assert 4)
@@ -54,6 +58,7 @@
:flag-assert #x900000010
)
;; definition for method 3 of type rigid-body-object-extra-info
(defmethod inspect rigid-body-object-extra-info ((obj rigid-body-object-extra-info))
(when (not obj)
(set! obj obj)
@@ -68,6 +73,7 @@
obj
)
;; definition of type rigid-body-object-constants
(deftype rigid-body-object-constants (structure)
((info rigid-body-info :inline :offset-assert 0)
(mass float :offset 0)
@@ -95,6 +101,7 @@
:flag-assert #x9000000d0
)
;; definition for method 3 of type rigid-body-object-constants
(defmethod inspect rigid-body-object-constants ((obj rigid-body-object-constants))
(when (not obj)
(set! obj obj)
@@ -124,6 +131,7 @@
obj
)
;; definition of type rigid-body-impact
(deftype rigid-body-impact (structure)
((point vector :inline :offset-assert 0)
(normal vector :inline :offset-assert 16)
@@ -138,6 +146,7 @@
:flag-assert #x900000040
)
;; definition for method 3 of type rigid-body-impact
(defmethod inspect rigid-body-impact ((obj rigid-body-impact))
(when (not obj)
(set! obj obj)
@@ -155,6 +164,7 @@
obj
)
;; definition of type rigid-body
(deftype rigid-body (structure)
((work rigid-body-work :offset-assert 0)
(info rigid-body-info :offset-assert 4)
@@ -205,6 +215,7 @@
)
)
;; definition for method 3 of type rigid-body
(defmethod inspect rigid-body ((obj rigid-body))
(when (not obj)
(set! obj obj)
@@ -254,6 +265,7 @@
obj
)
;; definition of type rigid-body-control
(deftype rigid-body-control (basic)
((process process :offset-assert 4)
(state rigid-body :inline :offset-assert 16)
@@ -301,6 +313,7 @@
)
)
;; definition for method 3 of type rigid-body-control
(defmethod inspect rigid-body-control ((obj rigid-body-control))
(when (not obj)
(set! obj obj)
@@ -352,88 +365,107 @@
obj
)
;; definition for method 9 of type rigid-body-control
(defmethod rigid-body-control-method-9 rigid-body-control ((obj rigid-body-control) (arg0 collide-shape-moving) (arg1 float))
(rigid-body-method-9 (-> obj state) arg0 arg1)
(none)
)
;; definition for method 10 of type rigid-body-control
;; WARN: Return type mismatch none vs object.
(defmethod rigid-body-control-method-10 rigid-body-control ((obj rigid-body-control) (arg0 rigid-body-object) (arg1 float) (arg2 float))
(the-as object (rigid-body-method-10 (-> obj state)))
)
;; definition for method 11 of type rigid-body-control
(defmethod rigid-body-control-method-11 rigid-body-control ((obj rigid-body-control) (arg0 collide-shape-moving))
(rigid-body-method-11 (-> obj state) arg0)
(none)
)
;; definition for method 12 of type rigid-body-control
(defmethod rigid-body-control-method-12 rigid-body-control ((obj rigid-body-control) (arg0 float))
(rigid-body-method-12 (-> obj state) arg0)
(none)
)
;; definition for method 13 of type rigid-body-control
(defmethod rigid-body-control-method-13 rigid-body-control ((obj rigid-body-control))
(rigid-body-method-13 (-> obj state))
(none)
)
;; definition for method 14 of type rigid-body-control
(defmethod rigid-body-control-method-14 rigid-body-control ((obj rigid-body-control) (arg0 float))
(rigid-body-method-14 (-> obj state) arg0)
(none)
)
;; definition for method 15 of type rigid-body-control
(defmethod clear-force-torque! rigid-body-control ((obj rigid-body-control))
(clear-force-torque! (-> obj state))
(none)
)
;; definition for method 16 of type rigid-body-control
(defmethod clear-momentum! rigid-body-control ((obj rigid-body-control))
(clear-momentum! (-> obj state))
(none)
)
;; definition for method 17 of type rigid-body-control
(defmethod rigid-body-control-method-17 rigid-body-control ((obj rigid-body-control) (arg0 vector) (arg1 vector))
(rigid-body-method-18 (-> obj state) arg0 arg1)
(none)
)
;; definition for method 18 of type rigid-body-control
(defmethod rigid-body-control-method-18 rigid-body-control ((obj rigid-body-control) (arg0 vector) (arg1 vector))
(rigid-body-method-19 (-> obj state) arg0 arg1)
(none)
)
;; definition for method 19 of type rigid-body-control
(defmethod rigid-body-control-method-19 rigid-body-control ((obj rigid-body-control) (arg0 vector))
(rigid-body-method-20 (-> obj state) arg0)
(none)
)
;; definition for method 20 of type rigid-body-control
(defmethod rigid-body-control-method-20 rigid-body-control ((obj rigid-body-control) (arg0 vector) (arg1 vector) (arg2 float))
(rigid-body-method-21 (-> obj state) arg0 arg1 arg2)
(none)
)
;; definition for method 21 of type rigid-body-control
(defmethod rigid-body-control-method-21 rigid-body-control ((obj rigid-body-control) (arg0 vector) (arg1 vector))
(rigid-body-method-22 (-> obj state) arg0 arg1)
)
;; definition for method 22 of type rigid-body-control
(defmethod rigid-body-control-method-22 rigid-body-control ((obj rigid-body-control) (arg0 vector))
(rigid-body-method-23 (-> obj state) arg0)
)
;; definition for method 23 of type rigid-body-control
(defmethod rigid-body-control-method-23 rigid-body-control ((obj rigid-body-control))
(rigid-body-method-24 (-> obj state))
(none)
)
;; definition for method 24 of type rigid-body-control
(defmethod rigid-body-control-method-24 rigid-body-control ((obj rigid-body-control) (arg0 rigid-body-info) (arg1 vector) (arg2 quaternion) (arg3 basic))
(rigid-body-method-25 (-> obj state) arg0 arg1 arg2 (the-as function arg3))
(none)
)
;; definition for method 25 of type rigid-body-control
(defmethod rigid-body-control-method-25 rigid-body-control ((obj rigid-body-control) (arg0 vector) (arg1 quaternion))
(rigid-body-method-26 (-> obj state) arg0 arg1)
(none)
)
;; definition of type rigid-body-object
(deftype rigid-body-object (process-focusable)
((root-override-2 collide-shape-moving :offset 128)
(info rigid-body-object-constants :offset-assert 204)
@@ -468,7 +500,7 @@
(rigid-body-object-method-42 (_type_) none :behavior rigid-body-object 42)
(rigid-body-object-method-43 (_type_) none 43)
(rigid-body-object-method-44 (_type_ float) none 44)
(rigid-body-object-method-45 () none 45)
(rigid-body-object-method-45 (_type_ rigid-body-object-constants) sound-id 45)
(rigid-body-object-method-46 (_type_ process-drawable int symbol event-message-block) none :behavior rigid-body-object 46)
(rigid-body-object-method-47 (_type_ process-drawable attack-info object penetrate) symbol 47)
(rigid-body-object-method-48 (_type_ object object) none 48)
@@ -479,6 +511,7 @@
)
)
;; definition for method 3 of type rigid-body-object
(defmethod inspect rigid-body-object ((obj rigid-body-object))
(when (not obj)
(set! obj obj)
@@ -529,6 +562,7 @@
obj
)
;; definition of type rigid-body-queue
(deftype rigid-body-queue (structure)
((count int8 :offset-assert 0)
(array uint64 128 :offset 8)
@@ -548,6 +582,7 @@
)
)
;; definition for method 3 of type rigid-body-queue
(defmethod inspect rigid-body-queue ((obj rigid-body-queue))
(when (not obj)
(set! obj obj)
@@ -560,4 +595,5 @@
obj
)
;; failed to figure out what this is:
0
File diff suppressed because it is too large Load Diff
@@ -306,7 +306,7 @@
(set! (-> v1-9 bone) (the-as bone (-> s3-1 bones)))
)
(let ((v1-10 (-> s5-0 data)))
(set! (-> v1-10 0 param0) (the-as (function cspace matrix none) cspace<-transformq!))
(set! (-> v1-10 0 param0) (the-as (function cspace transformq none) cspace<-transformq!))
(set! (-> v1-10 0 param1) (the-as basic (-> (the-as process-drawable (-> obj process)) root trans)))
)
(let ((v1-12 (reset-and-assign-geo! (-> s5-0 data 1) (the-as drawable #f))))
@@ -318,7 +318,7 @@
(set! (-> v1-14 joint) (-> arg0 data 1))
(set! (-> v1-14 bone) (-> s3-1 bones 2))
(set! (-> v1-14 parent) (the-as cspace (-> s5-0 data)))
(set! (-> v1-14 param0) (the-as (function cspace matrix none) cspace<-parented-matrix-joint!))
(set! (-> v1-14 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint!))
(set! (-> v1-14 param1) (-> obj process))
)
(let ((s2-0 3))
@@ -396,7 +396,7 @@
(let* ((v1-20 (-> arg0 data s1-1))
(t9-3 (the-as function (-> v1-20 param0)))
)
(if (the-as (function cspace matrix none) t9-3)
(if (the-as (function cspace transformq none) t9-3)
((the-as (function object object object none) t9-3) v1-20 (-> v1-20 param1) (-> v1-20 param2))
)
)
@@ -407,7 +407,7 @@
(t9-4 (-> a0-11 param0))
)
(if t9-4
(t9-4 a0-11 (the-as matrix a1-7))
(t9-4 a0-11 (the-as transformq a1-7))
)
)
)
@@ -417,7 +417,7 @@
(a1-9 (+ (* 48 s0-0) 2528 #x70000000))
)
(if (-> a0-12 param0)
((-> a0-12 param0) a0-12 (the-as matrix a1-9))
((-> a0-12 param0) a0-12 (the-as transformq a1-9))
(cspace<-parented-transformq-joint! a0-12 (the-as transformq a1-9))
)
)
+2 -6
View File
@@ -746,7 +746,7 @@
(logclear! (-> self control root-prim prim-core action) (collide-action can-ride))
(set! (-> self control bend-target) 1.0)
(let ((v1-82 (-> self node-list data)))
(set! (-> v1-82 0 param0) (the-as (function cspace matrix none) cspace<-transformq+world-trans!))
(set! (-> v1-82 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!))
(set! (-> v1-82 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-82 0 param2) (the-as basic (-> self control cspace-offset)))
)
@@ -825,7 +825,7 @@
(remove-setting! 'string-spline-max-move-player)
(remove-setting! 'string-spline-accel-player)
(let ((v1-43 (-> self node-list data)))
(set! (-> v1-43 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-43 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-43 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset)))
)
@@ -3043,7 +3043,3 @@
(none)
)
)
+1 -1
View File
@@ -3291,7 +3291,7 @@
)
(logior! (-> obj skel effect flags) (effect-control-flag ecf0 ecf1))
(let ((v1-94 (-> obj node-list data)))
(set! (-> v1-94 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-94 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-94 0 param1) (the-as basic (-> obj control trans)))
(set! (-> v1-94 0 param2) (the-as basic (-> obj control cspace-offset)))
)
+1 -1
View File
@@ -388,7 +388,7 @@
(set! (-> self shadow-backup) (-> self draw shadow))
(set! (-> self draw shadow-ctrl) *mech-shadow-control*)
(let ((v1-27 (-> self node-list data)))
(set! (-> v1-27 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-27 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-27 0 param1) (the-as basic (-> self root-override trans)))
(set! (-> v1-27 0 param2) (the-as basic (-> self extra-trans)))
)
+2 -6
View File
@@ -1161,7 +1161,7 @@
(set! (-> self focus-status) (logior (focus-status mech) (-> self focus-status)))
(set! (-> self control bend-target) 0.0)
(let ((v1-40 (-> self node-list data)))
(set! (-> v1-40 0 param0) (the-as (function cspace matrix none) cspace<-transformq+world-trans!))
(set! (-> v1-40 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!))
(set! (-> v1-40 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-40 0 param2) (the-as basic (-> self control cspace-offset)))
)
@@ -1362,7 +1362,7 @@
(set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max))
(set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length))
(let ((v1-39 (-> self node-list data)))
(set! (-> v1-39 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!))
(set! (-> v1-39 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!))
(set! (-> v1-39 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-39 0 param2) (the-as basic (-> self control cspace-offset)))
)
@@ -1787,7 +1787,3 @@
(target-mech-real-post)
(none)
)
+8 -8
View File
@@ -180,7 +180,7 @@
(('play-anim)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace+transformq!)
(the-as (function cspace transformq none) cspace<-cspace+transformq!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
@@ -190,7 +190,7 @@
(('copy-parent)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace!)
(the-as (function cspace transformq none) cspace<-cspace!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
@@ -200,7 +200,7 @@
(('root)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace-normalized!)
(the-as (function cspace transformq none) cspace<-cspace-normalized!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
@@ -210,7 +210,7 @@
(('indax)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-transformq+trans!)
(the-as (function cspace transformq none) cspace<-transformq+trans!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 control trans))
@@ -222,7 +222,7 @@
(('board)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace-normalized!)
(the-as (function cspace transformq none) cspace<-cspace-normalized!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data 25))
@@ -232,7 +232,7 @@
(else
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0)
(the-as (function cspace matrix none) cspace<-cspace+transformq!)
(the-as (function cspace transformq none) cspace<-cspace+transformq!)
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 control sidekick-root parent))
@@ -483,7 +483,7 @@
(send-event (ppointer->process gp-4) 'mirror #t)
(set! (-> self mirror) gp-4)
(let ((v0-29 (-> gp-4 0 node-list data)))
(set! (-> v0-29 0 param0) (the-as (function cspace matrix none) cspace<-cspace!))
(set! (-> v0-29 0 param0) (the-as (function cspace transformq none) cspace<-cspace!))
(set! (-> v0-29 0 param1) (the-as basic (-> self node-list data)))
(set! (-> v0-29 0 param2) #f)
)
@@ -511,7 +511,7 @@
(logior! (-> self skel status) (joint-control-status sync-math blend-shape eye-anim))
(set! (-> self draw light-index) (the-as uint 30))
(let ((v1-14 (-> self node-list data)))
(set! (-> v1-14 0 param0) (the-as (function cspace matrix none) cspace<-cspace+transformq!))
(set! (-> v1-14 0 param0) (the-as (function cspace transformq none) cspace<-cspace+transformq!))
(set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control sidekick-root parent)))
(set! (-> v1-14 0 param2) (the-as basic (-> self offset)))
)
+4
View File
@@ -75,6 +75,7 @@
;; definition of type sync-linear
(deftype sync-linear (sync-info)
()
:pack-me
:method-count-assert 16
:size-assert #x10
:flag-assert #x1000000010
@@ -166,6 +167,7 @@
(start-time time-frame :offset-assert 16)
(value float :offset-assert 24)
)
:pack-me
:method-count-assert 13
:size-assert #x1c
:flag-assert #xd0000001c
@@ -203,6 +205,7 @@
(damping float :offset-assert 16)
(accel float :offset-assert 20)
)
:allow-misaligned
:method-count-assert 11
:size-assert #x18
:flag-assert #xb00000018
@@ -237,6 +240,7 @@
(elasticity float :offset-assert 32)
(state int32 :offset-assert 36)
)
:allow-misaligned
:method-count-assert 13
:size-assert #x28
:flag-assert #xd00000028
+235
View File
@@ -0,0 +1,235 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type cpad-elevator
(deftype cpad-elevator (elevator)
((sound-id sound-id :offset-assert 368)
)
:heap-base #x100
:method-count-assert 50
:size-assert #x174
:flag-assert #x3201000174
(:methods
(cpad-elevator-method-49 (_type_ symbol) none 49)
)
)
;; definition for method 3 of type cpad-elevator
(defmethod inspect cpad-elevator ((obj cpad-elevator))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type elevator inspect)))
(t9-0 obj)
)
(format #t "~2Tsound-id: ~D~%" (-> obj sound-id))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-cpad-elevator cpad-elevator cpad-elevator-lod0-jg cpad-elevator-idle-ja
((cpad-elevator-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 18)
)
;; definition for method 30 of type cpad-elevator
(defmethod get-art-group cpad-elevator ((obj cpad-elevator))
"@returns The associated [[art-group]]"
(art-group-get-by-name *level* "skel-cpad-elevator" (the-as (pointer uint32) #f))
)
;; definition for method 43 of type cpad-elevator
(defmethod elevator-method-43 cpad-elevator ((obj cpad-elevator) (arg0 vector) (arg1 float) (arg2 float))
(let ((s4-0 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg1 'interp))
(a0-3 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) arg2 'interp))
(v1-3 (-> obj root-override trans))
)
(when (and (< (-> a0-3 y) (-> s4-0 y)) (< (-> arg0 y) (+ -8192.0 (-> v1-3 y))))
(let ((s4-2 (vector-! (new 'stack-no-clear 'vector) arg0 v1-3)))
(vector-inv-orient-by-quat! s4-2 s4-2 (-> obj root-override quat))
(and (< (fabs (-> s4-2 x)) 49152.0) (< (fabs (-> s4-2 z)) 49152.0))
)
)
)
)
;; definition for method 45 of type cpad-elevator
(defmethod elevator-method-45 cpad-elevator ((obj cpad-elevator))
"@returns Stub, or always returns [[#t]]"
(let* ((gp-0 *target*)
(a0-2 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(when a0-2
(let* ((v1-1 (get-trans a0-2 0))
(gp-2 (vector-! (new 'stack-no-clear 'vector) v1-1 (-> obj root-override trans)))
)
(vector-inv-orient-by-quat! gp-2 gp-2 (-> obj root-override quat))
(and (< (fabs (-> gp-2 x)) 40960.0) (< (fabs (-> gp-2 z)) 40960.0))
)
)
)
)
;; definition for method 49 of type cpad-elevator
;; WARN: Return type mismatch int vs none.
(defmethod cpad-elevator-method-49 cpad-elevator ((obj cpad-elevator) (arg0 symbol))
(let ((v1-3 (-> (the-as collide-shape-prim-group (-> obj root-override root-prim)) child 1)))
(cond
(arg0
(set! (-> v1-3 prim-core collide-as) (collide-spec obstacle pusher))
(set! (-> v1-3 prim-core collide-with) (collide-spec jak player-list))
)
(else
(set! (-> v1-3 prim-core collide-as) (collide-spec))
(set! (-> v1-3 prim-core collide-with) (collide-spec))
0
)
)
)
(none)
)
;; failed to figure out what this is:
(defstate running (cpad-elevator)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type elevator running) enter)))
(if t9-0
(t9-0)
)
)
(when (logtest? (-> self elevator-status) (elevator-status elevator-status-0))
(cpad-elevator-method-49 self #t)
(set-setting! 'jump #f 0 0)
)
(none)
)
:exit (behavior ()
(sound-stop (-> self sound-id))
(sound-play "dig-elevate-end")
(let ((t9-3 (-> (method-of-type elevator running) exit)))
(if t9-3
(t9-3)
)
)
(none)
)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 1))
(suspend)
)
)
(logior! (-> self elevator-status) (elevator-status elevator-status-1))
(until #f
(sound-play "dig-elevate" :id (-> self sound-id))
(suspend)
(if (= (-> self path-pos) 1.0)
(logclear! (-> self elevator-status) (elevator-status elevator-status-1))
)
)
#f
(none)
)
)
;; failed to figure out what this is:
(defstate arrived (cpad-elevator)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type elevator arrived) enter)))
(if t9-0
(t9-0)
)
)
(when (logtest? (-> self elevator-status) (elevator-status elevator-status-0))
(cpad-elevator-method-49 self #f)
(remove-setting! 'jump)
)
(none)
)
)
;; definition for method 40 of type cpad-elevator
(defmethod elevator-method-40 cpad-elevator ((obj cpad-elevator))
"TODO - need to figure out some flags to be confident about this"
(if (task-node-closed? (game-task-node dig-knock-down-introduction))
(go (method-of-object obj arrived))
(go (method-of-object obj dormant))
)
)
;; definition for method 10 of type cpad-elevator
(defmethod deactivate cpad-elevator ((obj cpad-elevator))
(sound-stop (-> obj sound-id))
((the-as (function elevator none) (find-parent-method cpad-elevator 10)) obj)
(none)
)
;; definition for method 42 of type cpad-elevator
;; WARN: Return type mismatch ambient-sound vs none.
(defmethod clear-ambient-sound! cpad-elevator ((obj cpad-elevator))
"Might be a virtual function, but clears the object's [[ambient-sound]]"
(set! (-> obj sound)
(new 'process 'ambient-sound (static-sound-spec "cpad-elevator-l" :fo-max 70) (-> obj root-override trans))
)
(none)
)
;; definition for method 33 of type cpad-elevator
;; WARN: Return type mismatch sound-id vs none.
(defmethod base-plat-method-33 cpad-elevator ((obj cpad-elevator))
(let ((s5-0 (+ (-> obj path curve num-cverts) -1)))
(calc-dist-between-points! obj 0 s5-0)
(calc-dist-between-points! obj s5-0 0)
)
(set! (-> obj sound-id) (new-sound-id))
(none)
)
;; definition for method 31 of type cpad-elevator
;; WARN: Return type mismatch collide-shape-moving vs none.
(defmethod base-plat-method-31 cpad-elevator ((obj cpad-elevator))
"TODO - collision stuff"
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 73728.0)
(set! (-> s5-0 root-prim) s4-0)
)
(pusher-init s5-0)
(let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
(set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-15 prim-core action) (collide-action solid rideable))
(set! (-> v1-15 transform-index) 3)
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 73728.0)
)
(let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-17 prim-core action) (collide-action solid))
(set! (-> v1-17 transform-index) 3)
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 73728.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-20 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
(none)
)
+3 -3
View File
@@ -940,10 +940,10 @@
(set! (-> obj dividing-wall pos quad) (-> s5-3 quad))
(set! (-> obj dividing-wall dir quad) (-> v1-28 quad))
(vector+float*! (the-as vector (-> obj plane)) s5-3 v1-28 12288.0)
(set! (-> (the-as vector (&-> obj stack 320)) quad) (-> v1-28 quad))
(set! (-> (the-as vector (-> obj plane 0 dir)) quad) (-> v1-28 quad))
(vector-float*! v1-28 v1-28 -1.0)
(vector+float*! (the-as vector (&-> obj stack 336)) s5-3 v1-28 12288.0)
(set! (-> (the-as vector (&-> obj stack 352)) quad) (-> v1-28 quad))
(vector+float*! (the-as vector (-> obj plane 1)) s5-3 v1-28 12288.0)
(set! (-> (the-as vector (-> obj plane 1 dir)) quad) (-> v1-28 quad))
)
(set! (-> obj wall-xz)
(vector-vector-distance
@@ -399,7 +399,7 @@
;; WARN: Return type mismatch amphibian-joint-mod vs none.
(defmethod amphibian-joint-mod-method-9 amphibian-joint-mod ((obj amphibian-joint-mod))
(let ((v1-3 (-> obj proc node-list data (-> obj joint-index))))
(set! (-> v1-3 param0) (the-as (function cspace matrix none) amphibian-joint-mod-callback))
(set! (-> v1-3 param0) amphibian-joint-mod-callback)
(set! (-> v1-3 param1) obj)
)
(none)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,405 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type transport-level
(deftype transport-level (process-focusable)
((y-dest float :offset-assert 204)
(last-guard-spawn-time time-frame :offset-assert 208)
(nav-mesh nav-mesh :offset-assert 216)
(spawn-side uint32 :offset-assert 220)
(spawn? symbol :offset-assert 224)
(leave-time time-frame :offset-assert 232)
(max-guard uint32 :offset-assert 240)
(count-guard uint32 :offset-assert 244)
(max-time float :offset-assert 248)
(spawn-time time-frame :offset-assert 256)
(ambient-sound-id uint32 :offset-assert 264)
(num-wanted-guards uint32 :offset-assert 268)
(guards handle 8 :offset-assert 272)
)
:heap-base #xd0
:method-count-assert 35
:size-assert #x150
:flag-assert #x2300d00150
(:methods
(come-down () _type_ :state 27)
(idle () _type_ :state 28)
(leave () _type_ :state 29)
(die-fast () _type_ :state 30)
(transport-level-method-31 (_type_) none 31)
(transport-level-method-32 (_type_) none 32)
(transport-level-method-33 (_type_) uint 33)
(transport-level-method-34 (_type_) none 34)
)
)
;; definition for method 3 of type transport-level
(defmethod inspect transport-level ((obj transport-level))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 obj)
)
(format #t "~2Ty-dest: ~f~%" (-> obj y-dest))
(format #t "~2Tlast-guard-spawn-time: ~D~%" (-> obj last-guard-spawn-time))
(format #t "~2Tnav-mesh: ~A~%" (-> obj nav-mesh))
(format #t "~2Tspawn-side: ~D~%" (-> obj spawn-side))
(format #t "~2Tspawn?: ~A~%" (-> obj spawn?))
(format #t "~2Tleave-time: ~D~%" (-> obj leave-time))
(format #t "~2Tmax-guard: ~D~%" (-> obj max-guard))
(format #t "~2Tcount-guard: ~D~%" (-> obj count-guard))
(format #t "~2Tmax-time: ~f~%" (-> obj max-time))
(format #t "~2Tspawn-time: ~D~%" (-> obj spawn-time))
(format #t "~2Tambient-sound-id: ~D~%" (-> obj ambient-sound-id))
(format #t "~2Tnum-wanted-guards: ~D~%" (-> obj num-wanted-guards))
(format #t "~2Tguards[8] @ #x~X~%" (-> obj guards))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-transport-level transport transport-lod0-jg transport-idle-ja
((transport-lod0-mg (meters 20)) (transport-lod1-mg (meters 40)) (transport-lod2-mg (meters 999999)))
:bounds (static-spherem 0 5 0 17)
)
;; definition for function transport-level-event-handler
;; WARN: Return type mismatch object vs transport-level.
(defbehavior transport-level-event-handler transport-level ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-0 object))
(the-as transport-level (case arg2
(('die-fast)
(go-virtual die-fast)
)
(('leave)
(if (not (and (-> self next-state) (let ((v1-6 (-> self next-state name)))
(or (= v1-6 'leave) (= v1-6 'die-fast))
)
)
)
(go-virtual leave)
)
)
(('guards-left)
(- (-> self max-guard) (-> self count-guard))
)
(('guards-alive)
(set! v0-0 (-> arg3 param 0))
(set! (-> self num-wanted-guards) (the-as uint v0-0))
v0-0
)
(('guards-alive-count)
(set! v0-0 0)
(dotimes (v1-10 (the-as int (-> self num-wanted-guards)))
(if (handle->process (-> self guards v1-10))
(set! v0-0 (+ (the-as int v0-0) 1))
)
)
v0-0
)
(('spawn-time)
(set! v0-0 (-> arg3 param 0))
(set! (-> self spawn-time) (the-as time-frame v0-0))
v0-0
)
(('stop-spawning)
(set! (-> self spawn?) #f)
#f
)
)
)
)
;; definition for method 34 of type transport-level
;; WARN: Return type mismatch int vs none.
(defmethod transport-level-method-34 transport-level ((obj transport-level))
(let ((f30-0 (lerp-scale 0.0 2.0 (fabs (-> obj root-override transv y)) 0.0 122880.0))
(f0-4 (lerp-scale 0.0 1.0 (- (-> obj root-override trans y) (-> obj y-dest)) 143360.0 20480.0))
(a0-3 (static-sound-spec "transport" :volume 0.0 :mask (pitch reg0)))
)
(set! (-> a0-3 volume) (the int (* 1024.0 f0-4)))
(set! (-> a0-3 pitch-mod) (the int (* 1524.0 f30-0)))
(sound-play-by-spec a0-3 (the-as sound-id (-> obj ambient-sound-id)) (-> obj root-override trans))
)
0
(none)
)
;; failed to figure out what this is:
(defstate come-down (transport-level)
:virtual #t
:event transport-level-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self last-guard-spawn-time) (-> self clock frame-counter))
(none)
)
:code (behavior ()
(ja-channel-push! 1 0)
(ja-no-eval :group! (-> self draw art-group data 4)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) frames num-frames) -1)))
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
(sleep-code)
(none)
)
:post (behavior ()
(set! (-> self root-override transv y) (* 2.0 (- (-> self y-dest) (-> self root-override trans y))))
(set! (-> self root-override transv y) (fmax -122880.0 (fmin 122880.0 (-> self root-override transv y))))
(+! (-> self root-override trans y) (* (-> self root-override transv y) (-> self clock seconds-per-frame)))
(if (< (fabs (- (-> self root-override trans y) (-> self y-dest))) 409.6)
(go-virtual idle)
)
(transport-level-method-34 self)
(transform-post)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (transport-level)
:virtual #t
:event transport-level-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self root-override transv y) 0.0)
(set! (-> self last-guard-spawn-time) 0)
0
(none)
)
:exit (behavior ()
'()
(none)
)
:code (behavior ()
(ja-channel-push! 1 0)
(sound-play "tran-door-open")
(ja-no-eval :group! (-> self draw art-group data 5)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) frames num-frames) -1)) 0.5)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.5))
)
(sleep-code)
(none)
)
:post (behavior ()
(local-vars (gp-0 symbol))
(if (-> self spawn?)
(transport-level-method-33 self)
)
(if (and (zero? (-> self leave-time))
(begin
(let ((gp-1 #t)
(a1-0 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-0 from) (process->ppointer self))
(set! (-> a1-0 num-params) 1)
(set! (-> a1-0 message) 'get-object-reserve-count)
(set! (-> a1-0 param 0) (the-as uint 6))
(let ((v1-9 (the-as object (send-event-function *traffic-manager* a1-0))))
(cmove-#f-nonzero gp-0 v1-9 gp-1)
)
)
gp-0
)
)
(set! (-> self leave-time) (+ (-> self clock frame-counter) (seconds 3)))
)
(if (and (nonzero? (-> self leave-time)) (< (-> self leave-time) (-> self clock frame-counter)))
(go-virtual leave)
)
(when (and (zero? (-> self leave-time))
(nonzero? (-> self max-guard))
(>= (-> self count-guard) (-> self max-guard))
)
(set! (-> self leave-time) (+ (-> self clock frame-counter) (seconds 3)))
(send-event self 'stop-spawning)
)
(transport-level-method-34 self)
(transform-post)
(none)
)
)
;; failed to figure out what this is:
(defstate die-fast (transport-level)
:virtual #t
:code (behavior ()
(sound-stop (the-as sound-id (-> self ambient-sound-id)))
(cleanup-for-death self)
(none)
)
)
;; failed to figure out what this is:
(defstate leave (transport-level)
:virtual #t
:event transport-level-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self root-override transv y) 0.0)
(none)
)
:code (behavior ()
(ja-channel-push! 1 0)
(sound-play "tran-thrust")
(sound-play "tran-door-close")
(ja-no-eval :group! (-> self draw art-group data 6)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 6)) frames num-frames) -1)) 0.2)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.2))
)
(sleep-code)
(none)
)
:post (behavior ()
(transport-level-method-34 self)
(+! (-> self root-override transv y) (* 40960.0 (-> self clock seconds-per-frame)))
(set! (-> self root-override transv y) (fmax -122880.0 (fmin 122880.0 (-> self root-override transv y))))
(+! (-> self root-override trans y) (* (-> self root-override transv y) (-> self clock seconds-per-frame)))
(if (and (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(< 163840.0 (- (-> self root-override trans y) (-> self y-dest)))
)
(go-virtual die-fast)
)
(transform-post)
(none)
)
)
;; definition for method 33 of type transport-level
;; INFO: Used lq/sq
(defmethod transport-level-method-33 transport-level ((obj transport-level))
(with-pp
(let ((v1-0 0))
(dotimes (a0-1 8)
(if (handle->process (-> obj guards a0-1))
(+! v1-0 1)
)
)
(when (zero? (-> obj count-guard))
(set! (-> obj last-guard-spawn-time) 0)
0
)
(when (and (>= (- (-> pp clock frame-counter) (-> obj last-guard-spawn-time)) (-> obj spawn-time))
(< v1-0 (the-as int (-> obj num-wanted-guards)))
)
(let ((s5-0 (new 'stack-no-clear 'crimson-guard-level-params)))
(set! (-> s5-0 transport-side) (-> obj spawn-side))
(set! (-> s5-0 nav-mesh) (-> obj nav-mesh))
(set! (-> s5-0 pos quad) (-> obj root-override trans quad))
(set! (-> s5-0 pos y) (+ 8192.0 (-> s5-0 pos y)))
(quaternion-rotate-local-y! (-> s5-0 quat) (-> obj root-override quat) 32768.0)
(set! (-> s5-0 handle) (the-as uint (process->handle obj)))
(set! (-> s5-0 weapon) 1)
(dotimes (s4-0 (the-as int (-> obj num-wanted-guards)))
(when (not (handle->process (-> obj guards s4-0)))
(set! (-> obj guards s4-0) (ppointer->handle (process-spawn crimson-guard-level s5-0 :to obj)))
#t
(goto cfg-38)
)
)
(label cfg-38)
(when (-> s5-0 proc)
(set! (-> obj spawn-side) (- 1 (the-as int (-> obj spawn-side))))
(set! (-> obj last-guard-spawn-time) (-> pp clock frame-counter))
(let ((v0-0 (+ (-> obj count-guard) 1)))
(set! (-> obj count-guard) v0-0)
v0-0
)
)
)
)
)
)
)
;; definition for method 31 of type transport-level
;; WARN: Return type mismatch int vs none.
(defmethod transport-level-method-31 transport-level ((obj transport-level))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 69632.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (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 0.0 0.0 40960.0)
)
(let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-14 prim-core action) (collide-action solid))
(set! (-> v1-14 transform-index) 3)
(set-vector! (-> v1-14 local-sphere) 0.0 20480.0 0.0 69632.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-17 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
;; definition for method 32 of type transport-level
;; WARN: Return type mismatch int vs none.
(defmethod transport-level-method-32 transport-level ((obj transport-level))
(set! (-> obj spawn-side) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type transport-level
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! transport-level ((obj transport-level) (arg0 entity-actor))
(transport-level-method-31 obj)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-transport-level" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(transport-level-method-32 obj)
(logclear! (-> obj mask) (process-mask actor-pause))
(process-entity-status! obj (entity-perm-status no-kill) #t)
(set! (-> obj spawn?) #t)
(set! (-> obj nav-mesh) (nav-mesh-from-res-tag arg0 'nav-mesh-actor 0))
(set! (-> obj num-wanted-guards) (the-as uint 4))
(dotimes (v1-11 8)
(set! (-> obj guards v1-11) (the-as handle #f))
)
(set! (-> obj spawn-time) (seconds 4))
(set! (-> obj root-override trans y) (+ 40960.0 (-> obj root-override trans y)))
(set! (-> obj y-dest) (-> obj root-override trans y))
(set! (-> obj root-override trans y) (+ 163840.0 (-> obj root-override trans y)))
(go (method-of-object obj come-down))
(none)
)
@@ -0,0 +1,779 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type spike-row-info
(deftype spike-row-info (structure)
((sync sync-linear :inline :offset-assert 0)
(table-ptr (inline-array vector) :offset-assert 16)
(on-ratio float :offset-assert 20)
(state int32 :offset-assert 24)
)
:method-count-assert 9
:size-assert #x1c
:flag-assert #x90000001c
)
;; definition for method 3 of type spike-row-info
(defmethod inspect spike-row-info ((obj spike-row-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'spike-row-info)
(format #t "~1Tsync: #<sync-linear @ #x~X>~%" (-> obj sync))
(format #t "~1Ttable-ptr: #x~X~%" (-> obj table-ptr))
(format #t "~1Ton-ratio: ~f~%" (-> obj on-ratio))
(format #t "~1Tstate: ~D~%" (-> obj state))
(label cfg-4)
obj
)
;; definition of type spike-row-info-array
(deftype spike-row-info-array (inline-array-class)
((data spike-row-info :inline :dynamic :offset-assert 16)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type spike-row-info-array
(defmethod inspect spike-row-info-array ((obj spike-row-info-array))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tlength: ~D~%" (-> obj length))
(format #t "~1Tallocated-length: ~D~%" (-> obj allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> obj data))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(set! (-> spike-row-info-array heap-base) (the-as uint 32))
;; definition of type fort-floor-spike
(deftype fort-floor-spike (process-drawable)
((pos-table (inline-array vector) :offset-assert 200)
(spike-row spike-row-info-array :offset-assert 204)
(spike-dim basic 2 :offset-assert 208)
(attack-id int32 :offset-assert 216)
(no-overlap-timer uint64 :offset-assert 224)
)
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
(:methods
(idle () _type_ :state 20)
(fort-floor-spike-method-21 (_type_) none 21)
(fort-floor-spike-method-22 (_type_) collide-shape-moving 22)
(fort-floor-spike-method-23 (_type_) symbol 23)
)
)
;; definition for method 3 of type fort-floor-spike
(defmethod inspect fort-floor-spike ((obj fort-floor-spike))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tpos-table: #x~X~%" (-> obj pos-table))
(format #t "~2Tspike-row: ~A~%" (-> obj spike-row))
(format #t "~2Tspike-dim[2] @ #x~X~%" (-> obj spike-dim))
(format #t "~2Tattack-id: ~D~%" (-> obj attack-id))
(format #t "~2Tno-overlap-timer: ~D~%" (-> obj no-overlap-timer))
(label cfg-4)
obj
)
;; definition for function joint-mod-set-y-callback
;; INFO: Used lq/sq
(defun joint-mod-set-y-callback ((arg0 cspace) (arg1 transformq))
"TODO - investigate weird casting"
(let ((a2-0 (-> arg0 param1))
(a3-0 (the-as object (-> arg0 param2)))
(v1-0 (new 'stack-no-clear 'transformq))
)
(set! (-> v1-0 trans quad) (-> arg1 trans quad))
(set! (-> v1-0 quat quad) (-> arg1 quat quad))
(set! (-> v1-0 scale quad) (-> arg1 scale quad))
(set! (-> v1-0 trans y) (fmin -4096.0 (-> (the-as vector (+ (* (the-as int a3-0) 16) (the-as int a2-0))) y)))
(cspace<-parented-transformq-joint! arg0 v1-0)
)
(none)
)
;; definition for method 21 of type fort-floor-spike
;; WARN: Return type mismatch int vs none.
(defmethod fort-floor-spike-method-21 fort-floor-spike ((obj fort-floor-spike))
0
(none)
)
;; definition for method 22 of type fort-floor-spike
;; WARN: Return type mismatch int vs collide-shape-moving.
(defmethod fort-floor-spike-method-22 fort-floor-spike ((obj fort-floor-spike))
(the-as collide-shape-moving 0)
)
;; definition for method 23 of type fort-floor-spike
;; WARN: Return type mismatch int vs symbol.
(defmethod fort-floor-spike-method-23 fort-floor-spike ((obj fort-floor-spike))
(the-as symbol 0)
)
;; failed to figure out what this is:
(defstate idle (fort-floor-spike)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(the-as
object
(case event-type
(('touched)
(when (+ (-> self clock frame-counter) (seconds -2))
(let* ((s3-0 proc)
(s4-0 (if (type? s3-0 process-drawable)
(the-as process-drawable s3-0)
)
)
)
(when s4-0
(let ((s3-1 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))
(s4-1
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s4-0 root trans) (-> self root trans)) 1.0)
)
)
(vector-flatten! s4-1 s4-1 s3-1)
(set! (-> s4-1 y) 0.0)
(vector-normalize! s4-1 1.0)
(let ((a1-8 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-8 from) (process->ppointer self))
(set! (-> a1-8 num-params) 2)
(set! (-> a1-8 message) 'attack)
(set! (-> a1-8 param 0) (-> event param 0))
(let ((v1-11 (new 'static 'attack-info :mask (attack-info-mask vector mode shove-back shove-up id))))
(set! (-> v1-11 id) (the-as uint (-> self attack-id)))
(set! (-> v1-11 mode) 'deadly)
(set! (-> v1-11 shove-up) 24576.0)
(set! (-> v1-11 shove-back) 16384.0)
(set! (-> v1-11 vector quad) (-> s4-1 quad))
(set! (-> a1-8 param 1) (the-as uint v1-11))
)
(send-event-function proc a1-8)
)
)
(let ((v0-0 (-> self clock frame-counter)))
(set! (-> self no-overlap-timer) (the-as uint v0-0))
v0-0
)
)
)
)
)
)
)
)
:enter (behavior ()
(set! (-> self no-overlap-timer) (the-as uint 0))
0
(none)
)
:code (the-as (function none :behavior fort-floor-spike) sleep-code)
:post (behavior ()
(dotimes (gp-0 (the-as int (-> self spike-dim 0)))
(let ((s5-0 (-> self spike-row data gp-0)))
(let ((f0-0 (get-norm! (-> s5-0 sync) 0)))
(cond
((< (-> s5-0 on-ratio) f0-0)
(set! (-> s5-0 state) 0)
0
)
(else
(set! (-> s5-0 state) 1)
)
)
)
(dotimes (s4-0 (the-as int (-> self spike-dim 1)))
(cond
((zero? (-> s5-0 state))
(seek!
(-> s5-0 table-ptr s4-0 y)
(* 4096.0 (- -4.0 (the float s4-0)))
(* 131072.0 (-> self clock seconds-per-frame))
)
)
(else
(let ((f30-0 (-> s5-0 table-ptr s4-0 y))
(f28-0 (* 4096.0 (+ -1.0 (the float s4-0))))
)
(seek! (-> s5-0 table-ptr s4-0 y) f28-0 (* 131072.0 (-> self clock seconds-per-frame)))
(if (and (< f30-0 f28-0) (= (-> s5-0 table-ptr gp-0 y) f28-0))
(sound-play "floor-spike" :position (-> s5-0 table-ptr gp-0))
)
)
)
)
)
)
)
(transform-post)
(none)
)
)
;; definition for method 7 of type fort-floor-spike
;; WARN: Return type mismatch process-drawable vs fort-floor-spike.
(defmethod relocate fort-floor-spike ((obj fort-floor-spike) (arg0 int))
(if (nonzero? (-> obj spike-row))
(&+! (-> obj spike-row) arg0)
)
(the-as fort-floor-spike ((method-of-type process-drawable relocate) obj arg0))
)
;; definition for method 11 of type fort-floor-spike
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-floor-spike ((obj fort-floor-spike) (arg0 entity-actor))
(fort-floor-spike-method-22 obj)
(process-drawable-from-entity! obj arg0)
(fort-floor-spike-method-21 obj)
(fort-floor-spike-method-23 obj)
(let* ((v1-6 *game-info*)
(a0-6 (+ (-> v1-6 attack-id) 1))
)
(set! (-> v1-6 attack-id) a0-6)
(set! (-> obj attack-id) (the-as int a0-6))
)
(go (method-of-object obj idle))
(none)
)
;; failed to figure out what this is:
(defskelgroup skel-fort-floor-spike-a fort-floor-spike-a 0 4
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 0 0 12)
)
;; failed to figure out what this is:
(defskelgroup skel-fort-floor-spike-b fort-floor-spike-b fort-floor-spike-b-lod0-jg fort-floor-spike-b-idle-ja
((fort-floor-spike-b-lod0-mg (meters 20))
(fort-floor-spike-b-lod1-mg (meters 40))
(fort-floor-spike-b-lod2-mg (meters 999999))
)
:bounds (static-spherem 0 0 0 12)
)
;; failed to figure out what this is:
(defskelgroup skel-fort-floor-spike-c fort-floor-spike-c fort-floor-spike-c-lod0-jg fort-floor-spike-c-idle-ja
((fort-floor-spike-c-lod0-mg (meters 20))
(fort-floor-spike-c-lod1-mg (meters 40))
(fort-floor-spike-c-lod2-mg (meters 999999))
)
:bounds (static-spherem 0 0 0 12)
)
;; definition of type fort-floor-spike-a
(deftype fort-floor-spike-a (fort-floor-spike)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
)
;; definition for method 3 of type fort-floor-spike-a
(defmethod inspect fort-floor-spike-a ((obj fort-floor-spike-a))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type fort-floor-spike inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition for method 21 of type fort-floor-spike-a
;; WARN: Return type mismatch int vs none.
(defmethod fort-floor-spike-method-21 fort-floor-spike-a ((obj fort-floor-spike-a))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-floor-spike-a" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> obj draw art-group data 4))
num-func-identity
)
)
(transform-post)
(none)
)
;; definition for method 22 of type fort-floor-spike-a
;; INFO: Used lq/sq
(defmethod fort-floor-spike-method-22 fort-floor-spike-a ((obj fort-floor-spike-a))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0)))
(set! (-> s5-0 total-prims) (the-as uint 9))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set! (-> s5-0 root-prim) s4-0)
(let* ((s3-0 '((0 4 17203) (1 5 17203) (2 6 17203) (3 7 17203) (4 8 17203) (5 9 17203) (6 10 17203) (7 11 17203)))
(s2-0 (car s3-0))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (car s2-0) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (car (cdr s2-0)) 0))
)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 (command-get-float (car (cdr (cdr s2-0))) 0.0))
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-24 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root) s5-0)
s5-0
)
)
;; definition for method 23 of type fort-floor-spike-a
;; INFO: Used lq/sq
(defmethod fort-floor-spike-method-23 fort-floor-spike-a ((obj fort-floor-spike-a))
(local-vars (sv-64 cspace))
(let ((s5-0 2)
(s4-0 4)
)
(set! (-> obj spike-dim 0) (the-as basic s5-0))
(set! (-> obj spike-dim 1) (the-as basic s4-0))
(set! (-> obj spike-row) (new 'process 'spike-row-info-array s5-0))
(set! (-> obj pos-table) (new 'static 'inline-array vector 8
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
)
)
(let ((s3-0 (-> obj pos-table))
(s2-0 4)
(s1-0 11)
)
(dotimes (s0-0 (+ (- 1 s2-0) s1-0))
(set! sv-64 (-> obj node-list data (+ s2-0 s0-0)))
(vector<-cspace! (-> s3-0 s0-0) sv-64)
(set! (-> s3-0 s0-0 y) 0.0)
(set! (-> sv-64 param0) joint-mod-set-y-callback)
(set! (-> sv-64 param1) (the-as basic s3-0))
(set! (-> sv-64 param2) (the-as basic s0-0))
)
)
(dotimes (s3-1 s5-0)
(let ((s2-1 (-> obj spike-row data s3-1)))
(let ((a1-2 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-19 0))
(if #t
(set! v1-19 (logior v1-19 1))
)
(set! (-> a1-2 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-2 sync-flags) (the-as sync-flags v1-19))
)
(set! (-> a1-2 entity) #f)
(set! (-> a1-2 period) (the-as uint 1200))
(let ((f0-2 (* 0.25 (the float s3-1))))
(set! (-> a1-2 percent) (- f0-2 (* (the float (the int (/ f0-2 1.0))) 1.0)))
)
(initialize! (-> s2-1 sync) a1-2)
)
(set! (-> s2-1 on-ratio) 0.375)
(set! (-> s2-1 state) 0)
(set! (-> s2-1 table-ptr) (the-as (inline-array vector) (-> obj pos-table (* s3-1 s4-0))))
)
)
)
#f
)
;; definition of type fort-floor-spike-b
(deftype fort-floor-spike-b (fort-floor-spike)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
)
;; definition for method 3 of type fort-floor-spike-b
(defmethod inspect fort-floor-spike-b ((obj fort-floor-spike-b))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type fort-floor-spike inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition for method 21 of type fort-floor-spike-b
;; WARN: Return type mismatch int vs none.
(defmethod fort-floor-spike-method-21 fort-floor-spike-b ((obj fort-floor-spike-b))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-floor-spike-b" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> obj draw art-group data 4))
num-func-identity
)
)
(transform-post)
(none)
)
;; definition for method 22 of type fort-floor-spike-b
;; INFO: Used lq/sq
(defmethod fort-floor-spike-method-22 fort-floor-spike-b ((obj fort-floor-spike-b))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0)))
(set! (-> s5-0 total-prims) (the-as uint 11))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set! (-> s5-0 root-prim) s4-0)
(let* ((s3-0 '((0 4 16384)
(1 5 16384)
(2 6 16384)
(3 7 16384)
(4 8 16384)
(5 9 16384)
(6 10 16384)
(7 11 16384)
(8 12 16384)
(9 13 16384)
)
)
(s2-0 (car s3-0))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (car s2-0) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (car (cdr s2-0)) 0))
)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 (command-get-float (car (cdr (cdr s2-0))) 0.0))
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-24 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root) s5-0)
s5-0
)
)
;; definition for method 23 of type fort-floor-spike-b
;; INFO: Used lq/sq
(defmethod fort-floor-spike-method-23 fort-floor-spike-b ((obj fort-floor-spike-b))
(local-vars (sv-64 cspace))
(let ((s5-0 2)
(s4-0 5)
)
(set! (-> obj spike-dim 0) (the-as basic s5-0))
(set! (-> obj spike-dim 1) (the-as basic s4-0))
(set! (-> obj spike-row) (new 'process 'spike-row-info-array s5-0))
(set! (-> obj pos-table) (new 'static 'inline-array vector 8
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
)
)
(let ((s3-0 (-> obj pos-table))
(s2-0 4)
(s1-0 13)
)
(dotimes (s0-0 (+ (- 1 s2-0) s1-0))
(set! sv-64 (-> obj node-list data (+ s2-0 s0-0)))
(vector<-cspace! (-> s3-0 s0-0) sv-64)
(set! (-> s3-0 s0-0 y) 0.0)
(set! (-> sv-64 param0) joint-mod-set-y-callback)
(set! (-> sv-64 param1) (the-as basic s3-0))
(set! (-> sv-64 param2) (the-as basic s0-0))
)
)
(dotimes (s3-1 s5-0)
(let ((s2-1 (-> obj spike-row data s3-1)))
(let ((a1-2 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-19 0))
(if #t
(set! v1-19 (logior v1-19 1))
)
(set! (-> a1-2 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-2 sync-flags) (the-as sync-flags v1-19))
)
(set! (-> a1-2 entity) #f)
(set! (-> a1-2 period) (the-as uint 1200))
(let ((f0-2 (* 0.25 (the float s3-1))))
(set! (-> a1-2 percent) (- f0-2 (* (the float (the int (/ f0-2 1.0))) 1.0)))
)
(initialize! (-> s2-1 sync) a1-2)
)
(set! (-> s2-1 on-ratio) 0.375)
(set! (-> s2-1 state) 0)
(set! (-> s2-1 table-ptr) (the-as (inline-array vector) (-> obj pos-table (* s3-1 s4-0))))
)
)
)
#f
)
;; definition of type fort-floor-spike-c
(deftype fort-floor-spike-c (fort-floor-spike)
()
:heap-base #x70
:method-count-assert 24
:size-assert #xe8
:flag-assert #x18007000e8
)
;; definition for method 3 of type fort-floor-spike-c
(defmethod inspect fort-floor-spike-c ((obj fort-floor-spike-c))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type fort-floor-spike inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition for method 21 of type fort-floor-spike-c
;; WARN: Return type mismatch int vs none.
(defmethod fort-floor-spike-method-21 fort-floor-spike-c ((obj fort-floor-spike-c))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-floor-spike-c" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> obj draw art-group data 4))
num-func-identity
)
)
(transform-post)
(none)
)
;; definition for method 22 of type fort-floor-spike-c
;; INFO: Used lq/sq
(defmethod fort-floor-spike-method-22 fort-floor-spike-c ((obj fort-floor-spike-c))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 15) 0)))
(set! (-> s5-0 total-prims) (the-as uint 16))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set! (-> s5-0 root-prim) s4-0)
(let* ((s3-0 '((0 4 16384)
(1 5 16384)
(2 6 16384)
(3 7 16384)
(4 8 16384)
(5 9 16384)
(6 10 16384)
(7 11 16384)
(8 12 16384)
(9 13 16384)
(10 15 16384)
(11 16 16384)
(12 14 16384)
(13 15 16384)
(14 16 16384)
)
)
(s2-0 (car s3-0))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (car s2-0) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (car (cdr s2-0)) 0))
)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 (command-get-float (car (cdr (cdr s2-0))) 0.0))
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-24 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root) s5-0)
s5-0
)
)
;; definition for method 23 of type fort-floor-spike-c
;; INFO: Used lq/sq
(defmethod fort-floor-spike-method-23 fort-floor-spike-c ((obj fort-floor-spike-c))
(local-vars (sv-64 cspace))
(let ((s5-0 3)
(s4-0 5)
)
(set! (-> obj spike-dim 0) (the-as basic s5-0))
(set! (-> obj spike-dim 1) (the-as basic s4-0))
(set! (-> obj spike-row) (new 'process 'spike-row-info-array s5-0))
(set! (-> obj pos-table) (new 'static 'inline-array vector 8
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
(new 'static 'vector)
)
)
(let ((s3-0 (-> obj pos-table))
(s2-0 4)
(s1-0 18)
)
(dotimes (s0-0 (+ (- 1 s2-0) s1-0))
(set! sv-64 (-> obj node-list data (+ s2-0 s0-0)))
(vector<-cspace! (-> s3-0 s0-0) sv-64)
(set! (-> s3-0 s0-0 y) 0.0)
(set! (-> sv-64 param0) joint-mod-set-y-callback)
(set! (-> sv-64 param1) (the-as basic s3-0))
(set! (-> sv-64 param2) (the-as basic s0-0))
)
)
(dotimes (s3-1 s5-0)
(let ((s2-1 (-> obj spike-row data s3-1)))
(let ((a1-2 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-19 0))
(if #t
(set! v1-19 (logior v1-19 1))
)
(set! (-> a1-2 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-2 sync-flags) (the-as sync-flags v1-19))
)
(set! (-> a1-2 entity) #f)
(set! (-> a1-2 period) (the-as uint 1200))
(let ((f0-2 (* 0.25 (the float s3-1))))
(set! (-> a1-2 percent) (- f0-2 (* (the float (the int (/ f0-2 1.0))) 1.0)))
)
(initialize! (-> s2-1 sync) a1-2)
)
(set! (-> s2-1 on-ratio) 0.375)
(set! (-> s2-1 state) 0)
(set! (-> s2-1 table-ptr) (the-as (inline-array vector) (-> obj pos-table (* s3-1 s4-0))))
)
)
)
#f
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+84
View File
@@ -0,0 +1,84 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type dig-breakable-door
(deftype dig-breakable-door (process-focusable)
((anim basic :offset-assert 204)
(art-name basic :offset-assert 208)
(collide-mesh int32 :offset-assert 212)
)
:heap-base #x60
:method-count-assert 28
:size-assert #xd8
:flag-assert #x1c006000d8
(:methods
(idle () _type_ :state 27)
)
)
;; definition for method 3 of type dig-breakable-door
(defmethod inspect dig-breakable-door ((obj dig-breakable-door))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 obj)
)
(format #t "~2Tanim: ~A~%" (-> obj anim))
(format #t "~2Tart-name: ~A~%" (-> obj art-name))
(format #t "~2Tcollide-mesh: ~D~%" (-> obj collide-mesh))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-dig-breakable-door dig-breakable-door dig-breakable-door-lod0-jg dig-breakable-door-idle-ja
((dig-breakable-door-lod0-mg (meters 999999)))
:bounds (static-spherem 0 6 0 10.3)
:origin-joint-index 3
)
;; failed to figure out what this is:
(defstate idle (dig-breakable-door)
:virtual #t
:code (behavior ()
(until #f
(transform-post)
(logior! (-> self mask) (process-mask sleep))
(suspend)
)
#f
(none)
)
)
;; definition for method 11 of type dig-breakable-door
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! dig-breakable-door ((obj dig-breakable-door) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(set! (-> obj mask) (logior (process-mask collectable) (-> obj mask)))
(let ((s4-0 (art-group-get-by-name *level* "skel-dig-breakable-door" (the-as (pointer uint32) #f))))
(let ((s3-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s3-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 3)
(set-vector! (-> v1-7 local-sphere) 0.0 24576.0 0.0 42188.8)
(set! (-> s3-0 total-prims) (the-as uint 1))
(set! (-> s3-0 root-prim) v1-7)
)
(set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w)))
(let ((v1-10 (-> s3-0 root-prim)))
(set! (-> s3-0 backup-collide-as) (-> v1-10 prim-core collide-as))
(set! (-> s3-0 backup-collide-with) (-> v1-10 prim-core collide-with))
)
(set! (-> obj root-override) s3-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton obj (the-as skeleton-group s4-0) (the-as pair 0))
)
(go (method-of-object obj idle))
(none)
)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,669 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type fort-elec-switch
(deftype fort-elec-switch (process-drawable)
((root-override collide-shape :offset 128)
(l-bolt lightning-control :offset-assert 200)
(notify-actor entity-actor :offset-assert 204)
(tank-actor entity-actor :offset-assert 208)
(switch-group (pointer actor-group) :offset-assert 212)
(switch-group-count int32 :offset-assert 216)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xdc
:flag-assert #x17006000dc
(:methods
(idle () _type_ :state 20)
(play-hint () _type_ :state 21)
(die () _type_ :state 22)
)
)
;; definition for method 3 of type fort-elec-switch
(defmethod inspect fort-elec-switch ((obj fort-elec-switch))
(when (not obj)
(set! obj obj)
(goto cfg-7)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tl-bolt: ~A~%" (-> obj l-bolt))
(format #t "~2Tnotify-actor: ~A~%" (-> obj notify-actor))
(format #t "~2Ttank-actor: ~A~%" (-> obj tank-actor))
(format #t "~2Tswitch-group: #x~X~%" (-> obj switch-group))
(dotimes (s5-0 (-> obj switch-group-count))
(format #t "~T [~D]~2Tswitch-group: ~`actor-group`P~%" s5-0 (-> obj switch-group s5-0))
)
(format #t "~2Tswitch-group-count: ~D~%" (-> obj switch-group-count))
(label cfg-7)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-fort-elec-switch fort-elec-switch fort-elec-switch-lod0-jg fort-elec-switch-idle-ja
((fort-elec-switch-lod0-mg (meters 999999)))
:bounds (static-spherem 0 2 0 3)
)
;; failed to figure out what this is:
(defstate idle (fort-elec-switch)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('attack)
(go-virtual die)
'push
)
(('hint)
(go-virtual play-hint)
)
)
)
:code (the-as (function none :behavior fort-elec-switch) sleep-code)
)
;; failed to figure out what this is:
(defstate play-hint (fort-elec-switch)
:virtual #t
:event (-> (method-of-type fort-elec-switch idle) event)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 16))
(suspend)
)
)
(until (logtest? (-> self draw status) (draw-control-status on-screen))
(suspend)
)
(let ((gp-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 0.4))
(suspend)
)
)
(talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f))
(sleep-code)
(none)
)
:post (-> (method-of-type fort-elec-switch idle) post)
)
;; failed to figure out what this is:
(defstate die (fort-elec-switch)
:virtual #t
:enter (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((v1-0 (-> self l-bolt))
(v0-1 3)
)
(let ((a0-2 (!= v0-1 (-> v1-0 state mode))))
(case v0-1
((3)
(if a0-2
(set! (-> v1-0 state counter) 0.0)
)
)
((1)
(set! (-> v1-0 state start-color) (-> v1-0 spec start-color))
(set! (-> v1-0 state end-color) (-> v1-0 spec end-color))
)
)
)
(set! (-> v1-0 state mode) (the-as lightning-mode v0-1))
)
(none)
)
:code (behavior ()
(let ((v1-1 (-> self root-override root-prim)))
(set! (-> v1-1 prim-core collide-as) (collide-spec))
(set! (-> v1-1 prim-core collide-with) (collide-spec))
)
0
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> self root-override trans quad))
(set! (-> gp-0 y) (+ 8192.0 (-> gp-0 y)))
(let ((s5-0 (get-process *default-dead-pool* part-tracker #x4000)))
(when s5-0
(let ((t9-1 (method-of-type part-tracker activate)))
(t9-1
(the-as part-tracker s5-0)
*entity-pool*
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(let ((t9-2 run-function-in-process)
(a0-6 s5-0)
(a1-2 part-tracker-init)
(a2-4 (-> *part-group-id-table* 125))
(a3-1 0)
(t0-0 #f)
(t1-0 #f)
(t2-0 #f)
(t3-0 *launch-matrix*)
)
(set! (-> t3-0 trans quad) (-> gp-0 quad))
((the-as (function object object object object object object object object none) t9-2)
a0-6
a1-2
a2-4
a3-1
t0-0
t1-0
t2-0
t3-0
)
)
(-> s5-0 ppointer)
)
)
)
(sound-play "elec-switch")
(let ((gp-2 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 0.5))
(suspend)
)
)
(let ((v1-22 #t))
(when (-> self switch-group)
(dotimes (a0-11 (-> self switch-group-count))
(let ((a1-6 (-> self switch-group a0-11)))
(dotimes (a2-7 (-> a1-6 length))
(if (not (logtest? (-> a1-6 data a2-7 actor extra perm status) (entity-perm-status subtask-complete)))
(set! v1-22 #f)
)
)
)
)
)
(when v1-22
(set-setting! 'entity-name "camera-180" 0 0)
(set-setting! 'process-mask 'set 0 (process-mask movie enemy))
(process-grab? *target* #f)
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer self))
(set! (-> a1-13 num-params) 0)
(set! (-> a1-13 message) 'fire-suppress-on)
(let ((t9-8 send-event-function)
(v1-30 (-> self tank-actor))
)
(t9-8
(if v1-30
(-> v1-30 extra process)
)
a1-13
)
)
)
(let ((gp-3 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-3) (seconds 0.75))
(suspend)
)
)
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-14 from) (process->ppointer self))
(set! (-> a1-14 num-params) 0)
(set! (-> a1-14 message) 'shutdown)
(let ((t9-9 send-event-function)
(v1-40 (-> self notify-actor))
)
(t9-9
(if v1-40
(-> v1-40 extra process)
)
a1-14
)
)
)
(let ((gp-4 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-4) (seconds 1.5))
(suspend)
)
)
(remove-setting! 'entity-name)
(remove-setting! 'process-mask)
(process-release? *target*)
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-17 from) (process->ppointer self))
(set! (-> a1-17 num-params) 0)
(set! (-> a1-17 message) 'fire-suppress-off)
(let ((t9-13 send-event-function)
(v1-54 (-> self tank-actor))
)
(t9-13
(if v1-54
(-> v1-54 extra process)
)
a1-17
)
)
)
)
)
(cleanup-for-death self)
(none)
)
)
;; definition for method 7 of type fort-elec-switch
;; WARN: Return type mismatch process-drawable vs fort-elec-switch.
(defmethod relocate fort-elec-switch ((obj fort-elec-switch) (arg0 int))
(if (nonzero? (-> obj l-bolt))
(&+! (-> obj l-bolt) arg0)
)
(the-as fort-elec-switch ((method-of-type process-drawable relocate) obj arg0))
)
;; definition for method 11 of type fort-elec-switch
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-elec-switch ((obj fort-elec-switch) (arg0 entity-actor))
(local-vars (sv-16 res-tag))
(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 bot 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 8192.0 0.0 12288.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-fort-elec-switch" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj notify-actor) (entity-actor-lookup arg0 'alt-actor 0))
(set! (-> obj tank-actor) (entity-actor-lookup arg0 'alt-actor 1))
(set! sv-16 (new 'static 'res-tag))
(let ((v1-11 (res-lump-data (-> obj entity) 'actor-groups pointer :tag-ptr (& sv-16))))
(cond
((and v1-11 (nonzero? (-> sv-16 elt-count)))
(set! (-> obj switch-group) (the-as (pointer actor-group) v1-11))
(set! (-> obj switch-group-count) (the-as int (-> sv-16 elt-count)))
)
(else
(set! (-> obj switch-group) (the-as (pointer actor-group) #f))
(set! (-> obj switch-group-count) 0)
0
)
)
)
(let ((a0-18 (-> obj skel root-channel 0)))
(set! (-> a0-18 frame-group) (the-as art-joint-anim (-> obj draw art-group data 2)))
(set! (-> a0-18 frame-num) 0.0)
(joint-control-channel-group! a0-18 (the-as art-joint-anim (-> obj draw art-group data 2)) num-func-identity)
)
(transform-post)
(let ((a2-8 (new 'static 'lightning-spec
:name #f
:flags (lightning-spec-flags lsf2)
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture (new 'static 'texture-id :index #x83 :page #xc)
:reduction 0.42
:num-points 8
:box-size 3072.0
:merge-factor 0.5
:merge-count 2
:radius 3072.0
:duration -1.0
:sound #f
)
)
)
(set! (-> obj l-bolt) (new 'process 'lightning-control a2-8 obj 0.0))
)
(let ((a0-20 (new 'stack-no-clear 'vector))
(v1-26 (new 'stack-no-clear 'vector))
)
(set! (-> a0-20 quad) (-> obj root-override trans quad))
(set! (-> v1-26 quad) (-> obj root-override trans quad))
(set! (-> a0-20 y) (+ 4915.2 (-> a0-20 y)))
(set! (-> v1-26 y) (+ 17203.2 (-> v1-26 y)))
(set! (-> obj l-bolt state meet data 0 quad) (-> a0-20 quad))
(let ((a0-22 (-> obj l-bolt)))
(set! (-> a0-22 state meet data (+ (-> a0-22 state points-to-draw) -1) quad) (-> v1-26 quad))
)
)
(go (method-of-object obj idle))
(none)
)
;; definition of type fort-fence
(deftype fort-fence (process-drawable)
((root-override collide-shape :offset 128)
(anim spool-anim :offset-assert 200)
(exit-anim basic :offset-assert 204)
(loading? symbol :offset-assert 208)
(tank handle :offset-assert 216)
)
:heap-base #x60
:method-count-assert 24
:size-assert #xe0
:flag-assert #x18006000e0
(:methods
(idle () _type_ :state 20)
(breaking () _type_ :state 21)
(fort-fence-method-22 (_type_) none 22)
(fort-fence-method-23 (_type_) none 23)
)
)
;; definition for method 3 of type fort-fence
(defmethod inspect fort-fence ((obj fort-fence))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tanim: ~A~%" (-> obj anim))
(format #t "~2Texit-anim: ~A~%" (-> obj exit-anim))
(format #t "~2Tloading?: ~A~%" (-> obj loading?))
(format #t "~2Ttank: ~D~%" (-> obj tank))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-fort-fence-a fort-fence fort-fence-a-lod0-jg fort-fence-a-idle-ja
((fort-fence-a-lod0-mg (meters 999999)))
:bounds (static-spherem 0 5.6 0 16)
)
;; failed to figure out what this is:
(defskelgroup skel-fort-fence-b fort-fence fort-fence-b-lod0-jg fort-fence-b-idle-ja
((fort-fence-b-lod0-mg (meters 999999)))
:bounds (static-spherem 0 11 0 18)
)
;; definition for method 22 of type fort-fence
;; WARN: Return type mismatch int vs none.
(defmethod fort-fence-method-22 fort-fence ((obj fort-fence))
0
(none)
)
;; definition for method 23 of type fort-fence
;; WARN: Return type mismatch int vs none.
(defmethod fort-fence-method-23 fort-fence ((obj fort-fence))
0
(none)
)
;; failed to figure out what this is:
(defstate idle (fort-fence)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('break)
(go-virtual breaking)
)
(('start-loading)
(set! (-> self tank) (process->handle proc))
(let ((v0-0 (the-as object #t)))
(set! (-> self loading?) (the-as symbol v0-0))
v0-0
)
)
)
)
:trans (behavior ()
(when (-> self loading?)
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) (process->ppointer self))
(set! (-> a1-0 num-params) 0)
(set! (-> a1-0 message) 'trans)
(let ((a1-1 (send-event-function (handle->process (-> self tank)) a1-0)))
(when a1-1
(let ((f0-0 (vector-vector-distance (-> self root-override trans) (the-as vector a1-1))))
(gui-control-method-12
*gui-control*
self
(gui-channel art-load)
(gui-action queue)
(-> self anim name)
0
(lerp-scale 1.0 100.0 f0-0 163840.0 327680.0)
(new 'static 'sound-id)
)
)
)
)
)
)
(none)
)
:code (the-as (function none :behavior fort-fence) sleep-code)
)
;; failed to figure out what this is:
(defstate breaking (fort-fence)
:virtual #t
:enter (behavior ()
(set! (-> self draw bounds w) 327680.0)
(let* ((a0-0 (the-as collide-shape-prim-group (-> self root-override root-prim)))
(v1-4 (-> a0-0 child 0))
)
(let ((a0-2 (-> a0-0 child 1)))
(set! (-> a0-2 prim-core collide-as) (-> v1-4 prim-core collide-as))
)
(set! (-> v1-4 prim-core collide-as) (collide-spec))
)
0
(none)
)
:exit (behavior ()
(let ((a0-0 (-> self anim)))
(when (and a0-0 (= (-> *setting-control* user-current spooling) (process->ppointer self)))
(ja-abort-spooled-anim a0-0 (the-as art-joint-anim #f) -1)
(ja-channel-set! 1)
(ja :group! (-> self exit-anim) :num! min)
)
)
(none)
)
:code (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(ja-play-spooled-anim
(-> self anim)
(ja-group)
(the-as art-joint-anim (-> self exit-anim))
(the-as (function process-drawable symbol) false-func)
)
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
(none)
)
:post (the-as (function none :behavior fort-fence) transform-post)
)
;; definition for method 11 of type fort-fence
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-fence ((obj fort-fence) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(fort-fence-method-23 obj)
(process-drawable-from-entity! obj arg0)
(fort-fence-method-22 obj)
(process-entity-status! obj (entity-perm-status no-kill) #t)
(set! (-> obj loading?) #f)
(let ((a0-6 (-> obj skel root-channel 0)))
(set! (-> a0-6 frame-group) (if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
num-func-identity
)
)
(transform-post)
(go (method-of-object obj idle))
(none)
)
;; definition of type fort-fence-a
(deftype fort-fence-a (fort-fence)
()
:heap-base #x60
:method-count-assert 24
:size-assert #xe0
:flag-assert #x18006000e0
)
;; definition for method 3 of type fort-fence-a
(defmethod inspect fort-fence-a ((obj fort-fence-a))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type fort-fence inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition of type fort-fence-b
(deftype fort-fence-b (fort-fence)
()
:heap-base #x60
:method-count-assert 24
:size-assert #xe0
:flag-assert #x18006000e0
)
;; definition for method 3 of type fort-fence-b
(defmethod inspect fort-fence-b ((obj fort-fence-b))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type fort-fence inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; definition for method 22 of type fort-fence-a
;; WARN: Return type mismatch int vs none.
(defmethod fort-fence-method-22 fort-fence-a ((obj fort-fence-a))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-fence-a" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj anim)
(new 'static 'spool-anim :name "fort-fence-a" :anim-name "a-break" :parts 2 :command-list '())
)
(set! (-> obj exit-anim) (-> obj draw art-group data 3))
0
(none)
)
;; definition for method 22 of type fort-fence-b
;; WARN: Return type mismatch int vs none.
(defmethod fort-fence-method-22 fort-fence-b ((obj fort-fence-b))
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-fence-b" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj anim)
(new 'static 'spool-anim :name "fort-fence-b" :anim-name "b-break" :parts 2 :command-list '())
)
(set! (-> obj exit-anim) (-> obj draw art-group data 8))
0
(none)
)
;; definition for method 23 of type fort-fence-a
;; WARN: Return type mismatch int vs none.
(defmethod fort-fence-method-23 fort-fence-a ((obj fort-fence-a))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 22937.6 0.0 65536.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 3)
(set-vector! (-> v1-7 local-sphere) 0.0 22937.6 0.0 65536.0)
)
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core action) (collide-action solid))
(set! (-> v1-9 transform-index) 3)
(set-vector! (-> v1-9 local-sphere) 0.0 22937.6 0.0 65536.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-12 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
;; definition for method 23 of type fort-fence-b
;; WARN: Return type mismatch int vs none.
(defmethod fort-fence-method-23 fort-fence-b ((obj fort-fence-b))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 22937.6 0.0 65536.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle camera-blocker))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 13)
(set-vector! (-> v1-7 local-sphere) 0.0 -16384.0 0.0 73728.0)
)
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core action) (collide-action solid))
(set! (-> v1-9 transform-index) 13)
(set-vector! (-> v1-9 local-sphere) 0.0 -16384.0 0.0 73728.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-12 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
@@ -0,0 +1,509 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type fort-plat-orbit
(deftype fort-plat-orbit (process-drawable)
((sync sync-linear :inline :offset-assert 200)
)
:heap-base #x60
:method-count-assert 21
:size-assert #xd8
:flag-assert #x15006000d8
(:methods
(idle () _type_ :state 20)
)
)
;; definition for method 3 of type fort-plat-orbit
(defmethod inspect fort-plat-orbit ((obj fort-plat-orbit))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tsync: #<sync-linear @ #x~X>~%" (-> obj sync))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-fort-plat-orbit fort-plat-orbit fort-plat-orbit-lod0-jg fort-plat-orbit-idle-ja
((fort-plat-orbit-lod0-mg (meters 999999)))
:bounds (static-spherem 0 16 0 22)
)
;; failed to figure out what this is:
(defstate idle (fort-plat-orbit)
:virtual #t
:trans (the-as (function none :behavior fort-plat-orbit) rider-trans)
:code (behavior ()
(until #f
(let ((f30-0 (the float (ja-num-frames 0))))
(cond
((logtest? (actor-option user17) (-> self fact options))
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 num-func) num-func-identity)
(let ((f0-4 (+ (- 0.5 (* (get-current-phase-no-mod (-> self sync)) f30-0)) f30-0)))
(set! (-> gp-0 frame-num) (- f0-4 (* (the float (the int (/ f0-4 f30-0))) f30-0)))
)
)
)
(else
(ja :num-func num-func-identity :frame-num (* (get-current-phase-no-mod (-> self sync)) f30-0))
)
)
)
(update! (-> self sound))
(suspend)
)
#f
(none)
)
:post (the-as (function none :behavior fort-plat-orbit) rider-post)
)
;; definition for method 11 of type fort-plat-orbit
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-plat-orbit ((obj fort-plat-orbit) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0)))
(set! (-> s4-0 total-prims) (the-as uint 6))
(set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher))
(set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> s3-0 prim-core action) (collide-action solid rideable))
(set-vector! (-> s3-0 local-sphere) 0.0 65536.0 0.0 90112.0)
(set! (-> s4-0 root-prim) s3-0)
)
(pusher-init s4-0)
(let ((v1-14 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-14 prim-core action) (collide-action solid rideable))
(set! (-> v1-14 transform-index) 5)
(set-vector! (-> v1-14 local-sphere) 0.0 0.0 -16384.0 36864.0)
)
(let ((v1-16 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-16 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-16 prim-core action) (collide-action solid rideable))
(set! (-> v1-16 transform-index) 6)
(set-vector! (-> v1-16 local-sphere) -16384.0 0.0 0.0 36864.0)
)
(let ((v1-18 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-18 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-18 prim-core action) (collide-action solid rideable))
(set! (-> v1-18 transform-index) 7)
(set-vector! (-> v1-18 local-sphere) 0.0 0.0 16384.0 36864.0)
)
(let ((v1-20 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-20 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-20 prim-core action) (collide-action solid rideable))
(set! (-> v1-20 transform-index) 8)
(set-vector! (-> v1-20 local-sphere) 16384.0 0.0 0.0 36864.0)
)
(let ((v1-22 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-22 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-22 prim-core action) (collide-action solid rideable))
(set! (-> v1-22 transform-index) 4)
(set-vector! (-> v1-22 local-sphere) 0.0 36864.0 0.0 49152.0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-25 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-25 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-25 prim-core collide-with))
)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-plat-orbit" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj fact)
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
)
(let ((a1-23 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-34 0))
(if #t
(set! v1-34 (logior v1-34 1))
)
(set! (-> a1-23 sync-type) (the-as basic 'sync-linear))
(set! (-> a1-23 sync-flags) (the-as sync-flags v1-34))
)
(set! (-> a1-23 entity) (-> obj entity))
(set! (-> a1-23 period) (the-as uint 6000))
(set! (-> a1-23 percent) 0.0)
(initialize! (-> obj sync) a1-23)
)
(let ((a0-48 (-> obj skel root-channel 0)))
(set! (-> a0-48 frame-group) (the-as art-joint-anim (-> obj draw art-group data 2)))
(set! (-> a0-48 frame-num) 0.0)
(joint-control-channel-group! a0-48 (the-as art-joint-anim (-> obj draw art-group data 2)) num-func-identity)
)
(transform-post)
(set! (-> obj sound)
(new 'process 'ambient-sound (static-sound-spec "plat-orbit" :fo-max 70) (-> obj root trans))
)
(go (method-of-object obj idle))
(none)
)
;; definition of type fort-plat-shuttle-plat
(deftype fort-plat-shuttle-plat (process-drawable)
((path-pos float :offset-assert 200)
(path-speed float :offset-assert 204)
)
:heap-base #x50
:method-count-assert 21
:size-assert #xd0
:flag-assert #x15005000d0
(:methods
(idle () _type_ :state 20)
)
)
;; definition for method 3 of type fort-plat-shuttle-plat
(defmethod inspect fort-plat-shuttle-plat ((obj fort-plat-shuttle-plat))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tpath-pos: ~f~%" (-> obj path-pos))
(format #t "~2Tpath-speed: ~f~%" (-> obj path-speed))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-fort-plat-shuttle fort-plat-shuttle fort-plat-shuttle-lod0-jg fort-plat-shuttle-idle-ja
((fort-plat-shuttle-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -0.5 0 7.6)
)
;; failed to figure out what this is:
(defstate idle (fort-plat-shuttle-plat)
:virtual #t
:trans (the-as (function none :behavior fort-plat-shuttle-plat) rider-trans)
:code (behavior ()
(until (< 1.0 (-> self path-pos))
(suspend)
)
(cleanup-for-death self)
(none)
)
:post (behavior ()
(+! (-> self path-pos) (* (-> self path-speed) (-> self clock seconds-per-frame)))
(let* ((f0-2 (-> self path-pos))
(f30-0 (if (< 0.5 f0-2)
(- 1.0 f0-2)
f0-2
)
)
(f0-4 (total-distance (-> self path)))
(f0-6 (fmin 40960.0 (* f30-0 f0-4)))
(f0-7 (lerp-scale 0.0 1.0 f0-6 0.0 40960.0))
)
(set-vector! (-> self draw color-mult) f0-7 f0-7 f0-7 1.0)
)
(get-point-in-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp)
(update-trans! (-> self sound) (-> self root trans))
(update! (-> self sound))
(rider-post)
(none)
)
)
;; definition for function fort-plat-shuttle-plat-init-by-other
;; WARN: Return type mismatch object vs none.
(defbehavior fort-plat-shuttle-plat-init-by-other fort-plat-shuttle-plat ((arg0 float))
(rlet ((vf0 :class vf))
(init-vf0-vector)
(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 bot 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 -2048.0 0.0 31129.6)
(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)
)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-fort-plat-shuttle" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> self path) (new 'process 'path-control self 'path 0.0 (the-as entity #f) #f))
(set! (-> self path-pos) arg0)
(get-point-in-path! (-> self path) (-> self root trans) arg0 'interp)
(set! (-> self path-speed) (/ 24576.0 (total-distance (-> self path))))
(.svf (&-> (-> self draw color-mult) quad) vf0)
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self draw light-index) (the-as uint 1))
(set! (-> self sound)
(new 'process 'ambient-sound (static-sound-spec "plat-shuttle" :fo-max 70) (-> self root trans))
)
(go-virtual idle)
(none)
)
)
;; definition of type fort-plat-shuttle
(deftype fort-plat-shuttle (process-drawable)
((next-spawn-time time-frame :offset-assert 200)
(sync sync-linear :inline :offset-assert 208)
)
:heap-base #x60
:method-count-assert 23
:size-assert #xe0
:flag-assert #x17006000e0
(:methods
(dormant () _type_ :state 20)
(idle () _type_ :state 21)
(fort-plat-shuttle-method-22 (_type_) symbol 22)
)
)
;; definition for method 3 of type fort-plat-shuttle
(defmethod inspect fort-plat-shuttle ((obj fort-plat-shuttle))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tnext-spawn-time: ~D~%" (-> obj next-spawn-time))
(format #t "~2Tsync: #<sync-linear @ #x~X>~%" (-> obj sync))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defstate dormant (fort-plat-shuttle)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('trigger)
(go-virtual idle)
)
)
)
:code (the-as (function none :behavior fort-plat-shuttle) sleep-code)
)
;; failed to figure out what this is:
(defstate idle (fort-plat-shuttle)
:virtual #t
:enter (behavior ()
(fort-plat-shuttle-method-22 self)
(set! (-> self next-spawn-time) (get-timeframe-offset! (-> self sync) 0))
(none)
)
:trans (behavior ()
(when (>= (-> self clock frame-counter) (-> self next-spawn-time))
(process-spawn fort-plat-shuttle-plat 0 :to self)
(set! (-> self next-spawn-time) (get-timeframe-offset! (-> self sync) 0))
)
(none)
)
:code (the-as (function none :behavior fort-plat-shuttle) sleep-code)
)
;; definition for method 22 of type fort-plat-shuttle
(defmethod fort-plat-shuttle-method-22 fort-plat-shuttle ((obj fort-plat-shuttle))
(with-pp
(let* ((f28-0 (total-distance (-> obj path)))
(s5-0 (-> obj sync))
(f26-0 81.92)
(a0-3 (- (-> pp clock frame-counter) (get-timeframe-offset! s5-0 0)))
(v1-6 (-> s5-0 period))
(f30-0 (/ (* f26-0 (the float a0-3)) f28-0))
(f28-1 (/ (* f26-0 (the float v1-6)) f28-0))
)
(while (>= 1.0 f30-0)
(if (>= f30-0 0.0)
(process-spawn fort-plat-shuttle-plat f30-0 :to obj)
)
(+! f30-0 f28-1)
)
)
#f
)
)
;; definition for method 11 of type fort-plat-shuttle
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! fort-plat-shuttle ((obj fort-plat-shuttle) (arg0 entity-actor))
(local-vars (sv-64 int))
(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-fort-plat-shuttle" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj fact)
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
)
(let ((s4-1 (new 'stack-no-clear 'sync-info-params)))
(let ((s3-1 1200))
0.0
(set! sv-64 0)
(let ((v1-7 (res-lump-data arg0 'sync (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-64)))))
(when v1-7
(set! s3-1 (the int (* 300.0 (-> v1-7 0))))
(-> v1-7 1)
)
)
(let ((v1-8 0))
(if #t
(set! v1-8 (logior v1-8 1))
)
(set! (-> s4-1 sync-type) (the-as basic 'sync-linear))
(set! (-> s4-1 sync-flags) (the-as sync-flags v1-8))
)
(set! (-> s4-1 entity) arg0)
(set! (-> s4-1 period) (the-as uint s3-1))
)
(set! (-> s4-1 percent) 0.0)
(initialize! (-> obj sync) s4-1)
)
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0 (the-as entity #f) #f))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(logclear! (-> obj mask) (process-mask actor-pause))
(if (logtest? (actor-option user17) (-> obj fact options))
(go (method-of-object obj dormant))
(go (method-of-object obj idle))
)
(none)
)
;; definition of type fort-conveyor
(deftype fort-conveyor (conveyor)
()
:heap-base #x80
:method-count-assert 28
:size-assert #x100
:flag-assert #x1c00800100
)
;; definition for method 3 of type fort-conveyor
(defmethod inspect fort-conveyor ((obj fort-conveyor))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type conveyor inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-fort-conveyor fort-conveyor fort-conveyor-lod0-jg fort-conveyor-idle-ja
((fort-conveyor-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 36)
)
;; definition for method 22 of type fort-conveyor
(defmethod get-art-group fort-conveyor ((obj fort-conveyor))
"@returns The respective [[art-group]] for the [[conveyor]]"
(art-group-get-by-name *level* "skel-fort-conveyor" (the-as (pointer uint32) #f))
)
;; definition for method 23 of type fort-conveyor
;; WARN: Return type mismatch collide-shape-moving vs none.
(defmethod reset-root! fort-conveyor ((obj fort-conveyor))
"Re-initializes the `root` [[trsqv]]"
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(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 pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 69632.0 90112.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-15 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-15 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-15 prim-core collide-with))
)
(set! (-> s5-0 rider-max-momentum) 8192.0)
(set! (-> obj root) s5-0)
)
(none)
)
;; definition for method 24 of type fort-conveyor
;; WARN: Return type mismatch vector vs none.
(defmethod init! fort-conveyor ((obj fort-conveyor))
"Initializes defaults for things like the `speed` and `belt-radius`"
(set! (-> obj belt-radius) 24576.0)
(set! (-> obj pull-y-threshold) 16384.0)
(cond
((name= (-> obj name) "fort-conveyor-2")
(set! (-> obj speed) -21299.2)
(set-vector! (-> obj root scale) 1.0 1.0 0.9 1.0)
)
((name= (-> obj name) "fort-conveyor-3")
(set! (-> obj speed) -18432.0)
(set-vector! (-> obj root scale) 1.0 1.0 0.79 1.0)
)
)
(none)
)
;; definition for method 25 of type fort-conveyor
(defmethod set-and-get-ambient-sound! fort-conveyor ((obj fort-conveyor))
"So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]]
and return it as well. Otherwise, set it to `0`"
(let* ((s5-0 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) 0.0 'interp))
(v1-2 (get-point-in-path! (-> obj path) (new 'stack-no-clear 'vector) 1.0 'interp))
(a3-3 (vector+! (new 'stack-no-clear 'vector) s5-0 v1-2))
)
(vector-float*! a3-3 a3-3 0.5)
(let ((v0-2 (new 'process 'ambient-sound (static-sound-spec "fort-conveyor" :fo-max 50) a3-3)))
(set! (-> obj sound) v0-2)
v0-2
)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -143,7 +143,7 @@
(lambda :behavior hide-light
()
(let ((v0-0 (-> self node-list data)))
(set! (-> v0-0 0 param0) (the-as (function cspace matrix none) cspace<-parent-joint!))
(set! (-> v0-0 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!))
(set! (-> v0-0 0 param1) (the-as basic (-> self parent)))
(set! (-> v0-0 0 param2) (the-as basic 12))
v0-0
+6 -2
View File
@@ -212,6 +212,8 @@
"(method 16 level)", "unpack-comp-lzo", // asm mods
"update-time-of-day",
"draw-2d-hud", // unused / dma casts needed
"close-sky-buffer", // asm
"(method 29 level)", "(method 9 level)", "level-update-after-load", "(method 25 level)", "(method 9 level)",
"(method 12 level)", "(method 10 level)",
@@ -264,9 +266,11 @@
"(method 43 nav-mesh)",
"(method 34 nav-mesh)",
"(method 18 nav-control)",
"(method 3 rhino)",
"(method 202 crimson-guard-level)", // vector-dot
"(method 10 idle-control)", // re-assigns `self`
"(method 3 rhino)"
"(method 60 fort-turret)", // they defined the same method twice in the same file, identical impl, just returns #f
"(method 23 dig-tether)" // working around annoying decomp array output
],
"skip_compile_states": {