diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-29 11:54:24 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-29 11:54:24 -0500 |
commit | 82f71b0d13788b1cff9a24c5b652effd11631523 (patch) | |
tree | f0ec127b2f10f46029983ee95b6c72ef29bc504c /src/protocol.lisp | |
parent | 4d1ee56c96ce254134b692f0e3b3271c87a42b54 (diff) |
[refactor] [structure] modularized project file structure
Diffstat (limited to 'src/protocol.lisp')
-rw-r--r-- | src/protocol.lisp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/protocol.lisp b/src/protocol.lisp new file mode 100644 index 0000000..52d2525 --- /dev/null +++ b/src/protocol.lisp @@ -0,0 +1,45 @@ +;;;; 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 unit-width (unit)) +(defgeneric unit-height (unit)) +(defgeneric (setf unit-width) (newval unit)) +(defgeneric (setf unit-height) (newval unit)) + +(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 projected-matrix (thing) + (:documentation "Returns the raw array of the model matrix after it + has been prjected by the application's projecion matrix. Used to + pass to GLSL shader programs.")) + +(defgeneric ensure-loaded (asset) + (:documentation "Ensures that the asset is loaded into memory and + ready for use. Returns the asset.")) |