diff --git a/GameFiles/CMakeLists.txt b/CMakeLists.txt similarity index 68% rename from GameFiles/CMakeLists.txt rename to CMakeLists.txt index aeeee10..a74b19a 100644 --- a/GameFiles/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,16 +7,14 @@ include_directories(include) link_directories(${CMAKE_SOURCE_DIR}/lib) include_directories(${CMAKE_BINARY_DIR}/include) -INCLUDE(CMakeForceCompiler) -CMAKE_FORCE_CXX_COMPILER(g++ GNU) - +add_compile_options(-m64) set(ENGINE_NAME engine) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_FLAGS "-O4") set(BUILD_SHARED_LIBS True) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../build) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../build) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build) set(CMAKE_BUILD_TYPE Release) if(MINGW) @@ -33,7 +31,7 @@ find_package(GLFW3 REQUIRED) find_package(ASSIMP REQUIRED) find_package(Freetype REQUIRED) -set(LIBS glfw3 gdi32 opengl32 glew32 assimp zlibstatic) +set(LIBS glfw gdi32 opengl32 glew32 assimp zlibstatic) include_directories( "${CMAKE_SOURCE_DIR}/src" @@ -41,11 +39,11 @@ include_directories( ) #make stb_image lib -add_library(stb_image ${CMAKE_SOURCE_DIR}/../../src/stb_image.cpp) +add_library(stb_image ${CMAKE_SOURCE_DIR}/src/stb_image.cpp) set(LIBS ${LIBS} stb_image) #make engine lib -file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/../../src/engine/*.cpp) +file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/engine/*.cpp) add_library(${ENGINE_NAME} ${SOURCES}) set(LIBS ${LIBS} ${FREETYPE_LIBRARIES}) @@ -53,8 +51,8 @@ target_link_libraries(${ENGINE_NAME} ${LIBS}) target_include_directories(${ENGINE_NAME} PRIVATE ${FREETYPE_INCLUDE_DIRS}) #make exe file -file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/../src/*.cpp) -add_executable(${PROJECT_NAME} ${SOURCES} ${CMAKE_SOURCE_DIR}/../src/app.rc) +file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/game/*.cpp) +add_executable(${PROJECT_NAME} ${SOURCES} ${CMAKE_SOURCE_DIR}/src/game/app.rc) target_link_libraries( ${PROJECT_NAME} diff --git a/GameFiles/cmake/empty.txt b/GameFiles/cmake/empty.txt deleted file mode 100644 index e69de29..0000000 diff --git a/GameFiles/comp.bat b/GameFiles/comp.bat deleted file mode 100644 index d6ea348..0000000 --- a/GameFiles/comp.bat +++ /dev/null @@ -1,8 +0,0 @@ -@echo off -move CMakeLists.txt cmake -cd cmake - -cmake -G "MinGW Makefiles" . -mingw32-make -j6 -move CMakeLists.txt .. -pause diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..4723eec --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,2 @@ +*.dll +*.exe \ No newline at end of file diff --git a/GameFiles/build/fonts/Duo-Dunkel.ttf b/build/fonts/Duo-Dunkel.ttf similarity index 100% rename from GameFiles/build/fonts/Duo-Dunkel.ttf rename to build/fonts/Duo-Dunkel.ttf diff --git a/GameFiles/build/objects/stickman/stickman.fbx b/build/objects/stickman/stickman.fbx similarity index 100% rename from GameFiles/build/objects/stickman/stickman.fbx rename to build/objects/stickman/stickman.fbx diff --git a/GameFiles/build/objects/world/world.mtl b/build/objects/world/world.mtl similarity index 100% rename from GameFiles/build/objects/world/world.mtl rename to build/objects/world/world.mtl diff --git a/GameFiles/build/objects/world/world.obj b/build/objects/world/world.obj similarity index 100% rename from GameFiles/build/objects/world/world.obj rename to build/objects/world/world.obj diff --git a/GameFiles/build/shaders/anim.vs b/build/shaders/anim.vs similarity index 100% rename from GameFiles/build/shaders/anim.vs rename to build/shaders/anim.vs diff --git a/GameFiles/build/shaders/depth/anim_depth.vs b/build/shaders/depth/anim_depth.vs similarity index 100% rename from GameFiles/build/shaders/depth/anim_depth.vs rename to build/shaders/depth/anim_depth.vs diff --git a/GameFiles/build/shaders/depth/depth.fs b/build/shaders/depth/depth.fs similarity index 100% rename from GameFiles/build/shaders/depth/depth.fs rename to build/shaders/depth/depth.fs diff --git a/GameFiles/build/shaders/depth/depth.gs b/build/shaders/depth/depth.gs similarity index 100% rename from GameFiles/build/shaders/depth/depth.gs rename to build/shaders/depth/depth.gs diff --git a/GameFiles/build/shaders/depth/depth.vs b/build/shaders/depth/depth.vs similarity index 100% rename from GameFiles/build/shaders/depth/depth.vs rename to build/shaders/depth/depth.vs diff --git a/GameFiles/build/shaders/effect/blur.fs b/build/shaders/effect/blur.fs similarity index 100% rename from GameFiles/build/shaders/effect/blur.fs rename to build/shaders/effect/blur.fs diff --git a/GameFiles/build/shaders/effect/blur.vs b/build/shaders/effect/blur.vs similarity index 100% rename from GameFiles/build/shaders/effect/blur.vs rename to build/shaders/effect/blur.vs diff --git a/GameFiles/build/shaders/effect/hdr.fs b/build/shaders/effect/hdr.fs similarity index 100% rename from GameFiles/build/shaders/effect/hdr.fs rename to build/shaders/effect/hdr.fs diff --git a/GameFiles/build/shaders/effect/hdr.vs b/build/shaders/effect/hdr.vs similarity index 100% rename from GameFiles/build/shaders/effect/hdr.vs rename to build/shaders/effect/hdr.vs diff --git a/GameFiles/build/shaders/effect/postprocessing.fs b/build/shaders/effect/postprocessing.fs similarity index 100% rename from GameFiles/build/shaders/effect/postprocessing.fs rename to build/shaders/effect/postprocessing.fs diff --git a/GameFiles/build/shaders/effect/postprocessing.vs b/build/shaders/effect/postprocessing.vs similarity index 100% rename from GameFiles/build/shaders/effect/postprocessing.vs rename to build/shaders/effect/postprocessing.vs diff --git a/GameFiles/build/shaders/font/font.fs b/build/shaders/font/font.fs similarity index 100% rename from GameFiles/build/shaders/font/font.fs rename to build/shaders/font/font.fs diff --git a/GameFiles/build/shaders/font/font.vs b/build/shaders/font/font.vs similarity index 100% rename from GameFiles/build/shaders/font/font.vs rename to build/shaders/font/font.vs diff --git a/GameFiles/build/shaders/interface.fs b/build/shaders/interface.fs similarity index 100% rename from GameFiles/build/shaders/interface.fs rename to build/shaders/interface.fs diff --git a/GameFiles/build/shaders/interface.vs b/build/shaders/interface.vs similarity index 100% rename from GameFiles/build/shaders/interface.vs rename to build/shaders/interface.vs diff --git a/GameFiles/build/shaders/object.fs b/build/shaders/object.fs similarity index 100% rename from GameFiles/build/shaders/object.fs rename to build/shaders/object.fs diff --git a/GameFiles/build/shaders/object.vs b/build/shaders/object.vs similarity index 100% rename from GameFiles/build/shaders/object.vs rename to build/shaders/object.vs diff --git a/GameFiles/build/shaders/rain.fs b/build/shaders/rain.fs similarity index 100% rename from GameFiles/build/shaders/rain.fs rename to build/shaders/rain.fs diff --git a/GameFiles/build/shaders/rain.vs b/build/shaders/rain.vs similarity index 100% rename from GameFiles/build/shaders/rain.vs rename to build/shaders/rain.vs diff --git a/GameFiles/build/shaders/skybox.fs b/build/shaders/skybox.fs similarity index 100% rename from GameFiles/build/shaders/skybox.fs rename to build/shaders/skybox.fs diff --git a/GameFiles/build/shaders/skybox.vs b/build/shaders/skybox.vs similarity index 100% rename from GameFiles/build/shaders/skybox.vs rename to build/shaders/skybox.vs diff --git a/GameFiles/build/stickman.ico b/build/stickman.ico similarity index 100% rename from GameFiles/build/stickman.ico rename to build/stickman.ico diff --git a/GameFiles/build/textures/cubemap/nx.jpg b/build/textures/cubemap/nx.jpg similarity index 100% rename from GameFiles/build/textures/cubemap/nx.jpg rename to build/textures/cubemap/nx.jpg diff --git a/GameFiles/build/textures/cubemap/ny.jpg b/build/textures/cubemap/ny.jpg similarity index 100% rename from GameFiles/build/textures/cubemap/ny.jpg rename to build/textures/cubemap/ny.jpg diff --git a/GameFiles/build/textures/cubemap/nz.jpg b/build/textures/cubemap/nz.jpg similarity index 100% rename from GameFiles/build/textures/cubemap/nz.jpg rename to build/textures/cubemap/nz.jpg diff --git a/GameFiles/build/textures/cubemap/px.jpg b/build/textures/cubemap/px.jpg similarity index 100% rename from GameFiles/build/textures/cubemap/px.jpg rename to build/textures/cubemap/px.jpg diff --git a/GameFiles/build/textures/cubemap/py.jpg b/build/textures/cubemap/py.jpg similarity index 100% rename from GameFiles/build/textures/cubemap/py.jpg rename to build/textures/cubemap/py.jpg diff --git a/GameFiles/build/textures/cubemap/pz.jpg b/build/textures/cubemap/pz.jpg similarity index 100% rename from GameFiles/build/textures/cubemap/pz.jpg rename to build/textures/cubemap/pz.jpg diff --git a/comp.bat b/comp.bat new file mode 100644 index 0000000..02120d3 --- /dev/null +++ b/comp.bat @@ -0,0 +1,5 @@ +@echo off + +cmake -G "MinGW Makefiles" . +mingw32-make +pause diff --git a/src/engine/support/TextureLoader.hpp b/src/engine/support/TextureLoader.hpp index f672c07..cb7b82f 100644 --- a/src/engine/support/TextureLoader.hpp +++ b/src/engine/support/TextureLoader.hpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include "../Config.hpp" diff --git a/GameFiles/src/Fight.cpp b/src/game/Fight.cpp similarity index 100% rename from GameFiles/src/Fight.cpp rename to src/game/Fight.cpp diff --git a/GameFiles/src/Fight.hpp b/src/game/Fight.hpp similarity index 100% rename from GameFiles/src/Fight.hpp rename to src/game/Fight.hpp diff --git a/GameFiles/src/FightCamera.cpp b/src/game/FightCamera.cpp similarity index 100% rename from GameFiles/src/FightCamera.cpp rename to src/game/FightCamera.cpp diff --git a/GameFiles/src/FightCamera.hpp b/src/game/FightCamera.hpp similarity index 100% rename from GameFiles/src/FightCamera.hpp rename to src/game/FightCamera.hpp diff --git a/GameFiles/src/Game.cpp b/src/game/Game.cpp similarity index 100% rename from GameFiles/src/Game.cpp rename to src/game/Game.cpp diff --git a/GameFiles/src/Game.hpp b/src/game/Game.hpp similarity index 100% rename from GameFiles/src/Game.hpp rename to src/game/Game.hpp diff --git a/GameFiles/src/GameInput.cpp b/src/game/GameInput.cpp similarity index 100% rename from GameFiles/src/GameInput.cpp rename to src/game/GameInput.cpp diff --git a/GameFiles/src/NPC.cpp b/src/game/NPC.cpp similarity index 100% rename from GameFiles/src/NPC.cpp rename to src/game/NPC.cpp diff --git a/GameFiles/src/NPC.hpp b/src/game/NPC.hpp similarity index 100% rename from GameFiles/src/NPC.hpp rename to src/game/NPC.hpp diff --git a/GameFiles/src/Player.cpp b/src/game/Player.cpp similarity index 100% rename from GameFiles/src/Player.cpp rename to src/game/Player.cpp diff --git a/GameFiles/src/Player.hpp b/src/game/Player.hpp similarity index 100% rename from GameFiles/src/Player.hpp rename to src/game/Player.hpp diff --git a/GameFiles/src/RainEffect.cpp b/src/game/RainEffect.cpp similarity index 100% rename from GameFiles/src/RainEffect.cpp rename to src/game/RainEffect.cpp diff --git a/GameFiles/src/RainEffect.hpp b/src/game/RainEffect.hpp similarity index 100% rename from GameFiles/src/RainEffect.hpp rename to src/game/RainEffect.hpp diff --git a/GameFiles/src/app.rc b/src/game/app.rc similarity index 50% rename from GameFiles/src/app.rc rename to src/game/app.rc index ca9027f..ce4b1d0 100644 --- a/GameFiles/src/app.rc +++ b/src/game/app.rc @@ -1,6 +1,6 @@ #ifndef APP_RC #define APP_RC 1 -MAINICON ICON "../build/stickman.ico" +MAINICON ICON "../../build/stickman.ico" #endif diff --git a/GameFiles/src/gui/Button.cpp b/src/game/gui/Button.cpp similarity index 100% rename from GameFiles/src/gui/Button.cpp rename to src/game/gui/Button.cpp diff --git a/GameFiles/src/gui/Button.hpp b/src/game/gui/Button.hpp similarity index 100% rename from GameFiles/src/gui/Button.hpp rename to src/game/gui/Button.hpp diff --git a/GameFiles/src/gui/GUI.cpp b/src/game/gui/GUI.cpp similarity index 100% rename from GameFiles/src/gui/GUI.cpp rename to src/game/gui/GUI.cpp diff --git a/GameFiles/src/gui/GUI.hpp b/src/game/gui/GUI.hpp similarity index 100% rename from GameFiles/src/gui/GUI.hpp rename to src/game/gui/GUI.hpp diff --git a/GameFiles/src/gui/Menu.cpp b/src/game/gui/Menu.cpp similarity index 100% rename from GameFiles/src/gui/Menu.cpp rename to src/game/gui/Menu.cpp diff --git a/GameFiles/src/gui/Menu.hpp b/src/game/gui/Menu.hpp similarity index 100% rename from GameFiles/src/gui/Menu.hpp rename to src/game/gui/Menu.hpp diff --git a/GameFiles/src/main.cpp b/src/game/main.cpp similarity index 100% rename from GameFiles/src/main.cpp rename to src/game/main.cpp diff --git a/GameFiles/src/stickman/StickMan.cpp b/src/game/stickman/StickMan.cpp similarity index 100% rename from GameFiles/src/stickman/StickMan.cpp rename to src/game/stickman/StickMan.cpp diff --git a/GameFiles/src/stickman/StickMan.hpp b/src/game/stickman/StickMan.hpp similarity index 100% rename from GameFiles/src/stickman/StickMan.hpp rename to src/game/stickman/StickMan.hpp diff --git a/GameFiles/src/stickman/StickManAnims.cpp b/src/game/stickman/StickManAnims.cpp similarity index 100% rename from GameFiles/src/stickman/StickManAnims.cpp rename to src/game/stickman/StickManAnims.cpp diff --git a/GameFiles/src/stickman/StickManAnims.hpp b/src/game/stickman/StickManAnims.hpp similarity index 100% rename from GameFiles/src/stickman/StickManAnims.hpp rename to src/game/stickman/StickManAnims.hpp diff --git a/GameFiles/src/stickman/StickManModel.cpp b/src/game/stickman/StickManModel.cpp similarity index 100% rename from GameFiles/src/stickman/StickManModel.cpp rename to src/game/stickman/StickManModel.cpp diff --git a/GameFiles/src/stickman/StickManModel.hpp b/src/game/stickman/StickManModel.hpp similarity index 100% rename from GameFiles/src/stickman/StickManModel.hpp rename to src/game/stickman/StickManModel.hpp