- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

# JGE Class Reference

`#include <JGE.h>`

Collaboration diagram for JGE:

List of all members.

## Public Member Functions
int | GetTime (void)
float | GetDelta ()
float | GetFPS ()
bool | GetButtonState (u32 button)
bool | GetButtonClick (u32 button)
u8 | GetAnalogX ()
u8 | GetAnalogY ()
bool | IsDone ()
void | SetApp (JApp *app)
void | printf (const char *format,...)
## Static Public Member Functions
static JGE * | GetInstance ()

## Detailed Description

Game engine main interface.

## Member Function Documentation

static JGE* JGE::GetInstance | ( |  | ) | `[static]`

Get JGE instance.

Returns:
  JGE instance.

int JGE::GetTime | ( | void |  | ) |

Return system timer in milliseconds.

Returns:
  System time in milliseconds.

float JGE::GetDelta | ( |  | ) |

Return elapsed time since last frame update.

Returns:
  Elapsed time in seconds.

float JGE::GetFPS | ( |  | ) |

Return frame rate.

Note:
  This is just 1.0f/GetDelat().

Returns:
  Number of frames per second.

bool JGE::GetButtonState | ( | u32 | button | ) |

Check the current state of a button.

Parameters:

  | button | - Button id.

Returns:
  Button state.

bool JGE::GetButtonClick | ( | u32 | button | ) |

Check if a button is down the first time.

Parameters:

  | button | - Button id.

Returns:
  Button state.

u8 JGE::GetAnalogX | ( |  | ) |

Get x value of the analog pad.

Returns:
  X value (0 to 255).

u8 JGE::GetAnalogY | ( |  | ) |

Get y value of the analog pad.

Returns:
  Y value (0 to 255).

bool JGE::IsDone | ( |  | ) | `[inline]`

Get if the system is ended or not.

Returns:
  Status of the system.

void JGE::SetApp | ( | JApp * | app | ) |

Set the user's core application class.

Parameters:

  | app | - User defined application class.

void JGE::printf | ( | const char * | format,
|  |  | ... |
| ) |  |  |

Print debug message.