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:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user