From a61d10bb563a6dcf34e868eb7b86d27809e11eac Mon Sep 17 00:00:00 2001 From: Hartmut Seichter Date: Tue, 28 May 2024 23:33:10 +0200 Subject: [PATCH] removed cruft from quickwings --- examples/quickwings/quickwings.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/examples/quickwings/quickwings.cpp b/examples/quickwings/quickwings.cpp index 2d8bd96..9df112b 100644 --- a/examples/quickwings/quickwings.cpp +++ b/examples/quickwings/quickwings.cpp @@ -1,14 +1,10 @@ /** * paradiso - Paradigmen der Softwareentwicklung * - * (c) Copyright 2023 Hartmut Seichter, Robin Rottstädt, brxxh (Hannes Brothuhn) + * (c) Copyright 2023-2024 Hartmut Seichter, Robin Rottstädt, brxxh (Hannes Brothuhn) * */ -#include -#include -#include -#include #include #include #include @@ -20,14 +16,7 @@ #include #include -#include -#include #include -#include -#include -#include - -// #include "lib/image_loader.hpp" const int frame_rate = 60; bool game_over = false; @@ -115,7 +104,7 @@ struct Pipe { .scale = {paradiso::Vector2::make(((500.0f - (500.0f - 52.0f)) / 500.0f) * 2.25f, ((700.0f - (700.0f - 320.0f)) / 700.0f) * 2.25f)}}; paused = true; - + } void update() { @@ -163,7 +152,7 @@ struct Pipe { shader.set_uniform("pivot", pipe_bottom.pivot); shader.set_uniform("scale", pipe_bottom.scale); renderer1.draw(pipe_bottom, shader); - + shader.set_uniform("pivot", pipe_top.pivot); shader.set_uniform("scale", pipe_top.scale); shader.set_uniform("rotation", pipe_top.rotation); @@ -302,12 +291,12 @@ struct QuickWings { if (game_over == true) { paused = true; } - + // Stop game if (paused) { return; } - else { + else { // Apply gravity velocity += gravity; @@ -406,7 +395,7 @@ struct Message { messageSprite.pivot.y() = pos; } } - + void on_keyboard(const paradiso::Window::KeyboardInputStack& input) { if (input.size()) { start = true; @@ -517,7 +506,7 @@ auto main() -> int { grass.draw(shader); message.draw(shader); - if (game_over == true) { + if (game_over == true) { gameover.draw(shader); }