App namespace

This namespace contains basic utilities that allow to properly interact with the app.

Those utilities are:

  • Game modes: Game modes are the contexts where the game is played. They can receive input events (mouse and keyboard) and they have an update method. For example, each stage in the game is a Game mode. For more information, check the IGameMode and IGameModeManager classes.
  • Cameras: With cameras you can control the view in the game. Cameras can receive input events (mouse and keyboard) and they have an update method. For more information, check the ICameraManager and ICamera classes.
  • Messages: Messages are the basic unit of communication between different objects in the app. For more information, check the Message, IMessageListener and IMessageManager classes.
  • Properties: .prop files are the basic unit of configuration in the game files. Most game objects are defined using property lists. For more information, check the Property, PropertyList and IPropManager classes, and the SPPropertyIDs namespace.
  • Cheats: The ICheatManager class takes care of the cheats and the console of the game.

Namespaces

namespace CreatureModeStrategies
namespace ScenarioMode_addresses
namespace SPPropertyIDs
This namespace only contains property IDs to be used in the AppProperties module.

Classes

class Canvas
class cAppSystem
class cArithmeticaResource
Represents an .arth file, which is ascripts that allows doing mathematical operations on certain values.
class cCameraManager
The implementation of ICameraManager; this should only be used for extending and detouring.
class cCellModeStrategy
class cCheatManager
The implementation of ICheatManager; this should only be used for extending and detouring.
class cConfigManager
class cConfigScriptState
class cCreatureModeStrategy
class cGameModeManager
The implementation of IGameModeManager; this should only be used for extending and detouring.
class cIDGenerator
class cJob
class cLocaleManager
class cMessageManager
The implementation of IMessageManager; this should only be used for extending and detouring.
class cMouseCamera
class CommandLine
class cPropManager
The implementation of IPropManager; this should only be used for extending and detouring.
class cScenarioMode
class cSporeApp
class cStringDetokenizer
The class responsible for translating text tokens, which are special characters in locale files.
class cViewer
This class represents all the camera and viewport configuration used to render a scene.
class DefaultCamera
Defines a default implementation of ICamera.
class DefaultGameMode
A class that provides default implementation for all the methods in a IGameMode.
class DefaultMessageListener
A class that inherits from App::IMessageListener and defines an implementation for the AddRef() and Release() metods.
class DirectPropertyList
A special kind of PropertyList that allows to have fast-access bool/int/float properties, apart from normal properties.
class FileDropMessage
class GameSpace
class IAppSystem
class ICamera
This class represents a camera in the game, capable of setting the view transformations used for rendering and receiving input events.
class ICameraManager
This manager handles the cameras in the game.
class ICheatManager
This manager is used to control the available cheats in the game, and the cheat console.
class IClassManager
class IConfigManager
class ICreatureModeActionHandler
class IGameMode
An interface that represents a mode in the game, that can receive mouse/keyboard input and update every frame.
class IGameModeManager
A manager that takes care of game modes; check IGameMode for more information.
class IGameModeObject
Same as App::IGameMode, but this one includes a Cast method similar to the one in the Object class.
class IJobManager
class IMessageListener
An interface that can receive messages sent through the app.
class IMessageManager
This manager defines a messaging system, that allows communication between different parts of the code.
class IMessageRC
class IPropManager
A manager that stores all the property lists in the game, used for most configurations.
class ISPClassFactory
class IStateManager
class ITokenTranslator
class IUnmanagedMessageListener
Same as App::IMessageListener, but this one does not use ref-counting.
class IUpdatable
class LambdaMessageListener
An implementation of IMessageListener using lambda functions.
struct MessageListenerData
class OnModeEnterMessage
class OnModeExitMessage
struct PngEncoder
class Property
Property is a class used to represent a property belonging to a PROP file.
class PropertyList
A class that contains multiple properties.
class RefCountedString
class ScheduledTaskListener
A message listener that, listening to Update messages, executes the given task after a certain time has passed and (optionally) repetaing it periodically.
class SetGameModeMessage
class StandardMessage
class Thumbnail_cImportExport
A class related with the .PNG files of creations.
struct ThumbnailDecodedMetadata
class UpdateMessageListener
A message listener used for Update script methods.

Enums

enum GameModeManagerMessageIDs { kMsgAddRef = 1, kMsgRelease = 2, kMsgOnModeExit = 0x212D3E7, kMsgOnModeEnter = 0x22D1ADC, kMsgSetGameModeByName = 0xE11333 }
enum AppMessageIDs { kMsgAppInitialized = 0x49790B2, kMsgAppUpdate = 0x1EE100A }
enum class PropertyType: uint16_t { None = 0, Bool = 1, Int32 = 9, UInt32 = 0x0a, Float = 0x0d, String8 = 0x12, String16 = 0x13, Key = 0x20, Text = 0x22, Vector2 = 0x30, Vector3 = 0x31, ColorRGB = 0x32, Vector4 = 0x33, ColorRGBA = 0x34, Transform = 0x38, BBox = 0x39, Char = 0x0002, WChar = 0x0003, Int8 = 0x0005, UInt8 = 0x0006, Int16 = 0x0007, UInt16 = 0x0008, Int64 = 0x000B, UInt64 = 0x000C, Double = 0x000E, Ptr = 0x000F, Void = 0x0010, IUnknownRC = 0x0011, Flags = 0x0021, Matrix2 = 0x0035, Matrix3 = 0x0036, Matrix4 = 0x0037 }

Typedefs

using cJobCallback = bool(*)(cJob*, void*)
using cJobVoidCallback = void(*)(cJob*, void*)
using CameraFactoryFunction_t = ICamera*(*)(PropertyList*pPropList)
Camera types need a static function that creates the correct camera instance.
using VoidFunction_T = eastl::function<void()>
The type of function used in Update or schedule scripts.
template<class T>
using VoidMethod_T = void(T::*)()
The type of member method used in Update or schedule scripts.

Functions

auto Addresses(AppData) -> namespace
ASSERT_SIZE(Canvas, 0x98)
auto Addresses(Canvas) -> namespace
ASSERT_SIZE(cAppSystem, 0x1F0)
auto Addresses(IAppSystem) -> namespace
auto Addresses(cAppSystem) -> namespace
ASSERT_SIZE(cArithmeticaResource, 0x94)
auto Addresses(cArithmeticaResource) -> namespace
ASSERT_SIZE(cCameraManager, 0xB4)
auto Addresses(cCameraManager) -> namespace
ASSERT_SIZE(cCellModeStrategy, 0xC)
auto Addresses(cCellModeStrategy) -> namespace
ASSERT_SIZE(cCheatManager, 0x68)
auto Addresses(cCheatManager) -> namespace
ASSERT_SIZE(cCreatureModeStrategy, 0xE8)
auto Addresses(cCreatureModeStrategy) -> namespace
ASSERT_SIZE(cGameModeManager, 0x34)
auto Addresses(cGameModeManager) -> namespace
auto Addresses(cJob) -> namespace
auto Addresses(cLocaleManager) -> namespace
ASSERT_SIZE(cMessageManager, 0xC8)
auto Addresses(cMessageManager) -> namespace
ASSERT_SIZE(cMouseCamera, 0x124)
auto Addresses(cMouseCamera) -> namespace
ASSERT_SIZE(CommandLine, 0x38)
auto Addresses(CommandLine) -> namespace
auto GetAppCommandLine() -> CommandLine*
Returns the command line that was used to execute this app.
auto Addresses(IConfigManager) -> namespace
ASSERT_SIZE(cConfigScriptState, 0x88)
ASSERT_SIZE(cConfigManager, 0xB4)
auto GetPreferences() -> PropertyList*
Returns the preferences property list, which is stored in AppData/Spore/Preferences/Preferences.prop
ASSERT_SIZE(cPropManager, 0x1EC)
auto Addresses(cPropManager) -> namespace
ASSERT_SIZE(cSporeApp, 0x48)
auto Addresses(cSporeApp) -> namespace
ASSERT_SIZE(cStringDetokenizer, 0x5C)
ASSERT_SIZE(cViewer, 0x174)
auto Addresses(cViewer) -> namespace
ASSERT_SIZE(DirectPropertyList, 0x54)
auto Addresses(DirectPropertyList) -> namespace
ASSERT_SIZE(GameSpace, 0x198)
auto GetConsoleStream() -> ArgScript::FormatParser*
An utility method that returns the active console stream, and that can be used to print eastl::strings to the console.
template<typename... Args>
auto ConsolePrintF(const char* str, Args... args) -> void
auto Addresses(ICheatManager) -> namespace
auto Addresses(IClassManager) -> namespace
ASSERT_SIZE(cIDGenerator, 0x40)
auto Addresses(cResourceKeyGenerator) -> namespace
auto Addresses(cIDGenerator) -> namespace
auto GetViewer() -> cViewer*
auto Addresses(IGameModeManager) -> namespace
auto AddUpdateFunction(const VoidFunction_T& function) -> eastl::intrusive_ptr<UpdateMessageListener>
Adds an "Update" function that is called once every game frame.
auto AddUpdateFunction(IUpdatable* updatable) -> eastl::intrusive_ptr<UpdateMessageListener>
Adds a class with an Update method that is called once every game frame.
auto ScheduleTask(const VoidFunction_T& function, float scheduleTime) -> ScheduledTaskListenerPtr
Executes a function after a certain time (measured in seconds) has passed from ths call.
template<class T>
auto ScheduleTask(T* object, VoidMethod_T<T> method, float scheduleTime) -> ScheduledTaskListenerPtr
Executes a class method after a certain time (measured in seconds) has passed from ths call.
auto ScheduleRepeatedTask(const VoidFunction_T& function, float scheduleTime, float repeatRate) -> ScheduledTaskListenerPtr
Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.
template<class T>
auto ScheduleRepeatedTask(T* object, VoidMethod_T<T> method, float scheduleTime, float repeatRate) -> ScheduledTaskListenerPtr
Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.
auto RemoveUpdateFunction(eastl::intrusive_ptr<UpdateMessageListener>& updateListener) -> bool
auto RemoveScheduledTask(ScheduledTaskListenerPtr& taskListener) -> bool
auto Addresses(IMessageManager) -> namespace
auto Addresses(IPropManager) -> namespace
auto Addresses(IStateManager) -> namespace
auto Addresses(IJobManager) -> namespace
ASSERT_SIZE(MessageListenerData, 0x14)
ASSERT_SIZE(Property, 0x14)
auto Addresses(Property) -> namespace
auto_METHOD_VOID(Property, Clear, Args(bool arg_0), Args(arg_0))
auto_METHOD_(Property, int32_t*, GetValueInt32)
auto_METHOD_(Property, float*, GetValueFloat)
auto_METHOD_(Property, bool*, GetValueBool)
auto_METHOD_(Property, uint32_t*, GetValueUInt32)
auto_METHOD_(Property, Vector2*, GetValueVector2)
auto_METHOD_(Property, Vector3*, GetValueVector3)
auto_METHOD_(Property, Vector4*, GetValueVector4)
auto_METHOD_(Property, ColorRGB*, GetValueColorRGB)
auto_METHOD_(Property, ColorRGBA*, GetValueColorRGBA)
auto_METHOD_(Property, ResourceKey*, GetValueKey)
auto_METHOD_(Property, Transform*, GetValueTransform)
auto_METHOD_(Property, LocalizedString*, GetValueText)
auto_METHOD_(Property, BoundingBox*, GetValueBBox)
auto_METHOD_(Property, eastl::string8*, GetValueString8)
auto_METHOD_(Property, eastl::string16*, GetValueString16)
auto_METHOD_(Property, char*, GetValueChar)
auto_METHOD_(Property, char16_t*, GetValueWChar)
auto_METHOD_(Property, int8_t*, GetValueInt8)
auto_METHOD_(Property, uint8_t*, GetValueUInt8)
auto_METHOD_(Property, int16_t*, GetValueInt16)
auto_METHOD_(Property, uint16_t*, GetValueUInt16)
auto_METHOD_(Property, int64_t*, GetValueInt64)
auto_METHOD_(Property, uint64_t*, GetValueUInt64)
auto_METHOD_(Property, double*, GetValueDouble)
auto_METHOD_(Property, void**, GetValueFlags)
auto_METHOD_(Property, void*, GetValue)
auto_METHOD(Property, bool, Set, Args(PropertyType type, int flags, void*pValue, size_t nValueSize, size_t nValueCount), Args(type, flags, pValue, nValueSize, nValueCount))
auto_METHOD(Property, Property&, SetValueInt32, Args(const int32_t&value), Args(value))
auto_METHOD(Property, Property&, SetValueUInt32, Args(const uint32_t&value), Args(value))
auto_METHOD(Property, Property&, SetValueKey, Args(const ResourceKey&value), Args(value))
auto_METHOD(Property, Property&, SetValueString8, Args(const eastl::string8&value), Args(value))
auto_METHOD(Property, Property&, SetValueString16, Args(const eastl::string16&value), Args(value))
auto_METHOD(Property, Property&, SetValueFloat, Args(const float&value), Args(value))
auto_METHOD(Property, Property&, SetValueBool, Args(const bool&value), Args(value))
auto_METHOD(Property, Property&, SetValueBBox, Args(const BoundingBox&value), Args(value))
auto_METHOD(Property, Property&, SetValueVector2, Args(const Vector2&value), Args(value))
auto_METHOD(Property, Property&, SetValueVector3, Args(const Vector3&value), Args(value))
auto_METHOD(Property, Property&, SetValueVector4, Args(const Vector4&value), Args(value))
auto_METHOD(Property, Property&, SetValueColorRGB, Args(const ColorRGB&value), Args(value))
auto_METHOD(Property, Property&, SetValueColorRGBA, Args(const ColorRGBA&value), Args(value))
auto_STATIC_METHOD(Property, bool, GetBool, Args(const PropertyList*prop, uint32_t propertyID, bool&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetFloat, Args(const PropertyList*prop, uint32_t propertyID, float&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetInt32, Args(const PropertyList*prop, uint32_t propertyID, int32_t&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetUInt32, Args(const PropertyList*prop, uint32_t propertyID, uint32_t&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetVector2, Args(const PropertyList*prop, uint32_t propertyID, Vector2&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetVector3, Args(const PropertyList*prop, uint32_t propertyID, Vector3&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetVector4, Args(const PropertyList*prop, uint32_t propertyID, Vector4&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetColorRGB, Args(const PropertyList*prop, uint32_t propertyID, ColorRGB&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetColorRGBA, Args(const PropertyList*prop, uint32_t propertyID, ColorRGBA&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetKey, Args(const PropertyList*prop, uint32_t propertyID, ResourceKey&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetKeyInstanceID, Args(const PropertyList*prop, uint32_t propertyID, uint32_t&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetKeyGroupID, Args(const PropertyList*prop, uint32_t propertyID, uint32_t&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetKeyTypeID, Args(const PropertyList*prop, uint32_t propertyID, uint32_t&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetText, Args(const PropertyList*prop, uint32_t propertyID, LocalizedString&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetCString8, Args(const PropertyList*prop, uint32_t propertyID, char*&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetCString16, Args(const PropertyList*prop, uint32_t propertyID, char16_t*&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetString8, Args(const PropertyList*prop, uint32_t propertyID, eastl::string&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetString16, Args(const PropertyList*prop, uint32_t propertyID, eastl::string16&dst), Args(prop, propertyID, dst))
auto_STATIC_METHOD(Property, bool, GetArrayBool, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, bool*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayInt32, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, int32_t*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayUInt32, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, uint32_t*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayFloat, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, float*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayVector2, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, Vector2*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayVector3, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, Vector3*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayVector4, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, Vector4*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayColorRGB, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, ColorRGB*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayKey, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, ResourceKey*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayString8, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, eastl::string8*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayString16, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, eastl::string16*&dst), Args(prop, propertyID, dstCount, dst))
auto_STATIC_METHOD(Property, bool, GetArrayTransform, Args(const PropertyList*prop, uint32_t propertyID, size_t&dstCount, Transform*&dst), Args(prop, propertyID, dstCount, dst))
ASSERT_SIZE(PropertyList, 0x38)
auto Addresses(PropertyList) -> namespace
ASSERT_SIZE(cScenarioMode, 0xE0)
auto Addresses(cScenarioMode) -> namespace
auto GetAppProperties() -> DirectPropertyList*
AppProperties is a kind of PropertyList containing globally-accessible properties that control the running of the app as a whole.
ASSERT_SIZE(PngEncoder, 0x70)
ASSERT_SIZE(ThumbnailDecodedMetadata, 0x90)
ASSERT_SIZE(Thumbnail_cImportExport, 0x188)
auto Addresses(Thumbnail_cImportExport) -> namespace
auto Addresses(PngEncoder) -> namespace

Enum documentation

enum App::GameModeManagerMessageIDs

Enumerators
kMsgAddRef

kMsgRelease

kMsgOnModeExit

Called when the current mode is exited. The message data is the App::OnModeExitMessage class.

kMsgOnModeEnter

Called after the current mode is entered. The message data is the App::OnModeEnterMessage class.

kMsgSetGameModeByName

enum App::AppMessageIDs

Enumerators
kMsgAppInitialized

Sent when all the systems in the game have finished initializing, except for the Simulator ones.

Does not use message data.

kMsgAppUpdate

Sent every game frame, after all other systems have been updated. Does not use message data.

Typedef documentation

typedef bool(*App::cJobCallback)(cJob*, void*)

typedef void(*App::cJobVoidCallback)(cJob*, void*)

typedef ICamera*(*App::CameraFactoryFunction_t)(PropertyList*pPropList)

Camera types need a static function that creates the correct camera instance.

The function must take a PropertyList* as a parameter, and returns an ICamera*. This does not need to read the .prop file; instead, it should be stored in a field in the camera; the manager will call ICamera::Initialize() when necessary; there's where the .prop file should be read.

typedef eastl::function<void()> App::VoidFunction_T

The type of function used in Update or schedule scripts.

template<class T>
using App::VoidMethod_T = void(T::*)()

The type of member method used in Update or schedule scripts.

Function documentation

CommandLine* App::GetAppCommandLine()

Returns the command line that was used to execute this app.

Only available after the start of cAppSystem::PreInit().

PropertyList* App::GetPreferences()

Returns the preferences property list, which is stored in AppData/Spore/Preferences/Preferences.prop

ArgScript::FormatParser* App::GetConsoleStream()

An utility method that returns the active console stream, and that can be used to print eastl::strings to the console.

This is the equivalent to ICheatManager::Get()->GetArgScript()

template<typename... Args>
void App::ConsolePrintF(const char* str, Args... args)

eastl::intrusive_ptr<UpdateMessageListener> App::AddUpdateFunction(const VoidFunction_T& function)

Adds an "Update" function that is called once every game frame.

Parameters
function A void function with no parameters, that will be executed every frame.

The time between frames is not constant, but you can use the Clock and Simulator::cGonzagoTimer classes to measure elapsed time.

The method returns the object that holds the update function. If you want to remove the function so it is not called, anymore, you can do it by calling App::RemoveUpdateFunction(...) with the returned object as parameter.

Internally, this is implemented just by adding a message listener that listens to the kMsgAppUpdate message.

eastl::intrusive_ptr<UpdateMessageListener> App::AddUpdateFunction(IUpdatable* updatable)

Adds a class with an Update method that is called once every game frame.

Parameters
updatable An object with an Update method, that will be executed every frame.

The time between frames is not constant, but you can use the Clock and Simulator::cGonzagoTimer classes to measure elapsed time.

The method returns the object that holds the updatable class. If you want to remove the function so it is not called, anymore, you can do it by calling App::RemoveUpdateFunction(...) with the returned object as parameter.

Internally, this is implemented just by adding a message listener that listens to the kMsgAppUpdate message.

ScheduledTaskListenerPtr App::ScheduleTask(const VoidFunction_T& function, float scheduleTime)

Executes a function after a certain time (measured in seconds) has passed from ths call.

Parameters
function A void function with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.

The function is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task before it is called, you can do it by calling App::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a Clock object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

template<class T>
ScheduledTaskListenerPtr App::ScheduleTask(T* object, VoidMethod_T<T> method, float scheduleTime)

Executes a class method after a certain time (measured in seconds) has passed from ths call.

Parameters
object The object to which the method will be called.
method A void method with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.

The method is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task before it is called, you can do it by calling App::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a Clock object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

ScheduledTaskListenerPtr App::ScheduleRepeatedTask(const VoidFunction_T& function, float scheduleTime, float repeatRate)

Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.

Parameters
function A void function with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
repeatRate How many seconds have to pass between every execution of the task.

The function is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task so it does not execute anymore, you can do it by calling App::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a Clock object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

template<class T>
ScheduledTaskListenerPtr App::ScheduleRepeatedTask(T* object, VoidMethod_T<T> method, float scheduleTime, float repeatRate)

Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.

Parameters
object The object to which the method will be called.
method A void method with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
repeatRate How many seconds have to pass between every execution of the task.

The function is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task so it does not execute anymore, you can do it by calling App::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a Clock object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

bool App::RemoveUpdateFunction(eastl::intrusive_ptr<UpdateMessageListener>& updateListener)

App::auto_METHOD_(Property, eastl::string8*, GetValueString8)

App::auto_METHOD_(Property, eastl::string16*, GetValueString16)

App::auto_METHOD(Property, Property&, SetValueInt32, Args(const int32_t&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueUInt32, Args(const uint32_t&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueString8, Args(const eastl::string8&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueString16, Args(const eastl::string16&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueFloat, Args(const float&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueBool, Args(const bool&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueVector2, Args(const Vector2&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueVector3, Args(const Vector3&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueVector4, Args(const Vector4&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueColorRGB, Args(const ColorRGB&value), Args(value))

App::auto_METHOD(Property, Property&, SetValueColorRGBA, Args(const ColorRGBA&value), Args(value))

DirectPropertyList* App::GetAppProperties()

AppProperties is a kind of PropertyList containing globally-accessible properties that control the running of the app as a whole.

Use AppProperties to get the property list and access global properties, for example: if (AppProperties.GetDirectBool(SPPropertyIDs::kRenderEffects)) ...