Struct VersionBundle

Source
pub struct VersionBundle {
    pub format: SCXVersion,
    pub header: u32,
    pub dlc_options: Option<i32>,
    pub data: f32,
    pub picture: u32,
    pub victory: f32,
    pub triggers: Option<f64>,
    pub map: u32,
}
Expand description

All the versions an SCX file uses in a single struct.

Fields§

§format: SCXVersion

The version of the ‘container’ file format.

§header: u32

The version of the header.

§dlc_options: Option<i32>

The version of the HD Edition DLC Options, only if header >= 3.

§data: f32

The compressed data version.

§picture: u32

The version of embedded bitmaps.

§victory: f32

The version of the victory conditions data.

§triggers: Option<f64>

The version of the trigger system.

§map: u32

The version of the map data.

Implementations§

Source§

impl VersionBundle

Source

pub fn aoe() -> Self

A version bundle with the parameters AoE1 uses by default.

Source

pub fn ror() -> Self

A version bundle with the parameters AoE1: Rise of Rome uses by default.

Source

pub fn aok() -> Self

A version bundle with the parameters AoK uses by default.

Source

pub fn aoc() -> Self

A version bundle with the parameters AoC uses by default

Source

pub fn userpatch_14() -> Self

A version bundle with the parameters UserPatch 1.4 uses by default.

Source

pub fn userpatch_15() -> Self

A version bundle with the parameters UserPatch 1.5 uses by default.

Source

pub fn hd_edition() -> Self

A version bundle with the parameters HD Edition uses by default.

Source

pub fn aoe2_de() -> Self

A version bundle with parameters Age of Empires 2: Definitive Edition uses by default.

This will be updated along with DE2 patches.

Source

pub fn is_aok(&self) -> bool

Returns whether this version is (likely) for an AoK scenario.

Source

pub fn is_aoc(&self) -> bool

Returns whether this version is (likely) for an AoC scenario.

Source

pub fn is_hd_edition(&self) -> bool

Returns whether this version is (likely) for an HD Edition scenario.

Source

pub fn is_age2_de(&self) -> bool

Returns whether this version is (likely) for an AoE2: Definitive Edition scenario.

Trait Implementations§

Source§

impl Clone for VersionBundle

Source§

fn clone(&self) -> VersionBundle

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VersionBundle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for VersionBundle

Source§

fn eq(&self, other: &VersionBundle) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for VersionBundle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.