From 9c8385c60574d8a38977992e809340b2d2136fad Mon Sep 17 00:00:00 2001 From: Cubic Love <7754483+cubiclove@users.noreply.github.com> Date: Fri, 5 May 2023 01:22:50 +0100 Subject: [PATCH] Base+FlappyBug: Move assets from /icons/ to /graphics/ The graphics directory is a more suitable home for game assets. --- .../{icons => graphics}/flappybug/background.png | Bin Base/res/{icons => graphics}/flappybug/cloud_0.png | Bin Base/res/{icons => graphics}/flappybug/cloud_1.png | Bin Base/res/{icons => graphics}/flappybug/cloud_2.png | Bin Base/res/{icons => graphics}/flappybug/falling.png | Bin Base/res/{icons => graphics}/flappybug/flapping.png | Bin Userland/Games/FlappyBug/Game.h | 12 ++++++------ 7 files changed, 6 insertions(+), 6 deletions(-) rename Base/res/{icons => graphics}/flappybug/background.png (100%) rename Base/res/{icons => graphics}/flappybug/cloud_0.png (100%) rename Base/res/{icons => graphics}/flappybug/cloud_1.png (100%) rename Base/res/{icons => graphics}/flappybug/cloud_2.png (100%) rename Base/res/{icons => graphics}/flappybug/falling.png (100%) rename Base/res/{icons => graphics}/flappybug/flapping.png (100%) diff --git a/Base/res/icons/flappybug/background.png b/Base/res/graphics/flappybug/background.png similarity index 100% rename from Base/res/icons/flappybug/background.png rename to Base/res/graphics/flappybug/background.png diff --git a/Base/res/icons/flappybug/cloud_0.png b/Base/res/graphics/flappybug/cloud_0.png similarity index 100% rename from Base/res/icons/flappybug/cloud_0.png rename to Base/res/graphics/flappybug/cloud_0.png diff --git a/Base/res/icons/flappybug/cloud_1.png b/Base/res/graphics/flappybug/cloud_1.png similarity index 100% rename from Base/res/icons/flappybug/cloud_1.png rename to Base/res/graphics/flappybug/cloud_1.png diff --git a/Base/res/icons/flappybug/cloud_2.png b/Base/res/graphics/flappybug/cloud_2.png similarity index 100% rename from Base/res/icons/flappybug/cloud_2.png rename to Base/res/graphics/flappybug/cloud_2.png diff --git a/Base/res/icons/flappybug/falling.png b/Base/res/graphics/flappybug/falling.png similarity index 100% rename from Base/res/icons/flappybug/falling.png rename to Base/res/graphics/flappybug/falling.png diff --git a/Base/res/icons/flappybug/flapping.png b/Base/res/graphics/flappybug/flapping.png similarity index 100% rename from Base/res/icons/flappybug/flapping.png rename to Base/res/graphics/flappybug/flapping.png diff --git a/Userland/Games/FlappyBug/Game.h b/Userland/Games/FlappyBug/Game.h index 15241caa71..897cd23efb 100644 --- a/Userland/Games/FlappyBug/Game.h +++ b/Userland/Games/FlappyBug/Game.h @@ -59,8 +59,8 @@ public: public: static ErrorOr construct() { - NonnullRefPtr falling_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/flappybug/falling.png"sv)); - NonnullRefPtr flapping_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/flappybug/flapping.png"sv)); + NonnullRefPtr falling_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/flappybug/falling.png"sv)); + NonnullRefPtr flapping_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/flappybug/flapping.png"sv)); return Bug(move(falling_bitmap), move(flapping_bitmap)); } @@ -139,9 +139,9 @@ public: static ErrorOr construct() { Vector> const cloud_bitmaps { - TRY(Gfx::Bitmap::load_from_file("/res/icons/flappybug/cloud_0.png"sv)), - TRY(Gfx::Bitmap::load_from_file("/res/icons/flappybug/cloud_1.png"sv)), - TRY(Gfx::Bitmap::load_from_file("/res/icons/flappybug/cloud_2.png"sv)), + TRY(Gfx::Bitmap::load_from_file("/res/graphics/flappybug/cloud_0.png"sv)), + TRY(Gfx::Bitmap::load_from_file("/res/graphics/flappybug/cloud_1.png"sv)), + TRY(Gfx::Bitmap::load_from_file("/res/graphics/flappybug/cloud_2.png"sv)), }; return Cloud(move(cloud_bitmaps)); } @@ -173,7 +173,7 @@ private: float m_last_score {}; float m_difficulty {}; float m_restart_cooldown {}; - NonnullRefPtr m_background_bitmap { Gfx::Bitmap::load_from_file("/res/icons/flappybug/background.png"sv).release_value_but_fixme_should_propagate_errors() }; + NonnullRefPtr m_background_bitmap { Gfx::Bitmap::load_from_file("/res/graphics/flappybug/background.png"sv).release_value_but_fixme_should_propagate_errors() }; const Gfx::IntRect m_score_rect { 10, 10, 20, 20 }; const Gfx::IntRect m_text_rect { game_width / 2 - 80, game_height / 2 - 40, 160, 80 };