1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-24 21:37:46 +00:00

Fix other misc warnings

This commit is contained in:
Joshua Goins 2023-12-02 20:33:08 -05:00
parent 609284ce8f
commit 8efbe484a5
3 changed files with 9 additions and 9 deletions

View file

@ -38,11 +38,11 @@ crc = "3"
[features] [features]
default = ["visual_data"] 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 = [] game_install = []
# enables support for extracting visual data, such as models, textures, materials, etc # enables support for extracting visual data, such as models, textures, materials, etc.
# this enables a whole bunch of dependencies! # 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 # 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"] visual_data = ["dep:half", "dep:glam", "dep:bitflags", "dep:texpresso"]
@ -63,7 +63,7 @@ libz-sys = { version = "1.1" }
modular-bitfield = "0.11" modular-bitfield = "0.11"
paste = "1" 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 } half = { version = "2", optional = true }
# needed for deconstructing skeleton pose matrices # needed for deconstructing skeleton pose matrices

View file

@ -83,7 +83,7 @@ impl<'a> HavokBinaryTagFileReader<'a> {
match tag_type { match tag_type {
HavokTagType::FileInfo => { HavokTagType::FileInfo => {
self.file_version = self.read_packed_int() as u8; 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 self.remembered_objects
.push(Arc::new(RefCell::new(HavokObject::new(self.remembered_types[0].clone(), HashMap::new())))) .push(Arc::new(RefCell::new(HavokObject::new(self.remembered_types[0].clone(), HashMap::new()))))
} }

View file

@ -558,6 +558,10 @@ impl HavokSplineCompressedAnimation {
} }
impl HavokAnimation for HavokSplineCompressedAnimation { impl HavokAnimation for HavokSplineCompressedAnimation {
fn duration(&self) -> f32 {
self.duration
}
fn sample(&self, time: f32) -> Vec<HavokTransform> { fn sample(&self, time: f32) -> Vec<HavokTransform> {
let frame_float = ((time / 1000.) / self.duration) * (self.num_frames as f32 - 1.); let frame_float = ((time / 1000.) / self.duration) * (self.num_frames as f32 - 1.);
let frame = frame_float as usize; let frame = frame_float as usize;
@ -588,8 +592,4 @@ impl HavokAnimation for HavokSplineCompressedAnimation {
result result
} }
fn duration(&self) -> f32 {
self.duration
}
} }