Skip to content

Commit b0381eb

Browse files
committed
Wrote deletions for move assignment and move construction.
* Also added AISystem for future A* path finding implementation for a school project.
1 parent 6c27c07 commit b0381eb

10 files changed

Lines changed: 52 additions & 3 deletions

File tree

MP-APS/.vs/MP-APS/v15/.suo

-2.5 KB
Binary file not shown.

MP-APS/.vs/MP-APS/v15/Browse.VC.db

8 KB
Binary file not shown.

MP-APS/AI/AISystem.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "AISystem.h"
2+

MP-APS/AI/AISystem.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#pragma once
2+
3+
// https://medium.com/@mscansian/a-with-navigation-meshes-246fd9e72424
4+
// https://stackoverflow.com/questions/2439283/how-can-i-create-min-stl-priority-queue
5+
6+
class AISystem {
7+
public:
8+
9+
AISystem() = default;
10+
11+
AISystem(AISystem&&) = delete;
12+
AISystem(const AISystem&) = delete;
13+
AISystem& operator=(AISystem&&) = delete;
14+
AISystem& operator=(const AISystem&) = delete;
15+
16+
~AISystem() = default;
17+
18+
private:
19+
20+
};

MP-APS/Core/GUISystem.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ struct GLFWwindow;
1010
/***********************************************************************************/
1111
class GUISystem {
1212
public:
13-
GUISystem() = default;
13+
GUISystem() noexcept = default;
14+
15+
GUISystem(GUISystem&&) = delete;
1416
GUISystem(const GUISystem&) = delete;
17+
GUISystem& operator=(GUISystem&&) = delete;
1518
GUISystem& operator=(const GUISystem&) = delete;
1619

1720
void Init(GLFWwindow* windowPtr);

MP-APS/Core/RenderSystem.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ class RenderSystem {
2323
public:
2424
RenderSystem();
2525

26+
RenderSystem(RenderSystem&&) = delete;
2627
RenderSystem(const RenderSystem&) = delete;
28+
RenderSystem& operator=(RenderSystem&&) = delete;
2729
RenderSystem& operator=(const RenderSystem&) = delete;
2830

31+
~RenderSystem() = default;
32+
2933
void Init(const pugi::xml_node& rendererNode);
3034
void Update(const Camera& camera, const double delta);
3135
// Release OpenGL resources

MP-APS/Core/WindowSystem.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ struct GLFWwindow;
1414
class WindowSystem {
1515
friend class Engine;
1616
public:
17-
WindowSystem() = default;
17+
WindowSystem() noexcept = default;
18+
19+
WindowSystem(WindowSystem&&) = delete;
1820
WindowSystem(const WindowSystem&) = delete;
21+
WindowSystem& operator=(WindowSystem&&) = delete;
1922
WindowSystem& operator=(const WindowSystem&) = delete;
2023

24+
~WindowSystem() = default;
25+
2126
void Init(const pugi::xml_node& windowNode);
2227
void Update();
2328
void Shutdown() const;

MP-APS/Engine.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ class Engine {
1313
// Initializes engine from an XML config file
1414
explicit Engine(const std::string_view configPath);
1515

16-
// Disable copy + assignment
16+
// Disable copy + assignment + moving
17+
Engine(Engine&&) = delete;
1718
Engine(const Engine&) = delete;
19+
Engine& operator=(Engine&&) = delete;
1820
Engine& operator=(const Engine&) = delete;
1921

22+
~Engine() = default;
23+
2024
void AddScene(const SceneBase& scene);
2125
void SetActiveScene(const std::string_view sceneName);
2226

MP-APS/ShaderViewer.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@
267267
<ItemGroup>
268268
<ClCompile Include="3rdParty\glad\src\glad.c" />
269269
<ClCompile Include="AABB.cpp" />
270+
<ClCompile Include="AI\AISystem.cpp" />
270271
<ClCompile Include="Camera.cpp" />
271272
<ClCompile Include="Core\GUISystem.cpp" />
272273
<ClCompile Include="Core\RenderSystem.cpp" />
@@ -290,6 +291,7 @@
290291
<ItemGroup>
291292
<ClInclude Include="3rdParty\stb\stb_image.h" />
292293
<ClInclude Include="AABB.hpp" />
294+
<ClInclude Include="AI\AISystem.h" />
293295
<ClInclude Include="BoundingVolume.h" />
294296
<ClInclude Include="Camera.h" />
295297
<ClInclude Include="Core\GUISystem.h" />

MP-APS/ShaderViewer.vcxproj.filters

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<Filter Include="Terrain">
1919
<UniqueIdentifier>{2c038983-4100-4c4e-b124-0887306ab2ce}</UniqueIdentifier>
2020
</Filter>
21+
<Filter Include="AI">
22+
<UniqueIdentifier>{0d636b6d-aaa3-4bc1-9375-8b5a52311ed6}</UniqueIdentifier>
23+
</Filter>
2124
</ItemGroup>
2225
<ItemGroup>
2326
<ClCompile Include="Mesh.cpp">
@@ -83,6 +86,9 @@
8386
<ClCompile Include="Core\GUISystem.cpp">
8487
<Filter>Core</Filter>
8588
</ClCompile>
89+
<ClCompile Include="AI\AISystem.cpp">
90+
<Filter>AI</Filter>
91+
</ClCompile>
8692
</ItemGroup>
8793
<ItemGroup>
8894
<ClInclude Include="3rdParty\stb\stb_image.h">
@@ -163,6 +169,9 @@
163169
<ClInclude Include="Core\GUISystem.h">
164170
<Filter>Core</Filter>
165171
</ClInclude>
172+
<ClInclude Include="AI\AISystem.h">
173+
<Filter>AI</Filter>
174+
</ClInclude>
166175
</ItemGroup>
167176
<ItemGroup>
168177
<None Include="..\README.md" />

0 commit comments

Comments
 (0)