Subversion Repositories Kolibri OS

Rev

Rev 4336 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. proc MovingWnd
  2. local MySlot:DWORD
  3.         mcall   40,0    ;SetMaskMessage 000b
  4.  
  5.         mcall   12,1    ;RedrawWinBeg
  6.  
  7.         mcall   14
  8.         xor     ebx,ebx
  9.         xor     ecx,ecx
  10.         mov     cx,ax
  11.         shr     eax,16
  12.         mov     cx,ax
  13.         dec     ebx
  14.         dec     ecx
  15.         mcall   0,,,01000000h
  16.         mcall   12,2    ;RedrawWinEnd
  17.  
  18.  
  19.         mov     eax,[SelIcon]
  20.         call    DrawIconToArea
  21.  
  22.         mcall   37,4,IconArea,10100002h
  23.         push    eax
  24.         test    eax,eax
  25.         jz      @f
  26.         mov     ecx,eax
  27.         mcall   37,5
  28.  
  29.      @@:
  30.         mcall   9,RBProcInfo,-1    ;+30
  31.         mcall   18,21,dword[RBProcInfo+30]
  32.         mov     [MySlot],eax
  33.  
  34.   .messages:
  35.         cmp     [MovingActiv],1
  36.         jne     .close
  37.         mcall   18,7
  38.         cmp     eax,[MySlot]
  39.         je      @f
  40.         mcall   18,3,[MySlot]
  41.      @@:
  42.  
  43.         mcall   5,1     ;Yield
  44.         jmp     .messages
  45.  
  46. .close:
  47.         pop     ecx
  48.         test    ecx,ecx
  49.         jz      @f
  50.         mcall   37,6
  51.      @@:
  52.  
  53.  
  54.         mcall   -1
  55.  
  56. endp
  57.  
  58.  
  59.  
  60. ;eax = NumIcon
  61. proc DrawIconToArea  ;¯à¥¤­ §­ ç¥­ ¤«ï ¨ª®­®ª à §¬¥à®¬ = 32x32
  62.         push    edi esi
  63.  
  64.         ;mov     eax,[NumIcon]
  65.         mov     edi,[IconsOffs+eax*4]
  66.         xor     al,al
  67.         or      ecx,-1
  68.         repne   scasb
  69.         repne   scasb
  70.         repne   scasb
  71.         stdcall strToInt,edi
  72.  
  73.      @@:             ;eax=num icon
  74.         cmp     eax,[icon_count]
  75.         jb      @f
  76.         xor     eax,eax
  77.      @@:
  78.         test    eax,eax
  79.         je      .DIA
  80.         mov     ecx,eax
  81.         xor     eax,eax
  82.       @@:
  83.         add     eax,32*32*4;IMG_SIZE*IMG_SIZE*4
  84.         loop    @b
  85.      .DIA:
  86.         mov     esi,eax
  87.         add     esi,[raw_pointer]
  88.         add     esi,44
  89.  
  90.         mov     edi,IconArea;+((IMAGE_TOP_Y*ICON_SIZE)+((ICON_SIZE-IMG_SIZE)/2))*4
  91. ;int3
  92.         mov     eax,32;IMG_SIZE
  93.         mov     edx,eax
  94.       @@:
  95.         mov     ecx,eax
  96.         rep     movsd
  97.      ;   add     edi,32*4
  98.         dec     edx
  99.         jnz     @b
  100.  
  101.         pop     esi edi
  102.         ret
  103. endp
  104.