mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-12-23 02:39:19 +00:00
[CHG] Added some defines for colours in the template
[NEW] Documentation main page
This commit is contained in:
parent
fda4c0c33b
commit
03ca45bf76
3 changed files with 32 additions and 15 deletions
|
@ -258,10 +258,10 @@ GRRLIB_texImg GRRLIB_LoadTextureJPG(const unsigned char my_jpg[]) {
|
|||
|
||||
/**
|
||||
* Draw a texture.
|
||||
* @param xpos
|
||||
* @param ypos
|
||||
* @param tex
|
||||
* @param degrees
|
||||
* @param xpos specifies the x-coordinate of the upper-left corner.
|
||||
* @param ypos specifies the y-coordinate of the upper-left corner.
|
||||
* @param tex texture to draw.
|
||||
* @param degrees angle of rotation.
|
||||
* @param scaleX
|
||||
* @param scaleY
|
||||
* @param color
|
||||
|
@ -315,10 +315,10 @@ inline void GRRLIB_DrawImg(f32 xpos, f32 ypos, GRRLIB_texImg tex, float degrees,
|
|||
|
||||
/**
|
||||
* Draw a tile.
|
||||
* @param xpos
|
||||
* @param ypos
|
||||
* @param tex
|
||||
* @param degrees
|
||||
* @param xpos specifies the x-coordinate of the upper-left corner.
|
||||
* @param ypos specifies the y-coordinate of the upper-left corner.
|
||||
* @param tex texture to draw.
|
||||
* @param degrees angle of rotation.
|
||||
* @param scaleX
|
||||
* @param scaleY
|
||||
* @param color
|
||||
|
@ -436,7 +436,8 @@ void GRRLIB_GXEngine(Vector v[], u32 color, long n, u8 fmt) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Initialize GRRLIB.
|
||||
* Initialize GRRLIB. Call this at the beginning your code.
|
||||
* @see GRRLIB_Exit
|
||||
*/
|
||||
void GRRLIB_Init() {
|
||||
f32 yscale;
|
||||
|
|
|
@ -74,3 +74,9 @@ void GRRLIB_Exit();
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @mainpage GRRLIB Documentation
|
||||
* @image html grrlib_logo.png
|
||||
* Welcome to the GRRLIB documentation.
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
#include "gfx/BMfont4.h"
|
||||
#include "gfx/test_jpg.h"
|
||||
|
||||
// RGBA Colors
|
||||
#define GRRLIB_BLACK 0x000000FF
|
||||
#define GRRLIB_WHITE 0xFFFFFFFF
|
||||
#define GRRLIB_RED 0xFF0000FF
|
||||
#define GRRLIB_BLUE 0x0000FFFF
|
||||
#define GRRLIB_GREEN 0x008000FF
|
||||
#define GRRLIB_GRAY 0x808080FF
|
||||
#define GRRLIB_YELLOW 0xFFFF00FF
|
||||
#define GRRLIB_SILVER 0xC0C0C0FF
|
||||
|
||||
Mtx GXmodelView2D;
|
||||
|
||||
int main() {
|
||||
|
@ -55,14 +65,14 @@ int main() {
|
|||
|
||||
WPAD_IR(WPAD_CHAN_0, &ir1);
|
||||
|
||||
GRRLIB_FillScreen(0x000000FF);
|
||||
GRRLIB_FillScreen(GRRLIB_BLACK);
|
||||
|
||||
GRRLIB_DrawImg(10, 10, tex_test_jpg, 0, 1, 1, 0xFFFFFFFF);
|
||||
GRRLIB_DrawImg(10, 10, tex_test_jpg, 0, 1, 1, GRRLIB_WHITE);
|
||||
|
||||
GRRLIB_Printf(left, 200, tex_BMfont1, 0xFFFFFFFF, 1, "X VALUE:%d", (int)ir1.sx);
|
||||
GRRLIB_Printf(left, 250, tex_BMfont4, 0xFFFFFFFF, 1, "X VALUE:%d", (int)ir1.sx);
|
||||
GRRLIB_Printf(left, 300, tex_BMfont3, 0xFFFFFFFF, 1, "X VALUE : %d", tex_test_jpg.w);
|
||||
GRRLIB_Printf(left, 350, tex_BMfont2, 0xFFFFFFFF, 1, "X VALUE : 1");
|
||||
GRRLIB_Printf(left, 200, tex_BMfont1, GRRLIB_WHITE, 1, "X VALUE:%d", (int)ir1.sx);
|
||||
GRRLIB_Printf(left, 250, tex_BMfont4, GRRLIB_WHITE, 1, "X VALUE:%d", (int)ir1.sx);
|
||||
GRRLIB_Printf(left, 300, tex_BMfont3, GRRLIB_WHITE, 1, "X VALUE : %d", tex_test_jpg.w);
|
||||
GRRLIB_Printf(left, 350, tex_BMfont2, GRRLIB_WHITE, 1, "X VALUE : 1");
|
||||
|
||||
GRRLIB_Render();
|
||||
|
||||
|
|
Loading…
Reference in a new issue