1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Moved hardcoded terrain palette-cycling animations to config

This commit is contained in:
Ivan Savenko
2023-07-05 22:07:20 +03:00
parent 4911cf0bd4
commit 3bce245780
10 changed files with 147 additions and 66 deletions

View File

@@ -18,6 +18,21 @@
VCMI_LIB_NAMESPACE_BEGIN
struct DLL_LINKAGE TerrainPaletteAnimation
{
/// index of first color to cycle
int32_t start;
/// total numbers of colors to cycle
int32_t length;
template <typename Handler> void serialize(Handler& h, const int version)
{
h & start;
h & length;
}
};
class DLL_LINKAGE TerrainType : public EntityT<TerrainId>
{
friend class TerrainTypeHandler;
@@ -57,6 +72,8 @@ public:
std::string horseSound;
std::string horseSoundPenalty;
std::vector<TerrainPaletteAnimation> paletteAnimation;
TerrainId rockTerrain;
RiverId river;
int moveCost;
@@ -87,6 +104,7 @@ public:
h & terrainViewPatterns;
h & rockTerrain;
h & river;
h & paletteAnimation;
h & id;
h & moveCost;