Remove trailing spaces

This commit is contained in:
raysan5 2021-10-17 21:00:20 +02:00
parent 67a1e84859
commit cf12992b6a
8 changed files with 60 additions and 60 deletions

View file

@ -38,15 +38,15 @@ int main(void)
SetTargetFPS(60); // Set desired framerate (frames-per-second)
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
switch(currentScreen)
switch(currentScreen)
{
case LOGO:
case LOGO:
{
// TODO: Update LOGO screen variables here!
@ -58,7 +58,7 @@ int main(void)
currentScreen = TITLE;
}
} break;
case TITLE:
case TITLE:
{
// TODO: Update TITLE screen variables here!
@ -69,16 +69,16 @@ int main(void)
}
} break;
case GAMEPLAY:
{
{
// TODO: Update GAMEPLAY screen variables here!
// Press enter to change to ENDING screen
if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
{
currentScreen = ENDING;
}
}
} break;
case ENDING:
case ENDING:
{
// TODO: Update ENDING screen variables here!
@ -86,63 +86,63 @@ int main(void)
if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
{
currentScreen = TITLE;
}
}
} break;
default: break;
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
switch(currentScreen)
switch(currentScreen)
{
case LOGO:
case LOGO:
{
// TODO: Draw LOGO screen here!
DrawText("LOGO SCREEN", 20, 20, 40, LIGHTGRAY);
DrawText("WAIT for 2 SECONDS...", 290, 220, 20, GRAY);
} break;
case TITLE:
case TITLE:
{
// TODO: Draw TITLE screen here!
DrawRectangle(0, 0, screenWidth, screenHeight, GREEN);
DrawText("TITLE SCREEN", 20, 20, 40, DARKGREEN);
DrawText("PRESS ENTER or TAP to JUMP to GAMEPLAY SCREEN", 120, 220, 20, DARKGREEN);
} break;
case GAMEPLAY:
{
{
// TODO: Draw GAMEPLAY screen here!
DrawRectangle(0, 0, screenWidth, screenHeight, PURPLE);
DrawText("GAMEPLAY SCREEN", 20, 20, 40, MAROON);
DrawText("PRESS ENTER or TAP to JUMP to ENDING SCREEN", 130, 220, 20, MAROON);
} break;
case ENDING:
case ENDING:
{
// TODO: Draw ENDING screen here!
DrawRectangle(0, 0, screenWidth, screenHeight, BLUE);
DrawText("ENDING SCREEN", 20, 20, 40, DARKBLUE);
DrawText("PRESS ENTER or TAP to RETURN to TITLE SCREEN", 120, 220, 20, DARKBLUE);
} break;
default: break;
}
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
// TODO: Unload all loaded data (textures, fonts, audio) here!
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------

View file

@ -39,13 +39,13 @@ int main(void)
// Generic quaternion for operations
Quaternion q1 = { 0 };
// Transform matrices required to draw 4 cylinders
Matrix m1 = { 0 };
Matrix m2 = { 0 };
Matrix m3 = { 0 };
Matrix m4 = { 0 };
// Generic vectors for rotations
Vector3 v1 = { 0 };
Vector3 v2 = { 0 };
@ -95,13 +95,13 @@ int main(void)
model.transform = m1;
DrawModel(model, (Vector3){ -1, 0, 0 }, 1.0f, RED);
model.transform = m2;
DrawModel(model, (Vector3){ 1, 0, 0 }, 1.0f, RED);
model.transform = m3;
DrawModel(model, (Vector3){ 0, 0, 0 }, 1.0f, RED);
model.transform = m4;
DrawModel(model, (Vector3){ 0, 0, -1 }, 1.0f, RED);

View file

@ -84,14 +84,14 @@ int main(void)
//----------------------------------------------------------------------------------
BeginTextureMode(target);
ClearBackground(RAYWHITE);
BeginMode2D(worldSpaceCamera);
DrawRectanglePro(rec01, origin, rotation, BLACK);
DrawRectanglePro(rec02, origin, -rotation, RED);
DrawRectanglePro(rec03, origin, rotation + 45.0f, BLUE);
EndMode2D();
EndTextureMode();
BeginDrawing();
ClearBackground(RED);
@ -109,7 +109,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadRenderTexture(target); // Unload render texture
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------

View file

@ -22,7 +22,7 @@ void DrawScene(void)
{
int count = 5;
float spacing = 4;
// Grid of cube trees on a plane to make a "world"
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
@ -73,10 +73,10 @@ int main(void)
cameraPlayer2.position.y = 3.0f;
RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth / 2, screenHeight);
// Build a flipped rectangle the size of the split view to use for drawing later
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -147,7 +147,7 @@ int main(void)
UnloadRenderTexture(screenPlayer1); // Unload render texture
UnloadRenderTexture(screenPlayer2); // Unload render texture
UnloadTexture(textureGrid); // Unload texture
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------