1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00

Added existing HD assets for vcmi mod

Some of our custom assets were actually made in high resolution, and
then - greatly downscaled for use in vcmi.

This PR adds (some of) these assets using recently introduced HD assets
loading support. None of these were upscaled, but rather downscaled from
existing high-resolution version.

Following assets were added:
- vcmi icon for map format - based on our main logo, with no text
- 'defend' icon for stack queue - now also based on our logo, with no
text and sepia effect
- 'wait' icon for stack queue - added only x2 version. Was actually
already present in vcmi mod, but unused.
- icons for creature window (attack/defense/hit points/etc) - it was
based on existing CC0 asset
- 'gear' icon for settings - made from scratch by me.

Will also upload all of these assets in their original resolution to
vcmi-assets repository.
This commit is contained in:
Ivan Savenko 2024-11-22 16:46:48 +00:00
parent b686a639a1
commit e72817c866
24 changed files with 19 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

View File

@ -1,8 +0,0 @@
{
"basepath": "vcmi/battleQueue/",
"images" :
[
{ "frame" : 0, "file" : "defendBig"},
{ "frame" : 1, "file" : "waitBig"}
]
}

View File

@ -1,8 +0,0 @@
{
"basepath": "vcmi/battleQueue/",
"images" :
[
{ "frame" : 0, "file" : "defendSmall"},
{ "frame" : 1, "file" : "waitSmall"}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1066,11 +1066,13 @@ StackQueue::StackBox::StackBox(StackQueue * owner):
roundRect = std::make_shared<TransparentFilledRectangle>(Rect(0, 0, 15, 18), ColorRGBA(0, 0, 0, 255), ColorRGBA(241, 216, 120, 255));
round = std::make_shared<CLabel>(4, 2, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE);
int icon_x = pos.w - 17;
int icon_y = pos.h - 18;
Point iconPos(pos.w - 16, pos.h - 16);
stateIcon = std::make_shared<CAnimImage>(AnimationPath::builtin("VCMI/BATTLEQUEUE/STATESSMALL"), 0, 0, icon_x, icon_y);
stateIcon->visible = false;
defendIcon = std::make_shared<CPicture>(ImagePath::builtin("battle/QueueDefend"), iconPos);
waitIcon = std::make_shared<CPicture>(ImagePath::builtin("battle/QueueWait"), iconPos);
defendIcon->setEnabled(false);
waitIcon->setEnabled(false);
}
roundRect->disable();
}
@ -1106,22 +1108,13 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn, std::
round->setText(tmp);
}
if(stateIcon)
if(!owner->embedded)
{
if(unit->defended((int)turn) || (turn > 0 && unit->defended((int)turn - 1)))
{
stateIcon->setFrame(0, 0);
stateIcon->visible = true;
}
else if(unit->waited((int)turn))
{
stateIcon->setFrame(1, 0);
stateIcon->visible = true;
}
else
{
stateIcon->visible = false;
}
bool defended = unit->defended(turn) || (turn > 0 && unit->defended(turn - 1));
bool waited = unit->waited(turn) && !defended;
defendIcon->setEnabled(defended);
waitIcon->setEnabled(waited);
}
}
else
@ -1131,9 +1124,11 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn, std::
icon->visible = false;
icon->setFrame(0);
amount->setText("");
if(stateIcon)
stateIcon->visible = false;
if(!owner->embedded)
{
defendIcon->setEnabled(false);
waitIcon->setEnabled(false);
}
}
}

View File

@ -260,7 +260,8 @@ class StackQueue : public CIntObject
std::shared_ptr<CPicture> background;
std::shared_ptr<CAnimImage> icon;
std::shared_ptr<CLabel> amount;
std::shared_ptr<CAnimImage> stateIcon;
std::shared_ptr<CPicture> waitIcon;
std::shared_ptr<CPicture> defendIcon;
std::shared_ptr<CLabel> round;
std::shared_ptr<TransparentFilledRectangle> roundRect;