forked from offtopia/ponydos
Allow moving windows off the left side of screen
This commit is contained in:
parent
b2697f2bff
commit
1ef3695608
1 changed files with 10 additions and 5 deletions
15
shell.asm
15
shell.asm
|
@ -158,11 +158,19 @@ paint:
|
|||
mov cx, bx
|
||||
add cx, di
|
||||
cmp cx, COLUMNS
|
||||
jle .no_clipping_width
|
||||
jle .no_clipping_width_right
|
||||
mov cx, COLUMNS
|
||||
.no_clipping_width:
|
||||
.no_clipping_width_right:
|
||||
sub cx, di
|
||||
|
||||
cmp di, 0
|
||||
jge .no_clipping_width_left
|
||||
sub si, di
|
||||
sub si, di
|
||||
add cx, di
|
||||
xor di, di
|
||||
.no_clipping_width_left:
|
||||
|
||||
call PONYDOS_SEG:SYS_DRAW_RECT
|
||||
|
||||
ret
|
||||
|
@ -294,9 +302,6 @@ move:
|
|||
mov [si + window.x], cx
|
||||
mov dx, [si + window.res_x]
|
||||
sub [si + window.x], dx
|
||||
jnc .not_underflow
|
||||
|
||||
mov word [si + window.x], 0
|
||||
|
||||
.not_underflow:
|
||||
pop dx
|
||||
|
|
Loading…
Reference in a new issue