diff --git a/GRRLIB/GRRLIB/GRRLIB_3D.c b/GRRLIB/GRRLIB/GRRLIB_3D.c index b840b24..99c4cc5 100644 --- a/GRRLIB/GRRLIB/GRRLIB_3D.c +++ b/GRRLIB/GRRLIB/GRRLIB_3D.c @@ -149,7 +149,7 @@ void GRRLIB_2dMode() { */ void GRRLIB_ObjectView(f32 posx, f32 posy, f32 posz, f32 angx, f32 angy, f32 angz, f32 scalx, f32 scaly, f32 scalz) { Mtx m, m1, mv, rx, ry, rz; - Mtx mvi ; + Mtx mvi; guMtxIdentity(m1); guMtxScaleApply(m1, m1, scalx, scaly, scalz); diff --git a/GRRLIB/GRRLIB/GRRLIB_core.c b/GRRLIB/GRRLIB/GRRLIB_core.c index 4e12ec1..e7343b9 100644 --- a/GRRLIB/GRRLIB/GRRLIB_core.c +++ b/GRRLIB/GRRLIB/GRRLIB_core.c @@ -51,14 +51,14 @@ int GRRLIB_Init (void) { s8 error_code = 0; // Ensure this function is only ever called once - if (is_setup) return 0 ; + if (is_setup) return 0; // Initialise the video subsystem VIDEO_Init(); VIDEO_SetBlack(true); // Disable video output during initialisation // Grab a pointer to the video mode attributes - if ( !(rmode = VIDEO_GetPreferredMode(NULL)) ) return -1 ; + if ( !(rmode = VIDEO_GetPreferredMode(NULL)) ) return -1; // Video Mode Correction switch (rmode->viTVMode) { @@ -81,26 +81,26 @@ int GRRLIB_Init (void) { VIDEO_Configure(rmode); // Get some memory to use for a "double buffered" frame buffer - if ( !(xfb[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode))) ) return -1 ; - if ( !(xfb[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode))) ) return -1 ; + if ( !(xfb[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode))) ) return -1; + if ( !(xfb[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode))) ) return -1; VIDEO_SetNextFramebuffer(xfb[fb]); // Choose a frame buffer to start with VIDEO_Flush(); // flush the frame to the TV VIDEO_WaitVSync(); // Wait for the TV to finish updating // If the TV image is interlaced it takes two passes to display the image - if (rmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync() ; + if (rmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync(); // The FIFO is the buffer the CPU uses to send commands to the GPU - if ( !(gp_fifo = memalign(32, DEFAULT_FIFO_SIZE)) ) return -1 ; + if ( !(gp_fifo = memalign(32, DEFAULT_FIFO_SIZE)) ) return -1; memset(gp_fifo, 0, DEFAULT_FIFO_SIZE); GX_Init(gp_fifo, DEFAULT_FIFO_SIZE); // Clear the background to opaque black and clears the z-buffer GX_SetCopyClear((GXColor){ 0, 0, 0, 0 }, GX_MAX_Z24); - if (rmode->aa) GX_SetPixelFmt(GX_PF_RGB565_Z16, GX_ZC_LINEAR) ; // Set 16 bit RGB565 - else GX_SetPixelFmt(GX_PF_RGB8_Z24 , GX_ZC_LINEAR) ; // Set 24 bit Z24 + if (rmode->aa) GX_SetPixelFmt(GX_PF_RGB565_Z16, GX_ZC_LINEAR); // Set 16 bit RGB565 + else GX_SetPixelFmt(GX_PF_RGB8_Z24 , GX_ZC_LINEAR); // Set 24 bit Z24 // Other GX setup yscale = GX_GetYScaleFactor(rmode->efbHeight, rmode->xfbHeight); @@ -176,8 +176,8 @@ int GRRLIB_Init (void) { */ void GRRLIB_Exit (void) { static bool done = false; - if (done || !is_setup) return ; - else done = true ; + if (done || !is_setup) return; + else done = true; // Allow write access to the full screen GX_SetClipMode( GX_CLIP_DISABLE ); diff --git a/GRRLIB/GRRLIB/GRRLIB_fbAdvanced.c b/GRRLIB/GRRLIB/GRRLIB_fbAdvanced.c index 636e8a3..cf8bace 100644 --- a/GRRLIB/GRRLIB/GRRLIB_fbAdvanced.c +++ b/GRRLIB/GRRLIB/GRRLIB_fbAdvanced.c @@ -50,6 +50,6 @@ void GRRLIB_Circle (const f32 x, const f32 y, const f32 radius, ncolor[a] = color; } - if (!filled) GRRLIB_GXEngine(v, ncolor, 36, GX_LINESTRIP ) ; - else GRRLIB_GXEngine(v, ncolor, 36, GX_TRIANGLEFAN) ; + if (!filled) GRRLIB_GXEngine(v, ncolor, 36, GX_LINESTRIP ); + else GRRLIB_GXEngine(v, ncolor, 36, GX_TRIANGLEFAN); } diff --git a/GRRLIB/GRRLIB/GRRLIB_fileIO.c b/GRRLIB/GRRLIB/GRRLIB_fileIO.c index 6ba8568..7cf25ea 100644 --- a/GRRLIB/GRRLIB/GRRLIB_fileIO.c +++ b/GRRLIB/GRRLIB/GRRLIB_fileIO.c @@ -36,11 +36,11 @@ int GRRLIB_LoadFile(const char* filename, unsigned char* *data) { FILE *fd; // Open the file - if ( !(fd = fopen(filename, "rb")) ) return -1 ; + if ( !(fd = fopen(filename, "rb")) ) return -1; // Get file length fseek(fd, 0, SEEK_END); - if ( !(len = ftell(fd)) ) { + if ( !(len = ftell(fd)) ) { *data = NULL; return 0; } @@ -48,14 +48,14 @@ int GRRLIB_LoadFile(const char* filename, unsigned char* *data) { // Grab some memory in which to store the file if ( !(*data = malloc(len)) ) { - fclose(fd); - return -2; + fclose(fd); + return -2; } - if ( fread(*data, 1, len, fd) != len) { - fclose(fd); - free(*data); *data = NULL; - return -3; + if ( fread(*data, 1, len, fd) != len) { + fclose(fd); + free(*data); *data = NULL; + return -3; } fclose(fd); @@ -72,7 +72,7 @@ GRRLIB_texImg* GRRLIB_LoadTextureFromFile(const char *filename) { unsigned char *data; // return NULL it load fails - if (GRRLIB_LoadFile(filename, &data) <= 0) return NULL ; + if (GRRLIB_LoadFile(filename, &data) <= 0) return NULL; // Convert to texture tex = GRRLIB_LoadTexture(data); diff --git a/GRRLIB/GRRLIB/GRRLIB_render.c b/GRRLIB/GRRLIB/GRRLIB_render.c index 2220193..a2e1d83 100644 --- a/GRRLIB/GRRLIB/GRRLIB_render.c +++ b/GRRLIB/GRRLIB/GRRLIB_render.c @@ -44,7 +44,7 @@ void GRRLIB_DrawImg (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex, u16 width, height; Mtx m, m1, m2, mv; - if (tex == NULL || tex->data == NULL) return ; + if (tex == NULL || tex->data == NULL) return; GX_InitTexObj(&texObj, tex->data, tex->w, tex->h, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); @@ -114,7 +114,7 @@ void GRRLIB_DrawImgQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 c GXTexObj texObj; Mtx m, m1, m2, mv; - if (tex == NULL || tex->data == NULL) return ; + if (tex == NULL || tex->data == NULL) return; GX_InitTexObj(&texObj, tex->data, tex->w, tex->h, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); @@ -179,7 +179,7 @@ void GRRLIB_DrawTile (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex, Mtx m, m1, m2, mv; f32 s1, s2, t1, t2; - if (tex == NULL || tex->data == NULL) return ; + if (tex == NULL || tex->data == NULL) return; // The 0.001f/x is the frame correction formula by spiffen s1 = (frame % tex->nbtilew) * tex->ofnormaltexx; @@ -267,7 +267,7 @@ void GRRLIB_DrawPart (const f32 xpos, const f32 ypos, const f32 partx, const f3 Mtx m, m1, m2, mv; f32 s1, s2, t1, t2; - if (tex == NULL || tex->data == NULL) return ; + if (tex == NULL || tex->data == NULL) return; // The 0.001f/x is the frame correction formula by spiffen s1 = (partx /tex->w) +(0.001f /tex->w); @@ -347,7 +347,7 @@ void GRRLIB_DrawTileQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 Mtx m, m1, m2, mv; f32 s1, s2, t1, t2; - if (tex == NULL || tex->data == NULL) return ; + if (tex == NULL || tex->data == NULL) return; // The 0.001f/x is the frame correction formula by spiffen s1 = (( (frame %tex->nbtilew) ) /(f32)tex->nbtilew) +(0.001f /tex->w); @@ -419,5 +419,5 @@ void GRRLIB_Render (void) { VIDEO_Flush(); // Flush video buffer to screen VIDEO_WaitVSync(); // Wait for screen to update // Interlaced screens require two frames to update - if (rmode->viTVMode &VI_NON_INTERLACE) VIDEO_WaitVSync() ; + if (rmode->viTVMode &VI_NON_INTERLACE) VIDEO_WaitVSync(); } diff --git a/GRRLIB/GRRLIB/GRRLIB_snapshot.c b/GRRLIB/GRRLIB/GRRLIB_snapshot.c index 121bcde..8931ec4 100644 --- a/GRRLIB/GRRLIB/GRRLIB_snapshot.c +++ b/GRRLIB/GRRLIB/GRRLIB_snapshot.c @@ -61,6 +61,6 @@ void GRRLIB_CompoStart (void) { void GRRLIB_CompoEnd(int posx, int posy, GRRLIB_texImg *tex) { GRRLIB_Screen2Texture(posx, posy, tex, GX_TRUE); - if (rmode->aa) GX_SetPixelFmt(GX_PF_RGB565_Z16, GX_ZC_LINEAR) ; - else GX_SetPixelFmt(GX_PF_RGB8_Z24 , GX_ZC_LINEAR) ; + if (rmode->aa) GX_SetPixelFmt(GX_PF_RGB565_Z16, GX_ZC_LINEAR); + else GX_SetPixelFmt(GX_PF_RGB8_Z24 , GX_ZC_LINEAR); } diff --git a/GRRLIB/GRRLIB/GRRLIB_ttf.c b/GRRLIB/GRRLIB/GRRLIB_ttf.c index 91dba32..51db271 100644 --- a/GRRLIB/GRRLIB/GRRLIB_ttf.c +++ b/GRRLIB/GRRLIB/GRRLIB_ttf.c @@ -27,7 +27,7 @@ THE SOFTWARE. static FT_Library ftLibrary; /**< A handle to a FreeType library instance. */ // Static function prototypes -static void DrawBitmap(FT_Bitmap *bitmap, int offset, int top, const u32 color) ; +static void DrawBitmap(FT_Bitmap *bitmap, int offset, int top, const u32 color); /** diff --git a/GRRLIB/GRRLIB/grrlib/GRRLIB__inline.h b/GRRLIB/GRRLIB/grrlib/GRRLIB__inline.h index 9002aea..a34d9e5 100644 --- a/GRRLIB/GRRLIB/grrlib/GRRLIB__inline.h +++ b/GRRLIB/GRRLIB/grrlib/GRRLIB__inline.h @@ -38,84 +38,84 @@ THE SOFTWARE. //------------------------------------------------------------------------------ // GRRLIB_cExtn.h - C extensions (helper functions) -INLINE u8 GRRLIB_ClampVar8 (f32 Value) ; +INLINE u8 GRRLIB_ClampVar8 (f32 Value); //------------------------------------------------------------------------------ // GRRLIB_clipping.h - Clipping control -INLINE void GRRLIB_ClipReset (void) ; +INLINE void GRRLIB_ClipReset (void); INLINE void GRRLIB_ClipDrawing (const int x, const int y, - const int width, const int height) ; + const int width, const int height); //------------------------------------------------------------------------------ // GRRLIB_collision.h - Collision detection INLINE bool GRRLIB_PtInRect (const int hotx, const int hoty, const int hotw, const int hoth, - const int wpadx, const int wpady) ; + const int wpadx, const int wpady); INLINE bool GRRLIB_RectInRect (const int rect1x, const int rect1y, const int rect1w, const int rect1h, const int rect2x, const int rect2y, - const int rect2w, const int rect2h) ; + const int rect2w, const int rect2h); INLINE bool GRRLIB_RectOnRect (const int rect1x, const int rect1y, const int rect1w, const int rect1h, const int rect2x, const int rect2y, - const int rect2w, const int rect2h) ; + const int rect2w, const int rect2h); //------------------------------------------------------------------------------ // GRRLIB_fbComplex.h - INLINE void GRRLIB_NPlot (const guVector v[], const u32 color[], - const long n) ; + const long n); INLINE void GRRLIB_NGone (const guVector v[], const u32 color[], - const long n) ; + const long n); INLINE void GRRLIB_NGoneFilled (const guVector v[], const u32 color[], - const long n) ; + const long n); //------------------------------------------------------------------------------ // GRRLIB_fbGX.h - INLINE void GRRLIB_GXEngine (const guVector v[], const u32 color[], - const long n, const u8 fmt) ; + const long n, const u8 fmt); //------------------------------------------------------------------------------ // GRRLIB_fbSimple.h - -INLINE void GRRLIB_FillScreen (const u32 color) ; -INLINE void GRRLIB_Plot (const f32 x, const f32 y, const u32 color) ; +INLINE void GRRLIB_FillScreen (const u32 color); +INLINE void GRRLIB_Plot (const f32 x, const f32 y, const u32 color); INLINE void GRRLIB_Line (const f32 x1, const f32 y1, - const f32 x2, const f32 y2, const u32 color) ; + const f32 x2, const f32 y2, const u32 color); INLINE void GRRLIB_Rectangle (const f32 x, const f32 y, const f32 width, const f32 height, - const u32 color, const u8 filled) ; + const u32 color, const u8 filled); //------------------------------------------------------------------------------ // GRRLIB_handle.h - Texture handle manipulation -INLINE void GRRLIB_SetHandle (GRRLIB_texImg *tex, const int x, const int y) ; -INLINE void GRRLIB_SetMidHandle (GRRLIB_texImg *tex, const bool enabled) ; +INLINE void GRRLIB_SetHandle (GRRLIB_texImg *tex, const int x, const int y); +INLINE void GRRLIB_SetMidHandle (GRRLIB_texImg *tex, const bool enabled); //------------------------------------------------------------------------------ // GRRLIB_pixel.h - Pixel manipulation INLINE u32 GRRLIB_GetPixelFromtexImg (const int x, const int y, - const GRRLIB_texImg *tex) ; + const GRRLIB_texImg *tex); INLINE void GRRLIB_SetPixelTotexImg (const int x, const int y, - GRRLIB_texImg *tex, const u32 color) ; + GRRLIB_texImg *tex, const u32 color); INLINE void GRRLIB_GetPixelFromFB (int x, int y, u8 *R1, u8 *G1, u8 *B1, - u8 *R2, u8 *G2, u8 *B2) ; + u8 *R2, u8 *G2, u8 *B2); //------------------------------------------------------------------------------ // GRRLIB_settings.h - Rendering functions -INLINE void GRRLIB_SetBlend (const GRRLIB_blendMode blendmode) ; -INLINE GRRLIB_blendMode GRRLIB_GetBlend (void) ; -INLINE void GRRLIB_SetAntiAliasing (const bool aa) ; -INLINE bool GRRLIB_GetAntiAliasing (void) ; +INLINE void GRRLIB_SetBlend (const GRRLIB_blendMode blendmode); +INLINE GRRLIB_blendMode GRRLIB_GetBlend (void); +INLINE void GRRLIB_SetAntiAliasing (const bool aa); +INLINE bool GRRLIB_GetAntiAliasing (void); //------------------------------------------------------------------------------ // GRRLIB_texSetup.h - Create and setup textures -INLINE GRRLIB_texImg* GRRLIB_CreateEmptyTexture (const uint w, const uint h) ; -INLINE void GRRLIB_ClearTex (GRRLIB_texImg* tex) ; -INLINE void GRRLIB_FlushTex (GRRLIB_texImg *tex) ; -INLINE void GRRLIB_FreeTexture (GRRLIB_texImg *tex) ; +INLINE GRRLIB_texImg* GRRLIB_CreateEmptyTexture (const uint w, const uint h); +INLINE void GRRLIB_ClearTex (GRRLIB_texImg* tex); +INLINE void GRRLIB_FlushTex (GRRLIB_texImg *tex); +INLINE void GRRLIB_FreeTexture (GRRLIB_texImg *tex); //============================================================================== // Definitions of inlined functions diff --git a/GRRLIB/GRRLIB/grrlib/GRRLIB__lib.h b/GRRLIB/GRRLIB/grrlib/GRRLIB__lib.h index b639636..6580795 100644 --- a/GRRLIB/GRRLIB/grrlib/GRRLIB__lib.h +++ b/GRRLIB/GRRLIB/grrlib/GRRLIB__lib.h @@ -38,101 +38,101 @@ THE SOFTWARE. //------------------------------------------------------------------------------ // GRRLIB_bmf.c - BitMapFont functions -GRRLIB_bytemapFont* GRRLIB_LoadBMF (const u8 my_bmf[] ) ; -void GRRLIB_FreeBMF (const GRRLIB_bytemapFont *bmf) ; +GRRLIB_bytemapFont* GRRLIB_LoadBMF (const u8 my_bmf[] ); +void GRRLIB_FreeBMF (const GRRLIB_bytemapFont *bmf); void GRRLIB_InitTileSet (GRRLIB_texImg *tex, const uint tilew, const uint tileh, - const uint tilestart) ; + const uint tilestart); //------------------------------------------------------------------------------ // GRRLIB_bmfx.c - Bitmap f/x void GRRLIB_BMFX_FlipH (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest) ; + GRRLIB_texImg *texdest); void GRRLIB_BMFX_FlipV (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest) ; + GRRLIB_texImg *texdest); void GRRLIB_BMFX_Grayscale (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest) ; + GRRLIB_texImg *texdest); void GRRLIB_BMFX_Sepia (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest) ; + GRRLIB_texImg *texdest); void GRRLIB_BMFX_Invert (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest) ; + GRRLIB_texImg *texdest); void GRRLIB_BMFX_Blur (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest, const u32 factor) ; + GRRLIB_texImg *texdest, const u32 factor); void GRRLIB_BMFX_Scatter (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest, const u32 factor) ; + GRRLIB_texImg *texdest, const u32 factor); void GRRLIB_BMFX_Pixelate (const GRRLIB_texImg *texsrc, - GRRLIB_texImg *texdest, const u32 factor) ; + GRRLIB_texImg *texdest, const u32 factor); //------------------------------------------------------------------------------ // GRRLIB_core.c - GRRLIB core functions -int GRRLIB_Init (void) ; -void GRRLIB_Exit (void) ; +int GRRLIB_Init (void); +void GRRLIB_Exit (void); //------------------------------------------------------------------------------ // GRRLIB_fbAdvanced.c - Render to framebuffer: Advanced primitives void GRRLIB_Circle (const f32 x, const f32 y, const f32 radius, - const u32 color, const u8 filled) ; + const u32 color, const u8 filled); //------------------------------------------------------------------------------ // GRRLIB_fileIO - File I/O (SD Card) int GRRLIB_LoadFile (const char* filename, - unsigned char* *data) ; -GRRLIB_texImg* GRRLIB_LoadTextureFromFile (const char* filename) ; -bool GRRLIB_ScrShot (const char* filename) ; + unsigned char* *data); +GRRLIB_texImg* GRRLIB_LoadTextureFromFile (const char* filename); +bool GRRLIB_ScrShot (const char* filename); //------------------------------------------------------------------------------ // GRRLIB_print.c - Will someome please tell me what these are :) void GRRLIB_Printf (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex, const u32 color, - const f32 zoom, const char *text, ...) ; + const f32 zoom, const char *text, ...); void GRRLIB_PrintBMF (const f32 xpos, const f32 ypos, const GRRLIB_bytemapFont *bmf, - const char *text, ...) ; + const char *text, ...); //------------------------------------------------------------------------------ // GRRLIB_render.c - Rendering functions 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) ; + const u32 color); void GRRLIB_DrawImgQuad (const guVector pos[4], GRRLIB_texImg *tex, - const u32 color) ; + const u32 color); 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) ; + const u32 color, const int frame); 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) ; + const u32 color); -void GRRLIB_DrawTileQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 color, const int frame) ; +void GRRLIB_DrawTileQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 color, const int frame); -void GRRLIB_Render (void) ; +void GRRLIB_Render (void); //------------------------------------------------------------------------------ // GRRLIB_snapshot.c - Create a texture containing a snapshot of a part of the framebuffer -void GRRLIB_Screen2Texture (int posx, int posy, GRRLIB_texImg *tex, bool clear) ; +void GRRLIB_Screen2Texture (int posx, int posy, GRRLIB_texImg *tex, bool clear); void GRRLIB_CompoStart (void); void GRRLIB_CompoEnd(int posx, int posy, GRRLIB_texImg *tex); //------------------------------------------------------------------------------ // GRRLIB_texEdit.c - Modifying the content of a texture -GRRLIB_texImg* GRRLIB_LoadTexture (const u8 *my_img) ; -GRRLIB_texImg* GRRLIB_LoadTexturePNG (const u8 *my_png) ; -GRRLIB_texImg* GRRLIB_LoadTextureJPG (const u8 *my_jpg) ; -GRRLIB_texImg* GRRLIB_LoadTextureJPGEx (const u8 *my_jpg, const int) ; -GRRLIB_texImg* GRRLIB_LoadTextureBMP (const u8 *my_bmp) ; +GRRLIB_texImg* GRRLIB_LoadTexture (const u8 *my_img); +GRRLIB_texImg* GRRLIB_LoadTexturePNG (const u8 *my_png); +GRRLIB_texImg* GRRLIB_LoadTextureJPG (const u8 *my_jpg); +GRRLIB_texImg* GRRLIB_LoadTextureJPGEx (const u8 *my_jpg, const int); +GRRLIB_texImg* GRRLIB_LoadTextureBMP (const u8 *my_bmp); //------------------------------------------------------------------------------ // GRRLIB_gecko.c - USB_Gecko output facilities diff --git a/GRRLIB/GRRLIB/grrlib/GRRLIB_cExtn.h b/GRRLIB/GRRLIB/grrlib/GRRLIB_cExtn.h index 3924ca2..c143f61 100644 --- a/GRRLIB/GRRLIB/grrlib/GRRLIB_cExtn.h +++ b/GRRLIB/GRRLIB/grrlib/GRRLIB_cExtn.h @@ -36,8 +36,8 @@ THE SOFTWARE. INLINE u8 GRRLIB_ClampVar8 (f32 Value) { Value = roundf(Value); - if (Value < 0) Value = 0 ; - else if (Value > 255) Value = 255 ; + if (Value < 0) Value = 0; + else if (Value > 255) Value = 255; return (u8)Value; } diff --git a/GRRLIB/GRRLIB/grrlib/GRRLIB_collision.h b/GRRLIB/GRRLIB/grrlib/GRRLIB_collision.h index 59f66a1..c116e25 100644 --- a/GRRLIB/GRRLIB/grrlib/GRRLIB_collision.h +++ b/GRRLIB/GRRLIB/grrlib/GRRLIB_collision.h @@ -85,5 +85,5 @@ bool GRRLIB_RectOnRect (const int rect1x, const int rect1y, return GRRLIB_PtInRect(rect1x, rect1y, rect1w, rect1h, rect2x, rect2y) || GRRLIB_PtInRect(rect1x, rect1y, rect1w, rect1h, rect2x+rect2w, rect2y) || GRRLIB_PtInRect(rect1x, rect1y, rect1w, rect1h, rect2x+rect2w, rect2y+rect2h) || - GRRLIB_PtInRect(rect1x, rect1y, rect1w, rect1h, rect2x, rect2y+rect2h) ; + GRRLIB_PtInRect(rect1x, rect1y, rect1w, rect1h, rect2x, rect2y+rect2h); } diff --git a/GRRLIB/GRRLIB/grrlib/GRRLIB_texSetup.h b/GRRLIB/GRRLIB/grrlib/GRRLIB_texSetup.h index 4a05139..d6161cf 100644 --- a/GRRLIB/GRRLIB/grrlib/GRRLIB_texSetup.h +++ b/GRRLIB/GRRLIB/grrlib/GRRLIB_texSetup.h @@ -71,7 +71,7 @@ void GRRLIB_FlushTex (GRRLIB_texImg *tex) { INLINE void GRRLIB_FreeTexture (GRRLIB_texImg *tex) { if(tex != NULL) { - if (tex->data != NULL) free(tex->data) ; + if (tex->data != NULL) free(tex->data); free(tex); tex = NULL; } diff --git a/examples/3D_CubedTileDemo/source/main.c b/examples/3D_CubedTileDemo/source/main.c index 7353c83..493e38b 100644 --- a/examples/3D_CubedTileDemo/source/main.c +++ b/examples/3D_CubedTileDemo/source/main.c @@ -159,9 +159,9 @@ int main() { while(1) { GRRLIB_2dMode(); WPAD_ScanPads(); - if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) break ; - if (WPAD_ButtonsHeld(0) & WPAD_BUTTON_PLUS) camZ+=20.0f ; - if (WPAD_ButtonsHeld(0) & WPAD_BUTTON_MINUS) camZ-=20.0f ; + if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) break; + if (WPAD_ButtonsHeld(0) & WPAD_BUTTON_PLUS) camZ+=20.0f; + if (WPAD_ButtonsHeld(0) & WPAD_BUTTON_MINUS) camZ-=20.0f; if((dirx==0) && (diry==0)) { if (WPAD_ButtonsHeld(0) & WPAD_BUTTON_LEFT) { diry=-4; idperso=15;} diff --git a/examples/funsin/source/main.c b/examples/funsin/source/main.c index 29fbf40..1d09725 100644 --- a/examples/funsin/source/main.c +++ b/examples/funsin/source/main.c @@ -10,7 +10,7 @@ int main() { int offset1, offset2, offset3, offset4; - int periode1, periode2, periode3, periode4 ; + int periode1, periode2, periode3, periode4; int length1, length2, length3, length4; int amp1, amp2, amp3, amp4; int origine1, origine2, origine3, origine4; @@ -67,14 +67,14 @@ int main() { while(1) { GRRLIB_FillScreen(0x000000FF); WPAD_ScanPads(); // Scan the wiimotes - if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) break ; - old1=siny1;old2=siny2;old3=siny3;old4=siny4; + if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) break; + old1=siny1; old2=siny2; old3=siny3; old4=siny4; for(x=0;x<=640;x++) { - siny1+=pas1; - siny2+=pas2; - siny3+=pas3; + siny1+=pas1; + siny2+=pas2; + siny3+=pas3; siny4+=pas4; GX_Begin(GX_LINES, GX_VTXFMT0, 2); @@ -91,9 +91,9 @@ int main() { GX_End(); } - siny1=old1+(adc1*pas1); - siny2=old2+(adc2*pas2); - siny3=old3+(adc3*pas3); + siny1=old1+(adc1*pas1); + siny2=old2+(adc2*pas2); + siny3=old3+(adc3*pas3); siny4=old4+(adc4*pas4); GRRLIB_Render(); // Render the frame buffer to the TV