mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-02 23:07:36 +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:
parent
a878f5f79a
commit
9707e73eda
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "../CObjectHandler.h"
|
#include "../CObjectHandler.h"
|
||||||
#include "../CArtHandler.h"
|
#include "../CArtHandler.h"
|
||||||
|
#include "../CDefObjInfoHandler.h"
|
||||||
|
|
||||||
PlayerInfo::PlayerInfo(): p7(0), p8(0), p9(0), canHumanPlay(0), canComputerPlay(0),
|
PlayerInfo::PlayerInfo(): p7(0), p8(0), p9(0), canHumanPlay(0), canComputerPlay(0),
|
||||||
AITactic(0), isFactionRandom(0),
|
AITactic(0), isFactionRandom(0),
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
#include "../VCMI_Lib.h"
|
#include "../VCMI_Lib.h"
|
||||||
#include "../CSpellHandler.h"
|
#include "../CSpellHandler.h"
|
||||||
#include "../CCreatureHandler.h"
|
#include "../CCreatureHandler.h"
|
||||||
|
#include "../CObjectHandler.h"
|
||||||
|
#include "../CDefObjInfoHandler.h"
|
||||||
|
|
||||||
std::unique_ptr<CMap> CMapService::loadMap(const std::string & name)
|
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((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;
|
mapHeader->allowedHeroes[(pos - pom) * 8 + yy] = true;
|
||||||
}
|
}
|
||||||
@ -539,7 +541,7 @@ void CMapLoaderH3M::readAllowedArtifacts()
|
|||||||
{
|
{
|
||||||
if((pos - ist) * 8 + yy < GameConstants::ARTIFACTS_QUANTITY)
|
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;
|
map->allowedArtifact[(pos - ist) * 8 + yy] = false;
|
||||||
}
|
}
|
||||||
@ -601,7 +603,7 @@ void CMapLoaderH3M::readAllowedSpellsAbilities()
|
|||||||
{
|
{
|
||||||
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
|
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;
|
map->allowedSpell[(pos - ist) * 8 + yy] = false;
|
||||||
}
|
}
|
||||||
@ -619,7 +621,7 @@ void CMapLoaderH3M::readAllowedSpellsAbilities()
|
|||||||
{
|
{
|
||||||
if((pos - ist) * 8 + yy < GameConstants::SKILL_QUANTITY)
|
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;
|
map->allowedAbilities[(pos - ist) * 8 + yy] = false;
|
||||||
}
|
}
|
||||||
@ -722,7 +724,7 @@ void CMapLoaderH3M::readPredefinedHeroes()
|
|||||||
{
|
{
|
||||||
if((pos - ist) * 8 + yy < GameConstants::SPELLS_QUANTITY)
|
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);
|
hero->spells.insert((pos - ist) * 8 + yy);
|
||||||
}
|
}
|
||||||
@ -1273,7 +1275,7 @@ void CMapLoaderH3M::readObjects()
|
|||||||
{
|
{
|
||||||
if((pos - ist) * 8 + yy < GameConstants::SKILL_QUANTITY)
|
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);
|
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((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);
|
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((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);
|
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((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);
|
nt->possibleSpells.push_back((pos - ist) * 8 + yy);
|
||||||
}
|
}
|
||||||
|
@ -310,10 +310,10 @@
|
|||||||
<ClInclude Include="Filesystem\CMemoryStream.h" />
|
<ClInclude Include="Filesystem\CMemoryStream.h" />
|
||||||
<ClInclude Include="Filesystem\CResourceLoader.h" />
|
<ClInclude Include="Filesystem\CResourceLoader.h" />
|
||||||
<ClInclude Include="Filesystem\ISimpleResourceLoader.h" />
|
<ClInclude Include="Filesystem\ISimpleResourceLoader.h" />
|
||||||
<ClCompile Include="Map\CCampaignHandler.h" />
|
<ClInclude Include="Map\CCampaignHandler.h" />
|
||||||
<ClCompile Include="Map\CMap.h" />
|
<ClInclude Include="Map\CMap.h" />
|
||||||
<ClCompile Include="Map\CMapInfo.h" />
|
<ClInclude Include="Map\CMapInfo.h" />
|
||||||
<ClCompile Include="Map\CMapService.h" />
|
<ClInclude Include="Map\CMapService.h" />
|
||||||
<ClInclude Include="GameConstants.h" />
|
<ClInclude Include="GameConstants.h" />
|
||||||
<ClInclude Include="HeroBonus.h" />
|
<ClInclude Include="HeroBonus.h" />
|
||||||
<ClInclude Include="CBattleCallback.h" />
|
<ClInclude Include="CBattleCallback.h" />
|
||||||
@ -334,4 +334,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
x
Reference in New Issue
Block a user