Conversation
| @@ -0,0 +1,18 @@ | |||
| #[repr(C)] | |||
| #[derive(Copy, Clone)] | |||
| /// Tae Event Args for [`EnableTwistModifier`] | |||
There was a problem hiding this comment.
| /// Tae Event Args for [`EnableTwistModifier`] | |
| /// TAE event args for [`EnableTwistModifier`]. |
| DebugDecal2 = 10138, | ||
| } | ||
|
|
||
| /// Root TAE file header. `magic` is the base address used for pointer fixups. |
There was a problem hiding this comment.
| /// Root TAE file header. `magic` is the base address used for pointer fixups. | |
| /// The TAE file header. | |
| /// | |
| /// `magic` is the base address used for pointer fixups. |
I'm not sure what this second line means. Isn't the first element of a repr(C) struct always its base address? What sorts of "pointer fixups" are you describing here?
|
|
||
| /// Root TAE file header. `magic` is the base address used for pointer fixups. | ||
| #[repr(C)] | ||
| pub struct TAE_Header_Main { |
There was a problem hiding this comment.
Do these names come from the game's metadata? If so, document that. If not, make them Rust-style and camel-cased.
| pub unk_a00: [u8; 10], | ||
| pub unk_a0a: u8, | ||
| pub unk_a0b: u8, | ||
| pub unk_a0c: u32, |
There was a problem hiding this comment.
These shouldn't have underscores; they should be numbered relative to this struct, not the parent struct; and they should be private. Same goes for other unks below.
| pub unk_a0c: u32, | ||
| } | ||
|
|
||
| /// Groups a range of file IDs to their [`TAE_Header_FileInfo`] entries. |
There was a problem hiding this comment.
| /// Groups a range of file IDs to their [`TAE_Header_FileInfo`] entries. | |
| /// A mapping between file IDs and their [`TAE_Header_FileInfo`] entries. |
| pub anim_containers: [HvkAnimContainer; 2], | ||
| /// Total animation count loaded for this character | ||
| pub animation_count: u32, | ||
| /// Pointer to `HvkAnimTaeBinding` of `animation_count` amount |
There was a problem hiding this comment.
| /// Pointer to `HvkAnimTaeBinding` of `animation_count` amount | |
| /// Pointer to `animation_count` instances of `HvkAnimTaeBinding` |
| /// Pointer to `HvkAnimTaeBinding` of `animation_count` amount | ||
| animations: NonNull<()>, | ||
| pub tae_dat: OwnedPtr<TaeDat>, | ||
| /// Name of the animbnd data belongs to, eg `c0000` for the player |
There was a problem hiding this comment.
| /// Name of the animbnd data belongs to, eg `c0000` for the player | |
| /// Name of the animbnd that the data belongs to, eg `c0000` for the player |
| animations: NonNull<()>, | ||
| pub tae_dat: OwnedPtr<TaeDat>, | ||
| /// Name of the animbnd data belongs to, eg `c0000` for the player | ||
| pub name: NonNull<u16>, |
There was a problem hiding this comment.
Consider adding a method to get this as a Rust string and using that to implement Debug.
| pub struct TaeFileResolver { | ||
| vftable: usize, | ||
| /// Resolved tae file with most offsets replaced with actuall pointers, | ||
| /// safe to read and traverse if non-null |
There was a problem hiding this comment.
"Safe" is kind of a loaded word... even if the memory is initialized, but it's not "safe" in the Rust sense of being valid to create a reference to it unless there are no mutable references to it elsewhere, which isn't necessarily always going to be the case.
| pub prev_local_time: f32, | ||
| /// Time in seconds since the animation started up to the current frame. | ||
| pub local_time: f32, | ||
| /// Total length of the animation in seconds. | ||
| pub anim_length: f32, |
There was a problem hiding this comment.
Consider providing methods that expose these as Rust Durations.
No description provided.