forked from KolibriOS/kolibrios
[KERNEL] The window subsystem has been redesigned:
-extended WDATA structures up to 128 bytes -added the background_windows constant -the draw_data array has been deleted -APPDATA.window and WDATA.thread fields added -minor fixes in the operation of external file system drivers git-svn-id: svn://kolibrios.org@9930 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
48e0317921
commit
0a5beb0bc0
@ -1241,7 +1241,6 @@ end virtual
|
|||||||
add ebp, 8 ; ebp points to part of PARTITION structure
|
add ebp, 8 ; ebp points to part of PARTITION structure
|
||||||
xor eax, eax ; first sector of the partition
|
xor eax, eax ; first sector of the partition
|
||||||
call fs_read32_sys
|
call fs_read32_sys
|
||||||
;push eax
|
|
||||||
; 2. Run tests for all supported filesystems. If at least one test succeeded,
|
; 2. Run tests for all supported filesystems. If at least one test succeeded,
|
||||||
; go to 4.
|
; go to 4.
|
||||||
; For tests:
|
; For tests:
|
||||||
@ -1249,6 +1248,9 @@ end virtual
|
|||||||
; [esp] = error code after bootsector read: 0 = ok, otherwise = failed,
|
; [esp] = error code after bootsector read: 0 = ok, otherwise = failed,
|
||||||
; ebx points to the buffer for bootsector,
|
; ebx points to the buffer for bootsector,
|
||||||
; ebx+[esi+DISK.MediaInfo.SectorSize] points to sector-sized buffer that can be used for anything.
|
; ebx+[esi+DISK.MediaInfo.SectorSize] points to sector-sized buffer that can be used for anything.
|
||||||
|
|
||||||
|
; lock fs list
|
||||||
|
|
||||||
mov ecx, [fs_list]
|
mov ecx, [fs_list]
|
||||||
@@:
|
@@:
|
||||||
cmp ecx, fs_list
|
cmp ecx, fs_list
|
||||||
@ -1260,7 +1262,8 @@ end virtual
|
|||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .success
|
jnz .success
|
||||||
|
|
||||||
pop eax
|
mov eax, ecx
|
||||||
|
pop ecx
|
||||||
mov ecx, [ecx]
|
mov ecx, [ecx]
|
||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
@ -1301,6 +1304,8 @@ end virtual
|
|||||||
sub ebp, 8 ; restore ebp
|
sub ebp, 8 ; restore ebp
|
||||||
; 4. Return with eax = pointer to PARTITION or NULL.
|
; 4. Return with eax = pointer to PARTITION or NULL.
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
|
; unlock fs list
|
||||||
ret
|
ret
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
|
@ -223,6 +223,7 @@ DRIVE_DATA_SIZE = 16
|
|||||||
OS_BASE = 0x80000000
|
OS_BASE = 0x80000000
|
||||||
|
|
||||||
window_data = OS_BASE + 0x0001000
|
window_data = OS_BASE + 0x0001000
|
||||||
|
background_window = window_data + sizeof.WDATA
|
||||||
|
|
||||||
;TASK_TABLE = OS_BASE + 0x0003000
|
;TASK_TABLE = OS_BASE + 0x0003000
|
||||||
;CURRENT_TASK = OS_BASE + 0x0003000
|
;CURRENT_TASK = OS_BASE + 0x0003000
|
||||||
@ -231,7 +232,7 @@ window_data = OS_BASE + 0x0001000
|
|||||||
;TASK_DATA = OS_BASE + 0x0003020
|
;TASK_DATA = OS_BASE + 0x0003020
|
||||||
;TASK_EVENT = OS_BASE + 0x0003020
|
;TASK_EVENT = OS_BASE + 0x0003020
|
||||||
|
|
||||||
CDDataBuf = OS_BASE + 0x0005000
|
;CDDataBuf = OS_BASE + 0x0005000
|
||||||
|
|
||||||
;unused 0x6000 - 0x8fff
|
;unused 0x6000 - 0x8fff
|
||||||
|
|
||||||
@ -494,7 +495,7 @@ struct APPDATA
|
|||||||
exc_handler dd ? ;+32
|
exc_handler dd ? ;+32
|
||||||
except_mask dd ? ;+36
|
except_mask dd ? ;+36
|
||||||
pl0_stack dd ? ;+40
|
pl0_stack dd ? ;+40
|
||||||
cursor dd ? ;+44 ; WDATA
|
dd ? ;+44
|
||||||
fd_ev dd ? ;+48
|
fd_ev dd ? ;+48
|
||||||
bk_ev dd ? ;+52
|
bk_ev dd ? ;+52
|
||||||
fd_obj dd ? ;+56
|
fd_obj dd ? ;+56
|
||||||
@ -502,7 +503,7 @@ struct APPDATA
|
|||||||
saved_esp dd ? ;+64
|
saved_esp dd ? ;+64
|
||||||
io_map rd 2 ;+68
|
io_map rd 2 ;+68
|
||||||
dbg_state dd ? ;+76
|
dbg_state dd ? ;+76
|
||||||
cur_dir dd ? ;+80
|
cur_dir dd ? ;+80 ; directory this thread
|
||||||
wait_timeout dd ? ;+84
|
wait_timeout dd ? ;+84
|
||||||
saved_esp0 dd ? ;+88
|
saved_esp0 dd ? ;+88
|
||||||
wait_begin dd ? ;+92 +++
|
wait_begin dd ? ;+92 +++
|
||||||
@ -511,20 +512,20 @@ struct APPDATA
|
|||||||
tls_base dd ? ;+104
|
tls_base dd ? ;+104
|
||||||
event_mask dd ? ;+108 stores event types allowed for task
|
event_mask dd ? ;+108 stores event types allowed for task
|
||||||
tid dd ? ;+112 thread id
|
tid dd ? ;+112 thread id
|
||||||
draw_bgr_x dd ? ;+116 ; WDATA
|
dd ? ;+116
|
||||||
draw_bgr_y dd ? ;+120 ; WDATA
|
dd ? ;+120
|
||||||
state db ? ;+124 thread state
|
state db ? ;+124 thread state
|
||||||
wnd_number db ? ;+125
|
wnd_number db ? ;+125
|
||||||
dw ? ;+126
|
dw ? ;+126
|
||||||
dd ? ;+128
|
window dd ? ;+128 ptr WDATA
|
||||||
dd ? ;+132
|
dd ? ;+132
|
||||||
dd ? ;+136
|
dd ? ;+136
|
||||||
counter_sum dd ? ;+140 ; R
|
counter_sum dd ? ;+140 ; R
|
||||||
saved_box BOX ;+144 ; WDATA
|
rd 4 ;+144
|
||||||
ipc_start dd ? ;+160
|
ipc_start dd ? ;+160
|
||||||
ipc_size dd ? ;+164
|
ipc_size dd ? ;+164
|
||||||
occurred_events dd ? ;+168 ; mask which accumulates occurred events
|
occurred_events dd ? ;+168 ; mask which accumulates occurred events
|
||||||
debugger_slot dd ? ;+172
|
debugger_slot dd ? ;+172 ; index in SLOT_BASE array
|
||||||
terminate_protection dd ? ;+176
|
terminate_protection dd ? ;+176
|
||||||
keyboard_mode db ? ;+180
|
keyboard_mode db ? ;+180
|
||||||
rb 3
|
rb 3
|
||||||
@ -537,7 +538,7 @@ struct APPDATA
|
|||||||
in_schedule LHEAD ;+236
|
in_schedule LHEAD ;+236
|
||||||
counter_add dd ? ;+244 ; R
|
counter_add dd ? ;+244 ; R
|
||||||
cpu_usage dd ? ;+248 ; R
|
cpu_usage dd ? ;+248 ; R
|
||||||
temp_cursor dd 0 ;+252 ; temporary place to save cursor
|
dd ? ;+252 ; temporary place to save cursor
|
||||||
ends
|
ends
|
||||||
|
|
||||||
assert sizeof.APPDATA = 256
|
assert sizeof.APPDATA = 256
|
||||||
@ -575,7 +576,9 @@ WSTATE_NORMAL = 00000000b
|
|||||||
WSTATE_MAXIMIZED = 00000001b
|
WSTATE_MAXIMIZED = 00000001b
|
||||||
WSTATE_MINIMIZED = 00000010b
|
WSTATE_MINIMIZED = 00000010b
|
||||||
WSTATE_ROLLEDUP = 00000100b
|
WSTATE_ROLLEDUP = 00000100b
|
||||||
|
WSTATE_USED = 10000000b
|
||||||
|
|
||||||
|
; fl_redraw
|
||||||
WSTATE_REDRAW = 00000001b
|
WSTATE_REDRAW = 00000001b
|
||||||
WSTATE_WNDDRAWN = 00000010b
|
WSTATE_WNDDRAWN = 00000010b
|
||||||
|
|
||||||
@ -603,11 +606,19 @@ struct WDATA
|
|||||||
caption dd ?
|
caption dd ?
|
||||||
captionEncoding db ?
|
captionEncoding db ?
|
||||||
rb 3
|
rb 3
|
||||||
|
saved_box BOX
|
||||||
|
cursor dd ?
|
||||||
|
temp_cursor dd ?
|
||||||
|
draw_bgr_x dd ?
|
||||||
|
draw_bgr_y dd ?
|
||||||
|
draw_data RECT
|
||||||
|
thread dd ? ; prt APPDATA
|
||||||
|
rb 64 - 16 - 4*2 - 4*2 - 4 - 16
|
||||||
ends
|
ends
|
||||||
|
|
||||||
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
||||||
|
|
||||||
assert sizeof.WDATA = 64
|
assert sizeof.WDATA = 128
|
||||||
|
|
||||||
struct SYS_VARS
|
struct SYS_VARS
|
||||||
bpp dd ?
|
bpp dd ?
|
||||||
|
@ -566,10 +566,6 @@ destroy_thread:
|
|||||||
mov edi, esi
|
mov edi, esi
|
||||||
mov ecx, sizeof.WDATA/4
|
mov ecx, sizeof.WDATA/4
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
lea edi, [esi - window_data + draw_data]
|
|
||||||
mov ecx, sizeof.WDATA/4
|
|
||||||
rep stosd
|
|
||||||
popa
|
popa
|
||||||
|
|
||||||
; debuggee test
|
; debuggee test
|
||||||
|
@ -969,8 +969,6 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
|
|||||||
mov [SLOT_BASE + ebx + APPDATA.fd_obj], edx
|
mov [SLOT_BASE + ebx + APPDATA.fd_obj], edx
|
||||||
mov [SLOT_BASE + ebx + APPDATA.bk_obj], edx
|
mov [SLOT_BASE + ebx + APPDATA.bk_obj], edx
|
||||||
|
|
||||||
mov ecx, [def_cursor]
|
|
||||||
mov [SLOT_BASE + ebx + APPDATA.cursor], ecx
|
|
||||||
mov eax, [pl0_stack]
|
mov eax, [pl0_stack]
|
||||||
mov [SLOT_BASE + ebx + APPDATA.pl0_stack], eax
|
mov [SLOT_BASE + ebx + APPDATA.pl0_stack], eax
|
||||||
add eax, RING0_STACK_SIZE
|
add eax, RING0_STACK_SIZE
|
||||||
@ -993,22 +991,29 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
|
|||||||
|
|
||||||
mov eax, [slot]
|
mov eax, [slot]
|
||||||
mov [SLOT_BASE + ebx + APPDATA.wnd_number], al
|
mov [SLOT_BASE + ebx + APPDATA.wnd_number], al
|
||||||
mov ebx, eax
|
;mov ebx, eax
|
||||||
shl ebx, BSF sizeof.WDATA
|
shl eax, BSF sizeof.WDATA
|
||||||
lea ecx, [draw_data + ebx];ecx - pointer to draw data
|
add eax, window_data
|
||||||
|
mov ecx, eax
|
||||||
|
mov [SLOT_BASE + ebx + APPDATA.window], eax
|
||||||
|
mov [eax + WDATA.thread], ebx
|
||||||
|
add [eax + WDATA.thread], SLOT_BASE
|
||||||
|
|
||||||
; set window state to 'normal' (non-minimized/maximized/rolled-up) state
|
; set window state to 'normal' (non-minimized/maximized/rolled-up) state
|
||||||
mov [window_data + ebx + WDATA.fl_wstate], WSTATE_NORMAL
|
mov [eax + WDATA.fl_wstate], WSTATE_NORMAL + WSTATE_USED
|
||||||
mov [window_data + ebx + WDATA.fl_redraw], 1
|
mov [eax + WDATA.fl_redraw], WSTATE_REDRAW
|
||||||
|
|
||||||
|
mov edx, [def_cursor]
|
||||||
|
mov [eax + WDATA.cursor], edx
|
||||||
|
|
||||||
;set draw data to full screen
|
;set draw data to full screen
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [ecx + RECT.left], eax
|
mov [ecx + WDATA.draw_data.left], eax
|
||||||
mov [ecx + RECT.top], eax
|
mov [ecx + WDATA.draw_data.top], eax
|
||||||
mov eax, [screen_workarea.right]
|
mov eax, [screen_workarea.right]
|
||||||
mov [ecx + RECT.right], eax
|
mov [ecx + WDATA.draw_data.right], eax
|
||||||
mov eax, [screen_workarea.bottom]
|
mov eax, [screen_workarea.bottom]
|
||||||
mov [ecx + RECT.bottom], eax
|
mov [ecx + WDATA.draw_data.bottom], eax
|
||||||
|
|
||||||
mov ebx, [pl0_stack]
|
mov ebx, [pl0_stack]
|
||||||
mov esi, [params]
|
mov esi, [params]
|
||||||
|
@ -350,8 +350,7 @@ align 64
|
|||||||
fpu_data:
|
fpu_data:
|
||||||
rb 0xa80 ; bochs avx512
|
rb 0xa80 ; bochs avx512
|
||||||
fpu_data_size = $ - fpu_data
|
fpu_data_size = $ - fpu_data
|
||||||
draw_data:
|
|
||||||
rb sizeof.WDATA*256
|
|
||||||
BPSLine_calc_area rd MAX_SCREEN_HEIGHT
|
BPSLine_calc_area rd MAX_SCREEN_HEIGHT
|
||||||
d_width_calc_area rd MAX_SCREEN_HEIGHT
|
d_width_calc_area rd MAX_SCREEN_HEIGHT
|
||||||
mouseunder rd 16*24
|
mouseunder rd 16*24
|
||||||
@ -437,8 +436,8 @@ thread_count dd ?
|
|||||||
mididp dd ?
|
mididp dd ?
|
||||||
midisp dd ?
|
midisp dd ?
|
||||||
|
|
||||||
cdbase dd ?
|
;cdbase dd ?
|
||||||
cdid dd ?
|
;cdid dd ?
|
||||||
|
|
||||||
hdbase dd ? ; for boot 0x1f0
|
hdbase dd ? ; for boot 0x1f0
|
||||||
hdid dd ?
|
hdid dd ?
|
||||||
@ -548,3 +547,6 @@ RESERVED_PORTS:
|
|||||||
rb 64*1024
|
rb 64*1024
|
||||||
sys_pgmap:
|
sys_pgmap:
|
||||||
rb 1024*1024/8
|
rb 1024*1024/8
|
||||||
|
|
||||||
|
|
||||||
|
CDDataBuf: rb 0x1000
|
@ -289,11 +289,12 @@ nosb7:
|
|||||||
jnz nosb8
|
jnz nosb8
|
||||||
|
|
||||||
mov ecx, [current_slot]
|
mov ecx, [current_slot]
|
||||||
|
mov ecx, [ecx + APPDATA.window]
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
xchg eax, [ecx + APPDATA.draw_bgr_x]
|
xchg eax, [ecx + WDATA.draw_bgr_x]
|
||||||
mov [esp + SYSCALL_STACK.eax], eax ; eax = [left]*65536 + [right]
|
mov [esp + SYSCALL_STACK.eax], eax ; eax = [left]*65536 + [right]
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
xchg eax, [ecx + APPDATA.draw_bgr_y]
|
xchg eax, [ecx + WDATA.draw_bgr_y]
|
||||||
mov [esp + SYSCALL_STACK.ebx], eax ; ebx = [top]*65536 + [bottom]
|
mov [esp + SYSCALL_STACK.ebx], eax ; ebx = [top]*65536 + [bottom]
|
||||||
ret
|
ret
|
||||||
;---------------------------------------
|
;---------------------------------------
|
||||||
@ -328,11 +329,11 @@ nosb8:
|
|||||||
|
|
||||||
mov [background_defined], 1
|
mov [background_defined], 1
|
||||||
|
|
||||||
mov [draw_data + sizeof.WDATA + RECT.left], eax
|
mov [background_window + WDATA.draw_data.left], eax
|
||||||
mov [draw_data + sizeof.WDATA + RECT.top], ebx
|
mov [background_window + WDATA.draw_data.top], ebx
|
||||||
|
|
||||||
mov [draw_data + sizeof.WDATA + RECT.right], ecx
|
mov [background_window + WDATA.draw_data.right], ecx
|
||||||
mov [draw_data + sizeof.WDATA + RECT.bottom], edx
|
mov [background_window + WDATA.draw_data.bottom], edx
|
||||||
|
|
||||||
inc [REDRAW_BACKGROUND]
|
inc [REDRAW_BACKGROUND]
|
||||||
call wakeup_osloop
|
call wakeup_osloop
|
||||||
@ -353,15 +354,15 @@ endg
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
force_redraw_background:
|
force_redraw_background:
|
||||||
and [draw_data + sizeof.WDATA + RECT.left], 0
|
and [background_window + WDATA.draw_data.left], 0
|
||||||
and [draw_data + sizeof.WDATA + RECT.top], 0
|
and [background_window + WDATA.draw_data.top], 0
|
||||||
push eax ebx
|
push eax ebx
|
||||||
mov eax, [_display.width]
|
mov eax, [_display.width]
|
||||||
mov ebx, [_display.height]
|
mov ebx, [_display.height]
|
||||||
dec eax
|
dec eax
|
||||||
dec ebx
|
dec ebx
|
||||||
mov [draw_data + sizeof.WDATA + RECT.right], eax
|
mov [background_window + WDATA.draw_data.right], eax
|
||||||
mov [draw_data + sizeof.WDATA + RECT.bottom], ebx
|
mov [background_window + WDATA.draw_data.bottom], ebx
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
inc [REDRAW_BACKGROUND]
|
inc [REDRAW_BACKGROUND]
|
||||||
call wakeup_osloop
|
call wakeup_osloop
|
||||||
@ -424,7 +425,7 @@ align 4
|
|||||||
; esi - buffer of 0x00RRGGBB
|
; esi - buffer of 0x00RRGGBB
|
||||||
mov eax, [img_background]
|
mov eax, [img_background]
|
||||||
cmp eax, static_background_data
|
cmp eax, static_background_data
|
||||||
jz .ret_39_3
|
jz .fail_39_3
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
movzx eax, cx ; store y in eax
|
movzx eax, cx ; store y in eax
|
||||||
@ -489,12 +490,13 @@ align 4
|
|||||||
.end_copy_rect:
|
.end_copy_rect:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [esp + SYSCALL_STACK.eax], eax
|
mov [esp + SYSCALL_STACK.eax], eax
|
||||||
|
align 4
|
||||||
|
.ret_39_3:
|
||||||
|
ret
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.fail_39_3:
|
.fail_39_3:
|
||||||
mov eax, -1
|
mov [esp + SYSCALL_STACK.eax], -1
|
||||||
align 4
|
|
||||||
.ret_39_3:
|
|
||||||
ret
|
ret
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
|
@ -390,15 +390,15 @@ mouse._.move_handler:
|
|||||||
.set_resizing_cursor:
|
.set_resizing_cursor:
|
||||||
; DEBUGF 1, ".set_resizing_cursor eax = %x\n", eax
|
; DEBUGF 1, ".set_resizing_cursor eax = %x\n", eax
|
||||||
; change cursor to resizing cursor
|
; change cursor to resizing cursor
|
||||||
shl esi, BSF sizeof.APPDATA
|
shl esi, BSF sizeof.WDATA
|
||||||
add esi, SLOT_BASE
|
add esi, window_data
|
||||||
|
|
||||||
; if resizing cursor we need (eax) isnt set already, set it
|
; if resizing cursor we need (eax) isnt set already, set it
|
||||||
cmp eax, [esi + APPDATA.cursor]
|
cmp eax, [esi + WDATA.cursor]
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
; DEBUGF 1, "changing cursor to resizing\n"
|
; DEBUGF 1, "changing cursor to resizing\n"
|
||||||
xchg eax, [esi + APPDATA.cursor] ; set resizing cursor, prev cursor goes to eax
|
xchg eax, [esi + WDATA.cursor] ; set resizing cursor, prev cursor goes to eax
|
||||||
; save previous cursor (will be restored when we'll get out of the resizing area)
|
; save previous cursor (will be restored when we'll get out of the resizing area)
|
||||||
; if we change resizing cursor to resizing cursor then dont update previous cursor
|
; if we change resizing cursor to resizing cursor then dont update previous cursor
|
||||||
cmp eax, [def_cursor_hresize]
|
cmp eax, [def_cursor_hresize]
|
||||||
@ -410,23 +410,23 @@ mouse._.move_handler:
|
|||||||
cmp eax, [def_cursor_dresize2]
|
cmp eax, [def_cursor_dresize2]
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
mov [esi + APPDATA.temp_cursor], eax ; save prev cursor
|
mov [esi + WDATA.temp_cursor], eax ; save prev cursor
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
jmp .end1
|
jmp .end1
|
||||||
.not_in_resize_area:
|
.not_in_resize_area:
|
||||||
; DEBUGF 1, ".not_in_resize_area\n"
|
; DEBUGF 1, ".not_in_resize_area\n"
|
||||||
|
|
||||||
shl esi, BSF sizeof.APPDATA
|
shl esi, BSF sizeof.WDATA
|
||||||
add esi, SLOT_BASE
|
add esi, window_data
|
||||||
mov eax, [esi + APPDATA.temp_cursor]
|
mov eax, [esi + WDATA.temp_cursor]
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .end1
|
jz .end1
|
||||||
|
|
||||||
; restore prev cursor
|
; restore prev cursor
|
||||||
mov [esi + APPDATA.temp_cursor], 0
|
mov [esi + WDATA.temp_cursor], 0
|
||||||
mov [esi + APPDATA.cursor], eax
|
mov [esi + WDATA.cursor], eax
|
||||||
|
|
||||||
.end1:
|
.end1:
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
@ -819,15 +819,15 @@ dd .loadCursorUni
|
|||||||
mov eax, [MOUSE_X]
|
mov eax, [MOUSE_X]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
mov ax, [MOUSE_Y]
|
mov ax, [MOUSE_Y]
|
||||||
mov esi, [current_slot_idx]
|
mov esi, [current_slot]
|
||||||
shl esi, BSF sizeof.WDATA
|
mov esi, [esi + APPDATA.window]
|
||||||
mov bx, word[window_data + esi + WDATA.box.left]
|
mov bx, word[esi + WDATA.box.left]
|
||||||
shl ebx, 16
|
shl ebx, 16
|
||||||
mov bx, word[window_data + esi + WDATA.box.top]
|
mov bx, word[esi + WDATA.box.top]
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
sub ax, word[window_data + esi + WDATA.clientbox.top]
|
sub ax, word[esi + WDATA.clientbox.top]
|
||||||
rol eax, 16
|
rol eax, 16
|
||||||
sub ax, word[window_data + esi + WDATA.clientbox.left]
|
sub ax, word[esi + WDATA.clientbox.left]
|
||||||
rol eax, 16
|
rol eax, 16
|
||||||
mov [esp + SYSCALL_STACK.eax], eax
|
mov [esp + SYSCALL_STACK.eax], eax
|
||||||
ret
|
ret
|
||||||
|
@ -78,12 +78,12 @@ syscall_setpixel:
|
|||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
mov ebx, ecx
|
mov ebx, ecx
|
||||||
mov ecx, edx
|
mov ecx, edx
|
||||||
mov edx, [current_slot_idx]
|
mov edx, [current_slot]
|
||||||
shl edx, BSF sizeof.WDATA
|
mov edx, [edx + APPDATA.window]
|
||||||
add eax, [window_data + edx + WDATA.box.left]
|
add eax, [edx + WDATA.box.left]
|
||||||
add ebx, [window_data + edx + WDATA.box.top]
|
add ebx, [edx + WDATA.box.top]
|
||||||
add eax, [window_data + edx + WDATA.clientbox.left]
|
add eax, [edx + WDATA.clientbox.left]
|
||||||
add ebx, [window_data + edx + WDATA.clientbox.top]
|
add ebx, [edx + WDATA.clientbox.top]
|
||||||
xor edi, edi ; no force
|
xor edi, edi ; no force
|
||||||
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
||||||
jmp __sys_putpixel
|
jmp __sys_putpixel
|
||||||
@ -103,13 +103,13 @@ syscall_writetext:
|
|||||||
pop esi
|
pop esi
|
||||||
jnz .err
|
jnz .err
|
||||||
|
|
||||||
mov eax, [current_slot_idx]
|
mov eax, [current_slot]
|
||||||
shl eax, BSF sizeof.WDATA
|
mov eax, [eax + APPDATA.window]
|
||||||
mov ebp, [window_data + eax + WDATA.box.left]
|
mov ebp, [eax + WDATA.box.left]
|
||||||
add ebp, [window_data + eax + WDATA.clientbox.left]
|
add ebp, [eax + WDATA.clientbox.left]
|
||||||
shl ebp, 16
|
shl ebp, 16
|
||||||
add ebp, [window_data + eax + WDATA.box.top]
|
add ebp, [eax + WDATA.box.top]
|
||||||
add bp, word[window_data + eax + WDATA.clientbox.top]
|
add bp, word[eax + WDATA.clientbox.top]
|
||||||
test ecx, 0x08000000 ; redirect the output to the user area
|
test ecx, 0x08000000 ; redirect the output to the user area
|
||||||
jnz @f
|
jnz @f
|
||||||
add ebx, ebp
|
add ebx, ebp
|
||||||
@ -147,10 +147,10 @@ syscall_drawrect:
|
|||||||
shr eax, 16 ; eax - x.coord
|
shr eax, 16 ; eax - x.coord
|
||||||
movzx edx, bx ; edx - y.size
|
movzx edx, bx ; edx - y.size
|
||||||
shr ebx, 16 ; ebx - y.coord
|
shr ebx, 16 ; ebx - y.coord
|
||||||
mov esi, [current_slot_idx]
|
mov esi, [current_slot]
|
||||||
shl esi, BSF sizeof.WDATA
|
mov esi, [esi + APPDATA.window]
|
||||||
add eax, [window_data + esi + WDATA.clientbox.left]
|
add eax, [esi + WDATA.clientbox.left]
|
||||||
add ebx, [window_data + esi + WDATA.clientbox.top]
|
add ebx, [esi + WDATA.clientbox.top]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
add edx, ebx
|
add edx, ebx
|
||||||
jmp vesa20_drawbar
|
jmp vesa20_drawbar
|
||||||
@ -161,19 +161,19 @@ syscall_drawrect:
|
|||||||
align 4
|
align 4
|
||||||
; system function 38
|
; system function 38
|
||||||
syscall_drawline:
|
syscall_drawline:
|
||||||
mov edi, [current_slot_idx]
|
mov edi, [current_slot]
|
||||||
shl edi, BSF sizeof.WDATA
|
mov edi, [edi + APPDATA.window]
|
||||||
movzx eax, word[window_data + edi + WDATA.box.left]
|
movzx eax, word[edi + WDATA.box.left]
|
||||||
mov ebp, eax
|
mov ebp, eax
|
||||||
add ebp, [window_data + edi + WDATA.clientbox.left]
|
add ebp, [edi + WDATA.clientbox.left]
|
||||||
add ax, word[window_data + edi + WDATA.clientbox.left]
|
add ax, word[edi + WDATA.clientbox.left]
|
||||||
add ebp, ebx
|
add ebp, ebx
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
movzx ebx, word[window_data + edi + WDATA.box.top]
|
movzx ebx, word[edi + WDATA.box.top]
|
||||||
add eax, ebp
|
add eax, ebp
|
||||||
mov ebp, ebx
|
mov ebp, ebx
|
||||||
add ebp, [window_data + edi + WDATA.clientbox.top]
|
add ebp, [edi + WDATA.clientbox.top]
|
||||||
add bx, word[window_data + edi + WDATA.clientbox.top]
|
add bx, word[edi + WDATA.clientbox.top]
|
||||||
add ebp, ecx
|
add ebp, ecx
|
||||||
shl ebx, 16
|
shl ebx, 16
|
||||||
xor edi, edi
|
xor edi, edi
|
||||||
@ -483,9 +483,9 @@ align 4
|
|||||||
|
|
||||||
; system function 71
|
; system function 71
|
||||||
syscall_window_settings:
|
syscall_window_settings:
|
||||||
mov edi, [current_slot_idx]
|
mov edi, [current_slot]
|
||||||
shl edi, BSF sizeof.WDATA
|
mov edi, [edi + APPDATA.window]
|
||||||
or [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION
|
or [edi + WDATA.fl_wstyle], WSTYLE_HASCAPTION
|
||||||
cmp ebx, 2
|
cmp ebx, 2
|
||||||
jz @f
|
jz @f
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
@ -494,14 +494,14 @@ syscall_window_settings:
|
|||||||
jc @f
|
jc @f
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
@@:
|
@@:
|
||||||
mov [window_data + edi + WDATA.caption], ecx
|
mov [edi + WDATA.caption], ecx
|
||||||
mov [window_data + edi + WDATA.captionEncoding], dl
|
mov [edi + WDATA.captionEncoding], dl
|
||||||
jmp window._.draw_window_caption
|
jmp window._.draw_window_caption
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
set_window_defaults:
|
set_window_defaults:
|
||||||
mov byte [window_data + sizeof.WDATA + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
|
mov byte [background_window + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
|
||||||
push eax ecx
|
push eax ecx
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ecx, WIN_STACK
|
mov ecx, WIN_STACK
|
||||||
@ -555,10 +555,10 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
.next_window:
|
.next_window:
|
||||||
movzx edi, word[WIN_POS + esi * 2]
|
movzx edi, word[WIN_POS + esi * 2]
|
||||||
shl edi, BSF sizeof.WDATA ;size of TASKDATA and WDATA = 32 bytes
|
shl edi, BSF sizeof.WDATA
|
||||||
|
|
||||||
cmp byte [SLOT_BASE + edi*(sizeof.APPDATA/sizeof.WDATA) + APPDATA.state], TSTATE_FREE
|
test byte [window_data + edi + WDATA.fl_wstate], WSTATE_USED
|
||||||
je .skip_window
|
jz .skip_window
|
||||||
|
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
@ -1086,17 +1086,17 @@ align 4
|
|||||||
movzx edi, word[WIN_POS + eax * 2]
|
movzx edi, word[WIN_POS + eax * 2]
|
||||||
shl edi, BSF sizeof.WDATA
|
shl edi, BSF sizeof.WDATA
|
||||||
; it is a unused slot?
|
; it is a unused slot?
|
||||||
cmp byte [SLOT_BASE + edi*(sizeof.APPDATA/sizeof.WDATA) + APPDATA.state], TSTATE_FREE
|
test byte [window_data + edi + WDATA.fl_wstate], WSTATE_USED
|
||||||
je @f
|
jz @f
|
||||||
; it is a hidden thread?
|
; it is a hidden thread?
|
||||||
lea esi, [SLOT_BASE + edi*(sizeof.APPDATA/sizeof.WDATA) + APPDATA.app_name]
|
lea esi, [SLOT_BASE + edi*(sizeof.APPDATA/sizeof.WDATA) + APPDATA.app_name]
|
||||||
cmp [esi], byte '@'
|
cmp [esi], byte '@'
|
||||||
je @f
|
je @f
|
||||||
; is it already minimized?
|
; is it already minimized?
|
||||||
test [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
|
test [window_data + edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
jnz @f
|
jnz @f
|
||||||
; no it's not, let's do that
|
; no it's not, let's do that
|
||||||
or [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
|
or [window_data + edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
inc edx
|
inc edx
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -1291,13 +1291,10 @@ sys_window_maximize_handler:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.restore_size:
|
.restore_size:
|
||||||
mov eax, esi
|
push [edi + WDATA.saved_box.height] \
|
||||||
shl eax, BSF sizeof.APPDATA
|
[edi + WDATA.saved_box.width] \
|
||||||
add eax, SLOT_BASE + APPDATA.saved_box
|
[edi + WDATA.saved_box.top] \
|
||||||
push [eax + BOX.height] \
|
[edi + WDATA.saved_box.left]
|
||||||
[eax + BOX.width] \
|
|
||||||
[eax + BOX.top] \
|
|
||||||
[eax + BOX.left]
|
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -1325,10 +1322,6 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
;> esi = process slot
|
;> esi = process slot
|
||||||
sys_window_rollup_handler:
|
sys_window_rollup_handler:
|
||||||
mov edx, esi
|
|
||||||
shl edx, BSF sizeof.APPDATA
|
|
||||||
add edx, SLOT_BASE
|
|
||||||
|
|
||||||
; toggle normal/rolled up window state
|
; toggle normal/rolled up window state
|
||||||
mov bl, [edi + WDATA.fl_wstate]
|
mov bl, [edi + WDATA.fl_wstate]
|
||||||
xor bl, WSTATE_ROLLEDUP
|
xor bl, WSTATE_ROLLEDUP
|
||||||
@ -1350,7 +1343,7 @@ align 4
|
|||||||
test bl, WSTATE_MAXIMIZED
|
test bl, WSTATE_MAXIMIZED
|
||||||
jnz @f
|
jnz @f
|
||||||
add esp, -sizeof.BOX
|
add esp, -sizeof.BOX
|
||||||
lea eax, [edx + APPDATA.saved_box]
|
lea eax, [edi + WDATA.saved_box]
|
||||||
jmp .set_box
|
jmp .set_box
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -1543,17 +1536,12 @@ end if
|
|||||||
test cl, WSTATE_MAXIMIZED
|
test cl, WSTATE_MAXIMIZED
|
||||||
jnz .exit
|
jnz .exit
|
||||||
|
|
||||||
mov eax, edi
|
|
||||||
sub eax, window_data
|
|
||||||
shl eax, (BSF sizeof.APPDATA - BSF sizeof.WDATA)
|
|
||||||
add eax, SLOT_BASE
|
|
||||||
|
|
||||||
lea ebx, [edi + WDATA.box]
|
lea ebx, [edi + WDATA.box]
|
||||||
xchg esp, ebx
|
xchg esp, ebx
|
||||||
|
|
||||||
pop [eax + APPDATA.saved_box.left] \
|
pop [edi + WDATA.saved_box.left] \
|
||||||
[eax + APPDATA.saved_box.top] \
|
[edi + WDATA.saved_box.top] \
|
||||||
[eax + APPDATA.saved_box.width] \
|
[edi + WDATA.saved_box.width] \
|
||||||
edx
|
edx
|
||||||
|
|
||||||
xchg esp, ebx
|
xchg esp, ebx
|
||||||
@ -1561,7 +1549,7 @@ end if
|
|||||||
test ch, WSTATE_ROLLEDUP
|
test ch, WSTATE_ROLLEDUP
|
||||||
jnz .exit
|
jnz .exit
|
||||||
|
|
||||||
mov [eax + APPDATA.saved_box.height], edx
|
mov [edi + WDATA.saved_box.height], edx
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.exit:
|
.exit:
|
||||||
@ -1661,8 +1649,6 @@ window._.sys_set_window:
|
|||||||
mov eax, [edi + WDATA.cl_frames]
|
mov eax, [edi + WDATA.cl_frames]
|
||||||
|
|
||||||
mov esi, [esp]
|
mov esi, [esp]
|
||||||
sub edi, window_data
|
|
||||||
shl edi, (BSF sizeof.APPDATA - BSF sizeof.WDATA)
|
|
||||||
|
|
||||||
and cl, 0x0F
|
and cl, 0x0F
|
||||||
cmp cl, 3
|
cmp cl, 3
|
||||||
@ -1676,7 +1662,7 @@ align 4
|
|||||||
@@:
|
@@:
|
||||||
mov [esi + WDATA.caption], eax
|
mov [esi + WDATA.caption], eax
|
||||||
|
|
||||||
add edi, SLOT_BASE + APPDATA.saved_box
|
add edi, WDATA.saved_box
|
||||||
movsd
|
movsd
|
||||||
movsd
|
movsd
|
||||||
movsd
|
movsd
|
||||||
@ -2186,7 +2172,7 @@ align 4
|
|||||||
ja .exit.no_redraw
|
ja .exit.no_redraw
|
||||||
|
|
||||||
movzx edx, word[esi]
|
movzx edx, word[esi]
|
||||||
shl edx, BSF sizeof.WDATA ; size of TASKDATA and WDATA is 32 bytes
|
shl edx, BSF sizeof.WDATA
|
||||||
cmp byte [SLOT_BASE + edx*(sizeof.APPDATA/sizeof.WDATA) - sizeof.APPDATA + APPDATA.state], TSTATE_FREE
|
cmp byte [SLOT_BASE + edx*(sizeof.APPDATA/sizeof.WDATA) - sizeof.APPDATA + APPDATA.state], TSTATE_FREE
|
||||||
je .next_window
|
je .next_window
|
||||||
|
|
||||||
@ -2453,10 +2439,10 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
.next_window:
|
.next_window:
|
||||||
movzx edi, word[WIN_POS + esi * 2]
|
movzx edi, word[WIN_POS + esi * 2]
|
||||||
shl edi, BSF sizeof.WDATA ;size of TASKDATA and WDATA = 32 bytes
|
shl edi, BSF sizeof.WDATA
|
||||||
|
|
||||||
cmp byte [SLOT_BASE + edi*(sizeof.APPDATA/sizeof.WDATA) + APPDATA.state], TSTATE_FREE
|
test byte [window_data + edi + WDATA.fl_wstate], WSTATE_USED
|
||||||
je .skip_window
|
jz .skip_window
|
||||||
|
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
|
@ -115,9 +115,9 @@ save_draw_mouse:
|
|||||||
|
|
||||||
add eax, [_display.win_map]
|
add eax, [_display.win_map]
|
||||||
movzx edx, byte [ebx + eax]
|
movzx edx, byte [ebx + eax]
|
||||||
shl edx, BSF sizeof.APPDATA
|
shl edx, BSF sizeof.WDATA
|
||||||
; edx - thread slot of window under cursor
|
; edx - thread slot of window under cursor
|
||||||
mov esi, [SLOT_BASE + edx + APPDATA.cursor] ; cursor of window under cursor
|
mov esi, [window_data + edx + WDATA.cursor] ; cursor of window under cursor
|
||||||
|
|
||||||
; if cursor of window under cursor already equal to the
|
; if cursor of window under cursor already equal to the
|
||||||
; current_cursor then just draw it
|
; current_cursor then just draw it
|
||||||
@ -127,7 +127,7 @@ save_draw_mouse:
|
|||||||
; eax = thread slot of current active window
|
; eax = thread slot of current active window
|
||||||
mov eax, [thread_count]
|
mov eax, [thread_count]
|
||||||
movzx eax, word [WIN_POS + eax*2]
|
movzx eax, word [WIN_POS + eax*2]
|
||||||
shl eax, BSF sizeof.APPDATA
|
shl eax, BSF sizeof.WDATA
|
||||||
|
|
||||||
; window under cursor == active window ?
|
; window under cursor == active window ?
|
||||||
cmp eax, edx
|
cmp eax, edx
|
||||||
@ -138,7 +138,7 @@ save_draw_mouse:
|
|||||||
and bl, mouse.WINDOW_RESIZE_S_FLAG or mouse.WINDOW_RESIZE_W_FLAG or mouse.WINDOW_RESIZE_E_FLAG
|
and bl, mouse.WINDOW_RESIZE_S_FLAG or mouse.WINDOW_RESIZE_W_FLAG or mouse.WINDOW_RESIZE_E_FLAG
|
||||||
test bl, bl
|
test bl, bl
|
||||||
jz .active_isnt_resizing
|
jz .active_isnt_resizing
|
||||||
mov esi, [SLOT_BASE + eax + APPDATA.cursor] ; esi = cursor of active window, it is resizing cursor
|
mov esi, [window_data + eax + WDATA.cursor] ; esi = cursor of active window, it is resizing cursor
|
||||||
jmp @f
|
jmp @f
|
||||||
.active_isnt_resizing:
|
.active_isnt_resizing:
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ save_draw_mouse:
|
|||||||
je @f
|
je @f
|
||||||
|
|
||||||
; set cursor of window under cursor
|
; set cursor of window under cursor
|
||||||
mov esi, [SLOT_BASE + edx + APPDATA.cursor]
|
mov esi, [window_data + edx + WDATA.cursor]
|
||||||
cmp esi, [current_cursor]
|
cmp esi, [current_cursor]
|
||||||
je .draw
|
je .draw
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ align 4
|
|||||||
;align 4
|
;align 4
|
||||||
;.fail:
|
;.fail:
|
||||||
; mov ecx, [def_cursor]
|
; mov ecx, [def_cursor]
|
||||||
; mov [edx+SLOT_BASE+APPDATA.cursor], ecx
|
; mov [window_data + edx + WDATA.cursor], ecx
|
||||||
; stdcall [_display.move_cursor], ecx ; stdcall: [esp]=ebx,eax
|
; stdcall [_display.move_cursor], ecx ; stdcall: [esp]=ebx,eax
|
||||||
; popad
|
; popad
|
||||||
; ret
|
; ret
|
||||||
|
@ -897,10 +897,17 @@ include "detect/vortex86.inc" ; Vortex86 SoC detection code
|
|||||||
call boot_log
|
call boot_log
|
||||||
call reserve_irqs_ports
|
call reserve_irqs_ports
|
||||||
|
|
||||||
|
mov [SLOT_BASE + APPDATA.window], window_data
|
||||||
|
mov [SLOT_BASE + sizeof.APPDATA + APPDATA.window], window_data + sizeof.WDATA
|
||||||
|
mov [SLOT_BASE + sizeof.APPDATA*2 + APPDATA.window], window_data + sizeof.WDATA*2
|
||||||
|
mov [window_data + WDATA.thread], SLOT_BASE
|
||||||
|
mov [window_data + sizeof.WDATA + WDATA.thread], SLOT_BASE + sizeof.APPDATA
|
||||||
|
mov [window_data + sizeof.WDATA*2 + WDATA.thread], SLOT_BASE + sizeof.APPDATA*2
|
||||||
|
|
||||||
call init_display
|
call init_display
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
mov [SLOT_BASE + APPDATA.cursor + sizeof.APPDATA], eax
|
mov [window_data + sizeof.WDATA + WDATA.cursor], eax
|
||||||
mov [SLOT_BASE + APPDATA.cursor + sizeof.APPDATA*2], eax
|
mov [window_data + sizeof.WDATA*2 + WDATA.cursor], eax
|
||||||
|
|
||||||
; PRINT CPU FREQUENCY
|
; PRINT CPU FREQUENCY
|
||||||
|
|
||||||
@ -1179,6 +1186,10 @@ proc setup_os_slot
|
|||||||
|
|
||||||
mov [edx + APPDATA.wnd_number], dh
|
mov [edx + APPDATA.wnd_number], dh
|
||||||
mov byte [edx + APPDATA.tid], dh
|
mov byte [edx + APPDATA.tid], dh
|
||||||
|
movzx eax, dh
|
||||||
|
shl eax, BSF sizeof.WDATA
|
||||||
|
add eax, window_data
|
||||||
|
mov [edx + APPDATA.window], eax
|
||||||
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
@ -1349,7 +1360,6 @@ set_variables:
|
|||||||
|
|
||||||
mov byte [KEY_COUNT], al ; keyboard buffer
|
mov byte [KEY_COUNT], al ; keyboard buffer
|
||||||
mov byte [BTN_COUNT], al ; button buffer
|
mov byte [BTN_COUNT], al ; button buffer
|
||||||
; mov [MOUSE_X],dword 100*65536+100 ; mouse x/y
|
|
||||||
|
|
||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
@ -1554,14 +1564,14 @@ draw_num_text:
|
|||||||
mov ebx, [esp+64+32-8+4]
|
mov ebx, [esp+64+32-8+4]
|
||||||
; add window start x & y
|
; add window start x & y
|
||||||
|
|
||||||
mov ecx, [current_slot_idx]
|
mov ecx, [current_slot]
|
||||||
shl ecx, BSF sizeof.WDATA
|
mov ecx, [ecx + APPDATA.window]
|
||||||
|
|
||||||
mov eax, [window_data + ecx + WDATA.box.left]
|
mov eax, [ecx + WDATA.box.left]
|
||||||
add eax, [window_data + ecx + WDATA.clientbox.left]
|
add eax, [ecx + WDATA.clientbox.left]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
add eax, [window_data + ecx + WDATA.box.top]
|
add eax, [ecx + WDATA.box.top]
|
||||||
add eax, [window_data + ecx + WDATA.clientbox.top]
|
add eax, [ecx + WDATA.clientbox.top]
|
||||||
add ebx, eax
|
add ebx, eax
|
||||||
mov ecx, [esp+64+32-12+4]
|
mov ecx, [esp+64+32-12+4]
|
||||||
mov eax, [esp+64+8] ; background color (if given)
|
mov eax, [esp+64+8] ; background color (if given)
|
||||||
@ -1896,6 +1906,7 @@ sys_end:
|
|||||||
; restore default cursor before killing
|
; restore default cursor before killing
|
||||||
pusha
|
pusha
|
||||||
mov ecx, [current_slot]
|
mov ecx, [current_slot]
|
||||||
|
mov ecx, [ecx + APPDATA.window]
|
||||||
call restore_default_cursor_before_killing
|
call restore_default_cursor_before_killing
|
||||||
popa
|
popa
|
||||||
@@:
|
@@:
|
||||||
@ -1924,11 +1935,12 @@ sys_end:
|
|||||||
jmp .waitterm
|
jmp .waitterm
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
|
; ecx - ptr WDATA
|
||||||
restore_default_cursor_before_killing:
|
restore_default_cursor_before_killing:
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
mov [ecx + APPDATA.cursor], eax
|
mov [ecx + WDATA.cursor], eax
|
||||||
|
|
||||||
movzx eax, word [MOUSE_Y]
|
movzx eax, word [MOUSE_Y]
|
||||||
movzx ebx, word [MOUSE_X]
|
movzx ebx, word [MOUSE_X]
|
||||||
@ -1936,8 +1948,8 @@ restore_default_cursor_before_killing:
|
|||||||
|
|
||||||
add eax, [_display.win_map]
|
add eax, [_display.win_map]
|
||||||
movzx edx, byte [ebx + eax]
|
movzx edx, byte [ebx + eax]
|
||||||
shl edx, BSF sizeof.APPDATA
|
shl edx, BSF sizeof.WDATA
|
||||||
mov esi, [SLOT_BASE + edx + APPDATA.cursor]
|
mov esi, [window_data + edx + WDATA.cursor]
|
||||||
|
|
||||||
cmp esi, [current_cursor]
|
cmp esi, [current_cursor]
|
||||||
je @f
|
je @f
|
||||||
@ -1994,9 +2006,9 @@ sys_system:
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
sysfn_shutdown: ; 18.9 = system shutdown
|
sysfn_shutdown: ; 18.9 = system shutdown
|
||||||
cmp ecx, SYSTEM_SHUTDOWN
|
cmp ecx, SYSTEM_SHUTDOWN
|
||||||
jl exit_for_anyone
|
jl .exit_for_anyone
|
||||||
cmp ecx, SYSTEM_RESTART
|
cmp ecx, SYSTEM_RESTART
|
||||||
jg exit_for_anyone
|
jg .exit_for_anyone
|
||||||
mov [BOOT.shutdown_type], cl
|
mov [BOOT.shutdown_type], cl
|
||||||
|
|
||||||
mov eax, [thread_count]
|
mov eax, [thread_count]
|
||||||
@ -2004,7 +2016,7 @@ sysfn_shutdown: ; 18.9 = system shutdown
|
|||||||
mov [shutdown_processes], eax
|
mov [shutdown_processes], eax
|
||||||
call wakeup_osloop
|
call wakeup_osloop
|
||||||
and dword [esp + SYSCALL_STACK.eax], 0
|
and dword [esp + SYSCALL_STACK.eax], 0
|
||||||
exit_for_anyone:
|
.exit_for_anyone:
|
||||||
ret
|
ret
|
||||||
uglobal
|
uglobal
|
||||||
shutdown_processes:
|
shutdown_processes:
|
||||||
@ -2055,10 +2067,10 @@ sysfn_terminate: ; 18.2 = TERMINATE
|
|||||||
; restore default cursor before killing
|
; restore default cursor before killing
|
||||||
pusha
|
pusha
|
||||||
mov ecx, [esp+32]
|
mov ecx, [esp+32]
|
||||||
shl ecx, BSF sizeof.APPDATA
|
shl ecx, BSF sizeof.WDATA
|
||||||
add ecx, SLOT_BASE
|
add ecx, window_data
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
cmp [ecx + APPDATA.cursor], eax
|
cmp [ecx + WDATA.cursor], eax
|
||||||
je @f
|
je @f
|
||||||
call restore_default_cursor_before_killing
|
call restore_default_cursor_before_killing
|
||||||
@@:
|
@@:
|
||||||
@ -2172,8 +2184,8 @@ sysfn_zmodif:
|
|||||||
mov eax, edx
|
mov eax, edx
|
||||||
shl edx, BSF sizeof.WDATA
|
shl edx, BSF sizeof.WDATA
|
||||||
|
|
||||||
cmp [edx*(sizeof.APPDATA/sizeof.WDATA) + SLOT_BASE + APPDATA.state], TSTATE_FREE
|
test [window_data + edx + WDATA.fl_wstate], WSTATE_USED
|
||||||
je .fail
|
jz .fail
|
||||||
|
|
||||||
cmp ecx, 1
|
cmp ecx, 1
|
||||||
jnz .set_zmod
|
jnz .set_zmod
|
||||||
@ -2204,7 +2216,7 @@ sysfn_zmodif:
|
|||||||
call window._.redraw_top_wnd
|
call window._.redraw_top_wnd
|
||||||
|
|
||||||
shl esi, BSF sizeof.WDATA
|
shl esi, BSF sizeof.WDATA
|
||||||
mov [esi + window_data + WDATA.fl_redraw], 1
|
mov [esi + window_data + WDATA.fl_redraw], WSTATE_REDRAW
|
||||||
|
|
||||||
|
|
||||||
mov eax, 1
|
mov eax, 1
|
||||||
@ -2640,16 +2652,16 @@ sys_redrawstat:
|
|||||||
cmp ebx, 2
|
cmp ebx, 2
|
||||||
jnz .srl1
|
jnz .srl1
|
||||||
|
|
||||||
mov edx, [current_slot_idx] ; return whole screen draw area for this app
|
mov edx, [current_slot] ; return whole screen draw area for this app
|
||||||
shl edx, BSF sizeof.WDATA
|
mov edx, [edx + APPDATA.window]
|
||||||
mov [draw_data + edx + RECT.left], 0
|
mov [edx + WDATA.draw_data.left], 0
|
||||||
mov [draw_data + edx + RECT.top], 0
|
mov [edx + WDATA.draw_data.top], 0
|
||||||
mov eax, [_display.width]
|
mov eax, [_display.width]
|
||||||
dec eax
|
dec eax
|
||||||
mov [draw_data + edx + RECT.right], eax
|
mov [edx + WDATA.draw_data.right], eax
|
||||||
mov eax, [_display.height]
|
mov eax, [_display.height]
|
||||||
dec eax
|
dec eax
|
||||||
mov [draw_data + edx + RECT.bottom], eax
|
mov [edx + WDATA.draw_data.bottom], eax
|
||||||
|
|
||||||
.srl1:
|
.srl1:
|
||||||
ret
|
ret
|
||||||
@ -2863,14 +2875,14 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
backgr:
|
backgr:
|
||||||
mov eax, [draw_data + sizeof.WDATA + RECT.left]
|
mov eax, [background_window + WDATA.draw_data.left]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
add eax, [draw_data + sizeof.WDATA + RECT.right]
|
add eax, [background_window + WDATA.draw_data.right]
|
||||||
mov [BG_Rect_X_left_right], eax ; [left]*65536 + [right]
|
mov [BG_Rect_X_left_right], eax ; [left]*65536 + [right]
|
||||||
|
|
||||||
mov eax, [draw_data + sizeof.WDATA + RECT.top]
|
mov eax, [background_window + WDATA.draw_data.top]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
add eax, [draw_data + sizeof.WDATA + RECT.bottom]
|
add eax, [background_window + WDATA.draw_data.bottom]
|
||||||
mov [BG_Rect_Y_top_bottom], eax ; [top]*65536 + [bottom]
|
mov [BG_Rect_Y_top_bottom], eax ; [top]*65536 + [bottom]
|
||||||
|
|
||||||
call drawbackground
|
call drawbackground
|
||||||
@ -2884,47 +2896,53 @@ backgr:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
set_bgr_event:
|
set_bgr_event:
|
||||||
add edi, sizeof.APPDATA
|
add edi, sizeof.WDATA
|
||||||
mov eax, [BG_Rect_X_left_right]
|
mov eax, [BG_Rect_X_left_right]
|
||||||
mov edx, [BG_Rect_Y_top_bottom]
|
mov edx, [BG_Rect_Y_top_bottom]
|
||||||
cmp [SLOT_BASE + edi + APPDATA.draw_bgr_x], 0
|
cmp [window_data + edi + WDATA.draw_bgr_x], 0
|
||||||
jz .set
|
jz .set
|
||||||
.join:
|
.join:
|
||||||
cmp word [SLOT_BASE + edi + APPDATA.draw_bgr_x], ax
|
cmp word [window_data + edi + WDATA.draw_bgr_x], ax
|
||||||
jae @f
|
jae @f
|
||||||
mov word [SLOT_BASE + edi + APPDATA.draw_bgr_x], ax
|
mov word [window_data + edi + WDATA.draw_bgr_x], ax
|
||||||
@@:
|
@@:
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
cmp word [SLOT_BASE + edi + APPDATA.draw_bgr_x + 2], ax
|
cmp word [window_data + edi + WDATA.draw_bgr_x + 2], ax
|
||||||
jbe @f
|
jbe @f
|
||||||
mov word [SLOT_BASE + edi + APPDATA.draw_bgr_x + 2], ax
|
mov word [window_data + edi + WDATA.draw_bgr_x + 2], ax
|
||||||
@@:
|
@@:
|
||||||
cmp word [SLOT_BASE + edi + APPDATA.draw_bgr_y], dx
|
cmp word [window_data + edi + WDATA.draw_bgr_y], dx
|
||||||
jae @f
|
jae @f
|
||||||
mov word [SLOT_BASE + edi + APPDATA.draw_bgr_y], dx
|
mov word [window_data + edi + WDATA.draw_bgr_y], dx
|
||||||
@@:
|
@@:
|
||||||
shr edx, 16
|
shr edx, 16
|
||||||
cmp word [SLOT_BASE + edi + APPDATA.draw_bgr_y+2], dx
|
cmp word [window_data + edi + WDATA.draw_bgr_y+2], dx
|
||||||
jbe @f
|
jbe @f
|
||||||
mov word [SLOT_BASE + edi + APPDATA.draw_bgr_y+2], dx
|
mov word [window_data + edi + WDATA.draw_bgr_y+2], dx
|
||||||
@@:
|
@@:
|
||||||
jmp .common
|
jmp .common
|
||||||
.set:
|
.set:
|
||||||
mov [SLOT_BASE + edi + APPDATA.draw_bgr_x], eax
|
mov [window_data + edi + WDATA.draw_bgr_x], eax
|
||||||
mov [SLOT_BASE + edi + APPDATA.draw_bgr_y], edx
|
mov [window_data + edi + WDATA.draw_bgr_y], edx
|
||||||
.common:
|
.common:
|
||||||
or [SLOT_BASE + edi + APPDATA.occurred_events], EVENT_BACKGROUND
|
mov eax, [window_data + edi + WDATA.thread]
|
||||||
loop set_bgr_event
|
test eax, eax
|
||||||
|
jz @f
|
||||||
|
or [eax + APPDATA.occurred_events], EVENT_BACKGROUND
|
||||||
|
@@:
|
||||||
|
sub ecx, 1
|
||||||
|
jnz set_bgr_event
|
||||||
|
;loop set_bgr_event
|
||||||
pop edi ecx
|
pop edi ecx
|
||||||
;--------- set event 5 stop -----------
|
;--------- set event 5 stop -----------
|
||||||
dec [REDRAW_BACKGROUND] ; got new update request?
|
dec [REDRAW_BACKGROUND] ; got new update request?
|
||||||
jnz backgr
|
jnz backgr
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [draw_data + sizeof.WDATA + RECT.left], eax
|
mov [background_window + WDATA.draw_data.left], eax
|
||||||
mov [draw_data + sizeof.WDATA + RECT.top], eax
|
mov [background_window + WDATA.draw_data.top], eax
|
||||||
mov [draw_data + sizeof.WDATA + RECT.right], eax
|
mov [background_window + WDATA.draw_data.right], eax
|
||||||
mov [draw_data + sizeof.WDATA + RECT.bottom], eax
|
mov [background_window + WDATA.draw_data.bottom], eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
nobackgr:
|
nobackgr:
|
||||||
@ -2986,8 +3004,8 @@ newct:
|
|||||||
.terminate:
|
.terminate:
|
||||||
pushad
|
pushad
|
||||||
mov ecx, eax
|
mov ecx, eax
|
||||||
shl ecx, BSF sizeof.APPDATA
|
shl ecx, BSF sizeof.WDATA
|
||||||
add ecx, SLOT_BASE
|
add ecx, window_data
|
||||||
call restore_default_cursor_before_killing
|
call restore_default_cursor_before_killing
|
||||||
popad
|
popad
|
||||||
|
|
||||||
@ -3079,39 +3097,38 @@ bgli:
|
|||||||
jz .az
|
jz .az
|
||||||
|
|
||||||
mov dl, 0
|
mov dl, 0
|
||||||
lea eax, [edi + draw_data - window_data]
|
|
||||||
mov ebx, [draw_limits.left]
|
mov ebx, [draw_limits.left]
|
||||||
cmp ebx, [eax + RECT.left]
|
cmp ebx, [edi + WDATA.draw_data.left]
|
||||||
jae @f
|
jae @f
|
||||||
|
|
||||||
mov [eax + RECT.left], ebx
|
mov [edi + WDATA.draw_data.left], ebx
|
||||||
mov dl, 1
|
mov dl, 1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov ebx, [draw_limits.top]
|
mov ebx, [draw_limits.top]
|
||||||
cmp ebx, [eax + RECT.top]
|
cmp ebx, [edi + WDATA.draw_data.top]
|
||||||
jae @f
|
jae @f
|
||||||
|
|
||||||
mov [eax + RECT.top], ebx
|
mov [edi + WDATA.draw_data.top], ebx
|
||||||
mov dl, 1
|
mov dl, 1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov ebx, [draw_limits.right]
|
mov ebx, [draw_limits.right]
|
||||||
cmp ebx, [eax + RECT.right]
|
cmp ebx, [edi + WDATA.draw_data.right]
|
||||||
jbe @f
|
jbe @f
|
||||||
|
|
||||||
mov [eax + RECT.right], ebx
|
mov [edi + WDATA.draw_data.right], ebx
|
||||||
mov dl, 1
|
mov dl, 1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov ebx, [draw_limits.bottom]
|
mov ebx, [draw_limits.bottom]
|
||||||
cmp ebx, [eax + RECT.bottom]
|
cmp ebx, [edi + WDATA.draw_data.bottom]
|
||||||
jbe @f
|
jbe @f
|
||||||
|
|
||||||
mov [eax + RECT.bottom], ebx
|
mov [edi + WDATA.draw_data.bottom], ebx
|
||||||
mov dl, 1
|
mov dl, 1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -3123,18 +3140,15 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
.az:
|
.az:
|
||||||
mov eax, edi
|
mov eax, edi
|
||||||
add eax, draw_data-window_data
|
|
||||||
|
|
||||||
mov ebx, [draw_limits.left] ; set limits
|
mov ebx, [draw_limits.left] ; set limits
|
||||||
mov [eax + RECT.left], ebx
|
mov [eax + WDATA.draw_data.left], ebx
|
||||||
mov ebx, [draw_limits.top]
|
mov ebx, [draw_limits.top]
|
||||||
mov [eax + RECT.top], ebx
|
mov [eax + WDATA.draw_data.top], ebx
|
||||||
mov ebx, [draw_limits.right]
|
mov ebx, [draw_limits.right]
|
||||||
mov [eax + RECT.right], ebx
|
mov [eax + WDATA.draw_data.right], ebx
|
||||||
mov ebx, [draw_limits.bottom]
|
mov ebx, [draw_limits.bottom]
|
||||||
mov [eax + RECT.bottom], ebx
|
mov [eax + WDATA.draw_data.bottom], ebx
|
||||||
|
|
||||||
sub eax, draw_data-window_data
|
|
||||||
|
|
||||||
cmp dword [esp], 1
|
cmp dword [esp], 1
|
||||||
jne nobgrd
|
jne nobgrd
|
||||||
@ -3203,7 +3217,7 @@ align 4
|
|||||||
.found:
|
.found:
|
||||||
pop ebp edi eax
|
pop ebp edi eax
|
||||||
|
|
||||||
mov [eax + WDATA.fl_redraw], byte 1 ; mark as redraw
|
mov [eax + WDATA.fl_redraw], WSTATE_REDRAW ; mark as redraw
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
ricino:
|
ricino:
|
||||||
@ -3224,7 +3238,7 @@ calculatebackground: ; background
|
|||||||
mov ecx, [_display.win_map_size]
|
mov ecx, [_display.win_map_size]
|
||||||
shr ecx, 2
|
shr ecx, 2
|
||||||
rep stosd
|
rep stosd
|
||||||
mov byte[window_data + sizeof.WDATA + WDATA.z_modif], ZPOS_DESKTOP
|
mov byte[background_window + WDATA.z_modif], ZPOS_DESKTOP
|
||||||
mov [REDRAW_BACKGROUND], 0
|
mov [REDRAW_BACKGROUND], 0
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
; 0x80000000 -> 0FFF physical page zero - do not write
|
; 0x80000000 -> 0FFF physical page zero - do not write
|
||||||
; (used by int 13h in some configurations)
|
; (used by int 13h in some configurations)
|
||||||
;
|
;
|
||||||
; 0x80001000 -> 2FFF window_data - 256 entries
|
; 0x80001000 -> 8FFF window_data - 256 entries
|
||||||
;
|
;
|
||||||
; 0000 dword x start
|
; 0000 dword x start
|
||||||
; 0004 dword y start
|
; 0004 dword y start
|
||||||
@ -52,15 +52,6 @@
|
|||||||
; 0018 dword color of frames
|
; 0018 dword color of frames
|
||||||
; 001C dword window flags, +30 = window drawn, +31 redraw flag
|
; 001C dword window flags, +30 = window drawn, +31 redraw flag
|
||||||
;
|
;
|
||||||
; 3000 -> 4FFF free
|
|
||||||
;
|
|
||||||
; 5000 -> 68FF free (6k6)
|
|
||||||
; 6900 -> 6EFF saved picture under mouse pointer (1k5)
|
|
||||||
;
|
|
||||||
; 6F00 -> 6FFF free (256)
|
|
||||||
;
|
|
||||||
; 7000 -> 7FFF used CD driver
|
|
||||||
;
|
|
||||||
; 8000 -> A3FF used FLOPPY driver
|
; 8000 -> A3FF used FLOPPY driver
|
||||||
;
|
;
|
||||||
; A400 -> B0FF free (3k3), unused ACTIVE_PROC_STACK
|
; A400 -> B0FF free (3k3), unused ACTIVE_PROC_STACK
|
||||||
|
@ -294,14 +294,16 @@ proc set_cursor stdcall, hcursor:dword
|
|||||||
; cmp [eax+CURSOR.size], CURSOR_SIZE
|
; cmp [eax+CURSOR.size], CURSOR_SIZE
|
||||||
; jne .fail
|
; jne .fail
|
||||||
mov ebx, [current_slot]
|
mov ebx, [current_slot]
|
||||||
xchg eax, [ebx + APPDATA.cursor]
|
mov ebx, [ebx + APPDATA.window]
|
||||||
|
xchg eax, [ebx + WDATA.cursor]
|
||||||
jmp .end
|
jmp .end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.fail:
|
.fail:
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
mov ebx, [current_slot]
|
mov ebx, [current_slot]
|
||||||
xchg eax, [ebx + APPDATA.cursor]
|
mov ebx, [ebx + APPDATA.window]
|
||||||
|
xchg eax, [ebx + WDATA.cursor]
|
||||||
align 4
|
align 4
|
||||||
.end:
|
.end:
|
||||||
mov [redrawmouse_unconditional], 1
|
mov [redrawmouse_unconditional], 1
|
||||||
@ -464,10 +466,11 @@ proc delete_cursor stdcall, hcursor:dword
|
|||||||
jne .fail
|
jne .fail
|
||||||
|
|
||||||
mov ebx, [current_slot]
|
mov ebx, [current_slot]
|
||||||
cmp esi, [ebx + APPDATA.cursor]
|
mov ebx, [ebx + APPDATA.window]
|
||||||
|
cmp esi, [ebx + WDATA.cursor]
|
||||||
jne @F
|
jne @F
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
mov [ebx + APPDATA.cursor], eax
|
mov [ebx + WDATA.cursor], eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
|
@ -2013,9 +2013,9 @@ vesa20_drawbackground_tiled:
|
|||||||
|
|
||||||
pushad
|
pushad
|
||||||
; External loop for all y from start to end
|
; External loop for all y from start to end
|
||||||
mov ebx, [draw_data + sizeof.WDATA + RECT.top] ; y start
|
mov ebx, [background_window + WDATA.draw_data.top] ; y start
|
||||||
dp2:
|
dp2:
|
||||||
mov ebp, [draw_data + sizeof.WDATA + RECT.left] ; x start
|
mov ebp, [background_window + WDATA.draw_data.left] ; x start
|
||||||
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp]
|
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp]
|
||||||
; and LFB data (output for our function) [edi]
|
; and LFB data (output for our function) [edi]
|
||||||
; mov eax, [BytesPerScanLine]
|
; mov eax, [BytesPerScanLine]
|
||||||
@ -2113,7 +2113,7 @@ vesa20_drawbackground_tiled:
|
|||||||
|
|
||||||
add ebp, edx
|
add ebp, edx
|
||||||
add eax, edx
|
add eax, edx
|
||||||
cmp eax, [draw_data + sizeof.WDATA + RECT.right]
|
cmp eax, [background_window + WDATA.draw_data.right]
|
||||||
ja dp4
|
ja dp4
|
||||||
sub ecx, edx
|
sub ecx, edx
|
||||||
jnz dp3
|
jnz dp3
|
||||||
@ -2128,7 +2128,7 @@ vesa20_drawbackground_tiled:
|
|||||||
dp4:
|
dp4:
|
||||||
; next scan line
|
; next scan line
|
||||||
inc ebx
|
inc ebx
|
||||||
cmp ebx, [draw_data + sizeof.WDATA + RECT.bottom]
|
cmp ebx, [background_window + WDATA.draw_data.bottom]
|
||||||
jbe dp2
|
jbe dp2
|
||||||
popad
|
popad
|
||||||
mov [EGA_counter], 1
|
mov [EGA_counter], 1
|
||||||
@ -2166,8 +2166,8 @@ vesa20_drawbackground_stretch:
|
|||||||
push eax ; low
|
push eax ; low
|
||||||
|
|
||||||
; External loop for all y from start to end
|
; External loop for all y from start to end
|
||||||
mov ebx, [draw_data + sizeof.WDATA + RECT.top] ; y start
|
mov ebx, [background_window + WDATA.draw_data.top] ; y start
|
||||||
mov ebp, [draw_data + sizeof.WDATA + RECT.left] ; x start
|
mov ebp, [background_window + WDATA.draw_data.left] ; x start
|
||||||
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp]
|
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp]
|
||||||
; and LFB data (output for our function) [edi]
|
; and LFB data (output for our function) [edi]
|
||||||
; mov eax, [BytesPerScanLine]
|
; mov eax, [BytesPerScanLine]
|
||||||
@ -2309,7 +2309,7 @@ vesa20_drawbackground_stretch:
|
|||||||
add eax, 1
|
add eax, 1
|
||||||
mov [esp+20], eax
|
mov [esp+20], eax
|
||||||
add esi, 4
|
add esi, 4
|
||||||
cmp eax, [draw_data + sizeof.WDATA + RECT.right]
|
cmp eax, [background_window + WDATA.draw_data.right]
|
||||||
jbe sdp3a
|
jbe sdp3a
|
||||||
|
|
||||||
sdp4:
|
sdp4:
|
||||||
@ -2317,11 +2317,11 @@ vesa20_drawbackground_stretch:
|
|||||||
mov ebx, [esp+24]
|
mov ebx, [esp+24]
|
||||||
add ebx, 1
|
add ebx, 1
|
||||||
mov [esp+24], ebx
|
mov [esp+24], ebx
|
||||||
cmp ebx, [draw_data + sizeof.WDATA + RECT.bottom]
|
cmp ebx, [background_window + WDATA.draw_data.bottom]
|
||||||
ja sdpdone
|
ja sdpdone
|
||||||
|
|
||||||
; advance edi, ebp to next scan line
|
; advance edi, ebp to next scan line
|
||||||
sub eax, [draw_data + sizeof.WDATA + RECT.left]
|
sub eax, [background_window + WDATA.draw_data.left]
|
||||||
sub ebp, eax
|
sub ebp, eax
|
||||||
add ebp, [_display.width]
|
add ebp, [_display.width]
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
@ -2346,7 +2346,7 @@ vesa20_drawbackground_stretch:
|
|||||||
lea eax, [eax*3]
|
lea eax, [eax*3]
|
||||||
imul eax, [BgrDataWidth]
|
imul eax, [BgrDataWidth]
|
||||||
sub [esp], eax
|
sub [esp], eax
|
||||||
mov eax, [draw_data + sizeof.WDATA + RECT.left]
|
mov eax, [background_window + WDATA.draw_data.left]
|
||||||
mov [esp+20], eax
|
mov [esp+20], eax
|
||||||
test ebx, ebx
|
test ebx, ebx
|
||||||
jz sdp3
|
jz sdp3
|
||||||
@ -2386,7 +2386,7 @@ smooth_line:
|
|||||||
mov eax, [esp+20+8]
|
mov eax, [esp+20+8]
|
||||||
add eax, 1
|
add eax, 1
|
||||||
mov [esp+20+8], eax
|
mov [esp+20+8], eax
|
||||||
cmp eax, [draw_data + sizeof.WDATA + RECT.right]
|
cmp eax, [background_window + WDATA.draw_data.right]
|
||||||
ja @f
|
ja @f
|
||||||
add ecx, [esp+36+8]
|
add ecx, [esp+36+8]
|
||||||
mov eax, edx
|
mov eax, edx
|
||||||
@ -2396,7 +2396,7 @@ smooth_line:
|
|||||||
sub esi, eax
|
sub esi, eax
|
||||||
jmp smooth_line
|
jmp smooth_line
|
||||||
@@:
|
@@:
|
||||||
mov eax, [draw_data + sizeof.WDATA + RECT.left]
|
mov eax, [background_window + WDATA.draw_data.left]
|
||||||
mov [esp+20+8], eax
|
mov [esp+20+8], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user