瀏覽代碼

removed editor and imgui in production

meemknight 3 年之前
父節點
當前提交
2afa894491

+ 3 - 3
Pika/core/coreConfig/pikaConfig.h

@@ -42,18 +42,18 @@
 
 #define PIKA_REMOVE_OPTIONAL_NOVALUE_CHECKS_IN_PRODUCTION 1
 
-#define PIKA_REMOVE_EDITOR_IN_PRODUCATION 0 //todo remove this, just keep the console or sthing
+//#define PIKA_REMOVE_EDITOR_IN_PRODUCATION 1 //todo remove this, just keep the console or sthing
 
 #define PIKA_REMOVE_PUSH_NOTIFICATION_IN_PRODUCTION 0
 
 //#define PIKA_ENABLE_CONSOLE_IN_PRODUCTION 1 //removed for now
 
 
-#define PIKA_CLEAR_SCREEN_BY_ENGINE_IN_PRODUCTION 0
+#define PIKA_CLEAR_SCREEN_BY_ENGINE_IN_PRODUCTION 0 //todo
 #define PIKA_CLEAR_DEPTH_BY_ENGINE_IN_PRODUCTION 0
 
 
-#define PIKA_REMOVE_IMGUI_IN_PRODUCTION 0
+#define PIKA_REMOVE_IMGUI_IN_PRODUCTION 1
 
 
  #define PIKA_ENGINE_SAVES_PATH PIKA_ENGINE_RESOURCES_PATH "/engineSaves/"

+ 3 - 1
Pika/core/coreConfig/pikaConfigInternal.h

@@ -48,8 +48,10 @@
 #endif
 
 
-#if ((defined(PIKA_PRODUCTION) && PIKA_REMOVE_EDITOR_IN_PRODUCATION) || PIKA_SHOULD_REMOVE_IMGUI)
+#if ((defined(PIKA_PRODUCTION)) || PIKA_SHOULD_REMOVE_IMGUI)
 #define PIKA_SHOULD_REMOVE_EDITOR 1
 #else
 #define PIKA_SHOULD_REMOVE_EDITOR 0
 #endif
+
+//#define PIKA_SHOULD_REMOVE_EDITOR 0

+ 1 - 1
Pika/core/pikaEditor/containersWindow/containersWindow.cpp

@@ -1,6 +1,6 @@
 #include "pikaConfig.h"
 
-#if !PIKA_SHOULD_REMOVE_IMGUI
+#if !PIKA_SHOULD_REMOVE_EDITOR
 
 #include "containersWindow.h"
 #include <pikaImgui/pikaImgui.h>

+ 7 - 1
Pika/core/pikaEditor/containersWindow/containersWindow.h

@@ -1,4 +1,8 @@
 #pragma once
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
 #include <IconsForkAwesome.h>
 #include <imgui.h>
 #include <logs/log.h>
@@ -38,4 +42,6 @@ namespace pika
 
 
 
-}
+}
+
+#endif

+ 6 - 0
Pika/core/pikaEditor/editShortcuts/editShortcuts.cpp

@@ -1,3 +1,8 @@
+
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
 #include "editShortcuts.h"
 #include <imgui.h>
 #include <pikaImgui/pikaImgui.h>
@@ -74,3 +79,4 @@ void pika::EditShortcutsWindow::update(pika::ShortcutManager &shortcutManager, b
 
 }
 
+#endif

+ 7 - 2
Pika/core/pikaEditor/editShortcuts/editShortcuts.h

@@ -1,4 +1,9 @@
 #pragma once
+
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
 #include <IconsForkAwesome.h>
 #include <shortcutApi/shortcutApi.h>
 #include <pikaImgui/pikaImgui.h>
@@ -23,6 +28,6 @@ namespace pika
 
 
 
+};
 
-
-};
+#endif

+ 7 - 1
Pika/core/pikaEditor/editor/editor.cpp

@@ -4,6 +4,8 @@
 //https://github.com/meemknight/PikaEngine
 //////////////////////////////////////////
 
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
 #include "editor.h"
 #include <iostream>
 #include "IconsForkAwesome.h"
@@ -11,6 +13,8 @@
 #include <editShortcuts/editShortcuts.h>
 #include <safeSave.h>
 
+
+
 #define DOCK_MAIN_WINDOW_SHORTCUT ICON_FK_EYE_SLASH " Hide main window"
 #define LOGS_SHORTCUT ICON_FK_COMMENT_O " Logs window"
 #define EDIT_SHORTCUTS ICON_FK_PENCIL_SQUARE " Edit shortcuts window"
@@ -274,4 +278,6 @@ void pika::Editor::saveFlagsData()
 
 }
 
-#endif
+#endif
+
+#endif

+ 9 - 1
Pika/core/pikaEditor/editor/editor.h

@@ -5,6 +5,12 @@
 //https://github.com/meemknight/PikaEngine
 //////////////////////////////////////////
 
+
+#include <pikaConfig.h>
+
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
+
 #include <pikaImgui/pikaImgui.h>
 #include <logs/logWindow.h>
 #include <windowSystemm/input.h>
@@ -62,4 +68,6 @@ namespace pika
 
 
 
-}
+}
+
+#endif

+ 12 - 2
Pika/core/pikaEditor/logs/logWindow.cpp

@@ -1,8 +1,18 @@
-#include "logWindow.h"
+
+
+
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
+
+#include "logWindow.h"
 #include <imgui.h>
 #include <IconsForkAwesome.h>
 #include <pikaImgui/pikaImgui.h>
 
+
+
 void pika::LogWindow::init(pika::pikaImgui::ImGuiIdsManager &idManager)
 {
 	imguiId = idManager.getImguiIds();
@@ -74,5 +84,5 @@ void pika::LogWindow::update(pika::LogManager &logManager, bool &open)
 	ImGui::PopID();
 }
 
-
+#endif
 

+ 8 - 0
Pika/core/pikaEditor/logs/logWindow.h

@@ -4,6 +4,11 @@
 #include <imgui.h>
 #include <pikaImgui/pikaImgui.h>
 
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
+
 namespace pika
 {
 
@@ -25,3 +30,6 @@ namespace pika
 	};
 
 }
+
+
+#endif

+ 10 - 0
Pika/core/sharedRuntime/pikaConsoleManager/pikaConsoleWindow.cpp

@@ -1,3 +1,12 @@
+//////////////////////////////////////////
+//pikaConsoleWindow.cpp
+//Luta Vlad(c) 2022
+//https://github.com/meemknight/PikaEngine
+//////////////////////////////////////////
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
 #include "pikaConsoleWindow.h"
 #include <logs/assert.h>
 #include <iostream>
@@ -87,3 +96,4 @@ namespace pika
 
 };
 
+#endif

+ 7 - 1
Pika/core/sharedRuntime/pikaConsoleManager/pikaConsoleWindow.h

@@ -1,4 +1,8 @@
 #pragma once
+
+#include <pikaConfig.h>
+#if !PIKA_SHOULD_REMOVE_EDITOR
+
 #include <pikaImgui/pikaImgui.h>
 #include <logs/log.h>
 #include <pikaSizes.h>
@@ -30,4 +34,6 @@ namespace pika
 	};
 
 
-};
+};
+
+#endif

二進制
Pika/engineResources/record.recording


二進制
Pika/engineResources/record.snapshot


+ 2 - 2
Pika/resources/logs.txt

@@ -1,2 +1,2 @@
-#2022-12-18 15:29:35: Created container: Gameplay
-#2022-12-18 15:29:47: Destroyed continer: Gameplay #1
+#2022-12-21 11:07:19: Created container: Gameplay
+#2022-12-21 11:08:30: Destroyed continer: Gameplay #1