1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

possibly handles all H3 maps inculding RoE

This commit is contained in:
mateuszb
2008-01-08 16:08:25 +00:00
parent ef90e6140f
commit a4e4c97776
4 changed files with 103 additions and 78 deletions

View File

@ -689,7 +689,7 @@ SDL_Surface * CMapHandler::terrainRect(int x, int y, int dx, int dy, int level,
SDL_Rect pp = ttiles[x+bx][y+by][level].objects[h].second.first;
CGHeroInstance * themp = (dynamic_cast<CGHeroInstance*>(ttiles[x+bx][y+by][level].objects[h].first));
if(themp && themp->moveDir && !themp->isStanding)
if(themp && themp->moveDir && !themp->isStanding && themp->ID!=62) //last condition - this is not prison
{
int imgVal = 8;
SDL_Surface * tb;
@ -857,7 +857,7 @@ SDL_Surface * CMapHandler::terrainRect(int x, int y, int dx, int dy, int level,
}
}
}
else if(themp && themp->moveDir && themp->isStanding)
else if(themp && themp->moveDir && themp->isStanding && themp->ID!=62) //last condition - this is not prison
{
int imgVal = 8;
SDL_Surface * tb;
@ -1880,7 +1880,7 @@ std::string CMapHandler::getRandomizedDefName(CGDefInfo *di, CGObjectInstance *
}
}
}
int lvl = atoi(di->name.substr(7, 8).c_str());
int lvl = atoi(di->name.substr(7, 8).c_str()) - 1;
return creGenNames[fraction][lvl];
}
else
@ -1897,7 +1897,7 @@ std::string CMapHandler::getRandomizedDefName(CGDefInfo *di, CGObjectInstance *
possibleTowns.push_back(8);
int fraction = possibleTowns[rand()%possibleTowns.size()];
int lvl = atoi(di->name.substr(7, 8).c_str());
int lvl = atoi(di->name.substr(7, 8).c_str()) - 1;
return creGenNames[fraction][lvl];
}
}