veloren_voxygen_anim/biped_large/
mod.rs

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