From 84bdc5c994e99034fabbe6363c52218ec7676405 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Thu, 2 Mar 2017 10:58:14 +0100 Subject: [PATCH] Compilation fixes for MSVS. Apparently it doesn't like structs converted to class, needs more investigation. --- lib/BattleHex.h | 5 ++--- lib/BattleState.cpp | 1 + lib/CObstacleInstance.cpp | 1 + test/Battlefield.cpp | 2 +- test/Test.vcxproj | 1 + test/Test.vcxproj.filters | 1 + 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/BattleHex.h b/lib/BattleHex.h index 9b657941f..506a4c1a3 100644 --- a/lib/BattleHex.h +++ b/lib/BattleHex.h @@ -8,13 +8,12 @@ * */ #pragma once -#include #include "GameConstants.h" // for battle stacks' positions -class DLL_LINKAGE BattleHex +struct DLL_LINKAGE BattleHex { -public: +//public: si16 hex; static const si16 INVALID = -1; enum EDir { RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT, LEFT, TOP_LEFT, TOP_RIGHT }; diff --git a/lib/BattleState.cpp b/lib/BattleState.cpp index 1d345ff56..823350df2 100644 --- a/lib/BattleState.cpp +++ b/lib/BattleState.cpp @@ -10,6 +10,7 @@ #include "StdInc.h" #include "BattleState.h" +#include "BattleHex.h" #include #include "VCMI_Lib.h" diff --git a/lib/CObstacleInstance.cpp b/lib/CObstacleInstance.cpp index 5443f3d09..17309344c 100644 --- a/lib/CObstacleInstance.cpp +++ b/lib/CObstacleInstance.cpp @@ -4,6 +4,7 @@ #include "CTownHandler.h" #include "VCMI_Lib.h" #include "spells/CSpellHandler.h" +#include "BattleHex.h" /* * CObstacleInstance.cpp, part of VCMI engine diff --git a/test/Battlefield.cpp b/test/Battlefield.cpp index 3cc2d3354..5bf14cc33 100644 --- a/test/Battlefield.cpp +++ b/test/Battlefield.cpp @@ -9,7 +9,7 @@ */ #include "StdInc.h" #include -#include "lib/BattleHex.h" +#include "../lib/BattleHex.h" BOOST_AUTO_TEST_SUITE(BattlefieldHex_Suite) diff --git a/test/Test.vcxproj b/test/Test.vcxproj index 7d4889f1b..53c478b11 100644 --- a/test/Test.vcxproj +++ b/test/Test.vcxproj @@ -165,6 +165,7 @@ + diff --git a/test/Test.vcxproj.filters b/test/Test.vcxproj.filters index 9cabe2b30..2fea96114 100644 --- a/test/Test.vcxproj.filters +++ b/test/Test.vcxproj.filters @@ -4,6 +4,7 @@ +