@@ -44,11 +44,11 @@ int main() {
4444
4545 camera.SetMode (CAMERA_FIRST_PERSON); // Set a first person camera mode
4646
47- SetTargetFPS (60 ); // Set our game to run at 60 frames-per-second
47+ SetTargetFPS (60 ); // Set our game to run at 60 frames-per-second
4848 // --------------------------------------------------------------------------------------
4949
5050 // Main game loop
51- while (!window.ShouldClose ()) // Detect window close button or ESC key
51+ while (!window.ShouldClose ()) // Detect window close button or ESC key
5252 {
5353 // Update
5454 // ----------------------------------------------------------------------------------
@@ -58,11 +58,11 @@ int main() {
5858 // Draw
5959 // ----------------------------------------------------------------------------------
6060 BeginDrawing ();
61-
61+ {
6262 background.ClearBackground ();
6363
6464 camera.BeginMode ();
65-
65+ {
6666 DrawPlane (Vector3{ 0 .0f , 0 .0f , 0 .0f }, Vector2{ 32 .0f , 32 .0f }, LIGHTGRAY); // Draw ground
6767 DrawCube (Vector3{ -16 .0f , 2 .5f , 0 .0f }, 1 .0f , 5 .0f , 32 .0f , BLUE); // Draw a blue wall
6868 DrawCube (Vector3{ 16 .0f , 2 .5f , 0 .0f }, 1 .0f , 5 .0f , 32 .0f , LIME); // Draw a green wall
@@ -74,16 +74,16 @@ int main() {
7474 positions[i].DrawCube (2 .0f , heights[i], 2 .0f , colors[i]);
7575 positions[i].DrawCubeWires (2 .0f , heights[i], 2 .0f , MAROON);
7676 }
77-
77+ }
7878 camera.EndMode ();
7979
80- DrawRectangle ( 10 , 10 , 220 , 70 , Fade (SKYBLUE, 0 .5f ));
80+ DrawRectangle ( 10 , 10 , 220 , 70 , raylib::Color::SkyBlue (). Fade (0 .5f ));
8181 DrawRectangleLines ( 10 , 10 , 220 , 70 , BLUE);
8282
8383 DrawText (" First person camera default controls:" , 20 , 20 , 10 , BLACK);
8484 DrawText (" - Move with keys: W, A, S, D" , 40 , 40 , 10 , DARKGRAY);
8585 DrawText (" - Mouse move to look around" , 40 , 60 , 10 , DARKGRAY);
86-
86+ }
8787 EndDrawing ();
8888 // ----------------------------------------------------------------------------------
8989 }
0 commit comments