From 923e0dc42b75ebcee007470cd94d5bbabc0ffa90 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 4 Nov 2021 11:38:13 -0400 Subject: [PATCH] separate scope differently in the macro --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a5879af..48c94dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ use visibility_system::VisibilitySystem; macro_rules! register { // $gs is needed to get the scope at the usage point // $Type is the Component type that is being registered - ($gs: ident, $( $Type: ty ),*,) => { + ($gs: ident <- $( $Type: ty ),*,) => { $( $gs.ecs.register::<$Type>(); )* @@ -195,7 +195,7 @@ fn main() -> rltk::BError { let mut gs = State { ecs: World::new() }; register!( - gs, + gs <- Position, Renderable, Player,