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;
|
mod common;
|
||||||
|
|
||||||
|
/// Properties
|
||||||
pub mod property;
|
pub mod property;
|
||||||
|
|
||||||
|
/// Top-level save objects
|
||||||
pub mod save_object;
|
pub mod save_object;
|
||||||
|
|
||||||
|
/// Various structures
|
||||||
pub mod structure;
|
pub mod structure;
|
||||||
|
|
||||||
use binrw::helpers::until_eof;
|
use binrw::helpers::until_eof;
|
||||||
|
|
|
@ -142,6 +142,8 @@ fn calc_key_data_size_in_bytes(key_data: &ArrayKeyData) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An array.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct ArrayProperty {
|
pub struct ArrayProperty {
|
||||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
||||||
use super::PropertyBase;
|
use super::PropertyBase;
|
||||||
|
|
||||||
/// A boolean.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct BoolProperty {
|
pub struct BoolProperty {
|
||||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
||||||
use super::PropertyBase;
|
use super::PropertyBase;
|
||||||
|
|
||||||
/// A enum.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct EnumProperty {
|
pub struct EnumProperty {
|
||||||
|
|
|
@ -3,6 +3,8 @@ use binrw::binrw;
|
||||||
use super::PropertyBase;
|
use super::PropertyBase;
|
||||||
|
|
||||||
/// A float.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct FloatProperty {
|
pub struct FloatProperty {
|
||||||
|
|
|
@ -3,6 +3,8 @@ use binrw::binrw;
|
||||||
use super::PropertyBase;
|
use super::PropertyBase;
|
||||||
|
|
||||||
/// A integer.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct IntProperty {
|
pub struct IntProperty {
|
||||||
|
|
|
@ -271,6 +271,8 @@ fn calc_entry_size_in_bytes(prop: &MapProperty) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A map.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct MapProperty {
|
pub struct MapProperty {
|
||||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
||||||
use super::PropertyBase;
|
use super::PropertyBase;
|
||||||
|
|
||||||
/// A name.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct NameProperty {
|
pub struct NameProperty {
|
||||||
|
|
|
@ -73,6 +73,8 @@ fn custom_parser(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A set.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct SetProperty {
|
pub struct SetProperty {
|
||||||
|
|
|
@ -4,6 +4,8 @@ use binrw::binrw;
|
||||||
use super::PropertyBase;
|
use super::PropertyBase;
|
||||||
|
|
||||||
/// A string.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StrProperty {
|
pub struct StrProperty {
|
||||||
|
|
|
@ -5,6 +5,8 @@ use crate::{
|
||||||
use binrw::binrw;
|
use binrw::binrw;
|
||||||
|
|
||||||
/// A structure.
|
/// 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]
|
#[binrw]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StructProperty {
|
pub struct StructProperty {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
use crate::property::{BoolProperty, IntProperty, StrProperty, map_property::MapProperty};
|
use crate::property::{BoolProperty, IntProperty, StrProperty, map_property::MapProperty};
|
||||||
|
|
||||||
#[paramacro::serialized_struct("Transform")]
|
/// The object stored in `LocalProfile.sav`.
|
||||||
|
#[paramacro::serialized_struct("")]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct LocalProfile {
|
pub struct LocalProfileObject {
|
||||||
#[paramacro::serialized_field = "SavedDataVersion"]
|
#[paramacro::serialized_field = "SavedDataVersion"]
|
||||||
version: IntProperty,
|
version: IntProperty,
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
pub mod generic;
|
pub mod generic;
|
||||||
pub mod localprofile;
|
|
||||||
pub mod persistent;
|
mod localprofile;
|
||||||
pub mod slot;
|
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::{
|
use crate::{
|
||||||
property::{
|
property::{
|
||||||
BoolProperty, IntProperty, NameProperty, StrProperty, array_property::ArrayProperty,
|
BoolProperty, IntProperty, NameProperty, StrProperty, array_property::ArrayProperty,
|
||||||
|
@ -8,9 +6,10 @@ use crate::{
|
||||||
structure::{DABuildDataStruct, DATuningPointData, TransformStruct},
|
structure::{DABuildDataStruct, DATuningPointData, TransformStruct},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[paramacro::serialized_struct("Transform")]
|
/// The object stored in `Persistent.sav`.
|
||||||
|
#[paramacro::serialized_struct("")]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Persistent {
|
pub struct PersistentObject {
|
||||||
#[paramacro::serialized_field = "SavedDataVersion"]
|
#[paramacro::serialized_field = "SavedDataVersion"]
|
||||||
version: IntProperty,
|
version: IntProperty,
|
||||||
|
|
||||||
|
@ -101,11 +100,3 @@ pub struct Persistent {
|
||||||
#[paramacro::serialized_field = "bUseSaveSlot"]
|
#[paramacro::serialized_field = "bUseSaveSlot"]
|
||||||
use_save_slot: BoolProperty,
|
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},
|
structure::{DALoadOptionStruct, DateTimeStruct, SaveSlotInfoStruct},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[paramacro::serialized_struct("Transform")]
|
/// The object stored in `Slot.sav`.
|
||||||
|
#[paramacro::serialized_struct("")]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Slot {
|
pub struct SlotObject {
|
||||||
#[paramacro::serialized_field = "SavedDataVersion"]
|
#[paramacro::serialized_field = "SavedDataVersion"]
|
||||||
version: IntProperty,
|
version: IntProperty,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue