Rev 2381 | Rev 2430 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2381 | Rev 2423 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 8... | Line 8... | ||
8 | 8 | ||
Line 9... | Line 9... | ||
9 | $Revision: 2381 $ |
9 | $Revision: 2423 $ |
10 | 10 | ||
11 | ;============================================================================== |
11 | ;============================================================================== |
Line 607... | Line 607... | ||
607 | draw_rectangle: ;////////////////////////////////////////////////////////////// |
607 | draw_rectangle: ;////////////////////////////////////////////////////////////// |
608 | ;------------------------------------------------------------------------------ |
608 | ;------------------------------------------------------------------------------ |
609 | ;> eax = pack[16(left), 16(right)] |
609 | ;> eax = pack[16(left), 16(right)] |
610 | ;> ebx = pack[16(top), 16(bottom)] |
610 | ;> ebx = pack[16(top), 16(bottom)] |
611 | ;> esi = color |
611 | ;> esi = color |
- | 612 | ; ?? RR GG BB ; 0x01000000 negation |
|
- | 613 | ; ; 0x02000000 used for draw_rectangle without top line |
|
- | 614 | ; ; for example drawwindow_III and drawwindow_IV |
|
612 | ;------------------------------------------------------------------------------ |
615 | ;------------------------------------------------------------------------------ |
613 | push eax ebx ecx edi |
616 | push eax ebx ecx edi |
Line 614... | Line 617... | ||
614 | 617 | ||
Line 615... | Line 618... | ||
615 | xor edi, edi |
618 | xor edi, edi |
616 | 619 | ||
Line 617... | Line 620... | ||
617 | .flags_set: |
620 | .flags_set: |
618 | push ebx |
621 | push ebx |
619 | - | ||
- | 622 | ||
620 | ; set line color |
623 | ; set line color |
621 | mov ecx, esi |
624 | mov ecx, esi |
622 | 625 | sub esi, 1 shl 25 |
|
623 | ; draw top border |
626 | ; draw top border |
624 | rol ebx, 16 |
627 | rol ebx, 16 |
- | 628 | push ebx |
|
- | 629 | rol ebx, 16 |
|
- | 630 | pop bx |
|
625 | push ebx |
631 | test ecx, 1 shl 25 |
626 | rol ebx, 16 |
632 | jnz @f |
627 | pop bx |
633 | sub ecx, 1 shl 25 |
628 | call [draw_line] |
634 | call [draw_line] |
629 | 635 | @@: |
|
630 | ; draw bottom border |
636 | ; draw bottom border |
Line 826... | Line 832... | ||
826 | add bx, word[edx + WDATA.box.height] |
832 | add bx, word[edx + WDATA.box.height] |
Line 827... | Line 833... | ||
827 | 833 | ||
828 | mov esi, [edx + WDATA.cl_frames] |
834 | mov esi, [edx + WDATA.cl_frames] |
829 | shr esi, 1 |
835 | shr esi, 1 |
- | 836 | and esi, 0x007f7f7f |
|
- | 837 | or esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line |
|
- | 838 | ror ebx, 16 |
|
- | 839 | add ebx, [_skinh] |
|
- | 840 | sub bx, 1 |
|
830 | and esi, 0x007f7f7f |
841 | rol ebx, 16 |
Line 831... | Line 842... | ||
831 | call draw_rectangle |
842 | call draw_rectangle |
832 | 843 | ||
833 | push esi |
844 | push esi |
- | 845 | mov ecx, 3 |
|
Line 834... | Line 846... | ||
834 | mov ecx, 3 |
846 | mov esi, [edx + WDATA.cl_frames] |
835 | mov esi, [edx + WDATA.cl_frames] |
847 | or esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line |
836 | 848 | ||
837 | .next_frame: |
849 | .next_frame: |
838 | add eax, 1 * 65536 - 1 |
850 | add eax, 1 * 65536 - 1 |
839 | add ebx, 1 * 65536 - 1 |
851 | add ebx, 0 * 65536 - 1 |
Line 840... | Line 852... | ||
840 | call draw_rectangle |
852 | call draw_rectangle |
841 | dec ecx |
853 | dec ecx |
842 | jnz .next_frame |
854 | jnz .next_frame |
843 | 855 | ||
Line 844... | Line 856... | ||
844 | pop esi |
856 | pop esi |
Line 845... | Line 857... | ||
845 | add eax, 1 * 65536 - 1 |
857 | add eax, 1 * 65536 - 1 |