Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2434 → Rev 2435

/kernel/trunk/video/vesa20.inc
243,13 → 243,15
mov ebx, [CURRENT_TASK]
cmp byte [ScreenBPP], 32
je put_image_end_32
;put_image_end_24:
;--------------------------------------
put_image_end_24:
mov edi, [putimg.real_sy]
cmp [_display.select_cursor], 0
jne put_image_end_24_new
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
; push ebp edx
;--------------------------------------
align 4
.new_x:
268,7 → 270,7
sub ecx, edi
 
; check mouse area for putpixel
call [_display.check_mouse]
call check_mouse_area_for_putpixel
pop ecx
; store to real LFB
mov [LFB_BASE+edx], ax
277,16 → 279,15
;--------------------------------------
align 4
.skip:
; add esi, 3 ;[putimg.source_bpp]
add edx, 3
inc ebp
dec ecx
jnz .new_x
; pop edx ebp
 
add esi, [putimg.line_increment]
add edx, [putimg.screen_newline];[BytesPerScanLine]
add ebp, [putimg.winmap_newline];[Screen_Max_X]
; inc ebp
 
cmp [putimg.ebp], putimage_get1bpp
jz .correct
cmp [putimg.ebp], putimage_get2bpp
309,15 → 310,93
add esp, putimg.stack_data
popad
ret
;--------------------------------------
align 4
put_image_end_24_new:
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
;--------------------------------------
align 4
.new_x:
push [putimg.edi]
mov eax, [putimg.ebp+4]
call eax
cmp [ebp], bl
jne .skip
;--------------------------------------
push ecx
mov ecx, [putimg.real_sy_and_abs_cy + 4]
sub ecx, edi
;--------------------------------------
; check for Y
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
jb .no_mouse_area
 
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
jae .no_mouse_area
 
rol ecx, 16
add ecx, [putimg.real_sx_and_abs_cx + 4]
sub ecx, [esp]
;--------------------------------------
; check for X
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
jb .no_mouse_area
 
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
jae .no_mouse_area
;--------------------------------------
; check mouse area for putpixel
call check_mouse_area_for_putpixel_new.1
;--------------------------------------
align 4
.no_mouse_area:
pop ecx
; store to real LFB
mov [LFB_BASE+edx], ax
shr eax, 16
mov [LFB_BASE+edx+2], al
;--------------------------------------
align 4
.skip:
add edx, 3
inc ebp
dec ecx
jnz .new_x
 
add esi, [putimg.line_increment]
add edx, [putimg.screen_newline];[BytesPerScanLine]
add ebp, [putimg.winmap_newline];[Screen_Max_X]
 
cmp [putimg.ebp], putimage_get1bpp
jz .correct
cmp [putimg.ebp], putimage_get2bpp
jz .correct
cmp [putimg.ebp], putimage_get4bpp
jnz @f
;--------------------------------------
align 4
.correct:
mov eax, [putimg.edi]
mov byte [eax], 80h
;--------------------------------------
align 4
@@:
dec edi
jnz .new_line
jmp put_image_end_24.finish
;------------------------------------------------------------------------------
align 4
put_image_end_32:
mov edi, [putimg.real_sy]
cmp [_display.select_cursor], 0
jne put_image_end_32_new
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
; push ebp edx
;--------------------------------------
align 4
.new_x:
336,7 → 415,7
sub ecx, edi
 
; check mouse area for putpixel
call [_display.check_mouse]
call check_mouse_area_for_putpixel
pop ecx
; store to real LFB
mov [LFB_BASE+edx], eax
343,16 → 422,15
;--------------------------------------
align 4
.skip:
; add esi, [putimg.source_bpp]
add edx, 4
inc ebp
dec ecx
jnz .new_x
; pop edx ebp
 
add esi, [putimg.line_increment]
add edx, [putimg.screen_newline];[BytesPerScanLine]
add ebp, [putimg.winmap_newline];[Screen_Max_X]
; inc ebp
 
cmp [putimg.ebp], putimage_get1bpp
jz .correct
cmp [putimg.ebp], putimage_get2bpp
377,6 → 455,81
call VGA__putimage
mov [EGA_counter], 1
ret
;--------------------------------------
align 4
put_image_end_32_new:
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
;--------------------------------------
align 4
.new_x:
push [putimg.edi]
mov eax, [putimg.ebp+4]
call eax
cmp [ebp], bl
jne .skip
;--------------------------------------
push ecx
mov ecx, [putimg.real_sy_and_abs_cy + 4]
sub ecx, edi
;--------------------------------------
; check for Y
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
jb .no_mouse_area
 
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
jae .no_mouse_area
 
rol ecx, 16
add ecx, [putimg.real_sx_and_abs_cx + 4]
sub ecx, [esp]
;--------------------------------------
; check for X
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
jb .no_mouse_area
 
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
jae .no_mouse_area
;--------------------------------------
; check mouse area for putpixel
call check_mouse_area_for_putpixel_new.1
;--------------------------------------
align 4
.no_mouse_area:
pop ecx
; store to real LFB
mov [LFB_BASE+edx], eax
;--------------------------------------
align 4
.skip:
add edx, 4
inc ebp
dec ecx
jnz .new_x
 
add esi, [putimg.line_increment]
add edx, [putimg.screen_newline];[BytesPerScanLine]
add ebp, [putimg.winmap_newline];[Screen_Max_X]
 
cmp [putimg.ebp], putimage_get1bpp
jz .correct
cmp [putimg.ebp], putimage_get2bpp
jz .correct
cmp [putimg.ebp], putimage_get4bpp
jnz @f
;--------------------------------------
align 4
.correct:
mov eax, [putimg.edi]
mov byte [eax], 80h
;--------------------------------------
align 4
@@:
dec edi
jnz .new_line
jmp put_image_end_32.finish
;------------------------------------------------------------------------------
align 4
__sys_putpixel: