Rev 755 | Rev 911 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 755 | Rev 784 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | ;; ;; |
15 | ;; ;; |
16 | ;; See file COPYING for details ;; |
16 | ;; See file COPYING for details ;; |
17 | ;; ;; |
17 | ;; ;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 19... | Line 19... | ||
19 | 19 | ||
Line 20... | Line 20... | ||
20 | $Revision: 755 $ |
20 | $Revision: 784 $ |
21 | 21 | ||
Line 797... | Line 797... | ||
797 | ; Now eax=x, ebx=y, edi->output, ebp=offset in WinMapAddress |
797 | ; Now eax=x, ebx=y, edi->output, ebp=offset in WinMapAddress |
798 | ; 2) Calculate offset in background memory block |
798 | ; 2) Calculate offset in background memory block |
799 | push eax |
799 | push eax |
800 | xor edx, edx |
800 | xor edx, edx |
801 | mov eax, ebx |
801 | mov eax, ebx |
802 | mov ecx, [BgrDataHeight] |
- | |
803 | div ecx ; edx := y mod BgrDataHeight |
802 | div dword [BgrDataHeight] ; edx := y mod BgrDataHeight |
804 | sub ecx, edx ; ecx := BgrDataHeight - (y mod BgrDataHeight) |
- | |
805 | pop eax |
803 | pop eax |
806 | push eax |
804 | push eax |
- | 805 | mov ecx, [BgrDataWidth] |
|
807 | mov esi, edx |
806 | mov esi, edx |
808 | imul esi, [BgrDataWidth] ; esi := (y mod BgrDataHeight) * BgrDataWidth |
807 | imul esi, ecx ; esi := (y mod BgrDataHeight) * BgrDataWidth |
809 | xor edx, edx |
808 | xor edx, edx |
810 | div dword [BgrDataWidth] ; edx := x mod BgrDataWidth |
809 | div ecx ; edx := x mod BgrDataWidth |
- | 810 | sub ecx, edx |
|
811 | add esi, edx ; esi := (y mod BgrDataHeight)*BgrDataWidth + (x mod BgrDataWidth) |
811 | add esi, edx ; esi := (y mod BgrDataHeight)*BgrDataWidth + (x mod BgrDataWidth) |
812 | pop eax |
812 | pop eax |
813 | lea esi, [esi*3] |
813 | lea esi, [esi*3] |
814 | add esi, [img_background] |
814 | add esi, [img_background] |
815 | xor edx, edx |
815 | xor edx, edx |