summaryrefslogtreecommitdiffhomepage
path: root/examples/core
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-10-17 21:00:20 +0200
committerraysan5 <[email protected]>2021-10-17 21:00:20 +0200
commitcf12992b6a3bdf1f5332111708aa0200525cc60a (patch)
tree70d3e92415c077e626607ee321e7326f123cbe95 /examples/core
parent67a1e84859f903adb0b1d1ab0605c472d31dab8a (diff)
downloadraylib-cf12992b6a3bdf1f5332111708aa0200525cc60a.tar.gz
raylib-cf12992b6a3bdf1f5332111708aa0200525cc60a.zip
Remove trailing spaces
Diffstat (limited to 'examples/core')
-rw-r--r--examples/core/core_basic_screen_manager.c44
-rw-r--r--examples/core/core_quat_conversion.c10
-rw-r--r--examples/core/core_smooth_pixelperfect.c6
-rw-r--r--examples/core/core_split_screen.c8
4 files changed, 34 insertions, 34 deletions
diff --git a/examples/core/core_basic_screen_manager.c b/examples/core/core_basic_screen_manager.c
index 9c19d862..6051f175 100644
--- a/examples/core/core_basic_screen_manager.c
+++ b/examples/core/core_basic_screen_manager.c
@@ -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
//--------------------------------------------------------------------------------------
diff --git a/examples/core/core_quat_conversion.c b/examples/core/core_quat_conversion.c
index 3fc98b3d..a60e4000 100644
--- a/examples/core/core_quat_conversion.c
+++ b/examples/core/core_quat_conversion.c
@@ -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);
diff --git a/examples/core/core_smooth_pixelperfect.c b/examples/core/core_smooth_pixelperfect.c
index 86a64701..e0c6d197 100644
--- a/examples/core/core_smooth_pixelperfect.c
+++ b/examples/core/core_smooth_pixelperfect.c
@@ -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
//--------------------------------------------------------------------------------------
diff --git a/examples/core/core_split_screen.c b/examples/core/core_split_screen.c
index 1f4242e7..c05c0b32 100644
--- a/examples/core/core_split_screen.c
+++ b/examples/core/core_split_screen.c
@@ -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
//--------------------------------------------------------------------------------------