Add and re-organize more documentation
This commit is contained in:
parent
ca6e9cccac
commit
44ec3ada48
15 changed files with 44 additions and 19 deletions
|
@ -1,6 +1,12 @@
|
|||
mod common;
|
||||
|
||||
/// Properties
|
||||
pub mod property;
|
||||
|
||||
/// Top-level save objects
|
||||
pub mod save_object;
|
||||
|
||||
/// Various structures
|
||||
pub mod structure;
|
||||
|
||||
use binrw::helpers::until_eof;
|
||||
|
|
|
@ -142,6 +142,8 @@ fn calc_key_data_size_in_bytes(key_data: &ArrayKeyData) -> u32 {
|
|||
}
|
||||
|
||||
/// An array.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UArrayProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct ArrayProperty {
|
||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
|||
use super::PropertyBase;
|
||||
|
||||
/// A boolean.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UBoolProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct BoolProperty {
|
||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
|||
use super::PropertyBase;
|
||||
|
||||
/// A enum.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UEnumProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct EnumProperty {
|
||||
|
|
|
@ -3,6 +3,8 @@ use binrw::binrw;
|
|||
use super::PropertyBase;
|
||||
|
||||
/// A float.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UFloatProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct FloatProperty {
|
||||
|
|
|
@ -3,6 +3,8 @@ use binrw::binrw;
|
|||
use super::PropertyBase;
|
||||
|
||||
/// A integer.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UIntProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct IntProperty {
|
||||
|
|
|
@ -271,6 +271,8 @@ fn calc_entry_size_in_bytes(prop: &MapProperty) -> u32 {
|
|||
}
|
||||
|
||||
/// A map.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UMapProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct MapProperty {
|
||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
|||
use super::PropertyBase;
|
||||
|
||||
/// A name.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UNameProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct NameProperty {
|
||||
|
|
|
@ -73,6 +73,8 @@ fn custom_parser(
|
|||
}
|
||||
|
||||
/// A set.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/USetProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct SetProperty {
|
||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
|||
use super::PropertyBase;
|
||||
|
||||
/// A string.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UStrProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct StrProperty {
|
||||
|
|
|
@ -5,6 +5,8 @@ use crate::{
|
|||
use binrw::binrw;
|
||||
|
||||
/// A structure.
|
||||
///
|
||||
/// See [the Unreal Engine documentation](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UStructProperty?application_version=4.27).
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct StructProperty {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
use crate::property::{BoolProperty, IntProperty, StrProperty, map_property::MapProperty};
|
||||
|
||||
#[paramacro::serialized_struct("Transform")]
|
||||
/// The object stored in `LocalProfile.sav`.
|
||||
#[paramacro::serialized_struct("")]
|
||||
#[derive(Debug)]
|
||||
pub struct LocalProfile {
|
||||
pub struct LocalProfileObject {
|
||||
#[paramacro::serialized_field = "SavedDataVersion"]
|
||||
version: IntProperty,
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
pub mod generic;
|
||||
pub mod localprofile;
|
||||
pub mod persistent;
|
||||
pub mod slot;
|
||||
|
||||
mod localprofile;
|
||||
pub use self::localprofile::LocalProfileObject;
|
||||
|
||||
mod persistent;
|
||||
pub use self::persistent::PersistentObject;
|
||||
|
||||
mod slot;
|
||||
pub use self::slot::SlotObject;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use binrw::binrw;
|
||||
|
||||
use crate::{
|
||||
property::{
|
||||
BoolProperty, IntProperty, NameProperty, StrProperty, array_property::ArrayProperty,
|
||||
|
@ -8,9 +6,10 @@ use crate::{
|
|||
structure::{DABuildDataStruct, DATuningPointData, TransformStruct},
|
||||
};
|
||||
|
||||
#[paramacro::serialized_struct("Transform")]
|
||||
/// The object stored in `Persistent.sav`.
|
||||
#[paramacro::serialized_struct("")]
|
||||
#[derive(Debug)]
|
||||
pub struct Persistent {
|
||||
pub struct PersistentObject {
|
||||
#[paramacro::serialized_field = "SavedDataVersion"]
|
||||
version: IntProperty,
|
||||
|
||||
|
@ -101,11 +100,3 @@ pub struct Persistent {
|
|||
#[paramacro::serialized_field = "bUseSaveSlot"]
|
||||
use_save_slot: BoolProperty,
|
||||
}
|
||||
|
||||
#[binrw]
|
||||
#[derive(Debug)]
|
||||
pub struct PersistentObject {
|
||||
pub size_in_bytes: u32,
|
||||
#[br(pad_after = 4)]
|
||||
pub profile: Persistent,
|
||||
}
|
||||
|
|
|
@ -3,9 +3,10 @@ use crate::{
|
|||
structure::{DALoadOptionStruct, DateTimeStruct, SaveSlotInfoStruct},
|
||||
};
|
||||
|
||||
#[paramacro::serialized_struct("Transform")]
|
||||
/// The object stored in `Slot.sav`.
|
||||
#[paramacro::serialized_struct("")]
|
||||
#[derive(Debug)]
|
||||
pub struct Slot {
|
||||
pub struct SlotObject {
|
||||
#[paramacro::serialized_field = "SavedDataVersion"]
|
||||
version: IntProperty,
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue