Parcourir la source

some folder mamnagementg

vlod il y a 3 ans
Parent
commit
62fcd7e24a

+ 13 - 9
Pika/CMakeLists.txt

@@ -32,11 +32,12 @@ add_subdirectory(thirdparty/imgui-docking)
 
 
 #Define some macros for the project sources
-file(GLOB_RECURSE PIKA_SOURCES_CORE_CONFIG	CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/coreConfig/*.cpp")
-file(GLOB_RECURSE PIKA_SOURCES_CORE_EDITOR	CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaEditor/*.cpp")
-file(GLOB_RECURSE PIKA_SOURCES_CORE_RUNTIME CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaRuntime/*.cpp")
-file(GLOB_RECURSE PIKA_SOURCES_CORE_STD		CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaSTD/*.cpp")
-file(GLOB_RECURSE PIKA_SOURCES_GAMEPLAY		CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/gameplay/*.cpp")
+file(GLOB_RECURSE PIKA_SOURCES_CORE_CONFIG			CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/coreConfig/*.cpp")
+file(GLOB_RECURSE PIKA_SOURCES_CORE_EDITOR			CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaEditor/*.cpp")
+file(GLOB_RECURSE PIKA_SOURCES_CORE_RUNTIME			CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaRuntime/*.cpp")
+file(GLOB_RECURSE PIKA_SOURCES_CORE_STD				CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaSTD/*.cpp")
+file(GLOB_RECURSE PIKA_SOURCES_GAMEPLAY				CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/gameplay/*.cpp")
+file(GLOB_RECURSE PIKA_SOURCES_CORE_SHARED_RUNTIME	CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/core/sharedRuntime/*.cpp")
 
 
 
@@ -47,11 +48,13 @@ target_compile_definitions(pikaCore PUBLIC PIKA_DEVELOPMENT)
 
 set_property(TARGET pikaCore PROPERTY CXX_STANDARD 17)
 target_sources(pikaCore PRIVATE 
-	"${PIKA_SOURCES_CORE_CONFIG}" "${PIKA_SOURCES_CORE_EDITOR}" "${PIKA_SOURCES_CORE_RUNTIME}" "${PIKA_SOURCES_CORE_STD}")
+	"${PIKA_SOURCES_CORE_CONFIG}" "${PIKA_SOURCES_CORE_EDITOR}" "${PIKA_SOURCES_CORE_RUNTIME}"
+	"${PIKA_SOURCES_CORE_STD}" "${PIKA_SOURCES_CORE_SHARED_RUNTIME}")
 target_include_directories(pikaCore PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/coreConfig/")
 target_include_directories(pikaCore PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaEditor/")
 target_include_directories(pikaCore PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaRuntime/")
 target_include_directories(pikaCore PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaSTD/")
+target_include_directories(pikaCore PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/sharedRuntime/")
 target_link_libraries(pikaCore PRIVATE glad glfw gl2d glm stb_image stb_truetype imgui)
 #################^^^^^^^^#############################
 
@@ -62,11 +65,11 @@ add_library(pikaGameplay SHARED)
 target_compile_definitions(pikaGameplay PUBLIC PIKA_DEVELOPMENT)
 set_property(TARGET pikaGameplay PROPERTY CXX_STANDARD 17)
 target_sources(pikaGameplay PRIVATE "${PIKA_SOURCES_CORE_CONFIG}" 
-	"${PIKA_SOURCES_CORE_STD}" "${PIKA_SOURCES_GAMEPLAY}" "${PIKA_SOURCES_CORE_RUNTIME}")
+	"${PIKA_SOURCES_CORE_STD}" "${PIKA_SOURCES_GAMEPLAY}" "${PIKA_SOURCES_CORE_SHARED_RUNTIME}")
 target_include_directories(pikaGameplay PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaSTD/")
 target_include_directories(pikaGameplay PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/coreConfig/")
 target_include_directories(pikaGameplay PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/gameplay/")
-target_include_directories(pikaGameplay PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaRuntime/")
+target_include_directories(pikaGameplay PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/sharedRuntime/")
 target_link_libraries(pikaGameplay PRIVATE glad glfw gl2d glm stb_image stb_truetype imgui)
 #################^^^^^^^^^^^^^^############################
 
@@ -80,12 +83,13 @@ set_property(TARGET pikaProduction PROPERTY CXX_STANDARD 17)
 
 target_sources(pikaProduction PRIVATE 
 	"${PIKA_SOURCES_CORE_CONFIG}" "${PIKA_SOURCES_CORE_EDITOR}" 
-	"${PIKA_SOURCES_CORE_RUNTIME}" "${PIKA_SOURCES_CORE_STD}" "${PIKA_SOURCES_GAMEPLAY}")
+	"${PIKA_SOURCES_CORE_RUNTIME}" "${PIKA_SOURCES_CORE_STD}" "${PIKA_SOURCES_GAMEPLAY}" "${PIKA_SOURCES_CORE_SHARED_RUNTIME}")
 target_include_directories(pikaProduction PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/coreConfig/")
 target_include_directories(pikaProduction PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaEditor/")
 target_include_directories(pikaProduction PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaRuntime/")
 target_include_directories(pikaProduction PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/pikaSTD/")
 target_include_directories(pikaProduction PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/gameplay/")
+target_include_directories(pikaProduction PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/core/sharedRuntime/")
 
 target_link_libraries(pikaProduction PRIVATE glad glfw gl2d glm stb_image stb_truetype imgui)
 

+ 1 - 0
Pika/core/coreConfig/README.md

@@ -1,2 +1,3 @@
 # CoreConfig
+
 Some configuration constants and variables.

+ 1 - 0
Pika/core/pikaEditor/README.md

@@ -1,2 +1,3 @@
 # pikaEditor
+
 The code for the editor.

+ 3 - 1
Pika/core/pikaRuntime/README.md

@@ -1,11 +1,13 @@
 # pikaRuntime
+
+Here lies code exclussive to the runtime. The gameplay doesn't have acces to it.
+
 The runtime will launch the editor or the game and will provide it all the necessary things (like memory management).
 
 The runtime is versatile and can be launched with different parameters to provide both for the editor or the game.
 The shipping version of the game will lik the runtime with the game logic and disable editor specific things at compile time.
 
 
-
 --- The process of loading a container
 
 - The runtime will request the dll all the container names

+ 1 - 1
Pika/core/pikaRuntime/dllLoader/dllLoader.h

@@ -3,7 +3,7 @@
 #include <glad/glad.h> //used to not conflict with glfw
 #include <GLFW/glfw3.h>
 #include <pikaImgui/pikaImgui.h>
-#include <dllLoader/containerInformation.h>
+#include <containerInformation.h>
 #include <vector>
 #include <baseContainer.h>
 #include <pikaAllocator/memoryArena.h>

+ 14 - 14
Pika/core/pikaRuntime/pikaMain.cpp

@@ -83,20 +83,20 @@ int main()
 
 	#pragma region editor stuff
 
-		if (ImGui::BeginMenuBar())
-		{
-
-			if (ImGui::BeginMenu("Open..."))
-			{
-
-				ImGui::Text("menu text");
-
-				ImGui::EndMenu();
-			}
-
-
-			ImGui::EndMenuBar();
-		}
+		//if (ImGui::BeginMenuBar())
+		//{
+		//
+		//	if (ImGui::BeginMenu("Open..."))
+		//	{
+		//
+		//		ImGui::Text("menu text");
+		//
+		//		ImGui::EndMenu();
+		//	}
+		//
+		//
+		//	ImGui::EndMenuBar();
+		//}
 
 		logWindow.update(logs);
 

+ 0 - 3
Pika/core/pikaRuntime/runtimeContainer/runtimeContainer.cpp

@@ -1,3 +0,0 @@
-#include <runtimeContainer/runtimeContainer.h>
-
-

+ 3 - 1
Pika/core/pikaSTD/README.md

@@ -1,2 +1,4 @@
 # pikaSTD
-Standard functionality libraries for Pika like error reporting, allocators, etc.
+
+Standard functionality libraries for Pika like error reporting, allocators, etc.
+This functionality is used by the engine but not related so here you find things like you find in the STD library from the cpp.

+ 1 - 1
Pika/core/pikaSTD/pikaAllocator/memoryArena.h

@@ -1,5 +1,5 @@
 #pragma once
-#include <dllLoader/containerInformation.h>
+#include <containerInformation.h>
 
 namespace pika
 {

+ 4 - 0
Pika/core/sharedRuntime/README.md

@@ -0,0 +1,4 @@
+# sharedRuntime
+
+This functionality is used to merge the runtime to the gameplay.
+So here are usually things used by the runtime but that have to be passed to gameplay or gameplay has to know about them.

+ 0 - 0
Pika/core/pikaSTD/baseContainer.h → Pika/core/sharedRuntime/baseContainer.h


+ 0 - 0
Pika/core/pikaRuntime/dllLoader/containerInformation.h → Pika/core/sharedRuntime/containerInformation.h


+ 0 - 0
Pika/core/pikaSTD/pikaContext.h → Pika/core/sharedRuntime/pikaContext.h


+ 0 - 0
Pika/core/pikaSTD/pikaImgui/README.md → Pika/core/sharedRuntime/pikaImgui/README.md


+ 0 - 0
Pika/core/pikaSTD/pikaImgui/pikaImgui.cpp → Pika/core/sharedRuntime/pikaImgui/pikaImgui.cpp


+ 0 - 0
Pika/core/pikaSTD/pikaImgui/pikaImgui.h → Pika/core/sharedRuntime/pikaImgui/pikaImgui.h


+ 0 - 0
Pika/core/pikaRuntime/windowSystemm/callbacks.cpp → Pika/core/sharedRuntime/windowSystemm/callbacks.cpp


+ 0 - 0
Pika/core/pikaRuntime/windowSystemm/callbacks.h → Pika/core/sharedRuntime/windowSystemm/callbacks.h


+ 0 - 0
Pika/core/pikaRuntime/windowSystemm/input.h → Pika/core/sharedRuntime/windowSystemm/input.h


+ 0 - 0
Pika/core/pikaRuntime/windowSystemm/window.cpp → Pika/core/sharedRuntime/windowSystemm/window.cpp


+ 0 - 0
Pika/core/pikaRuntime/windowSystemm/window.h → Pika/core/sharedRuntime/windowSystemm/window.h


+ 3 - 0
Pika/gameplay/README.md

@@ -0,0 +1,3 @@
+# gameplay
+
+Here lies the gameplay code. All the containers and also some logic used to load them.

+ 1 - 1
Pika/gameplay/dll/README.md

@@ -1,4 +1,4 @@
-#dll
+# dll
 
 Here is the logic that will merge the runtime to the containers. On development mode all containers will live inside a dll.
 On release mode this functions will be compiled directly into the final game.

+ 1 - 2
Pika/gameplay/dll/dllMain.h

@@ -3,9 +3,8 @@
 #include <imgui.h>
 #include <pikaImgui/pikaImgui.h>
 #include <containers.h>
-#include <dllLoader/containerInformation.h>
+#include <containerInformation.h>
 #include <vector>
-#include <dllLoader/dllLoader.h>
 #include <pikaAllocator/memoryArena.h>	
 
 PIKA_API void gameplayStart(pika::PikaContext pikaContext);