Open Game Engine 2D API
 All Functions Variables
Functions
Screen

Functions

void OGE_Screenshot ()
 Take a screenshot.
int OGE_GetLastScreenshot ()
 Get the image ID of the last screenshot.
int OGE_GetScreenImage ()
 Get the image ID of current game screen.
void OGE_ShowFPS (bool bShow)
 Show or hide FPS.
void OGE_LockFPS (int iFPS)
 Lock FPS.
int OGE_GetFPS ()
 Get current FPS.
int OGE_GetLockedFPS ()
 Get the FPS value you want to lock.
void OGE_ShowMousePos (bool bShow)
 Show or hide mouse position on the screen.
void OGE_SetDirtyRectMode (bool bValue)
 Set dirty rect mode or not.
void OGE_Scroll (int iIncX, int iIncY)
 Scroll the screen.
void OGE_SetViewPos (int iLeft, int iTop)
 Set the position of the viewport.
int OGE_GetViewPosX ()
 Get the x coordinate of the viewport position.
int OGE_GetViewPosY ()
 Get the y coordinate of the viewport position.
int OGE_GetViewWidth ()
 Get the width of the viewport.
int OGE_GetViewHeight ()
 Get the height of the viewport.
void OGE_StopAutoScroll ()
 Stop auto-scrolling screen.
void OGE_StartAutoScroll (int iStepX, int iStepY, int iInterval, bool bLoop)
 Start to auto-scroll screen.
void OGE_SetAutoScrollSpeed (int iStepX, int iStepY, int iInterval)
 Set the speed of scrolling the screen.
void OGE_SetScrollTarget (int iTargetX, int iTargetY)
 Set the target position for the auto-scrolling.
void OGE_ShowMouseCursor (bool bShow)
 Show or hide the system mouse cursor on the screen.
bool OGE_GetFullScreen ()
 Check if the game is in fullscreen mode or not.
void OGE_SetFullScreen (bool bValue)
 Set window mode or fullscreen mode for current game.

Function Documentation

int OGE_GetFPS ( )

Get current FPS.

Returns:
Current FPS

Check if the game is in fullscreen mode or not.

Returns:
Returns true if game is in fullscreen mode

Get the image ID of the last screenshot.

Returns:
The image ID of the screenshot

Get the FPS value you want to lock.

Returns:
The FPS value you want to lock

Get the image ID of current game screen.

Returns:
The image ID of game screen

Get the height of the viewport.

Returns:
The height of the viewport
int OGE_GetViewPosX ( )

Get the x coordinate of the viewport position.

Returns:
The x coordinate of the viewport position
int OGE_GetViewPosY ( )

Get the y coordinate of the viewport position.

Returns:
The y coordinate of the viewport position

Get the width of the viewport.

Returns:
The width of the viewport
void OGE_LockFPS ( int  iFPS)

Lock FPS.

Parameters:
[in]iFPSThe FPS value you want to lock
void OGE_Scroll ( int  iIncX,
int  iIncY 
)

Scroll the screen.

Parameters:
[in]iIncXThe x-coordinate offset value of the scrolling
[in]iIncYThe y-coordinate offset value of the scrolling
void OGE_SetAutoScrollSpeed ( int  iStepX,
int  iStepY,
int  iInterval 
)

Set the speed of scrolling the screen.

Parameters:
[in]iStepXThe x-coordinate offset of every step
[in]iStepYThe y-coordinate offset of every step
[in]iIntervalThe interval between two steps
void OGE_SetDirtyRectMode ( bool  bValue)

Set dirty rect mode or not.

Parameters:
[in]bValueIf true then use dirty rect mode
void OGE_SetFullScreen ( bool  bValue)

Set window mode or fullscreen mode for current game.

Parameters:
[in]bValueEnable fullscreen mode or not
void OGE_SetScrollTarget ( int  iTargetX,
int  iTargetY 
)

Set the target position for the auto-scrolling.

Parameters:
[in]iTargetXThe x coordinate of the target position
[in]iTargetYThe y coordinate of the target position
void OGE_SetViewPos ( int  iLeft,
int  iTop 
)

Set the position of the viewport.

Parameters:
[in]iLeftThe x coordinate of the viewport position
[in]iTopThe y coordinate of the viewport position
void OGE_ShowFPS ( bool  bShow)

Show or hide FPS.

Parameters:
[in]bShowIf it is true then show FPS else hide FPS
void OGE_ShowMouseCursor ( bool  bShow)

Show or hide the system mouse cursor on the screen.

Parameters:
[in]bShowIf true then show it else hide it
void OGE_ShowMousePos ( bool  bShow)

Show or hide mouse position on the screen.

Parameters:
[in]bShowIf true then show the position else hide it
void OGE_StartAutoScroll ( int  iStepX,
int  iStepY,
int  iInterval,
bool  bLoop 
)

Start to auto-scroll screen.

Parameters:
[in]iStepXThe x-coordinate offset value of every scroll step
[in]iStepYThe y-coordinate offset value of every scroll step
[in]iIntervalInterval between two steps
[in]bLoopIf true then the scrolling will restart when reaching the end