MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
Functions
mgdl-main.h File Reference

Main library module header. More...

#include "mgdl-types.h"
#include "mgdl-controller.h"
#include <mgdl/mgdl-png.h>
#include <mgdl/mgdl-texture.h>
#include <mgdl/mgdl-sound.h>
#include <mgdl/mgdl-music.h>
#include <mgdl/mgdl-scene.h>
#include <mgdl/mgdl-sprite.h>

Go to the source code of this file.

Functions

void mgdl_InitSystem (const char *name, ScreenAspect screenAspect, CallbackFunction initCallback, CallbackFunction frameCallback, CallbackFunction quitCallback, u32 initFlags)
 Initializes the systems and creates a window.
 
PNGFilemgdl_LoadPNG (const char *filename)
 
Texturemgdl_LoadTexture (const char *filename, TextureFilterModes filterMode)
 
Texturemgdl_LoadTexturePNG (PNGFile *png, TextureFilterModes filterMode)
 
Soundmgdl_LoadSound (const char *filename)
 
Musicmgdl_LoadOgg (const char *filename)
 
Musicmgdl_LoadWav (const char *filename)
 
Scenemgdl_LoadFBX (const char *filename)
 
Spritemgdl_LoadSprite (const char *filename, short spriteWidth, short spriteHeight)
 
Fontmgdl_LoadFont (const char *filename, short characterWidth, short characterHeight, char firstCharacter)
 
Fontmgdl_LoadFontCustom (const char *filename, short characterWidth, short characterHeight, char firstCharacter, short charactersPerRow)
 
Fontmgdl_LoadFontSelective (const char *filename, short characterWidth, short characterHeight, short charactersPerRow, const char *characters)
 
WiiControllermgdl_GetController (int controllerNumber)
 
u16 mgdl_GetScreenWidth (void)
 
u16 mgdl_GetScreenHeight (void)
 
float mgdl_GetAspectRatio (void)
 
float mgdl_GetElapsedSeconds (void)
 
float mgdl_GetDeltaTime (void)
 
u32 mgdl_GetElapsedFrames (void)
 
void mgdl_DoProgramExit (void)
 

Detailed Description

Main library module header.

Function Documentation

◆ mgdl_InitSystem()

void mgdl_InitSystem ( const char *  name,
ScreenAspect  screenAspect,
CallbackFunction  initCallback,
CallbackFunction  frameCallback,
CallbackFunction  quitCallback,
u32  initFlags 
)

Initializes the systems and creates a window.

Call this function to open the window and start the main loop. Don't call other mgdl functions before this except SetSplashScreenColors and SetSplashScreenDuration

Parameters
nameName of the window. Does not have any meaning on Wii.
screenAspectAspect ratio of the screen. Auto means to use the platform default. On Wii this is what is set in the console settings.
initCallbackThis is called once after the system is initialized. Use it to load all assets.
frameCallbackThis is called once each frame. The framebuffer is swapped automatically after it returns.
quitCallbackThis is called when the HOME button is pressed on controller or window is closed for some other reason. Can be NULL.
initFlagsCombination of initialization flags to set full screen, wait for A button hold or to show splash screen.