diff options
| author | victorfisac <[email protected]> | 2016-02-26 14:32:30 +0100 |
|---|---|---|
| committer | victorfisac <[email protected]> | 2016-02-26 14:32:30 +0100 |
| commit | ce56fcb1eda06385b88c1a906f0968d742ff8130 (patch) | |
| tree | 4c82fa8ce61db1ae4af3ab1e174dd8c7d5918919 /examples/core_input_keys.c | |
| parent | f582ab06add085594f2579ee6e7d625212abd204 (diff) | |
| parent | 75a73d94171051037fcf670852877977d9251520 (diff) | |
| download | raylib-ce56fcb1eda06385b88c1a906f0968d742ff8130.tar.gz raylib-ce56fcb1eda06385b88c1a906f0968d742ff8130.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/master'
Diffstat (limited to 'examples/core_input_keys.c')
| -rw-r--r-- | examples/core_input_keys.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/core_input_keys.c b/examples/core_input_keys.c index 99d5e516..b2305246 100644 --- a/examples/core_input_keys.c +++ b/examples/core_input_keys.c @@ -20,7 +20,7 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [core] example - keyboard input"); - Vector2 ballPosition = { screenWidth/2, screenHeight/2 }; + Vector2 ballPosition = { (float)screenWidth/2, (float)screenHeight/2 }; SetTargetFPS(60); // Set target frames-per-second //-------------------------------------------------------------------------------------- @@ -30,10 +30,10 @@ int main() { // Update //---------------------------------------------------------------------------------- - if (IsKeyDown(KEY_RIGHT)) ballPosition.x += 0.8; - if (IsKeyDown(KEY_LEFT)) ballPosition.x -= 0.8; - if (IsKeyDown(KEY_UP)) ballPosition.y -= 0.8; - if (IsKeyDown(KEY_DOWN)) ballPosition.y += 0.8; + if (IsKeyDown(KEY_RIGHT)) ballPosition.x += 0.8f; + if (IsKeyDown(KEY_LEFT)) ballPosition.x -= 0.8f; + if (IsKeyDown(KEY_UP)) ballPosition.y -= 0.8f; + if (IsKeyDown(KEY_DOWN)) ballPosition.y += 0.8f; //---------------------------------------------------------------------------------- // Draw |
