trunk/src/mame/drivers/coolridr.c
| r21389 | r21390 | |
| 660 | 660 | if (!line[drawx]) \ |
| 661 | 661 | { \ |
| 662 | 662 | int r,g,b; \ |
| 663 | | UINT16 dot; \ |
| 664 | | int color_offs; \ |
| 665 | | /* color_offs = (b1colorNumber & 0x3ff)*0x40;*/ \ |
| 666 | | /* color_offs+= (pix & 0x38)>>2; */ \ |
| 667 | | /* color_offs+= (pix & 0x07)*0x400000; */ \ |
| 668 | | /* color_offs+= 0x1ec800; */ \ |
| 669 | | /* dot = (m_compressedgfx[color_offs+0]<<8) | m_compressedgfx[color_offs+1]; */ \ |
| 670 | | color_offs = (b1colorNumber & 0x3ff)*0x40 * 5; /* yes, * 5 */ \ |
| 671 | | color_offs+= (pix & 0x3f); \ |
| 672 | | color_offs+= 0x1ec800 * 5; \ |
| 673 | | dot = (m_rearranged_16bit_gfx[color_offs]); \ |
| 674 | | r = pal5bit((dot >> 10) & 0x1f); \ |
| 675 | | g = pal5bit((dot >> 5) & 0x1f); \ |
| 676 | | b = pal5bit((dot >> 0) & 0x1f); \ |
| 663 | r = pal5bit((pix >> 10) & 0x1f); \ |
| 664 | g = pal5bit((pix >> 5) & 0x1f); \ |
| 665 | b = pal5bit((pix >> 0) & 0x1f); \ |
| 677 | 666 | line[drawx] = r<<16 | g<<8 | b; \ |
| 678 | 667 | } \ |
| 679 | 668 | } \ |
| r21389 | r21390 | |
| 1095 | 1084 | // these should be 'cell numbers' (tile numbers) which look up RLE data? |
| 1096 | 1085 | UINT32 spriteNumber = (m_expanded_10bit_gfx[ (b3romoffset) + (lookupnum<<1) +0 ] << 10) | (m_expanded_10bit_gfx[ (b3romoffset) + (lookupnum<<1) + 1 ]); |
| 1097 | 1086 | UINT16 tempshape[16*16]; |
| 1087 | |
| 1088 | int color_offs = (b1colorNumber & 0x3ff)*0x40 * 5; /* yes, * 5 */ |
| 1089 | color_offs+= 0x1ec800 * 5; /* ?? */ |
| 1098 | 1090 | |
| 1099 | 1091 | // skip the decoding if it's the same tile as last time! |
| 1100 | 1092 | if (spriteNumber != lastSpriteNumber) |
| r21389 | r21390 | |
| 1121 | 1113 | |
| 1122 | 1114 | while (data_written<256 && encodelength >=0) |
| 1123 | 1115 | { |
| 1124 | | tempshape[data_written] = rledata; |
| 1116 | tempshape[data_written] = m_rearranged_16bit_gfx[color_offs + rledata]; |
| 1125 | 1117 | encodelength--; |
| 1126 | 1118 | data_written++; |
| 1127 | 1119 | } |
| r21389 | r21390 | |
| 1134 | 1126 | |
| 1135 | 1127 | while (data_written<256 && encodelength >=0) |
| 1136 | 1128 | { |
| 1137 | | tempshape[data_written] = rledata; |
| 1129 | tempshape[data_written] = m_rearranged_16bit_gfx[color_offs + rledata]; |
| 1138 | 1130 | encodelength--; |
| 1139 | 1131 | data_written++; |
| 1140 | 1132 | } |
| r21389 | r21390 | |
| 1142 | 1134 | } |
| 1143 | 1135 | else |
| 1144 | 1136 | { |
| 1137 | int rledata = (compdata & 0x0ff); |
| 1145 | 1138 | // mm cccc cccc |
| 1146 | | tempshape[data_written] = compdata&0xff; |
| 1139 | tempshape[data_written] = m_rearranged_16bit_gfx[color_offs + rledata]; |
| 1147 | 1140 | data_written++; |
| 1148 | 1141 | } |
| 1149 | 1142 | |