Functions

# GRRLIB__lib.h File Reference

GRRLIB library function prototypes. More...

## Functions
GRRLIB_bytemapFont * | GRRLIB_LoadBMF (const u8 my_bmf[])
| Load a ByteMap font structure from a buffer.
void | GRRLIB_FreeBMF (GRRLIB_bytemapFont *bmf)
| Free memory allocated by ByteMap fonts.
void | GRRLIB_InitTileSet (GRRLIB_texImg *tex, const uint tilew, const uint tileh, const uint tilestart)
| Initialize a tile set.
void | GRRLIB_BMFX_FlipH (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest)
| Flip texture horizontal.
void | GRRLIB_BMFX_FlipV (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest)
| Flip texture vertical.
void | GRRLIB_BMFX_Grayscale (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest)
| Change a texture to gray scale.
void | GRRLIB_BMFX_Sepia (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest)
| Change a texture to sepia (old photo style).
void | GRRLIB_BMFX_Invert (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest)
| Invert colors of the texture.
void | GRRLIB_BMFX_Blur (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest, const u32 factor)
| A texture effect (Blur).
void | GRRLIB_BMFX_Scatter (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest, const u32 factor)
| A texture effect (Scatter).
void | GRRLIB_BMFX_Pixelate (const GRRLIB_texImg *texsrc, GRRLIB_texImg *texdest, const u32 factor)
| A texture effect (Pixelate).
int | GRRLIB_Init (void)
| Initialize GRRLIB.
void | GRRLIB_Exit (void)
| Call this before exiting your application.
void | GRRLIB_Circle (const f32 x, const f32 y, const f32 radius, const u32 color, const u8 filled)
| Draw a circle.
int | GRRLIB_LoadFile (const char *filename, unsigned char **data)
| Load a file to memory.
GRRLIB_texImg * | GRRLIB_LoadTextureFromFile (const char *filename)
| Load a texture from a file.
bool | GRRLIB_ScrShot (const char *filename)
| Make a PNG screenshot.
void | GRRLIB_Printf (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex, const u32 color, const f32 zoom, const char *text,...)
| Print formatted output.
void | GRRLIB_PrintBMF (const f32 xpos, const f32 ypos, const GRRLIB_bytemapFont *bmf, const char *text,...)
| Print formatted output with a ByteMap font.
void | GRRLIB_DrawImg (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex, const f32 degrees, const f32 scaleX, const f32 scaleY, const u32 color)
| Draw a texture.
void | GRRLIB_DrawImgQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 color)
| Draw a textured quad.
void | GRRLIB_DrawTile (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex, const f32 degrees, const f32 scaleX, const f32 scaleY, const u32 color, const int frame)
| Draw a tile.
void | GRRLIB_DrawPart (const f32 xpos, const f32 ypos, const f32 partx, const f32 party, const f32 partw, const f32 parth, const GRRLIB_texImg *tex, const f32 degrees, const f32 scaleX, const f32 scaleY, const u32 color)
| Draw a part of a texture.
void | GRRLIB_DrawTileQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 color, const int frame)
| Draw a tile in a quad.
void | GRRLIB_Render (void)
| Call this function after drawing.
void | GRRLIB_Screen2Texture (int posx, int posy, GRRLIB_texImg *tex, bool clear)
| Make a snapshot of the screen in a texture WITHOUT ALPHA LAYER.
void | GRRLIB_CompoStart (void)
| Start GX compositing process.
void | GRRLIB_CompoEnd (int posx, int posy, GRRLIB_texImg *tex)
| End GX compositing process (Make a snapshot of the screen in a texture WITH ALPHA LAYER).
GRRLIB_texImg * | GRRLIB_LoadTexture (const u8 *my_img)
| Load a texture from a buffer.
GRRLIB_texImg * | GRRLIB_LoadTexturePNG (const u8 *my_png)
| Load a texture from a buffer.
GRRLIB_texImg * | GRRLIB_LoadTextureJPG (const u8 *my_jpg)
| Load a texture from a buffer.
GRRLIB_texImg * | GRRLIB_LoadTextureJPGEx (const u8 *my_jpg, const int)
| Load a texture from a buffer.
GRRLIB_texImg * | GRRLIB_LoadTextureBMP (const u8 *my_bmp)
| Load a texture from a buffer.
bool | GRRLIB_GeckoInit ()
| Initialize USB Gecko.
void | GRRLIB_GeckoPrintf (const char *text,...)
| Print Gecko.
void | GRRLIB_SetBackgroundColour (u8 r, u8 g, u8 b, u8 a)
| Set the background parameter when screen is cleared.
void | GRRLIB_Camera3dSettings (f32 posx, f32 posy, f32 posz, f32 upx, f32 upy, f32 upz, f32 lookx, f32 looky, f32 lookz)
| Set the camera parameter (contributed my chris_c aka DaShAmAn).
void | GRRLIB_3dMode (f32 minDist, f32 maxDist, f32 fov, bool texturemode, bool normalmode)
| Set up the position matrix (contributed by chris_c aka DaShAmAn).
void | GRRLIB_2dMode ()
| Go back to 2D mode (contributed by chris_c aka DaShAmAn).
void | GRRLIB_ObjectViewBegin (void)
| Init the object matrix to draw object.
void | GRRLIB_ObjectViewScale (f32 scalx, f32 scaly, f32 scalz)
| Scale the object matrix to draw object.
void | GRRLIB_ObjectViewRotate (f32 angx, f32 angy, f32 angz)
| Rotate the object matrix to draw object .
void | GRRLIB_ObjectViewTrans (f32 posx, f32 posy, f32 posz)
| Translate the object matrix to draw object.
void | GRRLIB_ObjectViewEnd (void)
| Concat the object and the view matrix and calculate the inverse normal matrix.
void | GRRLIB_ObjectView (f32 posx, f32 posy, f32 posz, f32 angx, f32 angy, f32 angz, f32 scalx, f32 scaly, f32 scalz)
| Set the view matrix to draw object (in this order scale, rotate AND trans).
void | GRRLIB_ObjectViewInv (f32 posx, f32 posy, f32 posz, f32 angx, f32 angy, f32 angz, f32 scalx, f32 scaly, f32 scalz)
| Set the view matrix to draw object (in this order scale, trans AND rotate).
void | GRRLIB_SetTexture (GRRLIB_texImg *tex, bool rep)
| Set the texture to an object (contributed by chris_c aka DaShAmAn).
void | GRRLIB_DrawTorus (f32 r, f32 R, int nsides, int rings, bool filled, u32 col)
| Draw a torus (with normal).
void | GRRLIB_DrawSphere (f32 r, int lats, int longs, bool filled, u32 col)
| Draw a sphere (with normal).
void | GRRLIB_DrawCube (f32 size, bool filled, u32 col)
| Draw a cube (with normal).
void | GRRLIB_DrawCylinder (f32 r, f32 h, int d, bool filled, u32 col)
| Draw a cylinder (with normal).
void | GRRLIB_DrawCone (f32 r, f32 h, int d, bool filled, u32 col)
| Draw a cone (with normal).
void | GRRLIB_DrawTessPanel (f32 w, f32 wstep, f32 h, f32 hstep, bool filled, u32 col)
| Draw a Tesselated pannel (with normal).
void | GRRLIB_SetLightAmbient (u32 ambientcolor)
| Set ambient color.
void | GRRLIB_SetLightDiff (u8 num, guVector pos, f32 distattn, f32 brightness, u32 lightcolor)
| Set diffuse light parameters.
void | GRRLIB_SetLightSpec (u8 num, guVector dir, f32 shy, u32 lightcolor, u32 speccolor)
| Set specular light parameters.
void | GRRLIB_SetLightSpot (u8 num, guVector pos, guVector lookat, f32 angAttn0, f32 angAttn1, f32 angAttn2, f32 distAttn0, f32 distAttn1, f32 distAttn2, u32 lightcolor)
| Set Spot light parameters.
void | GRRLIB_SetLightOff (void)
| Set all lights off, like at init.
GRRLIB_ttfFont * | GRRLIB_LoadTTF (const u8 *file_base, s32 file_size)
| Load a TTF from a buffer.
void | GRRLIB_FreeTTF (GRRLIB_ttfFont *myFont)
| Free memory allocated by TTF fonts.
void | GRRLIB_PrintfTTF (int x, int y, GRRLIB_ttfFont *myFont, const char *string, unsigned int fontSize, const u32 color)
| Print function for TTF font.
void | GRRLIB_PrintfTTFW (int x, int y, GRRLIB_ttfFont *myFont, const wchar_t *string, unsigned int fontSize, const u32 color)
| Print function for TTF font.
unsigned int | GRRLIB_WidthTTF (GRRLIB_ttfFont *myFont, const char *, unsigned int)
| Get the width of a text in pixel.
unsigned int | GRRLIB_WidthTTFW (GRRLIB_ttfFont *myFont, const wchar_t *, unsigned int)
| Get the width of a text in pixel.

## Detailed Description

GRRLIB library function prototypes.

Do not include GRRLIB__lib.h directly, include only GRRLIB.h.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines