Code cleaning, removed useless spaces

This commit is contained in:
raysan5 2014-09-29 23:41:05 +02:00
parent e2ff32eb84
commit 51688c004c
30 changed files with 395 additions and 395 deletions

View file

@ -20,15 +20,15 @@ int main()
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - gamepad input");
Vector2 ballPosition = { screenWidth/2, screenHeight/2 };
Vector2 gamepadMovement = { 0, 0 };
SetTargetFPS(60); // Set target frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
@ -37,10 +37,10 @@ int main()
if (IsGamepadAvailable(GAMEPAD_PLAYER1))
{
gamepadMovement = GetGamepadMovement(GAMEPAD_PLAYER1);
ballPosition.x += gamepadMovement.x;
ballPosition.y -= gamepadMovement.y;
if (IsGamepadButtonPressed(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_A))
{
ballPosition.x = screenWidth/2;
@ -48,17 +48,17 @@ int main()
}
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("move the ball with gamepad", 10, 10, 20, DARKGRAY);
DrawCircleV(ballPosition, 50, MAROON);
EndDrawing();
//----------------------------------------------------------------------------------
}
@ -67,6 +67,6 @@ int main()
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}