Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move entity stuff to the ecs/entity directory #644

Merged
merged 4 commits into from
Oct 2, 2023

Conversation

RiscadoA
Copy link
Member

@RiscadoA RiscadoA commented Oct 1, 2023

Description

  1. Moved entity manager to the ecs/entity directory.
  2. Split Entity from manager.hpp into entity.hpp.
  3. Replaced std::hash<Entity> specialization with EntityHash, which allows us to avoid including <functional> (yikes) in entity.hpp.

For the third point I had to add new template types to SerializationMap to allow specifying custom hash types.

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.

@RiscadoA RiscadoA added A-Core B-ECS C-Code-Quality A section of code that is hard to understand or change labels Oct 1, 2023
@RiscadoA RiscadoA added this to the 0.1 Jammable Engine milestone Oct 1, 2023
@RiscadoA RiscadoA self-assigned this Oct 1, 2023
@RiscadoA RiscadoA requested a review from luishfonseca October 1, 2023 15:17
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2023

PR Preview Action v1.4.4
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/pr-preview/pr-644/
on branch gh-pages at 2023-10-02 12:21 UTC

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (77431c9) 36.52% compared to head (e9d6360) 36.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
+ Coverage   36.52%   36.56%   +0.04%     
==========================================
  Files          89       92       +3     
  Lines        6377     6378       +1     
==========================================
+ Hits         2329     2332       +3     
+ Misses       4048     4046       -2     
Files Coverage Δ
.../include/cubos/core/data/old/serialization_map.hpp 69.23% <ø> (ø)
core/include/cubos/core/ecs/blueprint.hpp 94.73% <100.00%> (ø)
core/include/cubos/core/ecs/commands.hpp 95.65% <ø> (ø)
core/include/cubos/core/ecs/entity/entity.hpp 100.00% <100.00%> (ø)
core/include/cubos/core/ecs/entity/manager.hpp 100.00% <ø> (ø)
core/include/cubos/core/ecs/storage.hpp 72.72% <ø> (ø)
core/include/cubos/core/ecs/world.hpp 88.88% <ø> (ø)
core/src/cubos/core/ecs/blueprint.cpp 100.00% <100.00%> (ø)
core/src/cubos/core/ecs/commands.cpp 97.29% <100.00%> (+0.03%) ⬆️
core/src/cubos/core/ecs/entity/hash.cpp 100.00% <100.00%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

core/include/cubos/core/ecs/entity/hash.hpp Outdated Show resolved Hide resolved
@RiscadoA RiscadoA force-pushed the 641-move-entity-stuff-to-the-ecsentity-directory branch from 2adcb85 to db332f1 Compare October 1, 2023 15:20
@github-actions github-actions bot dismissed their stale review October 1, 2023 15:22

No clang-tidy warnings found so I assume my comments were addressed

@RiscadoA RiscadoA linked an issue Oct 1, 2023 that may be closed by this pull request
core/src/cubos/core/ecs/entity/entity.cpp Outdated Show resolved Hide resolved
@RiscadoA RiscadoA force-pushed the 641-move-entity-stuff-to-the-ecsentity-directory branch from e9d6360 to f336efd Compare October 2, 2023 12:20
@RiscadoA RiscadoA merged commit 1ac1b0a into main Oct 2, 2023
7 checks passed
@RiscadoA RiscadoA deleted the 641-move-entity-stuff-to-the-ecsentity-directory branch October 2, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core B-ECS C-Code-Quality A section of code that is hard to understand or change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move entity stuff to the ecs/entity directory
2 participants