Rev 57 | Rev 105 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 57 | Rev 102 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | ; èäåÿ: ïåðåáðàòü âñå îêíà, íà÷èíàÿ ñ ñàìîãî íèæíåãî, |
49 | ; èäåÿ: ïåðåáðàòü âñå îêíà, íà÷èíàÿ ñ ñàìîãî íèæíåãî, |
50 | ; è äëÿ êàæäîãî âûçâàòü setscreen |
50 | ; è äëÿ êàæäîãî âûçâàòü setscreen |
51 | align 4 |
51 | align 4 |
52 | calculatescreen: |
52 | calculatescreen: |
53 | pushad |
53 | pushad |
- | 54 | pushfd |
|
54 | cli |
55 | cli |
Line 55... | Line 56... | ||
55 | 56 | ||
56 | mov esi, 1 |
57 | mov esi, 1 |
57 | xor eax, eax |
58 | xor eax, eax |
Line 65... | Line 66... | ||
65 | jbe .finish |
66 | jbe .finish |
66 | align 4 |
67 | align 4 |
67 | .new_wnd: |
68 | .new_wnd: |
68 | movzx edi, word [0xC400 + esi * 2] |
69 | movzx edi, word [0xC400 + esi * 2] |
69 | shl edi, 5 |
70 | shl edi, 5 |
- | 71 | ||
- | 72 | cmp [0x3000+edi+0xa], byte 9 |
|
- | 73 | je .not_wnd |
|
- | 74 | ||
70 | add edi, window_data |
75 | add edi, window_data |
71 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
76 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
72 | jnz .not_wnd |
77 | jnz .not_wnd |
73 | mov eax,[edi+WDATA.left] |
78 | mov eax,[edi+WDATA.left] |
74 | mov ebx,[edi+WDATA.top] |
79 | mov ebx,[edi+WDATA.top] |
Line 83... | Line 88... | ||
83 | .not_wnd: |
88 | .not_wnd: |
84 | inc esi |
89 | inc esi |
85 | dec ebp |
90 | dec ebp |
86 | jnz .new_wnd |
91 | jnz .new_wnd |
87 | .finish: |
92 | .finish: |
88 | sti |
93 | popfd |
89 | popad |
94 | popad |
90 | ret |
95 | ret |
Line 667... | Line 672... | ||
667 | ;esi ; color |
672 | ;esi ; color |
Line 668... | Line 673... | ||
668 | 673 | ||
Line 669... | Line 674... | ||
669 | pushad |
674 | pushad |
670 | - | ||
671 | mov ecx,esi ; yb,xb -> yb,xe |
- | |
672 | ;<<< 14.11.2004 Ivan Poddubny |
- | |
673 | ; mov eax,r_eax |
- | |
674 | ; shl eax,16 |
675 | |
675 | ; mov ax,r_ax |
676 | mov ecx,esi ; yb,xb -> yb,xe |
676 | mov eax, r_eax |
- | |
677 | rol eax, 16 |
677 | mov eax, r_eax |
678 | ;>>> 14.11.2004 Ivan Poddubny |
678 | rol eax, 16 |
679 | mov ebx,r_ebx |
679 | mov ebx,r_ebx |
680 | shl ebx,16 |
680 | shl ebx,16 |
681 | mov bx,r_ebx |
681 | mov bx,r_ebx |
Line 807... | Line 807... | ||
807 | windowactivate: |
807 | windowactivate: |
Line 808... | Line 808... | ||
808 | 808 | ||
Line 809... | Line 809... | ||
809 | ; esi = abs mem position in stack 0xC400+ |
809 | ; esi = abs mem position in stack 0xC400+ |
- | 810 | ||
- | 811 | pushad |
|
- | 812 | ||
- | 813 | ; if type of current active window is 3, |
|
- | 814 | ; it must be redrawn |
|
- | 815 | mov eax, [0x3004] |
|
- | 816 | movzx eax, word [0xC400 + eax*2] |
|
- | 817 | shl eax, 5 |
|
- | 818 | add eax, window_data |
|
- | 819 | mov ebx, [eax + WDATA.cl_workarea] |
|
- | 820 | and ebx, 0x0f000000 |
|
- | 821 | cmp ebx, 0x03000000 |
|
- | 822 | jne @f |
|
- | 823 | mov [eax + WDATA.fl_redraw], byte 1 |
|
810 | 824 | @@: |
|
811 | pushad |
825 | |
812 | push esi |
826 | push esi |
Line 813... | Line 827... | ||
813 | movzx eax, word [esi] ; ax <- process no |
827 | movzx eax, word [esi] ; ax <- process no |
Line 832... | Line 846... | ||
832 | 846 | ||
833 | movzx eax, word [esi] |
847 | movzx eax, word [esi] |
834 | mov bx, [0x3004] ; number of processes |
848 | mov bx, [0x3004] ; number of processes |
Line 835... | Line -... | ||
835 | mov [0xC000+eax*2], bx ; this is the last (and the upper) |
- | |
836 | - | ||
837 | ;* start code - get active process (4) - Mario79 |
- | |
838 | cli |
- | |
839 | cmp [active_process_flag],1 |
- | |
840 | jne @f |
- | |
841 | mov [active_process_flag],0 |
- | |
842 | jmp end_save_active_process |
- | |
843 | @@: |
- | |
844 | call save_active_process_stack |
- | |
845 | end_save_active_process: |
- | |
846 | mov [active_process],eax |
- | |
847 | push eax |
- | |
848 | mov eax,[active_process] |
- | |
849 | shl eax,5 |
- | |
850 | add eax,0x3000 |
- | |
851 | mov [eax-twdw+31],byte 1 |
- | |
852 | pop eax |
- | |
853 | sti |
- | |
854 | ;* end code - get active process (4) - Mario79 |
849 | mov [0xC000+eax*2], bx ; this is the last (and the upper) |
855 | 850 | ||
856 | ; update on screen -window stack |
851 | ; update on screen -window stack |
857 | xor esi, esi |
852 | xor esi, esi |
858 | waloop2: |
853 | waloop2: |
Line 874... | Line 869... | ||
874 | 869 | ||
Line 875... | Line 870... | ||
875 | checkwindowdraw: |
870 | checkwindowdraw: |
Line -... | Line 871... | ||
- | 871 | ||
- | 872 | ; edi = position in window_data+ |
|
- | 873 | ||
- | 874 | mov eax, [edi + WDATA.cl_workarea] |
|
- | 875 | and eax, 0x0f000000 |
|
876 | 876 | cmp eax, 0x03000000 |
|
877 | ; edi = position in window_data+ |
877 | je .return_yes ; window type 3 |
878 | 878 | ||
Line 879... | Line 879... | ||
879 | mov esi, edi |
879 | mov esi, edi |
Line 880... | Line -... | ||
880 | sub esi, window_data |
- | |
881 | shr esi, 5 |
880 | sub esi, window_data |
882 | 881 | shr esi, 5 |
|
883 | ; esi = process number |
- | |
Line 884... | Line 882... | ||
884 | 882 | ||
Line 885... | Line 883... | ||
885 | ; |
883 | ; esi = process number |
Line 901... | Line 899... | ||
901 | cmp esi, eax |
899 | cmp esi, eax |
902 | ja .all_wnds_to_top |
900 | ja .all_wnds_to_top |
Line 903... | Line 901... | ||
903 | 901 | ||
904 | movzx eax, word [esi] |
902 | movzx eax, word [esi] |
905 | shl eax, 5 |
903 | shl eax, 5 |
906 | add eax, window_data |
904 | cmp [0x3000 + eax + 0xa], byte 9 |
Line -... | Line 905... | ||
- | 905 | je .new_check ; skip dead windows |
|
- | 906 | ||
907 | mov esi, eax |
907 | lea esi, [eax+window_data] |
908 | 908 | ||
909 | mov ebx, [edi+4] |
909 | mov ebx, [edi+4] ; y0 |
Line 910... | Line 910... | ||
910 | mov edx, [edi+12] |
910 | mov edx, [edi+12] |
911 | add edx, ebx |
911 | add edx, ebx ; y0e |
912 | 912 | ||
913 | mov ecx, [esi+4] ; y check |
913 | mov ecx, [esi+4] ; y ; y check |
914 | cmp ecx, edx |
914 | cmp ecx, edx |
915 | jae .new_check |
915 | jae .new_check ; y < y0e |
916 | mov eax, [esi+12] |
916 | mov eax, [esi+12] |
Line 917... | Line 917... | ||
917 | add ecx, eax |
917 | add ecx, eax ; ye |
918 | cmp ebx, ecx |
918 | cmp ebx, ecx ; y0 >= ye |
919 | ja .new_check |
919 | ja .new_check |
Line 920... | Line 920... | ||
920 | 920 | ||
921 | mov eax, [edi+0] |
921 | mov eax, [edi+0] ; x0 |
922 | mov ecx, [edi+8] |
922 | mov ecx, [edi+8] |
923 | add ecx, eax |
923 | add ecx, eax ; x0e |
924 | 924 | ||
925 | mov edx, [esi+0] ; x check |
925 | mov edx, [esi+0] ; x ; x check |
926 | cmp edx, ecx |
926 | cmp edx, ecx |
Line 927... | Line 927... | ||
927 | jae .new_check |
927 | jae .new_check ; x < x0e |
- | 928 | mov ecx, [esi+8] |
|
928 | mov ecx, [esi+8] |
929 | add edx, ecx |
929 | add edx, ecx |
930 | cmp eax, edx |
Line 930... | Line 931... | ||
930 | cmp eax, edx |
931 | ja .new_check |
Line 972... | Line 973... | ||
972 | add ecx, eax ; ecx = x_end |
973 | add ecx, eax ; ecx = x_end |
973 | add edx, ebx ; edx = y_end |
974 | add edx, ebx ; edx = y_end |
Line 974... | Line 975... | ||
974 | 975 | ||
975 | mov edi, [0x3004] |
976 | mov edi, [0x3004] |
976 | movzx esi, word [0xC400 + edi * 2] |
977 | movzx esi, word [0xC400 + edi * 2] |
977 | shl esi, 5 |
- | |
978 | movzx esi, byte [esi + 0x3000 + 0xE] |
- | |
979 | call setscreen ;;;calculatescreen ; setscreen |
978 | call setscreen |
Line 980... | Line 979... | ||
980 | popad |
979 | popad |
981 | 980 | ||
Line 1046... | Line 1045... | ||
1046 | mov ebx,[0xff01] |
1045 | mov ebx,[0xff01] |
1047 | movzx esi, word [0xC000 + ebx * 2] |
1046 | movzx esi, word [0xC000 + ebx * 2] |
1048 | lea esi, [0xC400 + esi * 2] |
1047 | lea esi, [0xC400 + esi * 2] |
1049 | call waredraw |
1048 | call waredraw |
Line 1050... | Line -... | ||
1050 | - | ||
1051 | ;* start code - get active process (2) - Mario79 |
- | |
1052 | ; mov eax,[0xff01] |
- | |
1053 | ; mov [active_process],eax |
- | |
1054 | ;* end code - get active process (2) - Mario79 |
- | |
1055 | 1049 | ||
Line 1056... | Line 1050... | ||
1056 | mov [0xff01],dword 0 ; activated |
1050 | mov [0xff01],dword 0 ; activated |
1057 | 1051 | ||
Line 1058... | Line 1052... | ||
1058 | popad |
1052 | popad |
Line 1059... | Line 1053... | ||
1059 | ret |
1053 | ret |
1060 | 1054 | ||
1061 | .no_activate_request: |
- | |
1062 | - | ||
1063 | cmp [0xfb40],byte 0 ; mouse buttons pressed ? |
1055 | .no_activate_request: |
1064 | jne .mouse_buttons_pressed |
1056 | |
1065 | ; cmp [window_minimize],2 |
1057 | cmp [0xfb40],byte 0 ; mouse buttons pressed ? |
1066 | ; jne .no_activate_request_1 |
1058 | jne .mouse_buttons_pressed |
1067 | cmp [window_minimize],0 |
1059 | cmp [window_minimize],0 |
1068 | je .no_activate_request_2 |
1060 | je .no_activate_request_2 |
1069 | cmp [window_minimize],1 |
1061 | cmp [window_minimize],1 |
1070 | je .mouse_buttons_pressed |
1062 | je .mouse_buttons_pressed |
1071 | mov esi,[0x3004] |
1063 | mov esi,[0x3004] |
1072 | movzx edi, word [0xC400 + esi * 2] |
1064 | movzx edi, word [0xC400 + esi * 2] |
1073 | shl edi, 5 |
- | |
1074 | add edi, window_data |
- | |
1075 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
- | |
1076 | jnz .mouse_buttons_pressed |
- | |
1077 | ; jne .no_activate_request_2 |
- | |
1078 | ; .no_activate_request_1: |
1065 | shl edi, 5 |
1079 | ; cmp [window_minimize],1 |
1066 | add edi, window_data |
1080 | ; jge .mouse_buttons_pressed |
1067 | test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED |
1081 | ; jmp .mouse_buttons_pressed |
1068 | jnz .mouse_buttons_pressed |
Line 1503... | Line 1490... | ||
1503 | popad |
1490 | popad |
Line 1504... | Line 1491... | ||
1504 | 1491 | ||
1505 | cmp [reposition],0 |
1492 | cmp [reposition],0 |
Line 1506... | Line -... | ||
1506 | je retwm |
- | |
1507 | - | ||
1508 | pushad |
- | |
1509 | mov eax,[edi+00] |
- | |
1510 | mov ebx,[edi+04] |
- | |
1511 | mov ecx,[edi+8] |
- | |
1512 | mov edx,[edi+12] |
- | |
1513 | add ecx,eax |
- | |
1514 | add edx,ebx |
- | |
1515 | mov edi,[0x3004] |
- | |
1516 | shl edi,1 |
- | |
1517 | add edi,0xc400 |
- | |
1518 | movzx esi,byte [edi] |
- | |
1519 | shl esi,5 |
- | |
1520 | add esi,0x3000+0xe |
- | |
1521 | movzx esi,byte [esi] |
- | |
1522 | - | ||
1523 | sub edi,draw_data |
- | |
1524 | shr edi,5 |
- | |
1525 | shl edi,8 |
- | |
1526 | add edi,0x80000+0x80 |
- | |
1527 | ;cmp [edi],dword 0 |
- | |
1528 | ;jne no_rect_shaped_move |
- | |
1529 | call setscreen |
- | |
1530 | jmp move_calculated |
- | |
1531 | no_rect_shaped_move: |
- | |
1532 | call calculatescreen |
- | |
1533 | move_calculated: |
- | |
1534 | - | ||
1535 | popad |
1493 | je retwm |
1536 | 1494 | ||
Line 1537... | Line 1495... | ||
1537 | mov [edi+WDATA.fl_redraw],1 |
1495 | mov [edi+WDATA.fl_redraw],1 |
1538 | mov [0xfff5],byte 1 ; no mouse |
1496 | mov [0xfff5],byte 1 ; no mouse |
Line 1568... | Line 1526... | ||
1568 | call sys_msg_board_str |
1526 | call sys_msg_board_str |
Line 1569... | Line 1527... | ||
1569 | 1527 | ||
Line 1570... | Line 1528... | ||
1570 | popad |
1528 | popad |
1571 | 1529 | ||
1572 | mov [window_minimize],0 |
1530 | mov [window_minimize],0 |
Line 1573... | Line -... | ||
1573 | ; sti |
- | |
1574 | ret |
- | |
Line 1575... | Line 1531... | ||
1575 | 1531 | ||
1576 | ;temp_mouse_1 dw 0 |
1532 | ret |
1577 | ;temp_mouse_2 dw 0 |
1533 | |
1578 | 1534 |