Previous 199869 Revisions Next

r18413 Wednesday 10th October, 2012 at 13:43:27 UTC by hap
nevermind: yes, should make a triangle/poly primitive instead
[src/emu]rendlay.c rendlay.h

trunk/src/emu/rendlay.c
r18412r18413
737737
738738   // rect nodes
739739   else if (strcmp(compnode.name, "rect") == 0)
740   {
741740      m_type = CTYPE_RECT;
742      m_foldrect = (strcmp("yes", xml_get_attribute_string_with_subst(machine, compnode, "fold", "no")) == 0);
743   }
744741
745742   // disk nodes
746743   else if (strcmp(compnode.name, "disk") == 0)
r18412r18413
831828         break;
832829
833830      case CTYPE_REEL:
834
835831         draw_reel(machine, dest, bounds, state);
836832         break;
837833
r18412r18413
857853   // iterate over X and Y
858854   for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
859855   {
860      // if folded, find the right edge
861      UINT32 max_x = bounds.max_x;
862      if (m_foldrect == 1)
863         max_x = bounds.min_x + ((float)(y - bounds.min_y) / (float)(bounds.max_y - bounds.min_y)) * (float)(bounds.max_x - bounds.min_x) + 0.5;
864
865      for (UINT32 x = bounds.min_x; x <= max_x; x++)
856      for (UINT32 x = bounds.min_x; x <= bounds.max_x; x++)
866857      {
867858         UINT32 finalr = r;
868859         UINT32 finalg = g;
trunk/src/emu/rendlay.h
r18412r18413
163163      astring            m_string;               // string for text components
164164      int               m_digits;               // number of digits for simple counters
165165      int               m_textalign;            // text alignment to box
166      bool            m_foldrect;               // fold rect diagonally
167166      bitmap_argb32      m_bitmap[MAX_BITMAPS];      // source bitmap for images
168167      astring            m_dirname;               // directory name of image file (for lazy loading)
169168      emu_file *         m_file[MAX_BITMAPS];      // file object for reading image/alpha files

Previous 199869 Revisions Next


© 1997-2024 The MAME Team