From e5ee8fdad3e1edc02d77290bbbec0be2fe75510d Mon Sep 17 00:00:00 2001 From: CatChow0 <thetrueshibadoggo@gmail.com> Date: Tue, 13 May 2025 21:50:05 +0200 Subject: [PATCH] Patch Update - BigCube Is Back - V10.4.2 --- .../.idea/workspace.xml | 46 +++++++++---------- enginecustom/imgui.ini | 6 +-- enginecustom/src/inc/system/imguiManager.h | 2 + enginecustom/src/inc/system/modelclass.h | 3 +- enginecustom/src/src/system/imguiManager.cpp | 18 ++++++++ enginecustom/src/src/system/modelclass.cpp | 17 +------ 6 files changed, 49 insertions(+), 43 deletions(-) diff --git a/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml b/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml index 5fc6bda..a15e645 100644 --- a/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml +++ b/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml @@ -6,10 +6,10 @@ <component name="ChangeListManager"> <list default="true" id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment=""> <change beforePath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/enginecustom/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/modelclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/modelclass.h" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/object.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/object.h" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/modelclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/modelclass.cpp" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> @@ -150,7 +150,6 @@ <setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> <setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> <setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> - <setting file="cidr-memory-view://23" root0="FORCE_HIGHLIGHTING" /> <setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/d3d11.h" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/include/Inc/VertexTypes.h" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" /> @@ -169,25 +168,25 @@ <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> - <component name="PropertiesComponent"><![CDATA[{ - "keyToString": { - "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true", - "C++ Project.enginecustom.executor": "Run", - "C/C++ Project.enginecustom.executor": "Debug", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.git.unshallow": "true", - "SHARE_PROJECT_CONFIGURATION_FILES": "true", - "git-widget-placeholder": "main", - "ignore.virus.scanning.warn.message": "true", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "settings.editor.selected.configurable": "preferences.build.unityPlugin", - "vue.rearranger.settings.migration": "true" + <component name="PropertiesComponent">{ + "keyToString": { + "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true", + "C++ Project.enginecustom.executor": "Run", + "C/C++ Project.enginecustom.executor": "Run", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.git.unshallow": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "git-widget-placeholder": "main", + "ignore.virus.scanning.warn.message": "true", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "preferences.build.unityPlugin", + "vue.rearranger.settings.migration": "true" } -}]]></component> +}</component> <component name="RunManager" selected="C/C++ Project.enginecustom"> <configuration name="KhaoticDemo" type="CppProject" factoryName="C++ Project"> <configuration_1 setup="1"> @@ -313,7 +312,8 @@ <workItem from="1746719840054" duration="991000" /> <workItem from="1746795732153" duration="33000" /> <workItem from="1746795828588" duration="592000" /> - <workItem from="1747049871967" duration="8976000" /> + <workItem from="1747049871967" duration="9350000" /> + <workItem from="1747136509645" duration="3939000" /> </task> <task id="LOCAL-00001" summary="Minor update - viewport window tweak"> <option name="closed" value="true" /> diff --git a/enginecustom/imgui.ini b/enginecustom/imgui.ini index e80e6e9..5a9460a 100644 --- a/enginecustom/imgui.ini +++ b/enginecustom/imgui.ini @@ -16,8 +16,8 @@ Collapsed=0 DockId=0x00000007,0 [Window][Terrain] -Pos=0,328 -Size=281,306 +Pos=0,19 +Size=281,615 Collapsed=0 DockId=0x00000008,0 @@ -73,7 +73,7 @@ DockId=0x00000006,0 [Window][Render Stats] Pos=0,636 -Size=639,225 +Size=1279,225 Collapsed=0 DockId=0x00000004,0 diff --git a/enginecustom/src/inc/system/imguiManager.h b/enginecustom/src/inc/system/imguiManager.h index 40738c2..73af990 100644 --- a/enginecustom/src/inc/system/imguiManager.h +++ b/enginecustom/src/inc/system/imguiManager.h @@ -68,6 +68,8 @@ private: bool showLogWindow; bool showStatsWindow; + int m_SideCount = 0; + static const int FRAME_HISTORY_COUNT = 3600; // 1min secondes � 60 FPS float m_frameTimeHistory[FRAME_HISTORY_COUNT] = {}; int m_frameTimeHistoryIndex = 0; diff --git a/enginecustom/src/inc/system/modelclass.h b/enginecustom/src/inc/system/modelclass.h index c441dae..4b0468c 100644 --- a/enginecustom/src/inc/system/modelclass.h +++ b/enginecustom/src/inc/system/modelclass.h @@ -232,7 +232,7 @@ public: TextureContainer GetTextureContainer() const { return m_Textures; } bool PreloadTextures(ID3D11Device* device, ID3D11DeviceContext* deviceContext, TextureContainer& textureContainer); - + protected: int m_vertexCount, m_indexCount; ID3D11Buffer* m_vertexBuffer, * m_indexBuffer; @@ -241,7 +241,6 @@ private: bool InitializeBuffers(ID3D11Device*); void ShutdownBuffers(); void RenderBuffers(ID3D11DeviceContext*); - bool LoadTextures(ID3D11Device*, ID3D11DeviceContext*, vector<string> filename); void ReleaseTextures(); bool LoadModel(char*); diff --git a/enginecustom/src/src/system/imguiManager.cpp b/enginecustom/src/src/system/imguiManager.cpp index 7e857fd..ab7546e 100644 --- a/enginecustom/src/src/system/imguiManager.cpp +++ b/enginecustom/src/src/system/imguiManager.cpp @@ -641,6 +641,24 @@ void imguiManager::WidgetTerrainWindow(ApplicationClass* app) { app->GenerateTerrain(); } + + ImGui::Separator(); + + // Input for the number of cubes on each side + ImGui::Text("Number of cubes on each side: "); + ImGui::SameLine(); + ImGui::InputInt("##SideCount", &m_SideCount); + if (m_SideCount < 1) + { + m_SideCount = 1; + } + + ImGui::Separator(); + + if (ImGui::Button("Generate BigCube Terrain")) + { + app->CreateBigCube(m_SideCount); + } ImGui::Separator(); diff --git a/enginecustom/src/src/system/modelclass.cpp b/enginecustom/src/src/system/modelclass.cpp index 17022d9..55fe2ad 100644 --- a/enginecustom/src/src/system/modelclass.cpp +++ b/enginecustom/src/src/system/modelclass.cpp @@ -176,23 +176,10 @@ bool ModelClass::InitializeBuffers(ID3D11Device* device) void ModelClass::ShutdownBuffers() { - // Release the index buffer. - if (m_indexBuffer) - { - m_indexBuffer->Release(); - m_indexBuffer = 0; - } - - // Release the vertex buffer. - if (m_vertexBuffer) - { - m_vertexBuffer->Release(); - m_vertexBuffer = 0; - } - + if (m_indexBuffer) { m_indexBuffer->Release(); m_indexBuffer = nullptr; } + if (m_vertexBuffer) { m_vertexBuffer->Release(); m_vertexBuffer = nullptr; } } - void ModelClass::RenderBuffers(ID3D11DeviceContext* deviceContext) { unsigned int stride;