Subversion Repositories Kolibri OS

Rev

Rev 3545 | Rev 5677 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14.  
  15. encoding_raw:
  16.  
  17.         DEBUGF  1,"RAW\n"
  18.  
  19.         movzx   eax, [rectangle.width]
  20.         movzx   ebx, [rectangle.height]
  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.   @@:
  31.  
  32.         movzx   eax, [rectangle.y]
  33.         movzx   ebx, [screen.width]
  34.         mul     ebx                                     ; [screen.width]*[rectangle.y]
  35.         movzx   ebx, [rectangle.x]
  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
  38.  
  39.         movzx   eax, [screen.width]
  40.         sub     ax, [rectangle.width]
  41.         lea     ebp, [eax*3]                            ; ebp = ([screen.width]-[rectangle.width])*3
  42.  
  43.         mov     bl, 85
  44.  
  45.         movzx   edx, [rectangle.height]
  46.  
  47.   .lineloop:
  48.         movzx   ecx, [rectangle.width]
  49.  
  50.   .pixelloop:
  51.         mov     al, [esi]
  52.         shr     al, 4
  53.         and     al, 3
  54.         mul     bl
  55.         stosb
  56.  
  57.         mov     al, [esi]
  58.         shr     al, 2
  59.         and     al, 3
  60.         mul     bl
  61.         stosb
  62.  
  63.         mov     al, [esi]
  64.         and     al, 3
  65.         mul     bl
  66.         stosb
  67.  
  68.         inc     esi
  69.         dec     ecx
  70.         jnz     .pixelloop
  71.  
  72.         add     edi, ebp
  73.         dec     edx
  74.         jnz     .lineloop
  75.         jmp     next_rectangle
  76.  
  77.  
  78.  
  79.