SDLGameEngine

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

Data Fields

# SGEGAMESTATE Struct Reference
SgeGameState

`#include <sgegamestate.h>`

## Data Fields
SGEGAMESTATEMANAGER * | manager
| A pointer to the current game state manager (only for information, set automatically)
void * | data
| A pointer to your data.
void(* | onRedraw )(struct _SGEGAMESTATE *state)
| A function pointer to the states redraw function.
int(* | onKeyDown )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states key down handler
int(* | onKeyUp )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states key up handler
int(* | onJoystickButtonDown )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states joystick button down handler
int(* | onJoystickButtonUp )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states joystick button up handler
void(* | onJoystickMove )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states joystick move handler
void(* | onMouseDown )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states mouse button down handler
void(* | onMouseUp )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states mouse button up handler
void(* | onMouseMove )(struct _SGEGAMESTATE *state, SGEEVENT *event)
| (optional) A function pointer to the states mouse move handler
int(* | onStateChange )(struct _SGEGAMESTATE *state, struct _SGEGAMESTATE *previous)
| (optional) A function pointer to a state change handler

## Detailed Description

A collection of data and callback functions of a certain game state. You may want to split your game into several states, for example intro, main menu, options menu, game, ...

Definition at line 55 of file sgegamestate.h.

The documentation for this struct was generated from the following file:

- include/sgegamestate.h

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines