Swarm::ISwarmManager class

This class is the main manager of the Swarm effects system.

It allows to create instances of effects. The manager also can be used to create IEffectWorld, which are the objects that contain the effects. The manager creates instances of effects using the currently active effect world.

Derived classes

class cSwarmManager

Public static functions

static auto Get() -> ISwarmManager*
Gets the active manager of the Swarm system.

Public functions

auto Initialize() -> bool pure virtual
auto Dispose() -> bool pure virtual
auto AddRef() -> int pure virtual
auto Release() -> int pure virtual
void func10h(Object*) pure virtual
auto func14h() -> Object* pure virtual
void func18h(Object*) pure virtual
auto func1Ch() -> Object* pure virtual
void func20h(int, int) pure virtual
auto func24h(int) -> int pure virtual
auto HasEffect(uint32_t instanceID, uint32_t groupID) const -> bool pure virtual
Returns whether an effect with this instance and group ID exists in any of the effect directories (effdir) in the manager.
auto CreateEffect(uint32_t instanceID, uint32_t groupID, intrusive_ptr<IEffect>& dst) -> bool pure virtual
Creates an effect object with this instance and group ID in the active effect world.
void func30h(int) pure virtual
auto func34h() -> int pure virtual
void SetLOD(float value, int = 5) pure virtual
void func3Ch(int) pure virtual
void Update(float, float) pure virtual
void func44h(float, float) pure virtual
void func48h() pure virtual
auto CreateWorld(uint32_t worldID, int = 0) -> IEffectWorld* pure virtual
Creates a new IEffectWorld mapped to the given ID.
void RemoveWorld(uint32_t worldID) pure virtual
Removes the IEffectWorld mapped to the given ID from this manager.
auto GetWorld(uint32_t worldID) -> IEffectWorld* pure virtual
Returns the IEffectWorld mapped to the given ID, or nullptr if the ID is not mapped.
void SetActiveWorld(IEffectWorld* pWorld) pure virtual
Sets the given effect world to be the active one; it does not need to be mapped.
auto GetActiveWorld() -> IEffectWorld* pure virtual
Returns the active effect world.
void func60h(int) pure virtual
auto func64h(int) -> bool pure virtual
auto func68h(int) -> bool pure virtual
auto func6Ch(uint32_t instanceID, uint32_t groupID, int) -> int pure virtual
auto func70h(int, int, int) -> int pure virtual
auto func74h(int, int, int) -> int pure virtual
void AddSurface(class ResourceID surfaceID, ISurface* pSurface) pure virtual
Maps the given ISurface to the specified ID.
auto GetSurface(class ResourceID surfaceID) -> ISurface* pure virtual
Gets the ISurface mapped to the specified ID, or nullptr if none is mapped to that ID.
void func80h(int, int, int, int) pure virtual
auto func84h(int, int, int) -> bool pure virtual
void AddMapResource(class ResourceID, IEffectMap*) pure virtual
auto GetMapResource(class ResourceID) -> IEffectMap* pure virtual
void func90h(int, int, int) pure virtual
auto func94h(int) -> ResourceID pure virtual
void SetAppFlag(int flag, bool bValue) pure virtual
Set the given application flag.
auto func9Ch(int) -> int pure virtual
auto funcA0h() -> int pure virtual
auto funcA4h() -> int pure virtual
void funcA8h(int) pure virtual
void funcACh() pure virtual
auto funcB0h() -> int pure virtual
void funcB4h(int, int, int) pure virtual
auto funcB8h(int, const char*) -> bool pure virtual
auto funcBCh(int, int) -> int pure virtual
auto funcC0h(int, int) -> int pure virtual
auto funcC4h(int, int, int) -> bool pure virtual

Function documentation

bool Swarm::ISwarmManager::HasEffect(uint32_t instanceID, uint32_t groupID) const pure virtual

Returns whether an effect with this instance and group ID exists in any of the effect directories (effdir) in the manager.

Parameters
instanceID The instance ID of the effect.
groupID The group ID of the effect, usually 0.

bool Swarm::ISwarmManager::CreateEffect(uint32_t instanceID, uint32_t groupID, intrusive_ptr<IEffect>& dst) pure virtual

Creates an effect object with this instance and group ID in the active effect world.

Parameters
instanceID The instance ID of the effect.
groupID The group ID of the effect, usually 0.
dst out An uninitialized intrusive_ptr<IEffect> where the effect will be put.
Returns True if the effect was found and returned, false otherwise.

The destination is an uninitialized intrusive_ptr; the object must be nullptr or not be initialized, because it will be ignored.

IEffectWorld* Swarm::ISwarmManager::CreateWorld(uint32_t worldID, int = 0) pure virtual

Creates a new IEffectWorld mapped to the given ID.

Parameters
worldID The ID the world will be mapped to.

void Swarm::ISwarmManager::RemoveWorld(uint32_t worldID) pure virtual

Removes the IEffectWorld mapped to the given ID from this manager.

Parameters
worldID The ID the world to remove is mapped to.

If the ID is not mapped, this method does nothing.

IEffectWorld* Swarm::ISwarmManager::GetWorld(uint32_t worldID) pure virtual

Returns the IEffectWorld mapped to the given ID, or nullptr if the ID is not mapped.

Parameters
worldID The ID the world is mapped to.

An ID of 0 returns the default world.

void Swarm::ISwarmManager::SetActiveWorld(IEffectWorld* pWorld) pure virtual

Sets the given effect world to be the active one; it does not need to be mapped.

Parameters
pWorld The world that will be set as active, or nullptr to set the default world.

If the world is nullptr, the default world will be set as active.

void Swarm::ISwarmManager::AddSurface(class ResourceID surfaceID, ISurface* pSurface) pure virtual

Maps the given ISurface to the specified ID.

Parameters
surfaceID The ID of the surface.
pSurface

ISurface* Swarm::ISwarmManager::GetSurface(class ResourceID surfaceID) pure virtual

Gets the ISurface mapped to the specified ID, or nullptr if none is mapped to that ID.

Parameters
surfaceID The ID of the surface.

void Swarm::ISwarmManager::SetAppFlag(int flag, bool bValue) pure virtual

Set the given application flag.

Parameters
flag The flag to set.
bValue The new value of the flag.