Skip to content

Commit 24a5f43

Browse files
committed
-emu/render.cpp: Fixed texture size calculation for oblong items.
-bfm_sc2.cpp: Removed reel components from sc2prem2 layout.
1 parent b24b56e commit 24a5f43

File tree

2 files changed

+347
-28
lines changed

2 files changed

+347
-28
lines changed

src/emu/render.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,8 +2554,8 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob
25542554
// get the scaled texture and append it
25552555
float const xsize(item.scroll_size_x());
25562556
float const ysize(item.scroll_size_y());
2557-
s32 texwidth = render_round_nearest(((xform.orientation & ORIENTATION_SWAP_XY) ? primwidth : primheight) / xsize);
2558-
s32 texheight = render_round_nearest(((xform.orientation & ORIENTATION_SWAP_XY) ? primheight : primwidth) / ysize);
2557+
s32 texwidth = render_round_nearest(((xform.orientation & ORIENTATION_SWAP_XY) ? primheight : primwidth) / xsize);
2558+
s32 texheight = render_round_nearest(((xform.orientation & ORIENTATION_SWAP_XY) ? primwidth : primheight) / ysize);
25592559
texwidth = (std::min)(texwidth, m_maxtexwidth);
25602560
texheight = (std::min)(texheight, m_maxtexheight);
25612561
texture->get_scaled(texwidth, texheight, prim->texture, list, prim->flags);
@@ -2564,8 +2564,8 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob
25642564
render_bounds cliprect = prim->bounds & m_bounds;
25652565

25662566
// determine UV coordinates and apply clipping
2567-
float const xwindow((xform.orientation & ORIENTATION_SWAP_XY) ? primwidth : primheight);
2568-
float const ywindow((xform.orientation & ORIENTATION_SWAP_XY) ? primheight : primwidth);
2567+
float const xwindow((xform.orientation & ORIENTATION_SWAP_XY) ? primheight : primwidth);
2568+
float const ywindow((xform.orientation & ORIENTATION_SWAP_XY) ? primwidth : primheight);
25692569
float const xrange(float(texwidth) - (item.scroll_wrap_x() ? 0.0f : xwindow));
25702570
float const yrange(float(texheight) - (item.scroll_wrap_y() ? 0.0f : ywindow));
25712571
float const xoffset(render_round_nearest(item.scroll_pos_x() * xrange) / float(texwidth));

0 commit comments

Comments
 (0)