commit fd874bd15ba6c1cf71cfd609cf27a4ae84600899 Author: oupson Date: Sun Aug 14 17:32:01 2022 +0200 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc51626 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +build +cmake-build-* + +bin +lib diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..dc366a2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Botcraft"] + path = Botcraft + url = https://github.com/adepierre/Botcraft.git diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..c5c6510 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +AymDroid \ No newline at end of file diff --git a/.idea/AimDroid.iml b/.idea/AimDroid.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/.idea/AimDroid.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..79b3c94 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..208435b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..471ed59 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/AymDroid/CMakeLists.txt b/AymDroid/CMakeLists.txt new file mode 100644 index 0000000..1b6a846 --- /dev/null +++ b/AymDroid/CMakeLists.txt @@ -0,0 +1,39 @@ +project(AymDroidBot) + +# Declaring my source files +set(SRC_FILES + ${PROJECT_SOURCE_DIR}/src/main.cpp +) + +# Declaring my headers (this is not strictly +# necessary, but this will add them to the file +# structure in visual on windows) +set(HDR_FILES + ${PROJECT_SOURCE_DIR}/include/main.hpp +) + +# Create my target +add_executable(${PROJECT_NAME} ${HDR_FILES} ${SRC_FILES}) + +# Add my include folder to the include path +target_include_directories(${PROJECT_NAME} PUBLIC include) + +# Linking my code to botcraft, cmake will handle everything +target_link_libraries(${PROJECT_NAME} botcraft) + +# All this stuff is not really necessary, we just set the output folder +# to be the same than for botcraft so we don't need to manually copy the shared +# library next to the executable +set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "_d") +set_target_properties(${PROJECT_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX "_rd") +if(MSVC) + # To avoid having one subfolder per configuration when building with Visual + set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${BOTCRAFT_OUTPUT_DIR}/bin") + set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${BOTCRAFT_OUTPUT_DIR}/bin") + set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${BOTCRAFT_OUTPUT_DIR}/bin") + set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${BOTCRAFT_OUTPUT_DIR}/bin") + + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${BOTCRAFT_OUTPUT_DIR}/bin") +else() + set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${BOTCRAFT_OUTPUT_DIR}/bin") +endif(MSVC) diff --git a/AymDroid/include/main.hpp b/AymDroid/include/main.hpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/AymDroid/include/main.hpp @@ -0,0 +1 @@ +#pragma once diff --git a/AymDroid/src/main.cpp b/AymDroid/src/main.cpp new file mode 100644 index 0000000..0ed7023 --- /dev/null +++ b/AymDroid/src/main.cpp @@ -0,0 +1,10 @@ +#include "botcraft/AI/SimpleBehaviourClient.hpp" + +int main(int argc, char *argv[]) { + Botcraft::SimpleBehaviourClient client(true); + + client.Connect(argv[1], argv[2], (argc > 3) ? argv[3] : ""); + client.RunBehaviourUntilClosed(); + client.Disconnect(); + return 0; +} diff --git a/Botcraft b/Botcraft new file mode 160000 index 0000000..26c7153 --- /dev/null +++ b/Botcraft @@ -0,0 +1 @@ +Subproject commit 26c71535a8e7b24419488961205474310bfdeb1a diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9a7cc5c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.10) + +project(AymDroid) + +# Here we can set some values for botcraft options +# They will still appear in cmake_gui in windows +set(BOTCRAFT_BUILD_EXAMPLES OFF CACHE BOOL "") + +# This will enter the Botcraft folder and +# process Botcrat/CMakeLists.txt to add its +# targets to our current project +add_subdirectory(Botcraft) + +# This will enter our My_Code folder and +# process My_Code/CMakeLists.txt +add_subdirectory(AymDroid) diff --git a/README.md b/README.md new file mode 100644 index 0000000..1d1dc6e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# AymDroid