Format code

This commit is contained in:
Crayon2000 2020-01-13 14:41:26 -05:00
parent 0d76531301
commit 9bc3664484
8 changed files with 23 additions and 23 deletions

View file

@ -93,7 +93,7 @@ All notable changes to this project will be documented in this file.
## 4.0.0 - 2009-03-05 ## 4.0.0 - 2009-03-05
- Color format changed to RGBA for ALL GRRLib functions to fit to GX_Color format and use `GX_Color1u32` - Color format changed to RGBA for ALL GRRLib functions to fit to `GXColor` format and use `GX_Color1u32`
- `GRRLIB_LoadTexture()` now auto detect PNG or JPEG - `GRRLIB_LoadTexture()` now auto detect PNG or JPEG
- GRRLib introduce a new texture structure (easier to handle texture width, height, etc ...) - GRRLib introduce a new texture structure (easier to handle texture width, height, etc ...)
- Add `GRRLIB_InitTileSet()` to initialize a tile set - Add `GRRLIB_InitTileSet()` to initialize a tile set

View file

@ -1,5 +1,5 @@
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
Copyright (c) 2009-2019 The GRRLIB Team Copyright (c) 2009-2020 The GRRLIB Team
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@ -94,24 +94,24 @@ void GRRLIB_3dMode(f32 minDist, f32 maxDist, f32 fov, bool texturemode, bool nor
GX_ClearVtxDesc(); GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_DIRECT); GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);
if(normalmode) { if(normalmode == true) {
GX_SetVtxDesc(GX_VA_NRM, GX_DIRECT); GX_SetVtxDesc(GX_VA_NRM, GX_DIRECT);
} }
GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT); GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT);
if(texturemode) { if(texturemode == true) {
GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT);
} }
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
if(normalmode) { if(normalmode == true) {
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
} }
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
if(texturemode) { if(texturemode == true) {
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
} }
if(texturemode) { if(texturemode == true) {
GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE);
} }
else { else {
@ -342,7 +342,7 @@ void GRRLIB_ObjectViewInv(f32 posx, f32 posy, f32 posz, f32 angx, f32 angy, f32
void GRRLIB_SetTexture(GRRLIB_texImg *tex, bool rep) { void GRRLIB_SetTexture(GRRLIB_texImg *tex, bool rep) {
GXTexObj texObj; GXTexObj texObj;
if (rep) { if (rep == true) {
GX_InitTexObj(&texObj, tex->data, tex->w, tex->h, GX_TF_RGBA8, GX_REPEAT, GX_REPEAT, GX_FALSE); GX_InitTexObj(&texObj, tex->data, tex->w, tex->h, GX_TF_RGBA8, GX_REPEAT, GX_REPEAT, GX_FALSE);
} }
else { else {

View file

@ -1,5 +1,5 @@
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
Copyright (c) 2009-2019 The GRRLIB Team Copyright (c) 2009-2020 The GRRLIB Team
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -211,7 +211,7 @@ GRR_EXTERN u32 fb GRR_INIT(0);
* @section Links * @section Links
* Forum: http://grrlib.santo.fr/forum\n * Forum: http://grrlib.santo.fr/forum\n
* Code: https://github.com/GRRLIB/GRRLIB\n * Code: https://github.com/GRRLIB/GRRLIB\n
* IRC: <a href="irc://irc.efnet.net/grrlib">\#GRRLIB</a> on EFnet * Chat: <a href="irc://irc.efnet.net/grrlib">\#GRRLIB</a> on EFnet
* *
* @section Credits * @section Credits
* Project Leader : NoNameNo\n * Project Leader : NoNameNo\n

View file

@ -18,7 +18,7 @@
int main() { int main() {
float a=0; float a=0;
int cubeZ=5; int cubeZ=5;
int i=0; int i;
float sinx=0; float sinx=0;
GRRLIB_Init(); GRRLIB_Init();

View file

@ -13,7 +13,7 @@
#include "gfx/logo.h" #include "gfx/logo.h"
int main() { int main() {
int i=0; int i;
float a=0; float a=0;
u32 col; u32 col;