1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

- Added handler classes CRmgTemplateStorage and CTerrainViewPatternConfig to LibClasses

- Re-organized CMapGenerator
- Created CZone and CTemplate objects in the heap and used pointers
- Added stub classes CZoneGraphGenerator and CZonePlacer (include warnings of unused variables, please ignore them)
- Fixed CRandomGenerator bug that always the same number was produced
- Better structure of Visual Studio project files with using filters
- Updated project files (VS, CMake)
- Excluded compiler warning mismatched-tags (false positive)
- Fixed a bug when compiling with unit tests enabled
This commit is contained in:
beegee1
2013-08-17 12:46:48 +00:00
parent 45c2bd7511
commit 1ac328635a
25 changed files with 2004 additions and 1422 deletions

View File

@ -21,6 +21,7 @@
#include "../lib/mapping/CMapEditManager.h"
#include "../lib/int3.h"
#include "../lib/CRandomGenerator.h"
#include "../lib/VCMI_Lib.h"
BOOST_AUTO_TEST_CASE(CMapEditManager_DrawTerrain_Type)
{
@ -102,10 +103,10 @@ BOOST_AUTO_TEST_CASE(CMapEditManager_DrawTerrain_View)
if(patternParts.size() != 2) throw std::runtime_error("A pattern should consist of two parts, the group and the id. Continue with next pattern.");
const auto & groupStr = patternParts[0];
const auto & id = patternParts[1];
auto terGroup = CTerrainViewPatternConfig::get().getTerrainGroup(groupStr);
auto terGroup = VLC->terviewh->getTerrainGroup(groupStr);
// Get mapping range
const auto & pattern = CTerrainViewPatternConfig::get().getTerrainViewPatternById(terGroup, id);
const auto & pattern = VLC->terviewh->getTerrainViewPatternById(terGroup, id);
const auto & mapping = (*pattern).mapping;
const auto & positionsNode = node["pos"].Vector();