Code cleaning, removed useless spaces
This commit is contained in:
parent
e2ff32eb84
commit
51688c004c
30 changed files with 395 additions and 395 deletions
|
@ -19,11 +19,11 @@ int main()
|
|||
int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles");
|
||||
|
||||
|
||||
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||
Texture2D texture = LoadTexture("resources/raylib_logo.png"); // Texture loading
|
||||
|
||||
// NOTE: Source rectangle (part of the texture to use for drawing)
|
||||
// NOTE: Source rectangle (part of the texture to use for drawing)
|
||||
Rectangle sourceRec = { 128, 128, 128, 128 };
|
||||
|
||||
// NOTE: Destination rectangle (screen rectangle where drawing part of texture)
|
||||
|
@ -32,7 +32,7 @@ int main()
|
|||
// NOTE: Origin of the texture in case of rotation, it's relative to destination rectangle size
|
||||
Vector2 origin = { 128, 128 };
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
|
@ -40,19 +40,19 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
|
||||
// NOTE: Using DrawTexturePro() we can easily rotate and scale the part of the texture we draw
|
||||
DrawTexturePro(texture, sourceRec, destRec, origin, 45, LIGHTGRAY);
|
||||
|
||||
|
||||
DrawLine(destRec.x, 0, destRec.x, screenHeight, RED);
|
||||
DrawLine(0, destRec.y, screenWidth, destRec.y, RED);
|
||||
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ int main()
|
|||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Texture unloading
|
||||
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue