diff options
Diffstat (limited to 'src/emu/render.h')
-rw-r--r-- | src/emu/render.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/emu/render.h b/src/emu/render.h index 09fe68282ef..c968d2207dc 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -73,6 +73,11 @@ const UINT8 RENDER_CREATE_NO_ART = 0x01; // ignore any views that const UINT8 RENDER_CREATE_SINGLE_FILE = 0x02; // only load views from the file specified const UINT8 RENDER_CREATE_HIDDEN = 0x04; // don't make this target visible +// render scaling types +const UINT32 RENDER_SCALE_FRACTIONAL = 0x00; // compute bounds using dimensionless proportions (default) +const UINT32 RENDER_SCALE_INTEGER = 0x01; // compute integer scaling factors for both axes, based on target dimensions +const UINT32 RENDER_SCALE_STRETCH_H = 0x02; // compute fractional scaling factor for x-axis, and integer factor for y-axis +const UINT32 RENDER_SCALE_STRETCH_FULL = 0x03; // match bounds with physical target dimensions in pixels // flags for primitives const int PRIMFLAG_TEXORIENT_SHIFT = 0; @@ -168,6 +173,8 @@ struct render_bounds float y0; // topmost Y coordinate float x1; // rightmost X coordinate float y1; // bottommost Y coordinate + float aspect; // aspect ratio for this item + int scale_type; // type of scale for this item float width() const { return x1 - x0; } float height() const { return y1 - y0; } @@ -802,6 +809,7 @@ public: int m_orientation; // orientation of this item render_bounds m_bounds; // bounds of the item render_bounds m_rawbounds; // raw (original) bounds of the item + render_bounds m_scaledbounds; // raw bounds of the item after scale is applied render_color m_color; // color of the item }; @@ -817,6 +825,7 @@ public: const render_bounds &screen_bounds() const { return m_scrbounds; } const render_screen_list &screens() const { return m_screens; } bool layer_enabled(item_layer layer) const { return m_layenabled[layer]; } + int physical_width() const { return m_physical_width; } // bool has_art() const { return (m_backdrop_list.count() + m_overlay_list.count() + m_bezel_list.count() + m_cpanel_list.count() + m_marquee_list.count() != 0); } @@ -824,6 +833,8 @@ public: // operations void recompute(render_layer_config layerconfig); + bool set_physical_size(INT32 new_width, INT32 new_height, float new_pixel_aspect, int new_orientation); + void scale_bounds(render_bounds *dest, const render_bounds *src); // resolve tags, if any void resolve_tags(); @@ -834,6 +845,13 @@ private: std::string m_name; // name of the layout float m_aspect; // X/Y of the layout float m_scraspect; // X/Y of the screen areas + int m_physical_width; // render_target's width in pixels + int m_physical_height; // render_target's height in pixels + float m_pixel_aspect; // render_target's pixel aspect + int m_orientation; // render target's orientation + bool m_keepaspect; // constrain aspect ratio + int m_int_scale_x; // horizontal integer scale factor + int m_int_scale_y; // vertical integer scale factor render_screen_list m_screens; // list of active screens render_bounds m_bounds; // computed bounds of the view render_bounds m_scrbounds; // computed bounds of the screens within the view @@ -994,6 +1012,7 @@ private: INT32 m_width; // width in pixels INT32 m_height; // height in pixels render_bounds m_bounds; // bounds of the target + bool m_keepaspect; // constrain aspect ratio float m_pixel_aspect; // aspect ratio of individual pixels float m_max_refresh; // maximum refresh rate, 0 or if none int m_orientation; // orientation |