MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
mgdl-main.h
Go to the documentation of this file.
1#pragma once
2
3#include "mgdl-types.h"
4#include "mgdl-controller.h"
5#include <mgdl/mgdl-png.h>
6#include <mgdl/mgdl-texture.h>
7#include <mgdl/mgdl-sound.h>
8#include <mgdl/mgdl-music.h>
9#include <mgdl/mgdl-scene.h>
10#include <mgdl/mgdl-sprite.h>
11
12struct Font;
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
30void mgdl_InitSystem(const char* name,
31 ScreenAspect screenAspect,
32 CallbackFunction initCallback,
33 CallbackFunction frameCallback,
34 CallbackFunction quitCallback,
35 u32 initFlags);
36
37// TODO Move all loading to AssetManager to get memory status and other stats
38PNGFile* mgdl_LoadPNG(const char* filename);
39Texture* mgdl_LoadTexture(const char* filename, TextureFilterModes filterMode);
40Texture* mgdl_LoadTexturePNG(PNGFile* png, TextureFilterModes filterMode);
41
42Sound* mgdl_LoadSound(const char* filename);
43Music* mgdl_LoadOgg(const char* filename);
44Music* mgdl_LoadWav(const char* filename);
45
46Scene* mgdl_LoadFBX(const char* filename);
47Sprite* mgdl_LoadSprite(const char* filename, short spriteWidth, short spriteHeight);
48
49Font* mgdl_LoadFont(const char* filename, short characterWidth, short characterHeight, char firstCharacter);
50Font* mgdl_LoadFontCustom(const char* filename, short characterWidth, short characterHeight, char firstCharacter, short charactersPerRow);
51Font* mgdl_LoadFontSelective(const char* filename, short characterWidth, short characterHeight, short charactersPerRow, const char* characters);
52
53WiiController* mgdl_GetController(int controllerNumber);
54
55// TODO mgdl_GetQuitReason(void) HOME pressed, Error or Window closed
56
57u16 mgdl_GetScreenWidth(void);
58u16 mgdl_GetScreenHeight(void);
59float mgdl_GetAspectRatio(void);
60float mgdl_GetElapsedSeconds(void);
61float mgdl_GetDeltaTime(void);
62u32 mgdl_GetElapsedFrames(void);
63
64void mgdl_DoProgramExit(void);
65
66#ifdef __cplusplus
67}
68#endif
Header for the controller class.
void mgdl_InitSystem(const char *name, ScreenAspect screenAspect, CallbackFunction initCallback, CallbackFunction frameCallback, CallbackFunction quitCallback, u32 initFlags)
Initializes the systems and creates a window.
Definition mgdl-main.cpp:16
Sound module header.
Texture handling module header.
Library types, macros, defines and enums header.
void(* CallbackFunction)(void)
Callback function type needed for platform initializing and rendering.
Definition mgdl-types.h:48
TextureFilterModes
Texture filter modes.
Definition mgdl-types.h:86
Represents a font that can be used to draw text.
Definition mgdl-font.h:16
short characterWidth
Definition mgdl-font.h:17
short characterHeight
Definition mgdl-font.h:18
Definition mgdl-music.h:17
Definition mgdl-png.h:10
Definition mgdl-scene.h:23
Sound handling struct.
Definition mgdl-sound.h:31
Definition mgdl-sprite.h:9
Abstract class for cross platform PNG image loading.
Definition mgdl-texture.h:13
Struct representing the Wii controller.
Definition mgdl-controller.h:41