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.
This commit is contained in:
Cubic Love 2023-05-05 01:14:53 +01:00 committed by Sam Atkins
parent 1d6f2e5608
commit 240a56d9ce
24 changed files with 25 additions and 25 deletions

View file

@ -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"
}

View file

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 649 B

View file

Before

Width:  |  Height:  |  Size: 617 B

After

Width:  |  Height:  |  Size: 617 B

View file

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 744 B

View file

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 761 B

View file

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

Before

Width:  |  Height:  |  Size: 731 B

After

Width:  |  Height:  |  Size: 731 B

View file

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 762 B

View file

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 636 B

View file

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 713 B

View file

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 775 B

View file

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

View file

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 764 B

View file

Before

Width:  |  Height:  |  Size: 804 B

After

Width:  |  Height:  |  Size: 804 B

View file

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View file

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 605 B

View file

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 626 B

View file

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View file

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 623 B

View file

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 745 B

View file

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 757 B

View file

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 756 B

View file

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 795 B

View file

@ -22,30 +22,30 @@ ErrorOr<NonnullRefPtr<CatDog>> 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<ImageSource, 24> 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));