Rev 987 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 987 | Rev 5838 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | call uint2str |
27 | call uint2str |
28 | lea eax,[edi-p_info-100] |
28 | lea eax,[edi-p_info-100] |
29 | cmp eax,3 |
29 | cmp eax,3 |
30 | jae @f |
30 | jae @f |
31 | mov eax,3 |
31 | mov eax,3 |
32 | @@: imul eax,6 |
32 | @@: imul eax,[charWidth] |
33 | add eax,8 |
33 | add eax,8 |
34 | .lp1: mov [cur_editor.Gutter.Width],eax |
34 | .lp1: mov [cur_editor.Gutter.Width],eax |
35 | mov [left_ofs],eax |
35 | mov [left_ofs],eax |
Line 36... | Line 36... | ||
36 | 36 | ||
37 | mov eax,[cur_editor.Bounds.Right] |
37 | mov eax,[cur_editor.Bounds.Right] |
38 | sub eax,[cur_editor.Bounds.Left] |
38 | sub eax,[cur_editor.Bounds.Left] |
39 | sub eax,[cur_editor.Gutter.Width] |
39 | sub eax,[cur_editor.Gutter.Width] |
40 | sub eax,SCRLW+LCHGW+4 |
40 | sub eax,SCRLW+LCHGW+4 |
41 | js .exit |
41 | js .exit |
42 | cdq |
42 | cdq |
43 | mov ebx,6 |
43 | mov ebx,[charWidth] |
44 | div ebx |
44 | div ebx |
Line 45... | Line 45... | ||
45 | mov [columns.scr],eax |
45 | mov [columns.scr],eax |
46 | 46 | ||
Line 47... | Line 47... | ||
47 | mov eax,[cur_editor.Bounds.Bottom] |
47 | mov eax,[cur_editor.Bounds.Bottom] |
48 | sub eax,[cur_editor.Bounds.Top] |
48 | sub eax,[cur_editor.Bounds.Top] |
49 | 49 | ||
50 | sub eax,SCRLW+3 |
50 | sub eax,SCRLW+3 |
51 | js .exit |
51 | js .exit |
52 | cdq |
52 | cdq |
Line 53... | Line 53... | ||
53 | mov ebx,LINEH |
53 | mov ebx,[lineHeight] |
54 | div ebx |
54 | div ebx |
Line 104... | Line 104... | ||
104 | mov edi,edx |
104 | mov edi,edx |
105 | call uint2str |
105 | call uint2str |
106 | mov esi,edi |
106 | mov esi,edi |
107 | pop edi edx eax |
107 | pop edi edx eax |
108 | sub esi,edx |
108 | sub esi,edx |
- | 109 | mov eax,esi |
|
109 | imul eax,esi,6*65536 |
110 | imul eax,[charWidth] |
- | 111 | shl eax,16 |
|
110 | sub ebx,eax |
112 | sub ebx,eax |
- | 113 | mov cl, [scale] |
|
- | 114 | shl ecx,24 |
|
- | 115 | or ecx,edi |
|
111 | mcall 4,,edi |
116 | mcall 4 |
112 | popad |
117 | popad |
113 | add ebx,LINEH |
118 | add ebx,[lineHeight] |
114 | inc ecx |
119 | inc ecx |
115 | cmp ecx,[cur_editor.Lines.Count] |
120 | cmp ecx,[cur_editor.Lines.Count] |
116 | jg @f |
121 | jg @f |
117 | mov esi,ecx |
122 | mov esi,ecx |
118 | sub esi,[cur_editor.TopLeft.Y] |
123 | sub esi,[cur_editor.TopLeft.Y] |
Line 351... | Line 356... | ||
351 | jne @f |
356 | jne @f |
352 | ret |
357 | ret |
353 | @@: push eax |
358 | @@: push eax |
354 | mov eax,[cur_editor.Bounds.Bottom] |
359 | mov eax,[cur_editor.Bounds.Bottom] |
355 | sub eax,[cur_editor.Bounds.Top] |
360 | sub eax,[cur_editor.Bounds.Top] |
356 | cmp eax,LINEH |
361 | cmp eax,[lineHeight] |
357 | pop eax |
362 | pop eax |
358 | jge @f |
363 | jge @f |
359 | ret |
364 | ret |
360 | @@: |
365 | @@: |
361 | mov ebp,cur_editor |
366 | mov ebp,cur_editor |
Line 402... | Line 407... | ||
402 | inc ecx |
407 | inc ecx |
Line 403... | Line 408... | ||
403 | 408 | ||
404 | mov ebx,[top_ofs] |
409 | mov ebx,[top_ofs] |
405 | add ebx,[left_ofs-2] |
410 | add ebx,[left_ofs-2] |
406 | sub eax,[cur_editor.TopLeft.Y] |
411 | sub eax,[cur_editor.TopLeft.Y] |
407 | imul eax,LINEH |
412 | imul eax,[lineHeight] |
Line 408... | Line 413... | ||
408 | add ebx,eax |
413 | add ebx,eax |
409 | 414 | ||
Line 423... | Line 428... | ||
423 | cmp [cur_editor.Lines],0 |
428 | cmp [cur_editor.Lines],0 |
424 | jne @f |
429 | jne @f |
425 | ret |
430 | ret |
426 | @@: mov eax,[cur_editor.Bounds.Bottom] |
431 | @@: mov eax,[cur_editor.Bounds.Bottom] |
427 | sub eax,[cur_editor.Bounds.Top] |
432 | sub eax,[cur_editor.Bounds.Top] |
428 | cmp eax,LINEH |
433 | cmp eax,[lineHeight] |
429 | jge @f |
434 | jge @f |
430 | ret |
435 | ret |
431 | @@: |
436 | @@: |
432 | mov ebp,cur_editor |
437 | mov ebp,cur_editor |
433 | call init_sel_vars |
438 | call init_sel_vars |
Line 464... | Line 469... | ||
464 | 469 | ||
Line 465... | Line 470... | ||
465 | push ecx ebx |
470 | push ecx ebx |
466 | 471 | ||
467 | mov ecx,ebx |
472 | mov ecx,ebx |
468 | shl ecx,16 |
473 | shl ecx,16 |
469 | mov cl,LINEH |
474 | mov cl,byte[lineHeight] |
470 | mov ebx,[cur_editor.Bounds.Right] |
475 | mov ebx,[cur_editor.Bounds.Right] |
471 | add ebx,-SCRLW |
476 | add ebx,-SCRLW |
472 | add ebx,[left_ofs-2] |
477 | add ebx,[left_ofs-2] |
Line 490... | Line 495... | ||
490 | .lp2: mov eax,[sel.begin.x] |
495 | .lp2: mov eax,[sel.begin.x] |
491 | sub eax,[cur_editor.TopLeft.X] |
496 | sub eax,[cur_editor.TopLeft.X] |
492 | jle .lp6.2 |
497 | jle .lp6.2 |
493 | cmp eax,[columns.scr] |
498 | cmp eax,[columns.scr] |
494 | jge .lp6 |
499 | jge .lp6 |
495 | imul eax,6 |
500 | imul eax,[charWidth] |
496 | pushad |
501 | pushad |
497 | sub bx,ax |
502 | sub bx,ax |
498 | rol ebx,16 |
503 | rol ebx,16 |
499 | mov bx,ax |
504 | mov bx,ax |
500 | add ebx,[left_ofs] |
505 | add ebx,[left_ofs] |
Line 512... | Line 517... | ||
512 | .lp4: mov eax,[sel.end.x] |
517 | .lp4: mov eax,[sel.end.x] |
513 | sub eax,[cur_editor.TopLeft.X] |
518 | sub eax,[cur_editor.TopLeft.X] |
514 | jle .lp6 |
519 | jle .lp6 |
515 | cmp eax,[columns.scr] |
520 | cmp eax,[columns.scr] |
516 | jg .lp6.2 |
521 | jg .lp6.2 |
517 | imul eax,6 |
522 | imul eax,[charWidth] |
518 | pushad |
523 | pushad |
519 | sub bx,ax |
524 | sub bx,ax |
520 | rol ebx,16 |
525 | rol ebx,16 |
521 | add eax,[left_ofs] |
526 | add eax,[left_ofs] |
522 | add eax,-2 |
527 | add eax,-2 |
Line 537... | Line 542... | ||
537 | jl .lp2 |
542 | jl .lp2 |
538 | mov eax,[sel.begin.x] |
543 | mov eax,[sel.begin.x] |
539 | cmp eax,[sel.end.x] |
544 | cmp eax,[sel.end.x] |
540 | je .lp6 |
545 | je .lp6 |
541 | sub eax,[cur_editor.TopLeft.X] |
546 | sub eax,[cur_editor.TopLeft.X] |
542 | imul eax,6 |
547 | imul eax,[charWidth] |
543 | pushad |
548 | pushad |
544 | mov ebx,[sel.end.x] |
549 | mov ebx,[sel.end.x] |
545 | sub ebx,[sel.begin.x] |
550 | sub ebx,[sel.begin.x] |
546 | imul ebx,6 |
551 | imul ebx,[charWidth] |
547 | sal ebx,16 |
552 | sal ebx,16 |
548 | dec eax |
553 | dec eax |
549 | add eax,[left_ofs] |
554 | add eax,[left_ofs] |
550 | mov bx,ax |
555 | mov bx,ax |
551 | rol ebx,16 |
556 | rol ebx,16 |
Line 605... | Line 610... | ||
605 | push esi ecx |
610 | push esi ecx |
606 | call .get_next_part |
611 | call .get_next_part |
607 | pop ebx |
612 | pop ebx |
Line 608... | Line 613... | ||
608 | 613 | ||
- | 614 | push ecx |
|
- | 615 | mov cl, [scale] |
|
609 | push ecx |
616 | shl ecx,24 |
Line 610... | Line 617... | ||
610 | mov ecx,eax |
617 | or ecx,eax |
611 | 618 | ||
612 | push esi ebx |
619 | push esi ebx |
613 | mov eax,ebx |
620 | mov eax,ebx |
Line 622... | Line 629... | ||
622 | sub edx,eax |
629 | sub edx,eax |
623 | add esi,eax |
630 | add esi,eax |
624 | xor eax,eax |
631 | xor eax,eax |
625 | jmp .qqq2 |
632 | jmp .qqq2 |
626 | .qqq: |
633 | .qqq: |
627 | imul eax,6*65536 |
634 | imul eax,[charWidth] |
- | 635 | shl eax,16 |
|
628 | .qqq2: |
636 | .qqq2: |
629 | and ebx,0x0000FFFF |
637 | and ebx,0x0000FFFF |
630 | add eax,[left_ofs-2] |
638 | add eax,[left_ofs-2] |
631 | add ebx,eax |
639 | add ebx,eax |
Line 661... | Line 669... | ||
661 | jle @f |
669 | jle @f |
662 | sub esi,ecx |
670 | sub esi,ecx |
663 | sub [esp+4],ecx |
671 | sub [esp+4],ecx |
664 | @@: sub eax,esi |
672 | @@: sub eax,esi |
665 | add edx,esi |
673 | add edx,esi |
666 | imul esi,6 |
674 | imul esi,[charWidth] |
667 | rol ebx,16 |
675 | rol ebx,16 |
668 | add bx,si |
676 | add bx,si |
669 | rol ebx,16 |
677 | rol ebx,16 |
670 | mov esi,eax |
678 | mov esi,eax |
- | 679 | mov cl, [scale] |
|
- | 680 | shl ecx,24 |
|
671 | mov ecx,[color_tbl.text.sel] |
681 | or ecx,[color_tbl.text.sel] |
672 | mcall 4 |
682 | mcall 4 |
673 | popad |
683 | popad |
674 | jmp .draw_t |
684 | jmp .draw_t |
675 | ;----------------------------------------------)- |
685 | ;----------------------------------------------)- |
676 | .nt2: dec al |
686 | .nt2: dec al |
Line 691... | Line 701... | ||
691 | add eax,ebx |
701 | add eax,ebx |
692 | .ya2.1: |
702 | .ya2.1: |
693 | pop ebx |
703 | pop ebx |
694 | pushad |
704 | pushad |
695 | mov esi,eax |
705 | mov esi,eax |
- | 706 | mov cl, [scale] |
|
- | 707 | shl ecx,24 |
|
696 | mov ecx,[color_tbl.text.sel] |
708 | or ecx,[color_tbl.text.sel] |
697 | mcall 4 |
709 | mcall 4 |
698 | popad |
710 | popad |
699 | sub esi,eax |
711 | sub esi,eax |
700 | add edx,eax |
712 | add edx,eax |
701 | imul eax,6*65536 |
713 | imul eax,[charWidth] |
- | 714 | shl eax,16 |
|
702 | add ebx,eax |
715 | add ebx,eax |
703 | jmp .draw_t |
716 | jmp .draw_t |
704 | ;----------------------------------------------)- |
717 | ;----------------------------------------------)- |
705 | .nt3: mov eax,[esp] |
718 | .nt3: mov eax,[esp] |
706 | cmp eax,[sel.end.x] |
719 | cmp eax,[sel.end.x] |
Line 724... | Line 737... | ||
724 | .nt3.1: |
737 | .nt3.1: |
725 | pop eax |
738 | pop eax |
726 | sub eax,esi |
739 | sub eax,esi |
727 | pushad |
740 | pushad |
728 | add edx,esi |
741 | add edx,esi |
729 | imul esi,6*65536 |
742 | imul esi,[charWidth] |
- | 743 | shl esi,16 |
|
730 | add ebx,esi |
744 | add ebx,esi |
731 | mov esi,[sel.end.x] |
745 | mov esi,[sel.end.x] |
732 | sub esi,[sel.begin.x] |
746 | sub esi,[sel.begin.x] |
- | 747 | mov cl, [scale] |
|
- | 748 | shl ecx,24 |
|
733 | mov ecx,[color_tbl.text.sel] |
749 | or ecx,[color_tbl.text.sel] |
734 | sub eax,esi |
750 | sub eax,esi |
735 | push eax |
751 | push eax |
736 | mcall 4 |
752 | mcall 4 |
737 | add edx,esi |
753 | add edx,esi |
738 | imul esi,6*65536 |
754 | imul esi,[charWidth] |
- | 755 | shl esi,16 |
|
739 | add ebx,esi |
756 | add ebx,esi |
740 | pop esi |
757 | pop esi |
741 | mov ecx,[esp+4*6] |
758 | mov ecx,[esp+4*6] |
742 | mcall 4 |
759 | mcall 4 |
743 | popad |
760 | popad |
Line 746... | Line 763... | ||
746 | @@: add eax,esi |
763 | @@: add eax,esi |
747 | dec eax |
764 | dec eax |
748 | cmp eax,[sel.end.x] |
765 | cmp eax,[sel.end.x] |
749 | jge .ya2 |
766 | jge .ya2 |
750 | ;---[ block inside selection ]-----------------(- |
767 | ;---[ block inside selection ]-----------------(- |
- | 768 | .ya4: mov cl, [scale] |
|
- | 769 | shl ecx,24 |
|
751 | .ya4: mov ecx,[color_tbl.text.sel] |
770 | or ecx,[color_tbl.text.sel] |
752 | ;----------------------------------------------)- |
771 | ;----------------------------------------------)- |
Line 753... | Line 772... | ||
753 | 772 | ||
754 | .draw_t: |
773 | .draw_t: |
755 | mcall 4 |
774 | mcall 4 |
756 | .skip_t: |
775 | .skip_t: |
757 | pop eax eax ; ebx esi |
776 | pop eax eax ; ebx esi |
758 | imul eax,6 |
777 | imul eax,[charWidth] |
759 | add [esp+4*2+2],ax |
778 | add [esp+4*2+2],ax |
760 | pop ecx esi |
779 | pop ecx esi |
761 | cmp ecx,[cur_line_len] |
780 | cmp ecx,[cur_line_len] |
Line 762... | Line 781... | ||
762 | jl .next_block |
781 | jl .next_block |
763 | 782 | ||
764 | pop ebx ecx |
783 | pop ebx ecx |
765 | and ebx,0x0000FFFF |
784 | and ebx,0x0000FFFF |
766 | add ebx,[left_ofs-2] |
785 | add ebx,[left_ofs-2] |
767 | add ebx,LINEH |
786 | add ebx,[lineHeight] |
768 | add esi,[cur_line_len] |
787 | add esi,[cur_line_len] |
769 | inc dword[esp] |
788 | inc dword[esp] |
Line 783... | Line 802... | ||
783 | sub bx,ax |
802 | sub bx,ax |
784 | add ebx,-SCRLW |
803 | add ebx,-SCRLW |
785 | mov edx,[color_tbl.back] |
804 | mov edx,[color_tbl.back] |
786 | mov eax,13 |
805 | mov eax,13 |
787 | mov ecx,[esp-8] |
806 | mov ecx,[esp-8] |
788 | add ecx,LINEH |
807 | add ecx,[lineHeight] |
789 | shl ecx,16 |
808 | shl ecx,16 |
790 | mov cx,word[cur_editor.Bounds.Bottom] |
809 | mov cx,word[cur_editor.Bounds.Bottom] |
791 | sub cx,[esp-8] |
810 | sub cx,[esp-8] |
- | 811 | sub cx,word[lineHeight] |
|
792 | add cx,-SCRLW-LINEH |
812 | sub cx,SCRLW |
793 | jle @f |
813 | js @f |
794 | mcall |
814 | mcall |
795 | @@: mov ecx,[cur_editor.Bounds.Top-2] |
815 | @@: mov ecx,[cur_editor.Bounds.Top-2] |
796 | mov cx,2 |
816 | mov cx,2 |
797 | add ecx,0x00010000 |
817 | add ecx,0x00010000 |
798 | mcall |
818 | mcall |
Line 936... | Line 956... | ||
936 | mov ebx,[cur_editor.Caret.X] |
956 | mov ebx,[cur_editor.Caret.X] |
937 | sub ebx,[cur_editor.TopLeft.X] |
957 | sub ebx,[cur_editor.TopLeft.X] |
938 | js @f |
958 | js @f |
939 | cmp ebx,[columns.scr] |
959 | cmp ebx,[columns.scr] |
940 | ja @f |
960 | ja @f |
941 | imul ebx,6 |
961 | imul ebx,[charWidth] |
942 | add ebx,[left_ofs] |
962 | add ebx,[left_ofs] |
943 | dec ebx |
963 | dec ebx |
944 | push bx |
964 | push bx |
945 | shl ebx,16 |
965 | shl ebx,16 |
946 | pop bx |
966 | pop bx |
947 | mov eax,[cur_editor.Caret.Y] |
967 | mov eax,[cur_editor.Caret.Y] |
948 | sub eax,[cur_editor.TopLeft.Y] |
968 | sub eax,[cur_editor.TopLeft.Y] |
949 | js @f |
969 | js @f |
950 | cmp eax,[lines.scr] |
970 | cmp eax,[lines.scr] |
951 | jge @f |
971 | jge @f |
952 | imul eax,LINEH |
972 | imul eax,[lineHeight] |
953 | add eax,[top_ofs] |
973 | add eax,[top_ofs] |
954 | mov esi,eax |
974 | mov esi,eax |
955 | shl esi,16 |
975 | shl esi,16 |
956 | add eax,LINEH-2 |
976 | add eax,[lineHeight] |
- | 977 | sub eax,2 |
|
957 | mov si,ax |
978 | mov si,ax |
958 | mov ecx,2 |
979 | mov ecx,2 |
959 | cmp [ins_mode],0 |
980 | cmp [ins_mode],0 |
960 | jne .lp8 |
981 | jne .lp8 |
961 | add cl,4 |
982 | add cl,4 |