Standardise and make ECS more robust

This commit is contained in:
Hugo Mårdbrink 2025-08-28 14:31:55 +02:00
parent b9aaeb62c9
commit 2ba1022f79
13 changed files with 245 additions and 232 deletions

View file

@ -2,15 +2,15 @@ package ecs
Signature :: bit_set[0..<COMPONENT_MAX]
signature_create :: proc() -> Signature {
signature_make :: proc() -> Signature {
return Signature{}
}
signature_set :: proc(signature: ^Signature, type: ComponentType) {
signature_set :: proc(signature: ^Signature, type: ComponentID) {
signature^ += {cast(int)type}
}
signature_unset :: proc(signature: ^Signature, type: ComponentType) {
signature_unset :: proc(signature: ^Signature, type: ComponentID) {
signature^ -= {cast(int)type}
}