Previous 199869 Revisions Next

r21390 Saturday 23rd February, 2013 at 13:28:40 UTC by David Haywood
experiment with when we do the colour lookup
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21389r21390
660660         if (!line[drawx]) \
661661         { \
662662            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); \
677666            line[drawx] = r<<16 | g<<8 | b; \
678667         } \
679668      } \
r21389r21390
10951084         // these should be 'cell numbers' (tile numbers) which look up RLE data?
10961085         UINT32 spriteNumber = (m_expanded_10bit_gfx[ (b3romoffset) + (lookupnum<<1) +0 ] << 10) | (m_expanded_10bit_gfx[ (b3romoffset) + (lookupnum<<1) + 1 ]);
10971086         UINT16 tempshape[16*16];
1087         
1088         int color_offs = (b1colorNumber & 0x3ff)*0x40 * 5; /* yes, * 5 */
1089         color_offs+= 0x1ec800 * 5; /* ?? */
10981090
10991091         // skip the decoding if it's the same tile as last time!
11001092         if (spriteNumber != lastSpriteNumber)
r21389r21390
11211113
11221114                  while (data_written<256 && encodelength >=0)
11231115                  {
1124                     tempshape[data_written] = rledata;
1116                     tempshape[data_written] = m_rearranged_16bit_gfx[color_offs + rledata];
11251117                     encodelength--;
11261118                     data_written++;
11271119                  }
r21389r21390
11341126
11351127                  while (data_written<256 && encodelength >=0)
11361128                  {
1137                     tempshape[data_written] = rledata;
1129                     tempshape[data_written] = m_rearranged_16bit_gfx[color_offs + rledata];
11381130                     encodelength--;
11391131                     data_written++;
11401132                  }
r21389r21390
11421134               }
11431135               else
11441136               {
1137                  int rledata = (compdata & 0x0ff);
11451138                  // mm cccc cccc
1146                  tempshape[data_written] = compdata&0xff;
1139                  tempshape[data_written] = m_rearranged_16bit_gfx[color_offs + rledata];
11471140                  data_written++;
11481141               }
11491142

Previous 199869 Revisions Next


© 1997-2024 The MAME Team