From 0d808f6dcbc8af6fbea16a7783b154d5ede5c3fa Mon Sep 17 00:00:00 2001 From: Cubic Love <7754483+cubiclove@users.noreply.github.com> Date: Fri, 5 May 2023 01:27:44 +0100 Subject: [PATCH] Base+Minesweeper: Move assets from /icons/ to /graphics/ The graphics directory is a more suitable home for game assets. --- Base/res/{icons => graphics}/minesweeper/1.png | Bin Base/res/{icons => graphics}/minesweeper/2.png | Bin Base/res/{icons => graphics}/minesweeper/3.png | Bin Base/res/{icons => graphics}/minesweeper/4.png | Bin Base/res/{icons => graphics}/minesweeper/5.png | Bin Base/res/{icons => graphics}/minesweeper/6.png | Bin Base/res/{icons => graphics}/minesweeper/7.png | Bin Base/res/{icons => graphics}/minesweeper/8.png | Bin .../{icons => graphics}/minesweeper/badflag.png | Bin .../minesweeper/consider.png | Bin .../minesweeper/face-bad.png | Bin .../minesweeper/face-default.png | Bin .../minesweeper/face-good.png | Bin .../{icons => graphics}/minesweeper/flag.png | Bin .../{icons => graphics}/minesweeper/mine.png | Bin .../{icons => graphics}/minesweeper/timer.png | Bin Userland/Games/Minesweeper/Field.cpp | 16 ++++++++-------- .../Games/Minesweeper/MinesweeperWindow.gml | 4 ++-- 18 files changed, 10 insertions(+), 10 deletions(-) rename Base/res/{icons => graphics}/minesweeper/1.png (100%) rename Base/res/{icons => graphics}/minesweeper/2.png (100%) rename Base/res/{icons => graphics}/minesweeper/3.png (100%) rename Base/res/{icons => graphics}/minesweeper/4.png (100%) rename Base/res/{icons => graphics}/minesweeper/5.png (100%) rename Base/res/{icons => graphics}/minesweeper/6.png (100%) rename Base/res/{icons => graphics}/minesweeper/7.png (100%) rename Base/res/{icons => graphics}/minesweeper/8.png (100%) rename Base/res/{icons => graphics}/minesweeper/badflag.png (100%) rename Base/res/{icons => graphics}/minesweeper/consider.png (100%) rename Base/res/{icons => graphics}/minesweeper/face-bad.png (100%) rename Base/res/{icons => graphics}/minesweeper/face-default.png (100%) rename Base/res/{icons => graphics}/minesweeper/face-good.png (100%) rename Base/res/{icons => graphics}/minesweeper/flag.png (100%) rename Base/res/{icons => graphics}/minesweeper/mine.png (100%) rename Base/res/{icons => graphics}/minesweeper/timer.png (100%) diff --git a/Base/res/icons/minesweeper/1.png b/Base/res/graphics/minesweeper/1.png similarity index 100% rename from Base/res/icons/minesweeper/1.png rename to Base/res/graphics/minesweeper/1.png diff --git a/Base/res/icons/minesweeper/2.png b/Base/res/graphics/minesweeper/2.png similarity index 100% rename from Base/res/icons/minesweeper/2.png rename to Base/res/graphics/minesweeper/2.png diff --git a/Base/res/icons/minesweeper/3.png b/Base/res/graphics/minesweeper/3.png similarity index 100% rename from Base/res/icons/minesweeper/3.png rename to Base/res/graphics/minesweeper/3.png diff --git a/Base/res/icons/minesweeper/4.png b/Base/res/graphics/minesweeper/4.png similarity index 100% rename from Base/res/icons/minesweeper/4.png rename to Base/res/graphics/minesweeper/4.png diff --git a/Base/res/icons/minesweeper/5.png b/Base/res/graphics/minesweeper/5.png similarity index 100% rename from Base/res/icons/minesweeper/5.png rename to Base/res/graphics/minesweeper/5.png diff --git a/Base/res/icons/minesweeper/6.png b/Base/res/graphics/minesweeper/6.png similarity index 100% rename from Base/res/icons/minesweeper/6.png rename to Base/res/graphics/minesweeper/6.png diff --git a/Base/res/icons/minesweeper/7.png b/Base/res/graphics/minesweeper/7.png similarity index 100% rename from Base/res/icons/minesweeper/7.png rename to Base/res/graphics/minesweeper/7.png diff --git a/Base/res/icons/minesweeper/8.png b/Base/res/graphics/minesweeper/8.png similarity index 100% rename from Base/res/icons/minesweeper/8.png rename to Base/res/graphics/minesweeper/8.png diff --git a/Base/res/icons/minesweeper/badflag.png b/Base/res/graphics/minesweeper/badflag.png similarity index 100% rename from Base/res/icons/minesweeper/badflag.png rename to Base/res/graphics/minesweeper/badflag.png diff --git a/Base/res/icons/minesweeper/consider.png b/Base/res/graphics/minesweeper/consider.png similarity index 100% rename from Base/res/icons/minesweeper/consider.png rename to Base/res/graphics/minesweeper/consider.png diff --git a/Base/res/icons/minesweeper/face-bad.png b/Base/res/graphics/minesweeper/face-bad.png similarity index 100% rename from Base/res/icons/minesweeper/face-bad.png rename to Base/res/graphics/minesweeper/face-bad.png diff --git a/Base/res/icons/minesweeper/face-default.png b/Base/res/graphics/minesweeper/face-default.png similarity index 100% rename from Base/res/icons/minesweeper/face-default.png rename to Base/res/graphics/minesweeper/face-default.png diff --git a/Base/res/icons/minesweeper/face-good.png b/Base/res/graphics/minesweeper/face-good.png similarity index 100% rename from Base/res/icons/minesweeper/face-good.png rename to Base/res/graphics/minesweeper/face-good.png diff --git a/Base/res/icons/minesweeper/flag.png b/Base/res/graphics/minesweeper/flag.png similarity index 100% rename from Base/res/icons/minesweeper/flag.png rename to Base/res/graphics/minesweeper/flag.png diff --git a/Base/res/icons/minesweeper/mine.png b/Base/res/graphics/minesweeper/mine.png similarity index 100% rename from Base/res/icons/minesweeper/mine.png rename to Base/res/graphics/minesweeper/mine.png diff --git a/Base/res/icons/minesweeper/timer.png b/Base/res/graphics/minesweeper/timer.png similarity index 100% rename from Base/res/icons/minesweeper/timer.png rename to Base/res/graphics/minesweeper/timer.png diff --git a/Userland/Games/Minesweeper/Field.cpp b/Userland/Games/Minesweeper/Field.cpp index bd18cc105ca..0f3b28d41e8 100644 --- a/Userland/Games/Minesweeper/Field.cpp +++ b/Userland/Games/Minesweeper/Field.cpp @@ -112,15 +112,15 @@ private: ErrorOr> Field::create(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button) { auto field = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) Field(flag_label, time_label, face_button))); - field->m_mine_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/mine.png"sv)); - field->m_flag_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/flag.png"sv)); - field->m_badflag_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/badflag.png"sv)); - field->m_consider_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/consider.png"sv)); - field->m_default_face_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/face-default.png"sv)); - field->m_good_face_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/face-good.png"sv)); - field->m_bad_face_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/face-bad.png"sv)); + field->m_mine_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/mine.png"sv)); + field->m_flag_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/flag.png"sv)); + field->m_badflag_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/badflag.png"sv)); + field->m_consider_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/consider.png"sv)); + field->m_default_face_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/face-default.png"sv)); + field->m_good_face_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/face-good.png"sv)); + field->m_bad_face_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/minesweeper/face-bad.png"sv)); for (int i = 0; i < 8; ++i) - field->m_number_bitmap[i] = TRY(Gfx::Bitmap::load_from_file(DeprecatedString::formatted("/res/icons/minesweeper/{}.png", i + 1))); + field->m_number_bitmap[i] = TRY(Gfx::Bitmap::load_from_file(DeprecatedString::formatted("/res/graphics/minesweeper/{}.png", i + 1))); field->initialize(); return field; } diff --git a/Userland/Games/Minesweeper/MinesweeperWindow.gml b/Userland/Games/Minesweeper/MinesweeperWindow.gml index b4ca40408ea..2bb4d39e822 100644 --- a/Userland/Games/Minesweeper/MinesweeperWindow.gml +++ b/Userland/Games/Minesweeper/MinesweeperWindow.gml @@ -18,7 +18,7 @@ @GUI::ImageWidget { name: "flag_image" - bitmap: "/res/icons/minesweeper/flag.png" + bitmap: "/res/graphics/minesweeper/flag.png" } @GUI::Label { @@ -39,7 +39,7 @@ @GUI::ImageWidget { name: "time_image" - bitmap: "/res/icons/minesweeper/timer.png" + bitmap: "/res/graphics/minesweeper/timer.png" } @GUI::Label {