From 240a56d9ce957c475598dd3b0df6a196a8dd8298 Mon Sep 17 00:00:00 2001 From: Cubic Love <7754483+cubiclove@users.noreply.github.com> Date: Fri, 5 May 2023 01:14:53 +0100 Subject: [PATCH] Base+CatDog: Move assets from /icons/ to /graphics/ The graphics directory is a more suitable home for demo assets. Also, update the example presenter file which uses a CatDog sprite. --- .../Documents/Example Presentation.presenter | 2 +- Base/res/{icons => graphics}/catdog/alert.png | Bin .../res/{icons => graphics}/catdog/artist.png | Bin Base/res/{icons => graphics}/catdog/erun1.png | Bin Base/res/{icons => graphics}/catdog/erun2.png | Bin .../{icons => graphics}/catdog/inspector.png | Bin .../res/{icons => graphics}/catdog/nerun1.png | Bin .../res/{icons => graphics}/catdog/nerun2.png | Bin Base/res/{icons => graphics}/catdog/nrun1.png | Bin Base/res/{icons => graphics}/catdog/nrun2.png | Bin .../res/{icons => graphics}/catdog/nwrun1.png | Bin .../res/{icons => graphics}/catdog/nwrun2.png | Bin .../res/{icons => graphics}/catdog/serun1.png | Bin .../res/{icons => graphics}/catdog/serun2.png | Bin .../res/{icons => graphics}/catdog/sleep1.png | Bin .../res/{icons => graphics}/catdog/sleep2.png | Bin Base/res/{icons => graphics}/catdog/srun1.png | Bin Base/res/{icons => graphics}/catdog/srun2.png | Bin Base/res/{icons => graphics}/catdog/still.png | Bin .../res/{icons => graphics}/catdog/swrun1.png | Bin .../res/{icons => graphics}/catdog/swrun2.png | Bin Base/res/{icons => graphics}/catdog/wrun1.png | Bin Base/res/{icons => graphics}/catdog/wrun2.png | Bin Userland/Demos/CatDog/CatDog.cpp | 48 +++++++++--------- 24 files changed, 25 insertions(+), 25 deletions(-) rename Base/res/{icons => graphics}/catdog/alert.png (100%) rename Base/res/{icons => graphics}/catdog/artist.png (100%) rename Base/res/{icons => graphics}/catdog/erun1.png (100%) rename Base/res/{icons => graphics}/catdog/erun2.png (100%) rename Base/res/{icons => graphics}/catdog/inspector.png (100%) rename Base/res/{icons => graphics}/catdog/nerun1.png (100%) rename Base/res/{icons => graphics}/catdog/nerun2.png (100%) rename Base/res/{icons => graphics}/catdog/nrun1.png (100%) rename Base/res/{icons => graphics}/catdog/nrun2.png (100%) rename Base/res/{icons => graphics}/catdog/nwrun1.png (100%) rename Base/res/{icons => graphics}/catdog/nwrun2.png (100%) rename Base/res/{icons => graphics}/catdog/serun1.png (100%) rename Base/res/{icons => graphics}/catdog/serun2.png (100%) rename Base/res/{icons => graphics}/catdog/sleep1.png (100%) rename Base/res/{icons => graphics}/catdog/sleep2.png (100%) rename Base/res/{icons => graphics}/catdog/srun1.png (100%) rename Base/res/{icons => graphics}/catdog/srun2.png (100%) rename Base/res/{icons => graphics}/catdog/still.png (100%) rename Base/res/{icons => graphics}/catdog/swrun1.png (100%) rename Base/res/{icons => graphics}/catdog/swrun2.png (100%) rename Base/res/{icons => graphics}/catdog/wrun1.png (100%) rename Base/res/{icons => graphics}/catdog/wrun2.png (100%) diff --git a/Base/home/anon/Documents/Example Presentation.presenter b/Base/home/anon/Documents/Example Presentation.presenter index 4cea71b891..7fb54cf8c1 100644 --- a/Base/home/anon/Documents/Example Presentation.presenter +++ b/Base/home/anon/Documents/Example Presentation.presenter @@ -62,7 +62,7 @@ "type": "image", "rect": [50, 50, 200, 100], - "path": "/res/icons/catdog/alert.png", + "path": "/res/graphics/catdog/alert.png", "scaling": "fit-smallest", "scaling-mode": "nearest-neighbor" } diff --git a/Base/res/icons/catdog/alert.png b/Base/res/graphics/catdog/alert.png similarity index 100% rename from Base/res/icons/catdog/alert.png rename to Base/res/graphics/catdog/alert.png diff --git a/Base/res/icons/catdog/artist.png b/Base/res/graphics/catdog/artist.png similarity index 100% rename from Base/res/icons/catdog/artist.png rename to Base/res/graphics/catdog/artist.png diff --git a/Base/res/icons/catdog/erun1.png b/Base/res/graphics/catdog/erun1.png similarity index 100% rename from Base/res/icons/catdog/erun1.png rename to Base/res/graphics/catdog/erun1.png diff --git a/Base/res/icons/catdog/erun2.png b/Base/res/graphics/catdog/erun2.png similarity index 100% rename from Base/res/icons/catdog/erun2.png rename to Base/res/graphics/catdog/erun2.png diff --git a/Base/res/icons/catdog/inspector.png b/Base/res/graphics/catdog/inspector.png similarity index 100% rename from Base/res/icons/catdog/inspector.png rename to Base/res/graphics/catdog/inspector.png diff --git a/Base/res/icons/catdog/nerun1.png b/Base/res/graphics/catdog/nerun1.png similarity index 100% rename from Base/res/icons/catdog/nerun1.png rename to Base/res/graphics/catdog/nerun1.png diff --git a/Base/res/icons/catdog/nerun2.png b/Base/res/graphics/catdog/nerun2.png similarity index 100% rename from Base/res/icons/catdog/nerun2.png rename to Base/res/graphics/catdog/nerun2.png diff --git a/Base/res/icons/catdog/nrun1.png b/Base/res/graphics/catdog/nrun1.png similarity index 100% rename from Base/res/icons/catdog/nrun1.png rename to Base/res/graphics/catdog/nrun1.png diff --git a/Base/res/icons/catdog/nrun2.png b/Base/res/graphics/catdog/nrun2.png similarity index 100% rename from Base/res/icons/catdog/nrun2.png rename to Base/res/graphics/catdog/nrun2.png diff --git a/Base/res/icons/catdog/nwrun1.png b/Base/res/graphics/catdog/nwrun1.png similarity index 100% rename from Base/res/icons/catdog/nwrun1.png rename to Base/res/graphics/catdog/nwrun1.png diff --git a/Base/res/icons/catdog/nwrun2.png b/Base/res/graphics/catdog/nwrun2.png similarity index 100% rename from Base/res/icons/catdog/nwrun2.png rename to Base/res/graphics/catdog/nwrun2.png diff --git a/Base/res/icons/catdog/serun1.png b/Base/res/graphics/catdog/serun1.png similarity index 100% rename from Base/res/icons/catdog/serun1.png rename to Base/res/graphics/catdog/serun1.png diff --git a/Base/res/icons/catdog/serun2.png b/Base/res/graphics/catdog/serun2.png similarity index 100% rename from Base/res/icons/catdog/serun2.png rename to Base/res/graphics/catdog/serun2.png diff --git a/Base/res/icons/catdog/sleep1.png b/Base/res/graphics/catdog/sleep1.png similarity index 100% rename from Base/res/icons/catdog/sleep1.png rename to Base/res/graphics/catdog/sleep1.png diff --git a/Base/res/icons/catdog/sleep2.png b/Base/res/graphics/catdog/sleep2.png similarity index 100% rename from Base/res/icons/catdog/sleep2.png rename to Base/res/graphics/catdog/sleep2.png diff --git a/Base/res/icons/catdog/srun1.png b/Base/res/graphics/catdog/srun1.png similarity index 100% rename from Base/res/icons/catdog/srun1.png rename to Base/res/graphics/catdog/srun1.png diff --git a/Base/res/icons/catdog/srun2.png b/Base/res/graphics/catdog/srun2.png similarity index 100% rename from Base/res/icons/catdog/srun2.png rename to Base/res/graphics/catdog/srun2.png diff --git a/Base/res/icons/catdog/still.png b/Base/res/graphics/catdog/still.png similarity index 100% rename from Base/res/icons/catdog/still.png rename to Base/res/graphics/catdog/still.png diff --git a/Base/res/icons/catdog/swrun1.png b/Base/res/graphics/catdog/swrun1.png similarity index 100% rename from Base/res/icons/catdog/swrun1.png rename to Base/res/graphics/catdog/swrun1.png diff --git a/Base/res/icons/catdog/swrun2.png b/Base/res/graphics/catdog/swrun2.png similarity index 100% rename from Base/res/icons/catdog/swrun2.png rename to Base/res/graphics/catdog/swrun2.png diff --git a/Base/res/icons/catdog/wrun1.png b/Base/res/graphics/catdog/wrun1.png similarity index 100% rename from Base/res/icons/catdog/wrun1.png rename to Base/res/graphics/catdog/wrun1.png diff --git a/Base/res/icons/catdog/wrun2.png b/Base/res/graphics/catdog/wrun2.png similarity index 100% rename from Base/res/icons/catdog/wrun2.png rename to Base/res/graphics/catdog/wrun2.png diff --git a/Userland/Demos/CatDog/CatDog.cpp b/Userland/Demos/CatDog/CatDog.cpp index 8f8bc9a9d4..598a9db5c0 100644 --- a/Userland/Demos/CatDog/CatDog.cpp +++ b/Userland/Demos/CatDog/CatDog.cpp @@ -22,30 +22,30 @@ ErrorOr> CatDog::create() // So items with the more bits should be placed before items with less bits to // ensure correct matching order. This also means that "Frame2" has to be first. static constexpr Array const image_sources = { - ImageSource { State::Up | State::Right | State::Frame2, "/res/icons/catdog/nerun2.png"sv }, - { State::Up | State::Right, "/res/icons/catdog/nerun1.png"sv }, - { State::Up | State::Left | State::Frame2, "/res/icons/catdog/nwrun2.png"sv }, - { State::Up | State::Left, "/res/icons/catdog/nwrun1.png"sv }, - { State::Down | State::Right | State::Frame2, "/res/icons/catdog/serun2.png"sv }, - { State::Down | State::Right, "/res/icons/catdog/serun1.png"sv }, - { State::Down | State::Left | State::Frame2, "/res/icons/catdog/swrun2.png"sv }, - { State::Down | State::Left, "/res/icons/catdog/swrun1.png"sv }, - { State::Up | State::Frame2, "/res/icons/catdog/nrun2.png"sv }, - { State::Up, "/res/icons/catdog/nrun1.png"sv }, - { State::Down | State::Frame2, "/res/icons/catdog/srun2.png"sv }, - { State::Down, "/res/icons/catdog/srun1.png"sv }, - { State::Left | State::Frame2, "/res/icons/catdog/wrun2.png"sv }, - { State::Left, "/res/icons/catdog/wrun1.png"sv }, - { State::Right | State::Frame2, "/res/icons/catdog/erun2.png"sv }, - { State::Right, "/res/icons/catdog/erun1.png"sv }, - { State::Sleeping | State::Frame2, "/res/icons/catdog/sleep2.png"sv }, - { State::Sleeping, "/res/icons/catdog/sleep1.png"sv }, - { State::Idle | State::Artist, "/res/icons/catdog/artist.png"sv }, - { State::Idle | State::Inspector, "/res/icons/catdog/inspector.png"sv }, - { State::Idle, "/res/icons/catdog/still.png"sv }, - { State::Alert | State::Artist, "/res/icons/catdog/artist.png"sv }, - { State::Alert | State::Inspector, "/res/icons/catdog/inspector.png"sv }, - { State::Alert, "/res/icons/catdog/alert.png"sv } + ImageSource { State::Up | State::Right | State::Frame2, "/res/graphics/catdog/nerun2.png"sv }, + { State::Up | State::Right, "/res/graphics/catdog/nerun1.png"sv }, + { State::Up | State::Left | State::Frame2, "/res/graphics/catdog/nwrun2.png"sv }, + { State::Up | State::Left, "/res/graphics/catdog/nwrun1.png"sv }, + { State::Down | State::Right | State::Frame2, "/res/graphics/catdog/serun2.png"sv }, + { State::Down | State::Right, "/res/graphics/catdog/serun1.png"sv }, + { State::Down | State::Left | State::Frame2, "/res/graphics/catdog/swrun2.png"sv }, + { State::Down | State::Left, "/res/graphics/catdog/swrun1.png"sv }, + { State::Up | State::Frame2, "/res/graphics/catdog/nrun2.png"sv }, + { State::Up, "/res/graphics/catdog/nrun1.png"sv }, + { State::Down | State::Frame2, "/res/graphics/catdog/srun2.png"sv }, + { State::Down, "/res/graphics/catdog/srun1.png"sv }, + { State::Left | State::Frame2, "/res/graphics/catdog/wrun2.png"sv }, + { State::Left, "/res/graphics/catdog/wrun1.png"sv }, + { State::Right | State::Frame2, "/res/graphics/catdog/erun2.png"sv }, + { State::Right, "/res/graphics/catdog/erun1.png"sv }, + { State::Sleeping | State::Frame2, "/res/graphics/catdog/sleep2.png"sv }, + { State::Sleeping, "/res/graphics/catdog/sleep1.png"sv }, + { State::Idle | State::Artist, "/res/graphics/catdog/artist.png"sv }, + { State::Idle | State::Inspector, "/res/graphics/catdog/inspector.png"sv }, + { State::Idle, "/res/graphics/catdog/still.png"sv }, + { State::Alert | State::Artist, "/res/graphics/catdog/artist.png"sv }, + { State::Alert | State::Inspector, "/res/graphics/catdog/inspector.png"sv }, + { State::Alert, "/res/graphics/catdog/alert.png"sv } }; auto catdog = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) CatDog));