diff options
author | Vas Crabb <vas@vastheman.com> | 2018-08-02 23:11:17 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-08-02 23:11:17 +1000 |
commit | 6ea9ff90423416d630472298a14afc5526104e75 (patch) | |
tree | e9e8e7d7b86f96d3d20d3b635a5cf99bc75f04a8 /src/emu/render.h | |
parent | 153fa4c4f88bfc3bc6abd48700d9481b1d90321c (diff) |
(nw) Further layout work:
* Allow <orientation> and <color> to work on group references
* Fix some corner cases where group bounds could be miscalculated
* Fix a corner case where MAME could incorrectly refuse to instantiate groups
* Add more checks to complay.py
* Document more of the layout format
Diffstat (limited to 'src/emu/render.h')
-rw-r--r-- | src/emu/render.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/emu/render.h b/src/emu/render.h index 387b4fc141d..d65a1111851 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -49,6 +49,7 @@ #include "screen.h" #include <math.h> +#include <array> #include <map> #include <memory> #include <mutex> @@ -759,14 +760,16 @@ class layout_group public: using environment = emu::render::detail::layout_environment; using group_map = std::unordered_map<std::string, layout_group>; + using transform = std::array<std::array<float, 3>, 3>; layout_group(util::xml::data_node const &groupnode); ~layout_group(); util::xml::data_node const &get_groupnode() const { return m_groupnode; } - render_bounds make_transform(render_bounds const &dest) const; - render_bounds make_transform(render_bounds const &dest, render_bounds const &transform) const; + transform make_transform(int orientation, render_bounds const &dest) const; + transform make_transform(int orientation, transform const &trans) const; + transform make_transform(int orientation, render_bounds const &dest, transform const &trans) const; void set_bounds_unresolved(); void resolve_bounds(environment &env, group_map &groupmap); @@ -818,7 +821,9 @@ public: environment &env, util::xml::data_node const &itemnode, element_map &elemmap, - render_bounds const &transform); + int orientation, + layout_group::transform const &trans, + render_color const &color); ~item(); // getters @@ -886,7 +891,9 @@ private: util::xml::data_node const &parentnode, element_map &elemmap, group_map &groupmap, - render_bounds const &transform, + int orientation, + layout_group::transform const &trans, + render_color const &color, bool root, bool repeat, bool init); |