diff options
author | 2019-07-18 23:17:11 +0900 | |
---|---|---|
committer | 2019-07-18 10:17:11 -0400 | |
commit | a5e00faf88ec05d1705b9bc4796cc6f21f2cc7a9 (patch) | |
tree | ce9426cca7d5a2393a93a6438ffeec2f784f1533 /src/emu/digfx.cpp | |
parent | 1c91003578a8b73e1d3039ada7b3a278d8c607ad (diff) |
Allow 16bpp gfxdecode (#5167)
* digfx.cpp : Add 16bpp case of RAW gfx layout
drawgfx.cpp, tilemap.cpp : Make changeable total elements of gfx_elements constructor at RAW case, Allow 16bpp gfxdecode, Fix spacing
tilemap.cpp : Allow 16bpp tilemap pen data
gstream.cpp : Use gfxdecode for 16bpp gfx of X2222, Fix spacing
igs017_igs031.cpp : Cleanup single sprite drawing routine
jedi.cpp : Improve debug gfxdecode viewer(text gfx)
* cps1.cpp : Minor fixes
* gstream.cpp : Fix regression in x2222
drawgfx.cpp : Fix 16bpp transparent pen
* gstream.cpp : Fix regression, Reduce unnecessary lines
* Sync to master
Diffstat (limited to 'src/emu/digfx.cpp')
-rw-r--r-- | src/emu/digfx.cpp | 35 |
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--; + } } } |