Changeset 23814
- Timestamp:
- 09/21/13 14:57:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/skin.h
r23812 r23814 2683 2683 void drawgradient(int posx, int posy, int width, int height, long col1, long col2, int transparent, int flag) 2684 2684 { 2685 int p, i, x, y, steps, xstep, ystep, tmp = 0 ;2685 int p, i, x, y, steps, xstep, ystep, tmp = 0, r = 0; 2686 2686 int xcount = 0, ycount = 0, owidth = width, oheight = height; 2687 2687 unsigned char r3, g3, b3; … … 2692 2692 if(flag == LEFTRIGHT || flag == LEFTMIDDLE) 2693 2693 { 2694 if(flag == LEFTMIDDLE) width = (width >> 1);2694 if(flag == LEFTMIDDLE) width = width / 2; 2695 2695 if(width < 10) 2696 2696 steps = width; 2697 2697 if(width < 100) 2698 steps = (width >> 1);2698 steps = width / 2; 2699 2699 else 2700 2700 steps = width / 5; … … 2704 2704 else 2705 2705 { 2706 if(flag == TOPMIDDLE) height = (height >> 1);2706 if(flag == TOPMIDDLE) height = height / 2; 2707 2707 if(height < 10) 2708 2708 steps = height; 2709 2709 else if(height < 100) 2710 steps = (height >> 1);2710 steps = height / 2; 2711 2711 else 2712 2712 steps = height / 5; … … 2735 2735 col = (transparent << 24) | (r3 << 16) | (g3 << 8) | b3; 2736 2736 2737 r = 0; 2737 2738 for(y = posy; y < yend; y += skinfb->width) 2738 for(x = posx; x < xend; x++) 2739 drawpixelfast(x, y, col); 2739 { 2740 if(r == 0) 2741 { 2742 r = 1; 2743 for(x = posx; x < xend; x++) 2744 drawpixelfast(x, y, col); 2745 } 2746 else 2747 memcpy(skinfb->fb + (y + posx) * skinfb->colbytes, skinfb->fb + (posy + posx) * skinfb->colbytes, (xend - posx) * skinfb->colbytes); 2748 } 2740 2749 2741 2750 if(flag == LEFTRIGHT || flag == LEFTMIDDLE) … … 2764 2773 col = (transparent << 24) | (r3 << 16) | (g3 << 8) | b3; 2765 2774 2775 r = 0; 2766 2776 for(y = posy; y < yend; y += skinfb->width) 2767 for(x = posx; x < xend; x++) 2768 drawpixelfast(x, y, col); 2777 { 2778 if(r == 0) 2779 { 2780 r = 1; 2781 for(x = posx; x < xend; x++) 2782 drawpixelfast(x, y, col); 2783 } 2784 else 2785 memcpy(skinfb->fb + (y + posx) * skinfb->colbytes, skinfb->fb + (posy + posx) * skinfb->colbytes, (xend - posx) * skinfb->colbytes); 2786 } 2769 2787 2770 2788 if(flag == LEFTMIDDLE)
Note: See TracChangeset
for help on using the changeset viewer.