1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

MSVC compile fixes:

* in projct file some headers were marked as compile objects
* pow(int,int) is ambiguous
* some missing includes
This commit is contained in:
Michał W. Urbańczyk 2012-11-03 14:29:54 +00:00
parent a878f5f79a
commit 9707e73eda
3 changed files with 17 additions and 14 deletions

View File

@ -3,6 +3,7 @@
#include "../CObjectHandler.h"
#include "../CArtHandler.h"
#include "../CDefObjInfoHandler.h"
PlayerInfo::PlayerInfo(): p7(0), p8(0), p9(0), canHumanPlay(0), canComputerPlay(0),
AITactic(0), isFactionRandom(0),

View File

@ -11,6 +11,8 @@
#include "../VCMI_Lib.h"
#include "../CSpellHandler.h"
#include "../CCreatureHandler.h"
#include "../CObjectHandler.h"
#include "../CDefObjInfoHandler.h"
std::unique_ptr<CMap> CMapService::loadMap(const std::string & name)
{
@ -473,7 +475,7 @@ void CMapLoaderH3M::readAllowedHeroes()
{
if((pos - pom) * 8 + yy < GameConstants::HEROES_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
mapHeader->allowedHeroes[(pos - pom) * 8 + yy] = true;
}
@ -539,7 +541,7 @@ void CMapLoaderH3M::readAllowedArtifacts()
{
if((pos - ist) * 8 + yy < GameConstants::ARTIFACTS_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
map->allowedArtifact[(pos - ist) * 8 + yy] = false;
}
@ -601,7 +603,7 @@ void CMapLoaderH3M::readAllowedSpellsAbilities()
{
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
map->allowedSpell[(pos - ist) * 8 + yy] = false;
}
@ -619,7 +621,7 @@ void CMapLoaderH3M::readAllowedSpellsAbilities()
{
if((pos - ist) * 8 + yy < GameConstants::SKILL_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
map->allowedAbilities[(pos - ist) * 8 + yy] = false;
}
@ -722,7 +724,7 @@ void CMapLoaderH3M::readPredefinedHeroes()
{
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
hero->spells.insert((pos - ist) * 8 + yy);
}
@ -1273,7 +1275,7 @@ void CMapLoaderH3M::readObjects()
{
if((pos - ist) * 8 + yy < GameConstants::SKILL_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
wh->allowedAbilities.push_back((pos - ist) * 8 + yy);
}
@ -1933,7 +1935,7 @@ CGObjectInstance * CMapLoaderH3M::readHero(int idToBeGiven)
{
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
nhi->spells.insert((pos - ist) * 8 + yy);
}
@ -2283,7 +2285,7 @@ CGTownInstance * CMapLoaderH3M::readTown(int castleID)
{
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
nt->obligatorySpells.push_back((pos - ist) * 8 + yy);
}
@ -2300,7 +2302,7 @@ CGTownInstance * CMapLoaderH3M::readTown(int castleID)
{
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
{
if(c == (c | static_cast<ui8>(std::pow(2, yy))))
if(c == (c | static_cast<ui8>(std::pow(2., yy))))
{
nt->possibleSpells.push_back((pos - ist) * 8 + yy);
}

View File

@ -310,10 +310,10 @@
<ClInclude Include="Filesystem\CMemoryStream.h" />
<ClInclude Include="Filesystem\CResourceLoader.h" />
<ClInclude Include="Filesystem\ISimpleResourceLoader.h" />
<ClCompile Include="Map\CCampaignHandler.h" />
<ClCompile Include="Map\CMap.h" />
<ClCompile Include="Map\CMapInfo.h" />
<ClCompile Include="Map\CMapService.h" />
<ClInclude Include="Map\CCampaignHandler.h" />
<ClInclude Include="Map\CMap.h" />
<ClInclude Include="Map\CMapInfo.h" />
<ClInclude Include="Map\CMapService.h" />
<ClInclude Include="GameConstants.h" />
<ClInclude Include="HeroBonus.h" />
<ClInclude Include="CBattleCallback.h" />
@ -334,4 +334,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>