;;;; protocol.lisp (in-package #:wheelwork) (defgeneric boot (app) (:documentation "Specialized for each subclass of APPLICATION. Responsble for setting the app up once the system resoruces are avaialble.")) (defgeneric shutdown (app) (:documentation "Specialzied for each subclass of APPLICATION. Called just before cleanup.") (:method ((any t)) nil)) (defgeneric cleanup (thing) (:documentation "Clean up applications, textures, and other foreign resources. Called after shutodown.") (:method ((any t)) nil)) (defgeneric drop-unit (unit) (:documentation "Removes a unit from a container.")) (defgeneric add-unit (container unit) (:documentation "Adds a unit to a container, removing it from its current container first, if necessary.")) (defgeneric render (thing) (:documentation "Renders thing for visual display.")) (defgeneric model-matrix (thing) (:documentation "Returns the model matrix for THING, representing its position, scale, and orientation in the scene")) (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))