summaryrefslogtreecommitdiffhomepage
path: root/examples/models
diff options
context:
space:
mode:
authorRay <[email protected]>2019-05-27 00:18:15 +0200
committerRay <[email protected]>2019-05-27 00:18:15 +0200
commit87774a0a21f8d2998b4dc13e989005270476ae92 (patch)
tree4228376c752b1760be44cc8582725ecac522939b /examples/models
parent241c4c8d14225bdf30c168802d4b16b59d5043e0 (diff)
downloadraylib-87774a0a21f8d2998b4dc13e989005270476ae92.tar.gz
raylib-87774a0a21f8d2998b4dc13e989005270476ae92.zip
Review variables initialization
Diffstat (limited to 'examples/models')
-rw-r--r--examples/models/models_box_collisions.c2
-rw-r--r--examples/models/models_cubicmap.c2
-rw-r--r--examples/models/models_first_person_maze.c2
-rw-r--r--examples/models/models_heightmap.c2
-rw-r--r--examples/models/models_mesh_generation.c4
-rw-r--r--examples/models/models_obj_viewer.c2
-rw-r--r--examples/models/models_orthographic_projection.c2
-rw-r--r--examples/models/models_skybox.c2
8 files changed, 9 insertions, 9 deletions
diff --git a/examples/models/models_box_collisions.c b/examples/models/models_box_collisions.c
index 0dd0710e..7a937ea7 100644
--- a/examples/models/models_box_collisions.c
+++ b/examples/models/models_box_collisions.c
@@ -21,7 +21,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - box collisions");
// Define the camera to look into our 3d world
- Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Vector3 playerPosition = { 0.0f, 1.0f, 2.0f };
Vector3 playerSize = { 1.0f, 2.0f, 1.0f };
diff --git a/examples/models/models_cubicmap.c b/examples/models/models_cubicmap.c
index f399a56e..f5087845 100644
--- a/examples/models/models_cubicmap.c
+++ b/examples/models/models_cubicmap.c
@@ -21,7 +21,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - cubesmap loading and drawing");
// Define the camera to look into our 3d world
- Camera camera = {{ 16.0f, 14.0f, 16.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 16.0f, 14.0f, 16.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Image image = LoadImage("resources/cubicmap.png"); // Load cubicmap image (RAM)
Texture2D cubicmap = LoadTextureFromImage(image); // Convert image to texture to display (VRAM)
diff --git a/examples/models/models_first_person_maze.c b/examples/models/models_first_person_maze.c
index 42363747..07c51b9a 100644
--- a/examples/models/models_first_person_maze.c
+++ b/examples/models/models_first_person_maze.c
@@ -23,7 +23,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - first person maze");
// Define the camera to look into our 3d world
- Camera camera = {{ 0.2f, 0.4f, 0.2f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 0.2f, 0.4f, 0.2f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Image imMap = LoadImage("resources/cubicmap.png"); // Load cubicmap image (RAM)
Texture2D cubicmap = LoadTextureFromImage(imMap); // Convert image to texture to display (VRAM)
diff --git a/examples/models/models_heightmap.c b/examples/models/models_heightmap.c
index e242db16..a2c2e310 100644
--- a/examples/models/models_heightmap.c
+++ b/examples/models/models_heightmap.c
@@ -21,7 +21,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - heightmap loading and drawing");
// Define our custom camera to look into our 3d world
- Camera camera = {{ 18.0f, 16.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 18.0f, 16.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM)
diff --git a/examples/models/models_mesh_generation.c b/examples/models/models_mesh_generation.c
index cfc3bdd6..6c0ae653 100644
--- a/examples/models/models_mesh_generation.c
+++ b/examples/models/models_mesh_generation.c
@@ -27,7 +27,7 @@ int main(void)
Texture2D texture = LoadTextureFromImage(checked);
UnloadImage(checked);
- Model models[NUM_MODELS];
+ Model models[NUM_MODELS] = { 0 };
models[0] = LoadModelFromMesh(GenMeshPlane(2, 2, 5, 5));
models[1] = LoadModelFromMesh(GenMeshCube(2.0f, 1.0f, 2.0f));
@@ -42,7 +42,7 @@ int main(void)
for (int i = 0; i < NUM_MODELS; i++) models[i].materials[0].maps[MAP_DIFFUSE].texture = texture;
// Define the camera to look into our 3d world
- Camera camera = {{ 5.0f, 5.0f, 5.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 5.0f, 5.0f, 5.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
// Model drawing position
Vector3 position = { 0.0f, 0.0f, 0.0f };
diff --git a/examples/models/models_obj_viewer.c b/examples/models/models_obj_viewer.c
index dc6787e7..83c8f2f1 100644
--- a/examples/models/models_obj_viewer.c
+++ b/examples/models/models_obj_viewer.c
@@ -23,7 +23,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib example - obj viewer");
// Define the camera to look into our 3d world
- Camera camera = {{ 30.0f, 30.0f, 30.0f }, { 0.0f, 10.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 30.0f, 30.0f, 30.0f }, { 0.0f, 10.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Model model = LoadModel("resources/models/turret.obj"); // Load default model obj
Texture2D texture = LoadTexture("resources/models/turret_diffuse.png"); // Load default model texture
diff --git a/examples/models/models_orthographic_projection.c b/examples/models/models_orthographic_projection.c
index ca9d83c9..8c9b5b1c 100644
--- a/examples/models/models_orthographic_projection.c
+++ b/examples/models/models_orthographic_projection.c
@@ -28,7 +28,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - geometric shapes");
// Define the camera to look into our 3d world
- Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, FOVY_PERSPECTIVE, CAMERA_PERSPECTIVE };
+ Camera camera = { { 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, FOVY_PERSPECTIVE, CAMERA_PERSPECTIVE };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c
index 1693d9bc..bad29b96 100644
--- a/examples/models/models_skybox.c
+++ b/examples/models/models_skybox.c
@@ -21,7 +21,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - skybox loading and drawing");
// Define the camera to look into our 3d world
- Camera camera = {{ 1.0f, 1.0f, 1.0f }, { 4.0f, 1.0f, 4.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = { { 1.0f, 1.0f, 1.0f }, { 4.0f, 1.0f, 4.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
// Load skybox model
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);