mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-22 06:52:20 +00:00
[CHG] Cleanup (part 2)
This commit is contained in:
parent
73e5367e4b
commit
b00ef0f50f
3 changed files with 17 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
#include <grrlib.h>
|
||||
|
||||
/**
|
||||
* Set the BackGround Parameter when screen is cleared.
|
||||
* Set the background parameter when screen is cleared.
|
||||
* @param r Red component.
|
||||
* @param g Green component.
|
||||
* @param b Blue component.
|
||||
|
@ -48,12 +48,12 @@ void GRRLIB_camera3dSettings(f32 posx, f32 posy, f32 posz,
|
|||
|
||||
/**
|
||||
* Set up the position matrix (contributed my chris_c aka DaShAmAn).
|
||||
* @param miniDist Minimal distance for the cam.
|
||||
* @param minDist Minimal distance for the cam.
|
||||
* @param maxDist Maximal distance for the cam.
|
||||
* @param fov Field of view for the cam.
|
||||
* @param texturemode False, GX won't need TexCoord, True, GX will need TexCoord.
|
||||
*/
|
||||
void GRRLIB_3dMode(f32 minDist,f32 maxDist,f32 fov, bool texturemode) {
|
||||
void GRRLIB_3dMode(f32 minDist, f32 maxDist, f32 fov, bool texturemode) {
|
||||
Mtx m;
|
||||
|
||||
guLookAt(_GRR_view, &_GRR_cam, &_GRR_up, &_GRR_look);
|
||||
|
@ -92,7 +92,7 @@ void GRRLIB_2dMode() {
|
|||
GX_LoadProjectionMtx(m, GX_ORTHOGRAPHIC);
|
||||
|
||||
guMtxIdentity(view);
|
||||
guMtxTransApply(view,view, 0,0, -100.0F);
|
||||
guMtxTransApply(view,view, 0, 0, -100.0F);
|
||||
GX_LoadPosMtxImm(view, GX_PNMTX0);
|
||||
|
||||
GX_ClearVtxDesc();
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
bool geckoinit = false;
|
||||
|
||||
bool GRRLIB_GeckoInit()
|
||||
{
|
||||
/**
|
||||
* Initialize Gecko.
|
||||
*/
|
||||
bool GRRLIB_GeckoInit() {
|
||||
u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1);
|
||||
if (geckoattached)
|
||||
{
|
||||
if (geckoattached) {
|
||||
usb_flush(EXI_CHANNEL_1);
|
||||
geckoinit = true;
|
||||
return true;
|
||||
|
@ -16,17 +17,21 @@ bool GRRLIB_GeckoInit()
|
|||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print Gecko.
|
||||
* @param text Text to print.
|
||||
* @param ... Optional arguments.
|
||||
*/
|
||||
void GRRLIB_GeckoPrintf (const char *text, ...) {
|
||||
int size;
|
||||
char tmp[1024];
|
||||
|
||||
if (!(geckoinit))return;
|
||||
if (!(geckoinit)) return;
|
||||
|
||||
va_list argp;
|
||||
va_start(argp, text);
|
||||
size = vsprintf(tmp, text, argp);
|
||||
va_end(argp);
|
||||
|
||||
usb_sendbuffer_safe(1,tmp,size);
|
||||
usb_sendbuffer_safe(1, tmp,size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue