diff options
| author | Ray <[email protected]> | 2021-04-26 00:36:22 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-26 00:36:22 +0200 |
| commit | bb3303338979dde40168928efc6ea31ed776407d (patch) | |
| tree | 3c9e4652db2f54240655a39202dd73c06520034b /examples/textures | |
| parent | a44815e9395e63644e4adeac928155f1e465aed7 (diff) | |
| parent | 30db611e924ad2ad61137a944a0da4257045cd5f (diff) | |
| download | raylib-bb3303338979dde40168928efc6ea31ed776407d.tar.gz raylib-bb3303338979dde40168928efc6ea31ed776407d.zip | |
Merge branch 'master' of https://github.com/raysan5/raylib
Diffstat (limited to 'examples/textures')
| -rw-r--r-- | examples/textures/textures_mouse_painting.c | 2 | ||||
| -rw-r--r-- | examples/textures/textures_sprite_explosion.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/textures/textures_mouse_painting.c b/examples/textures/textures_mouse_painting.c index 30fd390f..5cfbe6e0 100644 --- a/examples/textures/textures_mouse_painting.c +++ b/examples/textures/textures_mouse_painting.c @@ -177,7 +177,7 @@ int main(void) // Draw drawing circle for reference if (mousePos.y > 50) { - if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) DrawCircleLines(mousePos.x, mousePos.y, brushSize, GRAY); + if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) DrawCircleLines((int)mousePos.x, (int)mousePos.y, brushSize, GRAY); else DrawCircle(GetMouseX(), GetMouseY(), brushSize, colors[colorSelected]); } diff --git a/examples/textures/textures_sprite_explosion.c b/examples/textures/textures_sprite_explosion.c index 900ec966..2394f6a8 100644 --- a/examples/textures/textures_sprite_explosion.c +++ b/examples/textures/textures_sprite_explosion.c @@ -32,8 +32,8 @@ int main(void) Texture2D explosion = LoadTexture("resources/explosion.png"); // Init variables for animation - int frameWidth = explosion.width/NUM_FRAMES_PER_LINE; // Sprite one frame rectangle width - int frameHeight = explosion.height/NUM_LINES; // Sprite one frame rectangle height + float frameWidth = explosion.width/NUM_FRAMES_PER_LINE; // Sprite one frame rectangle width + float frameHeight = explosion.height/NUM_LINES; // Sprite one frame rectangle height int currentFrame = 0; int currentLine = 0; @@ -89,8 +89,8 @@ int main(void) } } - frameRec.x = (float)frameWidth*currentFrame; - frameRec.y = (float)frameHeight*currentLine; + frameRec.x = frameWidth*currentFrame; + frameRec.y = frameHeight*currentLine; //---------------------------------------------------------------------------------- // Draw |
