1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-22 12:47:45 +00:00

Fix more warnings

This commit is contained in:
Joshua Goins 2023-07-30 08:58:59 -04:00
parent b3f8523677
commit 9a004e705d
4 changed files with 7 additions and 12 deletions

View file

@ -1,10 +1,7 @@
use crate::gamedata::MemoryBuffer;
use crate::sha1::Sha1;
use binrw::{binread, binrw};
use binrw::binread;
use binrw::BinRead;
use std::fs::read;
use std::io::{Cursor, Seek, SeekFrom};
use std::ops::Sub;
use std::io::Cursor;
use crate::race::{Gender, Race, Subrace};
fn convert_dat_race(x: u8) -> Race {

View file

@ -1,8 +1,6 @@
use crate::gamedata::MemoryBuffer;
use crate::sha1::Sha1;
use binrw::{binread, binrw};
use binrw::binrw;
use binrw::BinRead;
use std::fs::read;
use std::io::{Cursor, Seek, SeekFrom};
#[binrw]
@ -41,14 +39,14 @@ impl CMP {
pub fn from_existing(buffer: &MemoryBuffer) -> Option<CMP> {
let mut cursor = Cursor::new(buffer);
cursor.seek(SeekFrom::Start(0x2a800));
cursor.seek(SeekFrom::Start(0x2a800)).unwrap();
let rem = buffer.len() - cursor.position() as usize;
let entries = rem / std::mem::size_of::<RacialScalingParameters>();
let mut parameters = vec![];
for i in 0..entries {
for _ in 0..entries {
parameters.push(RacialScalingParameters::read(&mut cursor).unwrap());
}

View file

@ -10,7 +10,7 @@ use crate::sqpack::calculate_hash;
use std::fs;
use std::fs::{DirEntry, ReadDir};
use std::path::PathBuf;
use tracing::{debug, error, info, span, warn, Level};
use tracing::debug;
/// Framework for operating on game data.
pub struct GameData {

View file

@ -1,5 +1,5 @@
/// Creates a enum list of combined race identifiers. For example, (Hyur, Midlander, Male) becomes a new variant called HyurMidlanderMale.
#[macro_export(crate)]
#[macro_export]
macro_rules! define_race_enum {
(
pub enum $name:ident {