mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-20 11:47:46 +00:00
Silence more dead code warnings
This is intentional, for various reasons between binrw limitations and code that isn't used directly in Physis.
This commit is contained in:
parent
444ec6e593
commit
ec04c13fbd
16 changed files with 25 additions and 8 deletions
|
@ -175,6 +175,7 @@ struct AvfxBlock {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct Avfx {
|
||||
clip_box: [f32; 3],
|
||||
clip_box_size: [f32; 3],
|
||||
|
|
|
@ -89,6 +89,7 @@ impl<T: for<'a> AnyNumberType<'a>> ModelMemorySizes<T> {
|
|||
}
|
||||
|
||||
#[derive(BinRead)]
|
||||
#[allow(dead_code)]
|
||||
pub struct ModelFileBlock {
|
||||
pub num_blocks: u32,
|
||||
pub num_used_blocks: u32,
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// Rust deprecating this is stupid, I don't want to use a crate here
|
||||
#[allow(deprecated)]
|
||||
use std::env::home_dir;
|
||||
|
||||
use std::fs;
|
||||
use std::fs::read_dir;
|
||||
use std::path::PathBuf;
|
||||
|
@ -110,7 +113,7 @@ pub struct ExistingUserDirectory {
|
|||
/// Finds existing user folders on disk. Will only return locations that actually have files in them, and a really basic check to see if the data is valid.
|
||||
pub fn find_existing_user_dirs() -> Vec<ExistingUserDirectory> {
|
||||
let mut user_dirs = Vec::new();
|
||||
let Some(home_dir) = home_dir() else {
|
||||
let Some(_) = home_dir() else {
|
||||
return user_dirs;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// SPDX-FileCopyrightText: 2020 Inseok Lee
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::havok::transform::HavokTransform;
|
||||
|
||||
pub trait HavokAnimation {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// SPDX-FileCopyrightText: 2020 Inseok Lee
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::havok::object::HavokObject;
|
||||
use crate::havok::spline_compressed_animation::HavokSplineCompressedAnimation;
|
||||
use crate::havok::HavokAnimation;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// SPDX-FileCopyrightText: 2020 Inseok Lee
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::havok::animation_binding::HavokAnimationBinding;
|
||||
use crate::havok::object::HavokObject;
|
||||
use crate::havok::skeleton::HavokSkeleton;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#![allow(clippy::bad_bit_mask)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use core::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// SPDX-FileCopyrightText: 2020 Inseok Lee
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use core::convert::TryInto;
|
||||
|
||||
pub trait SliceByteOrderExt {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#![allow(clippy::identity_op)]
|
||||
#![allow(unused_variables)] // for br(temp), meh
|
||||
|
||||
use std::io::SeekFrom;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ use binrw::BinRead;
|
|||
#[derive(Debug)]
|
||||
#[br(import { data_offset: i32 })]
|
||||
#[brw(little)]
|
||||
#[allow(unused)]
|
||||
struct RacialDeformer {
|
||||
bone_count: i32,
|
||||
|
||||
|
@ -51,6 +52,7 @@ struct PreBoneDeformerItem {
|
|||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[brw(little)]
|
||||
#[allow(dead_code)]
|
||||
struct PreBoneDeformerLink {
|
||||
parent_index: i16,
|
||||
first_child_index: i16,
|
||||
|
@ -61,6 +63,7 @@ struct PreBoneDeformerLink {
|
|||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[brw(little)]
|
||||
#[allow(dead_code)]
|
||||
struct PreBoneDeformerHeader {
|
||||
count: i32,
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use binrw::BinRead;
|
|||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[brw(little)]
|
||||
#[allow(dead_code)]
|
||||
struct PhybHeader {
|
||||
version: [u8; 4],
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ pub enum ShaderStage {
|
|||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[brw(little)]
|
||||
#[allow(dead_code)]
|
||||
struct SchdHeader {
|
||||
magic: i32, // TODO: what magic?
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#![allow(deprecated)]
|
||||
#![allow(clippy::double_parens)]
|
||||
#![allow(clippy::identity_op)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use core::cmp;
|
||||
use core::fmt;
|
||||
|
|
|
@ -129,7 +129,7 @@ pub struct Node {
|
|||
#[br(little)]
|
||||
#[br(magic = b"ShPk")]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code, unused_variables)]
|
||||
pub struct ShaderPackage {
|
||||
version: u32,
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ struct StmHeader {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct DyePack {
|
||||
diffuse: [f32; 3],
|
||||
specular: [f32; 3],
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
use hmac_sha512::Hash;
|
||||
use physis::patch::apply_patch;
|
||||
use std::env;
|
||||
use std::fs::{read, read_dir};
|
||||
use std::process::Command;
|
||||
use std::fs::read;
|
||||
|
||||
use physis::common::Platform;
|
||||
use physis::fiin::FileInfo;
|
||||
use physis::index;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(not(feature = "retail_game_testing"), ignore)]
|
||||
|
|
Loading…
Add table
Reference in a new issue