MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
mgdl-platform.h
1#pragma once
2
3#include "mgdl-types.h"
4#include "mgdl-controller.h"
5
6struct Platform
7{
8 const char* windowName;
9 short screenWidth;
10 short screenHeight;
11 float aspectRatio;
12 ScreenAspect aspect;
13 float _deltaTimeS;
14 float _elapsedTimeS;
15 u32 _elapsedUpdates;
16};
17typedef struct Platform Platform;
18
19// These functions are implemented in pc-platform.cpp or wii-platform.cpp
20#ifdef __cplusplus
21extern "C"
22{
23#endif
24
25void Platform_Init(const char* windowName,
26 ScreenAspect screenAspect,
27 CallbackFunction initCallback,
28 CallbackFunction frameCallback,
29 CallbackFunction quitCallback,
30 u32 initFlags);
31
32struct WiiController* Platform_GetController(int controllerNumber);
33void Platform_DoProgramExit(void);
34
35struct Platform* Platform_GetSingleton(void);
36float Platform_GetDeltaTime(void);
37float Platform_GetElapsedSeconds(void);
38u32 Platform_GetElapsedUpdates(void);
39
40#ifdef __cplusplus
41}
42#endif
Header for the controller class.
Library types, macros, defines and enums header.
void(* CallbackFunction)(void)
Callback function type needed for platform initializing and rendering.
Definition mgdl-types.h:48
Definition mgdl-platform.h:7
Struct representing the Wii controller.
Definition mgdl-controller.h:41