/kernel/branches/gfx_kernel/vmode/clipping.asm |
---|
44,7 → 44,7 |
func calc_clipping_rects |
begin |
mov [cnt],0 |
movzx ebp,word[0x3000] |
movzx ebp,word[CURRENT_TASK] |
shl ebp,5 |
cmp ebp,0x20 |
96,7 → 96,7 |
inc eax |
add [rct.bottom],eax |
^ |
movzx ecx,word[0x00003004] ; number of processes |
movzx ecx,word[TASK_COUNT] ; number of processes |
jif ecx,be,1,.exit |
; calculate clipping rectangles |
104,10 → 104,10 |
mov esi,1 |
; go forward through all windows |
.next_window: |
movzx edi,word[0x00003000] ; calling process number |
movzx edi,word[CURRENT_TASK] ; calling process number |
mov ax,[0x0000C000+esi*2] |
jif ax,be,[0x0000C000+edi*2],.end_window.2 |
mov ax,[WIN_STACK+esi*2] |
jif ax,be,[WIN_STACK+edi*2],.end_window.2 |
mov ebp,[cnt] |
shl ebp,4 ; ebp *= SR |
266,7 → 266,7 |
pop esi; ecx |
.end_window.2: |
inc esi |
jif esi,be,[0x00003004],.next_window |
jif esi,be,[TASK_COUNT],.next_window |
; dec ecx |
; jnz .next_window |
/kernel/branches/gfx_kernel/vmode/norm_04.inc |
---|
56,19 → 56,19 |
mov edi,eax |
pop eax |
mov ebp,[0x3010] |
movsx esi,word[ebp-0x3000+0] |
mov ebp,[TASK_BASE] |
movsx esi,word[ebp-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[ebp-0x3000+4] |
movsx esi,word[ebp-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[ebp-0x3000+0] |
; add ebx,[ebp-0x3000+4] |
; add ecx,[ebp-0x3000+0] |
; add edx,[ebp-0x3000+4] |
; add eax,[ebp-CURRENT_TASK+0] |
; add ebx,[ebp-CURRENT_TASK+4] |
; add ecx,[ebp-CURRENT_TASK+0] |
; add edx,[ebp-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov ebp,[esi] |
or ebp,ebp |
89,10 → 89,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: sub edx,ebx |
push edx edi ebx eax |
mov edi,ebx |
101,7 → 101,7 |
add edi,ebx |
shr eax,3 |
add edi,eax |
add edi,0x000A0000 |
add edi,VGABasePtr |
pop eax ebx |
mov ebx,eax |
274,7 → 274,7 |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
298,10 → 298,10 |
.draw: |
@@: call is_intersect_vln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: push ebx eax |
mov ebp,ebx |
shl ebp,6 |
309,7 → 309,7 |
add ebp,ebx |
shr eax,3 |
add ebp,eax |
add ebp,0x000A0000 |
add ebp,VGABasePtr |
pop eax ebx |
@@: mov ch,[ebp] |
mov [ebp],cl |
349,7 → 349,7 |
mov ecx,[esp+4*8] |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
373,10 → 373,10 |
.draw: |
@@: call is_intersect_hln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: push edi ebx eax |
mov edi,eax |
shl edi,6 |
384,7 → 384,7 |
add edi,eax |
shr ebx,3 |
add edi,ebx |
add edi,0x000A0000 |
add edi,VGABasePtr |
pop eax ebx |
push eax ebx edx esi ecx |
464,10 → 464,10 |
.D_End: |
pop ecx esi edx ebx eax edi |
; mov ebp,[bytes_per_scanline] |
; mov ebp,[BytesPerScanLine] |
; imul ebp,eax |
; lea ebp,[ebp+ebx*4] |
; add ebp,[lfb_address] |
; add ebp,[LFBAddress] |
; @@: test ecx,0x01000000 |
; jz .dr |
; mov ecx,[ebp] |
518,10 → 518,10 |
begin |
pushad |
cli |
; mov edx,[bytes_per_scanline] |
; mov edx,[BytesPerScanLine] |
; imul edx,ebx |
; lea edx,[edx+eax*4] |
; add edx,[lfb_address] |
; add edx,[LFBAddress] |
; test ecx,0x01000000 |
; jz @f |
; mov ecx,[edx] |
528,7 → 528,7 |
; not ecx |
@@: test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
541,10 → 541,10 |
call get_cursor_rect |
call is_intersect_pt |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put:;mov [edx],ecx |
; mov ax,SegA000 {Calculate Offset} |
; mov es,ax |
564,7 → 564,7 |
shr ah,cl |
mov dx,0x03CE |
out dx,ax |
add edi,0x000A0000 |
add edi,VGABasePtr |
call color_24_to_4_bits |
mov ah,[edi] ; dummy read |
603,7 → 603,7 |
shr ah,cl |
mov dx,0x03CE |
out dx,ax |
add edi,0x000A0000 |
add edi,VGABasePtr |
pop eax |
call color_24_to_4_bits |
639,7 → 639,7 |
mov cl,al |
shr eax,3 ; /8 |
add edi,eax ; 80*y + (x/8) |
add edi,0x000A0000 |
add edi,VGABasePtr |
and ecx,7 |
neg ecx |
704,19 → 704,19 |
push edi |
add ecx,eax |
add edx,ebx |
mov edi,[0x00003010] |
movsx esi,word[edi-0x3000+0] |
mov edi,[TASK_BASE] |
movsx esi,word[edi-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[edi-0x3000+4] |
movsx esi,word[edi-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[esi-0x3000+0] |
; add ebx,[esi-0x3000+4] |
; add ecx,[esi-0x3000+0] |
; add edx,[esi-0x3000+4] |
; add eax,[esi-CURRENT_TASK+0] |
; add ebx,[esi-CURRENT_TASK+4] |
; add ecx,[esi-CURRENT_TASK+0] |
; add edx,[esi-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
738,10 → 738,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: |
mov esi,ebx |
sub esi,[esp+4*4] |
756,7 → 756,7 |
shl edi,6 ; 80*y |
shl ebp,4 |
add edi,ebp |
add edi,0x000A0000 |
add edi,VGABasePtr |
.xxx: push eax edx esi edi ebx eax |
or ebp,-1 |
mov edx,0x03CE |
856,10 → 856,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: sub edx,ebx |
push edx edi ebx eax |
mov edi,ebx |
868,7 → 868,7 |
add edi,ebx |
shr eax,3 |
add edi,eax |
add edi,0x000A0000 |
add edi,VGABasePtr |
pop eax ebx |
mov ebx,eax |
992,7 → 992,7 |
retn |
.tiled: |
mov eax,bg_address |
mov eax,IMG_BACKGROUND |
mov ebx,[bg_width-2] |
mov bx,word[bg_height] |
xor ecx,ecx |
1001,7 → 1001,7 |
call vm_mike_put_image.04.direct |
pop eax |
add edx,[bg_width] |
cmp edx,[screen_width] |
cmp edx,[ScreenWidth] |
jae @f |
shl edx,16 |
add ecx,edx |
1010,7 → 1010,7 |
@@: and ecx,0x0000FFFF |
xor edx,edx |
add ecx,[bg_height] |
cmp ecx,[screen_height] |
cmp ecx,[ScreenHeight] |
jb .lp1 |
popad |
retn |
/kernel/branches/gfx_kernel/vmode/norm_08.inc |
---|
19,17 → 19,17 |
call get_cursor_rect |
mov ebp,[0x3010] |
movsx esi,word[ebp-0x3000+0] |
mov ebp,[TASK_BASE] |
movsx esi,word[ebp-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[ebp-0x3000+4] |
movsx esi,word[ebp-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[ebp-0x3000+0] |
; add ebx,[ebp-0x3000+4] |
; add ecx,[ebp-0x3000+0] |
; add edx,[ebp-0x3000+4] |
; add eax,[ebp-CURRENT_TASK+0] |
; add ebx,[ebp-CURRENT_TASK+4] |
; add ecx,[ebp-CURRENT_TASK+0] |
; add edx,[ebp-CURRENT_TASK+4] |
push ecx |
mov ecx,edi |
37,7 → 37,7 |
mov edi,ecx |
pop ecx |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov ebp,[esi] |
or ebp,ebp |
58,14 → 58,14 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
add ebp,eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
xchg eax,edi |
@@: push ebp |
79,7 → 79,7 |
jl @b |
xchg eax,edi |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
128,7 → 128,7 |
dl.08.vert_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
152,14 → 152,14 |
.draw: |
@@: call is_intersect_vln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
add ebp,eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
176,7 → 176,7 |
; mov cx,[ebp] |
; not cx |
; .dr: mov [ebp],cx |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jle @b |
209,7 → 209,7 |
dl.08.horz_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
233,14 → 233,14 |
.draw: |
@@: call is_intersect_hln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,eax |
add ebp,ebx |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
331,13 → 331,13 |
begin |
pushad |
cli |
mov edx,[bytes_per_scanline] |
mov edx,[BytesPerScanLine] |
imul edx,ebx |
add edx,eax |
add edx,[lfb_address] |
add edx,[LFBAddress] |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
350,10 → 350,10 |
call get_cursor_rect |
call is_intersect_pt |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: push edx |
call [set_bank] |
pop edx |
404,9 → 404,9 |
pushad |
cli |
imul ebx,[bytes_per_scanline] |
imul ebx,[BytesPerScanLine] |
add eax,ebx |
add eax,[lfb_address] |
add eax,[LFBAddress] |
push eax |
call [set_bank] |
pop eax |
449,19 → 449,19 |
push edi |
add ecx,eax |
add edx,ebx |
mov edi,[0x00003010] |
movsx esi,word[edi-0x3000+0] |
mov edi,[TASK_BASE] |
movsx esi,word[edi-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[edi-0x3000+4] |
movsx esi,word[edi-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[esi-0x3000+0] |
; add ebx,[esi-0x3000+4] |
; add ecx,[esi-0x3000+0] |
; add edx,[esi-0x3000+4] |
; add eax,[esi-CURRENT_TASK+0] |
; add ebx,[esi-CURRENT_TASK+4] |
; add ecx,[esi-CURRENT_TASK+0] |
; add edx,[esi-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
483,10 → 483,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: mov esi,ebx |
sub esi,[esp+4*4] |
imul esi,[esp+4*8] |
495,10 → 495,10 |
lea edi,[edi*3] |
add esi,edi |
add esi,ebp |
mov edi,[bytes_per_scanline] |
mov edi,[BytesPerScanLine] |
imul edi,ebx |
add edi,eax |
add edi,[lfb_address] |
add edi,[LFBAddress] |
.xxx: push eax esi edi eax |
@@: lodsd |
xchg eax,ecx |
517,7 → 517,7 |
jl @b |
pop eax edi esi eax |
add esi,[esp+4*8] |
add edi,[bytes_per_scanline] |
add edi,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
549,7 → 549,7 |
cli |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
mov esi,[CLIP_RECTS+4] |
mov ebp,[esi] |
645,7 → 645,7 |
je .tiled |
@@: |
imul eax,[bg_width],3 |
mov [bg_bytes_per_scanline],eax |
mov [bg_BytesPerScanLine],eax |
mov eax,[viewport.left] |
mov ebx,[viewport.top] |
686,10 → 686,10 |
jne .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
add ebp,eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
701,7 → 701,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
717,7 → 717,7 |
retn |
.tiled: |
mov eax,bg_address |
mov eax,IMG_BACKGROUND |
mov ebx,[bg_width-2] |
mov bx,word[bg_height] |
xor ecx,ecx |
738,7 → 738,7 |
retn |
.color: |
mov edi,[bg_address] |
mov edi,[IMG_BACKGROUND] |
and edi,0x00FFFFFF |
call vm_mike_draw_rect.08 |
popad |
/kernel/branches/gfx_kernel/vmode/norm_15.inc |
---|
19,17 → 19,17 |
call get_cursor_rect |
mov ebp,[0x3010] |
movsx esi,word[ebp-0x3000+0] |
mov ebp,[TASK_BASE] |
movsx esi,word[ebp-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[ebp-0x3000+4] |
movsx esi,word[ebp-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[ebp-0x3000+0] |
; add ebx,[ebp-0x3000+4] |
; add ecx,[ebp-0x3000+0] |
; add edx,[ebp-0x3000+4] |
; add eax,[ebp-CURRENT_TASK+0] |
; add ebx,[ebp-CURRENT_TASK+4] |
; add ecx,[ebp-CURRENT_TASK+0] |
; add edx,[ebp-CURRENT_TASK+4] |
push eax |
mov eax,edi |
41,7 → 41,7 |
mov di,ax |
pop eax |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov ebp,[esi] |
or ebp,ebp |
62,14 → 62,14 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
81,7 → 81,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
134,7 → 134,7 |
dl.15.vert_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
158,14 → 158,14 |
.draw: |
@@: call is_intersect_vln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
179,7 → 179,7 |
; mov cx,[ebp] |
; not cx |
; .dr: mov [ebp],cx |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jle @b |
212,7 → 212,7 |
dl.15.horz_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
236,14 → 236,14 |
.draw: |
@@: call is_intersect_hln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,eax |
lea ebp,[ebp+ebx*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
300,13 → 300,13 |
begin |
pushad |
cli |
mov edx,[bytes_per_scanline] |
mov edx,[BytesPerScanLine] |
imul edx,ebx |
lea edx,[edx+eax*2] |
add edx,[lfb_address] |
add edx,[LFBAddress] |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
319,10 → 319,10 |
call get_cursor_rect |
call is_intersect_pt |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: push edx |
call [set_bank] |
pop edx |
376,10 → 376,10 |
pushad |
cli |
imul ebx,[bytes_per_scanline] |
imul ebx,[BytesPerScanLine] |
shl eax,1 |
add eax,ebx |
add eax,[lfb_address] |
add eax,[LFBAddress] |
push eax |
call [set_bank] |
pop eax |
428,19 → 428,19 |
push edi |
add ecx,eax |
add edx,ebx |
mov edi,[0x00003010] |
movsx esi,word[edi-0x3000+0] |
mov edi,[TASK_BASE] |
movsx esi,word[edi-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[edi-0x3000+4] |
movsx esi,word[edi-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[esi-0x3000+0] |
; add ebx,[esi-0x3000+4] |
; add ecx,[esi-0x3000+0] |
; add edx,[esi-0x3000+4] |
; add eax,[esi-CURRENT_TASK+0] |
; add ebx,[esi-CURRENT_TASK+4] |
; add ecx,[esi-CURRENT_TASK+0] |
; add edx,[esi-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
462,10 → 462,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: mov esi,ebx |
sub esi,[esp+4*4] |
imul esi,[esp+4*8] |
474,10 → 474,10 |
lea edi,[edi*3] |
add esi,edi |
add esi,ebp |
mov edi,[bytes_per_scanline] |
mov edi,[BytesPerScanLine] |
imul edi,ebx |
lea edi,[edi+eax*2] |
add edi,[lfb_address] |
add edi,[LFBAddress] |
.xxx: push eax esi edi eax |
@@: lodsd |
shr eax,3 |
498,7 → 498,7 |
jl @b |
pop eax edi esi eax |
add esi,[esp+4*8] |
add edi,[bytes_per_scanline] |
add edi,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
526,14 → 526,14 |
je .tiled |
mov eax,[bg_width] |
cmp eax,[screen_width] |
cmp eax,[ScreenWidth] |
jne @f |
mov eax,[bg_height] |
cmp eax,[screen_height] |
cmp eax,[ScreenHeight] |
je .tiled |
@@: |
imul eax,[bg_width],3 |
mov [bg_bytes_per_scanline],eax |
mov [bg_BytesPerScanLine],eax |
mov eax,[viewport.left] |
mov ebx,[viewport.top] |
548,7 → 548,7 |
cli |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
mov esi,[CLIP_RECTS+4] |
mov ebp,[esi] |
574,23 → 574,23 |
;jne .put |
;call [SF.draw_mouse_under] |
;mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
push eax edx |
mul [bg_width] |
div [screen_width] |
div dword[ScreenWidth] |
lea edi,[eax*3] |
mov eax,ebx |
mul [bg_height] |
div [screen_height] |
mul [bg_bytes_per_scanline] |
div dword[ScreenHeight] |
mul [bg_BytesPerScanLine] |
add edi,eax |
add edi,bg_address |
add edi,IMG_BACKGROUND |
mov eax,[edi] |
shr eax,3 |
shl ax,3 |
606,7 → 606,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
622,7 → 622,7 |
retn |
.tiled: |
mov eax,bg_address |
mov eax,IMG_BACKGROUND |
mov ebx,[bg_width-2] |
mov bx,word[bg_height] |
xor ecx,ecx |
631,19 → 631,19 |
pop eax |
rol ecx,16 |
add cx,word[bg_width] |
cmp cx,word[screen_width] |
cmp cx,word[ScreenWidth] |
jae @f |
rol ecx,16 |
jmp .lp1 |
@@: shr ecx,16 |
add ecx,[bg_height] |
cmp ecx,[screen_height] |
cmp ecx,[ScreenHeight] |
jb .lp1 |
popad |
retn |
.color: |
mov edi,[bg_address] |
mov edi,[IMG_BACKGROUND] |
and edi,0x00FFFFFF |
call vm_mike_draw_rect.15 |
popad |
/kernel/branches/gfx_kernel/vmode/norm_16.inc |
---|
19,17 → 19,17 |
call get_cursor_rect |
mov ebp,[0x3010] |
movsx esi,word[ebp-0x3000+0] |
mov ebp,[TASK_BASE] |
movsx esi,word[ebp-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[ebp-0x3000+4] |
movsx esi,word[ebp-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[ebp-0x3000+0] |
; add ebx,[ebp-0x3000+4] |
; add ecx,[ebp-0x3000+0] |
; add edx,[ebp-0x3000+4] |
; add eax,[ebp-CURRENT_TASK+0] |
; add ebx,[ebp-CURRENT_TASK+4] |
; add ecx,[ebp-CURRENT_TASK+0] |
; add edx,[ebp-CURRENT_TASK+4] |
push eax |
mov eax,edi |
41,7 → 41,7 |
mov di,ax |
pop eax |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov ebp,[esi] |
or ebp,ebp |
62,14 → 62,14 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
81,7 → 81,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
134,7 → 134,7 |
dl.16.vert_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
158,14 → 158,14 |
.draw: |
@@: call is_intersect_vln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
175,7 → 175,7 |
.dr: mov [ebp],cx |
pop ebp |
; mov [ebp],cx |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jle @b |
208,7 → 208,7 |
dl.16.horz_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
232,14 → 232,14 |
.draw: |
@@: call is_intersect_hln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,eax |
lea ebp,[ebp+ebx*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
292,13 → 292,13 |
begin |
pushad |
cli |
mov edx,[bytes_per_scanline] |
mov edx,[BytesPerScanLine] |
imul edx,ebx |
lea edx,[edx+eax*2] |
add edx,[lfb_address] |
add edx,[LFBAddress] |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
311,10 → 311,10 |
call get_cursor_rect |
call is_intersect_pt |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: push edx |
call [set_bank] |
pop edx |
371,10 → 371,10 |
pushad |
cli |
imul ebx,[bytes_per_scanline] |
imul ebx,[BytesPerScanLine] |
shl eax,1 |
add eax,ebx |
add eax,[lfb_address] |
add eax,[LFBAddress] |
push eax |
call [set_bank] |
pop eax |
423,19 → 423,19 |
push edi |
add ecx,eax |
add edx,ebx |
mov edi,[0x00003010] |
movsx esi,word[edi-0x3000+0] |
mov edi,[TASK_BASE] |
movsx esi,word[edi-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[edi-0x3000+4] |
movsx esi,word[edi-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[esi-0x3000+0] |
; add ebx,[esi-0x3000+4] |
; add ecx,[esi-0x3000+0] |
; add edx,[esi-0x3000+4] |
; add eax,[esi-CURRENT_TASK+0] |
; add ebx,[esi-CURRENT_TASK+4] |
; add ecx,[esi-CURRENT_TASK+0] |
; add edx,[esi-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
457,10 → 457,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: mov esi,ebx |
sub esi,[esp+4*4] |
imul esi,[esp+4*8] |
469,10 → 469,10 |
lea edi,[edi*3] |
add esi,edi |
add esi,ebp |
mov edi,[bytes_per_scanline] |
mov edi,[BytesPerScanLine] |
imul edi,ebx |
lea edi,[edi+eax*2] |
add edi,[lfb_address] |
add edi,[LFBAddress] |
.xxx: push eax esi edi eax |
@@: lodsd |
shr eax,3 |
493,7 → 493,7 |
jl @b |
pop eax edi esi eax |
add esi,[esp+4*8] |
add edi,[bytes_per_scanline] |
add edi,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
521,14 → 521,14 |
je .tiled |
mov eax,[bg_width] |
cmp eax,[screen_width] |
cmp eax,[ScreenWidth] |
jne @f |
mov eax,[bg_height] |
cmp eax,[screen_height] |
cmp eax,[ScreenHeight] |
je .tiled |
@@: |
imul eax,[bg_width],3 |
mov [bg_bytes_per_scanline],eax |
mov [bg_BytesPerScanLine],eax |
mov eax,[viewport.left] |
mov ebx,[viewport.top] |
543,7 → 543,7 |
cli |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
mov esi,[CLIP_RECTS+4] |
mov ebp,[esi] |
569,23 → 569,23 |
;jne .put |
;call [SF.draw_mouse_under] |
;mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*2] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
push eax edx |
mul [bg_width] |
div [screen_width] |
div dword[ScreenWidth] |
lea edi,[eax*3] |
mov eax,ebx |
mul [bg_height] |
div [screen_height] |
mul [bg_bytes_per_scanline] |
div dword[ScreenHeight] |
mul [bg_BytesPerScanLine] |
add edi,eax |
add edi,bg_address |
add edi,IMG_BACKGROUND |
mov eax,[edi] |
shr eax,3 |
shl ax,3 |
601,7 → 601,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
617,7 → 617,7 |
retn |
.tiled: |
mov eax,bg_address |
mov eax,IMG_BACKGROUND |
mov ebx,[bg_width-2] |
mov bx,word[bg_height] |
xor ecx,ecx |
626,19 → 626,19 |
pop eax |
rol ecx,16 |
add cx,word[bg_width] |
cmp cx,word[screen_width] |
cmp cx,word[ScreenWidth] |
jae @f |
rol ecx,16 |
jmp .lp1 |
@@: shr ecx,16 |
add ecx,[bg_height] |
cmp ecx,[screen_height] |
cmp ecx,[ScreenHeight] |
jb .lp1 |
popad |
retn |
.color: |
mov edi,[bg_address] |
mov edi,[IMG_BACKGROUND] |
and edi,0x00FFFFFF |
call vm_mike_draw_rect.16 |
popad |
/kernel/branches/gfx_kernel/vmode/norm_24.inc |
---|
19,19 → 19,19 |
call get_cursor_rect |
mov ebp,[0x3010] |
movsx esi,word[ebp-0x3000+0] |
mov ebp,[TASK_BASE] |
movsx esi,word[ebp-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[ebp-0x3000+4] |
movsx esi,word[ebp-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[ebp-0x3000+0] |
; add ebx,[ebp-0x3000+4] |
; add ecx,[ebp-0x3000+0] |
; add edx,[ebp-0x3000+4] |
; add eax,[ebp-CURRENT_TASK+0] |
; add ebx,[ebp-CURRENT_TASK+4] |
; add ecx,[ebp-CURRENT_TASK+0] |
; add edx,[ebp-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov ebp,[esi] |
or ebp,ebp |
52,17 → 52,17 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
push eax |
lea eax,[eax*3] |
add ebp,eax |
pop eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push eax |
mov eax,edi |
75,7 → 75,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
119,7 → 119,7 |
dl.24.vert_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
143,17 → 143,17 |
.draw: |
@@: call is_intersect_vln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
push eax |
lea eax,[eax*3] |
add ebp,eax |
pop eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: test ecx,0x01000000 |
jz .dr |
mov ecx,[ebp] |
163,7 → 163,7 |
ror ecx,8 |
mov [ebp+2],ch |
rol ecx,8 |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jle @b |
196,7 → 196,7 |
dl.24.horz_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
220,17 → 220,17 |
.draw: |
@@: call is_intersect_hln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,eax |
push eax |
lea eax,[ebx*3] |
add ebp,eax |
pop eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: test ecx,0x01000000 |
jz .dr |
mov ecx,[ebp] |
283,11 → 283,11 |
begin |
pushad |
cli |
mov edx,[bytes_per_scanline] |
mov edx,[BytesPerScanLine] |
imul edx,ebx |
add edx,eax ; lea esi,[eax*3] |
lea edx,[edx+eax*2] ; add edx,esi |
add edx,[lfb_address] |
add edx,[LFBAddress] |
test ecx,0x01000000 |
jz @f |
mov ecx,[edx] |
294,7 → 294,7 |
not ecx |
@@: test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
307,10 → 307,10 |
call get_cursor_rect |
call is_intersect_pt |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: mov [edx],cx |
shr ecx,16 |
mov [edx+2],cl |
345,10 → 345,10 |
begin |
pushad |
cli |
imul ebx,[bytes_per_scanline] |
imul ebx,[BytesPerScanLine] |
lea eax,[eax*3] |
add eax,ebx |
add eax,[lfb_address] |
add eax,[LFBAddress] |
mov eax,[eax] |
and eax,0x00FFFFFF |
mov [esp+4*6],eax |
388,19 → 388,19 |
push edi |
add ecx,eax |
add edx,ebx |
mov edi,[0x00003010] |
movsx esi,word[edi-0x3000+0] |
mov edi,[TASK_BASE] |
movsx esi,word[edi-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[edi-0x3000+4] |
movsx esi,word[edi-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[edi-0x3000+0] |
; add ebx,[edi-0x3000+4] |
; add ecx,[edi-0x3000+0] |
; add edx,[edi-0x3000+4] |
; add eax,[edi-CURRENT_TASK+0] |
; add ebx,[edi-CURRENT_TASK+4] |
; add ecx,[edi-CURRENT_TASK+0] |
; add edx,[edi-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
422,10 → 422,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: mov esi,ebx |
sub esi,[esp+4*4] |
imul esi,[esp+4*8] |
434,13 → 434,13 |
lea edi,[edi*3] |
add esi,edi |
add esi,ebp |
mov edi,[bytes_per_scanline] |
mov edi,[BytesPerScanLine] |
imul edi,ebx |
push eax |
lea eax,[eax*3] |
add edi,eax |
pop eax |
add edi,[lfb_address] |
add edi,[LFBAddress] |
.xxx: push eax esi edi eax |
@@: ;movsd |
;dec esi |
452,7 → 452,7 |
jl @b |
pop eax edi esi eax |
add esi,[esp+4*8] |
add edi,[bytes_per_scanline] |
add edi,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
480,14 → 480,14 |
je .tiled |
mov eax,[bg_width] |
cmp eax,[screen_width] |
cmp eax,[ScreenWidth] |
jne @f |
mov eax,[bg_height] |
cmp eax,[screen_height] |
cmp eax,[ScreenHeight] |
je .tiled |
@@: |
imul eax,[bg_width],3 |
mov [bg_bytes_per_scanline],eax |
mov [bg_BytesPerScanLine],eax |
mov eax,[viewport.left] |
mov ebx,[viewport.top] |
502,7 → 502,7 |
cli |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
mov esi,[CLIP_RECTS+4] |
mov ebp,[esi] |
528,26 → 528,26 |
;jne .put |
;call [SF.draw_mouse_under] |
;mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
push eax |
lea eax,[eax*3] |
add ebp,eax |
pop eax |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
push eax edx |
mul [bg_width] |
div [screen_width] |
div dword[ScreenWidth] |
lea edi,[eax*3] |
mov eax,ebx |
mul [bg_height] |
div [screen_height] |
mul [bg_bytes_per_scanline] |
div dword[ScreenHeight] |
mul [bg_BytesPerScanLine] |
add edi,eax |
add edi,bg_address |
add edi,IMG_BACKGROUND |
mov eax,[edi] |
mov [ebp],eax |
pop edx eax |
557,7 → 557,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
573,7 → 573,7 |
retn |
.tiled: |
mov eax,bg_address |
mov eax,IMG_BACKGROUND |
mov ebx,[bg_width-2] |
mov bx,word[bg_height] |
xor ecx,ecx |
582,19 → 582,19 |
pop eax |
rol ecx,16 |
add cx,word[bg_width] |
cmp cx,word[screen_width] |
cmp cx,word[ScreenWidth] |
jae @f |
rol ecx,16 |
jmp .lp1 |
@@: shr ecx,16 |
add ecx,[bg_height] |
cmp ecx,[screen_height] |
cmp ecx,[ScreenHeight] |
jb .lp1 |
popad |
retn |
.color: |
mov edi,[bg_address] |
mov edi,[IMG_BACKGROUND] |
and edi,0x00FFFFFF |
call vm_mike_draw_rect.24 |
popad |
/kernel/branches/gfx_kernel/vmode/norm_32.inc |
---|
19,19 → 19,19 |
call get_cursor_rect |
mov ebp,[0x3010] |
movsx esi,word[ebp-0x3000+0] |
mov ebp,[TASK_BASE] |
movsx esi,word[ebp-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[ebp-0x3000+4] |
movsx esi,word[ebp-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[ebp-0x3000+0] |
; add ebx,[ebp-0x3000+4] |
; add ecx,[ebp-0x3000+0] |
; add edx,[ebp-0x3000+4] |
; add eax,[ebp-CURRENT_TASK+0] |
; add ebx,[ebp-CURRENT_TASK+4] |
; add ecx,[ebp-CURRENT_TASK+0] |
; add edx,[ebp-CURRENT_TASK+4] |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov ebp,[esi] |
or ebp,ebp |
52,14 → 52,14 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*4] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
71,7 → 71,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
115,7 → 115,7 |
dl.32.vert_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
139,14 → 139,14 |
.draw: |
@@: call is_intersect_vln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*4] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
162,7 → 162,7 |
; not ecx |
; or ecx,0x01000000 |
; .dr: mov [ebp],ecx |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jle @b |
195,7 → 195,7 |
dl.32.horz_line: |
test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
219,14 → 219,14 |
.draw: |
@@: call is_intersect_hln |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
mov byte[MOUSE_VISIBLE],0 |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,eax |
lea ebp,[ebp+ebx*4] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
@@: push ebp |
call [set_bank] |
test ecx,0x01000000 |
285,10 → 285,10 |
begin |
pushad |
cli |
mov edx,[bytes_per_scanline] |
mov edx,[BytesPerScanLine] |
imul edx,ebx |
lea edx,[edx+eax*4] |
add edx,[lfb_address] |
add edx,[LFBAddress] |
; test ecx,0x01000000 |
; jz @f |
; mov ecx,[edx] |
295,7 → 295,7 |
; not ecx |
@@: test edi,1 |
jnz .forced |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
308,10 → 308,10 |
call get_cursor_rect |
call is_intersect_pt |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: push edx |
call [set_bank] |
pop edx |
354,10 → 354,10 |
begin |
pushad |
cli |
imul ebx,[bytes_per_scanline] |
imul ebx,[BytesPerScanLine] |
shl eax,2 |
add eax,ebx |
add eax,[lfb_address] |
add eax,[LFBAddress] |
push eax |
call [set_bank] |
pop eax |
400,17 → 400,17 |
push edi |
add ecx,eax |
add edx,ebx |
mov edi,[0x00003010] |
movsx esi,word[edi-0x3000+0] |
mov edi,[TASK_BASE] |
movsx esi,word[edi-CURRENT_TASK+0] |
add eax,esi |
add ecx,esi |
movsx esi,word[edi-0x3000+4] |
movsx esi,word[edi-CURRENT_TASK+4] |
add ebx,esi |
add edx,esi |
; add eax,[esi-0x3000+0] |
; add ebx,[esi-0x3000+4] |
; add ecx,[esi-0x3000+0] |
; add edx,[esi-0x3000+4] |
; add eax,[esi-CURRENT_TASK+0] |
; add ebx,[esi-CURRENT_TASK+4] |
; add ecx,[esi-CURRENT_TASK+0] |
; add edx,[esi-CURRENT_TASK+4] |
; cmp eax,640 |
; jb @f |
417,7 → 417,7 |
; SHFLOW '%x %x %x %x',eax,ebx,ecx,edx |
; @@: |
mov esi,[0x00003000] |
mov esi,[CURRENT_TASK] |
mov esi,[CLIP_RECTS+esi*4] |
mov edi,[esi] |
or edi,edi |
439,10 → 439,10 |
mov edx,[rr.bottom] |
@@: call is_intersect_rc |
jc .put |
cmp [mouse_invisible],0 |
jne .put |
cmp byte[MOUSE_VISIBLE],0 |
je .put |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
.put: mov esi,ebx |
sub esi,[esp+4*4] |
imul esi,[esp+4*8] |
451,10 → 451,10 |
lea edi,[edi*3] |
add esi,edi |
add esi,ebp |
mov edi,[bytes_per_scanline] |
mov edi,[BytesPerScanLine] |
imul edi,ebx |
lea edi,[edi+eax*4] |
add edi,[lfb_address] |
add edi,[LFBAddress] |
.xxx: push eax esi edi eax |
@@: lodsd |
470,7 → 470,7 |
jl @b |
pop eax edi esi eax |
add esi,[esp+4*8] |
add edi,[bytes_per_scanline] |
add edi,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
498,14 → 498,14 |
je .tiled |
mov eax,[bg_width] |
cmp eax,[screen_width] |
cmp eax,[ScreenWidth] |
jne @f |
mov eax,[bg_height] |
cmp eax,[screen_height] |
cmp eax,[ScreenHeight] |
je .tiled |
@@: |
imul eax,[bg_width],3 |
mov [bg_bytes_per_scanline],eax |
mov [bg_BytesPerScanLine],eax |
mov eax,[viewport.left] |
mov ebx,[viewport.top] |
520,7 → 520,7 |
cli |
call [SF.draw_mouse_under] |
mov [mouse_invisible],1 |
mov byte[MOUSE_VISIBLE],0 |
mov esi,[CLIP_RECTS+4] |
mov ebp,[esi] |
546,23 → 546,23 |
;jne .put |
;call [SF.draw_mouse_under] |
;mov [mouse_invisible],1 |
.put: mov ebp,[bytes_per_scanline] |
.put: mov ebp,[BytesPerScanLine] |
imul ebp,ebx |
lea ebp,[ebp+eax*4] |
add ebp,[lfb_address] |
add ebp,[LFBAddress] |
.xxx: push eax ebp |
@@: push ebp |
call [set_bank] |
push eax edx |
mul [bg_width] |
div [screen_width] |
div dword[ScreenWidth] |
lea edi,[eax*3] |
mov eax,ebx |
mul [bg_height] |
div [screen_height] |
mul [bg_bytes_per_scanline] |
div dword[ScreenHeight] |
mul [bg_BytesPerScanLine] |
add edi,eax |
add edi,bg_address |
add edi,IMG_BACKGROUND |
mov eax,[edi] |
mov [ebp],eax |
pop edx eax |
572,7 → 572,7 |
cmp eax,ecx |
jl @b |
pop ebp eax |
add ebp,[bytes_per_scanline] |
add ebp,[BytesPerScanLine] |
inc ebx |
cmp ebx,edx |
jl .xxx |
588,7 → 588,7 |
retn |
.tiled: |
mov eax,bg_address |
mov eax,IMG_BACKGROUND |
mov ebx,[bg_width-2] |
mov bx,word[bg_height] |
xor ecx,ecx |
597,19 → 597,19 |
pop eax |
rol ecx,16 |
add cx,word[bg_width] |
cmp cx,word[screen_width] |
cmp cx,word[ScreenWidth] |
jae @f |
rol ecx,16 |
jmp .lp1 |
@@: shr ecx,16 |
add ecx,[bg_height] |
cmp ecx,[screen_height] |
cmp ecx,[ScreenHeight] |
jb .lp1 |
popad |
retn |
.color: |
mov edi,[bg_address] |
mov edi,[IMG_BACKGROUND] |
and edi,0x00FFFFFF |
call vm_mike_draw_rect.32 |
popad |
/kernel/branches/gfx_kernel/vmode/normal.asm |
---|
17,6 → 17,8 |
;----------------------------------------------------------------------------- |
include '../const.inc' ; kernel defines |
include 'normal.inc' |
include 'clipping.asm' |
55,25 → 57,17 |
;----------------------------------------------------------------------------- |
CLIP_RECTS = 0x00720000 ; 0x00780000 |
bg_address = 0x300000 |
;label bg_bytes_per_scanline dword at 0x600000-16;0x460000-16 |
;label bg_BytesPerScanLine dword at 0x600000-16;0x460000-16 |
;label bg_type dword at 0x600000-12;0x460000-12 |
;label bg_width dword at 0x600000-8;0x460000-8 |
;label bg_height dword at 0x600000-4;0x460000-4 |
label bg_bytes_per_scanline dword at 0x460000-16 |
label bg_BytesPerScanLine dword at 0x460000-16 |
label bg_type dword at 0x460000-12 |
label bg_width dword at 0x460000-8 |
label bg_height dword at 0x460000-4 |
label lfb_address dword at 0x0000FE80 |
label mouse_invisible dword at 0x0000F204 |
label screen_width dword at 0x0000FE00 |
label screen_height dword at 0x0000FE04 |
label bytes_per_scanline dword at 0x0000FE08 |
BGT_TILE = 1 |
BGT_STRETCH = 2 |
100,24 → 94,24 |
cld |
rep movsd |
; push dword[0x00003000] |
; mov dword[0x00003000],1 |
; push dword[CURRENT_TASK] |
; mov dword[CURRENT_TASK],1 |
; call [SF.disable_mouse] |
; pop dword[0x00003000] |
; pop dword[CURRENT_TASK] |
mov [viewport.left],0 |
mov [viewport.top],0 |
m2m [viewport.right],[0x0000FE00] |
m2m [viewport.bottom],[0x0000FE04] |
m2m [viewport.right],[ScreenWidth] |
m2m [viewport.bottom],[ScreenHeight] |
movzx eax,byte[0xE035] |
cmp byte[0xE034],'2' |
movzx eax,byte[GFX_CARD_VENDOR] |
cmp byte[VESA_VER_MAJOR],'2' |
jb @f |
mov al,0 |
@@: mov eax,[setbnk+eax*4] |
mov [set_bank],eax |
mov al,[0xFBF1] |
mov al,[ScreenBPP] |
cmp al,32 |
jne @f |
221,6 → 215,9 |
mov [GF.calculatescreen],vm_mike_calculatescreen |
mov [GF.setscreen],vm_mike_setscreen |
;! mov [GF.disable_mouse],vm_dummy |
;! mov [GF.draw_pointer],vm_dummy |
inc [call_cnt] |
xor eax,eax |
.exit.3: |
231,6 → 228,11 |
retn |
endf |
func vm_dummy |
begin |
ret |
endf |
func vm_mike_calculatescreen |
begin |
; call [SF.calculatescreen] |
237,14 → 239,14 |
.direct: |
pushad |
cli |
movzx ecx,word[0x00003004] ; number of processes |
movzx ecx,word[TASK_COUNT] ; number of processes |
lea edi,[CLIP_RECTS+ecx*4+4] |
push dword[0x00003000] |
push dword[CURRENT_TASK] |
xor eax,eax |
.next_window: |
inc eax |
push ecx ebx eax edi |
mov [0x00003000],ax |
mov [CURRENT_TASK],ax |
call calc_clipping_rects |
pop edi eax ebx |
mov [CLIP_RECTS+eax*4],edi |
254,7 → 256,7 |
rep movsd |
pop ecx |
loop .next_window |
pop dword[0x00003000] |
pop dword[CURRENT_TASK] |
sti |
popad |
ret |
350,11 → 352,11 |
func get_cursor_rect |
begin |
push eax |
movsx eax,word[0x0000FB0A] |
movsx eax,word[MOUSE_X] |
mov [tr.left],eax |
add eax,31 |
mov [tr.right],eax |
movsx eax,word[0x0000FB0C] |
movsx eax,word[MOUSE_Y] |
mov [tr.top],eax |
add eax,31 |
mov [tr.bottom],eax |
436,9 → 438,9 |
mov ebp,eax |
shr eax,16 |
sub al,0x0A |
cmp al,[0xfff2] |
cmp al,[BANK_RW] |
je .exit |
mov [0xfff2],al |
mov [BANK_RW],al |
mov dx,3CEh |
mov ah,al ; Save value for later use |
457,7 → 459,7 |
.exit: |
and ebp,0x0000FFFF |
add ebp,0x000A0000 |
add ebp,VGABasePtr |
pop edx eax |
sti |
ret |
474,9 → 476,9 |
mov ebp,eax |
shr eax,16 |
sub al,0x0A |
cmp al,[0xfff2] |
cmp al,[BANK_RW] |
je .exit |
mov [0xfff2],al |
mov [BANK_RW],al |
mov cl,al |
mov dx,0x3D4 |
537,7 → 539,7 |
.exit: |
and ebp,0x0000FFFF |
add ebp,0x000A0000 |
add ebp,VGABasePtr |
pop ecx edx eax |
sti |
ret |
553,9 → 555,9 |
mov ebp,eax |
shr eax,16 |
sub al,0x0A |
cmp al,[0xfff2] |
cmp al,[BANK_RW] |
je .exit |
mov [0xfff2],al |
mov [BANK_RW],al |
mov ah,al |
; grrrr...mode-set locked the S3 registers, so unlock them again |
584,7 → 586,7 |
.exit: |
and ebp,0x0000FFFF |
add ebp,0x000A0000 |
add ebp,VGABasePtr |
pop edx eax |
sti |
ret |
599,9 → 601,9 |
mov ebp,eax |
shr eax,16 |
sub al,0x0A |
cmp al,[0xfff2] |
cmp al,[BANK_RW] |
je .exit |
mov [0xfff2],al |
mov [BANK_RW],al |
mov ah,al |
mov dx,0x03D4 |
626,7 → 628,7 |
.exit: |
and ebp,0x0000FFFF |
add ebp,0x000A0000 |
add ebp,VGABasePtr |
pop edx eax |
sti |
ret |
/kernel/branches/gfx_kernel/vmode/vmode.asm |
---|
801,10 → 801,6 |
;-[ mike.dld ]- begin --------------- |
align 4 |
x_res fix 0x0000FE00 ; dd ? |
y_res fix 0x0000FE04 ; dd ? |
cnt dd ? |
align 16 |
tr RECT |