summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-24libstage: add stage_[sg]et_position()Vito Caputo
Starting to get an inkling of a need for a more hierarchical structure for the stage. Something which allows arbitrary grouping of nodes which can then be moved around and even scaled as one at the parent.
2018-05-24libstage: use v2f_t instead of float x,y in apiVito Caputo
2018-05-24libstage: decouple stage_fit() from stage_tVito Caputo
It's desirable to be able to fit dimensions to an aspect ratio prior to stage creation. Since stage creation requires an SDL2 Renderer, it must already have the window etc. Turn this into a lower level helper for fitting so the window can be sized before creating the renderer from it. Should probably name it differently, but this is fine for now.
2018-05-15stage: add stage_[sg]et_alpha()Vito Caputo
Convenient for whole-stage fades...
2018-05-14LICENSE: add copy of GPLv3Vito Caputo
2018-05-04stage: introduce stage_node_[sg]et_position()Vito Caputo
Leaving the existing node aabb semantics as both sizing and placing the node relative to the stage size and its center, add a simple means of statefully shifting the aabb. When the position is left unset, it's 0,0, and effectively a noop leaving the aabb to exclusively size and place the node. If you treat the aabb as purely sizing the node, treating it as centered at 0,0 then you can exclusively use this position api for placement of the node.
2018-05-03*: initial commit derived from whale stage codeVito Caputo
This code was used in whale [1], and prior to that was used in a smaller project called mal. Since I seemed to be doing a lot of reusing and building upon this, it seemed prudent to just stick it in a repo as a .a I could submodule in future SDL2 art projects. There are some kludges in this code currently, which will be fixed up in time.
© All Rights Reserved