mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 06:05:15 -04:00
decomp3: traffic/citizen/faction code, desert-rescue (#3506)
- `cty-faction-h` - `nav-graph` - `citizen-h` - `citizen` - `civilian` - `traffic-engine` - `traffic-manager` - `cty-attack-controller` - `cty-faction` - `formation-object` - `formations` - `squad-control-city-h` - `squad-control-city` - `traffic-util` - `wlander-female` - `wlander-h` - `wlander-male` - `speech-manager` - `desert-rescue` - `desresc-path` - `neo-satellite` - `rope-prim-system-h` - `rope-prim-system` - `rope-system` - `wland-passenger` - `cty-guard-projectile` - `ctywide-init` - `ff-squad-control` - `guard-grenade` - `guard-rifle` - `guard-states` - `guard-tazer` - `ctywide-speech` - `citizen-chick` - `citizen-fat` - `citizen-norm` - `guard` - `bike` - `car` - `test-bike` - `vehicle-rider` - `desert-rescue-bbush` - `ff-squad-control-h` - `flee-info` - `guard-h` - `mission-squad-control` - `kg-squad-control` - `kg-squad-member-h` - `kg-squad-member` - `mh-squad-control` - `mh-squad-member-h` - `mh-squad-member` - `ctywide-obs-h` - `ctywide-obs` - `ctywide-part` - `ctywide-scenes` - `ctywide-tasks` - `ctywide-texture` - `billiards` - `guide-arrow` - `kg-vehicles` - `flying-turret` - `roboguard-city` - `citizen-enemy` - `metalhead-flitter` - `metalhead-grunt` - `metalhead-predator` - `spydroid` - `kg-squad-control-h` - `mh-squad-control-h` - `krimson-wall` - `ctyport-obs` - `ctyinda-obs` - `ctyinda-part` - `ctyindb-obs` - `ctyindb-part` - `ctyport-attack` - `h-torpedo` - `ctyport-part` - `ctyport-scenes` - `external-player-control` - `desert-chase-path-h` - `desert-chase-path` - `desert-chase` - `desert-jump` - `wcar-catapult` - `bombbot-h` - `bombbot` - `bombbot-path` - `cty-hijack-missile` - `cty-hijack` - `ctyport-attack-bbush` - `ctysluma-part` - `ctyslumb-part` - `ctyslumc-obs` - `ctyslumc-part` - `searchlight` - `cty-destroy-grid` - `ctyfarm-obs` - `ctyfarma-part` - `ctyfarmb-part` - `freehq-part` - `freehq-scenes` - `onintent-scenes` - `onintent-part` - `cty-sniper-battery` - `cty-sniper-turret` - `intro-obs` - `intro-part` - `intro-scenes` - `palcab-part` - `palroof-part`
This commit is contained in:
+3118
-3176
File diff suppressed because it is too large
Load Diff
@@ -864,5 +864,80 @@
|
||||
[22, "(function game-task object)"],
|
||||
[26, "(function vector :behavior manipy)"],
|
||||
[30, "(function object :behavior manipy)"]
|
||||
]
|
||||
],
|
||||
"ff-squad-control": [
|
||||
[6, "(function process-focusable traffic-object-type-info none)"],
|
||||
[7, "(function process-focusable traffic-object-type-info none)"],
|
||||
[8, "(function process-focusable traffic-object-type-info none)"],
|
||||
[9, "(function crimson-guard traffic-object-type-info none)"]
|
||||
],
|
||||
"guard": [
|
||||
[31, "(function crimson-guard collide-shape vector symbol)"],
|
||||
[49, "(function process city-attacker-info int)"]
|
||||
],
|
||||
"guard-tazer": [
|
||||
[7, "(function collide-shape-prim none)"],
|
||||
[13, "(function collide-shape-prim none)"]
|
||||
],
|
||||
"roboguard-city": [
|
||||
[13, "(function cspace transformq none)"],
|
||||
[78, "(function roboguard-city symbol quaternion :behavior process)"]
|
||||
],
|
||||
"ctywide-obs": [[93, "(function symbol)"]],
|
||||
"ctywide-scenes": [
|
||||
[1, "(function none :behavior scene-player)"],
|
||||
[2, "(function none :behavior scene-player)"],
|
||||
[3, "(function none :behavior scene-player)"]
|
||||
],
|
||||
"ctyport-obs": [[5, "(function collide-shape-prim none)"]],
|
||||
"ctyport-scenes": [
|
||||
[3, "(function none :behavior scene-player)"],
|
||||
[4, "(function none :behavior scene-player)"],
|
||||
[5, "(function none :behavior scene-player)"],
|
||||
[6, "(function none :behavior scene-player)"]
|
||||
],
|
||||
"ctyport-attack": [[45, "(function object :behavior process)"]],
|
||||
"intro-scenes": [
|
||||
[0, "(function none :behavior scene-player)"],
|
||||
[1, "(function none :behavior scene-player)"],
|
||||
[2, "(function none :behavior scene-player)"],
|
||||
[3, "(function none :behavior scene-player)"],
|
||||
[4, "(function none :behavior scene-player)"],
|
||||
[5, "(function none :behavior scene-player)"],
|
||||
[6, "(function none :behavior scene-player)"],
|
||||
[7, "(function none :behavior scene-player)"],
|
||||
[8, "(function none :behavior scene-player)"],
|
||||
[9, "(function none :behavior scene-player)"],
|
||||
[10, "(function none :behavior scene-player)"],
|
||||
[11, "(function none :behavior scene-player)"],
|
||||
[12, "(function none :behavior scene-player)"],
|
||||
[13, "(function none :behavior scene-player)"],
|
||||
[14, "(function none :behavior scene-player)"],
|
||||
[15, "(function none :behavior scene-player)"],
|
||||
[16, "(function none :behavior scene-player)"],
|
||||
[17, "(function none :behavior scene-player)"],
|
||||
[18, "(function none :behavior scene-player)"],
|
||||
[19, "(function none :behavior scene-player)"],
|
||||
[20, "(function none :behavior scene-player)"],
|
||||
[21, "(function none :behavior scene-player)"],
|
||||
[22, "(function none :behavior scene-player)"],
|
||||
[23, "(function none :behavior scene-player)"],
|
||||
[24, "(function none :behavior scene-player)"],
|
||||
[25, "(function none :behavior scene-player)"],
|
||||
[26, "(function none :behavior scene-player)"],
|
||||
[27, "(function none :behavior scene-player)"],
|
||||
[28, "(function none :behavior scene-player)"],
|
||||
[29, "(function none :behavior scene-player)"],
|
||||
[30, "(function none :behavior scene-player)"],
|
||||
[31, "(function none :behavior scene-player)"],
|
||||
[32, "(function none :behavior scene-player)"],
|
||||
[33, "(function none :behavior scene-player)"],
|
||||
[34, "(function none :behavior scene-player)"],
|
||||
[35, "(function none :behavior scene-player)"],
|
||||
[36, "(function none :behavior scene-player)"],
|
||||
[37, "(function none :behavior scene-player)"],
|
||||
[38, "(function none :behavior scene-player)"],
|
||||
[39, "(function none :behavior scene-player)"]
|
||||
],
|
||||
"freehq-scenes": [[0, "(function none :behavior scene-player)"]]
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
"maker": "dm-robot-ag",
|
||||
"mh-wasp": "neo-wasp-ag",
|
||||
"factory-boss": "errol-lowres-ag",
|
||||
"fac-robotank-turret": "fac-robotank-ag"
|
||||
"fac-robotank-turret": "fac-robotank-ag",
|
||||
"neo-sat-shield": "neo-satellite-shield-ag",
|
||||
"neo-sat": "neo-satellite-ag"
|
||||
},
|
||||
|
||||
// remap names for types in an entire file (higher priority)
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
"(method 10 manipulator)",
|
||||
"(method 46 ff-squad-control)",
|
||||
"(method 33 rub-tower)",
|
||||
"(method 261 crimson-guard)",
|
||||
"memcpy"
|
||||
],
|
||||
|
||||
@@ -225,7 +224,10 @@
|
||||
"update-sound-info",
|
||||
"insert-into-sound-list",
|
||||
// title-obs
|
||||
"(anon-function 22 title-obs)"
|
||||
"(anon-function 22 title-obs)",
|
||||
"cty-faction-evaluate-commands",
|
||||
"traffic-manager-event-handler",
|
||||
"(method 20 cty-faction-manager)"
|
||||
],
|
||||
|
||||
// If format is used with the wrong number of arguments,
|
||||
@@ -448,7 +450,21 @@
|
||||
"generic-merc-execute-all": [7, 15],
|
||||
"check-enemy": [0, 1],
|
||||
"(method 91 h-warf)": [0],
|
||||
"(method 51 h-warf)": [5]
|
||||
"(method 51 h-warf)": [5],
|
||||
"(method 44 nav-graph)": [0, 7, 8, 26, 34],
|
||||
"(method 15 city-level-info)": [0, 1, 2, 6, 7, 9, 11, 13],
|
||||
"(method 10 traffic-suppressor)": [0, 1, 2, 4],
|
||||
"(method 18 traffic-tracker)": [5, 6, 7, 8],
|
||||
"(method 21 traffic-tracker)": [0],
|
||||
"(method 9 cty-faction-manager)": [8],
|
||||
"(method 46 traffic-engine)": [0, 1, 2, 4],
|
||||
"(method 42 traffic-engine)": [6],
|
||||
"(method 17 traffic-manager)": [7, 19, 27, 28, 29, 30, 41],
|
||||
"(anon-function 10 guard-rifle)": [9],
|
||||
"(method 261 crimson-guard)": [52, 64],
|
||||
"(anon-function 13 metalhead-predator)": [24, 25],
|
||||
"(anon-function 90 ctywide-obs)": [4],
|
||||
"(anon-function 10 cty-sniper-turret)": [44]
|
||||
},
|
||||
|
||||
// Sometimes the game might use format strings that are fetched dynamically,
|
||||
@@ -544,7 +560,13 @@
|
||||
"(method 32 task-manager-dark-punch-training)": [[53, 0]],
|
||||
"(method 32 task-manager-lightjak-training-shield)": [[53, 0]],
|
||||
"(trans credits highres-viewer-manager)": [[185, 0]],
|
||||
"(trans idle hirez-viewer)": [[356, 0]]
|
||||
"(trans idle hirez-viewer)": [[356, 0]],
|
||||
"(trans idle burning-bush)": [
|
||||
[171, 1],
|
||||
[202, 0]
|
||||
],
|
||||
"(method 33 task-manager-bbush-board)": [[86, 0]],
|
||||
"(method 17 board-score-hud)": [[71, 0]]
|
||||
},
|
||||
|
||||
"mips2c_functions_by_name": [
|
||||
|
||||
@@ -37,34 +37,34 @@
|
||||
"DGO/DESA.DGO",
|
||||
"DGO/DESB.DGO",
|
||||
"DGO/DESBATTL.DGO",
|
||||
// "DGO/DESBCST.DGO",
|
||||
"DGO/DESBCST.DGO",
|
||||
"DGO/DESBOSS1.DGO",
|
||||
"DGO/DESBOSS2.DGO",
|
||||
// "DGO/DESC.DGO",
|
||||
"DGO/DESC.DGO",
|
||||
"DGO/DESCHASE.DGO",
|
||||
"DGO/DESD.DGO",
|
||||
// "DGO/DESE.DGO",
|
||||
// "DGO/DESERROL.DGO",
|
||||
"DGO/DESE.DGO",
|
||||
"DGO/DESERROL.DGO",
|
||||
"DGO/DESF.DGO",
|
||||
"DGO/DESG.DGO",
|
||||
// "DGO/DESH.DGO",
|
||||
"DGO/DESH.DGO",
|
||||
"DGO/DESHOVER.DGO",
|
||||
// "DGO/DESHUNT.DGO",
|
||||
"DGO/DESHUNT.DGO",
|
||||
"DGO/DESINTER.DGO",
|
||||
// "DGO/DESJUMP.DGO",
|
||||
"DGO/DESJUMP.DGO",
|
||||
"DGO/DESLIZ.DGO",
|
||||
"DGO/DESOASIS.DGO",
|
||||
"DGO/DESRACE1.DGO",
|
||||
"DGO/DESRACE2.DGO",
|
||||
"DGO/DESRALLY.DGO",
|
||||
"DGO/DESRESC.DGO",
|
||||
// "DGO/DESRESCC.DGO",
|
||||
// "DGO/DESRESCG.DGO",
|
||||
"DGO/DESRESCC.DGO",
|
||||
"DGO/DESRESCG.DGO",
|
||||
"DGO/DESTRACK.DGO",
|
||||
"DGO/DESW.DGO",
|
||||
"DGO/DST.DGO",
|
||||
"DGO/OASISCST.DGO",
|
||||
// "DGO/WARPCAST.DGO", // air train
|
||||
"DGO/WARPCAST.DGO", // air train
|
||||
// nest
|
||||
"DGO/NSA.DGO",
|
||||
"DGO/NSB.DGO",
|
||||
@@ -117,10 +117,10 @@
|
||||
"DGO/GUNGAME2.DGO",
|
||||
"DGO/POWERGD.DGO",
|
||||
"DGO/FREEHQ.DGO",
|
||||
// "DGO/FREECAST.DGO",
|
||||
// "DGO/CITYCAST.DGO",
|
||||
// "DGO/GRIDCST.DGO", // city-destroy-grid-res
|
||||
// "DGO/SLUMBSET.DGO", // sewer-met-hum-intro
|
||||
"DGO/FREECAST.DGO",
|
||||
"DGO/CITYCAST.DGO",
|
||||
"DGO/GRIDCST.DGO", // city-destroy-grid-res
|
||||
"DGO/SLUMBSET.DGO", // sewer-met-hum-intro
|
||||
// sewer
|
||||
"DGO/SEA.DGO",
|
||||
"DGO/SEB.DGO",
|
||||
@@ -207,7 +207,7 @@
|
||||
// test
|
||||
"DGO/HALFPIPE.DGO",
|
||||
// borrow
|
||||
// "DGO/LASHELIN.DGO",
|
||||
"DGO/LASHELIN.DGO",
|
||||
"DGO/LBBRING1.DGO",
|
||||
"DGO/LBBRING2.DGO",
|
||||
"DGO/LBBRING3.DGO",
|
||||
@@ -225,27 +225,27 @@
|
||||
"DGO/LBBTCHA2.DGO",
|
||||
"DGO/LBBTCHA3.DGO",
|
||||
"DGO/LBIPED.DGO",
|
||||
// "DGO/LBLOWCST.DGO",
|
||||
// "DGO/LBLOWTKG.DGO",
|
||||
// "DGO/LBLOWTMH.DGO",
|
||||
// "DGO/LBOMBBOT.DGO",
|
||||
// "DGO/LCITYSML.DGO",
|
||||
// "DGO/LCTYASS.DGO",
|
||||
// "DGO/LCTYBLOW.DGO",
|
||||
"DGO/LBLOWCST.DGO",
|
||||
"DGO/LBLOWTKG.DGO",
|
||||
"DGO/LBLOWTMH.DGO",
|
||||
"DGO/LBOMBBOT.DGO",
|
||||
"DGO/LCITYSML.DGO",
|
||||
"DGO/LCTYASS.DGO",
|
||||
"DGO/LCTYBLOW.DGO",
|
||||
"DGO/LCTYDEST.DGO",
|
||||
// "DGO/LCTYHIJK.DGO",
|
||||
// "DGO/LCTYPALT.DGO",
|
||||
// "DGO/LCTYPATK.DGO",
|
||||
// "DGO/LCTYPROT.DGO",
|
||||
// "DGO/LCTYSNPR.DGO",
|
||||
// "DGO/LDAMKLEV.DGO",
|
||||
// "DGO/LDAMPECK.DGO",
|
||||
// "DGO/LDAMPKSM.DGO",
|
||||
// "DGO/LDAMSIG.DGO",
|
||||
"DGO/LCTYHIJK.DGO",
|
||||
"DGO/LCTYPALT.DGO",
|
||||
"DGO/LCTYPATK.DGO",
|
||||
"DGO/LCTYPROT.DGO",
|
||||
"DGO/LCTYSNPR.DGO",
|
||||
"DGO/LDAMKLEV.DGO",
|
||||
"DGO/LDAMPECK.DGO",
|
||||
"DGO/LDAMPKSM.DGO",
|
||||
"DGO/LDAMSIG.DGO",
|
||||
"DGO/LDAX.DGO",
|
||||
// "DGO/LDESGCST.DGO",
|
||||
// "DGO/LDMPCKGN.DGO",
|
||||
// "DGO/LERROL.DGO",
|
||||
"DGO/LDESGCST.DGO",
|
||||
"DGO/LDMPCKGN.DGO",
|
||||
"DGO/LERROL.DGO",
|
||||
"DGO/LFACB.DGO",
|
||||
"DGO/LFACCAR.DGO",
|
||||
"DGO/LFACCITY.DGO",
|
||||
@@ -255,23 +255,23 @@
|
||||
"DGO/LFACTORY.DGO",
|
||||
"DGO/LFORM.DGO",
|
||||
"DGO/LFORP.DGO",
|
||||
// "DGO/LFORRING.DGO",
|
||||
"DGO/LFORRING.DGO",
|
||||
"DGO/LFREEOUT.DGO",
|
||||
// "DGO/LGUNNORM.DGO",
|
||||
// "DGO/LGUNRNC.DGO",
|
||||
"DGO/LGUNNORM.DGO",
|
||||
"DGO/LGUNRNC.DGO",
|
||||
"DGO/LJAK.DGO",
|
||||
"DGO/LJAKC.DGO",
|
||||
"DGO/LJAKCKLV.DGO",
|
||||
"DGO/LJAKKLEV.DGO",
|
||||
"DGO/LJAKNDAX.DGO",
|
||||
"DGO/LJAKSIG.DGO",
|
||||
// "DGO/LJINX.DGO",
|
||||
// "DGO/LJKCDMKL.DGO",
|
||||
// "DGO/LJKDMPK.DGO",
|
||||
// "DGO/LJKDXVIN.DGO",
|
||||
"DGO/LJINX.DGO",
|
||||
"DGO/LJKCDMKL.DGO",
|
||||
"DGO/LJKDMPK.DGO",
|
||||
"DGO/LJKDXVIN.DGO",
|
||||
"DGO/LJKFEET.DGO",
|
||||
// "DGO/LJNDKLEV.DGO",
|
||||
// "DGO/LKEIRA.DGO",
|
||||
"DGO/LJNDKLEV.DGO",
|
||||
"DGO/LKEIRA.DGO",
|
||||
"DGO/LKLEEVER.DGO",
|
||||
"DGO/LMECH.DGO",
|
||||
"DGO/LMHCA.DGO",
|
||||
@@ -280,34 +280,34 @@
|
||||
"DGO/LNSTOA.DGO",
|
||||
"DGO/LNSTOBB.DGO",
|
||||
"DGO/LNSTOBC.DGO",
|
||||
// "DGO/LONINSIM.DGO",
|
||||
// "DGO/LOUTRO.DGO",
|
||||
// "DGO/LOUTRO2.DGO",
|
||||
// "DGO/LOUTRO3.DGO",
|
||||
// "DGO/LPATK.DGO",
|
||||
// "DGO/LPATKCS.DGO",
|
||||
// "DGO/LPRECC.DGO",
|
||||
// "DGO/LPRENME.DGO",
|
||||
// "DGO/LPTRL.DGO",
|
||||
// "DGO/LSAMOS.DGO",
|
||||
"DGO/LONINSIM.DGO",
|
||||
"DGO/LOUTRO.DGO",
|
||||
"DGO/LOUTRO2.DGO",
|
||||
"DGO/LOUTRO3.DGO",
|
||||
"DGO/LPATK.DGO",
|
||||
"DGO/LPATKCS.DGO",
|
||||
"DGO/LPRECC.DGO",
|
||||
"DGO/LPRENME.DGO",
|
||||
"DGO/LPTRL.DGO",
|
||||
"DGO/LSAMOS.DGO",
|
||||
"DGO/LSEEMWCA.DGO",
|
||||
"DGO/LSIG.DGO",
|
||||
"DGO/LSIGJAKC.DGO",
|
||||
"DGO/LSIGKLV.DGO",
|
||||
"DGO/LSNKWHLS.DGO",
|
||||
// "DGO/LTNFXHIP.DGO",
|
||||
// "DGO/LTNJXHIP.DGO",
|
||||
"DGO/LTNFXHIP.DGO",
|
||||
"DGO/LTNJXHIP.DGO",
|
||||
"DGO/LTORN.DGO",
|
||||
// "DGO/LTORNJNX.DGO",
|
||||
// "DGO/LTORNSAM.DGO",
|
||||
"DGO/LTORNJNX.DGO",
|
||||
"DGO/LTORNSAM.DGO",
|
||||
"DGO/LTOWA.DGO",
|
||||
"DGO/LTOWB.DGO",
|
||||
"DGO/LTOWCITY.DGO",
|
||||
"DGO/LTRTWHLS.DGO",
|
||||
// "DGO/LVINCST.DGO",
|
||||
"DGO/LVINCST.DGO",
|
||||
"DGO/LWASBBV.DGO",
|
||||
"DGO/LWASSIG.DGO",
|
||||
// "DGO/LWLANDM.DGO",
|
||||
"DGO/LWLANDM.DGO",
|
||||
"DGO/LWSTDPCK.DGO"
|
||||
],
|
||||
|
||||
|
||||
@@ -1551,7 +1551,354 @@
|
||||
["L345", "vector"],
|
||||
["L346", "vector"]
|
||||
],
|
||||
"title-obs": [
|
||||
["L651", "vector"]
|
||||
"title-obs": [["L651", "vector"]],
|
||||
"formations": [["L7", "(inline-array formation-info)", 2]],
|
||||
"citizen": [["L302", "attack-info"]],
|
||||
"desert-rescue": [
|
||||
["L552", "(inline-array talker-speech-class)", 85],
|
||||
["L422", "(inline-array vector)", 50]
|
||||
],
|
||||
"neo-satellite": [
|
||||
["L808", "uint64", true],
|
||||
["L806", "uint64", true],
|
||||
["L809", "uint64", true],
|
||||
["L805", "uint64", true],
|
||||
["L807", "uint64", true],
|
||||
["L804", "uint64", true],
|
||||
["L681", "uint64", true],
|
||||
["L683", "uint64", true],
|
||||
["L666", "uint64", true],
|
||||
["L678", "uint64", true],
|
||||
["L516", "attack-info"],
|
||||
["L667", "uint64", true],
|
||||
["L665", "uint64", true],
|
||||
["L670", "uint64", true],
|
||||
["L668", "uint64", true],
|
||||
["L671", "uint64", true],
|
||||
["L680", "uint64", true],
|
||||
["L672", "uint64", true],
|
||||
["L677", "uint64", true],
|
||||
["L682", "uint64", true],
|
||||
["L674", "uint64", true],
|
||||
["L673", "uint64", true],
|
||||
["L679", "uint64", true],
|
||||
["L499", "attack-info"],
|
||||
["L676", "uint64", true],
|
||||
["L675", "uint64", true],
|
||||
["L669", "uint64", true],
|
||||
["L500", "attack-info"],
|
||||
["L501", "attack-info"]
|
||||
],
|
||||
"desert-rescue-bbush": [["L67", "(inline-array vector)", 50]],
|
||||
"guard-states": [
|
||||
["L238", "uint64", true],
|
||||
["L237", "uint64", true],
|
||||
["L239", "uint64", true]
|
||||
],
|
||||
"guard-grenade": [
|
||||
["L139", "uint64", true],
|
||||
["L138", "uint64", true],
|
||||
["L123", "uint64", true],
|
||||
["L124", "uint64", true]
|
||||
],
|
||||
"guard-rifle": [
|
||||
["L93", "uint64", true],
|
||||
["L92", "uint64", true]
|
||||
],
|
||||
"cty-guard-projectile": [["L95", "attack-info"]],
|
||||
"bike": [
|
||||
["L31", "(inline-array vector)", 2],
|
||||
["L32", "(inline-array vector)", 2]
|
||||
],
|
||||
"metalhead-flitter": [
|
||||
["L170", "vector"],
|
||||
["L171", "vector"]
|
||||
],
|
||||
"metalhead-grunt": [
|
||||
["L159", "vector"],
|
||||
["L158", "vector"]
|
||||
],
|
||||
"metalhead-predator": [
|
||||
["L189", "uint64", true],
|
||||
["L190", "uint64", true],
|
||||
["L163", "uint64", true],
|
||||
["L166", "uint64", true],
|
||||
["L165", "uint64", true],
|
||||
["L164", "uint64", true],
|
||||
["L142", "vector"],
|
||||
["L143", "vector"]
|
||||
],
|
||||
"roboguard-city": [
|
||||
["L441", "uint64", true],
|
||||
["L442", "uint64", true],
|
||||
["L403", "uint64", true],
|
||||
["L402", "uint64", true],
|
||||
["L401", "uint64", true],
|
||||
["L404", "uint64", true],
|
||||
["L405", "uint64", true]
|
||||
],
|
||||
"spydroid": [
|
||||
["L243", "vector"],
|
||||
["L242", "vector"],
|
||||
["L241", "vector"],
|
||||
["L246", "vector"],
|
||||
["L247", "vector"],
|
||||
["L251", "vector"],
|
||||
["L250", "vector"],
|
||||
["L252", "vector"],
|
||||
["L253", "vector"],
|
||||
["L254", "vector"],
|
||||
["L255", "vector"],
|
||||
["L256", "vector"],
|
||||
["L257", "vector"],
|
||||
["L258", "vector"],
|
||||
["L259", "vector"],
|
||||
["L260", "vector"]
|
||||
],
|
||||
"ctywide-obs": [
|
||||
["L972", "uint64", true],
|
||||
["L969", "uint64", true],
|
||||
["L977", "uint64", true],
|
||||
["L970", "uint64", true],
|
||||
["L966", "uint64", true],
|
||||
["L964", "uint64", true],
|
||||
["L971", "uint64", true],
|
||||
["L973", "uint64", true],
|
||||
["L965", "uint64", true],
|
||||
["L975", "uint64", true],
|
||||
["L974", "uint64", true],
|
||||
["L968", "uint64", true],
|
||||
["L976", "uint64", true],
|
||||
["L967", "uint64", true],
|
||||
["L978", "uint64", true],
|
||||
["L743", "uint64", true],
|
||||
["L593", "vector"],
|
||||
["L751", "uint64", true],
|
||||
["L744", "uint64", true],
|
||||
["L746", "uint64", true],
|
||||
["L720", "vector"],
|
||||
["L726", "attack-info"],
|
||||
["L745", "uint64", true],
|
||||
["L748", "uint64", true],
|
||||
["L750", "uint64", true],
|
||||
["L749", "uint64", true],
|
||||
["L742", "uint64", true],
|
||||
["L747", "uint64", true]
|
||||
],
|
||||
"ctywide-scenes": [["L968", "sphere"]],
|
||||
"ctyport-part": [
|
||||
["L507", "uint64", true],
|
||||
["L506", "uint64", true],
|
||||
["L224", "vector4w"],
|
||||
["L225", "vector4w"],
|
||||
["L227", "vector4w"],
|
||||
["L228", "vector4w"],
|
||||
["L229", "vector4w"],
|
||||
["L230", "vector4w"],
|
||||
["L232", "vector4w"],
|
||||
["L233", "vector4w"],
|
||||
["L234", "vector4w"],
|
||||
["L235", "vector4w"],
|
||||
["L236", "vector4w"],
|
||||
["L237", "vector4w"],
|
||||
["L238", "vector4w"],
|
||||
["L239", "vector4w"],
|
||||
["L240", "vector4w"],
|
||||
["L242", "vector4w"],
|
||||
["L243", "vector4w"],
|
||||
["L244", "vector4w"],
|
||||
["L245", "vector4w"],
|
||||
["L246", "vector4w"],
|
||||
["L247", "vector4w"],
|
||||
["L248", "vector4w"],
|
||||
["L249", "vector4w"],
|
||||
["L250", "vector4w"],
|
||||
["L251", "vector4w"],
|
||||
["L253", "vector4w"],
|
||||
["L254", "vector4w"],
|
||||
["L255", "vector4w"],
|
||||
["L256", "vector4w"],
|
||||
["L257", "vector4w"],
|
||||
["L258", "vector4w"],
|
||||
["L259", "vector4w"],
|
||||
["L260", "vector4w"],
|
||||
["L261", "vector4w"],
|
||||
["L262", "vector4w"],
|
||||
["L263", "vector4w"],
|
||||
["L264", "vector4w"],
|
||||
["L265", "vector4w"],
|
||||
["L266", "vector4w"],
|
||||
["L267", "vector4w"],
|
||||
["L268", "vector4w"],
|
||||
["L270", "vector4w"],
|
||||
["L271", "vector4w"],
|
||||
["L272", "vector4w"],
|
||||
["L273", "vector4w"],
|
||||
["L274", "vector4w"],
|
||||
["L275", "vector4w"],
|
||||
["L276", "vector4w"],
|
||||
["L277", "vector4w"],
|
||||
["L278", "vector4w"],
|
||||
["L279", "vector4w"],
|
||||
["L280", "vector4w"],
|
||||
["L281", "vector4w"],
|
||||
["L282", "vector4w"],
|
||||
["L283", "vector4w"],
|
||||
["L285", "vector4w"],
|
||||
["L287", "vector4w"]
|
||||
],
|
||||
"ctyport-obs": [["L86", "attack-info"]],
|
||||
"h-torpedo": [
|
||||
["L191", "(inline-array talker-speech-class)", 5],
|
||||
["L184", "attack-info"]
|
||||
],
|
||||
"krimson-wall": [["L62", "(inline-array vector)", 2]],
|
||||
"ctyport-attack": [
|
||||
["L727", "uint64", true],
|
||||
["L726", "uint64", true],
|
||||
["L725", "uint64", true],
|
||||
["L729", "uint64", true],
|
||||
["L724", "uint64", true],
|
||||
["L730", "uint64", true],
|
||||
["L728", "uint64", true],
|
||||
["L723", "uint64", true],
|
||||
["L593", "(inline-array talker-speech-class)", 49],
|
||||
["L493", "(inline-array vector)", 100],
|
||||
["L645", "uint64", true],
|
||||
["L646", "uint64", true],
|
||||
["L643", "uint64", true],
|
||||
["L644", "uint64", true],
|
||||
["L406", "vector"]
|
||||
],
|
||||
"wcar-catapult": [
|
||||
["L168", "vector"],
|
||||
["L169", "vector"],
|
||||
["L170", "vector"],
|
||||
["L171", "vector"],
|
||||
["L172", "vector"],
|
||||
["L173", "vector"],
|
||||
["L174", "vector"],
|
||||
["L167", "attack-info"],
|
||||
["L166", "vector"],
|
||||
["L165", "attack-info"]
|
||||
],
|
||||
"desert-jump": [
|
||||
["L222", "attack-info"],
|
||||
["L221", "vector"],
|
||||
["L225", "attack-info"],
|
||||
["L224", "vector"]
|
||||
],
|
||||
"desert-chase": [
|
||||
["L491", "attack-info"],
|
||||
["L475", "vector"]
|
||||
],
|
||||
"bombbot": [
|
||||
["L836", "uint64", true],
|
||||
["L831", "uint64", true],
|
||||
["L834", "uint64", true],
|
||||
["L835", "uint64", true],
|
||||
["L830", "uint64", true],
|
||||
["L833", "uint64", true],
|
||||
["L832", "uint64", true],
|
||||
["L827", "uint64", true],
|
||||
["L829", "uint64", true],
|
||||
["L828", "uint64", true],
|
||||
["L647", "attack-info"],
|
||||
["L646", "attack-info"],
|
||||
["L687", "uint64", true],
|
||||
["L685", "uint64", true],
|
||||
["L677", "uint64", true],
|
||||
["L542", "vector"],
|
||||
["L683", "uint64", true],
|
||||
["L682", "uint64", true],
|
||||
["L692", "uint64", true],
|
||||
["L690", "uint64", true],
|
||||
["L686", "uint64", true],
|
||||
["L610", "vector"],
|
||||
["L680", "uint64", true],
|
||||
["L693", "uint64", true],
|
||||
["L684", "uint64", true],
|
||||
["L681", "uint64", true],
|
||||
["L689", "uint64", true],
|
||||
["L691", "uint64", true],
|
||||
["L688", "uint64", true],
|
||||
["L679", "uint64", true],
|
||||
["L678", "uint64", true],
|
||||
["L620", "vector"],
|
||||
["L619", "attack-info"],
|
||||
["L556", "(inline-array kg-squad-member-settings)", 4]
|
||||
],
|
||||
"ctyport-attack-bbush": [
|
||||
["L143", "uint64", true],
|
||||
["L72", "vector"]
|
||||
],
|
||||
"cty-hijack-missile": [["L207", "attack-info"]],
|
||||
"cty-hijack": [["L526", "(inline-array talker-speech-class)", 52]],
|
||||
"kg-squad-control": [
|
||||
["L92", "(inline-array kg-squad-member-settings)", 4],
|
||||
["L91", "(inline-array kg-squad-member-settings)", 4],
|
||||
["L90", "(inline-array kg-squad-member-settings)", 4]
|
||||
],
|
||||
"mh-squad-control": [
|
||||
["L40", "(inline-array kg-squad-member-settings)", 3],
|
||||
["L39", "(inline-array kg-squad-member-settings)", 3]
|
||||
],
|
||||
"intro-scenes": [
|
||||
["L7337", "uint64", true],
|
||||
["L7338", "uint64", true],
|
||||
["L7339", "uint64", true],
|
||||
["L7340", "uint64", true]
|
||||
],
|
||||
"cty-destroy-grid": [
|
||||
["L466", "(inline-array kg-squad-member-settings)", 4],
|
||||
["L465", "(inline-array mh-squad-member-settings)", 3],
|
||||
["L446", "vector"],
|
||||
["L442", "vector"],
|
||||
["L438", "vector"]
|
||||
],
|
||||
"cty-sniper-battery": [
|
||||
["L282", "uint64", true],
|
||||
["L283", "uint64", true],
|
||||
["L281", "uint64", true],
|
||||
["L249", "uint64", true],
|
||||
["L251", "uint64", true],
|
||||
["L230", "vector"],
|
||||
["L250", "uint64", true],
|
||||
["L246", "uint64", true],
|
||||
["L247", "uint64", true],
|
||||
["L248", "uint64", true],
|
||||
["L236", "vector"],
|
||||
["L235", "vector"],
|
||||
["L234", "vector"],
|
||||
["L233", "vector"],
|
||||
["L232", "vector"],
|
||||
["L231", "vector"]
|
||||
],
|
||||
"cty-sniper-turret": [
|
||||
["L705", "uint64", true],
|
||||
["L709", "uint64", true],
|
||||
["L708", "uint64", true],
|
||||
["L707", "uint64", true],
|
||||
["L710", "uint64", true],
|
||||
["L706", "uint64", true],
|
||||
["L579", "(inline-array kg-squad-member-settings)", 4],
|
||||
["L426", "vector"],
|
||||
["L424", "vector"],
|
||||
["L587", "uint64", true],
|
||||
["L583", "uint64", true],
|
||||
["L594", "uint64", true],
|
||||
["L591", "uint64", true],
|
||||
["L584", "uint64", true],
|
||||
["L586", "uint64", true],
|
||||
["L585", "uint64", true],
|
||||
["L582", "uint64", true],
|
||||
["L588", "uint64", true],
|
||||
["L592", "uint64", true],
|
||||
["L581", "uint64", true],
|
||||
["L589", "uint64", true],
|
||||
["L590", "uint64", true],
|
||||
["L580", "uint64", true],
|
||||
["L593", "uint64", true],
|
||||
["L595", "uint64", true]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
"(method 11 elevator)": 1024,
|
||||
"scene-player-init": 1024,
|
||||
"task-manager-init-by-other": 2048,
|
||||
"race-manager-init-by-other": 1024
|
||||
"race-manager-init-by-other": 1024,
|
||||
"neo-sat-shield-init-by-other": 64
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"quaternion-smooth-seek!": [[16, "quaternion"]],
|
||||
"quaternion-smooth-seek!": [[16, ["inline-array", "quaternion", 2]]],
|
||||
"eul->matrix": [[16, "vector"]],
|
||||
"segment-segment-find-intersection-xz": [[16, "vector"]],
|
||||
"vector-line-xz-distance-point!": [[16, "matrix"]],
|
||||
@@ -1945,5 +1945,381 @@
|
||||
[16, ["array", "symbol", 10]],
|
||||
[64, "event-message-block"], // this memory is reused as both mc-slot-info and event-message-block
|
||||
[368, ["array", "symbol", 10]]
|
||||
]
|
||||
],
|
||||
"(method 9 nav-node)": [[48, ["inline-array", "vector", 2]]],
|
||||
"(method 10 nav-node)": [[16, "vector"]],
|
||||
"(method 9 nav-graph)": [[16, "matrix"]],
|
||||
"(method 9 grid-info)": [[16, "vector"]],
|
||||
"(method 11 grid-info)": [[16, "bounding-box"]],
|
||||
"(method 13 grid-info)": [[16, "bounding-box"]],
|
||||
"(method 9 city-level-info)": [
|
||||
[16, "vis-ray"],
|
||||
[192, "vector"],
|
||||
[208, "vector"],
|
||||
[224, "vector"],
|
||||
[128, "vector"],
|
||||
[144, "vector"]
|
||||
],
|
||||
"(method 11 city-level-info)": [[16, "vector"]],
|
||||
"(method 12 city-level-info)": [[16, ["inline-array", "vector", 7]]],
|
||||
"(method 17 city-level-info)": [[16, ["inline-array", "vis-grid-pos", 2]]],
|
||||
"(method 16 city-level-info)": [
|
||||
[48, "vis-grid-box"],
|
||||
[64, "vis-grid-box"]
|
||||
],
|
||||
"(method 15 city-level-info)": [
|
||||
[32, "vis-grid-box"],
|
||||
[16, "vis-grid-box"]
|
||||
],
|
||||
"(method 14 traffic-level-data)": [
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(method 18 city-level-info)": [[16, "bounding-box"]],
|
||||
"(method 13 traffic-suppressor)": [
|
||||
[16, "bounding-box"],
|
||||
[48, "vector4w"]
|
||||
],
|
||||
"(method 22 traffic-tracker)": [[16, "traffic-engine-stack-var0"]],
|
||||
"(method 22 traffic-engine)": [[16, "traffic-danger-info"]],
|
||||
"(method 43 traffic-engine)": [[16, ["array", "collide-shape", 64]]],
|
||||
"(method 52 traffic-engine)": [[16, "vector"]],
|
||||
"(method 54 traffic-engine)": [
|
||||
[16, ["inline-array", "traffic-suppression-box", 2]],
|
||||
[80, ["array", "collide-shape", 40]]
|
||||
],
|
||||
"(method 53 traffic-engine)": [[16, ["array", "collide-shape", 40]]],
|
||||
"(trans active formation-object)": [[48, "traffic-danger-info"]],
|
||||
"(method 37 formation-object)": [[96, "vector"]],
|
||||
"(method 38 formation-object)": [[16, "vector"]],
|
||||
"(method 30 formation-object)": [[16, "msg-get-num-inactive"]],
|
||||
"(method 204 citizen)": [
|
||||
[16, "vector"],
|
||||
[32, "iter-seg"]
|
||||
],
|
||||
"(method 207 citizen)": [
|
||||
[80, "vector"],
|
||||
[32, "iter-seg"]
|
||||
],
|
||||
"(method 202 citizen)": [
|
||||
[64, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"(method 160 citizen)": [[16, "vector"]],
|
||||
"(method 203 citizen)": [
|
||||
[80, "vector"],
|
||||
[96, "vector"]
|
||||
],
|
||||
"(method 45 formation-object)": [[16, "msg-get-inactive-objects"]],
|
||||
"(trans move-to-vehicle civilian)": [
|
||||
[32, "vector"],
|
||||
[128, "vector"]
|
||||
],
|
||||
"civilian-flee-post": [
|
||||
[48, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"civilian-avoid-danger-post": [[112, "vector"]],
|
||||
"civilian-clear-path-post": [[96, "vector"]],
|
||||
"(method 239 wlander)": [[48, "vector"]],
|
||||
"(method 242 wlander)": [[32, "vector"]],
|
||||
"(method 238 wlander)": [
|
||||
[32, ["array", "collide-shape", 64]],
|
||||
[288, "vector"]
|
||||
],
|
||||
"(method 241 wlander)": [
|
||||
[32, ["array", "collide-shape", 64]],
|
||||
[288, "vector"]
|
||||
],
|
||||
"(method 13 flee-info)": [
|
||||
[48, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(method 15 rope-system)": [
|
||||
[64, "vector"],
|
||||
[80, "vector"],
|
||||
[96, "vector"]
|
||||
],
|
||||
"(enter rescue-start task-manager-desert-rescue)": [
|
||||
[16, "desert-rescue-transport-init-params"]
|
||||
],
|
||||
"(code board-vehicle wland-passenger)": [
|
||||
[128, "vector"],
|
||||
[176, "vector"]
|
||||
],
|
||||
"(trans boarding wland-passenger)": [[32, "vector"]],
|
||||
"(enter approaching-transport wland-passenger)": [[16, "vector"]],
|
||||
"(method 231 wland-passenger)": [[16, "matrix"]],
|
||||
"spawn-wlander": [[16, "wland-passenger-init-by-other-params"]],
|
||||
"update-nav-sphere": [[64, "vector"]],
|
||||
"compute-transport-approach-pt": [[48, "vector"]],
|
||||
"(method 19 rope-prim-system)": [
|
||||
[48, "matrix"],
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[208, "rgbaf"],
|
||||
[224, "rgbaf"]
|
||||
],
|
||||
"(method 211 neo-sat)": [[16, "vector"]],
|
||||
"(method 232 neo-sat)": [[32, "vector"]],
|
||||
"(method 220 neo-sat)": [[16, "vector"]],
|
||||
"(method 221 neo-sat)": [[32, "vector"]],
|
||||
"(method 206 neo-sat)": [
|
||||
[32, "vector"],
|
||||
[48, "collide-query"]
|
||||
],
|
||||
"(method 227 neo-sat)": [[16, "collide-query"]],
|
||||
"spawn-neo-sat": [[16, "neo-sat-init-params"]],
|
||||
"desert-rescue-transport-init-by-other": [
|
||||
[16, "light-trail-tracker-spawn-params"]
|
||||
],
|
||||
"(method 254 crimson-guard)": [
|
||||
[16, "vector"],
|
||||
[96, "vector"]
|
||||
],
|
||||
"(method 255 crimson-guard)": [[64, "vector"]],
|
||||
"(enter grenade-throw-post-reloading crimson-guard)": [
|
||||
[16, "reload-grenade-spawn-params"]
|
||||
],
|
||||
"(method 46 ff-squad-control)": [[112, "ff-squad-control-stack-var0"]],
|
||||
"(method 16 ff-squad-control)": [[192, ["array", "float", 16]]],
|
||||
"(method 45 ff-squad-control)": [[16, "vector"]],
|
||||
"(method 258 crimson-guard)": [[16, "collide-query"]],
|
||||
"(method 259 crimson-guard)": [
|
||||
[96, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[160, "vector"],
|
||||
[176, "vector"]
|
||||
],
|
||||
"(method 212 crimson-guard)": [[16, "shield-sphere-spawn-params"]],
|
||||
"(method 266 crimson-guard)": [
|
||||
[32, "vector"],
|
||||
[656, "vector"],
|
||||
[720, "vector"]
|
||||
],
|
||||
"(code sitting vehicle-grenade)": [[16, "traffic-danger-info"]],
|
||||
"(method 44 vehicle-grenade)": [[16, "traffic-danger-info"]],
|
||||
"(method 31 vehicle-grenade)": [[16, "vector"]],
|
||||
"(method 264 crimson-guard)": [[32, "vector"]],
|
||||
"(method 78 h-bike-base)": [[16, "bike-stack-var0"]],
|
||||
"(method 217 citizen-enemy)": [[32, ["array", "collide-shape", 64]]],
|
||||
"(method 225 metalhead-predator)": [
|
||||
[160, "vector"],
|
||||
[176, "vector"],
|
||||
[208, "vector"]
|
||||
],
|
||||
"(trans close-attack roboguard-city)": [
|
||||
[32, ["array", "collide-shape", 384]]
|
||||
],
|
||||
"(code roll-chase roboguard-city)": [[16, "vector"]],
|
||||
"spawn-roboguard-projectile": [[16, "projectile-init-by-other-params"]],
|
||||
"(method 237 roboguard-city)": [[16, "vector"]],
|
||||
"(code flip spydroid)": [[16, "vector"]],
|
||||
"(trans fire flying-turret)": [[16, "ft-gun-info"]],
|
||||
"(method 161 flying-turret)": [[16, "vector"]],
|
||||
"(method 31 h-kg-pickup)": [[48, "vector"]],
|
||||
"(method 11 flitter-spawner)": [[32, "traffic-object-spawn-params"]],
|
||||
"(method 21 flitter-spawner)": [[16, "traffic-object-spawn-params"]],
|
||||
"(code active task-manager-ctywide-bbush-get-to)": [
|
||||
[160, "vector"],
|
||||
[176, "matrix"]
|
||||
],
|
||||
"(trans talking burning-bush)": [
|
||||
[32, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(method 32 propa)": [[16, ["array", "collide-shape", 64]]],
|
||||
"(event idle propa)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 23 parking-spot)": [
|
||||
[16, "cquery-with-vec"],
|
||||
[560, ["inline-array", "vector", 1]]
|
||||
],
|
||||
"(method 24 parking-spot)": [[16, "cquery-with-vec"]],
|
||||
"(method 11 security-wall)": [[32, "vector"]],
|
||||
"(method 24 security-wall)": [[16, ["inline-array", "vector", 1]]],
|
||||
"(trans menu burning-bush)": [[128, "vector"]],
|
||||
"check-drop-level-ctyport-drop-userdata": [[16, "vector"]],
|
||||
"(method 16 boat-manager)": [[16, "matrix"]],
|
||||
"(method 31 boat-base)": [[16, "matrix"]],
|
||||
"(method 30 boat-base)": [[96, ["inline-array", "vector", 6]]],
|
||||
"(trans idle krimson-wall-break)": [[16, "matrix"]],
|
||||
"(trans explode krimson-wall-break)": [[16, "vector"]],
|
||||
"(method 35 htorpedo)": [[16, "light-trail-tracker-spawn-params"]],
|
||||
"(enter start-mission ctyport-attack-manager)": [
|
||||
[16, ["array", "symbol", 10]]
|
||||
],
|
||||
"(method 49 ctyport-attack-manager)": [
|
||||
[64, ["array", "collide-shape", 384]],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 44 ctyport-attack-manager)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 45 ctyport-attack-manager)": [[16, "vector"]],
|
||||
"(method 79 v-catapult)": [[16, ["inline-array", "quaternion", 3]]],
|
||||
"(method 33 desert-jump-manager)": [[16, "vector"]],
|
||||
"(code active desert-jump-manager)": [[96, ["array", "symbol", 10]]],
|
||||
"(method 32 desert-jump-manager)": [
|
||||
[16, "mystery-traffic-object-spawn-params0"]
|
||||
],
|
||||
"(method 23 beam-generator)": [[16, "matrix"]],
|
||||
"(trans active player-controller)": [
|
||||
[32, "vector"],
|
||||
[48, "vector"]
|
||||
],
|
||||
"(code active desert-chase-ambush-manager)": [
|
||||
[16, ["inline-array", "traffic-object-spawn-params", 1]]
|
||||
],
|
||||
"(method 34 desert-chase-ambush-manager)": [
|
||||
[16, "projectile-init-by-other-params"]
|
||||
],
|
||||
"(method 33 desert-chase-ambush-manager)": [
|
||||
[16, "mystery-traffic-object-spawn-params0"]
|
||||
],
|
||||
"(method 32 desert-chase-ambush-manager)": [
|
||||
[16, "marauder-init-by-other-params"]
|
||||
],
|
||||
"(method 22 deschase-artifact)": [[16, "matrix"]],
|
||||
"(method 12 deschase-vehicle-control)": [
|
||||
[64, ["array", "collide-shape", 128]],
|
||||
[16, "matrix"]
|
||||
],
|
||||
"(method 32 desert-chase-chase-manager)": [
|
||||
[16, "traffic-object-spawn-params"]
|
||||
],
|
||||
"desert-chase-chase-intro-sequence": [[16, "player-controller-init-params"]],
|
||||
"(method 32 bombbot-bomb)": [[592, "vector"]],
|
||||
"bombbot-player-init-by-other": [[96, "vector"]],
|
||||
"(trans hostile bombbot-player)": [[16, "vector"]],
|
||||
"(post hostile bombbot-player)": [
|
||||
[576, "vector"],
|
||||
[16, "vector"],
|
||||
[592, "vector"]
|
||||
],
|
||||
"(method 197 bombbot-player)": [
|
||||
[80, "matrix"],
|
||||
[144, "vector"],
|
||||
[720, "vector"],
|
||||
[736, "vector"]
|
||||
],
|
||||
"(method 196 bombbot-player)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "collide-query"],
|
||||
[592, ["array", "collide-shape", 64]],
|
||||
[848, "vector"]
|
||||
],
|
||||
"(method 139 bombbot-player)": [
|
||||
[560, "vector"],
|
||||
[576, "vector"],
|
||||
[592, "vector"],
|
||||
[608, "vector"],
|
||||
[1168, "vector"],
|
||||
[1216, "collide-query"]
|
||||
],
|
||||
"(post hostile bomb-bot)": [[16, "vector"]],
|
||||
"(trans hostile bomb-bot)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 196 bomb-bot)": [[16, ["array", "collide-shape", 64]]],
|
||||
"(method 198 bombbot)": [
|
||||
[48, "vector"],
|
||||
[64, "vector"],
|
||||
[144, "vector"]
|
||||
],
|
||||
"bombbot-gun-callback": [
|
||||
[32, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"bombbot-gun-swivel-callback": [
|
||||
[16, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"bombbot-callback": [
|
||||
[16, "vector"],
|
||||
[32, "quaternion"],
|
||||
[48, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(enter explode bombbot)": [
|
||||
[112, "vector"],
|
||||
[128, "vector"],
|
||||
[144, "vector"],
|
||||
[256, "vector"]
|
||||
],
|
||||
"(trans drop-bombs bombbot)": [[32, "vector"]],
|
||||
"(trans hostile bombbot)": [[32, "vector"]],
|
||||
"(method 160 bombbot)": [[32, "vector"]],
|
||||
"(method 197 bombbot)": [
|
||||
[80, "matrix"],
|
||||
[144, "vector"],
|
||||
[720, "vector"],
|
||||
[736, "vector"]
|
||||
],
|
||||
"(method 203 bombbot)": [
|
||||
[80, "vector"],
|
||||
[176, "vector"],
|
||||
[400, "vector"]
|
||||
],
|
||||
"(method 204 bombbot)": [[80, "vector"]],
|
||||
"(method 194 bombbot)": [
|
||||
[608, "vector"],
|
||||
[592, "vector"],
|
||||
[624, "vector"],
|
||||
[672, "vector"],
|
||||
[720, "vector"]
|
||||
],
|
||||
"(method 196 bombbot)": [[16, ["array", "collide-shape", 64]]],
|
||||
"(method 25 bombbot-shot)": [[32, "vector"]],
|
||||
"(enter blow-wall bombbot)": [[16, ["array", "symbol", 10]]],
|
||||
"check-drop-level-ctysluma-drop-userdata": [[16, "vector"]],
|
||||
"check-drop-level-ctyslumb-drop-userdata": [[16, "vector"]],
|
||||
"(method 36 cty-missile-lure)": [[16, "vector"]],
|
||||
"(method 36 cty-hijack-manager)": [[16, "cty-hijack-missile-init-params"]],
|
||||
"(enter player-riding cty-hijack-manager)": [
|
||||
[96, "cty-missile-lure-init-params"],
|
||||
[144, "cty-missile-lure-init-params"]
|
||||
],
|
||||
"(method 38 cty-hijack-manager)": [
|
||||
[64, "vector"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"(code wait ctyport-attack-manager-bbush)": [[96, ["array", "symbol", 10]]],
|
||||
"check-drop-level-palroof-drop-userdata": [[16, "vector"]],
|
||||
"check-drop-level-ctyfarmb-drop-userdata": [[16, "vector"]],
|
||||
"check-drop-level-ctyfarma-drop-userdata": [[16, "vector"]],
|
||||
"(method 11 com-power-box)": [
|
||||
[16, "vector"],
|
||||
[48, "vector"]
|
||||
],
|
||||
"(enter active task-manager-city-destroy-grid)": [
|
||||
[224, "enemy-init-by-other-params"]
|
||||
],
|
||||
"(code exit-vehicle jinx)": [
|
||||
[32, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(code board-vehicle jinx)": [[16, "vector"]],
|
||||
"(trans move-to-vehicle jinx)": [
|
||||
[32, "vector"],
|
||||
[128, "vector"]
|
||||
],
|
||||
"(post moribund cty-sniper-button)": [[16, "vector"]],
|
||||
"(method 11 cty-sniper-turret)": [[32, "vector"]],
|
||||
"sniper-turret-post": [[112, "vector"]],
|
||||
"citysniper-draw-2d-hud": [
|
||||
[16, ["inline-array", "vector4w", 4]],
|
||||
[80, "vector4w"]
|
||||
],
|
||||
"(enter lock cty-sniper-turret-reticle)": [[16, "vector"]],
|
||||
"(enter impact cty-sniper-turret-shot)": [[16, "traffic-danger-info"]],
|
||||
"(method 25 cty-sniper-turret-shot)": [[32, "vector"]],
|
||||
"cty-sniper-turret-handler": [[96, "vector"]]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2074,5 +2074,40 @@
|
||||
"vars": {
|
||||
"s4-0": ["sname", "sound-name"]
|
||||
}
|
||||
},
|
||||
"symbol->city-target-type": {
|
||||
"vars": {
|
||||
"v0-0": ["type", "city-target-type"]
|
||||
}
|
||||
},
|
||||
"city-target-type->traffic-object-type": {
|
||||
"vars": {
|
||||
"v0-0": ["type", "traffic-type"]
|
||||
}
|
||||
},
|
||||
"city-target-type->cty-faction": {
|
||||
"vars": {
|
||||
"v0-0": ["type", "cty-faction"]
|
||||
}
|
||||
},
|
||||
"map-symbol-to-nav-territory-type": {
|
||||
"vars": {
|
||||
"v0-0": ["type", "nav-territory-type"]
|
||||
}
|
||||
},
|
||||
"guard-type->city-target-type": {
|
||||
"vars": {
|
||||
"v0-0": ["type", "city-target-type"]
|
||||
}
|
||||
},
|
||||
"(code die neo-sat)": {
|
||||
"vars": {
|
||||
"gp-0": ["hand", "handle"]
|
||||
}
|
||||
},
|
||||
"(method 48 task-manager-desert-rescue)": {
|
||||
"vars": {
|
||||
"f30-0": ["f30-0", "float"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -997,6 +997,7 @@ const std::unordered_map<
|
||||
{"vehicle-rider-info",
|
||||
{{"grab-rail-array", ArrayFieldDecompMeta(TypeSpec("vehicle-grab-rail-info"), 48)},
|
||||
{"attach-point-array", ArrayFieldDecompMeta(TypeSpec("vehicle-attach-point"), 32)}}},
|
||||
{"vehicle-setup-info", {{"color", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}}},
|
||||
{"desbeast-path", {{"node", ArrayFieldDecompMeta(TypeSpec("desbeast-node"), 32)}}},
|
||||
{"race-info",
|
||||
{{"turbo-pad-array", ArrayFieldDecompMeta(TypeSpec("race-turbo-pad"), 32)},
|
||||
@@ -1031,6 +1032,12 @@ const std::unordered_map<
|
||||
{"speeches", ArrayFieldDecompMeta(TypeSpec("bot-speech-info"), 16)},
|
||||
{"dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)},
|
||||
{"speech-tunings", ArrayFieldDecompMeta(TypeSpec("bot-speech-tuning"), 16)}}},
|
||||
{"ctyport-mine-layout",
|
||||
{{"stored-handles",
|
||||
ArrayFieldDecompMeta(TypeSpec("handle"),
|
||||
8,
|
||||
ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}},
|
||||
{"deschase-path", {{"node", ArrayFieldDecompMeta(TypeSpec("deschase-node"), 32)}}},
|
||||
}}};
|
||||
|
||||
goos::Object decompile_structure(const TypeSpec& type,
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
(get-damage-from-attack (_type_ object event-message-block) float)
|
||||
(enemy-method-63 (_type_ float) float)
|
||||
(update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware)
|
||||
(penetrate->next-state (_type_) symbol)
|
||||
(penetrate->next-state (_type_ process event-message-block float) symbol)
|
||||
(get-penetrated-by (_type_) penetrate)
|
||||
(coin-flip? (_type_) symbol)
|
||||
(get-enemy-aware (_type_ enemy-aware) enemy-aware)
|
||||
|
||||
@@ -1682,28 +1682,28 @@
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> this parent)) 'child-hit)
|
||||
(let ((f0-1 (the-as number 0.0)))
|
||||
(let ((f0-1 0.0))
|
||||
(if (not *debug-unkillable*)
|
||||
(set! f0-1 (damage-enemy! this proc block))
|
||||
)
|
||||
)
|
||||
(let ((s2-2 (penetrate->next-state this)))
|
||||
(when s2-2
|
||||
(logclear! (-> this enemy-flags) (enemy-flag use-trigger))
|
||||
(send-attack-to-all-tshapes this (the-as process-focusable proc) block)
|
||||
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-17 from) (process->ppointer proc))
|
||||
(set! (-> a1-17 num-params) argc)
|
||||
(set! (-> a1-17 message) s2-2)
|
||||
(set! (-> a1-17 param 0) (-> block param 0))
|
||||
(set! (-> a1-17 param 1) (-> block param 1))
|
||||
(set! (-> a1-17 param 2) (-> block param 2))
|
||||
(set! (-> a1-17 param 3) (-> block param 3))
|
||||
(set! (-> a1-17 param 4) (-> block param 4))
|
||||
(set! (-> a1-17 param 5) (-> block param 5))
|
||||
(send-event-function this a1-17)
|
||||
(let ((s2-2 (penetrate->next-state this proc block f0-1)))
|
||||
(when s2-2
|
||||
(logclear! (-> this enemy-flags) (enemy-flag use-trigger))
|
||||
(send-attack-to-all-tshapes this (the-as process-focusable proc) block)
|
||||
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-17 from) (process->ppointer proc))
|
||||
(set! (-> a1-17 num-params) argc)
|
||||
(set! (-> a1-17 message) s2-2)
|
||||
(set! (-> a1-17 param 0) (-> block param 0))
|
||||
(set! (-> a1-17 param 1) (-> block param 1))
|
||||
(set! (-> a1-17 param 2) (-> block param 2))
|
||||
(set! (-> a1-17 param 3) (-> block param 3))
|
||||
(set! (-> a1-17 param 4) (-> block param 4))
|
||||
(set! (-> a1-17 param 5) (-> block param 5))
|
||||
(send-event-function this a1-17)
|
||||
)
|
||||
#t
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2097,7 +2097,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod penetrate->next-state ((this enemy))
|
||||
(defmethod penetrate->next-state ((this enemy) (arg0 process) (arg1 event-message-block) (arg2 float))
|
||||
(let ((gp-0 (-> this incoming penetrate-using)))
|
||||
(cond
|
||||
((and (logtest? (penetrate jak-dark-blackhole) gp-0) #t)
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
(guard-transport 26)
|
||||
(kg-pickup 27)
|
||||
(bike-d 28)
|
||||
(max 29)
|
||||
(invalid0 -1)
|
||||
(invalid #xffffffff)
|
||||
)
|
||||
;; ---traffic-h:traffic-type
|
||||
@@ -117,6 +119,16 @@
|
||||
;; ---vehicle-type-u8
|
||||
|
||||
|
||||
;; +++guard-type
|
||||
(defenum guard-type
|
||||
:type uint8
|
||||
(tazer 0)
|
||||
(rifle 1)
|
||||
(grenade 2)
|
||||
)
|
||||
;; ---guard-type
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *traffic-manager* (the-as traffic-manager #f))
|
||||
@@ -155,7 +167,7 @@
|
||||
)
|
||||
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type uint8)
|
||||
((object-type traffic-type)
|
||||
(behavior uint64)
|
||||
(id uint32)
|
||||
(nav-mesh nav-mesh)
|
||||
@@ -164,10 +176,10 @@
|
||||
(rotation quaternion :inline)
|
||||
(velocity vector :inline)
|
||||
(handle handle)
|
||||
(handle-parent uint64)
|
||||
(handle-parent handle)
|
||||
(guard-type uint8)
|
||||
(user-data uint32)
|
||||
(entity basic)
|
||||
(entity entity)
|
||||
(flags traffic-spawn-flags)
|
||||
(proc process)
|
||||
)
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
smush
|
||||
)
|
||||
(:methods
|
||||
(bouncer-method-23 (_type_) none)
|
||||
(bouncer-method-24 (_type_) none)
|
||||
(init-skel! (_type_) none)
|
||||
(init-collision! (_type_) none)
|
||||
(play-sound (_type_) none)
|
||||
(bouncer-method-26 (_type_) none)
|
||||
)
|
||||
@@ -209,13 +209,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod bouncer-method-23 ((this bouncer))
|
||||
(defmethod init-skel! ((this bouncer))
|
||||
(break!)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod bouncer-method-24 ((this bouncer))
|
||||
(defmethod init-collision! ((this bouncer))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec crate))
|
||||
@@ -239,9 +239,9 @@
|
||||
|
||||
(defmethod init-from-entity! ((this bouncer) (arg0 entity-actor))
|
||||
(set! (-> this mods) #f)
|
||||
(bouncer-method-24 this)
|
||||
(init-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(bouncer-method-23 this)
|
||||
(init-skel! this)
|
||||
(nav-mesh-connect-from-ent this)
|
||||
(set! (-> this spring-height) (res-lump-float arg0 'spring-height :default 45056.0))
|
||||
(set! (-> this use-alternate-jump?) (= (res-lump-value arg0 'behavior-type uint128 :time -1000000000.0) 1))
|
||||
|
||||
@@ -109,13 +109,14 @@
|
||||
|
||||
|
||||
(deftype part-tracker (process)
|
||||
((root trsqv)
|
||||
(mat matrix :inline)
|
||||
(offset vector :inline)
|
||||
((parent (pointer process) :override)
|
||||
(root trsqv)
|
||||
(mat matrix :inline)
|
||||
(offset vector :inline)
|
||||
(userdata uint64)
|
||||
(user-time time-frame 2)
|
||||
(user-vector vector :inline)
|
||||
(user-handle uint32 2 :offset 288)
|
||||
(user-time time-frame 2)
|
||||
(user-vector vector :inline)
|
||||
(user-handle uint32 2 :offset 288)
|
||||
(part sparticle-launch-control)
|
||||
(callback (function part-tracker vector))
|
||||
(linger-callback (function part-tracker vector))
|
||||
|
||||
@@ -1782,6 +1782,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; Note: there's some changes here to skip setting things if arg4 is #f.
|
||||
;; the address of #f is misaligned, but on ps2 the lq instruction will silently mask.
|
||||
;; Loading from #f doesn't really make sense, so this was likely just a mistake in the
|
||||
;; original game.
|
||||
;; the OpenGOAL compiler uses vmovaps, which will crash on a misaligned load because
|
||||
;; this has been useful for finding errors. So to prevent this crash, we skip the load
|
||||
;; if the argument is #f. (some callers of this directly pass #f, so it's not a bug higher up).
|
||||
(cond
|
||||
((>= 256 (the-as int arg4))
|
||||
(set! (-> self target-joint0) (the-as int arg4))
|
||||
@@ -1789,7 +1796,10 @@
|
||||
)
|
||||
(else
|
||||
(set! (-> self target-joint0) -1)
|
||||
(set! (-> self offset0 quad) (-> arg4 quad))
|
||||
;: og:preserve-this hack, fixed bug in original game
|
||||
(when arg4
|
||||
(set! (-> self offset0 quad) (-> arg4 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
@@ -1799,7 +1809,10 @@
|
||||
)
|
||||
(else
|
||||
(set! (-> self target-joint1) -1)
|
||||
(set! (-> self offset1 quad) (-> arg5 quad))
|
||||
;: og:preserve-this hack, fixed bug in original game
|
||||
(when arg5
|
||||
(set! (-> self offset1 quad) (-> arg5 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
|
||||
@@ -5,5 +5,122 @@
|
||||
;; name in dgo: speech-manager
|
||||
;; dgos: GAME
|
||||
|
||||
;; +++speech-info-flag
|
||||
(defenum speech-info-flag
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(si0 0)
|
||||
(si1 1)
|
||||
(si2 2)
|
||||
(si3 3)
|
||||
(si4 4)
|
||||
(si5 5)
|
||||
(si6 6)
|
||||
(si7 7)
|
||||
(si8 8)
|
||||
)
|
||||
;; ---speech-info-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype speech-instance (structure)
|
||||
((speech uint16)
|
||||
(num-play-times int8)
|
||||
(probability float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype speech-info (structure)
|
||||
((speeches (array speech-instance))
|
||||
(flags speech-info-flag)
|
||||
(play-time time-frame)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun mark-speech-played ((arg0 speech-info) (arg1 int))
|
||||
(logior! (-> arg0 flags) (speech-info-flag si6 si7))
|
||||
(+! (-> arg0 speeches arg1 num-play-times) 1)
|
||||
(let ((v0-0 (current-time)))
|
||||
(set! (-> arg0 play-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defun speech-play ((arg0 (array speech-info)) (arg1 int) (arg2 (inline-array talker-speech-class)) (arg3 vector))
|
||||
(local-vars (v0-0 int))
|
||||
(let ((s1-0 (-> arg0 arg1))
|
||||
(v1-2 #xf4240)
|
||||
(a1-1 0)
|
||||
(s2-0 #f)
|
||||
)
|
||||
(if (and (logtest? (-> s1-0 flags) (speech-info-flag si0)) (logtest? (-> s1-0 flags) (speech-info-flag si6)))
|
||||
(return -1)
|
||||
)
|
||||
(when (and (logtest? (-> s1-0 flags) (speech-info-flag si3)) (logtest? (-> s1-0 flags) (speech-info-flag si7)))
|
||||
(set! s2-0 #t)
|
||||
(set! s1-0 (-> arg0 (+ arg1 1)))
|
||||
)
|
||||
(if (and (logtest? (-> s1-0 flags) (speech-info-flag si0)) (logtest? (-> s1-0 flags) (speech-info-flag si6)))
|
||||
(return -1)
|
||||
)
|
||||
(dotimes (a0-20 (-> s1-0 speeches length))
|
||||
(set! v1-2 (min (-> s1-0 speeches a0-20 num-play-times) v1-2))
|
||||
)
|
||||
(if (and (> v1-2 0) (logtest? (-> s1-0 flags) (speech-info-flag si4)))
|
||||
(return -1)
|
||||
)
|
||||
(dotimes (a0-26 (-> s1-0 speeches length))
|
||||
(if (< v1-2 (-> s1-0 speeches a0-26 num-play-times))
|
||||
(set! a1-1 (logior a1-1 (ash 1 a0-26)))
|
||||
)
|
||||
)
|
||||
(let ((s0-0 0))
|
||||
(set! s0-0 (cond
|
||||
((logtest? (-> s1-0 flags) (speech-info-flag si5))
|
||||
(dotimes (v1-7 (-> s1-0 speeches length))
|
||||
(when (not (logtest? a1-1 (ash 1 v1-7)))
|
||||
(set! s0-0 v1-7)
|
||||
0
|
||||
(goto cfg-45)
|
||||
)
|
||||
)
|
||||
(label cfg-45)
|
||||
s0-0
|
||||
)
|
||||
(else
|
||||
(rand-vu-int-count-excluding (-> s1-0 speeches length) a1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> s1-0 flags) (speech-info-flag si8))
|
||||
(set! arg2 *talker-speech*)
|
||||
)
|
||||
(mark-speech-played s1-0 s0-0)
|
||||
(talker-spawn-func (-> arg2 (-> s1-0 speeches s0-0 speech)) *entity-pool* arg3 (the-as region #f))
|
||||
(if s2-0
|
||||
(set-time! (-> arg0 arg1 play-time))
|
||||
)
|
||||
(return s0-0)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
|
||||
(defun speeches-reset ((arg0 (array speech-info)))
|
||||
(dotimes (v1-0 (-> arg0 length))
|
||||
(logclear! (-> arg0 v1-0 flags) (speech-info-flag si6))
|
||||
(set! (-> arg0 v1-0 play-time) 0)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defun speeches-debug-reset ((arg0 (array speech-info)))
|
||||
(dotimes (v1-0 (-> arg0 length))
|
||||
(logclear! (-> arg0 v1-0 flags) (speech-info-flag si6 si7))
|
||||
(set! (-> arg0 0 play-time) 0)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
(data_int_1 uint32)
|
||||
)
|
||||
(:methods
|
||||
(mysql-nav-node-method-9 () none)
|
||||
(mysql-nav-node-method-10 () none)
|
||||
(exec-sql! (_type_) symbol)
|
||||
(temp-edge-size (_type_) int)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype mysql-nav-node-array (inline-array-class)
|
||||
((data mysql-nav-node :dynamic)
|
||||
((data mysql-nav-node :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -201,21 +201,21 @@
|
||||
(level-info-array mysql-nav-graph-level-info 32 :inline)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(mysql-nav-graph-method-9 () none)
|
||||
(mysql-nav-graph-method-10 () none)
|
||||
(mysql-nav-graph-method-11 () none)
|
||||
(mysql-nav-graph-method-12 () none)
|
||||
(mysql-nav-graph-method-13 () none)
|
||||
(mysql-nav-graph-method-14 () none)
|
||||
(mysql-nav-graph-method-15 () none)
|
||||
(mysql-nav-graph-method-16 () none)
|
||||
(mysql-nav-graph-method-17 () none)
|
||||
(mysql-nav-graph-method-18 () none)
|
||||
(mysql-nav-graph-method-19 () none)
|
||||
(mysql-nav-graph-method-20 () none)
|
||||
(mysql-nav-graph-method-21 () none)
|
||||
(mysql-nav-graph-method-22 () none)
|
||||
(mysql-nav-graph-method-23 () none)
|
||||
(new (symbol type string) _type_)
|
||||
(init-from-sql! (_type_ string string) symbol)
|
||||
(exec-sql! (_type_) symbol)
|
||||
(indexof-nav-node (_type_ int) int)
|
||||
(indexof-nav-edge (_type_ int) int)
|
||||
(mysql-nav-graph-method-13 (_type_) none)
|
||||
(mysql-nav-graph-method-14 (_type_) none)
|
||||
(mysql-nav-graph-method-15 (_type_) none)
|
||||
(mysql-nav-graph-method-16 (_type_) none)
|
||||
(mysql-nav-graph-method-17 (_type_) none)
|
||||
(lookup-level-info2 (_type_ mysql-nav-node symbol) mysql-nav-graph-level-info)
|
||||
(mysql-nav-graph-method-19 (_type_) none)
|
||||
(mysql-nav-graph-method-20 (_type_) none)
|
||||
(mysql-nav-graph-method-21 (_type_) none)
|
||||
(mysql-nav-graph-method-22 (_type_) none)
|
||||
(mysql-nav-graph-method-23 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -125,3 +125,8 @@
|
||||
|
||||
|
||||
(define *nav-graph-editor* (the-as (pointer nav-graph-editor) #f))
|
||||
|
||||
;; stub
|
||||
(defun get-nav-graph-editor ()
|
||||
(the nav-graph-editor #f)
|
||||
)
|
||||
@@ -65,7 +65,7 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref krimson-wall :method-count 0)
|
||||
:ptype (type-ref krimson-wall :method-count 31)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
@@ -129,11 +129,6 @@
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref a :method-count 0)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref mhcity-grunt-egg-b :method-count 32)
|
||||
:pool '*16k-dead-pool*
|
||||
@@ -200,22 +195,17 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref a :method-count 0)
|
||||
:ptype (type-ref searchlight :method-count 21)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref searchlight :method-count 0)
|
||||
:ptype (type-ref ctyn-lamp :method-count 32)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref ctyn-lamp :method-count 0)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref burning-bush :method-count 0)
|
||||
:ptype (type-ref burning-bush :method-count 35)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
@@ -225,17 +215,17 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref barge :method-count 0)
|
||||
:ptype (type-ref barge :method-count 152)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref boat-manager :method-count 0)
|
||||
:ptype (type-ref boat-manager :method-count 17)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref propa :method-count 0)
|
||||
:ptype (type-ref propa :method-count 33)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
@@ -250,12 +240,12 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref parking-spot :method-count 0)
|
||||
:ptype (type-ref parking-spot :method-count 27)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref security-wall :method-count 0)
|
||||
:ptype (type-ref security-wall :method-count 25)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
(define-extern process-drawable-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float object))
|
||||
(define-extern *lightning-darkjak-pill* lightning-spec)
|
||||
(define-extern ready-hud (function symbol int none))
|
||||
(define-extern override-player-controls (function int))
|
||||
(define-extern override-player-controls (function cpad-info int))
|
||||
(define-extern *highscore-info-array* (array highscore-info))
|
||||
(define-extern *user* symbol)
|
||||
|
||||
@@ -1904,10 +1904,7 @@
|
||||
|
||||
(defmethod adjust-to-screen-flip ((this cpad-info))
|
||||
(if (and (not (paused?)) (zero? (-> this number)) (-> *setting-control* user-current player-control-override))
|
||||
(when (nonzero? override-player-controls) ;; og:preserve-this not-yet-implemented check
|
||||
;; added nonzero check, but I suspect there's a bug we're even getting here...
|
||||
(override-player-controls)
|
||||
)
|
||||
(override-player-controls this)
|
||||
)
|
||||
(when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
(set! (-> this leftx) (- 255 (the-as int (-> this leftx))))
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
(borrow-hold-count uint32)
|
||||
(borrow-hold pair 3)
|
||||
(cloth symbol)
|
||||
(player-control-override symbol)
|
||||
(player-control-override cpad-info)
|
||||
(player-control-mask uint32)
|
||||
(gun-special-mode symbol)
|
||||
(airlock-command pair)
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
(set! (-> this mh-enemy-settings) (the-as symbol arg3))
|
||||
)
|
||||
(('player-control-override)
|
||||
(set! (-> this player-control-override) (the-as symbol arg3))
|
||||
(set! (-> this player-control-override) (the-as cpad-info arg3))
|
||||
)
|
||||
(('player-control-mask)
|
||||
(set! (-> this player-control-mask) arg3)
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
(declare-type editable-player process)
|
||||
(define-extern *editable* (pointer editable-player))
|
||||
|
||||
;; temporarily forward declared as symbols
|
||||
(declare-type mission-squad-control basic)
|
||||
(declare-type cty-attack-controller mission-squad-control)
|
||||
(define-extern *cty-faction-manager* symbol)
|
||||
(declare-type cty-faction-manager basic)
|
||||
(define-extern *cty-faction-manager* cty-faction-manager)
|
||||
(define-extern *cty-attack-controller* cty-attack-controller)
|
||||
(set! *cty-faction-manager* #f)
|
||||
(set! *cty-faction-manager* (the cty-faction-manager #f))
|
||||
(set! *cty-attack-controller* (the cty-attack-controller #f))
|
||||
|
||||
(define-extern cty-attack-reset (function symbol symbol symbol none))
|
||||
|
||||
@@ -176,6 +176,34 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-ctyslumb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(let ((s5-1 (the-as object (-> arg0 state))))
|
||||
(update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0)
|
||||
(if (nonzero? (-> (the-as ctyslumb-states s5-1) spec-0))
|
||||
(set! (-> (the-as ctyslumb-states s5-1) spec-0 initial-valuef)
|
||||
(* 32.0 (-> (the-as ctyslumb-states s5-1) light fade))
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> (the-as ctyslumb-states s5-1) spec-1))
|
||||
(set! (-> (the-as ctyslumb-states s5-1) spec-1 initial-valuef)
|
||||
(* 8.0 (-> (the-as ctyslumb-states s5-1) light fade))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 times 6 w) 1.0)
|
||||
(set! (-> arg0 times 7 w) (-> (the-as ctyslumb-states s5-1) flicker))
|
||||
(if (not (paused?))
|
||||
(set! (-> (the-as ctyslumb-states s5-1) flicker) (rand-vu-float-range 0.8 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctyslumc-states (structure)
|
||||
((light light-state :inline)
|
||||
(spec-0 sp-field-init-spec)
|
||||
@@ -204,6 +232,34 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-ctyslumc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(let ((s5-1 (the-as object (-> arg0 state))))
|
||||
(update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0)
|
||||
(if (nonzero? (-> (the-as ctyslumc-states s5-1) spec-0))
|
||||
(set! (-> (the-as ctyslumc-states s5-1) spec-0 initial-valuef)
|
||||
(* 32.0 (-> (the-as ctyslumc-states s5-1) light fade))
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> (the-as ctyslumc-states s5-1) spec-1))
|
||||
(set! (-> (the-as ctyslumc-states s5-1) spec-1 initial-valuef)
|
||||
(* 8.0 (-> (the-as ctyslumc-states s5-1) light fade))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 times 6 w) 1.0)
|
||||
(set! (-> arg0 times 7 w) (-> (the-as ctyslumc-states s5-1) flicker))
|
||||
(if (not (paused?))
|
||||
(set! (-> (the-as ctyslumc-states s5-1) flicker) (rand-vu-float-range 0.8 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctygenb-states (structure)
|
||||
((light light-state :inline)
|
||||
(flame flames-state :inline)
|
||||
@@ -250,6 +306,42 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-ctygenb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (!= arg2 -1)
|
||||
(= (-> *level* level arg2 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(let ((gp-1 (the-as object (-> arg0 state))))
|
||||
(update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0)
|
||||
(update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5)
|
||||
(when (or (>= arg1 18.0) (>= 6.0 arg1))
|
||||
(update-mood-flicker arg0 7 15)
|
||||
(let ((f1-2 (-> (the-as ctygenb-states gp-1) next-flicker))
|
||||
(f0-2 (-> arg0 times 7 w))
|
||||
)
|
||||
(set! (-> arg0 times 7 w) f1-2)
|
||||
(if (nonzero? (-> (the-as ctygenb-states gp-1) spec-0))
|
||||
(set! (-> (the-as ctygenb-states gp-1) spec-0 initial-valuef) (* 40.0 f0-2))
|
||||
)
|
||||
(if (nonzero? (-> (the-as ctygenb-states gp-1) spec-1))
|
||||
(set! (-> (the-as ctygenb-states gp-1) spec-1 initial-valuef) (* 20.0 f0-2))
|
||||
)
|
||||
(if (nonzero? (-> (the-as ctygenb-states gp-1) spec-2))
|
||||
(set! (-> (the-as ctygenb-states gp-1) spec-2 initial-valuef) (* 20.0 f0-2))
|
||||
)
|
||||
(if (nonzero? (-> (the-as ctygenb-states gp-1) spec-3))
|
||||
(set! (-> (the-as ctygenb-states gp-1) spec-3 initial-valuef) (* 8.0 f0-2))
|
||||
)
|
||||
(set! (-> (the-as ctygenb-states gp-1) next-flicker) f0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *mhcity-mood-fog-table*
|
||||
(new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8
|
||||
(new 'static 'mood-fog
|
||||
@@ -296,7 +388,21 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; ERROR: function has no type analysis. Cannot decompile.
|
||||
(defun overide-mhcity-fog ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(when (not (-> *time-of-day-context* overide-enable))
|
||||
(let* ((f30-0 (vector-vector-distance (target-pos 0) (new 'static 'vector :x -1072496.6 :y -22159.36 :z 4246978.5)))
|
||||
(f0-0 (vector-vector-distance (target-pos 0) (new 'static 'vector :x -1118986.2 :y -30474.24 :z 3107348.5)))
|
||||
(f0-5 (fmin
|
||||
(fmax 0.0 (fmin 1.0 (* 0.0000032552084 (+ -1228800.0 f30-0))))
|
||||
(fmax 0.0 (fmin 1.0 (* 0.0000032552084 (+ -737280.0 f0-0))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(overide-mood-fog arg0 arg1 (the-as int *mhcity-mood-fog-table*) f0-5)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype mhcitya-states (structure)
|
||||
((pulse pulse-state :inline)
|
||||
@@ -315,6 +421,23 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-mhcitya time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(let ((s5-0 arg2))
|
||||
(copy-mood-exterior arg0)
|
||||
(overide-mhcity-fog arg0 arg1 arg2)
|
||||
(when (and (= (-> *level* level s5-0 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(-> arg0 state)
|
||||
(set! (-> arg0 times 5 w) 1.0)
|
||||
(update-mood-pulse arg0 6 0 0.75 0.25 (* 32768.0 (seconds-per-frame)) 0.0)
|
||||
(set! (-> arg0 times 7 w) 1.0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype mhcityb-states (structure)
|
||||
((pulse pulse-state :inline)
|
||||
)
|
||||
@@ -332,6 +455,75 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-mhcityb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(let ((s5-0 arg2))
|
||||
(copy-mood-exterior arg0)
|
||||
(overide-mhcity-fog arg0 arg1 arg2)
|
||||
(when (and (= (-> *level* level s5-0 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(-> arg0 state)
|
||||
(set! (-> arg0 times 5 w) 1.0)
|
||||
(update-mood-pulse arg0 6 0 0.75 0.25 (* 32768.0 (seconds-per-frame)) 0.0)
|
||||
(set! (-> arg0 times 7 w) 1.0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun calc-lmhcity-palettes ((arg0 mood-context))
|
||||
(let ((v1-3 (mod (-> *display* part-clock frame-counter) 4800)))
|
||||
(dotimes (a1-1 8)
|
||||
(let* ((a2-1 (* 600 a1-1))
|
||||
(a3-0 (+ a2-1 1200))
|
||||
)
|
||||
(cond
|
||||
((= a1-1 7)
|
||||
(if (< v1-3 (mod a3-0 4800))
|
||||
(set! (-> arg0 times a1-1 w) (- 1.0 (* 0.0016666667 (the float v1-3))))
|
||||
)
|
||||
(if (< a2-1 v1-3)
|
||||
(set! (-> arg0 times a1-1 w) (* 0.0016666667 (the float (- v1-3 a2-1))))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (and (< v1-3 a3-0) (< a2-1 v1-3))
|
||||
(let ((f0-5 (* 0.0016666667 (the float (- v1-3 a2-1)))))
|
||||
(if (< 1.0 f0-5)
|
||||
(set! (-> arg0 times a1-1 w) (- 2.0 f0-5))
|
||||
(set! (-> arg0 times a1-1 w) f0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defbehavior update-mood-lmhcitya time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(overide-mhcity-fog arg0 arg1 arg2)
|
||||
(if (< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
||||
(palette-select-special arg0)
|
||||
(calc-lmhcity-palettes arg0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-lmhcityb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(overide-mhcity-fog arg0 arg1 arg2)
|
||||
(if (< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
||||
(palette-select-special arg0)
|
||||
(calc-lmhcity-palettes arg0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctyport-states (structure)
|
||||
((light light-state :inline)
|
||||
(spec-0 sp-field-init-spec)
|
||||
@@ -340,7 +532,46 @@
|
||||
)
|
||||
|
||||
|
||||
(define *ctyport-level* (the-as level-group #f))
|
||||
(define *ctyport-level* (the-as level #f))
|
||||
|
||||
(defbehavior update-mood-ctyport time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(let ((s4-0 arg2))
|
||||
(copy-mood-exterior arg0)
|
||||
(overide-mhcity-fog arg0 arg1 arg2)
|
||||
(when (and (!= s4-0 -1)
|
||||
(= (-> *level* level s4-0 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(-> arg0 state)
|
||||
(update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0)
|
||||
(set! (-> arg0 times 6 w) 1.0)
|
||||
(set! (-> arg0 times 7 w) 1.0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defun reset-marquee-color! ()
|
||||
(set! *ctyport-level* (level-get *level* 'ctyport))
|
||||
(if *ctyport-level*
|
||||
(set-vector! (-> *ctyport-level* mood-context times 6) 0.0 0.0 0.0 1.0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun add-marquee-color! ((arg0 float) (arg1 float) (arg2 float))
|
||||
(when *ctyport-level*
|
||||
(let ((v1-2 (-> *ctyport-level* mood-context)))
|
||||
(+! (-> v1-2 times 6 x) arg0)
|
||||
(+! (-> v1-2 times 6 y) arg1)
|
||||
(+! (-> v1-2 times 6 z) arg2)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctymarka-states (structure)
|
||||
((light light-state :inline)
|
||||
@@ -438,6 +669,47 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-mountain time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(let ((gp-1 (the-as object (-> arg0 state))))
|
||||
(update-mood-light arg0 5 0 0.875 0.25 2.0 0.0 1.0)
|
||||
(update-mood-light arg0 6 8 1.0 0.0 arg1 0.0 1.0)
|
||||
(set! (-> arg0 times 7 w) 1.0)
|
||||
(let* ((f0-1 (-> arg0 times 5 w))
|
||||
(f1-1 (* 24.0 f0-1))
|
||||
(f0-2 (* 20.0 f0-1))
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-0))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-0 initial-valuef) f1-1)
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-1))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-1 initial-valuef) f0-2)
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-2))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-2 initial-valuef) f0-2)
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-3))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-3 initial-valuef) f0-2)
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-4))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-4 initial-valuef) f0-2)
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-5))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-5 initial-valuef) f0-2)
|
||||
)
|
||||
(if (nonzero? (-> (the-as mountain-states gp-1) spec-6))
|
||||
(set! (-> (the-as mountain-states gp-1) spec-6 initial-valuef) f0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctyinda-states (structure)
|
||||
((light light-state :inline)
|
||||
)
|
||||
@@ -497,6 +769,40 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype atoll-states (structure)
|
||||
((light light-state :inline)
|
||||
(explosion float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun init-mood-atoll ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 state))
|
||||
(f0-0 0.0)
|
||||
)
|
||||
(set! (-> v1-0 2) (the-as uint f0-0))
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-atoll time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
||||
)
|
||||
(let ((s4-1 (the-as object (-> arg0 state))))
|
||||
(update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0)
|
||||
(set! (-> arg0 times 7 w) (-> (the-as atoll-states s4-1) explosion))
|
||||
(if (not (paused?))
|
||||
(seek! (-> (the-as atoll-states s4-1) explosion) 0.0 (* 2.0 (seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun set-atoll-explosion! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'atoll)))
|
||||
(when v1-1
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-u-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(defun matrix-u-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 uvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 fvec) arg2 arg1)
|
||||
(vector-normalize! (-> arg0 fvec) 1.0)
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
;; ERROR: Bad vector register dependency: vf2
|
||||
(defun quaternion-conjugate! ((arg0 quaternion) (arg1 quaternion))
|
||||
"Set arg0 to the conjugate of arg1 (negate only ijk).
|
||||
If arg1 is normalized, this is equivalent to the inverse
|
||||
NOTE: this gives you the inverse rotation."
|
||||
If arg1 is normalized, this is equivalent to the inverse
|
||||
NOTE: this gives you the inverse rotation."
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
@@ -259,7 +259,7 @@ NOTE: this gives you the inverse rotation."
|
||||
;; ERROR: Bad vector register dependency: vf3
|
||||
(defun quaternion-inverse! ((arg0 quaternion) (arg1 quaternion))
|
||||
"Invert a quaternion. The inverse will satisfy q * q^-1 = identity, even if q is not normalized.
|
||||
If your quaternion is normalized, it is faster/more accurate to do quaternion-conjugate!"
|
||||
If your quaternion is normalized, it is faster/more accurate to do quaternion-conjugate!"
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -339,9 +339,9 @@ If your quaternion is normalized, it is faster/more accurate to do quaternion-co
|
||||
|
||||
(defun quaternion-right-mult-matrix! ((arg0 matrix) (arg1 quaternion))
|
||||
"Place quaternion coefficients into a matrix.
|
||||
You can convert a quaternion to a matrix by taking the product of this
|
||||
right-mult and left-mult matrix, but this method is not used.
|
||||
Instead, quaternion->matrix is a more efficient implementation."
|
||||
You can convert a quaternion to a matrix by taking the product of this
|
||||
right-mult and left-mult matrix, but this method is not used.
|
||||
Instead, quaternion->matrix is a more efficient implementation."
|
||||
(let ((f3-0 (-> arg1 x))
|
||||
(f2-0 (-> arg1 y))
|
||||
(f1-0 (-> arg1 z))
|
||||
@@ -674,7 +674,7 @@ Instead, quaternion->matrix is a more efficient implementation."
|
||||
|
||||
(defun quaternion-slerp! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"Real quaternion slerp. Spherical-linear interpolation is a nice way to interpolate
|
||||
between quaternions."
|
||||
between quaternions."
|
||||
(local-vars (v1-15 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -739,8 +739,8 @@ between quaternions."
|
||||
|
||||
(defun quaternion-pseudo-slerp! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"This is a bad interpolation between quaternions. It lerps then normalizes.
|
||||
It will behave extremely poorly for 180 rotations.
|
||||
It is unused."
|
||||
It will behave extremely poorly for 180 rotations.
|
||||
It is unused."
|
||||
(rlet ((acc :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -773,7 +773,7 @@ It is unused."
|
||||
|
||||
(defun quaternion-pseudo-seek ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"Seek one quaternion toward another. Not using real slerp, so this is only good if the quaternions
|
||||
are pretty similar."
|
||||
are pretty similar."
|
||||
(let ((s3-0 (new 'stack-no-clear 'quaternion)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'quaternion)))
|
||||
(quaternion-copy! s3-0 arg2)
|
||||
@@ -797,16 +797,16 @@ are pretty similar."
|
||||
|
||||
(defun quaternion-smooth-seek! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"Another hacky rotation interpolation."
|
||||
(let ((gp-0 (new 'stack-no-clear 'quaternion)))
|
||||
(quaternion-copy! (the-as quaternion (&-> gp-0 x)) arg2)
|
||||
(if (< (quaternion-dot (the-as quaternion (&-> gp-0 x)) arg1) 0.0)
|
||||
(quaternion-negate! (the-as quaternion (&-> gp-0 x)) (the-as quaternion (&-> gp-0 x)))
|
||||
(let ((gp-0 (new 'stack-no-clear 'inline-array 'quaternion 2)))
|
||||
(quaternion-copy! (-> gp-0 0) arg2)
|
||||
(if (< (quaternion-dot (-> gp-0 0) arg1) 0.0)
|
||||
(quaternion-negate! (-> gp-0 0) (-> gp-0 0))
|
||||
)
|
||||
(quaternion-! (&+ gp-0 16) (the-as quaternion (&-> gp-0 x)) arg1)
|
||||
(quaternion-float*! (&+ gp-0 16) (&+ gp-0 16) (fmin 1.0 arg3))
|
||||
(quaternion+! (the-as quaternion (&-> gp-0 x)) arg1 (&+ gp-0 16))
|
||||
(quaternion-normalize! (the-as quaternion (&-> gp-0 x)))
|
||||
(quaternion-copy! arg0 (the-as quaternion (&-> gp-0 x)))
|
||||
(quaternion-! (-> gp-0 1) (-> gp-0 0) arg1)
|
||||
(quaternion-float*! (-> gp-0 1) (-> gp-0 1) (fmin 1.0 arg3))
|
||||
(quaternion+! (-> gp-0 0) arg1 (-> gp-0 1))
|
||||
(quaternion-normalize! (-> gp-0 0))
|
||||
(quaternion-copy! arg0 (-> gp-0 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
debug-control
|
||||
)
|
||||
(:methods
|
||||
(init-enemy-info! (_type_ nav-enemy-info) none :replace)
|
||||
(init-enemy-defaults! (_type_ nav-enemy-info) object :replace)
|
||||
(normalize-heading! (_type_ nav-control) none)
|
||||
(nav-enemy-method-161 (_type_ nav-control) none)
|
||||
(nav-enemy-method-162 (_type_) none)
|
||||
|
||||
@@ -613,9 +613,9 @@
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defmethod init-enemy-info! ((this nav-enemy) (arg0 enemy-info))
|
||||
(set! (-> this enemy-info) (the-as nav-enemy-info arg0))
|
||||
(set! (-> (the-as nav-enemy-info arg0) callback-info) *default-nav-callback-info*)
|
||||
(defmethod init-enemy-info! ((this nav-enemy) (arg0 nav-enemy-info))
|
||||
(set! (-> this enemy-info) arg0)
|
||||
(set! (-> arg0 callback-info) *default-nav-callback-info*)
|
||||
(when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck)))
|
||||
(set! (-> this neck)
|
||||
(new 'process 'joint-mod (joint-mod-mode flex-blend) this (-> this enemy-info neck-joint))
|
||||
@@ -630,7 +630,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-enemy-defaults! ((this nav-enemy) (arg0 enemy-info))
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod init-enemy-defaults! ((this nav-enemy) (arg0 nav-enemy-info))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -674,7 +675,7 @@
|
||||
)
|
||||
(set! (-> this draw shadow-ctrl) *nav-enemy-dummy-shadow-control*)
|
||||
)
|
||||
(get-nav-control this (-> (the-as nav-enemy-info arg0) nav-mesh))
|
||||
(get-nav-control this (-> arg0 nav-mesh))
|
||||
(set! (-> this water-max-height) (-> this nav state mesh water-max-height))
|
||||
(let ((v1-32 this))
|
||||
(set! (-> v1-32 enemy-flags) (the-as enemy-flag (logclear (-> v1-32 enemy-flags) (enemy-flag ef37))))
|
||||
@@ -848,7 +849,6 @@
|
||||
(set! (-> this draw light-index) (the-as uint 10))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2233,8 +2233,11 @@
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (-> self nav)))
|
||||
(logclear! (-> v1-4 shape nav-flags) (nav-flags has-extra-sphere))
|
||||
;; og:preserve-this fix potential use-after-free bug
|
||||
(if (-> self nav)
|
||||
(let ((v1-4 (-> self nav)))
|
||||
(logclear! (-> v1-4 shape nav-flags) (nav-flags has-extra-sphere))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
(rigid-body-control-method-22 (_type_ vector vector) none)
|
||||
(rigid-body-control-method-23 (_type_ vector vector) none)
|
||||
(rigid-body-control-method-24 (_type_ vector vector) none)
|
||||
(rigid-body-control-method-25 (_type_ vector) none)
|
||||
(rigid-body-control-method-25 (_type_ vector) vector)
|
||||
(rigid-body-control-method-26 (_type_) none)
|
||||
(init! (_type_ rigid-body-info vector quaternion (function rigid-body-object float)) none)
|
||||
(rigid-body-control-method-28 (_type_ vector quaternion) none)
|
||||
@@ -212,7 +212,7 @@
|
||||
active
|
||||
)
|
||||
(:methods
|
||||
(rigid-body-object-method-30 (_type_) none)
|
||||
(rigid-body-object-method-30 (_type_) object)
|
||||
(apply-gravity! (_type_ float) none)
|
||||
(rigid-body-object-method-32 (_type_) none)
|
||||
(alloc-rbody-control! (_type_ rigid-body-object-constants) none)
|
||||
|
||||
@@ -776,13 +776,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defmethod rigid-body-control-method-25 ((this rigid-body-control) (arg0 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-rotate*! gp-0 (-> this info cm-offset-joint) (-> this matrix))
|
||||
(vector-! arg0 (-> this position) gp-0)
|
||||
)
|
||||
(none)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod debug-print-force-torque ((this rigid-body-control) (arg0 object))
|
||||
@@ -1014,10 +1013,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod rigid-body-object-method-30 ((this rigid-body-object))
|
||||
(ja-post)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rbody-post ((this rigid-body-object))
|
||||
|
||||
@@ -111,7 +111,7 @@ O(n^2) 'check everybody against everybody' collision loop."
|
||||
(update-from-spheres (_type_) none)
|
||||
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none)
|
||||
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol)
|
||||
(add-sphere-with-mask-and-id (_type_ vector int int) symbol)
|
||||
(add-sphere-with-mask-and-id (_type_ vector vector float int) symbol)
|
||||
(sphere-hash-method-32 (_type_ sphere int) symbol)
|
||||
)
|
||||
)
|
||||
@@ -136,7 +136,7 @@ O(n^2) 'check everybody against everybody' collision loop."
|
||||
(fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int)
|
||||
(fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
|
||||
(fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
|
||||
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int)
|
||||
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape)) int)
|
||||
(spatial-hash-method-39 (_type_ object hash-object-info) int)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1327,7 +1327,7 @@
|
||||
(let ((s5-1 (the-as object (-> arg3 param 1))))
|
||||
(when (not (the-as uint s5-1))
|
||||
(let ((s4-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s4-0 object-type) (the-as uint 6))
|
||||
(set! (-> s4-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> s4-0 behavior) (the-as uint 4))
|
||||
(set! (-> s4-0 id) (the-as uint 0))
|
||||
(set! (-> s4-0 nav-mesh) #f)
|
||||
|
||||
+133
-133
@@ -105,50 +105,51 @@
|
||||
(cgo-file "wasseem.gd" common-dep)
|
||||
(cgo-file "wca.gd" common-dep)
|
||||
(cgo-file "wcb.gd" common-dep)
|
||||
(cgo-file "wasleapr.gd" common-dep)
|
||||
(cgo-file "wcaseem.gd" common-dep)
|
||||
(cgo-file "wascast.gd" common-dep)
|
||||
(cgo-file "desresc.gd" common-dep)
|
||||
(cgo-file "wasleapr.gd" common-dep)
|
||||
(cgo-file "cwi.gd" common-dep) ;; ctywide
|
||||
(cgo-file "wasall.gd" common-dep)
|
||||
(cgo-file "wwd.gd" common-dep) ;; waswide
|
||||
(cgo-file "desresc.gd" common-dep)
|
||||
(cgo-file "wsd.gd" common-dep) ;; wasdoors (garage)
|
||||
(cgo-file "waspgame.gd" common-dep)
|
||||
(cgo-file "wwd.gd" common-dep) ;; waswide
|
||||
; ;; arena
|
||||
(cgo-file "wasstada.gd" common-dep)
|
||||
(cgo-file "wasstadb.gd" common-dep)
|
||||
(cgo-file "wasstadc.gd" common-dep)
|
||||
(cgo-file "arenacst.gd" common-dep)
|
||||
; ;; desert
|
||||
; (cgo-file "desa.gd" common-dep)
|
||||
(cgo-file "desa.gd" common-dep)
|
||||
(cgo-file "desb.gd" common-dep)
|
||||
(cgo-file "desbattl.gd" common-dep)
|
||||
; (cgo-file "desbcst.gd" common-dep)
|
||||
; (cgo-file "desc.gd" common-dep)
|
||||
; (cgo-file "deschase.gd" common-dep)
|
||||
(cgo-file "desbcst.gd" common-dep)
|
||||
(cgo-file "desc.gd" common-dep)
|
||||
(cgo-file "deschase.gd" common-dep)
|
||||
(cgo-file "desd.gd" common-dep)
|
||||
; (cgo-file "dese.gd" common-dep)
|
||||
; (cgo-file "deserrol.gd" common-dep)
|
||||
(cgo-file "dese.gd" common-dep)
|
||||
(cgo-file "deserrol.gd" common-dep)
|
||||
(cgo-file "desf.gd" common-dep)
|
||||
(cgo-file "desg.gd" common-dep)
|
||||
; (cgo-file "desh.gd" common-dep)
|
||||
(cgo-file "desh.gd" common-dep)
|
||||
(cgo-file "deshover.gd" common-dep)
|
||||
; (cgo-file "deshunt.gd" common-dep)
|
||||
(cgo-file "deshunt.gd" common-dep)
|
||||
(cgo-file "desinter.gd" common-dep)
|
||||
; (cgo-file "desjump.gd" common-dep)
|
||||
(cgo-file "desjump.gd" common-dep)
|
||||
(cgo-file "desliz.gd" common-dep)
|
||||
(cgo-file "desoasis.gd" common-dep)
|
||||
(cgo-file "desrace1.gd" common-dep)
|
||||
(cgo-file "desrace2.gd" common-dep)
|
||||
(cgo-file "desrally.gd" common-dep)
|
||||
; (cgo-file "desrescc.gd" common-dep)
|
||||
; (cgo-file "desrescg.gd" common-dep)
|
||||
(cgo-file "desrescc.gd" common-dep)
|
||||
(cgo-file "desrescg.gd" common-dep)
|
||||
(cgo-file "destrack.gd" common-dep)
|
||||
(cgo-file "dst.gd" common-dep)
|
||||
(cgo-file "desw.gd" common-dep)
|
||||
(cgo-file "desboss1.gd" common-dep)
|
||||
(cgo-file "desboss2.gd" common-dep)
|
||||
; (cgo-file "oasiscst.gd" common-dep)
|
||||
; (cgo-file "warpcast.gd" common-dep) ;; air train
|
||||
(cgo-file "oasiscst.gd" common-dep)
|
||||
(cgo-file "warpcast.gd" common-dep) ;; air train
|
||||
; ;; nest
|
||||
(cgo-file "nsa.gd" common-dep)
|
||||
(cgo-file "nsb.gd" common-dep)
|
||||
@@ -173,54 +174,53 @@
|
||||
(cgo-file "mined.gd" common-dep)
|
||||
(cgo-file "minee.gd" common-dep)
|
||||
; ;; city
|
||||
(cgo-file "cwi.gd" common-dep) ;; ctywide
|
||||
; (cgo-file "cfa.gd" common-dep) ;; ctyfarm
|
||||
; (cgo-file "cfb.gd" common-dep)
|
||||
; (cgo-file "cgb.gd" common-dep) ;; ctygen
|
||||
; (cgo-file "cia.gd" common-dep) ;; ctyind
|
||||
; (cgo-file "cib.gd" common-dep)
|
||||
; (cgo-file "cpo.gd" common-dep) ;; ctyport
|
||||
; (cgo-file "cta.gd" common-dep)
|
||||
; (cgo-file "ctb.gd" common-dep)
|
||||
; (cgo-file "ctc.gd" common-dep)
|
||||
; (cgo-file "ctypepa.gd" common-dep) ;; citizens
|
||||
; (cgo-file "ctypepb.gd" common-dep) ;; predator
|
||||
; (cgo-file "ctypepc.gd" common-dep) ;; empty
|
||||
; (cgo-file "ctypesa.gd" common-dep) ;; guards
|
||||
; (cgo-file "ctypesb.gd" common-dep) ;; metal heads
|
||||
; (cgo-file "ctypesc.gd" common-dep) ;; kg
|
||||
; (cgo-file "ctycara.gd" common-dep) ;; cars
|
||||
; (cgo-file "ctycarb.gd" common-dep) ;; bikes
|
||||
; (cgo-file "ctycarc.gd" common-dep) ;; hellcat
|
||||
; (cgo-file "ctycarkg.gd" common-dep) ;; empty
|
||||
; (cgo-file "onintent.gd" common-dep)
|
||||
; (cgo-file "hhg.gd" common-dep) ;; hiphog
|
||||
; (cgo-file "gga.gd" common-dep) ;; gungame
|
||||
; (cgo-file "gungame1.gd" common-dep)
|
||||
; (cgo-file "gungame2.gd" common-dep)
|
||||
; (cgo-file "powergd.gd" common-dep)
|
||||
(cgo-file "cfa.gd" common-dep) ;; ctyfarm
|
||||
(cgo-file "cfb.gd" common-dep)
|
||||
(cgo-file "cgb.gd" common-dep) ;; ctygen
|
||||
(cgo-file "cia.gd" common-dep) ;; ctyind
|
||||
(cgo-file "cib.gd" common-dep)
|
||||
(cgo-file "cpo.gd" common-dep) ;; ctyport
|
||||
(cgo-file "cta.gd" common-dep)
|
||||
(cgo-file "ctb.gd" common-dep)
|
||||
(cgo-file "ctc.gd" common-dep)
|
||||
(cgo-file "ctypepa.gd" common-dep) ;; citizens
|
||||
(cgo-file "ctypepb.gd" common-dep) ;; predator
|
||||
(cgo-file "ctypepc.gd" common-dep) ;; empty
|
||||
(cgo-file "ctypesa.gd" common-dep) ;; guards
|
||||
(cgo-file "ctypesb.gd" common-dep) ;; metal heads
|
||||
(cgo-file "ctypesc.gd" common-dep) ;; kg
|
||||
(cgo-file "ctycara.gd" common-dep) ;; cars
|
||||
(cgo-file "ctycarb.gd" common-dep) ;; bikes
|
||||
(cgo-file "ctycarc.gd" common-dep) ;; hellcat
|
||||
(cgo-file "ctycarkg.gd" common-dep) ;; empty
|
||||
(cgo-file "onintent.gd" common-dep)
|
||||
(cgo-file "hhg.gd" common-dep) ;; hiphog
|
||||
(cgo-file "gga.gd" common-dep) ;; gungame
|
||||
(cgo-file "gungame1.gd" common-dep)
|
||||
(cgo-file "gungame2.gd" common-dep)
|
||||
(cgo-file "powergd.gd" common-dep)
|
||||
(cgo-file "freehq.gd" common-dep)
|
||||
; (cgo-file "vin.gd" common-dep)
|
||||
; (cgo-file "freecast.gd" common-dep)
|
||||
; (cgo-file "citycast.gd" common-dep)
|
||||
; (cgo-file "gridcst.gd" common-dep) ;; city-destroy-grid-res
|
||||
; (cgo-file "slumbset.gd" common-dep) ;; sewer-met-hum-intro
|
||||
(cgo-file "vin.gd" common-dep)
|
||||
(cgo-file "freecast.gd" common-dep)
|
||||
(cgo-file "citycast.gd" common-dep)
|
||||
(cgo-file "gridcst.gd" common-dep) ;; city-destroy-grid-res
|
||||
(cgo-file "slumbset.gd" common-dep) ;; sewer-met-hum-intro
|
||||
; ;; sewer
|
||||
(cgo-file "sea.gd" common-dep)
|
||||
; (cgo-file "seb.gd" common-dep)
|
||||
; (cgo-file "sec.gd" common-dep)
|
||||
; (cgo-file "sed.gd" common-dep)
|
||||
; (cgo-file "see.gd" common-dep)
|
||||
; (cgo-file "sef.gd" common-dep)
|
||||
; (cgo-file "seg.gd" common-dep)
|
||||
; (cgo-file "seh.gd" common-dep)
|
||||
; (cgo-file "sei.gd" common-dep)
|
||||
; (cgo-file "sej.gd" common-dep)
|
||||
; (cgo-file "sek.gd" common-dep)
|
||||
; (cgo-file "sel.gd" common-dep)
|
||||
; (cgo-file "sem.gd" common-dep)
|
||||
; (cgo-file "sen.gd" common-dep)
|
||||
; (cgo-file "seo.gd" common-dep)
|
||||
(cgo-file "seb.gd" common-dep)
|
||||
(cgo-file "sec.gd" common-dep)
|
||||
(cgo-file "sed.gd" common-dep)
|
||||
(cgo-file "see.gd" common-dep)
|
||||
(cgo-file "sef.gd" common-dep)
|
||||
(cgo-file "seg.gd" common-dep)
|
||||
(cgo-file "seh.gd" common-dep)
|
||||
(cgo-file "sei.gd" common-dep)
|
||||
(cgo-file "sej.gd" common-dep)
|
||||
(cgo-file "sek.gd" common-dep)
|
||||
(cgo-file "sel.gd" common-dep)
|
||||
(cgo-file "sem.gd" common-dep)
|
||||
(cgo-file "sen.gd" common-dep)
|
||||
(cgo-file "seo.gd" common-dep)
|
||||
; ;; mhcity
|
||||
(cgo-file "mhca.gd" common-dep)
|
||||
(cgo-file "mhcb.gd" common-dep)
|
||||
@@ -245,11 +245,11 @@
|
||||
(cgo-file "staa.gd" common-dep)
|
||||
(cgo-file "stb.gd" common-dep)
|
||||
; ;; rubble
|
||||
; (cgo-file "rbct.gd" common-dep)
|
||||
; (cgo-file "ruba.gd" common-dep)
|
||||
; (cgo-file "ruba2.gd" common-dep)
|
||||
; (cgo-file "rubb.gd" common-dep)
|
||||
; (cgo-file "rubc.gd" common-dep)
|
||||
(cgo-file "rbct.gd" common-dep)
|
||||
(cgo-file "ruba.gd" common-dep)
|
||||
(cgo-file "ruba2.gd" common-dep)
|
||||
(cgo-file "rubb.gd" common-dep)
|
||||
(cgo-file "rubc.gd" common-dep)
|
||||
; ;; comb
|
||||
(cgo-file "comba.gd" common-dep)
|
||||
(cgo-file "combb.gd" common-dep)
|
||||
@@ -276,8 +276,8 @@
|
||||
(cgo-file "win.gd" common-dep) ;; wasintro
|
||||
(cgo-file "title.gd" common-dep)
|
||||
(cgo-file "inttitle.gd" common-dep)
|
||||
; (cgo-file "intpalrf.gd" common-dep) ;; intro-palace-roof
|
||||
; (cgo-file "ipf.gd" common-dep) ;; intro-palace-fall
|
||||
(cgo-file "intpalrf.gd" common-dep) ;; intro-palace-roof
|
||||
(cgo-file "ipf.gd" common-dep) ;; intro-palace-fall
|
||||
(cgo-file "introcst.gd" common-dep)
|
||||
; ;; outro
|
||||
; (cgo-file "outcast3.gd" common-dep)
|
||||
@@ -292,7 +292,7 @@
|
||||
;; test
|
||||
(cgo-file "halfpipe.gd" common-dep)
|
||||
; ;; borrow
|
||||
; (cgo-file "lashelin.gd" common-dep)
|
||||
(cgo-file "lashelin.gd" common-dep)
|
||||
(cgo-file "lbbring1.gd" common-dep)
|
||||
(cgo-file "lbbring2.gd" common-dep)
|
||||
(cgo-file "lbbring3.gd" common-dep)
|
||||
@@ -309,28 +309,28 @@
|
||||
(cgo-file "lbbtcha1.gd" common-dep)
|
||||
(cgo-file "lbbtcha2.gd" common-dep)
|
||||
(cgo-file "lbbtcha3.gd" common-dep)
|
||||
; (cgo-file "lbiped.gd" common-dep)
|
||||
; (cgo-file "lblowcst.gd" common-dep)
|
||||
; (cgo-file "lblowtkg.gd" common-dep)
|
||||
; (cgo-file "lblowtmh.gd" common-dep)
|
||||
; (cgo-file "lbombbot.gd" common-dep)
|
||||
; (cgo-file "lcitysml.gd" common-dep)
|
||||
; (cgo-file "lctyass.gd" common-dep)
|
||||
; (cgo-file "lctyblow.gd" common-dep)
|
||||
(cgo-file "lbiped.gd" common-dep)
|
||||
(cgo-file "lblowcst.gd" common-dep)
|
||||
(cgo-file "lblowtkg.gd" common-dep)
|
||||
(cgo-file "lblowtmh.gd" common-dep)
|
||||
(cgo-file "lbombbot.gd" common-dep)
|
||||
(cgo-file "lcitysml.gd" common-dep)
|
||||
(cgo-file "lctyass.gd" common-dep)
|
||||
(cgo-file "lctyblow.gd" common-dep)
|
||||
(cgo-file "lctydest.gd" common-dep)
|
||||
; (cgo-file "lctyhijk.gd" common-dep)
|
||||
; (cgo-file "lctypalt.gd" common-dep)
|
||||
; (cgo-file "lctypatk.gd" common-dep)
|
||||
; (cgo-file "lctyprot.gd" common-dep)
|
||||
; (cgo-file "lctysnpr.gd" common-dep)
|
||||
; (cgo-file "ldamklev.gd" common-dep)
|
||||
; (cgo-file "ldampeck.gd" common-dep)
|
||||
; (cgo-file "ldampksm.gd" common-dep)
|
||||
; (cgo-file "ldamsig.gd" common-dep)
|
||||
; (cgo-file "ldax.gd" common-dep)
|
||||
; (cgo-file "ldesgcst.gd" common-dep)
|
||||
; (cgo-file "ldmpckgn.gd" common-dep)
|
||||
; (cgo-file "lerrol.gd" common-dep)
|
||||
(cgo-file "lctyhijk.gd" common-dep)
|
||||
(cgo-file "lctypalt.gd" common-dep)
|
||||
(cgo-file "lctypatk.gd" common-dep)
|
||||
(cgo-file "lctyprot.gd" common-dep)
|
||||
(cgo-file "lctysnpr.gd" common-dep)
|
||||
(cgo-file "ldamklev.gd" common-dep)
|
||||
(cgo-file "ldampeck.gd" common-dep)
|
||||
(cgo-file "ldampksm.gd" common-dep)
|
||||
(cgo-file "ldamsig.gd" common-dep)
|
||||
(cgo-file "ldax.gd" common-dep)
|
||||
(cgo-file "ldesgcst.gd" common-dep)
|
||||
(cgo-file "ldmpckgn.gd" common-dep)
|
||||
(cgo-file "lerrol.gd" common-dep)
|
||||
(cgo-file "lfacb.gd" common-dep)
|
||||
(cgo-file "lfaccar.gd" common-dep)
|
||||
(cgo-file "lfaccity.gd" common-dep)
|
||||
@@ -339,60 +339,60 @@
|
||||
(cgo-file "lfactory.gd" common-dep)
|
||||
(cgo-file "lform.gd" common-dep)
|
||||
(cgo-file "lforp.gd" common-dep)
|
||||
; (cgo-file "lforring.gd" common-dep)
|
||||
(cgo-file "lforring.gd" common-dep)
|
||||
(cgo-file "lfreeout.gd" common-dep)
|
||||
; (cgo-file "lgunnorm.gd" common-dep)
|
||||
; (cgo-file "lgunrnc.gd" common-dep)
|
||||
; (cgo-file "ljak.gd" common-dep)
|
||||
; (cgo-file "ljakc.gd" common-dep)
|
||||
; (cgo-file "ljakcklv.gd" common-dep)
|
||||
; (cgo-file "ljakklev.gd" common-dep)
|
||||
; (cgo-file "ljakndax.gd" common-dep)
|
||||
; (cgo-file "ljaksig.gd" common-dep)
|
||||
; (cgo-file "ljinx.gd" common-dep)
|
||||
; (cgo-file "ljkcdmkl.gd" common-dep)
|
||||
; (cgo-file "ljkdmpk.gd" common-dep)
|
||||
; (cgo-file "ljkdxvin.gd" common-dep)
|
||||
; (cgo-file "ljkfeet.gd" common-dep)
|
||||
; (cgo-file "ljndklev.gd" common-dep)
|
||||
; (cgo-file "lkeira.gd" common-dep)
|
||||
(cgo-file "lgunnorm.gd" common-dep)
|
||||
(cgo-file "lgunrnc.gd" common-dep)
|
||||
(cgo-file "ljak.gd" common-dep)
|
||||
(cgo-file "ljakc.gd" common-dep)
|
||||
(cgo-file "ljakcklv.gd" common-dep)
|
||||
(cgo-file "ljakklev.gd" common-dep)
|
||||
(cgo-file "ljakndax.gd" common-dep)
|
||||
(cgo-file "ljaksig.gd" common-dep)
|
||||
(cgo-file "ljinx.gd" common-dep)
|
||||
(cgo-file "ljkcdmkl.gd" common-dep)
|
||||
(cgo-file "ljkdmpk.gd" common-dep)
|
||||
(cgo-file "ljkdxvin.gd" common-dep)
|
||||
(cgo-file "ljkfeet.gd" common-dep)
|
||||
(cgo-file "ljndklev.gd" common-dep)
|
||||
(cgo-file "lkeira.gd" common-dep)
|
||||
(cgo-file "lkleever.gd" common-dep)
|
||||
; (cgo-file "lmech.gd" common-dep)
|
||||
; (cgo-file "lmhca.gd" common-dep)
|
||||
; (cgo-file "lmhcb.gd" common-dep)
|
||||
(cgo-file "lmech.gd" common-dep)
|
||||
(cgo-file "lmhca.gd" common-dep)
|
||||
(cgo-file "lmhcb.gd" common-dep)
|
||||
(cgo-file "lnstcst.gd" common-dep)
|
||||
(cgo-file "lnstoa.gd" common-dep)
|
||||
(cgo-file "lnstobb.gd" common-dep)
|
||||
(cgo-file "lnstobc.gd" common-dep)
|
||||
; (cgo-file "loninsim.gd" common-dep)
|
||||
; (cgo-file "loutro.gd" common-dep)
|
||||
; (cgo-file "loutro2.gd" common-dep)
|
||||
; (cgo-file "loutro3.gd" common-dep)
|
||||
; (cgo-file "lpatk.gd" common-dep)
|
||||
; (cgo-file "lpatkcs.gd" common-dep)
|
||||
; (cgo-file "lprecc.gd" common-dep)
|
||||
; (cgo-file "lprenme.gd" common-dep)
|
||||
; (cgo-file "lptrl.gd" common-dep)
|
||||
; (cgo-file "lsamos.gd" common-dep)
|
||||
; (cgo-file "lseemwca.gd" common-dep)
|
||||
; (cgo-file "lsig.gd" common-dep)
|
||||
; (cgo-file "lsigjakc.gd" common-dep)
|
||||
; (cgo-file "lsigklv.gd" common-dep)
|
||||
; (cgo-file "lsnkwhls.gd" common-dep)
|
||||
; (cgo-file "ltnfxhip.gd" common-dep)
|
||||
; (cgo-file "ltnjxhip.gd" common-dep)
|
||||
(cgo-file "loninsim.gd" common-dep)
|
||||
(cgo-file "loutro.gd" common-dep)
|
||||
(cgo-file "loutro2.gd" common-dep)
|
||||
(cgo-file "loutro3.gd" common-dep)
|
||||
(cgo-file "lpatk.gd" common-dep)
|
||||
(cgo-file "lpatkcs.gd" common-dep)
|
||||
(cgo-file "lprecc.gd" common-dep)
|
||||
(cgo-file "lprenme.gd" common-dep)
|
||||
(cgo-file "lptrl.gd" common-dep)
|
||||
(cgo-file "lsamos.gd" common-dep)
|
||||
(cgo-file "lseemwca.gd" common-dep)
|
||||
(cgo-file "lsig.gd" common-dep)
|
||||
(cgo-file "lsigjakc.gd" common-dep)
|
||||
(cgo-file "lsigklv.gd" common-dep)
|
||||
(cgo-file "lsnkwhls.gd" common-dep)
|
||||
(cgo-file "ltnfxhip.gd" common-dep)
|
||||
(cgo-file "ltnjxhip.gd" common-dep)
|
||||
(cgo-file "ltorn.gd" common-dep)
|
||||
; (cgo-file "ltornjnx.gd" common-dep)
|
||||
; (cgo-file "ltornsam.gd" common-dep)
|
||||
(cgo-file "ltornjnx.gd" common-dep)
|
||||
(cgo-file "ltornsam.gd" common-dep)
|
||||
(cgo-file "ltowa.gd" common-dep)
|
||||
(cgo-file "ltowb.gd" common-dep)
|
||||
; (cgo-file "ltowcity.gd" common-dep)
|
||||
; (cgo-file "ltrtwhls.gd" common-dep)
|
||||
; (cgo-file "lvincst.gd" common-dep)
|
||||
(cgo-file "ltowcity.gd" common-dep)
|
||||
(cgo-file "ltrtwhls.gd" common-dep)
|
||||
(cgo-file "lvincst.gd" common-dep)
|
||||
(cgo-file "lwasbbv.gd" common-dep)
|
||||
(cgo-file "lwassig.gd" common-dep)
|
||||
; (cgo-file "lwlandm.gd" common-dep)
|
||||
; (cgo-file "lwstdpck.gd" common-dep)
|
||||
(cgo-file "lwlandm.gd" common-dep)
|
||||
(cgo-file "lwstdpck.gd" common-dep)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ANIMATIONS
|
||||
|
||||
@@ -503,6 +503,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern sql-query (function string sql-result))
|
||||
|
||||
(defmethod new sql-result ((allocation symbol) (type-to-make type) (num-elts int))
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* num-elts 4))))))
|
||||
(set! (-> v0-0 allocated-length) num-elts)
|
||||
|
||||
@@ -7,3 +7,18 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype bombbot-node (structure)
|
||||
((position vector :inline)
|
||||
(nav-mesh-id uint32)
|
||||
(pos-x float :overlay-at (-> position data 0))
|
||||
(pos-y float :overlay-at (-> position data 1))
|
||||
(pos-z float :overlay-at (-> position data 2))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bombbot-path (structure)
|
||||
((node-count uint16)
|
||||
(node (inline-array bombbot-node))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,323 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *bombbot-path-1* (new 'static 'bombbot-path
|
||||
:node-count #x1a
|
||||
:node (new 'static 'inline-array bombbot-node 26
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3188752.0 :y 36837.375 :z 4562738.5)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3368644.2 :y 38390.58 :z 4564130.5)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3344854.8 :y 37134.336 :z 4787486.0)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3156208.8 :y 36825.906 :z 4910489.0)
|
||||
:nav-mesh-id #x34ad
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3129548.5 :y 21854.617 :z 4974263.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3042602.5 :y 21854.617 :z 5196430.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 3041685.0 :y 23431.578 :z 5524438.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2993126.5 :y 37686.887 :z 5613157.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2495119.0 :y 35662.645 :z 5980937.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2339598.0 :y 21355.725 :z 6003916.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2262150.2 :y 59038.105 :z 5923388.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2180239.0 :y 35246.08 :z 5821602.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1952091.8 :y 35853.516 :z 5631917.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1751604.9 :y 35736.37 :z 5485034.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1448083.0 :y 35713.023 :z 5357034.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1314705.0 :y 35742.105 :z 5355600.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1213759.1 :y 35739.24 :z 5574696.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1029807.7 :y 21646.541 :z 5602098.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 859164.25 :y 35728.18 :z 5558681.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 599088.75 :y 35690.496 :z 5614919.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 425897.56 :y 21671.936 :z 5574573.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 319768.56 :y 35787.57 :z 5516492.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 198957.06 :y 35702.375 :z 5363874.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -16781.72 :y 35688.86 :z 5447925.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -171277.92 :y 35687.63 :z 5526486.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -245257.83 :y 35740.47 :z 5498510.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *bombbot-path-2* (new 'static 'bombbot-path
|
||||
:node-count #x13
|
||||
:node (new 'static 'inline-array bombbot-node 19
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 678289.0 :y 75894.375 :z 7158250.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 456621.66 :y 38754.305 :z 7149895.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 306988.66 :y 35926.426 :z 7006288.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 90236.11 :y 35590.965 :z 6990314.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -12922.471 :y 37856.05 :z 7003176.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -181574.86 :y 38684.67 :z 6889676.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -353365.2 :y 38691.227 :z 6788505.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -536272.5 :y 38694.91 :z 6712606.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -716230.25 :y 38694.91 :z 6647766.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -971501.2 :y 35638.887 :z 6573997.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -944987.75 :y 39357.234 :z 6461029.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -891641.44 :y 35729.0 :z 6265159.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -728891.0 :y 22151.578 :z 6013049.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -691502.7 :y 58701.414 :z 5967584.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -663629.44 :y 59321.14 :z 5927321.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -627445.4 :y 36782.9 :z 5872270.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -499105.38 :y 39462.91 :z 5756435.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -312820.12 :y 39460.863 :z 5599559.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -285647.66 :y 35911.68 :z 5513133.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *bombbot-path-3* (new 'static 'bombbot-path
|
||||
:node-count #x1e
|
||||
:node (new 'static 'inline-array bombbot-node 30
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 898383.44 :y 75904.2 :z 7154400.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1118834.2 :y 37430.066 :z 7158537.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1231044.2 :y 35595.06 :z 7033977.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1379135.1 :y 35604.89 :z 6973930.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1589264.0 :y 38142.363 :z 7005346.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1762479.8 :y 38840.32 :z 6881197.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1929727.6 :y 38840.32 :z 6786538.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2108796.0 :y 38839.91 :z 6696426.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2299584.0 :y 38838.68 :z 6626221.5)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2481209.0 :y 38954.598 :z 6580919.0)
|
||||
:nav-mesh-id #x48db
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2566069.8 :y 35751.527 :z 6524190.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2466766.5 :y 35799.86 :z 6277282.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2411699.5 :y 21411.84 :z 6167714.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2305486.5 :y 27477.197 :z 5986835.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2269335.2 :y 58792.754 :z 5942926.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2240413.0 :y 59187.2 :z 5908069.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2206146.2 :y 38379.52 :z 5861088.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 2025377.4 :y 35845.734 :z 5707038.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1818201.8 :y 35773.234 :z 5546884.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1670160.0 :y 35714.664 :z 5444770.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1417973.4 :y 35841.23 :z 5324144.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1311366.8 :y 35716.71 :z 5391236.5)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 1236283.0 :y 39460.863 :z 5595545.0)
|
||||
:nav-mesh-id #x48e9
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 915504.75 :y 39461.273 :z 5583134.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 672419.44 :y 39462.504 :z 5586779.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 337580.03 :y 39460.863 :z 5599272.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x 211252.02 :y 39461.273 :z 5322137.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -17915.904 :y 39462.504 :z 5413191.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -151299.28 :y 35697.05 :z 5497281.5)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
(new 'static 'bombbot-node
|
||||
:position (new 'static 'vector :x -220205.47 :y 35749.477 :z 5472501.0)
|
||||
:nav-mesh-id #x48cc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,174 @@
|
||||
;; name in dgo: cty-faction-h
|
||||
;; dgos: DESRESC, HGA, WWD, CWI, LFACTORY
|
||||
|
||||
;; +++cty-faction-update-flag
|
||||
(defenum cty-faction-update-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(cfu0 0)
|
||||
)
|
||||
;; ---cty-faction-update-flag
|
||||
|
||||
|
||||
;; +++faction-spawn-flag
|
||||
(defenum faction-spawn-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(fs0 0)
|
||||
(fs1 1)
|
||||
(fs2 2)
|
||||
(fs3 3)
|
||||
)
|
||||
;; ---faction-spawn-flag
|
||||
|
||||
|
||||
;; +++cty-faction-level
|
||||
(defenum cty-faction-level
|
||||
(pesc 0)
|
||||
(pesb 1)
|
||||
(pesa 2)
|
||||
(pepa 3)
|
||||
(car 4)
|
||||
(pepc 5)
|
||||
(pepb 6)
|
||||
)
|
||||
;; ---cty-faction-level
|
||||
|
||||
|
||||
;; +++nav-territory-type
|
||||
(defenum nav-territory-type
|
||||
:type uint8
|
||||
(port-ff-deep 0)
|
||||
(port-ff-near-kg 1)
|
||||
(port-ff-kg-border 2)
|
||||
(inda-kg-ff-border 3)
|
||||
(inda-kg 4)
|
||||
(inda-kg-deep 5)
|
||||
(indb-kg-deep 6)
|
||||
(indb-kg 7)
|
||||
(indb-kg-ff-border 8)
|
||||
(sluma-ff-kg-border 9)
|
||||
(sluma-ff 10)
|
||||
(sluma-ff-deep 11)
|
||||
(slumb-ff-deep 12)
|
||||
(slumc-ff-deep 13)
|
||||
(genc-border 14)
|
||||
(genc 15)
|
||||
(port-ff-near-mh 16)
|
||||
(port-ff-mh-border 17)
|
||||
(mhcity-mh-ff-border 18)
|
||||
(mhcity-mh 19)
|
||||
(mhcity-mh-deep 20)
|
||||
(special0 21)
|
||||
(special1 22)
|
||||
(special2 23)
|
||||
(special3 24)
|
||||
(special4 25)
|
||||
(special5 26)
|
||||
(special6 27)
|
||||
(special7 28)
|
||||
(special8 29)
|
||||
(invalid 128)
|
||||
)
|
||||
;; ---nav-territory-type
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype cty-faction-info (structure)
|
||||
((data int8 6)
|
||||
(ff-guard int8 :overlay-at (-> data 0))
|
||||
(ff-ped int8 :overlay-at (-> data 1))
|
||||
(kg-guard int8 :overlay-at (-> data 2))
|
||||
(kg-ped int8 :overlay-at (-> data 3))
|
||||
(mh-guard int8 :overlay-at (-> data 4))
|
||||
(mh-ped int8 :overlay-at (-> data 5))
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype cty-faction-strength (structure)
|
||||
((data int8 3)
|
||||
(ff-strength int8 :overlay-at (-> data 0))
|
||||
(kg-strength int8 :overlay-at (-> data 1))
|
||||
(mh-strength int8 :overlay-at (-> data 2))
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype territory-faction-mode (structure)
|
||||
((data int8 3)
|
||||
(ff-mode uint8 :overlay-at (-> data 0))
|
||||
(kg-mode uint8 :overlay-at (-> data 1))
|
||||
(mh-mode uint8 :overlay-at (-> data 2))
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype territory-faction-flag (structure)
|
||||
((data uint8 3)
|
||||
(ff-mode uint8 :overlay-at (-> data 0))
|
||||
(kg-mode uint8 :overlay-at (-> data 1))
|
||||
(mh-mode uint8 :overlay-at (-> data 2))
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype faction-spawn-info (structure)
|
||||
((faction-type uint8)
|
||||
(current-level uint8)
|
||||
(requested-level uint8)
|
||||
(flags faction-spawn-flag)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype cty-faction-manager (basic)
|
||||
((faction-array cty-faction-info 30)
|
||||
(faction-mod-array cty-faction-info 30 :inline)
|
||||
(global-faction-strength-mod cty-faction-strength :inline)
|
||||
(territory-faction-strength-mod cty-faction-strength 4 :inline)
|
||||
(permission-cache uint8 30 :offset 671)
|
||||
(last-requested-level symbol)
|
||||
(territory-faction-modes territory-faction-mode 30 :inline)
|
||||
(territory-flags uint8 30)
|
||||
(last-active-territories uint32)
|
||||
(update-flags cty-faction-update-flag)
|
||||
(target-exclusive-branch-index uint8)
|
||||
(territory-faction-flags territory-faction-flag :inline)
|
||||
(faction-spawn faction-spawn-info 7 :inline)
|
||||
(last-change-music-time time-frame :offset 1344)
|
||||
(start-fight-music-time time-frame)
|
||||
)
|
||||
(:methods
|
||||
(cty-faction-manager-method-9 (_type_ int symbol) int)
|
||||
(cty-faction-manager-method-10 (_type_ int symbol) int)
|
||||
(cty-faction-manager-method-11 (_type_ int) uint)
|
||||
(cty-faction-manager-method-12 (_type_ int int) int)
|
||||
(cty-faction-manager-method-13 (_type_) symbol)
|
||||
(cty-faction-manager-method-14 (_type_ nav-territory-type int int) int)
|
||||
(restore-defaults (_type_) cty-faction-update-flag)
|
||||
(cty-faction-manager-method-16 (_type_ nav-territory-type) int)
|
||||
(cty-faction-manager-method-17 (_type_ symbol) int)
|
||||
(cty-faction-manager-method-18 (_type_ symbol) int)
|
||||
(cty-faction-manager-method-19 (_type_) symbol)
|
||||
(cty-faction-manager-method-20 (_type_ uint) int)
|
||||
(cty-faction-manager-method-21 (_type_ int) symbol)
|
||||
(cty-faction-manager-method-22 (_type_) cty-faction-update-flag)
|
||||
(cty-faction-manager-method-23 (_type_ uint) symbol)
|
||||
(cty-faction-manager-method-24 (_type_) symbol)
|
||||
(faction-spawn (_type_ int int symbol symbol) faction-spawn-flag)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod cty-faction-manager-method-12 ((this cty-faction-manager) (arg0 int) (arg1 int))
|
||||
(-> this territory-faction-modes 0 data (+ arg1 (* arg0 16)))
|
||||
)
|
||||
|
||||
(define *cty-faction-manager* (the-as cty-faction-manager #f))
|
||||
|
||||
@@ -7,3 +7,591 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype vehicle-grenade (projectile-bounce)
|
||||
((blast-radius float)
|
||||
)
|
||||
(:methods
|
||||
(vehicle-grenade-method-44 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-vehicle-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja
|
||||
((gun-grenade-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 2)
|
||||
:texture-level 10
|
||||
)
|
||||
|
||||
(defmethod play-impact-sound ((this vehicle-grenade) (arg0 projectile-options))
|
||||
(let ((v1-0 arg0))
|
||||
(cond
|
||||
((zero? v1-0)
|
||||
(sound-play "grenade-fire")
|
||||
)
|
||||
((= v1-0 (projectile-options po0))
|
||||
(sound-play "grenade-explode")
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod setup-collision! ((this vehicle-grenade))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) projectile-bounce-reaction)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate explode))
|
||||
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-7 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 819.2)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-7)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-10 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
|
||||
(set! (-> s5-0 event-self) 'touched)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
(set-collide-with!
|
||||
(-> this root)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-others-list
|
||||
player-list
|
||||
pusher
|
||||
shield
|
||||
)
|
||||
)
|
||||
(set-collide-as! (-> this root) (collide-spec enemy))
|
||||
(set! (-> this root pat-ignore-mask)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod projectile-method-40 ((this vehicle-grenade))
|
||||
256
|
||||
)
|
||||
|
||||
(defmethod init-proj-settings! ((this vehicle-grenade))
|
||||
(ctywide-entity-hack)
|
||||
(set! (-> this attack-mode) 'eco-dark)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vehicle-grenade" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(let ((t9-3 (method-of-type projectile-bounce init-proj-settings!)))
|
||||
(t9-3 this)
|
||||
)
|
||||
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 213) this))
|
||||
(set! (-> this blast-radius) 16384.0)
|
||||
(set! (-> this max-speed) 90112.0)
|
||||
(set! (-> this timeout) (seconds 4))
|
||||
(let ((v1-11 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-11 x) 2.0)
|
||||
(set! (-> v1-11 y) 2.0)
|
||||
(set! (-> v1-11 z) 2.0)
|
||||
(set! (-> v1-11 w) 1.0)
|
||||
(set! (-> this root scale quad) (-> v1-11 quad))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod projectile-method-25 ((this vehicle-grenade))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
(ja-post)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod projectile-bounce-method-42 ((this vehicle-grenade))
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod projectile-method-39 ((this vehicle-grenade))
|
||||
(let* ((a2-0 (-> this root))
|
||||
(v1-0 (-> a2-0 status))
|
||||
)
|
||||
(if (logtest? v1-0 (collide-status touch-surface))
|
||||
(vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.2)
|
||||
)
|
||||
(when (and (logtest? v1-0 (collide-status impact-surface))
|
||||
(time-elapsed? (-> this played-bounce-time) (seconds 0.3))
|
||||
)
|
||||
(set-time! (-> this played-bounce-time))
|
||||
(sound-play "grenade-bounce")
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate impact (vehicle-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('touched)
|
||||
(if (send-event
|
||||
proc
|
||||
'attack
|
||||
(-> block param 0)
|
||||
(static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id))
|
||||
(damage 2.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(mode 'explode)
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'explosion-init-params)))
|
||||
(set! (-> gp-0 spawn-point quad) (-> self root trans quad))
|
||||
(quaternion-identity! (-> gp-0 spawn-quat))
|
||||
(set! (-> gp-0 radius) (-> self blast-radius))
|
||||
(set! (-> gp-0 scale) 1.0)
|
||||
(set! (-> gp-0 group) (-> *part-group-id-table* 104))
|
||||
(set! (-> gp-0 collide-with)
|
||||
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
||||
)
|
||||
(set! (-> gp-0 damage) 6.0)
|
||||
(set! (-> gp-0 damage-scale) 1.0)
|
||||
(set! (-> gp-0 vehicle-damage-factor) 1.0)
|
||||
(set! (-> gp-0 vehicle-impulse-factor) 1.0)
|
||||
(set! (-> gp-0 ignore-proc) (process->handle #f))
|
||||
(explosion-spawn gp-0 self)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(let ((v1-17 (-> self root root-prim)))
|
||||
(set! (-> v1-17 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-17 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod vehicle-grenade-method-44 ((this vehicle-grenade))
|
||||
(when *traffic-manager*
|
||||
(let ((v1-1 (new 'stack-no-clear 'traffic-danger-info)))
|
||||
(set! (-> v1-1 sphere quad) (-> this root trans quad))
|
||||
(set! (-> v1-1 sphere r) (-> this blast-radius))
|
||||
(set! (-> v1-1 velocity quad) (-> this root transv quad))
|
||||
(set! (-> v1-1 notify-radius) 122880.0)
|
||||
(set! (-> v1-1 danger-level) 2.0)
|
||||
(set! (-> v1-1 decay-rate) 0.0)
|
||||
(set! (-> v1-1 flags) (the-as uint 1))
|
||||
(set! (-> v1-1 danger-type) (the-as uint 6))
|
||||
(set! (-> v1-1 handle) (the-as handle #f))
|
||||
(send-event *traffic-manager* 'add-danger-sphere v1-1)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate sitting (vehicle-grenade)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
(vehicle-grenade-method-44 self)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(when (time-elapsed? (-> self state-time) (seconds 0.5))
|
||||
(set-time! (-> self state-time))
|
||||
(vehicle-grenade-method-44 self)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(when *traffic-manager*
|
||||
(let ((v1-10 (new 'stack-no-clear 'traffic-danger-info)))
|
||||
(set! (-> v1-10 sphere quad) (-> self root trans quad))
|
||||
(set! (-> v1-10 sphere r) (the-as float (* (the int (-> self blast-radius)) 2)))
|
||||
(set! (-> v1-10 velocity quad) (-> self root transv quad))
|
||||
(set! (-> v1-10 notify-radius) 122880.0)
|
||||
(set! (-> v1-10 danger-level) 2.0)
|
||||
(set! (-> v1-10 decay-rate) 0.0)
|
||||
(set! (-> v1-10 flags) (the-as uint 1))
|
||||
(set! (-> v1-10 danger-type) (the-as uint 6))
|
||||
(set! (-> v1-10 handle) (the-as handle #f))
|
||||
(send-event *traffic-manager* 'add-danger-sphere v1-10)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vehicle-grenade-deflect (vehicle-grenade)
|
||||
((has-been-deflected symbol)
|
||||
(has-hit-ground symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init-proj-settings! ((this vehicle-grenade-deflect))
|
||||
(set! (-> this has-been-deflected) #f)
|
||||
(let ((t9-0 (method-of-type vehicle-grenade init-proj-settings!)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this has-hit-ground) #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate moving (vehicle-grenade-deflect)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) trans)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type vehicle-grenade moving) code)))
|
||||
(if t9-0
|
||||
((the-as (function none) t9-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self root status) (collide-status on-ground))
|
||||
(set! (-> self has-hit-ground) #t)
|
||||
(if (= (-> self charge-level) 0.0)
|
||||
(go-virtual impact)
|
||||
)
|
||||
)
|
||||
(let ((t9-1 (-> (method-of-type vehicle-grenade moving) post)))
|
||||
(if t9-1
|
||||
((the-as (function none) t9-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod proj-event-handler ((this vehicle-grenade-deflect) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('attack)
|
||||
(format #t "attack")
|
||||
(when (and (!= (-> this owner-handle) arg0)
|
||||
(not (-> this has-been-deflected))
|
||||
(logtest? (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3) (penetrate spin))
|
||||
(-> this next-state)
|
||||
(let ((v1-7 (-> this next-state name)))
|
||||
(or (= v1-7 'moving) (= v1-7 'sitting))
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (handle->process (-> this owner-handle)))
|
||||
(s4-2 (vector-!
|
||||
s4-1
|
||||
(get-trans
|
||||
(the-as process-focusable (if (type? s3-0 process-focusable)
|
||||
(the-as process-focusable s3-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(-> this root trans)
|
||||
)
|
||||
)
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-1 quad) (the-as uint128 0))
|
||||
(set! (-> s4-2 y) 0.0)
|
||||
(let ((f28-0 1274.3112)
|
||||
(f30-0 245760.0)
|
||||
)
|
||||
(vector-normalize! s4-2 1.0)
|
||||
(when (-> this has-hit-ground)
|
||||
(set! f28-0 3276.8)
|
||||
(set! f30-0 204800.0)
|
||||
)
|
||||
(let* ((s2-0 arg0)
|
||||
(a0-16 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
0.0
|
||||
(let ((f26-0 -0.3)
|
||||
(v1-22 a0-16)
|
||||
)
|
||||
(when (= (-> a0-16 type) target)
|
||||
(if (-> this has-hit-ground)
|
||||
(set! f26-0 0.7)
|
||||
)
|
||||
(set! (-> s3-1 quad) (-> (the-as target v1-22) control to-target-pt-xz quad))
|
||||
(vector-normalize! s3-1 1.0)
|
||||
(set! (-> s3-1 y) 0.0)
|
||||
(if (< (vector-dot s3-1 s4-2) f26-0)
|
||||
(set! (-> s4-2 quad) (-> s3-1 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-2 y) (tan f28-0))
|
||||
(vector-normalize! s4-2 1.0)
|
||||
(let ((v1-29 (-> s4-2 quad)))
|
||||
(set! (-> this root transv quad) v1-29)
|
||||
)
|
||||
(vector-normalize! (-> this root transv) f30-0)
|
||||
)
|
||||
)
|
||||
(set! (-> this has-been-deflected) #t)
|
||||
(set! (-> this owner-handle) (process->handle arg0))
|
||||
(set! (-> this ignore-handle) (-> this owner-handle))
|
||||
(if (and (-> this next-state) (= (-> this next-state name) 'sitting))
|
||||
(go (method-of-object this moving))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touched 'touch)
|
||||
(if (or (not (-> this has-been-deflected)) (!= (process->handle arg0) (-> this owner-handle)))
|
||||
((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set! (-> *lightning-spec-id-table* 19) (new 'static 'lightning-spec
|
||||
:name "lightning-trail-crimson-guard"
|
||||
:flags (lightning-spec-flags lsf1)
|
||||
:rand-func #x2
|
||||
:start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
||||
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
||||
:fade-start-factor 0.2
|
||||
:fade-time 120.0
|
||||
:texture (new 'static 'texture-id :index #x3f :page #x4)
|
||||
:reduction 0.6
|
||||
:num-points 16
|
||||
:box-size 2048.0
|
||||
:merge-factor 0.5
|
||||
:merge-count 2
|
||||
:radius 1638.4
|
||||
:duration -1.0
|
||||
:sound #f
|
||||
)
|
||||
)
|
||||
|
||||
(set! (-> *lightning-spec-id-table* 20) (new 'static 'lightning-spec
|
||||
:name "lightning-fractal-crimson-guard"
|
||||
:flags (lightning-spec-flags lsf1)
|
||||
:start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
||||
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
||||
:fade-start-factor 0.2
|
||||
:fade-time 120.0
|
||||
:texture (new 'static 'texture-id :index #x3f :page #x4)
|
||||
:reduction 0.6
|
||||
:num-points 16
|
||||
:box-size 2048.0
|
||||
:merge-factor 0.5
|
||||
:merge-count 2
|
||||
:radius 1638.4
|
||||
:duration -1.0
|
||||
:sound #f
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1163
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.8) (meters 0.2))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 32.0 96.0)
|
||||
(:g :copy r)
|
||||
(:b 255.0)
|
||||
(:a 32.0 16.0)
|
||||
(:omega (degrees 2265.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1164
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2.5) (meters 1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0 64.0)
|
||||
(:g :copy r)
|
||||
(:b 255.0)
|
||||
(:a 16.0 16.0)
|
||||
(:omega (degrees 2265.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup part-crimson-lightning-glow
|
||||
:id 254
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 0.035)
|
||||
:bounds (static-bspherem 0 0 0 4)
|
||||
:parts ((sp-item 1164 :fade-after (meters 100) :flags (sp6)) (sp-item 1163 :fade-after (meters 100) :flags (sp6)))
|
||||
)
|
||||
|
||||
(deftype guard-lazer-shot (projectile)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defstate dissipate (guard-lazer-shot)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual impact)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod made-impact? ((this guard-lazer-shot))
|
||||
(let ((gp-0 (-> this root))
|
||||
(s5-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((v1-0 s5-0))
|
||||
(set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w))
|
||||
(set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with))
|
||||
(set! (-> v1-0 ignore-process0) this)
|
||||
(set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent)))
|
||||
(set! (-> v1-0 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-0 action-mask) (collide-action solid))
|
||||
)
|
||||
(let ((a0-2 (the-as process-focusable (handle->process (-> this notify-handle)))))
|
||||
(when a0-2
|
||||
(let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans a0-2 3)))
|
||||
(f0-2 (- (vector-length s4-1)))
|
||||
)
|
||||
(fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun guard-lazer-shot-move ((arg0 guard-lazer-shot))
|
||||
(projectile-move-fill-line-sphere arg0)
|
||||
(if (logtest? (-> arg0 root status) (collide-status touch-surface))
|
||||
(go (method-of-object arg0 impact))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod setup-collision! ((this guard-lazer-shot))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot))
|
||||
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-7 prim-core collide-as) (collide-spec projectile))
|
||||
(set! (-> v1-7 prim-core collide-with)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
bot
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-others-list
|
||||
player-list
|
||||
pusher
|
||||
shield
|
||||
)
|
||||
)
|
||||
(set! (-> v1-7 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-7)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-10 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
|
||||
(set! (-> s5-0 event-self) 'touched)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
(set! (-> this root pat-ignore-mask)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-proj-settings! ((this guard-lazer-shot))
|
||||
(set! (-> this attack-mode) 'shock)
|
||||
(set! (-> this max-speed) 131072.0)
|
||||
(set! (-> this timeout) (seconds 0.125))
|
||||
(set! (-> this move) guard-lazer-shot-move)
|
||||
(set! (-> this damage) 3.0)
|
||||
(set! (-> this root dynam gravity y) 0.0)
|
||||
(set! (-> this root dynam gravity-length) 0.0)
|
||||
(set! (-> this root dynam gravity-max) 0.0)
|
||||
(set! (-> this vehicle-damage-factor) 0.5)
|
||||
(logior! (-> this options) (projectile-options po13))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod deal-damage! ((this guard-lazer-shot) (arg0 process) (arg1 event-message-block))
|
||||
(if (logtest? (process-mask kg-robot) (-> arg0 mask))
|
||||
(set! (-> this damage) 5.0)
|
||||
)
|
||||
(call-parent-method this arg0 arg1)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,212 @@
|
||||
;; name in dgo: ctywide-init
|
||||
;; dgos: CWI
|
||||
|
||||
(define-extern restore-city-speeches (function none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun update-level-info ((arg0 level))
|
||||
(let ((v1-0 *traffic-info*))
|
||||
(dotimes (a0-1 44)
|
||||
(let ((a1-1 (-> v1-0 traffic-object-type-from-vehicle-type a0-1)))
|
||||
(if (< (the-as uint a1-1) (the-as uint 29))
|
||||
(set! (-> v1-0 traffic-object-levels a1-1) (-> v1-0 vehicle-levels a0-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-4 *traffic-engine*))
|
||||
(when a0-4
|
||||
(dotimes (a1-5 29)
|
||||
(set! (-> a0-4 object-type-info-array a1-5 level) (-> v1-0 traffic-object-levels a1-5))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype dummy-alloc (structure)
|
||||
((val uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun ctywide-login ((arg0 level))
|
||||
(format 0 "citywide-login~%")
|
||||
(malloc 'loading-level #x1b800)
|
||||
(set! *traffic-engine* (new 'loading-level 'traffic-engine))
|
||||
(set! *ff-squad-control* (new 'loading-level 'ff-squad-control))
|
||||
(set! *kg-squad-control* (new 'loading-level 'kg-squad-control))
|
||||
(set! *mh-squad-control* (new 'loading-level 'mh-squad-control))
|
||||
(set! *city-borrow-manager* (new 'loading-level 'cty-borrow-manager))
|
||||
(set! *cty-faction-manager* (new 'loading-level 'cty-faction-manager))
|
||||
(initialize-cty-attack-controller)
|
||||
(let ((t9-9 cty-attack-reset)
|
||||
(a0-9 #f)
|
||||
(a1-8 #f)
|
||||
)
|
||||
(t9-9 a0-9 a1-8 #f)
|
||||
(init! *city-borrow-manager*)
|
||||
(initialize *ff-squad-control* (the-as process a1-8))
|
||||
(initialize *kg-squad-control* (the-as process a1-8))
|
||||
(initialize *mh-squad-control* (the-as process a1-8))
|
||||
)
|
||||
(clear-borrow-holds! *city-borrow-manager*)
|
||||
(set! *city-mode* 'ctywide)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-activate ((arg0 level) (arg1 symbol))
|
||||
(cty-attack-reset #f #f #f)
|
||||
(format 0 "ctywide-activate (mode ~s, *spawn-actors* ~s)~%" arg1 (if *spawn-actors*
|
||||
"#t"
|
||||
"#f"
|
||||
)
|
||||
)
|
||||
(let ((v1-1 *traffic-info*))
|
||||
(when v1-1
|
||||
(set! (-> v1-1 ctywide-level) arg0)
|
||||
(set! (-> v1-1 vehicle-level) arg0)
|
||||
(set! (-> v1-1 restore-speech-callback) restore-city-speeches)
|
||||
)
|
||||
)
|
||||
(vehicle-manager-kill)
|
||||
(set! *traffic-fast-spawn* (or (= arg1 'life) (= arg1 'debug)))
|
||||
(cond
|
||||
((and (= arg1 'debug) (not *spawn-actors*))
|
||||
(traffic-kill)
|
||||
)
|
||||
(else
|
||||
(restore-defaults *cty-faction-manager*)
|
||||
(traffic-start)
|
||||
(clear-borrow-holds! *city-borrow-manager*)
|
||||
(add-squad-to-traffic-engine *ff-squad-control* *traffic-engine*)
|
||||
(squad-control-method-10 *ff-squad-control*)
|
||||
(add-squad-to-traffic-engine *kg-squad-control* *traffic-engine*)
|
||||
(squad-control-method-10 *kg-squad-control*)
|
||||
(add-squad-to-traffic-engine *mh-squad-control* *traffic-engine*)
|
||||
(squad-control-method-10 *mh-squad-control*)
|
||||
(restore-default-settings *traffic-engine*)
|
||||
)
|
||||
)
|
||||
(let ((v1-27 *traffic-info*))
|
||||
(if (not (-> v1-27 vehicle-levels 6))
|
||||
(set! (-> v1-27 vehicle-levels 6) 'ctywide)
|
||||
)
|
||||
)
|
||||
(when *traffic-engine*
|
||||
(let ((v1-31 (-> *traffic-engine* object-type-info-array 28)))
|
||||
(logior! (-> v1-31 flags) (traffic-type-flag ttf3))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-deactivate ((arg0 level))
|
||||
(format 0 "ctywide-deactivate~%")
|
||||
(set! (-> *traffic-info* ctywide-level) #f)
|
||||
(persist-with-delay *setting-control* 'cty-faction-music 0 'music 'city1 0.0 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ctywide-logout ((arg0 level))
|
||||
(set! *traffic-engine* #f)
|
||||
(set! *ff-squad-control* #f)
|
||||
(set! *kg-squad-control* #f)
|
||||
(set! *mh-squad-control* #f)
|
||||
(clear-callback! *city-borrow-manager*)
|
||||
(set! *city-borrow-manager* #f)
|
||||
(set! *cty-faction-manager* #f)
|
||||
(set! *trail-graph* #f)
|
||||
(set! *city-mode* #f)
|
||||
(set! *cty-attack-controller* #f)
|
||||
(let ((v1-2 *traffic-info*))
|
||||
(set! (-> v1-2 vehicle-levels 6) #f)
|
||||
(set! (-> v1-2 restore-speech-callback) #f)
|
||||
)
|
||||
(when *traffic-engine*
|
||||
(let ((v1-7 (-> *traffic-engine* object-type-info-array 28)))
|
||||
(logclear! (-> v1-7 flags) (traffic-type-flag ttf3))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *traffic-alert-level-force* #f)
|
||||
|
||||
(defun lwide-activate ((arg0 level) (arg1 symbol))
|
||||
(format #t "lwide-activate ~s~%" arg0)
|
||||
(let ((v1-0 *traffic-info*)
|
||||
(a0-2 (-> arg0 name))
|
||||
)
|
||||
(set! (-> v1-0 restore-speech-callback) restore-city-speeches)
|
||||
(case (-> arg0 name)
|
||||
(('ctycara)
|
||||
(set! (-> v1-0 vehicle-levels 3) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 4) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 5) a0-2)
|
||||
)
|
||||
(('ctycarb)
|
||||
(set! (-> v1-0 vehicle-levels 0) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 1) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 2) a0-2)
|
||||
)
|
||||
(('ctypepa)
|
||||
(set! (-> v1-0 traffic-object-levels 0) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 1) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 2) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 3) a0-2)
|
||||
)
|
||||
(('ctypesb)
|
||||
(set! (-> v1-0 traffic-object-levels 8) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 9) a0-2)
|
||||
)
|
||||
(('ctypepb)
|
||||
(set! (-> v1-0 traffic-object-levels 10) a0-2)
|
||||
)
|
||||
(('ctypesa)
|
||||
(set! (-> v1-0 traffic-object-levels 4) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 6) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 13) a0-2)
|
||||
)
|
||||
(('ctypesc)
|
||||
(set! (-> v1-0 traffic-object-levels 14) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 15) a0-2)
|
||||
(set! (-> v1-0 traffic-object-levels 16) a0-2)
|
||||
)
|
||||
(('lctyhijk)
|
||||
(set! (-> v1-0 vehicle-levels 11) a0-2)
|
||||
)
|
||||
)
|
||||
(update-level-info (the-as level a0-2))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun lwide-deactivate ((arg0 level))
|
||||
(let ((v1-0 *traffic-info*))
|
||||
(dotimes (a1-0 44)
|
||||
(if (= (-> v1-0 vehicle-levels a1-0) (-> arg0 name))
|
||||
(set! (-> v1-0 vehicle-levels a1-0) #f)
|
||||
)
|
||||
)
|
||||
(dotimes (a1-3 29)
|
||||
(if (= (-> v1-0 traffic-object-levels a1-3) (-> arg0 name))
|
||||
(set! (-> v1-0 traffic-object-levels a1-3) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 *traffic-info*))
|
||||
(set! (-> v1-3 vehicle-level) #f)
|
||||
(set! (-> v1-3 restore-speech-callback) #f)
|
||||
)
|
||||
(update-level-info arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,904 @@
|
||||
;; name in dgo: ff-squad-control
|
||||
;; dgos: CWI
|
||||
|
||||
(deftype ff-squad-control-stack-var0 (structure)
|
||||
((vec0 vector :inline :offset 0)
|
||||
(vec1 vector :inline :offset 16)
|
||||
(vec2 nav-find-poly-parms :inline :offset 32)
|
||||
(cquery collide-query :inline :offset 80)
|
||||
(vec5 vector :inline :offset 608)
|
||||
(vec6 vector :inline :offset 624)
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern *traffic-alert-level-force* symbol)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *alert-level-settings* (new 'static 'squad-alert-state-settings
|
||||
:ped-tazer (new 'static 'squad-unit-settings
|
||||
:target-count 3
|
||||
:shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-rifle (new 'static 'squad-unit-settings
|
||||
:target-count 3
|
||||
:shot-count 2
|
||||
:rand-shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-grenade (new 'static 'squad-unit-settings
|
||||
:target-count 1
|
||||
:shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:bike-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 5)
|
||||
)
|
||||
:hellcat-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 1
|
||||
:inaccuracy 0.5
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 5)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *ff-war-alert-state-settings* (new 'static 'squad-alert-state-settings
|
||||
:ped-tazer (new 'static 'squad-unit-settings
|
||||
:target-count 4
|
||||
:shot-count 1
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-rifle (new 'static 'squad-unit-settings
|
||||
:target-count 7
|
||||
:shot-count 2
|
||||
:rand-shot-count 2
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.15)
|
||||
:burst-delay (seconds 2)
|
||||
)
|
||||
:ped-grenade (new 'static 'squad-unit-settings
|
||||
:target-count 3
|
||||
:shot-count 1
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 1)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 3)
|
||||
)
|
||||
:bike-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 2
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 3)
|
||||
)
|
||||
:hellcat-turret (new 'static 'squad-unit-settings
|
||||
:shot-count 2
|
||||
:rand-shot-count 2
|
||||
:inaccuracy 0.125
|
||||
:acquire-delay (seconds 0.5)
|
||||
:shot-delay (seconds 0.25)
|
||||
:burst-delay (seconds 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *ff-guard-type-mask* 63)
|
||||
|
||||
(defmethod squad-control-method-10 ((this ff-squad-control))
|
||||
(call-parent-method this)
|
||||
(dotimes (v1-0 3)
|
||||
(set! (-> this guard-type-info-array 0 data v1-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> this guard-type-info-array 1 data v1-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> this guard-type-info-array 2 data v1-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> this guard-type-info-array 3 data v1-0 object-type) (traffic-type wlander-male))
|
||||
(set! (-> this guard-type-info-array 4 data v1-0 object-type) (traffic-type guard-bike))
|
||||
(set! (-> this guard-type-info-array 5 data v1-0 object-type) (traffic-type guard-car))
|
||||
)
|
||||
(dotimes (v1-3 29)
|
||||
(set! (-> this guard-type-mask-from-object-type v1-3) (the-as uint 0))
|
||||
)
|
||||
(dotimes (v1-6 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 v1-6))
|
||||
(let ((a0-17 (-> this guard-type-info-array v1-6 guard-info-normal object-type)))
|
||||
(set! (-> this guard-type-mask-from-object-type a0-17)
|
||||
(the-as uint (logior (ash 1 v1-6) (-> this guard-type-mask-from-object-type a0-17)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(init-alert this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-alert ((this ff-squad-control))
|
||||
(let ((t9-0 (-> *traffic-info* restore-speech-callback)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(let ((t9-1 (method-of-type squad-control init-alert)))
|
||||
(t9-1 this)
|
||||
)
|
||||
(dotimes (v1-4 3)
|
||||
(dotimes (a0-2 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 a0-2))
|
||||
(let ((a1-6 (the-as traffic-guard-type-array (+ (+ (* v1-4 16) 1780 (* 48 a0-2)) (the-as int this)))))
|
||||
(set! (-> a1-6 guard-info-normal min-target-count) 0)
|
||||
(set! (-> a1-6 guard-info-normal max-target-count) 127)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-guard-target-level this 1.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod ff-squad-control-method-56 ((this ff-squad-control) (arg0 int) (arg1 int) (arg2 int))
|
||||
(let ((v1-3 (-> this guard-type-info-array (the-as uint arg0))))
|
||||
(set! (-> v1-3 guard-info-normal min-target-count) (max 0 (min 127 arg1)))
|
||||
(set! (-> v1-3 guard-info-normal max-target-count) (max 0 (min 127 arg2)))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-method-16 ((this ff-squad-control) (arg0 vector) (arg1 process-focusable) (arg2 squad-target-status))
|
||||
(local-vars (sv-176 (array crimson-guard)) (sv-180 (array float)) (sv-184 int))
|
||||
(let ((t9-0 (method-of-type squad-control squad-control-method-16)))
|
||||
(t9-0 this arg0 arg1 arg2)
|
||||
)
|
||||
(let ((s4-0 (get-idx-in-status-arr this (-> arg2 handle))))
|
||||
(set! sv-176 (the-as (array crimson-guard) (new 'stack 'boxed-array crimson-guard 16)))
|
||||
(set! sv-180 (the-as (array float) (new 'stack 'boxed-array float 16)))
|
||||
(set! sv-184 0)
|
||||
(dotimes (s3-0 (the-as int (-> this traffic tracker1 active-object-count)))
|
||||
(case (-> this traffic tracker1 active-object-type-list s3-0)
|
||||
(((traffic-type guard-a))
|
||||
(let ((s2-0 (the-as crimson-guard (handle->process (-> this traffic tracker1 active-object-list s3-0)))))
|
||||
(when (and s2-0 (not (focus-test? s2-0 dead inactive)) (= (-> s2-0 target-status handle) (-> arg2 handle)))
|
||||
(set! (-> sv-176 sv-184) s2-0)
|
||||
(set! (-> sv-180 sv-184) (vector-vector-distance (-> s2-0 root trans) (-> arg2 position)))
|
||||
(set! sv-184 (+ sv-184 1))
|
||||
(set! (-> s2-0 move-index) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-14 #t))
|
||||
(while a0-14
|
||||
(set! a0-14 #f)
|
||||
(dotimes (v1-32 (+ sv-184 -1))
|
||||
(when (< (-> sv-180 (+ v1-32 1)) (-> sv-180 v1-32))
|
||||
(let ((a0-17 (-> sv-176 v1-32))
|
||||
(f0-2 (-> sv-180 v1-32))
|
||||
)
|
||||
(set! (-> sv-176 v1-32) (-> sv-176 (+ v1-32 1)))
|
||||
(set! (-> sv-176 (+ v1-32 1)) a0-17)
|
||||
(set! (-> sv-180 v1-32) (-> sv-180 (+ v1-32 1)))
|
||||
(set! (-> sv-180 (+ v1-32 1)) f0-2)
|
||||
)
|
||||
(set! a0-14 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< s4-0 0)
|
||||
)
|
||||
(else
|
||||
(let ((s3-1 (new 'stack-no-clear 'array 'float 16)))
|
||||
(dotimes (v1-37 16)
|
||||
(set! (-> s3-1 v1-37) 0.0)
|
||||
)
|
||||
(dotimes (s2-1 sv-184)
|
||||
(crimson-guard-method-282 (-> sv-176 s2-1) (-> arg2 position) (-> this target-formation-array s4-0) s3-1 16)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-35 ((this ff-squad-control) (arg0 citizen) (arg1 handle))
|
||||
(cond
|
||||
((type? arg0 citizen)
|
||||
(let ((a0-2 arg0))
|
||||
(cond
|
||||
((!= (-> a0-2 faction-mode) 1)
|
||||
(if (zero? (-> this alert-state level))
|
||||
(the-as process-focusable #f)
|
||||
(get-focus-in-range this arg0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(call-parent-method this arg0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(ff-squad-control-method-51
|
||||
this
|
||||
arg0
|
||||
(collide-spec jak enemy hit-by-others-list player-list bot-targetable jak-vehicle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process-drawable vs process-focusable.
|
||||
(defmethod ff-squad-control-method-51 ((this ff-squad-control) (arg0 process-focusable) (arg1 collide-spec))
|
||||
(let ((gp-0 (the-as process-drawable #f)))
|
||||
(let ((f30-0 (the-as float #x7f800000)))
|
||||
(when (logtest? arg1 (collide-spec player-list))
|
||||
(let ((v1-4 (-> *collide-player-list* alive-list next0)))
|
||||
*collide-player-list*
|
||||
(let ((s3-0 (-> v1-4 next0)))
|
||||
(while (!= v1-4 (-> *collide-player-list* alive-list-end))
|
||||
(let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1))))
|
||||
(when (logtest? arg1 (-> v1-5 root-prim prim-core collide-as))
|
||||
(let* ((s1-0 (-> v1-5 process))
|
||||
(s2-0 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s2-0 (not (focus-test? (the-as process-focusable s2-0) disable dead inactive)) (!= arg0 s2-0))
|
||||
(let ((f0-0 (vector-vector-xz-distance (-> arg0 root trans) (-> (the-as process-focusable s2-0) root trans))))
|
||||
(when (or (not gp-0) (< f0-0 f30-0))
|
||||
(set! gp-0 s2-0)
|
||||
(set! f30-0 f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-4 s3-0)
|
||||
*collide-player-list*
|
||||
(set! s3-0 (-> (the-as connection s3-0) next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? arg1 (collide-spec hit-by-player-list hit-by-others-list))
|
||||
(when (logtest? arg1 (collide-spec hit-by-player-list))
|
||||
(let ((v1-22 (-> *collide-hit-by-player-list* alive-list next0)))
|
||||
*collide-hit-by-player-list*
|
||||
(let ((s3-1 (-> v1-22 next0)))
|
||||
(while (!= v1-22 (-> *collide-hit-by-player-list* alive-list-end))
|
||||
(let ((v1-23 (the-as collide-shape (-> (the-as connection v1-22) param1))))
|
||||
(when (logtest? arg1 (-> v1-23 root-prim prim-core collide-as))
|
||||
(let* ((s1-1 (-> v1-23 process))
|
||||
(s2-1 (if (type? s1-1 process-focusable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s2-1 (not (focus-test? (the-as process-focusable s2-1) disable dead inactive)) (!= arg0 s2-1))
|
||||
(let ((f0-1 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-1 root trans))))
|
||||
(when (or (not gp-0) (< f0-1 f30-0))
|
||||
(set! gp-0 s2-1)
|
||||
(set! f30-0 f0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-22 s3-1)
|
||||
*collide-hit-by-player-list*
|
||||
(set! s3-1 (-> s3-1 next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? arg1 (collide-spec hit-by-others-list))
|
||||
(let ((v1-38 (-> *collide-hit-by-others-list* alive-list next0)))
|
||||
*collide-hit-by-others-list*
|
||||
(let ((s3-2 (-> v1-38 next0)))
|
||||
(while (!= v1-38 (-> *collide-hit-by-others-list* alive-list-end))
|
||||
(let ((v1-39 (the-as collide-shape (-> (the-as connection v1-38) param1))))
|
||||
(when (logtest? arg1 (-> v1-39 root-prim prim-core collide-as))
|
||||
(let* ((s1-2 (-> v1-39 process))
|
||||
(s2-2 (if (type? s1-2 process-focusable)
|
||||
s1-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s2-2 (not (focus-test? (the-as process-focusable s2-2) disable dead inactive)) (!= arg0 s2-2))
|
||||
(let ((f0-2 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-2 root trans))))
|
||||
(when (or (not gp-0) (< f0-2 f30-0))
|
||||
(set! gp-0 s2-2)
|
||||
(set! f30-0 f0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-38 s3-2)
|
||||
*collide-hit-by-others-list*
|
||||
(set! s3-2 (-> s3-2 next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ff-squad-control-method-48 ((this ff-squad-control))
|
||||
(let ((v0-0 0))
|
||||
(dotimes (v1-0 10)
|
||||
(if (logtest? *ff-guard-type-mask* (ash 1 v1-0))
|
||||
(+! v0-0 (-> this guard-type-info-array v1-0 guard-info-normal count))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-focus ((this ff-squad-control))
|
||||
(get-target-focus this)
|
||||
)
|
||||
|
||||
(defmethod set-guard-target-level ((this ff-squad-control) (arg0 float))
|
||||
(set! (-> this alert-state guard-target-level) arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-unit-settings-by-idx ((this ff-squad-control) (arg0 int))
|
||||
(-> this settings guard-settings-array arg0)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs none.
|
||||
(defmethod ff-squad-control-method-54 ((this ff-squad-control) (arg0 int))
|
||||
(-> this traffic object-type-info-array arg0 guard-type)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod ff-squad-control-method-55 ((this ff-squad-control) (arg0 int) (arg1 int))
|
||||
(-> (the-as ff-squad-control (+ (the-as uint this) (* (the-as uint 48) (the-as uint arg0)) (* arg1 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
change-to-type
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ff-squad-control-method-46 ((this ff-squad-control))
|
||||
(local-vars (a0-62 int) (s0-2 int) (sv-96 traffic-target-formation) (sv-100 squad-target-status))
|
||||
(dotimes (v1-0 3)
|
||||
(dotimes (a0-1 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 a0-1))
|
||||
(set! (-> (the-as ff-squad-control (+ (the-as uint this) (* 48 a0-1) (* v1-0 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
count
|
||||
)
|
||||
0
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((f0-0 122880.0)
|
||||
(f0-2 (* f0-0 f0-0))
|
||||
(a0-4 (the-as vehicle #f))
|
||||
(v1-5 0)
|
||||
)
|
||||
(let ((a1-8 0))
|
||||
(dotimes (a2-3 (the-as int (-> this traffic tracker0 active-object-count)))
|
||||
(case (-> this traffic tracker0 active-object-type-list a2-3)
|
||||
(((traffic-type guard-bike) (traffic-type guard-car))
|
||||
(let ((a3-8 (the-as vehicle (handle->process (-> this traffic tracker0 active-object-list a2-3)))))
|
||||
(when (and a3-8 (not (focus-test? a3-8 dead inactive)) (logtest? (vehicle-flag alert) (-> a3-8 v-flags)))
|
||||
(let ((t0-14 (-> a3-8 info guard-type)))
|
||||
(+! (-> this guard-type-info-array t0-14 guard-info-normal count) 1)
|
||||
)
|
||||
(when (and (logtest? (vehicle-flag in-pursuit) (-> a3-8 v-flags))
|
||||
(logtest? (vehicle-flag target-in-sight) (-> a3-8 v-flags))
|
||||
)
|
||||
(+! a1-8 1)
|
||||
(when (not (logtest? (-> a3-8 draw status) (draw-control-status on-screen)))
|
||||
(+! v1-5 1)
|
||||
(let ((f1-0 (-> a3-8 target-distance2)))
|
||||
(when (< f0-2 f1-0)
|
||||
(set! f0-2 f1-0)
|
||||
(set! a0-4 a3-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this alert-state guards-in-sight-of-target) a1-8)
|
||||
)
|
||||
(when (< 2 v1-5)
|
||||
(if (not (logtest? (-> this alert-state flags) (squad-alert-flag disable-pursuit-control)))
|
||||
(send-event a0-4 'end-pursuit)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f30-0 122880.0)
|
||||
(s5-0 (the-as crimson-guard #f))
|
||||
(s4-0 0)
|
||||
)
|
||||
(let ((s3-0 0))
|
||||
(let ((s2-0 0))
|
||||
(dotimes (s1-0 (the-as int (-> this traffic tracker1 active-object-count)))
|
||||
(case (-> this traffic tracker1 active-object-type-list s1-0)
|
||||
(((traffic-type guard-a))
|
||||
(let ((s0-0 (the-as crimson-guard (handle->process (-> this traffic tracker1 active-object-list s1-0)))))
|
||||
(when (and s0-0 (not (logtest? (-> s0-0 focus-status) (focus-status dead inactive))))
|
||||
(when (and (logtest? (-> s0-0 flags) (citizen-flag in-pursuit))
|
||||
(logtest? (-> s0-0 flags) (citizen-flag target-in-sight))
|
||||
(= (-> s0-0 faction-mode) 0)
|
||||
)
|
||||
(+! s3-0 1)
|
||||
(when (not (logtest? (-> s0-0 draw status) (draw-control-status on-screen)))
|
||||
(+! s4-0 1)
|
||||
(let ((f0-3 (-> s0-0 target-self-dist)))
|
||||
(when (< f30-0 f0-3)
|
||||
(set! f30-0 f0-3)
|
||||
(set! s5-0 s0-0)
|
||||
)
|
||||
(if (and (< 327680.0 f0-3)
|
||||
(not (logtest? (-> this alert-state flags) (squad-alert-flag disable-pursuit-control)))
|
||||
)
|
||||
(send-event s0-0 'end-pursuit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-45 (-> s0-0 guard-type)))
|
||||
(when (< (the-as uint v1-45) (the-as uint 10))
|
||||
(+! s2-0 1)
|
||||
(+! (-> (the-as
|
||||
ff-squad-control
|
||||
(+ (the-as uint this) (* (the-as uint 48) (the-as uint v1-45)) (* (-> s0-0 faction-mode) 16))
|
||||
)
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
count
|
||||
)
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> this alert-state guards-in-sight-of-target) s3-0)
|
||||
)
|
||||
(when (< 2 s4-0)
|
||||
(if (not (logtest? (-> this alert-state flags) (squad-alert-flag disable-pursuit-control)))
|
||||
(send-event s5-0 'end-pursuit)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-63 3)
|
||||
(let ((a0-27 -1)
|
||||
(a1-19 -1)
|
||||
)
|
||||
(let ((a2-7 0)
|
||||
(a3-12 9)
|
||||
)
|
||||
(dotimes (t0-29 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 t0-29))
|
||||
(when (= (-> (the-as ff-squad-control (+ (the-as uint this) (* 48 t0-29) (* v1-63 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
object-type
|
||||
)
|
||||
(traffic-type guard-a)
|
||||
)
|
||||
(let ((t2-13 (the-as traffic-guard-type-array (+ (+ (* v1-63 16) 1780 (* 48 t0-29)) (the-as int this)))))
|
||||
(set! (-> t2-13 guard-info-normal change-to-type) (the-as traffic-type t0-29))
|
||||
(let ((t1-22 (- (-> t2-13 guard-info-normal target-count) (-> t2-13 guard-info-normal count))))
|
||||
(when (< a2-7 t1-22)
|
||||
(set! a0-27 t0-29)
|
||||
(set! a2-7 t1-22)
|
||||
)
|
||||
(when (and (< t1-22 a3-12) (> (-> t2-13 guard-info-normal count) 0))
|
||||
(set! a1-19 t0-29)
|
||||
(set! a3-12 t1-22)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (!= a0-27 -1) (!= a1-19 -1))
|
||||
(set! (-> (the-as ff-squad-control (+ (the-as uint this) (* 48 a1-19) (* v1-63 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
change-to-type
|
||||
)
|
||||
(the-as traffic-type a0-27)
|
||||
)
|
||||
(set! (-> this traffic object-type-info-array 6 guard-type) (the-as uint a0-27))
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 3)
|
||||
(set! sv-96 (-> this target-formation-array s5-1))
|
||||
(set! sv-100 (-> this alert-state target-status-array s5-1))
|
||||
(when (and (logtest? (-> sv-100 flags) (squad-target-flag visible-ever updated))
|
||||
(< (+ (current-time) (seconds -5)) (-> sv-100 last-seen-time))
|
||||
(handle->process (-> sv-100 handle))
|
||||
)
|
||||
(let ((s4-1 (new 'stack-no-clear 'ff-squad-control-stack-var0)))
|
||||
(set! (-> s4-1 vec0 quad) (-> sv-100 position quad))
|
||||
(let ((s3-1 (find-nearest-nav-mesh (-> s4-1 vec0) (the-as float #x7f800000))))
|
||||
(when s3-1
|
||||
(set! (-> s4-1 vec2 y-threshold) 40960.0)
|
||||
(set! (-> s4-1 vec2 ignore) (the-as uint 2))
|
||||
(vector-! (the-as vector (-> s4-1 vec2)) (-> s4-1 vec0) (the-as vector (-> s3-1 bounds)))
|
||||
(nav-mesh-method-46 s3-1 (the-as nav-poly (-> s4-1 vec2)))
|
||||
(let ((s2-1 (-> s4-1 vec2 poly)))
|
||||
(when s2-1
|
||||
(project-point-into-poly-2d s3-1 s2-1 (the-as vector (-> s4-1 vec2)) (the-as vector (-> s4-1 vec2)))
|
||||
(vector+! (-> s4-1 vec0) (the-as vector (-> s4-1 vec2)) (the-as vector (-> s3-1 bounds)))
|
||||
(dotimes (s1-1 16)
|
||||
(when (= (-> this traffic sync-mask-8) (ash 1 (logand s1-1 7)))
|
||||
(set! (-> s4-1 vec5 w) (* 182.04445 (* 22.5 (the float s1-1))))
|
||||
(set! (-> s4-1 vec6 x) 163840.0)
|
||||
(vector-rotate-around-y! (-> s4-1 vec1) *x-vector* (-> s4-1 vec5 w))
|
||||
(vector-float*! (-> s4-1 vec1) (-> s4-1 vec1) (-> s4-1 vec6 x))
|
||||
(clamp-vector-to-mesh-cross-gaps
|
||||
s3-1
|
||||
(the-as vector (-> s4-1 vec2))
|
||||
s2-1
|
||||
(-> s4-1 vec1)
|
||||
(-> s4-1 vec6 x)
|
||||
#f
|
||||
(the-as clamp-travel-vector-to-mesh-return-info #f)
|
||||
)
|
||||
(set! (-> s4-1 cquery start-pos quad) (-> sv-100 position quad))
|
||||
(set! (-> s4-1 cquery move-dist quad) (-> s4-1 vec1 quad))
|
||||
(let ((v1-107 (-> s4-1 cquery)))
|
||||
(set! (-> v1-107 radius) 2048.0)
|
||||
(set! (-> v1-107 collide-with) (collide-spec backgnd))
|
||||
(set! (-> v1-107 ignore-process0) #f)
|
||||
(set! (-> v1-107 ignore-process1) #f)
|
||||
(set! (-> v1-107 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-107 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s4-1 vec6 y) (fill-and-probe-using-line-sphere *collide-cache* (-> s4-1 cquery)))
|
||||
(cond
|
||||
((>= (-> s4-1 vec6 y) 0.0)
|
||||
(let ((s0-1 0)
|
||||
(v1-111
|
||||
(- (* (-> s4-1 vec6 x) (-> s4-1 vec6 y)) (vector-vector-distance (-> sv-100 position) (-> s4-1 vec0)))
|
||||
)
|
||||
)
|
||||
(let ((a0-61 (the int v1-111)))
|
||||
(set-on-less-than a0-62 s0-1 a0-61)
|
||||
)
|
||||
(move-if-not-zero s0-2 v1-111 a0-62 s0-1)
|
||||
)
|
||||
(set! (-> sv-96 circle-range s1-1) (the float s0-2))
|
||||
)
|
||||
(else
|
||||
(set! (-> sv-96 circle-range s1-1) (-> s4-1 vec6 x))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod ff-squad-control-method-45 ((this ff-squad-control))
|
||||
(let ((s5-0 (get-target-focus this)))
|
||||
(let ((a1-0 (-> this alert-state level)))
|
||||
(mem-copy!
|
||||
(the-as pointer (-> this settings))
|
||||
(the-as pointer (+ (the-as uint *alert-level-settings*) (* 320 (the-as int a1-0))))
|
||||
320
|
||||
)
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> this settings-war)) (the-as pointer *ff-war-alert-state-settings*) 320)
|
||||
(dotimes (v1-2 3)
|
||||
(dotimes (a0-4 10)
|
||||
(when (logtest? *ff-guard-type-mask* (ash 1 a0-4))
|
||||
(let ((a2-7 (the-as squad-alert-state-settings (+ (+ (* a0-4 32) 820 (* 320 v1-2)) (the-as int this))))
|
||||
(a1-13 (the-as traffic-guard-type-array (+ (+ (* v1-2 16) 1780 (* 48 a0-4)) (the-as int this))))
|
||||
)
|
||||
(set! (-> a2-7 ped-tazer inaccuracy)
|
||||
(fmax 0.0 (fmin 1.0 (* (-> a2-7 ped-tazer inaccuracy) (-> this alert-state guard-inaccuracy-factor))))
|
||||
)
|
||||
(when (and s5-0 (= (-> s5-0 type) target))
|
||||
(when (focus-test? *target* pilot)
|
||||
(set! (-> a2-7 ped-tazer acquire-delay)
|
||||
(the-as uint (the int (* 0.75 (the float (-> a2-7 ped-tazer acquire-delay)))))
|
||||
)
|
||||
(set! (-> a2-7 ped-tazer shot-delay)
|
||||
(the-as uint (the int (* 0.6 (the float (-> a2-7 ped-tazer shot-delay)))))
|
||||
)
|
||||
(set! (-> a2-7 ped-tazer burst-delay)
|
||||
(the-as uint (the int (* 0.8 (the float (-> a2-7 ped-tazer burst-delay)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a1-13 guard-info-normal target-count)
|
||||
(max
|
||||
(min
|
||||
(the int (* (the float (-> a2-7 ped-tazer target-count)) (-> this alert-state guard-target-level)))
|
||||
(-> a1-13 guard-info-normal max-target-count)
|
||||
)
|
||||
(-> a1-13 guard-info-normal min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-5 3)
|
||||
(dotimes (a0-7 29)
|
||||
(let ((a2-12 (-> this guard-type-mask-from-object-type a0-7)))
|
||||
(when (nonzero? a2-12)
|
||||
(let ((a3-20 0)
|
||||
(a1-17 0)
|
||||
)
|
||||
(while (nonzero? a2-12)
|
||||
(if (logtest? a2-12 1)
|
||||
(+! a1-17 (-> (the-as ff-squad-control (+ (the-as uint this) (* 48 a3-20) (* v1-5 16)))
|
||||
guard-type-info-array
|
||||
0
|
||||
guard-info-normal
|
||||
target-count
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! a3-20 1)
|
||||
(set! a2-12 (shr a2-12 1))
|
||||
)
|
||||
(set! (-> this traffic object-type-info-array 0 target-counts (+ v1-5 (* a0-7 32))) a1-17)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 #f))
|
||||
(when (not (logtest? (-> this alert-state flags) (squad-alert-flag war)))
|
||||
(when *traffic-alert-level-force*
|
||||
(set! (-> this alert-state level) (the-as uint 3))
|
||||
(logclear! (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
(set-time! (-> this alert-state start-time))
|
||||
)
|
||||
(when (>= (-> this alert-state level) (the-as uint 1))
|
||||
(set! s5-1 #t)
|
||||
(cond
|
||||
((logtest? (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
(cond
|
||||
((> (the-as int (ff-squad-control-method-48 this)) 0)
|
||||
(set-time! (-> this alert-state start-time))
|
||||
)
|
||||
(else
|
||||
(when (time-elapsed? (-> this alert-state start-time) (seconds 3))
|
||||
(set! s5-1 #f)
|
||||
(set! (-> this alert-state level) (the-as uint 0))
|
||||
(logclear! (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s4-0
|
||||
(+ (- (-> this alert-state start-time) (current-time)) (the-as time-frame (-> this alert-state duration)))
|
||||
)
|
||||
)
|
||||
(if (and (get-target-focus this)
|
||||
(= (-> (get-target-focus this) type) target)
|
||||
(-> *target* next-state)
|
||||
(= (-> *target* next-state name) 'target-hide)
|
||||
)
|
||||
(set! s4-0 (- s4-0 (the-as time-frame (* (- (current-time) (-> *target* state-time)) 2))))
|
||||
)
|
||||
(if (> s4-0 0)
|
||||
0
|
||||
(logior! (-> this alert-state flags) (squad-alert-flag alert-ending))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(s5-1
|
||||
(if (not (logtest? (-> this alert-state flags) (squad-alert-flag alarm-on)))
|
||||
(logior! (-> this alert-state flags) (squad-alert-flag alarm-on))
|
||||
)
|
||||
(set! (-> (new 'stack-no-clear 'vector) quad) (-> (target-pos 0) quad))
|
||||
(if #t
|
||||
(ff-squad-control-method-47 this)
|
||||
)
|
||||
(let ((v1-65 0))
|
||||
(dotimes (a0-26 29)
|
||||
(let ((a1-20 (-> this traffic object-type-info-array a0-26)))
|
||||
(if #t
|
||||
(+! v1-65 (-> a1-20 killed-count))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (>= v1-65 (the-as int (* (-> this alert-state level) 8)))
|
||||
(< (-> this alert-state level) (-> this alert-state max-level))
|
||||
)
|
||||
(start-alert this (the-as int (+ (-> this alert-state level) 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (logtest? (-> this alert-state flags) (squad-alert-flag alarm-on))
|
||||
(logclear! (-> this alert-state flags) (squad-alert-flag alarm-on))
|
||||
(ff-squad-control-method-47 this)
|
||||
(let ((v1-79 (-> this alert-state target-status-array)))
|
||||
(logclear! (-> v1-79 0 flags) (squad-target-flag visible-now visible-recently visible-ever))
|
||||
)
|
||||
(dotimes (v1-80 29)
|
||||
(set! (-> this traffic object-type-info-array v1-80 killed-count) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod ff-squad-control-method-47 ((this ff-squad-control))
|
||||
(set-time! (-> this alert-state notify-time))
|
||||
(cond
|
||||
((> (-> this alert-state level) 0)
|
||||
(if (and (not (logtest? (-> this alert-state flags) (squad-alert-flag alert-ending))) (get-target-focus this))
|
||||
(for-all-active-processes
|
||||
(-> this traffic)
|
||||
(lambda ((arg0 crimson-guard) (arg1 traffic-object-type-info))
|
||||
(when (logtest? (-> arg1 flags) (traffic-type-flag ttf0))
|
||||
(let ((a0-1 arg0))
|
||||
(if (!= (-> a0-1 faction-mode) 1)
|
||||
(send-event arg0 'alert-begin (get-target-focus *ff-squad-control*))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(for-all-active-processes
|
||||
(-> this traffic)
|
||||
(lambda ((arg0 process-focusable) (arg1 traffic-object-type-info))
|
||||
(if (logtest? (-> arg1 flags) (traffic-type-flag ttf0))
|
||||
(send-event arg0 'alert-end)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod end-pursuit-for-all ((this ff-squad-control) (arg0 int))
|
||||
(for-all-active-processes-of-type
|
||||
(-> this traffic tracker-array (-> this traffic object-type-info-array arg0 tracker-index))
|
||||
(the-as traffic-type arg0)
|
||||
(lambda ((arg0 process-focusable) (arg1 traffic-object-type-info)) (send-event arg0 'end-pursuit) (none))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod set-pos-vel ((this ff-squad-control) (arg0 primary-target-pos-vel))
|
||||
(squad-control-method-25 this arg0 (seconds 0.45))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod update ((this ff-squad-control))
|
||||
(call-parent-method this)
|
||||
(ff-squad-control-method-45 this)
|
||||
(ff-squad-control-method-46 this)
|
||||
(when *cty-faction-manager*
|
||||
(let ((a2-0 (if (> (-> this alert-state level) 0)
|
||||
(the-as int (+ (-> this alert-state level) 3))
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(faction-spawn *cty-faction-manager* 2 a2-0 #f #f)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-39 ((this ff-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(if (type? arg0 crimson-guard)
|
||||
(crimson-guard-method-288 (the-as crimson-guard arg0) arg1)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-43 ((this ff-squad-control) (arg0 process-focusable))
|
||||
(if (type? arg0 crimson-guard)
|
||||
(time-elapsed? (-> (the-as crimson-guard arg0) last-choose-new-enemy-time) (seconds 4))
|
||||
#t
|
||||
)
|
||||
)
|
||||
|
||||
(defun set-ff-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *ff-squad-control*
|
||||
(let* ((s5-0 *ff-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,519 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod crimson-guard-method-264 ((this crimson-guard))
|
||||
(let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14))))
|
||||
(new 'stack-no-clear 'vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'traj3d-params))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) (-> this target-pos-predict-miss) s4-0))
|
||||
(f30-0 1.0)
|
||||
)
|
||||
(set! (-> s3-1 y) 0.0)
|
||||
(vector-rotate-around-y! s3-1 s3-1 (* 182.04445 (+ (if (zero? (rand-vu-int-count 2))
|
||||
90.0
|
||||
-90.0
|
||||
)
|
||||
(rand-vu-float-range -45.0 45.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! f30-0
|
||||
(cond
|
||||
((!= (-> (handle->process (-> this focus handle)) type) target)
|
||||
(set! (-> s3-1 quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 dest quad)
|
||||
(-> (get-trans (the-as process-focusable (handle->process (-> this focus handle))) 3) quad)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
(else
|
||||
(if (logtest? (-> this draw status) (draw-control-status on-screen))
|
||||
(vector-normalize! s3-1 (* 4096.0 (rand-vu-float-range 1.0 2.0)))
|
||||
(vector-normalize! s3-1 (* 4096.0 (rand-vu-float-range 1.0 3.0)))
|
||||
)
|
||||
(set! (-> s5-0 dest quad)
|
||||
(-> (vector+! (new 'stack-no-clear 'vector) s3-1 (-> this target-pos-predict-miss)) quad)
|
||||
)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 src quad) (-> s4-0 quad))
|
||||
(set! (-> s5-0 initial-tilt) 8192.0)
|
||||
(set! (-> s5-0 gravity) 184320.0)
|
||||
(when (traj3d-calc-initial-velocity-using-tilt s5-0)
|
||||
(let ((a1-14 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
||||
(set! (-> a1-14 ent) (-> this entity))
|
||||
(set! (-> a1-14 charge) f30-0)
|
||||
(set! (-> a1-14 options) (projectile-options))
|
||||
(logclear! (-> a1-14 options) (projectile-options po14 po15 po16))
|
||||
(set! (-> a1-14 pos quad) (-> s5-0 src quad))
|
||||
(set! (-> a1-14 vel quad) (-> s5-0 initial-velocity quad))
|
||||
(set! (-> a1-14 notify-handle) (the-as handle #f))
|
||||
(set! (-> a1-14 owner-handle) (process->handle this))
|
||||
(set! (-> a1-14 target-handle) (the-as handle #f))
|
||||
(set! (-> a1-14 target-pos quad) (the-as uint128 0))
|
||||
(set! (-> a1-14 ignore-handle) (process->handle this))
|
||||
(let* ((v1-38 *game-info*)
|
||||
(a0-37 (+ (-> v1-38 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-38 attack-id) a0-37)
|
||||
(set! (-> a1-14 attack-id) a0-37)
|
||||
)
|
||||
(set! (-> a1-14 timeout) (seconds 4))
|
||||
(spawn-projectile vehicle-grenade-deflect a1-14 this *default-dead-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate grenade-throw-post-retreating (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-4 self))
|
||||
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags))))
|
||||
)
|
||||
0
|
||||
(let ((v1-6 self))
|
||||
(if (not (logtest? (enemy-flag ef37) (-> v1-6 enemy-flags)))
|
||||
(set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-6 enemy-flags))))
|
||||
)
|
||||
(set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-6 enemy-flags))))
|
||||
(set! (-> v1-6 nav callback-info) (-> v1-6 enemy-info callback-info))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
(nav-enemy-method-177 self)
|
||||
(flee-info-method-12 (-> self flee-behavior) self)
|
||||
(set-time! (-> self last-check-player-time))
|
||||
(go-active-if-necessary)
|
||||
(set! (-> self danger-pos quad) (-> self focus-pos quad))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(go-active-if-necessary)
|
||||
(+! (-> self total-flee-time)
|
||||
(- (-> *display* game-clock frame-counter) (-> *display* game-clock old-frame-counter))
|
||||
)
|
||||
(when (time-elapsed? (-> self last-check-player-time) (seconds 0.5))
|
||||
(set-time! (-> self last-check-player-time))
|
||||
(set! (-> self danger-pos quad) (-> self focus-pos quad))
|
||||
)
|
||||
(flee-info-method-11 (-> self flee-behavior) self)
|
||||
(cond
|
||||
((< (seconds 2) (-> self total-flee-time))
|
||||
(set! (-> self urgent-fire) #t)
|
||||
(go-hostile self)
|
||||
)
|
||||
((>= (-> self target-self-xz-dist) (* 1.2 (-> self grenade-guard-min-player-dist)))
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
((< (-> self target-self-xz-dist) 16384.0)
|
||||
(go-virtual close-attack)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(let ((a2-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((a1-0 (-> self nav state)))
|
||||
(set! (-> a2-0 quad) (-> a1-0 target-pos quad))
|
||||
)
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf1) a2-0 (meters 2) *color-red*)
|
||||
)
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info run-anim))) 60)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(flee-info-method-13 (-> self flee-behavior) self)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype reload-grenade-spawn-params (structure)
|
||||
((owner handle)
|
||||
(joint-index uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype reload-grenade (process-drawable)
|
||||
((owner handle)
|
||||
(joint-index uint16)
|
||||
)
|
||||
(:state-methods
|
||||
dormant
|
||||
visible
|
||||
shrinking
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(move-to-joint (_type_) quaternion)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defbehavior reload-grenade-init-by-other reload-grenade ((arg0 reload-grenade-spawn-params))
|
||||
(ctywide-entity-hack)
|
||||
(stack-size-set! (-> self main-thread) 128)
|
||||
(set! (-> self owner) (-> arg0 owner))
|
||||
(set! (-> self joint-index) (-> arg0 joint-index))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-vehicle-grenade" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set-vector! (-> self root scale) 1.4 1.4 1.4 1.0)
|
||||
(go-virtual dormant)
|
||||
0
|
||||
)
|
||||
|
||||
(defstate dormant (reload-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('wake-up)
|
||||
(go-virtual visible)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defstate visible (reload-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('sleep)
|
||||
(go-virtual shrinking)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((f0-1 (fmin 1.0 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))
|
||||
(f0-2 (lerp 0.01 1.4 f0-1))
|
||||
)
|
||||
(set-vector! (-> self root scale) f0-2 f0-2 f0-2 1.0)
|
||||
)
|
||||
(move-to-joint self)
|
||||
)
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate shrinking (reload-grenade)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((f0-1 (fmin 1.0 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))
|
||||
(f0-2 (lerp 1.4 0.01 f0-1))
|
||||
)
|
||||
(set-vector! (-> self root scale) f0-2 f0-2 f0-2 1.0)
|
||||
)
|
||||
(move-to-joint self)
|
||||
(if (time-elapsed? (-> self state-time) (seconds 0.2))
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate die (reload-grenade)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:code (behavior ()
|
||||
'()
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod move-to-joint ((this reload-grenade))
|
||||
(let ((s5-0 (the-as process-focusable (handle->process (-> this owner)))))
|
||||
(when s5-0
|
||||
(vector<-cspace! (-> this root trans) (-> s5-0 node-list data (-> this joint-index)))
|
||||
(matrix->quaternion (-> this root quat) (-> s5-0 node-list data (-> this joint-index) bone transform))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs reload-grenade.
|
||||
(defun reload-grenade-spawn ((arg0 crimson-guard) (arg1 type) (arg2 reload-grenade-spawn-params))
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(let* ((s3-0 (get-process *default-dead-pool* arg1 #x4000 1))
|
||||
(v1-1 (when s3-0
|
||||
(let ((t9-1 (method-of-type process activate)))
|
||||
(t9-1 s3-0 arg0 "grenade" (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-0 reload-grenade-init-by-other arg2)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-1
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(the-as reload-grenade gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate grenade-throw-post-reloading (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(let ((v1-0 self))
|
||||
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-0 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-7 self))
|
||||
(set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
(set! (-> self urgent-fire) #f)
|
||||
(let ((a2-0 (new 'stack-no-clear 'reload-grenade-spawn-params)))
|
||||
(set! (-> a2-0 owner) (process->handle self))
|
||||
(set! (-> a2-0 joint-index) (the-as uint 9))
|
||||
(set! (-> self reloading-ammo) (process->handle (reload-grenade-spawn self reload-grenade a2-0)))
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
(let ((a0-3 (handle->process (-> self reloading-ammo))))
|
||||
(if a0-3
|
||||
(send-event a0-3 'sleep)
|
||||
)
|
||||
)
|
||||
(set! (-> self reloading-ammo) (the-as handle #f))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (>= (* 0.5 (-> self grenade-guard-min-player-dist)) (-> self target-self-xz-dist))
|
||||
(cond
|
||||
((not (time-elapsed? (-> self state-time) (seconds 1.5)))
|
||||
(+! (-> self num-times-reloading-interrupted) 1)
|
||||
(cond
|
||||
((>= (-> self num-times-reloading-interrupted) 2)
|
||||
(set! (-> self num-times-reloading-interrupted) 0)
|
||||
(set! (-> self urgent-fire) #t)
|
||||
(go-hostile self)
|
||||
)
|
||||
(else
|
||||
(go-virtual grenade-throw-post-retreating)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self urgent-fire) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! crimson-guard-grenade-reload-ja :num! (seek! max 0.92) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((gp-0 (handle->process (-> self reloading-ammo)))
|
||||
(f0-4 (ja-frame-num 0))
|
||||
)
|
||||
(when gp-0
|
||||
(cond
|
||||
((and (>= f0-4 4.0) (< f0-4 13.0))
|
||||
(send-event gp-0 'wake-up)
|
||||
)
|
||||
((< 14.0 f0-4)
|
||||
(send-event gp-0 'sleep)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.92))
|
||||
)
|
||||
(ja-channel-push! 1 0)
|
||||
(ja-no-eval :group! crimson-guard-cock-gun-ja :num! (seek! max 0.5) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.5))
|
||||
)
|
||||
(crimson-guard-method-285 self 1)
|
||||
(go-hostile self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate grenade-throw (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-4 self))
|
||||
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(let ((v1-6 self))
|
||||
(set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-6 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-9 (-> self nav)))
|
||||
(set! (-> v1-9 target-speed) 0.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-12 (-> self nav state)))
|
||||
(set! (-> v1-12 speed) 0.0)
|
||||
)
|
||||
0
|
||||
(let ((a0-8 (-> self nav state))
|
||||
(v1-15 *null-vector*)
|
||||
)
|
||||
(set! (-> a0-8 velocity quad) (-> v1-15 quad))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
(set-time! (-> self last-fire-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! crimson-guard-grenade-attack-ja
|
||||
:num! (seek! (ja-aframe 12.0 0) 1.5)
|
||||
:frame-num (ja-aframe 1.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 12.0 0) 1.5))
|
||||
)
|
||||
(go-active-if-necessary)
|
||||
(crimson-guard-method-264 self)
|
||||
(crimson-guard-method-285 self -1)
|
||||
(set! (-> self urgent-fire) #f)
|
||||
(set! (-> self grenade-guard-min-player-dist) 81920.0)
|
||||
(ja-no-eval :group! crimson-guard-grenade-attack-ja
|
||||
:num! (seek! (ja-aframe 32.0 0))
|
||||
:frame-num (ja-aframe 22.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 32.0 0)))
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-grenade-attack-ja
|
||||
:num! (seek! (ja-aframe 37.0 0))
|
||||
:frame-num (ja-aframe 33.0 0)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 37.0 0)))
|
||||
)
|
||||
(set! (-> self total-flee-time) 0)
|
||||
(cond
|
||||
((crimson-guard-method-272 self)
|
||||
(crimson-guard-method-275 self)
|
||||
)
|
||||
((>= (-> self target-self-xz-dist) (-> self grenade-guard-min-player-dist))
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
(else
|
||||
(go-virtual grenade-throw-post-retreating)
|
||||
)
|
||||
)
|
||||
)
|
||||
:post (behavior ()
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate grenade-hostile (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(crimson-guard-method-251 self)
|
||||
(let* ((f30-0 150.0)
|
||||
(v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-5 (the-as number (logior #x3f800000 v1-4)))
|
||||
)
|
||||
(set! (-> self rand-state-time) (the-as time-frame (the int (* f30-0 (+ -1.0 (the-as float v1-5))))))
|
||||
)
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(crimson-guard-method-252 self)
|
||||
(cond
|
||||
((> (-> self ammo-count) 0)
|
||||
(if (and (or (time-elapsed? (-> self state-time) (-> self rand-state-time)) (-> self urgent-fire))
|
||||
(and (logtest? (-> self flags) (citizen-flag target-in-sight)) (< (-> self target-self-xz-dist) 81920.0))
|
||||
)
|
||||
(go-virtual grenade-throw)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (or (and (time-elapsed? (-> self state-time) (seconds 1.5)) (not (-> self urgent-fire)))
|
||||
(>= (-> self target-self-xz-dist) (* 0.75 (-> self grenade-guard-min-player-dist)))
|
||||
)
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 8192.0)
|
||||
(crimson-guard-method-289 self (-> self last-quick-target-spot-angle))
|
||||
(go-virtual grenade-throw-post-reloading)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info walk-anim))) 60)
|
||||
)
|
||||
:post (behavior ()
|
||||
(crimson-guard-method-253 self)
|
||||
(crimson-guard-method-254 self)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,345 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod crimson-guard-method-255 ((this crimson-guard))
|
||||
(let ((s5-0 (-> this target-pos-predict-miss))
|
||||
(s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14)))
|
||||
(s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 15)))
|
||||
)
|
||||
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) s5-0 s3-0) 1.0)
|
||||
(new 'stack-no-clear 'vector)
|
||||
(spawn-guard-projectile this s3-0 s5-0 819200.0 s4-0)
|
||||
)
|
||||
(crimson-guard-method-285 this -1)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod crimson-guard-method-257 ((this crimson-guard))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> this target-pos-predict-miss quad))
|
||||
(let* ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14)))
|
||||
(a0-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 15)))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) s5-0 a0-3))
|
||||
)
|
||||
(vector-normalize! s3-1 409600.0)
|
||||
(and (crimson-guard-method-256 this)
|
||||
(zero? (crimson-guard-method-258 this s4-0 (vector+! (new 'stack-no-clear 'vector) s4-0 s3-1) s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate gun-shoot (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(if (zero? (-> self ammo-count))
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(set! (-> self other-side) (if (< (rand-vu) 0.5)
|
||||
#t
|
||||
#f
|
||||
)
|
||||
)
|
||||
(nav-enemy-method-177 self)
|
||||
(let ((v1-11 self))
|
||||
(set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-11 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-14 self))
|
||||
(set! (-> v1-14 enemy-flags) (the-as enemy-flag (logclear (-> v1-14 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(let ((v1-17 (-> self nav state)))
|
||||
(set! (-> v1-17 speed) 0.0)
|
||||
)
|
||||
0
|
||||
(let ((a0-9 (-> self nav state))
|
||||
(v1-20 *null-vector*)
|
||||
)
|
||||
(set! (-> a0-9 velocity quad) (-> v1-20 quad))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
(set-time! (-> self last-time-see-target))
|
||||
(set! (-> self miss-amount) (lerp-scale 0.0 16384.0 (-> self target-self-dist) 40960.0 122880.0))
|
||||
(set! (-> self miss-amount) 16384.0)
|
||||
(let ((v1-30 (handle->process (-> self focus handle))))
|
||||
(if (and v1-30 (logtest? (process-mask enemy) (-> v1-30 mask)))
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
)
|
||||
)
|
||||
(set-time! (-> self next-shot))
|
||||
(set! (-> self joint-enable) #t)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self joint-enable) #f)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(go-active-if-necessary)
|
||||
(let ((gp-0 (the-as process-focusable (handle->process (-> self focus handle)))))
|
||||
(when gp-0
|
||||
(when (not (and gp-0 (not (logtest? (-> gp-0 focus-status) (focus-status disable dead ignore grabbed)))))
|
||||
(set! (-> self miss-amount) (lerp-scale 0.0 16384.0 (-> self target-self-dist) 40960.0 122880.0))
|
||||
(set! (-> self miss-amount) 16384.0)
|
||||
)
|
||||
(if (and (< (-> self target-self-xz-dist) 16384.0)
|
||||
(and (< (fabs (-> self target-y-angle)) 7281.778)
|
||||
gp-0
|
||||
(not (logtest? (-> gp-0 focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
(go-virtual close-attack)
|
||||
)
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(or (not (logtest? (-> self flags) (citizen-flag target-in-sight)))
|
||||
(< 184320.0 (-> self target-self-xz-dist))
|
||||
(< 10922.667 (fabs (-> self target-y-angle)))
|
||||
)
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-33 object))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(let ((f30-0 (rnd-float-range self 0.9 1.1)))
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self anim-shoot 0 anim-index))
|
||||
:num! (seek! max f30-0)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
(label cfg-3)
|
||||
(when (crimson-guard-method-257 self)
|
||||
(set! v1-33 #t)
|
||||
(goto cfg-10)
|
||||
)
|
||||
(when (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(set! v1-33 #f)
|
||||
(goto cfg-10)
|
||||
)
|
||||
(suspend)
|
||||
(b! (not #f) cfg-3 :delay (set! v1-33 #f))
|
||||
(label cfg-10)
|
||||
(when v1-33
|
||||
(set-time! (-> self state-time))
|
||||
(let ((gp-1 (min 3 (the-as int (+ (logand (rand-uint31-gen *random-generator*) 3) 1)))))
|
||||
(until #f
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self anim-shoot 1 anim-index)) :num! min)
|
||||
(set! (-> self already-shot) #t)
|
||||
(lerp-scale 1.0 0.2 (-> self target-self-dist) 20480.0 122880.0)
|
||||
(let ((f0-8 1.0))
|
||||
(cond
|
||||
((logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
(let ((v1-58 (handle->process (-> self focus handle))))
|
||||
(when v1-58
|
||||
(if (or (< (-> self target-vel) 40.96)
|
||||
(and (focus-test? (the-as process-focusable v1-58) pilot) (< (-> self target-pos y) 49152.0))
|
||||
)
|
||||
(set! (-> self miss-amount) (- (-> self miss-amount) (* 12288.0 f0-8)))
|
||||
(set! (-> self miss-amount) (- (-> self miss-amount) (* 4096.0 f0-8)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self miss-amount) (- (-> self miss-amount) (* 3276.8 f0-8)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< (-> self miss-amount) 0.0)
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
)
|
||||
(crimson-guard-method-255 self)
|
||||
(set-time! (-> self last-fire-time))
|
||||
(until (ja-done? 0)
|
||||
(ja :num! (seek!))
|
||||
(suspend)
|
||||
)
|
||||
(if (zero? (-> self ammo-count))
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
(+! gp-1 -1)
|
||||
(if (or (< gp-1 0)
|
||||
(not (and (handle->process (-> self focus handle))
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(goto cfg-59)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(label cfg-59)
|
||||
(let ((f30-1 (rnd-float-range self 0.9 1.1)))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self anim-shoot 2 anim-index))
|
||||
:num! (seek! max f30-1)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-1))
|
||||
)
|
||||
)
|
||||
(crimson-guard-method-268 self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(citizen-method-213 self)
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate rifle-reload (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(let ((v1-0 self))
|
||||
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-0 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-7 self))
|
||||
(set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(until #f
|
||||
(let ((gp-0 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-0 frame-group) (the-as art-joint-anim crimson-guard-grenade-reload-ja))
|
||||
(set! (-> gp-0 param 0)
|
||||
(the float (+ (-> (the-as art-joint-anim crimson-guard-grenade-reload-ja) frames num-frames) -1))
|
||||
)
|
||||
(let* ((f30-0 1.1)
|
||||
(f28-0 0.39999998)
|
||||
(v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-15 (the-as number (logior #x3f800000 v1-14)))
|
||||
)
|
||||
(set! (-> gp-0 param 1) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-15)))))
|
||||
)
|
||||
(set! (-> gp-0 frame-num) 0.0)
|
||||
(joint-control-channel-group! gp-0 (the-as art-joint-anim crimson-guard-grenade-reload-ja) num-func-seek!)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(let ((gp-1 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1)))
|
||||
(let* ((f30-1 1.1)
|
||||
(f28-1 0.39999998)
|
||||
(v1-29 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-30 (the-as number (logior #x3f800000 v1-29)))
|
||||
)
|
||||
(set! (-> gp-1 param 1) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-30)))))
|
||||
)
|
||||
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(crimson-guard-method-285 self 3)
|
||||
(set! (-> self last-fire-time) 0)
|
||||
(let ((v1-36 #f))
|
||||
(let ((a0-13 (handle->process (-> self focus handle))))
|
||||
(if (and a0-13 (focus-test? (the-as process-focusable a0-13) ignore))
|
||||
(set! v1-36 #t)
|
||||
)
|
||||
)
|
||||
(when (and (not v1-36) (or (>= 40960.0 (-> self target-self-xz-dist))
|
||||
(= (-> self ammo-count) (crimson-guard-method-286 self))
|
||||
(time-elapsed? (-> self last-fire-time) (-> self rand-state-time))
|
||||
)
|
||||
)
|
||||
0
|
||||
(goto cfg-26)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
(label cfg-26)
|
||||
(ja-channel-push! 1 0)
|
||||
(ja-no-eval :group! crimson-guard-cock-gun-ja :num! (seek! max 0.5) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.5))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(enemy-common-post self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate rifle-hostile (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(crimson-guard-method-251 self)
|
||||
(set! (-> self rand-state-time) (the-as time-frame (the int (* 300.0 (rnd-float-range self 2.5 4.5)))))
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(crimson-guard-method-252 self)
|
||||
(let ((v1-4 (handle->process (-> self focus handle))))
|
||||
(if (or (not v1-4)
|
||||
(not (and v1-4
|
||||
(not (logtest? (-> (the-as process-focusable v1-4) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
)
|
||||
(when (and (< (-> self target-self-xz-dist) 163840.0)
|
||||
(or (< 40960.0 (-> self target-self-xz-dist)) (>= 2 (the-as int (-> self focus aware))))
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (citizen-flag target-in-sight))
|
||||
(< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 20480.0)
|
||||
)
|
||||
(if (or (time-elapsed? (-> self last-fire-time) (-> self rand-state-time)) (= (-> self faction-mode) 1))
|
||||
(go-virtual gun-shoot)
|
||||
(go-virtual rifle-reload)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 8192.0)
|
||||
(crimson-guard-method-289 self (-> self last-quick-target-spot-angle))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info walk-anim))) 60)
|
||||
)
|
||||
:post (behavior ()
|
||||
(crimson-guard-method-253 self)
|
||||
(crimson-guard-method-254 self)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,638 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun spread-lightning-lazer ((arg0 lightning-control) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(local-vars (sv-640 int) (sv-656 vector))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> arg1 quad))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> arg2 quad))
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(vector-length arg2)
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-0 quad) (-> arg3 quad))
|
||||
(let ((s0-0 (new 'stack-no-clear 'collide-query)))
|
||||
(set! sv-640 0)
|
||||
(while (< sv-640 6)
|
||||
(let ((v1-6 s0-0))
|
||||
(set! (-> v1-6 radius) 2867.2)
|
||||
(set! (-> v1-6 collide-with)
|
||||
(collide-spec jak bot civilian enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(set! (-> v1-6 ignore-process0) #f)
|
||||
(set! (-> v1-6 ignore-process1) #f)
|
||||
(set! (-> v1-6 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-6 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s0-0 start-pos quad) (-> s5-0 quad))
|
||||
(set! (-> s0-0 move-dist quad) (-> s4-0 quad))
|
||||
(set-from-point-offset-pad! (-> s0-0 bbox) (-> s0-0 start-pos) (-> s0-0 move-dist) (-> s0-0 radius))
|
||||
(fill-using-bounding-box *collide-cache* s0-0)
|
||||
(set! (-> s0-0 radius) 409.6)
|
||||
(let ((f0-4 (probe-using-line-sphere *collide-cache* s0-0)))
|
||||
(cond
|
||||
((>= f0-4 0.0)
|
||||
(let ((a1-4 s3-0))
|
||||
(let ((v1-13 (-> s0-0 start-pos)))
|
||||
(let ((a0-12 (-> s0-0 move-dist)))
|
||||
(let ((a2-2 f0-4))
|
||||
(.mov vf7 a2-2)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-12 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-13 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a1-4 quad) vf6)
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
)
|
||||
(else
|
||||
(vector+! (-> s0-0 start-pos) s5-0 s4-0)
|
||||
(let ((a1-7 (-> s0-0 start-pos)))
|
||||
(let ((v1-16 (-> s0-0 start-pos)))
|
||||
(let ((a0-16 s1-0))
|
||||
(let ((a2-4 -2048.0))
|
||||
(.mov vf7 a2-4)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-16 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-16 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a1-7 quad) vf6)
|
||||
)
|
||||
(vector-negate! (-> s0-0 move-dist) s4-0)
|
||||
(set! f0-4 (probe-using-line-sphere *collide-cache* s0-0))
|
||||
(when (>= f0-4 0.0)
|
||||
(let ((a1-10 s3-0))
|
||||
(let ((v1-19 (-> s0-0 start-pos)))
|
||||
(let ((a0-19 (-> s0-0 move-dist)))
|
||||
(let ((a2-5 f0-4))
|
||||
(.mov vf7 a2-5)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-19 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-19 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a1-10 quad) vf6)
|
||||
)
|
||||
(let ((a1-11 s3-0))
|
||||
(let ((v1-20 s3-0))
|
||||
(let ((a0-20 s1-0))
|
||||
(let ((a2-7 2048.0))
|
||||
(.mov vf7 a2-7)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-20 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-20 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a1-11 quad) vf6)
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((>= f0-4 0.0)
|
||||
(+! (-> s3-0 x) (rand-vu-float-range -819.2 819.2))
|
||||
(+! (-> s3-0 y) (rand-vu-float-range -819.2 819.2))
|
||||
(+! (-> s3-0 z) (rand-vu-float-range -819.2 819.2))
|
||||
(set-point! arg0 (-> arg0 state points-to-draw) s3-0)
|
||||
(+! (-> arg0 state points-to-draw) 1)
|
||||
(set! sv-656 (-> s0-0 best-other-tri normal))
|
||||
(quaternion-from-two-vectors! s2-0 s1-0 sv-656)
|
||||
(vector-orient-by-quat! s4-0 s4-0 s2-0)
|
||||
(set! (-> s1-0 quad) (-> sv-656 quad))
|
||||
(vector-flatten! s4-0 s4-0 sv-656)
|
||||
)
|
||||
(else
|
||||
(vector+! s5-0 s5-0 s4-0)
|
||||
(when (< sv-640 6)
|
||||
(set-point! arg0 (-> arg0 state points-to-draw) s5-0)
|
||||
(+! (-> arg0 state points-to-draw) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-640 (+ sv-640 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod crimson-guard-method-263 ((this crimson-guard))
|
||||
(local-vars (sv-832 vector))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 14)))
|
||||
(v0-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 15)))
|
||||
(s2-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s4-0 v0-1) 16384.0))
|
||||
(s1-0
|
||||
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this target-pos-predict-miss) s4-0) 16384.0)
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(when (< 1820.4445 (vector-vector-angle-safe s2-0 s1-0))
|
||||
(let* ((a1-9 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) s2-0 s1-0) 1.0))
|
||||
(a2-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) a1-9 1820.4445))
|
||||
)
|
||||
(vector-orient-by-quat! s1-0 s2-0 a2-1)
|
||||
)
|
||||
)
|
||||
(let ((a0-12 s4-0))
|
||||
(let ((v1-8 s4-0))
|
||||
(let ((a1-12 0.2))
|
||||
(.mov vf7 a1-12)
|
||||
)
|
||||
(.lvf vf5 (&-> s2-0 quad))
|
||||
(.lvf vf4 (&-> v1-8 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
||||
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
||||
(.svf (&-> a0-12 quad) vf6)
|
||||
)
|
||||
(vector+! s5-0 s4-0 s1-0)
|
||||
(let ((v1-10 s3-0))
|
||||
(set! (-> v1-10 radius) 409.6)
|
||||
(set! (-> v1-10 collide-with)
|
||||
(collide-spec jak bot civilian enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(set! (-> v1-10 ignore-process0) #f)
|
||||
(set! (-> v1-10 ignore-process1) #f)
|
||||
(set! (-> v1-10 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-10 action-mask) (collide-action solid))
|
||||
)
|
||||
(set! (-> s3-0 start-pos quad) (-> s4-0 quad))
|
||||
(set! (-> s3-0 move-dist quad) (-> s1-0 quad))
|
||||
(set! (-> this l-control state points-to-draw) 0)
|
||||
(let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* s3-0))
|
||||
(s2-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(cond
|
||||
((>= f0-3 0.0)
|
||||
(vector-float*! s1-0 (-> s3-0 move-dist) f0-3)
|
||||
(vector+! s5-0 s4-0 s1-0)
|
||||
(point-in-plane-<-point+normal! s2-1 s5-0 (-> s3-0 best-other-tri normal))
|
||||
(vector-! s2-1 s2-1 s5-0)
|
||||
(let ((s1-1 quaternion-vector-angle!)
|
||||
(s0-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(set! sv-832 (-> s3-0 best-other-tri normal))
|
||||
(let* ((a2-3 (rand-vu-float-range 0.0 65536.0))
|
||||
(a2-4 (s1-1 s0-0 sv-832 a2-3))
|
||||
)
|
||||
(vector-orient-by-quat! s2-1 s2-1 a2-4)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(set-point! (-> this l-control) 0 s4-0)
|
||||
(set-point! (-> this l-control) 1 s5-0)
|
||||
(set! (-> this l-control spec) (-> *lightning-spec-id-table* 19))
|
||||
(+! (-> this l-control state points-to-draw) 2)
|
||||
(let* ((s1-6 (-> s3-0 best-other-tri collide-ptr))
|
||||
(v1-91 (if (type? s1-6 collide-shape-prim)
|
||||
s1-6
|
||||
)
|
||||
)
|
||||
(s1-7 #t)
|
||||
)
|
||||
(when v1-91
|
||||
(set! s1-7 #f)
|
||||
(let ((s0-1 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
||||
(set! (-> s0-1 ent) (-> this entity))
|
||||
(set! (-> s0-1 charge) 1.0)
|
||||
(set! (-> s0-1 options) (projectile-options))
|
||||
(logclear! (-> s0-1 options) (projectile-options po14 po15 po16))
|
||||
(set! (-> s0-1 notify-handle) (process->handle this))
|
||||
(set! (-> s0-1 owner-handle) (the-as handle #f))
|
||||
(set! (-> s0-1 target-handle) (the-as handle #f))
|
||||
(set! (-> s0-1 target-pos quad) (the-as uint128 0))
|
||||
(set! (-> s0-1 ignore-handle) (process->handle this))
|
||||
(set! (-> s0-1 attack-id) (-> this attack-id))
|
||||
(set! (-> s0-1 timeout) (seconds 4))
|
||||
(set! (-> s0-1 pos quad) (-> s4-0 quad))
|
||||
(vector-! (-> s0-1 vel) s5-0 s4-0)
|
||||
(vector-normalize! (-> s0-1 vel) 131072.0)
|
||||
(spawn-projectile guard-lazer-shot s0-1 this *default-dead-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(spread-lightning-lazer (-> this l-control) s5-0 s2-1 (-> s3-0 best-other-tri normal))
|
||||
)
|
||||
(else
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s4-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 254 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> s5-0 quad))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 254))
|
||||
)
|
||||
)
|
||||
(set! (-> this l-control state points-to-draw) 9)
|
||||
(set! (-> this l-control spec) (-> *lightning-spec-id-table* 20))
|
||||
(let ((v1-176 s4-0))
|
||||
(set! (-> this l-control state meet data 0 quad) (-> v1-176 quad))
|
||||
)
|
||||
(let ((a0-97 (-> this l-control))
|
||||
(v1-178 s5-0)
|
||||
)
|
||||
(set! (-> a0-97 state meet data (+ (-> a0-97 state points-to-draw) -1) quad) (-> v1-178 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate attack (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(set! (-> self joint-enable) #t)
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-5 self))
|
||||
(set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-5 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-8 self))
|
||||
(set! (-> v1-8 enemy-flags) (the-as enemy-flag (logclear (-> v1-8 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
(set-time! (-> self state-time))
|
||||
(set! (-> self lazer-sound) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self lazer-sound))
|
||||
(sound-stop (-> self lazer-sound))
|
||||
)
|
||||
(iterate-prims
|
||||
(-> self root)
|
||||
(lambda ((arg0 collide-shape-prim)) (logclear! (-> arg0 prim-core action) (collide-action deadly)) (none))
|
||||
)
|
||||
(let ((v1-5 (-> self l-control))
|
||||
(a0-2 0)
|
||||
)
|
||||
(let ((a1-2 (!= a0-2 (-> v1-5 state mode))))
|
||||
(case a0-2
|
||||
((3)
|
||||
(if a1-2
|
||||
(set! (-> v1-5 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-5 state start-color) (-> v1-5 spec start-color))
|
||||
(set! (-> v1-5 state end-color) (-> v1-5 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-5 state mode) (the-as uint a0-2))
|
||||
)
|
||||
(set! (-> self joint-enable) #f)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(or (< 32768.0 (-> self target-self-xz-dist)) (not (logtest? (-> self flags) (citizen-flag target-in-sight))))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
(let ((v1-12 (handle->process (-> self focus handle))))
|
||||
(if (and v1-12 (or (focus-test? (the-as process-focusable v1-12) inactive)
|
||||
(focus-test? (the-as process-focusable v1-12) disable)
|
||||
)
|
||||
)
|
||||
(set! v1-12 (the-as process #f))
|
||||
)
|
||||
(cond
|
||||
((not v1-12)
|
||||
(go-virtual active)
|
||||
)
|
||||
((and (and (handle->process (-> self focus handle))
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
(< (fabs (-> self target-y-angle)) 8192.0)
|
||||
)
|
||||
(if (< (-> self target-self-xz-dist) 16384.0)
|
||||
(go-virtual close-attack)
|
||||
(go-virtual attack-tazer)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self next-shot) (+ (current-time) (seconds 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-37 symbol))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! crimson-guard-idle-to-stab-idle-ja :num! (seek! (ja-aframe 7.0 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 7.0 0)))
|
||||
)
|
||||
(until #f
|
||||
(while (or (< 7281.778 (fabs (-> self target-y-angle))) (>= (-> self next-shot) (current-time)))
|
||||
(when (not (orient-towards-code (the-as degrees #x45e38e39)))
|
||||
(let ((v1-17 (ja-group)))
|
||||
(if (not (and v1-17 (= v1-17 crimson-guard-stab-idle-loop-ja)))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
)
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-stab-idle-loop-ja :num! (loop!))
|
||||
(until v1-37
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
(set! v1-37
|
||||
(or (< (current-time) (-> self next-shot))
|
||||
(< (-> self target-self-xz-dist) 16384.0)
|
||||
(not (and (handle->process (-> self focus handle))
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= (fabs (-> self target-y-angle)) 7281.778)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (-> self target-self-xz-dist) 16384.0)
|
||||
(set! (-> self next-shot) 0)
|
||||
0
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post (behavior ()
|
||||
(citizen-method-213 self)
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate attack-tazer (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(set! (-> self joint-enable) #t)
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(let ((v1-5 self))
|
||||
(set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef37))))
|
||||
(set! (-> v1-5 nav callback-info) *null-nav-callback-info*)
|
||||
)
|
||||
0
|
||||
(let ((v1-8 self))
|
||||
(set! (-> v1-8 enemy-flags) (the-as enemy-flag (logclear (-> v1-8 enemy-flags) (enemy-flag ef38))))
|
||||
)
|
||||
0
|
||||
(set! (-> self miss-amount) 0.0)
|
||||
(set-time! (-> self state-time))
|
||||
(set! (-> self lazer-sound) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self lazer-sound))
|
||||
(sound-stop (-> self lazer-sound))
|
||||
)
|
||||
(iterate-prims
|
||||
(-> self root)
|
||||
(lambda ((arg0 collide-shape-prim)) (logclear! (-> arg0 prim-core action) (collide-action deadly)) (none))
|
||||
)
|
||||
(let ((v1-5 (-> self l-control))
|
||||
(a0-2 0)
|
||||
)
|
||||
(let ((a1-2 (!= a0-2 (-> v1-5 state mode))))
|
||||
(case a0-2
|
||||
((3)
|
||||
(if a1-2
|
||||
(set! (-> v1-5 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-5 state start-color) (-> v1-5 spec start-color))
|
||||
(set! (-> v1-5 state end-color) (-> v1-5 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-5 state mode) (the-as uint a0-2))
|
||||
)
|
||||
(set! (-> self joint-enable) #f)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 1))
|
||||
(or (< 32768.0 (-> self target-self-xz-dist)) (not (logtest? (-> self flags) (citizen-flag target-in-sight))))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
(let ((v1-12 (handle->process (-> self focus handle))))
|
||||
(if (and v1-12 (or (focus-test? (the-as process-focusable v1-12) inactive)
|
||||
(focus-test? (the-as process-focusable v1-12) disable)
|
||||
)
|
||||
)
|
||||
(set! v1-12 (the-as process #f))
|
||||
)
|
||||
(if (not v1-12)
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(ja-no-eval :group! crimson-guard-stab-idle-to-attack-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(crimson-guard-method-262 self)
|
||||
(set! (-> self next-shot) (+ (current-time) (seconds 0.1)))
|
||||
(let ((v1-32 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 2)))
|
||||
(logior! (-> v1-32 prim-core action) (collide-action deadly))
|
||||
)
|
||||
(let* ((v1-33 *game-info*)
|
||||
(a0-8 (+ (-> v1-33 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-33 attack-id) a0-8)
|
||||
(set! (-> self attack-id) a0-8)
|
||||
)
|
||||
(set! (-> self lazer-sound) (sound-play "guard-zap"))
|
||||
(let ((v1-35 (-> self l-control))
|
||||
(a0-11 1)
|
||||
)
|
||||
(let ((a1-5 (!= a0-11 (-> v1-35 state mode))))
|
||||
(case a0-11
|
||||
((3)
|
||||
(if a1-5
|
||||
(set! (-> v1-35 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-35 state start-color) (-> v1-35 spec start-color))
|
||||
(set! (-> v1-35 state end-color) (-> v1-35 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-35 state mode) (the-as uint a0-11))
|
||||
)
|
||||
(let ((gp-1 (current-time))
|
||||
(s5-1 150)
|
||||
(f30-0 1.0)
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-stab-attack-ja :num! (loop! f30-0) :frame-num 0.0)
|
||||
(until (time-elapsed? gp-1 s5-1)
|
||||
(crimson-guard-method-263 self)
|
||||
(suspend)
|
||||
(ja :num! (loop! f30-0))
|
||||
)
|
||||
)
|
||||
(let ((v1-58 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 2)))
|
||||
(logclear! (-> v1-58 prim-core action) (collide-action deadly))
|
||||
)
|
||||
(let ((v1-59 (-> self l-control))
|
||||
(a0-17 3)
|
||||
)
|
||||
(let ((a1-18 (!= a0-17 (-> v1-59 state mode))))
|
||||
(case a0-17
|
||||
((3)
|
||||
(if a1-18
|
||||
(set! (-> v1-59 state counter) 0.0)
|
||||
)
|
||||
)
|
||||
((1)
|
||||
(set! (-> v1-59 state start-color) (-> v1-59 spec start-color))
|
||||
(set! (-> v1-59 state end-color) (-> v1-59 spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-59 state mode) (the-as uint a0-17))
|
||||
)
|
||||
(ja-no-eval :group! crimson-guard-stab-attack-to-stab-idle-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(go-hostile self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(citizen-method-213 self)
|
||||
(nav-enemy-method-187 self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate tazer-hostile (crimson-guard)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(crimson-guard-method-251 self)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(crimson-guard-method-252 self)
|
||||
(if (or (< (-> self target-self-xz-dist) 32768.0) (>= 2 (the-as int (-> self focus aware))))
|
||||
(go-virtual attack)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance (-> self root trans) (-> self move-position)) 8192.0)
|
||||
(crimson-guard-method-289 self (-> self last-quick-target-spot-angle))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info walk-anim))) 60)
|
||||
)
|
||||
:post (behavior ()
|
||||
(crimson-guard-method-253 self)
|
||||
(crimson-guard-method-254 self)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,370 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *default-kg-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 4
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-a)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-b)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type flying-turret)
|
||||
:max-target-count #x7f
|
||||
:target-count 1
|
||||
:enemy-type (traffic-type metalhead-grunt)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type spydroid)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
:enemy-type (traffic-type metalhead-flitter)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *alert-kg-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 4
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:target-count 3
|
||||
:enemy-type (traffic-type guard-a)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-b)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type flying-turret)
|
||||
:max-target-count #x7f
|
||||
:target-count 3
|
||||
:enemy-type (traffic-type metalhead-grunt)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type spydroid)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
:enemy-type (traffic-type metalhead-flitter)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *war-kg-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 4
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
:enemy-type (traffic-type guard-a)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type roboguard)
|
||||
:max-target-count #x7f
|
||||
:enemy-type (traffic-type guard-b)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type flying-turret)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
:enemy-type (traffic-type metalhead-grunt)
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type spydroid)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
:enemy-type (traffic-type metalhead-flitter)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defmethod copy-squad-settings-to-idx ((this kg-squad-control) (arg0 (inline-array kg-squad-member-settings)) (arg1 int))
|
||||
(mem-copy! (the-as pointer (-> this squad-settings arg1)) (the-as pointer arg0) 64)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init-alert ((this kg-squad-control))
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 0)
|
||||
(copy-squad-settings-to-idx this *war-kg-squad-member-settings* 1)
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 2)
|
||||
(set! (-> this alert-level) 0)
|
||||
(call-parent-method this)
|
||||
(kg-squad-control-method-51 this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-method-10 ((this kg-squad-control))
|
||||
(set! (-> this active-squad-member-list length) 0)
|
||||
(set! (-> this guard-to-traffic-mapping 6) (traffic-type roboguard))
|
||||
(set! (-> this guard-to-traffic-mapping 7) (traffic-type roboguard))
|
||||
(set! (-> this guard-to-traffic-mapping 8) (traffic-type flying-turret))
|
||||
(set! (-> this guard-to-traffic-mapping 9) (traffic-type spydroid))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg6))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg7))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg8))
|
||||
(logior! (-> this used-guard-types) (kg-squad-used-guard-types kg9))
|
||||
(set! (-> this guard-to-squad-setting-mapping 6) (the-as uint 0))
|
||||
(set! (-> this guard-to-squad-setting-mapping 7) (the-as uint 1))
|
||||
(set! (-> this guard-to-squad-setting-mapping 8) (the-as uint 2))
|
||||
(set! (-> this guard-to-squad-setting-mapping 9) (the-as uint 3))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch handle-array vs none.
|
||||
(defmethod initialize ((this kg-squad-control) (arg0 process))
|
||||
(set! (-> this active-squad-member-list) (new 'loading-level 'handle-array 126))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod add-squad-member ((this kg-squad-control) (arg0 process))
|
||||
(push-back (-> this active-squad-member-list) (process->handle arg0))
|
||||
)
|
||||
|
||||
(defmethod pop-squad-member-from-list ((this kg-squad-control) (arg0 process))
|
||||
(let ((v1-2 (process->handle arg0)))
|
||||
(dotimes (a1-4 (-> this active-squad-member-list length))
|
||||
(when (= (-> this active-squad-member-list data0 a1-4) v1-2)
|
||||
(pop-front (-> this active-squad-member-list) a1-4)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
|
||||
(defmethod kg-squad-control-method-52 ((this kg-squad-control) (arg0 process) (arg1 process))
|
||||
(let ((v1-2 (process->handle arg1))
|
||||
(v0-0 0)
|
||||
)
|
||||
(dotimes (a2-4 (-> this active-squad-member-list length))
|
||||
(let ((a3-3 (the-as kg-squad-member (handle->process (-> this active-squad-member-list data0 a2-4)))))
|
||||
(if (and a3-3 (!= a3-3 arg0) (= (-> a3-3 current-enemy) v1-2))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod kg-squad-control-method-51 ((this kg-squad-control))
|
||||
(local-vars (a1-8 symbol))
|
||||
(dotimes (v1-0 3)
|
||||
(dotimes (a1-0 10)
|
||||
(when (logtest? (-> this used-guard-types) (ash 1 a1-0))
|
||||
(set! (-> this
|
||||
traffic
|
||||
object-type-info-array
|
||||
0
|
||||
target-counts
|
||||
(+ v1-0 (* (-> this guard-to-traffic-mapping a1-0) 32))
|
||||
)
|
||||
0
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-3 3)
|
||||
(dotimes (a1-3 4)
|
||||
(let ((a2-12 (the-as kg-squad-settings (+ (+ (* a1-3 16) 860 (* v1-3 64)) (the-as int this)))))
|
||||
(+! (-> this
|
||||
traffic
|
||||
object-type-info-array
|
||||
0
|
||||
target-counts
|
||||
(+ v1-3 (* (-> a2-12 roboguard-settings object-type) 32))
|
||||
)
|
||||
(max
|
||||
(min (-> a2-12 roboguard-settings target-count) (-> a2-12 roboguard-settings max-target-count))
|
||||
(-> a2-12 roboguard-settings min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-6 3)
|
||||
(let ((a1-6 (new 'static 'boxed-array :type int8 :length 0 :allocated-length 10))
|
||||
(a2-17 (new 'static 'boxed-array :type int8 :length 0 :allocated-length 10))
|
||||
)
|
||||
(dotimes (a3-10 10)
|
||||
(set! (-> a1-6 a3-10) 0)
|
||||
(set! (-> a2-17 a3-10) 0)
|
||||
)
|
||||
(dotimes (a3-13 4)
|
||||
(let ((t0-13 (the-as kg-squad-settings (+ (+ (* a3-13 16) 860 (* v1-6 64)) (the-as int this)))))
|
||||
(set! (-> a2-17 (-> t0-13 roboguard-settings enemy-type))
|
||||
(max
|
||||
(min (-> t0-13 roboguard-settings target-count) (-> t0-13 roboguard-settings max-target-count))
|
||||
(-> t0-13 roboguard-settings min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (a3-16 (-> this active-squad-member-list length))
|
||||
(let ((t0-19 (the-as kg-squad-member (handle->process (-> this active-squad-member-list data0 a3-16)))))
|
||||
(when t0-19
|
||||
(if (= (-> t0-19 faction-mode) v1-6)
|
||||
(+! (-> a1-6 (-> t0-19 kg-type)) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (a3-19 10)
|
||||
(when (< (-> a1-6 a3-19) (-> a2-17 a3-19))
|
||||
(dotimes (t0-28 10)
|
||||
(when (< (-> a2-17 t0-28) (-> a1-6 t0-28))
|
||||
(set! (-> this enemy-type-seek-from) (the-as uint t0-28))
|
||||
(set! (-> this enemy-type-seek-to) (the-as uint a3-19))
|
||||
(set! a1-8 #t)
|
||||
(goto cfg-47)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! a1-8 #f)
|
||||
(label cfg-47)
|
||||
(when (not a1-8)
|
||||
(set! (-> this enemy-type-seek-from-list v1-6) (the-as uint 11))
|
||||
(set! (-> this enemy-type-seek-to-list v1-6) (the-as uint 11))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod update ((this kg-squad-control))
|
||||
(cond
|
||||
((-> *setting-control* user-current kg-enemy-settings)
|
||||
(set! (-> this city-mode) (squad-city-mode two))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array kg-squad-member-settings) (-> *setting-control* user-current kg-enemy-settings))
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this city-mode) (squad-city-mode zero))
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 0)
|
||||
)
|
||||
)
|
||||
(kg-squad-control-method-51 this)
|
||||
(kg-squad-control-method-53 this)
|
||||
(when *cty-faction-manager*
|
||||
(let ((a2-2 (cond
|
||||
((-> *setting-control* user-current kg-enemy-settings)
|
||||
7
|
||||
)
|
||||
((> (-> this alert-level) 0)
|
||||
7
|
||||
)
|
||||
(else
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(faction-spawn *cty-faction-manager* 0 a2-2 #f (if (-> *setting-control* user-current kg-enemy-settings)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod increment-alert-level ((this kg-squad-control) (arg0 int))
|
||||
(let ((v0-0 (+ (-> this alert-level) arg0)))
|
||||
(set! (-> this alert-level) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod set-alert-level1 ((this kg-squad-control) (arg0 int))
|
||||
(set! (-> this alert-level) arg0)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod kg-squad-control-method-53 ((this kg-squad-control))
|
||||
(cond
|
||||
((> (-> this alert-level) 0)
|
||||
(if (not (-> *setting-control* user-current kg-enemy-settings))
|
||||
(copy-squad-settings-to-idx this *alert-kg-squad-member-settings* 0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(copy-squad-settings-to-idx this *default-kg-squad-member-settings* 0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-alert-level1 ((this kg-squad-control))
|
||||
(-> this alert-level)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-38 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(kg-squad-member-method-219 (the-as kg-squad-member arg0) arg1)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-40 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(if (not (logtest? (process-mask kg-robot) (-> arg1 mask)))
|
||||
(set! (-> this current-target-attackers) (kg-squad-control-method-52 this arg0 arg1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-41 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(not (logtest? (process-mask kg-robot) (-> arg1 mask)))
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-42 ((this kg-squad-control))
|
||||
(if (< 4 (-> this current-target-attackers))
|
||||
100000.0
|
||||
(+ 1.0 (the float (-> this current-target-attackers)))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-43 ((this kg-squad-control) (arg0 process-focusable))
|
||||
(let ((v1-0 arg0))
|
||||
(time-elapsed?
|
||||
(-> (the-as kg-squad-member v1-0) last-choose-new-enemy-time)
|
||||
(-> (the-as kg-squad-member v1-0) choose-new-enemy-delay-time)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-39 ((this kg-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(kg-squad-member-method-216 (the-as kg-squad-member arg0) arg1)
|
||||
)
|
||||
|
||||
(defun set-kg-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *kg-squad-control*
|
||||
(let* ((s5-0 *kg-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod kg-squad-control-method-54 ((this kg-squad-control))
|
||||
(-> *setting-control* user-current kg-difficulty)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,30 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype hatred-instance-info (structure)
|
||||
((hated-target handle)
|
||||
(hatred-value float)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype kg-squad-member (citizen)
|
||||
((squad kg-squad-control :override)
|
||||
(hatred-memory hatred-instance-info 3 :inline)
|
||||
(last-choose-new-enemy-time time-frame)
|
||||
(current-enemy handle)
|
||||
(kg-type uint8)
|
||||
(choose-new-enemy-delay-time time-frame)
|
||||
(next-update-target-time time-frame)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:methods
|
||||
(kg-squad-member-method-216 (_type_ process) float)
|
||||
(enemy->hatred-val (_type_ process) float)
|
||||
(get-hatred-val-for-target (_type_ handle) float)
|
||||
(kg-squad-member-method-219 (_type_ process-focusable) symbol)
|
||||
(kg-squad-member-method-220 (_type_) symbol)
|
||||
(get-current-enemy (_type_) process)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,247 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod set-squad ((this kg-squad-member))
|
||||
(set! (-> this squad) *kg-squad-control*)
|
||||
(set! (-> this minimap) #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod citizen-method-194 ((this kg-squad-member))
|
||||
(dotimes (v1-0 3)
|
||||
(set! (-> this hatred-memory v1-0 hated-target) (the-as handle #f))
|
||||
(set! (-> this hatred-memory v1-0 hatred-value) 0.0)
|
||||
)
|
||||
(set! (-> this last-choose-new-enemy-time) 0)
|
||||
(set! (-> this choose-new-enemy-delay-time) (seconds 3))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
(logior! (-> this mask) (process-mask kg-robot))
|
||||
(set! (-> this next-update-target-time) 0)
|
||||
(set! (-> this faction-mode) (the-as uint 0))
|
||||
(set! (-> this fact fade-time) (seconds 10))
|
||||
(logior! (-> this fact options) (actor-option fade-out no-distance-check-fadeout))
|
||||
(if (not (-> this minimap))
|
||||
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 139) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: disable def twice: 6. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod get-current-enemy ((this kg-squad-member))
|
||||
(if #t
|
||||
(handle->process (-> this attacker-info enemy))
|
||||
(squad-control-city-method-35 (-> this squad) this (-> this current-enemy))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod go-from-behavior ((this kg-squad-member) (arg0 traffic-object-spawn-params))
|
||||
(add-squad-member (-> this squad) this)
|
||||
(call-parent-method this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod go-inactive ((this kg-squad-member))
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate inactive (kg-squad-member)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(let ((t9-0 (-> (method-of-type citizen inactive) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this kg-squad-member))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod enemy->hatred-val ((this kg-squad-member) (arg0 process))
|
||||
(cond
|
||||
((logtest? (process-mask guard) (-> arg0 mask))
|
||||
0.5
|
||||
)
|
||||
((logtest? (process-mask metalhead) (-> arg0 mask))
|
||||
-0.01
|
||||
)
|
||||
((= (-> arg0 type) target)
|
||||
0.3
|
||||
)
|
||||
((logtest? (process-mask civilian) (-> arg0 mask))
|
||||
0.02
|
||||
)
|
||||
((logtest? (process-mask kg-robot) (-> arg0 mask))
|
||||
-1.0
|
||||
)
|
||||
((and (logtest? (process-mask vehicle) (-> arg0 mask)) (not (logtest? (process-mask enemy) (-> arg0 mask))))
|
||||
0.01
|
||||
)
|
||||
(else
|
||||
-1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-hatred-val-for-target ((this kg-squad-member) (arg0 handle))
|
||||
(dotimes (v1-0 3)
|
||||
(if (= arg0 (-> this hatred-memory v1-0 hated-target))
|
||||
(return (-> this hatred-memory v1-0 hatred-value))
|
||||
)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
|
||||
(defmethod kg-squad-member-method-216 ((this kg-squad-member) (arg0 process))
|
||||
(let ((f30-0 (enemy->hatred-val this arg0))
|
||||
(f0-0 (get-hatred-val-for-target this (process->handle arg0)))
|
||||
)
|
||||
0.0
|
||||
(+ f0-0 f30-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod kg-squad-member-method-219 ((this kg-squad-member) (arg0 process-focusable))
|
||||
(let* ((s4-0 (get-trans arg0 0))
|
||||
(f0-0 (vector-vector-xz-distance-squared (-> this root trans) s4-0))
|
||||
(f1-0 409600.0)
|
||||
)
|
||||
(or (and (< f0-0 (* f1-0 f1-0)) (< (fabs (- (-> s4-0 y) (-> this root trans y))) 61440.0))
|
||||
(< 0.0 (get-hatred-val-for-target this (process->handle arg0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-common-post ((this kg-squad-member))
|
||||
(local-vars (s5-0 int))
|
||||
(when (focus-test? this dangerous)
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-0 options) (overlaps-others-options))
|
||||
(set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter))
|
||||
(set! (-> a1-0 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> this root) a1-0)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> this flags) (citizen-flag in-mission))
|
||||
(set! (-> this faction-mode) (the-as uint 2))
|
||||
)
|
||||
((nonzero? (-> this controller branch))
|
||||
(let ((v1-15 (get-city-mode (-> this squad))))
|
||||
0
|
||||
(cond
|
||||
((= v1-15 (squad-city-mode two))
|
||||
(set! s5-0 2)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 *cty-faction-manager*)
|
||||
(a1-2 (-> this controller branch clock-type))
|
||||
)
|
||||
(set! s5-0 (-> v1-17 territory-faction-modes 0 data (+ 1 (* a1-2 16))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> this faction-mode) s5-0)
|
||||
(if (not (send-event this 'change-faction-mode s5-0 (-> this faction-mode)))
|
||||
(set! (-> this faction-mode) (the-as uint s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod send-attack-on-jump-or-knocked ((this kg-squad-member) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
(#f
|
||||
((method-of-type citizen send-attack-on-jump-or-knocked) this arg0 arg1)
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-2 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask enemy guard civilian metalhead) (-> arg0 mask))
|
||||
(not (logtest? (process-mask kg-robot) (-> arg0 mask)))
|
||||
(and v1-2
|
||||
(not (logtest? (-> (the-as process-focusable v1-2) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> this persistent-attack-id)
|
||||
(-> this attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(send-event arg0 'touch (-> arg1 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod kg-squad-member-method-220 ((this kg-squad-member))
|
||||
(if (or (not (-> this draw)) (not (logtest? (-> this draw status) (draw-control-status on-screen))))
|
||||
(return #f)
|
||||
)
|
||||
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (math-camera-pos)))
|
||||
(f1-0 122880.0)
|
||||
)
|
||||
(if (< f0-0 (* f1-0 f1-0))
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defstate in-ditch (kg-squad-member)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-inactive self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate die-fast (kg-squad-member)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-inactive self)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,463 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-krimson-wall
|
||||
:id 329
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:parts ((sp-item 1419 :flags (is-3d sp7) :period (seconds 2) :length (seconds 0.035))
|
||||
(sp-item 1420 :fade-after (meters 40) :flags (is-3d sp7))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1419
|
||||
:init-specs ((:texture (lasersmoke-00 level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 11))
|
||||
(:scale-x (meters 18))
|
||||
(:rot-x (degrees 0) 1 (degrees 180))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 54))
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 16.0)
|
||||
(:timer (seconds 2))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32
|
||||
20
|
||||
1
|
||||
0
|
||||
#x401b00
|
||||
#x401c00
|
||||
#x401d00
|
||||
#x401e00
|
||||
#x401f00
|
||||
#x402000
|
||||
#x402100
|
||||
#x402200
|
||||
#x402300
|
||||
#x402400
|
||||
#x402500
|
||||
#x402600
|
||||
#x402700
|
||||
#x402800
|
||||
#x402900
|
||||
#x402a00
|
||||
#x402b00
|
||||
#x402c00
|
||||
#x402d00
|
||||
#x402e00
|
||||
#x402f00
|
||||
#x403000
|
||||
#x403100
|
||||
#x403200
|
||||
#x403300
|
||||
#x403400
|
||||
#x403500
|
||||
#x403600
|
||||
#x403700
|
||||
#x403800
|
||||
)
|
||||
)
|
||||
(:func 'sparticle-texture-animate)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 1420
|
||||
:init-specs ((:texture (static1 level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 11))
|
||||
(:scale-x (meters 18))
|
||||
(:rot-x (degrees 0) 1 (degrees 180))
|
||||
(:rot-z (degrees 90) 1 (degrees 180))
|
||||
(:scale-y (meters 180))
|
||||
(:r 255.0)
|
||||
(:g 10.0)
|
||||
(:b 10.0)
|
||||
(:a 4.0 16.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defskelgroup skel-krimson-wall-break krimson-wall-break krimson-wall-break-lod0-jg krimson-wall-break-idle-ja
|
||||
((krimson-wall-break-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem -40 0 0 400)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(deftype krimson-wall-break (process-drawable)
|
||||
((art-name string)
|
||||
(anim spool-anim)
|
||||
(pillar (pointer manipy) 2)
|
||||
(level-name symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
explode
|
||||
done
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defstate idle (krimson-wall-break)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('break)
|
||||
(go-virtual explode)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((v1-0 (new 'stack-no-clear 'matrix))
|
||||
(a3-0 (-> self node-list data 2 bone transform))
|
||||
(a0-2 (-> a3-0 rvec quad))
|
||||
(a1-0 (-> a3-0 uvec quad))
|
||||
(a2-0 (-> a3-0 fvec quad))
|
||||
(a3-1 (-> a3-0 trans quad))
|
||||
)
|
||||
(set! (-> v1-0 rvec quad) a0-2)
|
||||
(set! (-> v1-0 uvec quad) a1-0)
|
||||
(set! (-> v1-0 fvec quad) a2-0)
|
||||
(set! (-> v1-0 trans quad) a3-1)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate explode (krimson-wall-break)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (not (time-elapsed? (-> self state-time) (seconds 0.5)))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self root trans quad))
|
||||
(+! (-> gp-0 z) (* 4096.0 (rand-vu-float-range -60.0 60.0)))
|
||||
(+! (-> gp-0 x) (* 4096.0 (rand-vu-float-range -20.0 20.0)))
|
||||
(+! (-> gp-0 y) (* 4096.0 (rand-vu-float-range 0.0 25.0)))
|
||||
(let ((v1-9 (rand-vu-int-count 2)))
|
||||
(cond
|
||||
((zero? v1-9)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 217 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 217))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 217))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-9 1)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 218 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 218))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 218))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let* ((gp-0 (-> self draw art-group))
|
||||
(s5-0 (method-of-object gp-0 get-art-by-name-method))
|
||||
)
|
||||
(format (clear *temp-string*) "~S-end" (-> self art-name))
|
||||
(let ((gp-1 (s5-0 gp-0 *temp-string* art-joint-anim)))
|
||||
(ja-play-spooled-anim
|
||||
(-> self anim)
|
||||
(ja-group)
|
||||
;; og:preserve-this
|
||||
(the art-joint-anim gp-1)
|
||||
(the-as (function process-drawable symbol) false-func)
|
||||
(spooler-flags)
|
||||
)
|
||||
(ja-channel-set! 1)
|
||||
(set! (-> self skel root-channel 0 frame-group) (the art-joint-anim gp-1))
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(go-virtual done)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate done (krimson-wall-break)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('done)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this krimson-wall-break) (arg0 entity-actor))
|
||||
(local-vars (sv-96 entity))
|
||||
(set! (-> this level) (level-get *level* (-> this level-name)))
|
||||
(stack-size-set! (-> this main-thread) 512)
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-krimson-wall-break" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this anim)
|
||||
(new 'static 'spool-anim :name "krimson-wall-break-1" :anim-name "break" :parts 2 :command-list '())
|
||||
)
|
||||
(set! (-> this art-name) (res-lump-struct arg0 'art-name string))
|
||||
(let ((s4-1 (-> this root trans))
|
||||
(s5-1 (-> this root trans))
|
||||
)
|
||||
(let ((s2-0 (entity-actor-lookup arg0 'alt-actor 0))
|
||||
(v0-8 (entity-actor-lookup arg0 'alt-actor 1))
|
||||
)
|
||||
(if s2-0
|
||||
(set! s4-1 (-> s2-0 extra trans))
|
||||
)
|
||||
(if v0-8
|
||||
(set! s5-1 (-> v0-8 extra trans))
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (get-process *default-dead-pool* manipy #x20000 1)))
|
||||
(set! (-> this pillar 0)
|
||||
(the-as
|
||||
(pointer manipy)
|
||||
(when s3-1
|
||||
(let ((t9-10 (method-of-type manipy activate)))
|
||||
(t9-10 (the-as manipy s3-1) this "krimson-wall-break" (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s2-1 run-function-in-process)
|
||||
(s1-0 s3-1)
|
||||
(s0-0 manipy-init)
|
||||
)
|
||||
(set! sv-96 (-> this level entity data 0 entity))
|
||||
(let ((t0-1 (art-group-get-by-name *level* "skel-krimson-wall-break" (the-as (pointer level) #f)))
|
||||
(t1-1 #f)
|
||||
(t2-1 0)
|
||||
)
|
||||
((the-as (function object object object object object object object none) s2-1)
|
||||
s1-0
|
||||
s0-0
|
||||
s4-1
|
||||
sv-96
|
||||
t0-1
|
||||
t1-1
|
||||
t2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s3-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> this pillar 0)) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process (-> this pillar 0)) 'prefix "a-")
|
||||
(set! (-> this pillar 1)
|
||||
(process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
s5-1
|
||||
(-> this level entity data 0 entity)
|
||||
(art-group-get-by-name *level* "skel-krimson-wall-break" (the-as (pointer level) #f))
|
||||
#f
|
||||
0
|
||||
:name "krimson-wall-break"
|
||||
:to this
|
||||
:stack-size #x20000
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> this pillar 1)) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process (-> this pillar 1)) 'prefix "b-")
|
||||
(add-process *gui-control* this (gui-channel art-load) (gui-action queue) (-> this anim name) -99.0 0)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
(defbehavior krimson-wall-break-init-by-other krimson-wall-break ((arg0 entity-actor) (arg1 symbol))
|
||||
(set! (-> self level-name) arg1)
|
||||
(init-from-entity! self arg0)
|
||||
)
|
||||
|
||||
(defskelgroup skel-krimson-wall krimson-wall krimson-wall-lod0-jg krimson-wall-idle-ja
|
||||
((krimson-wall-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 13 0 16)
|
||||
)
|
||||
|
||||
(deftype krimson-wall (process-focusable)
|
||||
((alt-actor entity-actor 2)
|
||||
(collision-part int32)
|
||||
(width float)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(krimson-wall-method-30 (_type_ symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defstate idle (krimson-wall)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('break)
|
||||
(when (and (-> self alt-actor 0) (-> self alt-actor 1))
|
||||
(send-event (-> self alt-actor 0 extra process) 'kill)
|
||||
(send-event (-> self alt-actor 1 extra process) 'kill)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
(('kill)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (nonzero? (-> self collision-part))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate die (krimson-wall)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod krimson-wall-method-30 ((this krimson-wall) (arg0 symbol))
|
||||
(cond
|
||||
(arg0
|
||||
(let ((gp-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector))))
|
||||
(let ((f30-0 (-> this width)))
|
||||
(let ((t9-0 vector-matrix*!)
|
||||
(a0-1 (-> gp-0 0))
|
||||
(a1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-1 x) 0.0)
|
||||
(set! (-> a1-1 y) 0.0)
|
||||
(set! (-> a1-1 z) f30-0)
|
||||
(set! (-> a1-1 w) 1.0)
|
||||
(t9-0 a0-1 a1-1 (-> this node-list data 2 bone transform))
|
||||
)
|
||||
(let ((t9-1 vector-matrix*!)
|
||||
(a0-2 (-> gp-0 1))
|
||||
(a1-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-2 x) 0.0)
|
||||
(set! (-> a1-2 y) 0.0)
|
||||
(set! (-> a1-2 z) (- f30-0))
|
||||
(set! (-> a1-2 w) 1.0)
|
||||
(t9-1 a0-2 a1-2 (-> this node-list data 2 bone transform))
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> this alt-actor 0))
|
||||
(set! (-> gp-0 0 quad) (-> this alt-actor 0 extra trans quad))
|
||||
)
|
||||
(if (nonzero? (-> this alt-actor 1))
|
||||
(set! (-> gp-0 1 quad) (-> this alt-actor 1 extra trans quad))
|
||||
)
|
||||
(spawn-security-wall this (-> gp-0 0) (-> gp-0 1) 77824.0 #f)
|
||||
(let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 1) (-> gp-0 0))))
|
||||
(vector-normalize! s4-1 40960.0)
|
||||
(vector+float*! (-> gp-0 0) (-> gp-0 0) s4-1 -1.0)
|
||||
(vector+float*! (-> gp-0 1) (-> gp-0 1) s4-1 1.0)
|
||||
)
|
||||
(+! (-> gp-0 0 y) 61440.0)
|
||||
(+! (-> gp-0 1 y) 61440.0)
|
||||
(spawn-security-wall this (-> gp-0 0) (-> gp-0 1) 102400.0 #t)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((gp-1 (-> this child)))
|
||||
(while gp-1
|
||||
(send-event (ppointer->process gp-1) 'off)
|
||||
(set! gp-1 (-> gp-1 0 brother))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this krimson-wall) (arg0 entity-actor))
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0)))
|
||||
(set! (-> s4-0 total-prims) (the-as uint 2))
|
||||
(set! (-> s3-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> s3-0 prim-core action) (collide-action solid rideable no-standon))
|
||||
(set-vector! (-> s3-0 local-sphere) 0.0 53248.0 0.0 65536.0)
|
||||
(set! (-> s4-0 root-prim) s3-0)
|
||||
)
|
||||
(let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 1))))
|
||||
(set! (-> v1-8 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-8 prim-core action) (collide-action solid no-standon))
|
||||
(set! (-> v1-8 transform-index) 3)
|
||||
(set-vector! (-> v1-8 local-sphere) 0.0 53248.0 0.0 65536.0)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-11 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s4-0)
|
||||
)
|
||||
(set! (-> this entity) arg0)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-krimson-wall" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(transform-post)
|
||||
(set! (-> this collision-part) (res-lump-value arg0 'extra-id int :time -1000000000.0))
|
||||
(set! (-> this width) (res-lump-float arg0 'dist :default 81920.0))
|
||||
(set! (-> this alt-actor 0) (entity-actor-lookup arg0 'alt-actor 0))
|
||||
(set! (-> this alt-actor 1) (entity-actor-lookup arg0 'alt-actor 1))
|
||||
(format #t "collision part ~D~%" (-> this collision-part))
|
||||
(if (nonzero? (-> this collision-part))
|
||||
(krimson-wall-method-30 this #t)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
@@ -7,3 +7,180 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *default-mh-squad-member-settings*
|
||||
(new 'static 'inline-array kg-squad-member-settings 3
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-grunt)
|
||||
:max-target-count #x7f
|
||||
:target-count 4
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-flitter)
|
||||
:max-target-count #x7f
|
||||
:target-count 3
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings :object-type (traffic-type metalhead-predator) :max-target-count #x7f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *war-mh-squad-member-settings* (new 'static 'inline-array kg-squad-member-settings 3
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-grunt)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-flitter)
|
||||
:max-target-count #x7f
|
||||
:target-count 5
|
||||
)
|
||||
(new 'static 'kg-squad-member-settings
|
||||
:object-type (traffic-type metalhead-predator)
|
||||
:max-target-count #x7f
|
||||
:target-count 2
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defmethod copy-squad-settings-to-idx ((this mh-squad-control) (arg0 (inline-array mh-squad-member-settings)) (arg1 int))
|
||||
(mem-copy! (the-as pointer (-> this squad-settings (the-as uint arg1))) (the-as pointer arg0) 48)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init-alert ((this mh-squad-control))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *default-mh-squad-member-settings*)
|
||||
0
|
||||
)
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *war-mh-squad-member-settings*)
|
||||
1
|
||||
)
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *default-mh-squad-member-settings*)
|
||||
2
|
||||
)
|
||||
(set! (-> this alert-level) 0)
|
||||
(call-parent-method this)
|
||||
(mh-squad-control-method-48 this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-method-10 ((this mh-squad-control))
|
||||
(set! (-> this active-squad-member-list length) 0)
|
||||
(dotimes (v1-1 29)
|
||||
(set! (-> this map-traffic-object-type-to-squad v1-1) (traffic-type invalid0))
|
||||
)
|
||||
(set! (-> this map-traffic-object-type-to-squad 8) (traffic-type civilian-male))
|
||||
(set! (-> this map-traffic-object-type-to-squad 9) (traffic-type civilian-female))
|
||||
(set! (-> this map-traffic-object-type-to-squad 10) (traffic-type civilian-fat))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch handle-array vs none.
|
||||
(defmethod initialize ((this mh-squad-control) (arg0 process))
|
||||
(set! (-> this active-squad-member-list) (new 'loading-level 'handle-array 126))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod add-squad-member ((this mh-squad-control) (arg0 process))
|
||||
(push-back (-> this active-squad-member-list) (process->handle arg0))
|
||||
)
|
||||
|
||||
(defmethod pop-squad-member-from-list ((this mh-squad-control) (arg0 process))
|
||||
(let ((v1-2 (process->handle arg0)))
|
||||
(dotimes (a1-4 (-> this active-squad-member-list length))
|
||||
(when (= (-> this active-squad-member-list data0 a1-4) v1-2)
|
||||
(pop-front (-> this active-squad-member-list) a1-4)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
|
||||
(defmethod mh-squad-control-method-48 ((this mh-squad-control))
|
||||
(dotimes (v1-0 3)
|
||||
(dotimes (a1-0 3)
|
||||
(let ((a3-2 (the-as mh-squad-settings (+ (+ (* a1-0 16) 828 (* 48 v1-0)) (the-as int this)))))
|
||||
(set! (-> this traffic object-type-info-array 0 target-counts (+ v1-0 (* (-> a3-2 grunt-settings object-type) 32)))
|
||||
(max
|
||||
(min (-> a3-2 grunt-settings target-count) (-> a3-2 grunt-settings max-target-count))
|
||||
(-> a3-2 grunt-settings min-target-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod update ((this mh-squad-control))
|
||||
(cond
|
||||
((-> *setting-control* user-current mh-enemy-settings)
|
||||
(set! (-> this city-mode) (squad-city-mode two))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) (-> *setting-control* user-current mh-enemy-settings))
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this city-mode) (squad-city-mode zero))
|
||||
(copy-squad-settings-to-idx
|
||||
this
|
||||
(the-as (inline-array mh-squad-member-settings) *default-mh-squad-member-settings*)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when *cty-faction-manager*
|
||||
(let ((a2-2 (if (-> *setting-control* user-current mh-enemy-settings)
|
||||
7
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(faction-spawn *cty-faction-manager* 1 a2-2 #f (if (-> *setting-control* user-current mh-enemy-settings)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(mh-squad-control-method-48 this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-41 ((this mh-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(not (logtest? (process-mask metalhead) (-> arg1 mask)))
|
||||
)
|
||||
|
||||
(defmethod squad-control-city-method-39 ((this mh-squad-control) (arg0 process-focusable) (arg1 process-focusable))
|
||||
(get-hatred-val-for-proc (the-as mh-squad-member arg0) arg1)
|
||||
)
|
||||
|
||||
(defun set-mh-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *mh-squad-control*
|
||||
(let* ((s5-0 *mh-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,17 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype mh-squad-member (citizen-enemy)
|
||||
((squad mh-squad-control :override)
|
||||
(last-choose-new-enemy-time time-frame)
|
||||
(current-enemy handle)
|
||||
(choose-new-enemy-delay-time time-frame)
|
||||
(next-update-target-time time-frame)
|
||||
)
|
||||
(:methods
|
||||
(get-hatred-val-for-proc (_type_ process) float)
|
||||
(pfoc-in-range? (_type_ process-focusable) symbol)
|
||||
(enemy->hatred-val (_type_ process) float)
|
||||
(get-current-enemy (_type_) process)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,283 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch mh-squad-control vs none.
|
||||
(defmethod set-squad ((this mh-squad-member))
|
||||
(set! (-> this squad) *mh-squad-control*)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod citizen-method-194 ((this mh-squad-member))
|
||||
(set! (-> this last-choose-new-enemy-time) 0)
|
||||
(set! (-> this choose-new-enemy-delay-time) (seconds 3))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
(set! (-> this mask) (the-as process-mask (logior (process-mask metalhead) (-> this mask))))
|
||||
(set! (-> this faction-mode) (the-as uint 0))
|
||||
(set! (-> this next-update-target-time) 0)
|
||||
(set! (-> this fact pickup-type) (pickup-type eco-pill-dark))
|
||||
(if (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 11))
|
||||
(set! (-> this fact pickup-type) (pickup-type eco-pill-light))
|
||||
)
|
||||
(set! (-> this fact pickup-amount) 1.0)
|
||||
(set! (-> this fact pickup-spawn-amount) 1.0)
|
||||
(set! (-> this fact fade-time) (seconds 10))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod go-from-behavior ((this mh-squad-member) (arg0 traffic-object-spawn-params))
|
||||
(add-squad-member (-> this squad) this)
|
||||
(call-parent-method this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod go-inactive ((this mh-squad-member))
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this mh-squad-member))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(pop-squad-member-from-list (-> this squad) this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod enemy->hatred-val ((this mh-squad-member) (arg0 process))
|
||||
(cond
|
||||
((logtest? (process-mask metalhead) (-> arg0 mask))
|
||||
-1.0
|
||||
)
|
||||
((logtest? (process-mask guard) (-> arg0 mask))
|
||||
0.5
|
||||
)
|
||||
((= (-> arg0 type) target)
|
||||
0.49
|
||||
)
|
||||
((logtest? (process-mask civilian) (-> arg0 mask))
|
||||
0.2
|
||||
)
|
||||
((logtest? (process-mask kg-robot) (-> arg0 mask))
|
||||
-0.01
|
||||
)
|
||||
((and (logtest? (process-mask vehicle) (-> arg0 mask)) (not (logtest? (process-mask enemy) (-> arg0 mask))))
|
||||
0.01
|
||||
)
|
||||
(else
|
||||
-1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-hatred-val-for-proc ((this mh-squad-member) (arg0 process))
|
||||
(let ((f1-0 (enemy->hatred-val this arg0)))
|
||||
0.0
|
||||
f1-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod pfoc-in-range? ((this mh-squad-member) (arg0 process-focusable))
|
||||
(let* ((s5-0 (get-trans arg0 0))
|
||||
(f0-0 (vector-vector-xz-distance-squared (-> this root trans) s5-0))
|
||||
(f1-0 245760.0)
|
||||
)
|
||||
(and (< f0-0 (* f1-0 f1-0)) (< (fabs (- (-> s5-0 y) (-> this root trans y))) 61440.0))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-common-post ((this mh-squad-member))
|
||||
(local-vars (s5-0 int))
|
||||
(when (focus-test? this dangerous)
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-0 options) (overlaps-others-options))
|
||||
(set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter))
|
||||
(set! (-> a1-0 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> this root) a1-0)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> this flags) (citizen-flag in-mission))
|
||||
(set! (-> this faction-mode) (the-as uint 2))
|
||||
)
|
||||
((nonzero? (-> this controller branch))
|
||||
(let ((v1-15 (get-city-mode (-> this squad))))
|
||||
0
|
||||
(cond
|
||||
((= v1-15 (squad-city-mode two))
|
||||
(set! s5-0 2)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 *cty-faction-manager*)
|
||||
(a1-2 (-> this controller branch clock-type))
|
||||
)
|
||||
(set! s5-0 (-> v1-17 territory-faction-modes 0 data (+ 1 (* a1-2 16))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> this faction-mode) s5-0)
|
||||
(if (not (send-event this 'change-faction-mode s5-0 (-> this faction-mode)))
|
||||
(set! (-> this faction-mode) (the-as uint s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(find-new-focus this)
|
||||
((method-of-type citizen enemy-common-post) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod send-attack-on-jump-or-knocked ((this mh-squad-member) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
(#f
|
||||
((method-of-type citizen send-attack-on-jump-or-knocked) this arg0 arg1)
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-2 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask enemy guard civilian kg-robot) (-> arg0 mask))
|
||||
(not (logtest? (process-mask metalhead) (-> arg0 mask)))
|
||||
(and v1-2
|
||||
(not (logtest? (-> (the-as process-focusable v1-2) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> this persistent-attack-id)
|
||||
(-> this attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(send-event arg0 'touch (-> arg1 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: disable def twice: 6. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod get-current-enemy ((this mh-squad-member))
|
||||
(if #t
|
||||
(handle->process (-> this attacker-info enemy))
|
||||
(squad-control-city-method-35 (-> this squad) this (-> this current-enemy))
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: disable def twice: 120. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod find-new-focus ((this mh-squad-member))
|
||||
(local-vars (v0-6 object))
|
||||
(when (not (handle->process (-> this current-enemy)))
|
||||
(set! (-> this focus handle) (the-as handle #f))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
)
|
||||
(let ((a0-6 (get-current-enemy this)))
|
||||
(if a0-6
|
||||
(set! (-> this current-enemy) (process->handle a0-6))
|
||||
(set! (-> this current-enemy) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> this attacker-info flags) (city-attacker-info-flag cai2))
|
||||
(set! (-> this attacker-info next-update-target-time) (+ (current-time) (seconds 3)))
|
||||
(logclear! (-> this attacker-info flags) (city-attacker-info-flag cai2))
|
||||
)
|
||||
(let* ((s5-0 (handle->process (-> this current-enemy)))
|
||||
(a0-18 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and a0-18
|
||||
(not (logtest? (-> (the-as process-focusable a0-18) focus-status) (focus-status disable dead inactive)))
|
||||
)
|
||||
(let* ((s5-1 this)
|
||||
(s4-0 (method-of-object s5-1 enemy-method-70))
|
||||
(s3-0 (handle->process (-> this current-enemy)))
|
||||
)
|
||||
(s4-0
|
||||
s5-1
|
||||
(the-as process-focusable (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(the-as enemy-aware #f)
|
||||
)
|
||||
)
|
||||
(update-focus this)
|
||||
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
|
||||
(f1-0 266240.0)
|
||||
)
|
||||
(cond
|
||||
((< f0-0 (* f1-0 f1-0))
|
||||
(when (not (logtest? (-> this squad alert-state flags) (squad-alert-flag war)))
|
||||
(set! v0-6 (logior (-> this flags) (citizen-flag persistent)))
|
||||
(set! (-> this flags) (the-as citizen-flag v0-6))
|
||||
v0-6
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! v0-6 (logclear (-> this flags) (citizen-flag persistent)))
|
||||
(set! (-> this flags) (the-as citizen-flag v0-6))
|
||||
v0-6
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this focus handle) (the-as handle #f))
|
||||
(logclear! (-> this flags) (citizen-flag persistent))
|
||||
(if (and (-> this next-state) (= (-> this next-state name) 'hostile))
|
||||
(go (method-of-object this active))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate active (mh-squad-member)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (handle->process (-> self current-enemy))
|
||||
(let* ((gp-0 (handle->process (-> self current-enemy)))
|
||||
(v1-7 (if (type? gp-0 process-focusable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (not (or (focus-test? v1-7 inactive) (focus-test? v1-7 disable)))
|
||||
(go-virtual hostile)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-3 (-> (find-parent-state) trans)))
|
||||
(if t9-3
|
||||
(t9-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -80,21 +80,21 @@
|
||||
(max-user-count uint8)
|
||||
(user-count uint8)
|
||||
(width uint8)
|
||||
(flags uint8)
|
||||
(flags nav-branch-flags)
|
||||
)
|
||||
(:methods
|
||||
(nav-branch-method-9 () none)
|
||||
(nav-branch-method-10 () none)
|
||||
(set-default-density-speed-and-width (_type_) none)
|
||||
(debug-print (_type_ object int) none)
|
||||
(get-density (_type_) float)
|
||||
(get-speed-limit (_type_) float)
|
||||
(get-width (_type_) float)
|
||||
(user-limit-reached? (_type_) symbol)
|
||||
(dest-node-id-at-max? (_type_) symbol)
|
||||
(nav-branch-method-16 () none)
|
||||
(nav-branch-method-17 () none)
|
||||
(nav-branch-method-18 () none)
|
||||
(nav-branch-method-19 () none)
|
||||
(nav-branch-method-20 () none)
|
||||
(set-density (_type_ float) none)
|
||||
(set-speed-limit (_type_ float) none)
|
||||
(set-width (_type_ float) none)
|
||||
(set-src-node (_type_ nav-node) none)
|
||||
(set-dst-node (_type_ nav-node) none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -116,15 +116,15 @@
|
||||
(level symbol :overlay-at (-> data 7))
|
||||
)
|
||||
(:methods
|
||||
(nav-node-method-9 () none)
|
||||
(nav-node-method-10 () none)
|
||||
(nav-node-method-11 () none)
|
||||
(nav-node-method-12 () none)
|
||||
(nav-node-method-13 () none)
|
||||
(nav-node-method-14 () none)
|
||||
(nav-node-method-15 () none)
|
||||
(nav-node-method-16 () none)
|
||||
(nav-node-method-17 () none)
|
||||
(debug-draw (_type_) none)
|
||||
(debug-print (_type_ symbol string) none)
|
||||
(remove-branch-by-idx (_type_ int) none)
|
||||
(init-from-pt-and-heading (_type_ vector vector) none)
|
||||
(set-pos-xyz (_type_ vector) none)
|
||||
(set-angle-from-heading (_type_ vector) none)
|
||||
(set-id-and-link-branches-back (_type_ uint) none)
|
||||
(set-radius (_type_ float) none)
|
||||
(set-angle (_type_ float) none)
|
||||
(get-position (_type_ vector) vector)
|
||||
(calc-sine-and-cosine! (_type_ vector) vector)
|
||||
(get-angle (_type_) float)
|
||||
@@ -202,43 +202,43 @@
|
||||
(pad1 uint32 6)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(nav-graph-method-9 () none)
|
||||
(nav-graph-method-10 () none)
|
||||
(nav-graph-method-11 () none)
|
||||
(nav-graph-method-12 () none)
|
||||
(nav-graph-method-13 () none)
|
||||
(nav-graph-method-14 () none)
|
||||
(nav-graph-method-15 () none)
|
||||
(nav-graph-method-16 () none)
|
||||
(nav-graph-method-17 () none)
|
||||
(nav-graph-method-18 () none)
|
||||
(nav-graph-method-19 () none)
|
||||
(nav-graph-method-20 () none)
|
||||
(nav-graph-method-21 () none)
|
||||
(nav-graph-method-22 () none)
|
||||
(nav-graph-method-23 () none)
|
||||
(nav-graph-method-24 () none)
|
||||
(nav-graph-method-25 () none)
|
||||
(nav-graph-method-26 () none)
|
||||
(nav-graph-method-27 () none)
|
||||
(nav-graph-method-28 () none)
|
||||
(nav-graph-method-29 () none)
|
||||
(nav-graph-method-30 () none)
|
||||
(nav-graph-method-31 () none)
|
||||
(nav-graph-method-32 () none)
|
||||
(nav-graph-method-33 () none)
|
||||
(nav-graph-method-34 () none)
|
||||
(nav-graph-method-35 () none)
|
||||
(nav-graph-method-36 () none)
|
||||
(nav-graph-method-37 () none)
|
||||
(nav-graph-method-38 () none)
|
||||
(nav-graph-method-39 () none)
|
||||
(nav-graph-method-40 () none)
|
||||
(new (symbol type int int int uint) _type_)
|
||||
(debug-draw-nodes (_type_) none)
|
||||
(find-nearest-nav-node (_type_ vector symbol) nav-node)
|
||||
(print-nav-graph (_type_) none)
|
||||
(set-first-node (_type_) none)
|
||||
(nav-graph-method-13 (_type_ int int) none)
|
||||
(nav-graph-method-14 (_type_ int int) none)
|
||||
(reset! (_type_) none)
|
||||
(add-node (_type_ int) nav-node)
|
||||
(link-node-to-graph (_type_ nav-node) none)
|
||||
(reset-branch-array (_type_ nav-node int) none)
|
||||
(nav-graph-method-19 (_type_ int int int int int int) none)
|
||||
(nav-graph-method-20 (_type_ int int) none)
|
||||
(move-selected-to-height-map-height (_type_) none)
|
||||
(select-nodes-in-range (_type_ int int) none)
|
||||
(deselect-nodes-in-range (_type_ int int) none)
|
||||
(toggle-select-nodes-in-range (_type_ int int) none)
|
||||
(select-nodes-in-level (_type_ symbol symbol) none)
|
||||
(select-nodes-by-nav-mesh-id (_type_ int symbol) none)
|
||||
(select-nodes-by-flags (_type_ nav-node-flag-byte nav-node-flag-byte symbol) none)
|
||||
(print-selected-nodes (_type_) none)
|
||||
(assign-selected-nodes-to-level (_type_ symbol) none)
|
||||
(assign-selected-nodes-to-nav-mesh (_type_ uint) none)
|
||||
(set-radius-of-selected-nodes (_type_ float) none)
|
||||
(set-speed-limit-of-selected (_type_ float) none)
|
||||
(set-density-of-selected (_type_ float) none)
|
||||
(set-width-of-selected (_type_ float) none)
|
||||
(or-flags-of-selected-nodes (_type_ nav-node-flag-byte) none)
|
||||
(and-flags-of-selected-nodes (_type_ nav-node-flag-byte) none)
|
||||
(offset-pos-of-selected (_type_ vector) none)
|
||||
(nav-graph-method-38 (_type_) none)
|
||||
(nav-graph-method-39 (_type_) none)
|
||||
(nav-graph-method-40 (_type_ int) int)
|
||||
(node-at-idx (_type_ int) nav-node)
|
||||
(nav-graph-method-42 () none)
|
||||
(nav-graph-method-43 () none)
|
||||
(nav-graph-method-44 () none)
|
||||
(patch-nodes (_type_) none)
|
||||
(copy-to-mysql-graph (_type_ mysql-nav-graph string) none)
|
||||
(from-editor (_type_ mysql-nav-graph symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,93 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype searchlight (process-drawable)
|
||||
((sync sync-eased :inline)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-searchlight searchlight searchlight-lod0-jg searchlight-idle-ja
|
||||
((searchlight-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 60 0 120)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defstate idle (searchlight)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((gp-1 (quaternion-vector-angle!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
(new 'static 'vector :z 1.0 :w 1.0)
|
||||
(+ -4004.9778 (* 8192.0 (get-norm! (-> self sync) 0)))
|
||||
)
|
||||
)
|
||||
(s5-2 (quaternion-axis-angle!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
(vector-y-angle (-> (math-camera-matrix) fvec))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-3 (calc-fade-from-fog (-> self root trans))))
|
||||
(set-vector! (-> self draw color-emissive) f0-3 f0-3 f0-3 1.0)
|
||||
)
|
||||
(quaternion-normalize! (quaternion*! (-> self root quat) s5-2 gp-1))
|
||||
)
|
||||
(when (rand-vu-percent? 0.05)
|
||||
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-4 from) (process->ppointer self))
|
||||
(set! (-> a1-4 num-params) 0)
|
||||
(set! (-> a1-4 message) 'hour)
|
||||
(let ((v1-13 (send-event-function (ppointer->process *time-of-day*) a1-4)))
|
||||
(if (and v1-13 (>= (the-as int v1-13) 7) (>= 18 (the-as int v1-13)))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this searchlight) (arg0 entity-actor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-searchlight" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logior! (-> this draw status) (draw-control-status disable-fog))
|
||||
(set! (-> this root scale y) (rand-vu-float-range 1.8 2.0))
|
||||
(set-vector! (-> this draw color-mult) 0.0 0.0 0.0 0.0)
|
||||
(let ((s4-1 (new 'stack-no-clear 'sync-info-params)))
|
||||
(let ((v1-12 0))
|
||||
(if #t
|
||||
(set! v1-12 (logior v1-12 1))
|
||||
)
|
||||
(set! (-> s4-1 sync-type) 'sync-eased)
|
||||
(set! (-> s4-1 sync-flags) (the-as sync-flags v1-12))
|
||||
)
|
||||
(set! (-> s4-1 period) (the-as uint (rand-vu-int-range 3000 6000)))
|
||||
(set! (-> s4-1 entity) arg0)
|
||||
(set! (-> s4-1 percent) 0.0)
|
||||
(set! (-> s4-1 ease-in) 0.15)
|
||||
(set! (-> s4-1 ease-out) 0.15)
|
||||
(set! (-> s4-1 pause-in) 0.0)
|
||||
(set! (-> s4-1 pause-out) 0.0)
|
||||
(initialize! (-> this sync) s4-1)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
@@ -7,3 +7,873 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype boat-manager (process)
|
||||
((mesh nav-mesh)
|
||||
(paths path-control 4)
|
||||
(boats-stop? symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
(:methods
|
||||
(boat-manager-method-15 (_type_) none)
|
||||
(boat-manager-method-16 (_type_) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *barge-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 100.0
|
||||
:inv-mass 0.01
|
||||
:linear-damping 0.9
|
||||
:angular-damping 0.9
|
||||
:bounce-factor 0.1
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :z 8192.0 :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 16) (meters 6) (meters 20))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*barge-constants*
|
||||
:flags #x8
|
||||
:object-type (traffic-type vehicle-task)
|
||||
:guard-type #xb
|
||||
:vehicle-type (vehicle-type-u8 vt27)
|
||||
:transmission (new 'static 'vehicle-transmission-info :gear-count 1)
|
||||
:handling (new 'static 'vehicle-handling-info
|
||||
:max-engine-thrust (meters 50)
|
||||
:inv-max-engine-thrust 0.0000048828124
|
||||
:engine-response-rate 10.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 1.0
|
||||
:turbo-boost-factor 1.0
|
||||
:turbo-boost-duration (seconds 1)
|
||||
:max-xz-speed (meters 30)
|
||||
:player-turn-anim-min -1.0
|
||||
:player-turn-anim-max 1.0
|
||||
:pilot-x-accel-factor 1.0
|
||||
:pilot-y-accel-factor 1.0
|
||||
:pilot-z-accel-factor 1.0
|
||||
:ground-probe-distance (meters 3)
|
||||
:cos-ground-effect-angle 0.42261827
|
||||
:spring-lift-factor 1.0
|
||||
:air-drag-factor 1.0
|
||||
:steering-fin-angle 1820.4445
|
||||
:steering-thruster-factor 1.0
|
||||
:steering-thruster-max-gain 1.0
|
||||
:steering-thruster-half-gain-speed (meters 30)
|
||||
:tire-steering-angle 1274.3112
|
||||
:tire-steering-speed-factor 61440.0
|
||||
:tire-friction-factor 1.0
|
||||
:tire-static-friction 0.5
|
||||
:tire-static-friction-speed (meters 1)
|
||||
:tire-dynamic-friction 0.25
|
||||
:tire-dynamic-friction-speed (meters 3)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.7
|
||||
:pitch-control-factor 1.0
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.5
|
||||
:buoyancy-factor 0.5
|
||||
:water-drag-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:air-angular-damping 1.0
|
||||
:ground-torque-scale 1.0
|
||||
:ai-steering-factor 1.0
|
||||
:ai-throttle-factor 1.0
|
||||
)
|
||||
:turning-accel (meters 20)
|
||||
:camera (new 'static 'vehicle-camera-info
|
||||
:string-min-height (meters 4.5)
|
||||
:string-max-height (meters 4.5)
|
||||
:string-min-length (meters 5)
|
||||
:string-max-length (meters 12.5)
|
||||
:min-fov 15109.688
|
||||
:max-fov 17476.268
|
||||
:head-offset 8192.0
|
||||
:foot-offset 4096.0
|
||||
:normal-max-angle-offset 182.04445
|
||||
:air-max-angle-offset 5461.3335
|
||||
:max-lookaround-speed 40960.0
|
||||
:look-pos-array (new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :y 8192.0 :z -10240.0 :w 1.0)
|
||||
(new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:sound (new 'static 'vehicle-sound-info
|
||||
:engine-pitch-scale 0.25
|
||||
:engine-pitch-mod-amp 0.05
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "car-scrape-stn")
|
||||
:glance-sound (static-sound-name "car-glance-stn")
|
||||
:impact-sound (static-sound-name "car-impact-stn")
|
||||
:explode-sound (static-sound-name "vehicle-explode")
|
||||
:explode2-sound (static-sound-name "vehicle-explo-b")
|
||||
:extra-sound (static-sound-name "car-by-1")
|
||||
:bank-replace '()
|
||||
:idle-pitch-scale 1.0
|
||||
:idle-crossover-rpm 1000.0
|
||||
:engine-crossover-rpm 4000.0
|
||||
:start-sound (static-sound-name "vehicl-ignition")
|
||||
:susp-speed-threshold 40960.0
|
||||
:tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
:tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
)
|
||||
:particles (new 'static 'vehicle-particle-info
|
||||
:thruster-flame-width (meters 0.25)
|
||||
:thruster-flame-length (meters 4)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
)
|
||||
:damage (new 'static 'vehicle-damage-info
|
||||
:inv-toughness-factor 1.0
|
||||
:hit-points 2000.0
|
||||
:inv-hit-points 0.0005
|
||||
:hit-small 102400.0
|
||||
:hit-big 131072.0
|
||||
:hit-deadly 286720.0
|
||||
:impact-damage-factor 1.0
|
||||
)
|
||||
:physics-model (new 'static 'vehicle-physics-model-info
|
||||
:inv-lift-thruster-count 1.0
|
||||
:engine-thrust-local-pos (new 'static 'vector :z 22118.4 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :w 1.0)
|
||||
:wheel-count 4
|
||||
:drive-wheel-count 2
|
||||
:front-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
:rear-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
)
|
||||
:setup (new 'static 'vehicle-setup-info
|
||||
:settle-height 6144.0
|
||||
:shadow-bot-clip -40960.0
|
||||
:shadow-locus-dist 409600.0
|
||||
:color-option-count 1
|
||||
:color (new 'static 'inline-array vector 1 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0))
|
||||
:gun-yaw-min -65536.0
|
||||
:gun-yaw-max 65536.0
|
||||
:gun-pitch-min -16384.0
|
||||
:gun-pitch-max 16384.0
|
||||
)
|
||||
:rider (new 'static 'vehicle-rider-info
|
||||
:rider-stance #x1
|
||||
:grab-rail-array #f
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0))
|
||||
:attach-point-array #f
|
||||
)
|
||||
:explosion #f
|
||||
:explosion-part #xdb
|
||||
:debris #f
|
||||
)
|
||||
)
|
||||
|
||||
(deftype boat-base (vehicle)
|
||||
((manager handle)
|
||||
(angle float)
|
||||
(y-rot float)
|
||||
(path-num uint32)
|
||||
(path-index float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod apply-damage ((this boat-base) (arg0 float) (arg1 rigid-body-impact))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod attack-handler ((this boat-base) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate))
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-103 ((this boat-base))
|
||||
(local-vars (v1-8 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(when (time-elapsed? (-> this disturbed-time) (seconds 2))
|
||||
(let* ((f0-0 (-> this camera-dist2))
|
||||
(f1-0 0.000024414063)
|
||||
(f0-1 (* f0-0 (* f1-0 f1-0)))
|
||||
)
|
||||
(.lvf vf1 (&-> (-> this rbody ang-velocity) quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
||||
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
||||
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
||||
(.mov v1-8 vf1)
|
||||
(when (< v1-8 f0-1)
|
||||
(logclear! (-> this v-flags) (vehicle-flag disturbed))
|
||||
(vehicle-method-142 this)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod rigid-body-object-method-30 ((this boat-base))
|
||||
(local-vars (v1-42 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(rider-trans)
|
||||
(let ((t9-1 (method-of-type vehicle rigid-body-object-method-30)))
|
||||
(t9-1 this)
|
||||
)
|
||||
(let ((s5-0 (-> this root)))
|
||||
(pull-riders! s5-0)
|
||||
(cond
|
||||
((logtest? (do-push-aways s5-0) (collide-spec jak))
|
||||
(+! (-> this overlap-player-counter) 1)
|
||||
(when (< (the-as uint 60) (-> this overlap-player-counter))
|
||||
(send-event
|
||||
*target*
|
||||
'attack-invinc
|
||||
#f
|
||||
(static-attack-info
|
||||
:mask (vehicle-impulse-factor)
|
||||
((id (new-attack-id)) (damage 1000.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'smush))
|
||||
)
|
||||
)
|
||||
(set! (-> this overlap-player-counter) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this overlap-player-counter) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)))
|
||||
(let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
(let ((a1-1 (-> this nav state)))
|
||||
(set! (-> s5-1 0 quad) (-> a1-1 velocity quad))
|
||||
)
|
||||
(let ((s4-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info)))
|
||||
(let ((s3-0 (-> this nav state current-poly)))
|
||||
(vector-xz-normalize-copy! (-> s5-1 3) (-> s5-1 0) 163840.0)
|
||||
(set! (-> s5-1 4 quad) (-> s5-1 3 quad))
|
||||
(clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) s3-0 (-> s5-1 4) s4-0)
|
||||
)
|
||||
(when (-> s4-0 found-boundary)
|
||||
(let ((f30-0 (vector-length (-> s5-1 0))))
|
||||
(vector-flatten! (-> s5-1 0) (-> s5-1 0) (-> s4-0 boundary-normal))
|
||||
(vector-rotate90-around-y! (-> s5-1 0) (-> s4-0 boundary-normal))
|
||||
(vector-normalize! (-> s5-1 0) f30-0)
|
||||
)
|
||||
(when (= this *debug-actor*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this root trans) (-> s5-1 0) (meters 10) *color-blue*)
|
||||
(format *stdebug* "avoid border~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((f0-3 4.096)
|
||||
(f0-5 (* f0-3 f0-3))
|
||||
)
|
||||
(.lvf vf1 (&-> (-> s5-1 0) quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
||||
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
||||
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
||||
(.mov v1-42 vf1)
|
||||
(when (< f0-5 v1-42)
|
||||
(set! (-> s5-1 5 quad) (-> s5-1 0 quad))
|
||||
(vector-normalize! (-> s5-1 5) 1.0)
|
||||
(let ((s4-1 (-> this root quat)))
|
||||
(quaternion-set! (the-as quaternion (-> s5-1 2)) 0.0 (-> s5-1 5 x) 0.0 (+ 1.0 (-> s5-1 5 z)))
|
||||
(quaternion-normalize! (the-as quaternion (-> s5-1 2)))
|
||||
(quaternion-smooth-seek! s4-1 s4-1 (the-as quaternion (-> s5-1 2)) (* 1.2 (seconds-per-frame)))
|
||||
)
|
||||
(vector-z-quaternion! (-> s5-1 1) (-> this root quat))
|
||||
(vector-v*float+! (-> this root trans) (-> this root trans) (-> s5-1 1) 8954.266)
|
||||
(seek! (-> this root trans y) 4096.0 (* 4096.0 (seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (= this *debug-actor*)
|
||||
(format *stdebug* "no physics~%")
|
||||
(format *stdebug* "~M~%" (-> this root trans y))
|
||||
)
|
||||
)
|
||||
(if (= this *debug-actor*)
|
||||
(format *stdebug* "speed ~M~%" (vector-length (-> this root transv)))
|
||||
)
|
||||
(let ((s4-2 (handle->process (-> this manager)))
|
||||
(s5-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when s4-2
|
||||
(let ((a1-22 (-> this nav state)))
|
||||
(set! (-> s5-2 quad) (-> a1-22 target-pos quad))
|
||||
)
|
||||
(if (or (= (-> this path-num) 2) (-> *setting-control* user-current stop-boats?))
|
||||
(get-point-at-percent-along-path!
|
||||
(-> (the-as boat-manager (+ (* (-> this path-num) 4) (the-as uint s4-2))) paths 0)
|
||||
(-> this root trans)
|
||||
(-> this path-index)
|
||||
'interp
|
||||
)
|
||||
)
|
||||
(when (and (not (or (= (-> this path-num) 2) (-> *setting-control* user-current stop-boats?)))
|
||||
(< (vector-vector-xz-distance (-> this root trans) s5-2) 163840.0)
|
||||
)
|
||||
(+! (-> this path-index) 0.01)
|
||||
(let ((f0-20 (-> this path-index)))
|
||||
(set! (-> this path-index) (- f0-20 (* (the float (the int (/ f0-20 1.0))) 1.0)))
|
||||
)
|
||||
)
|
||||
(get-point-at-percent-along-path!
|
||||
(-> (the-as boat-manager (+ (* (-> this path-num) 4) (the-as uint s4-2))) paths 0)
|
||||
s5-2
|
||||
(-> this path-index)
|
||||
'interp
|
||||
)
|
||||
(let ((v1-102 (-> this nav state)))
|
||||
(logclear! (-> v1-102 flags) (nav-state-flag directional-mode))
|
||||
(logior! (-> v1-102 flags) (nav-state-flag target-poly-dirty))
|
||||
(set! (-> v1-102 target-pos quad) (-> s5-2 quad))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(vehicle-method-78 this)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod clear-impulse-force-flag! ((this boat-base))
|
||||
((method-of-type vehicle clear-impulse-force-flag!) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod apply-gravity! ((this boat-base) (arg0 float))
|
||||
(let ((s3-0 (-> this rbody))
|
||||
(s2-0 (-> this info))
|
||||
(s4-0 (new 'stack-no-clear 'matrix))
|
||||
)
|
||||
(let ((a1-1 (-> this nav state)))
|
||||
(set! (-> s4-0 uvec quad) (-> a1-1 velocity quad))
|
||||
)
|
||||
(vector-! (-> s4-0 rvec) (-> s4-0 uvec) (-> s3-0 lin-velocity))
|
||||
(vector-float*! (-> s4-0 rvec) (-> s4-0 rvec) (* 4.0 (-> s2-0 info mass)))
|
||||
(set-vector! (-> s4-0 trans) 0.0 -122880.0 40960.0 1.0)
|
||||
(vector-matrix*! (-> s4-0 fvec) (-> s4-0 trans) (-> s3-0 matrix))
|
||||
(apply-impact! s3-0 (-> s4-0 fvec) (-> s4-0 rvec))
|
||||
(vector-reset! (-> s4-0 rvec))
|
||||
(set! (-> s4-0 rvec y) (* -4.0 (-> s2-0 extra gravity) (-> s2-0 info mass)))
|
||||
(add-force! s3-0 (-> s4-0 rvec))
|
||||
)
|
||||
(rigid-body-object-method-53 this arg0)
|
||||
(vehicle-method-96 this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-93 ((this boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-object-method-38 ((this boat-base))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-131 ((this boat-base) (arg0 traffic-object-spawn-params))
|
||||
(get-nav-control this (-> arg0 nav-mesh))
|
||||
(set! (-> this manager) (-> arg0 handle))
|
||||
(set! (-> this nav callback-info) *physics-nav-callback-info*)
|
||||
(logior! (-> this nav flags) (nav-control-flag display-marks limit-rotation-rate update-heading-from-facing))
|
||||
(let ((v1-5 (-> this nav)))
|
||||
(set! (-> v1-5 target-speed) 40960.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-7 (-> this nav)))
|
||||
(set! (-> v1-7 acceleration) 8192.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-9 (-> this nav)))
|
||||
(set! (-> v1-9 turning-acceleration) 8192.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-11 (-> this nav)))
|
||||
(set! (-> v1-11 max-rotation-rate) 9102.223)
|
||||
)
|
||||
0
|
||||
(let ((v1-13 (-> this nav)))
|
||||
(set! (-> v1-13 nav-cull-radius) 122880.0)
|
||||
)
|
||||
0
|
||||
(let ((v1-15 (-> this nav)))
|
||||
(set! (-> v1-15 sphere-mask) (the-as uint 64))
|
||||
)
|
||||
0
|
||||
(set! (-> this path-num) (-> arg0 user-data))
|
||||
(set! (-> this path-index) (+ 0.05 (-> arg0 position w)))
|
||||
(when (-> *setting-control* user-current stop-boats?)
|
||||
)
|
||||
(logior! (-> this root root-prim prim-core collide-as) (collide-spec pusher))
|
||||
(let ((v1-26 (-> this root root-prim)))
|
||||
(set! (-> this root backup-collide-as) (-> v1-26 prim-core collide-as))
|
||||
(set! (-> this root backup-collide-with) (-> v1-26 prim-core collide-with))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod alloc-rbody-control! ((this boat-base) (arg0 rigid-body-object-constants))
|
||||
((method-of-type vehicle alloc-rbody-control!) this arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod vehicle-method-109 ((this boat-base))
|
||||
(go (method-of-object this idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-102 ((this boat-base))
|
||||
#f
|
||||
)
|
||||
|
||||
(defstate waiting (boat-base)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual idle)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
)
|
||||
|
||||
(defstate inactive (boat-base)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(go-virtual idle)
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (boat-base)
|
||||
:virtual #t
|
||||
:event vehicle-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self v-flags) (vehicle-flag riding))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:post (behavior ()
|
||||
(rbody-post self)
|
||||
(update-transforms (-> self root))
|
||||
)
|
||||
)
|
||||
|
||||
(defskelgroup skel-barge barge barge-lod0-jg barge-idle-ja
|
||||
((barge-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 21)
|
||||
)
|
||||
|
||||
(deftype barge (boat-base)
|
||||
((engine sound-id)
|
||||
(bow-wash sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod init-collision! ((this barge))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate vehicle))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 19) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 20))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 81920.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-11 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-11 transform-index) 3)
|
||||
(set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 81920.0)
|
||||
)
|
||||
(let ((v1-13 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-13 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-13 transform-index) 3)
|
||||
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 81920.0)
|
||||
)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-15 transform-index) 0)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 -32768.0 16384.0)
|
||||
)
|
||||
(let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-17 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-17 transform-index) 0)
|
||||
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 -8192.0 16384.0)
|
||||
)
|
||||
(let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-19 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-19 transform-index) 0)
|
||||
(set-vector! (-> v1-19 local-sphere) 0.0 0.0 16384.0 16384.0)
|
||||
)
|
||||
(let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-21 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-21 transform-index) 0)
|
||||
(set-vector! (-> v1-21 local-sphere) 0.0 0.0 40960.0 16384.0)
|
||||
)
|
||||
(let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-23 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-23 transform-index) 0)
|
||||
(set-vector! (-> v1-23 local-sphere) 24576.0 0.0 -32768.0 16384.0)
|
||||
)
|
||||
(let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-25 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-25 transform-index) 0)
|
||||
(set-vector! (-> v1-25 local-sphere) 24576.0 0.0 -8192.0 16384.0)
|
||||
)
|
||||
(let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-27 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-27 transform-index) 0)
|
||||
(set-vector! (-> v1-27 local-sphere) 24576.0 0.0 16384.0 16384.0)
|
||||
)
|
||||
(let ((v1-29 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-29 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-29 transform-index) 0)
|
||||
(set-vector! (-> v1-29 local-sphere) 24576.0 0.0 40960.0 16384.0)
|
||||
)
|
||||
(let ((v1-31 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-31 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-31 transform-index) 0)
|
||||
(set-vector! (-> v1-31 local-sphere) -24576.0 0.0 -32768.0 16384.0)
|
||||
)
|
||||
(let ((v1-33 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-33 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-33 transform-index) 0)
|
||||
(set-vector! (-> v1-33 local-sphere) -24576.0 0.0 -8192.0 16384.0)
|
||||
)
|
||||
(let ((v1-35 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-35 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-35 transform-index) 0)
|
||||
(set-vector! (-> v1-35 local-sphere) -24576.0 0.0 16384.0 16384.0)
|
||||
)
|
||||
(let ((v1-37 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-37 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-37 transform-index) 0)
|
||||
(set-vector! (-> v1-37 local-sphere) -24576.0 0.0 40960.0 16384.0)
|
||||
)
|
||||
(let ((v1-39 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-39 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-39 transform-index) 0)
|
||||
(set-vector! (-> v1-39 local-sphere) 16384.0 0.0 -57344.0 16384.0)
|
||||
)
|
||||
(let ((v1-41 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-41 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-41 transform-index) 0)
|
||||
(set-vector! (-> v1-41 local-sphere) -16384.0 0.0 -57344.0 16384.0)
|
||||
)
|
||||
(let ((v1-43 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-43 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-43 transform-index) 0)
|
||||
(set-vector! (-> v1-43 local-sphere) 0.0 8192.0 -61440.0 16384.0)
|
||||
)
|
||||
(let ((v1-45 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-45 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-45 transform-index) 0)
|
||||
(set-vector! (-> v1-45 local-sphere) -40960.0 0.0 -53248.0 16384.0)
|
||||
)
|
||||
(let ((v1-47 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-47 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-47 transform-index) 0)
|
||||
(set-vector! (-> v1-47 local-sphere) 40960.0 0.0 -53248.0 16384.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) 81920.0)
|
||||
(let ((v1-49 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-49 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-49 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-rbody-control! ((this barge))
|
||||
(with-pp
|
||||
(set! (-> pp level) (level-get *level* 'ctyport))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-barge" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-rbody-control! this *barge-constants*)
|
||||
(set! (-> this draw lod-set lod 0 dist) 1228800.0)
|
||||
(set! (-> this engine) (new-sound-id))
|
||||
(set! (-> this bow-wash) (new-sound-id))
|
||||
(set-vector! (-> this draw color-emissive) 0.3 0.3 0.0 0.0)
|
||||
(iterate-prims
|
||||
(-> this root)
|
||||
(lambda ((arg0 collide-shape-prim))
|
||||
(let ((v1-0 (-> arg0 prim-core prim-type)))
|
||||
(cond
|
||||
((= v1-0 -1)
|
||||
(set! (-> arg0 prim-core collide-with) (collide-spec
|
||||
backgnd
|
||||
bot
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
collectable
|
||||
pusher
|
||||
shield
|
||||
vehicle-sphere-no-probe
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere))
|
||||
)
|
||||
((= v1-0 1)
|
||||
(set! (-> arg0 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> arg0 prim-core collide-as) (collide-spec camera-blocker vehicle-mesh vehicle-mesh-probeable))
|
||||
)
|
||||
((zero? v1-0)
|
||||
(set! (-> arg0 prim-core collide-with)
|
||||
(collide-spec
|
||||
backgnd
|
||||
jak
|
||||
bot
|
||||
crate
|
||||
civilian
|
||||
enemy
|
||||
obstacle
|
||||
vehicle-sphere
|
||||
hit-by-player-list
|
||||
hit-by-others-list
|
||||
player-list
|
||||
collectable
|
||||
pusher
|
||||
shield
|
||||
vehicle-sphere-no-probe
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 prim-core collide-as)
|
||||
(collide-spec vehicle-sphere camera-blocker vehicle-mesh vehicle-mesh-probeable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs boat-manager.
|
||||
(defmethod relocate ((this boat-manager) (offset int))
|
||||
(dotimes (v1-0 4)
|
||||
(if (-> this paths v1-0)
|
||||
(&+! (-> this paths v1-0) offset)
|
||||
)
|
||||
)
|
||||
(the-as boat-manager ((method-of-type process relocate) this offset))
|
||||
)
|
||||
|
||||
(defstate idle (boat-manager)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (and (not (-> self boats-stop?)) (-> *setting-control* user-current stop-boats?))
|
||||
(kill-by-type barge *active-pool*)
|
||||
(boat-manager-method-16 self)
|
||||
(set! (-> self boats-stop?) #t)
|
||||
)
|
||||
(dotimes (gp-0 4)
|
||||
(let ((a0-2 (-> self paths gp-0)))
|
||||
(if a0-2
|
||||
(debug-draw a0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defmethod boat-manager-method-16 ((this boat-manager))
|
||||
(when (-> this mesh)
|
||||
(dotimes (s5-0 4)
|
||||
(when (-> this paths s5-0)
|
||||
(when #t
|
||||
(logior! (-> this paths s5-0 flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(let ((s4-0 (-> this paths s5-0))
|
||||
(f30-0 0.0)
|
||||
)
|
||||
1
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(vector-reset! (-> s3-0 fvec))
|
||||
(set! (-> s3-0 fvec y) 1.0)
|
||||
(the int (* 0.0000016276042 (total-distance s4-0)))
|
||||
(while (< f30-0 0.8)
|
||||
(displacement-between-points-at-percent-normalized! s4-0 (-> s3-0 uvec) f30-0)
|
||||
(get-point-at-percent-along-path! s4-0 (-> s3-0 rvec) f30-0 'interp)
|
||||
(vector-normalize! (-> s3-0 uvec) 1.0)
|
||||
(quaternion-look-at! (the-as quaternion (-> s3-0 trans)) (-> s3-0 uvec) (-> s3-0 fvec))
|
||||
(let ((s2-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> s2-0 object-type) (traffic-type guard-a))
|
||||
(set! (-> s2-0 behavior) (the-as uint 1))
|
||||
(set! (-> s2-0 id) (the-as uint 0))
|
||||
(set! (-> s2-0 nav-mesh) (-> this mesh))
|
||||
(set! (-> s2-0 nav-branch) #f)
|
||||
(set! (-> s2-0 proc) #f)
|
||||
(set! (-> s2-0 handle) (process->handle this))
|
||||
(set! (-> s2-0 user-data) (the-as uint s5-0))
|
||||
(set! (-> s2-0 flags) (traffic-spawn-flags tsf0))
|
||||
(set! (-> s2-0 guard-type) (the-as uint 11))
|
||||
(set! (-> s2-0 entity) #f)
|
||||
(set! (-> s2-0 velocity quad) (-> s3-0 uvec quad))
|
||||
(set! (-> s2-0 position quad) (-> s3-0 rvec quad))
|
||||
(quaternion-copy! (-> s2-0 rotation) (the-as quaternion (-> s3-0 trans)))
|
||||
(set! (-> s2-0 position w) f30-0)
|
||||
(when (vehicle-spawn-hack barge s2-0 this)
|
||||
)
|
||||
)
|
||||
(let ((f0-4 0.25))
|
||||
(if (and (!= s5-0 2) (not (-> *setting-control* user-current stop-boats?)))
|
||||
(set! f0-4 (rand-vu))
|
||||
)
|
||||
(+! f30-0 (/ (* 4096.0 (+ 150.0 (* 150.0 f0-4))) (total-distance s4-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this boat-manager) (arg0 entity-actor))
|
||||
(set! (-> this mesh) (nav-mesh-from-res-tag arg0 'nav-mesh-actor 0))
|
||||
(set! (-> this entity) arg0)
|
||||
(set! (-> this boats-stop?) (-> *setting-control* user-current stop-boats?))
|
||||
(when (-> this mesh)
|
||||
(dotimes (s5-1 4)
|
||||
(set! (-> this paths s5-1) (new 'process 'curve-control this 'path (the float s5-1)))
|
||||
)
|
||||
(boat-manager-method-16 this)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
@@ -7,3 +7,30 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype city-race-ring-info (structure)
|
||||
((pos vector :inline)
|
||||
(angle float :overlay-at (-> pos data 3))
|
||||
(boost float)
|
||||
(dist float)
|
||||
)
|
||||
(:methods
|
||||
(gen-static-macro (_type_ object) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype city-ambush-spot (structure)
|
||||
((pos vector :inline)
|
||||
(obj-type traffic-type)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype city-ambush-info (structure)
|
||||
((count int16)
|
||||
(array (inline-array city-ambush-spot))
|
||||
)
|
||||
(:methods
|
||||
(init (_type_ traffic-object-spawn-params) none)
|
||||
)
|
||||
)
|
||||
|
||||
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
@@ -7,3 +7,323 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun restore-city-speeches ()
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-generic-battle)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 3
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 15)
|
||||
:max-delay (seconds 25)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds109a"
|
||||
"grds111a"
|
||||
"grds112a"
|
||||
"grds113a"
|
||||
"grds114a"
|
||||
"grds115a"
|
||||
"grds116a"
|
||||
"grds121a"
|
||||
"grds124a"
|
||||
"grds133a"
|
||||
"grds144a"
|
||||
"grds126a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-battle-victory)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.5)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 5)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds127a"
|
||||
"grds129a"
|
||||
"grds128a"
|
||||
"grds151a"
|
||||
"grds152a"
|
||||
"grds153a"
|
||||
"grds157a"
|
||||
"grds155a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-change-targets)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next skip-first-time)
|
||||
:priority 4
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 20)
|
||||
:list (new 'static 'boxed-array :type string "grds141a" "grds146a" "grds142a" "grds143a" "grds147a" "grds120a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-go-hostile)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 5
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 20)
|
||||
:max-delay (seconds 40)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds144a"
|
||||
"grds122a"
|
||||
"grds104a"
|
||||
"grds145a"
|
||||
"grds126a"
|
||||
"grds130a"
|
||||
"grds164a"
|
||||
"grds163a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-hit)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.1)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds134a" "grds135a" "grds136a" "grds137a" "grds138a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-witness-death)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next skip-first-time)
|
||||
:priority 6
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds148a" "grds149a" "grds187a" "grds117a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 1
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds181a"
|
||||
"grds171a"
|
||||
"grds172a"
|
||||
"grds173a"
|
||||
"grds174a"
|
||||
"grds165a"
|
||||
"grds158a"
|
||||
"grds162a"
|
||||
"grds183a"
|
||||
"grds161a"
|
||||
"grds182a"
|
||||
"grds160a"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter-jak)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next)
|
||||
:priority 2
|
||||
:request-timeout (seconds 0.3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string "grds180a" "grds186a" "grds176a" "grds175a" "grds177a" "grds184a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-bumped-by-jak)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order linked-next skip-first-time)
|
||||
:priority 5
|
||||
:request-timeout (seconds 1)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 6)
|
||||
:list (new 'static 'boxed-array :type string "grds167a" "grds168a" "grds169a" "grds170a" "grds179a")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-generic-battle-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 3
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 15)
|
||||
:max-delay (seconds 25)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds109b"
|
||||
"grds111b"
|
||||
"grds112b"
|
||||
"grds113b"
|
||||
"grds114b"
|
||||
"grds115b"
|
||||
"grds116b"
|
||||
"grds121b"
|
||||
"grds124b"
|
||||
"grds133b"
|
||||
"grds144b"
|
||||
"grds126b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-battle-victory-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.5)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 5)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds127b"
|
||||
"grds129b"
|
||||
"grds128b"
|
||||
"grds151b"
|
||||
"grds152b"
|
||||
"grds153b"
|
||||
"grds157b"
|
||||
"grds155b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-change-targets-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order skip-first-time)
|
||||
:priority 4
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 20)
|
||||
:list (new 'static 'boxed-array :type string "grds141b" "grds146b" "grds142b" "grds143b" "grds147b" "grds120b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-go-hostile-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 5
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 1.5)
|
||||
:min-delay (seconds 20)
|
||||
:max-delay (seconds 40)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds144b"
|
||||
"grds122b"
|
||||
"grds104b"
|
||||
"grds145b"
|
||||
"grds126b"
|
||||
"grds130b"
|
||||
"grds164b"
|
||||
"grds163b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-hit-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 6
|
||||
:request-timeout (seconds 0.1)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds134b" "grds135b" "grds136b" "grds137b" "grds138b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-witness-death-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 6
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 2)
|
||||
:min-delay (seconds 10)
|
||||
:max-delay (seconds 15)
|
||||
:list (new 'static 'boxed-array :type string "grds148b" "grds149b" "grds187b" "grds117b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 1
|
||||
:delay-pre-time (seconds 1)
|
||||
:request-timeout (seconds 3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string
|
||||
"grds181b"
|
||||
"grds171b"
|
||||
"grds172b"
|
||||
"grds173b"
|
||||
"grds174b"
|
||||
"grds165b"
|
||||
"grds158b"
|
||||
"grds162b"
|
||||
"grds183b"
|
||||
"grds161b"
|
||||
"grds182b"
|
||||
"grds160b"
|
||||
)
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-chatter-jak-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 2
|
||||
:request-timeout (seconds 0.3)
|
||||
:min-delay (seconds 30)
|
||||
:max-delay (seconds 60)
|
||||
:list (new 'static 'boxed-array :type string "grds180b" "grds186b" "grds176b" "grds175b" "grds177b" "grds184b")
|
||||
)
|
||||
)
|
||||
(speech-table-set!
|
||||
*speech-control*
|
||||
(speech-type guard-bumped-by-jak-b)
|
||||
(new 'static 'speech-type-info
|
||||
:flags (speech-type-flag random-order)
|
||||
:priority 5
|
||||
:request-timeout (seconds 1)
|
||||
:min-delay (seconds 3)
|
||||
:max-delay (seconds 6)
|
||||
:list (new 'static 'boxed-array :type string "grds167b" "grds168b" "grds169b" "grds170b" "grds179b")
|
||||
)
|
||||
)
|
||||
(speech-control-method-17 *speech-control* (speech-type guard-chatter) 0.5)
|
||||
(speech-control-method-17 *speech-control* (speech-type guard-witness-death) 1.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,294 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun wait-for-speech-end ((arg0 sound-id))
|
||||
(while (nonzero? (get-status *gui-control* arg0))
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(deftype task-manager-city-vehicle-training-hover-zone-1 (task-manager)
|
||||
((speech-id sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-city-vehicle-training-hover-zone-1))
|
||||
(when (and (!= (-> this player-vehicle) #f) (not (and *target* (focus-test? *target* pilot))))
|
||||
(set! (-> this speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 30) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(send-event this 'fail)
|
||||
)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate active (task-manager-city-vehicle-training-hover-zone-1)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(if (and *target* (focus-test? *target* pilot))
|
||||
(goto cfg-7)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-7)
|
||||
(set! (-> self player-vehicle) (-> *target* pilot vehicle))
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 26) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-1 (current-time)))
|
||||
(until (time-elapsed? gp-1 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 27) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-3 (current-time)))
|
||||
(until (time-elapsed? gp-3 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 28) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(while (let ((v1-36 (handle->process (-> self player-vehicle))))
|
||||
(not (logtest? (vehicle-flag flight-level-transition) (-> (the-as vehicle v1-36) v-flags)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(while (or (not *target*) (focus-test? *target* dead teleporting))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 29) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(set! (-> self player-vehicle) (the-as handle #f))
|
||||
(let ((gp-6 (current-time)))
|
||||
(until (time-elapsed? gp-6 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
(let ((t9-14 (-> (find-parent-state) code)))
|
||||
(if t9-14
|
||||
((the-as (function none) t9-14))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate fail (task-manager-city-vehicle-training-hover-zone-1)
|
||||
:virtual #t
|
||||
:code (behavior ((arg0 resetter-params))
|
||||
(task-node-close! (game-task-node city-vehicle-training-hover-zone-1) 'event)
|
||||
(sleep-code)
|
||||
(let ((t9-3 (-> (find-parent-state) code)))
|
||||
(if t9-3
|
||||
((the-as (function none) t9-3))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate complete (task-manager-city-vehicle-training-hover-zone-1)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(task-node-close! (game-task-node city-vehicle-training-hover-zone-2) 'event)
|
||||
(let ((t9-2 (-> (find-parent-state) code)))
|
||||
(if t9-2
|
||||
((the-as (function none) t9-2))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype task-manager-city-vehicle-training-hover-zone-2 (task-manager)
|
||||
((speech-id sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod task-manager-method-26 ((this task-manager-city-vehicle-training-hover-zone-2))
|
||||
(if (not (and *target* (focus-test? *target* pilot)))
|
||||
(send-event this 'fail)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate active (task-manager-city-vehicle-training-hover-zone-2)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
(until #f
|
||||
(cond
|
||||
((and *target* (focus-test? *target* pilot))
|
||||
(let ((v1-8 (the-as vehicle (handle->process (-> *target* pilot vehicle)))))
|
||||
(if (logtest? (vehicle-flag flight-level-transition) (-> v1-8 v-flags))
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
)
|
||||
(if (time-elapsed? (-> self state-time) (seconds 60))
|
||||
(goto cfg-18)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-18)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 27) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-1 (current-time)))
|
||||
(until (time-elapsed? gp-1 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 28) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(until #f
|
||||
(let ((v1-35 (handle->process (-> *target* pilot vehicle))))
|
||||
(if (logtest? (vehicle-flag flight-level-transition) (-> (the-as vehicle v1-35) v-flags))
|
||||
(goto cfg-30)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-30)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(set! (-> self speech-id)
|
||||
(talker-spawn-func (-> *talker-speech* 29) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(wait-for-speech-end (-> self speech-id))
|
||||
(let ((gp-4 (current-time)))
|
||||
(until (time-elapsed? gp-4 (seconds 3))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(go-virtual complete)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype cty-hijack-intro (task-manager)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defstate active (cty-hijack-intro)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
((-> (method-of-object self wait) trans))
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 5))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until (< 327680.0
|
||||
(vector-vector-xz-distance (target-pos 0) (new 'static 'vector :x -285696.0 :y 36044.8 :z 5443625.0 :w 1.0))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(set-setting! 'airlock-command '(("hip-door-a-6" close)) 0.0 0)
|
||||
(talker-spawn-func (-> *talker-speech* 162) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(let ((gp-3 (current-time)))
|
||||
(until (time-elapsed? gp-3 (seconds 5))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until (handle-command-list *gui-control* (gui-channel voicebox) (the-as gui-connection #f))
|
||||
(suspend)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-25 ((this cty-hijack-intro))
|
||||
(nop!)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-force-load-borrows (task-manager)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defstate active (task-manager-force-load-borrows)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0)
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-22 symbol))
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'hour 8)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0)
|
||||
(when (> (-> (task-perm-by-index *game-info* 46) user-uint64) 0)
|
||||
(set-blackout-frames (seconds 100))
|
||||
(until (process-grab? *target* #f)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until v1-22
|
||||
(suspend)
|
||||
(set! v1-22 (and (= (status-of-level-and-borrows *level* 'ctypesb #f) 'active)
|
||||
(= (status-of-level-and-borrows *level* 'ctypesc #f) 'active)
|
||||
(= (status-of-level-and-borrows *level* 'ctypesa #f) 'active)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype task-manager-blackout (task-manager)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defstate active (task-manager-blackout)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(persist-with-delay *setting-control* 'task-manager-blackout (seconds 10) 'music 'portattk 0.0 0)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
'task-manager-blackout2
|
||||
(seconds 10)
|
||||
'city-sound
|
||||
(the-as symbol '(portatk1))
|
||||
0.0
|
||||
2
|
||||
)
|
||||
(set-blackout-frames (seconds 100))
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,196 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; og:preserve-this not-yet-implemented texture anim stuff
|
||||
; (define *security-texture-anim-array*
|
||||
; (the-as (texture-anim-array texture-anim)
|
||||
; (new 'static 'texture-anim-array :type texture-anim
|
||||
; (new 'static 'texture-anim
|
||||
; :num-layers #x2
|
||||
; :func #f
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :tex-name "security-env-dest"
|
||||
; :color (new 'static 'rgba :a #x80)
|
||||
; :frame-delta 300.0
|
||||
; :frame-mod 4800.0
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
; :data (new 'static 'array texture-anim-layer 2
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 4800.0
|
||||
; :tex-name "security-env-uscroll"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0 0.5))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 4.0 0.5))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 4800.0
|
||||
; :tex-name "security-env-uscroll"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0 3.0))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (new 'static 'texture-anim
|
||||
; :num-layers #x3
|
||||
; :func #f
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :tex-name "security-dot-dest"
|
||||
; :color (new 'static 'rgba :a #x80)
|
||||
; :frame-delta 300.0
|
||||
; :frame-mod 600.0
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
; :data (new 'static 'array texture-anim-layer 6
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 4800.0
|
||||
; :tex-name "common-white"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 600.0
|
||||
; :tex-name "security-dot-src"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.015625))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.0078125 0.015625))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 600.0
|
||||
; :tex-name "security-dot-src"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.140625))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0078125 0.140625))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
|
||||
(defun set-security-color! ((arg0 vector))
|
||||
; (let ((v1-1 (-> *security-texture-anim-array* array-data 0)))
|
||||
; (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad))
|
||||
; (set! (-> v1-1 data 0 end-color quad) (-> arg0 quad))
|
||||
; (set! (-> v1-1 data 1 start-color quad) (-> arg0 quad))
|
||||
; (set! (-> v1-1 data 1 end-color quad) (-> arg0 quad))
|
||||
; )
|
||||
; (let ((v1-5 (-> *security-texture-anim-array* array-data 1)))
|
||||
; (set! (-> v1-5 data 1 start-color quad) (-> arg0 quad))
|
||||
; (set! (-> v1-5 data 1 end-color quad) (-> arg0 quad))
|
||||
; (set! (-> v1-5 data 2 start-color quad) (-> arg0 quad))
|
||||
; (let ((v0-0 (-> v1-5 data 2 end-color)))
|
||||
; (set! (-> v0-0 quad) (-> arg0 quad))
|
||||
; v0-0
|
||||
; )
|
||||
; )
|
||||
(the vector #f)
|
||||
)
|
||||
|
||||
(defun set-security-flash! ((arg0 vector))
|
||||
; (let ((v1-1 (-> *security-texture-anim-array* array-data 1)))
|
||||
; (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad))
|
||||
; (let ((v0-0 (-> v1-1 data 0 end-color)))
|
||||
; (set! (-> v0-0 quad) (-> arg0 quad))
|
||||
; v0-0
|
||||
; )
|
||||
; )
|
||||
(the vector #f)
|
||||
)
|
||||
|
||||
(defun set-security-texture-masks! ((arg0 vector))
|
||||
; (local-vars (a3-3 uint128) (a3-4 uint128))
|
||||
; (let ((v1-3 (-> *security-texture-anim-array* array-data 0 data 0 tex))
|
||||
; (a1-3 (-> *security-texture-anim-array* array-data 1 data 1 tex))
|
||||
; )
|
||||
; (when (and v1-3 a1-3)
|
||||
; (dotimes (a2-1 3)
|
||||
; (let ((a3-2 (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16)))))
|
||||
; (t0-2 (-> v1-3 masks data a2-1 mask quad))
|
||||
; )
|
||||
; (.por a3-3 a3-2 t0-2)
|
||||
; )
|
||||
; (let ((t0-5 (-> a1-3 masks data a2-1 mask quad)))
|
||||
; (.por a3-4 a3-3 t0-5)
|
||||
; )
|
||||
; (set! (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16)))) a3-4)
|
||||
; )
|
||||
; #f
|
||||
; )
|
||||
; )
|
||||
#f
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,4 +6,3 @@
|
||||
;; dgos: CFB, CFA
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
;; dgos: CFB, CFA
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,268 @@
|
||||
;; name in dgo: billiards
|
||||
;; dgos: LCTYHIJK
|
||||
|
||||
;; +++billiard-ball-flag
|
||||
(defenum billiard-ball-flag
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(bb0 0)
|
||||
(bb1 1)
|
||||
)
|
||||
;; ---billiard-ball-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype billiard-ball (structure)
|
||||
((pos vector :inline)
|
||||
(prev-pos vector :inline)
|
||||
(size float)
|
||||
(flags billiard-ball-flag)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype billiard-ball-array (inline-array-class)
|
||||
((data billiard-ball :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> billiard-ball-array heap-base) (the-as uint 48))
|
||||
|
||||
(deftype billiard-table (basic)
|
||||
((billiards billiard-ball-array)
|
||||
(accum-force vector :inline)
|
||||
(drag float)
|
||||
(bounds vector 2 :inline)
|
||||
(min-xyz vector :inline :overlay-at (-> bounds 0))
|
||||
(max-xyz vector :inline :overlay-at (-> bounds 1))
|
||||
(bounce-wall-friction float)
|
||||
(ball-friction float)
|
||||
)
|
||||
(:methods
|
||||
(init! (_type_ int vector vector) none)
|
||||
(billiard-table-method-10 (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
(reset-accum-force (_type_) none)
|
||||
(billiard-table-method-13 (_type_) symbol)
|
||||
(billiard-table-method-14 (_type_) symbol)
|
||||
(billiard-table-method-15 (_type_ float) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod reset-accum-force ((this billiard-table))
|
||||
(set! (-> this accum-force quad) (the-as uint128 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init! ((this billiard-table) (arg0 int) (arg1 vector) (arg2 vector))
|
||||
(set! (-> this billiards) (new 'process 'billiard-ball-array arg0))
|
||||
(set! (-> this billiards length) arg0)
|
||||
(set! (-> this min-xyz quad) (-> arg1 quad))
|
||||
(set! (-> this max-xyz quad) (-> arg2 quad))
|
||||
(dotimes (v1-4 (-> this billiards length))
|
||||
(set! (-> this billiards data v1-4 size) 4096.0)
|
||||
)
|
||||
(billiard-table-method-13 this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod billiard-table-method-13 ((this billiard-table))
|
||||
(dotimes (s5-0 (-> this billiards length))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> this max-xyz) (-> this min-xyz)))
|
||||
(s3-0 s4-0)
|
||||
)
|
||||
(let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-3 (the-as number (logior #x3f800000 v1-2)))
|
||||
)
|
||||
(set! (-> s3-0 x) (* (+ -1.0 (the-as float v1-3)) (-> s2-1 x)))
|
||||
)
|
||||
(let* ((v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-7 (the-as number (logior #x3f800000 v1-6)))
|
||||
)
|
||||
(set! (-> s3-0 y) (* (+ -1.0 (the-as float v1-7)) (-> s2-1 y)))
|
||||
)
|
||||
(let* ((v1-10 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-11 (the-as number (logior #x3f800000 v1-10)))
|
||||
)
|
||||
(set! (-> s3-0 z) (* (+ -1.0 (the-as float v1-11)) (-> s2-1 z)))
|
||||
)
|
||||
(set! (-> s3-0 w) 1.0)
|
||||
)
|
||||
(vector+! (the-as vector (-> this billiards data s5-0)) (-> this min-xyz) s4-0)
|
||||
)
|
||||
)
|
||||
(billiard-table-method-14 this)
|
||||
(dotimes (v1-23 (-> this billiards length))
|
||||
(set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this billiards data 0 prev-pos)) (* 48 v1-23))))
|
||||
(-> this billiards data v1-23 pos quad)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod billiard-table-method-10 ((this billiard-table))
|
||||
(with-pp
|
||||
(dotimes (v1-0 (-> this billiards length))
|
||||
(set! (-> this billiards data v1-0 flags) (billiard-ball-flag))
|
||||
)
|
||||
(reset-accum-force this)
|
||||
(billiard-table-method-15
|
||||
this
|
||||
(* 0.0033333334 (the float (- (current-time) (-> pp clock old-frame-counter))))
|
||||
)
|
||||
(billiard-table-method-14 this)
|
||||
(debug-draw this)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod billiard-table-method-15 ((this billiard-table) (arg0 float))
|
||||
(let ((f0-1 (* arg0 arg0))
|
||||
(f1-1 (-> this drag))
|
||||
)
|
||||
(dotimes (v1-0 (-> this billiards length))
|
||||
(let ((a2-1 (-> this billiards data v1-0))
|
||||
(a1-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((a3-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a3-0 quad) (-> this accum-force quad))
|
||||
(vector-float*! a1-4 (-> a2-1 pos) (- 2.0 f1-1))
|
||||
(vector-! a1-4 a1-4 (vector-float*! (new 'stack-no-clear 'vector) (-> a2-1 prev-pos) (- 1.0 f1-1)))
|
||||
(vector+float*! a1-4 a1-4 a3-0 f0-1)
|
||||
)
|
||||
(set! (-> a2-1 prev-pos quad) (-> a2-1 pos quad))
|
||||
(set! (-> a2-1 pos quad) (-> a1-4 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod relocate ((this billiard-table) (offset int))
|
||||
(if (nonzero? (-> this billiards))
|
||||
(&+! (-> this billiards) offset)
|
||||
)
|
||||
(call-parent-method this offset)
|
||||
)
|
||||
|
||||
(defmethod billiard-table-method-14 ((this billiard-table))
|
||||
(dotimes (s5-0 (-> this billiards length))
|
||||
(let ((s4-0 (+ s5-0 1))
|
||||
(s3-0 (+ (-> this billiards length) -1))
|
||||
)
|
||||
(while (>= s3-0 s4-0)
|
||||
(let* ((s1-0 (-> this billiards data s5-0))
|
||||
(s2-0 (-> this billiards data s4-0))
|
||||
(s0-1 (vector-! (new 'stack-no-clear 'vector) (-> s2-0 pos) (-> s1-0 pos)))
|
||||
)
|
||||
0.0
|
||||
(let ((f0-2 (+ (-> s1-0 size) (-> s2-0 size)))
|
||||
(f1-1 (vector-length s0-1))
|
||||
)
|
||||
(when (< f1-1 f0-2)
|
||||
(let ((f28-0 (/ (-> s2-0 size) f0-2))
|
||||
(f30-0 (/ (-> s1-0 size) f0-2))
|
||||
)
|
||||
(logior! (-> s1-0 flags) (billiard-ball-flag bb1))
|
||||
(logior! (-> s2-0 flags) (billiard-ball-flag bb1))
|
||||
(vector-normalize! s0-1 (- f0-2 f1-1))
|
||||
(vector+float*! (-> s1-0 pos) (-> s1-0 pos) s0-1 (- f28-0))
|
||||
(vector+float*! (-> s2-0 pos) (-> s2-0 pos) s0-1 f30-0)
|
||||
)
|
||||
(let ((a0-9 (vector-! (new 'stack-no-clear 'vector) (-> s1-0 prev-pos) (-> s1-0 pos)))
|
||||
(v1-21 (vector-! (new 'stack-no-clear 'vector) (-> s2-0 prev-pos) (-> s2-0 pos)))
|
||||
)
|
||||
(vector+float*! (-> s1-0 prev-pos) (-> s1-0 pos) a0-9 (- 1.0 (-> this ball-friction)))
|
||||
(vector+float*! (-> s2-0 prev-pos) (-> s2-0 pos) v1-21 (- 1.0 (-> this ball-friction)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s4-0 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 1)
|
||||
(dotimes (s4-1 (-> this billiards length))
|
||||
(let ((s3-1 (-> this billiards data s4-1))
|
||||
(s1-1 #f)
|
||||
(f30-1 2.0)
|
||||
(s2-1 -1)
|
||||
)
|
||||
-1
|
||||
(add-debug-line #t (bucket-id debug) (-> s3-1 prev-pos) (-> s3-1 pos) *color-blue* #f *color-green*)
|
||||
(dotimes (v1-33 3)
|
||||
(when (!= v1-33 1)
|
||||
(let ((f0-10 (- (-> s3-1 prev-pos data v1-33) (-> s3-1 pos data v1-33))))
|
||||
0.0
|
||||
(dotimes (a0-20 2)
|
||||
(let ((f1-8 (/ (- (-> s3-1 prev-pos data v1-33)
|
||||
(-> (the-as billiard-table (+ (+ (* v1-33 4) (* a0-20 16)) (the-as int this))) min-xyz x)
|
||||
)
|
||||
f0-10
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (< f1-8 f30-1) (>= f1-8 0.0) (< f1-8 1.0))
|
||||
(set! s1-1 #t)
|
||||
(set! f30-1 f1-8)
|
||||
(set! s2-1 v1-33)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s1-1
|
||||
(let ((a0-24 (vector-! (new 'stack-no-clear 'vector) (-> s3-1 pos) (-> s3-1 prev-pos)))
|
||||
(v1-38 (new 'stack-no-clear 'vector))
|
||||
(s1-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(logior! (-> s3-1 flags) (billiard-ball-flag bb0))
|
||||
(vector+float*! v1-38 (-> s3-1 prev-pos) a0-24 f30-1)
|
||||
(set! (-> s1-2 quad) (-> a0-24 quad))
|
||||
(set! (-> s1-2 data s2-1) (* -1.0 (-> s1-2 data s2-1)))
|
||||
(vector+float*! (-> s3-1 pos) v1-38 s1-2 (- 1.0 f30-1))
|
||||
(let ((v1-39 (vector-normalize-copy! (new 'stack-no-clear 'vector) s1-2 1.0)))
|
||||
0.0
|
||||
(let* ((f0-18 (fabs (-> v1-39 data s2-1)))
|
||||
(f1-10 (* f0-18 f0-18))
|
||||
)
|
||||
(vector-float*! s1-2 s1-2 (* -1.0 (- 1.0 (* f1-10 (-> this bounce-wall-friction)))))
|
||||
)
|
||||
)
|
||||
(vector+! (-> s3-1 prev-pos) (-> s3-1 pos) s1-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-51 (-> this billiards length))
|
||||
(let ((a0-40 (-> this billiards data v1-51)))
|
||||
(dotimes (a1-30 3)
|
||||
(set! (-> a0-40 pos data a1-30)
|
||||
(fmax (fmin (-> a0-40 pos data a1-30) (-> this max-xyz data a1-30)) (-> this min-xyz data a1-30))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw ((this billiard-table))
|
||||
(dotimes (s5-0 (-> this billiards length))
|
||||
(let ((v1-3 (-> this billiards data s5-0)))
|
||||
(add-debug-sphere #t (bucket-id debug) (-> v1-3 pos) (-> v1-3 size) *color-red*)
|
||||
)
|
||||
)
|
||||
(add-debug-box #t (bucket-id debug) (-> this min-xyz) (-> this max-xyz) *color-red*)
|
||||
(none)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,117 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defskelgroup skel-guide-arrow ctywide-arrow ctywide-arrow-lod0-jg ctywide-arrow-idle-ja
|
||||
((ctywide-arrow-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
)
|
||||
|
||||
(deftype guide-arrow (process-drawable)
|
||||
((bob-dir vector :inline)
|
||||
(base-pos vector :inline)
|
||||
(pad uint8 8)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(guide-arrow-method-22 (_type_) vector)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype guide-arrow-init-params (structure)
|
||||
((pos vector :inline)
|
||||
(facing vector :inline)
|
||||
(twist float)
|
||||
(xz? symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior guide-arrow-init-by-other guide-arrow ((arg0 guide-arrow-init-params))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-guide-arrow" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 pos quad))
|
||||
(cond
|
||||
((-> arg0 xz?)
|
||||
(let ((a1-5 (matrix-u-r-compose
|
||||
(new 'stack-no-clear 'matrix)
|
||||
(vector-float*! (new 'stack-no-clear 'vector) (-> arg0 facing) -1.0)
|
||||
*up-vector*
|
||||
)
|
||||
)
|
||||
)
|
||||
(matrix->quaternion (-> self root quat) a1-5)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(quaternion-identity! (-> self root quat))
|
||||
)
|
||||
)
|
||||
(quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> arg0 twist))
|
||||
(logclear! (-> self mask) (process-mask actor-pause movie))
|
||||
(process-entity-status! self (entity-perm-status no-kill) #t)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
(defmethod guide-arrow-method-22 ((this guide-arrow))
|
||||
(set-vector! (-> this root scale) 1.5 1.5 1.5 1.0)
|
||||
(set-vector! (-> this draw color-mult) 1.0 0.0 0.0 1.0)
|
||||
(logior! (-> this draw status) (draw-control-status force-fade))
|
||||
(let ((f0-8 (vector-vector-distance (-> this root trans) (math-camera-pos))))
|
||||
0.0
|
||||
(let* ((f1-2 (* 0.0000027126737 f0-8))
|
||||
(f1-4 (fmax 0.0 (fmin 1.0 f1-2)))
|
||||
(f0-11 (- 1.0 (* (- 1.0 f1-4) (- 1.0 f1-4))))
|
||||
)
|
||||
(set! (-> this draw force-fade) (the-as uint (the int (lerp 0.0 96.0 f0-11))))
|
||||
)
|
||||
)
|
||||
(let* ((f0-14 1.5)
|
||||
(f1-8 (* 0.0033333334 (the float (- (current-time) (-> this state-time)))))
|
||||
(f30-0 (/ (- f1-8 (* (the float (the int (/ f1-8 f0-14))) f0-14)) f0-14))
|
||||
)
|
||||
0.0
|
||||
(let ((s5-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))
|
||||
(f0-19 (* 4096.0 (cos (* 65536.0 f30-0))))
|
||||
)
|
||||
(vector+float*! (-> this root trans) (-> this base-pos) s5-1 f0-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (guide-arrow)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self base-pos quad) (-> self root trans quad))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(guide-arrow-method-22 self)
|
||||
)
|
||||
:code sleep-code
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate die (guide-arrow)
|
||||
:virtual #t
|
||||
:code nothing
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer guide-arrow).
|
||||
(defun spawn-guide-arrow ((arg0 guide-arrow-init-params) (arg1 process))
|
||||
(process-spawn guide-arrow arg0 :name "guide-arrow" :to arg1)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,921 @@
|
||||
;; name in dgo: kg-vehicles
|
||||
;; dgos: LCTYHIJK
|
||||
|
||||
(declare-type dark-barrel process-focusable)
|
||||
(define-extern *hijack-suck-curve* curve2d-piecewise)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defskelgroup skel-h-kg-pickup kg-pickup kg-pickup-lod0-jg kg-pickup-idle-ja
|
||||
((kg-pickup-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 5.2)
|
||||
:shadow kg-pickup-shadow-mg
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(when (or (zero? *hijack-suck-curve*) (!= loading-level global))
|
||||
(set! *hijack-suck-curve* (new 'loading-level 'curve2d-piecewise))
|
||||
(curve2d-piecewise-method-10 *hijack-suck-curve* 4 'loading-level (the-as int #t))
|
||||
)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 0 first) 0.0)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 0 second) 0.85)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 1 first) 3.0)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 1 second) 0.85)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 2 first) 10.0)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 2 second) 0.7)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 3 first) 15.0)
|
||||
|
||||
(set! (-> *hijack-suck-curve* pts data 3 second) 0.6)
|
||||
|
||||
(defun compute-suck-speed-scalar ()
|
||||
(let ((f30-0 1.0))
|
||||
(when (not (task-node-closed? (game-task-node city-hijack-vehicle-escape)))
|
||||
(let* ((f1-0 (the float (-> *game-info* sub-task-list (game-task-node city-hijack-vehicle-escape) death-count)))
|
||||
(f0-2 (fmax 0.0 (fmin 15.0 f1-0)))
|
||||
)
|
||||
(set! f30-0 (curve2d-method-9 *hijack-suck-curve* f0-2 2))
|
||||
)
|
||||
)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
|
||||
(define *h-kg-pickup-constants*
|
||||
(new 'static 'rigid-body-vehicle-constants
|
||||
:info (new 'static 'rigid-body-info
|
||||
:mass 8.0
|
||||
:inv-mass 0.125
|
||||
:linear-damping 0.995
|
||||
:angular-damping 0.995
|
||||
:bounce-factor 0.4
|
||||
:friction-factor 0.05
|
||||
:bounce-mult-factor 1.22
|
||||
:cm-offset-joint (new 'static 'vector :w 1.0)
|
||||
:inertial-tensor-box (new 'static 'array meters 3 (meters 8) (meters 3) (meters 14))
|
||||
)
|
||||
:extra (new 'static 'rigid-body-object-extra-info
|
||||
:max-time-step 0.033333335
|
||||
:gravity (meters 40)
|
||||
:idle-distance (meters 50)
|
||||
:attack-force-scale 1.0
|
||||
)
|
||||
:name '*h-kg-pickup-constants*
|
||||
:flags #x468
|
||||
:object-type (traffic-type kg-pickup)
|
||||
:guard-type #xb
|
||||
:vehicle-type (vehicle-type-u8 vt27)
|
||||
:transmission (new 'static 'vehicle-transmission-info :gear-count 1)
|
||||
:handling (new 'static 'vehicle-handling-info
|
||||
:max-engine-thrust (meters 59)
|
||||
:inv-max-engine-thrust 0.0000041379767
|
||||
:engine-response-rate 20.0
|
||||
:engine-intake-factor 1.0
|
||||
:brake-factor 2.25
|
||||
:turbo-boost-factor 1.0
|
||||
:turbo-boost-duration (seconds 1)
|
||||
:max-xz-speed (meters 60)
|
||||
:player-turn-anim-min -1.0
|
||||
:player-turn-anim-max 1.0
|
||||
:pilot-x-accel-factor 1.0
|
||||
:pilot-y-accel-factor 1.0
|
||||
:pilot-z-accel-factor 1.0
|
||||
:ground-probe-distance (meters 4.5)
|
||||
:cos-ground-effect-angle 0.42261827
|
||||
:spring-lift-factor 0.4
|
||||
:air-drag-factor 1.0
|
||||
:steering-thruster-factor 2.0
|
||||
:steering-thruster-max-gain 2.5
|
||||
:steering-thruster-half-gain-speed (meters 1200)
|
||||
:tire-steering-speed-factor 61440.0
|
||||
:tire-friction-factor 0.6
|
||||
:tire-static-friction 0.55
|
||||
:tire-dynamic-friction 0.4
|
||||
:tire-dynamic-friction-speed (meters 2)
|
||||
:tire-inv-max-friction-speed 0.000024414063
|
||||
:airfoil-factor 1.0
|
||||
:drag-force-factor 1.0
|
||||
:speed-scrubbing-drag 10.0
|
||||
:speed-limiting-drag 0.7
|
||||
:pitch-control-factor 0.5
|
||||
:roll-control-factor 1.0
|
||||
:jump-thrust-factor 0.5
|
||||
:buoyancy-factor 1.0
|
||||
:water-drag-factor 1.0
|
||||
:player-weight 163840.0
|
||||
:player-shift-x (meters 0.6)
|
||||
:player-shift-z (meters 1)
|
||||
:air-angular-damping 1.0
|
||||
:ground-torque-scale 1.0
|
||||
:ai-steering-factor 1.0
|
||||
:ai-throttle-factor 1.0
|
||||
)
|
||||
:target-speed-offset (meters 3)
|
||||
:turning-accel (meters 20)
|
||||
:camera (new 'static 'vehicle-camera-info
|
||||
:string-min-height (meters 4.5)
|
||||
:string-max-height (meters 4.5)
|
||||
:string-min-length (meters 5)
|
||||
:string-max-length (meters 12.5)
|
||||
:min-fov 15109.688
|
||||
:max-fov 17476.268
|
||||
:head-offset 8192.0
|
||||
:foot-offset 4096.0
|
||||
:normal-max-angle-offset 182.04445
|
||||
:air-max-angle-offset 5461.3335
|
||||
:max-lookaround-speed 40960.0
|
||||
:look-pos-array (new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :y 8192.0 :z -10240.0 :w 1.0)
|
||||
(new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0)
|
||||
(new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:sound (new 'static 'vehicle-sound-info
|
||||
:engine-pitch-scale 0.09
|
||||
:engine-pitch-mod-amp 0.01
|
||||
:engine-sound-select 5
|
||||
:thrust-sound (static-sound-name "bike-thrust")
|
||||
:scrape-sound (static-sound-name "car-scrape-stn")
|
||||
:glance-sound (static-sound-name "car-glance-stn")
|
||||
:impact-sound (static-sound-name "car-impact-stn")
|
||||
:explode-sound (static-sound-name "vehicle-explode")
|
||||
:explode2-sound (static-sound-name "vehicle-explo-b")
|
||||
:extra-sound (static-sound-name "car-by-5")
|
||||
:bank-replace '()
|
||||
:idle-pitch-scale 1.0
|
||||
:idle-crossover-rpm 1000.0
|
||||
:engine-crossover-rpm 4000.0
|
||||
:start-sound (static-sound-name "vehicl-ignition")
|
||||
:susp-speed-threshold 40960.0
|
||||
:tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
:tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
(new 'static 'vehicle-sound-loop-info
|
||||
:speed 409600.0
|
||||
:max-speed 409600.0
|
||||
:pitch-scale 1.0
|
||||
:min-pitch -10.0
|
||||
:max-pitch 10.0
|
||||
)
|
||||
)
|
||||
)
|
||||
:particles (new 'static 'vehicle-particle-info
|
||||
:headlight-count 2
|
||||
:taillight-count 2
|
||||
:thruster-flame-width (meters 0.6)
|
||||
:thruster-flame-length (meters 2)
|
||||
:thruster-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3072.0 :z -14336.0 :w 1.0)
|
||||
(new 'static 'vector :x -3072.0 :z -14336.0 :w 1.0)
|
||||
)
|
||||
:exhaust-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 6963.2 :y -1024.0 :z -7372.8 :w 1.0)
|
||||
(new 'static 'vector :x -6963.2 :y -1024.0 :z -7372.8 :w 1.0)
|
||||
)
|
||||
:exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0))
|
||||
:smoke-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3072.0 :z -13926.4 :w 1.0)
|
||||
(new 'static 'vector :x -3072.0 :z -13926.4 :w 1.0)
|
||||
)
|
||||
:smoke-local-vel (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 12288.0 :w 1.0)
|
||||
(new 'static 'vector :x -12288.0 :w 1.0)
|
||||
)
|
||||
:headlight-local-pos (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :x 4915.2 :z 15564.8 :w 1.0)
|
||||
(new 'static 'vector :x -4915.2 :z 15564.8 :w 1.0)
|
||||
(new 'static 'vector)
|
||||
)
|
||||
:taillight-local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3276.8 :y 3276.8 :z -14131.2 :w 1.0)
|
||||
(new 'static 'vector :x -3276.8 :y 3276.8 :z -14131.2 :w 1.0)
|
||||
)
|
||||
)
|
||||
:damage (new 'static 'vehicle-damage-info
|
||||
:inv-toughness-factor 1.0
|
||||
:hit-points 24.0
|
||||
:inv-hit-points 0.041666668
|
||||
:hit-small 102400.0
|
||||
:hit-big 131072.0
|
||||
:hit-deadly 286720.0
|
||||
:impact-damage-factor 1.0
|
||||
:section-count 4
|
||||
:section-array (new 'static 'inline-array vehicle-section-info 4
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x20 #x2 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x40 #x4 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x80 #x8 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
(new 'static 'vehicle-section-info
|
||||
:damage-seg-array (new 'static 'array uint64 3 #x100 #x10 #x0)
|
||||
:damage-seg-count 2
|
||||
)
|
||||
)
|
||||
)
|
||||
:physics-model (new 'static 'vehicle-physics-model-info
|
||||
:lift-thruster-count 2
|
||||
:roll-thruster-count 2
|
||||
:stabilizer-count 4
|
||||
:inv-lift-thruster-count 0.5
|
||||
:lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z 8192.0 :w 1.0)
|
||||
:rot (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :y 819.2 :z -8192.0 :w 1.0)
|
||||
:rot (new 'static 'vector :y -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
)
|
||||
:roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :x 6963.2 :y 819.2 :w 1.0)
|
||||
:rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :x -6963.2 :y 819.2 :w 1.0)
|
||||
:rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0)
|
||||
)
|
||||
)
|
||||
:stabilizer-array (new 'static 'inline-array vehicle-attach-point 6
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z 8192.0 :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:rot (new 'static 'vector :x 1.0 :w 2.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point
|
||||
:local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:rot (new 'static 'vector :y 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
(new 'static 'vehicle-attach-point)
|
||||
)
|
||||
:engine-thrust-local-pos (new 'static 'vector :z -5734.4 :w 1.0)
|
||||
:brake-local-pos (new 'static 'vector :z -8192.0 :w 1.0)
|
||||
:wheel-count 4
|
||||
:drive-wheel-count 2
|
||||
:front-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
:rear-wheel (new 'static 'vehicle-wheel-info
|
||||
:local-pos (new 'static 'vector :w 1.0)
|
||||
:inertia 1.0
|
||||
:radius 4096.0
|
||||
:scale 1.0
|
||||
:travel 2048.0
|
||||
:width 4096.0
|
||||
:suspension-spring 0.5
|
||||
:suspension-damping 0.5
|
||||
:forward-grip 1.0
|
||||
:side-grip 1.0
|
||||
:max-brake-torque 1.0
|
||||
:settle-pos 0.8
|
||||
:probe-radius 409.6
|
||||
:tread-texture "common-white"
|
||||
)
|
||||
)
|
||||
:setup (new 'static 'vehicle-setup-info
|
||||
:settle-height 6144.0
|
||||
:shadow-bot-clip -40960.0
|
||||
:shadow-locus-dist 409600.0
|
||||
:color-option-count 3
|
||||
:color (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.7 :z 1.0 :w 1.0)
|
||||
(new 'static 'vector :x 1.0 :y 0.7 :z 0.7 :w 1.0)
|
||||
)
|
||||
:gun-yaw-min -65536.0
|
||||
:gun-yaw-max 65536.0
|
||||
:gun-pitch-min -16384.0
|
||||
:gun-pitch-max 16384.0
|
||||
)
|
||||
:rider (new 'static 'vehicle-rider-info
|
||||
:seat-count 2
|
||||
:grab-rail-count 6
|
||||
:grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 4505.6 :y -2662.4 :z 15360.0 :w 1.0)
|
||||
(new 'static 'vector :x -4505.6 :y -2662.4 :z 15360.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :z 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 7372.8 :y -819.2 :z -4096.0 :w 1.0)
|
||||
(new 'static 'vector :x 7372.8 :y -819.2 :z 4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -7372.8 :y -819.2 :z 4096.0 :w 1.0)
|
||||
(new 'static 'vector :x -7372.8 :y -819.2 :z -4096.0 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -3686.4 :y -409.6 :z -14950.4 :w 1.0)
|
||||
(new 'static 'vector :x 3686.4 :y -409.6 :z -14950.4 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :z -1.0 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 3837.952 :y -409.6 :z -14950.4 :w 1.0)
|
||||
(new 'static 'vector :x 6041.6 :y -614.4 :z -9011.2 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x 0.707 :z -0.707 :w 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-grab-rail-info
|
||||
:local-pos (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x -6041.6 :y -614.4 :z -9011.2 :w 1.0)
|
||||
(new 'static 'vector :x -3837.952 :y -409.6 :z -14950.4 :w 1.0)
|
||||
)
|
||||
:normal (new 'static 'vector :x -0.707 :z -0.707 :w 1.0)
|
||||
)
|
||||
)
|
||||
:seat-array (new 'static 'inline-array vehicle-seat-info 4
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :y 819.2 :z 8503.296 :w (the-as float #x10000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info
|
||||
:position (new 'static 'vector :x 409.6 :y 819.2 :z -10563.584 :w (the-as float #x40000))
|
||||
)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
(new 'static 'vehicle-seat-info)
|
||||
)
|
||||
:rider-hand-offset (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x 2252.8 :y 1638.4 :z 11264.0 :w 1.0)
|
||||
(new 'static 'vector :x -2252.8 :y 1638.4 :z 11264.0 :w 1.0)
|
||||
)
|
||||
:attach-point-array #f
|
||||
)
|
||||
:explosion #f
|
||||
:explosion-part #xdb
|
||||
:debris #f
|
||||
)
|
||||
)
|
||||
|
||||
(deftype pickup-sled-sim (billiard-table)
|
||||
((mat matrix :inline)
|
||||
(external-force vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod debug-draw ((this pickup-sled-sim))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod reset-accum-force ((this pickup-sled-sim))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> this mat uvec quad))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> this mat fvec quad))
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-0 quad) (-> this mat rvec quad))
|
||||
(let ((s2-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(set! (-> s3-0 y) 0.0)
|
||||
(vector-normalize! s4-0 1.0)
|
||||
(vector-normalize! s3-0 1.0)
|
||||
(matrix-fr-compose s2-0 s4-0 s3-0)
|
||||
(matrix-transpose! s2-0 s2-0)
|
||||
(set! (-> s5-0 w) 0.0)
|
||||
(vector-matrix*! s5-0 s5-0 s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-float*! (-> this accum-force) s5-0 81920.0)
|
||||
)
|
||||
(let ((a2-2 (matrix-transpose! (new 'stack-no-clear 'matrix) (-> this mat)))
|
||||
(s5-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-matrix*! s5-1 (-> this external-force) a2-2)
|
||||
(vector+float*! (-> this accum-force) (-> this accum-force) s5-1 0.3)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype h-kg-pickup (h-car-base)
|
||||
((fin-fr joint-mod-rotate-local :inline)
|
||||
(fin-fl joint-mod-rotate-local :inline)
|
||||
(fin-r joint-mod-rotate-local :inline)
|
||||
(fin-l joint-mod-rotate-local :inline)
|
||||
(rudder-l joint-mod-rotate-local :inline)
|
||||
(rudder-r joint-mod-rotate-local :inline)
|
||||
(turn-rate float)
|
||||
(target-turn-rate float)
|
||||
(camera-override? symbol)
|
||||
(initial-creation-time time-frame)
|
||||
(auto-boost? symbol)
|
||||
(steering-val float)
|
||||
(sled pickup-sled-sim)
|
||||
(barrels handle-array)
|
||||
(taskman handle)
|
||||
(last-jitter-time time-frame)
|
||||
(last-slide-time time-frame)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch symbol vs object.
|
||||
(defmethod rigid-body-object-method-30 ((this h-kg-pickup))
|
||||
(let ((t9-0 (method-of-type hvehicle rigid-body-object-method-30)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this draw lod-set lod 0 dist) 1228800.0)
|
||||
(dotimes (s5-0 (-> this sled billiards length))
|
||||
(let ((f30-0 (vector-vector-xz-distance
|
||||
(the-as vector (-> this sled billiards data s5-0))
|
||||
(the-as vector (+ (the-as uint (-> this sled billiards data 0 prev-pos)) (* 48 s5-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (< 204.8 f30-0) (time-elapsed? (-> this last-slide-time) (seconds 0.25)))
|
||||
(set-time! (-> this last-slide-time))
|
||||
(sound-play "hj-cans-slide")
|
||||
)
|
||||
(when (logtest? (-> this sled billiards data s5-0 flags) (billiard-ball-flag bb0 bb1))
|
||||
(let* ((f1-0 (* 0.0022194602 f30-0))
|
||||
(f30-1 (fmax 0.0 (fmin 1.0 f1-0)))
|
||||
)
|
||||
(set-time! (-> this last-jitter-time))
|
||||
(sound-play-by-name
|
||||
(static-sound-name "hj-cans-bump")
|
||||
(new-sound-id)
|
||||
(the int (* 1024.0 f30-1))
|
||||
0
|
||||
0
|
||||
(sound-group)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this sled drag) 0.05)
|
||||
(set! (-> this sled bounce-wall-friction) 0.3)
|
||||
(set! (-> this sled ball-friction) 0.05)
|
||||
(let* ((v1-45 (-> this sled mat))
|
||||
(a3-2 (-> this rbody matrix))
|
||||
(a0-13 (-> a3-2 rvec quad))
|
||||
(a1-5 (-> a3-2 uvec quad))
|
||||
(a2-2 (-> a3-2 fvec quad))
|
||||
(a3-3 (-> a3-2 trans quad))
|
||||
)
|
||||
(set! (-> v1-45 rvec quad) a0-13)
|
||||
(set! (-> v1-45 uvec quad) a1-5)
|
||||
(set! (-> v1-45 fvec quad) a2-2)
|
||||
(set! (-> v1-45 trans quad) a3-3)
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(get-linear-accel! this s5-1)
|
||||
(let ((f0-10 (vector-normalize-ret-len! s5-1 1.0)))
|
||||
(vector-float*! (-> this sled external-force) s5-1 (* -1.0 f0-10))
|
||||
(if (< 40960.0 f0-10)
|
||||
(vector-z-quaternion! s5-1 (-> this root quat))
|
||||
)
|
||||
)
|
||||
)
|
||||
(billiard-table-method-10 (-> this sled))
|
||||
(dotimes (s5-2 (-> this barrels length))
|
||||
(let* ((s3-2 (handle->process (-> this barrels data0 s5-2)))
|
||||
(s4-2 (if (type? s3-2 process-focusable)
|
||||
(the-as dark-barrel s3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(quaternion-copy! (-> s4-2 root quat) (-> this root quat))
|
||||
(-> this sled billiards data s5-2)
|
||||
(let ((s3-3 (new 'stack-no-clear 'vector)))
|
||||
(vector-matrix*! s3-3 (the-as vector (-> this sled billiards data s5-2)) (-> this sled mat))
|
||||
(set! (-> s4-2 root trans quad) (-> s3-3 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defskelgroup skel-dark-barrel eco-canister eco-canister-dark-lod0-jg eco-canister-dark-idle-ja
|
||||
((eco-canister-dark-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 0.3)
|
||||
)
|
||||
|
||||
(deftype dark-barrel (process-focusable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior dark-barrel-init-by-other dark-barrel ()
|
||||
(set! (-> self level) (level-get *level* 'ctywide))
|
||||
(let ((gp-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player))))
|
||||
(set! (-> gp-0 penetrate-using) (penetrate))
|
||||
(let ((v1-4 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0))))
|
||||
(set! (-> v1-4 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-4 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 2048.0)
|
||||
(set! (-> gp-0 total-prims) (the-as uint 1))
|
||||
(set! (-> gp-0 root-prim) v1-4)
|
||||
)
|
||||
(set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w)))
|
||||
(let ((v1-7 (-> gp-0 root-prim)))
|
||||
(set! (-> gp-0 backup-collide-as) (-> v1-7 prim-core collide-as))
|
||||
(set! (-> gp-0 backup-collide-with) (-> v1-7 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) gp-0)
|
||||
)
|
||||
(set-vector! (-> self root scale) 2.0 2.0 2.0 1.0)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-dark-barrel" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logior! (-> self focus-status) (focus-status pilot-riding))
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
(defstate idle (dark-barrel)
|
||||
:virtual #t
|
||||
:code transform-and-sleep-code
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defmethod relocate ((this h-kg-pickup) (offset int))
|
||||
(if (nonzero? (-> this sled))
|
||||
(&+! (-> this sled) offset)
|
||||
)
|
||||
(if (nonzero? (-> this barrels))
|
||||
(&+! (-> this barrels) offset)
|
||||
)
|
||||
(call-parent-method this offset)
|
||||
)
|
||||
|
||||
(defmethod init-rbody-control! ((this h-kg-pickup))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-h-kg-pickup" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(alloc-rbody-control! this *h-kg-pickup-constants*)
|
||||
(set! (-> this taskman) (the-as handle #f))
|
||||
(init (-> this fin-fl) this (the-as uint 4) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-fr) this (the-as uint 5) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-l) this (the-as uint 7) (joint-mod-base-flags attached))
|
||||
(init (-> this fin-r) this (the-as uint 6) (joint-mod-base-flags attached))
|
||||
(init (-> this rudder-l) this (the-as uint 9) (joint-mod-base-flags attached))
|
||||
(init (-> this rudder-r) this (the-as uint 8) (joint-mod-base-flags attached))
|
||||
(set! (-> this target-turn-rate) 0.0)
|
||||
(set! (-> this turn-rate) 0.0)
|
||||
(set! (-> this camera-override?) #f)
|
||||
(vector-float*!
|
||||
(-> this rbody lin-momentum)
|
||||
(vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))
|
||||
1843200.0
|
||||
)
|
||||
(set-time! (-> this initial-creation-time))
|
||||
(set! (-> this auto-boost?) #f)
|
||||
(set! (-> this sled) (new 'process 'pickup-sled-sim))
|
||||
(init!
|
||||
(-> this sled)
|
||||
5
|
||||
(new 'static 'vector :x -4096.0 :z -10240.0 :w 1.0)
|
||||
(new 'static 'vector :x 4096.0 :z 2048.0 :w 1.0)
|
||||
)
|
||||
(set! (-> this barrels) (the-as handle-array (new 'process 'boxed-array handle 5)))
|
||||
(dotimes (s5-3 5)
|
||||
(set! (-> this barrels data0 s5-3)
|
||||
(ppointer->handle (process-spawn dark-barrel :name "dark-barrel" :to this))
|
||||
)
|
||||
)
|
||||
(set! (-> this barrels length) (-> this barrels allocated-length))
|
||||
(dotimes (v1-35 5)
|
||||
(set! (-> this sled billiards data v1-35 size) 1638.4)
|
||||
)
|
||||
(billiard-table-method-13 (-> this sled))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-collision! ((this h-kg-pickup))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate vehicle))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 8))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 18432.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
|
||||
(set! (-> v1-11 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-11 transform-index) 0)
|
||||
(set-vector! (-> v1-11 local-sphere) 3686.4 0.0 12288.0 4096.0)
|
||||
)
|
||||
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4))))
|
||||
(set! (-> v1-13 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-13 transform-index) 0)
|
||||
(set-vector! (-> v1-13 local-sphere) -3686.4 0.0 12288.0 4096.0)
|
||||
)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5))))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid nav-sphere))
|
||||
(set! (-> v1-15 transform-index) 0)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 819.2 5734.4 4915.2)
|
||||
(set! (-> v1-15 nav-radius) 14336.0)
|
||||
)
|
||||
(let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 144))))
|
||||
(set! (-> v1-17 prim-core action) (collide-action solid nav-sphere))
|
||||
(set! (-> v1-17 transform-index) 0)
|
||||
(set-vector! (-> v1-17 local-sphere) 0.0 2048.0 -4096.0 5734.4)
|
||||
(set! (-> v1-17 nav-radius) 14336.0)
|
||||
)
|
||||
(let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2))))
|
||||
(set! (-> v1-19 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-19 transform-index) 0)
|
||||
(set-vector! (-> v1-19 local-sphere) 4915.2 0.0 -11468.8 4096.0)
|
||||
)
|
||||
(let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
|
||||
(set! (-> v1-21 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-21 transform-index) 0)
|
||||
(set-vector! (-> v1-21 local-sphere) -4915.2 0.0 -11468.8 4096.0)
|
||||
)
|
||||
(let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-23 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-23 transform-index) 3)
|
||||
(set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 18432.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) 20480.0)
|
||||
(let ((v1-25 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with))
|
||||
)
|
||||
(set! (-> s5-0 nav-flags) (nav-flags has-child-spheres))
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch quaternion vs none.
|
||||
(defmethod vehicle-method-79 ((this h-kg-pickup))
|
||||
(let ((f30-0 (* 3640.889 (-> this controls steering))))
|
||||
(* 9102.223 (-> this controls steering))
|
||||
(let* ((f0-4 (* -3640.889 (-> this controls lean-z)))
|
||||
(s5-0 (new 'static 'vector :x 1.0 :w 1.0))
|
||||
(f28-0 (* -1.0 f0-4))
|
||||
)
|
||||
(quaternion-vector-angle! (-> this fin-fl rotation) s5-0 f28-0)
|
||||
(quaternion-vector-angle! (-> this fin-fr rotation) s5-0 f28-0)
|
||||
(quaternion-vector-angle! (-> this fin-r rotation) s5-0 f28-0)
|
||||
(quaternion-vector-angle! (-> this fin-l rotation) s5-0 f28-0)
|
||||
)
|
||||
(quaternion-vector-angle! (-> this rudder-l rotation) *up-vector* (- f30-0))
|
||||
(quaternion-vector-angle! (-> this rudder-r rotation) *up-vector* (- f30-0))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun spawn-pickup ()
|
||||
(let ((gp-0 (new 'stack 'traffic-object-spawn-params)))
|
||||
(set! (-> gp-0 proc) #f)
|
||||
(set! (-> gp-0 position quad) (-> (target-pos 0) quad))
|
||||
(quaternion-identity! (-> gp-0 rotation))
|
||||
(set! (-> gp-0 velocity quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 behavior) (the-as uint 0))
|
||||
(process-spawn h-kg-pickup :init vehicle-init-by-other 11 gp-0 :name "torpedo")
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
;; WARN: Function (method 31 h-kg-pickup) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod apply-gravity! ((this h-kg-pickup) (arg0 float))
|
||||
(when (and (-> this next-state) (= (-> this next-state name) 'waiting))
|
||||
((method-of-type hvehicle apply-gravity!) this arg0)
|
||||
(return 0)
|
||||
)
|
||||
(if (-> this auto-boost?)
|
||||
(vector-float*!
|
||||
(-> this rbody lin-momentum)
|
||||
(vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))
|
||||
1843200.0
|
||||
)
|
||||
)
|
||||
(if (time-elapsed? (-> this initial-creation-time) (seconds 0.2))
|
||||
(set! (-> this auto-boost?) #f)
|
||||
)
|
||||
(when #f
|
||||
(set! (-> this info handling steering-thruster-factor) 2.0)
|
||||
(call-parent-method this arg0)
|
||||
(return 0)
|
||||
)
|
||||
(set! (-> this info handling steering-thruster-factor) 0.0)
|
||||
(let* ((f1-0 (fabs (-> this controls steering)))
|
||||
(f0-5 (- 1.0 (* (- 1.0 f1-0) (- 1.0 f1-0))))
|
||||
)
|
||||
(if (< (-> this controls steering) 0.0)
|
||||
(set! f0-5 (* -1.0 f0-5))
|
||||
)
|
||||
(set! (-> this steering-val) f0-5)
|
||||
)
|
||||
(set! (-> this target-turn-rate) (* 21845.334 (-> this steering-val)))
|
||||
(let ((f0-9 (* 2.0 arg0)))
|
||||
(if (< (fabs (-> this target-turn-rate)) (fabs (-> this turn-rate)))
|
||||
(set! f0-9 (* 4.0 f0-9))
|
||||
)
|
||||
(let ((f0-11 (fmax 0.0 (fmin 1.0 f0-9))))
|
||||
(set! (-> this turn-rate) (lerp (-> this turn-rate) (-> this target-turn-rate) f0-11))
|
||||
)
|
||||
)
|
||||
(quaternion-rotate-y!
|
||||
(the-as quaternion (-> this rbody rot))
|
||||
(the-as quaternion (-> this rbody rot))
|
||||
(* arg0 (-> this turn-rate))
|
||||
)
|
||||
(let ((s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (the-as quaternion (-> this rbody rot))))
|
||||
(s4-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s4-2 quad) (-> this rbody lin-momentum quad))
|
||||
0.0
|
||||
(set! (-> s3-0 y) 0.0)
|
||||
(vector-normalize! s3-0 1.0)
|
||||
(set! (-> s4-2 y) 0.0)
|
||||
(let ((f30-0 (vector-normalize-ret-len! s4-2 1.0)))
|
||||
0.0
|
||||
(let ((f0-20 (vector-dot s4-2 s3-0)))
|
||||
(cond
|
||||
(#f
|
||||
(set! (-> s4-2 quad) (-> s3-0 quad))
|
||||
)
|
||||
(else
|
||||
(let ((s2-1 (vector-cross! (new 'stack-no-clear 'vector) s4-2 s3-0))
|
||||
(f28-0 (acos f0-20))
|
||||
)
|
||||
(vector-normalize! s2-1 1.0)
|
||||
(let ((f0-23 (fmin f28-0 (* 16384.0 arg0))))
|
||||
(vector-rotate-around-axis! s4-2 (the-as quaternion s4-2) f0-23 s2-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (not (-> this auto-boost?))
|
||||
(set! f30-0 (fmin f30-0 (* 1843200.0 (compute-suck-speed-scalar))))
|
||||
)
|
||||
(vector-normalize! s4-2 f30-0)
|
||||
)
|
||||
(set! (-> this rbody lin-momentum x) (-> s4-2 x))
|
||||
(set! (-> this rbody lin-momentum z) (-> s4-2 z))
|
||||
)
|
||||
(call-parent-method this arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-94 ((this h-kg-pickup))
|
||||
(call-parent-method this)
|
||||
(when (-> this camera-override?)
|
||||
(remove-setting! 'string-min-length)
|
||||
(remove-setting! 'string-max-length)
|
||||
(remove-setting! 'string-min-height)
|
||||
(remove-setting! 'string-max-height)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rbody-event-handler ((this h-kg-pickup) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('set-taskman)
|
||||
(let ((v0-0 (the-as object (-> arg3 param 0))))
|
||||
(set! (-> this taskman) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('impact-impulse)
|
||||
(send-event (handle->process (-> this taskman)) 'vehicle-bump)
|
||||
(call-parent-method this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
(('override-camera)
|
||||
(set! (-> this camera-override?) (the-as symbol (-> arg3 param 0)))
|
||||
#t
|
||||
)
|
||||
(('die)
|
||||
(deactivate this)
|
||||
)
|
||||
(('flight-up)
|
||||
(hvehicle-method-154 this)
|
||||
)
|
||||
(('boost)
|
||||
(set-time! (-> this initial-creation-time))
|
||||
(set! (-> this auto-boost?) #t)
|
||||
(hvehicle-method-154 this)
|
||||
)
|
||||
(else
|
||||
(call-parent-method this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod vehicle-method-88 ((this h-kg-pickup) (arg0 vehicle-controls))
|
||||
(call-parent-method this arg0)
|
||||
(set! (-> arg0 throttle) (- 1.0 (* (- 1.0 (-> arg0 throttle)) (- 1.0 (-> arg0 throttle)))))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod attack-handler ((this h-kg-pickup) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate))
|
||||
(local-vars (v0-0 symbol))
|
||||
(cond
|
||||
((logtest? (penetrate jak-dark-nuke) arg3)
|
||||
(return #f)
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(call-parent-method this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,130 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype ctyinda-vingate (elec-gate)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(define *vingate-elec-gate-params* (new 'static 'elec-gate-params
|
||||
:bolt-spec (new 'static 'lightning-spec
|
||||
:name #f
|
||||
:flags (lightning-spec-flags lsf2)
|
||||
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
:end-color (new 'static 'rgba :a #x80)
|
||||
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
||||
:fade-start-factor 0.2
|
||||
:fade-time 120.0
|
||||
:texture (new 'static 'texture-id :index #x8f :page #x4)
|
||||
:reduction 0.42
|
||||
:num-points 16
|
||||
:box-size 8601.6
|
||||
:merge-factor 0.5
|
||||
:merge-count 2
|
||||
:radius 1638.4
|
||||
:duration -1.0
|
||||
:sound #f
|
||||
)
|
||||
:ring-spec #f
|
||||
:ring-radius-min 1638.4
|
||||
:ring-radius-max 2867.2
|
||||
:speed-mult 1.0
|
||||
:min-dist 163840.0
|
||||
:max-dist 491520.0
|
||||
:plane-expand-xz 8192.0
|
||||
:plane-expand-y 81920.0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-params ((this ctyinda-vingate))
|
||||
*vingate-elec-gate-params*
|
||||
)
|
||||
|
||||
(defmethod elec-gate-method-26 ((this ctyinda-vingate))
|
||||
(call-parent-method this)
|
||||
(set! (-> this quality-enabled?) #f)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this ctyinda-vingate) (arg0 entity-actor))
|
||||
(when (task-node-closed? (game-task-node sewer-hum-kg-resolution))
|
||||
(process-entity-status! this (entity-perm-status dead) #t)
|
||||
(deactivate this)
|
||||
)
|
||||
(call-parent-method this arg0)
|
||||
)
|
||||
|
||||
(deftype industrial-board-vent (bouncer)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod init-collision! ((this industrial-board-vent))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec crate))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action))
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 10240.0)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-skel! ((this industrial-board-vent))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype ctyinda-evil-streetlamp (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-ctyinda-evil-streetlamp ctyinda-evil-streetlamp ctyinda-evil-streetlamp-lod0-jg ctyinda-evil-streetlamp-idle-ja
|
||||
((ctyinda-evil-streetlamp-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 8 15)
|
||||
)
|
||||
|
||||
(defstate idle (ctyinda-evil-streetlamp)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this ctyinda-evil-streetlamp) (arg0 entity-actor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-ctyinda-evil-streetlamp" (the-as (pointer level) #f))
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this root pause-adjust-distance) 327680.0)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,33 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype industrialb-board-vent (bouncer)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod init-collision! ((this industrialb-board-vent))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec crate))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-2 prim-core action) (collide-action))
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 10240.0)
|
||||
(set! (-> s5-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s5-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-5 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-skel! ((this industrialb-board-vent))
|
||||
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,671 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-onin-clap-effect
|
||||
:id 925
|
||||
:duration (seconds 1)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3314 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3314 :period (seconds 4) :length (seconds 0.017))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3315 :period (seconds 4) :length (seconds 0.017))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3314
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 6.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.033333335))
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.00008333333))
|
||||
(:friction 0.9 0.02)
|
||||
(:timer (seconds 1) (seconds 1.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
(:conerot-x (degrees 30) (degrees 90))
|
||||
(:conerot-y (degrees -32) (degrees 64))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3315
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 15.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:vel-y (meters 0.0033333334) (meters 0.033333335))
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.008888889 -0.008888889)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:friction 0.9 0.02)
|
||||
(:timer (seconds 3))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 30) (degrees 90))
|
||||
(:conerot-y (degrees -32) (degrees 64))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-onin-big-clap-effect
|
||||
:id 926
|
||||
:duration (seconds 1)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3317 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3317 :period (seconds 4) :length (seconds 0.017))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.267))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.135))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.067))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.035))
|
||||
(sp-item 3318 :period (seconds 4) :length (seconds 0.017))
|
||||
(sp-item 3319 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 15)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3319
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 3))
|
||||
(:rot-x (degrees 1.125))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 100.0)
|
||||
(:omega (degrees 1361.25))
|
||||
(:fade-a -1.25)
|
||||
(:timer (seconds 0.267))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 409.6)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3317
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 6.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:vel-y (meters 0.1) (meters 0.016666668))
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.00008333333))
|
||||
(:friction 0.9 0.01)
|
||||
(:timer (seconds 1) (seconds 1.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
(:conerot-x (degrees 82) (degrees 10))
|
||||
(:conerot-y (degrees -10) (degrees 10))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3318
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 10.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:vel-y (meters 0.1) (meters 0.016666668))
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.008888889 -0.008888889)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:friction 0.9 0.01)
|
||||
(:timer (seconds 3))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 82) (degrees 10))
|
||||
(:conerot-y (degrees -10) (degrees 10))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-onin-finger-effect
|
||||
:id 927
|
||||
:duration (seconds 0.15)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3320 :falloff-to (meters 20)) (sp-item 3321 :falloff-to (meters 20)))
|
||||
)
|
||||
|
||||
(defpart 3320
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 0.0 1.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:timer (seconds 1) (seconds 2.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3316
|
||||
:init-specs ((:scale-x (meters 0.01) (meters 0.02))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 255.0)
|
||||
(:scalevel-x (meters 0))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r 0.0)
|
||||
(:fade-g 0.0)
|
||||
(:next-time (seconds 0.017))
|
||||
(:next-launcher 3322)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3322
|
||||
:init-specs ((:r 0.0) (:g 64.0 64.0) (:b 255.0) (:a 64.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 3316))
|
||||
)
|
||||
|
||||
(defpart 3321
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 8.0)
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.026666667 -0.026666667)
|
||||
(:timer (seconds 0.5) (seconds 1.497))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-onin-small-finger-effect
|
||||
:id 928
|
||||
:duration (seconds 0.15)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 3323 :falloff-to (meters 15)) (sp-item 3324 :falloff-to (meters 15)))
|
||||
)
|
||||
|
||||
(defpart 3323
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 0.0 1.0)
|
||||
(:scale-x (meters 0.03) (meters 0.02))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:scalevel-x (meters -0.00013333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters 0) (meters -0.000016666667))
|
||||
(:timer (seconds 0.5) (seconds 1.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0) (seconds 0.497))
|
||||
(:next-launcher 3316)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3324
|
||||
:init-specs ((:texture (onin-magic-bigpuff onintent-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 8.0)
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.026666667 -0.026666667)
|
||||
(:timer (seconds 0.5) (seconds 0.997))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(load-scene (new 'static 'scene
|
||||
:name "city-find-catacomb-ent-intro"
|
||||
:extra #f
|
||||
:info #f
|
||||
:scene-flags (scene-flags scf1 scf2 scf3 scf4)
|
||||
:mask-to-clear (process-mask movie projectile)
|
||||
:entity "scene-stage-32"
|
||||
:art-group "scenecamera"
|
||||
:anim "city-find-catacomb-ent-intro"
|
||||
:parts 15
|
||||
:command-list '((100
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 100 351)
|
||||
)
|
||||
)
|
||||
(640
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 640 730)
|
||||
)
|
||||
)
|
||||
(857
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"LmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 857 997)
|
||||
)
|
||||
)
|
||||
(998
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RindexC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RpinkyC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RthumbC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RringC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
(part-tracker
|
||||
"group-onin-small-finger-effect"
|
||||
entity
|
||||
"onin-highres"
|
||||
joint
|
||||
"RmiddleC"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 998 1171)
|
||||
)
|
||||
)
|
||||
(1750 (fadeout (frame-time-30 30)))
|
||||
(10000 (task-close! "palace-ruins-patrol-introduction"))
|
||||
)
|
||||
:cut-list '(44 352 456 509 550 612 640 768 857 998 1241 1342 1485 1660)
|
||||
:wait-ground-time (seconds 1)
|
||||
:actor (new 'static 'boxed-array :type scene-actor
|
||||
(new 'static 'scene-actor
|
||||
:name "scenecamera"
|
||||
:level #f
|
||||
:art-group "skel-scenecamera"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:camera 4
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "jakc-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-jakc-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min 1241) (1342 max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
:no-draw-seg #x280
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "sidekick-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-sidekick-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "onin-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-onin-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "pecker-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-pecker-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "samos-highres"
|
||||
:level 'onintent
|
||||
:art-group "skel-samos-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min 768) (857 max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
)
|
||||
:load-point "onintent-start"
|
||||
:end-point "onintent-end"
|
||||
:borrow '()
|
||||
:sfx-volume -1.0
|
||||
:ambient-volume 0.5
|
||||
:music-delay 1500.0
|
||||
:on-running #f
|
||||
:on-complete #f
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,599 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *ctyport-attack-bbush-positions* (new 'loading-level 'boxed-array ctyport-attack-package-info 64))
|
||||
|
||||
(dotimes (gp-0 (-> *ctyport-attack-bbush-positions* allocated-length))
|
||||
(set! (-> *ctyport-attack-bbush-positions* gp-0) (new 'loading-level 'ctyport-attack-package-info))
|
||||
)
|
||||
|
||||
(set! (-> *ctyport-attack-bbush-positions* length) 0)
|
||||
|
||||
(define *ctyport-bbush-mine-positions*
|
||||
(new 'static 'boxed-array :type ctyport-mine-layout
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 7
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1984389.1 :z 6423224.5)
|
||||
:initial-angle 16384.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 7
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 5
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1924341.8 :z 7077519.5)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 5
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1087733.8 :z 7747666.0)
|
||||
:initial-angle 16384.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 4
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x -262144.0 :z 5992448.0)
|
||||
:initial-angle 24576.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 4
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 7
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 205496.31 :z 5999370.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 8
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 7
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 965550.06 :z 6243574.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 8
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 507904.0 :z 6541312.0)
|
||||
:initial-angle 16384.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 958177.25 :z 7158210.5)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 623411.2 :z 7167959.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x -81920.0 :z 5771264.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 81920.0 :z 5578752.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 1
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 156999.69 :z 5603287.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 4
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 639508.5 :z 5754306.5)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 4
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 3
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1331200.0 :z 5947392.0)
|
||||
:initial-angle 8192.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 4
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 2
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1544192.0 :z 5701632.0)
|
||||
:initial-angle 24576.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 2 (new 'static 'handle) (new 'static 'handle))
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x -593920.0 :z 6385664.0)
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 1454080.0 :z 6524928.0)
|
||||
:initial-angle 8192.0
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
(new 'static 'ctyport-mine-layout
|
||||
:num-mines 6
|
||||
:inout? #f
|
||||
:spin? #f
|
||||
:active? #f
|
||||
:origin (new 'static 'vector :x 442368.0 :z 7557120.0)
|
||||
:initial-angle 10922.667
|
||||
:spacing 24576.0
|
||||
:spinrate 10922.667
|
||||
:period 3000.0
|
||||
:stored-handles (new 'static 'array handle 6
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
(new 'static 'handle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype ctyport-attack-manager-bbush (ctyport-attack-manager)
|
||||
((actor-group (pointer actor-group))
|
||||
(actor-group-count int32)
|
||||
(clock-speed float)
|
||||
(countdown-timer handle :offset 336)
|
||||
)
|
||||
(:state-methods
|
||||
wait-award
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod init! ((this ctyport-attack-manager-bbush))
|
||||
(local-vars (sv-96 res-tag))
|
||||
(let ((t9-0 (method-of-type task-manager init!)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set-setting! 'stop-boats? #t 0.0 0)
|
||||
(set-setting! 'extra-bank '((ctywide2 cityff) (ctywide3 portatk1)) 0.0 0)
|
||||
(set-setting! 'lock-sound-camera-to-target #t 0.0 0)
|
||||
(set! (-> this hud-timer)
|
||||
(ppointer->handle (process-spawn hud-timer :init hud-init-by-other :name "hud-timer" :to this))
|
||||
)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'hour 16)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0)
|
||||
(set! (-> this inactive-mine-list) (new 'process 'handle-array 80))
|
||||
(set! (-> this inactive-mine-list length) 0)
|
||||
(set! (-> this clock-speed) 1.0)
|
||||
(dotimes (s5-1 80)
|
||||
(let ((v1-31 (process-spawn
|
||||
ctyport-mine
|
||||
:name "ctyport-mine"
|
||||
:from (if (>= s5-1 40)
|
||||
*port-attack-dead-pool*
|
||||
*default-dead-pool*
|
||||
)
|
||||
:to this
|
||||
:stack-size 2048
|
||||
)
|
||||
)
|
||||
)
|
||||
(push-back (-> this inactive-mine-list) (process->handle (-> v1-31 0)))
|
||||
)
|
||||
)
|
||||
(set! (-> this mine-layout) *ctyport-bbush-mine-positions*)
|
||||
(set! sv-96 (new 'static 'res-tag))
|
||||
(let ((v1-40 (res-lump-data (entity-by-name "port-attack-bbush-1") 'actor-groups pointer :tag-ptr (& sv-96))))
|
||||
(cond
|
||||
((and v1-40 (nonzero? (-> sv-96 elt-count)))
|
||||
(set! (-> this actor-group) (the-as (pointer actor-group) v1-40))
|
||||
(set! (-> this actor-group-count) (the-as int (-> sv-96 elt-count)))
|
||||
)
|
||||
(else
|
||||
(set! (-> this actor-group) (the-as (pointer actor-group) #f))
|
||||
(set! (-> this actor-group-count) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (v1-46 (-> *ctyport-package-positions* length))
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-46 pos quad) (-> *ctyport-package-positions* v1-46 pos quad))
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-46 on-water?) (-> *ctyport-package-positions* v1-46 on-water?))
|
||||
)
|
||||
(set! (-> *ctyport-attack-bbush-positions* length) (-> *ctyport-package-positions* length))
|
||||
(when (-> this actor-group)
|
||||
(let ((v1-53 0))
|
||||
(dotimes (a0-35 (-> this actor-group 0 length))
|
||||
(let ((a1-36 (-> this actor-group 0 data a0-35 actor)))
|
||||
(when a1-36
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-53 pos quad) (-> a1-36 extra trans quad))
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-53 on-water?) #f)
|
||||
(set! (-> *ctyport-attack-bbush-positions* v1-53 probe?) #t)
|
||||
(+! v1-53 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> *ctyport-attack-bbush-positions* length) v1-53)
|
||||
)
|
||||
)
|
||||
(set! (-> this package-positions) *ctyport-attack-bbush-positions*)
|
||||
(dotimes (v1-55 (-> this mine-layout length))
|
||||
(set! (-> this mine-layout v1-55 active?) #f)
|
||||
(dotimes (a0-42 (-> this mine-layout v1-55 num-mines))
|
||||
(set! (-> this mine-layout v1-55 stored-handles a0-42) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod play-speech ((this ctyport-attack-manager-bbush) (arg0 int))
|
||||
(let ((v1-0 arg0))
|
||||
(if (or (zero? v1-0)
|
||||
(= v1-0 1)
|
||||
(= v1-0 2)
|
||||
(= v1-0 3)
|
||||
(= v1-0 4)
|
||||
(= v1-0 5)
|
||||
(= v1-0 6)
|
||||
(= v1-0 7)
|
||||
(= v1-0 8)
|
||||
(= v1-0 13)
|
||||
)
|
||||
(the-as int #f)
|
||||
(call-parent-method this arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate wait (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(set-setting! 'board #f 0.0 0)
|
||||
(send-event *target* 'end-mode 'board)
|
||||
(suspend)
|
||||
(while (or (not *target*)
|
||||
(not *spawn-actors*)
|
||||
(!= (status-of-level-and-borrows *level* 'lpatkcs #f) 'active)
|
||||
(focus-test? *target* board)
|
||||
)
|
||||
(if *target*
|
||||
(process-grab? *target* #f)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(process-release? *target*)
|
||||
(set-time-limit self)
|
||||
(ctyport-attack-setup)
|
||||
(set-setting! 'exclusive-load '((ignore all)) 0.0 0)
|
||||
(let ((a1-7 (new 'stack-no-clear 'array 'symbol 10)))
|
||||
(set! (-> a1-7 9) #f)
|
||||
(set! (-> a1-7 8) #f)
|
||||
(set! (-> a1-7 7) #f)
|
||||
(set! (-> a1-7 6) #f)
|
||||
(set! (-> a1-7 5) #f)
|
||||
(set! (-> a1-7 4) #f)
|
||||
(set! (-> a1-7 3) #f)
|
||||
(set! (-> a1-7 2) 'ctyinda)
|
||||
(set! (-> a1-7 1) 'ctyport)
|
||||
(set! (-> a1-7 0) 'ctywide-ff)
|
||||
(want-levels *load-state* a1-7)
|
||||
)
|
||||
(want-display-level *load-state* 'ctyport 'display)
|
||||
(want-display-level *load-state* 'ctyinda 'display)
|
||||
(set! (-> self current-package-index) 0)
|
||||
(let* ((a0-15 *setting-control*)
|
||||
(t9-11 (method-of-object a0-15 set-setting))
|
||||
(a2-5 'stop-boats?)
|
||||
(a3-2 #t)
|
||||
)
|
||||
(t9-11 a0-15 self a2-5 a3-2 0 0)
|
||||
(let ((t9-12 kill-by-type)
|
||||
(a0-16 barge)
|
||||
(a1-11 *active-pool*)
|
||||
)
|
||||
(t9-12 a0-16 a1-11)
|
||||
(apply-settings *setting-control*)
|
||||
(let* ((v1-34 (the-as entity-actor (entity-by-name "boat-manager-1")))
|
||||
(a0-19 (if v1-34
|
||||
(-> v1-34 extra process)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-19
|
||||
(apply-alignment
|
||||
(the-as process-focusable a0-19)
|
||||
(the-as align-opts a1-11)
|
||||
(the-as transformq a2-5)
|
||||
(the-as vector a3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ctyport-attack-manager-method-45 self)
|
||||
(send-event *target* 'change-mode 'pilot-daxter (handle->process (-> self active-torpedo)))
|
||||
(go-virtual pickup-nukes)
|
||||
)
|
||||
)
|
||||
|
||||
(define *port-attack-bbush-fail-sphere* (new 'static 'sphere :x 2651996.2 :y 31539.2 :z 5880709.0 :r 1.0))
|
||||
|
||||
(define *port-attack-bbush-fail-radius* 163840.0)
|
||||
|
||||
(defstate pickup-nukes (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-1 (-> (find-parent-state) enter)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
)
|
||||
(set! (-> self countdown-timer) (the-as handle (current-time)))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance (target-pos 0) *port-attack-bbush-fail-sphere*) *port-attack-bbush-fail-radius*)
|
||||
(send-event self 'fail)
|
||||
)
|
||||
(set! (-> *game-info* timer) (- (seconds 140) (- (current-time) (the-as int (-> self countdown-timer)))))
|
||||
(if (<= (-> *game-info* timer) 0)
|
||||
(send-event self 'fail)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate head-to-wall (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:event ctyport-attack-manager-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* game-clock frame-counter))
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> (method-of-type task-manager active) trans))
|
||||
(let ((f30-0
|
||||
(fmax
|
||||
0.0
|
||||
(fmin 1.0 (* 0.0022222223 (the float (- (-> *display* game-clock frame-counter) (-> self state-time)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self clock-speed) (lerp 1.0 0.0 f30-0))
|
||||
(update-rates! (-> *display* entity-clock) (-> self clock-speed))
|
||||
(update-rates! (-> *display* target-clock) (-> self clock-speed))
|
||||
(set-setting! 'bg-r 'abs 1.0 0)
|
||||
(set-setting! 'bg-g 'abs 1.0 0)
|
||||
(set-setting! 'bg-b 'abs 1.0 0)
|
||||
(set-setting! 'bg-a 'abs f30-0 0)
|
||||
(when (= f30-0 1.0)
|
||||
(update-rates! (-> *display* entity-clock) 1.0)
|
||||
(update-rates! (-> *display* target-clock) 1.0)
|
||||
(let ((a1-10 (get-continue-by-name *game-info* "ctyport-bbush-port-4")))
|
||||
(when a1-10
|
||||
(start 'play a1-10)
|
||||
(go-virtual wait-award)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch quaternion vs object.
|
||||
(defmethod ctyport-attack-manager-method-51 ((this ctyport-attack-manager-bbush) (arg0 traffic-object-spawn-params))
|
||||
(set! (-> arg0 position quad) (-> (new 'static 'vector :x 2492384.8 :y 34605.055 :z 6578958.5 :w 1.0) quad))
|
||||
(quaternion-copy! (-> arg0 rotation) (new 'static 'quaternion :x 0.0002 :y 0.6305 :z 0.0011 :w -0.7761))
|
||||
(let ((v1-1 (the-as entity-actor (entity-by-name "port-attack-bbush-1"))))
|
||||
(when v1-1
|
||||
(set! (-> arg0 position quad) (-> v1-1 extra trans quad))
|
||||
(quaternion-copy! (-> arg0 rotation) (-> v1-1 quat))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-25 ((this ctyport-attack-manager-bbush))
|
||||
(update-rates! (-> *display* entity-clock) 1.0)
|
||||
(update-rates! (-> *display* target-clock) 1.0)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate wait-award (ctyport-attack-manager-bbush)
|
||||
:virtual #t
|
||||
:event task-manager-event-handler
|
||||
:code (behavior ()
|
||||
(while (or (not *target*) (not *spawn-actors*) (not (entity-by-name "burning-bush-36")))
|
||||
(if *target*
|
||||
(process-grab? *target* #f)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(remove-setting! 'bg-r)
|
||||
(remove-setting! 'bg-g)
|
||||
(remove-setting! 'bg-b)
|
||||
(remove-setting! 'bg-a)
|
||||
(remove-setting! 'music)
|
||||
(until (process-grab? *target* #f)
|
||||
(suspend)
|
||||
)
|
||||
(until (= (-> *setting-control* user-current bg-a) 0.0)
|
||||
(suspend)
|
||||
)
|
||||
(give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f))
|
||||
(until (process-release? *target*)
|
||||
(suspend)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
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
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
@@ -7,3 +7,278 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype cty-elevator (elevator)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-cty-elevator cty-elevator cty-elevator-lod0-jg cty-elevator-idle-ja
|
||||
((cty-elevator-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 10)
|
||||
)
|
||||
|
||||
(defmethod get-art-group ((this cty-elevator))
|
||||
(art-group-get-by-name *level* "skel-cty-elevator" (the-as (pointer level) #f))
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch collide-shape-moving vs none.
|
||||
(defmethod init-collision! ((this cty-elevator))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 2))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec camera-blocker pusher))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> s4-0 transform-index) 3)
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 40960.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(pusher-init s5-0)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core collide-as) (collide-spec pusher))
|
||||
(set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid rideable))
|
||||
(set! (-> v1-15 transform-index) 3)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 40960.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
||||
(let ((v1-18 (-> s5-0 root-prim)))
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-sound! ((this cty-elevator))
|
||||
(set! (-> this sound-running-loop) (static-sound-spec "hqlift-loop" :group 0))
|
||||
(set! (-> this sound-arrived) (static-sound-spec "hqlift-stop" :group 0))
|
||||
(set! (-> this sound-start) (static-sound-spec "hqlift-start" :group 0))
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; og:preserve-this not-yet-implemented texture anim
|
||||
; (define *ctyslumc-water-texture-anim-array*
|
||||
; (new 'static 'texture-anim-array :type texture-anim
|
||||
; (new 'static 'texture-anim
|
||||
; :num-layers #x3
|
||||
; :func #f
|
||||
; :init-func-id 'texture-anim-overide-size-init
|
||||
; :tex #f
|
||||
; :tex-name "ctyslumc-water-dest"
|
||||
; :extra (new 'static 'vector :x 128.0 :y 128.0 :z 4.0)
|
||||
; :color (new 'static 'rgba :a #x80)
|
||||
; :frame-delta 300.0
|
||||
; :frame-mod 2100.0
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
; :data (new 'static 'array texture-anim-layer 6
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 2100.0
|
||||
; :tex-name "ctyslumc-water"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.33 0.33))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-st-rot (degrees 180)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.33 1.33))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-st-rot (degrees 180)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 2100.0
|
||||
; :tex-name "ctyslumc-water"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.67 0.67))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-st-rot (degrees 90)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.67 1.67))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-st-rot (degrees 90)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 2100.0
|
||||
; :tex-name "ctyslumc-water"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.0))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 1.0))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (new 'static 'texture-anim
|
||||
; :num-layers #x3
|
||||
; :func #f
|
||||
; :init-func-id 'texture-anim-overide-size-init
|
||||
; :tex #f
|
||||
; :tex-name "ctyslumc-fountain-fall-dest"
|
||||
; :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0)
|
||||
; :color (new 'static 'rgba :a #x80)
|
||||
; :frame-delta 300.0
|
||||
; :frame-mod 600.0
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x1 :d #x1)
|
||||
; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
; :data (new 'static 'array texture-anim-layer 6
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 600.0
|
||||
; :tex-name "ctyslumc-fountain-fall"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -0.3 0.0))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -1.3 -1.0))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 600.0
|
||||
; :tex-name "ctyslumc-fountain-fall"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.3 -0.5))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.3 -2.5))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; (new 'static 'texture-anim-layer
|
||||
; :func-id 'default-texture-anim-layer-func
|
||||
; :init-func #f
|
||||
; :tex #f
|
||||
; :end-time 600.0
|
||||
; :tex-name "ctyslumc-fountain-fall"
|
||||
; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
|
||||
; :alpha (new 'static 'gs-alpha :b #x2 :d #x1)
|
||||
; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 -0.25))
|
||||
; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
|
||||
; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
|
||||
; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 -3.25))
|
||||
; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
|
||||
(deftype ctyslumc-flag (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-ctyslumc-flag ctyslumc-flag ctyslumc-flag-lod0-jg ctyslumc-flag-idle-ja
|
||||
((ctyslumc-flag-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 -7 0 12)
|
||||
)
|
||||
|
||||
(defstate idle (ctyslumc-flag)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this ctyslumc-flag) (arg0 entity-actor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctyslumc-flag" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
(defbehavior ctyslumc-flag-init-by-other ctyslumc-flag ((arg0 vector) (arg1 entity-actor))
|
||||
(process-entity-set! self arg1)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctyslumc-flag" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,844 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-ctyslumc-streetlight-glows
|
||||
:id 986
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 6 :fade-after (meters 120) :flags (sp6) :hour-mask #b111111111110000000)
|
||||
(sp-item 7 :fade-after (meters 120) :flags (sp6) :hour-mask #b111111111110000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 6
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2.5) (meters 0.1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 32.0)
|
||||
(:omega (degrees 2715.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 7
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 16) (meters 0.1))
|
||||
(:rot-x (degrees 4.5))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0 255.0)
|
||||
(:b 255.0)
|
||||
(:a 16.0)
|
||||
(:omega (degrees 2715.75))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-ctyslumc-chimney
|
||||
:id 987
|
||||
:bounds (static-bspherem 0 0 -10 24)
|
||||
:parts ((sp-item 3605 :fade-after (meters 200) :falloff-to (meters 300))
|
||||
(sp-item 3606 :fade-after (meters 200) :flags (sp6))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3606
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 16) (meters 0.1))
|
||||
(:rot-x (degrees 6.7500005))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 240.0)
|
||||
(:b 100.0)
|
||||
(:a 12.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 6144.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3605
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:birth-func 'birth-func-texture-group)
|
||||
(:num 0.0 0.5)
|
||||
(:scale-x (meters 1) (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 32.0 32.0)
|
||||
(:vel-y (meters 0.03) (meters 0.01))
|
||||
(:scalevel-x (meters 0.026666667) (meters 0.006666667))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r 0.0)
|
||||
(:fade-g -0.36)
|
||||
(:fade-b -4.24)
|
||||
(:fade-a -0.053333335 -0.053333335)
|
||||
(:accel-x (meters -0.00066666666) (meters -0.00033333333))
|
||||
(:accel-y (meters 0.0001) (meters 0.0001))
|
||||
(:friction 0.96)
|
||||
(:timer (seconds 8))
|
||||
(:flags (sp-cpuinfo-flag-2))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700))
|
||||
(:next-time (seconds 0.085) (seconds 0.015))
|
||||
(:next-launcher 3607)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3607
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.035) (seconds 0.13)) (:next-launcher 3608))
|
||||
)
|
||||
|
||||
(defpart 3608
|
||||
:init-specs ((:scalevel-x (meters 0.013333334) (meters 0.0033333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.14666666)
|
||||
(:fade-g -0.7866667)
|
||||
(:fade-b -0.88)
|
||||
(:next-time (seconds 0.35) (seconds 0.147))
|
||||
(:next-launcher 3609)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3609
|
||||
:init-specs ((:scalevel-x (meters 0.006666667) (meters 0.0016666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -1.2944444)
|
||||
(:fade-g -0.7111111)
|
||||
(:fade-b -0.094444446)
|
||||
(:next-time (seconds 0.5) (seconds 0.097))
|
||||
(:next-launcher 3610)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3610
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.024))
|
||||
)
|
||||
|
||||
(defpartgroup group-ctyslumc-chimney-smoke
|
||||
:id 988
|
||||
:bounds (static-bspherem 0 0 -12 24)
|
||||
:parts ((sp-item 3611 :fade-after (meters 200) :falloff-to (meters 300)))
|
||||
)
|
||||
|
||||
(defpart 3611
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:birth-func 'birth-func-texture-group)
|
||||
(:num 0.0 0.4)
|
||||
(:scale-x (meters 1) (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0 128.0)
|
||||
(:g :copy r)
|
||||
(:b :copy g)
|
||||
(:a 24.0 24.0)
|
||||
(:vel-y (meters 0.03) (meters 0.01))
|
||||
(:scalevel-x (meters 0.026666667) (meters 0.006666667))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.21333334)
|
||||
(:fade-g -0.21333334)
|
||||
(:fade-b -0.21333334)
|
||||
(:fade-a -0.026666667 -0.026666667)
|
||||
(:accel-x (meters -0.00066666666) (meters -0.00033333333))
|
||||
(:accel-y (meters 0.0001) (meters 0.0001))
|
||||
(:friction 0.96)
|
||||
(:timer (seconds 6))
|
||||
(:flags (sp-cpuinfo-flag-2))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700))
|
||||
(:next-time (seconds 0.25) (seconds 0.015))
|
||||
(:next-launcher 3612)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3612
|
||||
:init-specs ((:scalevel-x (meters 0.013333334) (meters 0.0033333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:next-time (seconds 0.35) (seconds 0.147))
|
||||
(:next-launcher 3613)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3613
|
||||
:init-specs ((:scalevel-x (meters 0.006666667) (meters 0.0016666667)) (:scalevel-y :copy scalevel-x))
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-big-a
|
||||
:id 989
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3614 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3615 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3614
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0))
|
||||
(:scale-x (meters 34))
|
||||
(:rot-x (degrees 180))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 19))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3615
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-big-b
|
||||
:id 990
|
||||
:flags (sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 3616 :flags (is-3d sp7))
|
||||
(sp-item 3617 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3616
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:y (meters 0))
|
||||
(:z (meters -0.5))
|
||||
(:scale-x (meters 31.5))
|
||||
(:rot-x (degrees 180))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 0))
|
||||
(:scale-y (meters 9.5))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3617
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-square-a
|
||||
:id 991
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3618 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3619 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3620 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3618
|
||||
:init-specs ((:texture (sign-square-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00100 -2139062144 0 1 #xaa00100 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3619
|
||||
:init-specs ((:texture (sign-square-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 180))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00100 -2139062144 0 1 #xaa00100 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3620
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-square-b
|
||||
:id 992
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3621 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3622 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3623 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3621
|
||||
:init-specs ((:texture (sign-square-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00300 -2139062144 0 1 #xaa00300 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3622
|
||||
:init-specs ((:texture (sign-square-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00300 -2139062144 0 1 #xaa00300 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3623
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-wide-a
|
||||
:id 993
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3624 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3625 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3626 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3624
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 17))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3625
|
||||
:init-specs ((:texture (sign-wide-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 17))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00c00 -2139062144 0 1 #xaa00c00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3626
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-wide-b
|
||||
:id 994
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3627 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3628 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3629 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3627
|
||||
:init-specs ((:texture (sign-wide-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 15))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00d00 -2139062144 0 1 #xaa00d00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3628
|
||||
:init-specs ((:texture (sign-wide-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 15))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 7))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00d00 -2139062144 0 1 #xaa00d00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-x (degrees -90))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3629
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-tall-a
|
||||
:id 995
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3630 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3631 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3632 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3630
|
||||
:init-specs ((:texture (sign-tall-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.2))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 15))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00a00 -2139062144 0 1 #xaa00a00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3631
|
||||
:init-specs ((:texture (sign-tall-a ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.2))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 15))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00a00 -2139062144 0 1 #xaa00a00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3632
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sign-ctyslumc-tall-b
|
||||
:id 996
|
||||
:flags (sp4 sp6)
|
||||
:bounds (static-bspherem 0 0 0 10)
|
||||
:rotate ((degrees 0) (degrees 90) (degrees 0))
|
||||
:parts ((sp-item 3633 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3634 :flags (is-3d sp3 sp7))
|
||||
(sp-item 3635 :fade-after (meters 200) :flags (sp6) :hour-mask #b11111111111111000000)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3633
|
||||
:init-specs ((:texture (sign-tall-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters 0.1))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees -90))
|
||||
(:scale-y (meters 14))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00b00 -2139062144 0 1 #xaa00b00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3634
|
||||
:init-specs ((:texture (sign-tall-b ctyslumc-sprite))
|
||||
(:num 1.0)
|
||||
(:x (meters -0.05))
|
||||
(:scale-x (meters 7))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 14))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:userdata
|
||||
:data (new 'static 'boxed-array :type int32 5 0 0 #xaa00b00 -2139062144 0 1 #xaa00b00 -2143272896 #x404040 0)
|
||||
)
|
||||
(:func 'sparticle-texture-day-night)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3635
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 1))
|
||||
(:scale-x (meters 32) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y (meters 32) (meters 0.1))
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 4.0)
|
||||
(:omega (degrees 4518))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-gunship-target-explode
|
||||
:id 997
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 3636 :flags (sp3) :period (seconds 30) :length (seconds 0.017))
|
||||
(sp-item 3637 :flags (sp7) :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 3638 :flags (sp7) :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 3639 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 3640 :period (seconds 30) :length (seconds 0.035))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3640
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 50.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 0.4) (meters 0.6))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 30.0)
|
||||
(:g 30.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0.1125))
|
||||
(:vel-y (meters 0.16666667) (meters 0.33333334))
|
||||
(:scalevel-x (meters -0.00083333335))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.28444445 -0.28444445)
|
||||
(:accel-y (meters -0.008333334))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 1.5))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-motion-blur)
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3636
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 225))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 40.0)
|
||||
(:g 40.0)
|
||||
(:b 200.0)
|
||||
(:a 64.0)
|
||||
(:fade-a -0.21333334)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 40960.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3637
|
||||
:init-specs ((:texture (colorflash level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2) (meters 6))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:scalevel-x (meters -0.033333335))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:timer (seconds 0.067))
|
||||
(:flags (sp-cpuinfo-flag-3 glow))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3638
|
||||
:init-specs ((:texture (ring level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 15))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 32.0)
|
||||
(:b 128.0)
|
||||
(:a 8.0)
|
||||
(:timer (seconds 0.035))
|
||||
(:flags (sp-cpuinfo-flag-3 glow))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 3639
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 40))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 64.0)
|
||||
(:fade-a -3.2)
|
||||
(:timer (seconds 0.067))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,960 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-cty-sniper-battery-glow
|
||||
:id 1463
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 4)
|
||||
:parts ((sp-item 4829 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000))
|
||||
)
|
||||
|
||||
(defpart 4829
|
||||
:init-specs ((:texture (colorflash level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 7) (meters 0.1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 160.0)
|
||||
(:b 240.0)
|
||||
(:a 40.0 4.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 2048.0)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(deftype cty-sniper-button-top (process-drawable)
|
||||
((is-up symbol)
|
||||
(colormode handle)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
going-up
|
||||
going-down
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-cty-sniper-button-top cty-sniper-button-top cty-sniper-button-top-lod0-jg cty-sniper-button-top-idle-ja
|
||||
((cty-sniper-button-top-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 2)
|
||||
)
|
||||
|
||||
(defbehavior cty-sniper-button-top-handler cty-sniper-button-top ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('get-colormode)
|
||||
(-> self colormode)
|
||||
)
|
||||
(('up)
|
||||
(set! (-> self colormode) (new 'static 'handle))
|
||||
(set! (-> self is-up) #t)
|
||||
(go-virtual going-up)
|
||||
)
|
||||
(('down)
|
||||
(set! (-> self colormode) (new 'static 'handle :process #x2 :u64 #x2))
|
||||
(set! (-> self is-up) #f)
|
||||
(go-virtual going-down)
|
||||
)
|
||||
(('vulnerable)
|
||||
(set! v0-0 1)
|
||||
(set! (-> self colormode) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('invulnerable)
|
||||
(set! v0-0 (if (-> self is-up)
|
||||
0
|
||||
2
|
||||
)
|
||||
)
|
||||
(set! (-> self colormode) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defbehavior cty-sniper-button-top-genpost cty-sniper-button-top ()
|
||||
(let ((v1-0 (-> self colormode)))
|
||||
(cond
|
||||
((= v1-0 1)
|
||||
(let ((v1-2 (-> (new 'static 'vector :y 1.0 :w 1.0) quad)))
|
||||
(set! (-> self draw color-emissive quad) v1-2)
|
||||
)
|
||||
(let ((v1-4 (-> (new 'static 'vector :x 0.5 :y 0.5 :z 0.5 :w 1.0) quad)))
|
||||
(set! (-> self draw color-mult quad) v1-4)
|
||||
)
|
||||
)
|
||||
((zero? v1-0)
|
||||
(let ((v1-6 (-> (new 'static 'vector :x 1.0 :w 1.0) quad)))
|
||||
(set! (-> self draw color-emissive quad) v1-6)
|
||||
)
|
||||
(let ((v1-8 (-> (new 'static 'vector :x 0.5 :y 0.5 :z 0.5 :w 1.0) quad)))
|
||||
(set! (-> self draw color-mult quad) v1-8)
|
||||
)
|
||||
)
|
||||
((= v1-0 2)
|
||||
(let ((v1-11 (-> (new 'static 'vector :x 0.5 :y 0.5 :z 0.5 :w 1.0) quad)))
|
||||
(set! (-> self draw color-mult quad) v1-11)
|
||||
)
|
||||
(let ((v1-16 (-> (if (< (mod (current-time) 150) 75)
|
||||
(new 'static 'vector :x 0.8 :w 1.0)
|
||||
(new 'static 'vector :y 0.8 :w 1.0)
|
||||
)
|
||||
quad
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self draw color-emissive quad) v1-16)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-post)
|
||||
)
|
||||
|
||||
(defstate idle (cty-sniper-button-top)
|
||||
:virtual #t
|
||||
:event cty-sniper-button-top-handler
|
||||
:code sleep-code
|
||||
:post cty-sniper-button-top-genpost
|
||||
)
|
||||
|
||||
(defstate going-up (cty-sniper-button-top)
|
||||
:virtual #t
|
||||
:event cty-sniper-button-top-handler
|
||||
:code (behavior ()
|
||||
(ja-no-eval :group! cty-sniper-button-top-popup-ja :num! (seek! max 0.25) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.25))
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
:post cty-sniper-button-top-genpost
|
||||
)
|
||||
|
||||
(defstate going-down (cty-sniper-button-top)
|
||||
:virtual #t
|
||||
:event cty-sniper-button-top-handler
|
||||
:code (behavior ()
|
||||
(ja-no-eval :group! cty-sniper-button-top-pushdown-ja :num! (seek! max 0.25) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.25))
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
:post cty-sniper-button-top-genpost
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this cty-sniper-button-top) (arg0 entity-actor))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-cty-sniper-button-top" (the-as (pointer level) #f))
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this is-up) #t)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
(defbehavior cty-sniper-button-top-init-by-other cty-sniper-button-top ((arg0 vector) (arg1 quaternion))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(quaternion-copy! (-> self root quat) arg1)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-cty-sniper-button-top" (the-as (pointer level) #f))
|
||||
)
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self colormode) (new 'static 'handle))
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
(deftype cty-sniper-button (process-drawable)
|
||||
((stay-down-time time-frame)
|
||||
(lid handle)
|
||||
)
|
||||
(:state-methods
|
||||
idle-up
|
||||
going-down
|
||||
idle-down
|
||||
bail-up
|
||||
moribund
|
||||
)
|
||||
(:methods
|
||||
(cty-sniper-button-method-25 (_type_) object)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-cty-sniper-button cty-sniper-button cty-sniper-button-lod0-jg cty-sniper-button-idle-ja
|
||||
((cty-sniper-button-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 2)
|
||||
)
|
||||
|
||||
(defmethod run-logic? ((this cty-sniper-button))
|
||||
"Should this process be run? Checked by execute-process-tree."
|
||||
#t
|
||||
)
|
||||
|
||||
(defstate idle-up (cty-sniper-button)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('attack)
|
||||
(when (logtest? (-> (the-as attack-info (-> block param 1)) penetrate-using) (penetrate flop))
|
||||
(go-virtual going-down)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(('die)
|
||||
(go-virtual moribund)
|
||||
)
|
||||
(('vulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'vulnerable)
|
||||
)
|
||||
(('invulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'invulnerable)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
'()
|
||||
)
|
||||
:exit (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
'()
|
||||
)
|
||||
:code transform-and-sleep-code
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate going-down (cty-sniper-button)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('die)
|
||||
(go-virtual moribund)
|
||||
)
|
||||
(('vulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'vulnerable)
|
||||
)
|
||||
(('invulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'invulnerable)
|
||||
(go-virtual bail-up)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
'()
|
||||
)
|
||||
:code (behavior ()
|
||||
(sound-play "activate-button")
|
||||
(send-event (handle->process (-> self lid)) 'down 0.25)
|
||||
(ja-no-eval :group! cty-sniper-button-pushdown-ja :num! (seek! max 0.25) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.25))
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #t)
|
||||
(go-virtual idle-down)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate idle-down (cty-sniper-button)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('die)
|
||||
(go-virtual moribund)
|
||||
)
|
||||
(('vulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'vulnerable)
|
||||
)
|
||||
(('invulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'invulnerable)
|
||||
(go-virtual bail-up)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! cty-sniper-button-pushdown-ja :num! (identity (the float (ja-num-frames 0))))
|
||||
(ja-post)
|
||||
(let ((gp-1 (current-time)))
|
||||
(until (time-elapsed? gp-1 (-> self stay-down-time))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(send-event (handle->process (-> self lid)) 'up #x3e800000)
|
||||
(ja-no-eval :group! cty-sniper-button-popup-ja :num! (seek! max 0.25) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.25))
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #f)
|
||||
(go-virtual idle-up)
|
||||
(sleep-code)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate bail-up (cty-sniper-button)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('die)
|
||||
(go-virtual moribund)
|
||||
)
|
||||
(('vulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'vulnerable)
|
||||
)
|
||||
(('invulnerable)
|
||||
(send-event (handle->process (-> self lid)) 'invulnerable)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
'()
|
||||
)
|
||||
:code (behavior ()
|
||||
(send-event (handle->process (-> self lid)) 'up #x3e800000)
|
||||
(ja-no-eval :group! cty-sniper-button-popup-ja :num! (seek! max 0.25) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.25))
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #f)
|
||||
(go-virtual idle-up)
|
||||
(sleep-code)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate moribund (cty-sniper-button)
|
||||
:virtual #t
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(let ((a0-0 (new 'stack-no-clear 'vector)))
|
||||
(vector+! a0-0 (-> self draw origin) (-> self draw bounds))
|
||||
(set! (-> a0-0 w) (-> self draw bounds w))
|
||||
(when (not (sphere-in-view-frustum? (the-as sphere a0-0)))
|
||||
(cleanup-for-death self)
|
||||
(go empty-state)
|
||||
)
|
||||
)
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod cty-sniper-button-method-25 ((this cty-sniper-button))
|
||||
(and (-> this next-state) (let ((v1-2 (-> this next-state name)))
|
||||
(or (= v1-2 'going-down) (= v1-2 'idle-down))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this cty-sniper-button) (arg0 entity-actor))
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
|
||||
(set! (-> s4-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s3-0 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> s3-0 prim-core collide-with) (collide-spec jak 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 0.0 0.0 8192.0)
|
||||
(set! (-> s4-0 root-prim) s3-0)
|
||||
)
|
||||
(let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-9 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-9 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-9 transform-index) 3)
|
||||
(set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 8192.0)
|
||||
)
|
||||
(let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-11 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-11 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-11 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-11 transform-index) 4)
|
||||
(set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 8192.0)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-14 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-14 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-14 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s4-0)
|
||||
)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-cty-sniper-button" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this stay-down-time)
|
||||
(the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'button-down-time :default 1.0))))
|
||||
)
|
||||
(set! (-> this lid) (process->handle (ppointer->process (process-spawn
|
||||
cty-sniper-button-top
|
||||
(-> this root trans)
|
||||
(-> this root quat)
|
||||
:name "cty-sniper-button-top"
|
||||
:to this
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this root pause-adjust-distance) 409600.0)
|
||||
(if #f
|
||||
(go (method-of-object this idle-down))
|
||||
(go (method-of-object this idle-up))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this cty-sniper-button))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(while (-> this child)
|
||||
(deactivate (ppointer->process (-> this child)))
|
||||
)
|
||||
((method-of-type process-focusable deactivate) (the-as process-focusable this))
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype cty-sniper-battery (process-focusable)
|
||||
((incoming-attack-id uint32)
|
||||
(actor-group (pointer actor-group))
|
||||
(actor-group-count int32)
|
||||
(known-vulnerable-this-frame symbol)
|
||||
(during-movement-sound sound-id)
|
||||
(run-once symbol)
|
||||
(halted symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
vulnerable
|
||||
die
|
||||
explode
|
||||
)
|
||||
(:methods
|
||||
(cty-sniper-battery-method-32 (_type_) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-cty-sniper-battery cty-sniper-core cty-sniper-core-lod0-jg cty-sniper-core-idle-ja
|
||||
((cty-sniper-core-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 1 0 1.6)
|
||||
)
|
||||
|
||||
(defskelgroup skel-cty-sniper-battery-explode cty-sniper-core cty-sniper-core-explode-lod0-jg cty-sniper-core-explode-idle-ja
|
||||
((cty-sniper-core-explode-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 80)
|
||||
)
|
||||
|
||||
(define *cty-sniper-battery-exploder-params*
|
||||
(new 'static 'joint-exploder-static-params
|
||||
:joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index 3)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index 3)
|
||||
)
|
||||
:collide-spec (collide-spec backgnd)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-sniper-battery-explosion
|
||||
:id 1464
|
||||
:duration (seconds 4)
|
||||
:flags (sp0 sp5)
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 4830 :flags (sp3) :period (seconds 30) :length (seconds 0.017))
|
||||
(sp-item 4831 :period (seconds 30) :length (seconds 0.035))
|
||||
(sp-item 4832 :period (seconds 30) :length (seconds 0.035))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4830
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 10))
|
||||
(:rot-x (degrees 225))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 220.0)
|
||||
(:g 200.0)
|
||||
(:b 40.0)
|
||||
(:a 64.0)
|
||||
(:fade-a -0.21333334)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 40960.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4831
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 50.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 0.4) (meters 0.8))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 30.0)
|
||||
(:a 128.0)
|
||||
(:vel-y (meters 0.083333336) (meters 0.16666667))
|
||||
(:scalevel-x (meters -0.0016666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.28444445 -0.28444445)
|
||||
(:accel-y (meters -0.0016666667))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 1.5))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4832
|
||||
:init-specs ((:texture (specs level-default-sprite))
|
||||
(:num 10.0 10.0)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 2) (meters 6))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 30.0)
|
||||
(:a 128.0)
|
||||
(:vel-y (meters 0.033333335) (meters 0.13333334))
|
||||
(:scalevel-x (meters 0.026666667))
|
||||
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.512 -0.512)
|
||||
(:accel-y (meters -0.0016666667))
|
||||
(:friction 0.75)
|
||||
(:timer (seconds 0.835))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior cty-sniper-battery-handler cty-sniper-battery ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('get-buttons-actor-group)
|
||||
(&-> (-> self actor-group) 0)
|
||||
)
|
||||
(('move-trans)
|
||||
(let ((v0-0 (the-as object (-> self root trans))))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(cond
|
||||
((zero? (-> self actor-group-count))
|
||||
(let ((a1-7 (the-as object (-> arg3 param 1))))
|
||||
(when (!= (-> (the-as attack-info a1-7) id) (-> self incoming-attack-id))
|
||||
(set! (-> self incoming-attack-id) (-> (the-as attack-info a1-7) id))
|
||||
(let ((f30-0 (-> (the-as attack-info a1-7) damage)))
|
||||
(find-offending-process-focusable arg0 (the-as attack-info a1-7))
|
||||
(if (>= f30-0 2.0)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (-> self known-vulnerable-this-frame)
|
||||
(let ((a1-8 (the-as object (-> arg3 param 1))))
|
||||
(when (!= (-> (the-as attack-info a1-8) id) (-> self incoming-attack-id))
|
||||
(set! (-> self incoming-attack-id) (-> (the-as attack-info a1-8) id))
|
||||
(let ((f30-1 (-> (the-as attack-info a1-8) damage)))
|
||||
(find-offending-process-focusable arg0 (the-as attack-info a1-8))
|
||||
(if (>= f30-1 0.0)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('alive)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (cty-sniper-battery)
|
||||
:virtual #t
|
||||
:event cty-sniper-battery-handler
|
||||
:trans (behavior ()
|
||||
(set! (-> self known-vulnerable-this-frame) (cty-sniper-battery-method-32 self))
|
||||
(if (ja-done? 0)
|
||||
(sound-stop (-> self during-movement-sound))
|
||||
(sound-play "bigbutton-move" :id (-> self during-movement-sound) :position #f)
|
||||
)
|
||||
(if (-> self known-vulnerable-this-frame)
|
||||
(go-virtual vulnerable)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((-> self run-once)
|
||||
(ja-no-eval :group! cty-sniper-battery-explode-lod0-mg :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self run-once) #t)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(setup-masks (-> self draw) 0 2)
|
||||
(sleep-code)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate vulnerable (cty-sniper-battery)
|
||||
:virtual #t
|
||||
:event cty-sniper-battery-handler
|
||||
:enter (behavior ()
|
||||
(dotimes (gp-0 (length (-> self actor-group 0)))
|
||||
(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) 'vulnerable)
|
||||
(let ((t9-0 send-event-function)
|
||||
(v1-5 (-> self actor-group 0 data gp-0 actor))
|
||||
)
|
||||
(t9-0
|
||||
(if v1-5
|
||||
(-> v1-5 extra process)
|
||||
)
|
||||
a1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) (process->ppointer self))
|
||||
(set! (-> a1-1 num-params) 0)
|
||||
(set! (-> a1-1 message) 'battery-extend)
|
||||
(let ((t9-2 send-event-function)
|
||||
(v1-17 (-> *game-info* sub-task-list (game-task-node city-sniper-fight-resolution)))
|
||||
)
|
||||
(t9-2
|
||||
(handle->process (if (-> v1-17 manager)
|
||||
(-> v1-17 manager manager)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
a1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(dotimes (gp-0 (length (-> self actor-group 0)))
|
||||
(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) 'invulnerable)
|
||||
(let ((t9-0 send-event-function)
|
||||
(v1-5 (-> self actor-group 0 data gp-0 actor))
|
||||
)
|
||||
(t9-0
|
||||
(if v1-5
|
||||
(-> v1-5 extra process)
|
||||
)
|
||||
a1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(set! (-> self known-vulnerable-this-frame) (cty-sniper-battery-method-32 self))
|
||||
(if (ja-done? 0)
|
||||
(sound-stop (-> self during-movement-sound))
|
||||
(sound-play "bigbutton-move" :id (-> self during-movement-sound) :position #f)
|
||||
)
|
||||
(spawn-from-cspace (-> self part) (-> self node-list data 6))
|
||||
(when (not (-> self known-vulnerable-this-frame))
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 0)
|
||||
(set! (-> a1-2 message) 'battery-retract)
|
||||
(let ((t9-5 send-event-function)
|
||||
(v1-14 (-> *game-info* sub-task-list (game-task-node city-sniper-fight-resolution)))
|
||||
)
|
||||
(t9-5
|
||||
(handle->process (if (-> v1-14 manager)
|
||||
(-> v1-14 manager manager)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
a1-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(setup-masks (-> self draw) 2 0)
|
||||
(ja-no-eval :group! cty-sniper-battery-explode-lod0-jg :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(suspend)
|
||||
(sleep-code)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate die (cty-sniper-battery)
|
||||
:virtual #t
|
||||
:event cty-sniper-battery-handler
|
||||
:trans (behavior ()
|
||||
(spawn-from-cspace (-> self part) (-> self node-list data 6))
|
||||
)
|
||||
:code (behavior ()
|
||||
(sound-stop (-> self during-movement-sound))
|
||||
(when (> (-> self actor-group-count) 0)
|
||||
(dotimes (gp-0 (length (-> self actor-group 0)))
|
||||
(let ((v1-5 (-> self actor-group 0 data gp-0 actor)))
|
||||
(send-event
|
||||
(if v1-5
|
||||
(-> v1-5 extra process)
|
||||
)
|
||||
'die
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(go-virtual explode)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defstate explode (cty-sniper-battery)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('alive)
|
||||
(if (time-elapsed? (-> self state-time) (seconds 0.1))
|
||||
#f
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:code (behavior ()
|
||||
(sound-play "destroy-battery")
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 1464 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1464))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1464))
|
||||
)
|
||||
)
|
||||
(let ((v1-35 (-> self root root-prim)))
|
||||
(set! (-> v1-35 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-35 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(set! (-> self root root-prim local-sphere w) 491520.0)
|
||||
(let ((gp-3 (new 'stack 'joint-exploder-tuning (the-as uint 0))))
|
||||
(set-vector! (-> gp-3 fountain-rand-transv-lo) -40960.0 40960.0 -40960.0 1.0)
|
||||
(set-vector! (-> gp-3 fountain-rand-transv-hi) 40960.0 122880.0 40960.0 1.0)
|
||||
(let ((v1-47 (process-spawn
|
||||
joint-exploder
|
||||
(art-group-get-by-name *level* "skel-cty-sniper-battery-explode" (the-as (pointer level) #f))
|
||||
7
|
||||
gp-3
|
||||
*cty-sniper-battery-exploder-params*
|
||||
:name "joint-exploder"
|
||||
:to self
|
||||
:unk 0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as process-drawable (-> v1-47 0)) root pause-adjust-distance) 409600.0)
|
||||
)
|
||||
)
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defmethod cty-sniper-battery-method-32 ((this cty-sniper-battery))
|
||||
(local-vars (s5-0 symbol))
|
||||
(cond
|
||||
((< (-> this actor-group-count) 1)
|
||||
(set! s5-0 #t)
|
||||
)
|
||||
(else
|
||||
(set! s5-0 #t)
|
||||
(dotimes (s4-0 (length (-> this actor-group 0)))
|
||||
(let ((a0-2 (-> this actor-group 0 data s4-0 actor)))
|
||||
(if (and a0-2 (not (logtest? (-> a0-2 extra perm status) (entity-perm-status subtask-complete))))
|
||||
(set! s5-0 #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this cty-sniper-battery) (arg0 entity-actor))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(let ((s4-0 (new 'process 'collide-shape-moving this (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 2) 0)))
|
||||
(set! (-> s4-0 total-prims) (the-as uint 3))
|
||||
(set! (-> s3-0 prim-core collide-as) (collide-spec enemy))
|
||||
(set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list projectile))
|
||||
(set! (-> s3-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 8192.0)
|
||||
(set! (-> s4-0 root-prim) s3-0)
|
||||
)
|
||||
(let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-12 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-12 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-12 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-12 transform-index) 3)
|
||||
(set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 16384.0)
|
||||
)
|
||||
(let ((v1-14 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-14 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-14 transform-index) 7)
|
||||
(set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 24576.0)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-17 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-17 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-17 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s4-0)
|
||||
)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-cty-sniper-battery" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((v1-25 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16))))
|
||||
(cond
|
||||
((and v1-25 (nonzero? (-> sv-16 elt-count)))
|
||||
(set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count)))
|
||||
(set! (-> this actor-group) (the-as (pointer actor-group) v1-25))
|
||||
)
|
||||
(else
|
||||
(set! (-> this actor-group-count) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this during-movement-sound) (new-sound-id))
|
||||
(set! (-> this run-once) #f)
|
||||
(let ((s5-1 (-> this skel root-channel 0)))
|
||||
(joint-control-channel-group-eval!
|
||||
s5-1
|
||||
(the-as art-joint-anim (-> this draw art-group data 4))
|
||||
num-func-identity
|
||||
)
|
||||
(set! (-> s5-1 frame-num)
|
||||
(the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 4)) frames num-frames) -1))
|
||||
)
|
||||
)
|
||||
(set! (-> this halted) #f)
|
||||
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 1463) this))
|
||||
(logior! (-> this mask) (process-mask enemy))
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
(defbehavior cty-sniper-battery-init-by-other cty-sniper-battery ((arg0 vector) (arg1 quaternion))
|
||||
(let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec jak hit-by-others-list player-list projectile))
|
||||
(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 8192.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! (-> s4-0 event-self) 'touched)
|
||||
(set! (-> self root) s4-0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(quaternion-copy! (-> self root quat) arg1)
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-cty-sniper-battery" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self during-movement-sound) (new-sound-id))
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,972 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defskelgroup skel-citizen-chick citizen-chick citizen-chick-lod0-jg -1
|
||||
((citizen-chick-lod0-mg (meters 20)) (citizen-chick-lod2-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 2 0 3)
|
||||
:shadow citizen-chick-shadow-mg
|
||||
)
|
||||
|
||||
(define *citizen-chick-global-info*
|
||||
(new 'static 'civilian-global-info
|
||||
:knocked (new 'static 'array int32 2 20 22)
|
||||
:knocked-land (new 'static 'array int32 2 21 23)
|
||||
:yellow-hit-anim (new 'static 'inline-array civilian-anim-info 1
|
||||
(new 'static 'civilian-anim-info :anim-index (new 'static 'array int32 2 20 22))
|
||||
)
|
||||
:blue-hit-anim (new 'static 'inline-array civilian-anim-info 3
|
||||
(new 'static 'civilian-anim-info :anim-index (new 'static 'array int32 2 19 18))
|
||||
(new 'static 'civilian-anim-info :anim-index (new 'static 'array int32 2 19 18))
|
||||
(new 'static 'civilian-anim-info :anim-index (new 'static 'array int32 2 19 18))
|
||||
)
|
||||
:anim-cover-head-start 14
|
||||
:anim-cover-head-loop 15
|
||||
:anim-cover-head-end 16
|
||||
:speech-ambient 27
|
||||
:speech-alert 28
|
||||
:speech-cower 29
|
||||
:speech-touched-by-player 30
|
||||
:speech-shot-by-player 31
|
||||
:speech-avoiding-player-vehicle 32
|
||||
:speech-hit-by-player-vehicle 33
|
||||
)
|
||||
)
|
||||
|
||||
(deftype citizen-chick (civilian)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(define *citizen-chick-nav-enemy-info*
|
||||
(new 'static 'nav-enemy-info
|
||||
:use-die-falling #t
|
||||
:use-victory #f
|
||||
:use-jump-blocked #f
|
||||
:debug-draw-neck #f
|
||||
:jump-debug-draw #f
|
||||
:move-to-ground #t
|
||||
:hover-if-no-ground #f
|
||||
:idle-anim-script (new 'static 'inline-array idle-control-frame 2
|
||||
(new 'static 'idle-control-frame
|
||||
:command (idle-control-cmd play)
|
||||
:anim #xa
|
||||
:param0 1
|
||||
:param1 1
|
||||
:param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0))
|
||||
)
|
||||
(new 'static 'idle-control-frame)
|
||||
)
|
||||
:idle-anim 10
|
||||
:notice-anim 10
|
||||
:hostile-anim -1
|
||||
:hit-anim 10
|
||||
:knocked-anim 20
|
||||
:knocked-land-anim 21
|
||||
:die-anim 10
|
||||
:die-falling-anim 10
|
||||
:victory-anim 10
|
||||
:jump-wind-up-anim 4
|
||||
:jump-in-air-anim 4
|
||||
:jump-land-anim 4
|
||||
:neck-joint 5
|
||||
:look-at-joint 5
|
||||
:bullseye-joint 4
|
||||
:notice-distance-delta (meters 0.1)
|
||||
:default-hit-points 1.0
|
||||
:gnd-collide-with (collide-spec backgnd)
|
||||
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
|
||||
:penetrate-knocked (penetrate
|
||||
touch
|
||||
generic-attack
|
||||
lunge
|
||||
flop
|
||||
punch
|
||||
spin
|
||||
roll
|
||||
uppercut
|
||||
bonk
|
||||
tube
|
||||
vehicle
|
||||
flut-attack
|
||||
board
|
||||
mech
|
||||
mech-punch
|
||||
mech-bonk
|
||||
dark-skin
|
||||
dark-punch
|
||||
dark-bomb
|
||||
dark-smack
|
||||
flut
|
||||
shield
|
||||
explode
|
||||
jak-yellow-shot
|
||||
jak-red-shot
|
||||
jak-blue-shot
|
||||
jak-dark-shot
|
||||
enemy-yellow-shot
|
||||
enemy-dark-shot
|
||||
eco-yellow
|
||||
eco-red
|
||||
eco-blue
|
||||
eco-green
|
||||
knocked
|
||||
jak-red-shockwave
|
||||
jak-dark-nuke
|
||||
jak-dark-blackhole
|
||||
emp-blast
|
||||
penetrate38
|
||||
penetrate39
|
||||
penetrate40
|
||||
penetrate41
|
||||
penetrate42
|
||||
penetrate43
|
||||
penetrate44
|
||||
penetrate45
|
||||
penetrate46
|
||||
penetrate47
|
||||
penetrate48
|
||||
penetrate49
|
||||
penetrate50
|
||||
penetrate51
|
||||
penetrate52
|
||||
penetrate53
|
||||
penetrate54
|
||||
penetrate55
|
||||
penetrate56
|
||||
penetrate57
|
||||
penetrate58
|
||||
penetrate59
|
||||
penetrate60
|
||||
penetrate61
|
||||
penetrate64
|
||||
penetrate63
|
||||
)
|
||||
:movement-gravity (meters -100)
|
||||
:friction 0.8
|
||||
:attack-shove-back (meters 3)
|
||||
:attack-shove-up (meters 2)
|
||||
:attack-mode 'generic
|
||||
:attack-damage 2
|
||||
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
|
||||
:knocked-can-land-timeout (seconds 0.1)
|
||||
:knocked-recover-timeout (seconds 4.5)
|
||||
:ragdoll-blend-out-time (seconds 0.25)
|
||||
:ragdoll-rotate-velocity-mult 1.0
|
||||
:jump-height-min (meters 3)
|
||||
:jump-height-factor 0.5
|
||||
:knocked-seek-ry-clamp 2730.6667
|
||||
:knocked-soft-vxz-lo 32768.0
|
||||
:knocked-soft-vxz-hi 53248.0
|
||||
:knocked-soft-vy-lo 20480.0
|
||||
:knocked-soft-vy-hi 40960.0
|
||||
:knocked-medium-vxz-lo 40960.0
|
||||
:knocked-medium-vxz-hi 73728.0
|
||||
:knocked-medium-vy-lo 24576.0
|
||||
:knocked-medium-vy-hi 53248.0
|
||||
:knocked-hard-vxz-lo 53248.0
|
||||
:knocked-hard-vxz-hi 102400.0
|
||||
:knocked-hard-vy-lo 40960.0
|
||||
:knocked-hard-vy-hi 81920.0
|
||||
:knocked-huge-vxz-lo 164659.2
|
||||
:knocked-huge-vxz-hi 249036.8
|
||||
:knocked-huge-vy-lo 183500.8
|
||||
:knocked-huge-vy-hi 217907.2
|
||||
:knocked-yellow-vxz-lo 8192.0
|
||||
:knocked-yellow-vxz-hi 16384.0
|
||||
:knocked-yellow-vy-lo 12288.0
|
||||
:knocked-yellow-vy-hi 24576.0
|
||||
:knocked-red-vxz-lo 12288.0
|
||||
:knocked-red-vxz-hi 24576.0
|
||||
:knocked-red-vy-lo 20480.0
|
||||
:knocked-red-vy-hi 36864.0
|
||||
:knocked-blue-vxz-lo 16384.0
|
||||
:knocked-blue-vxz-hi 32768.0
|
||||
:knocked-blue-vy-lo 16384.0
|
||||
:knocked-blue-vy-hi 32768.0
|
||||
:ragdoll-info (new 'static 'ragdoll-setup
|
||||
:scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:bg-collide-with (collide-spec backgnd player-list)
|
||||
:joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 3
|
||||
:parent-joint -1
|
||||
:geo-tform (new 'static 'vector :z 1.0 :w 14.399715)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 776.6016
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 4
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :z 1.0 :w 32759.936)
|
||||
:geo-tform (new 'static 'vector :x -0.0132 :y 0.103 :z 0.9945 :w 32703.047)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 892.5184
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 5
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.998 :z -0.0627 :w 1005.7045)
|
||||
:geo-tform (new 'static 'vector :x -0.0174 :y 0.085 :z 0.9962 :w 32364.498)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 763.4944
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 6
|
||||
:parent-joint 4
|
||||
:pre-tform (new 'static 'vector :x 0.0652 :z 0.9978 :w 7454.156)
|
||||
:geo-tform (new 'static 'vector :x -0.0365 :y 0.214 :z 0.9761 :w 23936.934)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 561.9712
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 7
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x 0.3949 :z 0.9186 :w 22918.867)
|
||||
:geo-tform (new 'static 'vector :x -0.5186 :y 0.8187 :z 0.2463 :w 10966.448)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 8
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.6318 :z 0.7751 :w 6096.8506)
|
||||
:geo-tform (new 'static 'vector :x 0.2578 :y 0.9617 :z 0.0926 :w 15893.045)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 9
|
||||
:parent-joint 4
|
||||
:pre-tform (new 'static 'vector :x 0.0947 :z -0.9955 :w 7977.8794)
|
||||
:geo-tform (new 'static 'vector :x 0.1172 :y 0.3467 :z 0.9305 :w 41298.84)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 10
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x 0.5223 :z -0.8527 :w 21621.0)
|
||||
:geo-tform (new 'static 'vector :x -0.3996 :y -0.859 :z -0.3197 :w 15644.244)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 11
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.2192 :z -0.9756 :w 7433.6577)
|
||||
:geo-tform (new 'static 'vector :x 0.7974 :y 0.0095 :z 0.6032 :w 34256.594)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 12
|
||||
:parent-joint 3
|
||||
:pre-tform (new 'static 'vector :z 1.0 :w 17.640106)
|
||||
:geo-tform (new 'static 'vector :z 1.0 :w 1112.1277)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 832.3072
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 13
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :z -1.0 :w 13150.417)
|
||||
:geo-tform (new 'static 'vector :x -0.1671 :y -0.0657 :z 0.9837 :w 12017.9)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 524.288
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 14
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.2094 :z 0.9778 :w 11988.609)
|
||||
:geo-tform (new 'static 'vector :x 0.9887 :y -0.1433 :z 0.0422 :w 6040.7266)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 15
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x 0.9963 :z 0.0852 :w 5976.6104)
|
||||
:geo-tform (new 'static 'vector :x -0.8827 :y -0.4697 :z 0.0099 :w 11882.987)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 16
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.9608 :z -0.2772 :w 10351.757)
|
||||
:geo-tform (new 'static 'vector :x -0.826 :y -0.5058 :z -0.2485 :w 11192.42)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 17
|
||||
:parent-joint 12
|
||||
:pre-tform (new 'static 'vector :z 1.0 :w 15361.583)
|
||||
:geo-tform (new 'static 'vector :x -0.0332 :y 0.1941 :z -0.9804 :w 15875.422)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 594.3296
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 18
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.215 :z -0.9766 :w 15500.575)
|
||||
:geo-tform (new 'static 'vector :x 0.7755 :y 0.6147 :z -0.1434 :w 6094.921)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 19
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x 0.9338 :z -0.3575 :w 4780.7783)
|
||||
:geo-tform (new 'static 'vector :x -0.9242 :y 0.3246 :z 0.201 :w 9991.874)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 20
|
||||
:parent-joint -1
|
||||
:pre-tform (new 'static 'vector :x -0.9282 :z 0.372 :w 9409.367)
|
||||
:geo-tform (new 'static 'vector :x -0.934 :y 0.3205 :z 0.1574 :w 10100.427)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 562.7904
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 21
|
||||
:parent-joint 5
|
||||
:pre-tform (new 'static 'vector :x 0.9806 :z -0.1956 :w 1580.9104)
|
||||
:geo-tform (new 'static 'vector :x -0.0195 :y 0.2824 :z 0.959 :w 32647.85)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 696.7296
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 22
|
||||
:parent-joint 8
|
||||
:pre-tform (new 'static 'vector :x 0.3059 :z 0.952 :w 7279.739)
|
||||
:geo-tform (new 'static 'vector :x 0.344 :y 0.9317 :z 0.1158 :w 25729.506)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 371.9168
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 23
|
||||
:parent-joint 8
|
||||
:pre-tform (new 'static 'vector :x 0.4303 :z 0.9026 :w 6036.6484)
|
||||
:geo-tform (new 'static 'vector :x 0.2319 :y 0.9724 :z 0.0232 :w 30738.059)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 289.9968
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 24
|
||||
:parent-joint 8
|
||||
:pre-tform (new 'static 'vector :x 0.922 :z -0.3869 :w 3968.6052)
|
||||
:geo-tform (new 'static 'vector :x 0.0273 :y 0.8678 :z 0.4961 :w 31513.57)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 280.576
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 25
|
||||
:parent-joint 11
|
||||
:pre-tform (new 'static 'vector :x -0.1937 :z -0.981 :w 7246.88)
|
||||
:geo-tform (new 'static 'vector :x -0.014 :y 0.9998 :z 0.0019 :w 38307.16)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 335.4624
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 26
|
||||
:parent-joint 11
|
||||
:pre-tform (new 'static 'vector :x -0.1631 :z -0.9865 :w 5719.964)
|
||||
:geo-tform (new 'static 'vector :x -0.2341 :y 0.9715 :z 0.0353 :w 35807.234)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 299.008
|
||||
)
|
||||
(new 'static 'ragdoll-joint-setup
|
||||
:joint-index 27
|
||||
:parent-joint 11
|
||||
:pre-tform (new 'static 'vector :x 0.7102 :z 0.7039 :w 1501.9758)
|
||||
:geo-tform (new 'static 'vector :x 0.0925 :y 0.7746 :z 0.6255 :w 34903.016)
|
||||
:axial-slop 1721.3394
|
||||
:max-angle 3810.445
|
||||
:coll-rad 316.2112
|
||||
)
|
||||
)
|
||||
)
|
||||
:shadow-size (meters 2)
|
||||
:shadow-max-y (meters 1)
|
||||
:shadow-min-y (meters -1)
|
||||
:shadow-locus-dist (meters 150)
|
||||
:gem-joint -1
|
||||
:gem-offset (new 'static 'sphere :r 163840.0)
|
||||
:knocked-off #t
|
||||
:callback-info #f
|
||||
:use-momentum #f
|
||||
:use-frustration #t
|
||||
:use-stop-chase #f
|
||||
:use-circling #f
|
||||
:use-pacing #f
|
||||
:walk-anim 4
|
||||
:turn-anim 4
|
||||
:run-anim 7
|
||||
:taunt-anim -1
|
||||
:run-travel-speed (meters 12)
|
||||
:run-acceleration (meters 2)
|
||||
:run-turning-acceleration (meters 30)
|
||||
:walk-travel-speed (meters 3)
|
||||
:walk-acceleration (meters 1)
|
||||
:walk-turning-acceleration (meters 8)
|
||||
:maximum-rotation-rate (degrees 720)
|
||||
:frustration-distance (meters 8)
|
||||
:frustration-time (seconds 4)
|
||||
:blocked-time (seconds 0.3)
|
||||
:circle-dist-lo 20480.0
|
||||
:circle-dist-hi 61440.0
|
||||
:nav-mesh #f
|
||||
)
|
||||
)
|
||||
|
||||
(set! (-> *citizen-chick-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
|
||||
|
||||
(defmethod coin-flip? ((this citizen-chick))
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod get-inv-mass ((this citizen-chick))
|
||||
0.5
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs degrees.
|
||||
(defmethod get-knockback-angle ((this citizen-chick))
|
||||
(let ((f30-0 (quaternion-y-angle (-> this root quat))))
|
||||
(case (-> this incoming knocked-type)
|
||||
(((knocked-type yellow-shot) (knocked-type blue-shot))
|
||||
(let ((a0-5 (the-as process-focusable (handle->process (-> this focus handle)))))
|
||||
(when a0-5
|
||||
(get-trans a0-5 0)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> this root transv quad))
|
||||
(if (< (vector-dot (-> this root transv) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))
|
||||
0.0
|
||||
)
|
||||
(vector-negate-in-place! s5-0)
|
||||
)
|
||||
(set! f30-0 (atan (-> s5-0 x) (-> s5-0 z)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-1 quad) (-> this root transv quad))
|
||||
(if (< (vector-dot s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) 0.0)
|
||||
(vector-negate-in-place! s5-1)
|
||||
)
|
||||
(let* ((f28-0 (atan (-> s5-1 x) (-> s5-1 z)))
|
||||
(f1-2 (deg- f30-0 f28-0))
|
||||
(f2-0 (fabs f1-2))
|
||||
(f0-8 (-> this enemy-info knocked-seek-ry-clamp))
|
||||
)
|
||||
(when (and (< f0-8 f2-0) (< f2-0 (- 32768.0 f0-8)))
|
||||
(set! f30-0 (+ (cond
|
||||
((< f2-0 16384.0)
|
||||
(if (>= f1-2 0.0)
|
||||
f0-8
|
||||
(- f0-8)
|
||||
)
|
||||
)
|
||||
((>= f1-2 0.0)
|
||||
(- 32768.0 f0-8)
|
||||
)
|
||||
(else
|
||||
(+ -32768.0 f0-8)
|
||||
)
|
||||
)
|
||||
f28-0
|
||||
)
|
||||
)
|
||||
(if (< f30-0 0.0)
|
||||
(set! f30-0 (+ 65536.0 f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as degrees f30-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod knocked-anim-handler ((this citizen-chick) (arg0 int) (arg1 enemy-knocked-info))
|
||||
(case arg0
|
||||
((1)
|
||||
(case (-> this incoming knocked-type)
|
||||
(((knocked-type blue-shot))
|
||||
(let ((s5-0 (ja-done? 0)))
|
||||
(let ((a0-4 (-> this skel root-channel 0)))
|
||||
(set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1)))
|
||||
(set! (-> a0-4 param 1) (-> arg1 anim-speed))
|
||||
(joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
(when s5-0
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(let ((a0-6 (-> this skel root-channel 0)))
|
||||
(set! (-> a0-6 frame-group)
|
||||
(the-as art-joint-anim (-> this draw art-group data (-> this info knocked (-> this hit-face))))
|
||||
)
|
||||
(set! (-> a0-6 param 0)
|
||||
(the float
|
||||
(+ (-> (the-as art-joint-anim (-> this draw art-group data (-> this info knocked (-> this hit-face))))
|
||||
frames
|
||||
num-frames
|
||||
)
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a0-6 param 1) (-> arg1 anim-speed))
|
||||
(set! (-> a0-6 frame-num) 3.0)
|
||||
(joint-control-channel-group!
|
||||
a0-6
|
||||
(the-as art-joint-anim (-> this draw art-group data (-> this info knocked (-> this hit-face))))
|
||||
num-func-seek!
|
||||
)
|
||||
)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type nav-enemy knocked-anim-handler) this arg0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type nav-enemy knocked-anim-handler) this arg0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod knocked-anim ((this citizen-chick) (arg0 enemy-knocked-info))
|
||||
(case (-> this incoming knocked-type)
|
||||
(((knocked-type yellow-shot))
|
||||
(ja-channel-push! 1 (seconds 0.01))
|
||||
(let* ((a2-0 (ash 1 (-> this info prev-yellow-hit)))
|
||||
(v1-3 (enemy-method-131 this 1 a2-0))
|
||||
(a1-7
|
||||
(-> this
|
||||
draw
|
||||
art-group
|
||||
data
|
||||
(-> (the-as civilian-global-info (+ (+ (* (-> this hit-face) 4) (* v1-3 8)) (the-as uint (-> this info))))
|
||||
yellow-hit-anim
|
||||
0
|
||||
anim-index-front
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this info prev-yellow-hit) v1-3)
|
||||
(let ((a0-15 (-> this skel root-channel 0)))
|
||||
(set! (-> a0-15 frame-group) (the-as art-joint-anim a1-7))
|
||||
(set! (-> a0-15 param 0) (the float (+ (-> (the-as art-joint-anim a1-7) frames num-frames) -1)))
|
||||
(set! (-> a0-15 param 1) (-> arg0 anim-speed))
|
||||
(set! (-> a0-15 frame-num) 0.0)
|
||||
(joint-control-channel-group! a0-15 (the-as art-joint-anim a1-7) num-func-seek!)
|
||||
)
|
||||
)
|
||||
)
|
||||
(((knocked-type blue-shot))
|
||||
(ja-channel-push! 1 (seconds 0.01))
|
||||
(let* ((a2-2 (ash 1 (-> this info prev-blue-hit)))
|
||||
(v1-12 (enemy-method-131 this 3 a2-2))
|
||||
(a1-14
|
||||
(-> this
|
||||
draw
|
||||
art-group
|
||||
data
|
||||
(-> (the-as civilian-global-info (+ (+ (* (-> this hit-face) 4) (* v1-12 8)) (the-as uint (-> this info))))
|
||||
blue-hit-anim
|
||||
0
|
||||
anim-index-front
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this info prev-blue-hit) v1-12)
|
||||
(let ((a0-30 (-> this skel root-channel 0)))
|
||||
(set! (-> a0-30 frame-group) (the-as art-joint-anim a1-14))
|
||||
(set! (-> a0-30 param 0) (the float (+ (-> (the-as art-joint-anim a1-14) frames num-frames) -1)))
|
||||
(set! (-> a0-30 param 1) 1.0)
|
||||
(set! (-> a0-30 frame-num) 0.0)
|
||||
(joint-control-channel-group! a0-30 (the-as art-joint-anim a1-14) num-func-seek!)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s4-0 (if (= (-> this incoming knocked-type) (knocked-type explode-or-darkjak))
|
||||
(-> this draw art-group data (-> this info knocked (-> this hit-face)))
|
||||
(-> this draw art-group data (-> this info knocked (-> this hit-face)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-channel-push! 1 (seconds 0.01))
|
||||
(let ((a0-39 (-> this skel root-channel 0)))
|
||||
(set! (-> a0-39 frame-group) (the-as art-joint-anim s4-0))
|
||||
(set! (-> a0-39 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) frames num-frames) -1)))
|
||||
(set! (-> a0-39 param 1) (-> arg0 anim-speed))
|
||||
(set! (-> a0-39 frame-num) 0.0)
|
||||
(joint-control-channel-group! a0-39 (the-as art-joint-anim s4-0) num-func-seek!)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod knocked-land-anim ((this citizen-chick) (arg0 enemy-knocked-info))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(let ((a0-2 (-> this skel root-channel 0)))
|
||||
(set! (-> a0-2 frame-group)
|
||||
(the-as art-joint-anim (-> this draw art-group data (-> this info knocked-land (-> this hit-face))))
|
||||
)
|
||||
(set! (-> a0-2 param 0)
|
||||
(the float
|
||||
(+ (-> (the-as art-joint-anim (-> this draw art-group data (-> this info knocked-land (-> this hit-face))))
|
||||
frames
|
||||
num-frames
|
||||
)
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a0-2 param 1) (-> arg0 anim-speed))
|
||||
(set! (-> a0-2 frame-num) 0.0)
|
||||
(joint-control-channel-group!
|
||||
a0-2
|
||||
(the-as art-joint-anim (-> this draw art-group data (-> this info knocked-land (-> this hit-face))))
|
||||
num-func-seek!
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
(defstate knocked (citizen-chick)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type civilian knocked) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (the-as collide-shape-prim-group (-> self root root-prim))))
|
||||
(logior! (-> v1-5 child 0 prim-core action) (collide-action no-standon))
|
||||
(logclear! (-> v1-5 child 1 prim-core action) (collide-action no-standon))
|
||||
(set! (-> v1-5 child 1 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-5 child 1 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
|
||||
(defstate get-up-front (citizen-chick)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type civilian get-up-front) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (-> self root root-prim)))
|
||||
(logclear! (-> (the-as collide-shape-prim-group v1-5) child 0 prim-core action) (collide-action no-standon))
|
||||
(logior! (-> (the-as collide-shape-prim-group v1-5) child 1 prim-core action) (collide-action no-standon))
|
||||
(set! (-> (the-as collide-shape-prim-group v1-5) child 1 prim-core collide-as) (collide-spec civilian))
|
||||
(set! (-> (the-as collide-shape-prim-group v1-5) child 1 prim-core collide-with)
|
||||
(collide-spec backgnd jak civilian enemy hit-by-others-list player-list)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate get-up-back (citizen-chick)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type civilian get-up-back) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (-> self root root-prim)))
|
||||
(logclear! (-> (the-as collide-shape-prim-group v1-5) child 0 prim-core action) (collide-action no-standon))
|
||||
(logior! (-> (the-as collide-shape-prim-group v1-5) child 1 prim-core action) (collide-action no-standon))
|
||||
(set! (-> (the-as collide-shape-prim-group v1-5) child 1 prim-core collide-as) (collide-spec civilian))
|
||||
(set! (-> (the-as collide-shape-prim-group v1-5) child 1 prim-core collide-with)
|
||||
(collide-spec backgnd jak civilian enemy hit-by-others-list player-list)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate wait (citizen-chick)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(let ((f30-1 (/ 1.0 (rand-vu-float-range 10.0 13.0))))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(until #f
|
||||
(ja-no-eval :group! citizen-chick-idle-ja :num! (seek! max f30-1) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-enemy-collision! ((this citizen-chick))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s5-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(set! (-> s5-0 penetrated-by) (penetrate
|
||||
generic-attack
|
||||
lunge
|
||||
flop
|
||||
punch
|
||||
spin
|
||||
roll
|
||||
uppercut
|
||||
bonk
|
||||
tube
|
||||
flut-attack
|
||||
board
|
||||
mech-punch
|
||||
dark-punch
|
||||
dark-smack
|
||||
flut
|
||||
)
|
||||
)
|
||||
(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 civilian))
|
||||
(set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak player-list))
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid no-standon))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0)
|
||||
(set! (-> s5-0 root-prim) s4-0)
|
||||
)
|
||||
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-13 prim-core collide-as) (collide-spec civilian))
|
||||
(set! (-> v1-13 prim-core collide-with) (collide-spec backgnd jak player-list))
|
||||
(set! (-> v1-13 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-13 local-sphere) 0.0 4096.0 0.0 4096.0)
|
||||
)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core collide-as) (collide-spec civilian))
|
||||
(set! (-> v1-15 prim-core collide-with) (collide-spec backgnd jak player-list))
|
||||
(set! (-> v1-15 prim-core action) (collide-action solid no-standon))
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 9830.4 0.0 4096.0)
|
||||
)
|
||||
(set! (-> s5-0 nav-radius) 4096.0)
|
||||
(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! (-> s5-0 max-iteration-count) (the-as uint 3))
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-enemy! ((this citizen-chick))
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-citizen-chick" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(init-enemy-defaults! this *citizen-chick-nav-enemy-info*)
|
||||
(let ((v1-5 (-> this nav)))
|
||||
(set! (-> v1-5 speed-scale) 1.0)
|
||||
)
|
||||
0
|
||||
(set! (-> this draw lod-set lod 0 dist) 204800.0)
|
||||
(set! (-> this draw lod-set lod 1 dist) 491520.0)
|
||||
(set! (-> this info) *citizen-chick-global-info*)
|
||||
(try-update-focus (-> this focus) *target* this)
|
||||
(set-vector! (-> this neck twist-max) 10922.667 18204.445 0.0 1.0)
|
||||
(set! (-> this anim-shuffle) 26)
|
||||
(let ((v1-18 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-18)
|
||||
(set! (-> this anim-walk) 4)
|
||||
(set! (-> this dist-walk-anim) 15728.64)
|
||||
(set! (-> this speed-walk) 14745.6)
|
||||
)
|
||||
((= v1-18 1)
|
||||
(set! (-> this anim-walk) 5)
|
||||
(set! (-> this dist-walk-anim) 8736.768)
|
||||
(set! (-> this speed-walk) 8192.0)
|
||||
)
|
||||
((= v1-18 2)
|
||||
(set! (-> this anim-walk) 6)
|
||||
(set! (-> this dist-walk-anim) 15728.64)
|
||||
(set! (-> this speed-walk) 12288.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-33 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-33)
|
||||
(set! (-> this anim-panic-run) 11)
|
||||
)
|
||||
((= v1-33 1)
|
||||
(set! (-> this anim-panic-run) 11)
|
||||
)
|
||||
((= v1-33 2)
|
||||
(set! (-> this anim-panic-run) 7)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-39 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-39)
|
||||
(set! (-> this dist-run-anim) 26214.4)
|
||||
(set! (-> this anim-run) 7)
|
||||
)
|
||||
((= v1-39 1)
|
||||
(set! (-> this dist-run-anim) 28385.28)
|
||||
(set! (-> this anim-run) 8)
|
||||
)
|
||||
((= v1-39 2)
|
||||
(set! (-> this dist-run-anim) 26214.4)
|
||||
(set! (-> this anim-run) 9)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this speed-run) 49152.0)
|
||||
(set! (-> this anim-on-ground) 13)
|
||||
(set! (-> this anim-dive) 17)
|
||||
(set! (-> this anim-get-up-back) 25)
|
||||
(set! (-> this anim-get-up-front) 24)
|
||||
(let ((f30-0 (rnd-float-range this 1.0 1.25))
|
||||
(f0-17 (rnd-float-range this 1.0 1.25))
|
||||
)
|
||||
(set-vector! (-> this root scale) f0-17 f30-0 f0-17 1.0)
|
||||
)
|
||||
(let ((f0-19 (rnd-float-range this 0.9 1.0)))
|
||||
(set-vector! (-> this draw color-mult) f0-19 f0-19 f0-19 1.0)
|
||||
)
|
||||
(set! (-> this water-anim) 12)
|
||||
(logior! (-> this flags) (citizen-flag female))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod citizen-method-194 ((this citizen-chick))
|
||||
(let ((t9-0 (method-of-type civilian citizen-method-194)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this dive-reaction) (* 0.2 (rand-vu)))
|
||||
(logclear! (-> this mask) (process-mask enemy))
|
||||
(setup-masks (-> this draw) 0 -1)
|
||||
(setup-masks (-> this draw) 16 0)
|
||||
(setup-masks (-> this draw) 8 0)
|
||||
(let ((v1-11 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-11)
|
||||
(setup-masks (-> this draw) 32 0)
|
||||
)
|
||||
((= v1-11 1)
|
||||
(setup-masks (-> this draw) #x4000 0)
|
||||
)
|
||||
((= v1-11 2)
|
||||
(setup-masks (-> this draw) #x8000 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-20)
|
||||
(setup-masks (-> this draw) 64 0)
|
||||
)
|
||||
((= v1-20 1)
|
||||
(setup-masks (-> this draw) 1024 0)
|
||||
)
|
||||
((= v1-20 2)
|
||||
(setup-masks (-> this draw) #x10000 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-29 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-29)
|
||||
(setup-masks (-> this draw) 4 0)
|
||||
)
|
||||
((= v1-29 1)
|
||||
(setup-masks (-> this draw) 512 0)
|
||||
)
|
||||
((= v1-29 2)
|
||||
(setup-masks (-> this draw) 4096 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-38 (rnd-int this 3)))
|
||||
(cond
|
||||
((zero? v1-38)
|
||||
(setup-masks (-> this draw) 2 0)
|
||||
(let ((v1-42 (rnd-int this 2)))
|
||||
(cond
|
||||
((zero? v1-42)
|
||||
(setup-masks (-> this draw) 128 0)
|
||||
)
|
||||
((= v1-42 1)
|
||||
(setup-masks (-> this draw) 8192 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-38 1)
|
||||
(setup-masks (-> this draw) 256 0)
|
||||
)
|
||||
((= v1-38 2)
|
||||
(setup-masks (-> this draw) 2048 0)
|
||||
(let ((v1-54 (rnd-int this 2)))
|
||||
(cond
|
||||
((zero? v1-54)
|
||||
(setup-masks (-> this draw) 128 0)
|
||||
)
|
||||
((= v1-54 1)
|
||||
(setup-masks (-> this draw) 8192 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> this flags) (citizen-flag female))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,287 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype citizen-enemy (citizen)
|
||||
((next-update-target time-frame)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:methods
|
||||
(set-traffic-danger (_type_) none)
|
||||
(find-new-focus (_type_) object)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod enemy-common-post ((this citizen-enemy))
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
(set! (-> a1-0 options) (overlaps-others-options))
|
||||
(set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter))
|
||||
(set! (-> a1-0 tlist) *touching-list*)
|
||||
(find-overlapping-shapes (-> this root) a1-0)
|
||||
)
|
||||
(when (and (not (focus-test? this disable dead ignore inactive))
|
||||
(< (-> this next-update-target) (current-time))
|
||||
(not (logtest? (enemy-flag lock-focus) (-> this enemy-flags)))
|
||||
(-> this next-state)
|
||||
(= (-> this next-state name) 'active)
|
||||
)
|
||||
(find-new-focus this)
|
||||
(set! (-> this next-update-target) (+ (current-time) (seconds 0.2)))
|
||||
(set-traffic-danger this)
|
||||
)
|
||||
((method-of-type citizen enemy-common-post) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod send-attack-on-jump-or-knocked ((this citizen-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
((and (-> this next-state) (let ((v1-3 (-> this next-state name)))
|
||||
(or (= v1-3 'knocked) (= v1-3 'jump))
|
||||
)
|
||||
)
|
||||
((method-of-type citizen send-attack-on-jump-or-knocked) this arg0 arg1)
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-6 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask guard civilian) (-> arg0 mask))
|
||||
(and v1-6
|
||||
(not (logtest? (-> (the-as process-focusable v1-6) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(-> this root)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> this persistent-attack-id)
|
||||
(-> this attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(send-event arg0 'touch (-> arg1 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod event-handler ((this citizen-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('event-death)
|
||||
#f
|
||||
)
|
||||
(('effect-control)
|
||||
(let ((a0-3 (-> arg3 param 0)))
|
||||
(cond
|
||||
((string= (the-as string a0-3) "death-default")
|
||||
(cond
|
||||
((< 0.0 (-> this hit-points))
|
||||
#t
|
||||
)
|
||||
(else
|
||||
(let ((v1-2 (-> this root root-prim)))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-2 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('end-task)
|
||||
(let ((v0-0 (the-as object (logclear (-> this flags) (citizen-flag persistent)))))
|
||||
(set! (-> this flags) (the-as citizen-flag v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type citizen event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod set-traffic-danger ((this citizen-enemy))
|
||||
(let ((a1-0 (new 'stack-no-clear 'traffic-danger-info)))
|
||||
(set! (-> a1-0 sphere quad) (-> this root trans quad))
|
||||
(set! (-> a1-0 sphere r) 40960.0)
|
||||
(set! (-> a1-0 velocity quad) (-> this root transv quad))
|
||||
(set! (-> a1-0 notify-radius) 122880.0)
|
||||
(set! (-> a1-0 danger-level) 1.0)
|
||||
(set! (-> a1-0 decay-rate) 0.0)
|
||||
(set! (-> a1-0 flags) (the-as uint 1))
|
||||
(set! (-> a1-0 danger-type) (the-as uint 7))
|
||||
(set! (-> a1-0 handle) (process->handle this))
|
||||
(add-danger (-> this controller traffic) a1-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod find-new-focus ((this citizen-enemy))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> this root trans quad))
|
||||
(set! (-> s5-0 w) 122880.0)
|
||||
(let ((s4-0 (the-as process-drawable #f)))
|
||||
(let ((f30-0 122880.0))
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 64)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 64))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(a0-6 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when a0-6
|
||||
(let* ((s0-0 (-> a0-6 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s1-1
|
||||
(!= this s1-1)
|
||||
(not (focus-test? (the-as process-focusable s1-1) inactive))
|
||||
(not (focus-test? (the-as process-focusable s1-1) disable))
|
||||
(not (logtest? (process-mask enemy) (-> s1-1 mask)))
|
||||
(not (logtest? (process-mask crate) (-> s1-1 mask)))
|
||||
(not (logtest? (process-mask vehicle) (-> s1-1 mask)))
|
||||
s1-1
|
||||
(not (logtest? (-> (the-as process-focusable s1-1) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
(let ((f0-1 (vector-vector-xz-distance (-> this root trans) (-> s1-1 root trans))))
|
||||
(when (or (not s4-0) (< f0-1 f30-0))
|
||||
(set! s4-0 s1-1)
|
||||
(set! f30-0 f0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and *target* (< (vector-vector-distance (target-pos 0) s5-0) f30-0))
|
||||
(set! s4-0 *target*)
|
||||
)
|
||||
)
|
||||
(when s4-0
|
||||
(try-update-focus (-> this focus) (the-as process-focusable s4-0) this)
|
||||
(go-hostile this)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defstate active (citizen-enemy)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
(let ((f30-0 (rnd-float-range self 0.8 1.2)))
|
||||
(until #f
|
||||
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim))
|
||||
:num! (seek! max f30-0)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
(defstate inactive (citizen-enemy)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(when (-> self minimap)
|
||||
(logior! (-> self minimap flags) (minimap-flag fade-out))
|
||||
(set! (-> self minimap) #f)
|
||||
)
|
||||
(let ((t9-0 (-> (method-of-type citizen inactive) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod citizen-method-194 ((this citizen-enemy))
|
||||
(let ((t9-0 (method-of-type citizen citizen-method-194)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(if (-> this skel effect)
|
||||
(logior! (-> this skel effect flags) (effect-control-flag ecf0))
|
||||
)
|
||||
(logior! (-> this mask) (process-mask enemy))
|
||||
(reset-to-collide-spec (-> this focus) (collide-spec jak civilian player-list bot-targetable jak-vehicle))
|
||||
(let ((v1-12 (-> this nav)))
|
||||
(set! (-> v1-12 sphere-mask) (the-as uint #x1000e8))
|
||||
)
|
||||
0
|
||||
(set! (-> this anim-shuffle) (-> this enemy-info walk-anim))
|
||||
(set! (-> this anim-walk) (-> this enemy-info walk-anim))
|
||||
(set! (-> this speed-walk) (-> this enemy-info walk-travel-speed))
|
||||
(set! (-> this dist-walk-anim) (-> this enemy-info walk-travel-speed))
|
||||
(set! (-> this anim-run) (-> this enemy-info run-anim))
|
||||
(set! (-> this dist-run-anim) (-> this enemy-info run-travel-speed))
|
||||
(set! (-> this speed-run) (-> this enemy-info run-travel-speed))
|
||||
(set! (-> this fated-time) 0)
|
||||
(logior! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
||||
(logior! (-> this focus-status) (focus-status dangerous))
|
||||
(logior! (-> this enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> this enemy-flags) (enemy-flag trackable trackable-backup))
|
||||
(logclear! (-> this focus-status) (focus-status dead))
|
||||
(logior! (-> this enemy-flags) (enemy-flag attackable attackable-backup))
|
||||
(if (not (-> this minimap))
|
||||
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod go-die ((this citizen-enemy))
|
||||
((method-of-type nav-enemy go-die) this)
|
||||
)
|
||||
|
||||
(defmethod go-hostile ((this citizen-enemy))
|
||||
(if (not (and (-> this next-state) (= (-> this next-state name) 'hostile)))
|
||||
(go (method-of-object this hostile))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod go-stare ((this citizen-enemy))
|
||||
(go (method-of-object this active))
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,104 @@
|
||||
;; name in dgo: citizen-h
|
||||
;; dgos: DESRESC, WWD, CWI
|
||||
|
||||
;; +++citizen-flag
|
||||
(defenum citizen-flag
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(persistent)
|
||||
(run-mode)
|
||||
(shuffle-mode)
|
||||
(in-pursuit)
|
||||
(hostile)
|
||||
(target-in-sight)
|
||||
(sticky-weapon)
|
||||
(knocked-out-car)
|
||||
(knocked-out-bike)
|
||||
(dark-guard)
|
||||
(female)
|
||||
(in-formation)
|
||||
(neck-no-auto-look-at)
|
||||
(talking)
|
||||
(in-mission)
|
||||
)
|
||||
;; ---citizen-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype citizen (nav-enemy)
|
||||
((self citizen :override)
|
||||
(ppointer (pointer citizen) :override)
|
||||
(flags citizen-flag)
|
||||
(traffic-id int8)
|
||||
(hit-by-player-count int8)
|
||||
(gnd-height float)
|
||||
(speed-scale float)
|
||||
(controller vehicle-controller :inline)
|
||||
(squad squad-control)
|
||||
(danger-pos sphere :inline)
|
||||
(dest-point vector :inline :overlay-at (-> controller turn-exit-point))
|
||||
(vehicle handle)
|
||||
(formation handle :overlay-at vehicle)
|
||||
(formation-index int8)
|
||||
(anim-shuffle int32)
|
||||
(dist-walk-anim float)
|
||||
(speed-walk float)
|
||||
(anim-walk int32)
|
||||
(dist-run-anim float)
|
||||
(speed-run float)
|
||||
(anim-run int32)
|
||||
(travel-anim-scale-speed float)
|
||||
(water-anim int32)
|
||||
(interp float)
|
||||
(last-danger-time time-frame)
|
||||
(next-time-look-at time-frame)
|
||||
(stop-time-look-at time-frame)
|
||||
(wait-return-state (state citizen))
|
||||
(wait-time time-frame)
|
||||
(shield-handle handle)
|
||||
(cp-valid? symbol)
|
||||
(cp-sphere sphere :inline)
|
||||
(cp-vec vector :inline)
|
||||
(cp-next-time time-frame)
|
||||
(cp-exit-time time-frame)
|
||||
(cp-force vector :inline)
|
||||
(cp-plane plane :inline)
|
||||
(cp-factor float)
|
||||
(faction-mode uint8)
|
||||
(attacker-info city-attacker-info)
|
||||
(mission-squad mission-squad-control)
|
||||
(probe-counter uint32)
|
||||
)
|
||||
(:state-methods
|
||||
wait
|
||||
inactive
|
||||
in-ditch
|
||||
)
|
||||
(:methods
|
||||
(init-enemy-defaults! (_type_ nav-enemy-info) none :replace)
|
||||
(set-squad (_type_) none)
|
||||
(citizen-method-194 (_type_) none)
|
||||
(citizen-method-195 (_type_) none)
|
||||
(go-inactive (_type_) none)
|
||||
(find-segment (_type_ vector vector) nav-segment)
|
||||
(nav-segment-callback (_type_ vector traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none)
|
||||
(citizen-method-199 (_type_ nav-segment) none)
|
||||
(citizen-method-200 (_type_) symbol)
|
||||
(citizen-method-201 (_type_ vector) none)
|
||||
(citizen-method-202 (_type_ vector vector) none)
|
||||
(citizen-method-203 (_type_ vector) none)
|
||||
(gen-clear-path (_type_) nav-segment)
|
||||
(citizen-method-205 (_type_) none)
|
||||
(citizen-method-206 (_type_) none)
|
||||
(citizen-method-207 (_type_ vector float) nav-segment)
|
||||
(citizen-method-208 (_type_ vector) none)
|
||||
(get-run-anim (_type_) int)
|
||||
(citizen-method-210 (_type_ int process) none)
|
||||
(set-alert-level (_type_ int) none)
|
||||
(go-from-behavior (_type_ traffic-object-spawn-params) none)
|
||||
(citizen-method-213 (_type_) none)
|
||||
(citizen-method-214 (_type_ nav-control vector) none)
|
||||
(citizen-method-215 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user