Subversion Repositories Kolibri OS

Rev

Rev 3899 | Go to most recent revision | 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.         mov     al,[edi]
  72.         cmp     al,'9'
  73.         ja      .PathToIcon
  74.         cmp     al,'/'
  75.         jne     .GetIconInd
  76.    .PathToIcon:
  77.         mov     al,30h           ;§ £«ã誠!!!!!!!!!!!!!
  78.         mov     byte[edi+1],0
  79.    .GetIconInd:
  80. ;int3
  81.         sub     al,30h
  82.         cmp     byte[edi+1],0
  83.         je      @f
  84.         shl     eax,1
  85.         lea     eax,[eax*4+eax]
  86.         xor     edx,edx
  87.         mov     dl,[edi+1]
  88.         sub     dl,30h
  89.         add     eax,edx
  90.      @@:             ;eax=num icon
  91.         cmp     eax,[icon_count]
  92.         jb      @f
  93.         xor     eax,eax
  94.      @@:
  95.         test    eax,eax
  96.         je      .DIA
  97.         mov     ecx,eax
  98.         xor     eax,eax
  99.       @@:
  100.         add     eax,32*32*4;IMG_SIZE*IMG_SIZE*4
  101.         loop    @b
  102.      .DIA:
  103.         mov     esi,eax
  104.         add     esi,[raw_pointer]
  105.         add     esi,44
  106.  
  107.         mov     edi,IconArea;+((IMAGE_TOP_Y*ICON_SIZE)+((ICON_SIZE-IMG_SIZE)/2))*4
  108. ;int3
  109.         mov     eax,32;IMG_SIZE
  110.         mov     edx,eax
  111.       @@:
  112.         mov     ecx,eax
  113.         rep     movsd
  114.      ;   add     edi,32*4
  115.         dec     edx
  116.         jnz     @b
  117.  
  118.         pop     esi edi
  119.         ret
  120. endp
  121.