mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Compile fixes for MVS2010
This commit is contained in:
@@ -76,7 +76,7 @@ void CMapGenOptions::setPlayersCnt(si8 value)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Players count of RMG options should be between 1 and " +
|
throw std::runtime_error("Players count of RMG options should be between 1 and " +
|
||||||
std::to_string(PlayerColor::PLAYER_LIMIT_I) + " or CMapGenOptions::RANDOM_SIZE for random.");
|
boost::lexical_cast<std::string>(PlayerColor::PLAYER_LIMIT_I) + " or CMapGenOptions::RANDOM_SIZE for random.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ void CMapGenOptions::setTeamsCnt(si8 value)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Teams count of RMG options should be between 0 and <" +
|
throw std::runtime_error("Teams count of RMG options should be between 0 and <" +
|
||||||
std::to_string(playersCnt) + "(players count) - 1> or CMapGenOptions::RANDOM_SIZE for random.");
|
boost::lexical_cast<std::string>(playersCnt) + "(players count) - 1> or CMapGenOptions::RANDOM_SIZE for random.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void CMapGenOptions::setCompOnlyPlayersCnt(si8 value)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw std::runtime_error(std::string("Computer only players count of RMG options should be ") +
|
throw std::runtime_error(std::string("Computer only players count of RMG options should be ") +
|
||||||
"between 0 and <PlayerColor::PLAYER_LIMIT - " + std::to_string(playersCnt) +
|
"between 0 and <PlayerColor::PLAYER_LIMIT - " + boost::lexical_cast<std::string>(playersCnt) +
|
||||||
"(playersCount)> or CMapGenOptions::RANDOM_SIZE for random.");
|
"(playersCount)> or CMapGenOptions::RANDOM_SIZE for random.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ void CMapGenOptions::setCompOnlyTeamsCnt(si8 value)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw std::runtime_error(std::string("Computer only teams count of RMG options should be ") +
|
throw std::runtime_error(std::string("Computer only teams count of RMG options should be ") +
|
||||||
"between 0 and <" + std::to_string(compOnlyPlayersCnt) +
|
"between 0 and <" + boost::lexical_cast<std::string>(compOnlyPlayersCnt) +
|
||||||
"(compOnlyPlayersCnt) - 1> or CMapGenOptions::RANDOM_SIZE for random.");
|
"(compOnlyPlayersCnt) - 1> or CMapGenOptions::RANDOM_SIZE for random.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v100</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110_xp</PlatformToolset>
|
<PlatformToolset>v100</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
@@ -74,16 +74,16 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>$(VCMI_Out)\scripting\</OutDir>
|
<OutDir>..\..\..</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>$(VCMI_Out)\scripting\</OutDir>
|
<OutDir>$(VCMI_Out)\Scripting\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">
|
||||||
<OutDir>$(VCMI_Out)\scripting\</OutDir>
|
<OutDir>..\..\..\Scripting</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|x64'">
|
||||||
<OutDir>$(VCMI_Out)\scripting\</OutDir>
|
<OutDir>$(VCMI_Out)\Scripting\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -93,6 +93,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>G:\Programowanie\VCMI\libs;G:\Programowanie\VCMI;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">
|
||||||
@@ -103,6 +104,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..;..\..\..\Biblioteki\boost_1_46_1\stage\lib</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
@@ -1666,11 +1666,6 @@ bool CGameHandler::moveHero( ObjectInstanceID hid, int3 dst, ui8 teleporting, Pl
|
|||||||
this->getTilesInRange(tmh.fowRevealed, h->getSightCenter()+(tmh.end-tmh.start), h->getSightRadious(), h->tempOwner, 1);
|
this->getTilesInRange(tmh.fowRevealed, h->getSightCenter()+(tmh.end-tmh.start), h->getSightRadious(), h->tempOwner, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
//use enums as parameters, because doMove(sth, true, false, true) is not readable
|
|
||||||
enum EVisitDest {VISIT_DEST, DONT_VISIT_DEST};
|
|
||||||
enum ELEaveTile {LEAVING_TILE, REMAINING_ON_TILE};
|
|
||||||
enum EGuardLook {CHECK_FOR_GUARDS, IGNORE_GUARDS};
|
|
||||||
|
|
||||||
auto doMove = [&](TryMoveHero::EResult result, EGuardLook lookForGuards,
|
auto doMove = [&](TryMoveHero::EResult result, EGuardLook lookForGuards,
|
||||||
EVisitDest visitDest, ELEaveTile leavingTile) -> bool
|
EVisitDest visitDest, ELEaveTile leavingTile) -> bool
|
||||||
{
|
{
|
||||||
@@ -1711,7 +1706,8 @@ bool CGameHandler::moveHero( ObjectInstanceID hid, int3 dst, ui8 teleporting, Pl
|
|||||||
{
|
{
|
||||||
if(obj != h && obj->blockVisit && !obj->passableFor(h->tempOwner))
|
if(obj != h && obj->blockVisit && !obj->passableFor(h->tempOwner))
|
||||||
{
|
{
|
||||||
return doMove(TryMoveHero::BLOCKING_VISIT, IGNORE_GUARDS, VISIT_DEST, REMAINING_ON_TILE);
|
return doMove(TryMoveHero::BLOCKING_VISIT, this->IGNORE_GUARDS, VISIT_DEST, REMAINING_ON_TILE);
|
||||||
|
//this-> is needed for MVS2010 to recognize scope (?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -84,6 +84,11 @@ class CGameHandler : public IGameCallback, CBattleInfoCallback
|
|||||||
private:
|
private:
|
||||||
void makeStackDoNothing(const CStack * next);
|
void makeStackDoNothing(const CStack * next);
|
||||||
public:
|
public:
|
||||||
|
//use enums as parameters, because doMove(sth, true, false, true) is not readable
|
||||||
|
enum EGuardLook {CHECK_FOR_GUARDS, IGNORE_GUARDS};
|
||||||
|
enum EVisitDest {VISIT_DEST, DONT_VISIT_DEST};
|
||||||
|
enum ELEaveTile {LEAVING_TILE, REMAINING_ON_TILE};
|
||||||
|
|
||||||
CVCMIServer *s;
|
CVCMIServer *s;
|
||||||
std::map<PlayerColor, CConnection*> connections; //player color -> connection to client with interface of that player
|
std::map<PlayerColor, CConnection*> connections; //player color -> connection to client with interface of that player
|
||||||
PlayerStatuses states; //player color -> player state
|
PlayerStatuses states; //player color -> player state
|
||||||
|
Reference in New Issue
Block a user