From 8efbe484a512013a1b051e9fa678d49aaf440472 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 2 Dec 2023 20:33:08 -0500 Subject: [PATCH] Fix other misc warnings --- Cargo.toml | 8 ++++---- src/havok/binary_tag_file_reader.rs | 2 +- src/havok/spline_compressed_animation.rs | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f9f2326..582ce83 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,11 +38,11 @@ crc = "3" [features] default = ["visual_data"] -# enables game install support using unshield (only supported on Linux and macOS) +# enables game installation support using unshield (only supported on Linux and macOS) game_install = [] -# enables support for extracting visual data, such as models, textures, materials, etc -# this enables a whole bunch of dependencies! +# enables support for extracting visual data, such as models, textures, materials, etc. +# this enables a bunch of dependencies! # tip: can be safely turned off for launchers and other tools that simply need to extract the bare minimum of data visual_data = ["dep:half", "dep:glam", "dep:bitflags", "dep:texpresso"] @@ -63,7 +63,7 @@ libz-sys = { version = "1.1" } modular-bitfield = "0.11" paste = "1" -# needed for half-float support which FFXIV uses in it's model data +# needed for half-float support which FFXIV uses in its model data half = { version = "2", optional = true } # needed for deconstructing skeleton pose matrices diff --git a/src/havok/binary_tag_file_reader.rs b/src/havok/binary_tag_file_reader.rs index 7dc7ecf..ab602da 100644 --- a/src/havok/binary_tag_file_reader.rs +++ b/src/havok/binary_tag_file_reader.rs @@ -83,7 +83,7 @@ impl<'a> HavokBinaryTagFileReader<'a> { match tag_type { HavokTagType::FileInfo => { self.file_version = self.read_packed_int() as u8; - assert!(self.file_version == 3, "Unimplemented version"); + assert_eq!(self.file_version, 3, "Unimplemented version"); self.remembered_objects .push(Arc::new(RefCell::new(HavokObject::new(self.remembered_types[0].clone(), HashMap::new())))) } diff --git a/src/havok/spline_compressed_animation.rs b/src/havok/spline_compressed_animation.rs index 0cef565..d3e439e 100644 --- a/src/havok/spline_compressed_animation.rs +++ b/src/havok/spline_compressed_animation.rs @@ -558,6 +558,10 @@ impl HavokSplineCompressedAnimation { } impl HavokAnimation for HavokSplineCompressedAnimation { + fn duration(&self) -> f32 { + self.duration + } + fn sample(&self, time: f32) -> Vec { let frame_float = ((time / 1000.) / self.duration) * (self.num_frames as f32 - 1.); let frame = frame_float as usize; @@ -588,8 +592,4 @@ impl HavokAnimation for HavokSplineCompressedAnimation { result } - - fn duration(&self) -> f32 { - self.duration - } }