1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

More robust management of body/shadow/overlay split

This commit is contained in:
Ivan Savenko
2024-11-17 17:54:55 +00:00
parent c82db9d574
commit 251155d913
19 changed files with 163 additions and 176 deletions

View File

@@ -9,18 +9,11 @@
*/
#pragma once
#include "IImage.h"
#include "../../lib/filesystem/ResourcePath.h"
#include "../../lib/constants/EntityIdentifiers.h"
enum class EImageLayer
{
ALL,
BODY,
SHADOW,
OVERLAY,
};
struct ImageLocator
{
std::optional<ImagePath> image;
@@ -28,13 +21,13 @@ struct ImageLocator
int defFrame = -1;
int defGroup = -1;
PlayerColor playerColored = PlayerColor::CANNOT_DETERMINE;
PlayerColor playerColored = PlayerColor::CANNOT_DETERMINE; // FIXME: treat as identical to blue to avoid double-loading?
bool verticalFlip = false;
bool horizontalFlip = false;
int8_t scalingFactor = 0; // 0 = auto / use default scaling
int8_t preScaledFactor = 1;
EImageLayer layer = EImageLayer::ALL;
EImageBlitMode layer = EImageBlitMode::OPAQUE;
ImageLocator() = default;
ImageLocator(const AnimationPath & path, int frame, int group);