mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
namcos22: possible overflow on texture bank (shouldnt happen)
This commit is contained in:
parent
646bcfc81e
commit
694c21c47f
@ -81,9 +81,9 @@ void namcos22_renderer::renderscanline_poly(int32_t scanline, const extent_t &ex
|
||||
// texture mapping
|
||||
if (texture_enabled)
|
||||
{
|
||||
int tx = u * ooz;
|
||||
int ty = v * ooz + bn;
|
||||
int to = ((ty & 0xfff0) << 4) | ((tx & 0xff0) >> 4);
|
||||
int tx = int(u * ooz) & 0xfff;
|
||||
int ty = (int(v * ooz) & 0xfff) | bn;
|
||||
int to = (ty << 4 & 0xfff00) | (tx >> 4);
|
||||
pen = ttdata[(ttmap[to] << 8) | tt_ayx_to_pixel[ttattr[to] << 8 | (ty << 4 & 0xf0) | (tx & 0xf)]];
|
||||
rgb.set(pens[pen >> penshift & penmask]);
|
||||
}
|
||||
@ -174,9 +174,9 @@ void namcos22_renderer::renderscanline_poly_ss22(int32_t scanline, const extent_
|
||||
// texture mapping
|
||||
if (texture_enabled)
|
||||
{
|
||||
int tx = u * ooz;
|
||||
int ty = v * ooz + bn;
|
||||
int to = ((ty & 0xfff0) << 4) | ((tx & 0xff0) >> 4);
|
||||
int tx = int(u * ooz) & 0xfff;
|
||||
int ty = (int(v * ooz) & 0xfff) | bn;
|
||||
int to = (ty << 4 & 0xfff00) | (tx >> 4);
|
||||
pen = ttdata[(ttmap[to] << 8) | tt_ayx_to_pixel[ttattr[to] << 8 | (ty << 4 & 0xf0) | (tx & 0xf)]];
|
||||
rgb.set(pens[pen >> penshift & penmask]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user