diff options
author | hap <happppp@users.noreply.github.com> | 2017-07-03 14:23:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 14:23:58 +0200 |
commit | 8976468a5cf81c3ac2fafa4fd80945ede9b950b0 (patch) | |
tree | 782e454de4b758fbc71b40777f2d75d3705909d4 | |
parent | cbbbd07484c736eae2069b294ec666f231e64bff (diff) | |
parent | b77eefdd01d6dc59da4ed2e6016e549bb9c25f06 (diff) |
Merge pull request #2434 from DavidHaywood/200617
fix 06613, game sets rowscroll to be bigger than assumed size of tilemap
-rw-r--r-- | src/mame/video/deco16ic.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mame/video/deco16ic.cpp b/src/mame/video/deco16ic.cpp index 55daf66fa2a..da8467a9b50 100644 --- a/src/mame/video/deco16ic.cpp +++ b/src/mame/video/deco16ic.cpp @@ -724,11 +724,18 @@ static int deco16_pf_update( if (tilemap_16x16) { + int numrows = rows; + + // cap at tilemap size + if (numrows > tilemap_16x16->height()) + numrows = tilemap_16x16->height(); + tilemap_16x16->set_scroll_cols(1); - tilemap_16x16->set_scroll_rows(rows); + tilemap_16x16->set_scroll_rows(numrows); tilemap_16x16->set_scrolly(0, scrolly); - for (offs = 0; offs < rows; offs++) + + for (offs = 0; offs < numrows; offs++) tilemap_16x16->set_scrollx(offs, scrollx + rowscroll_ptr[offs]); } @@ -740,6 +747,10 @@ static int deco16_pf_update( if (!(tilemapsizes & 4)) numrows = rows >> 1; + // cap at tilemap size + if (numrows > tilemap_8x8->height()) + numrows = tilemap_8x8->height(); + tilemap_8x8->set_scroll_cols(1); tilemap_8x8->set_scroll_rows(numrows); tilemap_8x8->set_scrolly(0, scrolly); |