ecs/tag
src/ecs/tag.tur
bitset storage for zero-payload "has component X" tags.
Since: E1'
defopaque
Tag
(Tag)
defn
tag-new
(tag-new :)
allocate an empty tag bitset. Returns a `Tag`.
Since: E1' (returned :int); E2d-P1 (returns Tag)
defn
tag-cap
(tag-cap [t : Tag] :)
highest representable bit index (capacity in bits).
Since: E1'
defn
tag-set!
(tag-set! [t : Tag idx : Slot] :)
mark entity slot idx as tagged.
Since: E1'
defn
tag-clear!
(tag-clear! [t : Tag idx : Slot] :)
mark entity slot idx as untagged.
Since: E1'
defn
tag-has?
(tag-has? [t : Tag idx : Slot] :)
is entity slot idx tagged?
Since: E1'
defn
tag-count
(tag-count [t : Tag] :)
popcount: number of set bits across the bitset.
Since: E1'
defn
tag-free
(tag-free [t : Tag] :)
release the bitset's word buffer.
Since: E1'
Internal definitions
__tag-grow-- internal: ensure bitset can hold at least bit `idx`.