Skip to content
EvilEngine.Mounts

Platform record

public sealed record Platform

One machine a game ships for: its id, its byte order and the case rule its files follow. A platform adapter holds one as a static, and a game adapter lists the ones it reads in its Platforms and takes its id and case rule from there.

public static readonly Platform Platform = new("pc", ByteOrder.Little, CaseRule.Insensitive);

The engine has two: PcPlatform.Platform in the pc adapter and Ps3Platform.Platform in the ps3 adapter, which is ps3, big-endian and case-sensitive.

Assembly
EvilEngine.Mounts
Commit
4ff877b1

Members

Platform constructor

public Platform(string Id, ByteOrder ByteOrder, CaseRule CaseRule)

Makes a platform from its id, byte order and case rule.

Id property

public string Id { get; init; }

The platform’s id, such as pc or ps3. It’s the middle part of a MountId, as in quake/pc/1.06, and what a MountRequirement names to ask for one platform.

ByteOrder property

public ByteOrder ByteOrder { get; init; }

The ByteOrder its files store numbers in. Nothing reads it yet.

CaseRule property

public CaseRule CaseRule { get; init; }

The CaseRule its files follow. Adapters plan their mounts with it, as in new MountPlan(Pc.CaseRule).