76,21 → 76,16 |
.abs_cx dd ? |
.abs_cy dd ? |
.line_increment dd ? |
.source_bpp dd ? |
.winmap_newline dd ? |
.screen_newline dd ? |
.stack_data = 4*12 |
.edi dd ? |
.esi dd ? |
.ebp dd ? |
.stack_data = 4*13 |
end virtual |
|
align 16 |
align 4 |
; 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] |
97,6 → 92,13 |
|
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 |
|
162,8 → 164,7 |
mov eax, [putimg.image_sx] |
sub eax, [putimg.real_sx] |
;; imul eax, [putimg.source_bpp] |
; lea eax, [eax + eax * 2] |
call esi |
lea eax, [eax + eax * 2] |
mov [putimg.line_increment], eax |
|
; winmap new line increment |
182,7 → 183,7 |
mov [putimg.screen_newline], eax |
|
; pointer to image |
mov esi, [putimg.pti] |
mov ecx, [putimg.pti] |
|
; pointer to screen |
mov edx, [putimg.abs_cy] |
212,32 → 213,29 |
mov edi, [putimg.real_sy] |
align 4 |
.new_line: |
mov ecx, [putimg.real_sx] |
mov esi, [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, [esi] ; eax = RRBBGGRR |
mov eax, [ecx] ; ecx = RRBBGGRR |
mov [edx], ax |
shr eax, 16 |
mov [edx+2], al |
.skip: |
|
; add esi, 3 ;[putimg.source_bpp] |
add ecx, 3 ;[putimg.source_bpp] |
add edx, 3 |
inc ebp |
|
dec ecx |
dec esi |
jnz .new_x |
; pop edx ebp |
|
add esi, [putimg.line_increment] |
add ecx, [putimg.line_increment] |
add edx, [putimg.screen_newline] ;[BytesPerScanLine] |
add ebp, [putimg.winmap_newline] ;[ScreenWidth] |
;inc ebp |
253,30 → 251,27 |
mov edi, [putimg.real_sy] |
align 4 |
.new_line: |
mov ecx, [putimg.real_sx] |
mov esi, [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, [esi] ; ecx = RRBBGGRR |
mov eax, [ecx] ; ecx = RRBBGGRR |
mov [edx], eax |
.skip: |
|
; add esi, [putimg.source_bpp] |
add ecx, [putimg.source_bpp] |
add edx, 4 |
inc ebp |
|
dec ecx |
dec esi |
jnz .new_x |
; pop edx ebp |
|
add esi, [putimg.line_increment] |
add ecx, [putimg.line_increment] |
add edx, [putimg.screen_newline] ;[BytesPerScanLine] |
add ebp, [putimg.winmap_newline] ;[ScreenWidth] |
;inc ebp |