Previous 199869 Revisions Next

r21233 Wednesday 20th February, 2013 at 20:50:28 UTC by David Haywood
document some more used cases
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21232r21233
763763                  if (m_blit2_unused!=0) printf("blit1 unknown bits set %08x\n", data);
764764                  if (m_b1mode)
765765                  {
766                     if (m_b2tpen != 0x7f) printf("m_b1mode 1, m_b2tpen!=0x7f");
766                     if (m_b2tpen != 0x7f) printf("m_b1mode 1, m_b2tpen!=0x7f\n");
767767                  }
768768                  else
769769                  {
770                     if (m_b2tpen != 0x00) printf("m_b1mode 0, m_b2tpen!=0x00");
770                     // 0x01/0x02 trips in rare cases (start of one of the attract levels) maybe this is some kind of alpha instead?
771                     if ((m_b2tpen != 0x00) && (m_b2tpen != 0x01) && (m_b2tpen != 0x02)) printf("m_b1mode 0, m_b2tpen!=0x00,0x01 or 0x02 (is %02x)\n", m_b2tpen);
771772                  }
772773
773774                   // 00??0uuu 
r21232r21233
960961
961962
962963                  // Splat some sprites
963                  for (int h = 0; h < m_hCellCount; h++)
964                  for (int v = 0; v < m_vCellCount; v++)
964965                  {
965                     for (int v = 0; v < m_vCellCount; v++)
966                     const int pixelOffsetY = ((m_vPosition) + (v* 16 * m_vZoom)) / 0x40;
967                     if (pixelOffsetY>383)
966968                     {
969                        v = m_vCellCount;
970                        continue;
971                     }
972
973                     for (int h = 0; h < m_hCellCount; h++)
974                     {
967975                        const int pixelOffsetX = ((m_hPosition) + (h* 16 * m_hZoom)) / 0x40;
968                        const int pixelOffsetY = ((m_vPosition) + (v* 16 * m_vZoom)) / 0x40;
976                        if (pixelOffsetX>495)
977                        {
978                           h = m_hCellCount;
979                           continue;
980                        }
969981
970982                        // It's unknown if it's row-major or column-major
971983                        // TODO: Study the CRT test and "Cool Riders" logo for clues.
r21232r21233
10241036                           color = m_b1colorNumber;
10251037
10261038                        // DEBUG: Draw 16x16 block
1039                        UINT32* line;
10271040                        for (int y = 0; y < blockhigh; y++)
10281041                        {
1029                           int drawy = pixelOffsetY+y;
1042                           const int drawy = pixelOffsetY+y;
10301043                           if ((drawy>383) || (drawy<0)) continue;
1044                           line = &drawbitmap->pix32(drawy);
10311045
10321046                           for (int x = 0; x < blockwide; x++)
10331047                           {
1034                              int drawx = pixelOffsetX+x;
1048                              const int drawx = pixelOffsetX+x;
10351049                              if ((drawx>=495 || drawx<0)) continue;
10361050
1037                              if (drawbitmap->pix32(drawy,drawx)==0) drawbitmap->pix32(drawy, drawx) = color;
1051                              if (line[drawx]==0) line[drawx] = color;
10381052                           }
10391053                        }
10401054                     }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team