2015-08-03 14:32:28 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
|
|
|
;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;; VNC client for KolibriOS ;;
|
|
|
|
;; ;;
|
|
|
|
;; Written by hidnplayr@kolibrios.org ;;
|
|
|
|
;; ;;
|
|
|
|
;; GNU GENERAL PUBLIC LICENSE ;;
|
|
|
|
;; Version 2, June 1991 ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
encoding_raw:
|
|
|
|
|
|
|
|
DEBUGF 1,"RAW\n"
|
|
|
|
|
2015-08-03 20:07:56 +02:00
|
|
|
mov eax, [rectangle.width]
|
|
|
|
mov ebx, [rectangle.height]
|
2015-08-03 14:32:28 +02:00
|
|
|
mul ebx
|
|
|
|
add eax, esi
|
|
|
|
@@:
|
|
|
|
cmp [datapointer], eax
|
|
|
|
jae @f
|
|
|
|
push eax
|
|
|
|
call read_data.more
|
|
|
|
pop eax
|
|
|
|
jmp @b
|
|
|
|
@@:
|
|
|
|
|
2015-08-03 20:07:56 +02:00
|
|
|
mov eax, [rectangle.y]
|
2015-08-03 14:32:28 +02:00
|
|
|
movzx ebx, [screen.width]
|
|
|
|
mul ebx ; [screen.width]*[rectangle.y]
|
2015-08-03 20:07:56 +02:00
|
|
|
mov ebx, [rectangle.x]
|
2015-08-03 14:32:28 +02:00
|
|
|
add eax, ebx ; [screen.width]*[rectangle.y]+[rectangle.x]
|
|
|
|
lea edi, [framebuffer_data+eax*3] ; edi = framebuffer_data+([screen.width]*[rectangle.y]+[rectangle.x])*3
|
|
|
|
|
|
|
|
movzx eax, [screen.width]
|
2015-08-03 20:07:56 +02:00
|
|
|
sub eax, [rectangle.width]
|
2015-08-03 14:32:28 +02:00
|
|
|
lea ebp, [eax*3] ; ebp = ([screen.width]-[rectangle.width])*3
|
|
|
|
|
|
|
|
mov bl, 85
|
|
|
|
|
2015-08-03 20:07:56 +02:00
|
|
|
mov edx, [rectangle.height]
|
2015-08-03 14:32:28 +02:00
|
|
|
|
|
|
|
.lineloop:
|
2015-08-03 20:07:56 +02:00
|
|
|
mov ecx, [rectangle.width]
|
2015-08-03 14:32:28 +02:00
|
|
|
|
|
|
|
.pixelloop:
|
|
|
|
mov al, [esi]
|
|
|
|
shr al, 4
|
|
|
|
and al, 3
|
|
|
|
mul bl
|
|
|
|
stosb
|
|
|
|
|
|
|
|
mov al, [esi]
|
|
|
|
shr al, 2
|
|
|
|
and al, 3
|
|
|
|
mul bl
|
|
|
|
stosb
|
|
|
|
|
|
|
|
mov al, [esi]
|
|
|
|
and al, 3
|
|
|
|
mul bl
|
|
|
|
stosb
|
|
|
|
|
|
|
|
inc esi
|
|
|
|
dec ecx
|
|
|
|
jnz .pixelloop
|
|
|
|
|
|
|
|
add edi, ebp
|
|
|
|
dec edx
|
|
|
|
jnz .lineloop
|
|
|
|
jmp next_rectangle
|
2007-01-06 02:10:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|