forked from KolibriOS/kolibrios
discontinuing the use of the twdw constant
git-svn-id: svn://kolibrios.org@9679 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a5a471e9ed
commit
03c3cc8b48
@ -212,10 +212,11 @@ end virtual
|
|||||||
sub esp, .local_vars_size
|
sub esp, .local_vars_size
|
||||||
|
|
||||||
mov [esp+.flags], ebx
|
mov [esp+.flags], ebx
|
||||||
|
|
||||||
mov eax, [TASK_BASE]
|
mov eax, [current_slot_idx]
|
||||||
mov ebx, [eax-twdw + WDATA.box.width]
|
shl eax, 5 ; sizeof.WDATA
|
||||||
mov edx, [eax-twdw + WDATA.box.height]
|
mov ebx, [eax + window_data + WDATA.box.width]
|
||||||
|
mov edx, [eax + window_data + WDATA.box.height]
|
||||||
inc ebx
|
inc ebx
|
||||||
inc edx
|
inc edx
|
||||||
|
|
||||||
@ -259,12 +260,13 @@ end virtual
|
|||||||
call blit_clip
|
call blit_clip
|
||||||
jc .L57
|
jc .L57
|
||||||
|
|
||||||
mov eax, [TASK_BASE]
|
mov eax, [current_slot_idx]
|
||||||
|
shl eax, 5 ; sizeof.WDATA
|
||||||
|
|
||||||
mov ebx, [esp+BLITTER.dst_x]
|
mov ebx, [esp+BLITTER.dst_x]
|
||||||
mov ebp, [esp+BLITTER.dst_y]
|
mov ebp, [esp+BLITTER.dst_y]
|
||||||
add ebx, [eax-twdw + WDATA.box.left]
|
add ebx, [eax + window_data + WDATA.box.left]
|
||||||
add ebp, [eax-twdw + WDATA.box.top]
|
add ebp, [eax + window_data + WDATA.box.top]
|
||||||
|
|
||||||
test [esp+.flags], BLIT_CLIENT_RELATIVE
|
test [esp+.flags], BLIT_CLIENT_RELATIVE
|
||||||
jz .no_client_relative
|
jz .no_client_relative
|
||||||
|
@ -423,8 +423,10 @@ align 4
|
|||||||
push edi
|
push edi
|
||||||
|
|
||||||
mov eax, [current_slot_idx]
|
mov eax, [current_slot_idx]
|
||||||
shl eax, 5
|
;shl eax, 5
|
||||||
mov eax, [TASK_TABLE+eax+4]
|
;mov eax, [TASK_TABLE+eax+TASKDATA.pid]
|
||||||
|
shl eax, 8
|
||||||
|
mov eax, [eax + SLOT_BASE + APPDATA.tid]
|
||||||
mov ebx, [src]
|
mov ebx, [src]
|
||||||
mov ecx, [flags]
|
mov ecx, [flags]
|
||||||
call create_cursor ;eax, ebx, ecx
|
call create_cursor ;eax, ebx, ecx
|
||||||
@ -460,8 +462,10 @@ proc delete_cursor stdcall, hcursor:dword
|
|||||||
jne .fail
|
jne .fail
|
||||||
|
|
||||||
mov ebx, [current_slot_idx]
|
mov ebx, [current_slot_idx]
|
||||||
shl ebx, 5
|
;shl ebx, 5
|
||||||
mov ebx, [TASK_TABLE+ebx+4]
|
;mov ebx, [TASK_TABLE+ebx+4]
|
||||||
|
shl ebx, 8
|
||||||
|
mov ebx, [ebx + SLOT_BASE + APPDATA.tid]
|
||||||
cmp ebx, [esi+CURSOR.pid]
|
cmp ebx, [esi+CURSOR.pid]
|
||||||
jne .fail
|
jne .fail
|
||||||
|
|
||||||
|
@ -398,9 +398,13 @@ vesa12_drawbar:
|
|||||||
push ebx
|
push ebx
|
||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
mov ecx, [TASK_BASE]
|
;mov ecx, [TASK_BASE]
|
||||||
add eax, [ecx-twdw+WDATA.box.left]
|
;add eax, [ecx-twdw+WDATA.box.left]
|
||||||
add ebx, [ecx-twdw+WDATA.box.top]
|
;add ebx, [ecx-twdw+WDATA.box.top]
|
||||||
|
mov ecx, [current_slot_idx]
|
||||||
|
shl ecx, 5
|
||||||
|
add eax, [ecx + window_data + WDATA.box.left]
|
||||||
|
add ebx, [ecx + window_data + WDATA.box.top]
|
||||||
push eax
|
push eax
|
||||||
mov eax, ebx ; y
|
mov eax, ebx ; y
|
||||||
mov ebx, [BytesPerScanLine]
|
mov ebx, [BytesPerScanLine]
|
||||||
@ -765,9 +769,13 @@ vesa12_putimage:
|
|||||||
push edx
|
push edx
|
||||||
movzx eax, word [esp+2]
|
movzx eax, word [esp+2]
|
||||||
movzx ebx, word [esp+0]
|
movzx ebx, word [esp+0]
|
||||||
mov ecx, [TASK_BASE]
|
;mov ecx, [TASK_BASE]
|
||||||
add eax, [ecx-twdw+WDATA.box.left]
|
;add eax, [ecx-twdw+WDATA.box.left]
|
||||||
add ebx, [ecx-twdw+WDATA.box.top]
|
;add ebx, [ecx-twdw+WDATA.box.top]
|
||||||
|
mov ecx, [current_slot_idx]
|
||||||
|
shl ecx, 5
|
||||||
|
add eax, [ecx + window_data + WDATA.box.left]
|
||||||
|
add ebx, [ecx + window_data + WDATA.box.top]
|
||||||
push eax
|
push eax
|
||||||
mov eax, ebx ; y
|
mov eax, ebx ; y
|
||||||
mul dword [BytesPerScanLine]
|
mul dword [BytesPerScanLine]
|
||||||
|
@ -189,15 +189,17 @@ end virtual
|
|||||||
mov [putimg.image_cx], eax
|
mov [putimg.image_cx], eax
|
||||||
mov [putimg.image_cy], edx
|
mov [putimg.image_cy], edx
|
||||||
; calculate absolute (i.e. screen) coordinates
|
; calculate absolute (i.e. screen) coordinates
|
||||||
mov eax, [TASK_BASE]
|
;mov eax, [TASK_BASE]
|
||||||
mov ebx, [eax-twdw + WDATA.box.left]
|
mov eax, [current_slot_idx]
|
||||||
|
shl eax, 5 ; sizeof.WDATA
|
||||||
|
mov ebx, [eax + window_data + WDATA.box.left]
|
||||||
add ebx, [putimg.image_cx]
|
add ebx, [putimg.image_cx]
|
||||||
mov [putimg.abs_cx], ebx
|
mov [putimg.abs_cx], ebx
|
||||||
mov ebx, [eax-twdw + WDATA.box.top]
|
mov ebx, [eax +window_data + WDATA.box.top]
|
||||||
add ebx, [putimg.image_cy]
|
add ebx, [putimg.image_cy]
|
||||||
mov [putimg.abs_cy], ebx
|
mov [putimg.abs_cy], ebx
|
||||||
; real_sx = MIN(wnd_sx-image_cx, image_sx);
|
; real_sx = MIN(wnd_sx-image_cx, image_sx);
|
||||||
mov ebx, [eax-twdw + WDATA.box.width] ; ebx = wnd_sx
|
mov ebx, [eax + window_data + WDATA.box.width] ; ebx = wnd_sx
|
||||||
inc ebx ; WDATA.box.width is one pixel less than real window x-size
|
inc ebx ; WDATA.box.width is one pixel less than real window x-size
|
||||||
sub ebx, [putimg.image_cx]
|
sub ebx, [putimg.image_cx]
|
||||||
ja @f
|
ja @f
|
||||||
@ -212,7 +214,7 @@ end virtual
|
|||||||
.end_x:
|
.end_x:
|
||||||
mov [putimg.real_sx], ebx
|
mov [putimg.real_sx], ebx
|
||||||
; init real_sy
|
; init real_sy
|
||||||
mov ebx, [eax-twdw + WDATA.box.height] ; ebx = wnd_sy
|
mov ebx, [eax + window_data + WDATA.box.height] ; ebx = wnd_sy
|
||||||
inc ebx
|
inc ebx
|
||||||
sub ebx, [putimg.image_cy]
|
sub ebx, [putimg.image_cy]
|
||||||
ja @f
|
ja @f
|
||||||
@ -1401,13 +1403,15 @@ end virtual
|
|||||||
mov [drbar.bar_sx], ecx
|
mov [drbar.bar_sx], ecx
|
||||||
mov [drbar.bar_cx], eax
|
mov [drbar.bar_cx], eax
|
||||||
mov [drbar.bar_cy], ebx
|
mov [drbar.bar_cy], ebx
|
||||||
mov edi, [TASK_BASE]
|
;mov edi, [TASK_BASE]
|
||||||
add eax, [edi-twdw + WDATA.box.left] ; win_cx
|
mov edi, [current_slot_idx]
|
||||||
add ebx, [edi-twdw + WDATA.box.top] ; win_cy
|
shl edi, 5 ; sizeof.WDATA
|
||||||
|
add eax, [edi + window_data + WDATA.box.left] ; win_cx
|
||||||
|
add ebx, [edi + window_data + WDATA.box.top] ; win_cy
|
||||||
mov [drbar.abs_cx], eax
|
mov [drbar.abs_cx], eax
|
||||||
mov [drbar.abs_cy], ebx
|
mov [drbar.abs_cy], ebx
|
||||||
; real_sx = MIN(wnd_sx-bar_cx, bar_sx);
|
; real_sx = MIN(wnd_sx-bar_cx, bar_sx);
|
||||||
mov ebx, [edi-twdw + WDATA.box.width] ; ebx = wnd_sx
|
mov ebx, [edi + window_data + WDATA.box.width] ; ebx = wnd_sx
|
||||||
inc ebx ; WDATA.box.width is one pixel less than real window x-size
|
inc ebx ; WDATA.box.width is one pixel less than real window x-size
|
||||||
sub ebx, [drbar.bar_cx]
|
sub ebx, [drbar.bar_cx]
|
||||||
ja @f
|
ja @f
|
||||||
@ -1424,7 +1428,7 @@ end virtual
|
|||||||
.end_x:
|
.end_x:
|
||||||
mov [drbar.real_sx], ebx
|
mov [drbar.real_sx], ebx
|
||||||
; real_sy = MIN(wnd_sy-bar_cy, bar_sy);
|
; real_sy = MIN(wnd_sy-bar_cy, bar_sy);
|
||||||
mov ebx, [edi-twdw + WDATA.box.height] ; ebx = wnd_sy
|
mov ebx, [edi + window_data + WDATA.box.height] ; ebx = wnd_sy
|
||||||
inc ebx
|
inc ebx
|
||||||
sub ebx, [drbar.bar_cy]
|
sub ebx, [drbar.bar_cy]
|
||||||
ja @f
|
ja @f
|
||||||
|
Loading…
Reference in New Issue
Block a user