diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-30 09:29:28 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-30 09:29:28 -0500 |
commit | 98b5811d8b50d20f8c15e9b202f0d3f0457df58b (patch) | |
tree | 6562850bbd01236cac901208d528ca2dacf83dc0 /src/protocol.lisp | |
parent | 642c0c594a8abe05be1cb887110ed3e602cd0e48 (diff) |
[modify] affine fns are generic; [add] safe-slot util
Diffstat (limited to 'src/protocol.lisp')
-rw-r--r-- | src/protocol.lisp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/protocol.lisp b/src/protocol.lisp index f8386a6..bd436e6 100644 --- a/src/protocol.lisp +++ b/src/protocol.lisp @@ -33,3 +33,29 @@ (defgeneric ensure-loaded (asset) (:documentation "Ensures that the asset is loaded into memory and ready for use. Returns the asset.")) + +(defgeneric scale-by (thing amount) + (:documentation "Scale horizontal and vertical dimensions of THING by AMOUNT")) + +(defgeneric width (thing) + (:documentation "Returns the effective width, in screen coordinates, of the object in question")) + +(defgeneric (setf width) (new-width thing) + (:documentation "Sets the effective width of thing to new-width.")) + +(defgeneric height (thing) + (:documentation "Returns effective height, in screen coordinates, of the object in question.")) + +(defgeneric (setf height) (new-height thing) + (:documentation "sets the effective height of thing to new-height")) + +(defgeneric rotation (thing)) +(defgeneric (setf rotation) (newval thing)) +(defgeneric x (thing)) +(defgeneric (setf x) (newval thing)) +(defgeneric y (thing)) +(defgeneric (setf y) (newval thing)) +(defgeneric scale-x (thing)) +(defgeneric (setf scale-x) (newvval thing)) +(defgeneric scale-y (thing)) +(defgeneric (setf scale-y) (newval thing)) |