1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +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

@@ -19,7 +19,7 @@ typedef std::function<double()> TRand;
/// The random generator randomly generates integers and real numbers("doubles") between
/// a given range. This is a header only class and mainly a wrapper for
/// convenient usage of the boost random API.
/// convenient usage of the standard random API.
class CRandomGenerator
{
public:
@@ -38,7 +38,7 @@ public:
/// e.g.: auto a = gen.getRangeI(0,10); a(); a(); a();
TRandI getRangeI(int lower, int upper)
{
return boost::bind(TIntDist(lower, upper), gen);
return boost::bind(TIntDist(lower, upper), boost::ref(gen));
}
int getInteger(int lower, int upper)
@@ -50,7 +50,7 @@ public:
/// e.g.: auto a = gen.getRangeI(0,10); a(); a(); a();
TRand getRange(double lower, double upper)
{
return boost::bind(TRealDist(lower, upper), gen);
return boost::bind(TRealDist(lower, upper), boost::ref(gen));
}
double getDouble(double lower, double upper)