mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-25 05:47:45 +00:00
Suppress some warnings
This commit is contained in:
parent
02dd211964
commit
9819f87fcc
14 changed files with 48 additions and 14 deletions
|
@ -39,7 +39,7 @@ pub fn get_language_code(lang: &Language) -> &'static str {
|
|||
|
||||
#[binrw]
|
||||
#[brw(repr = i16)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Region {
|
||||
Global = -1, // TODO: find patch codes for other regions :-)
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::io::{Cursor, Read, Seek, SeekFrom};
|
|||
|
||||
#[binrw]
|
||||
#[brw(repr = i32)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
/// The file type of the data entry.
|
||||
pub enum FileType {
|
||||
/// Empty entry, usually invalid.
|
||||
|
@ -29,6 +29,7 @@ struct StandardFileBlock {
|
|||
}
|
||||
|
||||
#[derive(BinRead, Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct TextureLodBlock {
|
||||
compressed_offset: u32,
|
||||
compressed_size: u32,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::race::{get_race_id, Gender, Race, Subrace};
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
/// The slot the item is for.
|
||||
pub enum Slot {
|
||||
/// The head slot. Shorthand is "met".
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::io::{Cursor, Seek, SeekFrom};
|
|||
#[binread]
|
||||
#[br(magic = b"EXDF")]
|
||||
#[br(big)]
|
||||
#[allow(dead_code)]
|
||||
struct EXDHeader {
|
||||
version: u16,
|
||||
|
||||
|
@ -25,6 +26,7 @@ struct ExcelDataOffset {
|
|||
|
||||
#[binread]
|
||||
#[br(big)]
|
||||
#[allow(dead_code)]
|
||||
struct ExcelDataRowHeader {
|
||||
data_size: u32,
|
||||
row_count: u16,
|
||||
|
@ -32,6 +34,7 @@ struct ExcelDataRowHeader {
|
|||
|
||||
#[binread]
|
||||
#[br(big)]
|
||||
#[allow(dead_code)]
|
||||
pub struct EXD {
|
||||
header: EXDHeader,
|
||||
|
||||
|
@ -198,13 +201,13 @@ impl EXD {
|
|||
) -> String {
|
||||
use crate::common::get_language_code;
|
||||
|
||||
return match language {
|
||||
match language {
|
||||
Language::None => {
|
||||
format!("{name}_{}.exd", page.start_id)
|
||||
}
|
||||
lang => {
|
||||
format!("{name}_{}_{}.exd", page.start_id, get_language_code(&lang))
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::io::Cursor;
|
|||
#[binread]
|
||||
#[br(magic = b"EXHF")]
|
||||
#[br(big)]
|
||||
#[allow(dead_code)]
|
||||
pub struct EXHHeader {
|
||||
version: u16,
|
||||
|
||||
|
@ -54,6 +55,7 @@ pub struct ExcelColumnDefinition {
|
|||
|
||||
#[binread]
|
||||
#[br(big)]
|
||||
#[allow(dead_code)]
|
||||
pub struct ExcelDataPagination {
|
||||
pub start_id: u32,
|
||||
row_count: u32,
|
||||
|
@ -61,6 +63,7 @@ pub struct ExcelDataPagination {
|
|||
|
||||
#[binread]
|
||||
#[br(big)]
|
||||
#[allow(dead_code)]
|
||||
pub struct EXH {
|
||||
pub header: EXHHeader,
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ use binrw::BinRead;
|
|||
use std::io::{Cursor, Seek, SeekFrom};
|
||||
|
||||
#[binread]
|
||||
#[allow(dead_code)]
|
||||
pub struct ChatLogHeader {
|
||||
content_size: u32,
|
||||
file_size: u32,
|
||||
|
@ -44,6 +45,7 @@ enum EventChannel {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct ChatLogEntry {
|
||||
timestamp: u32,
|
||||
filter: EventFilter,
|
||||
|
@ -57,6 +59,7 @@ pub struct ChatLogEntry {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct ChatLog {
|
||||
entries: Vec<ChatLogEntry>,
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ macro_rules! define_race_enum {
|
|||
}
|
||||
) => {
|
||||
paste! {
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
|
||||
pub enum $name {
|
||||
$(
|
||||
|
|
|
@ -63,6 +63,7 @@ enum ModelFlags2 {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct ModelHeader {
|
||||
#[br(pad_after = 2)]
|
||||
string_count: u16,
|
||||
|
@ -107,6 +108,7 @@ pub struct ModelHeader {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct MeshLod {
|
||||
mesh_index: u16,
|
||||
mesh_count: u16,
|
||||
|
@ -141,6 +143,7 @@ struct MeshLod {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct Mesh {
|
||||
#[br(pad_after = 2)]
|
||||
vertex_count: u16,
|
||||
|
@ -161,6 +164,7 @@ struct Mesh {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct Submesh {
|
||||
index_offset: i32,
|
||||
index_count: i32,
|
||||
|
@ -173,6 +177,7 @@ struct Submesh {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct BoneTable {
|
||||
bone_indices: [u16; 64],
|
||||
|
||||
|
@ -182,6 +187,7 @@ struct BoneTable {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct BoundingBox {
|
||||
min: [f32; 4],
|
||||
max: [f32; 4],
|
||||
|
@ -189,6 +195,7 @@ struct BoundingBox {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ModelData {
|
||||
header: ModelHeader,
|
||||
|
||||
|
@ -240,6 +247,7 @@ struct ModelData {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ElementId {
|
||||
element_id: u32,
|
||||
parent_bone_name: u32,
|
||||
|
@ -276,6 +284,7 @@ enum VertexUsage {
|
|||
|
||||
#[binread]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct VertexElement {
|
||||
stream: u8,
|
||||
offset: u8,
|
||||
|
|
|
@ -4,6 +4,7 @@ use std::io::Cursor;
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct MaterialFileHeader {
|
||||
version: u32,
|
||||
file_size: u16,
|
||||
|
@ -28,6 +29,7 @@ struct MaterialHeader {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ColorSet {
|
||||
name_offset: u16,
|
||||
#[br(pad_after = 1)]
|
||||
|
@ -36,6 +38,7 @@ struct ColorSet {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ColorSetInfo {
|
||||
#[br(count = 256)]
|
||||
data: Vec<u16>,
|
||||
|
@ -43,6 +46,7 @@ struct ColorSetInfo {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ColorSetDyeInfo {
|
||||
#[br(count = 16)]
|
||||
data: Vec<u16>,
|
||||
|
@ -50,6 +54,7 @@ struct ColorSetDyeInfo {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ShaderKey {
|
||||
category: u32,
|
||||
value: u32,
|
||||
|
@ -57,6 +62,7 @@ struct ShaderKey {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct Constant {
|
||||
constant_id: u32,
|
||||
value_offset: u16,
|
||||
|
@ -65,6 +71,7 @@ struct Constant {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct Sampler {
|
||||
sampler_id: u32,
|
||||
flags: u32, // TODO: unknown
|
||||
|
@ -74,6 +81,7 @@ struct Sampler {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct MaterialData {
|
||||
file_header: MaterialFileHeader,
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ struct PatchHeader {
|
|||
}
|
||||
|
||||
#[derive(BinRead, Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct PatchChunk {
|
||||
#[br(big)]
|
||||
size: u32,
|
||||
|
@ -567,7 +568,7 @@ pub(crate) fn apply_patch(data_dir: &str, patch_path: &str) -> Result<(), PatchE
|
|||
SqpkOperation::IndexAddDelete(_) => {
|
||||
println!("PATCH: NOP IndexAddDelete");
|
||||
},
|
||||
SqpkOperation::PatchInfo(patch_info) => {
|
||||
SqpkOperation::PatchInfo(_) => {
|
||||
println!("PATCH: NOP PatchInfo");
|
||||
}
|
||||
SqpkOperation::TargetInfo(new_target_info) => {
|
||||
|
@ -575,10 +576,10 @@ pub(crate) fn apply_patch(data_dir: &str, patch_path: &str) -> Result<(), PatchE
|
|||
}
|
||||
}
|
||||
}
|
||||
ChunkType::FileHeader(header) => {
|
||||
ChunkType::FileHeader(_) => {
|
||||
println!("PATCH: NOP FileHeader");
|
||||
}
|
||||
ChunkType::ApplyOption(option) => {
|
||||
ChunkType::ApplyOption(_) => {
|
||||
println!("PATCH: NOP ApplyOption");
|
||||
}
|
||||
ChunkType::AddDirectory(_) => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
#[repr(u8)]
|
||||
/// Gender of the character.
|
||||
pub enum Gender {
|
||||
|
@ -6,7 +6,7 @@ pub enum Gender {
|
|||
Female,
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
#[repr(u8)]
|
||||
/// The race's "subrace". Each race has two subraces, which are actually identical (even down to the ids!)
|
||||
/// with the exception of Hyurs, which have two unique subraces that are really two separate races.
|
||||
|
@ -29,7 +29,7 @@ pub enum Subrace {
|
|||
Veena,
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
#[repr(u8)]
|
||||
/// The major races of Eorzea.
|
||||
pub enum Race {
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::fs;
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// The type of repository, discerning game data from expansion data.
|
||||
#[derive(Debug, PartialEq, Copy, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
#[repr(C)]
|
||||
pub enum RepositoryType {
|
||||
/// The base game directory, like "ffxiv".
|
||||
|
@ -65,7 +65,7 @@ fn read_version(p: &Path) -> Option<String> {
|
|||
|
||||
/// This refers to the specific root directory a file is located in.
|
||||
/// This is a fixed list of directories, and all of them are known.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Category {
|
||||
/// Common files such as game fonts, and other data that doesn't really fit anywhere else.
|
||||
Common,
|
||||
|
|
|
@ -31,6 +31,7 @@ impl Skeleton {
|
|||
|
||||
#[derive(XmlRead, Debug)]
|
||||
#[xml(tag = "hksection")]
|
||||
#[allow(dead_code)]
|
||||
struct HkSection {
|
||||
#[xml(attr = "name")]
|
||||
name: String,
|
||||
|
@ -41,6 +42,7 @@ impl Skeleton {
|
|||
|
||||
#[derive(XmlRead, Debug)]
|
||||
#[xml(tag = "hkobject")]
|
||||
#[allow(dead_code)]
|
||||
struct HkObject {
|
||||
#[xml(attr = "name")]
|
||||
name: Option<String>,
|
||||
|
@ -54,6 +56,7 @@ impl Skeleton {
|
|||
|
||||
#[derive(XmlRead, Debug)]
|
||||
#[xml(tag = "hkparam")]
|
||||
#[allow(dead_code)]
|
||||
struct HkParam {
|
||||
#[xml(attr = "name")]
|
||||
name: String,
|
||||
|
@ -105,6 +108,7 @@ impl Skeleton {
|
|||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
#[allow(dead_code)]
|
||||
struct BoneObject {
|
||||
bone_name: String,
|
||||
bone_number: i32,
|
||||
|
|
|
@ -9,6 +9,7 @@ use texpresso::Format;
|
|||
// Attributes and Format are adapted from Lumina (https://github.com/NotAdam/Lumina/blob/master/src/Lumina/Data/Files/TexFile.cs)
|
||||
bitflags! {
|
||||
#[binread]
|
||||
#[allow(non_upper_case_globals)]
|
||||
struct TextureAttribute : u32 {
|
||||
const DiscardPerFrame = 0x1;
|
||||
const DiscardPerMap = 0x2;
|
||||
|
@ -48,6 +49,7 @@ enum TextureFormat {
|
|||
|
||||
#[binread]
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct TexHeader {
|
||||
attribute: TextureAttribute,
|
||||
format: TextureFormat,
|
||||
|
|
Loading…
Add table
Reference in a new issue