diff options
Diffstat (limited to 'src/mame/video/fmtowns.cpp')
-rw-r--r-- | src/mame/video/fmtowns.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/mame/video/fmtowns.cpp b/src/mame/video/fmtowns.cpp index 2235e03897c..d4471d2777a 100644 --- a/src/mame/video/fmtowns.cpp +++ b/src/mame/video/fmtowns.cpp @@ -761,14 +761,11 @@ void towns_state::render_sprite_4(uint32_t poffset, uint32_t coffset, uint16_t x uint16_t xstart,xend,ystart,yend; int linesize = m_video.towns_crtc_reg[24] * 4; int xdir,ydir; - int width = (m_video.towns_crtc_reg[12] - m_video.towns_crtc_reg[11]) / (((m_video.towns_crtc_reg[27] & 0x0f00) >> 8)+1); - int height = (m_video.towns_crtc_reg[16] - m_video.towns_crtc_reg[15]) / (((m_video.towns_crtc_reg[27] & 0xf000) >> 12)+2); if (rotation) { std::swap (x,y); std::swap (xflip,yflip); - std::swap (width,height); } if(xflip) @@ -841,7 +838,7 @@ void towns_state::render_sprite_4(uint32_t poffset, uint32_t coffset, uint16_t x voffset += linesize * (ypos & 0x1ff); // scanline size in bytes * y pos voffset += (xpos & 0x1ff) * 2; } - if(voffset < 0x20000 && xpos < width && ypos < height && pixel != 0 && voffset > linesize) + if(voffset < 0x20000 && xpos < 256 && ypos < 256 && pixel != 0 && voffset > linesize) { m_towns_gfxvram[0x40000+voffset+vbase+1] = (col & 0xff00) >> 8; m_towns_gfxvram[0x40000+voffset+vbase] = col & 0x00ff; @@ -862,7 +859,7 @@ void towns_state::render_sprite_4(uint32_t poffset, uint32_t coffset, uint16_t x pixel = m_towns_txtvram[poffset] & 0x0f; col = (m_towns_txtvram[coffset+(pixel*2)] | (m_towns_txtvram[coffset+(pixel*2)+1] << 8)) & 0x7fff; - if(voffset < 0x20000 && xpos < width && ypos < height && pixel != 0 && voffset > linesize) + if(voffset < 0x20000 && xpos < 256 && ypos < 256 && pixel != 0 && voffset > linesize) { m_towns_gfxvram[0x40000+voffset+vbase+1] = (col & 0xff00) >> 8; m_towns_gfxvram[0x40000+voffset+vbase] = col & 0x00ff; @@ -887,14 +884,11 @@ void towns_state::render_sprite_16(uint32_t poffset, uint16_t x, uint16_t y, boo uint16_t xstart,ystart,xend,yend; int linesize = m_video.towns_crtc_reg[24] * 4; int xdir,ydir; - int width = (m_video.towns_crtc_reg[12] - m_video.towns_crtc_reg[11]) / (((m_video.towns_crtc_reg[27] & 0x0f00) >> 8)+1); - int height = (m_video.towns_crtc_reg[16] - m_video.towns_crtc_reg[15]) / (((m_video.towns_crtc_reg[27] & 0xf000) >> 12)+2); if (rotation) { std::swap (x,y); std::swap (xflip,yflip); - std::swap (width,height); } if(xflip) @@ -955,7 +949,7 @@ void towns_state::render_sprite_16(uint32_t poffset, uint16_t x, uint16_t y, boo voffset += linesize * (ypos & 0x1ff); // scanline size in bytes * y pos voffset += (xpos & 0x1ff) * 2; } - if(voffset < 0x20000 && xpos < width && ypos < height && col< 0x8000 && voffset > linesize) + if(voffset < 0x20000 && xpos < 256 && ypos < 256 && col< 0x8000 && voffset > linesize) { m_towns_gfxvram[0x40000+vbase+voffset+1] = (col & 0xff00) >> 8; m_towns_gfxvram[0x40000+vbase+voffset] = col & 0x00ff; |