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.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 2c4057501d6..1d5dd7eadd5 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -1139,11 +1139,11 @@ void layout_element::element_scale(bitmap_argb32 &dest, bitmap_argb32 &source, c
if (curcomp->state() == -1 || curcomp->state() == elemtex->m_state)
{
// get the local scaled bounds
- rectangle bounds;
- bounds.min_x = render_round_nearest(curcomp->bounds().x0 * dest.width());
- bounds.min_y = render_round_nearest(curcomp->bounds().y0 * dest.height());
- bounds.max_x = render_round_nearest(curcomp->bounds().x1 * dest.width());
- bounds.max_y = render_round_nearest(curcomp->bounds().y1 * dest.height());
+ rectangle bounds(
+ render_round_nearest(curcomp->bounds().x0 * dest.width()),
+ render_round_nearest(curcomp->bounds().x1 * dest.width()),
+ render_round_nearest(curcomp->bounds().y0 * dest.height()),
+ render_round_nearest(curcomp->bounds().y1 * dest.height()));
bounds &= dest.cliprect();
// based on the component type, add to the texture
@@ -1255,9 +1255,9 @@ protected:
u32 const inva = (1.0f - color().a) * 255.0f;
// iterate over X and Y
- for (u32 y = bounds.min_y; y <= bounds.max_y; y++)
+ for (u32 y = bounds.top(); y <= bounds.bottom(); y++)
{
- for (u32 x = bounds.min_x; x <= bounds.max_x; x++)
+ for (u32 x = bounds.left(); x <= bounds.right(); x++)
{
u32 finalr = r;
u32 finalg = g;
@@ -1308,7 +1308,7 @@ protected:
float const ooyradius2 = 1.0f / (yradius * yradius);
// iterate over y
- for (u32 y = bounds.min_y; y <= bounds.max_y; y++)
+ for (u32 y = bounds.top(); y <= bounds.bottom(); y++)
{
float ycoord = ycenter - ((float)y + 0.5f);
float xval = xradius * sqrtf(1.0f - (ycoord * ycoord) * ooyradius2);
@@ -2157,23 +2157,23 @@ protected:
if (m_reelreversed==1)
{
- basey = bounds.min_y + ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
+ basey = bounds.top() + ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
}
else
{
- basey = bounds.min_y - ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
+ basey = bounds.top() - ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
}
// wrap around...
- if (basey < bounds.min_y)
+ if (basey < bounds.top())
basey += ((max_state_used)*(ourheight/num_shown)/(max_state_used/m_numstops));
- if (basey > bounds.max_y)
+ if (basey > bounds.bottom())
basey -= ((max_state_used)*(ourheight/num_shown)/(max_state_used/m_numstops));
int endpos = basey+ourheight/num_shown;
// only render the symbol / text if it's atually in view because the code is SLOW
- if ((endpos >= bounds.min_y) && (basey <= bounds.max_y))
+ if ((endpos >= bounds.top()) && (basey <= bounds.bottom()))
{
while (1)
{
@@ -2184,7 +2184,7 @@ protected:
}
s32 curx;
- curx = bounds.min_x + (bounds.width() - width) / 2;
+ curx = bounds.left() + (bounds.width() - width) / 2;
if (m_file[fruit])
if (!m_bitmap[fruit].valid())
@@ -2202,14 +2202,14 @@ protected:
{
int effy = basey + y;
- if (effy >= bounds.min_y && effy <= bounds.max_y)
+ if (effy >= bounds.top() && effy <= bounds.bottom())
{
u32 *src = &tempbitmap2.pix32(y);
u32 *d = &dest.pix32(effy);
for (int x = 0; x < dest.width(); x++)
{
int effx = x;
- if (effx >= bounds.min_x && effx <= bounds.max_x)
+ if (effx >= bounds.left() && effx <= bounds.right())
{
u32 spix = rgb_t(src[x]).a();
if (spix != 0)
@@ -2249,14 +2249,14 @@ protected:
{
int effy = basey + y;
- if (effy >= bounds.min_y && effy <= bounds.max_y)
+ if (effy >= bounds.top() && effy <= bounds.bottom())
{
u32 *src = &tempbitmap.pix32(y);
u32 *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)
+ int effx = curx + x + chbounds.left();
+ if (effx >= bounds.left() && effx <= bounds.right())
{
u32 spix = rgb_t(src[x]).a();
if (spix != 0)
@@ -2324,15 +2324,15 @@ private:
}
// wrap around...
- if (basex < bounds.min_x)
+ if (basex < bounds.left())
basex += ((max_state_used)*(ourwidth/num_shown)/(max_state_used/m_numstops));
- if (basex > bounds.max_x)
+ if (basex > bounds.right())
basex -= ((max_state_used)*(ourwidth/num_shown)/(max_state_used/m_numstops));
int endpos = basex+(ourwidth/num_shown);
// only render the symbol / text if it's atually in view because the code is SLOW
- if ((endpos >= bounds.min_x) && (basex <= bounds.max_x))
+ if ((endpos >= bounds.left()) && (basex <= bounds.right()))
{
while (1)
{
@@ -2343,7 +2343,7 @@ private:
}
s32 curx;
- curx = bounds.min_x;
+ curx = bounds.left();
if (m_file[fruit])
if (!m_bitmap[fruit].valid())
@@ -2361,14 +2361,14 @@ private:
{
int effy = y;
- if (effy >= bounds.min_y && effy <= bounds.max_y)
+ if (effy >= bounds.top() && effy <= bounds.bottom())
{
u32 *src = &tempbitmap2.pix32(y);
u32 *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)
+ if (effx >= bounds.left() && effx <= bounds.right())
{
u32 spix = rgb_t(src[x]).a();
if (spix != 0)
@@ -2410,14 +2410,14 @@ private:
{
int effy = y;
- if (effy >= bounds.min_y && effy <= bounds.max_y)
+ if (effy >= bounds.top() && effy <= bounds.bottom())
{
u32 *src = &tempbitmap.pix32(y);
u32 *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)
+ if (effx >= bounds.left() && effx <= bounds.right())
{
u32 spix = rgb_t(src[x]).a();
if (spix != 0)
@@ -2618,17 +2618,17 @@ void layout_element::component::draw_text(render_font &font, bitmap_argb32 &dest
{
// left
case 1:
- curx = bounds.min_x;
+ curx = bounds.left();
break;
// right
case 2:
- curx = bounds.max_x - width;
+ curx = bounds.right() - width;
break;
// default to center
default:
- curx = bounds.min_x + (bounds.width() - width) / 2;
+ curx = bounds.left() + (bounds.width() - width) / 2;
break;
}
@@ -2656,15 +2656,15 @@ void layout_element::component::draw_text(render_font &font, bitmap_argb32 &dest
// copy the data into the target
for (int y = 0; y < chbounds.height(); y++)
{
- int effy = bounds.min_y + y;
- if (effy >= bounds.min_y && effy <= bounds.max_y)
+ int effy = bounds.top() + y;
+ if (effy >= bounds.top() && effy <= bounds.bottom())
{
u32 *src = &tempbitmap.pix32(y);
u32 *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)
+ int effx = curx + x + chbounds.left();
+ if (effx >= bounds.left() && effx <= bounds.right())
{
u32 spix = rgb_t(src[x]).a();
if (spix != 0)