summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/rendlay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/rendlay.cpp')
-rw-r--r--src/emu/rendlay.cpp160
1 files changed, 80 insertions, 80 deletions
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 74246d4a6a4..95d2f35f935 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -868,15 +868,15 @@ void layout_element::reel_component::draw(running_machine &machine, bitmap_argb3
int use_state = (state + m_stateoffset) % max_state_used;
// compute premultiplied colors
- UINT32 r = color().r * 255.0f;
- UINT32 g = color().g * 255.0f;
- UINT32 b = color().b * 255.0f;
- UINT32 a = color().a * 255.0f;
+ uint32_t r = color().r * 255.0f;
+ uint32_t g = color().g * 255.0f;
+ uint32_t b = color().b * 255.0f;
+ uint32_t a = color().a * 255.0f;
// get the width of the string
render_font *font = machine.render().font_alloc("default");
float aspect = 1.0f;
- INT32 width;
+ int32_t width;
int curry = 0;
int num_shown = m_numsymbolsvisible;
@@ -915,7 +915,7 @@ void layout_element::reel_component::draw(running_machine &machine, bitmap_argb3
aspect *= 0.9f;
}
- INT32 curx;
+ int32_t curx;
curx = bounds.min_x + (bounds.width() - width) / 2;
if (m_file[fruit])
@@ -936,14 +936,14 @@ void layout_element::reel_component::draw(running_machine &machine, bitmap_argb3
if (effy >= bounds.min_y && effy <= bounds.max_y)
{
- UINT32 *src = &tempbitmap2.pix32(y);
- UINT32 *d = &dest.pix32(effy);
+ uint32_t *src = &tempbitmap2.pix32(y);
+ uint32_t *d = &dest.pix32(effy);
for (int x = 0; x < dest.width(); x++)
{
int effx = x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ uint32_t spix = rgb_t(src[x]).a();
if (spix != 0)
{
d[effx] = src[x];
@@ -983,21 +983,21 @@ void layout_element::reel_component::draw(running_machine &machine, bitmap_argb3
if (effy >= bounds.min_y && effy <= bounds.max_y)
{
- UINT32 *src = &tempbitmap.pix32(y);
- UINT32 *d = &dest.pix32(effy);
+ uint32_t *src = &tempbitmap.pix32(y);
+ uint32_t *d = &dest.pix32(effy);
for (int x = 0; x < chbounds.width(); x++)
{
int effx = curx + x + chbounds.min_x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ uint32_t spix = rgb_t(src[x]).a();
if (spix != 0)
{
rgb_t dpix = d[effx];
- UINT32 ta = (a * (spix + 1)) >> 8;
- UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
- UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
- UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
+ uint32_t ta = (a * (spix + 1)) >> 8;
+ uint32_t tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
+ uint32_t tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
+ uint32_t tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
d[effx] = rgb_t(tr, tg, tb);
}
}
@@ -1028,15 +1028,15 @@ void layout_element::reel_component::draw_beltreel(running_machine &machine, bit
int use_state = (state + m_stateoffset) % max_state_used;
// compute premultiplied colors
- UINT32 r = color().r * 255.0f;
- UINT32 g = color().g * 255.0f;
- UINT32 b = color().b * 255.0f;
- UINT32 a = color().a * 255.0f;
+ uint32_t r = color().r * 255.0f;
+ uint32_t g = color().g * 255.0f;
+ uint32_t b = color().b * 255.0f;
+ uint32_t a = color().a * 255.0f;
// get the width of the string
render_font *font = machine.render().font_alloc("default");
float aspect = 1.0f;
- INT32 width;
+ int32_t width;
int currx = 0;
int num_shown = m_numsymbolsvisible;
@@ -1073,7 +1073,7 @@ void layout_element::reel_component::draw_beltreel(running_machine &machine, bit
aspect *= 0.9f;
}
- INT32 curx;
+ int32_t curx;
curx = bounds.min_x;
if (m_file[fruit])
@@ -1094,14 +1094,14 @@ void layout_element::reel_component::draw_beltreel(running_machine &machine, bit
if (effy >= bounds.min_y && effy <= bounds.max_y)
{
- UINT32 *src = &tempbitmap2.pix32(y);
- UINT32 *d = &dest.pix32(effy);
+ uint32_t *src = &tempbitmap2.pix32(y);
+ uint32_t *d = &dest.pix32(effy);
for (int x = 0; x < ourwidth/num_shown; x++)
{
int effx = basex + x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ uint32_t spix = rgb_t(src[x]).a();
if (spix != 0)
{
d[effx] = src[x];
@@ -1143,21 +1143,21 @@ void layout_element::reel_component::draw_beltreel(running_machine &machine, bit
if (effy >= bounds.min_y && effy <= bounds.max_y)
{
- UINT32 *src = &tempbitmap.pix32(y);
- UINT32 *d = &dest.pix32(effy);
+ uint32_t *src = &tempbitmap.pix32(y);
+ uint32_t *d = &dest.pix32(effy);
for (int x = 0; x < chbounds.width(); x++)
{
int effx = basex + curx + x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ uint32_t spix = rgb_t(src[x]).a();
if (spix != 0)
{
rgb_t dpix = d[effx];
- UINT32 ta = (a * (spix + 1)) >> 8;
- UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
- UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
- UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
+ uint32_t ta = (a * (spix + 1)) >> 8;
+ uint32_t tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
+ uint32_t tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
+ uint32_t tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
d[effx] = rgb_t(tr, tg, tb);
}
}
@@ -1826,19 +1826,19 @@ layout_element::rect_component::rect_component(running_machine &machine, xml_dat
void layout_element::rect_component::draw(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state)
{
// compute premultiplied colors
- UINT32 r = color().r * color().a * 255.0f;
- UINT32 g = color().g * color().a * 255.0f;
- UINT32 b = color().b * color().a * 255.0f;
- UINT32 inva = (1.0f - color().a) * 255.0f;
+ uint32_t r = color().r * color().a * 255.0f;
+ uint32_t g = color().g * color().a * 255.0f;
+ uint32_t b = color().b * color().a * 255.0f;
+ uint32_t inva = (1.0f - color().a) * 255.0f;
// iterate over X and Y
- for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
+ for (uint32_t y = bounds.min_y; y <= bounds.max_y; y++)
{
- for (UINT32 x = bounds.min_x; x <= bounds.max_x; x++)
+ for (uint32_t x = bounds.min_x; x <= bounds.max_x; x++)
{
- UINT32 finalr = r;
- UINT32 finalg = g;
- UINT32 finalb = b;
+ uint32_t finalr = r;
+ uint32_t finalg = g;
+ uint32_t finalb = b;
// if we're translucent, add in the destination pixel contribution
if (inva > 0)
@@ -1873,10 +1873,10 @@ layout_element::disk_component::disk_component(running_machine &machine, xml_dat
void layout_element::disk_component::draw(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state)
{
// compute premultiplied colors
- UINT32 r = color().r * color().a * 255.0f;
- UINT32 g = color().g * color().a * 255.0f;
- UINT32 b = color().b * color().a * 255.0f;
- UINT32 inva = (1.0f - color().a) * 255.0f;
+ uint32_t r = color().r * color().a * 255.0f;
+ uint32_t g = color().g * color().a * 255.0f;
+ uint32_t b = color().b * color().a * 255.0f;
+ uint32_t inva = (1.0f - color().a) * 255.0f;
// find the center
float xcenter = float(bounds.xcenter());
@@ -1886,21 +1886,21 @@ void layout_element::disk_component::draw(running_machine &machine, bitmap_argb3
float ooyradius2 = 1.0f / (yradius * yradius);
// iterate over y
- for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
+ for (uint32_t y = bounds.min_y; y <= bounds.max_y; y++)
{
float ycoord = ycenter - ((float)y + 0.5f);
float xval = xradius * sqrtf(1.0f - (ycoord * ycoord) * ooyradius2);
// compute left/right coordinates
- INT32 left = (INT32)(xcenter - xval + 0.5f);
- INT32 right = (INT32)(xcenter + xval + 0.5f);
+ int32_t left = (int32_t)(xcenter - xval + 0.5f);
+ int32_t right = (int32_t)(xcenter + xval + 0.5f);
// draw this scanline
- for (UINT32 x = left; x < right; x++)
+ for (uint32_t x = left; x < right; x++)
{
- UINT32 finalr = r;
- UINT32 finalg = g;
- UINT32 finalb = b;
+ uint32_t finalr = r;
+ uint32_t finalg = g;
+ uint32_t finalb = b;
// if we're translucent, add in the destination pixel contribution
if (inva > 0)
@@ -1925,14 +1925,14 @@ void layout_element::disk_component::draw(running_machine &machine, bitmap_argb3
void layout_element::component::draw_text(render_font &font, bitmap_argb32 &dest, const rectangle &bounds, const char *str, int align)
{
// compute premultiplied colors
- UINT32 r = color().r * 255.0f;
- UINT32 g = color().g * 255.0f;
- UINT32 b = color().b * 255.0f;
- UINT32 a = color().a * 255.0f;
+ uint32_t r = color().r * 255.0f;
+ uint32_t g = color().g * 255.0f;
+ uint32_t b = color().b * 255.0f;
+ uint32_t a = color().a * 255.0f;
// get the width of the string
float aspect = 1.0f;
- INT32 width;
+ int32_t width;
while (1)
{
@@ -1943,7 +1943,7 @@ void layout_element::component::draw_text(render_font &font, bitmap_argb32 &dest
}
// get alignment
- INT32 curx;
+ int32_t curx;
switch (align)
{
// left
@@ -1989,21 +1989,21 @@ void layout_element::component::draw_text(render_font &font, bitmap_argb32 &dest
int effy = bounds.min_y + y;
if (effy >= bounds.min_y && effy <= bounds.max_y)
{
- UINT32 *src = &tempbitmap.pix32(y);
- UINT32 *d = &dest.pix32(effy);
+ uint32_t *src = &tempbitmap.pix32(y);
+ uint32_t *d = &dest.pix32(effy);
for (int x = 0; x < chbounds.width(); x++)
{
int effx = curx + x + chbounds.min_x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ uint32_t spix = rgb_t(src[x]).a();
if (spix != 0)
{
rgb_t dpix = d[effx];
- UINT32 ta = (a * (spix + 1)) >> 8;
- UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
- UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
- UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
+ uint32_t ta = (a * (spix + 1)) >> 8;
+ uint32_t tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
+ uint32_t tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
+ uint32_t tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
d[effx] = rgb_t(tr, tg, tb);
}
}
@@ -2029,8 +2029,8 @@ void layout_element::component::draw_segment_horizontal_caps(bitmap_argb32 &dest
// loop over the width of the segment
for (int y = 0; y < width / 2; y++)
{
- UINT32 *d0 = &dest.pix32(midy - y);
- UINT32 *d1 = &dest.pix32(midy + y);
+ uint32_t *d0 = &dest.pix32(midy - y);
+ uint32_t *d1 = &dest.pix32(midy + y);
int ty = (y < width / 8) ? width / 8 : y;
// loop over the length of the segment
@@ -2062,8 +2062,8 @@ void layout_element::component::draw_segment_vertical_caps(bitmap_argb32 &dest,
// loop over the width of the segment
for (int x = 0; x < width / 2; x++)
{
- UINT32 *d0 = &dest.pix32(0, midx - x);
- UINT32 *d1 = &dest.pix32(0, midx + x);
+ uint32_t *d0 = &dest.pix32(0, midx - x);
+ uint32_t *d1 = &dest.pix32(0, midx + x);
int tx = (x < width / 8) ? width / 8 : x;
// loop over the length of the segment
@@ -2099,7 +2099,7 @@ void layout_element::component::draw_segment_diagonal_1(bitmap_argb32 &dest, int
for (int x = minx; x < maxx; x++)
if (x >= 0 && x < dest.width())
{
- UINT32 *d = &dest.pix32(0, x);
+ uint32_t *d = &dest.pix32(0, x);
int step = (x - minx) * ratio;
for (int y = maxy - width - step; y < maxy - step; y++)
@@ -2124,7 +2124,7 @@ void layout_element::component::draw_segment_diagonal_2(bitmap_argb32 &dest, int
for (int x = minx; x < maxx; x++)
if (x >= 0 && x < dest.width())
{
- UINT32 *d = &dest.pix32(0, x);
+ uint32_t *d = &dest.pix32(0, x);
int step = (x - minx) * ratio;
for (int y = miny + step; y < miny + step + width; y++)
@@ -2145,19 +2145,19 @@ void layout_element::component::draw_segment_decimal(bitmap_argb32 &dest, int mi
float ooradius2 = 1.0f / (float)(width * width);
// iterate over y
- for (UINT32 y = 0; y <= width; y++)
+ for (uint32_t y = 0; y <= width; y++)
{
- UINT32 *d0 = &dest.pix32(midy - y);
- UINT32 *d1 = &dest.pix32(midy + y);
+ uint32_t *d0 = &dest.pix32(midy - y);
+ uint32_t *d1 = &dest.pix32(midy + y);
float xval = width * sqrt(1.0f - (float)(y * y) * ooradius2);
- INT32 left, right;
+ int32_t left, right;
// compute left/right coordinates
- left = midx - (INT32)(xval + 0.5f);
- right = midx + (INT32)(xval + 0.5f);
+ left = midx - (int32_t)(xval + 0.5f);
+ right = midx + (int32_t)(xval + 0.5f);
// draw this scanline
- for (UINT32 x = left; x < right; x++)
+ for (uint32_t x = left; x < right; x++)
d0[x] = d1[x] = color;
}
}
@@ -2176,7 +2176,7 @@ void layout_element::component::draw_segment_comma(bitmap_argb32 &dest, int minx
// draw line
for (int x = minx; x < maxx; x++)
{
- UINT32 *d = &dest.pix32(0, x);
+ uint32_t *d = &dest.pix32(0, x);
int step = (x - minx) * ratio;
for (int y = maxy; y < maxy - width - step; y--)
@@ -2193,7 +2193,7 @@ void layout_element::component::apply_skew(bitmap_argb32 &dest, int skewwidth)
{
for (int y = 0; y < dest.height(); y++)
{
- UINT32 *destrow = &dest.pix32(y);
+ uint32_t *destrow = &dest.pix32(y);
int offs = skewwidth * (dest.height() - y) / dest.height();
for (int x = dest.width() - skewwidth - 1; x >= 0; x--)
destrow[x + offs] = destrow[x];