Rev 5663 | Rev 5677 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5663 | hidnplayr | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
3 | ;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;; |
||
4 | ;; Distributed under terms of the GNU General Public License ;; |
||
5 | ;; ;; |
||
6 | ;; VNC client for KolibriOS ;; |
||
7 | ;; ;; |
||
8 | ;; Written by hidnplayr@kolibrios.org ;; |
||
9 | ;; ;; |
||
10 | ;; GNU GENERAL PUBLIC LICENSE ;; |
||
11 | ;; Version 2, June 1991 ;; |
||
12 | ;; ;; |
||
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
3545 | hidnplayr | 14 | |
5663 | hidnplayr | 15 | encoding_raw: |
3545 | hidnplayr | 16 | |
5663 | hidnplayr | 17 | DEBUGF 1,"RAW\n" |
3545 | hidnplayr | 18 | |
5668 | hidnplayr | 19 | mov eax, [rectangle.width] |
20 | mov ebx, [rectangle.height] |
||
5663 | hidnplayr | 21 | mul ebx |
22 | add eax, esi |
||
23 | @@: |
||
24 | cmp [datapointer], eax |
||
25 | jae @f |
||
26 | push eax |
||
27 | call read_data.more |
||
28 | pop eax |
||
29 | jmp @b |
||
30 | @@: |
||
3545 | hidnplayr | 31 | |
5668 | hidnplayr | 32 | mov eax, [rectangle.y] |
5663 | hidnplayr | 33 | movzx ebx, [screen.width] |
34 | mul ebx ; [screen.width]*[rectangle.y] |
||
5668 | hidnplayr | 35 | mov ebx, [rectangle.x] |
5663 | hidnplayr | 36 | add eax, ebx ; [screen.width]*[rectangle.y]+[rectangle.x] |
37 | lea edi, [framebuffer_data+eax*3] ; edi = framebuffer_data+([screen.width]*[rectangle.y]+[rectangle.x])*3 |
||
3545 | hidnplayr | 38 | |
5663 | hidnplayr | 39 | movzx eax, [screen.width] |
5668 | hidnplayr | 40 | sub eax, [rectangle.width] |
5663 | hidnplayr | 41 | lea ebp, [eax*3] ; ebp = ([screen.width]-[rectangle.width])*3 |
3545 | hidnplayr | 42 | |
5663 | hidnplayr | 43 | mov bl, 85 |
3545 | hidnplayr | 44 | |
5668 | hidnplayr | 45 | mov edx, [rectangle.height] |
3545 | hidnplayr | 46 | |
5663 | hidnplayr | 47 | .lineloop: |
5668 | hidnplayr | 48 | mov ecx, [rectangle.width] |
3545 | hidnplayr | 49 | |
5663 | hidnplayr | 50 | .pixelloop: |
51 | mov al, [esi] |
||
52 | shr al, 4 |
||
53 | and al, 3 |
||
54 | mul bl |
||
55 | stosb |
||
3545 | hidnplayr | 56 | |
5663 | hidnplayr | 57 | mov al, [esi] |
58 | shr al, 2 |
||
59 | and al, 3 |
||
60 | mul bl |
||
61 | stosb |
||
3545 | hidnplayr | 62 | |
5663 | hidnplayr | 63 | mov al, [esi] |
64 | and al, 3 |
||
65 | mul bl |
||
66 | stosb |
||
3545 | hidnplayr | 67 | |
5663 | hidnplayr | 68 | inc esi |
69 | dec ecx |
||
70 | jnz .pixelloop |
||
3545 | hidnplayr | 71 | |
5663 | hidnplayr | 72 | add edi, ebp |
73 | dec edx |
||
74 | jnz .lineloop |
||
75 | jmp next_rectangle |
||
3545 | hidnplayr | 76 |