summaryrefslogtreecommitdiffstats
path: root/src/emu/digfx.cpp
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2019-07-19 02:46:30 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2019-07-19 02:46:30 +1000
commit7978022a9712629f0a96a301092967a0730f9a4f (patch)
treeab3b791db330150b82d054771df6bc7c71f68356 /src/emu/digfx.cpp
parent8093eb3a543e346dadf0a389c70807c1b2046c34 (diff)
parentc182039d8e96f046eaf8d8f6d071f61d46bf87f4 (diff)
Merge remote-tracking branch 'upstream/master'
# Conflicts: # src/emu/digfx.h # src/frontend/mame/ui/ui.cpp
Diffstat (limited to 'src/emu/digfx.cpp')
-rw-r--r--src/emu/digfx.cpp35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/emu/digfx.cpp b/src/emu/digfx.cpp
index 0055421b80c..acc1c5f1176 100644
--- a/src/emu/digfx.cpp
+++ b/src/emu/digfx.cpp
@@ -249,16 +249,33 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
// otherwise, just use the line modulo
else
{
- int base = gfx.start;
- int end = region_length/8;
- int linemod = glcopy.yoffset[0];
- while (glcopy.total > 0)
+ if (glcopy.planeoffset[1] != GFX_RAW) // 8bpp RAW case
{
- int elementbase = base + (glcopy.total - 1) * glcopy.charincrement / 8;
- int lastpixelbase = elementbase + glcopy.height * linemod / 8 - 1;
- if (lastpixelbase < end)
- break;
- glcopy.total--;
+ int base = gfx.start;
+ int end = region_length/8;
+ int linemod = glcopy.yoffset[0];
+ while (glcopy.total > 0)
+ {
+ int elementbase = base + (glcopy.total - 1) * glcopy.charincrement / 8;
+ int lastpixelbase = elementbase + glcopy.height * linemod / 8 - 1;
+ if (lastpixelbase < end)
+ break;
+ glcopy.total--;
+ }
+ }
+ else // 16bpp RAW case
+ {
+ int base = gfx.start;
+ int end = region_length/16;
+ int linemod = glcopy.yoffset[0];
+ while (glcopy.total > 0)
+ {
+ int elementbase = base + (glcopy.total - 1) * glcopy.charincrement / 16;
+ int lastpixelbase = elementbase + glcopy.height * linemod / 16 - 1;
+ if (lastpixelbase < end)
+ break;
+ glcopy.total--;
+ }
}
}