76,16 → 76,21 |
.abs_cx dd ? |
.abs_cy dd ? |
.line_increment dd ? |
.source_bpp dd ? |
.winmap_newline dd ? |
.screen_newline dd ? |
.stack_data = 4*13 |
.stack_data = 4*12 |
.edi dd ? |
.esi dd ? |
.ebp dd ? |
end virtual |
|
align 4 |
align 16 |
; ebx = pointer |
; ecx = size [x|y] |
; edx = coordinates [x|y] |
; ebp = pointer to 'get' function |
; esi = pointer to 'init' function |
; edi = parameter for 'get' function |
vesa20_putimage: |
pushad |
call [disable_mouse] |
92,13 → 97,6 |
|
sub esp, putimg.stack_data |
|
mov [putimg.source_bpp], 3 |
; test ebx, 0x80000000 |
; jz @f |
; inc [putimg.source_bpp] |
; @@: |
; and ebx, 0x7FFFFFFF |
|
; save pointer to image |
mov [putimg.pti], ebx |
|
164,7 → 162,8 |
mov eax, [putimg.image_sx] |
sub eax, [putimg.real_sx] |
;; imul eax, [putimg.source_bpp] |
lea eax, [eax + eax * 2] |
; lea eax, [eax + eax * 2] |
call esi |
mov [putimg.line_increment], eax |
|
; winmap new line increment |
183,7 → 182,7 |
mov [putimg.screen_newline], eax |
|
; pointer to image |
mov ecx, [putimg.pti] |
mov esi, [putimg.pti] |
|
; pointer to screen |
mov edx, [putimg.abs_cy] |
213,29 → 212,32 |
mov edi, [putimg.real_sy] |
align 4 |
.new_line: |
mov esi, [putimg.real_sx] |
mov ecx, [putimg.real_sx] |
|
; push ebp edx |
align 4 |
.new_x: |
|
push [putimg.edi] |
mov eax, [putimg.ebp+4] |
call eax |
cmp [ebp], bl |
jne .skip |
mov eax, [ecx] ; ecx = RRBBGGRR |
; mov eax, [esi] ; eax = RRBBGGRR |
mov [edx], ax |
shr eax, 16 |
mov [edx+2], al |
.skip: |
|
add ecx, 3 ;[putimg.source_bpp] |
; add esi, 3 ;[putimg.source_bpp] |
add edx, 3 |
inc ebp |
|
dec esi |
dec ecx |
jnz .new_x |
; pop edx ebp |
|
add ecx, [putimg.line_increment] |
add esi, [putimg.line_increment] |
add edx, [putimg.screen_newline] ;[BytesPerScanLine] |
add ebp, [putimg.winmap_newline] ;[ScreenWidth] |
;inc ebp |
251,27 → 253,30 |
mov edi, [putimg.real_sy] |
align 4 |
.new_line: |
mov esi, [putimg.real_sx] |
mov ecx, [putimg.real_sx] |
|
; push ebp edx |
align 4 |
.new_x: |
|
push [putimg.edi] |
mov eax, [putimg.ebp+4] |
call eax |
cmp [ebp], bl |
jne .skip |
mov eax, [ecx] ; ecx = RRBBGGRR |
; mov eax, [esi] ; ecx = RRBBGGRR |
mov [edx], eax |
.skip: |
|
add ecx, [putimg.source_bpp] |
; add esi, [putimg.source_bpp] |
add edx, 4 |
inc ebp |
|
dec esi |
dec ecx |
jnz .new_x |
; pop edx ebp |
|
add ecx, [putimg.line_increment] |
add esi, [putimg.line_increment] |
add edx, [putimg.screen_newline] ;[BytesPerScanLine] |
add ebp, [putimg.winmap_newline] ;[ScreenWidth] |
;inc ebp |