mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 18:23:39 -04:00
decomp3: font widescreen and shadow hacks, generic renderer, misc files (#3483)
- `pecker-ingame` - `des-bbush-tasks` - `des-burning-bush` - `des-bush-part` - `des-bush` - `mh-centipede` - `mh-centipede-part` - `mh-wasp` - `mh-wasp-part` - `needle-fish` - `des-bush-time-chase` - `timer-path` - `mission-squad-control-h` - `mh-bat` - `hover-nav-factoryd` - `hover-nav-factoryc` - `conveyor` - `fac-part` - `factory-part` - `factoryc-mood` - `factoryc-obs` - `factoryc-obs2` - `lfaccar-init` - `factory-boss-part` - `factory-boss-scenes` - `factory-boss-setup` - `factory-boss-states` - `factory-mood` - `factoryc-manager` - `lfacrm1-mood` - `lfacrm2-mood` - `missile-bot` - `sew-laser-turret` - `ai-task-h` - `ash-h` - `ash-shot` - `ash-states` - `ash-task` - `ash` - `bot-h` - `bot-states` - `bot` - `ash-oasis-course` - `oasis-defense` - `comb-field` - `comb-mood` - `comb-obs` - `comb-part` - `comb-scenes` - `comb-sentry` - `comb-travel` - `comba-init` - `combx-scenes` - `h-sled` - `destroy-dark-eco` - `fac-gunturret` - `fac-robotank-turret` - `fac-robotank` - `fac-tower` - `factory-h` - `factory-hud` - `factory-manager` - `factorya-init` - `ffight-projectile` - `ftank-projectile` - `fturret-projectile` - `h-warf` - `warf-projectile`
This commit is contained in:
+1903
-2009
File diff suppressed because it is too large
Load Diff
@@ -777,5 +777,86 @@
|
||||
[7, "(function process-tree object)"],
|
||||
[8, "(function process-tree object)"],
|
||||
[9, "(function process-tree object)"]
|
||||
],
|
||||
"des-burning-bush": [[37, "(function symbol)"]],
|
||||
"mh-wasp": [
|
||||
[9, "(function mh-wasp cspace float float vector vector int none)"]
|
||||
],
|
||||
"mh-bat": [
|
||||
[1, "(function cspace transformq none)"],
|
||||
[21, "(function object :behavior mh-bat)"],
|
||||
[26, "(function object :behavior mh-bat)"],
|
||||
[30, "(function object :behavior mh-bat)"],
|
||||
[34, "(function object :behavior mh-bat)"],
|
||||
[39, "(function object :behavior mh-bat)"]
|
||||
],
|
||||
"factoryc-obs2": [
|
||||
[67, "(function (pointer joint-exploder) :behavior fac-break-floor)"]
|
||||
],
|
||||
"factory-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 process-drawable 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)"]
|
||||
],
|
||||
"factory-boss-setup": [[37, "(function object :behavior manipy)"]],
|
||||
"factory-boss-scenes": [
|
||||
[1, "(function none :behavior scene-player)"],
|
||||
[2, "(function none :behavior scene-player)"]
|
||||
],
|
||||
"bot": [[25, "(function gui-connection symbol :behavior bot)"]],
|
||||
"oasis-defense": [
|
||||
[4, "(function collide-shape-prim none)"],
|
||||
[11, "(function collide-shape-prim none)"]
|
||||
],
|
||||
"ash-oasis-course": [
|
||||
[0, "(function ashelin-oasis object)"],
|
||||
[1, "(function ashelin-oasis object)"],
|
||||
[2, "(function asht-wait-spot ashelin-oasis object)"],
|
||||
[3, "(function ashelin-oasis symbol)"]
|
||||
],
|
||||
"comb-obs": [
|
||||
[16, "(function collide-shape-prim none)"],
|
||||
[33, "(function collide-shape-prim none)"],
|
||||
[49, "(function collide-shape-prim none)"]
|
||||
],
|
||||
"comb-sentry": [[19, "(function collide-shape-prim none)"]],
|
||||
"comb-field": [[5, "(function symbol)"]],
|
||||
"comb-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)"]
|
||||
],
|
||||
"railx-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)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
"was-pre-heart": "neo-satellite-heart-ag",
|
||||
"was-pre-beam": "neo-satellite-game-ring-ag",
|
||||
"was-pre-bubble": "neo-satellite-ps-symbols-ag",
|
||||
"maker": "dm-robot-ag"
|
||||
"maker": "dm-robot-ag",
|
||||
"mh-wasp": "neo-wasp-ag",
|
||||
"factory-boss": "errol-lowres-ag",
|
||||
"fac-robotank-turret": "fac-robotank-ag"
|
||||
},
|
||||
|
||||
// remap names for types in an entire file (higher priority)
|
||||
|
||||
@@ -441,7 +441,12 @@
|
||||
"(method 37 task-manager-desert-glide)": [11, 12, 23, 29, 31],
|
||||
"(method 34 task-manager-desert-glide)": [3],
|
||||
"(anon-function 20 target-flut)": [0, 38, 39],
|
||||
"(anon-function 14 flut-racer)": [7, 17, 19]
|
||||
"(anon-function 14 flut-racer)": [7, 17, 19],
|
||||
"(method 28 conveyor)": [22],
|
||||
"generic-merc-execute-all": [7, 15],
|
||||
"check-enemy": [0, 1],
|
||||
"(method 91 h-warf)": [0],
|
||||
"(method 51 h-warf)": [5]
|
||||
},
|
||||
|
||||
// Sometimes the game might use format strings that are fetched dynamically,
|
||||
@@ -515,7 +520,27 @@
|
||||
[184, 0],
|
||||
[276, 0]
|
||||
],
|
||||
"(method 32 task-manager-throne-gun-training)": [[53, 0]]
|
||||
"(method 32 task-manager-throne-gun-training)": [[53, 0]],
|
||||
"(method 17 hud-spider-killed)": [[71, 0]],
|
||||
"(trans idle des-burning-bush)": [
|
||||
[226, 1],
|
||||
[257, 0]
|
||||
],
|
||||
"(method 37 des-burning-bush)": [
|
||||
[278, 0],
|
||||
[336, 0]
|
||||
],
|
||||
"(method 38 des-burning-bush)": [
|
||||
[109, 0],
|
||||
[153, 0],
|
||||
[196, 0]
|
||||
],
|
||||
"(method 15 freeze-time-hud)": [[108, 0]],
|
||||
"(method 17 freeze-time-hud)": [[97, 0]],
|
||||
"(method 15 hud-wasbbv-score)": [[61, 0]],
|
||||
"(method 15 hud-wasbbv-goal)": [[64, 0]],
|
||||
"(method 32 task-manager-dark-punch-training)": [[53, 0]],
|
||||
"(method 32 task-manager-lightjak-training-shield)": [[53, 0]]
|
||||
},
|
||||
|
||||
"mips2c_functions_by_name": [
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"DGO/DESINTER.DGO",
|
||||
// "DGO/DESJUMP.DGO",
|
||||
"DGO/DESLIZ.DGO",
|
||||
// "DGO/DESOASIS.DGO",
|
||||
"DGO/DESOASIS.DGO",
|
||||
"DGO/DESRACE1.DGO",
|
||||
"DGO/DESRACE2.DGO",
|
||||
"DGO/DESRALLY.DGO",
|
||||
@@ -63,7 +63,7 @@
|
||||
"DGO/DESTRACK.DGO",
|
||||
"DGO/DESW.DGO",
|
||||
"DGO/DST.DGO",
|
||||
// "DGO/OASISCST.DGO",
|
||||
"DGO/OASISCST.DGO",
|
||||
// "DGO/WARPCAST.DGO", // air train
|
||||
// nest
|
||||
"DGO/NSA.DGO",
|
||||
@@ -145,11 +145,11 @@
|
||||
"DGO/FRSTA.DGO",
|
||||
"DGO/FRSTB.DGO",
|
||||
"DGO/FRSTX.DGO",
|
||||
// // factory
|
||||
// "DGO/FACTORYA.DGO",
|
||||
// "DGO/FACB.DGO",
|
||||
// "DGO/FACC.DGO",
|
||||
// "DGO/FACD.DGO",
|
||||
// factory
|
||||
"DGO/FACTORYA.DGO",
|
||||
"DGO/FACB.DGO",
|
||||
"DGO/FACC.DGO",
|
||||
"DGO/FACD.DGO",
|
||||
// tower
|
||||
"DGO/TOWB.DGO",
|
||||
"DGO/TOWERA.DGO",
|
||||
@@ -165,15 +165,15 @@
|
||||
// "DGO/RUBB.DGO",
|
||||
// "DGO/RUBC.DGO",
|
||||
// "DGO/RBCT.DGO",
|
||||
// // comb
|
||||
// "DGO/COMBA.DGO",
|
||||
// comb
|
||||
"DGO/COMBA.DGO",
|
||||
// "DGO/COMBB.DGO",
|
||||
// "DGO/COMBC.DGO",
|
||||
// "DGO/COMBD.DGO",
|
||||
// "DGO/COMBE.DGO",
|
||||
// "DGO/COMBN.DGO",
|
||||
// "DGO/COMBX.DGO",
|
||||
// "DGO/RAILA.DGO",
|
||||
"DGO/COMBX.DGO",
|
||||
"DGO/RAILA.DGO",
|
||||
// "DGO/RAILB.DGO",
|
||||
// "DGO/RAILB2.DGO",
|
||||
// "DGO/RAILC.DGO",
|
||||
@@ -181,7 +181,7 @@
|
||||
// "DGO/RAILD.DGO",
|
||||
// "DGO/RAILE.DGO",
|
||||
// "DGO/RAILF.DGO",
|
||||
// "DGO/RAILX.DGO",
|
||||
"DGO/RAILX.DGO",
|
||||
// // precursor
|
||||
// "DGO/PRECA.DGO",
|
||||
// "DGO/PRECB.DGO",
|
||||
@@ -206,24 +206,24 @@
|
||||
// "DGO/MUSEUM4B.DGO",
|
||||
// test
|
||||
"DGO/HALFPIPE.DGO",
|
||||
// // borrow
|
||||
// borrow
|
||||
// "DGO/LASHELIN.DGO",
|
||||
// "DGO/LBBRING1.DGO",
|
||||
// "DGO/LBBRING2.DGO",
|
||||
// "DGO/LBBRING3.DGO",
|
||||
// "DGO/LBBRING4.DGO",
|
||||
// "DGO/LBBRING5.DGO",
|
||||
// "DGO/LBBRING6.DGO",
|
||||
// "DGO/LBBSDRP1.DGO",
|
||||
// "DGO/LBBSDRP2.DGO",
|
||||
// "DGO/LBBSDRP3.DGO",
|
||||
// "DGO/LBBSPID.DGO",
|
||||
// "DGO/LBBSPIRT.DGO",
|
||||
// "DGO/LBBSPRT2.DGO",
|
||||
// "DGO/LBBSPRT3.DGO",
|
||||
// "DGO/LBBTCHA1.DGO",
|
||||
// "DGO/LBBTCHA2.DGO",
|
||||
// "DGO/LBBTCHA3.DGO",
|
||||
"DGO/LBBRING1.DGO",
|
||||
"DGO/LBBRING2.DGO",
|
||||
"DGO/LBBRING3.DGO",
|
||||
"DGO/LBBRING4.DGO",
|
||||
"DGO/LBBRING5.DGO",
|
||||
"DGO/LBBRING6.DGO",
|
||||
"DGO/LBBSDRP1.DGO",
|
||||
"DGO/LBBSDRP2.DGO",
|
||||
"DGO/LBBSDRP3.DGO",
|
||||
"DGO/LBBSPID.DGO",
|
||||
"DGO/LBBSPIRT.DGO",
|
||||
"DGO/LBBSPRT2.DGO",
|
||||
"DGO/LBBSPRT3.DGO",
|
||||
"DGO/LBBTCHA1.DGO",
|
||||
"DGO/LBBTCHA2.DGO",
|
||||
"DGO/LBBTCHA3.DGO",
|
||||
// "DGO/LBIPED.DGO",
|
||||
// "DGO/LBLOWCST.DGO",
|
||||
// "DGO/LBLOWTKG.DGO",
|
||||
@@ -232,7 +232,7 @@
|
||||
// "DGO/LCITYSML.DGO",
|
||||
// "DGO/LCTYASS.DGO",
|
||||
// "DGO/LCTYBLOW.DGO",
|
||||
// "DGO/LCTYDEST.DGO",
|
||||
"DGO/LCTYDEST.DGO",
|
||||
// "DGO/LCTYHIJK.DGO",
|
||||
// "DGO/LCTYPALT.DGO",
|
||||
// "DGO/LCTYPATK.DGO",
|
||||
@@ -246,13 +246,13 @@
|
||||
// "DGO/LDESGCST.DGO",
|
||||
// "DGO/LDMPCKGN.DGO",
|
||||
// "DGO/LERROL.DGO",
|
||||
// "DGO/LFACB.DGO",
|
||||
"DGO/LFACB.DGO",
|
||||
"DGO/LFACCAR.DGO",
|
||||
"DGO/LFACCITY.DGO",
|
||||
"DGO/LFACO.DGO",
|
||||
// "DGO/LFACRM1.DGO",
|
||||
// "DGO/LFACRM2.DGO",
|
||||
// "DGO/LFACTORY.DGO",
|
||||
"DGO/LFACRM1.DGO",
|
||||
"DGO/LFACRM2.DGO",
|
||||
"DGO/LFACTORY.DGO",
|
||||
"DGO/LFORM.DGO",
|
||||
"DGO/LFORP.DGO",
|
||||
// "DGO/LFORRING.DGO",
|
||||
@@ -276,10 +276,10 @@
|
||||
"DGO/LMECH.DGO",
|
||||
// "DGO/LMHCA.DGO",
|
||||
// "DGO/LMHCB.DGO",
|
||||
// "DGO/LNSTCST.DGO",
|
||||
// "DGO/LNSTOA.DGO",
|
||||
// "DGO/LNSTOBB.DGO",
|
||||
// "DGO/LNSTOBC.DGO",
|
||||
"DGO/LNSTCST.DGO",
|
||||
"DGO/LNSTOA.DGO",
|
||||
"DGO/LNSTOBB.DGO",
|
||||
"DGO/LNSTOBC.DGO",
|
||||
// "DGO/LONINSIM.DGO",
|
||||
// "DGO/LOUTRO.DGO",
|
||||
// "DGO/LOUTRO2.DGO",
|
||||
@@ -300,12 +300,12 @@
|
||||
// "DGO/LTORN.DGO",
|
||||
// "DGO/LTORNJNX.DGO",
|
||||
// "DGO/LTORNSAM.DGO",
|
||||
// "DGO/LTOWA.DGO",
|
||||
// "DGO/LTOWB.DGO",
|
||||
"DGO/LTOWA.DGO",
|
||||
"DGO/LTOWB.DGO",
|
||||
// "DGO/LTOWCITY.DGO",
|
||||
// "DGO/LTRTWHLS.DGO",
|
||||
// "DGO/LVINCST.DGO",
|
||||
// "DGO/LWASBBV.DGO",
|
||||
"DGO/LWASBBV.DGO",
|
||||
"DGO/LWASSIG.DGO",
|
||||
// "DGO/LWLANDM.DGO",
|
||||
"DGO/LWSTDPCK.DGO"
|
||||
|
||||
@@ -1390,5 +1390,165 @@
|
||||
["L624", "uint64", true],
|
||||
["L613", "uint64", true],
|
||||
["L621", "uint64", true]
|
||||
],
|
||||
"des-bush": [
|
||||
["L873", "uint64", true],
|
||||
["L878", "uint64", true],
|
||||
["L872", "uint64", true],
|
||||
["L880", "uint64", true],
|
||||
["L879", "uint64", true],
|
||||
["L877", "uint64", true],
|
||||
["L875", "uint64", true],
|
||||
["L876", "uint64", true],
|
||||
["L874", "uint64", true],
|
||||
["L585", "uint64", true],
|
||||
["L587", "uint64", true],
|
||||
["L586", "uint64", true],
|
||||
["L588", "uint64", true],
|
||||
["L584", "uint64", true],
|
||||
["L591", "uint64", true],
|
||||
["L590", "uint64", true],
|
||||
["L592", "uint64", true],
|
||||
["L589", "uint64", true],
|
||||
["L583", "uint64", true]
|
||||
],
|
||||
"des-burning-bush": [
|
||||
["L182", "vector"],
|
||||
["L219", "vector"]
|
||||
],
|
||||
"mh-wasp": [
|
||||
["L128", "vector"],
|
||||
["L127", "vector"],
|
||||
["L126", "vector"]
|
||||
],
|
||||
"mh-centipede": [
|
||||
["L740", "uint64", true],
|
||||
["L741", "uint64", true],
|
||||
["L731", "uint64", true],
|
||||
["L732", "uint64", true],
|
||||
["L737", "uint64", true],
|
||||
["L733", "uint64", true],
|
||||
["L735", "uint64", true],
|
||||
["L734", "uint64", true],
|
||||
["L739", "uint64", true],
|
||||
["L736", "uint64", true],
|
||||
["L738", "uint64", true],
|
||||
["L571", "(inline-array talker-speech-class)", 36],
|
||||
["L615", "uint64", true],
|
||||
["L614", "uint64", true],
|
||||
["L613", "uint64", true],
|
||||
["L617", "uint64", true],
|
||||
["L616", "uint64", true],
|
||||
["L611", "uint64", true],
|
||||
["L618", "uint64", true],
|
||||
["L610", "uint64", true],
|
||||
["L482", "attack-info"],
|
||||
["L481", "attack-info"],
|
||||
["L612", "uint64", true]
|
||||
],
|
||||
"mh-bat": [["L124", "(pointer int32)", 4]],
|
||||
"factoryc-obs": [
|
||||
["L202", "(inline-array vector)", 2],
|
||||
["L256", "attack-info"],
|
||||
["L252", "vector"],
|
||||
["L247", "attack-info"]
|
||||
],
|
||||
"factoryc-obs2": [["L229", "attack-info"]],
|
||||
"factory-boss-setup": [["L345", "(inline-array vector)", 2]],
|
||||
"missile-bot": [
|
||||
["L186", "attack-info"],
|
||||
["L205", "vector"],
|
||||
["L204", "vector"],
|
||||
["L203", "vector"],
|
||||
["L202", "vector"],
|
||||
["L201", "vector"]
|
||||
],
|
||||
"factoryc-manager": [
|
||||
["L46", "attack-info"],
|
||||
["L47", "vector"],
|
||||
["L50", "attack-info"],
|
||||
["L48", "attack-info"]
|
||||
],
|
||||
"generic-merc": [["L175", "(inline-array invinitdata)", 8]],
|
||||
"bot": [
|
||||
["L391", "attack-info"],
|
||||
["L390", "attack-info"]
|
||||
],
|
||||
"oasis-defense": [
|
||||
["L196", "attack-info"],
|
||||
["L195", "vector"]
|
||||
],
|
||||
"ash-oasis-course": [["L124", "uint64", true]],
|
||||
"destroy-dark-eco": [["L197", "vector"]],
|
||||
"comb-obs": [
|
||||
["L136", "attack-info"],
|
||||
["L139", "vector"],
|
||||
["L138", "vector"]
|
||||
],
|
||||
"comb-sentry": [
|
||||
["L93", "vector"],
|
||||
["L91", "vector"],
|
||||
["L87", "(inline-array vector)", 1],
|
||||
["L88", "(inline-array vector)", 3]
|
||||
],
|
||||
"comb-field": [["L43", "vector"]],
|
||||
"h-sled": [
|
||||
["L175", "vector"],
|
||||
["L174", "vector"],
|
||||
["L173", "vector"],
|
||||
["L172", "vector"],
|
||||
["L171", "vector"],
|
||||
["L170", "vector"],
|
||||
["L169", "vector"],
|
||||
["L167", "vector"],
|
||||
["L166", "vector"],
|
||||
["L177", "(inline-array vector)", 2],
|
||||
["L176", "(inline-array vector)", 2],
|
||||
["L162", "(inline-array vector)", 8]
|
||||
],
|
||||
"comb-travel": [
|
||||
["L122", "vector"],
|
||||
["L121", "vector"],
|
||||
["L129", "vector"],
|
||||
["L128", "vector"],
|
||||
["L127", "vector"],
|
||||
["L126", "vector"],
|
||||
["L125", "vector"],
|
||||
["L124", "vector"]
|
||||
],
|
||||
"warf-projectile": [["L163", "attack-info"]],
|
||||
"h-warf": [["L187", "attack-info"]],
|
||||
"fac-gunturret": [
|
||||
["L91", "fac-gun-tower-turret-params"],
|
||||
["L94", "attack-info"]
|
||||
],
|
||||
"fac-robotank-turret": [
|
||||
["L178", "uint64", true],
|
||||
["L177", "uint64", true],
|
||||
["L135", "uint64", true],
|
||||
["L138", "uint64", true],
|
||||
["L137", "uint64", true],
|
||||
["L136", "uint64", true],
|
||||
["L139", "uint64", true]
|
||||
],
|
||||
"fac-tower": [["L137", "attack-info"]],
|
||||
"fac-robotank": [
|
||||
["L255", "uint64", true],
|
||||
["L256", "uint64", true],
|
||||
["L253", "uint64", true],
|
||||
["L257", "uint64", true],
|
||||
["L252", "uint64", true],
|
||||
["L254", "uint64", true],
|
||||
["L176", "uint64", true],
|
||||
["L175", "uint64", true]
|
||||
],
|
||||
"factory-manager": [
|
||||
["L306", "vector"],
|
||||
["L305", "vector"],
|
||||
["L304", "vector"],
|
||||
["L303", "vector"],
|
||||
["L302", "vector"],
|
||||
["L345", "vector"],
|
||||
["L346", "vector"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -968,11 +968,11 @@
|
||||
],
|
||||
"(method 162 sew-laser-turret)": [
|
||||
[32, ["array", "collide-shape", 384]],
|
||||
[16, "bounding-box"]
|
||||
[16, "vector"]
|
||||
],
|
||||
"(trans alert sew-laser-turret)": [
|
||||
[32, ["array", "collide-shape", 384]],
|
||||
[16, "bounding-box"]
|
||||
[16, "vector"]
|
||||
],
|
||||
"(method 161 sew-laser-turret)": [[64, "rgbaf"]],
|
||||
"(method 159 sew-laser-turret)": [[32, "vector"]],
|
||||
@@ -1734,5 +1734,209 @@
|
||||
[336, "vector"]
|
||||
],
|
||||
"(method 41 maker)": [[560, "vector"]],
|
||||
"maker-init-by-other": [[32, "light-trail-tracker-spawn-params"]]
|
||||
"maker-init-by-other": [[32, "light-trail-tracker-spawn-params"]],
|
||||
"(trans active task-manager-bbush-spirit-chase)": [
|
||||
[80, "vector"],
|
||||
[96, "vector"],
|
||||
[128, "vector"]
|
||||
],
|
||||
"(trans idle desert-chase-ring)": [[16, "vector"]],
|
||||
"(trans active task-manager-bbush-spirit-drop)": [
|
||||
[80, "vector"],
|
||||
[96, "vector"],
|
||||
[128, "vector"]
|
||||
],
|
||||
"(code active task-manager-desert-bbush-get-to)": [
|
||||
[160, "vector"],
|
||||
[176, "matrix"]
|
||||
],
|
||||
"(trans menu des-burning-bush)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(trans talking des-burning-bush)": [[16, "des-burning-bush-stack-var0"]],
|
||||
"(method 37 des-burning-bush)": [[16, "bbush-menu-state"]],
|
||||
"(method 38 des-burning-bush)": [[112, "des-burning-bush-stack-var1"]],
|
||||
"trail-effect-init-by-other": [[16, "light-trail-tracker-spawn-params"]],
|
||||
"(trans active task-manager-bbush-timer-chase)": [[80, "vector"]],
|
||||
"(event attack mh-wasp)": [[16, "projectile-init-by-other-params"]],
|
||||
"(anon-function 9 mh-wasp)": [[112, "vector"]],
|
||||
"check-mh-centipede-explosion-level": [[16, "vector"]],
|
||||
"spt-func-ground-dirt-bounce2": [[16, "vector"]],
|
||||
"spt-func-ground-dirt-bounce1": [[16, "vector"]],
|
||||
"(method 42 mh-centipede)": [
|
||||
[144, "vector"],
|
||||
[160, "vector"],
|
||||
[176, "vector"],
|
||||
[16, "projectile-init-by-other-params"]
|
||||
],
|
||||
"(method 38 mh-centipede)": [[16, "matrix"]],
|
||||
"(method 39 mh-centipede)": [[16, "matrix"]],
|
||||
"(method 40 mh-centipede)": [
|
||||
[16, "matrix"],
|
||||
[816, "vector"],
|
||||
[832, "vector"]
|
||||
],
|
||||
"(trans die mh-centipede)": [[96, "vector"]],
|
||||
"(method 10 mh-centipede-crater-pt-array)": [
|
||||
[592, ["inline-array", "vector", 4]],
|
||||
[1216, "bounding-box"]
|
||||
],
|
||||
"(method 161 mh-bat)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"mh-bat-fly-post": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(post idle fac-fire-torch)": [[16, "matrix"]],
|
||||
"fac-robopod-add-hoverbot": [[32, "enemy-init-by-other-params"]],
|
||||
"(enter impact factory-boss-shockwave-bomb)": [[176, "vector"]],
|
||||
"(method 9 factory-boss-lightning-gate)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 59 missile-bot)": [[80, "vector"]],
|
||||
"factory-boss-launch-critter": [
|
||||
[32, "enemy-init-by-other-params"],
|
||||
[160, "matrix"]
|
||||
],
|
||||
"factory-boss-launch-critter-handler": [
|
||||
[96, "vector"],
|
||||
[112, "vector"],
|
||||
[128, "matrix"]
|
||||
],
|
||||
"factory-boss-always": [
|
||||
[224, "vector"],
|
||||
[16, "vector"],
|
||||
[240, "vector"],
|
||||
[80, "matrix"]
|
||||
],
|
||||
"(method 201 bot)": [[16, "enemy-best-focus"]],
|
||||
"(method 202 bot)": [[16, "connection-pers"]],
|
||||
"(method 25 ashelin-shot)": [[32, "vector"]],
|
||||
"(method 248 ashelin)": [
|
||||
[16, "nav-avoid-spheres-params"],
|
||||
[112, "clamp-travel-vector-to-mesh-return-info"]
|
||||
],
|
||||
"(code active task-manager-desert-oasis-defense)": [
|
||||
[112, "mystery-traffic-object-spawn-params0"]
|
||||
],
|
||||
"(method 32 task-manager-desert-oasis-defense)": [
|
||||
[16, "mystery-traffic-object-spawn-params0"]
|
||||
],
|
||||
"(method 33 task-manager-desert-oasis-defense)": [
|
||||
[16, "marauder-init-by-other-params"]
|
||||
],
|
||||
"(method 26 task-manager-desert-oasis-defense)": [
|
||||
[96, "wvehicle-ai-drop-off-params"]
|
||||
],
|
||||
"(trans active dark-eco-orb)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"],
|
||||
[80, "collide-query"],
|
||||
[624, "vector"],
|
||||
[640, "vector"],
|
||||
[656, "vector"],
|
||||
[672, "vector"]
|
||||
],
|
||||
"(method 26 task-manager-destroy-darkeco)": [[16, ["array", "symbol", 10]]],
|
||||
"(trans idle grind-electricity)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"dark-eco-tower-init-by-other": [
|
||||
[16, "vector"],
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "puffer-init-by-other-params"]
|
||||
],
|
||||
"spawn-shock-effect": [
|
||||
[80, "collide-query"],
|
||||
[16, "matrix"],
|
||||
[624, "vector"]
|
||||
],
|
||||
"(method 34 comb-block)": [[16, "vector"]],
|
||||
"(method 11 comb-pillar)": [[16, ["inline-array", "vector", 1]]],
|
||||
"(method 25 comb-sentry-shot)": [[32, "vector"]],
|
||||
"(method 32 comb-sentry)": [
|
||||
[16, "matrix"],
|
||||
[80, ["inline-array", "vector", 5]]
|
||||
],
|
||||
"(method 38 comb-sentry)": [[16, "comb-sentry-stack-var0"]],
|
||||
"(method 39 comb-sentry)": [[16, "comb-sentry-stack-var1"]],
|
||||
"sled-shot-reaction": [[16, ["inline-array", "vector", 1]]],
|
||||
"(method 33 h-sled)": [[16, ["inline-array", "vector", 2]]],
|
||||
"(method 90 h-sled)": [[16, "h-sled-physics-work"]],
|
||||
"(method 93 h-sled)": [[16, "matrix"]],
|
||||
"(method 38 h-sled)": [
|
||||
[16, "matrix"],
|
||||
[64, ["inline-array", "vector", 2]]
|
||||
],
|
||||
"(method 31 h-sled)": [
|
||||
[1056, "matrix"],
|
||||
[1104, "matrix"],
|
||||
[1168, "matrix"],
|
||||
[16, "h-sled-physics-work"]
|
||||
],
|
||||
"(method 97 h-sled)": [
|
||||
[16, "collide-query"],
|
||||
[560, ["inline-array", "vector", 1]],
|
||||
[624, "vector"]
|
||||
],
|
||||
"(method 152 h-sled)": [[16, "comb-sentry-stack-var0"]],
|
||||
"(method 25 sled-shot)": [[32, "vector"]],
|
||||
"sled-find-mesh-dir": [[16, "h-sled-stack-var0"]],
|
||||
"(method 78 h-sled)": [[16, "h-sled-stack-var1"]],
|
||||
"(method 25 ffight-shot)": [[32, "vector"]],
|
||||
"(enter impact ftank-shot)": [[16, "traffic-danger-info"]],
|
||||
"(method 25 ftank-shot)": [[32, "vector"]],
|
||||
"(method 25 fturret-shot)": [[32, "vector"]],
|
||||
"(method 25 gun-warf-shot)": [[32, "vector"]],
|
||||
"(enter impact warf-projectile)": [[16, "warf-explosion-sphere-init-params"]],
|
||||
"(method 43 warf-projectile)": [[16, ["array", "collide-shape", 384]]],
|
||||
"(method 91 h-warf)": [
|
||||
[112, "projectile-init-by-other-params"],
|
||||
[80, "vector"],
|
||||
[96, "vector"],
|
||||
[864, "vector"]
|
||||
],
|
||||
"(method 31 h-warf)": [[48, "vehicle-physics-work"]],
|
||||
"(method 51 h-warf)": [[16, "rigid-body-impact"]],
|
||||
"(method 54 h-warf)": [[16, "vehicle-physics-work"]],
|
||||
"(method 78 h-warf)": [[16, "h-warf-stack-var0"]],
|
||||
"(method 164 h-warf)": [[16, "vector"]],
|
||||
"(code hostile fac-gunturret)": [[16, "vector"]],
|
||||
"fac-robotank-turret-init-by-other": [[16, "vector"]],
|
||||
"(method 31 fac-robotank-turret)": [[16, "collide-query"]],
|
||||
"(method 33 fac-robotank-turret)": [
|
||||
[16, ["inline-array", "vector", 2]],
|
||||
[48, ["inline-array", "vector", 2]]
|
||||
],
|
||||
"robotank-turret-handler": [
|
||||
[16, "vector"],
|
||||
[32, "quaternion"]
|
||||
],
|
||||
"draw-2d-hud": [
|
||||
[16, ["inline-array", "vector4w", 4]],
|
||||
[80, "vector4w"]
|
||||
],
|
||||
"(method 36 fac-gun-tower)": [
|
||||
[16, "vector"],
|
||||
[32, ["array", "collide-shape", 384]]
|
||||
],
|
||||
"(method 35 fac-gun-tower)": [[32, "vector"]],
|
||||
"fac-robotank-init-by-other": [[32, "vector"]],
|
||||
"(trans flying factory-fighter)": [[16, "vector"]],
|
||||
"(method 16 factory-manager)": [
|
||||
[48, "vector"],
|
||||
[64, "vector"],
|
||||
[80, "vector"],
|
||||
[128, "vector"]
|
||||
],
|
||||
"factory-fighter-init-by-other": [[16, "light-trail-tracker-spawn-params"]],
|
||||
"(code explode factory-fighter)": [[112, "vector"]]
|
||||
}
|
||||
|
||||
@@ -8695,5 +8695,575 @@
|
||||
[332, "gp", "attack-info"],
|
||||
[379, "gp", "attack-info"]
|
||||
],
|
||||
"maker-init-by-other": [[237, "v1", "vector"]]
|
||||
"maker-init-by-other": [[237, "v1", "vector"]],
|
||||
"(code resolution task-manager-bbush-spirit-drop)": [[40, "gp", "handle"]],
|
||||
"(event dormant score-drop)": [[5, "a0", "vector"]],
|
||||
"(code resolution task-manager-desert-bbush-ring)": [[40, "gp", "handle"]],
|
||||
"(trans idle desert-chase-ring)": [[20, "a2", "vehicle"]],
|
||||
"(event dormant spirit)": [[6, "v1", "vector"]],
|
||||
"(event idle spirit)": [[6, "v1", "vector"]],
|
||||
"(code resolution task-manager-bbush-egg-spider)": [[40, "gp", "handle"]],
|
||||
"(trans active task-manager-bbush-egg-spider)": [[18, "v1", "int"]],
|
||||
"(code resolution task-manager-bbush-spirit-chase)": [[40, "gp", "handle"]],
|
||||
"(method 36 task-manager-bbush-spirit-drop)": [[23, "s4", "spirit"]],
|
||||
"(method 21 task-manager-bbush-spirit-drop)": [["_stack_", 16, "res-tag"]],
|
||||
"(trans idle des-burning-bush)": [
|
||||
[179, "v1", "vehicle"],
|
||||
[151, "a1", "int"]
|
||||
],
|
||||
"(method 35 des-burning-bush)": [[48, "v1", "float"]],
|
||||
"(code menu des-burning-bush)": [[[29, 54], "v1", "game-task-event"]],
|
||||
"(event dormant trail-effect)": [[6, "v1", "vector"]],
|
||||
"(event idle trail-effect)": [[6, "v1", "vector"]],
|
||||
"(code resolution task-manager-bbush-timer-chase)": [[40, "gp", "handle"]],
|
||||
"(event active task-manager-bbush-timer-chase)": [
|
||||
[4, "v1", "float"],
|
||||
[[30, 33], "a0", "freeze-time-hud"],
|
||||
[[43, 46], "a0", "freeze-time-hud"],
|
||||
[[56, 59], "a0", "freeze-time-hud"],
|
||||
[[69, 72], "a0", "freeze-time-hud"],
|
||||
[[85, 88], "a0", "freeze-time-hud"],
|
||||
[[98, 101], "a0", "freeze-time-hud"],
|
||||
[[111, 114], "a0", "freeze-time-hud"],
|
||||
[[124, 127], "a0", "freeze-time-hud"],
|
||||
[[140, 143], "a0", "freeze-time-hud"],
|
||||
[[166, 169], "a0", "freeze-time-hud"],
|
||||
[[179, 182], "a0", "freeze-time-hud"],
|
||||
[[153, 156], "a0", "freeze-time-hud"]
|
||||
],
|
||||
"(trans active task-manager-bbush-timer-chase)": [
|
||||
[[25, 28], "a0", "freeze-time-hud"],
|
||||
[[38, 41], "a0", "freeze-time-hud"],
|
||||
[[51, 54], "a0", "freeze-time-hud"],
|
||||
[[64, 67], "a0", "freeze-time-hud"]
|
||||
],
|
||||
"(method 26 task-manager-bbush-roll-count)": [[17, "v1", "vehicle"]],
|
||||
"(method 26 task-manager-vehicle-bbush)": [
|
||||
[37, "v1", "process-focusable"],
|
||||
[[83, 134], "v1", "vehicle"]
|
||||
],
|
||||
"(method 21 task-manager-bbush-timer-chase)": [["_stack_", 96, "res-tag"]],
|
||||
"(method 21 task-manager-bbush-egg-spider)": [["_stack_", 16, "res-tag"]],
|
||||
"(method 21 task-manager-bbush-spirit-chase)": [["_stack_", 16, "res-tag"]],
|
||||
"(method 21 task-manager-desert-bbush-ring)": [["_stack_", 16, "res-tag"]],
|
||||
"(code attack needle-fish)": [
|
||||
[14, "v1", "art-joint-anim"],
|
||||
[66, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code stare needle-fish)": [[14, "v1", "art-joint-anim"]],
|
||||
"needle-fish-joint-mod-tail": [[[8, 42], "s4", "needle-fish"]],
|
||||
"(method 28 needle-fish-shot)": [
|
||||
[10, "v0", "sound-rpc-set-param"],
|
||||
[29, "s5", "process-drawable"],
|
||||
[32, "s5", "process-drawable"]
|
||||
],
|
||||
"(enter explode needle-fish)": [[95, "a0", "process"]],
|
||||
"(method 59 needle-fish)": [
|
||||
[30, "a0", "process-focusable"],
|
||||
[33, "a0", "process-focusable"]
|
||||
],
|
||||
"(method 56 mh-wasp)": [[21, "a1", "process-drawable"]],
|
||||
"(post notice mh-wasp)": [[4, "t9", "(function none)"]],
|
||||
"(trans hostile mh-wasp)": [[36, "v1", "art-joint-anim"]],
|
||||
"(code attack mh-wasp)": [[38, "v1", "art-joint-anim"]],
|
||||
"(code knocked-recover mh-wasp)": [[20, "v1", "art-joint-anim"]],
|
||||
"(method 86 mh-wasp)": [[11, "v1", "art-joint-anim"]],
|
||||
"(method 113 mh-wasp)": [[[11, 89], "s5", "process-focusable"]],
|
||||
"(method 85 mh-wasp)": [[32, "a1", "art-joint-anim"]],
|
||||
"(method 121 mh-wasp)": [
|
||||
[116, "v0", "(pointer float)"],
|
||||
[181, "v0", "(pointer float)"],
|
||||
["_stack_", 16, "res-tag"],
|
||||
["_stack_", 32, "res-tag"],
|
||||
["_stack_", 48, "res-tag"],
|
||||
["_stack_", 64, "res-tag"]
|
||||
],
|
||||
"(method 11 mh-centipede)": [
|
||||
[433, "v0", "(pointer actor-group)"],
|
||||
["_stack_", 16, "res-tag"]
|
||||
],
|
||||
"(method 26 task-manager-mh-centipede)": [[[113, 118], "a0", "vehicle"]],
|
||||
"(method 30 task-manager-mh-centipede)": [[5, "a1", "vector"]],
|
||||
"(method 26 task-manager-nstb-crystal)": [[[31, 36], "a0", "vehicle"]],
|
||||
"(method 42 mh-centipede)": [
|
||||
[70, "v1", "float"],
|
||||
[93, "v1", "float"]
|
||||
],
|
||||
"(method 38 mh-centipede)": [[171, "v1", "float"]],
|
||||
"(method 39 mh-centipede)": [
|
||||
[70, "v1", "float"],
|
||||
[185, "v1", "float"],
|
||||
[208, "v1", "float"]
|
||||
],
|
||||
"(trans die mh-centipede)": [[16, "v0", "vehicle"]],
|
||||
"mh-centipede-active-handler": [
|
||||
[[5, 119], "s4", "touching-shapes-entry"],
|
||||
[91, "gp", "vehicle"],
|
||||
[[208, 227], "v1", "attack-info"]
|
||||
],
|
||||
"(enter impact mh-centipede-shot)": [[71, "a0", "process"]],
|
||||
"(event hidden rod-spawner)": [
|
||||
[[13, 21], "a1", "vector"],
|
||||
[[27, 35], "a0", "vector"]
|
||||
],
|
||||
"(method 32 task-manager-mh-centipede)": [["_stack_", 16, "res-tag"]],
|
||||
"(method 59 mh-bat)": [[[26, 43], "s5", "process-focusable"]],
|
||||
"(method 126 mh-bat)": [[[20, 24], "v1", "ragdoll-proc"]],
|
||||
"(method 50 mh-bat)": [
|
||||
[8, "v1", "collide-shape-prim-group"],
|
||||
[18, "v1", "collide-shape-prim-group"]
|
||||
],
|
||||
"(code knocked-recover mh-bat)": [
|
||||
[26, "v1", "art-joint-anim"],
|
||||
[55, "v1", "ragdoll-proc"],
|
||||
[108, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code attack-1 mh-bat)": [
|
||||
[14, "v1", "art-joint-anim"],
|
||||
[160, "v1", "art-joint-anim"]
|
||||
],
|
||||
"mh-bat-fly-code": [[15, "v1", "art-joint-anim"]],
|
||||
"set-factoryc-light!": [[[12, 14], "v1", "factoryc-states"]],
|
||||
"(method 24 conveyor)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
[23, "v0", "(pointer float)"]
|
||||
],
|
||||
"(method 21 conveyor)": [["_stack_", 32, "conveyor-section"]],
|
||||
"(method 28 conveyor)": [
|
||||
[23, "a0", "connection"],
|
||||
[24, "a0", "collide-shape"],
|
||||
[71, "a0", "connection"],
|
||||
[72, "a0", "collide-shape"]
|
||||
],
|
||||
"fac-robopod-base-handler": [[6, "v1", "rigid-body-impact"]],
|
||||
"(method 11 fac-zapper)": [
|
||||
[[183, 213], "s4", "(pointer generic-spot-shadow-effect)"]
|
||||
],
|
||||
"(method 11 fac-fire-torch)": [[99, "v0", "particle-local-space-info"]],
|
||||
"(code generate fac-robopod)": [
|
||||
[28, "v1", "art-joint-anim"],
|
||||
[95, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code die fac-punch-wall)": [
|
||||
[17, "v1", "collide-shape-prim-group"],
|
||||
[89, "v1", "art-joint-anim"],
|
||||
[112, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(method 24 factory-conveyor)": [
|
||||
[40, "v0", "float"],
|
||||
[39, "t0", "float"],
|
||||
["_stack_", 16, "res-tag"]
|
||||
],
|
||||
"(enter perish-immediately)": [
|
||||
[13, "v1", "art-joint-anim"],
|
||||
[29, "v1", "collide-shape-prim-group"]
|
||||
],
|
||||
"(code plat-idle fac-move-plat-a)": [[6, "t9", "(function none)"]],
|
||||
"(event idle fac-switch)": [[[5, 15], "gp", "attack-info"]],
|
||||
"(event idle fac-break-floor)": [[4, "v1", "attack-info"]],
|
||||
"(event idle fac-break-fence)": [[[7, 13], "gp", "rigid-body-impact"]],
|
||||
"(code plat-idle fac-move-plat-b)": [[6, "t9", "(function none)"]],
|
||||
"(event idle fac-rotfan)": [[87, "gp", "process-focusable"]],
|
||||
"(enter out fac-rotfan)": [
|
||||
[2, "v1", "collide-shape-prim-group"],
|
||||
[6, "v1", "collide-shape-prim-group"],
|
||||
[10, "v1", "collide-shape-prim-group"]
|
||||
],
|
||||
"(code spindown fac-rotfan)": [
|
||||
[201, "v1", "collide-shape-prim-group"],
|
||||
[205, "v1", "collide-shape-prim-group"],
|
||||
[209, "v1", "collide-shape-prim-group"],
|
||||
[147, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(method 22 fac-switch)": [[16, "v0", "string"]],
|
||||
"(anon-function 1 mh-bat)": [[1, "v1", "float"]],
|
||||
"(code flickering factory-elec-gate)": [[83, "s5", "int"]],
|
||||
"(anon-function 0 factory-scenes)": [[13, "t9", "(function level none)"]],
|
||||
"(anon-function 1 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 2 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 3 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 4 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 5 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 7 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 8 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 9 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 6 factory-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"update-mood-lfacrm1": [[[24, 105], "gp", "lfacrm1-states"]],
|
||||
"update-lfacrm1-lights": [[81, "v1", "lfacrm1-states"]],
|
||||
"(code dormant fac-elevator-a)": [[19, "v1", "art-joint-anim"]],
|
||||
"(code waiting fac-elevator-a)": [[44, "v1", "art-joint-anim"]],
|
||||
"(code running fac-elevator-a)": [
|
||||
[23, "v1", "art-joint-anim"],
|
||||
[71, "t9", "(function none)"]
|
||||
],
|
||||
"(trans running fac-elevator-a)": [[4, "v0", "sound-rpc-set-param"]],
|
||||
"set-lfacrm1-door!": [[[26, 32], "v1", "lfacrm1-states"]],
|
||||
"(method 11 fac-switch)": [["_stack_", 16, "res-tag"]],
|
||||
"(method 11 factory-elec-gate)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
[88, "v0", "(pointer actor-group)"]
|
||||
],
|
||||
"(enter impact factory-boss-shot)": [[60, "a0", "process"]],
|
||||
"(event idle fac-drop-plat)": [
|
||||
[10, "s5", "factory-boss-floorbuster-bomb"],
|
||||
[18, "s5", "floorbuster-bomb-explosion"]
|
||||
],
|
||||
"(method 11 fac-drop-plat)": [
|
||||
[100, "v0", "(pointer actor-group)"],
|
||||
["_stack_", 16, "res-tag"]
|
||||
],
|
||||
"fac-drop-plat-rot-once": [
|
||||
["_stack_", 48, "float"],
|
||||
["_stack_", 64, "float"]
|
||||
],
|
||||
"(enter impact factory-boss-floorbuster-bomb)": [
|
||||
[60, "a0", "process"],
|
||||
[84, "v1", "floorbuster-bomb-explosion"]
|
||||
],
|
||||
"(enter impact factory-boss-shockwave-bomb)": [
|
||||
[59, "a0", "process"],
|
||||
[213, "s4", "(pointer manipy)"],
|
||||
[332, "s4", "(pointer manipy)"]
|
||||
],
|
||||
"(method 9 factory-boss-lightning-gate)": [[173, "a3", "float"]],
|
||||
"update-mood-factory": [[[30, 102], "gp", "factory-states"]],
|
||||
"set-factoryd-light!": [[10, "v1", "factoryd-states"]],
|
||||
"(code notice missile-bot)": [[10, "v1", "art-joint-anim"]],
|
||||
"(trans knocked missile-bot)": [[44, "v1", "float"]],
|
||||
"(post knocked missile-bot)": [[12, "t9", "(function none)"]],
|
||||
"(trans fizzle missile-bot)": [
|
||||
[53, "v1", "float"],
|
||||
[92, "v1", "float"]
|
||||
],
|
||||
"factory-boss-launch-critter-pick-anim": [[10, "v1", "float"]],
|
||||
"(method 50 missile-bot)": [
|
||||
[2, "v1", "collide-shape-prim-group"],
|
||||
[6, "a0", "collide-shape-prim-group"]
|
||||
],
|
||||
"(enter knocked missile-bot)": [[9, "v1", "float"]],
|
||||
"(anon-function 1 factory-boss-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"(anon-function 2 factory-boss-scenes)": [
|
||||
[13, "t9", "(function mood-context none)"]
|
||||
],
|
||||
"factory-boss-check-launch-script": [[100, "v1", "float"]],
|
||||
"(enter beaten factory-boss)": [[44, "gp", "(pointer process)"]],
|
||||
"factory-boss-handler": [[[12, 15], "v1", "nav-enemy"]],
|
||||
"factory-boss-drop-bomb": [[75, "v1", "factory-boss-floorbuster-bomb"]],
|
||||
"(method 11 factory-boss)": [["_stack_", 16, "res-tag"]],
|
||||
"(method 26 factory-boss)": [[16, "v1", "float"]],
|
||||
"factory-boss-always": [
|
||||
[632, "s4", "process-drawable"],
|
||||
[663, "s4", "process-drawable"],
|
||||
[741, "s4", "process-drawable"],
|
||||
[268, "v1", "float"],
|
||||
[308, "v1", "float"],
|
||||
[362, "v1", "float"],
|
||||
[406, "v1", "float"],
|
||||
[456, "v1", "float"],
|
||||
[496, "v1", "float"],
|
||||
[693, "v1", "float"],
|
||||
["_stack_", 272, "float"],
|
||||
["_stack_", 288, "float"],
|
||||
["_stack_", 320, "float"],
|
||||
["_stack_", 336, "float"],
|
||||
["_stack_", 352, "float"],
|
||||
["_stack_", 368, "float"],
|
||||
["_stack_", 384, "float"],
|
||||
["_stack_", 400, "float"]
|
||||
],
|
||||
"(method 26 task-manager-factory-assault)": [
|
||||
[[21, 34], "s5", "process-focusable"],
|
||||
[114, "v0", "vehicle"]
|
||||
],
|
||||
"generic-merc-execute-all": [
|
||||
[145, "v1", "generic-work"],
|
||||
[147, "v1", "generic-work"],
|
||||
[149, "v1", "generic-work"],
|
||||
[78, "v1", "generic-work"],
|
||||
[80, "v1", "generic-work"],
|
||||
[82, "v1", "generic-work"],
|
||||
[97, "a0", "generic-work"]
|
||||
],
|
||||
"(event idle simple-focus)": [[6, "v1", "vector"]],
|
||||
"(code die-falling bot)": [[32, "gp", "art-joint-anim"]],
|
||||
"(code failed bot)": [
|
||||
[23, "gp", "art-joint-anim"],
|
||||
[70, "v0", "string"]
|
||||
],
|
||||
"(code hit bot)": [[30, "v1", "art-joint-anim"]],
|
||||
"(method 201 bot)": [
|
||||
[41, "a0", "connection"],
|
||||
[42, "a0", "collide-shape"],
|
||||
[90, "a0", "connection"],
|
||||
[91, "a0", "collide-shape"],
|
||||
[153, "a1", "process-focusable"]
|
||||
],
|
||||
"(method 140 bot)": [
|
||||
[70, "s5", "process-focusable"],
|
||||
[[34, 74], "s5", "process-focusable"]
|
||||
],
|
||||
"(method 82 bot)": [
|
||||
[105, "a0", "bot"],
|
||||
[107, "v1", "process"],
|
||||
[222, "a0", "vector"]
|
||||
],
|
||||
"(method 236 bot)": [
|
||||
[28, "t9", "(function bot int)"],
|
||||
[46, "t9", "(function bot int)"]
|
||||
],
|
||||
"(method 84 bot)": [[45, "v1", "process-focusable"]],
|
||||
"(method 235 bot)": [[[15, 39], "s3", "process-focusable"]],
|
||||
"(method 202 bot)": [
|
||||
[10, "v1", "sphere"],
|
||||
[40, "a0", "connection"],
|
||||
[41, "a0", "collide-shape"],
|
||||
[49, "a3", "sphere"],
|
||||
[58, "f2", "float"],
|
||||
[89, "a0", "connection"],
|
||||
[90, "a0", "collide-shape"],
|
||||
[98, "a3", "sphere"],
|
||||
[107, "f2", "float"]
|
||||
],
|
||||
"(code standing-turn ashelin)": [[47, "s4", "art-joint-anim"]],
|
||||
"(code tumble-right ashelin)": [
|
||||
[35, "v1", "art-joint-anim"],
|
||||
[168, "v1", "art-joint-anim"],
|
||||
[280, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code cartwheel-left ashelin)": [
|
||||
[35, "v1", "art-joint-anim"],
|
||||
[168, "v1", "art-joint-anim"],
|
||||
[280, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code back-spring ashelin)": [
|
||||
[30, "v1", "art-joint-anim"],
|
||||
[309, "v1", "art-joint-anim"],
|
||||
[171, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(post chase ashelin)": [
|
||||
[14, "a0", "process-focusable"],
|
||||
[17, "a0", "process-focusable"]
|
||||
],
|
||||
"(code standing-blast ashelin)": [[68, "v1", "art-joint-anim"]],
|
||||
"(code standing-idle ashelin)": [
|
||||
[189, "v1", "art-joint-anim"],
|
||||
[126, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code waiting-idle ashelin)": [
|
||||
[204, "v1", "art-joint-anim"],
|
||||
[95, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code die-falling ashelin)": [[85, "gp", "art-joint-anim"]],
|
||||
"(method 55 ashelin)": [
|
||||
[[19, 23], "a0", "process-focusable"],
|
||||
[25, "a0", "process-focusable"]
|
||||
],
|
||||
"(method 85 ashelin)": [[129, "s5", "art-joint-anim"]],
|
||||
"(method 86 ashelin)": [
|
||||
[22, "s5", "art-joint-anim"],
|
||||
[77, "v1", "art-joint-anim"],
|
||||
[111, "v1", "art-joint-anim"],
|
||||
[165, "v1", "art-joint-anim"],
|
||||
[199, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(method 87 ashelin)": [[67, "v1", "art-joint-anim"]],
|
||||
"(code active task-manager-desert-oasis-defense)": [
|
||||
[363, "a0", "collide-shape-moving"],
|
||||
[426, "v1", "float"],
|
||||
[366, "a0", "collide-shape-moving"],
|
||||
[685, "v1", "float"]
|
||||
],
|
||||
"(method 32 task-manager-desert-oasis-defense)": [
|
||||
[98, "a0", "collide-shape-moving"],
|
||||
[116, "v1", "float"],
|
||||
[130, "v1", "float"],
|
||||
[101, "a0", "collide-shape-moving"]
|
||||
],
|
||||
"(method 33 task-manager-desert-oasis-defense)": [
|
||||
[[107, 168], "s1", "marauder"]
|
||||
],
|
||||
"(method 26 task-manager-desert-oasis-defense)": [
|
||||
[298, "s4", "process-drawable"],
|
||||
[308, "s4", "process-drawable"],
|
||||
[331, "s4", "process-drawable"],
|
||||
[55, "s3", "process-drawable"],
|
||||
[106, "v1", "float"],
|
||||
[146, "v1", "float"],
|
||||
[163, "v1", "float"]
|
||||
],
|
||||
"(method 82 ashelin-oasis)": [[11, "v1", "rigid-body-impact"]],
|
||||
"(method 263 ashelin-oasis)": [
|
||||
[85, "gp", "process-drawable"],
|
||||
[88, "gp", "process-drawable"],
|
||||
[67, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(anon-function 1 ash-oasis-course)": [[82, "v1", "asht-wait-spot"]],
|
||||
"(method 198 bot)": [
|
||||
[18, "a0", "uint"],
|
||||
[8, "v1", "uint"]
|
||||
],
|
||||
"(code active dark-eco-orb)": [
|
||||
[33, "v1", "art-joint-anim"],
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"dark-eco-tower-init-by-other": [[93, "v1", "vector"]],
|
||||
"(code hit dark-eco-orb)": [[14, "v1", "art-joint-anim"]],
|
||||
"(trans idle grind-electricity)": [
|
||||
["_stack_", 48, "(pointer lightning-tracker)"]
|
||||
],
|
||||
"dark-eco-orb-init-by-other": [[100, "v1", "vector"]],
|
||||
"dark-eco-orb-event-handler": [[[29, 71], "gp", "attack-info"]],
|
||||
"spawn-shock-effect": [["_stack_", 640, "(pointer lightning-tracker)"]],
|
||||
"(method 21 task-manager-destroy-darkeco)": [["_stack_", 16, "res-tag"]],
|
||||
"(code explode comb-block)": [[50, "a0", "process"]],
|
||||
"(method 29 comb-energy-ring)": [
|
||||
[52, "v1", "collide-shape-prim-group"],
|
||||
[54, "v1", "collide-shape-prim-group"]
|
||||
],
|
||||
"(method 30 comb-energy-ring)": [
|
||||
[10, "s5", "collide-shape-prim-group"],
|
||||
[16, "s5", "collide-shape-prim-group"]
|
||||
],
|
||||
"(event idle comb-block)": [
|
||||
[20, "s4", "attack-info"],
|
||||
[22, "s4", "attack-info"]
|
||||
],
|
||||
"(event idle comb-pillar)": [[[20, 30], "s4", "attack-info"]],
|
||||
"(event path-follow comb-sentry)": [[[13, 30], "s4", "attack-info"]],
|
||||
"(method 33 comb-sentry)": [[10, "v1", "collide-shape-prim-group"]],
|
||||
"(method 32 comb-sentry)": [[[28, 75], "s5", "process-focusable"]],
|
||||
"(event idle-close comb-field)": [
|
||||
[[22, 27], "v1", "attack-info"],
|
||||
[55, "s4", "process-drawable"],
|
||||
[132, "v1", "process-drawable"],
|
||||
[148, "v1", "process-drawable"],
|
||||
[155, "v1", "process-drawable"],
|
||||
[158, "a0", "process-drawable"],
|
||||
[172, "v1", "process-drawable"],
|
||||
[179, "v1", "process-drawable"],
|
||||
[182, "a0", "process-drawable"],
|
||||
[195, "v1", "process-drawable"],
|
||||
[198, "a0", "process-drawable"],
|
||||
[267, "v1", "process-drawable"],
|
||||
[275, "gp", "collide-shape"],
|
||||
[284, "gp", "collide-shape"],
|
||||
[[203, 207], "a2", "float"]
|
||||
],
|
||||
"(method 62 h-sled)": [[[4, 41], "s5", "collide-shape-prim-group"]],
|
||||
"(method 33 h-sled)": [[1, "a1", "rigid-body-vehicle-constants"]],
|
||||
"(method 49 h-sled)": [
|
||||
[72, "v1", "vector"],
|
||||
[64, "v1", "float"],
|
||||
[41, "v1", "float"]
|
||||
],
|
||||
"(enter explode h-sled)": [
|
||||
[107, "a0", "process"],
|
||||
[202, "v1", "joint-exploder"]
|
||||
],
|
||||
"(method 97 h-sled)": [[2, "a2", "h-sled-physics-work"]],
|
||||
"(method 26 task-manager-tube-ride)": [[[21, 51], "s5", "process-focusable"]],
|
||||
"(code complete task-manager-tube-ride)": [[23, "t9", "(function none)"]],
|
||||
"(code active task-manager-tube-ride)": [
|
||||
[[244, 259], "gp", "process-focusable"],
|
||||
[418, "v1", "process-focusable"],
|
||||
[494, "v1", "process-focusable"],
|
||||
[[569, 584], "gp", "process-focusable"],
|
||||
[611, "t9", "(function none)"]
|
||||
],
|
||||
"(code complete task-manager-comb-travel)": [[51, "t9", "(function none)"]],
|
||||
"(method 15 hud-factory-damage)": [[26, "v1", "float"]],
|
||||
"(method 43 warf-projectile)": [[35, "a1", "process-focusable"]],
|
||||
"(method 91 h-warf)": [
|
||||
[126, "v0", "vehicle"],
|
||||
[354, "v0", "vehicle"]
|
||||
],
|
||||
"(method 54 h-warf)": [[[15, 21], "a0", "process-focusable"]],
|
||||
"(method 97 h-warf)": [[159, "a0", "vector"]],
|
||||
"(method 156 fac-gunturret)": [[[11, 19], "a0", "process-focusable"]],
|
||||
"(method 155 fac-gunturret)": [[[15, 23], "a0", "process-focusable"]],
|
||||
"(code fire fac-robotank-turret)": [
|
||||
[65, "v1", "art-joint-anim"],
|
||||
[122, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code ready fac-robotank-turret)": [[10, "v1", "art-joint-anim"]],
|
||||
"(method 31 fac-robotank-turret)": [[76, "s3", "collide-shape-prim"]],
|
||||
"fac-robotank-reticle-handler": [
|
||||
[6, "v1", "vector"],
|
||||
[[11, 34], "s5", "vector"],
|
||||
[[12, 34], "gp", "vector"],
|
||||
[56, "v1", "float"]
|
||||
],
|
||||
"robotank-turret-handler": [
|
||||
[52, "v1", "collide-shape-prim-group"],
|
||||
[66, "v1", "collide-shape-prim-group"],
|
||||
[[96, 106], "s4", "cspace"],
|
||||
[18, "v1", "float"]
|
||||
],
|
||||
"(enter die fac-gun-tower)": [[13, "v1", "art-joint-anim"]],
|
||||
"(event idle fac-gun-tower)": [
|
||||
[19, "gp", "projectile"],
|
||||
[24, "gp", "projectile"],
|
||||
[35, "gp", "projectile"],
|
||||
[83, "gp", "projectile"]
|
||||
],
|
||||
"fac-gun-tower-standard-event-handler": [
|
||||
[[3, 11], "gp", "attack-info"],
|
||||
[[4, 22], "a2", "touching-shapes-entry"]
|
||||
],
|
||||
"(event idle fac-gun-tower-base)": [[[18, 86], "s4", "projectile"]],
|
||||
"(code idle fac-gun-tower-base)": [[10, "v1", "art-joint-anim"]],
|
||||
"(method 36 fac-gun-tower)": [[46, "s2", "process-focusable"]],
|
||||
"(method 35 fac-gun-tower)": [[79, "v0", "vehicle"]],
|
||||
"fac-robotank-init-by-other": [
|
||||
[182, "gp", "factory-manager"],
|
||||
[208, "gp", "factory-manager"],
|
||||
[224, "gp", "factory-manager"],
|
||||
[293, "t1", "float"],
|
||||
[[346, 518], "gp", "fac-robotank-tread-info"]
|
||||
],
|
||||
"(method 7 fac-robotank)": [
|
||||
[21, "a1", "fac-robotank"],
|
||||
[28, "a1", "fac-robotank"],
|
||||
[35, "a2", "fac-robotank"]
|
||||
],
|
||||
"(post moving fac-robotank)": [[[33, 87], "s5", "factory-manager"]],
|
||||
"fac-robotank-handler": [[[98, 105], "v1", "attack-info"]],
|
||||
"fac-robotank-post": [
|
||||
[[365, 368], "v1", "fac-robotank-turret"],
|
||||
[394, "v1", "float"]
|
||||
],
|
||||
"(code idle factory-fighter)": [[10, "v1", "art-joint-anim"]],
|
||||
"fac-target-standard-event-handler": [[[48, 54], "v1", "attack-info"]],
|
||||
"(enter idle fac-target)": [[63, "v1", "art-joint-anim"]],
|
||||
"(enter retracted fac-target)": [[33, "v1", "art-joint-anim"]],
|
||||
"(method 60 factory-fighter)": [[52, "v0", "vehicle"]],
|
||||
"(code die factory-fighter)": [[11, "v1", "art-joint-anim"]],
|
||||
"(method 32 task-manager-factory-sky-battle)": [["_stack_", 16, "res-tag"]],
|
||||
"update-railx-lights": [[[33, 88], "s3", "railx-states"]],
|
||||
"update-mood-railx": [[[64, 109], "gp", "railx-states"]],
|
||||
"set-railx-light-brightness!": [
|
||||
[[30, 36], "v1", "railx-states"],
|
||||
[[13, 19], "v1", "railx-states"]
|
||||
],
|
||||
"(code idle rail-warp-gate)": [[10, "v1", "art-joint-anim"]]
|
||||
}
|
||||
|
||||
@@ -2056,5 +2056,23 @@
|
||||
"vars": {
|
||||
"v0-1": ["hand", "handle"]
|
||||
}
|
||||
},
|
||||
"(method 42 mh-centipede)": {
|
||||
"vars": {
|
||||
"s0-0": ["sname", "sound-name"]
|
||||
}
|
||||
},
|
||||
"check-enemy": {
|
||||
"args": ["turret", "radius", "pfoc"]
|
||||
},
|
||||
"(method 202 bot)": {
|
||||
"vars": {
|
||||
"s4-0": ["cspec", "collide-spec"]
|
||||
}
|
||||
},
|
||||
"(enter impact warf-projectile)": {
|
||||
"vars": {
|
||||
"s4-0": ["sname", "sound-name"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
#include "TP_Type.h"
|
||||
|
||||
#include "common/goos/Printer.h"
|
||||
#include "common/goos/Reader.h"
|
||||
#include "common/log/log.h"
|
||||
#include "common/type_system/defenum.h"
|
||||
#include "common/type_system/deftype.h"
|
||||
#include "common/util/string_util.h"
|
||||
#include <common/goos/Printer.h>
|
||||
|
||||
#include "decompiler/Disasm/Register.h"
|
||||
|
||||
|
||||
@@ -1020,6 +1020,17 @@ const std::unordered_map<
|
||||
{"terraformer-graph",
|
||||
{{"node", ArrayFieldDecompMeta(TypeSpec("terraformer-node"), 32)},
|
||||
{"edge", ArrayFieldDecompMeta(TypeSpec("terraformer-edge"), 16)}}},
|
||||
{"bombbot-path", {{"node", ArrayFieldDecompMeta(TypeSpec("bombbot-node"), 32)}}},
|
||||
{"ai-task-pool",
|
||||
{{"tasks", ArrayFieldDecompMeta(TypeSpec("uint32"),
|
||||
4,
|
||||
ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}},
|
||||
{"bot-course", {{"spots", ArrayFieldDecompMeta(TypeSpec("bot-spot"), 32)}}},
|
||||
{"ashelin-course",
|
||||
{{"spots", ArrayFieldDecompMeta(TypeSpec("bot-spot"), 32)},
|
||||
{"speeches", ArrayFieldDecompMeta(TypeSpec("bot-speech-info"), 16)},
|
||||
{"dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)},
|
||||
{"speech-tunings", ArrayFieldDecompMeta(TypeSpec("bot-speech-tuning"), 16)}}},
|
||||
}}};
|
||||
|
||||
goos::Object decompile_structure(const TypeSpec& type,
|
||||
|
||||
@@ -213,6 +213,7 @@ set(RUNTIME_SOURCE
|
||||
mips2c/jak3_functions/ripple.cpp
|
||||
mips2c/jak3_functions/ocean.cpp
|
||||
mips2c/jak3_functions/ocean_vu0.cpp
|
||||
mips2c/jak3_functions/generic_merc.cpp
|
||||
mips2c/mips2c_table.cpp
|
||||
overlord/common/dma.cpp
|
||||
overlord/common/fake_iso.cpp
|
||||
|
||||
@@ -169,6 +169,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
init_bucket_renderer<Merc2BucketRenderer>(
|
||||
fmt::format("merc-l{}-tfrag", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_TFRAG, BucketId::MERC_L1_TFRAG, i), m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc-l{}-tfrag", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_TFRAG, BucketId::GMERC_L1_TFRAG, i), m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
|
||||
init_bucket_renderer<TextureUploadHandler>(
|
||||
fmt::format("tex-l{}-shrub", i), BucketCategory::TEX,
|
||||
@@ -180,6 +184,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
init_bucket_renderer<Merc2BucketRenderer>(
|
||||
fmt::format("merc-l{}-shrub", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_SHRUB, BucketId::MERC_L1_SHRUB, i), m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc-l{}-shrub", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_SHRUB, BucketId::GMERC_L1_SHRUB, i), m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
|
||||
// 230
|
||||
init_bucket_renderer<TextureUploadHandler>(
|
||||
@@ -201,6 +209,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
init_bucket_renderer<Merc2BucketRenderer>(
|
||||
fmt::format("merc-l{}-alpha", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_ALPHA, BucketId::MERC_L1_ALPHA, i), m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc-l{}-alpha", i), BucketCategory::GENERIC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_ALPHA, BucketId::GMERC_L1_ALPHA, i), m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
init_bucket_renderer<Tie3AnotherCategory>(
|
||||
fmt::format("tie-w-l{}-water", i), BucketCategory::TIE,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::TIE_L0_WATER, BucketId::TIE_L1_WATER, i), tie,
|
||||
@@ -216,6 +228,9 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
BucketId::TEX_LCOM_TFRAG, texture_animator);
|
||||
init_bucket_renderer<Merc2BucketRenderer>("merc-lcom-tfrag", BucketCategory::MERC,
|
||||
BucketId::MERC_LCOM_TFRAG, m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>("gmerc-lcom-tfrag", BucketCategory::GENERIC,
|
||||
BucketId::GMERC_LCOM_TFRAG, m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
// 345
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-shrub", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_SHRUB, texture_animator);
|
||||
@@ -236,10 +251,18 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
init_bucket_renderer<Merc2BucketRenderer>(
|
||||
fmt::format("merc-l{}-pris", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_PRIS, BucketId::MERC_L1_PRIS, i), m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc-l{}-pris", i), BucketCategory::GENERIC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_PRIS, BucketId::GMERC_L1_PRIS, i), m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
|
||||
init_bucket_renderer<Merc2BucketRenderer>(
|
||||
fmt::format("merc-l{}-pris2", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_PRIS2, BucketId::MERC_L1_PRIS2, i), m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc-l{}-pris2", i), BucketCategory::GENERIC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_PRIS, BucketId::GMERC_L1_PRIS, i), m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
}
|
||||
|
||||
// 401
|
||||
@@ -247,6 +270,9 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
BucketId::TEX_LCOM_PRIS, texture_animator);
|
||||
init_bucket_renderer<Merc2BucketRenderer>("merc-lcom-pris", BucketCategory::MERC,
|
||||
BucketId::MERC_LCOM_PRIS, m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>("gmerc-lcom-pris", BucketCategory::GENERIC,
|
||||
BucketId::GMERC_LCOM_PRIS, m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
|
||||
// 461
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-sky-post", BucketCategory::TEX,
|
||||
@@ -264,6 +290,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
init_bucket_renderer<Merc2BucketRenderer>(
|
||||
fmt::format("merc-l{}-water", i), BucketCategory::MERC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_WATER, BucketId::MERC_L1_WATER, i), m_merc2);
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc-l{}-water", i), BucketCategory::GENERIC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_WATER, BucketId::GMERC_L1_WATER, i), m_generic2,
|
||||
Generic2::Mode::NORMAL);
|
||||
// 466
|
||||
init_bucket_renderer<TFragment>(
|
||||
fmt::format("tfrag-l{}-water", i), BucketCategory::TFRAG,
|
||||
@@ -287,6 +317,8 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
// 575
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-warp", BucketCategory::TEX, BucketId::TEX_WARP,
|
||||
texture_animator);
|
||||
init_bucket_renderer<Warp>("generic-warp", BucketCategory::GENERIC, BucketId::GENERIC_WARP,
|
||||
m_generic2);
|
||||
|
||||
init_bucket_renderer<TextureUploadHandler>("debug-no-zbuf1", BucketCategory::OTHER,
|
||||
BucketId::DEBUG_NO_ZBUF1, m_texture_animator, true);
|
||||
|
||||
@@ -250,7 +250,7 @@ void Generic2::setup_opengl_tex(u16 unit,
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
}
|
||||
|
||||
if (render_state->version == GameVersion::Jak2 && tbp_to_lookup == 1216) {
|
||||
if (render_state->version >= GameVersion::Jak2 && tbp_to_lookup == 1216) {
|
||||
glUniform1ui(m_ogl.warp_sample_mode, 1);
|
||||
// warp shader uses region clamp, which isn't supported by DrawMode.
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
|
||||
@@ -175,8 +175,10 @@ u64 execute(void* ctxt) {
|
||||
c->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7)
|
||||
c->lqc2(vf26, 812, v1); // lqc2 vf26, 812(v1)
|
||||
c->lqc2(vf27, 812, v1); // lqc2 vf27, 812(v1)
|
||||
c->vadd_bc(DEST::xy, BC::w, vf26, vf26, vf0); // vaddw.xy vf26, vf26, vf0
|
||||
c->vadd_bc(DEST::x, BC::w, vf26, vf26, vf0); // vaddw.x vf26, vf26, vf0
|
||||
// shadow hack begin
|
||||
// c->vadd_bc(DEST::xy, BC::w, vf26, vf26, vf0); // vaddw.xy vf26, vf26, vf0
|
||||
// c->vadd_bc(DEST::x, BC::w, vf26, vf26, vf0); // vaddw.x vf26, vf26, vf0
|
||||
// shadow hack end
|
||||
c->lw(v1, 68, a2); // lw v1, 68(a2)
|
||||
c->lqc2(vf25, 44, a2); // lqc2 vf25, 44(a2)
|
||||
c->lqc2(vf23, 12, a2); // lqc2 vf23, 12(a2)
|
||||
@@ -187,12 +189,29 @@ u64 execute(void* ctxt) {
|
||||
c->lqc2(vf31, 48, v1); // lqc2 vf31, 48(v1)
|
||||
c->load_symbol2(v1, cache.video_params); // lw v1, *video-params*(s7)
|
||||
c->mov64(v1, v1); // or v1, v1, r0
|
||||
// shadow hack begin
|
||||
c->lw(t0, 16, v1); // lw t0, 16(v1)
|
||||
// multiply shadow offset by font scale and screen x scale
|
||||
c->vfs[vf26].f[0] += c->gprs[t0].f[0] * 2;
|
||||
c->vfs[vf26].f[1] += 1;
|
||||
// shadow hack end
|
||||
c->lqc2(vf1, 32, v1); // lqc2 vf1, 32(v1)
|
||||
c->vdiv(vf0, BC::w, vf25, BC::w); // vdiv Q, vf0.w, vf25.w
|
||||
c->lqc2(vf2, 16, v1); // lqc2 vf2, 16(v1)
|
||||
c->vmul(DEST::x, vf25, vf25, vf1); // vmul.x vf25, vf25, vf1
|
||||
c->vmul(DEST::x, vf23, vf23, vf1); // vmul.x vf23, vf23, vf1
|
||||
c->vmul(DEST::x, vf24, vf24, vf1); // vmul.x vf24, vf24, vf1
|
||||
// pc-hack
|
||||
c->lw(v1, 64, a2); // lw v1, 64(a2)
|
||||
if (!(c->gprs[v1].du32[0] & (1 << 6))) {
|
||||
// pc-hack flag
|
||||
c->vmul(DEST::x, vf24, vf24, vf1); // vmul.x vf24, vf24, vf1
|
||||
}
|
||||
if (!(c->gprs[v1].du32[0] & (1 << 5))) {
|
||||
// small font, readjust shadow
|
||||
c->vfs[vf26].f[0] -= (c->gprs[t0].f[0] * 2) - (c->vfs[vf25].f[3] * c->gprs[t0].f[0] * 2);
|
||||
c->vfs[vf26].f[1] -= 1 - (c->vfs[vf25].f[3] * 1);
|
||||
}
|
||||
// pc-hack end
|
||||
c->vwaitq(); // vwaitq
|
||||
c->vmulq(DEST::xy, vf25, vf25); // vmulq.xy vf25, vf25, Q
|
||||
c->vmulq(DEST::xy, vf23, vf23); // vmulq.xy vf23, vf23, Q
|
||||
@@ -2739,10 +2758,16 @@ block_59:
|
||||
|
||||
block_60:
|
||||
c->vsub(DEST::xyzw, vf23, vf23, vf24); // vsub.xyzw vf23, vf23, vf24
|
||||
c->load_symbol2(v1, cache.video_params); // lw v1, *video-params*(s7)
|
||||
c->mov64(v1, v1); // or v1, v1, r0
|
||||
c->lqc2(vf1, 16, v1); // lqc2 vf1, 16(v1)
|
||||
c->vmul(DEST::x, vf23, vf23, vf1); // vmul.x vf23, vf23, vf1
|
||||
// pc-hack
|
||||
c->lw(v1, 64, a1); // lw v1, 64(a1)
|
||||
if (!(c->gprs[v1].du32[0] & 1 << 6)) {
|
||||
// pc-hack flag
|
||||
c->load_symbol2(v1, cache.video_params); // lw v1, *video-params*(s7)
|
||||
c->mov64(v1, v1); // or v1, v1, r0
|
||||
c->lqc2(vf1, 16, v1); // lqc2 vf1, 16(v1)
|
||||
c->vmul(DEST::x, vf23, vf23, vf1); // vmul.x vf23, vf23, vf1
|
||||
}
|
||||
// pc-hack end
|
||||
c->lqc2(vf1, 44, a1); // lqc2 vf1, 44(a1)
|
||||
c->vmul_bc(DEST::x, BC::w, vf23, vf23, vf1); // vmulw.x vf23, vf23, vf1
|
||||
c->mov128_gpr_vf(v0, vf23); // qmfc2.i v0, vf23
|
||||
@@ -2761,7 +2786,8 @@ void link() {
|
||||
cache.font12_table = intern_from_c(-1, 0, "*font12-table*").c();
|
||||
cache.font24_table = intern_from_c(-1, 0, "*font24-table*").c();
|
||||
cache.video_params = intern_from_c(-1, 0, "*video-params*").c();
|
||||
gLinkedFunctionTable.reg("get-string-length", execute, 512);
|
||||
// gLinkedFunctionTable.reg("get-string-length", execute, 512);
|
||||
gLinkedFunctionTable.reg("get-string-length-asm", execute, 512);
|
||||
}
|
||||
|
||||
} // namespace get_string_length
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -357,6 +357,14 @@ namespace method_16_ocean { extern void link(); }
|
||||
namespace init_ocean_far_regs { extern void link(); }
|
||||
namespace draw_large_polygon_ocean { extern void link(); }
|
||||
namespace render_ocean_quad { extern void link(); }
|
||||
namespace generic_merc_do_chain { extern void link(); }
|
||||
namespace generic_merc_execute_asm { extern void link(); }
|
||||
namespace generic_merc_death { extern void link(); }
|
||||
namespace generic_merc_query { extern void link(); }
|
||||
namespace generic_translucent { extern void link(); }
|
||||
namespace high_speed_reject { extern void link(); }
|
||||
namespace mercneric_convert { extern void link(); }
|
||||
namespace generic_merc_init_asm { extern void link(); }
|
||||
|
||||
}
|
||||
// clang-format on
|
||||
@@ -601,6 +609,11 @@ PerGameVersion<std::unordered_map<std::string, std::vector<void (*)()>>> gMips2C
|
||||
{"ocean",
|
||||
{jak3::init_ocean_far_regs::link, jak3::draw_large_polygon_ocean::link,
|
||||
jak3::render_ocean_quad::link}},
|
||||
{"generic-merc",
|
||||
{jak3::generic_merc_do_chain::link, jak3::generic_merc_execute_asm::link,
|
||||
jak3::generic_merc_death::link, jak3::generic_merc_query::link,
|
||||
jak3::generic_translucent::link, jak3::high_speed_reject::link,
|
||||
jak3::mercneric_convert::link, jak3::generic_merc_init_asm::link}},
|
||||
}};
|
||||
|
||||
void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) {
|
||||
|
||||
@@ -240,7 +240,7 @@ This is used to make jak look toward an enemy, for example."
|
||||
"Set up this joint-mod to modify the given joint of the given process. Will attach automatically if attached flag is set."
|
||||
(set! (-> this flags) flags)
|
||||
(set! (-> this node-index) (the-as int bone-idx))
|
||||
(set! (-> this proc) (the-as (pointer process-drawable) (process->ppointer proc)))
|
||||
(set! (-> this proc) (process->ppointer proc))
|
||||
(if (logtest? flags (joint-mod-base-flags attached))
|
||||
(attach-callback this)
|
||||
)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
(set! (-> *edge-grab-info* found-edge?) #f)
|
||||
(mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer arg1) 320)
|
||||
(let ((s5-0 *collide-edge-work*))
|
||||
(set! (-> s5-0 process) (the-as (pointer process-drawable) (process->ppointer this)))
|
||||
(set! (-> s5-0 process) (process->ppointer this))
|
||||
(set! (-> s5-0 num-verts) (the-as uint 0))
|
||||
(set! (-> s5-0 num-edges) (the-as uint 0))
|
||||
(set! (-> s5-0 num-tris) (the-as uint 0))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
:bitfield #t
|
||||
(pcf0 0)
|
||||
(pcf1 1)
|
||||
(pcf2 2)
|
||||
)
|
||||
;; ---particle-curve-flags
|
||||
|
||||
|
||||
@@ -493,7 +493,8 @@
|
||||
(set! (-> *debug-text-3d-trk* allocated-length) 512)
|
||||
|
||||
(dotimes (gp-0 (-> *debug-text-3d-trk* allocated-length))
|
||||
(set! (-> *debug-text-3ds* gp-0 str) (new 'debug 'string 80 (the-as string #f)))
|
||||
;; og:preserve-this allocate larger strings for 3d text
|
||||
(set! (-> *debug-text-3ds* gp-0 str) (new 'debug 'string (#if PC_BIG_MEMORY 255 80) (the-as string #f)))
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
(set! (-> gp-0 joypad-func) #f)
|
||||
(set! (-> gp-0 joypad-item) #f)
|
||||
(set! (-> gp-0 font)
|
||||
(new 'debug 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning))
|
||||
;; og:preserve-this pc flag
|
||||
(new 'debug 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning pc-hack))
|
||||
)
|
||||
(set! (-> gp-0 joypad-number) 0)
|
||||
gp-0
|
||||
@@ -935,11 +936,12 @@
|
||||
(with-dma-buffer-add-bucket ((s0-0 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(bucket-id debug-menu)
|
||||
)
|
||||
;; og:preserve-this fixed for widescreen
|
||||
(draw-sprite2d-xy
|
||||
s0-0
|
||||
arg1
|
||||
(correct-x-int arg1)
|
||||
arg2
|
||||
(-> arg0 pix-width)
|
||||
(correct-x-int (-> arg0 pix-width))
|
||||
(-> arg0 pix-height)
|
||||
(new 'static 'rgba :a #x40)
|
||||
#x3fffff
|
||||
|
||||
@@ -1454,7 +1454,7 @@
|
||||
(let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf)))
|
||||
(bones-init gp-0)
|
||||
(bones-mtx-calc-execute)
|
||||
;; (generic-merc-execute-all gp-0)
|
||||
(generic-merc-execute-all gp-0)
|
||||
;; (shadow-execute-all gp-0)
|
||||
)
|
||||
(lightning-draw-all)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
:heap-size #x8000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref desert-chase-ring :method-count 0)
|
||||
:ptype (type-ref desert-chase-ring :method-count 24)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
@@ -100,7 +100,7 @@
|
||||
:heap-size #x4000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref mh-centipede :method-count 0)
|
||||
:ptype (type-ref mh-centipede :method-count 43)
|
||||
:pool '*16k-dead-pool*
|
||||
:heap-size #x4000
|
||||
)
|
||||
|
||||
@@ -112,7 +112,8 @@
|
||||
This handles drawing, collision, animation, navigation, particles, sounds, physics, etc.
|
||||
The actual child classes will add most of the functionality, and this just serves as a common
|
||||
container for references to the `-control` objects for this object."
|
||||
((self process-drawable :override)
|
||||
((self process-drawable :override)
|
||||
(ppointer (pointer process-drawable) :override)
|
||||
(root trsqv)
|
||||
(node-list cspace-array)
|
||||
(draw draw-control)
|
||||
|
||||
@@ -95,23 +95,23 @@
|
||||
;; +++main-h:bot-marks-controls
|
||||
(defenum bot-marks-controls
|
||||
:type int64
|
||||
; (all-off 0)
|
||||
; (course-spots 1)
|
||||
; (task-spots 2)
|
||||
; (all-on 3)
|
||||
; (bmc04 4)
|
||||
; (bmc05 5)
|
||||
; (bmc06 6)
|
||||
; (bmc07 7)
|
||||
; (bmc08 8)
|
||||
; (bmc09 9)
|
||||
; (bmc10 10)
|
||||
; (bmc11 11)
|
||||
; (bmc12 12)
|
||||
; (bmc13 13)
|
||||
; (bmc14 14)
|
||||
; (bmc15 15)
|
||||
; (bmc16 16)
|
||||
(all-off 0)
|
||||
(course-spots 1)
|
||||
(task-spots 2)
|
||||
(all-on 3)
|
||||
(bmc04 4)
|
||||
(bmc05 5)
|
||||
(bmc06 6)
|
||||
(bmc07 7)
|
||||
(bmc08 8)
|
||||
(bmc09 9)
|
||||
(bmc10 10)
|
||||
(bmc11 11)
|
||||
(bmc12 12)
|
||||
(bmc13 13)
|
||||
(bmc14 14)
|
||||
(bmc15 15)
|
||||
(bmc16 16)
|
||||
)
|
||||
;; ---main-h:bot-marks-controls
|
||||
|
||||
|
||||
@@ -47,10 +47,12 @@
|
||||
(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)
|
||||
(define-extern *cty-attack-controller* symbol)
|
||||
(define-extern *cty-attack-controller* cty-attack-controller)
|
||||
(set! *cty-faction-manager* #f)
|
||||
(set! *cty-attack-controller* #f)
|
||||
(set! *cty-attack-controller* (the cty-attack-controller #f))
|
||||
|
||||
(define-extern cty-attack-reset (function symbol symbol symbol none))
|
||||
(define-extern setup-city-task-faction (function object))
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
;; ERROR: Failed load: (set! a2-4 (l.wu (+ a2-3 2224))) at op 19
|
||||
(defun draw-string ((arg0 string) (arg1 dma-buffer) (arg2 font-context))
|
||||
(local-vars (v0-2 uint))
|
||||
(#when PC_PORT
|
||||
;; debug font scaling.
|
||||
(unless (logtest? (-> arg2 flags) (font-flags large pc-hack))
|
||||
(*! (-> arg2 scale) (get-debug-font-scale-factor))))
|
||||
(let ((v1-1 (the int (* 128.0 (-> arg2 alpha)))))
|
||||
(-> arg2 origin quad)
|
||||
(dotimes (a0-2 45)
|
||||
@@ -42,7 +46,23 @@
|
||||
(the-as draw-string-result v0-2)
|
||||
)
|
||||
|
||||
(def-mips2c get-string-length (function string font-context draw-string-result))
|
||||
; (def-mips2c get-string-length (function string font-context draw-string-result))
|
||||
(def-mips2c get-string-length-asm (function string font-context draw-string-result))
|
||||
|
||||
(#when PC_PORT
|
||||
;; og:preserve-this get-string-length is an asm function, but for PC port we use a trampoline in order to inject hacks more easily
|
||||
(defun get-string-length ((text string) (ctx font-context))
|
||||
"return the length of a string, in gs framebuffer units"
|
||||
(let ((orig-scale (-> ctx scale))
|
||||
(result (begin (#when PC_PORT ;; debug font scaling.
|
||||
(unless (logtest? (-> ctx flags) (font-flags large pc-hack))
|
||||
(*! (-> ctx scale) (get-debug-font-scale-factor))))
|
||||
(get-string-length-asm text ctx))))
|
||||
(set! (-> ctx scale) orig-scale)
|
||||
result)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
(defun draw-string-xy ((arg0 string) (arg1 dma-buffer) (arg2 int) (arg3 int) (arg4 font-color) (arg5 font-flags))
|
||||
(let ((s4-0 (new 'stack 'font-context *font-default-matrix* arg2 arg3 0.0 arg4 arg5)))
|
||||
|
||||
@@ -7,3 +7,158 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define mercneric-vu0-block (new 'static 'vu-function #|:length #xbe :origin #x118 :qlength 95|#))
|
||||
|
||||
(deftype invinitdata (structure)
|
||||
((count uint8)
|
||||
(init-data uint8)
|
||||
(init-addr uint16)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(define *inv-init-table* (new 'static 'inline-array invinitdata 8
|
||||
(new 'static 'invinitdata :count #x48 :init-addr #x1)
|
||||
(new 'static 'invinitdata :count #x43 :init-data #xc :init-addr #x11)
|
||||
(new 'static 'invinitdata :count #x3d :init-data #x18 :init-addr #x21)
|
||||
(new 'static 'invinitdata :count #x38 :init-data #x22 :init-addr #xe0)
|
||||
(new 'static 'invinitdata :count #x38 :init-data #x24 :init-addr #xe1)
|
||||
(new 'static 'invinitdata :count #x33 :init-data #x30 :init-addr #xf1)
|
||||
(new 'static 'invinitdata :count #x2e :init-data #x3a :init-addr #x190)
|
||||
(new 'static 'invinitdata :count #x2d :init-data #x3c :init-addr #x191)
|
||||
)
|
||||
)
|
||||
|
||||
(def-mips2c generic-merc-init-asm (function none))
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function has no type analysis. Cannot decompile.
|
||||
|
||||
(def-mips2c mercneric-convert function)
|
||||
|
||||
(def-mips2c high-speed-reject function)
|
||||
|
||||
(def-mips2c generic-translucent (function gsf-buffer none))
|
||||
|
||||
(def-mips2c generic-merc-query function)
|
||||
|
||||
(def-mips2c generic-merc-death function)
|
||||
|
||||
(def-mips2c generic-merc-execute-asm function)
|
||||
|
||||
(def-mips2c generic-merc-do-chain (function mercneric-chain dma-buffer pointer))
|
||||
|
||||
(defun generic-merc-execute-all ((arg0 dma-buffer))
|
||||
(local-vars (a0-24 int) (a0-26 int))
|
||||
(let ((s4-0 (-> *foreground* foreground-grid))
|
||||
(gp-0 (-> *display* frames (-> *display* on-screen) global-buf base))
|
||||
)
|
||||
(when *debug-segment*
|
||||
(let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0))
|
||||
(v1-14 'generic)
|
||||
(s2-0 *profile-generic-color*)
|
||||
)
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let ((s1-0 (-> s3-0 data (-> s3-0 count))))
|
||||
(let ((s0-0 (-> s3-0 base-time)))
|
||||
(set! (-> s1-0 name) v1-14)
|
||||
(set! (-> s1-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s0-0))))
|
||||
)
|
||||
(set! (-> s1-0 depth) (the-as uint (-> s3-0 depth)))
|
||||
(set! (-> s1-0 color) s2-0)
|
||||
(set! (-> s3-0 segment (-> s3-0 depth)) s1-0)
|
||||
)
|
||||
(set! (-> s3-0 count) (min 1023 (+ (-> s3-0 count) 1)))
|
||||
(+! (-> s3-0 depth) 1)
|
||||
(set! (-> s3-0 max-depth) (max (-> s3-0 max-depth) (-> s3-0 depth)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(let* ((v1-28 (-> *perf-stats* data 38))
|
||||
(a0-12 (-> v1-28 ctrl))
|
||||
)
|
||||
(+! (-> v1-28 count) 1)
|
||||
(b! (zero? a0-12) cfg-9 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mtpc pcr0 0)
|
||||
(.mtpc pcr1 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mtc0 Perf a0-12)
|
||||
)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(label cfg-9)
|
||||
0
|
||||
;; og:preserve-this
|
||||
(set! (-> (scratchpad-object generic-work) saves to-vu0-waits) (the-as uint 0))
|
||||
(set! (-> (scratchpad-object generic-work) saves to-spr-waits) (the-as uint 0))
|
||||
(set! (-> (scratchpad-object generic-work) saves from-spr-waits) (the-as uint 0))
|
||||
(flush-cache 0)
|
||||
(generic-initialize-without-sync (-> *math-camera* perspective) *default-lights*)
|
||||
(generic-merc-init-asm)
|
||||
(set! (-> (scratchpad-object generic-work) in-buf merc shadow write-limit)
|
||||
(the-as int (&+ (-> arg0 end) -262144))
|
||||
)
|
||||
(dotimes (s3-1 11)
|
||||
(dotimes (s2-1 7)
|
||||
(generic-merc-do-chain (-> s4-0 level-buckets s3-1 data s2-1 mercneric) arg0)
|
||||
)
|
||||
)
|
||||
(generic-merc-do-chain (-> s4-0 warp-chain) arg0)
|
||||
(let ((v1-43 (-> *perf-stats* data 38)))
|
||||
(b! (zero? (-> v1-43 ctrl)) cfg-17 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
(.sync.l)
|
||||
(.sync.p)
|
||||
(.mfpc a0-24 pcr0)
|
||||
(+! (-> v1-43 accum0) a0-24)
|
||||
(.mfpc a0-26 pcr1)
|
||||
(+! (-> v1-43 accum1) a0-26)
|
||||
)
|
||||
(label cfg-17)
|
||||
0
|
||||
(update-wait-stats
|
||||
(-> *perf-stats* data 38)
|
||||
;; og:preserve-this
|
||||
(-> (scratchpad-object generic-work) saves to-vu0-waits)
|
||||
(-> (scratchpad-object generic-work) saves to-spr-waits)
|
||||
(-> (scratchpad-object generic-work) saves from-spr-waits)
|
||||
)
|
||||
(when *debug-segment*
|
||||
(let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let* ((v1-61 (+ (-> s5-1 depth) -1))
|
||||
(s4-1 (-> s5-1 segment v1-61))
|
||||
(s3-2 (-> s5-1 base-time))
|
||||
)
|
||||
(when (>= v1-61 0)
|
||||
(set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-2))))
|
||||
(+! (-> s5-1 depth) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(let ((v1-66 *dma-mem-usage*))
|
||||
(when (nonzero? v1-66)
|
||||
(set! (-> v1-66 length) (max 91 (-> v1-66 length)))
|
||||
(set! (-> v1-66 data 90 name) "pris-generic")
|
||||
(+! (-> v1-66 data 90 count) 1)
|
||||
(+! (-> v1-66 data 90 used)
|
||||
(&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint gp-0))
|
||||
)
|
||||
(set! (-> v1-66 data 90 total) (-> v1-66 data 90 used))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -186,7 +186,8 @@
|
||||
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s4-3 (-> s3-0 base))
|
||||
)
|
||||
(fx-copy-buf s3-0)
|
||||
;; this is like the normal one, but runs fx-copy-buf first, copying the framebuffer.
|
||||
; (fx-copy-buf s3-0)
|
||||
(generic-init-buf s3-0 arg1)
|
||||
(let ((v1-14 (the-as object (-> s3-0 base))))
|
||||
(set! (-> (the-as dma-packet v1-14) dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s5-0 next)))
|
||||
|
||||
@@ -39,3 +39,8 @@
|
||||
:screen-pages-high 13
|
||||
)
|
||||
)
|
||||
|
||||
;; og:preserve-this added
|
||||
(defmacro correct-x-int (pos)
|
||||
`(the int (* (-> *video-params* relative-x-scale) (the float ,pos)))
|
||||
)
|
||||
@@ -73,7 +73,8 @@
|
||||
|
||||
|
||||
(deftype texture-anim-array (array)
|
||||
()
|
||||
((array-data texture-anim :dynamic)
|
||||
)
|
||||
(:methods
|
||||
(init! (_type_) _type_)
|
||||
(clear! (_type_) _type_)
|
||||
|
||||
@@ -1292,7 +1292,7 @@
|
||||
(logior! (-> (&-> v1-7 0 mask data a1-1) 0) (-> a0-2 mask data a1-1))
|
||||
)
|
||||
)
|
||||
(set! (-> lev upload-size 0) (upload-vram-pages-pris
|
||||
(set! (-> lev upload-size 0) (upload-vram-pages-pris-pc
|
||||
pool
|
||||
(-> pool segment-common)
|
||||
a2-1
|
||||
|
||||
@@ -7,3 +7,30 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun fx-copy-buf ((arg0 dma-buffer))
|
||||
"draw the current framebuffer to tbp #x3300 (13056)"
|
||||
(#when PC_PORT
|
||||
(dma-buffer-add-cnt-vif2 arg0 1 (new 'static 'vif-tag :cmd (vif-cmd pc-port) :imm #x10) ;; kind - buffer->texture
|
||||
(new 'static 'vif-tag :cmd (vif-cmd pc-port) :imm #x3300))
|
||||
(dma-buffer-add-uint128 arg0 0)
|
||||
)
|
||||
(set-dirty-mask! (-> *level* level-default) 5 #xd0000 #x4c000)
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *warp-shader* (new 'static 'adgif-shader
|
||||
:reg-0 #x6
|
||||
:reg-1 #x14
|
||||
:reg-2 #x34
|
||||
:reg-3 #x8
|
||||
:reg-4 #x42
|
||||
:tex0 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1)
|
||||
:tex1 (new 'static 'gs-tex1 :mmag #x1)
|
||||
:clamp (new 'static 'gs-clamp
|
||||
:wms (gs-tex-wrap-mode region-clamp)
|
||||
:wmt (gs-tex-wrap-mode region-clamp)
|
||||
:maxu #x1ff
|
||||
:maxv #x19f
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -83,10 +83,10 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 float))
|
||||
(defun matrix-f-compose ((arg0 matrix) (arg1 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1)))
|
||||
(matrix-f-u-compose arg0 arg1 a2-1)
|
||||
(let ((a2-0 (vector-get-unique! (new 'stack-no-clear 'vector) arg1)))
|
||||
(matrix-f-u-compose arg0 arg1 a2-0)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
(defmethod initialize ((this impact-control) (arg0 process-drawable) (arg1 int) (arg2 float) (arg3 collide-spec))
|
||||
(set! (-> this start-time) (the-as uint (current-time)))
|
||||
(set! (-> this process) (the-as (pointer process-drawable) (process->ppointer arg0)))
|
||||
(set! (-> this process) (process->ppointer arg0))
|
||||
(set! (-> this joint) arg1)
|
||||
(set! (-> this radius) arg2)
|
||||
(set! (-> this collide-with) (logclear arg3 (collide-spec water)))
|
||||
|
||||
@@ -1634,7 +1634,7 @@
|
||||
|
||||
(defmethod new top-anim-joint-control ((allocation symbol) (type-to-make type) (arg0 process-drawable))
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> gp-0 process) (the-as (pointer process-drawable) (process->ppointer arg0)))
|
||||
(set! (-> gp-0 process) (process->ppointer arg0))
|
||||
(set! (-> gp-0 interp-select 0) (the-as uint (-> arg0 skel interp-select 0)))
|
||||
(set! (-> gp-0 interp-select 1) (the-as uint (-> arg0 skel interp-select 1)))
|
||||
(set! (-> gp-0 base-anim-speed) 1.0)
|
||||
|
||||
@@ -81,8 +81,9 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype process-focusable (process-drawable)
|
||||
((self process-focusable :override)
|
||||
(root collide-shape :override)
|
||||
((self process-focusable :override)
|
||||
(ppointer (pointer process-focusable) :override)
|
||||
(root collide-shape :override)
|
||||
(focus-status focus-status)
|
||||
)
|
||||
(:methods
|
||||
|
||||
@@ -7,3 +7,51 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype simple-focus (process-focusable)
|
||||
((first-time? symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod get-trans ((this simple-focus) (arg0 int))
|
||||
"Get the `trans` for this process."
|
||||
(-> this root trans)
|
||||
)
|
||||
|
||||
(defmethod run-logic? ((this simple-focus))
|
||||
"Should this process be run? Checked by execute-process-tree."
|
||||
(when (-> this first-time?)
|
||||
(set! (-> this first-time?) #f)
|
||||
#t
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (simple-focus)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('move-trans)
|
||||
(let ((v0-0 (-> self root trans)))
|
||||
(set! (-> v0-0 quad) (-> (the-as vector (-> block param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defbehavior simple-focus-init-by-other simple-focus ()
|
||||
(let ((gp-0 (new 'process 'trsqv)))
|
||||
(set! (-> self root) (the-as collide-shape gp-0))
|
||||
(vector-identity! (-> gp-0 scale))
|
||||
(quaternion-identity! (-> gp-0 quat))
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask enemy))
|
||||
(set! (-> self first-time?) #t)
|
||||
(set! (-> self event-hook) (-> (method-of-object self idle) event))
|
||||
(go-virtual idle)
|
||||
)
|
||||
|
||||
@@ -829,7 +829,7 @@
|
||||
(defbehavior target-board-setup target ((arg0 symbol))
|
||||
(when (zero? (-> self board))
|
||||
(set! (-> self board) (new 'process 'board-info))
|
||||
(set! (-> self board process) (the-as (pointer target) (process->ppointer self)))
|
||||
(set! (-> self board process) (process->ppointer self))
|
||||
(set! (-> self board latch?) #f)
|
||||
(set! (-> self board engine-sound-id) (new-sound-id))
|
||||
(set! (-> self board ride-sound-id) (new-sound-id))
|
||||
|
||||
@@ -563,13 +563,8 @@
|
||||
)
|
||||
(vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))
|
||||
(let ((gp-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((t9-10 vector-normalize-copy!)
|
||||
(a0-12 (new 'stack-no-clear 'vector))
|
||||
(a1-4 (-> self root transv))
|
||||
(a2-3 1.0)
|
||||
(a1-5 (t9-10 a0-12 a1-4 a2-3))
|
||||
)
|
||||
(matrix-f-compose gp-1 a1-5 a2-3)
|
||||
(let ((a1-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)))
|
||||
(matrix-f-compose gp-1 a1-5)
|
||||
)
|
||||
(matrix->quaternion (-> self root quat) gp-1)
|
||||
)
|
||||
|
||||
@@ -929,29 +929,23 @@
|
||||
(set! (-> s4-1 quad) (-> self gun fire-dir-out quad))
|
||||
(set! (-> s4-1 y) 0.0)
|
||||
(vector-normalize! s4-1 1.0)
|
||||
(let ((t9-9 draw-beam)
|
||||
(a0-38 (-> *part-id-table* 297))
|
||||
(a1-9 (-> gp-0 fire-point))
|
||||
(a2-5 s4-1)
|
||||
)
|
||||
(t9-9 a0-38 a1-9 a2-5 #f)
|
||||
(let ((s5-1 (new 'stack-no-clear 'matrix)))
|
||||
(matrix-f-compose s5-1 s4-1 (the-as float a2-5))
|
||||
(set! (-> s5-1 trans quad) (-> gp-0 fire-point quad))
|
||||
(let ((v1-62
|
||||
(if (logtest? (-> *part-group-id-table* 100 flags) (sp-group-flag sp13))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to *entity-pool*
|
||||
:group (-> *part-group-id-table* 100)
|
||||
:mat-joint s5-1
|
||||
)
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 100) :mat-joint s5-1)
|
||||
(draw-beam (-> *part-id-table* 297) (-> gp-0 fire-point) s4-1 #f)
|
||||
(let ((s5-1 (new 'stack-no-clear 'matrix)))
|
||||
(matrix-f-compose s5-1 s4-1)
|
||||
(set! (-> s5-1 trans quad) (-> gp-0 fire-point quad))
|
||||
(let ((v1-62
|
||||
(if (logtest? (-> *part-group-id-table* 100 flags) (sp-group-flag sp13))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to *entity-pool*
|
||||
:group (-> *part-group-id-table* 100)
|
||||
:mat-joint s5-1
|
||||
)
|
||||
)
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 100) :mat-joint s5-1)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process v1-62) 'clock self)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process v1-62) 'clock self)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -616,7 +616,7 @@
|
||||
(defbehavior target-darkjak-setup target ((arg0 symbol))
|
||||
(when (zero? (-> self darkjak))
|
||||
(set! (-> self darkjak) (new 'process 'darkjak-info))
|
||||
(set! (-> self darkjak process) (the-as (pointer target) (process->ppointer self)))
|
||||
(set! (-> self darkjak process) (process->ppointer self))
|
||||
(let* ((v1-4 (-> self game))
|
||||
(a0-5 (+ (-> v1-4 attack-id) 1))
|
||||
)
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
(set! (-> self game gun-type) (pickup-type gun-red-1))
|
||||
)
|
||||
(set! (-> self gun) (new 'process 'gun-info))
|
||||
(set! (-> self gun process) (the-as (pointer target) (process->ppointer self)))
|
||||
(set! (-> self gun process) (process->ppointer self))
|
||||
(set! (-> self gun strip) #f)
|
||||
(set! (-> self gun uv-slide) 0.0)
|
||||
(set! (-> self gun gun) (the-as (pointer gun) #f))
|
||||
|
||||
@@ -262,6 +262,7 @@
|
||||
|
||||
(deftype target (process-focusable)
|
||||
((self target :override)
|
||||
(ppointer (pointer target) :override)
|
||||
(fact fact-info-target :override)
|
||||
(control control-info :overlay-at root)
|
||||
(skel2 joint-control)
|
||||
|
||||
@@ -960,7 +960,7 @@
|
||||
(defbehavior target-lightjak-setup target ((arg0 symbol))
|
||||
(when (zero? (-> self lightjak))
|
||||
(set! (-> self lightjak) (new 'process 'lightjak-info))
|
||||
(set! (-> self lightjak process) (the-as (pointer target) (process->ppointer self)))
|
||||
(set! (-> self lightjak process) (process->ppointer self))
|
||||
(let* ((v1-4 (-> self game))
|
||||
(a0-5 (+ (-> v1-4 attack-id) 1))
|
||||
)
|
||||
|
||||
+52
-52
@@ -136,7 +136,7 @@
|
||||
(cgo-file "desinter.gd" common-dep)
|
||||
; (cgo-file "desjump.gd" common-dep)
|
||||
(cgo-file "desliz.gd" common-dep)
|
||||
; (cgo-file "desoasis.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)
|
||||
@@ -229,11 +229,12 @@
|
||||
(cgo-file "frsta.gd" common-dep)
|
||||
(cgo-file "frstb.gd" common-dep)
|
||||
(cgo-file "frstx.gd" common-dep)
|
||||
; ;; factory
|
||||
; (cgo-file "factorya.gd" common-dep)
|
||||
; (cgo-file "facb.gd" common-dep)
|
||||
; (cgo-file "facc.gd" common-dep)
|
||||
; (cgo-file "facd.gd" common-dep)
|
||||
;; factory
|
||||
(cgo-file "lfacrm1.gd" common-dep)
|
||||
(cgo-file "factorya.gd" common-dep)
|
||||
(cgo-file "facb.gd" common-dep)
|
||||
(cgo-file "facc.gd" common-dep)
|
||||
(cgo-file "facd.gd" common-dep)
|
||||
; ;; tower
|
||||
(cgo-file "towb.gd" common-dep)
|
||||
(cgo-file "towera.gd" common-dep)
|
||||
@@ -250,22 +251,22 @@
|
||||
; (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)
|
||||
; (cgo-file "combc.gd" common-dep)
|
||||
; (cgo-file "combd.gd" common-dep)
|
||||
; (cgo-file "combe.gd" common-dep)
|
||||
; (cgo-file "combn.gd" common-dep)
|
||||
; (cgo-file "combx.gd" common-dep)
|
||||
; (cgo-file "raila.gd" common-dep)
|
||||
; (cgo-file "railb.gd" common-dep)
|
||||
; (cgo-file "railb2.gd" common-dep)
|
||||
; (cgo-file "railc.gd" common-dep)
|
||||
; (cgo-file "railcst.gd" common-dep)
|
||||
; (cgo-file "raild.gd" common-dep)
|
||||
; (cgo-file "raile.gd" common-dep)
|
||||
; (cgo-file "railf.gd" common-dep)
|
||||
; (cgo-file "railx.gd" common-dep)
|
||||
(cgo-file "comba.gd" common-dep)
|
||||
(cgo-file "combb.gd" common-dep)
|
||||
(cgo-file "combc.gd" common-dep)
|
||||
(cgo-file "combd.gd" common-dep)
|
||||
(cgo-file "combe.gd" common-dep)
|
||||
(cgo-file "combn.gd" common-dep)
|
||||
(cgo-file "combx.gd" common-dep)
|
||||
(cgo-file "raila.gd" common-dep)
|
||||
(cgo-file "railb.gd" common-dep)
|
||||
(cgo-file "railb2.gd" common-dep)
|
||||
(cgo-file "railc.gd" common-dep)
|
||||
(cgo-file "railcst.gd" common-dep)
|
||||
(cgo-file "raild.gd" common-dep)
|
||||
(cgo-file "raile.gd" common-dep)
|
||||
(cgo-file "railf.gd" common-dep)
|
||||
(cgo-file "railx.gd" common-dep)
|
||||
; ;; precursor
|
||||
; (cgo-file "preca.gd" common-dep)
|
||||
; (cgo-file "precb.gd" common-dep)
|
||||
@@ -292,22 +293,22 @@
|
||||
(cgo-file "halfpipe.gd" common-dep)
|
||||
; ;; borrow
|
||||
; (cgo-file "lashelin.gd" common-dep)
|
||||
; (cgo-file "lbbring1.gd" common-dep)
|
||||
; (cgo-file "lbbring2.gd" common-dep)
|
||||
; (cgo-file "lbbring3.gd" common-dep)
|
||||
; (cgo-file "lbbring4.gd" common-dep)
|
||||
; (cgo-file "lbbring5.gd" common-dep)
|
||||
; (cgo-file "lbbring6.gd" common-dep)
|
||||
; (cgo-file "lbbsdrp1.gd" common-dep)
|
||||
; (cgo-file "lbbsdrp2.gd" common-dep)
|
||||
; (cgo-file "lbbsdrp3.gd" common-dep)
|
||||
; (cgo-file "lbbspid.gd" common-dep)
|
||||
; (cgo-file "lbbspirt.gd" common-dep)
|
||||
; (cgo-file "lbbsprt2.gd" common-dep)
|
||||
; (cgo-file "lbbsprt3.gd" common-dep)
|
||||
; (cgo-file "lbbtcha1.gd" common-dep)
|
||||
; (cgo-file "lbbtcha2.gd" common-dep)
|
||||
; (cgo-file "lbbtcha3.gd" common-dep)
|
||||
(cgo-file "lbbring1.gd" common-dep)
|
||||
(cgo-file "lbbring2.gd" common-dep)
|
||||
(cgo-file "lbbring3.gd" common-dep)
|
||||
(cgo-file "lbbring4.gd" common-dep)
|
||||
(cgo-file "lbbring5.gd" common-dep)
|
||||
(cgo-file "lbbring6.gd" common-dep)
|
||||
(cgo-file "lbbsdrp1.gd" common-dep)
|
||||
(cgo-file "lbbsdrp2.gd" common-dep)
|
||||
(cgo-file "lbbsdrp3.gd" common-dep)
|
||||
(cgo-file "lbbspid.gd" common-dep)
|
||||
(cgo-file "lbbspirt.gd" common-dep)
|
||||
(cgo-file "lbbsprt2.gd" common-dep)
|
||||
(cgo-file "lbbsprt3.gd" common-dep)
|
||||
(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)
|
||||
@@ -316,7 +317,7 @@
|
||||
; (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 "lctydest.gd" common-dep)
|
||||
; (cgo-file "lctyhijk.gd" common-dep)
|
||||
; (cgo-file "lctypalt.gd" common-dep)
|
||||
; (cgo-file "lctypatk.gd" common-dep)
|
||||
@@ -330,13 +331,12 @@
|
||||
; (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 "lfacb.gd" common-dep)
|
||||
(cgo-file "lfaccar.gd" common-dep)
|
||||
; (cgo-file "lfaccity.gd" common-dep)
|
||||
; (cgo-file "lfaco.gd" common-dep)
|
||||
; (cgo-file "lfacrm1.gd" common-dep)
|
||||
; (cgo-file "lfacrm2.gd" common-dep)
|
||||
; (cgo-file "lfactory.gd" common-dep)
|
||||
(cgo-file "lfaccity.gd" common-dep)
|
||||
(cgo-file "lfaco.gd" common-dep)
|
||||
(cgo-file "lfacrm2.gd" common-dep)
|
||||
(cgo-file "lfactory.gd" common-dep)
|
||||
(cgo-file "lform.gd" common-dep)
|
||||
(cgo-file "lforp.gd" common-dep)
|
||||
; (cgo-file "lforring.gd" common-dep)
|
||||
@@ -360,10 +360,10 @@
|
||||
; (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 "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)
|
||||
@@ -384,12 +384,12 @@
|
||||
; (cgo-file "ltorn.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 "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 "lwasbbv.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)
|
||||
|
||||
@@ -658,7 +658,7 @@
|
||||
(vehicle-method-88 (_type_ vehicle-controls) none)
|
||||
(init-reverse (_type_ vehicle-controls) none)
|
||||
(control-hook-ai (_type_ vehicle-controls) none)
|
||||
(control-hook-player (_type_ vehicle-controls) none)
|
||||
(control-hook-player (_type_) none)
|
||||
(vehicle-method-92 (_type_ vehicle-controls) none)
|
||||
(vehicle-method-93 (_type_) none)
|
||||
(vehicle-method-94 (_type_) none)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod control-hook-player ((this vehicle) (arg0 vehicle-controls))
|
||||
(defmethod control-hook-player ((this vehicle))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vehicle-controls)))
|
||||
(mem-set32! (&-> gp-0 steering) 6 0)
|
||||
(cond
|
||||
|
||||
@@ -7,3 +7,345 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype comb-field (process-drawable)
|
||||
((root collide-shape :override)
|
||||
(pass pickup-type)
|
||||
(incoming-attack-id uint32)
|
||||
(next-message-time time-frame)
|
||||
(message int32)
|
||||
(plane plane :inline)
|
||||
(color vector :inline)
|
||||
(target-pos vector :inline)
|
||||
(hum-sound-id sound-id)
|
||||
(flash float)
|
||||
(touch-count int32)
|
||||
(touch-time time-frame)
|
||||
(breach symbol)
|
||||
)
|
||||
(:state-methods
|
||||
idle-close
|
||||
)
|
||||
(:methods
|
||||
(init-collision! (_type_ path-control float) none)
|
||||
(on-jak-touch (_type_) none)
|
||||
(play-hum (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-comb-field security-wall security-wall-lod0-jg security-wall-idle-ja
|
||||
((security-wall-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 100.1)
|
||||
)
|
||||
|
||||
(defmethod on-jak-touch ((this comb-field))
|
||||
(when (time-elapsed? (-> this touch-time) (seconds 0.25))
|
||||
(set-time! (-> this touch-time))
|
||||
(sound-play "barrier-deflect")
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod play-hum ((this comb-field))
|
||||
(let ((v1-0 *target*))
|
||||
(when v1-0
|
||||
(let ((f0-0 (vector-vector-distance-squared (-> this root trans) (-> v1-0 control trans)))
|
||||
(f1-0 655360.0)
|
||||
)
|
||||
(cond
|
||||
((< f0-0 (* f1-0 f1-0))
|
||||
(if (zero? (-> this hum-sound-id))
|
||||
(set! (-> this hum-sound-id) (new-sound-id))
|
||||
)
|
||||
(sound-play "barrier-loop" :id (-> this hum-sound-id))
|
||||
)
|
||||
(else
|
||||
(sound-stop (-> this hum-sound-id))
|
||||
(set! (-> this hum-sound-id) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate idle-close (comb-field)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(case message
|
||||
(('on)
|
||||
(let ((v1-2 (-> self root root-prim)))
|
||||
(set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as))
|
||||
(set! v0-0 (-> self root backup-collide-with))
|
||||
(set! (-> v1-2 prim-core collide-with) (the-as collide-spec v0-0))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(('off)
|
||||
(let ((v1-4 (-> self root root-prim)))
|
||||
(set! (-> v1-4 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-4 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
)
|
||||
(('attack)
|
||||
(let ((v1-5 (the-as attack-info (-> block param 1))))
|
||||
(when (!= (-> v1-5 id) (-> self incoming-attack-id))
|
||||
(set! (-> self incoming-attack-id) (-> v1-5 id))
|
||||
(let* ((gp-0 proc)
|
||||
(s4-0 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s4-0
|
||||
(let ((gp-1 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
(-> (the-as process-drawable s4-0) root trans)
|
||||
(-> self entity)
|
||||
(art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer level) #f))
|
||||
#f
|
||||
0
|
||||
:name "manipy"
|
||||
:to self
|
||||
:stack-size #x20000
|
||||
)
|
||||
)
|
||||
)
|
||||
(when gp-1
|
||||
(send-event (ppointer->process gp-1) 'anim-mode 'play1)
|
||||
(send-event (ppointer->process gp-1) 'speed 1.5)
|
||||
(send-event (ppointer->process gp-1) 'art-joint-anim "generic-ripples-idle" 0)
|
||||
(set-vector! (-> (the-as process-drawable (-> gp-1 0)) root scale) 1.0 1.0 1.0 1.0)
|
||||
(quaternion-rotate-local-x! (-> (the-as process-drawable (-> gp-1 0)) root quat) (-> self root quat) -16384.0)
|
||||
(let ((v1-43 (-> (the-as process-drawable (-> gp-1 0)) root trans)))
|
||||
(let ((a0-22 (-> (the-as process-drawable (-> gp-1 0)) root trans)))
|
||||
(let ((a1-17 *up-vector*))
|
||||
(let ((a2-8 8192.0))
|
||||
(.mov vf7 a2-8)
|
||||
)
|
||||
(.lvf vf5 (&-> a1-17 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> a0-22 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 (&-> v1-43 quad) vf6)
|
||||
)
|
||||
(let ((f0-6 (vector4-dot (-> (the-as process-drawable (-> gp-1 0)) root trans) (the-as vector (-> self plane)))))
|
||||
(let ((v1-50 (-> (the-as process-drawable (-> gp-1 0)) root trans)))
|
||||
(let ((a0-26 (-> (the-as process-drawable (-> gp-1 0)) root trans)))
|
||||
(let ((a1-18 (-> self plane)))
|
||||
(let ((a2-9 (- f0-6)))
|
||||
(.mov vf7 a2-9)
|
||||
)
|
||||
(.lvf vf5 (&-> a1-18 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> a0-26 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 (&-> v1-50 quad) vf6)
|
||||
)
|
||||
(let ((v1-53 (-> (the-as process-drawable (-> gp-1 0)) root trans)))
|
||||
(let ((a0-29 (-> (the-as process-drawable (-> gp-1 0)) root trans)))
|
||||
(let ((a1-19 (-> self plane)))
|
||||
(let ((a2-11 (the-as float (if (< 0.0 f0-6)
|
||||
-2048.0
|
||||
2048.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(.mov vf7 a2-11)
|
||||
)
|
||||
(.lvf vf5 (&-> a1-19 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> a0-29 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 (&-> v1-53 quad) vf6)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process gp-1) 'trans-hook (lambda () #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (-> self touch-count))
|
||||
(+! (-> self touch-count) 1)
|
||||
(set! (-> self flash) 0.375)
|
||||
)
|
||||
(set! v0-0 (+ (-> self touch-count) 1))
|
||||
(set! (-> self touch-count) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touched)
|
||||
(when (zero? (-> self touch-count))
|
||||
(+! (-> self touch-count) 1)
|
||||
(set! (-> self flash) 0.375)
|
||||
)
|
||||
(+! (-> self touch-count) 1)
|
||||
(let* ((gp-3 proc)
|
||||
(v1-75 (if (type? gp-3 process-focusable)
|
||||
gp-3
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-75
|
||||
(let* ((s5-1 (-> (the-as process-drawable v1-75) root))
|
||||
(gp-4 (if (type? s5-1 collide-shape)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when gp-4
|
||||
(if (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec jak))
|
||||
(on-jak-touch self)
|
||||
)
|
||||
(when (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec vehicle-sphere))
|
||||
(when (not (-> self breach))
|
||||
(sound-play "barrier-cross")
|
||||
(set! v0-0 #t)
|
||||
(set! (-> self breach) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(play-hum self)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((f30-0 (calc-fade-from-fog (-> self root trans)))
|
||||
(a0-1 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-float*! a0-1 (-> self color) f30-0)
|
||||
(set-comb-field-color! a0-1)
|
||||
(vector-float*! gp-0 (-> self color) (* f30-0 (-> self flash)))
|
||||
(seek! (-> self flash) 0.0 (seconds-per-frame))
|
||||
(if (nonzero? (-> self touch-count))
|
||||
(+! (-> self touch-count) -1)
|
||||
)
|
||||
(set-comb-field-flash! gp-0)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defmethod init-collision! ((this comb-field) (arg0 path-control) (arg1 float))
|
||||
(let ((s3-0 (new 'static 'vector))
|
||||
(s4-0 (new 'static 'vector))
|
||||
)
|
||||
0.0
|
||||
(get-point-in-path! arg0 s3-0 0.0 'exact)
|
||||
(get-point-in-path! arg0 s4-0 1.0 'exact)
|
||||
(* 0.5 (vector-vector-distance s3-0 s4-0))
|
||||
(let ((s2-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s2-1 penetrated-by) (penetrate vehicle))
|
||||
(let ((v1-8 (new 'process 'collide-shape-prim-mesh s2-1 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-8 prim-core collide-as) (collide-spec obstacle blocking-plane camera-blocker))
|
||||
(set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list))
|
||||
(set! (-> v1-8 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-8 transform-index) 3)
|
||||
(set! (-> s2-1 total-prims) (the-as uint 1))
|
||||
(set! (-> s2-1 root-prim) v1-8)
|
||||
)
|
||||
(set! (-> s2-1 nav-radius) (* 0.75 (-> s2-1 root-prim local-sphere w)))
|
||||
(let ((v1-11 (-> s2-1 root-prim)))
|
||||
(set! (-> s2-1 backup-collide-as) (-> v1-11 prim-core collide-as))
|
||||
(set! (-> s2-1 backup-collide-with) (-> v1-11 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s2-1)
|
||||
)
|
||||
(let ((s2-2 (new 'stack-no-clear 'matrix))
|
||||
(s1-0 (-> this root))
|
||||
)
|
||||
(vector+! (-> s1-0 trans) s3-0 s4-0)
|
||||
(vector-float*! (-> s1-0 trans) (-> s1-0 trans) 0.5)
|
||||
(vector-! (-> s2-2 rvec) s4-0 s3-0)
|
||||
(let ((f30-1 (vector-normalize-ret-len! (-> s2-2 rvec) 1.0)))
|
||||
(set! (-> s1-0 scale x) (* 0.00024414062 f30-1))
|
||||
(set! (-> s1-0 scale y) (* 0.00024414062 arg1))
|
||||
(set! (-> s1-0 scale z) 1.0)
|
||||
(set! (-> s2-2 uvec quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad))
|
||||
(vector-cross! (-> s2-2 fvec) (-> s2-2 rvec) (-> s2-2 uvec))
|
||||
(vector-normalize! (-> s2-2 fvec) 1.0)
|
||||
(matrix->quaternion (-> s1-0 quat) s2-2)
|
||||
(set! (-> this plane quad) (-> s2-2 fvec quad))
|
||||
(set! (-> this plane w) (- (vector-dot (-> s2-2 fvec) (-> this root trans))))
|
||||
(let ((v0-8 (-> this root root-prim local-sphere)))
|
||||
(set! (-> v0-8 x) 0.0)
|
||||
(set! (-> v0-8 y) (* 0.00024414062 (* 0.5 arg1)))
|
||||
(set! (-> v0-8 z) 0.0)
|
||||
(let ((f0-18 0.5)
|
||||
(f1-5 (* f30-1 f30-1))
|
||||
(f2-1 arg1)
|
||||
)
|
||||
(set! (-> v0-8 w) (* f0-18 (sqrtf (+ f1-5 (* f2-1 f2-1)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this comb-field) (arg0 entity-actor))
|
||||
(set! (-> this breach) #f)
|
||||
(set! (-> this hum-sound-id) (new 'static 'sound-id))
|
||||
(set! (-> this pass) (res-lump-value arg0 'pickup-type pickup-type :time -1000000000.0))
|
||||
(let ((v1-3 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)))
|
||||
(set! (-> this path) v1-3)
|
||||
(if (or (not v1-3) (!= (-> v1-3 curve num-cverts) 2))
|
||||
(go process-drawable-art-error "bad path")
|
||||
)
|
||||
)
|
||||
(init-collision! this (-> this path) 204800.0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-comb-field" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this root event-self) 'touched)
|
||||
(logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(logior! (-> this draw status) (draw-control-status disable-fog))
|
||||
(set-comb-field-texture-masks! (the-as vector (-> this draw mgeo header texture-usage-group data 4)))
|
||||
(set-vector! (-> this color) 0.0 0.5 1.0 1.0)
|
||||
(set-comb-field-color! (-> this color))
|
||||
(set-vector! (-> this draw color-mult) 0.0 0.0 0.0 0.0)
|
||||
(set-vector! (-> this draw color-emissive) 1.0 1.0 1.0 1.0)
|
||||
(transform-post)
|
||||
(go (method-of-object this idle-close))
|
||||
)
|
||||
|
||||
@@ -7,3 +7,285 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype comb-states (structure)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defun init-mood-comb ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group 1)))
|
||||
(let ((a0-1 (-> v1-0 dir0)))
|
||||
(set! (-> a0-1 direction x) 0.0)
|
||||
(set! (-> a0-1 direction y) 1.0)
|
||||
(set! (-> a0-1 direction z) 0.0)
|
||||
(set! (-> a0-1 direction w) 0.0)
|
||||
)
|
||||
(set-vector! (-> v1-0 dir0 color) 0.667 0.667 0.667 1.0)
|
||||
(set-vector! (-> v1-0 ambi color) 0.333 0.333 0.333 1.0)
|
||||
(set! (-> v1-0 dir0 extra x) 0.75)
|
||||
(set! (-> v1-0 dir1 extra x) 0.0)
|
||||
(set! (-> v1-0 dir2 extra x) 0.0)
|
||||
(set! (-> v1-0 ambi extra x) 0.25)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-comb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-interior arg0 #f)
|
||||
(let* ((s5-0 (camera-pos))
|
||||
(f0-1 (fmin
|
||||
(vector-vector-distance s5-0 (new 'static 'vector :x 368640.0 :z 40960.0 :w 1.0))
|
||||
(vector-vector-distance s5-0 (new 'static 'vector :x 14274560.0 :y -167936.0 :z 614400.0 :w 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< f0-1 716800.0)
|
||||
(let ((f30-1 (fmax 0.0 (fmin 1.0 (* 0.000009765625 (- 819200.0 f0-1)))))
|
||||
(a1-4 (-> arg0 current-fog))
|
||||
(s5-1 (-> arg0 current-fog fog-dists))
|
||||
)
|
||||
(vector4-lerp!
|
||||
(the-as vector a1-4)
|
||||
(the-as vector a1-4)
|
||||
(new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0)
|
||||
f30-1
|
||||
)
|
||||
(vector4-lerp! s5-1 s5-1 (new 'static 'vector :x 262144.0 :y 937984.0 :z 255.0 :w 200.0) f30-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
||||
(palette-select-special arg0)
|
||||
)
|
||||
(else
|
||||
(-> arg0 state)
|
||||
(let* ((s5-2 (-> *display* part-clock frame-counter))
|
||||
(f0-6 (* 1310.72 (the float (mod s5-2 25))))
|
||||
(f30-2 (sin f0-6))
|
||||
(f0-8 (* 109.22667 (the float (mod s5-2 600))))
|
||||
(s5-3 (/ (mod s5-2 125) 25))
|
||||
)
|
||||
(set! (-> arg0 times 0 w) 1.0)
|
||||
(set! (-> arg0 times 1 w) f30-2)
|
||||
(set! (-> arg0 times 2 w) (+ 0.85 (* 0.15 (cos f0-8))))
|
||||
(set! (-> arg0 times 3 w) (if (zero? s5-3)
|
||||
f30-2
|
||||
0.0
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 times 4 w) (if (= s5-3 1)
|
||||
f30-2
|
||||
0.0
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 times 5 w) (if (= s5-3 2)
|
||||
f30-2
|
||||
0.0
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 times 6 w) (if (= s5-3 3)
|
||||
f30-2
|
||||
0.0
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 times 7 w) (if (= s5-3 4)
|
||||
f30-2
|
||||
0.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; og:preserve-this not-yet-implemented texture anim stuff
|
||||
; (define *comb-field-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)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defun set-comb-field-color! ((arg0 vector))
|
||||
; (let ((v1-1 (-> *comb-field-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 (-> *comb-field-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))
|
||||
; (set! (-> v1-5 data 2 end-color quad) (-> arg0 quad))
|
||||
; )
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defun set-comb-field-flash! ((arg0 vector))
|
||||
; (let ((v1-1 (-> *comb-field-texture-anim-array* array-data 1)))
|
||||
; (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad))
|
||||
; (set! (-> v1-1 data 0 end-color quad) (-> arg0 quad))
|
||||
; )
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun set-comb-field-texture-masks! ((arg0 vector))
|
||||
; (local-vars (a3-3 uint128) (a3-4 uint128))
|
||||
; (let ((v1-3 (-> *comb-field-texture-anim-array* array-data 0 data 0 tex))
|
||||
; (a1-3 (-> *comb-field-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
@@ -7,3 +7,917 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(load-scene
|
||||
(new 'static 'scene
|
||||
:name "temple-tests-res-b"
|
||||
:extra #f
|
||||
:info #f
|
||||
:scene-flags (scene-flags scf1 scf2 scf3 scf4)
|
||||
:mask-to-clear (process-mask movie projectile)
|
||||
:entity "scene-stage-173"
|
||||
:art-group "scenecamera"
|
||||
:anim "temple-tests-res-b"
|
||||
:parts 8
|
||||
:command-list '((0
|
||||
(fadein (frame-time-30 5))
|
||||
(apply
|
||||
,(lambda :behavior scene-player
|
||||
()
|
||||
(send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'hide)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
(2
|
||||
(apply
|
||||
,(lambda :behavior scene-player
|
||||
()
|
||||
(send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'hide)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
(750
|
||||
(part-tracker
|
||||
"group-fma-medallion-car-charge"
|
||||
entity
|
||||
"kidmedallion"
|
||||
joint
|
||||
"main"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 750 810)
|
||||
)
|
||||
)
|
||||
(860 (fadeout (frame-time-30 15)))
|
||||
(10000
|
||||
(task-close! "comb-travel-introduction")
|
||||
(apply ,(lambda :behavior scene-player
|
||||
()
|
||||
(send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'unhide)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:cut-list '(51 151 280 335 417 474 541 671 763 805)
|
||||
: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 'combx
|
||||
:art-group "skel-jakc-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
|
||||
:no-draw-seg #x80
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "sidekick-highres"
|
||||
:level 'combx
|
||||
: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 "pecker-highres"
|
||||
:level 'comba
|
||||
:art-group "skel-pecker-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min 954))
|
||||
: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 "comb-rail-rider-fma"
|
||||
:level 'comba
|
||||
:art-group "skel-comb-rail-rider-fma"
|
||||
:prefix ""
|
||||
:draw-frames '((min 151) (280 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 "kidmedallion"
|
||||
:level 'comba
|
||||
:art-group "skel-kidmedallion"
|
||||
: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
|
||||
)
|
||||
)
|
||||
:load-point "comba-elevator"
|
||||
:end-point "comba-movie-end"
|
||||
:borrow '()
|
||||
:sfx-volume -1.0
|
||||
:ambient-volume -1.0
|
||||
:music-delay 1500.0
|
||||
:on-running '(sound-play-loop "launch-amb-mov")
|
||||
:on-complete #f
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior comb-lightjak-do-effect process-drawable ()
|
||||
(logior! (-> self draw global-effect) (draw-control-global-effect no-textures))
|
||||
(logior! (-> self draw global-effect) (draw-control-global-effect rim-lights))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
(f30-0 (fmin 1.0 (-> self clock clock-ratio)))
|
||||
)
|
||||
(set! (-> (get-field-spec-by-id (-> *part-id-table* 623) (sp-field-id spt-a)) initial-valuef) 16.0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 3)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 4)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 5)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 6)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 8)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 13)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 17)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 14)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 18)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 15)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 19)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 25)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 26)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 32)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 27)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 33)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 28)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 34)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 31)) :rate f30-0)
|
||||
(launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 37)) :rate f30-0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(load-scene (new 'static 'scene
|
||||
:name "catacomb-get-shield"
|
||||
:extra #f
|
||||
:info #f
|
||||
:scene-flags (scene-flags scf1 scf2 scf3 scf4)
|
||||
:mask-to-clear (process-mask movie projectile)
|
||||
:entity "scene-stage-224"
|
||||
:art-group "scenecamera"
|
||||
:anim "catacomb-get-shield"
|
||||
:parts 5
|
||||
:command-list '((0 (fadein (frame-time-30 5)))
|
||||
(1
|
||||
(joint-eval start-precursor-effect entity "precursor")
|
||||
(send-event
|
||||
"precursor"
|
||||
'eval
|
||||
,(lambda :behavior scene-player
|
||||
()
|
||||
(let* ((v1-3 (-> self draw lod-set lod (-> self draw cur-lod) geo length))
|
||||
(gp-0 3)
|
||||
(s5-0 (+ v1-3 1))
|
||||
)
|
||||
(while (>= s5-0 gp-0)
|
||||
(when (not (or (and (>= gp-0 13) (>= 21 gp-0)) (and (>= gp-0 26) (>= 34 gp-0))))
|
||||
(if (logtest? (-> *part-group-id-table* 1252 flags) (sp-group-flag sp13))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to self
|
||||
:group (-> *part-group-id-table* 1252)
|
||||
:duration (seconds 17.135)
|
||||
:target self
|
||||
:mat-joint gp-0
|
||||
)
|
||||
(part-tracker-spawn
|
||||
part-tracker
|
||||
:to self
|
||||
:group (-> *part-group-id-table* 1252)
|
||||
:duration (seconds 17.135)
|
||||
:target self
|
||||
:mat-joint gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! gp-0 1)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(part-tracker
|
||||
"group-fma-precursor-entrance-flash"
|
||||
entity
|
||||
"particleman"
|
||||
joint
|
||||
"particleA"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 1 27)
|
||||
)
|
||||
)
|
||||
(300
|
||||
(part-tracker
|
||||
"group-fma-lightjak-getshield-gravitate"
|
||||
entity
|
||||
"particleman"
|
||||
joint
|
||||
"particleB"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 300 480)
|
||||
)
|
||||
(part-tracker
|
||||
"group-fma-lightjak-getshield"
|
||||
entity
|
||||
"particleman"
|
||||
joint
|
||||
"particleC"
|
||||
track
|
||||
#f
|
||||
duration
|
||||
(frame-range 300 480)
|
||||
)
|
||||
)
|
||||
(440
|
||||
(apply
|
||||
,(lambda :behavior scene-player
|
||||
()
|
||||
(when (not (-> self aborted?))
|
||||
(disable *screen-filter*)
|
||||
(setup
|
||||
*screen-filter*
|
||||
(new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
|
||||
(new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
|
||||
(* 1.1111112 (seconds-per-frame))
|
||||
(bucket-id tex-hud-pris2)
|
||||
#x3fffff
|
||||
#x33001
|
||||
#t
|
||||
)
|
||||
(set-setting! 'allow-blackout #f 0.0 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(part-tracker
|
||||
"group-fma-lightjak-getshield-flash"
|
||||
entity
|
||||
"particleman"
|
||||
joint
|
||||
"particleD"
|
||||
track
|
||||
#t
|
||||
duration
|
||||
(frame-range 440 441)
|
||||
)
|
||||
)
|
||||
(445
|
||||
(send-event "jakc-highres" 'trans-hook comb-lightjak-do-effect)
|
||||
(apply ,(lambda :behavior scene-player
|
||||
()
|
||||
(when (not (-> self aborted?))
|
||||
(remove-setting! 'allow-blackout)
|
||||
(setup
|
||||
*screen-filter*
|
||||
(new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
|
||||
(new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
|
||||
(* 1.1111112 (seconds-per-frame))
|
||||
(bucket-id tex-hud-pris2)
|
||||
#x3fffff
|
||||
#x33001
|
||||
#t
|
||||
)
|
||||
(set-filter-color! 1.0 1.0 1.0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
(520 (fadeout (frame-time-30 20)))
|
||||
(10000 (task-close! "comb-travel-resolution") (kill "pecker-ingame-2"))
|
||||
)
|
||||
:cut-list '(396)
|
||||
: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 'comba
|
||||
:art-group "skel-jakc-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
|
||||
:no-draw-seg #x80
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "sidekick-highres"
|
||||
:level 'comba
|
||||
: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 "pecker-highres"
|
||||
:level 'comba
|
||||
: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 "precursor"
|
||||
:level 'comba
|
||||
:art-group "skel-precursor"
|
||||
: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 "particleman"
|
||||
:level 'comba
|
||||
:art-group "skel-particleman"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
)
|
||||
:load-point "combn-start"
|
||||
:end-point "combn-lightjak"
|
||||
:borrow '()
|
||||
:sfx-volume -1.0
|
||||
:ambient-volume -1.0
|
||||
:music-delay 1500.0
|
||||
:on-running '(begin (sound-play-loop "launch-amb-mov") (sound-play-loop "tunnel-amb-mov"))
|
||||
:on-complete #f
|
||||
)
|
||||
)
|
||||
|
||||
(define death-precursor (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x1092))
|
||||
|
||||
(defun start-precursor-effect ((arg0 manipy))
|
||||
(let ((v1-0 (-> arg0 draw))
|
||||
(a1-0 death-precursor)
|
||||
)
|
||||
(set! (-> v1-0 death-vertex-skip) (-> a1-0 vertex-skip))
|
||||
(set! (-> v1-0 death-effect) (-> a1-0 effect))
|
||||
(set! (-> v1-0 death-timer) (+ (-> a1-0 timer) 1))
|
||||
(set! (-> v1-0 death-timer-org) (-> v1-0 death-timer))
|
||||
(set! (-> v1-0 death-draw-overlap) (-> a1-0 overlap))
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
'trans-hook
|
||||
(lambda :behavior scene-player
|
||||
()
|
||||
(set! (-> self draw death-timer) (the-as uint 200))
|
||||
(set! (-> self draw death-vertex-skip) (the-as uint (the int (rand-vu-float-range 8.0 24.0))))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defpart 4242
|
||||
:init-specs ((:scale-x (meters 0.08))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 196.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:accel-y (meters 0) (meters 0.00066666666))
|
||||
(:timer (seconds 0.017) (seconds 0.33))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-texture-glow-soft)
|
||||
(:next-time (seconds 0.035))
|
||||
(:next-launcher 4243)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4243
|
||||
:init-specs ((:r 64.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:scalevel-x (meters -0.0008))
|
||||
(:scalevel-y (meters 0) (meters 0.0026666666))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-outro-precursor-entity
|
||||
:id 1252
|
||||
:duration (seconds 0.017)
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 4244 :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4244
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2))
|
||||
(:rot-x (degrees 4.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 8.0 2.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
|
||||
(:userdata 4096.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-fma-medallion-car-beam
|
||||
:id 1253
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 4245 :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 4245
|
||||
:init-specs ((:texture (redpuff level-default-sprite))
|
||||
(:num 3.0 3.0)
|
||||
(:scale-x (meters 0.1) (meters 0.4))
|
||||
(:scale-y (meters 0.1) (meters 0.4))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 16.0 16.0)
|
||||
(:vel-z (meters 0.05))
|
||||
(:scalevel-x (meters 0.006666667))
|
||||
(:timer (seconds 0.667) (seconds 0.165))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-2d-spline-align-instant)
|
||||
(:conerot-x (degrees 20) (degrees -50.000004))
|
||||
(:conerot-y (degrees 0) (degrees -50.000004))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-fma-medallion-car-charge
|
||||
:id 1254
|
||||
:flags (sp0 sp4 sp12)
|
||||
:bounds (static-bspherem 0 0 0 640)
|
||||
:parts ((sp-item 4246 :flags (sp7))
|
||||
(sp-item 4247 :flags (sp7))
|
||||
(sp-item 4248 :flags (sp6))
|
||||
(sp-item 4249 :flags (sp6))
|
||||
(sp-item 4250 :flags (sp6))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4246
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 1.0 1.0)
|
||||
(:x (meters 0.6) (meters 0.1))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 0.0)
|
||||
(:scalevel-x (meters -0.006666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.21333334)
|
||||
(:accel-x (meters -0.00033333333))
|
||||
(:friction 0.98 0.01)
|
||||
(:timer (seconds 0.5))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:func 'spt-func-relative-pos)
|
||||
(:rotate-x (degrees 0) (degrees 36000))
|
||||
(:rotate-y (degrees 0) (degrees 36000))
|
||||
(:rotate-z (degrees 0) (degrees 36000))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4247
|
||||
:init-specs ((:texture (specs level-default-sprite))
|
||||
(:num 0.1)
|
||||
(:scale-x (meters 1.5) (meters 0.5))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0 20.0)
|
||||
(:b 32.0)
|
||||
(:a 0.0)
|
||||
(:scalevel-x (meters -0.013333334) (meters -0.01))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.64)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:func 'spt-func-relative-pos)
|
||||
(:next-time (seconds 0.335))
|
||||
(:next-launcher 4251)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4251
|
||||
:init-specs ((:fade-a 0.0))
|
||||
)
|
||||
|
||||
(defpart 4248
|
||||
:init-specs ((:texture (starflash level-default-sprite))
|
||||
(:num 0.5)
|
||||
(:scale-x (meters 0.15))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 140.0)
|
||||
(:b 128.0)
|
||||
(:a 20.0 40.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.167))
|
||||
(:flags (glow))
|
||||
(:userdata 409.6)
|
||||
(:func 'spt-func-relative-pos)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4249
|
||||
:init-specs ((:texture (rainbow-halo level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.2))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 64.0)
|
||||
(:b 64.0)
|
||||
(:a 60.0 30.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (glow))
|
||||
(:userdata 4096.0)
|
||||
(:func 'spt-func-relative-pos)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4250
|
||||
:init-specs ((:texture (ring level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 10.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (glow))
|
||||
(:userdata 4096.0)
|
||||
(:func 'spt-func-relative-pos)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-fma-precursor-entrance-flash
|
||||
:id 1255
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts ((sp-item 4252 :flags (sp3)) (sp-item 4253 :flags (sp3)))
|
||||
)
|
||||
|
||||
(defpart 4252
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters -0.5))
|
||||
(:scale-x (meters 2))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 100.0)
|
||||
(:g 100.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:scalevel-x (meters 0.13333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:timer (seconds 0.667))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat))
|
||||
(:userdata 4096.0)
|
||||
(:next-time (seconds 0.335))
|
||||
(:next-launcher 4254)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4254
|
||||
:init-specs ((:scalevel-x (meters -0.06666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.28))
|
||||
)
|
||||
|
||||
(defpart 4253
|
||||
:init-specs ((:texture (radial-halo level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters -0.5))
|
||||
(:scale-x (meters 1))
|
||||
(:rot-z (degrees 0))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:scalevel-x (meters 0.33333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:timer (seconds 0.835))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:next-time (seconds 0.335))
|
||||
(:next-launcher 4255)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4255
|
||||
:init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.85333335))
|
||||
)
|
||||
|
||||
(defpartgroup group-fma-lightjak-getshield
|
||||
:id 1256
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts ((sp-item 4256 :flags (is-3d))
|
||||
(sp-item 4257 :flags (is-3d))
|
||||
(sp-item 4258 :flags (is-3d))
|
||||
(sp-item 4259 :flags (is-3d))
|
||||
(sp-item 4260)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4256
|
||||
:init-specs ((:texture (vol-light level-default-sprite))
|
||||
(:num 0.1 0.1)
|
||||
(:x (meters 0))
|
||||
(:y (meters 0))
|
||||
(:z (meters 0) (meters 1))
|
||||
(:scale-x (meters 3) (meters 1))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 80))
|
||||
(:scale-y (meters 20))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:fade-a 1.28)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 4261)
|
||||
(:rotate-x (degrees 0))
|
||||
(:rotate-y (degrees -90))
|
||||
(:rotate-z (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4261
|
||||
:init-specs ((:fade-a -1.28))
|
||||
)
|
||||
|
||||
(defpart 4257
|
||||
:init-specs ((:texture (vol-light level-default-sprite))
|
||||
(:num 0.1 0.1)
|
||||
(:x (meters 0))
|
||||
(:y (meters 0))
|
||||
(:z (meters 0) (meters 1))
|
||||
(:scale-x (meters 3) (meters 1))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 124.99999))
|
||||
(:scale-y (meters 20))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:fade-a 1.28)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 4261)
|
||||
(:rotate-x (degrees 0))
|
||||
(:rotate-y (degrees -90))
|
||||
(:rotate-z (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4258
|
||||
:init-specs ((:texture (vol-light level-default-sprite))
|
||||
(:num 0.1 0.1)
|
||||
(:x (meters 0))
|
||||
(:y (meters 0))
|
||||
(:z (meters 0) (meters 1))
|
||||
(:scale-x (meters 3) (meters 1))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 35))
|
||||
(:scale-y (meters 20))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:rotvel-z (degrees 0.010000001))
|
||||
(:fade-a 1.28)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 4261)
|
||||
(:rotate-x (degrees 0))
|
||||
(:rotate-y (degrees -90))
|
||||
(:rotate-z (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4259
|
||||
:init-specs ((:texture (vol-light level-default-sprite))
|
||||
(:num 0.1 0.1)
|
||||
(:x (meters 0))
|
||||
(:y (meters 0))
|
||||
(:z (meters 0) (meters 1))
|
||||
(:scale-x (meters 3) (meters 1))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 170))
|
||||
(:scale-y (meters 20))
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:rotvel-z (degrees 0.010000001))
|
||||
(:fade-a 1.28)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 4261)
|
||||
(:rotate-x (degrees 0))
|
||||
(:rotate-y (degrees -90))
|
||||
(:rotate-z (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4260
|
||||
:init-specs ((:texture (diamond-star level-default-sprite))
|
||||
(:num 0.5 0.5)
|
||||
(:x (meters -0.5) (meters 1))
|
||||
(:y (meters 0) (meters -20))
|
||||
(:z (meters -0.5) (meters 1))
|
||||
(:scale-x (meters 0.1) (meters 0.4))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 0.0)
|
||||
(:vel-y (meters -0.00083333335) (meters -0.00083333335))
|
||||
(:fade-a 0.85333335)
|
||||
(:timer (seconds 1) (seconds 1.665))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.5))
|
||||
(:next-launcher 4262)
|
||||
(:conerot-x (degrees -50.000004) (degrees 100.00001))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4262
|
||||
:init-specs ((:fade-a -0.85333335))
|
||||
)
|
||||
|
||||
(defpartgroup group-fma-lightjak-getshield-gravitate
|
||||
:id 1257
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts ((sp-item 4263))
|
||||
)
|
||||
|
||||
(defpart 4263
|
||||
:init-specs ((:texture (laser-hit2 level-default-sprite))
|
||||
(:num 0.3)
|
||||
(:y (meters 2))
|
||||
(:scale-x (meters 10) (meters 5))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 64.0)
|
||||
(:g 64.0)
|
||||
(:b 128.0)
|
||||
(:a 0.0)
|
||||
(:scalevel-x (meters -0.033333335) (meters -0.013333334))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.10666667 0.10666667)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-fma-lightjak-getshield-flash
|
||||
:id 1258
|
||||
:flags (sp0 sp12)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts ((sp-item 4264 :flags (sp3)))
|
||||
)
|
||||
|
||||
(defpart 4264
|
||||
:init-specs ((:texture (colorflash level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters -0.5))
|
||||
(:scale-x (meters 2))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 100.0)
|
||||
(:g 100.0)
|
||||
(:b 255.0)
|
||||
(:a 255.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:scalevel-x (meters 0.23333333))
|
||||
(:scalevel-y (meters 0.033333335))
|
||||
(:timer (seconds 0.667))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat))
|
||||
(:userdata 409.6)
|
||||
(:func 'spt-func-relative-pos)
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 4265)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4265
|
||||
:init-specs ((:scalevel-x (meters -0.0033333334)) (:scalevel-y (meters -0.02)) (:fade-a -1.7))
|
||||
)
|
||||
|
||||
@@ -5,5 +5,743 @@
|
||||
;; name in dgo: comb-sentry
|
||||
;; dgos: RAILA, COMBA
|
||||
|
||||
(deftype comb-sentry-stack-var0 (structure)
|
||||
((params projectile-init-by-other-params :inline :offset 0)
|
||||
(mat matrix :inline :offset 128)
|
||||
(vec2 vector :inline :offset 192)
|
||||
(vec3 vector :inline :offset 208)
|
||||
(vec4 vector :inline :offset 224)
|
||||
(byte0 int8 :offset 240)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype comb-sentry-stack-var1 (structure)
|
||||
((glow sprite-glow-data :inline :offset 0)
|
||||
(mat matrix :inline :offset 64)
|
||||
(vec vector :inline :offset 128)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype comb-sentry-shot (guard-shot)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod projectile-method-24 ((this comb-sentry-shot))
|
||||
(draw-beam (-> *part-id-table* 4240) (-> this tail-pos) (-> this starting-dir) #f)
|
||||
(let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0))
|
||||
(v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3))
|
||||
(t9-2 sp-launch-particles-var)
|
||||
(a0-4 *sp-particle-system-2d*)
|
||||
(a1-4 (-> *part-id-table* 4241))
|
||||
(a2-2 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-2 trans quad) (-> v1-2 quad))
|
||||
(t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod projectile-method-25 ((this comb-sentry-shot))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((gp-0 (-> this root trans))
|
||||
(a1-0 (-> this tail-pos))
|
||||
(s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0))
|
||||
(f30-0 (vector-length s5-1))
|
||||
)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((v1-4 a1-0))
|
||||
(let ((a0-2 s5-1))
|
||||
(let ((a2-1 0.8))
|
||||
(.mov vf7 a2-1)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-2 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-4 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 (&-> s4-0 quad) vf6)
|
||||
(let ((f28-0 (-> *part-id-table* 4236 init-specs 4 initial-valuef)))
|
||||
(set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) (vector-length s5-1))
|
||||
(draw-beam (-> *part-id-table* 4236) a1-0 s5-1 #f)
|
||||
(set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) f28-0)
|
||||
)
|
||||
(vector-normalize! s5-1 1.0)
|
||||
(launch-particles (-> *part-id-table* 4237) s4-0)
|
||||
(launch-particles (-> *part-id-table* 4238) s4-0)
|
||||
)
|
||||
(let ((s4-1 (new 'stack-no-clear 'matrix))
|
||||
(f26-0 (* 0.000027126736 f30-0))
|
||||
(f30-1 (-> *part-id-table* 4239 init-specs 3 initial-valuef))
|
||||
(f28-1 (-> *part-id-table* 4239 init-specs 4 initial-valuef))
|
||||
)
|
||||
(forward-up->inv-matrix s4-1 s5-1 *up-vector*)
|
||||
(set! (-> s4-1 trans quad) (-> gp-0 quad))
|
||||
(set! (-> *part-id-table* 4239 init-specs 3 initial-valuef) (* f26-0 f30-1))
|
||||
(set! (-> *part-id-table* 4239 init-specs 4 initial-valuef) (* f26-0 f28-1))
|
||||
(launch-particles (-> *part-id-table* 4239) s4-1 :origin-is-matrix #t)
|
||||
(set! (-> *part-id-table* 4239 init-specs 3 initial-valuef) f30-1)
|
||||
(set! (-> *part-id-table* 4239 init-specs 4 initial-valuef) f28-1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod projectile-method-26 ((this comb-sentry-shot))
|
||||
(let* ((s4-0 (-> this root))
|
||||
(v1-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> s4-0 trans)) 2048.0))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> gp-0 quad) (-> s4-0 trans quad))
|
||||
(vector+! gp-0 gp-0 v1-1)
|
||||
(cond
|
||||
((-> this hit-actor?)
|
||||
(sound-play "sentry-hit")
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 211))
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> *part-group-id-table* 212 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-0 quad))
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod init-proj-settings! ((this comb-sentry-shot))
|
||||
(let ((t9-0 (method-of-type guard-shot init-proj-settings!)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(logior! (-> this options) (projectile-options po13))
|
||||
(set! (-> this max-speed) 2048000.0)
|
||||
(set! (-> this damage) 3.0)
|
||||
(set! (-> this timeout) (seconds 0.4))
|
||||
(set! (-> this sound-id) (new-sound-id))
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype comb-sentry (process-focusable)
|
||||
((target-pos vector :inline)
|
||||
(up-dir vector :inline)
|
||||
(attack-vel vector :inline)
|
||||
(exploder-params joint-exploder-static-params)
|
||||
(exploder-skel skeleton-group)
|
||||
(exploder-anim uint32)
|
||||
(target-dist float)
|
||||
(path-t float)
|
||||
(path-dt float)
|
||||
(hit-points float)
|
||||
(incoming-attack-id int32)
|
||||
(angle float)
|
||||
(spin float)
|
||||
(shooting symbol)
|
||||
(should-attack symbol)
|
||||
(i-barrel int8)
|
||||
(hum-id sound-id)
|
||||
(shot-time time-frame)
|
||||
(attack-time time-frame)
|
||||
(in-range-time time-frame)
|
||||
(player-vehicle handle)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
path-follow
|
||||
explode
|
||||
)
|
||||
(:methods
|
||||
(stop-hum (_type_) none)
|
||||
(sentry-post (_type_) none)
|
||||
(set-cspec! (_type_) none)
|
||||
(go-explode (_type_) none)
|
||||
(set-attack-vel! (_type_ vector) none)
|
||||
(on-attack (_type_ process attack-info object) symbol)
|
||||
(on-impact (_type_ rigid-body-impact) symbol)
|
||||
(fire-shot (_type_) (pointer comb-sentry-shot))
|
||||
(draw-glow-sprites (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-comb-sentry comb-sentinel comb-sentinel-lod0-jg comb-sentinel-idle-ja
|
||||
((comb-sentinel-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 11)
|
||||
)
|
||||
|
||||
(defskelgroup skel-comb-sentry-explode comb-sentinel comb-sentinel-explode-lod0-jg comb-sentinel-explode-idle-ja
|
||||
((comb-sentinel-explode-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 6.5 0 7)
|
||||
)
|
||||
|
||||
(define *comb-sentry-explode-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 -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1)
|
||||
)
|
||||
:collide-spec (collide-spec backgnd)
|
||||
:art-level #f
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this comb-sentry) (arg0 entity-actor))
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s4-0 penetrated-by) (penetrate))
|
||||
(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 action) (collide-action solid))
|
||||
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0)
|
||||
(set! (-> s4-0 root-prim) s3-0)
|
||||
)
|
||||
(let ((a0-5 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
|
||||
(set! (-> a0-5 prim-core action) (collide-action solid))
|
||||
(set! (-> a0-5 transform-index) 0)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
||||
(let ((v1-9 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-9 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-9 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-comb-sentry" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(set! (-> this up-dir quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad))
|
||||
(set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0))
|
||||
(if (nonzero? (-> this path))
|
||||
(logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
)
|
||||
(set! (-> this path-t) 0.0)
|
||||
(set! (-> this path-dt) 0.0)
|
||||
(set! (-> this hit-points) 6.0)
|
||||
(set! (-> this shooting) #f)
|
||||
(set! (-> this hum-id) (new 'static 'sound-id))
|
||||
(set! (-> this should-attack) #f)
|
||||
(set! (-> this exploder-params) *comb-sentry-explode-params*)
|
||||
(set! (-> this exploder-skel)
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-comb-sentry-explode" (the-as (pointer level) #f)))
|
||||
)
|
||||
(set! (-> this exploder-anim) (the-as uint 5))
|
||||
(set! (-> this draw lod-set lod 0 dist) 1228800.0)
|
||||
(set! (-> this draw lod-set lod 1 dist) 1232896.0)
|
||||
(set! (-> this player-vehicle) (the-as handle #f))
|
||||
(set! (-> this target-dist) 4096000.0)
|
||||
(set-cspec! this)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
(defmethod set-cspec! ((this comb-sentry))
|
||||
(iterate-prims
|
||||
(-> this root)
|
||||
(lambda ((arg0 collide-shape-prim))
|
||||
(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 obstacle vehicle-sphere vehicle-mesh))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (-> this root root-prim)))
|
||||
(mem-copy!
|
||||
(the-as pointer (-> (the-as collide-shape-prim-group v1-3) child 0 local-sphere))
|
||||
(the-as pointer (new 'static 'vector :y 6144.0 :w 40960.0))
|
||||
16
|
||||
)
|
||||
)
|
||||
(update-transforms (-> this root))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *comb-sentry-glow-template* (new 'static 'sprite-glow-data
|
||||
:position (new 'static 'vector :w 20480.0)
|
||||
:size-probe 655.36
|
||||
:z-offset 819.2
|
||||
:size-y 20480.0
|
||||
:color (new 'static 'rgbaf :x 255.0 :y 64.0 :z 64.0 :w 16.0)
|
||||
:fade-a -0.0000122044
|
||||
:fade-b 8.997864
|
||||
:tex-id (new 'static 'texture-id :index #xd :page #x4)
|
||||
)
|
||||
)
|
||||
|
||||
(define *comb-sentry-glow-ring-template* (new 'static 'sprite-glow-data
|
||||
:position (new 'static 'vector :w 20480.0)
|
||||
:size-probe 655.36
|
||||
:z-offset 819.2
|
||||
:size-y 20480.0
|
||||
:color (new 'static 'rgbaf :x 255.0 :w 16.0)
|
||||
:fade-a -0.0000122044
|
||||
:fade-b 8.997864
|
||||
:tex-id (new 'static 'texture-id :index #x9c :page #x4)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod draw-glow-sprites ((this comb-sentry))
|
||||
(let ((gp-0 (new 'stack-no-clear 'comb-sentry-stack-var1)))
|
||||
(matrix<-transformq! (-> gp-0 mat) (the-as transformq (-> this root trans)))
|
||||
(let ((s5-0 (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :z 30720.0 :w 1.0)
|
||||
(new 'static 'vector :x 9420.8 :y 9420.8 :z 24985.6 :w 1.0)
|
||||
(new 'static 'vector :x -10240.0 :z 24576.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
(s4-0 *comb-sentry-glow-template*)
|
||||
(s3-0 *comb-sentry-glow-ring-template*)
|
||||
)
|
||||
(dotimes (s2-0 3)
|
||||
(quad-copy! (the-as pointer (-> gp-0 glow)) (the-as pointer s4-0) 4)
|
||||
(vector-matrix*! (-> gp-0 vec) (-> s5-0 s2-0) (-> gp-0 mat))
|
||||
(let* ((v1-2 (-> gp-0 glow))
|
||||
(a1-3 (-> gp-0 vec))
|
||||
(f0-0 (-> v1-2 position w))
|
||||
)
|
||||
(set! (-> v1-2 position quad) (-> a1-3 quad))
|
||||
(set! (-> v1-2 position w) f0-0)
|
||||
)
|
||||
0
|
||||
(set! (-> gp-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0)))
|
||||
(set! (-> gp-0 glow color w) (* 4.0 (rand-vu-float-range 16.0 18.0)))
|
||||
(add! *simple-sprite-system* (-> gp-0 glow))
|
||||
(quad-copy! (the-as pointer (-> gp-0 glow)) (the-as pointer s3-0) 4)
|
||||
(vector-matrix*! (-> gp-0 vec) (-> s5-0 s2-0) (-> gp-0 mat))
|
||||
(let* ((v1-10 (-> gp-0 glow))
|
||||
(a1-10 (-> gp-0 vec))
|
||||
(f0-5 (-> v1-10 position w))
|
||||
)
|
||||
(set! (-> v1-10 position quad) (-> a1-10 quad))
|
||||
(set! (-> v1-10 position w) f0-5)
|
||||
)
|
||||
0
|
||||
(set! (-> gp-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0)))
|
||||
(set! (-> gp-0 glow color w) (* 0.5 (rand-vu-float-range 16.0 18.0)))
|
||||
(add! *simple-sprite-system* (-> gp-0 glow))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer comb-sentry-shot).
|
||||
(defmethod fire-shot ((this comb-sentry))
|
||||
(sound-play "sentry-fire")
|
||||
(let ((s5-1 (new 'stack-no-clear 'comb-sentry-stack-var0)))
|
||||
(set! (-> s5-1 byte0) 0)
|
||||
(let* ((v1-1 (-> s5-1 mat))
|
||||
(a3-1 (-> this node-list data 0 bone transform))
|
||||
(a0-5 (-> a3-1 rvec quad))
|
||||
(a1-1 (-> a3-1 uvec quad))
|
||||
(a2-1 (-> a3-1 fvec quad))
|
||||
(a3-2 (-> a3-1 trans quad))
|
||||
)
|
||||
(set! (-> v1-1 rvec quad) a0-5)
|
||||
(set! (-> v1-1 uvec quad) a1-1)
|
||||
(set! (-> v1-1 fvec quad) a2-1)
|
||||
(set! (-> v1-1 trans quad) a3-2)
|
||||
)
|
||||
(let ((v1-2 (new 'static 'inline-array vector 1 (new 'static 'vector :z 14336.0 :w 1.0))))
|
||||
(vector-matrix*! (-> s5-1 vec2) (-> v1-2 (-> s5-1 byte0)) (-> s5-1 mat))
|
||||
)
|
||||
0
|
||||
(set! (-> s5-1 vec3 quad) (-> s5-1 mat fvec quad))
|
||||
(vector-float*! (-> s5-1 vec4) (-> s5-1 vec3) 2048000.0)
|
||||
(set! (-> s5-1 params ent) (-> this entity))
|
||||
(set! (-> s5-1 params charge) 1.0)
|
||||
(set! (-> s5-1 params options) (projectile-options))
|
||||
(logclear! (-> s5-1 params options) (projectile-options po14 po15 po16))
|
||||
(set! (-> s5-1 params pos quad) (-> s5-1 vec2 quad))
|
||||
(set! (-> s5-1 params vel quad) (-> s5-1 vec4 quad))
|
||||
(set! (-> s5-1 params notify-handle) (the-as handle #f))
|
||||
(set! (-> s5-1 params owner-handle) (the-as handle #f))
|
||||
(set! (-> s5-1 params target-handle) (the-as handle #f))
|
||||
(set! (-> s5-1 params target-pos quad) (the-as uint128 0))
|
||||
(set! (-> s5-1 params ignore-handle) (process->handle this))
|
||||
(let* ((v1-17 *game-info*)
|
||||
(a0-20 (+ (-> v1-17 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-17 attack-id) a0-20)
|
||||
(set! (-> s5-1 params attack-id) a0-20)
|
||||
)
|
||||
(set! (-> s5-1 params timeout) (seconds 4))
|
||||
(the-as
|
||||
(pointer comb-sentry-shot)
|
||||
(spawn-projectile comb-sentry-shot (-> s5-1 params) this *default-dead-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod stop-hum ((this comb-sentry))
|
||||
(sound-stop (-> this hum-id))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this comb-sentry))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(stop-hum this)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod sentry-post ((this comb-sentry))
|
||||
(local-vars (v1-25 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(if (and (= (-> this player-vehicle) #f) *target* (focus-test? *target* pilot-riding))
|
||||
(set! (-> this player-vehicle) (-> *target* pilot vehicle))
|
||||
)
|
||||
(set! (-> this should-attack) #f)
|
||||
(let ((s5-0 (the-as process-focusable (handle->process (-> this player-vehicle)))))
|
||||
(when s5-0
|
||||
(if (and (not (focus-test? s5-0 dead))
|
||||
(not (focus-test? s5-0 ignore))
|
||||
(let ((f0-0 (vector-vector-distance-squared (-> s5-0 root trans) (-> this root trans)))
|
||||
(f1-0 409600.0)
|
||||
)
|
||||
(< f0-0 (* f1-0 f1-0))
|
||||
)
|
||||
)
|
||||
(set! (-> this should-attack) #t)
|
||||
)
|
||||
(let ((v1-23 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> v1-23 rvec quad) (-> s5-0 root trans quad))
|
||||
(set! (-> v1-23 uvec quad) (-> s5-0 root transv quad))
|
||||
(vector+float*! (-> this target-pos) (-> v1-23 rvec) (-> v1-23 uvec) 0.1)
|
||||
(set! (-> v1-23 fvec quad) (-> s5-0 node-list data 0 bone transform fvec quad))
|
||||
(vector-! (-> v1-23 trans) (-> this root trans) (-> v1-23 rvec))
|
||||
(set! (-> this target-dist) (vector-dot (-> v1-23 fvec) (-> v1-23 trans)))
|
||||
(let* ((v1-24 (-> v1-23 trans))
|
||||
(f0-4 409600.0)
|
||||
(f0-6 (* f0-4 f0-4))
|
||||
)
|
||||
(.lvf vf1 (&-> v1-24 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-25 vf1)
|
||||
(if (< f0-6 v1-25)
|
||||
(set! (-> this target-dist) 4096000.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (not (-> this should-attack))
|
||||
(set-time! (-> this in-range-time))
|
||||
)
|
||||
(set! (-> this path-dt) (* 0.00024414062 (- 163840.0 (-> this target-dist))))
|
||||
(set! (-> this path-dt) (fmax -8.0 (fmin 8.0 (-> this path-dt))))
|
||||
(+! (-> this path-t) (* (-> this path-dt) (seconds-per-frame)))
|
||||
(set! (-> this path-t) (fmax 0.0 (fmin (-> this path-t) (get-num-segments (-> this path)))))
|
||||
(if (= (-> this path-t) (get-num-segments (-> this path)))
|
||||
(go-explode this)
|
||||
)
|
||||
(get-point-in-path! (-> this path) (-> this root trans) (-> this path-t) 'interp)
|
||||
(let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 5)))
|
||||
(vector-! (-> s5-1 0) (-> this target-pos) (-> this root trans))
|
||||
(vector-normalize! (-> s5-1 0) 1.0)
|
||||
(set! (-> s5-1 1 quad) (-> this up-dir quad))
|
||||
(set! (-> s5-1 4 x) (vector-dot (-> s5-1 0) (-> s5-1 1)))
|
||||
(vector+float*! (-> s5-1 1) (-> s5-1 1) (-> s5-1 0) (- (-> s5-1 4 x)))
|
||||
(vector-normalize! (-> s5-1 1) 1.0)
|
||||
(set! (-> this up-dir quad) (-> s5-1 1 quad))
|
||||
(forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s5-1 0) (-> s5-1 1))
|
||||
(+! (-> this angle) (* (-> this spin) (seconds-per-frame)))
|
||||
(set! (-> this angle) (the float (sar (shl (the int (-> this angle)) 48) 48)))
|
||||
(quaternion-axis-angle! (the-as quaternion (-> s5-1 3)) 0.0 0.0 1.0 (-> this angle))
|
||||
(quaternion*! (the-as quaternion (-> s5-1 2)) (the-as quaternion (-> s5-1 2)) (the-as quaternion (-> s5-1 3)))
|
||||
(quaternion-copy! (-> this root quat) (the-as quaternion (-> s5-1 2)))
|
||||
)
|
||||
(cond
|
||||
((-> this shooting)
|
||||
(seek! (-> this spin) 131072.0 (* 262144.0 (seconds-per-frame)))
|
||||
(when (time-elapsed? (-> this shot-time) (seconds 0.2))
|
||||
(set-time! (-> this shot-time))
|
||||
(fire-shot this)
|
||||
)
|
||||
(when (or (time-elapsed? (-> this attack-time) (seconds 1)) (not (-> this should-attack)))
|
||||
(set-time! (-> this attack-time))
|
||||
(set! (-> this shooting) #f)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(seek! (-> this spin) 32768.0 (* 65536.0 (seconds-per-frame)))
|
||||
(when (and (time-elapsed? (-> this attack-time) (seconds 3))
|
||||
(time-elapsed? (-> this in-range-time) (seconds 4))
|
||||
(-> this should-attack)
|
||||
)
|
||||
(set-time! (-> this attack-time))
|
||||
(set! (-> this shooting) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((-> this should-attack)
|
||||
(if (zero? (-> this hum-id))
|
||||
(set! (-> this hum-id) (new-sound-id))
|
||||
)
|
||||
(sound-play "sentry-engine" :id (-> this hum-id))
|
||||
)
|
||||
(else
|
||||
(when (nonzero? (-> this hum-id))
|
||||
(sound-stop (-> this hum-id))
|
||||
(set! (-> this hum-id) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(transform-post)
|
||||
(draw-glow-sprites this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod go-explode ((this comb-sentry))
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(let ((v1-3 (-> this root root-prim)))
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-3 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(logior! (-> this root penetrated-by) (penetrate vehicle))
|
||||
(go (method-of-object this explode))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-inv-mass ((this comb-sentry))
|
||||
0.125
|
||||
)
|
||||
|
||||
(defmethod set-attack-vel! ((this comb-sentry) (arg0 vector))
|
||||
(set! (-> this attack-vel quad) (-> arg0 quad))
|
||||
(if (< 81920.0 (vector-length (-> this attack-vel)))
|
||||
(vector-normalize! (-> this attack-vel) 81920.0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod on-attack ((this comb-sentry) (arg0 process) (arg1 attack-info) (arg2 object))
|
||||
(vector-reset! (-> this attack-vel))
|
||||
(let ((a1-1 (new 'stack-no-clear 'vector))
|
||||
(f30-0 1.0)
|
||||
)
|
||||
(vector-reset! a1-1)
|
||||
(when (logtest? (attack-mask attacker-velocity) (-> arg1 mask))
|
||||
(vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0)
|
||||
(set-attack-vel! this a1-1)
|
||||
)
|
||||
(if (logtest? (attack-mask damage) (-> arg1 mask))
|
||||
(set! f30-0 (-> arg1 damage))
|
||||
)
|
||||
(sound-play "impact-med")
|
||||
(set! (-> this hit-points) (- (-> this hit-points) f30-0))
|
||||
)
|
||||
(if (< (-> this hit-points) 0.0)
|
||||
(go-explode this)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod on-impact ((this comb-sentry) (arg0 rigid-body-impact))
|
||||
(let ((a1-1 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse))
|
||||
(set-attack-vel! this a1-1)
|
||||
)
|
||||
(when (< 286720.0 (-> arg0 impulse))
|
||||
(go-explode this)
|
||||
#t
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (comb-sentry)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(set! (-> self path-dt) 0.0)
|
||||
(go-virtual path-follow)
|
||||
)
|
||||
: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 (behavior ()
|
||||
(sentry-post self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate path-follow (comb-sentry)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('impact-impulse)
|
||||
(let ((a1-1 (-> block param 0)))
|
||||
(on-impact self (the-as rigid-body-impact a1-1))
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(let ((s4-0 (the-as attack-info (-> block param 1))))
|
||||
(get-penetrate-using-from-attack-event (the-as process-drawable proc) block)
|
||||
(when (!= (-> s4-0 id) (-> self incoming-attack-id))
|
||||
(set! (-> self incoming-attack-id) (the-as int (-> s4-0 id)))
|
||||
(on-attack self proc s4-0 (-> block param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
: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 (behavior ()
|
||||
(sentry-post self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate explode (comb-sentry)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
:code (behavior ()
|
||||
(stop-hum self)
|
||||
(sound-play "sentry-expl")
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 217 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* 217))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 217))
|
||||
)
|
||||
)
|
||||
(let ((gp-3 (new 'stack 'joint-exploder-tuning (the-as uint 0))))
|
||||
(set! (-> gp-3 duration) (seconds 4))
|
||||
(set! (-> gp-3 gravity) -163840.0)
|
||||
(set! (-> gp-3 rot-speed) 10.0)
|
||||
(vector+!
|
||||
(-> gp-3 fountain-rand-transv-lo)
|
||||
(new 'static 'vector :x -245760.0 :y 245760.0 :z -245760.0 :w 1.0)
|
||||
(-> self attack-vel)
|
||||
)
|
||||
(vector+!
|
||||
(-> gp-3 fountain-rand-transv-hi)
|
||||
(new 'static 'vector :x 245760.0 :y 245760.0 :z 245760.0 :w 1.0)
|
||||
(-> self attack-vel)
|
||||
)
|
||||
(process-spawn
|
||||
joint-exploder
|
||||
(-> self exploder-skel)
|
||||
(-> self exploder-anim)
|
||||
gp-3
|
||||
(-> self exploder-params)
|
||||
:name "joint-exploder"
|
||||
:to self
|
||||
:unk 0
|
||||
)
|
||||
)
|
||||
(let ((gp-4 (current-time)))
|
||||
(until (time-elapsed? gp-4 (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
:post #f
|
||||
)
|
||||
|
||||
(deftype comb-sentinel (comb-sentry)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype rail-sentinel (comb-sentry)
|
||||
()
|
||||
)
|
||||
|
||||
@@ -7,3 +7,317 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype task-manager-tube-ride (task-manager)
|
||||
((suck-factor float)
|
||||
(hp-scale float)
|
||||
(intro-sequence basic)
|
||||
(outro-sequence basic)
|
||||
(no-shoot-time time-frame)
|
||||
(end-sphere sphere :inline)
|
||||
(end-plane vector :inline)
|
||||
(intro-sphere sphere :inline)
|
||||
(outro-sphere sphere :inline)
|
||||
(intro-target vector :inline)
|
||||
(outro-target vector :inline)
|
||||
(outro-plane2 vector :inline)
|
||||
(outro-target2 vector :inline)
|
||||
)
|
||||
(:methods
|
||||
(set-sbanks (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-tube-ride))
|
||||
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(let* ((s4-0 (handle->process (-> this player-vehicle)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s5-0
|
||||
(if (focus-test? s5-0 dead)
|
||||
(send-event this 'fail)
|
||||
)
|
||||
(if (time-elapsed? (-> this no-shoot-time) (seconds 0.1))
|
||||
(logclear! (-> s5-0 focus-status) (focus-status ignore))
|
||||
(logior! (-> s5-0 focus-status) (focus-status ignore))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod set-time-limit ((this task-manager-tube-ride))
|
||||
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this hp-scale) 1.0)
|
||||
(set! (-> this intro-sequence) #f)
|
||||
(set! (-> this outro-sequence) #f)
|
||||
(let ((a2-0 (-> this node-info death-count)))
|
||||
(set! (-> this suck-factor) (cond
|
||||
((< a2-0 (the-as uint 5))
|
||||
0.0
|
||||
)
|
||||
((< a2-0 (the-as uint 10))
|
||||
0.25
|
||||
)
|
||||
(else
|
||||
(fmin 1.0 (* 0.05 (the float a2-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "tube-ride::initialize death-count ~d, suck-factor ~f~%" a2-0 (-> this suck-factor))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod set-sbanks ((this task-manager-tube-ride))
|
||||
(set-setting! 'music 'combs 0.0 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod taskman-event-handler ((this task-manager-tube-ride) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('no-shoot)
|
||||
(let ((v0-0 (the-as object (current-time))))
|
||||
(set! (-> this no-shoot-time) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate active (task-manager-tube-ride)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(set-setting! 'pilot-exit #f 0.0 0)
|
||||
(set-setting! 'pilot-death #t 0.0 0)
|
||||
(until #f
|
||||
(if (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status))))
|
||||
(goto cfg-8)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-8)
|
||||
(suspend)
|
||||
(until #f
|
||||
(let ((v1-13 (handle->process (-> *vehicle-info* handle-by-vehicle-type 10))))
|
||||
(when v1-13
|
||||
(set! (-> self player-vehicle) (process->handle v1-13))
|
||||
(goto cfg-23)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-23)
|
||||
(cond
|
||||
((-> self intro-sequence)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #t)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ignore-damage #t)
|
||||
(until #f
|
||||
(if (and *target* (focus-test? *target* pilot-riding))
|
||||
(goto cfg-46)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-46)
|
||||
(set-sbanks self)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #f)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self intro-target))
|
||||
(until #f
|
||||
(let* ((s5-0 (handle->process (-> self player-vehicle)))
|
||||
(gp-0 (if (type? s5-0 process-focusable)
|
||||
(the-as process-focusable s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when gp-0
|
||||
(send-event gp-0 'set-control-hook-ai)
|
||||
(if (< (vector-vector-distance (-> gp-0 root trans) (-> self intro-sphere)) (-> self intro-sphere r))
|
||||
(goto cfg-89)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-89)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'set-control-hook-player)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'in-tunnel #t)
|
||||
)
|
||||
(else
|
||||
(set-sbanks self)
|
||||
)
|
||||
)
|
||||
(send-event
|
||||
(handle->process (-> self player-vehicle))
|
||||
'scale-max-hit-points
|
||||
(* (-> self hp-scale) (+ 1.0 (-> self suck-factor)))
|
||||
)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #f)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f)
|
||||
(when (-> self outro-sequence)
|
||||
(until #f
|
||||
(let* ((gp-1 (handle->process (-> self player-vehicle)))
|
||||
(v1-134 (if (type? gp-1 process-focusable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-134
|
||||
(if (< (vector-vector-distance (-> (the-as process-focusable v1-134) root trans) (-> self outro-sphere))
|
||||
(-> self outro-sphere r)
|
||||
)
|
||||
(goto cfg-139)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-139)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target))
|
||||
(send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai)
|
||||
(until #f
|
||||
(let* ((gp-2 (handle->process (-> self player-vehicle)))
|
||||
(v1-156 (if (type? gp-2 process-focusable)
|
||||
gp-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-156
|
||||
(if (< 0.0 (vector4-dot (-> (the-as process-focusable v1-156) root trans) (-> self outro-plane2)))
|
||||
(goto cfg-166)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-166)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'in-tunnel #f)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target2))
|
||||
)
|
||||
(until #f
|
||||
(let* ((s5-1 (handle->process (-> self player-vehicle)))
|
||||
(gp-3 (if (type? s5-1 process-focusable)
|
||||
(the-as process-focusable s5-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when gp-3
|
||||
(if (and (< (vector-vector-distance (-> gp-3 root trans) (-> self end-sphere)) (-> self end-sphere r))
|
||||
(< 0.0 (vector4-dot (-> gp-3 root trans) (-> self end-plane)))
|
||||
)
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(let ((t9-29 (-> (find-parent-state) code)))
|
||||
(if t9-29
|
||||
((the-as (function none) t9-29))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate complete (task-manager-tube-ride)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(remove-setting! 'pilot-exit)
|
||||
(set-setting! 'pilot #f 0.0 0)
|
||||
(let ((t9-3 (-> (find-parent-state) code)))
|
||||
(if t9-3
|
||||
((the-as (function none) t9-3))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype task-manager-comb-travel (task-manager-tube-ride)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-comb-travel))
|
||||
(call-parent-method this)
|
||||
(set! (-> this end-sphere quad)
|
||||
(-> (new 'static 'vector :x 14454784.0 :y -163840.0 :z 607027.2 :w 409600.0) quad)
|
||||
)
|
||||
(set! (-> this end-plane quad) (-> (new 'static 'vector :x 1.0 :w 1.0) quad))
|
||||
(set! (-> this end-plane w) (- (vector-dot (-> this end-plane) (the-as vector (-> this end-sphere)))))
|
||||
(set! (-> this intro-sequence) (the-as basic #t))
|
||||
(set! (-> this intro-sphere quad)
|
||||
(-> (new 'static 'vector :x 1083801.6 :y -81920.0 :z 45056.0 :w 122880.0) quad)
|
||||
)
|
||||
(set! (-> this intro-target quad) (-> this intro-sphere quad))
|
||||
(set! (-> this outro-sequence) (the-as basic #t))
|
||||
(set! (-> this outro-sphere quad)
|
||||
(-> (new 'static 'vector :x 13798605.0 :y -226099.2 :z 614400.0 :w 491520.0) quad)
|
||||
)
|
||||
(set! (-> this outro-target quad)
|
||||
(-> (new 'static 'vector :x 13798605.0 :y -4096000.0 :z 614400.0 :w 1.0) quad)
|
||||
)
|
||||
(set! (-> this outro-target2 quad)
|
||||
(-> (new 'static 'vector :x 13549568.0 :y -225280.0 :z 614400.0 :w 1.0) quad)
|
||||
)
|
||||
(set! (-> this outro-plane2 quad) (-> this end-plane quad))
|
||||
(set! (-> this outro-plane2 w) (- (vector-dot (-> this outro-plane2) (-> this outro-target2))))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate complete (task-manager-comb-travel)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(send-event *target* 'end-mode 'pilot)
|
||||
(send-event (handle->process (-> self player-vehicle)) 'sled-disable)
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(let ((t9-3 (-> (find-parent-state) code)))
|
||||
(if t9-3
|
||||
((the-as (function none) t9-3))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype task-manager-comb-wild-ride (task-manager-tube-ride)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-comb-wild-ride))
|
||||
(call-parent-method this)
|
||||
(set! (-> this hp-scale) 2.0)
|
||||
(set! (-> this end-sphere quad)
|
||||
(-> (new 'static 'vector :x 68403.2 :y -14056653.0 :z -3796582.5 :w 409600.0) quad)
|
||||
)
|
||||
(set! (-> this end-plane quad) (-> (new 'static 'vector :x -0.0162 :y -0.3505 :z -0.9364 :w 1.0) quad))
|
||||
(set! (-> this end-plane w) (- (vector-dot (-> this end-plane) (the-as vector (-> this end-sphere)))))
|
||||
(set-blackout-frames (seconds 0.3))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,39 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun comba-login ((arg0 level))
|
||||
(format 0 "comba-login~%")
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun comba-activate ((arg0 level))
|
||||
(format 0 "comba-activate~%")
|
||||
(let ((v1-0 *traffic-info*)
|
||||
(a0-2 (-> arg0 name))
|
||||
)
|
||||
(set! (-> v1-0 vehicle-level) arg0)
|
||||
(set! (-> v1-0 vehicle-levels 10) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 12) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 13) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 14) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 15) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 16) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 17) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 18) a0-2)
|
||||
(set! (-> v1-0 vehicle-levels 19) a0-2)
|
||||
)
|
||||
(vehicle-manager-start (the-as process *entity-pool*))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun comba-deactivate ((arg0 level))
|
||||
(format 0 "comba-deactivate~%")
|
||||
(let ((v1-0 *traffic-info*))
|
||||
(set! (-> v1-0 vehicle-level) (the-as level #f))
|
||||
)
|
||||
(vehicle-manager-kill)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,106 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defskelgroup skel-tpl-elevator-movie tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja
|
||||
((tpl-elevator-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 11)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(load-scene
|
||||
(new 'static 'scene
|
||||
:name "comb-entrance-temple"
|
||||
:extra #f
|
||||
:info #f
|
||||
:scene-flags (scene-flags scf1 scf2 scf3 scf4)
|
||||
:mask-to-clear (process-mask movie projectile)
|
||||
:entity "scene-stage-206"
|
||||
:art-group "scenecamera"
|
||||
:anim "comb-entrance-temple"
|
||||
:parts 5
|
||||
:command-list '((0
|
||||
(fadein (frame-time-30 10))
|
||||
(kill "tpl-mardoor-5")
|
||||
(kill "tpl-elevator-2")
|
||||
(kill "combx-elevator-1")
|
||||
(send-event "tpl-elevator-movie" 'segment 1 2)
|
||||
)
|
||||
(65 (send-event "tpl-elevator-movie" 'segment 3))
|
||||
(91 (want-load 'comba 'combx 'combb))
|
||||
(450 (want-display 'comba 'display))
|
||||
(532 (send-event "tpl-elevator-movie" 'segment 1 2))
|
||||
(555 (fadeout (frame-time-30 15)))
|
||||
(10000 (restore "tpl-elevator-2") (restore "combx-elevator-1") (task-close! "temple-tests-resolution") (save))
|
||||
)
|
||||
:cut-list '(91 211 391)
|
||||
: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 'combx
|
||||
:art-group "skel-jakc-highres"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '()
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '(((90 500) set-flags local-space))
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
:no-draw-seg #x80
|
||||
)
|
||||
(new 'static 'scene-actor
|
||||
:name "sidekick-highres"
|
||||
:level 'combx
|
||||
: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 "tpl-elevator-movie"
|
||||
:level 'combx
|
||||
:art-group "skel-tpl-elevator-movie"
|
||||
:prefix ""
|
||||
:draw-frames '((min max))
|
||||
:scissor-frames '((min max))
|
||||
:shadow-frames '((min max))
|
||||
:cloth-reset-frames '()
|
||||
:cloth-commands '()
|
||||
:light-index #x1
|
||||
:flags #x1
|
||||
:shadow-flags -1
|
||||
:shadow-volume-joint #f
|
||||
)
|
||||
)
|
||||
:load-point "temple-comb-entrance"
|
||||
:end-point "comba-elevator"
|
||||
:borrow '()
|
||||
:sfx-volume -1.0
|
||||
:ambient-volume -1.0
|
||||
:music-delay 1500.0
|
||||
:on-running '(begin (sound-play-loop "tunnel-amb-mov") (sound-play-loop "launch-amb-mov"))
|
||||
:on-complete #f
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,121 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype pecker-ingame (process-drawable)
|
||||
((path-u float)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
active
|
||||
die
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-pecker-ingame pecker-ingame pecker-ingame-lod0-jg pecker-ingame-fly-ja
|
||||
((pecker-ingame-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
:shadow pecker-ingame-shadow-mg
|
||||
:origin-joint-index 3
|
||||
:shadow-joint-index 3
|
||||
)
|
||||
|
||||
(defbehavior pecker-ingame-handler pecker-ingame ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('die)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (pecker-ingame)
|
||||
:virtual #t
|
||||
:event pecker-ingame-handler
|
||||
:trans (behavior ()
|
||||
(let ((v1-1 (res-lump-value (-> self entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)))
|
||||
(cond
|
||||
((zero? v1-1)
|
||||
(if (task-node-closed? (game-task-node comb-travel-introduction))
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
((= (the-as uint v1-1) 1)
|
||||
(if (task-node-closed? (game-task-node comb-travel-resolution))
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defstate active (pecker-ingame)
|
||||
:virtual #t
|
||||
:event pecker-ingame-handler
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! (ja-group) :num! (seek! max 0.78) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max 0.78))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post (behavior ()
|
||||
(let* ((f0-0 (path-control-method-23 (-> self path) (target-pos 0)))
|
||||
(f0-3 (lerp-scale 0.01 0.1 (fmax 0.0 (- (-> self path-u) f0-0)) 0.1 0.0))
|
||||
)
|
||||
(seek! (-> self path-u) 1.0 (* f0-3 (seconds-per-frame)))
|
||||
)
|
||||
(get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-u) 'interp)
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(displacement-between-points-at-percent-normalized! (-> self path) gp-1 (-> self path-u))
|
||||
(forward-up-nopitch->quaternion (-> self root quat) gp-1 *y-vector*)
|
||||
)
|
||||
(debug-draw (-> self path))
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate die (pecker-ingame)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(cleanup-for-death self)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this pecker-ingame) (arg0 entity-actor))
|
||||
(let ((v1-1 (res-lump-value arg0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)))
|
||||
(cond
|
||||
((zero? v1-1)
|
||||
(when (task-node-closed? (game-task-node comb-travel-resolution))
|
||||
(cleanup-for-death this)
|
||||
(deactivate this)
|
||||
)
|
||||
)
|
||||
((= (the-as uint v1-1) 1)
|
||||
(when (task-node-closed? (game-task-node mine-explore-introduction))
|
||||
(cleanup-for-death this)
|
||||
(deactivate this)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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-pecker-ingame" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> this draw light-index) (the-as uint 30))
|
||||
(logior! (-> this skel status) (joint-control-status eye-anim))
|
||||
(set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0))
|
||||
(set! (-> this path-u) 0.0)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
@@ -7,3 +7,149 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype railx-states (structure)
|
||||
((pulses pulse-state 6 :inline)
|
||||
(blue pulse-state :inline :overlay-at (-> pulses 0))
|
||||
(yellow pulse-state :inline :overlay-at (-> pulses 1))
|
||||
(warp pulse-state :inline :overlay-at (-> pulses 2))
|
||||
(spill pulse-state :inline :overlay-at (-> pulses 3))
|
||||
(egg pulse-state :inline :overlay-at (-> pulses 4))
|
||||
(transform pulse-state :inline :overlay-at (-> pulses 5))
|
||||
(flicker float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch vector vs float.
|
||||
(defun init-mood-railx ((arg0 mood-context))
|
||||
(-> arg0 state)
|
||||
(set-vector! (-> arg0 times 1) 0.0 0.5 1.0 1.0)
|
||||
(let ((v0-0 (-> arg0 times 2)))
|
||||
(set! (-> v0-0 x) 1.0)
|
||||
(set! (-> v0-0 y) 1.0)
|
||||
(set! (-> v0-0 z) 0.5)
|
||||
(set! (-> v0-0 w) 1.0)
|
||||
(the-as float v0-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun update-railx-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set! (-> v1-0 fog-color x) 0.0)
|
||||
(set! (-> v1-0 fog-color y) 0.0)
|
||||
(set! (-> v1-0 fog-color z) 0.0)
|
||||
(set! (-> v1-0 fog-color w) 128.0)
|
||||
)
|
||||
(set! (-> arg0 current-fog fog-dists x) 819200.0)
|
||||
(set! (-> arg0 current-fog fog-dists y) 1392640.0)
|
||||
(set! (-> arg0 current-fog fog-dists w) 128.0)
|
||||
(set! (-> arg0 current-fog fog-dists z) 255.0)
|
||||
(let ((s1-0 (-> arg0 light-group))
|
||||
(gp-0 (-> arg0 light-group 1))
|
||||
)
|
||||
(let ((s4-0 (new 'static 'vector :z 1.0))
|
||||
(s2-0 (new 'static 'vector :x 1.0 :y 1.0))
|
||||
(s3-0 (the-as object (-> arg0 state)))
|
||||
(s5-0 (-> *math-camera* inv-camera-rot))
|
||||
)
|
||||
(vector-float*!
|
||||
(the-as vector (-> s1-0 0 ambi color))
|
||||
s4-0
|
||||
(fmax 0.333 (-> (the-as railx-states s3-0) blue brightness))
|
||||
)
|
||||
(vector+float*!
|
||||
(the-as vector (-> s1-0 0 ambi color))
|
||||
(the-as vector (-> s1-0 0 ambi color))
|
||||
s2-0
|
||||
(fmax 0.333 (-> (the-as railx-states s3-0) yellow brightness))
|
||||
)
|
||||
(set! (-> s1-0 0 dir0 color quad) (-> s1-0 0 ambi color quad))
|
||||
(set! (-> s1-0 0 dir1 color quad) (-> s1-0 0 ambi color quad))
|
||||
(let ((a1-3 (new 'static 'vector :x 0.834 :y 0.4815 :z 0.2691))
|
||||
(s0-0 (new 'static 'vector :x -0.8451 :y -0.2182 :z -0.488))
|
||||
)
|
||||
(vector-matrix*! (the-as vector (-> s1-0 0)) a1-3 s5-0)
|
||||
(vector-matrix*! (the-as vector (-> s1-0 0 dir1)) s0-0 s5-0)
|
||||
)
|
||||
(set! (-> s1-0 0 ambi extra x) 0.2)
|
||||
(set! (-> s1-0 0 dir0 extra x) 0.8)
|
||||
(set! (-> s1-0 0 dir1 extra x) 0.8)
|
||||
(set! (-> s1-0 0 dir2 extra x) 0.0)
|
||||
(vector-float*! (the-as vector (-> gp-0 ambi color)) s4-0 (-> (the-as railx-states s3-0) blue brightness))
|
||||
(vector+float*!
|
||||
(the-as vector (-> gp-0 ambi color))
|
||||
(the-as vector (-> gp-0 ambi color))
|
||||
s2-0
|
||||
(* 0.5 (-> (the-as railx-states s3-0) yellow brightness))
|
||||
)
|
||||
(vector-float*! (the-as vector (-> gp-0 dir0 color)) s4-0 (-> (the-as railx-states s3-0) blue brightness))
|
||||
(set! (-> gp-0 dir1 color quad) (-> gp-0 ambi color quad))
|
||||
(let ((a1-6 (new 'static 'vector :x 0.44725248 :y 0.77455187 :z 0.44725248))
|
||||
(s4-1 (new 'static 'vector :x -0.44725248 :y -0.77455187 :z -0.44725248))
|
||||
)
|
||||
(vector-matrix*! (the-as vector (-> gp-0 dir0)) a1-6 s5-0)
|
||||
(vector-matrix*! (the-as vector (-> gp-0 dir1)) s4-1 s5-0)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 ambi extra x) 0.2)
|
||||
(set! (-> gp-0 dir0 extra x) 0.5)
|
||||
(set! (-> gp-0 dir1 extra x) 0.4)
|
||||
(set! (-> gp-0 dir2 extra x) 0.0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior update-mood-railx time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-interior arg0 #f)
|
||||
(update-railx-lights arg0)
|
||||
(cond
|
||||
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
||||
(palette-select-special arg0)
|
||||
)
|
||||
(else
|
||||
(let ((gp-0 (the-as object (-> arg0 state))))
|
||||
(set! (-> arg0 times 0 w) 1.0)
|
||||
(update-mood-pulse arg0 1 0 0.0 1.0 0.0 0.0)
|
||||
(update-mood-pulse arg0 2 16 0.0 1.0 0.0 0.0)
|
||||
(update-mood-pulse arg0 3 32 0.875 0.125 (* 65536.0 (seconds-per-frame)) 0.0)
|
||||
(update-mood-pulse arg0 4 48 0.0 1.0 0.0 0.0)
|
||||
(set! (-> arg0 times 5 w) (if (< 36408.89 (-> (the-as railx-states gp-0) flicker))
|
||||
0.475
|
||||
0.55
|
||||
)
|
||||
)
|
||||
(update-mood-pulse arg0 6 64 0.0 1.0 0.0 0.0)
|
||||
(update-mood-pulse arg0 7 80 0.0 1.0 0.0 0.0)
|
||||
(when (not (paused?))
|
||||
(let ((f0-6 (+ (-> (the-as railx-states gp-0) flicker) (* 393216.0 (seconds-per-frame)))))
|
||||
(set! (-> (the-as railx-states gp-0) flicker) (- f0-6 (* (the float (the int (/ f0-6 65536.0))) 65536.0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun set-railx-light-brightness! ((arg0 int) (arg1 float) (arg2 float))
|
||||
(let ((v1-1 (level-get *level* 'railx)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as railx-states v1-2) pulses arg0 target-brightness) arg1)
|
||||
(set! (-> (the-as railx-states (+ (the-as uint v1-2) (* arg0 16))) blue speed) arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (level-get *level* 'railcst)))
|
||||
(when v1-5
|
||||
(let ((v1-6 (the-as object (-> v1-5 mood-context state))))
|
||||
(set! (-> (the-as railx-states v1-6) pulses arg0 target-brightness) arg1)
|
||||
(set! (-> (the-as railx-states (+ (the-as uint v1-6) (* arg0 16))) blue speed) arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,590 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype rail-warp-gate (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-rail-warp-gate rail-warp-gate rail-warp-gate-lod0-jg rail-warp-gate-idle-ja
|
||||
((rail-warp-gate-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 125)
|
||||
)
|
||||
|
||||
(defstate idle (rail-warp-gate)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! rail-warp-gate-idle-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this rail-warp-gate) (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-rail-warp-gate" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(set! (-> this draw light-index) (the-as uint 11))
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-big-yellow-glow
|
||||
:id 1259
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4266 :flags (sp6)) (sp-item 4267 :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4266
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 20) (meters 1))
|
||||
(:rot-x (degrees 45))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 45011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 36864.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4267
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 40) (meters 0.1))
|
||||
(:rot-x (degrees 45))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 0.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 45011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 36864.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-medium-yellow-glow
|
||||
:id 1260
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4268 :flags (sp6)) (sp-item 4269 :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4268
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 10) (meters 1))
|
||||
(:rot-x (degrees 45))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 45011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 36864.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4269
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 25) (meters 0.1))
|
||||
(:rot-x (degrees 45))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 0.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 45011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 36864.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-small-yellow-glow
|
||||
:id 1261
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4270 :flags (sp6)) (sp-item 4271 :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4270
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 6) (meters 1))
|
||||
(:rot-x (degrees 45))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 45011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 36864.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4271
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 18) (meters 0.1))
|
||||
(:rot-x (degrees 45))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 0.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 45011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 36864.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-pedestal-blue-glow
|
||||
:id 1262
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4272 :flags (sp6)) (sp-item 4273 :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4272
|
||||
:init-specs ((:texture (ring level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 0.0)
|
||||
(:b 128.0)
|
||||
(:a 5.0 1.0)
|
||||
(:omega (degrees 9011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 1638.4)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4273
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.5) (meters 0.1))
|
||||
(:rot-x (degrees 2.25))
|
||||
(:rot-z (degrees -17))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 64.0)
|
||||
(:g 64.0)
|
||||
(:b 255.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 9011.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-yellowoval
|
||||
:id 1263
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4274 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4274
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-blueoval
|
||||
:id 1264
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4275 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4275
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1.2) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 80.0)
|
||||
(:g 128.0)
|
||||
(:b 255.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-yellowled
|
||||
:id 1265
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4276 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4276
|
||||
:init-specs ((:texture (radial-gradient-yellow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.6) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-blueled
|
||||
:id 1266
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4277 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4277
|
||||
:init-specs ((:texture (radial-gradient level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.5) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-yellowledglow
|
||||
:id 1267
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4278 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4278
|
||||
:init-specs ((:texture (radial-gradient-yellow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1.2) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 128.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-rimlight
|
||||
:id 1268
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4279 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4279
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 3) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 0.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-orbblueglow
|
||||
:id 1269
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4280 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4280
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 0.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-yellowstrip
|
||||
:id 1270
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4281 :fade-after (meters 120) :flags (sp6)))
|
||||
)
|
||||
|
||||
(defpart 4281
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1) (meters 0.1))
|
||||
(:rot-x (degrees 9))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 80.0)
|
||||
(:b 0.0)
|
||||
(:a 40.0 10.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:userdata 819.2)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-bigscreen
|
||||
:id 1271
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4282 :flags (is-3d sp7)) (sp-item 4283 :flags (is-3d sp7)) (sp-item 4284 :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 4282
|
||||
:init-specs ((:texture (green-lightning level-default-sprite))
|
||||
(:num 0.5)
|
||||
(:x (meters -4.5) (meters 8.5))
|
||||
(:y (meters -0.2))
|
||||
(:z (meters -1))
|
||||
(:scale-x (meters 0.3) (meters 0.5))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 90))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 4.6))
|
||||
(:r 128.0)
|
||||
(:g 40.0)
|
||||
(:b 20.0)
|
||||
(:a 0.0)
|
||||
(:fade-a 0.32 0.32)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:next-time (seconds 0.167))
|
||||
(:next-launcher 4285)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4285
|
||||
:init-specs ((:fade-a -0.128 -0.128))
|
||||
)
|
||||
|
||||
(defpart 4283
|
||||
:init-specs ((:texture (radial-gradient-yellow level-default-sprite))
|
||||
(:num 0.05)
|
||||
(:x (meters -4.8))
|
||||
(:y (meters 1) 6 (meters -0.5))
|
||||
(:z (meters -1))
|
||||
(:scale-x (meters 1.2))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 90))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 0.35))
|
||||
(:r 200.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:vel-x (meters 0.008))
|
||||
(:timer (seconds 4))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4284
|
||||
:init-specs ((:texture (glow-hotdot level-default-sprite))
|
||||
(:num 0.1)
|
||||
(:x (meters -4.8))
|
||||
(:y (meters 1.5) 11 (meters -0.3))
|
||||
(:z (meters -1))
|
||||
(:scale-x (meters 0.3))
|
||||
(:rot-x (degrees 90))
|
||||
(:rot-y (degrees 90))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 1))
|
||||
(:r 128.0)
|
||||
(:g 32.0 64.0)
|
||||
(:b 0.0)
|
||||
(:a 64.0)
|
||||
(:vel-x (meters 0.004))
|
||||
(:timer (seconds 8))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-mediumscreen
|
||||
:id 1272
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4286 :flags (is-3d sp7)) (sp-item 4287 :flags (is-3d sp7)))
|
||||
)
|
||||
|
||||
(defpart 4286
|
||||
:init-specs ((:texture (laser-hit level-default-sprite))
|
||||
(:num 0.5)
|
||||
(:scale-x (meters 0.8) 2 (meters 1.2))
|
||||
(:rot-x (degrees 0) 3 (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 50.0)
|
||||
(:b 128.0)
|
||||
(:a 128.0)
|
||||
(:rotvel-y (degrees -0.16666667) 1 (degrees 0.33333334))
|
||||
(:timer (seconds 0.5))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 4287
|
||||
:init-specs ((:texture (green-lightning level-default-sprite))
|
||||
(:num 0.015)
|
||||
(:y (meters 1.5))
|
||||
(:scale-x (meters 0.3) (meters 0.5))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters 3.4))
|
||||
(:r 0.0)
|
||||
(:g 50.0)
|
||||
(:b 128.0)
|
||||
(:a 32.0)
|
||||
(:vel-y (meters -0.01))
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-smallscreen
|
||||
:id 1273
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4288 :flags (is-3d sp7)))
|
||||
)
|
||||
|
||||
(defpart 4288
|
||||
:init-specs ((:texture (laser-hit-rim level-default-sprite))
|
||||
(:num 0.1)
|
||||
(:scale-x (meters 1.2))
|
||||
(:rot-x (degrees 0) 3 (degrees 90))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 0.0 2.0 128.0)
|
||||
(:a 128.0)
|
||||
(:scalevel-x (meters -0.0033333334))
|
||||
(:rotvel-y (degrees -1) (degrees 2))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:timer (seconds 2))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-combx-capsulescreen
|
||||
:id 1274
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 4289 :flags (is-3d sp6 sp7)))
|
||||
)
|
||||
|
||||
(defpart 4289
|
||||
:init-specs ((:texture (static1 level-default-sprite))
|
||||
(:birth-func 'spt-birth-func-capsulescreen)
|
||||
(:num 20.0)
|
||||
(:x (meters 0.1))
|
||||
(:y (meters -0.2) (meters 0.4))
|
||||
(:z (meters -0.7) (meters 1.4))
|
||||
(:scale-x (meters 1))
|
||||
(:rot-x (degrees 0) 1 (degrees 180))
|
||||
(:rot-y (degrees 0))
|
||||
(:rot-z (degrees 90))
|
||||
(:scale-y (meters -2) 1 (meters 4))
|
||||
(:r 30.0)
|
||||
(:g 64.0 64.0)
|
||||
(:b 128.0)
|
||||
(:a 8.0 100.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x404a00 #x40b000 #x40b100))
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defun spt-birth-func-capsulescreen ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 object) (arg3 object) (arg4 object))
|
||||
(birth-func-texture-group (the-as int arg0) arg1 (the-as sparticle-launchinfo arg2))
|
||||
(birth-func-flip-based-on-scale
|
||||
arg0
|
||||
arg1
|
||||
(the-as sprite-vec-data-3d arg2)
|
||||
(the-as sparticle-launcher arg3)
|
||||
(the-as sparticle-launch-state arg4)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,245 @@
|
||||
;; name in dgo: ai-task-h
|
||||
;; dgos: DESOASIS
|
||||
|
||||
(declare-type ai-task-pool basic)
|
||||
(declare-type bot nav-enemy)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype ai-task (basic)
|
||||
((next ai-task)
|
||||
(prev ai-task)
|
||||
(pool ai-task-pool)
|
||||
(unique-id uint32)
|
||||
(bytes int8 16 :offset 32)
|
||||
)
|
||||
(:methods
|
||||
(reset-task! (_type_) none)
|
||||
(ai-task-method-10 (_type_ bot) none)
|
||||
(ai-task-method-11 (_type_ bot) object)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ai-task-pool (basic)
|
||||
((anchor ai-task)
|
||||
(tasks (pointer uint32))
|
||||
(tasks-length uint32)
|
||||
(unique-id uint32)
|
||||
)
|
||||
(:methods
|
||||
(assign-ids! (_type_ type) ai-task)
|
||||
(set-next-task! (_type_ ai-task) ai-task)
|
||||
(ai-task-pool-method-11 (_type_) ai-task)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ai-task-control (basic)
|
||||
((anchor ai-task)
|
||||
(pool ai-task-pool)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type ai-task-pool) _type_)
|
||||
(ai-task-control-method-9 (_type_) symbol)
|
||||
(ai-task-control-method-10 (_type_ bot) none)
|
||||
(get-task-by-type (_type_ type bot) ai-task)
|
||||
(ai-task-control-method-12 (_type_ bot) symbol)
|
||||
(ai-task-control-method-13 (_type_ ai-task bot) ai-task)
|
||||
(ai-task-control-method-14 (_type_ ai-task bot) none)
|
||||
(init-task! (_type_ type bot) ai-task)
|
||||
(set-next-task-for-pool! (_type_ ai-task) none)
|
||||
(set-next-task! (_type_ ai-task) ai-task)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod ai-task-method-11 ((this ai-task) (arg0 bot))
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod ai-task-method-10 ((this ai-task) (arg0 bot))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod reset-task! ((this ai-task))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer uint32) vs ai-task.
|
||||
(defmethod ai-task-pool-method-11 ((this ai-task-pool))
|
||||
(set! (-> this unique-id) (the-as uint 0))
|
||||
(let ((t0-0 (the-as (pointer uint32) #f))
|
||||
(a1-0 (the-as (pointer uint32) #f))
|
||||
(v1-0 (-> this tasks))
|
||||
)
|
||||
(let ((a2-0 (-> this tasks-length)))
|
||||
(dotimes (a3-0 (the-as int a2-0))
|
||||
(set! a1-0 (&+ v1-0 (* 48 a3-0)))
|
||||
(set! (-> a1-0 2) (the-as uint this))
|
||||
(set! (-> a1-0 3) (the-as uint 0))
|
||||
(set! (-> a1-0 1) (the-as uint t0-0))
|
||||
(if t0-0
|
||||
(set! (-> t0-0 0) (the-as uint a1-0))
|
||||
)
|
||||
(set! t0-0 a1-0)
|
||||
)
|
||||
)
|
||||
(set! (-> a1-0 0) (the-as uint #f))
|
||||
(let ((v0-0 (&-> v1-0 0)))
|
||||
(set! (-> this anchor) (the-as ai-task v0-0))
|
||||
(the-as ai-task v0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod assign-ids! ((this ai-task-pool) (arg0 type))
|
||||
(let ((v1-1 (-> this anchor next)))
|
||||
(when v1-1
|
||||
(let ((a2-0 (-> v1-1 prev))
|
||||
(a3-0 (-> v1-1 next))
|
||||
)
|
||||
(set! (-> v1-1 prev) #f)
|
||||
(set! (-> v1-1 next) #f)
|
||||
(let ((t0-1 (the-as int (+ (-> this unique-id) 1))))
|
||||
(if (zero? (the-as uint t0-1))
|
||||
(set! t0-1 1)
|
||||
)
|
||||
(set! (-> this unique-id) (the-as uint t0-1))
|
||||
(set! (-> v1-1 unique-id) (the-as uint t0-1))
|
||||
)
|
||||
(set! (-> a2-0 next) a3-0)
|
||||
(if a3-0
|
||||
(set! (-> a3-0 prev) a2-0)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-1 type) arg0)
|
||||
v1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod set-next-task! ((this ai-task-pool) (arg0 ai-task))
|
||||
(let* ((v1-0 (-> this anchor))
|
||||
(v0-0 (-> v1-0 next))
|
||||
)
|
||||
(set! (-> v1-0 next) arg0)
|
||||
(set! (-> arg0 prev) v1-0)
|
||||
(set! (-> arg0 next) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod new ai-task-control ((allocation symbol) (type-to-make type) (arg0 ai-task-pool))
|
||||
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> s5-0 pool) arg0)
|
||||
(set! (-> s5-0 anchor) (assign-ids! arg0 ai-task))
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ai-task-control-method-12 ((this ai-task-control) (arg0 bot))
|
||||
(let ((gp-0 (-> this anchor)))
|
||||
(let ((s3-0 (-> this anchor next)))
|
||||
(while s3-0
|
||||
(let ((s4-0 (-> s3-0 next)))
|
||||
(if arg0
|
||||
(ai-task-method-10 s3-0 arg0)
|
||||
)
|
||||
(set-next-task! (-> s3-0 pool) s3-0)
|
||||
(set! s3-0 s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 prev) #f)
|
||||
(set! (-> gp-0 next) #f)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod ai-task-control-method-9 ((this ai-task-control))
|
||||
(ai-task-control-method-12 this (the-as bot #f))
|
||||
(let ((a1-1 (-> this anchor)))
|
||||
(when a1-1
|
||||
(set-next-task! (-> a1-1 pool) a1-1)
|
||||
(set! (-> this anchor) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod init-task! ((this ai-task-control) (arg0 type) (arg1 bot))
|
||||
(let ((s5-0 (assign-ids! (-> this pool) arg0)))
|
||||
(if s5-0
|
||||
(reset-task! s5-0)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod set-next-task! ((this ai-task-control) (arg0 ai-task))
|
||||
(let* ((v1-0 (-> this anchor))
|
||||
(a0-1 (-> v1-0 next))
|
||||
)
|
||||
(set! (-> v1-0 next) arg0)
|
||||
(set! (-> arg0 prev) v1-0)
|
||||
(set! (-> arg0 next) a0-1)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch ai-task vs none.
|
||||
(defmethod set-next-task-for-pool! ((this ai-task-control) (arg0 ai-task))
|
||||
(set-next-task! (-> this pool) arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-task-by-type ((this ai-task-control) (arg0 type) (arg1 bot))
|
||||
(let ((s5-0 (init-task! this arg0 arg1)))
|
||||
(if s5-0
|
||||
(set-next-task! this s5-0)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ai-task-control-method-13 ((this ai-task-control) (arg0 ai-task) (arg1 bot))
|
||||
(let ((gp-0 (-> arg0 prev))
|
||||
(s5-0 (-> arg0 next))
|
||||
)
|
||||
(if arg1
|
||||
(ai-task-method-10 arg0 arg1)
|
||||
)
|
||||
(set-next-task! (-> this pool) arg0)
|
||||
(if gp-0
|
||||
(set! (-> gp-0 next) s5-0)
|
||||
)
|
||||
(if s5-0
|
||||
(set! (-> s5-0 prev) gp-0)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod ai-task-control-method-10 ((this ai-task-control) (arg0 bot))
|
||||
(let ((a0-1 (-> this anchor next)))
|
||||
(if a0-1
|
||||
(ai-task-method-11 a0-1 arg0)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod ai-task-control-method-14 ((this ai-task-control) (arg0 ai-task) (arg1 bot))
|
||||
(let ((a0-1 (ai-task-control-method-13 this arg0 arg1)))
|
||||
(if a0-1
|
||||
(ai-task-method-11 a0-1 arg1)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,71 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype ashelin-course (bot-course)
|
||||
((ouch-speeches bot-speech-list-shuffle)
|
||||
(victory-speeches bot-speech-list-shuffle)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ashelin (bot)
|
||||
((self ashelin :override)
|
||||
(course ashelin-course :override)
|
||||
(knocked-anim art-joint-anim)
|
||||
(travel-anim-interp float)
|
||||
(fired-gun-count uint32)
|
||||
(last-fire-time time-frame)
|
||||
(victory-speech-time time-frame)
|
||||
(frontline plane :inline)
|
||||
)
|
||||
(:state-methods
|
||||
back-spring
|
||||
cartwheel-left
|
||||
tumble-right
|
||||
chase
|
||||
traveling
|
||||
traveling-blocked
|
||||
waiting-idle
|
||||
standing-idle
|
||||
standing-turn
|
||||
standing-blast
|
||||
)
|
||||
(:methods
|
||||
(ashelin-method-247 (_type_ symbol) symbol)
|
||||
(ashelin-method-248 (_type_ vector float float float float) symbol)
|
||||
(fire-shot (_type_ vector) (pointer process))
|
||||
(ashelin-method-250 (_type_ symbol symbol) symbol)
|
||||
(go-dodge-state (_type_ int) object)
|
||||
(ashelin-method-252 (_type_) int)
|
||||
(ashelin-method-253 (_type_) int)
|
||||
(ashelin-method-254 (_type_ float) none)
|
||||
(ashelin-method-255 (_type_) none)
|
||||
(ashelin-method-256 (_type_) none)
|
||||
(ashelin-method-257 (_type_) int)
|
||||
(ashelin-method-258 (_type_) symbol)
|
||||
(ashelin-method-259 (_type_) none)
|
||||
(ashelin-method-260 (_type_) int)
|
||||
(ashelin-method-261 (_type_ symbol) penetrate)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-ashelin ashelin ashelin-lod0-jg ashelin-idle0-ja
|
||||
((ashelin-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 2.7)
|
||||
:shadow ashelin-shadow-mg
|
||||
:origin-joint-index 13
|
||||
)
|
||||
|
||||
(deftype asht-wait-spot (ai-task)
|
||||
((check-done (function asht-wait-spot ashelin symbol) :overlay-at (-> bytes 0))
|
||||
(which-spot int8 :overlay-at (-> bytes 4))
|
||||
(num-spots uint8 :overlay-at (-> bytes 5))
|
||||
(spot-indexes uint8 6 :overlay-at (-> bytes 6))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype asht-fight-focus (ai-task)
|
||||
()
|
||||
)
|
||||
|
||||
@@ -7,3 +7,455 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpart 900
|
||||
:init-specs ((:texture (gun-yellow-beam level-default-sprite))
|
||||
(:birth-func 'birth-func-set-quat)
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.75))
|
||||
(:scale-y (meters 10))
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 32.0 64.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 901
|
||||
:init-specs ((:texture (starflash level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1) (meters 3))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 64.0 32.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 902
|
||||
:init-specs ((:texture (explosion-edge level-default-sprite))
|
||||
(:num 1.5)
|
||||
(:scale-x (meters 0.5) (meters 0.5))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 16.0 32.0)
|
||||
(:scalevel-x (meters 0.013333334) (meters 0.006666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -1.28)
|
||||
(:fade-b -1.28)
|
||||
(:fade-a -0.48)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 903
|
||||
:init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite))
|
||||
(:birth-func 'birth-func-set-quat)
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 2))
|
||||
(:scale-y (meters 4.5))
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 128.0)
|
||||
(:fade-a -3.6571429)
|
||||
(:timer (seconds 0.117))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-ashelin-shot-hit
|
||||
:id 222
|
||||
:duration (seconds 1)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 904 :period (seconds 2) :length (seconds 0.017))
|
||||
(sp-item 905 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017))
|
||||
(sp-item 906 :period (seconds 2) :length (seconds 0.017))
|
||||
(sp-item 907 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.667))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.667))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.5))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.417))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.335))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.25))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.217))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.167))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.135))
|
||||
(sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.085))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 907
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 0.0 0.2)
|
||||
(:y (meters 0.25))
|
||||
(:scale-x (meters 0.2) (meters 0.2))
|
||||
(:rot-x 4)
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0 8.0)
|
||||
(:b 32.0 8.0)
|
||||
(:a 32.0 64.0)
|
||||
(:vel-y (meters 0.06666667) (meters 0.013333334))
|
||||
(:scalevel-x (meters -0.001) (meters -0.00033333333))
|
||||
(:rotvel-z (degrees -2.4) 1 (degrees 4.8))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -0.10666667)
|
||||
(:fade-b -0.10666667)
|
||||
(:accel-y (meters -0.00033333333) (meters -0.0013333333))
|
||||
(:friction 0.9)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.667))
|
||||
(:next-launcher 909)
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:conerot-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 908
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 0.5)
|
||||
(:scale-x (meters 0.5) (meters 0.3))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0 8.0)
|
||||
(:b 32.0 8.0)
|
||||
(:a 96.0)
|
||||
(:vel-y (meters 0.006666667) (meters 0.013333334))
|
||||
(:scalevel-x (meters -0.0005) (meters -0.0005))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -0.10666667)
|
||||
(:fade-b -0.10666667)
|
||||
(:accel-y (meters -0.00033333333) (meters -0.0013333333))
|
||||
(:friction 0.8)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.667))
|
||||
(:next-launcher 909)
|
||||
(:conerot-x (degrees 0) (degrees 180))
|
||||
(:conerot-y (degrees 0) (degrees 360))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 909
|
||||
:init-specs ((:fade-a -0.96))
|
||||
)
|
||||
|
||||
(defpart 905
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 5) (meters 0.1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0 8.0)
|
||||
(:b 32.0 8.0)
|
||||
(:a 128.0)
|
||||
(:rotvel-z (degrees -0.1))
|
||||
(:fade-a -0.32)
|
||||
(:timer (seconds 1.335))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.035))
|
||||
(:next-launcher 910)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 910
|
||||
:init-specs ((:scale-x (meters 2) (meters 0.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0 8.0)
|
||||
(:b 32.0 8.0)
|
||||
(:next-time (seconds 0.017))
|
||||
(:next-launcher 910)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 906
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 2.0)
|
||||
(:scale-x (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0 8.0)
|
||||
(:b 32.0 8.0)
|
||||
(:a 48.0)
|
||||
(:scalevel-x (meters 0.12857144))
|
||||
(:rotvel-z (degrees -0.3) (degrees 0.6))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -0.9142857)
|
||||
(:fade-b -0.9142857)
|
||||
(:timer (seconds 1.335))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.117))
|
||||
(:next-launcher 911)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 911
|
||||
:init-specs ((:scale-x (meters 4.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:scalevel-x (meters -0.010958904))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-g -0.38356164)
|
||||
(:fade-b 0.0)
|
||||
(:fade-a -0.13150685)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 904
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 255.0)
|
||||
(:a 96.0)
|
||||
(:scalevel-x (meters 0.16666667))
|
||||
(:rotvel-z (degrees 0.3))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:timer (seconds 0.185))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
||||
(:next-time (seconds 0.05))
|
||||
(:next-launcher 912)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 912
|
||||
:init-specs ((:scale-x (meters 3.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:scalevel-x (meters -0.0875))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-b -6.4)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype ashelin-shot (projectile)
|
||||
((parent (pointer ashelin) :override)
|
||||
(tail-pos vector :inline)
|
||||
(hit-pos vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod projectile-method-24 ((this ashelin-shot))
|
||||
(draw-beam (-> *part-id-table* 903) (-> this tail-pos) (-> this starting-dir) #f)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod projectile-method-25 ((this ashelin-shot))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((v1-1 (-> this root trans))
|
||||
(a1-0 (-> this tail-pos))
|
||||
(s5-1 (vector-! (new 'stack-no-clear 'vector) v1-1 a1-0))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((v1-2 a1-0))
|
||||
(let ((a0-2 s5-1))
|
||||
(let ((a2-1 0.8))
|
||||
(.mov vf7 a2-1)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-2 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-2 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 (&-> gp-0 quad) vf6)
|
||||
(let ((f30-0 (-> *part-id-table* 900 init-specs 4 initial-valuef)))
|
||||
(set! (-> *part-id-table* 900 init-specs 4 initial-valuef) (fmin f30-0 (vector-length s5-1)))
|
||||
(draw-beam (-> *part-id-table* 900) a1-0 s5-1 #f)
|
||||
(set! (-> *part-id-table* 900 init-specs 4 initial-valuef) f30-0)
|
||||
)
|
||||
(vector-normalize! s5-1 1.0)
|
||||
(launch-particles (-> *part-id-table* 901) gp-0)
|
||||
(let ((f0-4 (vector-dot s5-1 (-> (camera-matrix) fvec))))
|
||||
(when (< 0.0 f0-4)
|
||||
(let ((f0-5 (* f0-4 f0-4))
|
||||
(f30-1 (-> *part-id-table* 902 init-specs 8 initial-valuef))
|
||||
(f28-0 (-> *part-id-table* 902 init-specs 8 random-rangef))
|
||||
)
|
||||
(set! (-> *part-id-table* 902 init-specs 8 initial-valuef) (* f30-1 f0-5))
|
||||
(set! (-> *part-id-table* 902 init-specs 8 random-rangef) (* f28-0 f0-5))
|
||||
(launch-particles (-> *part-id-table* 902) gp-0)
|
||||
(set! (-> *part-id-table* 902 init-specs 8 initial-valuef) f30-1)
|
||||
(set! (-> *part-id-table* 902 init-specs 8 random-rangef) f28-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod projectile-method-26 ((this ashelin-shot))
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 222 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 222))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 222))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod play-impact-sound ((this ashelin-shot) (arg0 projectile-options))
|
||||
(let ((v1-0 arg0))
|
||||
(cond
|
||||
((zero? v1-0)
|
||||
(sound-play "ashelin-fire")
|
||||
)
|
||||
((= v1-0 (projectile-options po0))
|
||||
(sound-play "ashelin-shot-hi")
|
||||
)
|
||||
((= v1-0 (projectile-options po0 po1))
|
||||
((method-of-type projectile play-impact-sound) this arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod made-impact? ((this ashelin-shot))
|
||||
(let ((v1-0 (-> this root))
|
||||
(t1-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(let ((a1-0 t1-0))
|
||||
(set! (-> a1-0 radius) (-> v1-0 root-prim prim-core world-sphere w))
|
||||
(set! (-> a1-0 collide-with) (-> v1-0 root-prim prim-core collide-with))
|
||||
(set! (-> a1-0 ignore-process0) this)
|
||||
(set! (-> a1-0 ignore-process1) (ppointer->process (-> this parent)))
|
||||
(set! (-> a1-0 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> a1-0 action-mask) (collide-action solid))
|
||||
)
|
||||
(fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0 t1-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defun ashelin-shot-move ((arg0 ashelin-shot))
|
||||
(projectile-move-fill-line-sphere arg0)
|
||||
(let ((s5-0 (-> arg0 root)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans))
|
||||
(let ((f0-0 (vector-length s4-0)))
|
||||
(when (< 40960.0 f0-0)
|
||||
(vector-normalize! s4-0 40960.0)
|
||||
(vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> s5-0 status) (collide-status touch-surface))
|
||||
(let ((v1-9 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0))
|
||||
(a1-5 (-> arg0 hit-pos))
|
||||
)
|
||||
(set! (-> a1-5 quad) (-> s5-0 trans quad))
|
||||
(vector+! a1-5 a1-5 v1-9)
|
||||
(move-to-point! (-> arg0 root) a1-5)
|
||||
)
|
||||
(go (method-of-object arg0 impact))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod setup-collision! ((this ashelin-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)
|
||||
(the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move)
|
||||
)
|
||||
(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 ((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 projectile))
|
||||
(set! (-> s4-0 prim-core collide-with)
|
||||
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
||||
)
|
||||
(set! (-> s4-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.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 projectile))
|
||||
(set! (-> v1-13 prim-core collide-with)
|
||||
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
||||
)
|
||||
(set! (-> v1-13 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2)
|
||||
)
|
||||
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
||||
(set! (-> v1-15 prim-core collide-as) (collide-spec projectile))
|
||||
(set! (-> v1-15 prim-core collide-with)
|
||||
(collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
||||
)
|
||||
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> 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)
|
||||
)
|
||||
(when (not (logtest? (-> (ppointer->process (-> this parent)) bot-flags) (bot-flag attacked)))
|
||||
(let* ((a0-17 (-> this root))
|
||||
(v1-27 (-> a0-17 root-prim))
|
||||
)
|
||||
(countdown (a0-18 (-> a0-17 total-prims))
|
||||
(logclear! (-> v1-27 prim-core collide-with) (collide-spec jak))
|
||||
(&+! v1-27 80)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-proj-settings! ((this ashelin-shot))
|
||||
(set! (-> this tail-pos quad) (-> this root trans quad))
|
||||
(set! (-> this attack-mode) 'eco-yellow)
|
||||
(set! (-> this max-speed) 307200.0)
|
||||
(set! (-> this move) ashelin-shot-move)
|
||||
(set! (-> this timeout) (seconds 1.335))
|
||||
(none)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,76 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod reset-task! ((this asht-wait-spot))
|
||||
(set! (-> this check-done) #f)
|
||||
(set! (-> this which-spot) -1)
|
||||
(set! (-> this num-spots) (the-as uint 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod ai-task-method-11 ((this asht-wait-spot) (arg0 bot))
|
||||
(let ((s4-0 (-> this which-spot)))
|
||||
(when (>= s4-0 0)
|
||||
(let ((s3-0 (-> arg0 course spots (-> this spot-indexes s4-0))))
|
||||
(if (and (not (outside-spot-radius? arg0 s3-0 (the-as vector #f) #f)) (player-blocking-spot? arg0 s3-0))
|
||||
(set! s4-0 -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< s4-0 0)
|
||||
(set! s4-0 (choose-spot arg0 (the-as int (-> this num-spots)) (-> this spot-indexes)))
|
||||
(set! (-> this which-spot) s4-0)
|
||||
(mem-copy!
|
||||
(the-as pointer (-> arg0 spot))
|
||||
(the-as pointer (-> arg0 course spots (-> this spot-indexes s4-0)))
|
||||
20
|
||||
)
|
||||
)
|
||||
(if (logtest? *display-bot-marks* (bot-marks-controls bmc16))
|
||||
(bot-method-198
|
||||
arg0
|
||||
(the-as int (-> this num-spots))
|
||||
(-> this spot-indexes)
|
||||
(the-as int (-> this spot-indexes s4-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not ((-> this check-done) this (the-as ashelin arg0)))
|
||||
(let ((a1-10 (handle->process (-> arg0 focus handle))))
|
||||
(when (and a1-10
|
||||
(attacked-by-player? arg0 (the-as process-focusable a1-10))
|
||||
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(get-task-by-type (-> arg0 ai-ctrl) asht-fight-focus arg0)
|
||||
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ai-task-method-11 ((this asht-fight-focus) (arg0 bot))
|
||||
(let ((a1-1 (handle->process (-> arg0 focus handle))))
|
||||
(cond
|
||||
((and a1-1
|
||||
(attacked-by-player? arg0 (the-as process-focusable a1-1))
|
||||
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(let ((v0-1 (the-as object (logior (-> arg0 bot-flags) (bot-flag bf00)))))
|
||||
(set! (-> arg0 bot-flags) (the-as bot-flag v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(ai-task-control-method-14 (-> arg0 ai-ctrl) this arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch bot-flag vs none.
|
||||
(defmethod ai-task-method-10 ((this asht-fight-focus) (arg0 bot))
|
||||
(logclear! (-> arg0 bot-flags) (bot-flag bf00))
|
||||
(none)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,732 @@
|
||||
;; name in dgo: bot-h
|
||||
;; dgos: DESOASIS
|
||||
|
||||
(declare-type bot-speech-list basic)
|
||||
(declare-type bot-speech-list-shuffle bot-speech-list)
|
||||
|
||||
;; +++bot-task-bits
|
||||
(defenum bot-task-bits
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(bb0)
|
||||
(bb1)
|
||||
(bb2)
|
||||
(bb3)
|
||||
(bb4)
|
||||
(bb5)
|
||||
(bb6)
|
||||
(bb7)
|
||||
)
|
||||
;; ---bot-task-bits
|
||||
|
||||
|
||||
;; +++bot-speech-info-flag
|
||||
(defenum bot-speech-info-flag
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(playing)
|
||||
(sf01)
|
||||
(sf02)
|
||||
(sf03)
|
||||
(sf04)
|
||||
(sf05)
|
||||
(sf06)
|
||||
(sf08)
|
||||
(sf09)
|
||||
(sf10)
|
||||
(sf11)
|
||||
(sf12)
|
||||
(sf13)
|
||||
(sf14)
|
||||
(sf15)
|
||||
)
|
||||
;; ---bot-speech-info-flag
|
||||
|
||||
|
||||
;; +++bot-flag
|
||||
(defenum bot-flag
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(bf00 0)
|
||||
(failed 1)
|
||||
(bf02 2)
|
||||
(bf03 3)
|
||||
(bf04 4)
|
||||
(bf05 5)
|
||||
(bf06 6)
|
||||
(attacked 7)
|
||||
(too-far-fail 8)
|
||||
(bf09 9)
|
||||
(bf10 10)
|
||||
(bf11 11)
|
||||
(bf12 12)
|
||||
(bf13 13)
|
||||
(bf14 14)
|
||||
(bf15 15)
|
||||
(bf16 16)
|
||||
(bf17 17)
|
||||
(bf18 18)
|
||||
(bf19 19)
|
||||
(bf20 20)
|
||||
(bf21 21)
|
||||
(bf22 22)
|
||||
(bf23 23)
|
||||
(bf24 24)
|
||||
(bf25 25)
|
||||
(bf26 26)
|
||||
(bf27 27)
|
||||
(bf28 28)
|
||||
(bf29 29)
|
||||
(bf30 30)
|
||||
(bf31 31)
|
||||
)
|
||||
;; ---bot-flag
|
||||
|
||||
|
||||
;; +++waypoint-bits
|
||||
(defenum waypoint-bits
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(wb0)
|
||||
(wb1)
|
||||
(wb2)
|
||||
(wb3)
|
||||
(wb4)
|
||||
(wb5)
|
||||
(wb6)
|
||||
(wb7)
|
||||
)
|
||||
;; ---waypoint-bits
|
||||
|
||||
|
||||
;; +++waypoint-bits-s32
|
||||
(defenum waypoint-bits-s32
|
||||
:bitfield #t
|
||||
:type int32
|
||||
:copy-entries waypoint-bits
|
||||
)
|
||||
;; ---waypoint-bits-s32
|
||||
|
||||
|
||||
;; +++bot-speech-list-flag
|
||||
(defenum bot-speech-list-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(bsl0 0)
|
||||
(bsl1 1)
|
||||
(bsl2 2)
|
||||
(bsl3 3)
|
||||
)
|
||||
;; ---bot-speech-list-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype bot-focus-info (structure)
|
||||
((max-los-dist float)
|
||||
(fproc process-focusable)
|
||||
(bullseye-xz-dist float)
|
||||
(ry-diff float)
|
||||
(my-facing-ry float)
|
||||
(bullseye-ry float)
|
||||
(los int8)
|
||||
(update-time time-frame)
|
||||
(bullseye vector :inline)
|
||||
(pos vector :inline)
|
||||
(my-facing-xz-dir vector :inline)
|
||||
(bullseye-xz-dir vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot-turn-info (structure)
|
||||
((facing-ry float)
|
||||
(targ-ry float)
|
||||
(ry-diff float)
|
||||
(predicted-ry-diff float)
|
||||
(predicted-targ-ry float)
|
||||
(facing-dir vector :inline)
|
||||
(targ-pos vector :inline)
|
||||
(predicted-targ-pos vector :inline)
|
||||
(src-quat quaternion :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot-speech-tuning (structure)
|
||||
((fo-min int32)
|
||||
(fo-max int32)
|
||||
(fo-curve int8)
|
||||
(trans? symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot-speech-info (structure)
|
||||
((flags bot-speech-info-flag)
|
||||
(hold-time uint16)
|
||||
(slave-id int8)
|
||||
(tuning-id int8)
|
||||
(name string)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot-spot (structure)
|
||||
((center vector :inline)
|
||||
(center-x float :overlay-at (-> center data 0))
|
||||
(center-y float :overlay-at (-> center data 1))
|
||||
(center-z float :overlay-at (-> center data 2))
|
||||
(inside-xz-dist float :overlay-at (-> center data 3))
|
||||
(blocked-xz-dist float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot-waypoint (basic)
|
||||
((waypoint-id int16)
|
||||
(nav-mesh-index int8)
|
||||
(skip-to int8)
|
||||
(on-set (function bot object))
|
||||
(on-update (function bot object))
|
||||
(on-skipping-here (function bot object))
|
||||
(check-too-far symbol)
|
||||
(warn-dist float)
|
||||
(fail-dist-delta float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot-course (basic)
|
||||
((course-id uint8)
|
||||
(speech-count uint16)
|
||||
(spot-count uint16)
|
||||
(retry-cookie uint8)
|
||||
(too-far-warn-speeches bot-speech-list-shuffle)
|
||||
(too-far-fail-speeches bot-speech-list)
|
||||
(attack-player-speeches bot-speech-list)
|
||||
(default-check-too-far symbol)
|
||||
(waypoints (array bot-waypoint))
|
||||
(speeches (inline-array bot-speech-info))
|
||||
(speech-tunings (inline-array bot-speech-tuning))
|
||||
(dirs (inline-array vector))
|
||||
(spots (inline-array bot-spot))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bot (nav-enemy)
|
||||
((bot-flags bot-flag)
|
||||
(min-speed float)
|
||||
(max-speed float)
|
||||
(follow-offset float)
|
||||
(too-far-warn-dist float)
|
||||
(too-far-fail-dist-delta float)
|
||||
(too-far-warn-dist-default float)
|
||||
(too-far-fail-dist-delta-default float)
|
||||
(travel-prev-ry float)
|
||||
(travel-prev-ry1 float)
|
||||
(player-blocking float)
|
||||
(ai-ctrl ai-task-control)
|
||||
(course bot-course)
|
||||
(waypoint bot-waypoint)
|
||||
(waypoint-bits waypoint-bits)
|
||||
(waypoint-int32a waypoint-bits-s32)
|
||||
(bot-task-bits bot-task-bits)
|
||||
(hit-invuln-ignore-me-delay uint32)
|
||||
(hit-invuln-focus-disable-delay uint32)
|
||||
(warn-to-fail-timeout uint32)
|
||||
(warn-min-delay uint32)
|
||||
(warn-max-delay uint32)
|
||||
(spot-color uint32)
|
||||
(waypoint-request int16)
|
||||
(hit-by-enemy-count uint16)
|
||||
(hit-by-player-count uint16)
|
||||
(notice-enemy-dist float)
|
||||
(channel gui-channel)
|
||||
(focus-mode int8)
|
||||
(nav-mesh-index int8)
|
||||
(delay-too-far-check int8)
|
||||
(slave-id int8)
|
||||
(vehicle-seat-index int8)
|
||||
(bot-health-index int8)
|
||||
(task game-task-control)
|
||||
(task-node game-task-node-info)
|
||||
(swivel-joint-mod joint-mod)
|
||||
(health-handle handle)
|
||||
(poi-handle handle)
|
||||
(my-simple-focus (pointer simple-focus))
|
||||
(attacker-handle handle)
|
||||
(scene-player-handle handle)
|
||||
(master-handle handle)
|
||||
(vehicle-handle handle)
|
||||
(hit-invuln-starting-time time-frame)
|
||||
(danger-time time-frame)
|
||||
(attacker-time time-frame)
|
||||
(started-warning-time time-frame)
|
||||
(waypoint-time0 time-frame)
|
||||
(next-too-far-warn-time time-frame)
|
||||
(spot bot-spot :inline)
|
||||
(follow-dir vector :inline)
|
||||
(focus-info bot-focus-info :inline)
|
||||
)
|
||||
(:state-methods
|
||||
failed
|
||||
hidden
|
||||
)
|
||||
(:methods
|
||||
(clear-poi (_type_) none)
|
||||
(bot-method-193 (_type_ vector vector vector vector vector float) none)
|
||||
(bot-method-194 (_type_ bot-turn-info process-focusable float) float)
|
||||
(alive? (_type_) symbol)
|
||||
(bot-method-196 (_type_) none)
|
||||
(debug-draw-spot (_type_ bot-spot rgba) symbol)
|
||||
(bot-method-198 (_type_ int (pointer uint8) int) symbol)
|
||||
(bot-method-199 (_type_) none)
|
||||
(scene-stop (_type_) symbol)
|
||||
(bot-method-201 (_type_) process)
|
||||
(bot-method-202 (_type_) symbol)
|
||||
(bot-method-203 (_type_) none)
|
||||
(bot-method-204 (_type_) none)
|
||||
(bot-method-205 (_type_) symbol)
|
||||
(outside-spot-radius? (_type_ bot-spot vector symbol) symbol)
|
||||
(attacked-by-player? (_type_ process-focusable) object)
|
||||
(set-fail-flag (_type_) none)
|
||||
(bot-method-209 (_type_) none)
|
||||
(set-cam-height (_type_ vector) float)
|
||||
(cam-move-to-bot (_type_) none)
|
||||
(bot-method-212 (_type_) none)
|
||||
(set-next-focus! (_type_ enemy enemy-best-focus) enemy)
|
||||
(choose-spot (_type_ int (pointer uint8)) int)
|
||||
(play-next-speech (_type_) gui-connection)
|
||||
(bot-method-216 (_type_) none)
|
||||
(scene-play (_type_ scene symbol) symbol)
|
||||
(play-speech-by-id (_type_ int) gui-connection)
|
||||
(play-speech-by-name (_type_ string) sound-id)
|
||||
(bot-method-220 (_type_) symbol)
|
||||
(channel-active? (_type_ gui-channel) symbol)
|
||||
(init-fields! (_type_) none)
|
||||
(bot-method-223 (_type_) none)
|
||||
(reset-warn-time (_type_) none)
|
||||
(go-to-waypoint! (_type_ int symbol) object)
|
||||
(bot-method-226 (_type_) object)
|
||||
(skip-waypoint (_type_) object)
|
||||
(bot-method-228 (_type_) none)
|
||||
(course-speech-ended? (_type_ int) symbol)
|
||||
(course-speech-playing? (_type_ int) symbol)
|
||||
(player-blocking-spot? (_type_ bot-spot) symbol)
|
||||
(bot-method-232 (_type_ gui-channel symbol) int)
|
||||
(bot-method-233 (_type_) quaternion)
|
||||
(bot-method-234 (_type_ vector) none)
|
||||
(bot-method-235 (_type_ symbol) none)
|
||||
(bot-check-too-far (_type_) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *bot-task-pool* (new 'static 'ai-task-pool
|
||||
:anchor #f
|
||||
:tasks (new 'static 'array uint32 240
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
)
|
||||
:tasks-length #x14
|
||||
)
|
||||
)
|
||||
|
||||
(ai-task-pool-method-11 *bot-task-pool*)
|
||||
|
||||
(deftype bot-speech-list (basic)
|
||||
((flags bot-speech-list-flag)
|
||||
(retry-cookie uint8)
|
||||
(last-local-index int16)
|
||||
(speech-indexes (array int16))
|
||||
)
|
||||
(:methods
|
||||
(get-next-speech-idx (_type_ bot (inline-array bot-speech-info) bot-speech-info-flag) int)
|
||||
(reset-index (_type_ symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod reset-index ((this bot-speech-list) (arg0 symbol))
|
||||
(if arg0
|
||||
(logclear! (-> this flags) (bot-speech-list-flag bsl0))
|
||||
)
|
||||
(set! (-> this last-local-index) -1)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod get-next-speech-idx ((this bot-speech-list) (arg0 bot) (arg1 (inline-array bot-speech-info)) (arg2 bot-speech-info-flag))
|
||||
(let ((v1-1 (-> arg0 course retry-cookie)))
|
||||
(when (!= v1-1 (-> this retry-cookie))
|
||||
(set! (-> this retry-cookie) (-> arg0 course retry-cookie))
|
||||
(reset-index this #t)
|
||||
)
|
||||
)
|
||||
(let ((s2-0 (-> this speech-indexes))
|
||||
(s1-0 (-> this last-local-index))
|
||||
)
|
||||
(when (< s1-0 0)
|
||||
(when (not (logtest? (-> this flags) (bot-speech-list-flag bsl0)))
|
||||
(logior! (-> this flags) (bot-speech-list-flag bsl0))
|
||||
(set! arg2 (logior arg2 (bot-speech-info-flag sf02)))
|
||||
)
|
||||
(reset-index this #f)
|
||||
(if (logtest? (-> this flags) (bot-speech-list-flag bsl2))
|
||||
(set! s1-0 (+ (rnd-int arg0 (-> s2-0 length)) -1))
|
||||
(set! s1-0 -1)
|
||||
)
|
||||
)
|
||||
(until #f
|
||||
(when (>= s1-0 (+ (-> s2-0 length) -1))
|
||||
(if (not (logtest? (-> this flags) (bot-speech-list-flag bsl1)))
|
||||
(goto cfg-23)
|
||||
)
|
||||
(reset-index this #f)
|
||||
(set! s1-0 -1)
|
||||
)
|
||||
(+! s1-0 1)
|
||||
(let* ((s0-0 (-> s2-0 s1-0))
|
||||
(v1-37 (-> arg1 s0-0 flags))
|
||||
)
|
||||
(when (and (not (logtest? arg2 v1-37))
|
||||
(or (not (logtest? v1-37 (bot-speech-info-flag sf11))) (not (course-speech-playing? arg0 s0-0)))
|
||||
)
|
||||
(set! (-> this last-local-index) s1-0)
|
||||
(return s0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
(label cfg-23)
|
||||
-1
|
||||
)
|
||||
|
||||
(deftype bot-speech-list-shuffle (bot-speech-list)
|
||||
((history-mask uint64)
|
||||
(history-mask-full uint64)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod reset-index ((this bot-speech-list-shuffle) (arg0 symbol))
|
||||
(let ((t9-0 (method-of-type bot-speech-list reset-index)))
|
||||
(t9-0 this arg0)
|
||||
)
|
||||
(set! (-> this history-mask) (the-as uint 0))
|
||||
(when (zero? (-> this history-mask-full))
|
||||
(let ((v0-2 0))
|
||||
(let ((v1-2 1))
|
||||
(countdown (a0-3 (-> this speech-indexes length))
|
||||
(set! v0-2 (logior v0-2 v1-2))
|
||||
(set! v1-2 (* v1-2 2))
|
||||
)
|
||||
)
|
||||
(set! (-> this history-mask-full) (the-as uint v0-2))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod get-next-speech-idx ((this bot-speech-list-shuffle) (arg0 bot) (arg1 (inline-array bot-speech-info)) (arg2 bot-speech-info-flag))
|
||||
(local-vars (sv-16 int))
|
||||
(let ((v1-1 (-> arg0 course retry-cookie)))
|
||||
(when (!= v1-1 (-> this retry-cookie))
|
||||
(set! (-> this retry-cookie) (-> arg0 course retry-cookie))
|
||||
(reset-index this #t)
|
||||
)
|
||||
)
|
||||
(set! sv-16 (-> this last-local-index))
|
||||
(when (< sv-16 0)
|
||||
(when (not (logtest? (-> this flags) (bot-speech-list-flag bsl0)))
|
||||
(logior! (-> this flags) (bot-speech-list-flag bsl0))
|
||||
(set! arg2 (logior arg2 (bot-speech-info-flag sf02)))
|
||||
)
|
||||
(reset-index this #f)
|
||||
)
|
||||
(let ((s2-0 0))
|
||||
(if (>= sv-16 0)
|
||||
(set! s2-0 (ash 1 sv-16))
|
||||
)
|
||||
(if (logtest? (-> this flags) (bot-speech-list-flag bsl3))
|
||||
(set! s2-0 (logior s2-0 (-> this history-mask)))
|
||||
)
|
||||
(until #f
|
||||
(when (and (= s2-0 (-> this history-mask-full)) (logtest? (-> this flags) (bot-speech-list-flag bsl3)))
|
||||
(if (not (logtest? (-> this flags) (bot-speech-list-flag bsl1)))
|
||||
(return -1)
|
||||
)
|
||||
(reset-index this #f)
|
||||
(if (>= sv-16 0)
|
||||
(set! s2-0 (ash 1 sv-16))
|
||||
(set! s2-0 0)
|
||||
)
|
||||
)
|
||||
(let* ((s1-0 (enemy-method-131 arg0 (-> this speech-indexes length) s2-0))
|
||||
(s0-0 (-> this speech-indexes s1-0))
|
||||
(v1-47 (-> arg1 s0-0 flags))
|
||||
)
|
||||
(set! s2-0 (logior s2-0 (ash 1 s1-0)))
|
||||
(when (and (not (logtest? arg2 v1-47))
|
||||
(or (not (logtest? v1-47 (bot-speech-info-flag sf11))) (not (course-speech-playing? arg0 s0-0)))
|
||||
)
|
||||
(set! (-> this last-local-index) s1-0)
|
||||
(logior! (-> this history-mask) (ash 1 s1-0))
|
||||
(return s0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
-1
|
||||
)
|
||||
|
||||
(deftype bot-course-table (basic)
|
||||
((course bot-course 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *bot-course-table* (new 'static 'bot-course-table))
|
||||
|
||||
@@ -7,3 +7,293 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate hit (bot)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type nav-enemy hit) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(bot-method-232 self (gui-channel none) #t)
|
||||
(bot-method-203 self)
|
||||
(logclear! (-> self bot-flags) (bot-flag bf11))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type nav-enemy hit) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(logior! (-> self bot-flags) (bot-flag bf11))
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-37 enemy-flag) (v1-39 enemy-flag) (v1-41 enemy-flag))
|
||||
(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 enemy-info hit-anim))
|
||||
:num! (seek! max f30-0)
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
)
|
||||
(let ((v1-36 (-> self enemy-flags)))
|
||||
(if (logtest? v1-36 (enemy-flag vulnerable-backup))
|
||||
(set! v1-37 (logior v1-36 (enemy-flag vulnerable)))
|
||||
(set! v1-37 (logclear v1-36 (enemy-flag vulnerable)))
|
||||
)
|
||||
)
|
||||
(set! (-> self enemy-flags) v1-37)
|
||||
(let ((v1-38 (-> self enemy-flags)))
|
||||
(if (logtest? v1-38 (enemy-flag attackable-backup))
|
||||
(set! v1-39 (logior v1-38 (enemy-flag attackable)))
|
||||
(set! v1-39 (logclear v1-38 (enemy-flag attackable)))
|
||||
)
|
||||
)
|
||||
(set! (-> self enemy-flags) v1-39)
|
||||
(let ((v1-40 (-> self enemy-flags)))
|
||||
(if (logtest? (enemy-flag trackable-backup) v1-40)
|
||||
(set! v1-41 (logior (enemy-flag trackable) v1-40))
|
||||
(set! v1-41 (logclear v1-40 (enemy-flag trackable)))
|
||||
)
|
||||
)
|
||||
(set! (-> self enemy-flags) v1-41)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
|
||||
(logclear! (-> self focus-status) (focus-status hit))
|
||||
(go-best-state self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate knocked (bot)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self enemy-flags) (enemy-flag victory))
|
||||
(bot-method-232 self (gui-channel none) #t)
|
||||
(if (and (logtest? (-> self bot-flags) (bot-flag attacked))
|
||||
(and (!= (-> self hit-points) 0.0) (zero? (-> self fated-time)))
|
||||
)
|
||||
(logior! (-> self bot-flags) (bot-flag bf12))
|
||||
)
|
||||
(bot-method-203 self)
|
||||
(when (= (-> self hit-points) 0.0)
|
||||
(set! (-> self hit-points) 1.0)
|
||||
(set-time! (-> self fated-time))
|
||||
)
|
||||
(logclear! (-> self bot-flags) (bot-flag bf11))
|
||||
(let ((t9-2 (-> (method-of-type nav-enemy knocked) enter)))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(let ((gp-0 (-> self incoming attack-id)))
|
||||
(let ((t9-0 (-> (method-of-type nav-enemy knocked) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(set! (-> self incoming attack-id) gp-0)
|
||||
)
|
||||
(logior! (-> self bot-flags) (bot-flag bf11))
|
||||
(logclear! (-> self bot-flags) (bot-flag bf12))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type nav-enemy knocked) trans)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self bot-flags) (bot-flag bf12)) (!= (-> self state-time) (current-time)))
|
||||
(logclear! (-> self bot-flags) (bot-flag bf12))
|
||||
(play-next-speech self)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate die-falling (bot)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type nav-enemy die-falling) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(kill-nearby-enemies (-> self root trans) 61440.0)
|
||||
(bot-method-232 self (gui-channel none) #f)
|
||||
(logclear! (-> self bot-flags) (bot-flag bf06 bf11))
|
||||
(set! (-> self delay-too-far-check) -1)
|
||||
(logior! (-> self root nav-flags) (nav-flags has-root-sphere))
|
||||
(bot-method-209 self)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logior! (-> self bot-flags) (bot-flag bf11))
|
||||
(logclear! (-> self bot-flags) (bot-flag bf13 bf14))
|
||||
(let ((t9-0 (-> (method-of-type nav-enemy die-falling) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-212 self)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(let ((gp-0 (-> self draw art-group data (if (falling? self)
|
||||
(-> self enemy-info die-falling-anim)
|
||||
(-> self enemy-info die-anim)
|
||||
)
|
||||
)
|
||||
)
|
||||
(f30-0 (rnd-float-range self 0.8 1.2))
|
||||
)
|
||||
(ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
(until (not (channel-active? self (gui-channel none)))
|
||||
(suspend)
|
||||
)
|
||||
(until #f
|
||||
(when (logtest? (-> self bot-flags) (bot-flag failed))
|
||||
(let ((a0-10 (res-lump-struct (-> self entity) 'task-name structure)))
|
||||
(when a0-10
|
||||
(let ((gp-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> gp-1 from) (process->ppointer self))
|
||||
(set! (-> gp-1 num-params) 0)
|
||||
(set! (-> gp-1 message) 'fail)
|
||||
(let ((s5-0 send-event-function)
|
||||
(v1-35 (-> *game-info* sub-task-list (task-node-index-by-name (the-as string a0-10))))
|
||||
)
|
||||
(s5-0
|
||||
(handle->process (if (-> v1-35 manager)
|
||||
(-> v1-35 manager manager)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
(defstate failed (bot)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
((-> (method-of-type bot die-falling) enter))
|
||||
(logclear! (-> self bot-flags) (bot-flag bf11))
|
||||
(when (logtest? (-> self bot-flags) (bot-flag failed))
|
||||
(let ((a0-1 (-> self course too-far-fail-speeches)))
|
||||
(when (and (nonzero? a0-1) a0-1)
|
||||
(let ((a1-1 (get-next-speech-idx a0-1 self (-> self course speeches) (bot-speech-info-flag))))
|
||||
(if (>= a1-1 0)
|
||||
(play-speech-by-id self a1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logior! (-> self bot-flags) (bot-flag bf11))
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> (method-of-type bot die-falling) trans))
|
||||
(if (channel-active? self (gui-channel none))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
(let ((f30-0 (rnd-float-range self 0.9 1.1))
|
||||
(gp-0 (-> self draw art-group data (-> self enemy-info idle-anim)))
|
||||
)
|
||||
(until #f
|
||||
(ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(when (and (logtest? (-> self bot-flags) (bot-flag failed)) (time-elapsed? (-> self state-time) (seconds 0.5)) #f)
|
||||
(cleanup-for-death self)
|
||||
(process-entity-status! self (entity-perm-status no-kill) #f)
|
||||
(let ((a0-10 (res-lump-struct (-> self entity) 'task-name string)))
|
||||
(when a0-10
|
||||
(let ((s5-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> s5-0 from) (process->ppointer self))
|
||||
(set! (-> s5-0 num-params) 0)
|
||||
(set! (-> s5-0 message) 'fail)
|
||||
(let ((s4-0 send-event-function)
|
||||
(v1-27 (-> *game-info* sub-task-list (task-node-index-by-name a0-10)))
|
||||
)
|
||||
(s4-0
|
||||
(handle->process (if (-> v1-27 manager)
|
||||
(-> v1-27 manager manager)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post nav-enemy-die-falling-post
|
||||
)
|
||||
|
||||
(defstate hidden (bot)
|
||||
:virtual #t
|
||||
:event enemy-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self focus-status) (focus-status disable))
|
||||
(let ((v1-3 (-> self root root-prim)))
|
||||
(set! (-> v1-3 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-3 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(set! (-> self notice-enemy-dist) 0.0)
|
||||
(logclear! (-> self enemy-flags) (enemy-flag check-water))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(local-vars (v0-0 enemy-flag))
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
(logclear! (-> self focus-status) (focus-status disable))
|
||||
(let ((v1-5 (-> self root root-prim)))
|
||||
(set! (-> v1-5 prim-core collide-as) (-> self root backup-collide-as))
|
||||
(set! (-> v1-5 prim-core collide-with) (-> self root backup-collide-with))
|
||||
)
|
||||
(let ((v1-6 (-> self enemy-flags)))
|
||||
(if (logtest? (enemy-flag check-water-backup) v1-6)
|
||||
(set! v0-0 (logior (enemy-flag check-water) v1-6))
|
||||
(set! v0-0 (logclear v1-6 (enemy-flag check-water)))
|
||||
)
|
||||
)
|
||||
(set! (-> self enemy-flags) v0-0)
|
||||
)
|
||||
:code sleep-code
|
||||
:post nav-enemy-simple-post
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -169,7 +169,7 @@
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(nav-network-method-9 (_type_ int int) none)
|
||||
(alloc-nav-network-for-level! (_type_ int int) none)
|
||||
(init-by-other! (_type_ level nav-network-data) none)
|
||||
(nav-network-method-11 (_type_) none)
|
||||
(reset! (_type_) none)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod nav-network-method-9 ((this nav-network) (arg0 int) (arg1 int))
|
||||
(defmethod alloc-nav-network-for-level! ((this nav-network) (arg0 int) (arg1 int))
|
||||
(set! (-> this segment-pool) (the-as (pointer hover-nav-path-segment) (malloc 'loading-level (* 96 arg0))))
|
||||
(set! (-> this free-segment-list) #f)
|
||||
(dotimes (v1-1 64)
|
||||
@@ -1406,8 +1406,8 @@
|
||||
(defmethod hover-nav-control-method-10 ((this hover-nav-control) (arg0 vector) (arg1 vector) (arg2 vector))
|
||||
(set! (-> this dest-pos quad) (-> arg0 quad))
|
||||
(cond
|
||||
(arg2
|
||||
(set! (-> this dest-vel quad) (-> arg2 quad))
|
||||
;; og:preserve-this condition has been changed from `arg2` because some places call this method with #t as arg2
|
||||
((and (!= arg2 #t) arg2) ; arg2
|
||||
(set! (-> this root transv quad) (-> arg2 quad))
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -7,3 +7,761 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype hud-wasbbv-goal (hud)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype hud-wasbbv-score (hud)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype hud-wasbbv-counter (hud)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype wasbbv-hud-info (structure)
|
||||
((goal float)
|
||||
(score float)
|
||||
(current float)
|
||||
(goal-cup uint8)
|
||||
(goal-text text-id)
|
||||
(score-text text-id)
|
||||
(decimal-place-count int8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *wasbbv-hud-info* (new 'static 'wasbbv-hud-info))
|
||||
|
||||
(defmethod draw ((this hud-wasbbv-goal))
|
||||
(local-vars (v1-7 int) (s5-0 int))
|
||||
(set-hud-piece-position!
|
||||
(the-as hud-sprite (-> this sprites))
|
||||
(the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale))))
|
||||
70
|
||||
)
|
||||
0
|
||||
1
|
||||
(case (-> *wasbbv-hud-info* goal-cup)
|
||||
((1)
|
||||
(set! s5-0 313)
|
||||
(set! v1-7 3)
|
||||
)
|
||||
((2)
|
||||
(set! s5-0 312)
|
||||
(set! v1-7 8)
|
||||
)
|
||||
((3)
|
||||
(set! s5-0 311)
|
||||
(set! v1-7 5)
|
||||
)
|
||||
(else
|
||||
(set! s5-0 310)
|
||||
(set! v1-7 1)
|
||||
)
|
||||
)
|
||||
(set! (-> this strings 0 color) (the-as font-color v1-7))
|
||||
(set! (-> this strings 1 color) (the-as font-color v1-7))
|
||||
(let ((s4-0 format)
|
||||
(s3-0 (clear (-> this strings 1 text)))
|
||||
(s2-0 "~S")
|
||||
)
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f))
|
||||
(s4-0 s3-0 s2-0 *temp-string*)
|
||||
)
|
||||
(let ((s4-1 (-> this strings))
|
||||
(s5-1 *wasbbv-hud-info*)
|
||||
)
|
||||
(clear (-> s4-1 0 text))
|
||||
(let ((t9-7 format)
|
||||
(a0-15 (-> s4-1 0 text))
|
||||
(v1-10 (-> s5-1 decimal-place-count))
|
||||
)
|
||||
(t9-7
|
||||
a0-15
|
||||
(cond
|
||||
((zero? v1-10)
|
||||
"~,,0f"
|
||||
)
|
||||
((= v1-10 1)
|
||||
"~,,1f"
|
||||
)
|
||||
(else
|
||||
"~,,2f"
|
||||
)
|
||||
)
|
||||
(+ 0.001 (-> s5-1 goal))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8)
|
||||
(set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40)
|
||||
(set! (-> this strings 1 scale) 0.65)
|
||||
(case (-> *setting-control* user-default language)
|
||||
(((language-enum korean))
|
||||
(set! (-> this strings 1 scale) 0.9)
|
||||
(+! (-> this strings 1 pos y) -5)
|
||||
)
|
||||
)
|
||||
((method-of-type hud draw) this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-callback ((this hud-wasbbv-goal))
|
||||
(set! (-> this gui-id)
|
||||
(add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0)
|
||||
)
|
||||
(logior! (-> this flags) (hud-flags show))
|
||||
(set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap)))
|
||||
(set! (-> this sprites 0 scale-x) 1.5)
|
||||
(set! (-> this sprites 0 flags) (hud-sprite-flags hsf3))
|
||||
(alloc-string-if-needed this 0)
|
||||
(set! (-> this strings 0 scale) 0.5)
|
||||
(set! (-> this strings 0 flags) (font-flags kerning middle large))
|
||||
(set! (-> this strings 0 color) (font-color red))
|
||||
(alloc-string-if-needed this 1)
|
||||
(set! (-> this strings 1 flags) (font-flags shadow kerning large))
|
||||
(set! (-> this strings 1 color) (font-color red))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod draw ((this hud-wasbbv-score))
|
||||
(set-hud-piece-position!
|
||||
(the-as hud-sprite (-> this sprites))
|
||||
(the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset))))
|
||||
70
|
||||
)
|
||||
(let ((s4-0 (-> this strings))
|
||||
(s5-0 *wasbbv-hud-info*)
|
||||
)
|
||||
(clear (-> s4-0 0 text))
|
||||
(let ((t9-2 format)
|
||||
(a0-3 (-> s4-0 0 text))
|
||||
(v1-4 (-> s5-0 decimal-place-count))
|
||||
)
|
||||
(t9-2
|
||||
a0-3
|
||||
(cond
|
||||
((zero? v1-4)
|
||||
"~,,0f"
|
||||
)
|
||||
((= v1-4 1)
|
||||
"~,,1f"
|
||||
)
|
||||
(else
|
||||
"~,,2f"
|
||||
)
|
||||
)
|
||||
(-> s5-0 score)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 format)
|
||||
(s4-1 (clear (-> this strings 1 text)))
|
||||
(s3-0 "~S")
|
||||
)
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (-> *wasbbv-hud-info* score-text) #f))
|
||||
(s5-1 s4-1 s3-0 *temp-string*)
|
||||
)
|
||||
(set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 32 -8)
|
||||
(set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40)
|
||||
(let ((v1-9 (-> *setting-control* user-default language)))
|
||||
(set! (-> this strings 1 scale)
|
||||
(cond
|
||||
((or (= v1-9 (language-enum french)) (or (= v1-9 (language-enum german))
|
||||
(= v1-9 (language-enum spanish))
|
||||
(= v1-9 (language-enum italian))
|
||||
(= v1-9 (language-enum portuguese))
|
||||
)
|
||||
)
|
||||
0.5
|
||||
)
|
||||
((= v1-9 (language-enum korean))
|
||||
(+! (-> this strings 1 pos x) -25)
|
||||
(+! (-> this strings 1 pos y) -5)
|
||||
0.9
|
||||
)
|
||||
(else
|
||||
0.5
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((method-of-type hud draw) this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-callback ((this hud-wasbbv-score))
|
||||
(set! (-> this gui-id)
|
||||
(add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0)
|
||||
)
|
||||
(logior! (-> this flags) (hud-flags show))
|
||||
(set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap)))
|
||||
(set! (-> this sprites 0 scale-x) 1.5)
|
||||
(set! (-> this sprites 0 flags) (hud-sprite-flags hsf3))
|
||||
(alloc-string-if-needed this 0)
|
||||
(set! (-> this strings 0 scale) 0.5)
|
||||
(set! (-> this strings 0 flags) (font-flags kerning right large))
|
||||
(set! (-> this strings 0 color) (font-color default))
|
||||
(alloc-string-if-needed this 1)
|
||||
(set! (-> this strings 1 scale) 0.55)
|
||||
(set! (-> this strings 1 flags) (font-flags shadow kerning right large))
|
||||
(set! (-> this strings 1 color) (font-color default))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod draw ((this hud-wasbbv-counter))
|
||||
(set-hud-piece-position!
|
||||
(the-as hud-sprite (-> this sprites))
|
||||
(the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset))))
|
||||
95
|
||||
)
|
||||
(let ((s5-0 (-> this strings)))
|
||||
(let ((s4-0 *wasbbv-hud-info*))
|
||||
(clear (-> s5-0 0 text))
|
||||
(let ((t9-2 format)
|
||||
(a0-3 (-> s5-0 0 text))
|
||||
(v1-4 (-> s4-0 decimal-place-count))
|
||||
)
|
||||
(t9-2
|
||||
a0-3
|
||||
(cond
|
||||
((zero? v1-4)
|
||||
"~,,0f"
|
||||
)
|
||||
((= v1-4 1)
|
||||
"~,,1f"
|
||||
)
|
||||
(else
|
||||
"~,,2f"
|
||||
)
|
||||
)
|
||||
(-> s4-0 current)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (the-as vector4w (-> this sprites)) 32 -8)
|
||||
)
|
||||
((method-of-type hud draw) this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-callback ((this hud-wasbbv-counter))
|
||||
(set! (-> this gui-id)
|
||||
(add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0)
|
||||
)
|
||||
(logior! (-> this flags) (hud-flags show))
|
||||
(set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap)))
|
||||
(set! (-> this sprites 0 scale-x) 1.5)
|
||||
(set! (-> this strings 0 scale) 0.5)
|
||||
(set! (-> this sprites 0 flags) (hud-sprite-flags hsf3))
|
||||
(alloc-string-if-needed this 0)
|
||||
(set! (-> this strings 0 flags) (font-flags kerning right large))
|
||||
(set! (-> this strings 0 color) (font-color red))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-vehicle-bbush (task-manager)
|
||||
((ground-pos vector :inline)
|
||||
(ground-time time-frame)
|
||||
(pre-start-time time-frame)
|
||||
(display-units float)
|
||||
(max-distance float)
|
||||
(distance float)
|
||||
(total-distance float)
|
||||
(max-air-time float)
|
||||
(air-time float)
|
||||
(total-air-time float)
|
||||
(goal float)
|
||||
(score float)
|
||||
(current float)
|
||||
(hud-score handle)
|
||||
(hud-goal handle)
|
||||
(squad-manager handle :offset 336)
|
||||
(game-score uint8)
|
||||
(last-cup uint8)
|
||||
(goal-cup uint8)
|
||||
(new-high-score symbol)
|
||||
(want-current-hud? symbol)
|
||||
)
|
||||
(:state-methods
|
||||
report
|
||||
)
|
||||
(:methods
|
||||
(award-skill (_type_ float) none)
|
||||
(task-manager-vehicle-bbush-method-34 (_type_) none)
|
||||
(task-manager-vehicle-bbush-method-35 (_type_) none)
|
||||
(task-manager-vehicle-bbush-method-36 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod task-manager-vehicle-bbush-method-34 ((this task-manager-vehicle-bbush))
|
||||
(let ((gp-0 *wasbbv-hud-info*))
|
||||
(let ((v1-0 (-> this goal-cup)))
|
||||
(set! (-> gp-0 goal-text) (cond
|
||||
((= v1-0 1)
|
||||
(text-id text-0139)
|
||||
)
|
||||
((= v1-0 2)
|
||||
(text-id text-0138)
|
||||
)
|
||||
((= v1-0 3)
|
||||
(text-id text-0137)
|
||||
)
|
||||
(else
|
||||
(text-id text-0136)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this goal)
|
||||
(game-info-method-31 *game-info* (the-as int (-> this game-score)) (the-as int (-> this goal-cup)))
|
||||
)
|
||||
(set! (-> gp-0 goal) (* (-> this display-units) (-> this goal)))
|
||||
(set! (-> gp-0 goal-cup) (-> this goal-cup))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-vehicle-bbush))
|
||||
(when (= (-> this player-vehicle) #f)
|
||||
(when (and *target* (focus-test? *target* pilot-riding))
|
||||
(let* ((s5-0 (handle->process (-> *target* pilot vehicle)))
|
||||
(v1-10 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-10
|
||||
(set! (-> this player-vehicle) (-> *target* pilot vehicle))
|
||||
(set! (-> this ground-pos quad) (-> (the-as process-focusable v1-10) root trans quad))
|
||||
(set-time! (-> this ground-time))
|
||||
(dotimes (s5-1 3)
|
||||
(send-event (handle->process (-> this player-vehicle)) 'turbo-pickup)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> this player-vehicle) #f)
|
||||
(let ((v1-26 (the-as vehicle (handle->process (-> this player-vehicle)))))
|
||||
(when v1-26
|
||||
(cond
|
||||
((and (logtest? (-> v1-26 v-flags) (vehicle-flag in-air))
|
||||
(not (logtest? (-> v1-26 v-flags) (vehicle-flag impact)))
|
||||
)
|
||||
(set! (-> this air-time) (the float (- (current-time) (-> this ground-time))))
|
||||
(set! (-> this distance)
|
||||
(vector-vector-xz-distance (-> this ground-pos) (the-as vector (&-> (the-as vehicle (-> v1-26 root)) parent)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (< 360.0 (-> this air-time))
|
||||
(+! (-> this total-distance) (-> this distance))
|
||||
(+! (-> this total-air-time) (-> this air-time))
|
||||
)
|
||||
(set! (-> this max-distance) (fmax (-> this max-distance) (-> this distance)))
|
||||
(set! (-> this max-air-time) (fmax (-> this max-air-time) (-> this air-time)))
|
||||
(set! (-> this ground-pos quad) (-> v1-26 root trans quad))
|
||||
(set-time! (-> this ground-time))
|
||||
(set! (-> this distance) 0.0)
|
||||
(set! (-> this air-time) 0.0)
|
||||
)
|
||||
)
|
||||
(task-manager-vehicle-bbush-method-34 this)
|
||||
(when (>= (-> this score) (-> this goal))
|
||||
(set! (-> this new-high-score) #t)
|
||||
(when (>= (the-as uint 3) (-> this goal-cup))
|
||||
(sound-play "special-pickup")
|
||||
(+! (-> this goal-cup) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-42 *wasbbv-hud-info*))
|
||||
(set! (-> v1-42 score) (* (-> this display-units) (-> this score)))
|
||||
(set! (-> v1-42 current) (* (-> this display-units) (-> this current)))
|
||||
)
|
||||
(hud-timer-handler this)
|
||||
((method-of-type task-manager task-manager-method-26) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-25 ((this task-manager-vehicle-bbush))
|
||||
(set! (-> *was-squad-control* target-count) 0)
|
||||
0
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod go-fail ((this task-manager-vehicle-bbush))
|
||||
(go (method-of-object this report))
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod task-manager-vehicle-bbush-method-35 ((this task-manager-vehicle-bbush))
|
||||
(let ((v1-0 *was-squad-control*))
|
||||
(set! (-> v1-0 target-count) 2)
|
||||
(set! (-> v1-0 reserve-count) 4000)
|
||||
)
|
||||
(set-setting! 'music 'descarbb 0.0 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-vehicle-bbush-method-36 ((this task-manager-vehicle-bbush))
|
||||
(let ((a0-1 (-> this node-info parent-node 0)))
|
||||
(task-node-open! a0-1 'event)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch connection vs none.
|
||||
(defmethod set-time-limit ((this task-manager-vehicle-bbush))
|
||||
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this squad-manager) (ppointer->handle (was-squad-manager-start this)))
|
||||
(set! (-> this time-limit) (seconds 120))
|
||||
(set! (-> this air-time) 0.0)
|
||||
(set! (-> this max-air-time) 0.0)
|
||||
(set! (-> this total-air-time) 0.0)
|
||||
(set! (-> this distance) 0.0)
|
||||
(set! (-> this max-distance) 0.0)
|
||||
(set! (-> this total-distance) 0.0)
|
||||
(set! (-> this display-units) 1.0)
|
||||
(set! (-> this new-high-score) #f)
|
||||
(set! (-> this want-current-hud?) #t)
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-0573))
|
||||
(set! (-> *wasbbv-hud-info* decimal-place-count) 2)
|
||||
(set-setting! 'airlock #f 0.0 0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod award-skill ((this task-manager-vehicle-bbush) (arg0 float))
|
||||
(let* ((s5-0 (-> this game-score))
|
||||
(s3-0 (game-info-method-29 *game-info* (the-as int s5-0)))
|
||||
(v1-2 (get-highscore-rank *game-info* (the-as int s5-0) arg0))
|
||||
(gp-1 (max 0 (- v1-2 s3-0)))
|
||||
)
|
||||
(game-info-method-27 *game-info* (the-as game-score s5-0) arg0)
|
||||
(give *game-info* 'skill (* (the float gp-1) (-> *FACT-bank* super-skill-inc)) (the-as handle #f))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate active (task-manager-vehicle-bbush)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed))))
|
||||
(goto cfg-7)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(label cfg-7)
|
||||
(set-setting! 'exclusive-task #f 0.0 (-> self node-info task))
|
||||
(set! (-> self last-cup) (the-as uint (game-info-method-29 *game-info* (the-as int (-> self game-score)))))
|
||||
(set! (-> self goal-cup) (+ (-> self last-cup) 1))
|
||||
(task-manager-vehicle-bbush-method-34 self)
|
||||
(set! (-> self new-high-score) #f)
|
||||
(set! (-> self hud-goal)
|
||||
(ppointer->handle (process-spawn hud-wasbbv-goal :init hud-init-by-other :name "hud-wasbbv-goal" :to self))
|
||||
)
|
||||
(set! (-> self hud-score)
|
||||
(ppointer->handle (process-spawn hud-wasbbv-score :init hud-init-by-other :name "hud-wasbbv-score" :to self))
|
||||
)
|
||||
(if (-> self want-current-hud?)
|
||||
(set! (-> self hud-counter)
|
||||
(ppointer->handle
|
||||
(process-spawn hud-wasbbv-counter :init hud-init-by-other :name "hud-wasbbv-counter" :to self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-time! (-> self pre-start-time))
|
||||
(while (and (not (time-elapsed? (-> self pre-start-time) (seconds 10)))
|
||||
(not (handle->process (-> self player-vehicle)))
|
||||
)
|
||||
(when (and *target* (focus-test? *target* pilot-riding))
|
||||
(let ((gp-3 (handle->process (-> *target* pilot vehicle))))
|
||||
(if (if (type? gp-3 process-focusable)
|
||||
gp-3
|
||||
)
|
||||
(set! (-> self player-vehicle) (-> *target* pilot vehicle))
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(task-manager-vehicle-bbush-method-35 self)
|
||||
(set-time! (-> self start-time))
|
||||
(sleep-code)
|
||||
)
|
||||
)
|
||||
|
||||
(define *bbv-fail-time-expired*
|
||||
(new 'static 'resetter-params
|
||||
:message (resetter-message mission-fail-or-retry)
|
||||
:flags (resetter-flag auto-reset text-message no-audio-first)
|
||||
:fail (new 'static 'resetter-spec :continue #f :reset-mode 'life :execute #f)
|
||||
:retry (new 'static 'resetter-spec :continue "desert-bbush-desc-4" :reset-mode 'try :execute #f)
|
||||
:reset-delay (seconds 6.5)
|
||||
:text-message (text-id text-07cc)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate report (task-manager-vehicle-bbush)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(award-skill self (-> self score))
|
||||
(cond
|
||||
((-> self new-high-score)
|
||||
(format #t "task-manager-vehicle-bbush::report: got new high score~%")
|
||||
(let ((gp-0 (-> self info on-complete)))
|
||||
(if gp-0
|
||||
(script-eval gp-0)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (current-time)))
|
||||
(until (time-elapsed? gp-1 (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (not (-> *setting-control* user-current speech-control))
|
||||
(suspend)
|
||||
)
|
||||
(task-manager-vehicle-bbush-method-36 self)
|
||||
(until #f
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(format #t "task-manager-vehicle-bbush::report: no new high score~%")
|
||||
(let ((gp-2 (-> self info on-fail)))
|
||||
(if gp-2
|
||||
(script-eval gp-2)
|
||||
)
|
||||
)
|
||||
(while (not (-> *setting-control* user-current speech-control))
|
||||
(suspend)
|
||||
)
|
||||
(task-manager-method-28 self)
|
||||
(let ((gp-3 (on-fail self 'fail)))
|
||||
(when gp-3
|
||||
(mem-copy! (the-as pointer *bbv-fail-time-expired*) (the-as pointer gp-3) 48)
|
||||
(set! (-> gp-3 text-message) (text-id text-07cc))
|
||||
)
|
||||
)
|
||||
(go-virtual fail *bbv-fail-time-expired*)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype task-manager-bbush-air-time (task-manager-vehicle-bbush)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-bbush-air-time))
|
||||
(call-parent-method this)
|
||||
(set! (-> this display-units) 0.0033333334)
|
||||
(set! (-> this time-limit) (seconds 30))
|
||||
(set! (-> this game-score) (the-as uint 4))
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-0573))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-bbush-air-time))
|
||||
(let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this score) (-> this max-air-time))
|
||||
(set! (-> this current) (-> this air-time))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-bbush-total-air-time (task-manager-vehicle-bbush)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-bbush-total-air-time))
|
||||
(call-parent-method this)
|
||||
(set! (-> this display-units) 0.0033333334)
|
||||
(set! (-> this time-limit) (seconds 60))
|
||||
(set! (-> this game-score) (the-as uint 5))
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-0078))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-bbush-total-air-time))
|
||||
(let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this score) (-> this total-air-time))
|
||||
(set! (-> this current) (-> this air-time))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-bbush-jump-distance (task-manager-vehicle-bbush)
|
||||
((pad uint8 36)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-bbush-jump-distance))
|
||||
(call-parent-method this)
|
||||
(set! (-> this display-units) 0.00024414062)
|
||||
(set! (-> this time-limit) (seconds 30))
|
||||
(set! (-> this game-score) (the-as uint 6))
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-0833))
|
||||
(set! (-> *wasbbv-hud-info* decimal-place-count) 1)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-bbush-jump-distance))
|
||||
(let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this score) (-> this max-distance))
|
||||
(set! (-> this current) (-> this distance))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-bbush-total-jump-distance (task-manager-vehicle-bbush)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-bbush-total-jump-distance))
|
||||
(call-parent-method this)
|
||||
(set! (-> this display-units) 0.00024414062)
|
||||
(set! (-> this time-limit) (seconds 60))
|
||||
(set! (-> this game-score) (the-as uint 7))
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-07ce))
|
||||
(set! (-> *wasbbv-hud-info* decimal-place-count) 1)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-bbush-total-jump-distance))
|
||||
(let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this score) (-> this total-distance))
|
||||
(set! (-> this current) (-> this distance))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-bbush-roll-count (task-manager-vehicle-bbush)
|
||||
((roll-count float)
|
||||
(y-proj float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-bbush-roll-count))
|
||||
(call-parent-method this)
|
||||
(set! (-> this display-units) 1.0)
|
||||
(set! (-> this time-limit) (seconds 60))
|
||||
(set! (-> this game-score) (the-as uint 8))
|
||||
(set! (-> this want-current-hud?) #f)
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-07cd))
|
||||
(set! (-> *wasbbv-hud-info* decimal-place-count) 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-bbush-roll-count))
|
||||
(let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(let ((v1-2 (handle->process (-> this player-vehicle))))
|
||||
(when v1-2
|
||||
(let ((f0-0 (-> (the-as vehicle v1-2) node-list data 0 bone transform uvec y)))
|
||||
(when (< 0.1 (fabs f0-0))
|
||||
(if (< (* f0-0 (-> this y-proj)) 0.0)
|
||||
(+! (-> this roll-count) 0.5)
|
||||
)
|
||||
(set! (-> this y-proj) f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this score) (-> this roll-count))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-bbush-destroy-interceptors (task-manager-vehicle-bbush)
|
||||
((max-reserve-count int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-bbush-destroy-interceptors))
|
||||
(call-parent-method this)
|
||||
(set! (-> this display-units) 1.0)
|
||||
(set! (-> this time-limit) (seconds 120))
|
||||
(set! (-> this game-score) (the-as uint 16))
|
||||
(set! (-> this want-current-hud?) #f)
|
||||
(set! (-> this max-reserve-count) 1000)
|
||||
(set! (-> *wasbbv-hud-info* score-text) (text-id text-07f6))
|
||||
(set! (-> *wasbbv-hud-info* decimal-place-count) 0)
|
||||
(set! (-> *was-squad-control* target-count) 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-method-26 ((this task-manager-bbush-destroy-interceptors))
|
||||
(let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(when (nonzero? (-> this start-time))
|
||||
(let ((v1-3 *was-squad-control*))
|
||||
(set! (-> this score)
|
||||
(the float (- (- (-> this max-reserve-count) (-> v1-3 reserve-count)) (-> v1-3 active-count)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-vehicle-bbush-method-35 ((this task-manager-bbush-destroy-interceptors))
|
||||
(set-setting! 'music 'desdstry 0.0 0)
|
||||
(set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0)
|
||||
(let ((v1-4 *was-squad-control*))
|
||||
(set! (-> v1-4 target-count) 4)
|
||||
(set! (-> v1-4 reserve-count) (- (-> this max-reserve-count) (-> v1-4 active-count)))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch sound-id vs none.
|
||||
(defmethod task-manager-method-28 ((this task-manager-bbush-destroy-interceptors))
|
||||
(talker-spawn-func (-> *talker-speech* 317) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(none)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,558 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-spirit-goal
|
||||
:id 1540
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 5114 :flags (sp7)) (sp-item 5115 :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 5114
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 5) (meters 0.25))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 64.0)
|
||||
(:g 64.0)
|
||||
(:b 255.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata 4096.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5116
|
||||
:init-specs ((:texture (glow level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1.6) (meters 1))
|
||||
(:rot-x (degrees 11.25))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 64.0)
|
||||
(:g 64.0)
|
||||
(:b 255.0)
|
||||
(:a 128.0)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:userdata 4096.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-bb-ring-finder
|
||||
:id 1541
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 640)
|
||||
:parts ((sp-item 5116 :flags (sp7)) (sp-item 5115 :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 5117
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 0.0)
|
||||
(:b 128.0)
|
||||
(:a 50.0)
|
||||
(:fade-r 0.027777778)
|
||||
(:fade-b -0.027777778)
|
||||
(:fade-a -0.055555556)
|
||||
(:timer (seconds 6))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(define *bb-ring-alpha* 50)
|
||||
|
||||
(defpartgroup group-bb-ring-finder-nofade
|
||||
:id 1542
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 640)
|
||||
:parts ((sp-item 5118 :flags (sp7)) (sp-item 5115 :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 5118
|
||||
:init-specs ((:texture (glow-soft level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 0.0)
|
||||
(:g 0.0)
|
||||
(:b 128.0)
|
||||
(:a 50.0)
|
||||
(:fade-r 0.027777778)
|
||||
(:fade-b -0.027777778)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:func 'spt-func-bb-ring-fader)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun spt-func-bb-ring-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
|
||||
(set! (-> arg2 coneradius) (the float *bb-ring-alpha*))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defpart 5115
|
||||
:init-specs ((:texture (starflash level-default-sprite))
|
||||
(:num 1.5)
|
||||
(:x (meters 0) (meters 1))
|
||||
(:y (meters -1) (meters 2))
|
||||
(:scale-x (meters 0.1) (meters 0.2))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 50.0)
|
||||
(:g 50.0)
|
||||
(:b 120.0)
|
||||
(:a 64.0)
|
||||
(:vel-x (meters -0.006666667) (meters 0.013333334))
|
||||
(:vel-y (meters 0.006666667) (meters 0.0016666667))
|
||||
(:vel-z (meters -0.006666667) (meters 0.013333334))
|
||||
(:scalevel-x (meters 0.00033333333))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.0)
|
||||
(:accel-y (meters -0.00033333333) (meters -0.00016666666))
|
||||
(:timer (seconds 1.667))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-score-drop-c
|
||||
:id 1543
|
||||
:linger-duration (seconds 2)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 5123 :flags (sp7))
|
||||
(sp-item 5124 :flags (sp6 sp7))
|
||||
(sp-item 5125 :flags (sp3) :binding 5119)
|
||||
(sp-item 5119 :flags (sp2 sp3) :binding 5120)
|
||||
(sp-item 5125 :flags (sp3) :binding 5121)
|
||||
(sp-item 5121 :flags (sp2 sp3) :binding 5120)
|
||||
(sp-item 5125 :flags (sp3) :binding 5122)
|
||||
(sp-item 5122 :flags (sp2 sp3) :binding 5120)
|
||||
(sp-item 5120 :flags (sp2))
|
||||
(sp-item 5120 :flags (sp2))
|
||||
(sp-item 5120 :flags (sp2))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5123
|
||||
:init-specs ((:texture (laser-hit2 level-default-sprite))
|
||||
(:num 0.3)
|
||||
(:scale-x (meters 0.3))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 16.0 16.0)
|
||||
(:b :copy g)
|
||||
(:a 0.0)
|
||||
(:scalevel-x (meters 0.05) (meters 0.016666668))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.85333335)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.335))
|
||||
(:next-launcher 5126)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5126
|
||||
:init-specs ((:fade-a -0.85333335))
|
||||
)
|
||||
|
||||
(defpart 5124
|
||||
:init-specs ((:texture (time-bubble lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 6))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 32.0)
|
||||
(:b 32.0)
|
||||
(:a 64.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:userdata 409.6)
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5125
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 0.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-track-root)
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5119
|
||||
:init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 2))
|
||||
(:z (meters 2))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 64.0)
|
||||
(:b 64.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0))
|
||||
(:vel-x (meters 0.053333335))
|
||||
(:vel-y (meters 0))
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (ready-to-launch aux-list))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5121
|
||||
:init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters -2))
|
||||
(:z (meters 2))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 64.0)
|
||||
(:b 64.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 45))
|
||||
(:vel-x (meters -0.053333335))
|
||||
(:vel-y (meters 0))
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (ready-to-launch aux-list))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5122
|
||||
:init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:z (meters 2))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 64.0)
|
||||
(:b 64.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 90))
|
||||
(:vel-x (meters 0.053333335))
|
||||
(:vel-y (meters 0))
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (ready-to-launch aux-list))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5120
|
||||
:init-specs ((:texture (middot level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.8))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 0.0)
|
||||
(:b 0.0)
|
||||
(:a 32.0)
|
||||
(:scalevel-x (meters -0.006666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.32)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-score-drop-b
|
||||
:id 1544
|
||||
:linger-duration (seconds 2)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 5130 :flags (sp7))
|
||||
(sp-item 5131 :flags (sp6 sp7))
|
||||
(sp-item 5132 :flags (sp3) :binding 5127)
|
||||
(sp-item 5127 :flags (sp2 sp3) :binding 5128)
|
||||
(sp-item 5132 :flags (sp3) :binding 5129)
|
||||
(sp-item 5129 :flags (sp2 sp3) :binding 5128)
|
||||
(sp-item 5128 :flags (sp2))
|
||||
(sp-item 5128 :flags (sp2))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5130
|
||||
:init-specs ((:texture (laser-hit2 level-default-sprite))
|
||||
(:num 0.3)
|
||||
(:scale-x (meters 0.3))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 250.0)
|
||||
(:g 230.0 20.0)
|
||||
(:b 16.0 16.0)
|
||||
(:a 0.0)
|
||||
(:scalevel-x (meters 0.05) (meters 0.016666668))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.85333335)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.335))
|
||||
(:next-launcher 5133)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5133
|
||||
:init-specs ((:fade-a -0.85333335))
|
||||
)
|
||||
|
||||
(defpart 5131
|
||||
:init-specs ((:texture (time-bubble lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 6))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 32.0)
|
||||
(:a 64.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:userdata 409.6)
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5132
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 0.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-track-root)
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5127
|
||||
:init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:z (meters 2))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 64.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0))
|
||||
(:vel-x (meters 0.053333335))
|
||||
(:vel-y (meters 0))
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (ready-to-launch aux-list))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5129
|
||||
:init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:z (meters 2))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 255.0)
|
||||
(:g 255.0)
|
||||
(:b 64.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 180))
|
||||
(:vel-x (meters 0.053333335))
|
||||
(:vel-y (meters 0))
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (ready-to-launch aux-list))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5128
|
||||
:init-specs ((:texture (middot level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 0.8))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 0.0)
|
||||
(:a 32.0)
|
||||
(:scalevel-x (meters -0.006666667))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a -0.32)
|
||||
(:timer (seconds 0.335))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-score-drop-a
|
||||
:id 1545
|
||||
:linger-duration (seconds 2)
|
||||
:flags (sp0)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 5137 :flags (sp7))
|
||||
(sp-item 5138 :flags (sp6 sp7))
|
||||
(sp-item 5139 :flags (sp3) :binding 5134)
|
||||
(sp-item 5134 :flags (sp2 sp3) :binding 5135)
|
||||
(sp-item 5139 :flags (sp3) :binding 5136)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5137
|
||||
:init-specs ((:texture (laser-hit2 level-default-sprite))
|
||||
(:num 0.3)
|
||||
(:scale-x (meters 0.3))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 16.0 16.0)
|
||||
(:g :copy r)
|
||||
(:b 255.0)
|
||||
(:a 0.0)
|
||||
(:scalevel-x (meters 0.05) (meters 0.016666668))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.85333335)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:next-time (seconds 0.335))
|
||||
(:next-launcher 5140)
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5140
|
||||
:init-specs ((:fade-a -0.85333335))
|
||||
)
|
||||
|
||||
(defpart 5138
|
||||
:init-specs ((:texture (time-bubble lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 6))
|
||||
(:rot-x (degrees 22.5))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 32.0)
|
||||
(:g 32.0)
|
||||
(:b 255.0)
|
||||
(:a 64.0)
|
||||
(:omega (degrees 4511.25))
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:userdata 409.6)
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5139
|
||||
:init-specs ((:texture (hotdot level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0)
|
||||
(:g 128.0)
|
||||
(:b 128.0)
|
||||
(:a 0.0)
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-track-root)
|
||||
(:rotate-y (degrees 90))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5134
|
||||
:init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite))
|
||||
(:num 1.0)
|
||||
(:y (meters 4))
|
||||
(:z (meters 0.2))
|
||||
(:scale-x (meters 1))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 64.0)
|
||||
(:g 64.0)
|
||||
(:b 255.0)
|
||||
(:a 128.0)
|
||||
(:omega (degrees 0))
|
||||
(:vel-x (meters 0.053333335))
|
||||
(:vel-y (meters 0))
|
||||
(:timer (seconds -0.005))
|
||||
(:flags (ready-to-launch aux-list))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-spirit-explode
|
||||
:id 1546
|
||||
:flags (sp0 sp4)
|
||||
:bounds (static-bspherem 0 0 0 20)
|
||||
:parts ((sp-item 5141 :period (seconds 20) :length (seconds 0.035))
|
||||
(sp-item 5142 :period (seconds 20) :length (seconds 0.035))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5141
|
||||
:init-specs ((:texture (explosion-nebula level-default-sprite))
|
||||
(:num 10.0)
|
||||
(:scale-x (meters 3) (meters 2))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 30.0)
|
||||
(:g 80.0 20.0)
|
||||
(:b 255.0)
|
||||
(:a 255.0)
|
||||
(:vel-y (meters 0) (meters 0.06666667))
|
||||
(:scalevel-x (meters 0.033333335))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.2)
|
||||
(:fade-g -0.53333336)
|
||||
(:fade-a -1.7 -1.7)
|
||||
(:friction 0.93)
|
||||
(:timer (seconds 0.5))
|
||||
(:flags (sp-cpuinfo-flag-3))
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 5142
|
||||
:init-specs ((:texture (explosion-edge level-default-sprite))
|
||||
(:num 20.0)
|
||||
(:scale-x (meters 3) (meters 2))
|
||||
(:rot-x (degrees 0))
|
||||
(:rot-y (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 30.0)
|
||||
(:g 80.0 20.0)
|
||||
(:b 255.0)
|
||||
(:a 128.0)
|
||||
(:vel-y (meters 0.33333334) (meters 0.13333334))
|
||||
(:scalevel-x (meters 0.033333335))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-r -0.1)
|
||||
(:fade-g -0.26666668)
|
||||
(:fade-a -0.42666668 -0.42666668)
|
||||
(:friction 0.75)
|
||||
(:timer (seconds 1))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-2d-spline-align-instant)
|
||||
(:conerot-x (degrees 0) (degrees 360))
|
||||
(:rotate-y (degrees 0) (degrees 3600))
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,475 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype ashelin-oasis (ashelin)
|
||||
((player-in-bounds-time time-frame)
|
||||
(last-speech-time time-frame)
|
||||
(last-speech-id int32)
|
||||
(last-sound-trans vector :inline)
|
||||
(last-sound-id sound-id)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:methods
|
||||
(set-frontline (_type_) none)
|
||||
(ashelin-oasis-method-263 (_type_ symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod go-idle2 ((this ashelin-oasis))
|
||||
(go-idle this)
|
||||
)
|
||||
|
||||
(defmethod set-frontline ((this ashelin-oasis))
|
||||
(let ((a0-1 *target*))
|
||||
(when a0-1
|
||||
(set! (-> this frontline w)
|
||||
(- (+ 40960.0 (vector-dot (the-as vector (-> this frontline)) (get-trans a0-1 0))))
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate traveling (ashelin-oasis)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type ashelin traveling) enter)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(nav-enemy-method-177 self)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate knocked (ashelin-oasis)
|
||||
:virtual #t
|
||||
:exit (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type ashelin knocked) exit)))
|
||||
(if t9-0
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self root penetrated-by) (penetrate vehicle))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ashelin-method-256 ((this ashelin-oasis))
|
||||
(if (time-elapsed? (-> this last-speech-time) (seconds 10))
|
||||
((method-of-type ashelin ashelin-method-256) this)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch time-frame vs gui-connection.
|
||||
(defmethod play-speech-by-id ((this ashelin-oasis) (arg0 int))
|
||||
(let* ((s4-0 (-> this course))
|
||||
(s3-0 (-> s4-0 speeches arg0))
|
||||
)
|
||||
(logior! (-> s3-0 flags) (bot-speech-info-flag playing))
|
||||
(let* ((t2-0 (-> s3-0 hold-time))
|
||||
(s5-0 (add-process
|
||||
*gui-control*
|
||||
this
|
||||
(-> this channel)
|
||||
(gui-action play)
|
||||
(-> s3-0 name)
|
||||
-99.0
|
||||
(the-as time-frame t2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (-> s4-0 speech-tunings (-> s3-0 tuning-id))))
|
||||
(sound-params-set!
|
||||
*gui-control*
|
||||
s5-0
|
||||
(-> v1-5 trans?)
|
||||
(-> v1-5 fo-min)
|
||||
(-> v1-5 fo-max)
|
||||
(-> v1-5 fo-curve)
|
||||
-1.0
|
||||
)
|
||||
)
|
||||
(set! (-> this last-sound-id) s5-0)
|
||||
)
|
||||
)
|
||||
(ashelin-oasis-method-263 this #t)
|
||||
(let ((v0-3 (current-time)))
|
||||
(set! (-> this last-speech-time) v0-3)
|
||||
(the-as gui-connection v0-3)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod ashelin-oasis-method-263 ((this ashelin-oasis) (arg0 symbol))
|
||||
(with-pp
|
||||
(when (channel-active? this (gui-channel none))
|
||||
(let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (math-camera-pos)))
|
||||
(f30-0 (vector-length s4-1))
|
||||
(v1-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (math-camera-matrix) fvec) f30-0))
|
||||
(s3-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(if (< f30-0 122880.0)
|
||||
(set! (-> s3-2 quad) (-> v1-7 quad))
|
||||
(set! (-> s3-2 quad) (-> s4-1 quad))
|
||||
)
|
||||
(vector+! s3-2 s3-2 (math-camera-pos))
|
||||
(if arg0
|
||||
(set! (-> this last-sound-trans quad) (-> s3-2 quad))
|
||||
(vector-seek-3d-smooth! (-> this last-sound-trans) s3-2 (* 102400.0 (seconds-per-frame)) 1.0)
|
||||
)
|
||||
)
|
||||
(when *sound-player-enable*
|
||||
(let ((s5-1 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
|
||||
(set! (-> s5-1 command) (sound-command set-param))
|
||||
(set! (-> s5-1 id) (-> this last-sound-id))
|
||||
(let ((a1-4 (-> this last-sound-trans)))
|
||||
(let ((gp-1 pp))
|
||||
(when (= a1-4 #t)
|
||||
(if (and gp-1 (type? gp-1 process-drawable) (nonzero? (-> (the-as process-drawable gp-1) root)))
|
||||
(set! a1-4 (-> (the-as process-drawable gp-1) root trans))
|
||||
(set! a1-4 (the-as vector #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
(sound-trans-convert (-> s5-1 params trans) a1-4)
|
||||
)
|
||||
(set! (-> s5-1 params mask) (the-as uint 32))
|
||||
(-> s5-1 id)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-common-post ((this ashelin-oasis))
|
||||
(let ((t9-0 (method-of-type ashelin enemy-common-post)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(ashelin-oasis-method-263 this #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-inv-mass ((this ashelin-oasis))
|
||||
0.033333335
|
||||
)
|
||||
|
||||
(defmethod event-handler ((this ashelin-oasis) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('impact-impulse)
|
||||
(let ((v1-1 (the-as object (-> arg3 param 0))))
|
||||
(when (< 4096.0 (-> (the-as rigid-body-impact v1-1) impulse))
|
||||
(logior! (-> this root penetrated-by) (penetrate vehicle))
|
||||
(go (method-of-object this knocked))
|
||||
((method-of-type ashelin event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type ashelin event-handler) this arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *ash-oasis-course*
|
||||
(new 'static 'ashelin-course
|
||||
:speech-count #x2b
|
||||
:spot-count #x6
|
||||
:attack-player-speeches (new 'static 'bot-speech-list-shuffle
|
||||
:flags (bot-speech-list-flag bsl1 bsl2 bsl3)
|
||||
:last-local-index -1
|
||||
:speech-indexes (new 'static 'boxed-array :type int16 5 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
|
||||
)
|
||||
:default-check-too-far #f
|
||||
:waypoints (new 'static 'boxed-array :type bot-waypoint
|
||||
(new 'static 'bot-waypoint
|
||||
:waypoint-id 1
|
||||
:skip-to -1
|
||||
:on-set (lambda ((arg0 ashelin-oasis))
|
||||
(bot-method-223 arg0)
|
||||
(move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0)))
|
||||
(let ((v1-6 25))
|
||||
(set! (-> arg0 hit-points) (the float v1-6))
|
||||
(set! (-> arg0 enemy-info default-hit-points) (the float v1-6))
|
||||
)
|
||||
(set! (-> arg0 waypoint-time0) 0)
|
||||
(go-to-waypoint! arg0 3 #f)
|
||||
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
|
||||
#t
|
||||
)
|
||||
:on-update #f
|
||||
:on-skipping-here #f
|
||||
:check-too-far #f
|
||||
)
|
||||
(new 'static 'bot-waypoint
|
||||
:waypoint-id 2
|
||||
:nav-mesh-index -1
|
||||
:skip-to -1
|
||||
:on-set #f
|
||||
:on-update #f
|
||||
:on-skipping-here #f
|
||||
:check-too-far #f
|
||||
)
|
||||
(new 'static 'bot-waypoint
|
||||
:waypoint-id 3
|
||||
:nav-mesh-index -1
|
||||
:skip-to -1
|
||||
:on-set (lambda ((arg0 ashelin-oasis))
|
||||
(send-event arg0 'hide #f)
|
||||
(set! (-> arg0 minimap) (add-icon! *minimap* arg0 (the-as uint 146) (the-as int #f) (the-as vector #t) 0))
|
||||
(set-time! (-> arg0 last-speech-time))
|
||||
(ashelin-method-261 arg0 #t)
|
||||
(set! (-> arg0 notice-enemy-dist) 245760.0)
|
||||
(logior! (-> arg0 bot-flags) (bot-flag bf06))
|
||||
(logior! (-> arg0 bot-flags) (bot-flag bf20))
|
||||
(let ((s5-0 (-> arg0 course spots)))
|
||||
(vector-! (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 2)) (the-as vector (-> s5-0 1)))
|
||||
(vector-normalize! (-> arg0 frontline) 1.0)
|
||||
(set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 1)))))
|
||||
)
|
||||
(set-frontline arg0)
|
||||
(let ((v1-23 (get-task-by-type (-> arg0 ai-ctrl) asht-wait-spot arg0)))
|
||||
(set! (-> v1-23 bytes 5) 2)
|
||||
(set! (-> v1-23 bytes 6) 3)
|
||||
(set! (-> v1-23 bytes 7) 4)
|
||||
(let ((v0-6
|
||||
(lambda ((arg0 asht-wait-spot) (arg1 ashelin-oasis))
|
||||
(when (and (not (channel-active? arg1 (gui-channel none))) (time-elapsed? (-> arg1 last-speech-time) (seconds 5)))
|
||||
(cond
|
||||
((and (not (course-speech-playing? arg1 35)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 1)))
|
||||
(play-speech-by-id arg1 35)
|
||||
)
|
||||
((and (not (course-speech-playing? arg1 39)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 30)))
|
||||
(play-speech-by-id arg1 39)
|
||||
)
|
||||
((and (not (course-speech-playing? arg1 37)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 60)))
|
||||
(play-speech-by-id arg1 37)
|
||||
)
|
||||
((and (not (course-speech-playing? arg1 38)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 90)))
|
||||
(play-speech-by-id arg1 38)
|
||||
)
|
||||
((and (not (course-speech-playing? arg1 36)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 120)))
|
||||
(play-speech-by-id arg1 36)
|
||||
)
|
||||
((and (not (course-speech-playing? arg1 42)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 150)))
|
||||
(play-speech-by-id arg1 42)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as asht-wait-spot v1-23) check-done) (the-as (function asht-wait-spot ashelin symbol) v0-6))
|
||||
v0-6
|
||||
)
|
||||
)
|
||||
)
|
||||
:on-update (lambda ((arg0 ashelin-oasis))
|
||||
(local-vars (v0-5 bot-flag))
|
||||
(set-frontline arg0)
|
||||
(let* ((a1-0 (target-pos 0))
|
||||
(f0-0 (vector-vector-xz-distance-squared (-> arg0 root trans) a1-0))
|
||||
(f1-0 409600.0)
|
||||
(s5-0 (< f0-0 (* f1-0 f1-0)))
|
||||
)
|
||||
(if s5-0
|
||||
(set-time! (-> arg0 player-in-bounds-time))
|
||||
)
|
||||
(when (time-elapsed? (-> arg0 player-in-bounds-time) (seconds 6))
|
||||
(send-event arg0 'instant-death)
|
||||
(play-speech-by-id arg0 41)
|
||||
)
|
||||
(cond
|
||||
((not s5-0)
|
||||
(set! v0-5 (logior (-> arg0 bot-flags) (bot-flag bf10)))
|
||||
(set! (-> arg0 bot-flags) v0-5)
|
||||
)
|
||||
(else
|
||||
(set! v0-5 (logclear (-> arg0 bot-flags) (bot-flag bf10)))
|
||||
(set! (-> arg0 bot-flags) v0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-5
|
||||
)
|
||||
:on-skipping-here #f
|
||||
:check-too-far #f
|
||||
)
|
||||
(new 'static 'bot-waypoint
|
||||
:waypoint-id 4
|
||||
:nav-mesh-index -1
|
||||
:skip-to -1
|
||||
:on-set #f
|
||||
:on-update #f
|
||||
:on-skipping-here #f
|
||||
:check-too-far #f
|
||||
)
|
||||
(new 'static 'bot-waypoint
|
||||
:waypoint-id 5
|
||||
:nav-mesh-index -1
|
||||
:skip-to -1
|
||||
:on-set #f
|
||||
:on-update #f
|
||||
:on-skipping-here #f
|
||||
:check-too-far #f
|
||||
)
|
||||
)
|
||||
:speeches (new 'static 'inline-array bot-speech-info 43
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha008")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha002")
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf10)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha003"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf06)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha004"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf06)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha005"
|
||||
)
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha006")
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha018"
|
||||
)
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha019")
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha020"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha021"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha022"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha023"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha024"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha025"
|
||||
)
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha026")
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha027"
|
||||
)
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha028")
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha029"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf10)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha030"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf09)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha031"
|
||||
)
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha035")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha036")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha039")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha041")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha052")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha054")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha014")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha015")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha016")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha017")
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf11)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha038"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf11)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha044"
|
||||
)
|
||||
(new 'static 'bot-speech-info
|
||||
:flags (bot-speech-info-flag sf11)
|
||||
:hold-time (seconds 0.3)
|
||||
:slave-id -1
|
||||
:name "asha049"
|
||||
)
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha032")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha034")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha037")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha042")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash104")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash111")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash113")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash114")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash117")
|
||||
(new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash118")
|
||||
)
|
||||
:speech-tunings (new 'static 'inline-array bot-speech-tuning 1
|
||||
(new 'static 'bot-speech-tuning :fo-min 15 :fo-max #x12c :fo-curve 9 :trans? #f)
|
||||
)
|
||||
:spots (new 'static 'inline-array bot-spot 6
|
||||
(new 'static 'bot-spot :center (new 'static 'vector :x 2540830.8 :y 72540.16 :z 10318971.0 :w 16384.0))
|
||||
(new 'static 'bot-spot :center (new 'static 'vector :x 2381537.2 :y 85770.24 :z 10326016.0 :w 4096.0))
|
||||
(new 'static 'bot-spot :center (new 'static 'vector :x 2333696.0 :y 87941.12 :z 10350346.0 :w 4096.0))
|
||||
(new 'static 'bot-spot :center (new 'static 'vector :x 2456617.0 :y 87777.28 :z 10412892.0 :w 16384.0))
|
||||
(new 'static 'bot-spot :center (new 'static 'vector :x 2405294.0 :y 84623.36 :z 10283336.0 :w 16384.0))
|
||||
(new 'static 'bot-spot :center (new 'static 'vector :x 2439454.8 :y 106086.4 :z 10570424.0 :w 16384.0))
|
||||
)
|
||||
:ouch-speeches (new 'static 'bot-speech-list-shuffle
|
||||
:flags (bot-speech-list-flag bsl1 bsl2)
|
||||
:last-local-index -1
|
||||
:speech-indexes (new 'static 'boxed-array :type int16 26 27 28 29 30 31 32 40)
|
||||
)
|
||||
:victory-speeches (new 'static 'bot-speech-list-shuffle
|
||||
:flags (bot-speech-list-flag bsl2 bsl3)
|
||||
:last-local-index -1
|
||||
:speech-indexes (new 'static 'boxed-array :type int16 0 20 21 22 23 24 25)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(set! (-> *bot-course-table* course 0) *ash-oasis-course*)
|
||||
|
||||
@@ -7,3 +7,807 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype oasis-point (structure)
|
||||
((pos vector :inline)
|
||||
(quat quaternion :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *oasis-marauder-start* (new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2458461.0 :y 81688.164 :z 10302577.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x 0.0006 :y 0.5862 :z -0.0012 :w 0.8101)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2450950.2 :y 82370.97 :z 10330767.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x -0.0008 :y -0.7239 :z 0.001 :w -0.6898)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2458173.8 :y 82435.69 :z 10352404.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x 0.001 :y 0.8624 :z -0.0008 :w 0.506)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *oasis-vehicle-start* (new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2378927.8 :y 89453.77 :z 10338013.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x -0.0047 :y 0.8075 :z -0.0137 :w 0.5896)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2416701.5 :y 87323.85 :z 10297737.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x -0.0007 :y -0.1249 :z -0.0329 :w 0.9916)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2411298.5 :y 90682.984 :z 10373812.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x 0.041 :y 0.9921 :z -0.0557 :w 0.104)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *oasis-vehicle-path* (the-as (array (array oasis-point))
|
||||
(new 'static 'boxed-array :type array
|
||||
(new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 1643712.1 :y 135682.05 :z 10027475.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x 0.0013 :y 0.52 :z 0.0005 :w 0.8541)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 1834901.5 :y 126926.03 :z 10381510.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.4936 :w 0.8696)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2164965.5 :y 103604.23 :z 10309546.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.7718 :w 0.6357)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2351683.5 :y 89942.836 :z 10210302.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.9924 :w -0.1222)
|
||||
)
|
||||
)
|
||||
(new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2656992.8 :y 158144.11 :z 12118015.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.9957 :w 0.092)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2729601.5 :y 154424.11 :z 11455859.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.9626 :w 0.2709)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2346952.2 :y 104915.766 :z 10551702.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.7954 :w 0.6059)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2446049.2 :y 93183.59 :z 10450630.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x -0.0005 :y -0.999 :z 0.0014 :w -0.044)
|
||||
)
|
||||
)
|
||||
(new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 1486110.8 :y 118251.52 :z 11689861.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.9323 :w 0.3615)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 1744946.0 :y 140856.11 :z 10625518.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :x 0.0001 :y -0.7207 :z 0.0015 :w -0.6932)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2165376.5 :y 96137.625 :z 10535523.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.9339 :w -0.3572)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2379151.2 :y 85637.12 :z 10319897.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.9317 :w -0.3631)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *oasis-vehicle-fx-path* (the-as (array (array oasis-point))
|
||||
(new 'static 'boxed-array :type array
|
||||
(new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 1905749.2 :y 139053.06 :z 11196600.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.876 :w -0.4823)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2656209.8 :y 67824.44 :z 10573690.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.876 :w -0.4823)
|
||||
)
|
||||
)
|
||||
(new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2206190.0 :y 154991.83 :z 11345007.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.9882 :w -0.153)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2565465.0 :y 111149.055 :z 10101822.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.9882 :w -0.153)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *oasis-marauder-spawn-point* (new 'static 'boxed-array :type oasis-point
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2397388.5 :y 91552.56 :z 10411445.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.8685 :w 0.4955)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2498060.2 :y 95181.62 :z 10163618.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.0501 :w 0.9987)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2601913.5 :y 70653.95 :z 10246909.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.2036 :w -0.979)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2304180.2 :y 88062.36 :z 10259569.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.3212 :w -0.9469)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2293810.0 :y 89958.4 :z 10373563.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.7906 :w -0.6123)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2557681.8 :y 86204.01 :z 10528274.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.9788 :w -0.2044)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2483336.8 :y 95299.99 :z 10500398.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.9819 :w -0.189)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2579720.2 :y 69928.55 :z 10425897.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.8771 :w -0.4801)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2405315.0 :y 90315.164 :z 10202601.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y -0.2878 :w -0.9576)
|
||||
)
|
||||
(new 'static 'oasis-point
|
||||
:pos (new 'static 'vector :x 2543300.5 :y 79528.76 :z 10235757.0 :w 1.0)
|
||||
:quat (new 'static 'quaternion :y 0.493 :w -0.87)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype oasis-vehicle (structure)
|
||||
((handle handle)
|
||||
(path-type int8)
|
||||
(path-pos int8)
|
||||
(spawned-marauder? symbol)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype oasis-marauder (structure)
|
||||
((handle handle)
|
||||
(initialized? symbol)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype task-manager-desert-oasis-defense (task-manager)
|
||||
((nav-mesh nav-mesh)
|
||||
(vehicle oasis-vehicle 3 :inline)
|
||||
(vehicle-count uint8)
|
||||
(v-free-list (array uint8))
|
||||
(marauder oasis-marauder 7 :inline)
|
||||
(m-free-list (array uint8))
|
||||
(marauder-count uint8)
|
||||
(total-spawned uint8)
|
||||
(total-veh-spawned uint8)
|
||||
(check-timer time-frame)
|
||||
(trans-timer time-frame)
|
||||
(veh-fx handle 2)
|
||||
(veh-fx-timer time-frame)
|
||||
(ash-entity entity-actor)
|
||||
(marauder-entity entity-actor)
|
||||
(last-kill-time time-frame)
|
||||
)
|
||||
(:methods
|
||||
(spawn-v-marauder (_type_ int int) handle)
|
||||
(spawn-marauder (_type_ oasis-point symbol) handle)
|
||||
(task-manager-desert-oasis-defense-method-34 (_type_) none)
|
||||
(task-manager-desert-oasis-defense-method-35 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defstate active (task-manager-desert-oasis-defense)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(local-vars (f30-1 float))
|
||||
(when (not (task-node-closed? (game-task-node desert-oasis-defense-meeting)))
|
||||
(was-squad-manager-start self)
|
||||
(let ((v1-1 *was-squad-control*))
|
||||
(set! (-> v1-1 target-count) 3)
|
||||
(set! (-> v1-1 reserve-count) 40)
|
||||
)
|
||||
(loop
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self ash-entity extra trans quad))
|
||||
(let ((f30-0 (vector-vector-distance gp-0 (target-pos 0))))
|
||||
(when (and *was-squad-manager* (< f30-0 3276800.0))
|
||||
(set! (-> *was-squad-control* target-count) 0)
|
||||
0
|
||||
)
|
||||
(if (and (< f30-0 819200.0) (-> *setting-control* user-current turbo))
|
||||
(set-setting! 'turbo #f 0.0 0)
|
||||
)
|
||||
(when (< f30-0 327680.0)
|
||||
(was-squad-manager-kill)
|
||||
(set-setting! 'stop-vehicle? #t 0.0 0)
|
||||
(send-event *target* 'change-mode 'normal)
|
||||
(set-setting! 'pilot #f 0.0 0)
|
||||
#t
|
||||
(goto cfg-23)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
0
|
||||
)
|
||||
)
|
||||
(label cfg-23)
|
||||
(when (and *target* (focus-test? *target* pilot-riding) (handle->process (-> *target* pilot vehicle)))
|
||||
(-> self player-vehicle)
|
||||
(let ((v1-49 (-> *target* pilot vehicle)))
|
||||
(send-event (handle->process v1-49) 'ignore-damage #t)
|
||||
)
|
||||
)
|
||||
(while (not (task-node-closed? (game-task-node desert-oasis-defense-meeting)))
|
||||
(suspend)
|
||||
)
|
||||
(when (not (task-node-closed? (game-task-node desert-oasis-defense-battle)))
|
||||
(set-setting! 'string-max-length 'abs (meters 18.5) 0)
|
||||
(set-setting! 'string-max-height 'abs (meters 6) 0)
|
||||
(set-setting! 'music 'oasisfi 0.0 0)
|
||||
(set-setting! 'fog-special-interp-rate #f 0.025 0)
|
||||
(set-setting! 'fog-special-interp-targ #f 0.9 0)
|
||||
(dotimes (gp-1 (length *oasis-vehicle-start*))
|
||||
(spawn-v-marauder self -1 gp-1)
|
||||
)
|
||||
(dotimes (gp-2 (length *oasis-marauder-start*))
|
||||
(spawn-marauder self (-> *oasis-marauder-start* gp-2) #f)
|
||||
)
|
||||
(set-time! (-> self check-timer))
|
||||
(set-time! (-> self veh-fx-timer))
|
||||
(set! (-> self hud-counter)
|
||||
(ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to self))
|
||||
)
|
||||
(set! (-> *game-info* counter) (the float (- (+ (-> self marauder-count) 57) (-> self total-spawned))))
|
||||
(until (and (>= (-> self total-spawned) (the-as uint 57))
|
||||
(zero? (-> self marauder-count))
|
||||
(zero? (-> self vehicle-count))
|
||||
)
|
||||
(when (>= (+ (current-time) (seconds -20)) (-> self veh-fx-timer))
|
||||
(dotimes (gp-4 2)
|
||||
(when (= (-> self veh-fx gp-4) #f)
|
||||
(when (rand-vu-percent? 0.7)
|
||||
(let ((s5-1 (-> *oasis-vehicle-fx-path* gp-4 0))
|
||||
(s4-0 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0))
|
||||
)
|
||||
(vector-z-quaternion! (-> s4-0 vec) (-> s5-1 quat))
|
||||
(vector-float*! (-> s4-0 vec) (-> s4-0 vec) 204800.0)
|
||||
(set! (-> s4-0 params object-type) (the-as uint 6))
|
||||
(set! (-> s4-0 params behavior) (the-as uint 3))
|
||||
(set! (-> s4-0 params id) (the-as uint 0))
|
||||
(set! (-> s4-0 params nav-mesh) (-> self nav-mesh))
|
||||
(set! (-> s4-0 params nav-branch) #f)
|
||||
(set! (-> s4-0 params proc) #f)
|
||||
(set! (-> s4-0 params handle) (the-as handle #f))
|
||||
(set! (-> s4-0 params user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 params flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-0 params guard-type) (the-as uint 11))
|
||||
(set! (-> s4-0 params entity) #f)
|
||||
(set! (-> s4-0 params velocity quad) (-> s4-0 vec quad))
|
||||
(set! (-> s4-0 params position quad) (-> s5-1 pos quad))
|
||||
(quaternion-copy! (-> s4-0 params rotation) (-> s5-1 quat))
|
||||
(let ((s5-2 (vehicle-spawn (vehicle-type v-marauder) (-> s4-0 params))))
|
||||
(when s5-2
|
||||
(iterate-prims
|
||||
(the-as collide-shape-moving (-> s5-2 root))
|
||||
(lambda ((arg0 collide-shape-prim)) (logior! (-> arg0 prim-core collide-as) (collide-spec enemy)) (none))
|
||||
)
|
||||
(logior! (-> s5-2 mask) (process-mask enemy))
|
||||
(set! (-> self veh-fx gp-4) (process->handle s5-2))
|
||||
(suspend)
|
||||
(send-event
|
||||
(handle->process (-> self veh-fx gp-4))
|
||||
'ai-set-target-position
|
||||
(-> *oasis-vehicle-fx-path* gp-4 1 pos)
|
||||
)
|
||||
(send-event (handle->process (-> self veh-fx gp-4)) 'ai-set-target-speed 327680.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-time! (-> self veh-fx-timer))
|
||||
)
|
||||
(when (>= (+ (current-time) (seconds -2.5)) (-> self check-timer))
|
||||
(when (and (< (-> self vehicle-count) (the-as uint 3)) (< (-> self total-spawned) (the-as uint 57)))
|
||||
(let ((gp-5 0))
|
||||
(dotimes (v1-156 3)
|
||||
(let ((a0-71 (-> self vehicle v1-156)))
|
||||
(if (!= (-> a0-71 handle) #f)
|
||||
(set! gp-5 (logior gp-5 (ash 1 (-> a0-71 path-type))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(spawn-v-marauder self (rand-vu-int-count-excluding (length *oasis-vehicle-path*) gp-5) -1)
|
||||
)
|
||||
)
|
||||
(let ((gp-6 (-> (camera-matrix) fvec))
|
||||
(s5-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(dotimes (s4-2 (length *oasis-marauder-spawn-point*))
|
||||
(when (and (< (-> self marauder-count) (the-as uint 7)) (< (-> self total-spawned) (the-as uint 57)))
|
||||
(let ((s3-1 (-> *oasis-marauder-spawn-point* s4-2)))
|
||||
(vector-! s5-4 (-> s3-1 pos) (camera-pos))
|
||||
(if (< (vector-dot gp-6 s5-4) 0.0)
|
||||
(spawn-marauder self s3-1 #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-time! (-> self check-timer))
|
||||
)
|
||||
(let ((v1-182 (- (+ (-> self marauder-count) 57) (-> self total-spawned))))
|
||||
(cond
|
||||
((zero? v1-182)
|
||||
(when (-> self hud-counter)
|
||||
(send-event (handle->process (-> self hud-counter)) 'hide-and-die)
|
||||
(set! (-> self hud-counter) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *game-info* counter) (the float v1-182))
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(dotimes (gp-7 2)
|
||||
(let ((a0-92 (handle->process (-> self veh-fx gp-7))))
|
||||
(when a0-92
|
||||
(deactivate a0-92)
|
||||
(set! (-> self veh-fx gp-7) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-setting! 'fog-special-interp-rate #f 0.2 0)
|
||||
(set-setting! 'fog-special-interp-targ #f 0.2 0)
|
||||
(when (handle->process (-> *game-info* dust-storm))
|
||||
1.0
|
||||
(let ((gp-8 (-> *game-info* dust-storm)))
|
||||
(until (< f30-1 0.4)
|
||||
(let ((a1-37 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-37 from) (process->ppointer self))
|
||||
(set! (-> a1-37 num-params) 0)
|
||||
(set! (-> a1-37 message) 'get-intensity)
|
||||
(let ((t9-42 send-event-function)
|
||||
(a0-102 (handle->process gp-8))
|
||||
)
|
||||
(set! f30-1 (the-as float (t9-42 a0-102 a1-37)))
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event self 'complete)
|
||||
)
|
||||
(sleep-code)
|
||||
)
|
||||
:post (behavior ()
|
||||
(task-manager-desert-oasis-defense-method-35 self)
|
||||
0
|
||||
)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; WARN: Return type mismatch time-frame vs none.
|
||||
(defmethod task-manager-method-26 ((this task-manager-desert-oasis-defense))
|
||||
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(when (time-elapsed? (-> this trans-timer) (seconds 0.1))
|
||||
(dotimes (s5-0 3)
|
||||
(let ((s4-0 (-> this vehicle s5-0))
|
||||
(v1-8 (-> this vehicle s5-0 handle))
|
||||
)
|
||||
(when (!= v1-8 #f)
|
||||
(let ((s3-0 (handle->process v1-8)))
|
||||
(cond
|
||||
(s3-0
|
||||
(when (>= (-> s4-0 path-type) 0)
|
||||
(let* ((s2-0 (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos)))
|
||||
(s1-0 (= (+ (length (-> *oasis-vehicle-path* (-> s4-0 path-type))) -1) (-> s4-0 path-pos)))
|
||||
(f30-0 (vector-vector-distance-squared (-> s2-0 pos) (-> (the-as process-drawable s3-0) root trans)))
|
||||
)
|
||||
(when (and (not s1-0) (let ((f0-0 81920.0))
|
||||
(< f30-0 (* f0-0 f0-0))
|
||||
)
|
||||
)
|
||||
(+! (-> s4-0 path-pos) 1)
|
||||
(send-event s3-0 'ai-set-target-position (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos) pos))
|
||||
(send-event s3-0 'ai-set-target-speed 163840.0)
|
||||
(send-event s3-0 'ai-set-target-process *target*)
|
||||
)
|
||||
(if (and s1-0 (let ((f0-3 122880.0))
|
||||
(< f30-0 (* f0-3 f0-3))
|
||||
)
|
||||
)
|
||||
(send-event s3-0 'ai-set-target-speed 122880.0)
|
||||
)
|
||||
(when (-> s4-0 spawned-marauder?)
|
||||
(send-event s3-0 'ai-set-target-speed 81920.0)
|
||||
(send-event s3-0 'ai-set-target-position (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos) pos))
|
||||
)
|
||||
(when (and s1-0 (not (-> s4-0 spawned-marauder?)) (let ((f0-6 40960.0))
|
||||
(and (< f30-0 (* f0-6 f0-6))
|
||||
(< (-> this marauder-count) (the-as uint 7))
|
||||
(< (-> this total-spawned) (the-as uint 57))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-10 (handle->process (spawn-marauder this s2-0 #t))))
|
||||
(when a1-10
|
||||
(let ((v1-83 (new 'stack-no-clear 'wvehicle-ai-drop-off-params)))
|
||||
(set! (-> v1-83 proc) a1-10)
|
||||
(set! (-> v1-83 dest quad) (-> s2-0 pos quad))
|
||||
(send-event s3-0 'ai-drop-off v1-83)
|
||||
)
|
||||
(set! (-> s4-0 spawned-marauder?) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this vehicle s5-0 handle) (the-as handle #f))
|
||||
(+! (-> this vehicle-count) -1)
|
||||
(let ((s4-1 (-> this v-free-list)))
|
||||
(set! (-> s4-1 (length s4-1)) (the-as uint s5-0))
|
||||
(+! (-> s4-1 length) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 2)
|
||||
(let ((s4-2 (handle->process (-> this veh-fx s5-1))))
|
||||
(cond
|
||||
(s4-2
|
||||
(let ((f30-1 (vector-vector-distance-squared
|
||||
(-> *oasis-vehicle-fx-path* s5-1 1 pos)
|
||||
(-> (the-as process-drawable s4-2) root trans)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-9 102400.0))
|
||||
(when (< f30-1 (* f0-9 f0-9))
|
||||
(let* ((s2-1 (-> (the-as process-drawable s4-2) root quat))
|
||||
(s3-2 (vector-normalize! (vector-x-quaternion! (new 'stack-no-clear 'vector) s2-1) 40960.0))
|
||||
(v1-109 (vector-normalize! (vector-y-quaternion! (new 'stack-no-clear 'vector) s2-1) 102400.0))
|
||||
)
|
||||
(vector+! s3-2 (-> (the-as process-drawable s4-2) root trans) s3-2)
|
||||
(send-event s4-2 'apply-impulse s3-2 v1-109)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-12 40960.0))
|
||||
(when (< f30-1 (* f0-12 f0-12))
|
||||
(send-event
|
||||
s4-2
|
||||
'attack
|
||||
#f
|
||||
(static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 2000.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 0.0)
|
||||
(attacker-velocity (new 'static 'vector :w 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this veh-fx s5-1) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this veh-fx s5-1) (the-as handle #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-2 7)
|
||||
(let* ((s3-3 (-> this marauder s5-2))
|
||||
(v1-129 (-> s3-3 handle))
|
||||
)
|
||||
(when (!= v1-129 #f)
|
||||
(let* ((s2-2 (handle->process v1-129))
|
||||
(s4-3 (if (type? s2-2 process-focusable)
|
||||
s2-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(s4-3
|
||||
(cond
|
||||
((not (-> s3-3 initialized?))
|
||||
(send-event s4-3 'go-hostile)
|
||||
(send-event s4-3 'target-pos (target-pos 0))
|
||||
(set! (-> s3-3 initialized?) #t)
|
||||
)
|
||||
((and (-> s3-3 initialized?)
|
||||
(and (-> s4-3 next-state) (= (-> s4-3 next-state name) 'dormant))
|
||||
(>= (+ (current-time) (seconds -10)) (-> this last-kill-time))
|
||||
)
|
||||
(deactivate s4-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this marauder s5-2 handle) (the-as handle #f))
|
||||
(+! (-> this marauder-count) -1)
|
||||
(let ((s4-4 (-> this m-free-list)))
|
||||
(set! (-> s4-4 (length s4-4)) (the-as uint s5-2))
|
||||
(+! (-> s4-4 length) 1)
|
||||
)
|
||||
(set-time! (-> this last-kill-time))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-time! (-> this trans-timer))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod task-manager-desert-oasis-defense-method-35 ((this task-manager-desert-oasis-defense))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod spawn-marauder ((this task-manager-desert-oasis-defense) (arg0 oasis-point) (arg1 symbol))
|
||||
(let ((s5-0 (-> this m-free-list)))
|
||||
(when (nonzero? (length s5-0))
|
||||
(let ((s3-0 (-> this marauder (-> s5-0 (+ (length s5-0) -1))))
|
||||
(s2-0 49)
|
||||
(f30-0 30.0)
|
||||
)
|
||||
(let ((v1-13 (-> *game-info* sub-task-list (game-task-node desert-oasis-defense-battle))))
|
||||
(when (and v1-13 (>= (-> v1-13 death-count) 0))
|
||||
(when (and *target* (and (>= 5.0 (-> *target* fact health)) (rand-vu-percent? 0.6)))
|
||||
(set! s2-0 20)
|
||||
(set! f30-0 2.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s0-0 (new 'stack-no-clear 'marauder-init-by-other-params)))
|
||||
(set! (-> s0-0 trans quad) (-> arg0 pos quad))
|
||||
(quaternion-copy! (-> s0-0 quat) (-> arg0 quat))
|
||||
(set! (-> s0-0 entity) (-> this marauder-entity))
|
||||
(set! (-> s0-0 directed?) #f)
|
||||
(set! (-> s0-0 no-initial-move-to-ground?) #t)
|
||||
(set! (-> s0-0 multi-focus) #t)
|
||||
(set! (-> s0-0 skip-jump) #f)
|
||||
(let* ((s1-2 (ppointer->process (process-spawn marauder this s0-0 :name "marauder" :to this)))
|
||||
(s0-1 (if (type? s1-2 process-focusable)
|
||||
s1-2
|
||||
)
|
||||
)
|
||||
(s1-3 (if (type? s0-1 marauder)
|
||||
(the-as marauder s0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s1-3
|
||||
(change-to (-> this nav-mesh) s1-3)
|
||||
(let ((v1-38 (-> s1-3 nav state)))
|
||||
(set! (-> v1-38 current-poly) (the-as nav-poly #f))
|
||||
)
|
||||
0
|
||||
(reset-to-collide-spec (-> s1-3 focus) (collide-spec jak bot hit-by-others-list player-list jak-vehicle))
|
||||
(logior! (-> s1-3 fact options) (actor-option dont-override-fact))
|
||||
(set! (-> s1-3 fact pickup-type) (the-as pickup-type s2-0))
|
||||
(set! (-> s1-3 fact pickup-amount) f30-0)
|
||||
(set! (-> s1-3 fact pickup-spawn-amount) f30-0)
|
||||
(set! (-> s3-0 handle) (process->handle s1-3))
|
||||
(set! (-> s3-0 initialized?) arg1)
|
||||
(+! (-> this marauder-count) 1)
|
||||
(+! (-> s5-0 length) -1)
|
||||
(+! (-> this total-spawned) 1)
|
||||
(add-icon! *minimap* s1-3 (the-as uint 117) (the-as int #f) (the-as vector #t) 0)
|
||||
(return (-> s3-0 handle))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as handle #f)
|
||||
)
|
||||
|
||||
(defmethod spawn-v-marauder ((this task-manager-desert-oasis-defense) (arg0 int) (arg1 int))
|
||||
(local-vars (sv-240 mystery-traffic-object-spawn-params0))
|
||||
(let ((s5-0 (-> this v-free-list))
|
||||
(s4-0 (>= arg1 0))
|
||||
)
|
||||
(when (nonzero? (length s5-0))
|
||||
(let ((s3-0 (-> this vehicle (-> s5-0 (+ (length s5-0) -1)))))
|
||||
(let ((s0-0 (if s4-0
|
||||
(-> *oasis-vehicle-start* arg1)
|
||||
(-> *oasis-vehicle-path* arg0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-240 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0))
|
||||
(vector-z-quaternion! (-> sv-240 vec) (-> s0-0 quat))
|
||||
(vector-float*! (-> sv-240 vec) (-> sv-240 vec) (if s4-0
|
||||
0.0
|
||||
204800.0
|
||||
)
|
||||
)
|
||||
(set! (-> sv-240 params object-type) (the-as uint 6))
|
||||
(set! (-> sv-240 params behavior) (the-as uint 3))
|
||||
(set! (-> sv-240 params id) (the-as uint 0))
|
||||
(set! (-> sv-240 params nav-mesh) (-> this nav-mesh))
|
||||
(set! (-> sv-240 params nav-branch) #f)
|
||||
(set! (-> sv-240 params proc) #f)
|
||||
(set! (-> sv-240 params handle) (the-as handle #f))
|
||||
(set! (-> sv-240 params user-data) (the-as uint 0))
|
||||
(set! (-> sv-240 params flags) (traffic-spawn-flags))
|
||||
(set! (-> sv-240 params guard-type) (the-as uint 11))
|
||||
(set! (-> sv-240 params entity) #f)
|
||||
(set! (-> sv-240 params velocity quad) (-> sv-240 vec quad))
|
||||
(set! (-> sv-240 params position quad) (-> s0-0 pos quad))
|
||||
(quaternion-copy! (-> sv-240 params rotation) (-> s0-0 quat))
|
||||
)
|
||||
(let ((s0-1 (vehicle-spawn (vehicle-type v-marauder) (-> sv-240 params))))
|
||||
(when s0-1
|
||||
(iterate-prims
|
||||
(the-as collide-shape-moving (-> s0-1 root))
|
||||
(lambda ((arg0 collide-shape-prim)) (logior! (-> arg0 prim-core collide-as) (collide-spec enemy)) (none))
|
||||
)
|
||||
(logior! (-> s0-1 mask) (process-mask enemy))
|
||||
(send-event s0-1 'ai-set-attack-delay-factor 4.0)
|
||||
(send-event s0-1 'ai-set-inaccuracy-factor 2.0)
|
||||
(set! arg0 (cond
|
||||
(s4-0
|
||||
arg1
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 path-type) arg0)
|
||||
(set! (-> s3-0 path-pos) (if s4-0
|
||||
(+ (length (-> *oasis-vehicle-path* arg1)) -1)
|
||||
0
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 handle) (process->handle s0-1))
|
||||
(set! (-> s3-0 spawned-marauder?) (if s4-0
|
||||
#t
|
||||
#f
|
||||
)
|
||||
)
|
||||
(+! (-> this vehicle-count) 1)
|
||||
(+! (-> s5-0 length) -1)
|
||||
(+! (-> this total-veh-spawned) 1)
|
||||
(return (-> s3-0 handle))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as handle #f)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod task-manager-method-25 ((this task-manager-desert-oasis-defense))
|
||||
(let ((t9-0 (method-of-type task-manager task-manager-method-25)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(send-event (handle->process (-> this player-vehicle)) 'ignore-damage #f)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod set-time-limit ((this task-manager-desert-oasis-defense))
|
||||
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xb5d9)))
|
||||
(set! (-> this v-free-list) (new 'static 'boxed-array :type uint8 :length 0 :allocated-length 3))
|
||||
(dotimes (v1-2 3)
|
||||
(set! (-> this vehicle v1-2 handle) (the-as handle #f))
|
||||
(set! (-> this vehicle v1-2 spawned-marauder?) #f)
|
||||
(set! (-> this v-free-list v1-2) (the-as uint v1-2))
|
||||
)
|
||||
(set! (-> this v-free-list length) 3)
|
||||
(set! (-> this m-free-list) (new 'static 'boxed-array :type uint8 :length 0 :allocated-length 7))
|
||||
(dotimes (v1-7 7)
|
||||
(set! (-> this marauder v1-7 handle) (the-as handle #f))
|
||||
(set! (-> this marauder v1-7 initialized?) #f)
|
||||
(set! (-> this m-free-list v1-7) (the-as uint v1-7))
|
||||
)
|
||||
(set! (-> this m-free-list length) 7)
|
||||
(set! (-> this ash-entity) (the-as entity-actor (entity-by-name "ashelin-npc-3")))
|
||||
(set! (-> this marauder-entity) (the-as entity-actor (entity-by-name "marauder-2")))
|
||||
(dotimes (v1-11 2)
|
||||
(set! (-> this veh-fx v1-11) (the-as handle #f))
|
||||
)
|
||||
(if (= (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox))
|
||||
(set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-scorpion v-toad))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype desoasis-hellcat (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-desoasis-hellcat hellcat hellcat-lod0-jg hellcat-idle-ja
|
||||
((hellcat-lod0-mg (meters 20)) (hellcat-lod1-mg (meters 40)) (hellcat-lod2-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 6.8)
|
||||
:shadow hellcat-shadow-mg
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defstate idle (desoasis-hellcat)
|
||||
:virtual #t
|
||||
:code sleep-code
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this desoasis-hellcat) (arg0 entity-actor))
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
|
||||
(set! (-> v1-2 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-2 transform-index) 3)
|
||||
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 34816.0)
|
||||
(set! (-> s4-0 total-prims) (the-as uint 1))
|
||||
(set! (-> s4-0 root-prim) v1-2)
|
||||
)
|
||||
(set! (-> s4-0 nav-radius) 34816.0)
|
||||
(let ((v1-4 (-> s4-0 root-prim)))
|
||||
(set! (-> s4-0 backup-collide-as) (-> v1-4 prim-core collide-as))
|
||||
(set! (-> s4-0 backup-collide-with) (-> v1-4 prim-core collide-with))
|
||||
)
|
||||
(set! (-> this root) s4-0)
|
||||
)
|
||||
(add-process-drawable-to-nav-mesh (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0) this #f)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton
|
||||
this
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-desoasis-hellcat" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(transform-post)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
@@ -521,11 +521,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs none.
|
||||
(defun was-squad-manager-start ((arg0 process))
|
||||
(kill-by-type was-squad-manager *active-pool*)
|
||||
(process-spawn was-squad-manager :name "was-squad-manager" :to arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
(set! (-> s5-0 wheel-radius) (* (-> s1-0 scale) (-> s1-0 radius)))
|
||||
(set! (-> s5-0 wheel-width) (* (-> s1-0 scale) (-> s1-0 width)))
|
||||
(set! (-> s5-0 wheel-rev-speed) (* (-> s2-0 rev) (-> s5-0 wheel-radius)))
|
||||
(set! (-> s5-0 surface-type) (-> s2-0 surface surface-type))
|
||||
(set! (-> s5-0 surface-type) (the-as uint (-> s2-0 surface surface-type)))
|
||||
(if (< 0.0 (-> s2-0 sink-depth))
|
||||
(set! (-> s5-0 surface-type) (the-as uint 4))
|
||||
)
|
||||
@@ -855,7 +855,7 @@
|
||||
)
|
||||
(set! (-> s3-0 vec1 w) (-> s3-0 vec1 x))
|
||||
(set! (-> s3-0 vec4 quad) (-> this root trans quad))
|
||||
(let ((s2-0 (static-sound-spec "aaaabbbbccccddd" :group 1 :volume 0.0 :mask (pitch))))
|
||||
(let ((s2-0 (static-sound-spec "aaaabbbbccccddd" :group 0 :volume 0.0 :mask (pitch))))
|
||||
(logior! (-> s2-0 mask) (sound-mask trans unk2))
|
||||
(set! (-> s2-0 sound-name) (-> s5-0 sound idle-sound))
|
||||
(set! (-> s2-0 volume) (the int (* 1024.0 (-> s3-0 vec0 x))))
|
||||
|
||||
@@ -127,6 +127,21 @@
|
||||
(declare-type vehicle-wheel-surface structure)
|
||||
(define-extern *wvehicle-surfaces* (inline-array vehicle-wheel-surface))
|
||||
|
||||
;; +++vehicle-wheel-surface-type
|
||||
(defenum vehicle-wheel-surface-type
|
||||
:type uint8
|
||||
(stone)
|
||||
(dirt)
|
||||
(sand)
|
||||
(quicksand)
|
||||
(water)
|
||||
(wall)
|
||||
(conveyor)
|
||||
(none)
|
||||
)
|
||||
;; ---vehicle-wheel-surface-type
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype wvehicle-sound-loop-state (structure)
|
||||
@@ -140,7 +155,7 @@
|
||||
|
||||
(deftype vehicle-wheel-surface (structure)
|
||||
((flags vehicle-wheel-surface-flag)
|
||||
(surface-type uint8)
|
||||
(surface-type vehicle-wheel-surface-type)
|
||||
(friction float)
|
||||
(drag float)
|
||||
(depth float)
|
||||
|
||||
@@ -7,60 +7,65 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *wvehicle-surfaces*
|
||||
(new 'static 'inline-array vehicle-wheel-surface 7
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:friction 1.0
|
||||
:drag 1.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0)
|
||||
:tire-slide-mix (new 'static 'array float 2 1.0 0.0)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type #x1
|
||||
:friction 0.9
|
||||
:drag 1.0
|
||||
:depth 409.6
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 0.5 0.5 0.0 0.5)
|
||||
:tire-slide-mix (new 'static 'array float 2 0.5 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type #x2
|
||||
:friction 0.85
|
||||
:drag 2.0
|
||||
:depth 1024.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 0.0 0.0 1.0 0.25)
|
||||
:tire-slide-mix (new 'static 'array float 2 0.0 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:flags (vehicle-wheel-surface-flag moving)
|
||||
:surface-type #x3
|
||||
:friction 0.5
|
||||
:drag 5.0
|
||||
:damage 1.0
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface :surface-type #x4 :friction 0.25 :drag 4.0 :depth 2048.0 :damage 1.0)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type #x5
|
||||
:friction 0.1
|
||||
:drag 1.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0)
|
||||
:tire-slide-mix (new 'static 'array float 2 1.0 0.0)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:flags (vehicle-wheel-surface-flag moving)
|
||||
:surface-type #x6
|
||||
:friction 1.0
|
||||
:drag 1.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0)
|
||||
:tire-slide-mix (new 'static 'array float 2 1.0 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *wvehicle-surfaces* (new 'static 'inline-array vehicle-wheel-surface 7
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:friction 1.0
|
||||
:drag 1.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0)
|
||||
:tire-slide-mix (new 'static 'array float 2 1.0 0.0)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type (vehicle-wheel-surface-type dirt)
|
||||
:friction 0.9
|
||||
:drag 1.0
|
||||
:depth 409.6
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 0.5 0.5 0.0 0.5)
|
||||
:tire-slide-mix (new 'static 'array float 2 0.5 1.0)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type (vehicle-wheel-surface-type sand)
|
||||
:friction 0.85
|
||||
:drag 2.0
|
||||
:depth 1024.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 0.0 0.0 1.0 0.25)
|
||||
:tire-slide-mix (new 'static 'array float 2 0.0 0.5)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:flags (vehicle-wheel-surface-flag moving)
|
||||
:surface-type (vehicle-wheel-surface-type quicksand)
|
||||
:friction 0.5
|
||||
:drag 5.0
|
||||
:damage 1.0
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type (vehicle-wheel-surface-type water)
|
||||
:friction 0.25
|
||||
:drag 4.0
|
||||
:depth 2048.0
|
||||
:damage 1.0
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:surface-type (vehicle-wheel-surface-type wall)
|
||||
:friction 0.1
|
||||
:drag 1.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0)
|
||||
:tire-slide-mix (new 'static 'array float 2 1.0 0.0)
|
||||
)
|
||||
(new 'static 'vehicle-wheel-surface
|
||||
:flags (vehicle-wheel-surface-flag moving)
|
||||
:surface-type (vehicle-wheel-surface-type conveyor)
|
||||
:friction 1.0
|
||||
:drag 1.0
|
||||
:damage 1.0
|
||||
:tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0)
|
||||
:tire-slide-mix (new 'static 'array float 2 1.0 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod wvehicle-method-160 ((this wvehicle) (arg0 wvehicle-physics-work))
|
||||
(let ((v1-0 (-> this rbody)))
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod control-hook-player ((this hvehicle) (arg0 vehicle-controls))
|
||||
(defmethod control-hook-player ((this hvehicle))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vehicle-controls)))
|
||||
(mem-set32! (&-> gp-0 steering) 6 0)
|
||||
(cond
|
||||
|
||||
@@ -7,3 +7,21 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun lfaccar-activate ((arg0 level))
|
||||
(format 0 "factorya-activate~%")
|
||||
(let ((v1-0 *traffic-info*))
|
||||
(set! (-> v1-0 vehicle-level) arg0)
|
||||
(set! (-> v1-0 vehicle-levels 21) (-> arg0 name))
|
||||
)
|
||||
(vehicle-manager-start (the-as process *entity-pool*))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun lfaccar-deactivate ((arg0 level))
|
||||
(format 0 "factorya-deactivate~%")
|
||||
(set! (-> *traffic-info* vehicle-level) #f)
|
||||
(vehicle-manager-kill)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,378 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype conveyor-section (structure)
|
||||
((start vector :inline)
|
||||
(trailing plane :inline)
|
||||
(pull-dir vector :inline)
|
||||
(radial-dir vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype conveyor-section-array (inline-array-class)
|
||||
((data conveyor-section :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> conveyor-section-array heap-base) (the-as uint 64))
|
||||
|
||||
(deftype conveyor (process-drawable)
|
||||
((speed float)
|
||||
(belt-radius float)
|
||||
(pull-y-threshold float)
|
||||
(speed-mult-array (pointer float))
|
||||
(speed-mult-array-len int8)
|
||||
(sections conveyor-section-array)
|
||||
(leading plane :inline)
|
||||
(collide-bounds sphere :inline)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
(:methods
|
||||
(conveyor-method-21 (_type_) float)
|
||||
(get-skel (_type_) art-group)
|
||||
(alloc-trsqv! (_type_) none)
|
||||
(init-fields! (_type_) none)
|
||||
(alloc-sound! (_type_) none)
|
||||
(init-skel! (_type_) none)
|
||||
(push-focus (_type_ process-focusable) symbol)
|
||||
(find-pushables (_type_) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod relocate ((this conveyor) (offset int))
|
||||
(&+! (-> this sections) offset)
|
||||
(call-parent-method this offset)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs art-group.
|
||||
(defmethod get-skel ((this conveyor))
|
||||
(the-as art-group #f)
|
||||
)
|
||||
|
||||
(defmethod alloc-trsqv! ((this conveyor))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-fields! ((this conveyor))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! (-> this speed) 24576.0)
|
||||
(set! (-> this belt-radius) 11878.4)
|
||||
(set! (-> this pull-y-threshold) 10240.0)
|
||||
(set! (-> this speed-mult-array) (the-as (pointer float) #f))
|
||||
(set! (-> this speed-mult-array-len) 0)
|
||||
(let ((a0-1 (-> this entity)))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((v1-4 (res-lump-data a0-1 'scale-factor (pointer float) :tag-ptr (& sv-16))))
|
||||
(when v1-4
|
||||
(set! (-> this speed-mult-array) v1-4)
|
||||
(set! (-> this speed-mult-array-len) (the-as int (-> sv-16 elt-count)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod alloc-sound! ((this conveyor))
|
||||
(let ((v1-1 (res-lump-value (-> this entity) 'options uint128 :time -1000000000.0)))
|
||||
(cond
|
||||
((not (logtest? #x10000 v1-1))
|
||||
(set! (-> this sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "conveyor" :group 0 :fo-max 80) (-> this root trans) 0.0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this sound) (the-as ambient-sound 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod push-focus ((this conveyor) (arg0 process-focusable))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> (get-trans arg0 0) quad))
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
(when (>= (vector4-dot s4-0 (the-as vector (-> this leading))) 0.0)
|
||||
(let* ((a1-2 (-> this sections))
|
||||
(a2-0 (-> a1-2 length))
|
||||
)
|
||||
(dotimes (a0-3 a2-0)
|
||||
(let ((v1-8 (-> a1-2 data a0-3)))
|
||||
(when (< (vector4-dot s4-0 (the-as vector (-> v1-8 trailing))) 0.0)
|
||||
(let ((a1-3 (new 'stack-no-clear 'vector)))
|
||||
(vector-! a1-3 s4-0 (-> v1-8 start))
|
||||
(when (>= (-> this belt-radius) (fabs (vector-dot a1-3 (-> v1-8 radial-dir))))
|
||||
(let* ((f0-7 (vector-dot a1-3 (-> v1-8 pull-dir)))
|
||||
(f1-6 (- (-> a1-3 y) (* (-> v1-8 pull-dir y) f0-7)))
|
||||
)
|
||||
(when (>= (-> this pull-y-threshold) (fabs f1-6))
|
||||
(let ((a2-8 (new 'stack-no-clear 'vector)))
|
||||
(let ((f0-10 (-> this speed)))
|
||||
(if (< a0-3 (-> this speed-mult-array-len))
|
||||
(set! f0-10 (* f0-10 (-> this speed-mult-array a0-3)))
|
||||
)
|
||||
(vector-float*! a2-8 (-> v1-8 pull-dir) (* f0-10 (seconds-per-frame)))
|
||||
)
|
||||
(send-event arg0 'push-trans a2-8 (seconds 10))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod find-pushables ((this conveyor))
|
||||
(local-vars (a0-10 float) (a2-5 float) (a2-12 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(set! *actor-list-length* 0)
|
||||
(if #t
|
||||
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256))
|
||||
)
|
||||
(when #t
|
||||
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
|
||||
*collide-player-list*
|
||||
(let ((v1-11 (-> a0-2 next0)))
|
||||
(while (!= a0-2 (-> *collide-player-list* alive-list-end))
|
||||
(let* ((a0-3 (-> (the-as connection a0-2) param1))
|
||||
(a1-1 (-> (the-as collide-shape a0-3) root-prim))
|
||||
)
|
||||
(when (logtest? (-> a1-1 prim-core collide-as)
|
||||
(collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(let ((a1-2 (-> a1-1 prim-core)))
|
||||
(let ((a2-4 a1-2)
|
||||
(a3-1 (-> this collide-bounds))
|
||||
)
|
||||
(.lvf vf2 (&-> a2-4 world-sphere quad))
|
||||
(.lvf vf3 (&-> a3-1 quad))
|
||||
)
|
||||
(.sub.vf vf1 vf3 vf2)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.add.y.vf vf1 vf1 vf1 :mask #b1)
|
||||
(.add.z.vf vf1 vf1 vf1 :mask #b1)
|
||||
(.mov a2-5 vf1)
|
||||
(let ((f0-0 a2-5)
|
||||
(f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r)))
|
||||
)
|
||||
(when (< f0-0 (* f1-1 f1-1))
|
||||
(when (< *actor-list-length* 256)
|
||||
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3))
|
||||
(set! *actor-list-length* (+ *actor-list-length* 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! a0-2 v1-11)
|
||||
*collide-player-list*
|
||||
(set! v1-11 (-> v1-11 next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when #f
|
||||
(let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0)))
|
||||
*collide-hit-by-player-list*
|
||||
(let ((v1-18 (-> a0-5 next0)))
|
||||
(while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end))
|
||||
(let* ((a0-6 (-> (the-as connection a0-5) param1))
|
||||
(a1-13 (-> (the-as collide-shape a0-6) root-prim))
|
||||
)
|
||||
(when (logtest? (-> a1-13 prim-core collide-as)
|
||||
(collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(let ((a1-14 (-> a1-13 prim-core)))
|
||||
(let ((a2-11 a1-14)
|
||||
(a3-2 (-> this collide-bounds))
|
||||
)
|
||||
(.lvf vf2 (&-> a2-11 world-sphere quad))
|
||||
(.lvf vf3 (&-> a3-2 quad))
|
||||
)
|
||||
(.sub.vf vf1 vf3 vf2)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.add.y.vf vf1 vf1 vf1 :mask #b1)
|
||||
(.add.z.vf vf1 vf1 vf1 :mask #b1)
|
||||
(.mov a2-12 vf1)
|
||||
(let ((f0-1 a2-12)
|
||||
(f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r)))
|
||||
)
|
||||
(when (< f0-1 (* f1-5 f1-5))
|
||||
(when (< *actor-list-length* 256)
|
||||
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6))
|
||||
(set! *actor-list-length* (+ *actor-list-length* 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! a0-5 v1-18)
|
||||
*collide-hit-by-player-list*
|
||||
(set! v1-18 (-> v1-18 next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-0 *actor-list-length*)
|
||||
(let* ((v1-23 (-> *actor-list* s5-0))
|
||||
(a0-9 (-> v1-23 root-prim))
|
||||
)
|
||||
(when (logtest? (-> a0-9 prim-core collide-as)
|
||||
(collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list)
|
||||
)
|
||||
(.lvf vf1 (&-> this collide-bounds quad))
|
||||
(.lvf vf2 (&-> a0-9 prim-core world-sphere quad))
|
||||
(.sub.vf vf3 vf1 vf2)
|
||||
(.add.w.vf vf4 vf1 vf2 :mask #b1000)
|
||||
(.mul.vf vf3 vf3 vf3 :mask #b111)
|
||||
(.mul.w.vf vf4 vf4 vf4 :mask #b1000)
|
||||
(.mul.x.vf acc vf0 vf3 :mask #b1000)
|
||||
(.add.mul.y.vf acc vf0 vf3 acc :mask #b1000)
|
||||
(.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000)
|
||||
(.sub.w.vf vf3 vf3 vf4 :mask #b1000)
|
||||
(let ((f0-2 0.0))
|
||||
(.add.w.vf vf3 vf0 vf3 :mask #b1)
|
||||
(.mov a0-10 vf3)
|
||||
(let ((s4-0 (-> v1-23 process)))
|
||||
(b! (< f0-2 a0-10) cfg-27)
|
||||
(let ((a1-29 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a1-29
|
||||
(push-focus this (the-as process-focusable a1-29))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-27)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod conveyor-method-21 ((this conveyor))
|
||||
(local-vars (sv-32 conveyor-section) (sv-48 conveyor-section))
|
||||
(let* ((s5-0 (-> this path))
|
||||
(s4-0 (-> s5-0 curve num-cverts))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s2-0 (new 'process 'conveyor-section-array (+ s4-0 -1))))
|
||||
(set! (-> this sections) s2-0)
|
||||
(set! (-> this collide-bounds quad) (the-as uint128 0))
|
||||
(get-point-in-path! s5-0 s3-0 0.0 'exact)
|
||||
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
|
||||
(let ((s1-0 (+ s4-0 -1)))
|
||||
(set! sv-32 (the-as conveyor-section #f))
|
||||
(dotimes (s0-0 s1-0)
|
||||
(set! sv-48 (-> s2-0 data s0-0))
|
||||
(set! (-> sv-48 start quad) (-> s3-0 quad))
|
||||
(get-point-in-path! s5-0 s3-0 (the float (+ s0-0 1)) 'exact)
|
||||
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
|
||||
(vector-! (-> sv-48 pull-dir) s3-0 (-> sv-48 start))
|
||||
(vector-normalize! (-> sv-48 pull-dir) 1.0)
|
||||
(set! (-> sv-48 trailing quad) (-> sv-48 pull-dir quad))
|
||||
(set! (-> sv-48 trailing y) 0.0)
|
||||
(vector-normalize! (-> sv-48 trailing) 1.0)
|
||||
(set-vector! (-> sv-48 radial-dir) (- (-> sv-48 trailing z)) 0.0 (-> sv-48 trailing x) 1.0)
|
||||
(set! (-> sv-48 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-48 trailing)))))
|
||||
(when sv-32
|
||||
(vector+!
|
||||
(the-as vector (-> sv-32 trailing))
|
||||
(the-as vector (-> sv-32 trailing))
|
||||
(the-as vector (-> sv-48 trailing))
|
||||
)
|
||||
(vector-normalize! (-> sv-32 trailing) 1.0)
|
||||
(set! (-> sv-32 trailing w) (- (vector-dot (-> sv-48 start) (the-as vector (-> sv-32 trailing)))))
|
||||
)
|
||||
(set! sv-32 sv-48)
|
||||
sv-32
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (-> this sections data)))
|
||||
(set! (-> this leading quad) (-> s2-1 0 pull-dir quad))
|
||||
(set! (-> this leading y) 0.0)
|
||||
(vector-normalize! (-> this leading) 1.0)
|
||||
(set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading)))))
|
||||
)
|
||||
(let ((f0-19 (/ 1.0 (the float s4-0)))
|
||||
(f30-0 0.0)
|
||||
)
|
||||
(vector-float*! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) f0-19)
|
||||
(dotimes (s2-2 s4-0)
|
||||
(get-point-in-path! s5-0 s3-0 (the float s2-2) 'exact)
|
||||
(let ((f0-22 (vector-vector-distance-squared s3-0 (-> this collide-bounds))))
|
||||
(if (< f30-0 f0-22)
|
||||
(set! f30-0 f0-22)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate idle (conveyor)
|
||||
:virtual #t
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(find-pushables self)
|
||||
(if (nonzero? (-> self sound))
|
||||
(update! (-> self sound))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch draw-control vs none.
|
||||
(defmethod init-skel! ((this conveyor))
|
||||
(if (get-skel this)
|
||||
(initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this conveyor) (arg0 entity-actor))
|
||||
(alloc-trsqv! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(init-skel! this)
|
||||
(set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f))
|
||||
(logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(if (< (-> this path curve num-cverts) 2)
|
||||
(go process-drawable-art-error "bad path")
|
||||
)
|
||||
(init-fields! this)
|
||||
(alloc-sound! this)
|
||||
(conveyor-method-21 this)
|
||||
(go (method-of-object this idle))
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,903 @@
|
||||
;; name in dgo: fac-robotank-turret
|
||||
;; dgos: LFACTORY
|
||||
|
||||
;; +++fac-robotank-turret-flag
|
||||
(defenum fac-robotank-turret-flag
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(frt0 0)
|
||||
(frt1 1)
|
||||
(frt2 2)
|
||||
(frt3 3)
|
||||
(frt4 4)
|
||||
(frt5 5)
|
||||
(frt6 6)
|
||||
(frt7 7)
|
||||
(frt8 8)
|
||||
(frt9 9)
|
||||
(frt10 10)
|
||||
)
|
||||
;; ---fac-robotank-turret-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype fac-robotank-turret (process-focusable)
|
||||
((los los-control :inline)
|
||||
(tank-quat quaternion :inline)
|
||||
(tank-quat-vibe-only quaternion :inline)
|
||||
(rotate-quat quaternion :inline)
|
||||
(rotate-rate float)
|
||||
(rotate-mult float)
|
||||
(shot-range float)
|
||||
(fov-mult float)
|
||||
(offset vector :inline)
|
||||
(sight-pos vector :inline)
|
||||
(firing-sight-pos vector :inline)
|
||||
(aim-pos vector 3 :inline)
|
||||
(gun-timer time-frame)
|
||||
(gun-elev-jmod joint-mod)
|
||||
(gun-elev float)
|
||||
(gun-elev-cam float)
|
||||
(gun-joint-l int32 2)
|
||||
(gun-joint-r int32 2)
|
||||
(gun-spread float)
|
||||
(gun-index int32)
|
||||
(flags fac-robotank-turret-flag)
|
||||
(turn-sound-id sound-id)
|
||||
)
|
||||
(:state-methods
|
||||
ready
|
||||
fire
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(fac-robotank-turret-method-31 (_type_ vector vector) object)
|
||||
(fac-robotank-turret-method-32 (_type_ (inline-array vector)) (pointer ftank-shot))
|
||||
(fac-robotank-turret-method-33 (_type_) none)
|
||||
(fac-robotank-turret-method-34 (_type_ vector float) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-robotank-reticle (process-drawable)
|
||||
((shadow-jmod joint-mod-set-local)
|
||||
(sight-jmod joint-mod-set-local)
|
||||
(ring-jmod joint-mod 3)
|
||||
(ring-timer time-frame)
|
||||
(sight-scale vector :inline)
|
||||
(collide-dist float)
|
||||
)
|
||||
(:state-methods
|
||||
unlock
|
||||
lock
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defpartgroup group-robotank-steamescape
|
||||
:id 782
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 2924 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 2924
|
||||
:init-specs ((:texture (bigpuff level-default-sprite))
|
||||
(:num 0.5 1.0)
|
||||
(:x (meters -3) (meters 5))
|
||||
(:y (meters -0.1) (meters 0.3))
|
||||
(:z (meters 0.2) (meters 0.2))
|
||||
(:scale-x (meters 0.5) (meters 0.25))
|
||||
(:rot-z (degrees 0) (degrees 360))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 64.0 128.0)
|
||||
(:g :copy r)
|
||||
(:b :copy g)
|
||||
(:a 0.0)
|
||||
(:vel-z (meters 0.005) (meters 0.0025))
|
||||
(:scalevel-x (meters 0.0016666667) (meters 0.0033333334))
|
||||
(:rotvel-z (degrees -1.2) (degrees 2.4))
|
||||
(:scalevel-y :copy scalevel-x)
|
||||
(:fade-a 0.64)
|
||||
(:accel-y (meters 0.00016666666) (meters 0.00016666666))
|
||||
(:friction 0.99)
|
||||
(:timer (seconds 2))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
|
||||
(:next-time (seconds 0.085) (seconds 0.08))
|
||||
(:next-launcher 2925)
|
||||
(:launchrot-x (degrees -5) (degrees 10))
|
||||
(:launchrot-y (degrees -5) (degrees 10))
|
||||
(:rotate-y (degrees 0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 2925
|
||||
:init-specs ((:fade-a -0.064 -0.064))
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-reticle-post fac-robotank-reticle ()
|
||||
(let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (camera-pos))
|
||||
(s4-0 (-> self draw shadow-ctrl settings shadow-dir))
|
||||
(gp-0 (-> self draw shadow-ctrl settings bot-plane))
|
||||
(s2-0 (-> self draw shadow-ctrl settings top-plane))
|
||||
)
|
||||
(-> self draw shadow-ctrl settings)
|
||||
(vector-normalize! s5-0 1.0)
|
||||
(vector-negate! s1-0 s5-0)
|
||||
(set! (-> s4-0 x) (-> s5-0 x))
|
||||
(set! (-> s4-0 y) (-> s5-0 y))
|
||||
(set! (-> s4-0 z) (-> s5-0 z))
|
||||
(set! (-> s4-0 w) -16384.0)
|
||||
(set! (-> s2-0 quad) (-> s5-0 quad))
|
||||
(set! (-> gp-0 quad) (-> s5-0 quad))
|
||||
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
||||
(vector+float*! s4-1 (-> self root trans) s5-0 -4096.0)
|
||||
(set! (-> s2-0 w) (- (vector-dot s4-1 s5-0)))
|
||||
(vector+float*! s4-1 (-> self root trans) s5-0 (-> self collide-dist))
|
||||
(let* ((a1-6 (vector-! (new 'stack-no-clear 'vector) s3-0 s4-1))
|
||||
(f1-0 (vector-length a1-6))
|
||||
(a2-2
|
||||
(vector-normalize-copy! (new 'stack-no-clear 'vector) a1-6 (fmax -20480.0 (fmin 20480.0 (* 0.75 f1-0))))
|
||||
)
|
||||
(v1-26 (vector-float*! (new 'stack-no-clear 'vector) s5-0 (- (vector-dot a2-2 s5-0))))
|
||||
)
|
||||
(vector+! s4-1 s4-1 v1-26)
|
||||
)
|
||||
(set! (-> gp-0 w) (- (vector-dot s4-1 s5-0)))
|
||||
)
|
||||
)
|
||||
0
|
||||
(vector-seek! (-> self sight-jmod transform scale) (-> self sight-scale) (* 6.0 (seconds-per-frame)))
|
||||
(ja-post)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-reticle-handler fac-robotank-reticle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('update-trans-only)
|
||||
(set! v0-0 (-> self root trans))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
(('update)
|
||||
(let ((s5-0 (the-as vector (-> arg3 param 0)))
|
||||
(gp-0 (the-as vector (-> arg3 param 1)))
|
||||
)
|
||||
(let ((a1-3
|
||||
(vector-normalize-copy! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0) 1.0)
|
||||
)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> s5-0 quad))
|
||||
(forward-up->quaternion (-> self root quat) a1-3 *up-vector*)
|
||||
)
|
||||
(let ((f0-0 (vector-length (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0)))
|
||||
(gp-1 (-> self sight-scale))
|
||||
)
|
||||
(set! (-> gp-1 z) (* 0.000024414063 f0-0))
|
||||
(let ((f0-1 (lerp-scale 0.1 6.0 f0-0 61440.0 163840.0)))
|
||||
(set! (-> gp-1 x) f0-1)
|
||||
(set! (-> gp-1 y) f0-1)
|
||||
f0-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('collide-dist)
|
||||
(set! (-> self collide-dist) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
(('on)
|
||||
(let ((v1-14 (-> self draw shadow-ctrl)))
|
||||
(logclear! (-> v1-14 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
(set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw)))
|
||||
(set! (-> self draw status) (the-as draw-control-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('off)
|
||||
(let ((v1-19 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-19 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
(set! v0-0 (logior (-> self draw status) (draw-control-status no-draw)))
|
||||
(set! (-> self draw status) (the-as draw-control-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('spotlight-on)
|
||||
(let ((v1-25 (-> self draw shadow-ctrl)))
|
||||
(logclear! (-> v1-25 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
)
|
||||
(('spotlight-off)
|
||||
(let ((v1-27 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-27 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
)
|
||||
(('lock)
|
||||
(go-virtual lock)
|
||||
)
|
||||
(('unlock)
|
||||
(go-virtual unlock)
|
||||
)
|
||||
(('die)
|
||||
(go empty-state)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defskelgroup skel-fac-robotank-turret fac-robotank-top fac-robotank-top-lod0-jg fac-robotank-top-idle-ja
|
||||
((fac-robotank-top-lod0-mg (meters 20)) (fac-robotank-top-lod1-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defpart 2926
|
||||
:init-specs ((:texture (glow-hotdot level-default-sprite))
|
||||
(:num 1.0)
|
||||
(:scale-x (meters 1.5) (meters 0.1))
|
||||
(:rot-x (degrees 1.125))
|
||||
(:scale-y :copy scale-x)
|
||||
(:r 128.0 64.0)
|
||||
(:g 0.0)
|
||||
(:b :copy g)
|
||||
(:a 96.0 64.0)
|
||||
(:rotvel-z (degrees 0.3))
|
||||
(:fade-g -1.0666667)
|
||||
(:fade-b -1.0666667)
|
||||
(:fade-a -8.533334)
|
||||
(:timer (seconds 0.017))
|
||||
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow))
|
||||
(:userdata 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer ftank-shot).
|
||||
(defmethod fac-robotank-turret-method-32 ((this fac-robotank-turret) (arg0 (inline-array vector)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
||||
(let ((s5-0 (-> arg0 0))
|
||||
(gp-0 (-> arg0 1))
|
||||
)
|
||||
(set! (-> s4-0 ent) (-> this entity))
|
||||
(set! (-> s4-0 charge) 1.0)
|
||||
(set! (-> s4-0 options) (projectile-options))
|
||||
(logclear! (-> s4-0 options) (projectile-options po14 po15 po16))
|
||||
(set! (-> s4-0 pos quad) (-> s5-0 quad))
|
||||
(set! (-> s4-0 notify-handle) (process->handle this))
|
||||
(set! (-> s4-0 owner-handle) (the-as handle #f))
|
||||
(set! (-> s4-0 target-handle) (the-as handle #f))
|
||||
(set! (-> s4-0 target-pos quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 ignore-handle) (process->handle this))
|
||||
(let* ((v1-12 *game-info*)
|
||||
(a0-13 (+ (-> v1-12 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-12 attack-id) a0-13)
|
||||
(set! (-> s4-0 attack-id) a0-13)
|
||||
)
|
||||
(set! (-> s4-0 timeout) (seconds 4))
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(rand-vu-sphere-point-uniform! s2-0 (* 40960.0 (rand-vu)))
|
||||
(vector+! gp-0 gp-0 s2-0)
|
||||
)
|
||||
(vector-! (-> s4-0 vel) gp-0 s5-0)
|
||||
)
|
||||
(vector-normalize! (-> s4-0 vel) 512000.0)
|
||||
(the-as (pointer ftank-shot) (spawn-projectile ftank-shot s4-0 this *default-dead-pool*))
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer ftank-shot) vs none.
|
||||
(defmethod fac-robotank-turret-method-33 ((this fac-robotank-turret))
|
||||
(local-vars (sv-144 vector) (sv-160 vector))
|
||||
(let ((s3-0 (new 'stack-no-clear 'inline-array 'vector 2))
|
||||
(s5-0 (new 'stack-no-clear 'inline-array 'vector 2))
|
||||
)
|
||||
(-> this node-list data 11)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (-> this sight-pos))
|
||||
(s2-0 (-> this gun-index))
|
||||
)
|
||||
0.0
|
||||
0.0
|
||||
(vector<-cspace! (-> s3-0 0) (-> this node-list data (-> this gun-joint-l s2-0)))
|
||||
(vector<-cspace! (-> s3-0 1) (-> this node-list data (-> this gun-joint-r s2-0)))
|
||||
(let ((f30-0 (* 0.5 (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s3-0 1) (-> s3-0 0))))))
|
||||
(let ((f28-0 (fmax 81920.0 (+ 12288.0 (vector-length (vector-! (new 'stack-no-clear 'vector) s1-0 (-> s3-0 0)))))))
|
||||
(vector-normalize-copy! s4-0 (-> this node-list data (-> this gun-joint-l s2-0) bone transform fvec) 1.0)
|
||||
(let ((s0-0 vector-rotate-y!))
|
||||
(set! sv-144 s4-0)
|
||||
(set! sv-160 s4-0)
|
||||
(let ((a2-1 (- 16384.0 (acos (/ f30-0 f28-0)))))
|
||||
(s0-0 sv-144 sv-160 a2-1)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 0 quad) (-> s3-0 0 quad))
|
||||
(vector+float*! (-> s5-0 1) (-> s5-0 0) s4-0 512000.0)
|
||||
(set! (-> this shot-range) (fmin 204800.0 f28-0))
|
||||
)
|
||||
(fac-robotank-turret-method-32 this s5-0)
|
||||
(let ((f28-1 (fmax 81920.0 (+ 12288.0 (vector-length (vector-! (new 'stack-no-clear 'vector) s1-0 (-> s3-0 1)))))))
|
||||
(vector-normalize-copy! s4-0 (-> this node-list data (-> this gun-joint-r s2-0) bone transform fvec) 1.0)
|
||||
(vector-rotate-y! s4-0 s4-0 (- (- 16384.0 (acos (/ f30-0 f28-1)))))
|
||||
(set! (-> s5-0 0 quad) (-> s3-0 1 quad))
|
||||
(vector+float*! (-> s5-0 1) (-> s5-0 0) s4-0 512000.0)
|
||||
(set! (-> this shot-range) (fmin 204800.0 f28-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(fac-robotank-turret-method-32 this s5-0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod fac-robotank-turret-method-31 ((this fac-robotank-turret) (arg0 vector) (arg1 vector))
|
||||
(let ((s5-0 (new 'stack-no-clear 'collide-query))
|
||||
(f30-0 307200.0)
|
||||
)
|
||||
(set! (-> s5-0 start-pos quad) (-> arg0 quad))
|
||||
(vector-float*! (-> s5-0 move-dist) arg1 f30-0)
|
||||
(let ((v1-4 s5-0))
|
||||
(set! (-> v1-4 radius) 4096.0)
|
||||
(set! (-> v1-4 collide-with) (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list))
|
||||
(set! (-> v1-4 ignore-process0) (ppointer->process (-> this parent)))
|
||||
(set! (-> v1-4 ignore-process1) this)
|
||||
(set! (-> v1-4 ignore-pat)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
(set! (-> v1-4 action-mask) (collide-action solid semi-solid))
|
||||
)
|
||||
(let ((f28-0 (fill-and-probe-using-line-sphere *collide-cache* s5-0))
|
||||
(s4-1 (-> this sight-pos))
|
||||
)
|
||||
(cond
|
||||
((>= f28-0 0.0)
|
||||
(let ((f0-3 (vector-length (-> s5-0 move-dist))))
|
||||
(if (>= 20480.0 (* f0-3 f28-0))
|
||||
(set! f28-0 (/ 20480.0 f0-3))
|
||||
)
|
||||
)
|
||||
(vector+float*! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist) f28-0)
|
||||
(let* ((s5-1 (-> s5-0 best-other-tri collide-ptr))
|
||||
(s3-0 (if (type? s5-1 collide-shape-prim)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
(s5-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-2 quad) (-> s4-1 quad))
|
||||
(vector+float*! s5-2 s5-2 (-> (math-camera-matrix) fvec) -2048.0)
|
||||
(if (and s3-0
|
||||
(logtest? (process-mask target enemy) (-> (the-as collide-shape-prim s3-0) cshape process mask))
|
||||
(>= 307200.0 (vector-vector-distance s5-2 arg0))
|
||||
)
|
||||
#f
|
||||
(+ 12288.0 (* f30-0 f28-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(vector+! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch collide-prim-core vs vector.
|
||||
(defmethod get-trans ((this fac-robotank-turret) (arg0 int))
|
||||
"Get the `trans` for this process."
|
||||
(the-as vector (-> this root root-prim prim-core))
|
||||
)
|
||||
|
||||
(defbehavior turret-post fac-robotank-turret ()
|
||||
(let* ((s5-0 *target*)
|
||||
(gp-0 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> self flags) (fac-robotank-turret-flag frt0)) gp-0)
|
||||
(if (logtest? (-> self flags) (fac-robotank-turret-flag frt9))
|
||||
(format 0 "Fix Los control update~%")
|
||||
)
|
||||
(if *target*
|
||||
(look-at! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'attacking self)
|
||||
)
|
||||
(set! (-> self aim-pos 0 quad) (-> self aim-pos 1 quad))
|
||||
(set! (-> self aim-pos 1 quad) (-> (get-trans gp-0 0) quad))
|
||||
(let ((s5-2 (-> self aim-pos 2))
|
||||
(s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-l 0))))
|
||||
)
|
||||
(let ((v1-24 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-r 0)))))
|
||||
(vector-! s5-2 (-> self aim-pos 1) (the-as vector (-> self aim-pos)))
|
||||
(vector-float*! s5-2 s5-2 (* 0.8 (-> self clock frames-per-second)))
|
||||
(set! (-> s5-2 y) 0.0)
|
||||
(vector+! s5-2 (-> self aim-pos 1) s5-2)
|
||||
(+! (-> s5-2 y) 8192.0)
|
||||
(vector+! s4-0 s4-0 v1-24)
|
||||
)
|
||||
(vector-float*! s4-0 s4-0 0.5)
|
||||
(let ((gp-2 (vector-! (new 'stack-no-clear 'vector) s5-2 s4-0))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) (-> self firing-sight-pos) s4-0))
|
||||
(s5-3 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((f30-0 (vector-length gp-2)))
|
||||
(vector-normalize! gp-2 1.0)
|
||||
(vector-normalize! s3-1 1.0)
|
||||
(if (logtest? (-> self flags) (fac-robotank-turret-flag frt3))
|
||||
(set! (-> s5-3 quad) (-> s3-1 quad))
|
||||
(set! (-> s5-3 quad) (-> gp-2 quad))
|
||||
)
|
||||
(when (logtest? (-> self flags) (fac-robotank-turret-flag frt7))
|
||||
(let ((f0-6 (lerp-scale 1.0 0.2 f30-0 8192.0 327680.0)))
|
||||
(seek! (-> self fov-mult) f0-6 (* 2.0 (seconds-per-frame)))
|
||||
)
|
||||
(set-setting! 'fov 'rel (-> self fov-mult) 0)
|
||||
)
|
||||
)
|
||||
(let* ((f30-1 (vector-y-angle s5-3))
|
||||
(f0-11 (quaternion-y-angle (-> self rotate-quat)))
|
||||
(f0-12 (deg-diff f0-11 f30-1))
|
||||
)
|
||||
(* (-> self rotate-mult) f0-12)
|
||||
(let ((f1-6 25486.223))
|
||||
(set! (-> self rotate-rate) (fmax (fmin (* 4.0 f0-12) f1-6) (- f1-6)))
|
||||
)
|
||||
)
|
||||
(let ((f30-3 (fmax -16384.0 (fmin 16384.0 (- 16384.0 (acos (- (vector-dot s5-3 *y-vector*))))))))
|
||||
(let* ((f0-28 (fmax -16384.0 (fmin 16384.0 (- 16384.0 (acos (- (vector-dot gp-2 *y-vector*)))))))
|
||||
(f2-1 (- (-> self gun-elev-cam) f0-28))
|
||||
(f1-12 (if (< f2-1 0.0)
|
||||
(fmin 3640.889 (* (fabs (* 0.1 f2-1)) (-> self clock frames-per-second)))
|
||||
910.2222
|
||||
)
|
||||
)
|
||||
)
|
||||
(seek! (-> self gun-elev-cam) f0-28 (* f1-12 (seconds-per-frame)))
|
||||
)
|
||||
(let* ((f28-2 (quaternion-y-angle (-> self rotate-quat)))
|
||||
(f0-32 (quaternion-y-angle (-> self tank-quat)))
|
||||
(f0-34 (* 2.0 (deg-diff f0-32 f28-2)))
|
||||
(f0-35 (cos f0-34))
|
||||
)
|
||||
0.0
|
||||
(if (< 0.0 f0-35)
|
||||
(* 182.04445 (lerp 4.0 90.0 f0-35))
|
||||
(* 182.04445 (lerp 4.0 18.0 (- f0-35)))
|
||||
)
|
||||
)
|
||||
(seek! (-> self gun-elev) f30-3 (* 16384.0 (seconds-per-frame)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(quaternion-axis-angle! (-> self gun-elev-jmod quat) 1.0 0.0 0.0 (-> self gun-elev))
|
||||
)
|
||||
(else
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (fac-robotank-turret-flag frt0))
|
||||
(not (logtest? (-> self flags) (fac-robotank-turret-flag frt3)))
|
||||
)
|
||||
(let* ((a1-26 (-> self node-list data (-> self gun-joint-l 0)))
|
||||
(s4-1 (-> self node-list data (-> self gun-joint-r 0)))
|
||||
(gp-4
|
||||
(vector+!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) a1-26)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) s4-1)
|
||||
)
|
||||
)
|
||||
(a2-16
|
||||
(vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self node-list data 11 bone transform fvec) 1.0)
|
||||
)
|
||||
)
|
||||
(vector-float*! gp-4 gp-4 0.5)
|
||||
(fac-robotank-turret-method-31 self gp-4 a2-16)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> self flags) (fac-robotank-turret-flag frt6))
|
||||
(sound-play "robotank-turret" :id (-> self turn-sound-id) :position (-> self root trans))
|
||||
(when (< (fabs (-> self rotate-rate)) 728.1778)
|
||||
(logclear! (-> self flags) (fac-robotank-turret-flag frt6))
|
||||
(sound-stop (-> self turn-sound-id))
|
||||
(sound-play "robo-turret-end")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (< 2184.5334 (fabs (-> self rotate-rate)))
|
||||
(logior! (-> self flags) (fac-robotank-turret-flag frt6))
|
||||
)
|
||||
)
|
||||
)
|
||||
(quaternion-rotate-y!
|
||||
(-> self rotate-quat)
|
||||
(-> self rotate-quat)
|
||||
(* (-> self rotate-rate) (seconds-per-frame))
|
||||
)
|
||||
(quaternion*! (-> self root quat) (-> self rotate-quat) (-> self tank-quat-vibe-only))
|
||||
(quaternion-normalize! (-> self root quat))
|
||||
(transform-post)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior robotank-turret-handler fac-robotank-turret ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('fire-suppress)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt4)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt4)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(('set-spread)
|
||||
(set! (-> self gun-spread) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
(('use-los)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt9)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt9)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(('limit-reticle-elev)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt10)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt10)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(('pov-cam-on)
|
||||
(let ((v1-14 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3)))
|
||||
(set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list))
|
||||
)
|
||||
(set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt7)))
|
||||
(set! (-> self flags) (the-as fac-robotank-turret-flag v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('pov-cam-off)
|
||||
(let ((v1-19 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3)))
|
||||
(set! (-> v1-19 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-19 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(logclear! (-> self flags) (fac-robotank-turret-flag frt7))
|
||||
(remove-setting! 'fov)
|
||||
)
|
||||
(('get-rotate-quat)
|
||||
(-> self rotate-quat)
|
||||
)
|
||||
(('get-gun-elevation-cam)
|
||||
(-> self gun-elev-cam)
|
||||
)
|
||||
(('update)
|
||||
(-> arg3 param 1)
|
||||
(new 'stack-no-clear 'vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'quaternion)))
|
||||
(let ((s4-0 (the-as cspace (-> arg3 param 2))))
|
||||
(vector<-cspace+vector! (-> self root trans) s4-0 (-> self offset))
|
||||
(matrix->quaternion s5-0 (-> s4-0 bone transform))
|
||||
)
|
||||
(quaternion-copy! (-> self tank-quat) s5-0)
|
||||
)
|
||||
(quaternion-copy! (-> self tank-quat-vibe-only) (the-as quaternion (-> arg3 param 3)))
|
||||
)
|
||||
(('die)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod fac-robotank-turret-method-34 ((this fac-robotank-turret) (arg0 vector) (arg1 float))
|
||||
(let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans)))
|
||||
(s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> s4-1 quad))
|
||||
(set! (-> s3-0 y) 0.0)
|
||||
(vector-normalize! s3-0 1.0)
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(vector-normalize! s5-0 1.0)
|
||||
(>= (vector-dot s3-0 s5-0) (cos arg1))
|
||||
)
|
||||
)
|
||||
|
||||
(defstate ready (fac-robotank-turret)
|
||||
:virtual #t
|
||||
:event robotank-turret-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self flags) (fac-robotank-turret-flag frt0))
|
||||
(set-time! (-> self gun-timer))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (logtest? (-> self flags) (fac-robotank-turret-flag frt4))
|
||||
(set-time! (-> self gun-timer))
|
||||
)
|
||||
(let ((gp-0 *target*))
|
||||
(if (and (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
(or (not (logtest? (-> self flags) (fac-robotank-turret-flag frt9))) (should-check-los? (-> self los) 0))
|
||||
(time-elapsed? (-> self gun-timer) (seconds 1))
|
||||
)
|
||||
(go-virtual fire)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(ja-no-eval :group! fac-robotank-idle-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post turret-post
|
||||
)
|
||||
|
||||
(defstate fire (fac-robotank-turret)
|
||||
:virtual #t
|
||||
:event robotank-turret-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self flags) (fac-robotank-turret-flag frt8))
|
||||
(let* ((gp-0 *target*)
|
||||
(a0-1 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when a0-1
|
||||
(set! (-> self aim-pos 0 quad) (-> (get-trans a0-1 0) quad))
|
||||
(set! (-> self aim-pos 1 quad) (-> self aim-pos 0 quad))
|
||||
(set! (-> self aim-pos 2 quad) (-> self aim-pos 0 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 *target*))
|
||||
(when (or (not (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(and (logtest? (-> self flags) (fac-robotank-turret-flag frt9))
|
||||
(not (logtest? (-> self flags) (fac-robotank-turret-flag frt3)))
|
||||
(los-control-method-11 (-> self los) 0)
|
||||
)
|
||||
(logtest? (-> self flags) (fac-robotank-turret-flag frt4))
|
||||
)
|
||||
(logclear! (-> self flags) (fac-robotank-turret-flag frt8))
|
||||
(go-virtual ready)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-2 symbol))
|
||||
(until #f
|
||||
(until v1-2
|
||||
(suspend)
|
||||
(set! v1-2 (and (fac-robotank-turret-method-34 self (-> self aim-pos 2) 2730.6667)
|
||||
(logtest? (-> self draw status) (draw-control-status on-screen))
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self flags) (fac-robotank-turret-flag frt3))
|
||||
(set! (-> self firing-sight-pos quad) (-> self sight-pos quad))
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 0.5))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (max 2 (min 3 (rand-vu-int-range 0 3)))))
|
||||
0
|
||||
(dotimes (s5-2 gp-2)
|
||||
(let ((s4-1 (max 2 (min 4 (rand-vu-int-range 1 8)))))
|
||||
(dotimes (s3-2 s4-1)
|
||||
(ja-no-eval :group! fac-robotank-fire-start-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(fac-robotank-turret-method-33 self)
|
||||
(ja-no-eval :group! fac-robotank-fire-end-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
(set! (-> self gun-index) (- 1 (-> self gun-index)))
|
||||
(suspend)
|
||||
(if (< (vector-length (vector-! (new 'stack-no-clear 'vector) (-> self firing-sight-pos) (-> self root trans)))
|
||||
73728.0
|
||||
)
|
||||
(goto cfg-22)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f30-0 (rand-vu-float-range 0.05 0.43))
|
||||
(s4-2 (current-time))
|
||||
)
|
||||
(until (time-elapsed? s4-2 (the int (* 300.0 f30-0)))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-22)
|
||||
(logclear! (-> self flags) (fac-robotank-turret-flag frt3))
|
||||
(until (fac-robotank-turret-method-34 self (-> self aim-pos 2) 2730.6667)
|
||||
(suspend)
|
||||
)
|
||||
(let ((f30-1 (rand-vu-float-range
|
||||
(if (< 2730.6667 (-> self rotate-rate))
|
||||
1.2
|
||||
0.32
|
||||
)
|
||||
2.11
|
||||
)
|
||||
)
|
||||
(gp-3 (current-time))
|
||||
)
|
||||
(until (time-elapsed? gp-3 (the int (* 300.0 f30-1)))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
:post turret-post
|
||||
)
|
||||
|
||||
(defstate die (fac-robotank-turret)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(let ((v1-1 (-> self root root-prim)))
|
||||
(set! (-> v1-1 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-1 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this fac-robotank-turret))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(logclear! (-> this flags) (fac-robotank-turret-flag frt6))
|
||||
(sound-stop (-> this turn-sound-id))
|
||||
((method-of-type process-focusable deactivate) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process-focusable vs fac-robotank-turret.
|
||||
(defmethod relocate ((this fac-robotank-turret) (offset int))
|
||||
(if (nonzero? (-> this gun-elev-jmod))
|
||||
(&+! (-> this gun-elev-jmod) offset)
|
||||
)
|
||||
(the-as fac-robotank-turret ((method-of-type process-focusable relocate) this offset))
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-turret-init-by-other fac-robotank-turret ((arg0 vector) (arg1 quaternion) (arg2 vector) (arg3 float))
|
||||
(let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s2-0 reaction) cshape-reaction-default)
|
||||
(set! (-> s2-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((s1-0 (new 'process 'collide-shape-prim-group s2-0 (the-as uint 4) 0)))
|
||||
(set! (-> s2-0 total-prims) (the-as uint 5))
|
||||
(set! (-> s1-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
|
||||
(set! (-> s1-0 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> s1-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s1-0 local-sphere) 0.0 0.0 0.0 36864.0)
|
||||
(set! (-> s2-0 root-prim) s1-0)
|
||||
)
|
||||
(pusher-init s2-0)
|
||||
(let ((v1-14 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 2) (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) 3)
|
||||
(set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 16384.0)
|
||||
)
|
||||
(let ((v1-16 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 1) (the-as uint 0))))
|
||||
(set! (-> v1-16 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-16 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-16 transform-index) 8)
|
||||
(set-vector! (-> v1-16 local-sphere) 0.0 0.0 4096.0 6553.6)
|
||||
)
|
||||
(let ((v1-18 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> v1-18 prim-core collide-as) (collide-spec obstacle pusher))
|
||||
(set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> v1-18 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-18 transform-index) 5)
|
||||
(set-vector! (-> v1-18 local-sphere) 0.0 0.0 4096.0 6553.6)
|
||||
)
|
||||
(let ((v1-20 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 3) (the-as uint 0))))
|
||||
(set! (-> v1-20 prim-core action) (collide-action solid))
|
||||
(set! (-> v1-20 transform-index) 3)
|
||||
(set-vector! (-> v1-20 local-sphere) 0.0 20480.0 4096.0 31129.6)
|
||||
)
|
||||
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
|
||||
(let ((v1-23 (-> s2-0 root-prim)))
|
||||
(set! (-> s2-0 backup-collide-as) (-> v1-23 prim-core collide-as))
|
||||
(set! (-> s2-0 backup-collide-with) (-> v1-23 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) s2-0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(quaternion-copy! (-> self root quat) arg1)
|
||||
(set! (-> self offset quad) (-> arg2 quad))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robotank-turret" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self draw light-index) (the-as uint 10))
|
||||
(init-los! (-> self los) self (seconds 0.1) 327680.0 (collide-spec backgnd))
|
||||
(set! (-> self gun-elev-jmod) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 4))
|
||||
(set! (-> self gun-elev) 0.0)
|
||||
(set! (-> self gun-elev-cam) 0.0)
|
||||
(set! (-> self gun-spread) 728.1778)
|
||||
(quaternion-axis-angle! (-> self gun-elev-jmod quat) 1.0 0.0 0.0 (-> self gun-elev))
|
||||
(quaternion-zero! (-> self tank-quat))
|
||||
(quaternion-copy! (-> self rotate-quat) arg1)
|
||||
(set! (-> self rotate-rate) 0.0)
|
||||
(set! (-> self rotate-mult) arg3)
|
||||
(set! (-> self aim-pos 0 quad) (-> self root trans quad))
|
||||
(set! (-> self aim-pos 1 quad) (-> self root trans quad))
|
||||
(set! (-> self aim-pos 2 quad) (-> self root trans quad))
|
||||
(set-time! (-> self gun-timer))
|
||||
(set! (-> self flags) (fac-robotank-turret-flag))
|
||||
(set! (-> self fov-mult) 1.0)
|
||||
(set! (-> self shot-range) 204800.0)
|
||||
(set! (-> self gun-joint-l 0) 10)
|
||||
(set! (-> self gun-joint-r 0) 7)
|
||||
(set! (-> self gun-joint-l 1) 9)
|
||||
(set! (-> self gun-joint-r 1) 6)
|
||||
(set! (-> self gun-index) 0)
|
||||
(let ((v1-51 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-51 quad) (-> self root trans quad))
|
||||
(+! (-> v1-51 z) 40960.0)
|
||||
(+! (-> v1-51 y) 32768.0)
|
||||
)
|
||||
(ja-no-eval :group! fac-robotank-idle-ja :num! zero)
|
||||
(transform-post)
|
||||
(set! (-> self turn-sound-id) (new-sound-id))
|
||||
(go-virtual ready)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,894 @@
|
||||
;; name in dgo: fac-robotank
|
||||
;; dgos: LFACTORY
|
||||
|
||||
;; +++robotank-segment-flag
|
||||
(defenum robotank-segment-flag
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
)
|
||||
;; ---robotank-segment-flag
|
||||
|
||||
|
||||
;; +++robotank-flag
|
||||
(defenum robotank-flag
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(r0 0)
|
||||
(r1 1)
|
||||
(r2 2)
|
||||
(r3 3)
|
||||
(r4 4)
|
||||
(r5 5)
|
||||
(r6 6)
|
||||
(r7 7)
|
||||
)
|
||||
;; ---robotank-flag
|
||||
|
||||
|
||||
(declare-type fort-robotank process-drawable)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-robotank-barrel-sparks
|
||||
:id 783
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 2927 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)))
|
||||
)
|
||||
|
||||
(defpart 2927
|
||||
:init-specs ((:texture (motion-blur-part level-default-sprite))
|
||||
(:num 1.0 6.0)
|
||||
(:x (meters -4) (meters 8))
|
||||
(:scale-x (meters 1))
|
||||
(:rot-x 4)
|
||||
(:scale-y (meters 0.05) (meters 0.05))
|
||||
(:r 32.0 96.0)
|
||||
(:g :copy r)
|
||||
(:b 255.0)
|
||||
(:a 64.0 64.0)
|
||||
(:omega (degrees 0.03375))
|
||||
(:vel-y (meters 0.016666668) (meters 0.033333335))
|
||||
(:fade-r -0.85333335)
|
||||
(:fade-g -0.85333335)
|
||||
(:accel-y (meters -0.0026666666) (meters -0.001))
|
||||
(:friction 0.875)
|
||||
(:timer (seconds 0.085) (seconds 0.33))
|
||||
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
||||
(:func 'sparticle-motion-blur)
|
||||
(:next-time (seconds 0.017) (seconds 0.98))
|
||||
(:next-launcher 2928)
|
||||
(:conerot-x (degrees -45) (degrees 90))
|
||||
(:conerot-y (degrees -45) (degrees 90))
|
||||
(:conerot-z (degrees -45) (degrees 90))
|
||||
(:rotate-y (degrees 0))
|
||||
(:conerot-radius (meters 0) (meters 0.2))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 2928
|
||||
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.85333335 -1.7066667))
|
||||
)
|
||||
|
||||
(deftype fac-robotank-segment-event (structure)
|
||||
((source uint64)
|
||||
(event-type symbol)
|
||||
(actor string)
|
||||
(pos-norm float)
|
||||
(param basic)
|
||||
(param-obj object :overlay-at param)
|
||||
(param-func (function fort-robotank none) :overlay-at param)
|
||||
(param-sym symbol :overlay-at param)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-robotank-segment (structure)
|
||||
((flags robotank-segment-flag)
|
||||
(max-speed float)
|
||||
(next-segment int32)
|
||||
(next-segment-start float)
|
||||
(event-count int32)
|
||||
(event-tbl (inline-array fac-robotank-segment-event))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-robotank-path-info (structure)
|
||||
((dir vector :inline)
|
||||
(u float)
|
||||
(du float)
|
||||
(du-final float)
|
||||
(prev-u float)
|
||||
(max-speed float)
|
||||
(dist float)
|
||||
(dir-y-angle float)
|
||||
(start-y-angle float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-robotank-path-info-array (inline-array-class)
|
||||
((data fac-robotank-path-info :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> fac-robotank-path-info-array heap-base) (the-as uint 48))
|
||||
|
||||
(deftype fac-robotank-wheel-info (structure)
|
||||
((jmod joint-mod-spinner)
|
||||
(radius float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-robotank-tread-info (structure)
|
||||
((wheel fac-robotank-wheel-info 7 :inline)
|
||||
(texture texture-anim)
|
||||
(locator-joint int32)
|
||||
(pos vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-robotank (process-focusable)
|
||||
((parent (pointer factory-manager) :override)
|
||||
(self fac-robotank :override)
|
||||
(ppointer (pointer fac-robotank) :override)
|
||||
(barrel-part sparticle-launch-control)
|
||||
(vibe-jmod joint-mod-blend-local :inline)
|
||||
(tread fac-robotank-tread-info 2 :inline)
|
||||
(path-info fac-robotank-path-info-array)
|
||||
(flags robotank-flag)
|
||||
(mgr handle)
|
||||
(pov-cam-offset vector 2 :inline)
|
||||
(explode-sg skeleton-group)
|
||||
(turret handle)
|
||||
(no-collision-timer time-frame)
|
||||
(buzz-timer time-frame)
|
||||
(engine-vibe-rate float)
|
||||
(engine-vibe-amp float)
|
||||
(attack-id uint32)
|
||||
(path-index int32)
|
||||
(path-count int32)
|
||||
(continue-index int32)
|
||||
(hit-points float)
|
||||
(engine-sound sound-id)
|
||||
(engine-sound-playing symbol)
|
||||
(snd-cmd-time time-frame)
|
||||
)
|
||||
(:state-methods
|
||||
turning
|
||||
moving
|
||||
pause
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(fac-robotank-method-32 (_type_) none)
|
||||
(fac-robotank-method-33 (_type_) none)
|
||||
(go-explode (_type_) (pointer joint-exploder))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-fac-robotank fac-robotank fac-robotank-lod0-jg fac-robotank-idle-ja
|
||||
((fac-robotank-lod0-mg (meters 20)) (fac-robotank-lod1-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 9)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-fac-robotank-explode fac-robotank fac-robotank-explode-lod0-jg fac-robotank-explode-idle-ja
|
||||
((fac-robotank-explode-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 15)
|
||||
)
|
||||
|
||||
(define *fac-robotank-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 3 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 24 :parent-joint-index -1)
|
||||
(new 'static 'joint-exploder-static-joint-params :joint-index 25 :parent-joint-index -1)
|
||||
)
|
||||
:collide-spec (collide-spec backgnd)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch event-message-block vs none.
|
||||
(defmethod fac-robotank-method-32 ((this fac-robotank))
|
||||
(with-pp
|
||||
(let ((v1-0 (-> this root)))
|
||||
(when (< (-> *event-queue* length) (-> *event-queue* allocated-length))
|
||||
(let ((v0-1 (-> *event-queue* data (-> *event-queue* length))))
|
||||
(+! (-> *event-queue* length) 1)
|
||||
(set! (-> v0-1 from-handle) (process->handle pp))
|
||||
(set! (-> v0-1 to-handle) (process->handle (handle->process (-> this turret))))
|
||||
(set! (-> v0-1 num-params) 4)
|
||||
(set! (-> v0-1 message) 'update)
|
||||
(set! (-> v0-1 param 0) (the-as uint (-> v1-0 trans)))
|
||||
(set! (-> v0-1 param 1) (the-as uint (-> v1-0 quat)))
|
||||
(set! (-> v0-1 param 2) (the-as uint (-> this node-list data 3)))
|
||||
(set! (-> v0-1 param 3) (the-as uint (-> this vibe-jmod transform quat)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-post fac-robotank ()
|
||||
(when (and (nonzero? (-> self no-collision-timer))
|
||||
(time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout))
|
||||
)
|
||||
(let ((v1-7 (-> self root root-prim)))
|
||||
(set! (-> v1-7 prim-core collide-as) (-> self root backup-collide-as))
|
||||
(set! (-> v1-7 prim-core collide-with) (-> self root backup-collide-with))
|
||||
)
|
||||
(set! (-> self no-collision-timer) 0)
|
||||
0
|
||||
)
|
||||
(fac-robotank-method-32 self)
|
||||
(dotimes (gp-0 2)
|
||||
(let* ((s5-0 (-> self tread gp-0))
|
||||
(s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s5-0 locator-joint))))
|
||||
)
|
||||
(let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> s5-0 pos))))
|
||||
(let ((s2-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))))
|
||||
(if (= gp-0 1)
|
||||
(vector-float*! s2-0 s2-0 -1.0)
|
||||
)
|
||||
(let ((s1-0 (get-field-spec-by-id (-> *part-id-table* 2924) (sp-field-id spt-num)))
|
||||
(f30-0 (vector-length s3-1))
|
||||
(f28-0 (* 12288.0 (seconds-per-frame)))
|
||||
)
|
||||
(set! (-> s1-0 initial-valuef) (lerp-scale 0.0 0.5 f30-0 0.0 f28-0))
|
||||
(set! (-> s1-0 random-rangef) (lerp-scale 0.0 1.0 f30-0 0.0 f28-0))
|
||||
)
|
||||
(let ((a1-8 (forward-up-nopitch->inv-matrix (new 'stack-no-clear 'matrix) s2-0 *up-vector*)))
|
||||
(set! (-> a1-8 trans quad) (-> s4-0 quad))
|
||||
(+! (-> a1-8 trans y) -2498.56)
|
||||
(spawn-from-mat (-> self part) a1-8)
|
||||
)
|
||||
)
|
||||
(vector-inv-orient-by-quat! s3-1 s3-1 (-> self root quat))
|
||||
(let ((f30-1 (fabs (-> s3-1 z))))
|
||||
(dotimes (s3-2 7)
|
||||
(let ((s2-1 (-> s5-0 wheel s3-2)))
|
||||
(set! (-> s2-1 jmod spin-rate) (* (atan f30-1 (-> s2-1 radius)) (-> self clock frames-per-second)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 pos quad) (-> s4-0 quad))
|
||||
)
|
||||
)
|
||||
(let ((v1-48 (-> self path-info data (-> self path-index))))
|
||||
(cond
|
||||
((and (logtest? (-> self flags) (robotank-flag r2)) (!= (-> v1-48 u) (-> v1-48 prev-u)))
|
||||
(seek! (-> self engine-vibe-rate) 3.0 (seconds-per-frame))
|
||||
(seek! (-> self engine-vibe-amp) 1.0 (seconds-per-frame))
|
||||
)
|
||||
(else
|
||||
(seek! (-> self engine-vibe-rate) 1.0 (seconds-per-frame))
|
||||
(seek! (-> self engine-vibe-amp) 0.4 (seconds-per-frame))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((f0-23 30.0)
|
||||
(f1-4 65536.0)
|
||||
(f2-1 (the float (current-time)))
|
||||
(f0-24 (/ (* f1-4 (- f2-1 (* (the float (the int (/ f2-1 f0-23))) f0-23))) f0-23))
|
||||
(f30-2 (sin f0-24))
|
||||
(f28-1 (* 300.0 (/ 1.0 (-> self engine-vibe-rate))))
|
||||
(f0-27 (the float (current-time)))
|
||||
(f26-0 (/ (- f0-27 (* (the float (the int (/ f0-27 f28-1))) f28-1)) f28-1))
|
||||
(f30-3 (* f30-2 (sin (* 65536.0 f26-0))))
|
||||
)
|
||||
(let* ((f0-32 (sin 7281.778))
|
||||
(f1-13 (- 1.0 f0-32))
|
||||
)
|
||||
0.0
|
||||
(when (and (or (< f0-32 f26-0) (< f26-0 f1-13)) (time-elapsed? (-> self buzz-timer) (the int (* 0.5 f28-1))))
|
||||
(let* ((gp-1 *target*)
|
||||
(a0-37 (if (type? gp-1 process-focusable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-37
|
||||
(lerp-scale 1.0 0.0 (vector-vector-distance (-> self root trans) (get-trans a0-37 0)) 81920.0 327680.0)
|
||||
)
|
||||
)
|
||||
(set-time! (-> self buzz-timer))
|
||||
)
|
||||
)
|
||||
(quaternion-axis-angle!
|
||||
(-> self vibe-jmod transform quat)
|
||||
0.0
|
||||
0.0
|
||||
1.0
|
||||
(* 182.04445 (* (-> self engine-vibe-amp) f30-3))
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> self flags) (robotank-flag r7))
|
||||
(let ((gp-3 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self root quat)))
|
||||
(a1-21 (new 'stack-no-clear 'event-message-block))
|
||||
)
|
||||
(set! (-> a1-21 from) (process->ppointer self))
|
||||
(set! (-> a1-21 num-params) 0)
|
||||
(set! (-> a1-21 message) 'get-rotate-quat)
|
||||
(let ((s5-2 (send-event-function (handle->process (-> self turret)) a1-21))
|
||||
(s4-2 (new 'stack-no-clear 'quaternion))
|
||||
(s2-3 (-> (the-as fac-robotank-turret (handle->process (-> self turret))) root trans))
|
||||
(s1-1 (-> self root trans))
|
||||
(s3-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((a1-23 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-23 from) (process->ppointer self))
|
||||
(set! (-> a1-23 num-params) 0)
|
||||
(set! (-> a1-23 message) 'get-gun-elevation-cam)
|
||||
(let ((f30-4 (the-as float (send-event-function (handle->process (-> self turret)) a1-23))))
|
||||
(vector-! s3-4 s2-3 s1-1)
|
||||
(vector-orient-by-quat! s3-4 s3-4 gp-3)
|
||||
(quaternion*! s4-2 (the-as quaternion s5-2) gp-3)
|
||||
(quaternion-normalize! s4-2)
|
||||
(quaternion-rotate-local-x! s4-2 s4-2 f30-4)
|
||||
)
|
||||
)
|
||||
(vector-orient-by-quat! (the-as vector (-> self pov-cam-offset)) (-> self pov-cam-offset 1) s4-2)
|
||||
(vector+! (the-as vector (-> self pov-cam-offset)) (the-as vector (-> self pov-cam-offset)) s3-4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(pusher-post)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-handler fac-robotank ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('trigger)
|
||||
(when (and *target* (< (-> self continue-index) (the-as int (-> arg3 param 0))))
|
||||
(if (< (-> self continue-index) 0)
|
||||
(add-process *gui-control* self (gui-channel alert) (gui-action play) "cityv107" -99.0 0)
|
||||
)
|
||||
(logior! (-> self flags) (robotank-flag r5))
|
||||
(let ((v0-0 (the-as object (-> arg3 param 0))))
|
||||
(set! (-> self continue-index) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trans)
|
||||
(-> self root trans)
|
||||
)
|
||||
(('die)
|
||||
(go-virtual die)
|
||||
)
|
||||
(('fire-suppress-on)
|
||||
(send-event (handle->process (-> self turret)) 'fire-suppress #t)
|
||||
)
|
||||
(('fire-suppress-off)
|
||||
(send-event (handle->process (-> self turret)) 'fire-suppress #f)
|
||||
)
|
||||
(('attack)
|
||||
(let ((v1-26 (the-as attack-info (-> arg3 param 1))))
|
||||
0.0
|
||||
(let ((f1-0 (if (logtest? (attack-mask damage) (-> v1-26 mask))
|
||||
(-> v1-26 damage)
|
||||
0.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f1-0)))
|
||||
)
|
||||
)
|
||||
(when (>= 0.0 (-> self hit-points))
|
||||
(go-explode self)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
(('stop-music)
|
||||
(remove-setting! 'music)
|
||||
(remove-setting! 'music-volume)
|
||||
(remove-setting! 'sound-mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate turning (fac-robotank)
|
||||
:virtual #t
|
||||
:event fac-robotank-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self path-info data (-> self path-index) start-y-angle) (quaternion-y-angle (-> self root quat)))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((gp-0 (-> self path-info data (-> self path-index)))
|
||||
(s5-0 (-> self root))
|
||||
(f30-0 (quaternion-y-angle (-> s5-0 quat)))
|
||||
(f28-0 (fabs (deg-diff f30-0 (-> gp-0 start-y-angle))))
|
||||
(f30-1 (fabs (deg-diff f30-0 (vector-y-angle (-> gp-0 dir)))))
|
||||
)
|
||||
(let* ((f0-3 (fmin f28-0 f30-1))
|
||||
(f0-6 (fmax 728.1778 (fmin 10012.444 (* 4.0 f0-3))))
|
||||
)
|
||||
(seek-toward-heading-vec! s5-0 (-> gp-0 dir) f0-6 (seconds 0.02))
|
||||
)
|
||||
(if (< f30-1 36.40889)
|
||||
(go-virtual pause)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
:post (behavior ()
|
||||
(fac-robotank-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-trans ((this fac-robotank) (arg0 int))
|
||||
"Get the `trans` for this process."
|
||||
(-> this root trans)
|
||||
)
|
||||
|
||||
(defstate moving (fac-robotank)
|
||||
:virtual #t
|
||||
:event fac-robotank-handler
|
||||
:enter (behavior ()
|
||||
(let ((v1-3 (-> self path-info data (-> self path-index))))
|
||||
(set! (-> v1-3 u) 0.0)
|
||||
(set! (-> v1-3 prev-u) -1.0)
|
||||
(set! (-> v1-3 du) 0.0)
|
||||
(set! (-> v1-3 du-final) 0.01)
|
||||
)
|
||||
(sound-play "tank-engine" :id (-> self engine-sound) :position (-> self root trans))
|
||||
(set! (-> self engine-sound-playing) #t)
|
||||
(set-time! (-> self snd-cmd-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self flags) (robotank-flag r2))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not *target*)
|
||||
(go-virtual die)
|
||||
)
|
||||
(let* ((gp-0 *target*)
|
||||
(a0-1 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when a0-1
|
||||
(if (< (-> (get-trans a0-1 0) y) (+ -18432.0 (-> self root trans y)))
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-14 (-> self path-index)))
|
||||
(when (= (-> self path-info data v1-14 u) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(logclear! (-> self flags) (robotank-flag r2))
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 0.1))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(logior! (-> self flags) (robotank-flag r2))
|
||||
(sleep-code)
|
||||
)
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self flags) (robotank-flag r2))
|
||||
(let* ((gp-0 *target*)
|
||||
(a0-1 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(a0-1
|
||||
(get-trans a0-1 0)
|
||||
)
|
||||
(else
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (-> self path-info data (-> self path-index))))
|
||||
(let* ((s5-0 (the-as factory-manager (handle->process (-> self mgr))))
|
||||
(s2-0 (-> s5-0 tpath path (-> self path-index)))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
(f28-0 (-> gp-1 u))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (-> self root))
|
||||
(f30-0 (seconds-per-frame))
|
||||
)
|
||||
(get-point-at-percent-along-path! s2-0 (-> s4-0 trans) f28-0 'interp)
|
||||
(+! (-> s4-0 trans y) 1024.0)
|
||||
(displacement-between-points-at-percent-normalized! s2-0 s3-0 f28-0)
|
||||
(path-control-method-15 s2-0 s1-0 f28-0 (-> gp-1 du-final))
|
||||
(seek-toward-heading-vec! s4-0 s3-0 16384.0 (seconds 0.02))
|
||||
(set! (-> gp-1 prev-u) (-> gp-1 u))
|
||||
(set! (-> gp-1 u)
|
||||
(path-control-method-26 (-> s5-0 tpath path (-> self path-index)) (-> gp-1 u) (* 40960.0 f30-0))
|
||||
)
|
||||
)
|
||||
(if (>= (-> gp-1 u) 1.0)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(when (time-elapsed? (-> self snd-cmd-time) (seconds 0.5))
|
||||
(sound-play "tank-engine" :id (-> self engine-sound) :vol 80 :position (-> self root trans))
|
||||
(set! (-> self engine-sound-playing) #t)
|
||||
(set-time! (-> self snd-cmd-time))
|
||||
)
|
||||
(fac-robotank-post)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate pause (fac-robotank)
|
||||
:virtual #t
|
||||
:event fac-robotank-handler
|
||||
:enter (behavior ()
|
||||
'()
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (logtest? (-> self flags) (robotank-flag r5))
|
||||
(logclear! (-> self flags) (robotank-flag r5))
|
||||
(go-virtual moving)
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
:post fac-robotank-post
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder).
|
||||
(defmethod go-explode ((this fac-robotank))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(sound-play "tank-explode")
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 732 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 732))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 732))
|
||||
)
|
||||
)
|
||||
(let ((s5-3 (new 'stack 'joint-exploder-tuning (the-as uint 0))))
|
||||
(let ((v1-34 (new 'stack-no-clear 'vector)))
|
||||
(let ((a0-17 (-> s5-3 fountain-rand-transv-lo)))
|
||||
(let ((a1-9 (-> this root trans)))
|
||||
(let ((a2-12 *up-vector*))
|
||||
(let ((a3-6 2048.0))
|
||||
(.mov vf7 a3-6)
|
||||
)
|
||||
(.lvf vf5 (&-> a2-12 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> a1-9 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-17 quad) vf6)
|
||||
)
|
||||
(vector-float*! v1-34 *up-vector* 81920.0)
|
||||
(let ((a2-14 (-> s5-3 fountain-rand-transv-lo)))
|
||||
(let ((a0-20 v1-34))
|
||||
(let ((a1-11 *identity-vector*))
|
||||
(let ((a3-8 -40960.0))
|
||||
(.mov vf7 a3-8)
|
||||
)
|
||||
(.lvf vf5 (&-> a1-11 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> a0-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 (&-> a2-14 quad) vf6)
|
||||
)
|
||||
(let ((a1-12 (-> s5-3 fountain-rand-transv-hi)))
|
||||
(let ((a0-21 *identity-vector*))
|
||||
(let ((a2-16 40960.0))
|
||||
(.mov vf7 a2-16)
|
||||
)
|
||||
(.lvf vf5 (&-> a0-21 quad))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-34 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-12 quad) vf6)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-3 gravity) -122880.0)
|
||||
(set! (-> s5-3 rot-speed) 16.0)
|
||||
(process-spawn
|
||||
joint-exploder
|
||||
(art-group-get-by-name *level* "skel-fac-robotank-explode" (the-as (pointer level) #f))
|
||||
9
|
||||
s5-3
|
||||
*fac-robotank-exploder-params*
|
||||
:name "joint-exploder"
|
||||
:to this
|
||||
:unk 0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate die (fac-robotank)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(send-event (handle->process (-> self turret)) 'die)
|
||||
(let ((v1-7 (-> self root root-prim)))
|
||||
(set! (-> v1-7 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-7 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (time-elapsed? gp-0 (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(let ((v1-20 (handle->process (-> self mgr))))
|
||||
(+! (-> v1-20 stack 2) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod deactivate ((this fac-robotank))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(if (-> this engine-sound-playing)
|
||||
(sound-stop (-> this engine-sound))
|
||||
)
|
||||
(if (nonzero? (-> this barrel-part))
|
||||
(kill-particles (-> this barrel-part))
|
||||
)
|
||||
((method-of-type process-drawable deactivate) this)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod relocate ((this fac-robotank) (offset int))
|
||||
(if (nonzero? (-> this barrel-part))
|
||||
(&+! (-> this barrel-part) offset)
|
||||
)
|
||||
(if (nonzero? (-> this path-info))
|
||||
(&+! (-> this path-info) offset)
|
||||
)
|
||||
;; og:preserve-this
|
||||
(dotimes (v1-8 2)
|
||||
(dotimes (a0-1 7)
|
||||
(if (nonzero? (-> this tread v1-8 wheel a0-1 jmod))
|
||||
(&+! (-> this tread v1-8 wheel a0-1 jmod) offset)
|
||||
)
|
||||
)
|
||||
)
|
||||
(call-parent-method this offset)
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-birth-path fac-robotank ((arg0 factory-manager))
|
||||
(local-vars (v0-0 int))
|
||||
0
|
||||
(until (not (logtest? (-> arg0 tpath inout v0-0 flags) (factory-inout-flag fi0 fi2)))
|
||||
(set! v0-0 (rand-vu-int-range 0 (+ (-> arg0 tpath npath) -1)))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
|
||||
(defbehavior fac-robotank-init-by-other fac-robotank ()
|
||||
(set! (-> self mgr) (ppointer->handle (-> self parent)))
|
||||
(let ((gp-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> gp-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> gp-0 reaction) cshape-reaction-default)
|
||||
(set! (-> gp-0 no-reaction)
|
||||
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
||||
)
|
||||
(let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0)))
|
||||
(set! (-> gp-0 total-prims) (the-as uint 2))
|
||||
(set! (-> s5-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker pusher))
|
||||
(set! (-> s5-0 prim-core collide-with) (collide-spec jak bot player-list))
|
||||
(set! (-> s5-0 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 47104.0)
|
||||
(set! (-> gp-0 root-prim) s5-0)
|
||||
)
|
||||
(pusher-init gp-0)
|
||||
(let ((v1-17 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0))))
|
||||
(set! (-> v1-17 prim-core collide-as) (collide-spec enemy obstacle))
|
||||
(set! (-> v1-17 prim-core action) (collide-action solid))
|
||||
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 32768.0)
|
||||
)
|
||||
(set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w)))
|
||||
(let ((v1-20 (-> gp-0 root-prim)))
|
||||
(set! (-> gp-0 backup-collide-as) (-> v1-20 prim-core collide-as))
|
||||
(set! (-> gp-0 backup-collide-with) (-> v1-20 prim-core collide-with))
|
||||
)
|
||||
(set! (-> self root) gp-0)
|
||||
)
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(vector-identity! (-> self root scale))
|
||||
(set! (-> self level) (level-get *level* 'factoryb))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robotank" (the-as (pointer level) #f)))
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self explode-sg)
|
||||
(the-as
|
||||
skeleton-group
|
||||
(art-group-get-by-name *level* "skel-fac-robotank-explode" (the-as (pointer level) #f))
|
||||
)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(process-entity-status! self (entity-perm-status no-kill) #t)
|
||||
(set! (-> self draw light-index) (the-as uint 10))
|
||||
(set! (-> self fact)
|
||||
(new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
|
||||
)
|
||||
(set! (-> self flags) (robotank-flag))
|
||||
(set! (-> self no-collision-timer) 0)
|
||||
(set! (-> self engine-vibe-rate) 1.0)
|
||||
(set! (-> self buzz-timer) 0)
|
||||
(let* ((v1-37 *game-info*)
|
||||
(a0-24 (+ (-> v1-37 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-37 attack-id) a0-24)
|
||||
(set! (-> self attack-id) a0-24)
|
||||
)
|
||||
(set! (-> self hit-points) 1.0)
|
||||
(let ((gp-2 (handle->process (-> self mgr))))
|
||||
(set! (-> self path-count) (-> (the-as factory-manager gp-2) tpath npath))
|
||||
(set! (-> self path-info) (new 'process 'fac-robotank-path-info-array (-> self path-count)))
|
||||
(set! (-> self path-index) (fac-robotank-birth-path (the-as factory-manager (handle->process (-> self mgr)))))
|
||||
(set! (-> self continue-index) -1)
|
||||
(let ((s5-2 (new 'stack-no-clear 'vector)))
|
||||
(get-point-at-percent-along-path!
|
||||
(-> (the-as factory-manager gp-2) tpath path 0)
|
||||
(-> self root trans)
|
||||
0.0
|
||||
'interp
|
||||
)
|
||||
(+! (-> self root trans y) 1024.0)
|
||||
(displacement-between-points-at-percent-normalized! (-> (the-as factory-manager gp-2) tpath path 0) s5-2 0.0)
|
||||
(set-heading-vec! (-> self root) s5-2)
|
||||
)
|
||||
)
|
||||
(ja-no-eval :group! fac-robotank-idle-ja :num! zero)
|
||||
(transform-post)
|
||||
(let ((gp-3 (new 'stack-no-clear 'vector)))
|
||||
(set-vector! gp-3 0.0 12541.952 -6778.88 1.0)
|
||||
(set! (-> self turret) (ppointer->handle (process-spawn
|
||||
fac-robotank-turret
|
||||
(-> self root trans)
|
||||
(-> self root quat)
|
||||
gp-3
|
||||
32.0
|
||||
:name "fac-robotank-turret"
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(init (-> self vibe-jmod) self (the-as uint 4) (joint-mod-base-flags attached))
|
||||
(set! (-> self vibe-jmod blend) 0.5)
|
||||
(quaternion-axis-angle! (-> self vibe-jmod transform quat) 0.0 0.0 1.0 0.0)
|
||||
(let ((gp-4 (-> self tread)))
|
||||
(set! (-> gp-4 0 wheel 0 jmod) (new 'process 'joint-mod-spinner self 5 *x-vector* 0.0))
|
||||
(set! (-> gp-4 0 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-5 (the-as object (&-> self stack 240))))
|
||||
(set! (-> (the-as fac-robotank-tread-info gp-5) wheel 0 jmod)
|
||||
(new 'process 'joint-mod-spinner self 6 *x-vector* 0.0)
|
||||
)
|
||||
(set! (-> (the-as fac-robotank-tread-info gp-5) wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-6 (the-as fac-robotank-tread-info (&-> self stack 256))))
|
||||
(set! (-> gp-6 wheel 0 jmod) (new 'process 'joint-mod-spinner self 7 *x-vector* 0.0))
|
||||
(set! (-> gp-6 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-7 (the-as fac-robotank-tread-info (&-> self stack 272))))
|
||||
(set! (-> gp-7 wheel 0 jmod) (new 'process 'joint-mod-spinner self 8 *x-vector* 0.0))
|
||||
(set! (-> gp-7 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-8 (the-as fac-robotank-tread-info (&-> self stack 288))))
|
||||
(set! (-> gp-8 wheel 0 jmod) (new 'process 'joint-mod-spinner self 9 *x-vector* 0.0))
|
||||
(set! (-> gp-8 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-9 (the-as fac-robotank-tread-info (&-> self stack 304))))
|
||||
(set! (-> gp-9 wheel 0 jmod) (new 'process 'joint-mod-spinner self 10 *x-vector* 0.0))
|
||||
(set! (-> gp-9 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-10 (the-as fac-robotank-tread-info (&-> self stack 320))))
|
||||
(set! (-> gp-10 wheel 0 jmod) (new 'process 'joint-mod-spinner self 11 *x-vector* 0.0))
|
||||
(set! (-> gp-10 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-11 (-> self tread 1)))
|
||||
(set! (-> gp-11 wheel 0 jmod) (new 'process 'joint-mod-spinner self 12 *x-vector* 0.0))
|
||||
(set! (-> gp-11 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-12 (the-as fac-robotank-tread-info (&-> self stack 384))))
|
||||
(set! (-> gp-12 wheel 0 jmod) (new 'process 'joint-mod-spinner self 13 *x-vector* 0.0))
|
||||
(set! (-> gp-12 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-13 (the-as fac-robotank-tread-info (&-> self stack 400))))
|
||||
(set! (-> gp-13 wheel 0 jmod) (new 'process 'joint-mod-spinner self 14 *x-vector* 0.0))
|
||||
(set! (-> gp-13 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-14 (the-as fac-robotank-tread-info (&-> self stack 416))))
|
||||
(set! (-> gp-14 wheel 0 jmod) (new 'process 'joint-mod-spinner self 15 *x-vector* 0.0))
|
||||
(set! (-> gp-14 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-15 (the-as fac-robotank-tread-info (&-> self stack 432))))
|
||||
(set! (-> gp-15 wheel 0 jmod) (new 'process 'joint-mod-spinner self 16 *x-vector* 0.0))
|
||||
(set! (-> gp-15 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-16 (the-as fac-robotank-tread-info (&-> self stack 448))))
|
||||
(set! (-> gp-16 wheel 0 jmod) (new 'process 'joint-mod-spinner self 17 *x-vector* 0.0))
|
||||
(set! (-> gp-16 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((gp-17 (the-as fac-robotank-tread-info (&-> self stack 464))))
|
||||
(set! (-> gp-17 wheel 0 jmod) (new 'process 'joint-mod-spinner self 18 *x-vector* 0.0))
|
||||
(set! (-> gp-17 wheel 0 radius) 2048.0)
|
||||
)
|
||||
(let ((v1-105 8))
|
||||
(set! (-> self tread 0 locator-joint) v1-105)
|
||||
(vector<-cspace! (-> self tread 0 pos) (-> self node-list data v1-105))
|
||||
)
|
||||
(let ((v1-109 15))
|
||||
(set! (-> self tread 1 locator-joint) v1-109)
|
||||
(vector<-cspace! (-> self tread 1 pos) (-> self node-list data v1-109))
|
||||
)
|
||||
(set-vector! (-> self pov-cam-offset 0) 0.0 13516.8 -13516.8 1.0)
|
||||
(set-vector! (-> self pov-cam-offset 1) 0.0 13516.8 -13516.8 1.0)
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 782) self))
|
||||
(set! (-> self barrel-part) (create-launch-control (-> *part-group-id-table* 783) self))
|
||||
(set! (-> self engine-sound) (new-sound-id))
|
||||
(set! (-> self engine-sound-playing) #f)
|
||||
(set-time! (-> self snd-cmd-time))
|
||||
(go-virtual moving)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs fac-robotank.
|
||||
(defun fac-robotank-spawn ((arg0 process))
|
||||
(let ((gp-0 (the-as process #f)))
|
||||
(let ((v1-1 (process-spawn fac-robotank :name "fac-robotank" :to arg0)))
|
||||
(if v1-1
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(the-as fac-robotank gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
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
@@ -5,5 +5,186 @@
|
||||
;; name in dgo: factory-h
|
||||
;; dgos: LFACTORY
|
||||
|
||||
;; +++factory-inout-flag
|
||||
(defenum factory-inout-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(fi0 0)
|
||||
(fi1 1)
|
||||
(fi2 2)
|
||||
)
|
||||
;; ---factory-inout-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype fac-edge-list (basic)
|
||||
((edge int16 4)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype factory-inout (structure)
|
||||
((lpath int16)
|
||||
(lpos float)
|
||||
(flags factory-inout-flag)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype factory-pathlist (structure)
|
||||
((path path-control 200)
|
||||
(inout factory-inout 200 :inline)
|
||||
(loops int16 200)
|
||||
(npath int8)
|
||||
(nloop int8)
|
||||
(curidx int8)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype factory-manager (process)
|
||||
((self factory-manager :override)
|
||||
(nfighters-spawned uint8)
|
||||
(nfighters-total uint8)
|
||||
(ntanks-spawned uint8)
|
||||
(player-born time-frame)
|
||||
(player-died time-frame)
|
||||
(fighter-spawned time-frame)
|
||||
(fighter-killed time-frame)
|
||||
(tank-spawned time-frame)
|
||||
(tank-killed time-frame)
|
||||
(fpath factory-pathlist :inline)
|
||||
(tpath factory-pathlist :inline)
|
||||
(cur-wave uint8)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
(:methods
|
||||
(factory-manager-method-15 (_type_) none)
|
||||
(init-paths-for-list! (_type_ factory-pathlist string) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype factory-fighter (rigid-body-object)
|
||||
((parent (pointer factory-manager) :override)
|
||||
(first-time? symbol)
|
||||
(path-pos float)
|
||||
(forw vector :inline)
|
||||
(upvc vector :inline)
|
||||
(ppos vector :inline)
|
||||
(pvel vector :inline)
|
||||
(pacc vector :inline)
|
||||
(blendpath float)
|
||||
(newpath int8)
|
||||
(path-idx int8)
|
||||
(last-hit-time time-frame)
|
||||
(disappear symbol)
|
||||
(last-fire time-frame)
|
||||
(turret-gun int8)
|
||||
(light-trail handle)
|
||||
(rot-vel float)
|
||||
(rot-acc float)
|
||||
(engine-sound sound-id)
|
||||
(engine-sound-playing? symbol)
|
||||
(last-snd-cmd time-frame)
|
||||
(red-tip-change-time time-frame)
|
||||
(red-tip-on symbol)
|
||||
)
|
||||
(:state-methods
|
||||
flying
|
||||
explode
|
||||
dive
|
||||
die
|
||||
)
|
||||
(:methods
|
||||
(fire-shot (_type_) projectile)
|
||||
(factory-fighter-method-61 (_type_) none)
|
||||
(factory-fighter-method-62 (_type_ symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-target (process-focusable)
|
||||
((sync sync-paused :inline)
|
||||
(minimap connection-minimap)
|
||||
(light-jm joint-mod)
|
||||
)
|
||||
(:state-methods
|
||||
idle
|
||||
die-fast
|
||||
retract
|
||||
retracted
|
||||
explode
|
||||
)
|
||||
(:methods
|
||||
(fac-target-method-33 (_type_) none)
|
||||
(fac-target-method-34 (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-gun-tower (process-focusable)
|
||||
((yaw float)
|
||||
(yawvel float)
|
||||
(pitch float)
|
||||
(pitchvel float)
|
||||
(dyaw float)
|
||||
(dpitch float)
|
||||
(last-fire time-frame)
|
||||
(last-hit-time time-frame)
|
||||
(gunrot int8)
|
||||
(muzzle int8)
|
||||
(gun-idx int8)
|
||||
(attack-id int32)
|
||||
(gun-tilt-jm joint-mod)
|
||||
(hit-points float)
|
||||
(invincable symbol)
|
||||
(rotate-sound sound-id)
|
||||
(rotate-sound-playing symbol)
|
||||
(blade-sound sound-id)
|
||||
(blade-sound-playing symbol)
|
||||
(snd-cmd-time time-frame)
|
||||
(minimap connection-minimap)
|
||||
)
|
||||
(:state-methods
|
||||
open
|
||||
idle
|
||||
die
|
||||
die-fast
|
||||
)
|
||||
(:methods
|
||||
(fac-gun-tower-method-32 (_type_) none)
|
||||
(fac-gun-tower-method-33 (_type_) none)
|
||||
(fac-gun-tower-method-34 (_type_) none)
|
||||
(fire-shot (_type_) projectile)
|
||||
(fac-gun-tower-method-36 (_type_) none)
|
||||
(send-attack (_type_ process-focusable) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-gun-tower-break (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
idle-stick
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fac-gun-tower-base-broken (process-drawable)
|
||||
()
|
||||
(:state-methods
|
||||
idle
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype hud-factory-damage (hud)
|
||||
()
|
||||
)
|
||||
|
||||
@@ -7,3 +7,47 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod draw ((this hud-factory-damage))
|
||||
(set-hud-piece-position!
|
||||
(the-as hud-sprite (-> this sprites))
|
||||
256
|
||||
(+ (the int (* 50.0 (-> this offset))) 376)
|
||||
)
|
||||
(set! (-> this sprites 0 pos z) #xfffff0)
|
||||
(set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -71 -5)
|
||||
(set! (-> this sprites 1 pos z) #xfffff0)
|
||||
(let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current))))))
|
||||
(set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4))))
|
||||
(set! (-> this sprites 1 color y) (the int (* 255.0 f0-4)))
|
||||
(set! (-> this sprites 1 color z) 0)
|
||||
(set! (-> this sprites 1 scale-x) (* 35.5 f0-4))
|
||||
)
|
||||
((method-of-type hud draw) this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod update-values! ((this hud-factory-damage))
|
||||
(set! (-> this values 0 target) (the-as int (-> *game-info* health-bar-vehicle)))
|
||||
(logclear! (-> this flags) (hud-flags disable))
|
||||
((method-of-type hud update-values!) this)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-callback ((this hud-factory-damage))
|
||||
(set! (-> this gui-id)
|
||||
(add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0)
|
||||
)
|
||||
(logior! (-> this flags) (hud-flags show))
|
||||
(set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-vehicle-health-bar-01 factoryb-minimap)))
|
||||
(set! (-> this sprites 0 flags) (hud-sprite-flags hsf3))
|
||||
(set! (-> this sprites 0 scale-x) 1.2)
|
||||
(set! (-> this sprites 0 scale-y) 1.2)
|
||||
(set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common)))
|
||||
(set! (-> this sprites 1 flags) (hud-sprite-flags))
|
||||
(set! (-> this sprites 1 scale-x) 0.0)
|
||||
(set! (-> this sprites 1 scale-y) 3.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,91 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype factory-states (structure)
|
||||
((light light-state :inline)
|
||||
(blink0 float)
|
||||
(blink1 float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior update-mood-factory 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 1.0 0.0 arg1 0.0 2.0)
|
||||
(set! (-> arg0 times 6 w) (-> (the-as factory-states gp-1) blink0))
|
||||
(set! (-> arg0 times 7 w) (-> (the-as factory-states gp-1) blink1))
|
||||
(when (not (paused?))
|
||||
(let ((v1-10 (-> *display* part-clock frame-counter)))
|
||||
(cond
|
||||
((< (* 0.2 (the float (mod v1-10 600))) 60.0)
|
||||
(seek! (-> (the-as factory-states gp-1) blink0) 0.0 (* 0.5 (seconds-per-frame)))
|
||||
(if (= (-> (the-as factory-states gp-1) blink1) 0.2)
|
||||
(set! (-> (the-as factory-states gp-1) blink1) 1.0)
|
||||
)
|
||||
(seek! (-> (the-as factory-states gp-1) blink1) 0.2 (* 2.0 (seconds-per-frame)))
|
||||
)
|
||||
(else
|
||||
(seek! (-> (the-as factory-states gp-1) blink0) 1.0 (* 0.5 (seconds-per-frame)))
|
||||
(set! (-> (the-as factory-states gp-1) blink1) 0.2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype factoryd-states (structure)
|
||||
((electricity electricity-state :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior update-mood-factoryd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-interior arg0 #f)
|
||||
(cond
|
||||
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
||||
(palette-select-special arg0)
|
||||
)
|
||||
(else
|
||||
(-> arg0 state)
|
||||
(let* ((a0-5 (-> *display* part-clock frame-counter))
|
||||
(v1-6 (mod a0-5 300))
|
||||
(s5-0 (mod a0-5 900))
|
||||
)
|
||||
(set! (-> arg0 times 0 w) 1.0)
|
||||
(set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-6))))))
|
||||
(set! (-> arg0 times 3 w) (if (< 450 s5-0)
|
||||
1.0
|
||||
0.5
|
||||
)
|
||||
)
|
||||
)
|
||||
(update-mood-electricity arg0 4 0 0.8 1.0)
|
||||
(set! (-> arg0 times 1 w) 1.0)
|
||||
(set! (-> arg0 times 5 w) 1.0)
|
||||
(set! (-> arg0 times 6 w) 1.0)
|
||||
(set! (-> arg0 times 7 w) 1.0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun set-factoryd-light! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'factoryd)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as factoryd-states v1-2) electricity scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user