2323//------------------------------------------------------------------------------------
2424// Program main entry point
2525//------------------------------------------------------------------------------------
26- int main ( )
26+ int main ( void )
2727{
2828 // Initialization
2929 //--------------------------------------------------------------------------------------
@@ -35,9 +35,9 @@ int main ()
3535 Camera2D camera = { 0 };
3636 camera .zoom = 1.0f ;
3737
38- int zoomMode = 0 ; // 0-Mouse Wheel, 1-Mouse Move
38+ int zoomMode = 0 ; // 0-Mouse Wheel, 1-Mouse Move
3939
40- SetTargetFPS (60 ); // Set our game to run at 60 frames-per-second
40+ SetTargetFPS (60 ); // Set our game to run at 60 frames-per-second
4141 //--------------------------------------------------------------------------------------
4242
4343 // Main game loop
@@ -93,6 +93,7 @@ int main ()
9393 // under the cursor to the screen space point under the cursor at any zoom
9494 camera .target = mouseWorldPos ;
9595 }
96+
9697 if (IsMouseButtonDown (MOUSE_BUTTON_RIGHT ))
9798 {
9899 // Zoom increment
@@ -110,7 +111,6 @@ int main ()
110111 ClearBackground (RAYWHITE );
111112
112113 BeginMode2D (camera );
113-
114114 // Draw the 3d grid, rotated 90 degrees and centered around 0,0
115115 // just so we have something in the XY plane
116116 rlPushMatrix ();
@@ -121,7 +121,6 @@ int main ()
121121
122122 // Draw a reference circle
123123 DrawCircle (GetScreenWidth ()/2 , GetScreenHeight ()/2 , 50 , MAROON );
124-
125124 EndMode2D ();
126125
127126 // Draw mouse reference
@@ -142,5 +141,6 @@ int main ()
142141 //--------------------------------------------------------------------------------------
143142 CloseWindow (); // Close window and OpenGL context
144143 //--------------------------------------------------------------------------------------
144+
145145 return 0 ;
146146}
0 commit comments