-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use std::rc::Rc; | ||
|
||
use bytes::{Bytes, Buf}; | ||
|
||
use crate::wld::names::WldNames; | ||
use crate::Decoder; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct WldSkeletonRef { | ||
pub name: Option<String>, | ||
pub reference : u32, | ||
pub params1: u32, | ||
} | ||
|
||
impl Decoder for WldSkeletonRef { | ||
type Settings = Rc<WldNames>; | ||
|
||
fn new(input: &mut Bytes, settings: Self::Settings) -> Result<Self, crate::EQFilesError> | ||
where | ||
Self: Sized, | ||
{ | ||
let name = settings.get_name(input); | ||
let reference = input.get_u32_le(); | ||
let params1 = input.get_u32_le(); | ||
|
||
Ok(Self { | ||
name, | ||
reference, | ||
params1, | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters