1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Some preparation towards mantis #1743:

- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
This commit is contained in:
beegee1
2014-03-17 19:51:07 +00:00
parent 1aff899f5b
commit fe1b16a7ec
22 changed files with 6774 additions and 6695 deletions

View File

@ -598,7 +598,7 @@ void CDrawTerrainOperation::updateTerrainViews()
auto & tile = map->getTile(pos);
if(!pattern.diffImages)
{
tile.terView = gen->getInteger(mapping.first, mapping.second);
tile.terView = gen->nextInt(mapping.first, mapping.second);
tile.extTileFlags = valRslt.flip;
}
else
@ -606,7 +606,7 @@ void CDrawTerrainOperation::updateTerrainViews()
const int framesPerRot = (mapping.second - mapping.first + 1) / pattern.rotationTypesCount;
int flip = (pattern.rotationTypesCount == 2 && valRslt.flip == 2) ? 1 : valRslt.flip;
int firstFrame = mapping.first + flip * framesPerRot;
tile.terView = gen->getInteger(firstFrame, firstFrame + framesPerRot - 1);
tile.terView = gen->nextInt(firstFrame, firstFrame + framesPerRot - 1);
tile.extTileFlags = 0;
}
}