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