summaryrefslogtreecommitdiff
path: root/ecs/src/phase.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-08-09 12:37:46 +0200
committerHampusM <hampus@hampusmat.com>2025-08-09 13:50:46 +0200
commitbb7c7d2f7d9bd9ad074c0186f5d503ee96b2f106 (patch)
treed58ed365764f320e3403c9ebd00f1b9d687217d5 /ecs/src/phase.rs
parent2d1cf05abb72699d38a7c7db7e131922252e1fc1 (diff)
fix(ecs): remove use of linkme to make pc-windows-gnu builds work
Linkme is broken on the x86_64-pc-windows-gnu target (see https://github.com/dtolnay/linkme/issues/25) so static entities are now called entity declarations and must be created manually.
Diffstat (limited to 'ecs/src/phase.rs')
-rw-r--r--ecs/src/phase.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/ecs/src/phase.rs b/ecs/src/phase.rs
index 9f47fb8..c13c432 100644
--- a/ecs/src/phase.rs
+++ b/ecs/src/phase.rs
@@ -1,13 +1,19 @@
use ecs_macros::Component;
use crate::pair::{ChildOf, Pair};
-use crate::static_entity;
+use crate::{declare_entity, World};
#[derive(Debug, Default, Clone, Copy, Component)]
pub struct Phase;
-static_entity!(pub START, (Phase,));
+declare_entity!(pub START, (Phase,));
+declare_entity!(pub PRE_UPDATE, (Phase,));
+declare_entity!(pub UPDATE, (Phase, Pair::new::<ChildOf>(*PRE_UPDATE)));
-static_entity!(pub PRE_UPDATE, (Phase,));
-
-static_entity!(pub UPDATE, (Phase, Pair::new::<ChildOf>(*PRE_UPDATE)));
+#[doc(hidden)]
+pub(crate) fn spawn_entities(world: &mut World)
+{
+ world.create_declared_entity(&START);
+ world.create_declared_entity(&PRE_UPDATE);
+ world.create_declared_entity(&UPDATE);
+}