class
cArithmeticaResourceRepresents an .arth
file, which is ascripts that allows doing mathematical operations on certain values.
Example usage:
App::cArithmeticaResource arithmetica; App::cArithmeticaResource::Load(id("CustomArthTest"), GroupIDs::Scripts1, arithmetica); arithmetica.SetValue("myVariable", 2.0f); arithmetica.ComputeAll(); App::ConsolePrintF("%f", arithmetica.GetValue("output"));
Base classes
Public types
- struct ArithmeticaFunction
- struct ArithmeticaState
- struct OperationDefinition
Public static variables
Public static functions
-
static auto Load(uint32_
t instanceID, uint32_ t groupID, cArithmeticaResource& dst) -> bool - Loads an instance of arithmetica resource.
Constructors, destructors, conversion operators
- cArithmeticaResource()
- ~cArithmeticaResource() virtual
- ASSERT_SIZE(OperationDefinition, 0x10)
- ASSERT_SIZE(ArithmeticaState, 0x28)
- ASSERT_SIZE(ArithmeticaFunction, 8)
Public functions
- auto func14h() -> void virtual
- auto ComputeFunction(const char* functionName) -> void virtual
- Clears all data and computes only a specific function in the file.
- auto ComputeAll() -> void virtual
- Clears all data and computes the entire arithmetic file.
- auto GetValue(const char* variableName) -> float
- Gets the value of a variable, the file must have been computed before calling this.
- auto SetValue(const char* variableName, float value) -> void
- Sets the value of a variable.
Public variables
- eastl::vector<eastl::string> mVariableNames
- eastl::vector<float> mVariableValues
- eastl::vector<OperationDefinition> mOperators
- int field_54
- ArithmeticaState mState
- eastl::vector<ArithmeticaFunction> mFunctions
Function documentation
static bool App:: cArithmeticaResource:: Load(uint32_ t instanceID,
uint32_ t groupID,
cArithmeticaResource& dst)
Loads an instance of arithmetica resource.
Parameters | |
---|---|
instanceID | |
groupID | Usually GroupIDs:: |
dst |
void App:: cArithmeticaResource:: ComputeFunction(const char* functionName) virtual
Clears all data and computes only a specific function in the file.
Parameters | |
---|---|
functionName |