GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://gamedevtecnico.github.io/cubos/
MIT License
82 stars 22 forks source link

Add Cubos::reset method #1226

Closed RiscadoA closed 1 month ago

RiscadoA commented 1 month ago

Description

Adds the reset method to Cubos, which resets the application to its initial state. TL;DR, instead of:

Cubos cubos1;
cubos1.blabla
Cubos cubos2;
cubos2.blabla

you can do

Cubos cubos;
cubos.blablabla
cubos.reset();
cubos.blablabla

This will be useful to allow resetting the game in the editor.

Checklist

github-actions[bot] commented 1 month ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1226/ on branch gh-pages at 2024-06-04 18:03 UTC

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 97.22222% with 2 lines in your changes missing coverage. Please review.

Project coverage is 40.52%. Comparing base (bf733fa) to head (dd7caa5). Report is 2 commits behind head on main.

:exclamation: Current head dd7caa5 differs from pull request most recent head 305470f

Please upload reports for the commit 305470f to get more accurate results.

Files Patch % Lines
core/src/ecs/system/registry.cpp 77.77% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1226 +/- ## ========================================== + Coverage 40.32% 40.52% +0.20% ========================================== Files 351 351 Lines 26061 26133 +72 ========================================== + Hits 10508 10590 +82 + Misses 15553 15543 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.