mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed clone in animations. Added GATs to animations to do so.
This commit is contained in:
parent
3cb0ee98c8
commit
914d78b4a9
@ -11,9 +11,9 @@ use std::f32::consts::PI;
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = (
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
@ -26,7 +26,7 @@ impl Animation for AlphaAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_alpha")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -35,7 +35,7 @@ impl Animation for AlphaAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct BeamAnimation;
|
||||
|
||||
impl Animation for BeamAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
f32,
|
||||
@ -23,9 +23,9 @@ impl Animation for BeamAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_beam")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _global_time, velocity, stage_section, acc_vel): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, _global_time, velocity, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -11,9 +11,9 @@ use std::f32::consts::PI;
|
||||
pub struct BetaAnimation;
|
||||
|
||||
impl Animation for BetaAnimation {
|
||||
type Dependency = (
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
@ -25,7 +25,7 @@ impl Animation for BetaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_beta\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_beta")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for BetaAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct BlinkAnimation;
|
||||
|
||||
impl Animation for BlinkAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
Vec3<f32>,
|
||||
@ -23,9 +23,9 @@ impl Animation for BlinkAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_blink")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use common::comp::item::ToolKind;
|
||||
pub struct ChargeAnimation;
|
||||
|
||||
impl Animation for ChargeAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
f32,
|
||||
@ -21,9 +21,9 @@ impl Animation for ChargeAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_charge\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_charge")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct DashAnimation;
|
||||
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
Vec3<f32>,
|
||||
@ -23,9 +23,9 @@ impl Animation for DashAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_dash")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct EquipAnimation;
|
||||
|
||||
impl Animation for EquipAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32, f32);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for EquipAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_equip")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_idle")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, global_time): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use std::f32::consts::PI;
|
||||
pub struct JumpAnimation;
|
||||
|
||||
impl Animation for JumpAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_jump\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_jump")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _global_time): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, _global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -6,7 +6,7 @@ use common::{comp::item::ToolKind, states::utils::StageSection};
|
||||
pub struct LeapAnimation;
|
||||
|
||||
impl Animation for LeapAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
Vec3<f32>,
|
||||
@ -20,9 +20,9 @@ impl Animation for LeapAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_leapmelee")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -18,14 +18,14 @@ type RunAnimationDependency = (
|
||||
f32,
|
||||
);
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = RunAnimationDependency;
|
||||
type Dependency<'a> = RunAnimationDependency;
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_run")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -36,7 +36,7 @@ impl Animation for RunAnimation {
|
||||
global_time,
|
||||
avg_vel,
|
||||
acc_vel,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use common::{comp::item::ToolKind, states::utils::StageSection};
|
||||
pub struct ShockwaveAnimation;
|
||||
|
||||
impl Animation for ShockwaveAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
f32,
|
||||
@ -21,9 +21,9 @@ impl Animation for ShockwaveAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_shockwave")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, _global_time, velocity, stage_section): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, _global_time, velocity, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -10,9 +10,9 @@ use std::f32::consts::PI;
|
||||
|
||||
pub struct ShootAnimation;
|
||||
|
||||
type ShootAnimationDependency = (
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
type ShootAnimationDependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
Vec3<f32>,
|
||||
Vec3<f32>,
|
||||
@ -21,14 +21,14 @@ type ShootAnimationDependency = (
|
||||
f32,
|
||||
);
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency = ShootAnimationDependency;
|
||||
type Dependency<'a> = ShootAnimationDependency<'a>;
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_shoot\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_shoot")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -39,7 +39,7 @@ impl Animation for ShootAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct SpinAnimation;
|
||||
|
||||
impl Animation for SpinAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
f32,
|
||||
@ -20,9 +20,9 @@ impl Animation for SpinAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_spin\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_spin")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _global_time, stage_section): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, _global_time, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct SpinMeleeAnimation;
|
||||
|
||||
impl Animation for SpinMeleeAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
Vec3<f32>,
|
||||
@ -23,9 +23,9 @@ impl Animation for SpinMeleeAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_spinmelee")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -11,8 +11,8 @@ use std::f32::consts::PI;
|
||||
pub struct StunnedAnimation;
|
||||
|
||||
impl Animation for StunnedAnimation {
|
||||
type Dependency = (
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
@ -23,9 +23,9 @@ impl Animation for StunnedAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_stunned\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_stunned")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
((active_tool_kind, active_tool_spec), velocity, acc_vel, stage_section): Self::Dependency,
|
||||
((active_tool_kind, active_tool_spec), velocity, acc_vel, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct SummonAnimation;
|
||||
|
||||
impl Animation for SummonAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
Vec3<f32>,
|
||||
@ -23,9 +23,9 @@ impl Animation for SummonAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_summon")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,9 +8,9 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct WieldAnimation;
|
||||
|
||||
impl Animation for WieldAnimation {
|
||||
type Dependency = (
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
(Option<ToolKind>, Option<AbilitySpec>),
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
f32,
|
||||
@ -21,9 +21,9 @@ impl Animation for WieldAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_wield\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_wield")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
((active_tool_kind, active_tool_spec), _second_tool, velocity, global_time, acc_vel): Self::Dependency,
|
||||
((active_tool_kind, active_tool_spec), _second_tool, velocity, global_time, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -20,7 +20,7 @@ type AlphaAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = AlphaAnimationDependency;
|
||||
type Dependency<'a> = AlphaAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,7 +28,7 @@ impl Animation for AlphaAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_alpha")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for AlphaAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
timer,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -19,7 +19,7 @@ type DashAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency = DashAnimationDependency;
|
||||
type Dependency<'a> = DashAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -27,7 +27,7 @@ impl Animation for DashAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_dash")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
velocity,
|
||||
@ -38,7 +38,7 @@ impl Animation for DashAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
_timer,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ pub struct IdleAnimation;
|
||||
type IdleAnimationDependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>);
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = IdleAnimationDependency;
|
||||
type Dependency<'a> = IdleAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_idle")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct RunAnimation;
|
||||
type RunAnimationDependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>, f32);
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = RunAnimationDependency;
|
||||
type Dependency<'a> = RunAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -17,9 +17,9 @@ impl Animation for RunAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_run")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, global_time, _avg_vel, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, last_ori, global_time, _avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -20,7 +20,7 @@ type ShootAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency = ShootAnimationDependency;
|
||||
type Dependency<'a> = ShootAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,7 +28,7 @@ impl Animation for ShootAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_shoot")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for ShootAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
_timer,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -21,7 +21,7 @@ type StunnedAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for StunnedAnimation {
|
||||
type Dependency = StunnedAnimationDependency;
|
||||
type Dependency<'a> = StunnedAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -29,7 +29,7 @@ impl Animation for StunnedAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_stunned")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -42,7 +42,7 @@ impl Animation for StunnedAnimation {
|
||||
wield_status,
|
||||
stage_section,
|
||||
timer,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -18,7 +18,7 @@ type WieldAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for WieldAnimation {
|
||||
type Dependency = WieldAnimationDependency;
|
||||
type Dependency<'a> = WieldAnimationDependency;
|
||||
type Skeleton = BipedSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -26,9 +26,9 @@ impl Animation for WieldAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_wield")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, velocity, _orientation, _last_ori, _global_time, _avg_vel, acc_vel): Self::Dependency,
|
||||
(active_tool_kind, velocity, _orientation, _last_ori, _global_time, _avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use common::states::utils::StageSection;
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = (Option<StageSection>, Vec3<f32>, Vec3<f32>, bool);
|
||||
type Dependency<'a> = (Option<StageSection>, Vec3<f32>, Vec3<f32>, bool);
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_alpha")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(stage_section, orientation, last_ori, on_ground): Self::Dependency,
|
||||
(stage_section, orientation, last_ori, on_ground): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,16 +17,16 @@ type BreatheAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for BreatheAnimation {
|
||||
type Dependency = BreatheAnimationDependency;
|
||||
type Dependency<'a> = BreatheAnimationDependency;
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_breathe\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_breathe")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(global_time, orientation, last_ori, stage_section, timer, look_dir, on_ground): Self::Dependency,
|
||||
(global_time, orientation, last_ori, stage_section, timer, look_dir, on_ground): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::ops::Mul;
|
||||
pub struct FeedAnimation;
|
||||
|
||||
impl Animation for FeedAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_feed\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_feed")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -6,16 +6,16 @@ use super::{
|
||||
pub struct FlyAnimation;
|
||||
|
||||
impl Animation for FlyAnimation {
|
||||
type Dependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>);
|
||||
type Dependency<'a> = (Vec3<f32>, Vec3<f32>, Vec3<f32>);
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_fly\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_fly")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori): Self::Dependency,
|
||||
(velocity, orientation, last_ori): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::ops::Mul;
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_idle")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::f32::consts::PI;
|
||||
pub struct RunAnimation;
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32);
|
||||
type Dependency<'a> = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32);
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_run")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, last_ori, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ pub struct ShockwaveAnimation;
|
||||
|
||||
impl Animation for ShockwaveAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (Option<StageSection>, bool);
|
||||
type Dependency<'a> = (Option<StageSection>, bool);
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_shockwave\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_shockwave")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(stage_section, on_ground): Self::Dependency,
|
||||
(stage_section, on_ground): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,16 +9,16 @@ pub struct ShootAnimation;
|
||||
type ShootAnimationDependency = (f32, Option<StageSection>, f32, Dir, bool);
|
||||
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency = ShootAnimationDependency;
|
||||
type Dependency<'a> = ShootAnimationDependency;
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_shoot\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_shoot")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(global_time, stage_section, timer, look_dir, on_ground): Self::Dependency,
|
||||
(global_time, stage_section, timer, look_dir, on_ground): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use common::states::utils::StageSection;
|
||||
pub struct StunnedAnimation;
|
||||
|
||||
impl Animation for StunnedAnimation {
|
||||
type Dependency = (f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, Option<StageSection>, f32);
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_stunned\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_stunned")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(global_time, stage_section, timer): Self::Dependency,
|
||||
(global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ pub struct SwimAnimation;
|
||||
|
||||
impl Animation for SwimAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = BirdLargeSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_swim\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_swim")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use std::ops::Mul;
|
||||
pub struct FeedAnimation;
|
||||
|
||||
impl Animation for FeedAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = BirdMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -15,9 +15,9 @@ impl Animation for FeedAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_feed")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::f32::consts::PI;
|
||||
pub struct FlyAnimation;
|
||||
|
||||
impl Animation for FlyAnimation {
|
||||
type Dependency = (f32, f32);
|
||||
type Dependency<'a> = (f32, f32);
|
||||
type Skeleton = BirdMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_medium_fly\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_fly")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
_global_time: Self::Dependency,
|
||||
_global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use std::ops::Mul;
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = BirdMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -15,9 +15,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_idle")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::f32::consts::PI;
|
||||
pub struct RunAnimation;
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = (f32, f32);
|
||||
type Dependency<'a> = (f32, f32);
|
||||
type Skeleton = BirdMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"bird_medium_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_run")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time): Self::Dependency,
|
||||
(_velocity, _global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -16,7 +16,7 @@ type AlphaAnimationDependency = (
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = AlphaAnimationDependency;
|
||||
type Dependency<'a> = AlphaAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -24,9 +24,9 @@ impl Animation for AlphaAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_alpha")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, stage_section, ability_info): Self::Dependency,
|
||||
(hands, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -12,7 +12,7 @@ pub struct BeamAnimation;
|
||||
|
||||
impl Animation for BeamAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<AbilityInfo>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
@ -26,9 +26,9 @@ impl Animation for BeamAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_beam")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(ability_info, hands, _global_time, velocity, stage_section): Self::Dependency,
|
||||
(ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,16 +17,16 @@ type BetaAnimationDependency = (
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for BetaAnimation {
|
||||
type Dependency = BetaAnimationDependency;
|
||||
type Dependency<'a> = BetaAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"character_beta\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_beta")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -19,16 +19,16 @@ type BlockAnimationDependency = (
|
||||
Option<StageSection>,
|
||||
);
|
||||
impl Animation for BlockAnimation {
|
||||
type Dependency = BlockAnimationDependency;
|
||||
type Dependency<'a> = BlockAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"character_block\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_block")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, active_tool_kind, second_tool_kind,velocity, _global_time, stage_section): Self::Dependency,
|
||||
(hands, active_tool_kind, second_tool_kind,velocity, _global_time, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,7 +17,7 @@ type ChargeswingAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for ChargeswingAnimation {
|
||||
type Dependency = ChargeswingAnimationDependency;
|
||||
type Dependency<'a> = ChargeswingAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -25,9 +25,9 @@ impl Animation for ChargeswingAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_chargeswing")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct ClimbAnimation;
|
||||
|
||||
impl Animation for ClimbAnimation {
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
Vec3<f32>,
|
||||
@ -21,9 +21,9 @@ impl Animation for ClimbAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_climb\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_climb")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, velocity, _orientation, global_time): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, velocity, _orientation, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct DanceAnimation;
|
||||
|
||||
impl Animation for DanceAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"character_dance\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_dance")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, global_time): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,7 +17,7 @@ type DashAnimationDependency = (
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency = DashAnimationDependency;
|
||||
type Dependency<'a> = DashAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -25,9 +25,9 @@ impl Animation for DashAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_dash")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct EquipAnimation;
|
||||
|
||||
impl Animation for EquipAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32, f32);
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for EquipAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_equip")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time): Self::Dependency,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -6,7 +6,7 @@ use super::{
|
||||
pub struct GlideWieldAnimation;
|
||||
|
||||
impl Animation for GlideWieldAnimation {
|
||||
type Dependency = ();
|
||||
type Dependency<'a> = ();
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -14,9 +14,9 @@ impl Animation for GlideWieldAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_glidewield")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
_: Self::Dependency,
|
||||
_: Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct GlidingAnimation;
|
||||
type GlidingAnimationDependency = (Vec3<f32>, Quaternion<f32>, Quaternion<f32>, f32, f32);
|
||||
|
||||
impl Animation for GlidingAnimation {
|
||||
type Dependency = GlidingAnimationDependency;
|
||||
type Dependency<'a> = GlidingAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -17,9 +17,9 @@ impl Animation for GlidingAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_gliding")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, glider_orientation, global_time, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, glider_orientation, global_time, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
@ -21,9 +21,9 @@ impl Animation for IdleAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_idle")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, second_tool_kind, hands, global_time): Self::Dependency,
|
||||
(active_tool_kind, second_tool_kind, hands, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct JumpAnimation;
|
||||
impl Animation for JumpAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
@ -24,9 +24,9 @@ impl Animation for JumpAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_jump")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, second_tool_kind, hands, velocity, orientation, last_ori, global_time): Self::Dependency,
|
||||
(active_tool_kind, second_tool_kind, hands, velocity, orientation, last_ori, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -16,7 +16,7 @@ type LeapAnimationDependency = (
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for LeapAnimation {
|
||||
type Dependency = LeapAnimationDependency;
|
||||
type Dependency<'a> = LeapAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -24,9 +24,9 @@ impl Animation for LeapAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_leapmelee")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -10,7 +10,7 @@ pub struct RepeaterAnimation;
|
||||
|
||||
impl Animation for RepeaterAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<AbilityInfo>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
@ -24,9 +24,9 @@ impl Animation for RepeaterAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_repeater")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(ability_info, hands, _velocity, _global_time, stage_section): Self::Dependency,
|
||||
(ability_info, hands, _velocity, _global_time, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,7 +17,7 @@ type RollAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for RollAnimation {
|
||||
type Dependency = RollAnimationDependency;
|
||||
type Dependency<'a> = RollAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -25,9 +25,9 @@ impl Animation for RollAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_roll")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, orientation, last_ori, _global_time, stage_section): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, orientation, last_ori, _global_time, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -20,7 +20,7 @@ type RunAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = RunAnimationDependency;
|
||||
type Dependency<'a> = RunAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,7 +28,7 @@ impl Animation for RunAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_run")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for RunAnimation {
|
||||
global_time,
|
||||
avg_vel,
|
||||
acc_vel,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,7 +14,7 @@ pub struct ShockwaveAnimation;
|
||||
|
||||
impl Animation for ShockwaveAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<AbilityInfo>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
@ -28,9 +28,9 @@ impl Animation for ShockwaveAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_shockwave")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_ability_info, hands, _global_time, velocity, stage_section): Self::Dependency,
|
||||
(_ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -22,7 +22,7 @@ type ShootAnimationDependency = (
|
||||
Option<StageSection>,
|
||||
);
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency = ShootAnimationDependency;
|
||||
type Dependency<'a> = ShootAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -30,7 +30,7 @@ impl Animation for ShootAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_shoot")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
ability_info,
|
||||
@ -41,7 +41,7 @@ impl Animation for ShootAnimation {
|
||||
look_dir,
|
||||
_global_time,
|
||||
stage_section,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct SitAnimation;
|
||||
|
||||
impl Animation for SitAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"character_sit\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_sit")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, global_time): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct SneakAnimation;
|
||||
|
||||
impl Animation for SneakAnimation {
|
||||
type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f32);
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for SneakAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_sneak")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency,
|
||||
(_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -18,16 +18,16 @@ type SpinAnimationDependency = (
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for SpinAnimation {
|
||||
type Dependency = SpinAnimationDependency;
|
||||
type Dependency<'a> = SpinAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"character_spin\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_spin")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -18,7 +18,7 @@ type SpinMeleeAnimationDependency = (
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for SpinMeleeAnimation {
|
||||
type Dependency = SpinMeleeAnimationDependency;
|
||||
type Dependency<'a> = SpinMeleeAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -26,9 +26,9 @@ impl Animation for SpinMeleeAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_spinmelee")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -20,7 +20,7 @@ type StaggeredAnimationDependency = (
|
||||
bool,
|
||||
);
|
||||
impl Animation for StaggeredAnimation {
|
||||
type Dependency = StaggeredAnimationDependency;
|
||||
type Dependency<'a> = StaggeredAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,7 +28,7 @@ impl Animation for StaggeredAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_staggered")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -39,7 +39,7 @@ impl Animation for StaggeredAnimation {
|
||||
stage_section,
|
||||
timer,
|
||||
wield_status,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct StandAnimation;
|
||||
|
||||
impl Animation for StandAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
@ -22,9 +22,9 @@ impl Animation for StandAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_stand\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_stand")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, second_tool_kind, hands, global_time, avg_vel): Self::Dependency,
|
||||
(active_tool_kind, second_tool_kind, hands, global_time, avg_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -20,7 +20,7 @@ type StunnedAnimationDependency = (
|
||||
bool,
|
||||
);
|
||||
impl Animation for StunnedAnimation {
|
||||
type Dependency = StunnedAnimationDependency;
|
||||
type Dependency<'a> = StunnedAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,7 +28,7 @@ impl Animation for StunnedAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_stunned")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -39,7 +39,7 @@ impl Animation for StunnedAnimation {
|
||||
stage_section,
|
||||
timer,
|
||||
wield_status,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -19,7 +19,7 @@ type SwimAnimationDependency = (
|
||||
);
|
||||
|
||||
impl Animation for SwimAnimation {
|
||||
type Dependency = SwimAnimationDependency;
|
||||
type Dependency<'a> = SwimAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -27,7 +27,7 @@ impl Animation for SwimAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_swim")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -38,7 +38,7 @@ impl Animation for SwimAnimation {
|
||||
last_ori,
|
||||
global_time,
|
||||
avg_vel,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct SwimWieldAnimation;
|
||||
|
||||
impl Animation for SwimWieldAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency = (
|
||||
type Dependency<'a> = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
@ -23,9 +23,9 @@ impl Animation for SwimWieldAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_swimwield")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, second_tool_kind, hands, velocity, global_time): Self::Dependency,
|
||||
(active_tool_kind, second_tool_kind, hands, velocity, global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct TalkAnimation;
|
||||
|
||||
impl Animation for TalkAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32, f32, Dir);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32, f32, Dir);
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for TalkAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_talk")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, _velocity, _global_time, look_dir): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, _velocity, _global_time, look_dir): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -21,7 +21,7 @@ type WieldAnimationDependency = (
|
||||
f32,
|
||||
);
|
||||
impl Animation for WieldAnimation {
|
||||
type Dependency = WieldAnimationDependency;
|
||||
type Dependency<'a> = WieldAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -29,7 +29,7 @@ impl Animation for WieldAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_wield")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for WieldAnimation {
|
||||
look_dir,
|
||||
velocity,
|
||||
global_time,
|
||||
): Self::Dependency,
|
||||
): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::f32::consts::PI;
|
||||
pub struct FlyAnimation;
|
||||
|
||||
impl Animation for FlyAnimation {
|
||||
type Dependency = (f32, f32);
|
||||
type Dependency<'a> = (f32, f32);
|
||||
type Skeleton = DragonSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"dragon_fly\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "dragon_fly")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
_global_time: Self::Dependency,
|
||||
_global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = DragonSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"dragon_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "dragon_idle")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::f32::consts::PI;
|
||||
pub struct RunAnimation;
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = (f32, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>);
|
||||
type Dependency<'a> = (f32, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>);
|
||||
type Skeleton = DragonSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"dragon_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "dragon_run")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, orientation, last_ori, _global_time, avg_vel): Self::Dependency,
|
||||
(_velocity, orientation, last_ori, _global_time, avg_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct IdleAnimation;
|
||||
type IdleAnimationDependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>);
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = IdleAnimationDependency;
|
||||
type Dependency<'a> = IdleAnimationDependency;
|
||||
type Skeleton = FishMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -17,9 +17,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "fish_medium_idle")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct SwimAnimation;
|
||||
type SwimAnimationDependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>, f32);
|
||||
|
||||
impl Animation for SwimAnimation {
|
||||
type Dependency = SwimAnimationDependency;
|
||||
type Dependency<'a> = SwimAnimationDependency;
|
||||
type Skeleton = FishMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -17,9 +17,9 @@ impl Animation for SwimAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "fish_medium_swim")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, _global_time, avg_vel, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, last_ori, _global_time, avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct IdleAnimation;
|
||||
type IdleAnimationDependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>);
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = IdleAnimationDependency;
|
||||
type Dependency<'a> = IdleAnimationDependency;
|
||||
type Skeleton = FishSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -17,9 +17,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "fish_small_idle")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,7 +9,7 @@ pub struct SwimAnimation;
|
||||
type SwimAnimationDependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>, f32);
|
||||
|
||||
impl Animation for SwimAnimation {
|
||||
type Dependency = SwimAnimationDependency;
|
||||
type Dependency<'a> = SwimAnimationDependency;
|
||||
type Skeleton = FishSmallSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -17,9 +17,9 @@ impl Animation for SwimAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "fish_small_swim")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, _global_time, avg_vel, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, last_ori, _global_time, avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use common::states::utils::StageSection;
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = (Option<StageSection>, f32, f32);
|
||||
type Dependency<'a> = (Option<StageSection>, f32, f32);
|
||||
type Skeleton = GolemSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -15,9 +15,9 @@ impl Animation for AlphaAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "golem_alpha")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(stage_section, global_time, timer): Self::Dependency,
|
||||
(stage_section, global_time, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = GolemSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -15,9 +15,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "golem_idle")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use std::f32::consts::PI;
|
||||
pub struct RunAnimation;
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, f32);
|
||||
type Dependency<'a> = (Vec3<f32>, Vec3<f32>, Vec3<f32>, f32, f32);
|
||||
type Skeleton = GolemSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -15,9 +15,9 @@ impl Animation for RunAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "golem_run")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, _global_time, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, last_ori, _global_time, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct ShockwaveAnimation;
|
||||
|
||||
impl Animation for ShockwaveAnimation {
|
||||
type Dependency = (Option<StageSection>, f32, f32);
|
||||
type Dependency<'a> = (Option<StageSection>, f32, f32);
|
||||
type Skeleton = GolemSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for ShockwaveAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "golem_shockwave")]
|
||||
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(stage_section, velocity, _global_time): Self::Dependency,
|
||||
(stage_section, velocity, _global_time): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,7 +8,7 @@ use std::f32::consts::PI;
|
||||
pub struct SpinMeleeAnimation;
|
||||
|
||||
impl Animation for SpinMeleeAnimation {
|
||||
type Dependency = Option<StageSection>;
|
||||
type Dependency<'a> = Option<StageSection>;
|
||||
type Skeleton = GolemSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -16,9 +16,9 @@ impl Animation for SpinMeleeAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "golem_spinmelee")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
stage_section: Self::Dependency,
|
||||
stage_section: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![feature(const_generics)]
|
||||
#![feature(or_patterns)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
#[cfg(all(feature = "be-dyn-lib", feature = "use-dyn-lib"))]
|
||||
compile_error!("Can't use both \"be-dyn-lib\" and \"use-dyn-lib\" features at once");
|
||||
@ -137,15 +138,15 @@ pub fn compute_matrices<S: Skeleton>(
|
||||
|
||||
pub trait Animation {
|
||||
type Skeleton: Skeleton;
|
||||
type Dependency;
|
||||
type Dependency<'a>;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8];
|
||||
|
||||
/// Returns a new skeleton that is generated by the animation.
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
_skeleton: &Self::Skeleton,
|
||||
_dependency: Self::Dependency,
|
||||
_dependency: Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_skeleton_attr: &<<Self as Animation>::Skeleton as Skeleton>::Attr,
|
||||
@ -153,9 +154,9 @@ pub trait Animation {
|
||||
|
||||
/// Calls `update_skeleton_inner` either directly or via `libloading` to
|
||||
/// generate the new skeleton.
|
||||
fn update_skeleton(
|
||||
fn update_skeleton<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
dependency: Self::Dependency,
|
||||
dependency: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
skeleton_attr: &<<Self as Animation>::Skeleton as Skeleton>::Attr,
|
||||
@ -172,7 +173,7 @@ pub trait Animation {
|
||||
let update_fn: libloading::Symbol<
|
||||
fn(
|
||||
&Self::Skeleton,
|
||||
Self::Dependency,
|
||||
Self::Dependency<'a>,
|
||||
f32,
|
||||
&mut f32,
|
||||
&<Self::Skeleton as Skeleton>::Attr,
|
||||
|
@ -15,7 +15,7 @@ type BeamAnimationDependency = (
|
||||
Body,
|
||||
);
|
||||
impl Animation for BeamAnimation {
|
||||
type Dependency = BeamAnimationDependency;
|
||||
type Dependency<'a> = BeamAnimationDependency;
|
||||
type Skeleton = ObjectSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -23,9 +23,9 @@ impl Animation for BeamAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "object_beam")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, _stage_section, _body): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, _stage_section, _body): Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,7 +7,7 @@ use common::comp::item::ToolKind;
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Dependency<'a> = (Option<ToolKind>, Option<ToolKind>, f32);
|
||||
type Skeleton = ObjectSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -15,9 +15,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "object_idle")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, _global_time): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, _global_time): Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -15,7 +15,7 @@ type ShootAnimationDependency = (
|
||||
Body,
|
||||
);
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency = ShootAnimationDependency;
|
||||
type Dependency<'a> = ShootAnimationDependency;
|
||||
type Skeleton = ObjectSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -23,9 +23,9 @@ impl Animation for ShootAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "object_shoot")]
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, stage_section, body): Self::Dependency,
|
||||
(_active_tool_kind, _second_tool_kind, stage_section, body): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use common::states::utils::StageSection;
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_alpha")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use common::states::utils::StageSection;
|
||||
pub struct BetaAnimation;
|
||||
|
||||
impl Animation for BetaAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_beta\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_beta")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -9,16 +9,16 @@ use std::f32::consts::PI;
|
||||
pub struct BreatheAnimation;
|
||||
|
||||
impl Animation for BreatheAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_breathe\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_breathe")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -9,16 +9,16 @@ use std::f32::consts::PI;
|
||||
pub struct DashAnimation;
|
||||
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_dash\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_dash")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct IdleAnimation;
|
||||
|
||||
impl Animation for IdleAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_idle")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -6,16 +6,16 @@ use super::{
|
||||
pub struct JumpAnimation;
|
||||
|
||||
impl Animation for JumpAnimation {
|
||||
type Dependency = (f32, f32);
|
||||
type Dependency<'a> = (f32, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_jump\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_jump")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
_global_time: Self::Dependency,
|
||||
_global_time: Self::Dependency<'a>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::f32::consts::PI;
|
||||
pub struct RunAnimation;
|
||||
|
||||
impl Animation for RunAnimation {
|
||||
type Dependency = (f32, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>, f32);
|
||||
type Dependency<'a> = (f32, Vec3<f32>, Vec3<f32>, f32, Vec3<f32>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_run")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, _global_time, avg_vel, acc_vel): Self::Dependency,
|
||||
(velocity, orientation, last_ori, _global_time, avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use common::states::utils::StageSection;
|
||||
pub struct ShootAnimation;
|
||||
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_shoot\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_shoot")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, _global_time, stage_section): Self::Dependency,
|
||||
(velocity, _global_time, stage_section): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use common::states::utils::StageSection;
|
||||
pub struct StunnedAnimation;
|
||||
|
||||
impl Animation for StunnedAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_stunned\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_stunned")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use common::states::utils::StageSection;
|
||||
pub struct TailwhipAnimation;
|
||||
|
||||
impl Animation for TailwhipAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedLowSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_low_tailwhip\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_low_tailwhip")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use common::states::utils::StageSection;
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_medium_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_alpha")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use common::states::utils::StageSection;
|
||||
pub struct BetaAnimation;
|
||||
|
||||
impl Animation for BetaAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_medium_beta\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_beta")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -9,16 +9,16 @@ use std::f32::consts::PI;
|
||||
pub struct DashAnimation;
|
||||
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_medium_dash\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_dash")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -7,16 +7,16 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct FeedAnimation;
|
||||
|
||||
impl Animation for FeedAnimation {
|
||||
type Dependency = f32;
|
||||
type Dependency<'a> = f32;
|
||||
type Skeleton = QuadrupedMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_medium_feed\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_feed")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency,
|
||||
global_time: Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -8,16 +8,16 @@ use std::f32::consts::PI;
|
||||
pub struct HoofAnimation;
|
||||
|
||||
impl Animation for HoofAnimation {
|
||||
type Dependency = (f32, f32, Option<StageSection>, f32);
|
||||
type Dependency<'a> = (f32, f32, Option<StageSection>, f32);
|
||||
type Skeleton = QuadrupedMediumSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
const UPDATE_FN: &'static [u8] = b"quadruped_medium_hoof\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "quadruped_medium_hoof")]
|
||||
fn update_skeleton_inner(
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency,
|
||||
(velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user