Open Game Engine 2D API
 All Functions Variables
Functions
Path

Functions

int OGE_ResetPath (int iSprId, int iStepLength, bool bAutoStepping)
 Reset the path.
int OGE_GetPathNodeIndex (int iSprId)
 Get the index of current node of current path.
int OGE_GetPathStepLength (int iSprId)
 Get the length of the step of current path.
void OGE_SetPathStepLength (int iSprId, int iStepLength)
 Set the length of the step of the path.
int OGE_GetPathStepInterval (int iSprId)
 Get the step interval of current path.
void OGE_SetPathStepInterval (int iSprId, int iStepInterval)
 Set the step interval of the path.
int OGE_GetPathDirection (int iSprId)
 Get the direction of current path.
int OGE_GetPath (string sPathName)
 Get the path by its name.
int OGE_GetPathByCode (int iCode)
 Get the path by code.
void OGE_PathGenLine (int iPathId, int x1, int y1, int x2, int y2)
 Generate a single beeline to fill the nodes of path.
void OGE_PathGenExtLine (int iPathId, int iSrcX, int iSrcY, int iDstX, int iDstY, int iExtraWidth, int iExtraHeight)
 Generate a single beeline path going over the edge of the screen.
int OGE_GetPathNodeCount (int iPathId)
 Get the count of all the nodes of the path.

Function Documentation

int OGE_GetPath ( string  sPathName)

Get the path by its name.

Parameters:
[in]sPathNameThe name of the path
Returns:
The ID of the path
int OGE_GetPathByCode ( int  iCode)

Get the path by code.

Parameters:
[in]iCodeThe code of the path
Returns:
The ID of the path
int OGE_GetPathDirection ( int  iSprId)

Get the direction of current path.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The direction
int OGE_GetPathNodeCount ( int  iPathId)

Get the count of all the nodes of the path.

Parameters:
[in]iPathIdThe ID of the path
Returns:
The count of all the nodes
int OGE_GetPathNodeIndex ( int  iSprId)

Get the index of current node of current path.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The index of current node
int OGE_GetPathStepInterval ( int  iSprId)

Get the step interval of current path.

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

Get the length of the step of current path.

Parameters:
[in]iSprIdThe ID of the sprite
Returns:
The length of the step of the path
void OGE_PathGenExtLine ( int  iPathId,
int  iSrcX,
int  iSrcY,
int  iDstX,
int  iDstY,
int  iExtraWidth,
int  iExtraHeight 
)

Generate a single beeline path going over the edge of the screen.

Parameters:
[in]iPathIdThe ID of the path
[in]iSrcXThe x coordinate of the start point
[in]iSrcYThe y coordinate of the start point
[in]iDstXThe x coordinate of the end point
[in]iDstYThe y coordinate of the end point
[in]iExtraWidthThe width of the area beyond the screen
[in]iExtraHeightThe height of the area beyond the screen
void OGE_PathGenLine ( int  iPathId,
int  x1,
int  y1,
int  x2,
int  y2 
)

Generate a single beeline to fill the nodes of path.

Parameters:
[in]iPathIdThe ID of the path
[in]x1The x coordinate of the start point
[in]y1The y coordinate of the start point
[in]x2The x coordinate of the end point
[in]y2The y coordinate of the end point
int OGE_ResetPath ( int  iSprId,
int  iStepLength,
bool  bAutoStepping 
)

Reset the 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
void OGE_SetPathStepInterval ( int  iSprId,
int  iStepInterval 
)

Set the step interval of the path.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iStepIntervalThe step interval
void OGE_SetPathStepLength ( int  iSprId,
int  iStepLength 
)

Set the length of the step of the path.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iStepLengthThe length of the step of the path