mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-25 05:47:45 +00:00
Fix other misc warnings
This commit is contained in:
parent
609284ce8f
commit
8efbe484a5
3 changed files with 9 additions and 9 deletions
|
@ -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
|
||||||
|
|
|
@ -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()))))
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue