[CHG] Code formatting and typo

This commit is contained in:
Crayon2000 2011-02-16 21:59:34 +00:00
parent 4623c28590
commit 53e99b0236
3 changed files with 25 additions and 22 deletions

View file

@ -33,6 +33,7 @@ static guVector _GRRaxisx = (guVector){1, 0, 0}; // DO NOT MODIFY!!!
static guVector _GRRaxisy = (guVector){0, 1, 0}; // Even at runtime static guVector _GRRaxisy = (guVector){0, 1, 0}; // Even at runtime
static guVector _GRRaxisz = (guVector){0, 0, 1}; // NOT ever! static guVector _GRRaxisz = (guVector){0, 0, 1}; // NOT ever!
static Mtx _ObjTransformationMtx; static Mtx _ObjTransformationMtx;
/** /**
* Set the background parameter when screen is cleared. * Set the background parameter when screen is cleared.
* @param r Red component. * @param r Red component.
@ -599,6 +600,7 @@ void GRRLIB_DrawCone(f32 r, f32 h, int d, bool filled, u32 col) {
void GRRLIB_DrawTessPanel(f32 w, f32 wstep, f32 h, f32 hstep, bool filled, u32 col) { void GRRLIB_DrawTessPanel(f32 w, f32 wstep, f32 h, f32 hstep, bool filled, u32 col) {
f32 x, y, tmpx, tmpy; f32 x, y, tmpx, tmpy;
int tmp; int tmp;
tmpy = h/2.0f; tmpy = h/2.0f;
tmpx = w/2.0f; tmpx = w/2.0f;
tmp = ((w/wstep)*2)+2; tmp = ((w/wstep)*2)+2;
@ -693,8 +695,8 @@ void GRRLIB_SetLightSpec(u8 num, guVector dir, f32 shy, u32 lightcolor, u32 spec
GX_SetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV ); GX_SetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_ENABLE, GX_TEVPREV );
GX_SetTevColorIn(GX_TEVSTAGE1, GX_CC_ZERO, GX_CC_RASC, GX_CC_ONE, GX_CC_CPREV ); GX_SetTevColorIn(GX_TEVSTAGE1, GX_CC_ZERO, GX_CC_RASC, GX_CC_ONE, GX_CC_CPREV );
/////////////////////// Define Material and Ambiant color and draw object ///////////////////////////////////// /////////////////////// Define Material and Ambient color and draw object /////////////////////////////////////
GX_SetChanAmbColor(GX_COLOR1, (GXColor){0x00,0x00,0x00,0xFF}); // specualr ambient forced to black GX_SetChanAmbColor(GX_COLOR1, (GXColor){0x00,0x00,0x00,0xFF}); // specular ambient forced to black
GX_SetChanMatColor(GX_COLOR1, (GXColor) { R(speccolor), G(speccolor), B(speccolor), 0xFF }); // couleur du reflet specular GX_SetChanMatColor(GX_COLOR1, (GXColor) { R(speccolor), G(speccolor), B(speccolor), 0xFF }); // couleur du reflet specular
} }

View file

@ -36,10 +36,11 @@ void GRRLIB_Screen2Texture (int posx, int posy, GRRLIB_texImg *tex, bool clear)
GX_CopyTex(tex->data, GX_FALSE); GX_CopyTex(tex->data, GX_FALSE);
GX_PixModeSync(); GX_PixModeSync();
GRRLIB_FlushTex(tex); GRRLIB_FlushTex(tex);
if(clear) if(clear) {
GX_CopyDisp(xfb[!fb], GX_TRUE); GX_CopyDisp(xfb[!fb], GX_TRUE);
} }
} }
}
/** /**
* Start GX compositing process. * Start GX compositing process.

View file

@ -60,10 +60,10 @@ typedef unsigned int uint;/**< The uint keyword signifies an integral type. */
//============================================================================== //==============================================================================
// Primitive colour macros // Primitive colour macros
//============================================================================== //==============================================================================
#define R(c) (((c) >>24) &0xFF) /**< Extract Red component of colour. */ #define R(c) (((c) >>24) &0xFF) /**< Extract red component of colour. */
#define G(c) (((c) >>16) &0xFF) /**< Extract Green component of colour. */ #define G(c) (((c) >>16) &0xFF) /**< Extract green component of colour. */
#define B(c) (((c) >> 8) &0xFF) /**< Extract Blue component of colour. */ #define B(c) (((c) >> 8) &0xFF) /**< Extract blue component of colour. */
#define A(c) ( (c) &0xFF) /**< Extract Alpha component of colour. */ #define A(c) ( (c) &0xFF) /**< Extract alpha component of colour. */
/** /**
* Build an RGB pixel from components. * Build an RGB pixel from components.