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