summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/render.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/render.h')
-rw-r--r--src/emu/render.h132
1 files changed, 66 insertions, 66 deletions
diff --git a/src/emu/render.h b/src/emu/render.h
index a3ce229e67f..5ad24046c41 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -77,9 +77,9 @@ enum
// render creation flags
-const UINT8 RENDER_CREATE_NO_ART = 0x01; // ignore any views that have art in them
-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
+const uint8_t RENDER_CREATE_NO_ART = 0x01; // ignore any views that have art in them
+const uint8_t RENDER_CREATE_SINGLE_FILE = 0x02; // only load views from the file specified
+const uint8_t RENDER_CREATE_HIDDEN = 0x04; // don't make this target visible
// render scaling modes
enum
@@ -93,38 +93,38 @@ enum
// flags for primitives
const int PRIMFLAG_TEXORIENT_SHIFT = 0;
-const UINT32 PRIMFLAG_TEXORIENT_MASK = 15 << PRIMFLAG_TEXORIENT_SHIFT;
+const uint32_t PRIMFLAG_TEXORIENT_MASK = 15 << PRIMFLAG_TEXORIENT_SHIFT;
const int PRIMFLAG_TEXFORMAT_SHIFT = 4;
-const UINT32 PRIMFLAG_TEXFORMAT_MASK = 15 << PRIMFLAG_TEXFORMAT_SHIFT;
+const uint32_t PRIMFLAG_TEXFORMAT_MASK = 15 << PRIMFLAG_TEXFORMAT_SHIFT;
const int PRIMFLAG_BLENDMODE_SHIFT = 8;
-const UINT32 PRIMFLAG_BLENDMODE_MASK = 15 << PRIMFLAG_BLENDMODE_SHIFT;
+const uint32_t PRIMFLAG_BLENDMODE_MASK = 15 << PRIMFLAG_BLENDMODE_SHIFT;
const int PRIMFLAG_ANTIALIAS_SHIFT = 12;
-const UINT32 PRIMFLAG_ANTIALIAS_MASK = 1 << PRIMFLAG_ANTIALIAS_SHIFT;
+const uint32_t PRIMFLAG_ANTIALIAS_MASK = 1 << PRIMFLAG_ANTIALIAS_SHIFT;
const int PRIMFLAG_SCREENTEX_SHIFT = 13;
-const UINT32 PRIMFLAG_SCREENTEX_MASK = 1 << PRIMFLAG_SCREENTEX_SHIFT;
+const uint32_t PRIMFLAG_SCREENTEX_MASK = 1 << PRIMFLAG_SCREENTEX_SHIFT;
const int PRIMFLAG_TEXWRAP_SHIFT = 14;
-const UINT32 PRIMFLAG_TEXWRAP_MASK = 1 << PRIMFLAG_TEXWRAP_SHIFT;
+const uint32_t PRIMFLAG_TEXWRAP_MASK = 1 << PRIMFLAG_TEXWRAP_SHIFT;
const int PRIMFLAG_TEXSHADE_SHIFT = 15;
-const UINT32 PRIMFLAG_TEXSHADE_MASK = 3 << PRIMFLAG_TEXSHADE_SHIFT;
+const uint32_t PRIMFLAG_TEXSHADE_MASK = 3 << PRIMFLAG_TEXSHADE_SHIFT;
const int PRIMFLAG_VECTOR_SHIFT = 17;
-const UINT32 PRIMFLAG_VECTOR_MASK = 1 << PRIMFLAG_VECTOR_SHIFT;
+const uint32_t PRIMFLAG_VECTOR_MASK = 1 << PRIMFLAG_VECTOR_SHIFT;
const int PRIMFLAG_VECTORBUF_SHIFT = 18;
-const UINT32 PRIMFLAG_VECTORBUF_MASK = 1 << PRIMFLAG_VECTORBUF_SHIFT;
+const uint32_t PRIMFLAG_VECTORBUF_MASK = 1 << PRIMFLAG_VECTORBUF_SHIFT;
const int PRIMFLAG_TYPE_SHIFT = 19;
-const UINT32 PRIMFLAG_TYPE_MASK = 3 << PRIMFLAG_TYPE_SHIFT;
-const UINT32 PRIMFLAG_TYPE_LINE = 0 << PRIMFLAG_TYPE_SHIFT;
-const UINT32 PRIMFLAG_TYPE_QUAD = 1 << PRIMFLAG_TYPE_SHIFT;
+const uint32_t PRIMFLAG_TYPE_MASK = 3 << PRIMFLAG_TYPE_SHIFT;
+const uint32_t PRIMFLAG_TYPE_LINE = 0 << PRIMFLAG_TYPE_SHIFT;
+const uint32_t PRIMFLAG_TYPE_QUAD = 1 << PRIMFLAG_TYPE_SHIFT;
const int PRIMFLAG_PACKABLE_SHIFT = 21;
-const UINT32 PRIMFLAG_PACKABLE = 1 << PRIMFLAG_PACKABLE_SHIFT;
+const uint32_t PRIMFLAG_PACKABLE = 1 << PRIMFLAG_PACKABLE_SHIFT;
//**************************************************************************
// MACROS
@@ -222,11 +222,11 @@ struct render_quad_texuv
struct render_texinfo
{
void * base; // base of the data
- UINT32 rowpixels; // pixels per row
- UINT32 width; // width of the image
- UINT32 height; // height of the image
- UINT32 seqid; // sequence ID
- UINT64 osddata; // aux data to pass to osd
+ uint32_t rowpixels; // pixels per row
+ uint32_t width; // width of the image
+ uint32_t height; // height of the image
+ uint32_t seqid; // sequence ID
+ uint64_t osddata; // aux data to pass to osd
const rgb_t * palette; // palette for PALETTE16 textures, bcg lookup table for RGB32/YUY16
};
@@ -281,14 +281,14 @@ private:
// render_layer_config - describes the state of layers
class render_layer_config
{
- static const UINT8 ENABLE_BACKDROP = 0x01; // enable backdrop layers
- static const UINT8 ENABLE_OVERLAY = 0x02; // enable overlay layers
- static const UINT8 ENABLE_BEZEL = 0x04; // enable bezel layers
- static const UINT8 ENABLE_CPANEL = 0x08; // enable cpanel layers
- static const UINT8 ENABLE_MARQUEE = 0x10; // enable marquee layers
- static const UINT8 ZOOM_TO_SCREEN = 0x20; // zoom to screen area by default
- static const UINT8 ENABLE_SCREEN_OVERLAY = 0x40; // enable screen overlays
- static const UINT8 DEFAULT = ENABLE_BACKDROP | ENABLE_OVERLAY | ENABLE_BEZEL | ENABLE_CPANEL | ENABLE_MARQUEE | ENABLE_SCREEN_OVERLAY;
+ static const uint8_t ENABLE_BACKDROP = 0x01; // enable backdrop layers
+ static const uint8_t ENABLE_OVERLAY = 0x02; // enable overlay layers
+ static const uint8_t ENABLE_BEZEL = 0x04; // enable bezel layers
+ static const uint8_t ENABLE_CPANEL = 0x08; // enable cpanel layers
+ static const uint8_t ENABLE_MARQUEE = 0x10; // enable marquee layers
+ static const uint8_t ZOOM_TO_SCREEN = 0x20; // zoom to screen area by default
+ static const uint8_t ENABLE_SCREEN_OVERLAY = 0x40; // enable screen overlays
+ static const uint8_t DEFAULT = ENABLE_BACKDROP | ENABLE_OVERLAY | ENABLE_BEZEL | ENABLE_CPANEL | ENABLE_MARQUEE | ENABLE_SCREEN_OVERLAY;
public:
render_layer_config()
@@ -314,7 +314,7 @@ public:
render_layer_config &set_zoom_to_screen(bool zoom) { if (zoom) m_state |= ZOOM_TO_SCREEN; else m_state &= ~ZOOM_TO_SCREEN; return *this; }
private:
- UINT8 m_state;
+ uint8_t m_state;
};
@@ -344,7 +344,7 @@ public:
// getters
render_primitive *next() const { return m_next; }
- bool packable(const INT32 pack_size) const { return (flags & PRIMFLAG_PACKABLE) && texture.base != nullptr && texture.width <= pack_size && texture.height <= pack_size; }
+ bool packable(const int32_t pack_size) const { return (flags & PRIMFLAG_PACKABLE) && texture.base != nullptr && texture.width <= pack_size && texture.height <= pack_size; }
float get_quad_width() const { return fabsf(bounds.x1 - bounds.x0); }
float get_quad_height() const { return fabsf(bounds.y1 - bounds.y0); }
float get_full_quad_width() const { return fabsf(full_bounds.x1 - full_bounds.x0); }
@@ -358,7 +358,7 @@ public:
render_bounds bounds; // bounds or positions
render_bounds full_bounds; // bounds or positions (unclipped)
render_color color; // RGBA values
- UINT32 flags; // flags
+ uint32_t flags; // flags
float width; // width (for line primitives)
render_texinfo texture; // texture info (for quad primitives)
render_quad_texuv texcoords; // texture coordinates (for quad primitives)
@@ -455,14 +455,14 @@ public:
void set_bitmap(bitmap_t &bitmap, const rectangle &sbounds, texture_format format);
// set any necessary aux data
- void set_osd_data(UINT64 data) { m_osddata = data; }
+ void set_osd_data(uint64_t data) { m_osddata = data; }
// generic high-quality bitmap scaler
static void hq_scale(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
private:
// internal helpers
- void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist, UINT32 flags = 0);
+ void get_scaled(uint32_t dwidth, uint32_t dheight, render_texinfo &texinfo, render_primitive_list &primlist, uint32_t flags = 0);
const rgb_t *get_adjusted_palette(render_container &container);
static const int MAX_TEXTURE_SCALES = 16;
@@ -471,7 +471,7 @@ private:
struct scaled_texture
{
bitmap_argb32 * bitmap; // final bitmap
- UINT32 seqid; // sequence number
+ uint32_t seqid; // sequence number
};
// internal state
@@ -480,12 +480,12 @@ private:
bitmap_t * m_bitmap; // pointer to the original bitmap
rectangle m_sbounds; // source bounds within the bitmap
texture_format m_format; // format of the texture data
- UINT64 m_osddata; // aux data to pass to osd
+ uint64_t m_osddata; // aux data to pass to osd
// scaling state (ARGB32 only)
texture_scaler_func m_scaler; // scaling callback
void * m_param; // scaling callback parameter
- UINT32 m_curseq; // current sequence number
+ uint32_t m_curseq; // current sequence number
scaled_texture m_scaled[MAX_TEXTURE_SCALES];// array of scaled variants of this texture
};
@@ -543,15 +543,15 @@ public:
void empty() { m_item_allocator.reclaim_all(m_itemlist); }
// add items to the list
- void add_line(float x0, float y0, float x1, float y1, float width, rgb_t argb, UINT32 flags);
- void add_quad(float x0, float y0, float x1, float y1, rgb_t argb, render_texture *texture, UINT32 flags);
- void add_char(float x0, float y0, float height, float aspect, rgb_t argb, render_font &font, UINT16 ch);
- void add_point(float x0, float y0, float diameter, rgb_t argb, UINT32 flags) { add_line(x0, y0, x0, y0, diameter, argb, flags); }
- void add_rect(float x0, float y0, float x1, float y1, rgb_t argb, UINT32 flags) { add_quad(x0, y0, x1, y1, argb, nullptr, flags); }
+ void add_line(float x0, float y0, float x1, float y1, float width, rgb_t argb, uint32_t flags);
+ void add_quad(float x0, float y0, float x1, float y1, rgb_t argb, render_texture *texture, uint32_t flags);
+ void add_char(float x0, float y0, float height, float aspect, rgb_t argb, render_font &font, uint16_t ch);
+ void add_point(float x0, float y0, float diameter, rgb_t argb, uint32_t flags) { add_line(x0, y0, x0, y0, diameter, argb, flags); }
+ void add_rect(float x0, float y0, float x1, float y1, rgb_t argb, uint32_t flags) { add_quad(x0, y0, x1, y1, argb, nullptr, flags); }
// brightness/contrast/gamma helpers
bool has_brightness_contrast_gamma_changes() const { return (m_user.m_brightness != 1.0f || m_user.m_contrast != 1.0f || m_user.m_gamma != 1.0f); }
- UINT8 apply_brightness_contrast_gamma(UINT8 value);
+ uint8_t apply_brightness_contrast_gamma(uint8_t value);
float apply_brightness_contrast_gamma_fp(float value);
const rgb_t *bcg_lookup_table(int texformat, palette_t *palette = nullptr);
@@ -567,22 +567,22 @@ private:
// getters
item *next() const { return m_next; }
- UINT8 type() const { return m_type; }
+ uint8_t type() const { return m_type; }
const render_bounds &bounds() const { return m_bounds; }
const render_color &color() const { return m_color; }
- UINT32 flags() const { return m_flags; }
- UINT32 internal() const { return m_internal; }
+ uint32_t flags() const { return m_flags; }
+ uint32_t internal() const { return m_internal; }
float width() const { return m_width; }
render_texture *texture() const { return m_texture; }
private:
// internal state
item * m_next; // pointer to the next element in the list
- UINT8 m_type; // type of element
+ uint8_t m_type; // type of element
render_bounds m_bounds; // bounds of the element
render_color m_color; // RGBA factors
- UINT32 m_flags; // option flags
- UINT32 m_internal; // internal flags
+ uint32_t m_flags; // option flags
+ uint32_t m_internal; // internal flags
float m_width; // width of the line (lines only)
render_texture * m_texture; // pointer to the source texture (quads only)
};
@@ -592,7 +592,7 @@ private:
// internal helpers
const simple_list<item> &items() const { return m_itemlist; }
- item &add_generic(UINT8 type, float x0, float y0, float x1, float y1, rgb_t argb);
+ item &add_generic(uint8_t type, float x0, float y0, float x1, float y1, rgb_t argb);
void recompute_lookups();
void update_palette();
@@ -1083,15 +1083,15 @@ class render_target
friend class render_manager;
// construction/destruction
- render_target(render_manager &manager, const internal_layout *layoutfile = nullptr, UINT32 flags = 0);
+ render_target(render_manager &manager, const internal_layout *layoutfile = nullptr, uint32_t flags = 0);
~render_target();
public:
// getters
render_target *next() const { return m_next; }
render_manager &manager() const { return m_manager; }
- UINT32 width() const { return m_width; }
- UINT32 height() const { return m_height; }
+ uint32_t width() const { return m_width; }
+ uint32_t height() const { return m_height; }
float pixel_aspect() const { return m_pixel_aspect; }
int scale_mode() const { return m_scale_mode; }
float max_update_rate() const { return m_max_refresh; }
@@ -1104,7 +1104,7 @@ public:
int index() const;
// setters
- void set_bounds(INT32 width, INT32 height, float pixel_aspect = 0);
+ void set_bounds(int32_t width, int32_t height, float pixel_aspect = 0);
void set_max_update_rate(float updates_per_second) { m_max_refresh = updates_per_second; }
void set_orientation(int orientation) { m_orientation = orientation; }
void set_view(int viewindex);
@@ -1139,15 +1139,15 @@ public:
const render_screen_list &view_screens(int viewindex);
// bounds computations
- void compute_visible_area(INT32 target_width, INT32 target_height, float target_pixel_aspect, int target_orientation, INT32 &visible_width, INT32 &visible_height);
- void compute_minimum_size(INT32 &minwidth, INT32 &minheight);
+ void compute_visible_area(int32_t target_width, int32_t target_height, float target_pixel_aspect, int target_orientation, int32_t &visible_width, int32_t &visible_height);
+ void compute_minimum_size(int32_t &minwidth, int32_t &minheight);
// get a primitive list
render_primitive_list &get_primitives();
// hit testing
- bool map_point_container(INT32 target_x, INT32 target_y, render_container &container, float &container_x, float &container_y);
- bool map_point_input(INT32 target_x, INT32 target_y, ioport_port *&input_port, ioport_value &input_mask, float &input_x, float &input_y);
+ bool map_point_container(int32_t target_x, int32_t target_y, render_container &container, float &container_x, float &container_y);
+ bool map_point_input(int32_t target_x, int32_t target_y, ioport_port *&input_port, ioport_value &input_mask, float &input_x, float &input_y);
// reference tracking
void invalidate_all(void *refptr);
@@ -1168,7 +1168,7 @@ private:
bool load_layout_file(const char *dirname, const internal_layout *layout_data);
void add_container_primitives(render_primitive_list &list, const object_transform &root_xform, const object_transform &xform, render_container &container, int blendmode);
void add_element_primitives(render_primitive_list &list, const object_transform &xform, layout_element &element, int state, int blendmode);
- bool map_point_internal(INT32 target_x, INT32 target_y, render_container *container, float &mapped_x, float &mapped_y, ioport_port *&mapped_input_port, ioport_value &mapped_input_mask);
+ bool map_point_internal(int32_t target_x, int32_t target_y, render_container *container, float &mapped_x, float &mapped_y, ioport_port *&mapped_input_port, ioport_value &mapped_input_mask);
// config callbacks
void config_load(xml_data_node &targetnode);
@@ -1193,11 +1193,11 @@ private:
render_manager & m_manager; // reference to our owning manager
layout_view * m_curview; // current view
simple_list<layout_file> m_filelist; // list of layout files
- UINT32 m_flags; // creation flags
+ uint32_t m_flags; // creation flags
render_primitive_list m_primlist[NUM_PRIMLISTS]; // list of primitives
int m_listindex; // index of next primlist to use
- INT32 m_width; // width in pixels
- INT32 m_height; // height in pixels
+ int32_t m_width; // width in pixels
+ int32_t m_height; // height in pixels
render_bounds m_bounds; // bounds of the target
bool m_keepaspect; // constrain aspect ratio
bool m_int_overscan; // allow overscan on integer scaled targets
@@ -1214,8 +1214,8 @@ private:
int m_maxtexwidth; // maximum width of a texture
int m_maxtexheight; // maximum height of a texture
simple_list<render_container> m_debug_containers; // list of debug containers
- INT32 m_clear_extent_count; // number of clear extents
- INT32 m_clear_extents[MAX_CLEAR_EXTENTS]; // array of clear extents
+ int32_t m_clear_extent_count; // number of clear extents
+ int32_t m_clear_extents[MAX_CLEAR_EXTENTS]; // array of clear extents
bool m_transform_container; // determines whether the screen container is transformed by the core renderer,
// otherwise the respective render API will handle the transformation (scale, offset)
@@ -1243,7 +1243,7 @@ public:
float max_update_rate() const;
// targets
- render_target *target_alloc(const internal_layout *layoutfile = nullptr, UINT32 flags = 0);
+ render_target *target_alloc(const internal_layout *layoutfile = nullptr, uint32_t flags = 0);
void target_free(render_target *target);
const simple_list<render_target> &targets() const { return m_targetlist; }
render_target *first_target() const { return m_targetlist.first(); }
@@ -1288,7 +1288,7 @@ private:
render_target * m_ui_target; // current UI target
// texture lists
- UINT32 m_live_textures; // number of live textures
+ uint32_t m_live_textures; // number of live textures
fixed_allocator<render_texture> m_texture_allocator;// texture allocator
// containers for the UI and for screens