Rev 527 | Rev 546 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 527 | Rev 536 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | $Revision: 527 $ |
1 | $Revision: 536 $ |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;; ;; |
3 | ;; ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
Line 909... | Line 909... | ||
909 | pop eax |
909 | pop eax |
910 | push edx ; dword [esp] = (y * BgrDataHeight) mod ScreenHeight |
910 | push edx ; dword [esp] = (y * BgrDataHeight) mod ScreenHeight |
911 | ; dword [esp+4] = y * BgrDataHeight / ScreenHeight |
911 | ; dword [esp+4] = y * BgrDataHeight / ScreenHeight |
912 | push eax |
912 | push eax |
913 | mov ecx, [BgrDataWidth] |
913 | mov ecx, [BgrDataWidth] |
- | 914 | lea edx, [ecx*3] |
|
- | 915 | imul edx, [BgrDataHeight] |
|
- | 916 | add edx, [img_background] |
|
- | 917 | push edx |
|
914 | mul ecx |
918 | mul ecx |
915 | imul esi, ecx |
919 | imul esi, ecx |
916 | dec ecx |
920 | dec ecx |
917 | push ecx |
921 | push ecx |
918 | mov ecx, [ScreenWidth] |
922 | mov ecx, [ScreenWidth] |
Line 930... | Line 934... | ||
930 | ; esi -> bgr memory, edi -> output |
934 | ; esi -> bgr memory, edi -> output |
931 | ; ebp = offset in WinMapAddress |
935 | ; ebp = offset in WinMapAddress |
932 | ; dword [esp] = saved esi |
936 | ; dword [esp] = saved esi |
933 | ; dword [esp+4] = saved edx |
937 | ; dword [esp+4] = saved edx |
934 | ; dword [esp+8] = saved ecx |
938 | ; dword [esp+8] = saved ecx |
935 | ; dword [esp+12] = limit for overlapping of points |
939 | ; dword [esp+12] = BgrDataWidth-1, x-limit for overlapping of points |
- | 940 | ; dword [esp+16] = end of bgr memory (defines y-limit for overlapping of points) |
|
936 | ; dword [esp+16] = x |
941 | ; dword [esp+20] = x |
937 | ; dword [esp+20] = (y * BgrDataHeight) mod ScreenHeight (used to fast recalculating of esi) |
942 | ; dword [esp+24] = (y * BgrDataHeight) mod ScreenHeight (used to fast recalculating of esi) |
938 | ; dword [esp+24] = y |
943 | ; dword [esp+28] = y |
939 | ; precalculated constants: |
944 | ; precalculated constants: |
940 | ; dword [esp+28] = BgrDataHeight mod ScreenHeight |
945 | ; dword [esp+32] = BgrDataHeight mod ScreenHeight |
941 | ; dword [esp+32] = BgrDataHeight div ScreenHeight |
946 | ; dword [esp+36] = BgrDataHeight div ScreenHeight |
942 | ; dword [esp+36] = BgrDataWidth mod ScreenWidth |
947 | ; dword [esp+40] = BgrDataWidth mod ScreenWidth |
943 | ; dword [esp+40] = BgrDataWidth div ScreenWidth |
948 | ; dword [esp+44] = BgrDataWidth div ScreenWidth |
944 | sdp3: |
949 | sdp3: |
- | 950 | add edx, [esp+40] |
|
945 | cmp [ebp+WinMapAddress], byte 1 |
951 | cmp [ebp+WinMapAddress], byte 1 |
946 | jnz snbgp |
952 | jnz snbgp |
947 | mov al, [esi+2] |
953 | mov al, [esi+2] |
948 | shl eax, 16 |
954 | shl eax, 16 |
949 | mov ax, [esi] |
955 | mov ax, [esi] |
950 | cmp ecx, [esp+12] |
956 | cmp ecx, [esp+12] |
951 | jae @f |
957 | jae @f |
- | 958 | cmp edx, [ScreenWidth] |
|
- | 959 | jb @f |
|
952 | mov ebx, [esi+2] |
960 | mov ebx, [esi+2] |
953 | shr ebx, 8 |
961 | shr ebx, 8 |
954 | call overlapping_of_points |
962 | call overlapping_of_points |
955 | @@: |
963 | @@: |
- | 964 | mov ebx, [esp+24] |
|
- | 965 | add ebx, [esp+32] |
|
- | 966 | cmp ebx, [ScreenHeight] |
|
- | 967 | jbe @f |
|
- | 968 | mov ebx, [BgrDataWidth] |
|
- | 969 | lea ebx, [ebx*3] |
|
- | 970 | add ebx, esi |
|
- | 971 | cmp ebx, [esp+16] |
|
- | 972 | jae @f |
|
- | 973 | mov ebx, [ebx-1] |
|
- | 974 | shr ebx, 8 |
|
- | 975 | call overlapping_of_points |
|
- | 976 | @@: |
|
956 | mov [edi], ax |
977 | mov [edi], ax |
957 | shr eax, 16 |
978 | shr eax, 16 |
958 | mov [edi+2], al |
979 | mov [edi+2], al |
959 | snbgp: |
980 | snbgp: |
960 | cmp [ScreenBPP], byte 25 |
981 | cmp [ScreenBPP], byte 25 |
961 | sbb edi, -4 |
982 | sbb edi, -4 |
962 | add ebp, 1 |
983 | add ebp, 1 |
963 | mov eax, [esp+16] |
984 | mov eax, [esp+20] |
964 | add eax, 1 |
985 | add eax, 1 |
965 | mov [esp+16], eax |
986 | mov [esp+20], eax |
966 | cmp eax, [draw_data+32+RECT.right] |
987 | cmp eax, [draw_data+32+RECT.right] |
967 | ja sdp4 |
988 | ja sdp4 |
968 | mov eax, [esp+40] |
989 | mov eax, [esp+44] |
969 | add ecx, eax |
990 | add ecx, eax |
970 | lea eax, [eax*3] |
991 | lea eax, [eax*3] |
971 | add esi, eax |
992 | add esi, eax |
972 | add edx, [esp+36] |
993 | ; add edx, [esp+40] |
973 | cmp edx, [ScreenWidth] |
994 | cmp edx, [ScreenWidth] |
974 | jbe sdp3 |
995 | jbe sdp3 |
975 | sub edx, [ScreenWidth] |
996 | sub edx, [ScreenWidth] |
976 | add ecx, 1 |
997 | add ecx, 1 |
977 | add esi, 3 |
998 | add esi, 3 |
978 | sub edx, 1 |
999 | sub edx, 1 |
979 | jmp sdp3 |
1000 | jmp sdp3 |
980 | sdp4: |
1001 | sdp4: |
981 | ; next y |
1002 | ; next y |
982 | mov ebx, [esp+24] |
1003 | mov ebx, [esp+28] |
983 | add ebx, 1 |
1004 | add ebx, 1 |
984 | mov [esp+24], ebx |
1005 | mov [esp+28], ebx |
985 | cmp ebx, [draw_data+32+RECT.bottom] |
1006 | cmp ebx, [draw_data+32+RECT.bottom] |
986 | ja sdpdone |
1007 | ja sdpdone |
987 | ; advance edi, ebp to next scan line |
1008 | ; advance edi, ebp to next scan line |
988 | sub eax, [draw_data+32+RECT.left] |
1009 | sub eax, [draw_data+32+RECT.left] |
989 | sub ebp, eax |
1010 | sub ebp, eax |
Line 999... | Line 1020... | ||
999 | add edi, [BytesPerScanLine] |
1020 | add edi, [BytesPerScanLine] |
1000 | ; restore ecx,edx; advance esi to next background line |
1021 | ; restore ecx,edx; advance esi to next background line |
1001 | pop esi edx ecx |
1022 | pop esi edx ecx |
1002 | push ecx edx |
1023 | push ecx edx |
1003 | xor ebx, ebx |
1024 | xor ebx, ebx |
1004 | mov eax, [esp+20-4] |
1025 | mov eax, [esp+24-4] |
1005 | add eax, [esp+28-4] |
1026 | add eax, [esp+32-4] |
1006 | cmp eax, [ScreenHeight] |
1027 | cmp eax, [ScreenHeight] |
1007 | jbe @f |
1028 | jbe @f |
1008 | sub eax, [ScreenHeight] |
1029 | sub eax, [ScreenHeight] |
1009 | mov ebx, 1 |
1030 | mov ebx, 1 |
1010 | sub eax, ebx |
1031 | sub eax, ebx |
1011 | @@: |
1032 | @@: |
1012 | mov [esp+20-4], eax |
1033 | mov [esp+24-4], eax |
1013 | add ebx, [esp+32-4] |
1034 | add ebx, [esp+36-4] |
1014 | lea ebx, [ebx*3] |
1035 | lea ebx, [ebx*3] |
1015 | imul ebx, [BgrDataWidth] |
1036 | imul ebx, [BgrDataWidth] |
1016 | add esi, ebx |
1037 | add esi, ebx |
1017 | push esi |
1038 | push esi |
1018 | mov eax, [draw_data+32+RECT.left] |
1039 | mov eax, [draw_data+32+RECT.left] |
1019 | mov [esp+16], eax |
1040 | mov [esp+20], eax |
1020 | jmp sdp3 |
1041 | jmp sdp3 |
1021 | sdpdone: |
1042 | sdpdone: |
1022 | add esp, 44 |
1043 | add esp, 48 |
1023 | popad |
1044 | popad |
1024 | mov [EGA_counter],1 |
1045 | mov [EGA_counter],1 |
1025 | call VGA_drawbackground |
1046 | call VGA_drawbackground |
1026 | ret |
1047 | ret |