diff --git a/examples/models/models_animation.c b/examples/models/models_animation.c index 4fde9baf3..6386ad76c 100644 --- a/examples/models/models_animation.c +++ b/examples/models/models_animation.c @@ -37,17 +37,17 @@ int main(void) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.fovy = 45.0f; // Camera field-of-view Y - camera.projection = CAMERA_PERSPECTIVE; // Camera mode type + camera.projection = CAMERA_PERSPECTIVE; // Camera mode type - Model model = LoadModel("resources/guy/guy.iqm"); // Load the animated model mesh and basic data - Texture2D texture = LoadTexture("resources/guy/guytex.png"); // Load model texture and set material - SetMaterialTexture(&model.materials[0], MATERIAL_MAP_DIFFUSE, texture); // Set model material map texture + Model model = LoadModel("resources/models/iqm/guy.iqm"); // Load the animated model mesh and basic data + Texture2D texture = LoadTexture("resources/models/iqm/guytex.png"); // Load model texture and set material + SetMaterialTexture(&model.materials[0], MATERIAL_MAP_DIFFUSE, texture); // Set model material map texture Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position // Load animation data int animsCount = 0; - ModelAnimation *anims = LoadModelAnimations("resources/guy/guyanim.iqm", &animsCount); + ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animsCount); int animFrameCounter = 0; SetCameraMode(camera, CAMERA_FREE); // Set free camera mode diff --git a/examples/models/models_loading_gltf.c b/examples/models/models_loading_gltf.c index 3f843c9d4..5ef5fc5aa 100644 --- a/examples/models/models_loading_gltf.c +++ b/examples/models/models_loading_gltf.c @@ -42,14 +42,14 @@ int main(void) Model model[MAX_MODELS] = { 0 }; - model[0] = LoadModel("resources/gltf/raylib_32x32.glb"); - model[1] = LoadModel("resources/gltf/rigged_figure.glb"); - model[2] = LoadModel("resources/gltf/GearboxAssy.glb"); - model[3] = LoadModel("resources/gltf/BoxAnimated.glb"); - model[4] = LoadModel("resources/gltf/AnimatedTriangle.gltf"); - model[5] = LoadModel("resources/gltf/AnimatedMorphCube.glb"); - model[6] = LoadModel("resources/gltf/vertex_colored_object.glb"); - model[7] = LoadModel("resources/gltf/girl.glb"); + model[0] = LoadModel("resources/models/gltf/raylib_32x32.glb"); + model[1] = LoadModel("resources/models/gltf/rigged_figure.glb"); + model[2] = LoadModel("resources/models/gltf/GearboxAssy.glb"); + model[3] = LoadModel("resources/models/gltf/BoxAnimated.glb"); + model[4] = LoadModel("resources/models/gltf/AnimatedTriangle.gltf"); + model[5] = LoadModel("resources/models/gltf/AnimatedMorphCube.glb"); + model[6] = LoadModel("resources/models/gltf/vertex_colored_object.glb"); + model[7] = LoadModel("resources/models/gltf/girl.glb"); int currentModel = 0; diff --git a/examples/models/models_loading_vox.c b/examples/models/models_loading_vox.c index fd268f079..b85c61f3e 100644 --- a/examples/models/models_loading_vox.c +++ b/examples/models/models_loading_vox.c @@ -5,9 +5,9 @@ * This example has been created using raylib 3.8 (www.raylib.com) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * -* Example contributed by Johann Nadalutti +* Example contributed by Johann Nadalutti (@procfxgen) * -* Copyright (c) 2021 Johann Nadalutti +* Copyright (c) 2021 Johann Nadalutti (@procfxgen) * ********************************************************************************************/ diff --git a/examples/models/models_mesh_picking.c b/examples/models/models_mesh_picking.c index 0ac70907b..f48683e4a 100644 --- a/examples/models/models_mesh_picking.c +++ b/examples/models/models_mesh_picking.c @@ -31,16 +31,16 @@ int main(void) camera.target = (Vector3){ 0.0f, 8.0f, 0.0f }; // Camera looking at point camera.up = (Vector3){ 0.0f, 1.6f, 0.0f }; // Camera up vector (rotation towards target) camera.fovy = 45.0f; // Camera field-of-view Y - camera.projection = CAMERA_PERSPECTIVE; // Camera mode type + camera.projection = CAMERA_PERSPECTIVE; // Camera mode type Ray ray = { 0 }; // Picking ray - Model tower = LoadModel("resources/models/turret.obj"); // Load OBJ model - Texture2D texture = LoadTexture("resources/models/turret_diffuse.png"); // Load model texture - tower.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture + Model tower = LoadModel("resources/models/obj/turret.obj"); // Load OBJ model + Texture2D texture = LoadTexture("resources/models/obj/turret_diffuse.png"); // Load model texture + tower.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture - Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position - BoundingBox towerBBox = GetMeshBoundingBox(tower.meshes[0]); // Get mesh bounding box + Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position + BoundingBox towerBBox = GetMeshBoundingBox(tower.meshes[0]); // Get mesh bounding box // Ground quad Vector3 g0 = (Vector3){ -50.0f, 0.0f, -50.0f }; diff --git a/src/rmodels.c b/src/rmodels.c index 985729850..d98560ba6 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4289,8 +4289,8 @@ static Model LoadIQM(const char *fileName) // Load IQM animation data static ModelAnimation* LoadIQMModelAnimations(const char *fileName, unsigned int *animCount) { -#define IQM_MAGIC "INTERQUAKEMODEL" // IQM file magic number -#define IQM_VERSION 2 // only IQM version 2 supported + #define IQM_MAGIC "INTERQUAKEMODEL" // IQM file magic number + #define IQM_VERSION 2 // only IQM version 2 supported unsigned int fileSize = 0; unsigned char *fileData = LoadFileData(fileName, &fileSize);