Open Game Engine 2D API
 All Functions Variables
Functions | Variables
Sprite

Functions

int OGE_GetSprCurrentScene (int iSprId)
 Get current scene of the sprite.
int OGE_GetSprCurrentGroup (int iSprId)
 Get current group of the sprite.
int OGE_GetSpr ()
 Get current sprite.
string OGE_GetSprName (int iSprId)
 Get the name of the sprite.
void OGE_CallBaseEvent ()
 Call the same event of the base class of current sprite.
bool OGE_GetSprActive (int iSprId)
 Check if the sprite is active or not.
void OGE_SetSprActive (int iSprId, bool bValue)
 Set the sprite to be active or deactive.
bool OGE_GetSprVisible (int iSprId)
 Check if the sprite is visible or not.
void OGE_SetSprVisible (int iSprId, bool bValue)
 Set the sprite to be visible or invisible.
bool OGE_GetSprCollide (int iSprId)
 Check if the sprite has collision detection or not.
void OGE_SetSprCollide (int iSprId, bool bValue)
 Set the sprite to get or give up collision detection.
bool OGE_GetSprInput (int iSprId)
 Check if the sprite can accept the input from the player.
void OGE_SetSprInput (int iSprId, bool bValue)
 Set the sprite to be able to accept input or not.
bool OGE_GetSprDrag (int iSprId)
 Check if the sprite can be dragged or not.
void OGE_SetSprDrag (int iSprId, bool bValue)
 Set the sprite to be able to accept dragging or not.
bool OGE_GetSprBusy (int iSprId)
 Check if the sprite is busy or not.
void OGE_SetSprBusy (int iSprId, bool bValue)
 Set the sprite to be busy or not.
bool OGE_GetSprDefaultDraw (int iSprId)
 Check if the sprite is drawn in the default way or not.
void OGE_SetSprDefaultDraw (int iSprId, bool bValue)
 Set the sprite to use the default drawing way or not.
int OGE_GetSprLightMap (int iSprId)
 Get the light map of the sprite.
void OGE_SetSprLightMap (int iSprId, int iImageId)
 Set the light map of the sprite.
int OGE_GetCollidedSpr (int iSprId)
 Get current collided sprite.
int OGE_GetSprPlot (int iSprId)
 Get the plot sprite of current sprite.
void OGE_SetSprPlot (int iSprId, int iPlotSprId)
 Bind a plot sprite to current sprite.
int OGE_GetSprMaster (int iSprId)
 Get the master sprite of current sprite.
void OGE_SetSprMaster (int iSprId, int iMasterSprId)
 Set the master sprite of current sprite.
int OGE_GetReplacedSpr (int iSprId)
 Get the replaceable sprite of current sprite.
void OGE_SetReplacedSpr (int iSprId, int iReplacedSprId)
 Set the replaceable sprite of current sprite.
int OGE_GetSprParent (int iSprId)
 Get the parent sprite of current sprite.
int OGE_SetSprParent (int iSprId, int iParentId, int iClientX, int iClientY)
 Set the parent sprite of current sprite.
int OGE_GetRelatedSpr (int iSprId, int idx)
 Get the related sprite of current sprite.
void OGE_SetRelatedSpr (int iSprId, int iRelatedSprId, int idx)
 Set the related sprite of current sprite.
int OGE_GetRelatedGroup (int iSprId, int idx)
 Get the related group of current sprite.
void OGE_SetRelatedGroup (int iSprId, int iRelatedGroupId, int idx)
 Set the related group of current sprite.
int OGE_GetSprTileList (int iSprId)
 Get the tile list of current sprite.
void OGE_PushEvent (int iSprId, int iCustomEventId)
 Fire a custom event of current sprite.
int OGE_GetSprCurrentImage (int iSprId)
 Get current image of current sprite.
int OGE_SetSprImage (int iSprId, int iImageId)
 Set the image of current sprite.
int OGE_GetSprAnimationImg (int iSprId, int iDir, int iAct)
 Get the image of some animation of current sprite.
bool OGE_SetSprAnimationImg (int iSprId, int iDir, int iAct, int iImageId)
 Set the image of some animation of current sprite.
void OGE_MoveX (int iSprId, int iIncX)
 Move the sprite in x axis direction.
void OGE_MoveY (int iSprId, int iIncY)
 Move the sprite in y axis direction.
int OGE_SetDirection (int iSprId, int iDir)
 Set the direction of current sprite.
int OGE_SetAction (int iSprId, int iAct)
 Set the action of current sprite.
int OGE_SetAnimation (int iSprId, int iDir, int iAct)
 Set the animation of current sprite.
void OGE_ResetAnimation (int iSprId)
 Reset current animation, set its current frame to be the first frame.
void OGE_DrawSpr (int iSprId)
 Draw the sprite manually.
int OGE_GetPosX (int iSprId)
 Get the x coordinate of the position of the sprite.
int OGE_GetPosY (int iSprId)
 Get the y coordinate of the position of the sprite.
int OGE_GetPosZ (int iSprId)
 Get the z coordinate of the position of the sprite.
void OGE_SetPosXYZ (int iSprId, int iPosX, int iPosY, int iPosZ)
 Set the complete position of the sprite.
void OGE_SetPos (int iSprId, int iPosX, int iPosY)
 Set the plane position of the sprite.
void OGE_SetPosZ (int iSprId, int iPosZ)
 Set the z coordinate of the position of the sprite.
void OGE_SetRelPos (int iSprId, int iRelativeX, int iRelativeY)
 Set the relative position of the sprite.
int OGE_GetRelPosX (int iSprId)
 Get the x coordinate of the relative position of the sprite.
int OGE_GetRelPosY (int iSprId)
 Get the y coordinate of the relative position of the sprite.
bool OGE_GetRelMode (int iSprId)
 Check if the sprite is using relative position.
void OGE_SetRelMode (int iSprId, bool bEnable)
 Enable or disable the relative position of the sprite.
int OGE_GetSprRootX (int iSprId)
 Get the x coordinate of the origin of the sprite.
int OGE_GetSprRootY (int iSprId)
 Get the y coordinate of the origin of the sprite.
int OGE_GetSprWidth (int iSprId)
 Get the width of the sprite.
int OGE_GetSprHeight (int iSprId)
 Get the height of the sprite.
void OGE_SetSprDefaultRoot (int iSprId, int iRootX, int iRootY)
 Set the default position of the origin of the sprite.
void OGE_SetSprDefaultSize (int iSprId, int iWidth, int iHeight)
 Set the default size of the sprite.
int OGE_GetDirection (int iSprId)
 Get current direction of the sprite.
int OGE_GetAction (int iSprId)
 Get current action of the sprite.
int OGE_GetSprType (int iSprId)
 Get the sprite type.
int OGE_GetSprClassTag (int iSprId)
 Get the class tag of the sprite.
int OGE_GetSprTag (int iSprId)
 Get the tag of the sprite.
void OGE_SetSprTag (int iSprId, int iTag)
 Set the tag of the sprite.
int OGE_GetSprChildCount (int iSprId)
 Get the count of the children of the sprite.
int OGE_GetSprChildByIndex (int iSprId, int iIndex)
 Get the child of the sprite by index.
int OGE_AddEffect (int iSprId, int iEffectType, double fEffectValue)
 Attach an effect onto a sprite.
int OGE_AddEffectEx (int iSprId, int iEffectType, double fStart, double fEnd, double fIncrement, int iStepInterval, int iRepeat)
 Attach a gradient effect onto a sprite.
int OGE_RemoveEffect (int iSprId, int iEffectType)
 Remove effect from the sprite.
bool OGE_HasEffect (int iSprId, int iEffectType)
 Check if the sprite has the effect or not.
bool OGE_IsEffectCompleted (int iSprId, int iEffectType)
 Check if the effect is completed or not.
double OGE_GetEffectValue (int iSprId, int iEffectType)
 Get value of an effect on a sprite.
double OGE_GetEffectIncrement (int iSprId, int iEffectType)
 Get the increment value of an effect on a sprite.
int OGE_GetLocalPath (int iSprId)
 Get the local path of the sprite.
int OGE_UsePath (int iSprId, int iPathId, int iStepLength, bool bAutoStepping)
 Make the sprite to use some path.
int OGE_UseLocalPath (int iSprId, int iStepLength, bool bAutoStepping)
 Make the sprite to use its local path.
int OGE_NextPathStep (int iSprId)
 Let the sprite jump to next step of the path.
void OGE_AbortPath (int iSprId)
 Let the sprite give up current path.
int OGE_GetValidPathNodeCount (int iSprId)
 Get the count of the valid nodes in current path.
void OGE_SetValidPathNodeCount (int iSprId, int iStepCount)
 Set the count of the valid nodes in current path.
bool OGE_OpenTimer (int iSprId, int iInterval)
 Open the timer of the sprite.
void OGE_CloseTimer (int iSprId)
 Close the timer of the sprite.
int OGE_GetTimerInterval (int iSprId)
 Get the interval of the timer of the sprite.
bool OGE_IsTimerWaiting (int iSprId)
 Check if the timer of the sprite is working or not.
void OGE_SetScenePlot (int iSprId)
 Set the plot sprite of current scene.
void OGE_PlayPlot (int iSprId, int iLoopTimes)
 Let the plot sprite play the plot in loops.
void OGE_OpenPlot (int iSprId)
 Let the plot sprite start to play the plot.
void OGE_ClosePlot (int iSprId)
 Let the plot sprite close the plot.
void OGE_PausePlot (int iSprId)
 Let the plot sprite pause the plot.
void OGE_ResumePlot (int iSprId)
 Let the plot sprite resume the plot.
bool OGE_IsPlayingPlot (int iSprId)
 Check if the plot sprite is playing the plot.
int OGE_GetPlotTriggerFlag (int iSprId, int iEventCode)
 Get the plot trigger flag of the plot sprite.
void OGE_SetPlotTriggerFlag (int iSprId, int iEventCode, int iFlag)
 Set the plot trigger flag of the plot sprite.
int OGE_GetSprGameData (int iSprId)
 Get the game data of the sprite.
int OGE_GetSprCustomData (int iSprId)
 Get the custom data of the sprite.
void OGE_SetSprCustomData (int iSprId, int iGameDataId, bool bOwnIt)
 Set the custom data of the sprite.

Variables

 OGE_GetCurrentPath
 Get the path which is used by the sprite currently.

Function Documentation

void OGE_AbortPath ( int  iSprId)

Let the sprite give up current path.

Parameters:
[in]iSprIdThe ID of the sprite
int OGE_AddEffect ( int  iSprId,
int  iEffectType,
double  fEffectValue 
)

Attach an effect onto a sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iEffectTypeThe effect type
[in]fEffectValueThe effect value
Returns:
Returns a number greater than zero if it succeeds
int OGE_AddEffectEx ( int  iSprId,
int  iEffectType,
double  fStart,
double  fEnd,
double  fIncrement,
int  iStepInterval,
int  iRepeat 
)

Attach a gradient effect onto a sprite.

Parameters:
[in]iSprIdThe ID of the Sprite
[in]iEffectTypeThe effect type
[in]fStartThe start effect value
[in]fEndThe target effect value
[in]fIncrementThe increment of effect value
[in]iStepIntervalThe interval between every two steps
[in]iRepeatRepeat times
Returns:
Returns a number greater than zero if it succeeds
void OGE_ClosePlot ( int  iSprId)

Let the plot sprite close the plot.

Parameters:
[in]iSprIdThe ID of the plot sprite
void OGE_CloseTimer ( int  iSprId)

Close the timer of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
void OGE_DrawSpr ( int  iSprId)

Draw the sprite manually.

Parameters:
[in]iSprIdThe ID of the sprite
int OGE_GetAction ( int  iSprId)

Get current action of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Current action of the sprite
int OGE_GetCollidedSpr ( int  iSprId)

Get current collided sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the collided sprite
int OGE_GetDirection ( int  iSprId)

Get current direction of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The direction
double OGE_GetEffectIncrement ( int  iSprId,
int  iEffectType 
)

Get the increment value of an effect on a sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iEffectTypeThe effect type
Returns:
The increment value of the effect
double OGE_GetEffectValue ( int  iSprId,
int  iEffectType 
)

Get value of an effect on a sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iEffectTypeThe effect type
Returns:
The effect value
int OGE_GetLocalPath ( int  iSprId)

Get the local path of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the path
int OGE_GetPlotTriggerFlag ( int  iSprId,
int  iEventCode 
)

Get the plot trigger flag of the plot sprite.

Parameters:
[in]iSprIdThe ID of the plot sprite
[in]iEventCodeThe code of the event bound to the trigger
Returns:
The flag of the trigger
int OGE_GetPosX ( int  iSprId)

Get the x coordinate of the position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The x coordinate
int OGE_GetPosY ( int  iSprId)

Get the y coordinate of the position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The y coordinate
int OGE_GetPosZ ( int  iSprId)

Get the z coordinate of the position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The z coordinate
int OGE_GetRelatedGroup ( int  iSprId,
int  idx 
)

Get the related group of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]idxThe index of the related group
Returns:
The ID of the related group
int OGE_GetRelatedSpr ( int  iSprId,
int  idx 
)

Get the related sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]idxThe index of the related sprite
Returns:
The ID of the related sprite
bool OGE_GetRelMode ( int  iSprId)

Check if the sprite is using relative position.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite is using relative position
int OGE_GetRelPosX ( int  iSprId)

Get the x coordinate of the relative position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The x coordinate of the relative position
int OGE_GetRelPosY ( int  iSprId)

Get the y coordinate of the relative position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The y coordinate of the relative position
int OGE_GetReplacedSpr ( int  iSprId)

Get the replaceable sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
Returns:
The ID of the replaceable sprite
int OGE_GetSpr ( )

Get current sprite.

Returns:
The ID of the sprite
bool OGE_GetSprActive ( int  iSprId)

Check if the sprite is active or not.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite is active
int OGE_GetSprAnimationImg ( int  iSprId,
int  iDir,
int  iAct 
)

Get the image of some animation of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iDirThe direction of the sprite
[in]iActThe action of the sprite
Returns:
The ID of the image
bool OGE_GetSprBusy ( int  iSprId)

Check if the sprite is busy or not.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite is busy
int OGE_GetSprChildByIndex ( int  iSprId,
int  iIndex 
)

Get the child of the sprite by index.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iIndexThe index
Returns:
The ID of the child sprite
int OGE_GetSprChildCount ( int  iSprId)

Get the count of the children of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The count of the children
int OGE_GetSprClassTag ( int  iSprId)

Get the class tag of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The class tag of the sprite
bool OGE_GetSprCollide ( int  iSprId)

Check if the sprite has collision detection or not.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite has collision detection
int OGE_GetSprCurrentGroup ( int  iSprId)

Get current group of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the group
int OGE_GetSprCurrentImage ( int  iSprId)

Get current image of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
Returns:
The ID of current image
int OGE_GetSprCurrentScene ( int  iSprId)

Get current scene of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the scene
int OGE_GetSprCustomData ( int  iSprId)

Get the custom data of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the data
bool OGE_GetSprDefaultDraw ( int  iSprId)

Check if the sprite is drawn in the default way or not.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite is drawn in the default way
bool OGE_GetSprDrag ( int  iSprId)

Check if the sprite can be dragged or not.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite can be dragged
int OGE_GetSprGameData ( int  iSprId)

Get the game data of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the data
int OGE_GetSprHeight ( int  iSprId)

Get the height of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The height of the sprite
bool OGE_GetSprInput ( int  iSprId)

Check if the sprite can accept the input from the player.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the sprite can accept input
int OGE_GetSprLightMap ( int  iSprId)

Get the light map of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The ID of the image of the light map
int OGE_GetSprMaster ( int  iSprId)

Get the master sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
Returns:
The ID of the master sprite
string OGE_GetSprName ( int  iSprId)

Get the name of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The name of the sprite
int OGE_GetSprParent ( int  iSprId)

Get the parent sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
Returns:
The ID of the parent sprite
int OGE_GetSprPlot ( int  iSprId)

Get the plot sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
Returns:
The ID of the plot sprite
int OGE_GetSprRootX ( int  iSprId)

Get the x coordinate of the origin of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The x coordinate of the origin
int OGE_GetSprRootY ( int  iSprId)

Get the y coordinate of the origin of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The y coordinate of the origin
int OGE_GetSprTag ( int  iSprId)

Get the tag of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The tag of the sprite
int OGE_GetSprTileList ( int  iSprId)

Get the tile list of current sprite.

Parameters:
[in]iSprIdThe ID of currrent sprite
Returns:
The ID of the tile list
int OGE_GetSprType ( int  iSprId)

Get the sprite type.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The type of the sprite
bool OGE_GetSprVisible ( int  iSprId)

Check if the sprite is visible or not.

Parameters:
[in]iSprIdThe ID of the Sprite
Returns:
Returns true if the sprite is visible
int OGE_GetSprWidth ( int  iSprId)

Get the width of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The width of the sprite
int OGE_GetTimerInterval ( int  iSprId)

Get the interval of the timer of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The interval of the timer
int OGE_GetValidPathNodeCount ( int  iSprId)

Get the count of the valid nodes in current path.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The count of the valid nodes
bool OGE_HasEffect ( int  iSprId,
int  iEffectType 
)

Check if the sprite has the effect or not.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iEffectTypeThe effect type
Returns:
Returns true if the sprite has the effect
bool OGE_IsEffectCompleted ( int  iSprId,
int  iEffectType 
)

Check if the effect is completed or not.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iEffectTypeThe effect type
Returns:
Returns true if the effect is completed
bool OGE_IsPlayingPlot ( int  iSprId)

Check if the plot sprite is playing the plot.

Parameters:
[in]iSprIdThe ID of the plot sprite
Returns:
Returns true if the plot sprite is playing the plot
bool OGE_IsTimerWaiting ( int  iSprId)

Check if the timer of the sprite is working or not.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
Returns true if the timer is working
void OGE_MoveX ( int  iSprId,
int  iIncX 
)

Move the sprite in x axis direction.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iIncXThe motion offset
void OGE_MoveY ( int  iSprId,
int  iIncY 
)

Move the sprite in y axis direction.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iIncYThe motion offset
int OGE_NextPathStep ( int  iSprId)

Let the sprite jump to next step of the path.

Parameters:
[in]iSprIdThe ID of the sprite who is using the path
Returns:
Return the index of current node of the path
void OGE_OpenPlot ( int  iSprId)

Let the plot sprite start to play the plot.

Parameters:
[in]iSprIdThe ID of the plot sprite
bool OGE_OpenTimer ( int  iSprId,
int  iInterval 
)

Open the timer of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iIntervalThe interval of the timer
Returns:
Returns true if succeed
void OGE_PausePlot ( int  iSprId)

Let the plot sprite pause the plot.

Parameters:
[in]iSprIdThe ID of the plot sprite
void OGE_PlayPlot ( int  iSprId,
int  iLoopTimes 
)

Let the plot sprite play the plot in loops.

Parameters:
[in]iSprIdThe ID of the plot sprite
[in]iLoopTimesHow many rounds the plot will be played
void OGE_PushEvent ( int  iSprId,
int  iCustomEventId 
)

Fire a custom event of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iCustomEventIdThe ID of the custom event
int OGE_RemoveEffect ( int  iSprId,
int  iEffectType 
)

Remove effect from the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iEffectTypeThe effect type
Returns:
Return the count of the effects left
void OGE_ResetAnimation ( int  iSprId)

Reset current animation, set its current frame to be the first frame.

Parameters:
[in]iSprIdThe ID of the sprite
void OGE_ResumePlot ( int  iSprId)

Let the plot sprite resume the plot.

Parameters:
[in]iSprIdThe ID of the plot sprite
int OGE_SetAction ( int  iSprId,
int  iAct 
)

Set the action of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iActThe action
Returns:
Current action of the sprite
int OGE_SetAnimation ( int  iSprId,
int  iDir,
int  iAct 
)

Set the animation of current sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iDirThe direction
[in]iActThe action
Returns:
Returns a number greater than zero if it succeeds
int OGE_SetDirection ( int  iSprId,
int  iDir 
)

Set the direction of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iDirThe direction
Returns:
Current direction of the sprite
void OGE_SetPlotTriggerFlag ( int  iSprId,
int  iEventCode,
int  iFlag 
)

Set the plot trigger flag of the plot sprite.

Parameters:
[in]iSprIdThe ID of the plot sprite
[in]iEventCodeThe code of the event bound to the trigger
[in]iFlagThe trigger flag
void OGE_SetPos ( int  iSprId,
int  iPosX,
int  iPosY 
)

Set the plane position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iPosXThe x coordinate of the position
[in]iPosYThe y coordinate of the position
void OGE_SetPosXYZ ( int  iSprId,
int  iPosX,
int  iPosY,
int  iPosZ 
)

Set the complete position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iPosXThe x coordinate of the position
[in]iPosYThe y coordinate of the position
[in]iPosZThe z coordinate of the position
void OGE_SetPosZ ( int  iSprId,
int  iPosZ 
)

Set the z coordinate of the position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iPosZThe z coordinate of the position
void OGE_SetRelatedGroup ( int  iSprId,
int  iRelatedGroupId,
int  idx 
)

Set the related group of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iRelatedGroupIdThe ID of the related group
[in]idxThe index of the related group
void OGE_SetRelatedSpr ( int  iSprId,
int  iRelatedSprId,
int  idx 
)

Set the related sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iRelatedSprIdThe ID of the related sprite
[in]idxThe index of the related sprite
void OGE_SetRelMode ( int  iSprId,
bool  bEnable 
)

Enable or disable the relative position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bEnableEnable or disable the relative position
void OGE_SetRelPos ( int  iSprId,
int  iRelativeX,
int  iRelativeY 
)

Set the relative position of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iRelativeXThe x coordinate of the relative position
[in]iRelativeYThe y coordinate of the relative position
void OGE_SetReplacedSpr ( int  iSprId,
int  iReplacedSprId 
)

Set the replaceable sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iReplacedSprIdThe ID of the replaceable sprite
void OGE_SetScenePlot ( int  iSprId)

Set the plot sprite of current scene.

Parameters:
[in]iSprIdThe ID of the plot sprite
void OGE_SetSprActive ( int  iSprId,
bool  bValue 
)

Set the sprite to be active or deactive.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueActive or not
bool OGE_SetSprAnimationImg ( int  iSprId,
int  iDir,
int  iAct,
int  iImageId 
)

Set the image of some animation of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iDirWhich direction does the animation bind to
[in]iActWhich action does the animation bind to
[in]iImageIdThe ID of the image
Returns:
Returns true if it succeeds
void OGE_SetSprBusy ( int  iSprId,
bool  bValue 
)

Set the sprite to be busy or not.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueBe busy or not
void OGE_SetSprCollide ( int  iSprId,
bool  bValue 
)

Set the sprite to get or give up collision detection.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueGet or give up collision detection
void OGE_SetSprCustomData ( int  iSprId,
int  iGameDataId,
bool  bOwnIt 
)

Set the custom data of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iGameDataIdThe ID of the data
[in]bOwnItLet the sprite own the data or not
void OGE_SetSprDefaultDraw ( int  iSprId,
bool  bValue 
)

Set the sprite to use the default drawing way or not.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueUse the default drawing way or not
void OGE_SetSprDefaultRoot ( int  iSprId,
int  iRootX,
int  iRootY 
)

Set the default position of the origin of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iRootXThe x coordinate of the default origin position
[in]iRootYThe y coordinate of the default origin position
void OGE_SetSprDefaultSize ( int  iSprId,
int  iWidth,
int  iHeight 
)

Set the default size of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iWidthThe default width of the sprite
[in]iHeightThe default height of the sprite
void OGE_SetSprDrag ( int  iSprId,
bool  bValue 
)

Set the sprite to be able to accept dragging or not.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueBe able to accept dragging or not
int OGE_SetSprImage ( int  iSprId,
int  iImageId 
)

Set the image of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iImageIdThe ID of the image
Returns:
Returns a number greater than zero if it succeeds
void OGE_SetSprInput ( int  iSprId,
bool  bValue 
)

Set the sprite to be able to accept input or not.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueBe able to accept input or not
void OGE_SetSprLightMap ( int  iSprId,
int  iImageId 
)

Set the light map of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iImageIdThe image ID of the light map
void OGE_SetSprMaster ( int  iSprId,
int  iMasterSprId 
)

Set the master sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iMasterSprIdThe ID of the master sprite
int OGE_SetSprParent ( int  iSprId,
int  iParentId,
int  iClientX,
int  iClientY 
)

Set the parent sprite of current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iParentIdThe ID of the parent sprite
[in]iClientXThe x coordinate relative to the parent
[in]iClientYThe y coordinate relative to the parent
Returns:
Returns 1 if it succeeds
void OGE_SetSprPlot ( int  iSprId,
int  iPlotSprId 
)

Bind a plot sprite to current sprite.

Parameters:
[in]iSprIdThe ID of current sprite
[in]iPlotSprIdThe ID of the plot sprite
void OGE_SetSprTag ( int  iSprId,
int  iTag 
)

Set the tag of the sprite.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iTagThe tag
void OGE_SetSprVisible ( int  iSprId,
bool  bValue 
)

Set the sprite to be visible or invisible.

Parameters:
[in]iSprIdThe ID of the sprite
[in]bValueVisible or invisible
void OGE_SetValidPathNodeCount ( int  iSprId,
int  iStepCount 
)

Set the count of the valid nodes in current path.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iStepCountThe count of the valid nodes
int OGE_UseLocalPath ( int  iSprId,
int  iStepLength,
bool  bAutoStepping 
)

Make the sprite to use its local path.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iStepLengthThe length of the step
[in]bAutoSteppingAllow auto stepping or not
Returns:
Return zero if it succeeds
int OGE_UsePath ( int  iSprId,
int  iPathId,
int  iStepLength,
bool  bAutoStepping 
)

Make the sprite to use some path.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iPathIdThe ID of the path
[in]iStepLengthThe length of the step
[in]bAutoSteppingAllow auto stepping or not
Returns:
Return zero if it succeeds

Variable Documentation

Get the path which is used by the sprite currently.

Returns:
The ID of the path