Rev 6352 | Rev 6355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6352 | Rev 6354 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | macro square_width_put |
|
- | 2 | { |
|
- | 3 | local .no_put_to_screen |
|
- | 4 | local .next_color_put |
|
- | 5 | local .vertical_width_put |
|
- | 6 | local .horizontal_width_put |
|
- | 7 | ||
- | 8 | mov ebx,[ReserveArray] |
|
- | 9 | mov eax,[ebx] |
|
- | 10 | test eax,eax |
|
- | 11 | jz .no_put_to_screen |
|
- | 12 | mov ecx,[ebx] |
|
- | 13 | add ebx,4 |
|
- | 14 | xor ebp,ebp |
|
- | 15 | ||
- | 16 | .next_color_put: |
|
- | 17 | ;put saved pixels in ReserveArray |
|
- | 18 | push ecx |
|
- | 19 | mov [counter2],5 |
|
- | 20 | mov edi,[ebx] |
|
- | 21 | push edi |
|
- | 22 | .vertical_width_put: |
|
- | 23 | mov [counter],5 |
|
- | 24 | ||
- | 25 | .horizontal_width_put: |
|
- | 26 | mov edx,[ebx+4807*4+ebp] |
|
- | 27 | ;and edx,0xffffff |
|
- | 28 | mov [edi],dx |
|
- | 29 | shr edx,16 |
|
- | 30 | mov [edi+2],dl |
|
- | 31 | ||
- | 32 | add edi,3 |
|
- | 33 | add ebp,4 |
|
- | 34 | dec [counter] |
|
- | 35 | jnz .horizontal_width_put |
|
- | 36 | ||
- | 37 | mov ecx,[Picture_SizeX] |
|
- | 38 | sub ecx,5 |
|
- | 39 | lea ecx,[ecx+ecx*2] |
|
- | 40 | add edi,ecx |
|
- | 41 | dec [counter2] |
|
- | 42 | jnz .vertical_width_put |
|
- | 43 | pop edi |
|
- | 44 | pop ecx |
|
- | 45 | ||
- | 46 | add ebx,4 |
|
- | 47 | dec ecx |
|
- | 48 | jnz .next_color_put |
|
- | 49 | ||
- | 50 | .no_put_to_screen: |
|
- | 51 | } |
|
- | 52 | ||
- | 53 | macro square_width_save |
|
- | 54 | { |
|
- | 55 | local .next_color_save |
|
- | 56 | local .vertical_width_save |
|
- | 57 | local .horizontal_width_save |
|
- | 58 | mov ebx,[ReserveArray] |
|
- | 59 | mov [ebx],eax |
|
- | 60 | mov ecx,eax |
|
- | 61 | add ebx,4 |
|
- | 62 | xor ebp,ebp |
|
- | 63 | ||
- | 64 | .next_color_save: |
|
- | 65 | ;save color of pixel in ReserveArray |
|
- | 66 | push ecx |
|
- | 67 | mov [counter2],5 |
|
- | 68 | mov edi,[ebx] |
|
- | 69 | .vertical_width_save: |
|
- | 70 | mov [counter],5 |
|
- | 71 | ||
- | 72 | .horizontal_width_save: |
|
- | 73 | mov eax,edi |
|
- | 74 | mov edx,[eax] |
|
- | 75 | ;and edx,0xffffff |
|
- | 76 | mov [ebx+4807*4+ebp],dx |
|
- | 77 | shr edx,16 |
|
- | 78 | mov [ebx+4807*4+2+ebp],dl |
|
- | 79 | ||
- | 80 | add edi,3 |
|
- | 81 | add ebp,4 |
|
- | 82 | dec [counter] |
|
- | 83 | jnz .horizontal_width_save |
|
- | 84 | ||
- | 85 | mov ecx,[Picture_SizeX] |
|
- | 86 | sub ecx,5 |
|
- | 87 | lea ecx,[ecx+ecx*2] |
|
- | 88 | add edi,ecx |
|
- | 89 | dec [counter2] |
|
- | 90 | jnz .vertical_width_save |
|
- | 91 | pop ecx |
|
- | 92 | ||
- | 93 | add ebx,4 |
|
- | 94 | dec ecx |
|
- | 95 | jnz .next_color_save |
|
- | 96 | } |
|
- | 97 | ||
1 | ;----------------------------------------------------------- |
98 | ;----------------------------------------------------------- |
2 | ;-----instruments of panel(icon's instruments)-------------- |
99 | ;-----instruments of panel(icon's instruments)-------------- |
3 | ;----------------------------------------------------------- |
100 | ;----------------------------------------------------------- |
4 | TakeButtonInstruments: |
101 | TakeButtonInstruments: |
Line 48... | Line 145... | ||
48 | mov [line_width],3 |
145 | mov [line_width],3 |
Line 49... | Line 146... | ||
49 | 146 | ||
50 | jmp still |
147 | jmp still |
Line 51... | Line 148... | ||
51 | no_brush3: |
148 | no_brush3: |
52 | 149 | ||
53 | ;************************brush 4************************ |
150 | ;*************************brush 4*********************** |
Line 54... | Line 151... | ||
54 | cmp eax,43 |
151 | cmp eax,43 |
55 | jne no_brush4 |
152 | jne no_brush4 |
Line 63... | Line 160... | ||
63 | mov [line_width],4 |
160 | mov [line_width],4 |
Line 64... | Line 161... | ||
64 | 161 | ||
65 | jmp still |
162 | jmp still |
Line 66... | Line 163... | ||
66 | no_brush4: |
163 | no_brush4: |
67 | 164 | ||
68 | ;************************brush 5************************ |
165 | ;*************************brush 5*********************** |
Line 69... | Line 166... | ||
69 | cmp eax,44 |
166 | cmp eax,44 |
70 | jne no_brush5 |
167 | jne no_brush5 |
Line 151... | Line 248... | ||
151 | call MovePictureToWorkScreen |
248 | call MovePictureToWorkScreen |
152 | mov [Activate_instrument],1 |
249 | mov [Activate_instrument],1 |
153 | jmp still |
250 | jmp still |
154 | no_pensil: |
251 | no_pensil: |
Line 155... | Line 252... | ||
155 | 252 | ||
156 | ;**********************pipetka************************** |
253 | ;*************************pipetka*********************** |
157 | cmp eax,15 |
254 | cmp eax,15 |
Line 158... | Line 255... | ||
158 | jne no_pipetka |
255 | jne no_pipetka |
159 | 256 | ||
Line 172... | Line 269... | ||
172 | mcall SF_DRAW_RECT, 136*65536+20, 65*65536+21, [Color] |
269 | mcall SF_DRAW_RECT, 136*65536+20, 65*65536+21, [Color] |
Line 173... | Line 270... | ||
173 | 270 | ||
174 | jmp still |
271 | jmp still |
Line 175... | Line 272... | ||
175 | no_pipetka: |
272 | no_pipetka: |
176 | 273 | ||
177 | ;**********************draw brush*********************** |
274 | ;*************************draw brush******************** |
Line 178... | Line 275... | ||
178 | cmp eax,11 |
275 | cmp eax,11 |
Line 323... | Line 420... | ||
323 | mov [Last_instrument],eax |
420 | mov [Last_instrument],eax |
Line 324... | Line 421... | ||
324 | 421 | ||
325 | jmp still |
422 | jmp still |
Line 326... | Line 423... | ||
326 | no_brush: |
423 | no_brush: |
327 | 424 | ||
328 | ;************************Flood Fill******************* |
425 | ;************************Flood Fill********************* |
Line 329... | Line 426... | ||
329 | cmp eax,14 |
426 | cmp eax,14 |
330 | jne no_FloodFill |
427 | jne no_FloodFill |
Line 372... | Line 469... | ||
372 | mov [lastik_is_active],1 |
469 | mov [lastik_is_active],1 |
373 | jmp lastik_in |
470 | jmp lastik_in |
Line 374... | Line 471... | ||
374 | 471 | ||
Line 375... | Line 472... | ||
375 | no_lastik: |
472 | no_lastik: |
376 | 473 | ||
377 | ;****************************************************** |
474 | ;******************************************************* |
Line 378... | Line 475... | ||
378 | cmp eax,12 |
475 | cmp eax,12 |
379 | jne no_spray |
476 | jne no_spray |
Line 459... | Line 556... | ||
459 | call MovePictureToWorkScreen |
556 | call MovePictureToWorkScreen |
460 | jmp still |
557 | jmp still |
Line 461... | Line 558... | ||
461 | 558 | ||
Line 462... | Line 559... | ||
462 | no_spray: |
559 | no_spray: |
463 | 560 | ||
464 | ;***********************palette************************* |
561 | ;************************palette************************ |
Line 465... | Line 562... | ||
465 | cmp eax,51 |
562 | cmp eax,51 |
466 | jne no_palette |
563 | jne no_palette |
Line 589... | Line 686... | ||
589 | rep stosd |
686 | rep stosd |
590 | jmp still |
687 | jmp still |
591 | no_new_line_xy: |
688 | no_new_line_xy: |
Line 592... | Line 689... | ||
592 | 689 | ||
593 | ;put saved pixels |
- | |
594 | mov ebx,[ReserveArray] |
- | |
595 | mov eax,[ebx] |
- | |
596 | test eax,eax |
- | |
597 | jz no_put_line_to_screen_line |
- | |
598 | mov ecx,[ebx] |
- | |
599 | add ebx,4 |
- | |
600 | xor ebp,ebp |
- | |
601 | next_color_put_line: |
- | |
602 | ;put saved pixels in ReserveArray |
- | |
603 | push ecx |
- | |
604 | and [counter2],0 |
- | |
605 | mov edi,[ebx] |
- | |
606 | push edi |
690 | ;put saved pixels |
607 | vertical_width_put: |
- | |
608 | and [counter],0 |
- | |
609 | - | ||
610 | horizontal_width_put: |
- | |
611 | mov edx,[ebx+4807*4+ebp] |
- | |
612 | and edx,0xffffff |
- | |
613 | mov [edi],dx |
- | |
614 | shr edx,16 |
- | |
615 | mov [edi+2],dl |
- | |
616 | - | ||
617 | add edi,3 |
- | |
618 | add ebp,4 |
- | |
619 | inc [counter] |
- | |
620 | cmp [counter],5 |
- | |
621 | jne horizontal_width_put |
- | |
622 | - | ||
623 | mov ecx,[Picture_SizeX] |
- | |
624 | sub ecx,5 |
- | |
625 | lea ecx,[ecx+ecx*2] |
- | |
626 | add edi,ecx |
- | |
627 | inc [counter2] |
- | |
628 | cmp [counter2],5 |
- | |
629 | jne vertical_width_put |
- | |
630 | pop edi |
- | |
631 | pop ecx |
- | |
632 | add ebx,4 |
- | |
633 | dec ecx |
- | |
634 | jnz next_color_put_line |
- | |
635 | - | ||
Line 636... | Line 691... | ||
636 | no_put_line_to_screen_line: |
691 | square_width_put |
637 | 692 | ||
638 | ;calculate line |
693 | ;calculate line |
639 | mov ebx,[ReserveArray] |
694 | mov ebx,[ReserveArray] |
Line 661... | Line 716... | ||
661 | jl no_minimum_y_line |
716 | jl no_minimum_y_line |
662 | mov edi,ebp |
717 | mov edi,ebp |
663 | no_minimum_y_line: |
718 | no_minimum_y_line: |
Line 664... | Line 719... | ||
664 | 719 | ||
665 | call calculate_line |
- | |
666 | ;call calculate_rectangle |
- | |
Line 667... | Line 720... | ||
667 | mov [counter],eax |
720 | call calculate_line |
668 | - | ||
669 | ;save color pixels in ReserveArray |
- | |
670 | mov eax,[counter] |
- | |
671 | mov ebx,[ReserveArray] |
- | |
672 | mov [ebx],eax |
- | |
673 | - | ||
674 | mov ecx,[ebx] |
- | |
675 | add ebx,4 |
- | |
676 | - | ||
677 | xor ebp,ebp |
- | |
678 | next_color_save_line: |
- | |
679 | ;save color of pixel in ReserveArray |
- | |
680 | push ecx |
- | |
681 | and [counter2],0 |
721 | |
682 | mov edi,[ebx] |
- | |
683 | vertical_width_save: |
- | |
684 | and [counter],0 |
- | |
685 | - | ||
686 | horizontal_width_save: |
- | |
687 | mov eax,edi |
- | |
688 | mov edx,[eax] |
- | |
689 | and edx,0xffffff |
- | |
690 | mov [ebx+4807*4+ebp],dx |
- | |
691 | shr edx,16 |
- | |
692 | mov [ebx+4807*4+2+ebp],dl |
- | |
693 | - | ||
694 | add edi,3 |
- | |
695 | add ebp,4 |
- | |
696 | inc [counter] |
- | |
697 | cmp [counter],5 |
- | |
698 | jne horizontal_width_save |
- | |
699 | - | ||
700 | mov ecx,[Picture_SizeX] |
- | |
701 | sub ecx,5 |
- | |
702 | lea ecx,[ecx+ecx*2] |
- | |
703 | add edi,ecx |
- | |
704 | inc [counter2] |
- | |
705 | cmp [counter2],5 |
- | |
706 | jne vertical_width_save |
- | |
707 | pop ecx |
- | |
708 | add ebx,4 |
- | |
Line 709... | Line 722... | ||
709 | dec ecx |
722 | ;save color pixels in ReserveArray |
710 | jnz next_color_save_line |
723 | square_width_save |
711 | 724 | ||
712 | ;draw calculated pixels on work arrea |
725 | ;draw calculated pixels on work arrea |
Line 761... | Line 774... | ||
761 | call MovePictureToWorkScreen |
774 | call MovePictureToWorkScreen |
Line 762... | Line 775... | ||
762 | 775 | ||
763 | jmp still |
776 | jmp still |
Line 764... | Line 777... | ||
764 | no_line: |
777 | no_line: |
765 | 778 | ||
766 | ;*********************************DRAW RECTANGLE**************************** |
779 | ;************************draw rectangle***************** |
Line 767... | Line 780... | ||
767 | cmp eax,17 |
780 | cmp eax,17 |
Line 785... | Line 798... | ||
785 | rep stosd |
798 | rep stosd |
786 | jmp still |
799 | jmp still |
787 | no_new_rectangle_xy: |
800 | no_new_rectangle_xy: |
Line 788... | Line 801... | ||
788 | 801 | ||
789 | ;put saved pixels |
- | |
790 | mov ebx,[ReserveArray] |
- | |
791 | mov eax,[ebx] |
- | |
792 | test eax,eax |
- | |
793 | jz no_put_rectangle_to_screen_line |
- | |
794 | mov ecx,[ebx] |
- | |
795 | add ebx,4 |
- | |
796 | xor ebp,ebp |
- | |
797 | next_color_put_rectangle: |
- | |
798 | ;put saved pixels in ReserveArray |
- | |
799 | push ecx |
- | |
800 | and [counter2],0 |
- | |
801 | mov edi,[ebx] |
- | |
802 | push edi |
802 | ;put saved pixels |
803 | vertical_width_put_rectangle: |
- | |
804 | and [counter],0 |
- | |
805 | - | ||
806 | horizontal_width_put_rectangle: |
- | |
807 | mov edx,[ebx+4807*4+ebp] |
- | |
808 | and edx,0xffffff |
- | |
809 | mov [edi],dx |
- | |
810 | shr edx,16 |
- | |
811 | mov [edi+2],dl |
- | |
812 | - | ||
813 | add edi,3 |
- | |
814 | add ebp,4 |
- | |
815 | inc [counter] |
- | |
816 | cmp [counter],5 |
- | |
817 | jne horizontal_width_put_rectangle |
- | |
818 | - | ||
819 | mov ecx,[Picture_SizeX] |
- | |
820 | sub ecx,5 |
- | |
821 | lea ecx,[ecx+ecx*2] |
- | |
822 | add edi,ecx |
- | |
823 | inc [counter2] |
- | |
824 | cmp [counter2],5 |
- | |
825 | jne vertical_width_put_rectangle |
- | |
826 | pop edi |
- | |
827 | pop ecx |
- | |
828 | add ebx,4 |
- | |
829 | dec ecx |
- | |
830 | jnz next_color_put_rectangle |
- | |
831 | - | ||
Line 832... | Line 803... | ||
832 | no_put_rectangle_to_screen_line: |
803 | square_width_put |
833 | 804 | ||
834 | ;calculate line |
805 | ;calculate line |
835 | mov ebx,[ReserveArray] |
806 | mov ebx,[ReserveArray] |
Line 857... | Line 828... | ||
857 | jl no_minimum_y_rectangle |
828 | jl no_minimum_y_rectangle |
858 | mov edi,ebp |
829 | mov edi,ebp |
859 | no_minimum_y_rectangle: |
830 | no_minimum_y_rectangle: |
Line 860... | Line 831... | ||
860 | 831 | ||
861 | call calculate_rectangle |
- | |
Line 862... | Line 832... | ||
862 | mov [counter],eax |
832 | call calculate_rectangle |
863 | - | ||
864 | ;save color pixels in ReserveArray |
- | |
865 | mov eax,[counter] |
- | |
866 | mov ebx,[ReserveArray] |
- | |
867 | mov [ebx],eax |
- | |
868 | - | ||
869 | mov ecx,[ebx] |
- | |
870 | add ebx,4 |
- | |
871 | - | ||
872 | xor ebp,ebp |
- | |
873 | next_color_save_rectangle: |
- | |
874 | ;save color of pixel in ReserveArray |
- | |
875 | push ecx |
- | |
876 | and [counter2],0 |
833 | |
877 | mov edi,[ebx] |
- | |
878 | vertical_width_save_rectangle: |
- | |
879 | and [counter],0 |
- | |
880 | - | ||
881 | horizontal_width_save_rectangle: |
- | |
882 | mov eax,edi |
- | |
883 | mov edx,[eax] |
- | |
884 | and edx,0xffffff |
- | |
885 | mov [ebx+4807*4+ebp],dx |
- | |
886 | shr edx,16 |
- | |
887 | mov [ebx+4807*4+2+ebp],dl |
- | |
888 | - | ||
889 | add edi,3 |
- | |
890 | add ebp,4 |
- | |
891 | inc [counter] |
- | |
892 | cmp [counter],5 |
- | |
893 | jne horizontal_width_save_rectangle |
- | |
894 | - | ||
895 | mov ecx,[Picture_SizeX] |
- | |
896 | sub ecx,5 |
- | |
897 | lea ecx,[ecx+ecx*2] |
- | |
898 | add edi,ecx |
- | |
899 | inc [counter2] |
- | |
900 | cmp [counter2],5 |
- | |
901 | jne vertical_width_save_rectangle |
- | |
902 | pop ecx |
- | |
903 | add ebx,4 |
- | |
Line 904... | Line 834... | ||
904 | dec ecx |
834 | ;save color pixels in ReserveArray |
905 | jnz next_color_save_rectangle |
835 | square_width_save |
906 | 836 | ||
907 | ;draw calculated pixels on work arrea |
837 | ;draw calculated pixels on work arrea |
Line 955... | Line 885... | ||
955 | 885 | ||
956 | call MovePictureToWorkScreen |
886 | call MovePictureToWorkScreen |
957 | jmp still |
887 | jmp still |
Line 958... | Line 888... | ||
958 | no_rectangle: |
888 | no_rectangle: |
959 | 889 | ||
960 | ;*********************************DRAW CIRCLE**************************** |
890 | ;************************draw circle******************** |
Line 961... | Line 891... | ||
961 | cmp eax,18 |
891 | cmp eax,18 |
Line 979... | Line 909... | ||
979 | rep stosd |
909 | rep stosd |
980 | jmp still |
910 | jmp still |
981 | no_new_circle_xy: |
911 | no_new_circle_xy: |
Line 982... | Line 912... | ||
982 | 912 | ||
983 | ;put saved pixels |
- | |
984 | mov ebx,[ReserveArray] |
- | |
985 | mov eax,[ebx] |
- | |
986 | test eax,eax |
- | |
987 | jz no_put_line_to_screen_circle |
- | |
988 | mov ecx,[ebx] |
- | |
989 | add ebx,4 |
- | |
990 | xor ebp,ebp |
- | |
991 | next_color_put_circle: |
- | |
992 | ;put saved pixels in ReserveArray |
- | |
993 | push ecx |
- | |
994 | and [counter2],0 |
- | |
995 | mov edi,[ebx] |
- | |
996 | push edi |
913 | ;put saved pixels |
997 | vertical_width_put_circle: |
- | |
998 | and [counter],0 |
- | |
999 | - | ||
1000 | horizontal_width_put_circle: |
- | |
1001 | mov edx,[ebx+4807*4+ebp] |
- | |
1002 | and edx,0xffffff |
- | |
1003 | mov [edi],dx |
- | |
1004 | shr edx,16 |
- | |
1005 | mov [edi+2],dl |
- | |
1006 | - | ||
1007 | add edi,3 |
- | |
1008 | add ebp,4 |
- | |
1009 | inc [counter] |
- | |
1010 | cmp [counter],5 |
- | |
1011 | jne horizontal_width_put_circle |
- | |
1012 | - | ||
1013 | mov ecx,[Picture_SizeX] |
- | |
1014 | sub ecx,5 |
- | |
1015 | lea ecx,[ecx+ecx*2] |
- | |
1016 | add edi,ecx |
- | |
1017 | inc [counter2] |
- | |
1018 | cmp [counter2],5 |
- | |
1019 | jne vertical_width_put_circle |
- | |
1020 | pop edi |
- | |
1021 | pop ecx |
- | |
1022 | add ebx,4 |
- | |
1023 | dec ecx |
- | |
1024 | jnz next_color_put_circle |
- | |
1025 | - | ||
Line 1026... | Line 914... | ||
1026 | no_put_line_to_screen_circle: |
914 | square_width_put |
1027 | 915 | ||
1028 | mov esi,[ScreenX] |
916 | mov esi,[ScreenX] |
1029 | mov edi,[ScreenY] |
917 | mov edi,[ScreenY] |
Line 1139... | Line 1027... | ||
1139 | shl edx,16 |
1027 | shl edx,16 |
1140 | add edx,[y] |
1028 | add edx,[y] |
1141 | mov esi,[Radius] |
1029 | mov esi,[Radius] |
1142 | call calculate_circle |
1030 | call calculate_circle |
Line 1143... | Line -... | ||
1143 | - | ||
1144 | mov [counter],eax |
- | |
1145 | 1031 | ||
1146 | ;save color pixels in ReserveArray |
- | |
1147 | mov eax,[counter] |
- | |
1148 | mov ebx,[ReserveArray] |
- | |
1149 | mov [ebx],eax |
- | |
1150 | - | ||
1151 | mov ecx,[ebx] |
- | |
1152 | add ebx,4 |
- | |
1153 | - | ||
1154 | xor ebp,ebp |
- | |
1155 | next_color_save_circle: |
- | |
1156 | ;save color of pixel in ReserveArray |
- | |
1157 | push ecx |
- | |
1158 | and [counter2],0 |
- | |
1159 | mov edi,[ebx] |
1032 | ;save color pixels in ReserveArray |
1160 | vertical_width_save_circle: |
- | |
1161 | and [counter],0 |
- | |
1162 | - | ||
1163 | horizontal_width_save_circle: |
- | |
1164 | mov eax,edi |
- | |
1165 | mov edx,[eax] |
- | |
1166 | and edx,0xffffff |
- | |
1167 | mov [ebx+4807*4+ebp],dx |
- | |
1168 | shr edx,16 |
- | |
1169 | mov [ebx+4807*4+2+ebp],dl |
- | |
1170 | - | ||
1171 | add edi,3 |
- | |
1172 | add ebp,4 |
- | |
1173 | inc [counter] |
- | |
1174 | cmp [counter],5 |
- | |
1175 | jne horizontal_width_save_circle |
- | |
1176 | - | ||
1177 | mov ecx,[Picture_SizeX] |
- | |
1178 | sub ecx,5 |
- | |
1179 | lea ecx,[ecx+ecx*2] |
- | |
1180 | add edi,ecx |
- | |
1181 | inc [counter2] |
- | |
1182 | cmp [counter2],5 |
- | |
1183 | jne vertical_width_save_circle |
- | |
1184 | pop ecx |
- | |
1185 | add ebx,4 |
- | |
1186 | dec ecx |
- | |
Line 1187... | Line 1033... | ||
1187 | jnz next_color_save_circle |
1033 | square_width_save |
1188 | 1034 | ||
1189 | ;draw calculated pixels on work arrea |
1035 | ;draw calculated pixels on work arrea |
1190 | mov ebx,[ReserveArray] |
1036 | mov ebx,[ReserveArray] |
Line 1248... | Line 1094... | ||
1248 | and [Current_instrument],0 |
1094 | and [Current_instrument],0 |
1249 | call drawwin |
1095 | call drawwin |
1250 | jmp still |
1096 | jmp still |
1251 | no_1_: |
1097 | no_1_: |
Line 1252... | Line 1098... | ||
1252 | 1098 | ||
1253 | ;*************************zoom 2************************ |
1099 | ;************************zoom 2************************* |
1254 | cmp eax,46 |
1100 | cmp eax,46 |
1255 | jne no_2_ |
1101 | jne no_2_ |
1256 | mov [k],2 |
1102 | mov [k],2 |
1257 | call drawwin |
1103 | call drawwin |
Line 1260... | Line 1106... | ||
1260 | and [Current_instrument],0 |
1106 | and [Current_instrument],0 |
1261 | jmp still |
1107 | jmp still |
1262 | no_2_: |
1108 | no_2_: |
Line 1263... | Line 1109... | ||
1263 | 1109 | ||
1264 | 1110 | ||
1265 | ;*************************zoom 3************************ |
1111 | ;************************zoom 3************************* |
1266 | cmp eax,47 |
1112 | cmp eax,47 |
1267 | jne no_3_ |
1113 | jne no_3_ |
1268 | mov [k],3 |
1114 | mov [k],3 |
1269 | call drawwin |
1115 | call drawwin |
1270 | mov [Scroll1CoordinatX],9 |
1116 | mov [Scroll1CoordinatX],9 |
1271 | mov [Scroll2CoordinatY],89 |
1117 | mov [Scroll2CoordinatY],89 |
1272 | and [Current_instrument],0 |
1118 | and [Current_instrument],0 |
Line 1273... | Line 1119... | ||
1273 | jmp still |
1119 | jmp still |
1274 | no_3_: |
1120 | no_3_: |
1275 | 1121 | ||
1276 | ;*************************zoom 4************************ |
1122 | ;************************zoom 4************************* |
1277 | cmp eax,48 |
1123 | cmp eax,48 |
1278 | jne no_4_ |
1124 | jne no_4_ |
Line 1304... | Line 1150... | ||
1304 | mov [Scroll2CoordinatY],89 |
1150 | mov [Scroll2CoordinatY],89 |
1305 | and [Current_instrument],0 |
1151 | and [Current_instrument],0 |
1306 | jmp still |
1152 | jmp still |
1307 | no_16_: |
1153 | no_16_: |
Line 1308... | Line 1154... | ||
1308 | 1154 | ||
1309 | ;***************allocation of a countour********************* |
1155 | ;***************allocation of a countour**************** |
1310 | cmp eax,21 |
1156 | cmp eax,21 |
Line 1311... | Line 1157... | ||
1311 | jne no_allocation |
1157 | jne no_allocation |
1312 | 1158 | ||
Line 1538... | Line 1384... | ||
1538 | mov [ScreenX],eax |
1384 | mov [ScreenX],eax |
1539 | mov [ScreenY],ebx |
1385 | mov [ScreenY],ebx |
1540 | no_change_coordinats: |
1386 | no_change_coordinats: |
Line 1541... | Line 1387... | ||
1541 | 1387 | ||
1542 | ;put saved pixels |
- | |
1543 | mov ebx,[ReserveArray] |
- | |
1544 | mov eax,[ebx] |
- | |
1545 | test eax,eax |
- | |
1546 | jz no_put_line_to_screen_allocation |
- | |
1547 | mov ecx,[ebx] |
- | |
1548 | add ebx,4 |
- | |
1549 | xor ebp,ebp |
- | |
1550 | next_color_put_allocation: |
- | |
1551 | ;put saved pixels in ReserveArray |
- | |
1552 | push ecx |
- | |
1553 | and [counter2],0 |
- | |
1554 | mov edi,[ebx] |
- | |
1555 | push edi |
- | |
1556 | vertical_width_put_allocation: |
- | |
1557 | and [counter],0 |
- | |
1558 | - | ||
1559 | horizontal_width_put_allocation: |
- | |
1560 | mov edx,[ebx+4807*4+ebp] |
- | |
1561 | and edx,0xffffff |
- | |
1562 | mov [edi],dx |
- | |
1563 | shr edx,16 |
- | |
1564 | mov [edi+2],dl |
- | |
1565 | - | ||
1566 | add edi,3 |
1388 | ;put saved pixels |
1567 | add ebp,4 |
- | |
1568 | inc [counter] |
- | |
1569 | cmp [counter],1;5 |
- | |
1570 | jne horizontal_width_put_allocation |
- | |
1571 | - | ||
1572 | mov ecx,[Picture_SizeX] |
- | |
1573 | sub ecx,1;5 |
- | |
1574 | lea ecx,[ecx+ecx*2] |
- | |
1575 | add edi,ecx |
- | |
1576 | inc [counter2] |
- | |
1577 | cmp [counter2],1;5 |
- | |
1578 | jne vertical_width_put_allocation |
- | |
1579 | pop edi |
- | |
1580 | pop ecx |
- | |
1581 | add ebx,4 |
- | |
1582 | dec ecx |
- | |
1583 | jnz next_color_put_allocation |
- | |
1584 | - | ||
Line 1585... | Line 1389... | ||
1585 | no_put_line_to_screen_allocation: |
1389 | square_width_put |
1586 | 1390 | ||
Line 1587... | Line 1391... | ||
1587 | cmp [DrawSprite_flag],1 |
1391 | cmp [DrawSprite_flag],1 |
Line 1630... | Line 1434... | ||
1630 | jl no_minimum_y_allocation |
1434 | jl no_minimum_y_allocation |
1631 | mov edi,ebp |
1435 | mov edi,ebp |
1632 | no_minimum_y_allocation: |
1436 | no_minimum_y_allocation: |
Line 1633... | Line 1437... | ||
1633 | 1437 | ||
1634 | call calculate_rectangle |
- | |
Line 1635... | Line 1438... | ||
1635 | mov [counter],eax |
1438 | call calculate_rectangle |
1636 | - | ||
1637 | ;save color pixels in ReserveArray |
- | |
1638 | mov eax,[counter] |
- | |
1639 | mov ebx,[ReserveArray] |
- | |
1640 | mov [ebx],eax |
- | |
1641 | - | ||
1642 | mov ecx,[ebx] |
- | |
1643 | add ebx,4 |
- | |
1644 | - | ||
1645 | xor ebp,ebp |
- | |
1646 | next_color_save_allocation: |
- | |
1647 | ;save color of pixel in ReserveArray |
- | |
1648 | push ecx |
- | |
1649 | and [counter2],0 |
1439 | |
1650 | mov edi,[ebx] |
- | |
1651 | vertical_width_save_allocation: |
- | |
1652 | and [counter],0 |
- | |
1653 | - | ||
1654 | horizontal_width_save_allocation: |
- | |
1655 | mov eax,edi |
- | |
1656 | mov edx,[eax] |
- | |
1657 | and edx,0xffffff |
- | |
1658 | mov [ebx+4807*4+ebp],dx |
- | |
1659 | shr edx,16 |
- | |
1660 | mov [ebx+4807*4+2+ebp],dl |
- | |
1661 | - | ||
1662 | add edi,3 |
- | |
1663 | add ebp,4 |
- | |
1664 | inc [counter] |
- | |
1665 | cmp [counter],1;5 |
- | |
1666 | jne horizontal_width_save_allocation |
- | |
1667 | - | ||
1668 | mov ecx,[Picture_SizeX] |
- | |
1669 | sub ecx,1;5 |
- | |
1670 | lea ecx,[ecx+ecx*2] |
- | |
1671 | add edi,ecx |
- | |
1672 | inc [counter2] |
- | |
1673 | cmp [counter2],1;5 |
- | |
1674 | jne vertical_width_save_allocation |
- | |
1675 | pop ecx |
- | |
1676 | add ebx,4 |
- | |
Line 1677... | Line 1440... | ||
1677 | dec ecx |
1440 | ;save color pixels in ReserveArray |
1678 | jnz next_color_save_allocation |
1441 | square_width_save |
1679 | 1442 | ||
1680 | cmp [DrawSprite_flag],1 |
1443 | cmp [DrawSprite_flag],1 |
Line 1737... | Line 1500... | ||
1737 | 1500 | ||
1738 | call MovePictureToWorkScreen |
1501 | call MovePictureToWorkScreen |
1739 | jmp still |
1502 | jmp still |
Line 1740... | Line 1503... | ||
1740 | no_allocation: |
1503 | no_allocation: |
1741 | 1504 | ||
1742 | ;*************reflection from left to right****************** |
1505 | ;*************reflection from left to right************* |
Line 1743... | Line 1506... | ||
1743 | cmp eax,23 |
1506 | cmp eax,23 |
1744 | jne no_reflection_from_left_to_right |
1507 | jne no_reflection_from_left_to_right |
Line 1757... | Line 1520... | ||
1757 | lea ecx,[ecx+ecx*2] |
1520 | lea ecx,[ecx+ecx*2] |
1758 | add ecx,[PointerToPicture] |
1521 | add ecx,[PointerToPicture] |
1759 | mov edx,[ReserveArray] |
1522 | mov edx,[ReserveArray] |
1760 | and edi,0 |
1523 | and edi,0 |
1761 | copy_to_array_line_reflection_y: |
1524 | copy_to_array_line_reflection_y: |
1762 | xor eax,eax |
- | |
1763 | mov eax,[ecx] |
1525 | mov eax,[ecx] |
1764 | mov ebp,edi |
1526 | mov ebp,edi |
1765 | lea ebp,[ebp+ebp*2] |
1527 | lea ebp,[ebp+ebp*2] |
1766 | mov [edx+ebp],ax |
1528 | mov [edx+ebp],ax |
1767 | shr eax,16 |
1529 | shr eax,16 |
Line 1821... | Line 1583... | ||
1821 | 1583 | ||
1822 | call MovePictureToWorkScreen |
1584 | call MovePictureToWorkScreen |
1823 | jmp still |
1585 | jmp still |
Line 1824... | Line 1586... | ||
1824 | no_reflection_from_left_to_right: |
1586 | no_reflection_from_left_to_right: |
1825 | 1587 | ||
1826 | ;*************reflection from up to down****************** |
1588 | ;*************reflection from up to down**************** |
1827 | cmp eax,24 |
1589 | cmp eax,24 |
1828 | jne no_reflection_from_up_to_down |
1590 | jne no_reflection_from_up_to_down |
1829 | mov esi,[Picture_SizeX] |
1591 | mov esi,[Picture_SizeX] |
Line 1873... | Line 1635... | ||
1873 | 1635 | ||
1874 | call MovePictureToWorkScreen |
1636 | call MovePictureToWorkScreen |
1875 | jmp still |
1637 | jmp still |
Line 1876... | Line 1638... | ||
1876 | no_reflection_from_up_to_down: |
1638 | no_reflection_from_up_to_down: |
1877 | 1639 | ||
1878 | ;*********************draw hard contour******************* |
1640 | ;*********************draw hard contour***************** |
Line 1879... | Line 1641... | ||
1879 | cmp eax,20 |
1641 | cmp eax,20 |
Line 1916... | Line 1678... | ||
1916 | rep stosd |
1678 | rep stosd |
Line 1917... | Line 1679... | ||
1917 | 1679 | ||
Line 1918... | Line 1680... | ||
1918 | no_new_konture_xy: |
1680 | no_new_konture_xy: |
1919 | - | ||
1920 | ;put saved pixels |
- | |
1921 | mov ebx,[ReserveArray] |
- | |
1922 | mov eax,[ebx] |
- | |
1923 | test eax,eax |
- | |
1924 | jz no_put_line_to_screen_konture |
- | |
1925 | mov ecx,[ebx] |
- | |
1926 | add ebx,4 |
- | |
1927 | xor ebp,ebp |
- | |
1928 | next_color_put_konture: |
- | |
1929 | ;put saved pixels in ReserveArray |
- | |
1930 | push ecx |
- | |
1931 | and [counter2],0 |
- | |
1932 | mov edi,[ebx] |
1681 | |
1933 | push edi |
- | |
1934 | vertical_width_put_konture: |
- | |
1935 | and [counter],0 |
- | |
1936 | - | ||
1937 | horizontal_width_put_konture: |
- | |
1938 | mov edx,[ebx+4807*4+ebp] |
- | |
1939 | and edx,0xffffff |
- | |
1940 | mov [edi],dx |
- | |
1941 | shr edx,16 |
- | |
1942 | mov [edi+2],dl |
- | |
1943 | - | ||
1944 | add edi,3 |
- | |
1945 | add ebp,4 |
- | |
1946 | inc [counter] |
- | |
1947 | cmp [counter],5 |
- | |
1948 | jne horizontal_width_put_konture |
- | |
1949 | - | ||
1950 | mov ecx,[Picture_SizeX] |
- | |
1951 | sub ecx,5 |
- | |
1952 | lea ecx,[ecx+ecx*2] |
- | |
1953 | add edi,ecx |
- | |
1954 | inc [counter2] |
- | |
1955 | cmp [counter2],5 |
- | |
1956 | jne vertical_width_put_konture |
- | |
1957 | pop edi |
- | |
1958 | pop ecx |
- | |
1959 | add ebx,4 |
- | |
1960 | dec ecx |
- | |
1961 | jnz next_color_put_konture |
- | |
Line 1962... | Line 1682... | ||
1962 | 1682 | ;put saved pixels |
|
1963 | no_put_line_to_screen_konture: |
1683 | square_width_put |
1964 | 1684 | ||
1965 | ;calculate line |
1685 | ;calculate line |
Line 1988... | Line 1708... | ||
1988 | jl no_minimum_y_konture |
1708 | jl no_minimum_y_konture |
1989 | mov edi,ebp |
1709 | mov edi,ebp |
1990 | no_minimum_y_konture: |
1710 | no_minimum_y_konture: |
Line 1991... | Line 1711... | ||
1991 | 1711 | ||
1992 | call calculate_line |
- | |
1993 | ;call calculate_rectangle |
- | |
Line 1994... | Line 1712... | ||
1994 | mov [counter],eax |
1712 | call calculate_line |
1995 | - | ||
1996 | ;save color pixels in ReserveArray |
- | |
1997 | mov eax,[counter] |
- | |
1998 | mov ebx,[ReserveArray] |
- | |
1999 | mov [ebx],eax |
- | |
2000 | - | ||
2001 | mov ecx,[ebx] |
- | |
2002 | add ebx,4 |
- | |
2003 | - | ||
2004 | xor ebp,ebp |
- | |
2005 | next_color_save_konture: |
- | |
2006 | ;save color of pixel in ReserveArray |
- | |
2007 | push ecx |
- | |
2008 | and [counter2],0 |
1713 | |
2009 | mov edi,[ebx] |
- | |
2010 | vertical_width_save_konture: |
- | |
2011 | and [counter],0 |
- | |
2012 | - | ||
2013 | horizontal_width_save_konture: |
- | |
2014 | mov eax,edi |
- | |
2015 | mov edx,[eax] |
- | |
2016 | and edx,0xffffff |
- | |
2017 | mov [ebx+4807*4+ebp],dx |
- | |
2018 | shr edx,16 |
- | |
2019 | mov [ebx+4807*4+2+ebp],dl |
- | |
2020 | - | ||
2021 | add edi,3 |
- | |
2022 | add ebp,4 |
- | |
2023 | inc [counter] |
- | |
2024 | cmp [counter],5 |
- | |
2025 | jne horizontal_width_save_konture |
- | |
2026 | - | ||
2027 | mov ecx,[Picture_SizeX] |
- | |
2028 | sub ecx,5 |
- | |
2029 | lea ecx,[ecx+ecx*2] |
- | |
2030 | add edi,ecx |
- | |
2031 | inc [counter2] |
- | |
2032 | cmp [counter2],5 |
- | |
2033 | jne vertical_width_save_konture |
- | |
2034 | pop ecx |
- | |
2035 | add ebx,4 |
- | |
Line 2036... | Line 1714... | ||
2036 | dec ecx |
1714 | ;save color pixels in ReserveArray |
2037 | jnz next_color_save_konture |
1715 | square_width_save |
2038 | 1716 | ||
2039 | ;draw calculated pixels on work arrea |
1717 | ;draw calculated pixels on work arrea |
Line 2095... | Line 1773... | ||
2095 | call MovePictureToWorkScreen |
1773 | call MovePictureToWorkScreen |
Line 2096... | Line 1774... | ||
2096 | 1774 | ||
Line 2097... | Line 1775... | ||
2097 | jmp still |
1775 | jmp still |
2098 | 1776 | ||
2099 | no_kontur_: |
1777 | no_kontur_: |
2100 | ;************************Draw ellips*********************** |
1778 | ;************************draw ellips******************** |
Line 2101... | Line 1779... | ||
2101 | cmp eax,19 |
1779 | cmp eax,19 |
Line 2119... | Line 1797... | ||
2119 | rep stosd |
1797 | rep stosd |
2120 | jmp still |
1798 | jmp still |
2121 | no_new_ellips_xy: |
1799 | no_new_ellips_xy: |
Line 2122... | Line 1800... | ||
2122 | 1800 | ||
2123 | ;put saved pixels |
- | |
2124 | mov ebx,[ReserveArray] |
- | |
2125 | mov eax,[ebx] |
- | |
2126 | test eax,eax |
- | |
2127 | jz no_put_line_to_screen_ellips |
- | |
2128 | mov ecx,[ebx] |
- | |
2129 | add ebx,4 |
- | |
2130 | xor ebp,ebp |
- | |
2131 | next_color_put_ellips: |
- | |
2132 | ;put saved pixels in ReserveArray |
- | |
2133 | push ecx |
- | |
2134 | and [counter2],0 |
- | |
2135 | mov edi,[ebx] |
- | |
2136 | push edi |
1801 | ;put saved pixels |
2137 | vertical_width_put_ellips: |
- | |
2138 | and [counter],0 |
- | |
2139 | - | ||
2140 | horizontal_width_put_ellips: |
- | |
2141 | mov edx,[ebx+4807*4+ebp] |
- | |
2142 | and edx,0xffffff |
- | |
2143 | mov [edi],dx |
- | |
2144 | shr edx,16 |
- | |
2145 | mov [edi+2],dl |
- | |
2146 | - | ||
2147 | add edi,3 |
- | |
2148 | add ebp,4 |
- | |
2149 | inc [counter] |
- | |
2150 | cmp [counter],5 |
- | |
2151 | jne horizontal_width_put_ellips |
- | |
2152 | - | ||
2153 | mov ecx,[Picture_SizeX] |
- | |
2154 | sub ecx,5 |
- | |
2155 | lea ecx,[ecx+ecx*2] |
- | |
2156 | add edi,ecx |
- | |
2157 | inc [counter2] |
- | |
2158 | cmp [counter2],5 |
- | |
2159 | jne vertical_width_put_ellips |
- | |
2160 | pop edi |
- | |
2161 | pop ecx |
- | |
2162 | add ebx,4 |
- | |
2163 | dec ecx |
- | |
Line 2164... | Line -... | ||
2164 | jnz next_color_put_ellips |
- | |
Line 2165... | Line 1802... | ||
2165 | 1802 | square_width_put |
|
2166 | no_put_line_to_screen_ellips: |
1803 | |
2167 | 1804 | ||
2168 | mov esi,[ScreenX] |
1805 | mov esi,[ScreenX] |
Line 2270... | Line 1907... | ||
2270 | mov esi,[a_ellips] |
1907 | mov esi,[a_ellips] |
2271 | shl esi,16 |
1908 | shl esi,16 |
2272 | add esi,[b_ellips] |
1909 | add esi,[b_ellips] |
2273 | call calculate_ellips |
1910 | call calculate_ellips |
Line 2274... | Line -... | ||
2274 | - | ||
2275 | mov [counter],eax |
- | |
2276 | 1911 | ||
2277 | ;save color pixels in ReserveArray |
- | |
2278 | mov eax,[counter] |
- | |
2279 | mov ebx,[ReserveArray] |
- | |
2280 | mov [ebx],eax |
- | |
2281 | - | ||
2282 | mov ecx,[ebx] |
- | |
2283 | add ebx,4 |
- | |
2284 | - | ||
2285 | xor ebp,ebp |
- | |
2286 | next_color_save_ellips: |
- | |
2287 | ;save color of pixel in ReserveArray |
- | |
2288 | push ecx |
- | |
2289 | and [counter2],0 |
- | |
2290 | mov edi,[ebx] |
1912 | ;save color pixels in ReserveArray |
2291 | vertical_width_save_ellips: |
- | |
2292 | and [counter],0 |
- | |
2293 | - | ||
2294 | horizontal_width_save_ellips: |
- | |
2295 | mov eax,edi |
- | |
2296 | mov edx,[eax] |
- | |
2297 | and edx,0xffffff |
- | |
2298 | mov [ebx+4807*4+ebp],dx |
- | |
2299 | shr edx,16 |
- | |
2300 | mov [ebx+4807*4+2+ebp],dl |
- | |
2301 | - | ||
2302 | add edi,3 |
- | |
2303 | add ebp,4 |
- | |
2304 | inc [counter] |
- | |
2305 | cmp [counter],5 |
- | |
2306 | jne horizontal_width_save_ellips |
- | |
2307 | - | ||
2308 | mov ecx,[Picture_SizeX] |
- | |
2309 | sub ecx,5 |
- | |
2310 | lea ecx,[ecx+ecx*2] |
- | |
2311 | add edi,ecx |
- | |
2312 | inc [counter2] |
- | |
2313 | cmp [counter2],5 |
- | |
2314 | jne vertical_width_save_ellips |
- | |
2315 | pop ecx |
- | |
2316 | add ebx,4 |
- | |
2317 | dec ecx |
- | |
Line 2318... | Line 1913... | ||
2318 | jnz next_color_save_ellips |
1913 | square_width_save |
2319 | 1914 | ||
2320 | ;draw calculated pixels on work arrea |
1915 | ;draw calculated pixels on work arrea |
2321 | mov ebx,[ReserveArray] |
1916 | mov ebx,[ReserveArray] |