Type checking for interface functions
This commit is contained in:
parent
a6b767a943
commit
9be97de885
1 changed files with 6 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
(module (engine core) (add-entity add-named-entity remove-entity)
|
||||
(module (engine core)
|
||||
(add-entity add-named-entity remove-entity)
|
||||
(import scheme
|
||||
(chicken base)
|
||||
;; raylib
|
||||
(srfi 1)
|
||||
(srfi 69)
|
||||
(srfi 99)
|
||||
(srfi 113)
|
||||
|
|
@ -89,6 +91,8 @@
|
|||
|
||||
;; Create an entity in the world and return it's ID
|
||||
(define (add-named-entity id . components)
|
||||
(assert (symbol? id))
|
||||
(assert (every record? components))
|
||||
(queue-add-entity id components)
|
||||
id)
|
||||
|
||||
|
|
@ -98,6 +102,7 @@
|
|||
|
||||
;; Remove an entity from the world
|
||||
(define (remove-entity id)
|
||||
(assert (symbol? id))
|
||||
(queue-del-entity id)
|
||||
id)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue