diff options
| author | Ray <raysan5@gmail.com> | 2016-06-02 01:26:44 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-06-02 01:26:44 +0200 |
| commit | 17878550b1e2dde44fcd1e668c92ca2d96680a28 (patch) | |
| tree | 40811b7f15dc77d88ec80a7029691e034bb53cb8 /src/models.c | |
| parent | 7afa0b09ab00b610ad084026022df788fb787229 (diff) | |
| download | raylib-17878550b1e2dde44fcd1e668c92ca2d96680a28.tar.gz raylib-17878550b1e2dde44fcd1e668c92ca2d96680a28.zip | |
Review heades usage
This is a first step toward a bigger project. Some modules could be
ported to header-only to be used as standalone.
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/models.c b/src/models.c index 962a6470..15565c98 100644 --- a/src/models.c +++ b/src/models.c @@ -26,16 +26,16 @@ #include "raylib.h" #if defined(PLATFORM_ANDROID) - #include "utils.h" // Android fopen function map + #include "utils.h" // Android fopen function map #endif -#include <stdio.h> // Standard input/output functions, used to read model files data -#include <stdlib.h> // Declares malloc() and free() for memory management -#include <string.h> // Required for strcmp() -#include <math.h> // Used for sin, cos, tan +#include <stdio.h> // Required for: FILE, fopen(), fclose(), fscanf(), feof(), rewind(), fgets() +#include <stdlib.h> // Required for: malloc(), free() +#include <string.h> // Required for: strcmp() +#include <math.h> // Required for: sin(), cos() -#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2 -#include "raymath.h" // Required for data type Matrix and Matrix functions +#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2 +#include "raymath.h" // Matrix data type and Matrix functions //---------------------------------------------------------------------------------- // Defines and Macros @@ -605,7 +605,7 @@ Model LoadModel(const char *fileName) // TODO: Initialize default data for model in case loading fails, maybe a cube? - if (strcmp(GetExtension(fileName),"obj") == 0) model.mesh = LoadOBJ(fileName); + if (strcmp(GetExtension(fileName), "obj") == 0) model.mesh = LoadOBJ(fileName); else TraceLog(WARNING, "[%s] Model extension not recognized, it can't be loaded", fileName); if (model.mesh.vertexCount == 0) TraceLog(WARNING, "Model could not be loaded"); @@ -764,7 +764,7 @@ Material LoadMaterial(const char *fileName) { Material material = { 0 }; - if (strcmp(GetExtension(fileName),"mtl") == 0) material = LoadMTL(fileName); + if (strcmp(GetExtension(fileName), "mtl") == 0) material = LoadMTL(fileName); else TraceLog(WARNING, "[%s] Material extension not recognized, it can't be loaded", fileName); return material; |
