Add level, room, and game-object

This commit is contained in:
nephryte 2024-05-23 22:34:20 -04:00
parent c118f9657a
commit 26f22c248e
3 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,17 @@
(define-module (ces component game-object)
#:pure
#:use-module (scheme base)
#:export (game-object?
make-game-object
game-object-entity-id
game-object-sprite
game-object-pos-x
game-object-pos-y))
(define-record-type <game-object>
(make-game-object entity-id sprite pos-x pos-y)
game-object?
(entity-id game-object-entity-id)
(sprite game-object-sprite)
(pos-x game-object-pos-x)
(pos-y game-object-pos-y))

View file

@ -0,0 +1,13 @@
(define-module (ces component level)
#:pure
#:use-module (scheme base)
#:export (level?
make-level
level-entity-id
level-rooms))
(define-record-type <level>
(make-level entity-id rooms)
level?
(entity-id level-entity-id)
(rooms level-rooms))

View file

@ -0,0 +1,15 @@
(define-module (ces component room)
#:pure
#:use-module (scheme base)
#:export (room?
make-room
room-entity-id
room-background
room-game-objects))
(define-record-type <room>
(make-room entity-id background game-objects)
room?
(room-id room-entity-id)
(background room-background)
(game-objects room-game-objects))