diff options
| author | Kim Kulling <[email protected]> | 2018-08-04 10:32:16 +0200 |
|---|---|---|
| committer | Kim Kulling <[email protected]> | 2018-08-04 10:32:16 +0200 |
| commit | ecf8bff4aa8b13357398e42243d1b00fd114c579 (patch) | |
| tree | c0283562db86abf79a7018e87163a3cbdba40d1e /examples/textures/textures_image_text.c | |
| parent | d999e5a016446c74bfb2c2b55febcf89fa46e527 (diff) | |
| download | raylib-ecf8bff4aa8b13357398e42243d1b00fd114c579.tar.gz raylib-ecf8bff4aa8b13357398e42243d1b00fd114c579.zip | |
Fix compiler warnings, first part
Diffstat (limited to 'examples/textures/textures_image_text.c')
| -rw-r--r-- | examples/textures/textures_image_text.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/textures/textures_image_text.c b/examples/textures/textures_image_text.c index 78d25c14..c69f0f55 100644 --- a/examples/textures/textures_image_text.c +++ b/examples/textures/textures_image_text.c @@ -26,12 +26,12 @@ int main() Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM) // Draw over image using custom font - ImageDrawTextEx(&parrots, (Vector2){ 20, 20 }, font, "[Parrots font drawing]", font.baseSize, 0, WHITE); + ImageDrawTextEx(&parrots, (Vector2){ 20.0f, 20.0f }, font, "[Parrots font drawing]", (float)font.baseSize, 0.0f, WHITE); Texture2D texture = LoadTextureFromImage(parrots); // Image converted to texture, uploaded to GPU memory (VRAM) UnloadImage(parrots); // Once image has been converted to texture and uploaded to VRAM, it can be unloaded from RAM - Vector2 position = { screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 20 }; + Vector2 position = { (float)(screenWidth/2 - texture.width/2), (float)(screenHeight/2 - texture.height/2 - 20) }; bool showFont = false; @@ -60,7 +60,7 @@ int main() // Draw text directly using sprite font DrawTextEx(font, "[Parrots font drawing]", (Vector2){ position.x + 20, - position.y + 20 + 280 }, font.baseSize, 0, WHITE); + position.y + 20 + 280 }, (float)font.baseSize, 0.0f, WHITE); } else DrawTexture(font.texture, screenWidth/2 - font.texture.width/2, 50, BLACK); |
