AERMRE 1.5.1
AER modding framework for Hyper Light Drifter.
|
Utilities for querying and manipulating game instances. More...
Go to the source code of this file.
Classes | |
union | AERLocal |
A dynamic member variable of an instance. More... | |
Typedefs | |
typedef void | AERInstance |
Opaque type for instance of an object. More... | |
Functions | |
size_t | AERInstanceGetAll (size_t bufSize, AERInstance **instBuf) |
Query all instances in the current room. More... | |
size_t | AERInstanceGetByObject (int32_t objIdx, bool recursive, size_t bufSize, AERInstance **instBuf) |
Query all instances of an object in the current room. More... | |
AERInstance * | AERInstanceGetById (int32_t instId) |
Query the instance with a specific ID in the current room. More... | |
AERInstance * | AERInstanceCreate (int32_t objIdx, float x, float y) |
Create an instance of an object. More... | |
void | AERInstanceChange (AERInstance *inst, int32_t newObjIdx, bool doEvents) |
Convert an instance of one object into an instance of another object in-place. More... | |
void | AERInstanceDestroy (AERInstance *inst) |
Destroy an instance and call its destroy event. More... | |
void | AERInstanceDelete (AERInstance *inst) |
Destroy an instance but do not call its destroy event. More... | |
float | AERInstanceGetDepth (AERInstance *inst) |
Query the render depth of an instance. More... | |
void | AERInstanceSetDepth (AERInstance *inst, float depth) |
Set the render depth of an instance. More... | |
void | AERInstanceSyncDepth (AERInstance *inst) |
Set the render depth of an instance based on its position in the current room. More... | |
int32_t | AERInstanceGetId (AERInstance *inst) |
Query the ID of an instance. More... | |
int32_t | AERInstanceGetObject (AERInstance *inst) |
Query the object of an instance. More... | |
bool | AERInstanceCompatibleWith (AERInstance *inst, int32_t objIdx) |
Query whether an instance's object is or inherits from another object. More... | |
bool | AERInstanceGetDeactivated (AERInstance *inst) |
Query whether or not an instance is deactivated. More... | |
void | AERInstanceSetDeactivated (AERInstance *inst, bool deactivated) |
Set the deactivation state of an instance. More... | |
bool | AERInstanceGetPersistent (AERInstance *inst) |
Query the persistence of an instance. More... | |
void | AERInstanceSetPersistent (AERInstance *inst, bool persistent) |
Set the persistence of an instance. More... | |
void | AERInstanceGetPosition (AERInstance *inst, float *x, float *y) |
Query the position of an instance in the current room. More... | |
void | AERInstanceSetPosition (AERInstance *inst, float x, float y) |
Set the position of an instance in the current room. More... | |
void | AERInstanceAddPosition (AERInstance *inst, float x, float y) |
Add to the existing position of an instance in the current room. More... | |
void | AERInstanceGetBoundingBox (AERInstance *inst, float *left, float *top, float *right, float *bottom) |
Query the axis-aligned bounding box of an instance. More... | |
float | AERInstanceGetFriction (AERInstance *inst) |
Query the friction of an instance. More... | |
void | AERInstanceSetFriction (AERInstance *inst, float friction) |
Set the friction of an instance. More... | |
void | AERInstanceGetMotion (AERInstance *inst, float *x, float *y) |
Query the motion of an instance. More... | |
void | AERInstanceSetMotion (AERInstance *inst, float x, float y) |
Set the motion of an instance. More... | |
void | AERInstanceAddMotion (AERInstance *inst, float x, float y) |
Add to the existing motion of an instance. More... | |
int32_t | AERInstanceGetMask (AERInstance *inst) |
Query the collision mask of an instance. More... | |
void | AERInstanceSetMask (AERInstance *inst, int32_t maskIdx) |
Set the collision mask of an instance. More... | |
bool | AERInstanceGetVisible (AERInstance *inst) |
Query the visibility of an instance. More... | |
void | AERInstanceSetVisible (AERInstance *inst, bool visible) |
Set the visibility of an instance. More... | |
int32_t | AERInstanceGetSprite (AERInstance *inst) |
Query the sprite of an instance. More... | |
void | AERInstanceSetSprite (AERInstance *inst, int32_t spriteIdx) |
Set the sprite of an instance. More... | |
float | AERInstanceGetSpriteFrame (AERInstance *inst) |
Query the current frame of sprite animation of an instance. More... | |
void | AERInstanceSetSpriteFrame (AERInstance *inst, float frame) |
Set the current frame of sprite animation of an instance. More... | |
float | AERInstanceGetSpriteSpeed (AERInstance *inst) |
Query the sprite animation speed of an instance. More... | |
void | AERInstanceSetSpriteSpeed (AERInstance *inst, float speed) |
Set the sprite animation speed of an instance. More... | |
float | AERInstanceGetSpriteAlpha (AERInstance *inst) |
Query the sprite alpha (transparency) of an instance. More... | |
void | AERInstanceSetSpriteAlpha (AERInstance *inst, float alpha) |
Set the sprite alpha (transparency) of an instance. More... | |
float | AERInstanceGetSpriteAngle (AERInstance *inst) |
Query the sprite offset angle of an instance. More... | |
void | AERInstanceSetSpriteAngle (AERInstance *inst, float angle) |
Set the sprite offset angle of an instance. More... | |
void | AERInstanceGetSpriteScale (AERInstance *inst, float *x, float *y) |
Query the sprite scale of an instance. More... | |
void | AERInstanceSetSpriteScale (AERInstance *inst, float x, float y) |
Set the sprite scale of an instance. More... | |
uint32_t | AERInstanceGetSpriteBlend (AERInstance *inst) |
Query the sprite blend color of an instance. More... | |
void | AERInstanceSetSpriteBlend (AERInstance *inst, uint32_t color) |
Set the sprite blend color of an instance. More... | |
bool | AERInstanceGetTangible (AERInstance *inst) |
Query the tangibility of an instance. More... | |
void | AERInstanceSetTangible (AERInstance *inst, bool tangible) |
Set the tangibility of an instance. More... | |
int32_t | AERInstanceGetAlarm (AERInstance *inst, uint32_t alarmIdx) |
Query the state of an alarm of an instance. More... | |
void | AERInstanceSetAlarm (AERInstance *inst, uint32_t alarmIdx, int32_t numSteps) |
Set the state of an alarm of an instance. More... | |
size_t | AERInstanceGetHLDLocals (AERInstance *inst, size_t bufSize, const char **nameBuf) |
Query the names of all vanilla local variables of an instance. More... | |
AERLocal * | AERInstanceGetHLDLocal (AERInstance *inst, const char *name) |
Get a reference to a specific vanilla local variable of an instance. More... | |
AERLocal * | AERInstanceCreateModLocal (AERInstance *inst, const char *name, bool public, void(*destructor)(AERLocal *local)) |
Create a new mod local variable for an instance. More... | |
void | AERInstanceDestroyModLocal (AERInstance *inst, const char *name, bool public) |
Destroy a mod local variable and call its destructor. More... | |
AERLocal | AERInstanceDeleteModLocal (AERInstance *inst, const char *name, bool public) |
Destroy a mod local variable but do not call its destructor. More... | |
AERLocal * | AERInstanceGetModLocal (AERInstance *inst, const char *name, bool public) |
Get a reference to a specific mod local variable of an instance. More... | |
Utilities for querying and manipulating game instances.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
typedef void AERInstance |
void AERInstanceAddMotion | ( | AERInstance * | inst, |
float | x, | ||
float | y | ||
) |
Add to the existing motion of an instance.
[in] | inst | Instance of interest. |
[in] | x | Relative horizontal motion. |
[in] | y | Relative vertical motion. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceAddPosition | ( | AERInstance * | inst, |
float | x, | ||
float | y | ||
) |
Add to the existing position of an instance in the current room.
This is effectively a relative translation.
[in] | inst | Instance of interest. |
[in] | x | Relative horizontal position. |
[in] | y | Relative vertical position. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceChange | ( | AERInstance * | inst, |
int32_t | newObjIdx, | ||
bool | doEvents | ||
) |
Convert an instance of one object into an instance of another object in-place.
Under the hood, this function creates a new instance of the new object, copies various properties such as position from the old instance to the new instance, and then finally destroys the old instance.
[in] | inst | Instance of interest. |
[in] | newObjIdx | Object to convert argument inst into. |
[in] | doEvents | If true , then the engine will call the destroy event of the old instance and the create event of the new instance. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_FAILED_LOOKUP | if argument newObjIdx is an invalid object. |
bool AERInstanceCompatibleWith | ( | AERInstance * | inst, |
int32_t | objIdx | ||
) |
Query whether an instance's object is or inherits from another object.
[in] | inst | Instance of interest. |
[in] | objIdx | Object to compare against. |
false
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_FAILED_LOOKUP | if argument objIdx is an invalid object. |
AERInstance * AERInstanceCreate | ( | int32_t | objIdx, |
float | x, | ||
float | y | ||
) |
Create an instance of an object.
[in] | objIdx | Object to create an instance of. |
[in] | x | Horizontal position at which to create instance. |
[in] | y | Vertical position at which to create instance. |
NULL
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_FAILED_LOOKUP | if argument objIdx is an invalid object. |
AERLocal * AERInstanceCreateModLocal | ( | AERInstance * | inst, |
const char * | name, | ||
bool | public, | ||
void(*)(AERLocal *local) | destructor | ||
) |
Create a new mod local variable for an instance.
When an instance is given a mod local in the public namespace, this local is accessible by all mods loaded. If, on the other hand, the local is created in a private namespace, then only the mod that created it can access and destroy it.
Multiple mods may each assign a private mod local with the same name to the same instance without interfering with one another.
[in] | inst | Instance of interest. |
[in] | name | Name of mod local. Must be 24 characters or less (not including null-character). |
[in] | public | Whether to use the public or private local namespace. For more information see Namespace of Mod Local Variables. |
[in] | destructor | Callback function executed when local is destroyed. May be NULL if local does not need special cleanup. |
NULL
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if either argument inst or name is NULL . |
AER_BAD_VAL | if argument name is greater than 24 characters in length (not including null-character). |
AER_FAILED_LOOKUP | if instance already has a mod local with given name in given namespace. |
void AERInstanceDelete | ( | AERInstance * | inst | ) |
Destroy an instance but do not call its destroy event.
[in] | inst | Instance of interest. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AERLocal AERInstanceDeleteModLocal | ( | AERInstance * | inst, |
const char * | name, | ||
bool | public | ||
) |
Destroy a mod local variable but do not call its destructor.
[in] | inst | Instance of interest. |
[in] | name | Name of mod local. Must be 24 characters or less (not including null-character). |
[in] | public | Whether to use the public or private local namespace. For more information see Namespace of Mod Local Variables. |
(AERLocal){0}
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if either argument inst or name is NULL . |
AER_BAD_VAL | if argument name is greater than 24 characters in length (not including null-character). |
AER_FAILED_LOOKUP | if instance does not have a mod local with given name in given namespace. |
void AERInstanceDestroy | ( | AERInstance * | inst | ) |
Destroy an instance and call its destroy event.
[in] | inst | Instance of interest. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceDestroyModLocal | ( | AERInstance * | inst, |
const char * | name, | ||
bool | public | ||
) |
Destroy a mod local variable and call its destructor.
[in] | inst | Instance of interest. |
[in] | name | Name of mod local. Must be 24 characters or less (not including null-character). |
[in] | public | Whether to use the public or private local namespace. For more information see Namespace of Mod Local Variables. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if either argument inst or name is NULL . |
AER_BAD_VAL | if argument name is greater than 24 characters in length (not including null-character). |
AER_FAILED_LOOKUP | if instance does not have a mod local with given name in given namespace. |
int32_t AERInstanceGetAlarm | ( | AERInstance * | inst, |
uint32_t | alarmIdx | ||
) |
Query the state of an alarm of an instance.
[in] | inst | Instance of interest. |
[in] | alarmIdx | Alarm index. |
-1
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_FAILED_LOOKUP | if argument alarmIdx is greater than 11 . |
size_t AERInstanceGetAll | ( | size_t | bufSize, |
AERInstance ** | instBuf | ||
) |
Query all instances in the current room.
instBuf
must be large enough to hold at least bufSize
elements.bufSize
may be 0
in which case argument instBuf
may be NULL
. This may be used to efficiently query the total number of instances in the current room.[in] | bufSize | Maximum number of elements to write to argument instBuf . |
[out] | instBuf | Buffer to write instances to. |
0
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument instBuf is NULL and argument bufSize is greater than 0 . |
void AERInstanceGetBoundingBox | ( | AERInstance * | inst, |
float * | left, | ||
float * | top, | ||
float * | right, | ||
float * | bottom | ||
) |
Query the axis-aligned bounding box of an instance.
The bounding box of an instance describes the bounding volume of an instance's sprite or mask. It is relative to the room's origin.
If not all four of the components of the bounding box are needed, then the arguments for the unneeded components may be NULL
.
[in] | inst | Instance of interest. |
[out] | left | X-intercept of the left side of the bounding box. |
[out] | top | Y-intercept of the top side of the bounding box. |
[out] | right | X-intercept of the right side of the bounding box. |
[out] | bottom | Y-intercept of the bottom side of the bounding box. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL or all four arguments left , top , right and bottom are NULL . |
AERInstance * AERInstanceGetById | ( | int32_t | instId | ) |
Query the instance with a specific ID in the current room.
[in] | instId | Instance ID. |
NULL
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_FAILED_LOOKUP | if argument instId is an invalid instance. |
size_t AERInstanceGetByObject | ( | int32_t | objIdx, |
bool | recursive, | ||
size_t | bufSize, | ||
AERInstance ** | instBuf | ||
) |
Query all instances of an object in the current room.
instBuf
must be large enough to hold at least bufSize
elements.bufSize
may be 0
in which case argument instBuf
may be NULL
. This may be used to efficiently query the total number of instances of an object in the current room.[in] | objIdx | Object to get instances of. |
[in] | recursive | Whether to query instances of given object only (false ) or both given object and direct and indirect children of given object (true ). |
[in] | bufSize | Maximum number of elements to write to argument instBuf . |
[out] | instBuf | Buffer to write instances to. |
0
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument instBuf is NULL and argument bufSize is greater than 0 . |
AER_FAILED_LOOKUP | if argument objIdx is an invalid object. |
bool AERInstanceGetDeactivated | ( | AERInstance * | inst | ) |
Query whether or not an instance is deactivated.
[in] | inst | Instance of interest. |
false
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
float AERInstanceGetDepth | ( | AERInstance * | inst | ) |
Query the render depth of an instance.
[in] | inst | Instance of interest. |
0.0f
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
float AERInstanceGetFriction | ( | AERInstance * | inst | ) |
Query the friction of an instance.
The friction of an instance determines how much it decelerates by each step.
[in] | inst | Instance of interest. |
0.0f
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AERLocal * AERInstanceGetHLDLocal | ( | AERInstance * | inst, |
const char * | name | ||
) |
Get a reference to a specific vanilla local variable of an instance.
[in] | inst | Instance of interest. |
[in] | name | Name of vanilla local. |
NULL
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if either argument inst or name is NULL . |
AER_FAILED_LOOKUP | if instance does not have a vanilla local with given name. |
size_t AERInstanceGetHLDLocals | ( | AERInstance * | inst, |
size_t | bufSize, | ||
const char ** | nameBuf | ||
) |
Query the names of all vanilla local variables of an instance.
nameBuf
must be large enough to hold at least bufSize
elements.bufSize
may be 0
in which case argument nameBuf
may be NULL
. This may be used to efficiently query the total number of vanilla locals that an instance has.[in] | inst | Instance of interest. |
[in] | bufSize | Maximum number of elements to write to argument nameBuf . |
[out] | nameBuf | Buffer to write names to. |
0
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL or argument instBuf is NULL and argument bufSize is greater than 0 . |
int32_t AERInstanceGetId | ( | AERInstance * | inst | ) |
Query the ID of an instance.
[in] | inst | Instance of interest. |
-1
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
int32_t AERInstanceGetMask | ( | AERInstance * | inst | ) |
Query the collision mask of an instance.
[in] | inst | Instance of interest. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AERLocal * AERInstanceGetModLocal | ( | AERInstance * | inst, |
const char * | name, | ||
bool | public | ||
) |
Get a reference to a specific mod local variable of an instance.
[in] | inst | Instance of interest. |
[in] | name | Name of mod local. Must be 24 characters or less (not including null-character). |
[in] | public | Whether to use the public or private local namespace. For more information see Namespace of Mod Local Variables. |
NULL
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if either argument inst or name is NULL . |
AER_BAD_VAL | if argument name is greater than 24 characters in length (not including null-character). |
AER_FAILED_LOOKUP | if instance does not have a mod local with given name in given namespace. |
void AERInstanceGetMotion | ( | AERInstance * | inst, |
float * | x, | ||
float * | y | ||
) |
Query the motion of an instance.
If only one component of the motion is needed, then the argument for the unneeded component may be NULL
.
[in] | inst | Instance of interest. |
[out] | x | Horizontal motion. |
[out] | y | Vertical motion. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL or both arguments x and y are NULL . |
int32_t AERInstanceGetObject | ( | AERInstance * | inst | ) |
Query the object of an instance.
[in] | inst | Instance of interest. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
bool AERInstanceGetPersistent | ( | AERInstance * | inst | ) |
Query the persistence of an instance.
[in] | inst | Instance of interest. |
false
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceGetPosition | ( | AERInstance * | inst, |
float * | x, | ||
float * | y | ||
) |
Query the position of an instance in the current room.
If only one component of the position is needed, then the argument for the unneeded component may be NULL
.
[in] | inst | Instance of interest. |
[out] | x | Horizontal position. |
[out] | y | Vertical position. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL or both arguments x and y are NULL . |
int32_t AERInstanceGetSprite | ( | AERInstance * | inst | ) |
Query the sprite of an instance.
[in] | inst | Instance of interest. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
float AERInstanceGetSpriteAlpha | ( | AERInstance * | inst | ) |
Query the sprite alpha (transparency) of an instance.
[in] | inst | Instance of interest. |
-1.0f
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
float AERInstanceGetSpriteAngle | ( | AERInstance * | inst | ) |
Query the sprite offset angle of an instance.
[in] | inst | Instance of interest. |
0.0f
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
uint32_t AERInstanceGetSpriteBlend | ( | AERInstance * | inst | ) |
Query the sprite blend color of an instance.
[in] | inst | Instance of interest. |
0
if unsuccessful. See Colors for more infomation.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
float AERInstanceGetSpriteFrame | ( | AERInstance * | inst | ) |
Query the current frame of sprite animation of an instance.
The current sprite animation frame of an instance is stored as a floating-point value rather than an integer because it also encodes progress to the next frame.
The integer portion of this value represents the current frame. The fractional portion represents progress towards the next frame.
[in] | inst | Instance of interest. |
-1.0f
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceGetSpriteScale | ( | AERInstance * | inst, |
float * | x, | ||
float * | y | ||
) |
Query the sprite scale of an instance.
If only one component of the scale is needed, then the argument for the unneeded component may be NULL
.
[in] | inst | Instance of interest. |
[out] | x | Horizontal scale. |
[out] | y | Vertical scale. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL or both arguments x and y are NULL . |
float AERInstanceGetSpriteSpeed | ( | AERInstance * | inst | ) |
Query the sprite animation speed of an instance.
[in] | inst | Instance of interest. |
-1.0f
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
bool AERInstanceGetTangible | ( | AERInstance * | inst | ) |
Query the tangibility of an instance.
The tangibility of an instance represents whether or not the player can collide with it. This property is only meaningful for instances of AER_OBJECT_PATHFINDOBSTACLE and its children.
[in] | inst | Instance of interest. |
false
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
bool AERInstanceGetVisible | ( | AERInstance * | inst | ) |
Query the visibility of an instance.
[in] | inst | Instance of interest. |
false
if unsuccessful.AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetAlarm | ( | AERInstance * | inst, |
uint32_t | alarmIdx, | ||
int32_t | numSteps | ||
) |
Set the state of an alarm of an instance.
[in] | inst | Instance of interest. |
[in] | alarmIdx | Alarm index. |
[in] | numSteps | Number of alarm steps. Set to -1 to disable the alarm without triggering the corresponding alarm event. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_FAILED_LOOKUP | if argument alarmIdx is greater than 11 . |
void AERInstanceSetDeactivated | ( | AERInstance * | inst, |
bool | deactivated | ||
) |
Set the deactivation state of an instance.
[in] | inst | Instance of interest. |
[in] | deactivated | Deactivation state. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetDepth | ( | AERInstance * | inst, |
float | depth | ||
) |
Set the render depth of an instance.
[in] | inst | Instance of interest. |
[in] | depth | Render depth. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetFriction | ( | AERInstance * | inst, |
float | friction | ||
) |
Set the friction of an instance.
For more information about friction, see Instance Friction.
[in] | inst | Instance of interest. |
[in] | friction | Friction. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetMask | ( | AERInstance * | inst, |
int32_t | maskIdx | ||
) |
Set the collision mask of an instance.
By default, an instance will use its sprite as its collision mask. In this case, the instance's mask should be set to AER_SPRITE_NULL.
[in] | inst | Instance of interest. |
[in] | maskIdx | Collision mask index. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_FAILED_LOOKUP | if argument maskIdx is an invalid sprite. |
void AERInstanceSetMotion | ( | AERInstance * | inst, |
float | x, | ||
float | y | ||
) |
Set the motion of an instance.
[in] | inst | Instance of interest. |
[in] | x | Horizontal motion. |
[in] | y | Vertical motion. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetPersistent | ( | AERInstance * | inst, |
bool | persistent | ||
) |
Set the persistence of an instance.
[in] | inst | Instance of interest. |
[in] | persistent | Persistence. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetPosition | ( | AERInstance * | inst, |
float | x, | ||
float | y | ||
) |
Set the position of an instance in the current room.
[in] | inst | Instance of interest. |
[in] | x | Horizontal position. |
[in] | y | Vertical position. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetSprite | ( | AERInstance * | inst, |
int32_t | spriteIdx | ||
) |
Set the sprite of an instance.
[in] | inst | Instance of interest. |
[in] | spriteIdx | Sprite index. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_FAILED_LOOKUP | if argument spriteIdx is an invalid sprite. |
void AERInstanceSetSpriteAlpha | ( | AERInstance * | inst, |
float | alpha | ||
) |
Set the sprite alpha (transparency) of an instance.
[in] | inst | Instance of interest. |
[in] | alpha | Sprite alpha. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_BAD_VAL | if argument alpha is less than 0.0f or greater than 1.0f . |
void AERInstanceSetSpriteAngle | ( | AERInstance * | inst, |
float | angle | ||
) |
Set the sprite offset angle of an instance.
[in] | inst | Instance of interest. |
[in] | angle | Sprite offset angle in degrees. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetSpriteBlend | ( | AERInstance * | inst, |
uint32_t | color | ||
) |
Set the sprite blend color of an instance.
[in] | inst | Instance of interest. |
[in] | color | Sprite blend color. See Colors for more information. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetSpriteFrame | ( | AERInstance * | inst, |
float | frame | ||
) |
Set the current frame of sprite animation of an instance.
For more information about the meaning of the sprite frame, see Sprite Animation Frame.
[in] | inst | Instance of interest. |
[in] | frame | Frame of sprite animation. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetSpriteScale | ( | AERInstance * | inst, |
float | x, | ||
float | y | ||
) |
Set the sprite scale of an instance.
[in] | inst | Instance of interest. |
[in] | x | Horizontal scale. |
[in] | y | Vertical scale. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetSpriteSpeed | ( | AERInstance * | inst, |
float | speed | ||
) |
Set the sprite animation speed of an instance.
[in] | inst | Instance of interest. |
[in] | speed | Sprite animation speed. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
AER_BAD_VAL | if argument speed is less than 0.0f . |
void AERInstanceSetTangible | ( | AERInstance * | inst, |
bool | tangible | ||
) |
Set the tangibility of an instance.
For more information about instance tangibility, see Instance Tangibility.
[in] | inst | Instance of interest. |
[in] | tangible | Tangibility. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSetVisible | ( | AERInstance * | inst, |
bool | visible | ||
) |
Set the visibility of an instance.
[in] | inst | Instance of interest. |
[in] | tangible | Visibility. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |
void AERInstanceSyncDepth | ( | AERInstance * | inst | ) |
Set the render depth of an instance based on its position in the current room.
[in] | inst | Instance of interest. |
AER_SEQ_BREAK | if called outside action stage. |
AER_NULL_ARG | if argument inst is NULL . |