1pub mod alpha;
2pub mod beam;
3pub mod beta;
4pub mod blink;
5pub mod charge;
6pub mod chargemelee;
7pub mod combomelee;
8pub mod dash;
9pub mod equip;
10pub mod explosion;
11pub mod idle;
12pub mod jump;
13pub mod leapexplosionshockwave;
14pub mod leapmelee;
15pub mod leapshockwave;
16pub mod rapidmelee;
17pub mod run;
18pub mod selfbuff;
19pub mod shockwave;
20pub mod shoot;
21pub mod spin;
22pub mod spritesummon;
23pub mod stunned;
24pub mod summon;
25pub mod wield;
26
27pub use self::{
29 alpha::AlphaAnimation, beam::BeamAnimation, beta::BetaAnimation, blink::BlinkAnimation,
30 charge::ChargeAnimation, chargemelee::ChargeMeleeAnimation, combomelee::ComboAnimation,
31 dash::DashAnimation, equip::EquipAnimation, explosion::ExplosionAnimation, idle::IdleAnimation,
32 jump::JumpAnimation, leapexplosionshockwave::LeapExplosionShockAnimation,
33 leapmelee::LeapAnimation, leapshockwave::LeapShockAnimation, rapidmelee::RapidMeleeAnimation,
34 run::RunAnimation, selfbuff::SelfBuffAnimation, shockwave::ShockwaveAnimation,
35 shoot::ShootAnimation, spin::SpinAnimation, spritesummon::SpriteSummonAnimation,
36 stunned::StunnedAnimation, summon::SummonAnimation, wield::WieldAnimation,
37};
38
39use super::{FigureBoneData, Offsets, Skeleton, make_bone, vek::*};
40use common::comp::{self};
41use core::{convert::TryFrom, f32::consts::PI};
42
43pub type Body = comp::biped_large::Body;
44
45skeleton_impls!(struct BipedLargeSkeleton {
46 + head,
47 + jaw,
48 + upper_torso,
49 + lower_torso,
50 + tail,
51 + main,
52 + second,
53 + shoulder_l,
54 + shoulder_r,
55 + hand_l,
56 + hand_r,
57 + leg_l,
58 + leg_r,
59 + foot_l,
60 + foot_r,
61 + hold,
62 torso,
63 control,
64 control_l,
65 control_r,
66 weapon_l,
67 weapon_r,
68 leg_control_l,
69 leg_control_r,
70 arm_control_l,
71 arm_control_r,
72});
73
74impl Skeleton for BipedLargeSkeleton {
75 type Attr = SkeletonAttr;
76 type Body = Body;
77
78 const BONE_COUNT: usize = 16;
79 #[cfg(feature = "use-dyn-lib")]
80 const COMPUTE_FN: &'static [u8] = b"biped_large_compute_mats\0";
81
82 #[cfg_attr(
83 feature = "be-dyn-lib",
84 unsafe(export_name = "biped_large_compute_mats")
85 )]
86 fn compute_matrices_inner(
87 &self,
88 base_mat: Mat4<f32>,
89 buf: &mut [FigureBoneData; super::MAX_BONE_COUNT],
90 body: Self::Body,
91 ) -> Offsets {
92 let base_mat = base_mat * Mat4::scaling_3d(SkeletonAttr::from(&body).scaler / 8.0);
93
94 let torso_mat = base_mat * Mat4::<f32>::from(self.torso);
95 let upper_torso_mat = torso_mat * Mat4::<f32>::from(self.upper_torso);
96 let control_mat = Mat4::<f32>::from(self.control);
97 let control_l_mat = Mat4::<f32>::from(self.control_l);
98 let control_r_mat = Mat4::<f32>::from(self.control_r);
99 let weapon_l_mat = control_mat * Mat4::<f32>::from(self.weapon_l);
100 let weapon_r_mat = control_mat * Mat4::<f32>::from(self.weapon_r);
101 let lower_torso_mat = upper_torso_mat * Mat4::<f32>::from(self.lower_torso);
102
103 let leg_l = Mat4::<f32>::from(self.leg_l);
104 let leg_r = Mat4::<f32>::from(self.leg_r);
105
106 let leg_control_l = lower_torso_mat * Mat4::<f32>::from(self.leg_control_l);
107 let leg_control_r = lower_torso_mat * Mat4::<f32>::from(self.leg_control_r);
108
109 let arm_control_l = upper_torso_mat * Mat4::<f32>::from(self.arm_control_l);
110 let arm_control_r = upper_torso_mat * Mat4::<f32>::from(self.arm_control_r);
111
112 let head_mat = upper_torso_mat * Mat4::<f32>::from(self.head);
113 let hand_l_mat = Mat4::<f32>::from(self.hand_l);
114
115 let jaw_mat = head_mat * Mat4::<f32>::from(self.jaw);
116
117 *(<&mut [_; Self::BONE_COUNT]>::try_from(&mut buf[0..Self::BONE_COUNT]).unwrap()) = [
118 make_bone(head_mat),
119 make_bone(jaw_mat),
120 make_bone(upper_torso_mat),
121 make_bone(lower_torso_mat),
122 make_bone(lower_torso_mat * Mat4::<f32>::from(self.tail)),
123 make_bone(upper_torso_mat * weapon_l_mat * Mat4::<f32>::from(self.main)),
124 make_bone(upper_torso_mat * weapon_r_mat * Mat4::<f32>::from(self.second)),
125 make_bone(arm_control_l * Mat4::<f32>::from(self.shoulder_l)),
126 make_bone(arm_control_r * Mat4::<f32>::from(self.shoulder_r)),
127 make_bone(
128 arm_control_l * weapon_l_mat * control_l_mat * Mat4::<f32>::from(self.hand_l),
129 ),
130 make_bone(
131 arm_control_r * weapon_r_mat * control_r_mat * Mat4::<f32>::from(self.hand_r),
132 ),
133 make_bone(leg_control_l * leg_l),
134 make_bone(leg_control_r * leg_r),
135 make_bone(leg_control_l * Mat4::<f32>::from(self.foot_l)),
136 make_bone(leg_control_r * Mat4::<f32>::from(self.foot_r)),
137 make_bone(upper_torso_mat * control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
139 ];
140
141 use comp::biped_large::Species::*;
142 let (mount_mat, mount_orientation) = match (body.species, body.body_type) {
145 (Dullahan | Occultsaurok | Mightysaurok | Slysaurok | Tidalwarrior, _) => (
146 upper_torso_mat,
147 self.torso.orientation * self.upper_torso.orientation,
148 ),
149 _ => (
150 arm_control_r * Mat4::<f32>::from(self.shoulder_r),
151 self.torso.orientation
152 * self.upper_torso.orientation
153 * self.arm_control_r.orientation
154 * self.shoulder_r.orientation,
155 ),
156 };
157
158 let mount_position = mount_mat.mul_point(mount_point(&body));
161
162 Offsets {
163 viewpoint: Some((jaw_mat * Vec4::new(0.0, 4.0, 0.0, 1.0)).xyz()),
164 mount_bone: Transform {
165 position: mount_position,
166 orientation: mount_orientation,
167 scale: Vec3::one(),
168 },
169 ..Default::default()
170 }
171 }
172}
173
174pub struct SkeletonAttr {
175 head: (f32, f32),
176 jaw: (f32, f32),
177 upper_torso: (f32, f32),
178 lower_torso: (f32, f32),
179 tail: (f32, f32),
180 shoulder: (f32, f32, f32),
181 hand: (f32, f32, f32),
182 leg: (f32, f32, f32),
183 foot: (f32, f32, f32),
184 scaler: f32,
185 tempo: f32,
186 grip: (f32, f32),
187 shl: (f32, f32, f32, f32, f32, f32),
188 shr: (f32, f32, f32, f32, f32, f32),
189 sc: (f32, f32, f32, f32, f32, f32),
190 hhl: (f32, f32, f32, f32, f32, f32),
191 hhr: (f32, f32, f32, f32, f32, f32),
192 hc: (f32, f32, f32, f32, f32, f32),
193 sthl: (f32, f32, f32, f32, f32, f32),
194 sthr: (f32, f32, f32, f32, f32, f32),
195 stc: (f32, f32, f32, f32, f32, f32),
196 bhl: (f32, f32, f32, f32, f32, f32),
197 bhr: (f32, f32, f32, f32, f32, f32),
198 bc: (f32, f32, f32, f32, f32, f32),
199 beast: bool,
200 float: bool,
201 height: f32,
202}
203
204impl<'a> TryFrom<&'a comp::Body> for SkeletonAttr {
205 type Error = ();
206
207 fn try_from(body: &'a comp::Body) -> Result<Self, Self::Error> {
208 match body {
209 comp::Body::BipedLarge(body) => Ok(SkeletonAttr::from(body)),
210 _ => Err(()),
211 }
212 }
213}
214
215impl Default for SkeletonAttr {
216 fn default() -> Self {
217 Self {
218 head: (0.0, 0.0),
219 jaw: (0.0, 0.0),
220 upper_torso: (0.0, 0.0),
221 lower_torso: (0.0, 0.0),
222 tail: (0.0, 0.0),
223 shoulder: (0.0, 0.0, 0.0),
224 hand: (0.0, 0.0, 0.0),
225 leg: (0.0, 0.0, 0.0),
226 foot: (0.0, 0.0, 0.0),
227 scaler: 0.0,
228 tempo: 0.0,
229 grip: (0.0, 0.0),
230 shl: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
231 shr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
232 sc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
233 hhl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
234 hhr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
235 hc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
236 sthl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
237 sthr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
238 stc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
239 bhl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
240 bhr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
241 bc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
242 beast: false,
243 float: false,
244 height: 0.0,
245 }
246 }
247}
248
249impl<'a> From<&'a Body> for SkeletonAttr {
250 fn from(body: &'a Body) -> Self {
251 use comp::biped_large::{BodyType::*, Species::*};
252 Self {
253 head: match (body.species, body.body_type) {
254 (Ogre, Male) => (5.0, 6.0),
255 (Ogre, Female) => (1.0, 7.5),
256 (Cyclops, _) => (9.5, 7.5),
257 (Wendigo, _) => (3.0, 7.5),
258 (Cavetroll, _) => (9.0, 7.0),
259 (Mountaintroll, _) => (13.0, 2.0),
260 (Swamptroll, _) => (11.0, 2.0),
261 (Dullahan, _) => (3.0, 6.0),
262 (Werewolf, _) => (11.5, 1.0),
263 (Occultsaurok, _) => (6.0, 3.5),
264 (Mightysaurok, _) => (6.0, 3.5),
265 (Slysaurok, _) => (6.0, 3.5),
266 (Mindflayer, _) => (5.0, 5.5),
267 (Minotaur, _) => (6.0, 3.0),
268 (Tidalwarrior, _) => (13.0, 2.0),
269 (Yeti, _) => (8.5, 4.0),
270 (Harvester, _) => (6.0, 11.0),
271 (Blueoni, _) => (10.5, -3.0),
272 (Redoni, _) => (10.5, -3.0),
273 (Cultistwarlord, _) => (0.5, 14.5),
274 (Cultistwarlock, _) => (0.5, 11.0),
275 (Huskbrute, _) => (8.5, 4.0),
276 (Tursus, _) => (-4.5, -14.0),
277 (Gigasfrost, _) => (-1.5, 5.0),
278 (AdletElder, _) => (-8.0, 10.0),
279 (SeaBishop, _) => (0.0, 9.5),
280 (HaniwaGeneral, _) => (-1.5, 10.0),
281 (TerracottaBesieger, _) => (-2.5, 16.0),
282 (TerracottaDemolisher, _) => (-2.5, 10.0),
283 (TerracottaPunisher, _) => (-2.5, 10.0),
284 (TerracottaPursuer, _) => (-2.0, 13.5),
285 (Cursekeeper, _) => (2.0, 6.5),
286 (Forgemaster, _) => (5.0, 6.0),
287 (Strigoi, _) => (10.0, 8.0),
288 (Executioner, _) => (0.0, 10.0),
289 (Gigasfire, _) => (3.0, 7.0),
290 },
291 jaw: match (body.species, body.body_type) {
292 (Ogre, _) => (0.0, 0.0),
293 (Cyclops, _) => (-4.5, -6.0),
294 (Wendigo, _) => (0.0, 0.0),
295 (Cavetroll, _) => (0.0, -4.0),
296 (Mountaintroll, _) => (-1.0, -8.0),
297 (Swamptroll, _) => (-4.0, -4.5),
298 (Dullahan, _) => (0.0, 0.0),
299 (Werewolf, _) => (5.0, -4.5),
300 (Occultsaurok, _) => (1.0, -2.5),
301 (Mightysaurok, _) => (1.0, -2.5),
302 (Slysaurok, _) => (1.0, -2.5),
303 (Mindflayer, _) => (0.0, 0.0),
304 (Minotaur, _) => (2.0, -4.0),
305 (Tidalwarrior, _) => (-1.0, -5.0),
306 (Yeti, _) => (-5.0, -5.0),
307 (Harvester, _) => (-2.0, -7.0),
308 (Blueoni, _) => (0.0, 3.5),
309 (Redoni, _) => (0.0, 3.5),
310 (Cultistwarlord, _) => (0.0, 3.5),
311 (Cultistwarlock, _) => (0.0, 3.5),
312 (Huskbrute, _) => (-5.0, -5.0),
313 (Tursus, _) => (4.0, 10.5),
314 (Gigasfrost, _) => (-1.0, 5.5),
315 (AdletElder, _) => (10.5, -7.0),
316 (SeaBishop, _) => (5.0, -4.5),
317 (HaniwaGeneral, _) => (10.5, -7.0),
318 (TerracottaBesieger, _) => (10.5, -7.0),
319 (TerracottaDemolisher, _) => (10.5, -7.0),
320 (TerracottaPunisher, _) => (10.5, -7.0),
321 (TerracottaPursuer, _) => (10.5, -7.0),
322 (Cursekeeper, _) => (10.5, -7.0),
323 (Forgemaster, _) => (-1.0, 5.5),
324 (Strigoi, _) => (-2.0, -4.0),
325 (Executioner, _) => (-2.0, -4.0),
326 (Gigasfire, _) => (-1.0, 3.5),
327 },
328 upper_torso: match (body.species, body.body_type) {
329 (Ogre, Male) => (0.0, 27.5),
330 (Ogre, Female) => (0.0, 28.0),
331 (Cyclops, _) => (-2.0, 31.0),
332 (Wendigo, _) => (-1.0, 29.0),
333 (Cavetroll, _) => (-1.0, 26.5),
334 (Mountaintroll, _) => (-1.0, 30.5),
335 (Swamptroll, _) => (-1.0, 28.5),
336 (Dullahan, _) => (0.0, 29.0),
337 (Werewolf, _) => (3.0, 26.0),
338 (Occultsaurok, _) => (3.0, 24.0),
339 (Mightysaurok, _) => (3.0, 24.0),
340 (Slysaurok, _) => (3.0, 24.0),
341 (Mindflayer, _) => (0.0, 30.5),
342 (Minotaur, _) => (-1.0, 31.5),
343 (Tidalwarrior, _) => (-3.0, 22.0),
344 (Yeti, _) => (-1.0, 23.5),
345 (Harvester, _) => (-1.0, 18.0),
346 (Blueoni, _) => (-1.0, 26.5),
347 (Redoni, _) => (-1.0, 26.5),
348 (Cultistwarlord, _) => (-1.0, 18.5),
349 (Cultistwarlock, _) => (-1.0, 17.5),
350 (Huskbrute, _) => (-1.0, 23.5),
351 (Tursus, _) => (3.0, 26.0),
352 (Gigasfrost, _) => (-1.0, 30.0),
353 (AdletElder, _) => (3.0, 19.0),
354 (SeaBishop, _) => (0.0, 15.0),
355 (HaniwaGeneral, _) => (3.0, 16.0),
356 (TerracottaBesieger, _) => (3.0, 21.5),
357 (TerracottaDemolisher, _) => (3.0, 16.5),
358 (TerracottaPunisher, _) => (3.0, 15.5),
359 (TerracottaPursuer, _) => (3.0, 15.5),
360 (Cursekeeper, _) => (-4.0, 20.0),
361 (Forgemaster, _) => (-1.0, 32.0),
362 (Strigoi, _) => (-4.0, 27.5),
363 (Executioner, _) => (0.0, 24.0),
364 (Gigasfire, _) => (0.5, 30.0),
365 },
366 lower_torso: match (body.species, body.body_type) {
367 (Ogre, Male) => (1.0, -7.0),
368 (Ogre, Female) => (0.0, -6.0),
369 (Cyclops, _) => (1.0, -8.5),
370 (Wendigo, _) => (-1.5, -6.0),
371 (Cavetroll, _) => (1.0, -9.5),
372 (Mountaintroll, _) => (1.0, -13.5),
373 (Swamptroll, _) => (1.5, -11.5),
374 (Dullahan, _) => (0.0, -6.5),
375 (Werewolf, _) => (1.0, -10.0),
376 (Occultsaurok, _) => (0.0, -5.0),
377 (Mightysaurok, _) => (0.0, -5.0),
378 (Slysaurok, _) => (0.0, -6.0),
379 (Mindflayer, _) => (3.5, -10.0),
380 (Minotaur, _) => (1.5, -8.5),
381 (Tidalwarrior, _) => (1.5, -5.0),
382 (Yeti, _) => (0.0, -6.5),
383 (Harvester, _) => (-1.0, -4.5),
384 (Blueoni, _) => (0.0, -8.5),
385 (Redoni, _) => (0.0, -8.5),
386 (Cultistwarlord, _) => (0.0, -1.5),
387 (Cultistwarlock, _) => (1.0, -2.5),
388 (Huskbrute, _) => (-0.5, -7.0),
389 (Tursus, _) => (-5.0, -9.0),
390 (Gigasfrost, _) => (0.0, -5.5),
391 (AdletElder, _) => (0.0, -4.0),
392 (SeaBishop, _) => (0.0, -1.0),
393 (HaniwaGeneral, _) => (-1.0, -3.5),
394 (TerracottaBesieger, _) => (-1.0, -4.5),
395 (TerracottaDemolisher, _) => (-2.0, -3.5),
396 (TerracottaPunisher, _) => (-1.5, -2.5),
397 (TerracottaPursuer, _) => (-1.5, -2.5),
398 (Cursekeeper, _) => (-1.5, -4.5),
399 (Forgemaster, _) => (0.0, -5.5),
400 (Strigoi, _) => (3.0, -9.0),
401 (Executioner, _) => (-3.0, -5.0),
402 (Gigasfire, _) => (0.0, -5.5),
403 },
404 tail: match (body.species, body.body_type) {
405 (Werewolf, _) => (-5.5, -2.0),
406 (Occultsaurok, _) => (-4.5, -6.0),
407 (Mightysaurok, _) => (-4.5, -6.0),
408 (Slysaurok, _) => (-4.5, -6.0),
409 (Minotaur, _) => (-3.0, -6.0),
410 (Tidalwarrior, _) => (-4.5, -6.5),
411 (AdletElder, _) => (-4.5, -6.0),
412 (Strigoi, _) => (-4.5, -8.0),
413 _ => (0.0, 0.0),
414 },
415 shoulder: match (body.species, body.body_type) {
416 (Ogre, Male) => (12.0, 0.5, 3.0),
417 (Ogre, Female) => (8.0, 0.5, 2.0),
418 (Cyclops, _) => (15.0, 3.5, 1.5),
419 (Wendigo, _) => (9.0, 0.5, 2.5),
420 (Cavetroll, _) => (13.0, 0.0, 0.5),
421 (Mountaintroll, _) => (14.0, -0.5, -2.0),
422 (Swamptroll, _) => (14.0, 0.0, 0.0),
423 (Dullahan, _) => (14.0, 0.5, 3.5),
424 (Werewolf, _) => (9.0, 4.0, -3.0),
425 (Occultsaurok, _) => (7.5, 1.0, 1.5),
426 (Mightysaurok, _) => (7.5, 1.0, 1.5),
427 (Slysaurok, _) => (7.5, 1.0, 1.5),
428 (Mindflayer, _) => (8.0, 0.5, -1.0),
429 (Minotaur, _) => (10.0, 1.0, -1.0),
430 (Tidalwarrior, _) => (12.0, 4.5, -2.5),
431 (Yeti, _) => (10.5, 1.0, -2.5),
432 (Harvester, _) => (8.0, 1.0, -1.5),
433 (Blueoni, _) => (11.0, 2.0, -5.5),
434 (Redoni, _) => (11.0, 2.0, -5.5),
435 (Cultistwarlord, _) => (11.5, -1.0, 4.5),
436 (Cultistwarlock, _) => (8.0, 0.0, 3.5),
437 (Huskbrute, _) => (10.5, 0.0, -1.5),
438 (Tursus, _) => (12.5, -2.5, -2.0),
439 (Gigasfrost, _) => (10.5, 0.5, 0.0),
440 (AdletElder, _) => (8.5, 1.0, 2.5),
441 (SeaBishop, _) => (7.0, 0.0, 1.0),
442 (HaniwaGeneral, _) => (9.0, -1.0, 4.5),
443 (TerracottaBesieger, _) => (13.0, -1.0, 2.0),
444 (TerracottaDemolisher, _) => (9.0, -1.0, 3.0),
445 (TerracottaPunisher, _) => (9.0, -1.0, 4.0),
446 (TerracottaPursuer, _) => (9.0, -1.0, 4.0),
447 (Cursekeeper, _) => (9.5, -0.5, 2.5),
448 (Forgemaster, _) => (20.0, 4.0, 13.0),
449 (Strigoi, _) => (13.5, 2.0, 0.5),
450 (Executioner, _) => (8.5, 0.0, 4.0),
451 (Gigasfire, _) => (19.0, 0.5, 3.0),
452 },
453 hand: match (body.species, body.body_type) {
454 (Ogre, Male) => (14.5, 0.0, -4.0),
455 (Ogre, Female) => (9.0, 0.5, -4.5),
456 (Cyclops, _) => (14.0, 2.0, -5.5),
457 (Wendigo, _) => (12.0, 0.0, -3.5),
458 (Cavetroll, _) => (13.5, 1.0, -6.0),
459 (Mountaintroll, _) => (13.5, 0.0, -10.0),
460 (Swamptroll, _) => (17.0, 1.0, -8.0),
461 (Dullahan, _) => (14.5, 0.0, -2.5),
462 (Werewolf, _) => (10.0, 2.5, -11.0),
463 (Occultsaurok, _) => (8.0, 1.5, -5.5),
464 (Mightysaurok, _) => (8.0, 1.5, -5.5),
465 (Slysaurok, _) => (8.0, 1.5, -5.5),
466 (Mindflayer, _) => (9.0, 0.5, -4.5),
467 (Minotaur, _) => (12.5, 0.5, -7.0),
468 (Tidalwarrior, _) => (16.5, 4.5, -10.5),
469 (Yeti, _) => (12.0, 1.5, -6.0),
470 (Harvester, _) => (11.5, 1.5, -5.5),
471 (Blueoni, _) => (13.5, 0.5, -8.0),
472 (Redoni, _) => (13.5, 0.5, -8.0),
473 (Cultistwarlord, _) => (11.5, -1.0, -1.0),
474 (Cultistwarlock, _) => (9.5, -1.0, 1.0),
475 (Huskbrute, _) => (13.0, 0.5, -4.0),
476 (Tursus, _) => (15.5, 0.0, -7.0),
477 (Gigasfrost, _) => (17.0, 0.5, -6.0),
478 (AdletElder, _) => (8.0, 1.5, -2.5),
479 (SeaBishop, _) => (10.0, 0.0, -3.0),
480 (HaniwaGeneral, _) => (10.0, -1.0, -3.0),
481 (TerracottaBesieger, _) => (13.5, -1.0, -3.5),
482 (TerracottaDemolisher, _) => (10.0, -1.0, -1.5),
483 (TerracottaPunisher, _) => (10.0, -1.0, -1.5),
484 (TerracottaPursuer, _) => (10.0, -1.0, -1.5),
485 (Cursekeeper, _) => (11.0, -1.0, -4.0),
486 (Forgemaster, _) => (19.0, 4.0, -1.0),
487 (Strigoi, _) => (17.0, 2.5, -5.5),
488 (Executioner, _) => (9.0, 0.5, -1.5),
489 (Gigasfire, _) => (19.5, 0.5, -5.0),
490 },
491 leg: match (body.species, body.body_type) {
492 (Ogre, Male) => (0.0, 0.0, -4.0),
493 (Ogre, Female) => (0.0, 0.0, -2.0),
494 (Cyclops, _) => (4.5, 1.0, -8.5),
495 (Wendigo, _) => (2.0, 2.0, -2.5),
496 (Cavetroll, _) => (4.5, -1.0, -7.5),
497 (Mountaintroll, _) => (3.5, 0.0, -7.5),
498 (Swamptroll, _) => (4.5, -0.5, -7.5),
499 (Dullahan, _) => (0.0, 0.0, -5.0),
500 (Werewolf, _) => (4.5, 1.0, -5.0),
501 (Occultsaurok, _) => (3.0, 0.5, -4.0),
502 (Mightysaurok, _) => (3.0, 0.5, -4.0),
503 (Slysaurok, _) => (3.0, 0.5, -4.0),
504 (Mindflayer, _) => (6.0, -2.0, 6.5),
505 (Minotaur, _) => (5.0, 0.0, -10.0),
506 (Tidalwarrior, _) => (5.0, 0.5, -6.5),
507 (Yeti, _) => (4.0, 0.0, -5.5),
508 (Harvester, _) => (3.5, 1.0, -4.0),
509 (Blueoni, _) => (4.5, 2.0, -5.5),
510 (Redoni, _) => (4.5, 2.0, -5.5),
511 (Cultistwarlord, _) => (3.5, -1.0, -8.5),
512 (Cultistwarlock, _) => (3.5, -1.0, -8.5),
513 (Huskbrute, _) => (4.0, 0.0, -7.5),
514 (Tursus, _) => (4.5, 1.0, -9.0),
515 (Gigasfrost, _) => (6.0, 0.0, -10.0),
516 (AdletElder, _) => (3.0, -1.5, -4.0),
517 (SeaBishop, _) => (3.0, 1.0, -14.0),
518 (HaniwaGeneral, _) => (3.0, 0.0, -5.0),
519 (TerracottaBesieger, _) => (5.0, 0.5, -6.0),
520 (TerracottaDemolisher, _) => (3.5, 1.5, -5.0),
521 (TerracottaPunisher, _) => (3.5, 1.0, -5.0),
522 (TerracottaPursuer, _) => (3.5, 1.0, -5.0),
523 (Cursekeeper, _) => (5.0, 0.5, -6.0),
524 (Forgemaster, _) => (9.0, 0.0, -10.0),
525 (Strigoi, _) => (5.0, 1.0, -6.0),
526 (Executioner, _) => (3.0, 1.0, -7.0),
527 (Gigasfire, _) => (6.0, 0.0, -10.0),
528 },
529 foot: match (body.species, body.body_type) {
530 (Ogre, Male) => (4.0, 1.0, -12.0),
531 (Ogre, Female) => (4.0, 0.5, -13.5),
532 (Cyclops, _) => (6.0, 3.5, -15.5),
533 (Wendigo, _) => (5.0, 2.5, -17.0),
534 (Cavetroll, _) => (5.5, 0.0, -14.0),
535 (Mountaintroll, _) => (4.5, 1.0, -14.0),
536 (Swamptroll, _) => (5.5, 0.0, -14.0),
537 (Dullahan, _) => (4.0, 2.5, -14.0),
538 (Werewolf, _) => (5.5, 3.0, -6.5),
539 (Occultsaurok, _) => (3.5, 3.5, -10.0),
540 (Mightysaurok, _) => (3.5, 3.5, -10.0),
541 (Slysaurok, _) => (3.5, 3.5, -10.0),
542 (Mindflayer, _) => (4.5, 1.5, -16.0),
543 (Minotaur, _) => (6.0, 4.5, -17.5),
544 (Tidalwarrior, _) => (5.5, 4.5, -13.5),
545 (Yeti, _) => (4.5, 0.5, -12.5),
546 (Harvester, _) => (4.5, 0.5, -9.5),
547 (Blueoni, _) => (5.0, 5.0, -12.5),
548 (Redoni, _) => (5.0, 5.0, -12.5),
549 (Cultistwarlord, _) => (3.5, 0.0, -12.5),
550 (Cultistwarlock, _) => (3.5, 0.0, -10.5),
551 (Huskbrute, _) => (4.5, 0.5, -12.5),
552 (Tursus, _) => (5.5, 3.0, -14.5),
553 (Gigasfrost, _) => (6.5, 2.0, -19.5),
554 (AdletElder, _) => (4.0, 3.5, -10.0),
555 (SeaBishop, _) => (5.5, 3.0, -6.5),
556 (HaniwaGeneral, _) => (3.0, 1.0, -10.0),
557 (TerracottaBesieger, _) => (5.5, 2.5, -13.0),
558 (TerracottaDemolisher, _) => (3.5, 3.0, -10.5),
559 (TerracottaPunisher, _) => (3.5, 2.0, -10.5),
560 (TerracottaPursuer, _) => (3.5, 2.5, -10.5),
561 (Cursekeeper, _) => (5.5, 2.5, -13.0),
562 (Forgemaster, _) => (8.5, 2.0, -19.5),
563 (Strigoi, _) => (6.0, 2.5, -14.0),
564 (Executioner, _) => (3.0, 7.5, -13.0),
565 (Gigasfire, _) => (6.5, 2.0, -19.5),
566 },
567 scaler: match (body.species, body.body_type) {
568 (Ogre, Male) => 1.12,
569 (Ogre, Female) => 1.12,
570 (Cyclops, _) => 1.6,
571 (Wendigo, _) => 1.1,
572 (Cavetroll, _) => 1.1,
573 (Mountaintroll, _) => 1.1,
574 (Swamptroll, _) => 1.1,
575 (Dullahan, _) => 1.12,
576 (Werewolf, _) => 1.0,
577 (Occultsaurok, _) => 1.0,
578 (Mightysaurok, _) => 1.0,
579 (Slysaurok, _) => 1.0,
580 (Mindflayer, _) => 1.6,
581 (Minotaur, _) => 1.7,
582 (Tidalwarrior, _) => 1.7,
583 (Yeti, _) => 1.2,
584 (Harvester, _) => 1.2,
585 (Blueoni, _) => 1.2,
586 (Redoni, _) => 1.2,
587 (Cultistwarlord, _) => 1.0,
588 (Cultistwarlock, _) => 1.0,
589 (Huskbrute, _) => 1.2,
590 (Tursus, _) => 1.0,
591 (Gigasfrost, _) => 1.7,
592 (AdletElder, _) => 1.0,
593 (SeaBishop, _) => 1.0,
594 (HaniwaGeneral, _) => 1.0,
595 (TerracottaBesieger, _) => 1.0,
596 (TerracottaDemolisher, _) => 1.0,
597 (TerracottaPunisher, _) => 1.0,
598 (TerracottaPursuer, _) => 1.0,
599 (Cursekeeper, _) => 1.0,
600 (Forgemaster, _) => 1.0,
601 (Strigoi, _) => 1.0,
602 (Executioner, _) => 1.0,
603 (Gigasfire, _) => 1.7,
604 },
605 tempo: match (body.species, body.body_type) {
606 (Ogre, Male) => 0.9,
607 (Ogre, Female) => 0.9,
608 (Cyclops, _) => 0.8,
609 (Cavetroll, _) => 0.9,
610 (Mountaintroll, _) => 0.9,
611 (Swamptroll, _) => 0.9,
612 (Dullahan, _) => 0.8,
613 (Minotaur, _) => 0.8,
614 (TerracottaBesieger, _) => 0.7,
615 (TerracottaDemolisher, _) => 0.8,
616 (TerracottaPunisher, _) => 0.8,
617 (TerracottaPursuer, _) => 0.7,
618 (Cursekeeper, _) => 0.8,
619 _ => 1.0,
620 },
621 grip: match (body.species, body.body_type) {
622 (Ogre, Male) => (13.0, 0.0),
623 (Ogre, Female) => (8.0, 0.0),
624 (Cyclops, _) => (12.0, 0.0),
625 (Wendigo, _) => (15.0, 0.0),
626 (Cavetroll, _) => (13.0, 1.5),
627 (Mountaintroll, _) => (13.0, 1.5),
628 (Swamptroll, _) => (15.0, 0.5),
629 (Dullahan, _) => (15.0, 0.0),
630 (Werewolf, _) => (13.0, 0.0),
631 (Occultsaurok, _) => (10.0, 0.0),
632 (Mightysaurok, _) => (10.0, 0.0),
633 (Slysaurok, _) => (10.0, 0.0),
634 (Mindflayer, _) => (12.0, 2.5),
635 (Minotaur, _) => (14.0, 0.0),
636 (Tidalwarrior, _) => (8.0, 0.0),
637 (Yeti, _) => (12.5, 0.0),
638 (Harvester, _) => (7.5, 0.0),
639 (Blueoni, _) => (12.5, 0.0),
640 (Redoni, _) => (12.5, 0.0),
641 (Cultistwarlord, _) => (8.0, 0.0),
642 (Cultistwarlock, _) => (8.0, 0.0),
643 (Huskbrute, _) => (12.5, 0.0),
644 (Tursus, _) => (13.0, 0.0),
645 (Gigasfrost, _) => (16.0, 0.0),
646 (AdletElder, _) => (10.0, 0.0),
647 (SeaBishop, _) => (6.0, 0.0),
648 (HaniwaGeneral, _) => (10.0, 0.0),
649 (TerracottaBesieger, _) => (5.0, 0.0),
650 (TerracottaDemolisher, _) => (6.0, 0.0),
651 (TerracottaPunisher, _) => (6.0, 0.0),
652 (TerracottaPursuer, _) => (6.0, 0.0),
653 (Cursekeeper, _) => (14.0, 0.0),
654 (Forgemaster, _) => (16.0, 0.0),
655 (Strigoi, _) => (12.5, 0.0),
656 (Executioner, _) => (8.0, 0.0),
657 (Gigasfire, _) => (16.0, 0.0),
658 },
659 shl: match (body.species, body.body_type) {
660 (Dullahan, _) => (-4.75, -11.0, 8.5, 1.47, -0.2, 0.0),
661 (Mightysaurok, _) => (-1.75, -9.0, 3.5, 1.47, -0.2, 0.0),
662 (Gigasfire, _) => (-4.75, -3.0, 3.5, 1.47, -0.3, 0.0),
663 _ => (-4.75, -1.0, 2.5, 1.47, -0.2, 0.0),
664 },
665 shr: match (body.species, body.body_type) {
666 (Dullahan, _) => (5.75, -11.5, 4.5, 1.47, 0.3, 0.0),
667 (Mightysaurok, _) => (2.75, -9.5, -0.5, 1.47, 0.3, 0.0),
668 (Gigasfire, _) => (5.75, -1.5, -0.5, 1.47, 0.3, 0.0),
669 _ => (3.75, -1.5, -0.5, 1.47, 0.3, 0.0),
670 },
671 sc: match (body.species, body.body_type) {
672 (Dullahan, _) => (-7.0, 17.0, -16.0, -0.1, 0.0, 0.0),
673 (Mightysaurok, _) => (-7.0, 15.0, -11.0, -0.1, 0.0, 0.0),
674 (Gigasfire, _) => (-3.0, 6.0, -11.0, -0.1, 0.0, 0.0),
675 _ => (-7.0, 7.0, -10.0, -0.1, 0.0, 0.0),
676 },
677 hhl: match (body.species, body.body_type) {
678 (Ogre, Male) => (-9.0, -10.0, 23.0, PI / 2.0, -0.57, 0.0),
679 _ => (-6.0, -10.0, 17.0, PI / 2.0, -0.57, 0.0),
680 },
681 hhr: match (body.species, body.body_type) {
682 (Ogre, Male) => (-5.0, -13.0, 0.0, PI / 2.0, -0.57, 0.0),
683 _ => (-6.0, -10.0, 0.0, PI / 2.0, -0.57, 0.0),
684 },
685 hc: match (body.species, body.body_type) {
686 (Ogre, Male) => (11.5, 9.0, -13.0, -0.57, -PI / 2.0, 1.0),
687 _ => (8.5, 6.0, -12.0, -0.57, -PI / 2.0, 1.0),
688 },
689 sthl: match (body.species, body.body_type) {
690 (Ogre, Female) => (-1.0, -5.0, 12.0, 1.27, 0.0, 0.0),
691 (Occultsaurok, _) => (-1.0, -7.0, 12.0, 1.27, 0.0, 0.0),
692 (Mindflayer, _) => (1.0, -10.5, 7.0, 1.27, 0.0, 0.0),
693 _ => (11.0, 5.0, -4.0, 1.27, 0.0, 0.0),
694 },
695 sthr: match (body.species, body.body_type) {
696 (Ogre, Female) => (5.0, -3.5, 18.0, PI / 2.0, 0.8, 0.0),
697 (Occultsaurok, _) => (7.0, -3.5, 18.0, PI / 2.0, 0.8, 0.0),
698 (Mindflayer, _) => (7.0, -9.0, 13.0, PI / 2.0, 0.8, 0.0),
699 _ => (17.0, 7.5, 2.0, PI / 2.0, 0.8, 0.0),
700 },
701 stc: match (body.species, body.body_type) {
702 (Ogre, Female) => (-10.0, 7.0, -23.0, -0.3, 0.15, 0.0),
703 (Occultsaurok, _) => (-10.0, 7.0, -22.0, -0.3, 0.15, 0.0),
704 (Mindflayer, _) => (-10.0, 12.5, -22.0, -0.3, 0.15, 0.0),
705 _ => (-18.0, 1.0, -2.0, -0.3, 0.15, 0.0),
706 },
707 bhl: match (body.species, body.body_type) {
708 (Slysaurok, _) => (-1.0, -12.0, 1.0, PI / 2.0, 0.0, 0.0),
709 _ => (3.0, 2.5, 0.0, 1.2, -0.6, -0.3),
710 },
711 bhr: match (body.species, body.body_type) {
712 (Slysaurok, _) => (0.0, -6.0, -2.0, PI / 2.0, 0.0, 0.0),
713 _ => (5.9, 5.5, -5.0, 1.2, -0.6, -0.3),
714 },
715 bc: match (body.species, body.body_type) {
716 (Slysaurok, _) => (1.0, 13.0, -8.0, 0.0, 1.2, -0.6),
717 _ => (-7.0, 3.0, -8.0, 0.0, 0.0, 0.0),
718 },
719 beast: matches!((body.species, body.body_type), (Werewolf, _)),
720 float: matches!(
721 (body.species, body.body_type),
722 (Mindflayer, _) | (Cursekeeper, _)
723 ),
724 height: comp::Body::BipedLarge(*body).dimensions().z,
725 }
726 }
727}
728
729fn mount_point(body: &Body) -> Vec3<f32> {
730 use comp::biped_large::{BodyType::*, Species::*};
731 match (body.species, body.body_type) {
732 (Ogre, Female) => (0.5, 0.0, 0.5),
733 (Ogre, Male) => (-1.0, -3.0, 2.5),
734 (Cyclops, _) => (0.0, 3.0, 1.0),
735 (Wendigo, _) => (0.0, -1.5, 0.5),
736 (Cavetroll, _) => (0.0, 1.0, 4.0),
737 (Mountaintroll, _) => (0.0, 3.5, 2.5),
738 (Swamptroll, _) => (0.0, 0.0, 3.5),
739 (Dullahan, _) => (0.0, -3.0, 4.0),
740 (Werewolf, _) => (-0.5, 0.0, 0.0),
741 (Occultsaurok, _) => (0.0, -1.0, 5.0),
742 (Mightysaurok, _) => (0.0, -1.0, 4.0),
743 (Slysaurok, _) => (0.0, -1.0, 4.0),
744 (Mindflayer, _) => (1.0, 1.5, 1.0),
745 (Minotaur, _) => (0.0, 1.0, 1.5),
746 (Tidalwarrior, _) => (0.0, -2.0, 10.5),
747 (Yeti, _) => (0.0, 2.0, 4.5),
748 (Harvester, _) => (0.5, 2.0, 2.0),
749 (Blueoni, _) => (0.5, 1.0, 4.0),
750 (Redoni, _) => (0.5, 1.0, 4.0),
751 (Cultistwarlord, _) => (-2.5, 3.0, 0.0),
752 (Cultistwarlock, _) => (0.0, 2.0, 2.0),
753 (Huskbrute, _) => (0.0, 1.0, 4.0),
754 (Tursus, _) => (0.0, 2.0, 4.0),
755 (Gigasfrost, _) => (1.0, 2.0, 4.5),
756 (AdletElder, _) => (1.0, 0.0, -1.0),
757 (SeaBishop, _) => (0.0, 0.0, 1.0),
758 (HaniwaGeneral, _) => (0.0, 0.0, 0.0),
759 (TerracottaBesieger, _) => (-1.5, -4.5, 4.0),
760 (TerracottaDemolisher, _) => (-0.5, -3.5, -1.0),
761 (TerracottaPunisher, _) => (-0.5, -3.5, -1.0),
762 (TerracottaPursuer, _) => (-0.5, -3.5, -1.0),
763 (Cursekeeper, _) => (0.5, 0.0, -1.0),
764 (Forgemaster, _) => (1.0, 2.0, 5.0),
765 (Strigoi, _) => (0.0, 0.0, 2.0),
766 (Executioner, _) => (0.0, 0.0, 0.0),
767 (Gigasfire, _) => (1.0, 2.0, 4.5),
768 }
769 .into()
770}
771
772pub fn init_gigas_fire(next: &mut BipedLargeSkeleton) {
773 next.control.position += Vec3::new(0.0, 18.0, -10.0);
774 next.control_l.position += Vec3::new(-1.0, 1.0, 1.0);
775 next.control_l.orientation.rotate_x(PI / 2.0);
776 next.control_l.orientation.rotate_z(-0.2);
777 next.control_r.position += Vec3::new(0.0, 2.0, -3.0);
778 next.control_r.orientation.rotate_x(PI / 2.2);
779 next.control_r.orientation.rotate_z(0.2);
780}
781
782pub fn init_biped_large_alpha(
783 next: &mut BipedLargeSkeleton,
784 s_a: &SkeletonAttr,
785 speed: f32,
786 acc_vel: f32,
787 move1: f32,
788) -> f32 {
789 let lab: f32 = 0.65 * s_a.tempo;
790 let speednorm = (speed / 12.0).powf(0.4);
791 let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
792 let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
793 let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
794 * ((acc_vel * lab + PI * 1.4).sin());
795
796 let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
797 * ((acc_vel * lab + PI * 0.4).sin());
798 next.second.position = Vec3::new(0.0, 0.0, 0.0);
799 next.second.orientation = Quaternion::rotation_x(0.0);
800 next.shoulder_l.position = Vec3::new(
801 -s_a.shoulder.0,
802 s_a.shoulder.1,
803 s_a.shoulder.2 - foothorir * 1.0,
804 );
805 next.shoulder_l.orientation =
806 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
807
808 next.shoulder_r.position = Vec3::new(
809 s_a.shoulder.0,
810 s_a.shoulder.1,
811 s_a.shoulder.2 - foothoril * 1.0,
812 );
813 next.shoulder_r.orientation =
814 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
815
816 next.main.position = Vec3::new(0.0, 0.0, 0.0);
817 next.main.orientation = Quaternion::rotation_x(0.0);
818
819 next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
820 next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
821
822 next.hand_l.orientation = Quaternion::rotation_x(0.0);
823 next.hand_r.orientation = Quaternion::rotation_x(0.0);
824
825 foothorir
826}
827
828pub fn init_biped_large_beta(
829 next: &mut BipedLargeSkeleton,
830 s_a: &SkeletonAttr,
831 speed: f32,
832 acc_vel: f32,
833 move1: f32,
834) {
835 let lab: f32 = 0.65 * s_a.tempo;
836 let speednorm = (speed / 12.0).powf(0.4);
837 let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
838 let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
839 let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
840 * ((acc_vel * lab + PI * 1.4).sin());
841
842 let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
843 * ((acc_vel * lab + PI * 0.4).sin());
844
845 next.shoulder_l.position = Vec3::new(
846 -s_a.shoulder.0,
847 s_a.shoulder.1,
848 s_a.shoulder.2 - foothorir * 1.0,
849 );
850 next.shoulder_l.orientation =
851 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
852
853 next.shoulder_r.position = Vec3::new(
854 s_a.shoulder.0,
855 s_a.shoulder.1,
856 s_a.shoulder.2 - foothoril * 1.0,
857 );
858 next.shoulder_r.orientation =
859 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
860 next.torso.orientation = Quaternion::rotation_z(0.0);
861
862 next.main.position = Vec3::new(0.0, 0.0, 0.0);
863 next.main.orientation = Quaternion::rotation_x(0.0);
864
865 next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
866 next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
867
868 next.hand_l.orientation = Quaternion::rotation_x(0.0);
869 next.hand_r.orientation = Quaternion::rotation_x(0.0);
870}
871
872pub fn biped_large_alpha_hammer(
873 next: &mut BipedLargeSkeleton,
874 s_a: &SkeletonAttr,
875 move1: f32,
876 move2: f32,
877) {
878 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
879 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
880
881 next.control.position = Vec3::new(
882 4.0 + move1 * -12.0 + move2 * 20.0,
883 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
884 (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
885 );
886 next.head.orientation =
887 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
888 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
889 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
890
891 next.control_l.orientation =
892 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
893 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
894 * Quaternion::rotation_y(0.0)
895 * Quaternion::rotation_z(0.0);
896
897 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
898 * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
899 * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
900}
901
902pub fn biped_large_beta_hammer(
903 next: &mut BipedLargeSkeleton,
904 s_a: &SkeletonAttr,
905 move1: f32,
906 move2: f32,
907) {
908 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
909 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
910
911 next.control.position = Vec3::new(
912 4.0 + move1 * -12.0 + move2 * 20.0,
913 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
914 (-s_a.grip.0 / 0.8) + move1 * 6.0 + move2 * 8.0,
915 );
916 next.head.orientation =
917 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
918 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -1.5);
919 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 1.5);
920
921 next.control_l.orientation =
922 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
923 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
924 * Quaternion::rotation_y(0.0)
925 * Quaternion::rotation_z(0.0);
926
927 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -1.5 + move2 * -0.3)
928 * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
929 * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
930}
931
932pub fn biped_large_alpha_sword(
933 next: &mut BipedLargeSkeleton,
934 s_a: &SkeletonAttr,
935 move1: f32,
936 move2: f32,
937) {
938 next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
939 next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
940 next.head.orientation =
941 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
942 next.control.position = Vec3::new(
943 -3.0 + move1 * -4.0 + move2 * 5.0,
944 5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
945 -4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
946 );
947 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.5 + move2 * -0.7);
948 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.7);
949 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
950 * Quaternion::rotation_y(-0.2);
951 next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
952 * Quaternion::rotation_y(0.2)
953 * Quaternion::rotation_z(0.0);
954
955 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -2.0)
956 * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
957}
958
959pub fn biped_large_beta_sword(
960 next: &mut BipedLargeSkeleton,
961 s_a: &SkeletonAttr,
962 move1base: f32,
963 move1: f32,
964 move2: f32,
965) {
966 next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
967 next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
968 next.head.orientation =
969 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
970 next.control.position = Vec3::new(
971 -3.0 + move1 * -4.0 + move2 * 5.0,
972 5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
973 -4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
974 );
975 next.upper_torso.orientation = Quaternion::rotation_z(move1base * 0.5 + move2 * -0.7);
976 next.lower_torso.orientation = Quaternion::rotation_z(move1base * -0.5 + move2 * 0.7);
977 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
978 * Quaternion::rotation_y(-0.2);
979 next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
980 * Quaternion::rotation_y(0.2)
981 * Quaternion::rotation_z(0.0);
982
983 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5)
984 * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
985}
986
987pub fn biped_large_alpha_axe(
988 next: &mut BipedLargeSkeleton,
989 s_a: &SkeletonAttr,
990 move1: f32,
991 move2: f32,
992) {
993 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
994 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
995
996 next.control.position = Vec3::new(
997 4.0 + move1 * -12.0 + move2 * 28.0,
998 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
999 (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
1000 );
1001 next.head.orientation =
1002 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
1003 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
1004 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
1005
1006 next.control_l.orientation =
1007 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
1008 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
1009 * Quaternion::rotation_y(0.0)
1010 * Quaternion::rotation_z(0.0);
1011
1012 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
1013 * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
1014 * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
1015}
1016
1017pub fn biped_large_beta_axe(
1018 next: &mut BipedLargeSkeleton,
1019 s_a: &SkeletonAttr,
1020 move1: f32,
1021 move2: f32,
1022) {
1023 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
1024 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
1025
1026 next.control.position = Vec3::new(
1027 4.0 + move1 * -18.0 + move2 * 20.0,
1028 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 12.0,
1029 (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 4.0,
1030 );
1031 next.head.orientation =
1032 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.9 + move2 * 0.6);
1033 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 1.2 + move2 * -1.0);
1034 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -1.2 + move2 * 1.0);
1035
1036 next.control_l.orientation =
1037 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
1038 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
1039 * Quaternion::rotation_y(0.0)
1040 * Quaternion::rotation_z(0.0);
1041
1042 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * 0.0 + move2 * -0.8)
1043 * Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9)
1044 * Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5);
1045}