ML_video.h File Reference

This file contains video headers. More...

Data Structures

struct  ML_Image
 This is the structure for images. More...
struct  ML_Sprite
 This is the structure for sprites. More...
struct  ML_Background
 This is the structure for backgrounds. More...
struct  ML_Rect
 This is the structure for rectangle. More...

Functions

bool ML_LoadSpriteFromBuffer (ML_Image *image, ML_Sprite *sprite, const u8 *filename, int x, int y)
 This function loads a PNG image in memory from the buffer (see tutorial/wiki).
bool ML_LoadSpriteFromFile (ML_Image *image, ML_Sprite *sprite, char *filename, int x, int y)
 This function loads a PNG image in memory from a file.
bool ML_LoadBackgroundFromBuffer (ML_Image *image, ML_Background *background, const u8 *filename, int x, int y)
 This function loads a PNG image in memory from the buffer (see tutorial/wiki).
bool ML_LoadBackgroundFromFile (ML_Image *image, ML_Background *background, char *filename, int x, int y)
 This function loads a PNG image in memory from a file.
void ML_DrawTexture (GXTexObj *texObj, u8 *data, int x, int y, u16 width, u16 height, float angle, float scaleX, float scaleY, u8 alpha)
 This function shows the sprite which is already loaded. It can be faster when you have many things to do on the sprites in a time.
void ML_DrawRect (int x, int y, u16 width, u16 height, u32 rgba, bool filled)
 This function shows a rectangle with the color you want.
void ML_DrawCircle (int x, int y, int radius, u32 rgba, bool filled)
 This function shows a rectangle with the color you want.
void ML_Brightness (u8 alpha)
 This function changes the opacity of the entire screen. In fact, it draws a black rectangle which will be opacified.
bool ML_FadeOut ()
 This function fades out.
bool ML_FadeIn ()
 This function fades in (after a fade-out).
void ML_EnableClipping (int x, int y, int width, int height)
 This function disables the clipping.
void ML_DisableClipping ()
 This function disables the clipping.
void ML_EnableTextureAntiAliasing ()
 This function enables the anti-aliasing on textures.
void ML_DisableTextureAntiAliasing ()
 This function disables the anti-aliasing on textures.
void ML_SetBackgroundColor (GXColor color)
 This function clears the background with the color you want.
void ML_SplashScreen ()
 This function shows the official Splash Screen made by Zeblackos. :).
bool ML_Screenshot (const char *filename)
 This function makes a screenshot of the screen at the root of your SD Card.
void ML_CleanVideoBG ()
 This function cleans the BG in black.
void ML_CleanVideoBGColor (int color)
 This function cleans the BG with a color.
void ML_Refresh ()
 This function refresh the MLlib (Get pads status, and refresh video).
void ML_RefreshConsoleMode ()
 CONSOLE MODE - This function refresh the MLlib (Get pads status, and refresh video).

Detailed Description

This file contains video headers.


Function Documentation

void ML_Brightness ( u8  alpha  ) 

This function changes the opacity of the entire screen. In fact, it draws a black rectangle which will be opacified.

Parameters:
alpha Alpha of the screen.
void ML_CleanVideoBGColor ( int  color  ) 

This function cleans the BG with a color.

Parameters:
color The color you want.
void ML_DrawCircle ( int  x,
int  y,
int  radius,
u32  rgba,
bool  filled 
)

This function shows a rectangle with the color you want.

Parameters:
x X position
y Y position
radius Radius
rgba RGBA Color (HTML Color) like 0xFF0016FF (0xRED+GREEN+BLUE+ALPHA)
filled Should the circle be filled or not ?
void ML_DrawRect ( int  x,
int  y,
u16  width,
u16  height,
u32  rgba,
bool  filled 
)

This function shows a rectangle with the color you want.

Parameters:
x X position
y Y position
width Width
height Height
rgba RGBA Color (HTML Color) like 0xFF0016FF (0xRED+GREEN+BLUE+ALPHA)
filled Should the rectangle be filled or not ?
void ML_DrawTexture ( GXTexObj *  texObj,
u8 *  data,
int  x,
int  y,
u16  width,
u16  height,
float  angle,
float  scaleX,
float  scaleY,
u8  alpha 
)

This function shows the sprite which is already loaded. It can be faster when you have many things to do on the sprites in a time.

Parameters:
texObj GX Texture (it's sprite.image->texObj)
data Image data (it's sprite.image->data)
x X position
y Y position
width Width
height Height
angle Angle in degrees ( -180 -> +180 )
scaleX Horizontal scale
scaleY Vertical scale
alpha Transparency ( 0 -> 255 )
void ML_EnableClipping ( int  x,
int  y,
int  width,
int  height 
)

This function disables the clipping.

Parameters:
x X position
y Y position
width Width of the rectangle
height Height of the rectangle
bool ML_FadeIn (  ) 

This function fades in (after a fade-out).

Returns:
1 if it's finished, 0 if not.
bool ML_FadeOut (  ) 

This function fades out.

Returns:
1 if it's finished, 0 if not.
bool ML_LoadBackgroundFromBuffer ( ML_Image image,
ML_Background background,
const u8 *  filename,
int  x,
int  y 
)

This function loads a PNG image in memory from the buffer (see tutorial/wiki).

Parameters:
image The image you're loading
background The background structure you will use after
filename The path to the PNG file. (eg. background_png)
x X position
y Y position
Returns:
0 if it failed, 1 else.
bool ML_LoadBackgroundFromFile ( ML_Image image,
ML_Background background,
char *  filename,
int  x,
int  y 
)

This function loads a PNG image in memory from a file.

Parameters:
image The image you're loading
background The background structure you will use after
filename The path to the PNG file. (eg. "background.png")
x X position
y Y position
Returns:
0 if it failed, 1 else.
bool ML_LoadSpriteFromBuffer ( ML_Image image,
ML_Sprite sprite,
const u8 *  filename,
int  x,
int  y 
)

This function loads a PNG image in memory from the buffer (see tutorial/wiki).

Parameters:
image The image you're loading
sprite The sprite structure you will use after
filename The path to the PNG file. (eg. sprite_png)
x X position
y Y position
Returns:
0 if it failed, 1 else.
bool ML_LoadSpriteFromFile ( ML_Image image,
ML_Sprite sprite,
char *  filename,
int  x,
int  y 
)

This function loads a PNG image in memory from a file.

Parameters:
image The image you're loading
sprite The sprite structure you will use after
filename The path to the PNG file. (eg. "sprite.png")
x X position
y Y position
Returns:
0 if it failed, 1 else.
bool ML_Screenshot ( const char *  filename  ) 

This function makes a screenshot of the screen at the root of your SD Card.

Parameters:
filename Name of the file which will be created
void ML_SetBackgroundColor ( GXColor  color  ) 

This function clears the background with the color you want.

Parameters:
color New background color
 All Data Structures Files Functions Variables Defines

Generated on Wed Jan 19 18:15:34 2011 for MLlib by  doxygen 1.6.1