Fixed Typecasts
Fixed compiler errors (implicit conversions)
This commit is contained in:
parent
4e3757bc1a
commit
1cc6c02b62
|
|
@ -61,7 +61,7 @@ int main(void)
|
||||||
cameraX = (sin(GetTime()) * 50.0f) - 10.0f;
|
cameraX = (sin(GetTime()) * 50.0f) - 10.0f;
|
||||||
cameraY = cos(GetTime()) * 30.0f;
|
cameraY = cos(GetTime()) * 30.0f;
|
||||||
|
|
||||||
screenSpaceCamera.target = { cameraX, cameraY };
|
screenSpaceCamera.target = (Vector2){ cameraX, cameraY };
|
||||||
|
|
||||||
if (screenSpaceCamera.target.x >= 1 || screenSpaceCamera.target.x <= -1) // Round worldCamera's X, keep the decimals on screenSpaceCamera.
|
if (screenSpaceCamera.target.x >= 1 || screenSpaceCamera.target.x <= -1) // Round worldCamera's X, keep the decimals on screenSpaceCamera.
|
||||||
{
|
{
|
||||||
|
|
@ -105,12 +105,21 @@ int main(void)
|
||||||
// Also the renderTexture's height is flipped (in the source Rectangle), due to OpenGL reasons.
|
// Also the renderTexture's height is flipped (in the source Rectangle), due to OpenGL reasons.
|
||||||
DrawTexturePro(
|
DrawTexturePro(
|
||||||
renderTexture.texture,
|
renderTexture.texture,
|
||||||
{ 0.0f, 0.0f, (float)renderTexture.texture.width, (float)-renderTexture.texture.height },
|
(Rectangle)
|
||||||
{ -virtualRatio, -virtualRatio, screenWidth + (virtualRatio * 2), screenHeight + (virtualRatio * 2) },
|
{
|
||||||
{ 0.0f, 0.0f },
|
0.0f, 0.0f, (float)renderTexture.texture.width, (float)-renderTexture.texture.height
|
||||||
0.0f,
|
},
|
||||||
WHITE
|
(Rectangle)
|
||||||
);
|
{
|
||||||
|
-virtualRatio, -virtualRatio, screenWidth + (virtualRatio * 2), screenHeight + (virtualRatio * 2)
|
||||||
|
},
|
||||||
|
(Vector2)
|
||||||
|
{
|
||||||
|
0.0f, 0.0f
|
||||||
|
},
|
||||||
|
0.0f,
|
||||||
|
WHITE
|
||||||
|
);
|
||||||
|
|
||||||
EndMode2D();
|
EndMode2D();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user