Skip to content

Commit a467b15

Browse files
clangformat code
1 parent 9f4a6f2 commit a467b15

18 files changed

+419
-282
lines changed

.clang-format

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ PenaltyBreakAssignment: 2
114114
PenaltyBreakBeforeFirstCallParameter: 19
115115
PenaltyBreakComment: 300
116116
PenaltyBreakFirstLessLess: 120
117-
PenaltyBreakString: 1000
118-
PenaltyBreakTemplateDeclaration: 10
119-
PenaltyExcessCharacter: 1000000
120-
PenaltyReturnTypeOnItsOwnLine: 1000
117+
# PenaltyBreakString: 1000
118+
PenaltyBreakTemplateDeclaration: 100
119+
# PenaltyExcessCharacter: 1000000
120+
PenaltyReturnTypeOnItsOwnLine: 300
121121
PointerAlignment: Left
122122
ReflowComments: true
123123
SortIncludes: true

Tetragrama/Components/DockspaceUIComponent.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ namespace Tetragrama::Components
131131
auto ctx = reinterpret_cast<EditorContext*>(ParentLayer->ParentContext);
132132
// if (ctx->CurrentScenePtr && ctx->CurrentScenePtr->RenderScene->IsDrawDataDirty)
133133
//{
134-
// ctx->CurrentScenePtr->RenderScene->InitOrResetDrawBuffer(renderer->Device, renderer->RenderGraph, renderer->AsyncLoader);
134+
// ctx->CurrentScenePtr->RenderScene->InitOrResetDrawBuffer(renderer->Device, renderer->RenderGraph,
135+
// renderer->AsyncLoader);
135136
// }
136137
}
137138

Tetragrama/Components/HierarchyViewUIComponent.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ namespace Tetragrama::Components
160160
if (ImGui::IsMouseDown(0) && ImGui::IsWindowHovered())
161161
{
162162
ctx->SelectedSceneNode.store(-1, std::memory_order_release);
163-
// Messengers::IMessenger::SendAsync<Components::UIComponent, Messengers::EmptyMessage>(EDITOR_COMPONENT_HIERARCHYVIEW_NODE_UNSELECTED, Messengers::EmptyMessage{});
163+
// Messengers::IMessenger::SendAsync<Components::UIComponent,
164+
// Messengers::EmptyMessage>(EDITOR_COMPONENT_HIERARCHYVIEW_NODE_UNSELECTED, Messengers::EmptyMessage{});
164165
}
165166

166167
RenderGuizmo();

Tetragrama/Components/InspectorViewUIComponent.cpp

Lines changed: 86 additions & 69 deletions
Large diffs are not rendered by default.

Tetragrama/Components/SceneViewportUIComponent.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,29 @@ namespace Tetragrama::Components
148148
}
149149
}
150150

151-
// std::future<void> SceneViewportUIComponent::SceneViewportClickedMessageHandlerAsync(Messengers::ArrayValueMessage<int, 2>& e)
151+
// std::future<void>
152+
// SceneViewportUIComponent::SceneViewportClickedMessageHandlerAsync(Messengers::ArrayValueMessage<int, 2>& e)
152153
//{
153154
// // Messengers::IMessenger::Send<ZEngine::Layers::Layer, Messengers::GenericMessage<std::pair<int, int>>>(
154-
// // EDITOR_RENDER_LAYER_SCENE_REQUEST_SELECT_ENTITY_FROM_PIXEL, Messengers::GenericMessage<std::pair<int, int>>{e});
155-
// co_return;
155+
// // EDITOR_RENDER_LAYER_SCENE_REQUEST_SELECT_ENTITY_FROM_PIXEL, Messengers::GenericMessage<std::pair<int,
156+
// int>>{e}); co_return;
156157
// }
157158

158-
// std::future<void> SceneViewportUIComponent::SceneViewportFocusedMessageHandlerAsync(Messengers::GenericMessage<bool>& e)
159+
// std::future<void>
160+
// SceneViewportUIComponent::SceneViewportFocusedMessageHandlerAsync(Messengers::GenericMessage<bool>& e)
159161
//{
160162
// co_return;
161-
// //co_await Messengers::IMessenger::SendAsync<Windows::Layers::Layer, Messengers::GenericMessage<bool>>(EDITOR_RENDER_LAYER_SCENE_REQUEST_FOCUS, Messengers::GenericMessage<bool>{e});
163+
// //co_await Messengers::IMessenger::SendAsync<Windows::Layers::Layer,
164+
// Messengers::GenericMessage<bool>>(EDITOR_RENDER_LAYER_SCENE_REQUEST_FOCUS,
165+
// Messengers::GenericMessage<bool>{e});
162166
// }
163167

164-
// std::future<void> SceneViewportUIComponent::SceneViewportUnfocusedMessageHandlerAsync(Messengers::GenericMessage<bool>& e)
168+
// std::future<void>
169+
// SceneViewportUIComponent::SceneViewportUnfocusedMessageHandlerAsync(Messengers::GenericMessage<bool>& e)
165170
//{
166171
// co_return;
167-
// //co_await Messengers::IMessenger::SendAsync<Windows::Layers::Layer, Messengers::GenericMessage<bool>>(EDITOR_RENDER_LAYER_SCENE_REQUEST_UNFOCUS, Messengers::GenericMessage<bool>{e});
172+
// //co_await Messengers::IMessenger::SendAsync<Windows::Layers::Layer,
173+
// Messengers::GenericMessage<bool>>(EDITOR_RENDER_LAYER_SCENE_REQUEST_UNFOCUS,
174+
// Messengers::GenericMessage<bool>{e});
168175
// }
169176
} // namespace Tetragrama::Components

Tetragrama/EditorScene.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,6 @@ namespace Tetragrama
7878
return node_id;
7979
}
8080

81-
// void EditorScene::CreateSceneNode(int parent, int depth)
82-
//{
83-
// int node_id = AddHierarchyNode(parent, depth);
84-
// if (node_id < 0)
85-
// {
86-
// ZENGINE_CORE_ERROR("EditorScene::CreateSceneNode, failed to create scene node")
87-
// return;
88-
// }
89-
90-
// NodeNames[node_id] = Names.size();
91-
// auto& name = Names.push_use({});
92-
// name.init(&LocalArena, "Empty entity");
93-
94-
// NodeMeshes.insert(node_id, uuids::uuid{});
95-
96-
// HasPendingChanges.store(true, std::memory_order_release);
97-
//}
98-
9981
int EditorScene::CreateSceneNode(int parent, int depth, const Importers::AssetNodeRef& metadata)
10082
{
10183
int node_id = AddHierarchyNode(parent, depth);

Tetragrama/EditorScene.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ namespace Tetragrama
6060

6161
int AddHierarchyNode(int parent, int depth);
6262

63-
// void CreateSceneNode(int parent = 0, int depth = 1) = delete;
6463
int CreateSceneNode(int parent = 0, int depth = 1, const Importers::AssetNodeRef& = {});
6564
void RemoveSceneNode(int node_id);
6665
void ReparentNode(int node_id, int new_parent);
@@ -74,7 +73,8 @@ namespace Tetragrama
7473
void Reset();
7574
void InitRootNode();
7675

77-
void ExtractAsync(EditorScene& scene); // Todo : this should be const EditorScene& ... the map::view() props prevents us to do it... def a impl issue
76+
void ExtractAsync(EditorScene& scene); // Todo : this should be const EditorScene& ... the map::view() props
77+
// prevents us to do it... def a impl issue
7878

7979
ZRawPtr(ZEngine::Rendering::Scenes::GraphicScene) RenderScene = nullptr;
8080
};

ZEngine/ZEngine/Hardwares/VulkanDevice.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,13 @@ namespace ZEngine::Hardwares
17601760
{
17611761
int pool_index = GetPoolFromIndex(Rendering::QueueType::GRAPHIC_QUEUE, i);
17621762
auto& pool = CommandPools[pool_index];
1763-
CommandBuffers[i] = ZPushStructCtorArgs(Device->Arena, CommandBuffer, device, pool->Handle, pool->QueueType, /*(i % MaxBufferPerPool) == 0 ? false : true */ false);
1763+
CommandBuffers[i] = ZPushStructCtorArgs(
1764+
Device->Arena,
1765+
CommandBuffer,
1766+
device,
1767+
pool->Handle,
1768+
pool->QueueType,
1769+
/*(i % MaxBufferPerPool) == 0 ? false : true */ false);
17641770
}
17651771

17661772
if (Device->HasSeperateTransfertQueueFamily)

ZEngine/ZEngine/Hardwares/VulkanDevice.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ namespace ZEngine::Hardwares
135135
{
136136
ZENGINE_VALIDATE_ASSERT(index < set.size(), "Index out of range")
137137

138-
// if (std::is_same_v<T, IndexBuffer> || std::is_same_v<T, VertexBuffer> || std::is_same_v<T, StorageBuffer>)
138+
// if (std::is_same_v<T, IndexBuffer> || std::is_same_v<T, VertexBuffer> || std::is_same_v<T,
139+
// StorageBuffer>)
139140
//{
140141
// }
141142
T& entry = set[index];

ZEngine/ZEngine/Rendering/Buffers/Bitmap.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ namespace ZEngine::Rendering::Buffers
2626
/*
2727
* Mapping pixel coordinates on a specific face of a cubemap to 3D Cartesian coordinates
2828
*
29-
* The A and B values are normalized coordinates in the range [-1, 1], calculated from pixel coordinates (i, j) and the face size.
29+
* The A and B values are normalized coordinates in the range [-1, 1], calculated from pixel coordinates (i, j)
30+
* and the face size.
3031
*
3132
* Reference: "Real-Time Rendering, Fourth Edition" by Tomas Akenine-Möller, Eric Haines, Naty Hoffman
3233
*/
@@ -58,7 +59,8 @@ namespace ZEngine::Rendering::Buffers
5859

5960
/*
6061
* The bottom face is mapped to the negative y-axis, so the y-coordinate is set to 1.0f.
61-
* The x-coordinate is set to 1.0f - A, and the z-coordinate is set based on the normalized pixel coordinates
62+
* The x-coordinate is set to 1.0f - A, and the z-coordinate is set based on the normalized pixel
63+
* coordinates
6264
*/
6365
if (face_id == 3)
6466
return glm::vec3(1.0f - A, 1.0f, 1.0f - B);

0 commit comments

Comments
 (0)