Initial commit
This commit is contained in:
commit
ac0d491786
21 changed files with 1094 additions and 0 deletions
19
ecs/signature.odin
Normal file
19
ecs/signature.odin
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package ecs
|
||||
|
||||
Signature :: bit_set[0..<COMPONENT_MAX]
|
||||
|
||||
signature_create :: proc() -> Signature {
|
||||
return Signature{}
|
||||
}
|
||||
|
||||
signature_set :: proc(signature: ^Signature, type: ComponentType) {
|
||||
signature^ += {cast(int)type}
|
||||
}
|
||||
|
||||
signature_unset :: proc(signature: ^Signature, type: ComponentType) {
|
||||
signature^ -= {cast(int)type}
|
||||
}
|
||||
|
||||
signature_clear :: proc(signature: ^Signature) {
|
||||
signature^ = {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue