mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fixed warnings
This commit is contained in:
parent
20acdbbf3b
commit
eef45b5ae8
@ -678,7 +678,7 @@ void CMapHandler::CMapWorldViewBlitter::drawOverlayEx(SDL_Surface * targetSurf)
|
|||||||
|
|
||||||
for(const ObjectPosInfo & iconInfo : *(info->additionalIcons))
|
for(const ObjectPosInfo & iconInfo : *(info->additionalIcons))
|
||||||
{
|
{
|
||||||
if(!iconInfo.pos.z == pos.z)
|
if( iconInfo.pos.z != pos.z)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if((iconInfo.pos.x < topTile.x) || (iconInfo.pos.y < topTile.y))
|
if((iconInfo.pos.x < topTile.x) || (iconInfo.pos.y < topTile.y))
|
||||||
|
@ -377,7 +377,7 @@ TPossibleGuards CBankInfo::getPossibleGuards() const
|
|||||||
for (const JsonNode & configEntry : config)
|
for (const JsonNode & configEntry : config)
|
||||||
{
|
{
|
||||||
const JsonNode & guardsInfo = configEntry["guards"];
|
const JsonNode & guardsInfo = configEntry["guards"];
|
||||||
auto stacks = JsonRandom::evaluateCreatures(configEntry["guards"]);
|
auto stacks = JsonRandom::evaluateCreatures(guardsInfo);
|
||||||
IObjectInfo::CArmyStructure army;
|
IObjectInfo::CArmyStructure army;
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ public:
|
|||||||
|
|
||||||
TPossibleGuards getPossibleGuards() const;
|
TPossibleGuards getPossibleGuards() const;
|
||||||
|
|
||||||
//I have no idea what do these functions do or were supposed to do - War
|
// These functions should try to evaluate minimal possible/max possible guards to give provide information on possible thread to AI
|
||||||
CArmyStructure minGuards() const;
|
CArmyStructure minGuards() const;
|
||||||
CArmyStructure maxGuards() const;
|
CArmyStructure maxGuards() const;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ private:
|
|||||||
CTileInfo*** tiles;
|
CTileInfo*** tiles;
|
||||||
|
|
||||||
int prisonsRemaining;
|
int prisonsRemaining;
|
||||||
int questArtsRemaining;
|
//int questArtsRemaining;
|
||||||
int monolithIndex;
|
int monolithIndex;
|
||||||
std::vector<ArtifactID> questArtifacts;
|
std::vector<ArtifactID> questArtifacts;
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ void CRmgTemplateZone::fractalize(CMapGenerator* gen)
|
|||||||
//the more treasure density, the greater distance between paths. Scaling is experimental.
|
//the more treasure density, the greater distance between paths. Scaling is experimental.
|
||||||
int totalDensity = 0;
|
int totalDensity = 0;
|
||||||
for (auto ti : treasureInfo)
|
for (auto ti : treasureInfo)
|
||||||
totalDensity =+ ti.density;
|
totalDensity += ti.density;
|
||||||
const float minDistance = 10 * 10; //squared
|
const float minDistance = 10 * 10; //squared
|
||||||
|
|
||||||
for (auto tile : tileinfo)
|
for (auto tile : tileinfo)
|
||||||
@ -2239,7 +2239,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
|
|||||||
auto generateArtInfo = [this](ArtifactID id) -> ObjectInfo
|
auto generateArtInfo = [this](ArtifactID id) -> ObjectInfo
|
||||||
{
|
{
|
||||||
ObjectInfo artInfo;
|
ObjectInfo artInfo;
|
||||||
artInfo.probability = 1e6; //99,9% to spawn that art in first treasure pile
|
artInfo.probability = std::numeric_limits<ui16>::max(); //99,9% to spawn that art in first treasure pile
|
||||||
artInfo.maxPerZone = 1;
|
artInfo.maxPerZone = 1;
|
||||||
artInfo.value = 2000; //treasure art
|
artInfo.value = 2000; //treasure art
|
||||||
artInfo.setTemplate(Obj::ARTIFACT, id, this->terrainType);
|
artInfo.setTemplate(Obj::ARTIFACT, id, this->terrainType);
|
||||||
|
Loading…
Reference in New Issue
Block a user