mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
ERM: revert unwanted changes
This commit is contained in:
parent
061941b3ac
commit
fc9bbfb895
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
class CArmedInstance;
|
class CArmedInstance;
|
||||||
|
|
||||||
class DLL_EXPORT engineBase //subclasses create fuzzylite variables with "new" that are not freed - this is desired as fl::Engine wants to destroy these...
|
class engineBase //subclasses create fuzzylite variables with "new" that are not freed - this is desired as fl::Engine wants to destroy these...
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
fl::Engine engine;
|
fl::Engine engine;
|
||||||
@ -24,7 +24,7 @@ public:
|
|||||||
engineBase();
|
engineBase();
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLL_EXPORT TacticalAdvantageEngine : public engineBase //TODO: rework this engine, it does not work well (example: AI hero with 140 beholders attacked 150 beholders - engine lowered danger 50000 -> 35000)
|
class TacticalAdvantageEngine : public engineBase //TODO: rework this engine, it does not work well (example: AI hero with 140 beholders attacked 150 beholders - engine lowered danger 50000 -> 35000)
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TacticalAdvantageEngine();
|
TacticalAdvantageEngine();
|
||||||
@ -37,7 +37,7 @@ private:
|
|||||||
fl::OutputVariable * threat;
|
fl::OutputVariable * threat;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLL_EXPORT HeroMovementGoalEngineBase : public engineBase //in future - maybe derive from some (GoalEngineBase : public engineBase) class for handling non-movement goals with common utility for goal engines
|
class HeroMovementGoalEngineBase : public engineBase //in future - maybe derive from some (GoalEngineBase : public engineBase) class for handling non-movement goals with common utility for goal engines
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HeroMovementGoalEngineBase();
|
HeroMovementGoalEngineBase();
|
||||||
@ -55,14 +55,14 @@ private:
|
|||||||
float calculateTurnDistanceInputValue(const Goals::AbstractGoal & goal) const;
|
float calculateTurnDistanceInputValue(const Goals::AbstractGoal & goal) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLL_EXPORT VisitTileEngine : public HeroMovementGoalEngineBase
|
class VisitTileEngine : public HeroMovementGoalEngineBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VisitTileEngine();
|
VisitTileEngine();
|
||||||
float evaluate(Goals::VisitTile & goal);
|
float evaluate(Goals::VisitTile & goal);
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLL_EXPORT VisitObjEngine : public HeroMovementGoalEngineBase
|
class VisitObjEngine : public HeroMovementGoalEngineBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VisitObjEngine();
|
VisitObjEngine();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "../../Global.h"
|
#include "../../Global.h"
|
||||||
|
|
||||||
#include <luajit/lua.hpp>
|
#include <lua.hpp>
|
||||||
|
|
||||||
// This header should be treated as a pre compiled header file(PCH) in the compiler building settings.
|
// This header should be treated as a pre compiled header file(PCH) in the compiler building settings.
|
||||||
|
|
||||||
|
@ -153,30 +153,11 @@ set(mock_HEADERS
|
|||||||
vcai/mock_VCAI_CGoal.h
|
vcai/mock_VCAI_CGoal.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT FORCE_BUNDLED_FL)
|
|
||||||
find_package(FuzzyLite)
|
|
||||||
else()
|
|
||||||
set(FL_FOUND FALSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT FL_FOUND)
|
|
||||||
set(FL_BUILD_BINARY OFF CACHE BOOL "")
|
|
||||||
set(FL_BUILD_SHARED OFF CACHE BOOL "")
|
|
||||||
set(FL_BUILD_TESTS OFF CACHE BOOL "")
|
|
||||||
add_subdirectory(AI/FuzzyLite/fuzzylite EXCLUDE_FROM_ALL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory_with_folder("3rdparty" googletest EXCLUDE_FROM_ALL)
|
add_subdirectory_with_folder("3rdparty" googletest EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
add_executable(vcmitest ${test_SRCS} ${test_HEADERS} ${mock_HEADERS})
|
add_executable(vcmitest ${test_SRCS} ${test_HEADERS} ${mock_HEADERS})
|
||||||
target_link_libraries(vcmitest PRIVATE gtest gmock vcmi ${SYSTEM_LIBS} VCAI)
|
target_link_libraries(vcmitest PRIVATE gtest gmock vcmi ${SYSTEM_LIBS} VCAI)
|
||||||
|
|
||||||
if(FL_FOUND)
|
|
||||||
target_link_libraries(vcmitest PRIVATE ${FL_LIBRARIES})
|
|
||||||
else()
|
|
||||||
target_link_libraries(vcmitest PRIVATE fl-static)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(vcmitest
|
target_include_directories(vcmitest
|
||||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
PRIVATE ${GTestSrc}
|
PRIVATE ${GTestSrc}
|
||||||
|
Loading…
Reference in New Issue
Block a user