Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
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.
|
|
Convenient for whole-stage fades...
|
|
|
|
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.
|
|
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.
|