forked from KolibriOS/kolibrios
gfx-revertion bugs liced
git-svn-id: svn://kolibrios.org@1929 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7413c9cd9d
commit
883ade9e49
@ -206,8 +206,8 @@ FDD_BUFF equ (OS_BASE+0x000D000)
|
|||||||
;unused ? only one reference
|
;unused ? only one reference
|
||||||
;ENABLE_TASKSWITCH equ (OS_BASE+0x000E000)
|
;ENABLE_TASKSWITCH equ (OS_BASE+0x000E000)
|
||||||
|
|
||||||
;PUTPIXEL equ (OS_BASE+0x000E020)
|
PUTPIXEL equ (OS_BASE+0x000E020)
|
||||||
;GETPIXEL equ (OS_BASE+0x000E024)
|
GETPIXEL equ (OS_BASE+0x000E024)
|
||||||
|
|
||||||
;unused ? only one reference
|
;unused ? only one reference
|
||||||
; BANK_SWITCH equ (OS_BASE+0x000E030) ; VESA 1.2 - not used
|
; BANK_SWITCH equ (OS_BASE+0x000E030) ; VESA 1.2 - not used
|
||||||
|
@ -333,8 +333,8 @@ img_screen_x rd 1
|
|||||||
img_screen_y rd 1
|
img_screen_y rd 1
|
||||||
|
|
||||||
align 64
|
align 64
|
||||||
_WinMapWidth rd 1
|
;_WinMapWidth rd 1
|
||||||
_WinMapHeight rd 1
|
;_WinMapHeight rd 1
|
||||||
_WinMapAddress rd 1
|
_WinMapAddress rd 1
|
||||||
_WinMapSize rd 1
|
_WinMapSize rd 1
|
||||||
|
|
||||||
@ -413,9 +413,9 @@ MouseTickCounter rd 1
|
|||||||
|
|
||||||
;* end code - Mario79
|
;* end code - Mario79
|
||||||
|
|
||||||
;img_background rd 1
|
img_background rd 1
|
||||||
;mem_BACKGROUND rd 1
|
mem_BACKGROUND rd 1
|
||||||
;static_background_data rd 1
|
static_background_data rd 1
|
||||||
|
|
||||||
cache_ide0:
|
cache_ide0:
|
||||||
cache_ide0_pointer rd 1
|
cache_ide0_pointer rd 1
|
||||||
|
@ -71,14 +71,14 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
|||||||
shr dl, 1
|
shr dl, 1
|
||||||
jz .pixloop1end
|
jz .pixloop1end
|
||||||
jnc .nopix
|
jnc .nopix
|
||||||
call _putpixel
|
call [putpixel]
|
||||||
jmp .pixloop1cont
|
jmp .pixloop1cont
|
||||||
.nopix:
|
.nopix:
|
||||||
test ecx, 0x40000000
|
test ecx, 0x40000000
|
||||||
jz .pixloop1cont
|
jz .pixloop1cont
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [esp+4+20h+20h] ; original eax?
|
mov ecx, [esp+4+20h+20h] ; original eax?
|
||||||
call _putpixel
|
call [putpixel]
|
||||||
pop ecx
|
pop ecx
|
||||||
.pixloop1cont:
|
.pixloop1cont:
|
||||||
inc eax
|
inc eax
|
||||||
@ -103,14 +103,14 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
|||||||
.pixloop2:
|
.pixloop2:
|
||||||
shr dl, 1
|
shr dl, 1
|
||||||
jnc .nopix2
|
jnc .nopix2
|
||||||
call _putpixel
|
call [putpixel]
|
||||||
jmp .pixloop2cont
|
jmp .pixloop2cont
|
||||||
.nopix2:
|
.nopix2:
|
||||||
test ecx, 0x40000000
|
test ecx, 0x40000000
|
||||||
jz .pixloop2cont
|
jz .pixloop2cont
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [esp+12+20h+20h]
|
mov ecx, [esp+12+20h+20h]
|
||||||
call _putpixel
|
call [putpixel]
|
||||||
pop ecx
|
pop ecx
|
||||||
.pixloop2cont:
|
.pixloop2cont:
|
||||||
inc eax
|
inc eax
|
||||||
|
@ -378,12 +378,10 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
mov eax, [mouse.state.pos.x]
|
mov eax, [mouse.state.pos.x]
|
||||||
sub eax, [mouse.active_sys_window.delta.x]
|
sub eax, [mouse.active_sys_window.delta.x]
|
||||||
and al, 0xFC ; <<<<<<<<<<<<<<<<<<<
|
|
||||||
mov [mouse.active_sys_window.new_box.left], eax
|
mov [mouse.active_sys_window.new_box.left], eax
|
||||||
mov eax, [mouse.state.pos.y]
|
mov eax, [mouse.state.pos.y]
|
||||||
sub eax, [mouse.active_sys_window.delta.y]
|
sub eax, [mouse.active_sys_window.delta.y]
|
||||||
and al, 0xFE ; <<<<<<<<<<<<<<<<<<<
|
mov [mouse.active_sys_window.new_box.top], eax
|
||||||
mov [mouse.active_sys_window.new_box.top], eax
|
|
||||||
|
|
||||||
mov eax, [mouse.active_sys_window.new_box.left]
|
mov eax, [mouse.active_sys_window.new_box.left]
|
||||||
or eax, eax
|
or eax, eax
|
||||||
@ -413,7 +411,6 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
mov eax, [mouse.state.pos.x]
|
mov eax, [mouse.state.pos.x]
|
||||||
sub eax, [mouse.active_sys_window.delta.x]
|
sub eax, [mouse.active_sys_window.delta.x]
|
||||||
and al, 0xFC ; <<<<<<<<<<<<<<<<<<<
|
|
||||||
mov [mouse.active_sys_window.new_box.left], eax
|
mov [mouse.active_sys_window.new_box.left], eax
|
||||||
sub eax, [mouse.active_sys_window.old_box.left]
|
sub eax, [mouse.active_sys_window.old_box.left]
|
||||||
sub [mouse.active_sys_window.new_box.width], eax
|
sub [mouse.active_sys_window.new_box.width], eax
|
||||||
@ -437,7 +434,6 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
mov eax, [mouse.state.pos.y]
|
mov eax, [mouse.state.pos.y]
|
||||||
add eax, [mouse.active_sys_window.delta.y]
|
add eax, [mouse.active_sys_window.delta.y]
|
||||||
sub eax, [mouse.active_sys_window.old_box.top]
|
sub eax, [mouse.active_sys_window.old_box.top]
|
||||||
and al, 0xFC ; <<<<<<<<<<<<<<<<<<<
|
|
||||||
mov [mouse.active_sys_window.new_box.height], eax
|
mov [mouse.active_sys_window.new_box.height], eax
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
@ -470,7 +466,6 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
mov eax, [mouse.state.pos.x]
|
mov eax, [mouse.state.pos.x]
|
||||||
add eax, [mouse.active_sys_window.delta.x]
|
add eax, [mouse.active_sys_window.delta.x]
|
||||||
sub eax, [mouse.active_sys_window.old_box.left]
|
sub eax, [mouse.active_sys_window.old_box.left]
|
||||||
and al, 0xFC ; <<<<<<<<<<<<<<<<<<<
|
|
||||||
mov [mouse.active_sys_window.new_box.width], eax
|
mov [mouse.active_sys_window.new_box.width], eax
|
||||||
|
|
||||||
mov eax, [mouse.active_sys_window.new_box.width]
|
mov eax, [mouse.active_sys_window.new_box.width]
|
||||||
@ -518,13 +513,11 @@ mouse._.find_sys_window_under_cursor: ;////////////////////////////////////////
|
|||||||
;< esi = process slot
|
;< esi = process slot
|
||||||
;< edi = pointer to WDATA struct
|
;< edi = pointer to WDATA struct
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
mov esi, [mouse.state.pos.y]
|
mov esi, [Screen_Max_X]
|
||||||
mov edi, [mouse.state.pos.x]
|
inc esi
|
||||||
shr esi, 1
|
imul esi, [mouse.state.pos.y]
|
||||||
shr edi, 2
|
add esi, [_WinMapAddress]
|
||||||
imul esi, [_WinMapWidth]
|
add esi, [mouse.state.pos.x]
|
||||||
add edi, [_WinMapAddress]
|
|
||||||
add esi, edi
|
|
||||||
movzx esi, byte[esi]
|
movzx esi, byte[esi]
|
||||||
mov edi, esi
|
mov edi, esi
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
|
@ -12,7 +12,7 @@ $Revision$
|
|||||||
;///// public functions ///////////////////////////////////////////////////////
|
;///// public functions ///////////////////////////////////////////////////////
|
||||||
;==============================================================================
|
;==============================================================================
|
||||||
|
|
||||||
window.BORDER_SIZE = 4
|
window.BORDER_SIZE = 5
|
||||||
|
|
||||||
macro FuncTable name, table_name, [label]
|
macro FuncTable name, table_name, [label]
|
||||||
{
|
{
|
||||||
@ -328,19 +328,15 @@ syscall_move_window: ;///// system function 67 ////////////////////////////////
|
|||||||
cmp ebx, -1
|
cmp ebx, -1
|
||||||
jne @f
|
jne @f
|
||||||
mov ebx, [edi + WDATA.box.left]
|
mov ebx, [edi + WDATA.box.left]
|
||||||
and bl, 0xFC
|
|
||||||
@@: cmp ecx, -1
|
@@: cmp ecx, -1
|
||||||
jne @f
|
jne @f
|
||||||
mov ecx, [edi + WDATA.box.top]
|
mov ecx, [edi + WDATA.box.top]
|
||||||
and cl, 0xFE
|
|
||||||
@@: cmp edx, -1
|
@@: cmp edx, -1
|
||||||
jne @f
|
jne @f
|
||||||
mov edx, [edi + WDATA.box.width]
|
mov edx, [edi + WDATA.box.width]
|
||||||
; and dl, 0xFC
|
|
||||||
@@: cmp esi, -1
|
@@: cmp esi, -1
|
||||||
jne @f
|
jne @f
|
||||||
mov esi, [edi + WDATA.box.height]
|
mov esi, [edi + WDATA.box.height]
|
||||||
; and esi, 0xFFFFFFFE
|
|
||||||
|
|
||||||
@@: push esi edx ecx ebx
|
@@: push esi edx ecx ebx
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
@ -515,10 +511,8 @@ repos_windows: ;///////////////////////////////////////////////////////////////
|
|||||||
mov eax, [edi + WDATA.box.width]
|
mov eax, [edi + WDATA.box.width]
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
jle @f
|
jle @f
|
||||||
; and bl, 0xFC ; <<<<<<<
|
|
||||||
mov [edi + WDATA.box.width], ebx
|
mov [edi + WDATA.box.width], ebx
|
||||||
@@: sub ebx, [edi + WDATA.box.width]
|
@@: sub ebx, [edi + WDATA.box.width]
|
||||||
; and bl, 0xFC ; <<<<<<<
|
|
||||||
mov [edi + WDATA.box.left], ebx
|
mov [edi + WDATA.box.left], ebx
|
||||||
|
|
||||||
.fix_vertical:
|
.fix_vertical:
|
||||||
@ -530,10 +524,8 @@ repos_windows: ;///////////////////////////////////////////////////////////////
|
|||||||
mov eax, [edi + WDATA.box.height]
|
mov eax, [edi + WDATA.box.height]
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
jle @f
|
jle @f
|
||||||
; and bl, 0xFE ; <<<<<<<
|
|
||||||
mov [edi + WDATA.box.height], ebx
|
mov [edi + WDATA.box.height], ebx
|
||||||
@@: sub ebx, [edi + WDATA.box.height]
|
@@: sub ebx, [edi + WDATA.box.height]
|
||||||
; and bl, 0xFE ; <<<<<<<
|
|
||||||
mov [edi + WDATA.box.top], ebx
|
mov [edi + WDATA.box.top], ebx
|
||||||
jmp .fix_client_box
|
jmp .fix_client_box
|
||||||
|
|
||||||
@ -556,7 +548,7 @@ repos_windows: ;///////////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
add edi, WDATA.sizeof
|
add edi, WDATA.sizeof
|
||||||
dec ecx
|
dec ecx
|
||||||
jne .next_window ; <<<<<<<<<<<
|
jne .next_window
|
||||||
|
|
||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
@ -565,23 +557,8 @@ align 4
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
sys_window_mouse: ;////////////////////////////////////////////////////////////
|
sys_window_mouse: ;////////////////////////////////////////////////////////////
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;? <description>
|
;? <description> (not used)
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; NOTE: commented out since doesn't provide necessary functionality
|
|
||||||
; anyway, to be reworked
|
|
||||||
; push eax
|
|
||||||
;
|
|
||||||
; mov eax, [timer_ticks]
|
|
||||||
; cmp [new_window_starting], eax
|
|
||||||
; jb .exit
|
|
||||||
;
|
|
||||||
; mov byte[MOUSE_BACKGROUND], 0
|
|
||||||
; mov byte[DONT_DRAW_MOUSE], 0
|
|
||||||
;
|
|
||||||
; mov [new_window_starting], eax
|
|
||||||
;
|
|
||||||
; .exit:
|
|
||||||
; pop eax
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
@ -666,7 +643,6 @@ drawwindow_I_caption: ;////////////////////////////////////////////////////////
|
|||||||
add ebx, edx
|
add ebx, edx
|
||||||
mov eax, [esi + WDATA.box.left]
|
mov eax, [esi + WDATA.box.left]
|
||||||
inc eax
|
inc eax
|
||||||
|
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
add eax, [esi + WDATA.box.left]
|
add eax, [esi + WDATA.box.left]
|
||||||
add eax, [esi + WDATA.box.width]
|
add eax, [esi + WDATA.box.width]
|
||||||
@ -1209,11 +1185,6 @@ iglobal
|
|||||||
5, ? ;type 4 {set by skin}
|
5, ? ;type 4 {set by skin}
|
||||||
endg
|
endg
|
||||||
|
|
||||||
;uglobal
|
|
||||||
; NOTE: commented out since doesn't provide necessary functionality anyway,
|
|
||||||
; to be reworked
|
|
||||||
; new_window_starting dd ?
|
|
||||||
;endg
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -1444,21 +1415,13 @@ window._.sys_set_window: ;/////////////////////////////////////////////////////
|
|||||||
jnz .set_client_box
|
jnz .set_client_box
|
||||||
or [edi + WDATA.fl_wdrawn], 1
|
or [edi + WDATA.fl_wdrawn], 1
|
||||||
|
|
||||||
; NOTE: commented out since doesn't provide necessary functionality
|
; performing initial window definition
|
||||||
; anyway, to be reworked
|
|
||||||
; mov eax, [timer_ticks] ; [0xfdf0]
|
|
||||||
; add eax, 100
|
|
||||||
; mov [new_window_starting], eax
|
|
||||||
|
|
||||||
; no it wasn't, performing initial window definition
|
|
||||||
movzx eax, bx
|
movzx eax, bx
|
||||||
mov [edi + WDATA.box.width], eax
|
mov [edi + WDATA.box.width], eax
|
||||||
movzx eax, cx
|
movzx eax, cx
|
||||||
mov [edi + WDATA.box.height], eax
|
mov [edi + WDATA.box.height], eax
|
||||||
sar ebx, 16
|
sar ebx, 16
|
||||||
; and bl, 0xFC ; <<<<<<<<
|
|
||||||
sar ecx, 16
|
sar ecx, 16
|
||||||
; and cl, 0xFE ; <<<<<<<<
|
|
||||||
mov [edi + WDATA.box.left], ebx
|
mov [edi + WDATA.box.left], ebx
|
||||||
mov [edi + WDATA.box.top], ecx
|
mov [edi + WDATA.box.top], ecx
|
||||||
|
|
||||||
@ -1642,15 +1605,6 @@ window._.set_screen: ;/////////////////////////////////////////////////////////
|
|||||||
;> edx = bottom
|
;> edx = bottom
|
||||||
;> esi = process number
|
;> esi = process number
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
virtual at esp
|
|
||||||
ff_x dd ?
|
|
||||||
ff_y dd ?
|
|
||||||
ff_width dd ?
|
|
||||||
ff_xsz dd ?
|
|
||||||
ff_ysz dd ?
|
|
||||||
ff_map dd ?
|
|
||||||
ff_scale dd ?
|
|
||||||
end virtual
|
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
@ -1675,144 +1629,40 @@ end virtual
|
|||||||
sub edx, ebx
|
sub edx, ebx
|
||||||
inc ecx
|
inc ecx
|
||||||
inc edx
|
inc edx
|
||||||
shr ecx, 2 ; 1 tile = 4 pix
|
|
||||||
shr edx, 1 ; 1 tile = 2 lines
|
|
||||||
|
|
||||||
; get WinMap start
|
; get WinMap start
|
||||||
push esi
|
push esi
|
||||||
mov edi, [_WinMapWidth]
|
mov edi, [Screen_Max_X]
|
||||||
mov esi, edi
|
mov esi, edi
|
||||||
shr ebx, 1
|
|
||||||
imul edi, ebx
|
imul edi, ebx
|
||||||
shr eax, 2
|
|
||||||
add edi, eax
|
add edi, eax
|
||||||
add edi, [_WinMapAddress]
|
add edi, [_WinMapAddress]
|
||||||
pop eax ; al = process#
|
pop eax ; al = process#
|
||||||
; mov ah, al
|
mov ah, al
|
||||||
; push ax
|
push ax
|
||||||
; shl eax, 16
|
shl eax, 16
|
||||||
; pop ax ; eax = 4 dup PROCESS_NUM
|
pop ax ; eax = 4 dup PROCESS_NUM
|
||||||
|
|
||||||
sub esi, ecx ; map line increment (bytes)
|
|
||||||
mov ebx, ecx ; map line width
|
|
||||||
.next_line:
|
.next_line:
|
||||||
; shr ecx, 2 ; 1dword = 4 tiles
|
push ecx
|
||||||
; rep stosd ; filling the screen map
|
shr ecx, 2
|
||||||
; mov ecx, ebx
|
rep stosd ; filling the screen map
|
||||||
; and ecx, 3 ; 0 to 3 tiles remaining
|
mov ecx,[esp]
|
||||||
|
and ecx, 3
|
||||||
rep stosb
|
rep stosb
|
||||||
mov ecx, ebx
|
pop ecx
|
||||||
add edi, esi
|
add edi, esi
|
||||||
|
sub edi, ecx
|
||||||
dec edx
|
dec edx
|
||||||
jnz .next_line
|
jnz .next_line
|
||||||
jmp .exit
|
; jmp .exit
|
||||||
|
|
||||||
.shaped_window:
|
.shaped_window:
|
||||||
; for (y=0; y <= y_size; y++)
|
; (not supported any more)
|
||||||
; for (x=0; x <= x_size; x++)
|
|
||||||
; if (shape[coord(x,y,scale)]==1)
|
|
||||||
; set_pixel(x, y, process_number);
|
|
||||||
|
|
||||||
sub ecx, eax
|
|
||||||
sub edx, ebx
|
|
||||||
inc ecx
|
|
||||||
inc edx
|
|
||||||
|
|
||||||
push [edi + APPDATA.wnd_shape_scale] ; push scale first -> for loop
|
|
||||||
|
|
||||||
push ebx
|
|
||||||
push eax
|
|
||||||
mov ebp, eax
|
|
||||||
shr ebp, 2
|
|
||||||
add ebp, [_WinMapAddress]
|
|
||||||
mov eax, [_WinMapWidth]
|
|
||||||
shr ebx, 1
|
|
||||||
imul eax, ebx
|
|
||||||
add ebp, eax ; ebp = map origin
|
|
||||||
|
|
||||||
mov edi, [edi + APPDATA.wnd_shape]
|
|
||||||
pop eax
|
|
||||||
pop ebx
|
|
||||||
|
|
||||||
push ebp ; for loop - screen map origin
|
|
||||||
|
|
||||||
; eax = x_start
|
|
||||||
; ebx = y_start
|
|
||||||
; ecx = x_size
|
|
||||||
; edx = y_size
|
|
||||||
; esi = process_number
|
|
||||||
; edi = &shape
|
|
||||||
; ebp = [ff_map]
|
|
||||||
; [scale]
|
|
||||||
|
|
||||||
push edx ecx ; for loop - x,y size
|
|
||||||
mov ecx, esi
|
|
||||||
shl ecx, 5
|
|
||||||
mov edx, [window_data + ecx + WDATA.box.top]
|
|
||||||
push [window_data + ecx + WDATA.box.width] ; for loop - width
|
|
||||||
mov ecx, [window_data + ecx + WDATA.box.left]
|
|
||||||
sub ebx, edx
|
|
||||||
sub eax, ecx
|
|
||||||
push ebx eax ; for loop - x,y
|
|
||||||
|
|
||||||
add [ff_xsz], eax
|
|
||||||
add [ff_ysz], ebx
|
|
||||||
|
|
||||||
mov ebx, [ff_y]
|
|
||||||
|
|
||||||
.ff_new_y:
|
|
||||||
mov edx, [ff_x]
|
|
||||||
|
|
||||||
.ff_new_x:
|
|
||||||
; -- body --
|
|
||||||
mov ecx, [ff_scale]
|
|
||||||
mov eax, [ff_width]
|
|
||||||
inc eax
|
|
||||||
shr eax, cl
|
|
||||||
push ebx edx
|
|
||||||
shr ebx, cl
|
|
||||||
shr edx, cl
|
|
||||||
imul eax, ebx
|
|
||||||
add eax, edx
|
|
||||||
pop edx ebx
|
|
||||||
add eax, edi
|
|
||||||
call .read_byte ; al= shaped window pix-mask at a given point
|
|
||||||
test al,al
|
|
||||||
jz @f
|
|
||||||
mov eax, esi
|
|
||||||
mov [ebp], al ; a tile belongs to the window if the 1st pixel's mask = 1
|
|
||||||
; -- end body --
|
|
||||||
@@:
|
|
||||||
add edx, 4
|
|
||||||
inc ebp
|
|
||||||
cmp edx, [ff_xsz]
|
|
||||||
jb .ff_new_x
|
|
||||||
|
|
||||||
inc ebx
|
|
||||||
inc ebx
|
|
||||||
cmp ebx, [ff_ysz]
|
|
||||||
jnb @f
|
|
||||||
mov ebp, [ff_map]
|
|
||||||
add ebp, [_WinMapWidth] ; even line: jump to next map row
|
|
||||||
mov [ff_map], ebp
|
|
||||||
jmp .ff_new_y
|
|
||||||
@@:
|
|
||||||
add esp, 7*4
|
|
||||||
.exit:
|
.exit:
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.read_byte:
|
|
||||||
; eax - buffer address
|
|
||||||
; esi - slot#
|
|
||||||
push eax ecx edx esi
|
|
||||||
xchg eax, esi
|
|
||||||
lea ecx, [esp + 12] ; buffer addr = stacked [eax] to return
|
|
||||||
mov edx, 1 ; buffer size
|
|
||||||
call read_process_memory ; (core/taskman.inc) returns #bytes read
|
|
||||||
pop esi edx ecx eax ; eax = PID
|
|
||||||
ret
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
window._.window_activate: ;////////////////////////////////////////////////////
|
window._.window_activate: ;////////////////////////////////////////////////////
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; check mouse
|
; check mouse
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
@ -33,8 +32,6 @@ mouse_speed_factor: dd 3
|
|||||||
mouse_timer_ticks dd 0
|
mouse_timer_ticks dd 0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
;include 'm_com.inc'
|
|
||||||
|
|
||||||
|
|
||||||
draw_mouse_under:
|
draw_mouse_under:
|
||||||
; return old picture
|
; return old picture
|
||||||
@ -97,14 +94,11 @@ save_draw_mouse:
|
|||||||
push eax
|
push eax
|
||||||
push ebx
|
push ebx
|
||||||
|
|
||||||
mov ecx, ebx ; <<<<
|
mov ecx, [Screen_Max_X]
|
||||||
shr ecx, 1
|
inc ecx
|
||||||
imul ecx, [_WinMapWidth]
|
mul ecx
|
||||||
shr eax, 1
|
add eax, [_WinMapAddress]
|
||||||
shr eax, 1
|
movzx edx, byte [ebx+eax]
|
||||||
add eax, ecx
|
|
||||||
add eax, [_WinMapAddress]
|
|
||||||
movzx edx, byte [ebx+eax]
|
|
||||||
shl edx, 8
|
shl edx, 8
|
||||||
mov esi, [edx+SLOT_BASE+APPDATA.cursor]
|
mov esi, [edx+SLOT_BASE+APPDATA.cursor]
|
||||||
|
|
||||||
@ -277,13 +271,11 @@ __sys_disable_mouse:
|
|||||||
add edx,window_data
|
add edx,window_data
|
||||||
movzx eax, word [MOUSE_X]
|
movzx eax, word [MOUSE_X]
|
||||||
movzx ebx, word [MOUSE_Y]
|
movzx ebx, word [MOUSE_Y]
|
||||||
mov ecx, ebx ; <<<<
|
mov ecx,[Screen_Max_X]
|
||||||
shr ecx, 1
|
inc ecx
|
||||||
imul ecx, [_WinMapWidth]
|
imul ecx,ebx
|
||||||
shr eax, 1
|
add ecx,eax
|
||||||
shr eax, 1
|
add ecx, [_WinMapAddress]
|
||||||
add ecx, eax
|
|
||||||
add ecx, [_WinMapAddress]
|
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
movzx ebx, byte [ecx]
|
movzx ebx, byte [ecx]
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -224,7 +224,8 @@ include "sound/playnote.inc" ; player Note for Speaker PC
|
|||||||
|
|
||||||
; display
|
; display
|
||||||
|
|
||||||
include "video/graph32.inc" ; 32bpp graphics
|
;include "video/graph32.inc" ; 32bpp graphics
|
||||||
|
include "video/vesa20.inc" ; older graphics engine
|
||||||
include "video/cursors.inc" ; cursors functions
|
include "video/cursors.inc" ; cursors functions
|
||||||
|
|
||||||
; Network Interface & TCPIP Stack
|
; Network Interface & TCPIP Stack
|
||||||
|
Loading…
Reference in New Issue
Block a user