trunk/src/emu/rendlay.c
| r18406 | r18407 | |
| 737 | 737 | |
| 738 | 738 | // rect nodes |
| 739 | 739 | else if (strcmp(compnode.name, "rect") == 0) |
| 740 | { |
| 740 | 741 | m_type = CTYPE_RECT; |
| 742 | m_foldrect = xml_get_attribute_int_with_subst(machine, compnode, "fold", 0); |
| 743 | } |
| 741 | 744 | |
| 742 | 745 | // disk nodes |
| 743 | 746 | else if (strcmp(compnode.name, "disk") == 0) |
| r18406 | r18407 | |
| 853 | 856 | |
| 854 | 857 | // iterate over X and Y |
| 855 | 858 | for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++) |
| 856 | | for (UINT32 x = bounds.min_x; x <= bounds.max_x; x++) |
| 859 | { |
| 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++) |
| 857 | 866 | { |
| 858 | 867 | UINT32 finalr = r; |
| 859 | 868 | UINT32 finalg = g; |
| r18406 | r18407 | |
| 871 | 880 | // store the target pixel, dividing the RGBA values by the overall scale factor |
| 872 | 881 | dest.pix32(y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb); |
| 873 | 882 | } |
| 883 | } |
| 874 | 884 | } |
| 875 | 885 | |
| 876 | 886 | |