mirror of
https://github.com/redstrate/Physis.git
synced 2025-06-20 04:17:44 +00:00
Add retail test for parsing Havok skeletons
This commit is contained in:
parent
a277131752
commit
475fa3b9aa
1 changed files with 25 additions and 0 deletions
|
@ -6,6 +6,8 @@ use std::env;
|
|||
use physis::{
|
||||
common::{Language, Platform},
|
||||
exd::{ColumnData, ExcelRowKind},
|
||||
race::{Gender, Race, Tribe, build_skeleton_path},
|
||||
skeleton::Skeleton,
|
||||
};
|
||||
|
||||
/// Test to see if we can find the root EXL. It exists in every version, and is a pretty safe indicator whether our SqPack reading works.
|
||||
|
@ -58,3 +60,26 @@ fn test_item_read() {
|
|||
|
||||
panic!("Item not found!");
|
||||
}
|
||||
|
||||
/// Test to see if we can parse Havok skeletons.
|
||||
#[test]
|
||||
fn test_parse_skeleton() {
|
||||
let game_dir = env::var("FFXIV_GAME_DIR").unwrap();
|
||||
|
||||
let mut game_data = physis::gamedata::GameData::from_existing(
|
||||
Platform::Win32,
|
||||
format!("{}/game", game_dir).as_str(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let sklb_path = build_skeleton_path(Race::Hyur, Tribe::Midlander, Gender::Male);
|
||||
let sklb = game_data.extract(&sklb_path).unwrap();
|
||||
let skeleton = Skeleton::from_existing(&sklb).unwrap();
|
||||
for bone in &skeleton.bones {
|
||||
if bone.name == "j_kosi" {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
panic!("Could not find bone!");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue