App::cIDGenerator class

Public static functions

static auto Get() -> cIDGenerator*

Constructors, destructors, conversion operators

~cIDGenerator() virtual

Public functions

auto Generate(ResourceKey& dst, uint32_t typeID, uint8_t poolID, uint8_t highBits, uint8_t lowBits8, uint8_t lowBits0) -> void virtual
Generates a ResourceKey that uses the given type ID, autogenerating an instance ID that does not conflict with any existing file.
auto GenerateForGroup(ResourceKey& dst, uint32_t typeID, uint32_t groupID) -> void virtual
Generates a ResourceKey that uses the given type and group IDs, autogenerating an instance ID that does not conflict with any existing file.

Public variables

int field_4
eastl::map<int, int> field_8
eastl::map<int, int> field_24

Function documentation

void App::cIDGenerator::Generate(ResourceKey& dst, uint32_t typeID, uint8_t poolID, uint8_t highBits, uint8_t lowBits8, uint8_t lowBits0) virtual

Generates a ResourceKey that uses the given type ID, autogenerating an instance ID that does not conflict with any existing file.

Parameters
dst
typeID
poolID
highBits
lowBits8
lowBits0

The group ID is calculated from all the other parameters like this: highBits|0x40 poolID lowBits8 lowBits0, from highest to lowest bits. poolID determines the "generation pool" where instance IDs are generated (there is one for creatures, one for planets, etc).

void App::cIDGenerator::GenerateForGroup(ResourceKey& dst, uint32_t typeID, uint32_t groupID) virtual

Generates a ResourceKey that uses the given type and group IDs, autogenerating an instance ID that does not conflict with any existing file.

Parameters
dst
typeID
groupID

The group ID masked with 0x00ff0000 determines the "generation pool" where instance IDs are generated (there is one for creatures, one for planets, etc).