mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-23 21:17:45 +00:00
Fix some warnings
This commit is contained in:
parent
926e7e2c78
commit
c4e409c04a
5 changed files with 19 additions and 11 deletions
14
src/bin/main.rs
Normal file
14
src/bin/main.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
use std::fs::write;
|
||||
use physis::common::Platform;
|
||||
use physis::gamedata::GameData;
|
||||
use physis::mtrl::Material;
|
||||
|
||||
fn main() {
|
||||
let game_data = GameData::from_existing(Platform::Win32, "/home/josh/.local/share/astra/game/{2bdefc9d-3382-45d6-952f-ae9b918c4764}/game");
|
||||
|
||||
let p = "bg/ffxiv/fst_f1/fld/f1f3/material/f1f3_w1_mizu4a.mtrl";
|
||||
let m_data = game_data.unwrap().extract(p).unwrap();
|
||||
write("/home/josh/test.mtrl", &m_data);
|
||||
let m = Material::from_existing(&m_data);
|
||||
println!("{:#?}", m);
|
||||
}
|
|
@ -4,8 +4,7 @@
|
|||
use std::env::home_dir;
|
||||
use std::fs;
|
||||
use std::fs::read_dir;
|
||||
use std::path::{Path, PathBuf};
|
||||
use tracing::warn;
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// Where the existing installation came from
|
||||
#[derive(Clone, Copy)]
|
||||
|
|
|
@ -196,12 +196,7 @@ impl GameData {
|
|||
/// Finds the offset inside of the DAT file for `path`.
|
||||
pub fn find_offset(&mut self, path: &str) -> Option<u64> {
|
||||
let slice = self.find_entry(path);
|
||||
match slice {
|
||||
Some((entry, chunk)) => {
|
||||
Some(entry.offset)
|
||||
}
|
||||
None => None,
|
||||
}
|
||||
slice.map(|(entry, _)| entry.offset)
|
||||
}
|
||||
|
||||
/// Parses a path structure and spits out the corresponding category and repository.
|
||||
|
|
|
@ -752,8 +752,8 @@ impl MDL {
|
|||
for shape_value in shape_values {
|
||||
let old_vertex =
|
||||
vertices[indices[shape_value.base_indices_index as usize] as usize];
|
||||
let new_vertex = vertices[(shape_value.replacing_vertex_index
|
||||
as usize)];
|
||||
let new_vertex = vertices[shape_value.replacing_vertex_index
|
||||
as usize];
|
||||
let vertex = &mut morphed_vertices
|
||||
[indices[shape_value.base_indices_index as usize] as usize];
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
use std::io::{Cursor, Seek, SeekFrom};
|
||||
|
||||
use crate::common_file_operations::{Half1, Half3};
|
||||
use crate::ByteSpan;
|
||||
use binrw::BinRead;
|
||||
use binrw::{binrw, BinReaderExt};
|
||||
|
@ -67,6 +66,7 @@ impl StainingTemplate {
|
|||
Some(StainingTemplate {})
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
fn read_array<T: binrw::BinRead<Args<'static> = ()> + Default + Clone + Copy>(
|
||||
cursor: &mut Cursor<ByteSpan>,
|
||||
offset: u64,
|
||||
|
|
Loading…
Add table
Reference in a new issue