Subversion Repositories Kolibri OS

Rev

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

  1. idbChange       equ 2
  2. idbCreate       equ 3
  3. idbLeft         equ 4
  4. idbRight        equ 5
  5. idbCancel       equ 1
  6.  
  7. DlgAdd:
  8. DlgProp:
  9.  
  10.         mov     eax,[SelIcon]
  11.         mov     [DlgSelIcon],eax
  12.         cmp     eax,-1
  13.         jne     SetProp
  14.  
  15.     ;-----------
  16.         mov     eax,[MouseX]
  17.         mov     ebx,[MouseY]
  18.  
  19.         cmp     ax,[wsX]
  20.         jae     @f
  21.         mov     ax,[wsX]
  22.       @@:
  23.  
  24.         cmp     bx,[wsY]
  25.         jae     @f
  26.         mov     bx,[wsY]
  27.       @@:                           ;eax,ebx - ॠ«ì­ ï ª®®à¤¨­ â . ‚ᥠª®®à¤¨­ âë ¢ ¯à®£¥ ®â­®á¨â¥«ì­® «¥¢®£® ¢¥àå­¥£® 㣫  à ¡®ç¥© ®¡« áâ¨
  28.  
  29.         xor     edx,edx
  30.         mov     dx,[wsXe]
  31.         sub     edx,ICON_SIZE
  32.         cmp     eax,edx
  33.         jbe     @f
  34.         mov     eax,edx
  35.       @@:
  36.  
  37.         mov     dx,[wsYe]
  38.         sub     edx,ICON_SIZE
  39.         cmp     ebx,edx
  40.         jbe     @f
  41.         mov     ebx,edx
  42.       @@:
  43.  
  44.         xor     edx,edx              ;¯à¥®¡à §®¢ë¢ ¥¬ ¢ ®â­®á¨â¥«ì­ë¥
  45.         mov     dx,[wsW]
  46.         shr     edx,1
  47.         add     dx,[wsX]
  48.         cmp     eax,edx
  49.         jbe     @f
  50.         sub     ax,[wsXe]
  51.         inc     ax
  52.         jmp     .dlg1
  53.       @@:
  54.         sub     ax,[wsX]
  55.     .dlg1:
  56.  
  57.         xor     edx,edx
  58.         mov     dx,[wsH]
  59.         shr     edx,1
  60.         add     dx,[wsY]
  61.         cmp     ebx,edx
  62.         jbe     @f
  63.         sub     bx,[wsYe]
  64.         inc     bx
  65.         jmp     .dlg2
  66.       @@:
  67.         sub     bx,[wsY]
  68.     .dlg2:
  69.  
  70.         mov     [AddX],eax
  71.         mov     [AddY],ebx
  72.     ;-----------
  73.  
  74.         mov     ecx,NAME_LENGTH
  75.         mov     edi,DAreaName
  76.         xor     al,al
  77.         rep     stosb
  78.         mov     dword[edtName.size],0
  79.         mov     dword[edtName.pos],0
  80.  
  81.         mov     ecx,256
  82.         mov     edi,DAreaPath
  83.         rep     stosb
  84.         mov     dword[edtExePath.size],0
  85.         mov     dword[edtExePath.pos],0
  86.  
  87.         mov     ecx,256
  88.         mov     edi,DAreaParams
  89.         rep     stosb
  90.         mov     dword[edtParams.size],0
  91.         mov     dword[edtParams.pos],0
  92.  
  93.         mov     ecx,256
  94.         mov     edi,DAreaIcon
  95.        
  96.         mov     [DAreaIcon],'0'
  97.         mov     dword[edtIcon.size],1
  98.         mov     dword[edtIcon.pos],1
  99.  
  100.         jmp     startDlg
  101.     ;--------
  102. SetProp:
  103.         mov     esi,[IconsOffs+eax*4]
  104.         mov     edi,DAreaName
  105.         xor     ecx,ecx
  106.      @@:
  107.         lodsb
  108.         stosb
  109.         inc     ecx
  110.         test    al,al
  111.         jnz     @b
  112.         dec     ecx
  113.         mov     dword[edtName.size],ecx
  114.         mov     dword[edtName.pos],ecx
  115.  
  116.         xor     ecx,ecx
  117.         mov     edi,DAreaPath
  118.      @@:
  119.         lodsb
  120.         stosb
  121.         inc     ecx
  122.         test    al,al
  123.         jnz     @b
  124.         dec     ecx
  125.         mov     dword[edtExePath.size],ecx
  126.         mov     dword[edtExePath.pos],ecx
  127.  
  128.         xor     ecx,ecx
  129.         mov     edi,DAreaParams
  130.      @@:
  131.         lodsb
  132.         stosb
  133.         inc     ecx
  134.         test    al,al
  135.         jnz     @b
  136.         dec     ecx
  137.         mov     dword[edtParams.size],ecx
  138.         mov     dword[edtParams.pos],ecx
  139.  
  140.         xor     ecx,ecx
  141.         mov     edi,DAreaIcon
  142.      @@:
  143.         lodsb
  144.         stosb
  145.         inc     ecx
  146.         test    al,al
  147.         jnz     @b
  148.         dec     ecx
  149.         mov     dword[edtIcon.size],ecx
  150.         mov     dword[edtIcon.pos],ecx
  151.  
  152.  
  153. startDlg:
  154.         mcall   9,RBProcInfo,-1
  155.         mcall   18,21,dword[RBProcInfo+30]
  156.         mov     [slotDlgAdd],eax
  157.  
  158.         or      [edtName.flags],ed_focus
  159.  
  160.         mcall   40,EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER
  161.         xor     eax,eax
  162.         mov     dword[MaxPage],0
  163.       @@:
  164.         add     eax,ICONS_DRAW_COUNTW
  165.         inc     dword[MaxPage]
  166.         cmp     eax,[icon_count]
  167.         jb      @b
  168.         dec     dword[MaxPage]
  169.         cmp     dword[MaxPage],0
  170.         jne     @f
  171.         mov     dword[MaxPage],1
  172.       @@:
  173.  
  174. DReDraw:
  175.         mcall   48,3,sc,40
  176.  
  177.         mov     eax,[sc.work]
  178.         rol     eax,16
  179.         add     al,9
  180.         jnc     @f
  181.         mov     al,0FFh
  182.       @@:
  183.         rol     eax,16
  184.         add     al,9
  185.         jnc     @f
  186.         mov     al,0FFh
  187.       @@:
  188.         add     ah,9
  189.         jnc     @f
  190.         mov     ah,0FFh
  191.       @@:
  192.  
  193.         mov     [sbIcons.bckg_col],eax
  194.         m2m     [sbIcons.frnt_col],[sc.work]
  195.         m2m     [sbIcons.line_col],[sc.work_graph]
  196.  
  197.         ;edit_boxes_set_sys_color edtIcon,endEdits,sc
  198.         edit_boxes_set_sys_color edtName,endEdits,sc
  199.        
  200.         m2m     [edtIcon.color],[sc.work]
  201.         m2m     [edtIcon.blur_border_color],[sc.work]
  202.  
  203.         call    DRedrawWin
  204.  
  205. DMessages:
  206.         mcall   10              ;WaitMessage
  207.  
  208.         dec     eax
  209.         jz      DReDraw
  210.         dec     eax
  211.         jz      DKey
  212.         dec     eax
  213.         jz      DButton
  214.         sub     eax,3
  215.         jz      DMouse
  216.  
  217.         jmp  DMessages
  218.  
  219.  
  220. ;---------------------------------------------------------------------
  221. DKey:
  222.         mcall   2               ;GetKeyPressed
  223.         cmp     ah,1Bh
  224.         je      DExit
  225.         cmp     ah,9  ;Tab
  226.         je      DNextEdit
  227.         stdcall [edit_box_key],edtName
  228.         stdcall [edit_box_key],edtExePath
  229.         stdcall [edit_box_key],edtParams
  230.         ;stdcall [edit_box_key],edtIcon
  231.  
  232.         jmp     DMessages
  233.  
  234.  
  235. DNextEdit:
  236.         test    [edtName.flags],ed_focus
  237.         jne      .DNE1
  238.         test    [edtExePath.flags],ed_focus
  239.         jne      .DNE2
  240.         test    [edtParams.flags],ed_focus
  241.         jne      .DNE3
  242.         ;test    [edtIcon.flags],ed_focus
  243.         ;jne      .DNE4
  244.         jmp     DMessages
  245.  
  246.     .DNE1:
  247.         and     [edtName.flags],not ed_focus
  248.         or      [edtExePath.flags],ed_focus
  249.         stdcall [edit_box_draw],edtName
  250.         stdcall [edit_box_draw],edtExePath
  251.         jmp     DMessages
  252.  
  253.     .DNE2:
  254.         and     [edtExePath.flags],not ed_focus
  255.         or      [edtParams.flags],ed_focus
  256.         stdcall [edit_box_draw],edtExePath
  257.         stdcall [edit_box_draw],edtParams
  258.         jmp     DMessages
  259.  
  260.     .DNE3:
  261.         and     [edtParams.flags],not ed_focus
  262.         or      [edtName.flags],ed_focus
  263.         stdcall [edit_box_draw],edtParams
  264.         stdcall [edit_box_draw],edtName
  265.         jmp     DMessages
  266.  
  267.     ;.DNE4:
  268.     ;    and     [edtIcon.flags],not ed_focus
  269.     ;    or      [edtName.flags],ed_focus
  270.     ;    stdcall [edit_box_draw],edtName
  271.     ;    stdcall [edit_box_draw],edtIcon
  272.     ;    jmp     DMessages
  273. ;---------------------------------------------------------------------
  274. DButton:
  275.         mcall   17              ;GetButtonPressed
  276.         cmp     ah, idbCancel
  277.         je      DExit
  278.         cmp     ah,idbChange
  279.         je      DSetExePath
  280.         cmp     ah,idbCreate
  281.         je      DSaveIcon
  282.  
  283.         jmp     DMessages
  284. ;-------------------------------------------------------------------------------
  285. DMouse:
  286.         stdcall [edit_box_mouse],edtName
  287.         stdcall [edit_box_mouse],edtExePath
  288.         stdcall [edit_box_mouse],edtParams
  289. ;        stdcall [edit_box_mouse],edtIcon
  290.  
  291.         push    [sbIcons.position]
  292.         stdcall [scrollbar_h_mouse],sbIcons
  293.         pop     eax
  294.         cmp     eax,[sbIcons.position]
  295.         je      @f
  296.         call    DrawStdIcons
  297.       @@:
  298.  
  299.         mcall   37,2            ;GetMouseKey
  300.         test    eax,1
  301.         jz      DMessages
  302.         mcall   37,1            ;GetMouseWinPos
  303.  
  304.         test    eax,10001000h
  305.         jne     DMessages
  306.         xor     edx,edx
  307.         mov     dx,ax     ;y
  308.         shr     eax,16    ;x
  309.  
  310.         sub     eax,ICONSX
  311.         js      DMessages
  312.         sub     edx,ICONSY
  313.         js      DMessages
  314.  
  315.         cmp     eax,(IMG_SIZE+SPCW)*ICONS_DRAW_COUNTW-SPCW
  316.         ja      DMessages
  317.         cmp     edx,(IMG_SIZE+SPCH)*ICONS_DRAW_COUNTH-SPCH
  318.         ja      DMessages
  319.  
  320.         xor     ebx,ebx
  321.         mov     ecx,[sbIcons.position]
  322.         test    ecx,ecx
  323.         jz      .DM
  324.      @@:
  325.         add     ebx,ICONS_DRAW_COUNTH
  326.         loop    @b
  327.      .DM:
  328.  
  329.         sub     eax,IMG_SIZE+SPCW
  330.         js     .DM1
  331.      @@:
  332.         add     ebx,ICONS_DRAW_COUNTH
  333.         sub     eax,IMG_SIZE+SPCW
  334.         jns     @b
  335.      .DM1:
  336.  
  337.  
  338.         sub     edx,IMG_SIZE+SPCH
  339.         js     .DM2
  340.      @@:
  341.         inc     ebx
  342.         sub     edx,IMG_SIZE+SPCH
  343.         jns     @b
  344.      .DM2:
  345.  
  346.         mov     eax,ebx
  347.  
  348.         cmp     eax,[icon_count]
  349.         jae     DMessages
  350.  
  351.         mov     bl,10
  352.         div     bl
  353.  
  354.         add     ah,30h
  355.         test    al,al
  356.         jz      @f
  357.  
  358.         add     al,30h
  359.         mov     byte[DAreaIcon],al
  360.         mov     byte[DAreaIcon+1],ah
  361.         mov     byte[DAreaIcon+2],0
  362.         mov     dword[edtIcon.size],2
  363.         jmp     .RedrawNum
  364.  
  365.       @@:
  366.         mov     byte[DAreaIcon],ah
  367.         mov     byte[DAreaIcon+1],0
  368.         mov     dword[edtIcon.size],1
  369.         jmp     .RedrawNum
  370.     .RedrawNum:
  371.        
  372.     ; stdcall [edit_box_draw],edtIcon
  373.  
  374.         call DrawSelIcon
  375.         jmp      DMessages
  376. ;-------------------------------------------------------------------------------
  377. DSetExePath:
  378.         stdcall [OpenDialog_Start],OpenDialog_data
  379.         mov     edi,DAreaPath
  380.         xor     al,al
  381.         or      ecx,-1
  382.         repne   scasb
  383.         sub     edi,DAreaPath
  384.         dec     edi
  385.         mov     dword[edtExePath+12*4],edi
  386.  
  387.         jmp     DMessages;DReDraw;
  388.  
  389. DSaveIcon:
  390.         mov     edi,DAreaName
  391.         mov     esi,secRButt
  392.     @@: lodsb
  393.         scasb
  394.         jne     @f
  395.         test    al,al
  396.         jnz     @b
  397.  
  398.         mov     dword[fiRunProg+8],ErrName
  399.         mov     dword[fiRunProg+21],pthNotify
  400.         mcall   70,fiRunProg
  401.  
  402.         jmp     DMessages
  403.     @@:
  404.         mov     dword[fiRunProg+8],WarningSave
  405.         mov     dword[fiRunProg+21],pthNotify
  406.         mcall   70,fiRunProg
  407.  
  408.  
  409.         cmp     [DlgSelIcon],-1
  410.         je      @f
  411.  
  412.         stdcall EditIcon,[DlgSelIcon],DAreaIcon,DAreaName,DAreaPath,DAreaParams
  413.         mov     ebx,[DlgSelIcon]
  414.         mov     eax,[IconsID+ebx*4]
  415.         jmp     DExitAndSave
  416.      @@:
  417.  
  418.         call    GenerateID
  419.  
  420.         mov     ebx,[MaxNumIcon]
  421.         mov     [IconsID+ebx*4],eax
  422.         push    eax
  423.         stdcall AddIcon,[AddX],[AddY],DAreaIcon,DAreaName,DAreaPath,DAreaParams
  424.         pop     eax
  425.  
  426. ;-------------------------------------------------------------------------------
  427. DExitAndSave:
  428.  
  429.         mov     dword[nameSection],eax
  430.         stdcall [ini_set_str],IconIni,nameSection,keyName,DAreaName,dword[edtName.size]
  431.         stdcall [ini_set_str],IconIni,nameSection,keyPath,DAreaPath,dword[edtExePath.size]
  432.         stdcall [ini_set_str],IconIni,nameSection,keyParams,DAreaParams,dword[edtParams.size]
  433.         stdcall [ini_set_str],IconIni,nameSection,keyIco,DAreaIcon,dword[edtIcon.size]
  434.  
  435.         cmp     [DlgSelIcon],-1
  436.         jne     @f
  437.         stdcall [ini_set_int],IconIni,nameSection,keyX,[MouseX]
  438.         stdcall [ini_set_int],IconIni,nameSection,keyY,[MouseY]
  439.       @@:
  440. DExit:
  441.         mov     [DlgAddActiv],0
  442.         mov     [slotDlgAdd],0
  443.         mcall   -1              ;ExitThread
  444.  
  445. ;##################################################################
  446. proc DRedrawWin
  447.         mcall   12,1            ;RedrawWinBeg
  448.         mov     edx,[sc.work]
  449.         or      edx,34000000h
  450.         cmp     [DlgSelIcon],-1
  451.         jne      @f
  452.         mov     edi,DTitleAdd
  453.         jmp     .l1
  454.       @@:
  455.         mov     edi,DTitleProp
  456.       .l1:
  457.         mcall   0,<100,END_ICONS_AREAW+ICONSX+10>,<100,(IMG_SIZE+SPCH)*ICONS_DRAW_COUNTH+178>,,,
  458.  
  459.         stdcall [edit_box_draw],edtName
  460.         stdcall [edit_box_draw],edtExePath
  461.         stdcall [edit_box_draw],edtParams
  462.  
  463.         call    DrawStdIcons
  464.  
  465.  
  466.         stdcall [scrollbar_h_draw],sbIcons
  467.         mcall 38,<ICONSX+1,END_ICONS_AREAW-2>,<END_ICONS_AREAH+3,END_ICONS_AREAH+3>,[sc.work_graph]
  468.         mcall   ,<ICONSX+1,END_ICONS_AREAW-2>,<END_ICONS_AREAH+3+15,END_ICONS_AREAH+3+15>,[sc.work_graph]
  469.  
  470.         mcall   ,<ICONSX,ICONSX>,<END_ICONS_AREAH+3+1,END_ICONS_AREAH+3+15-1>,[sc.work_graph]
  471.         mcall   ,<END_ICONS_AREAW-1,END_ICONS_AREAW-1>,<END_ICONS_AREAH+3+1,END_ICONS_AREAH+3+15-1>,            [sc.work_graph]
  472.  
  473.         ;BUTTONS
  474.         mcall   8,<265,75>,<30+END_ICONS_AREAH,24>,idbCreate,[sc.work_button]
  475.         mcall    ,<360,77>,                           ,idbCancel
  476.         mcall    ,<END_ICONS_AREAW-30,30>,<30,20> ,idbChange
  477.  
  478.         ;CAPTIONS
  479.         mov     ecx,[sc.work_text]
  480.         or      ecx,90000000h
  481.         mcall   4,<30+IMG_SIZE,10>,,DCaptName
  482.         mcall    ,<30+IMG_SIZE,35>,,DCaptPath
  483.         mcall    ,<30+IMG_SIZE,59>,,DCaptParams
  484.  
  485. if lang eq ru
  486.         mov     ecx,[sc.work_button_text]
  487.         or      ecx,90000000h
  488.         mcall    ,<369,35+END_ICONS_AREAH>,,DCaptCancel
  489.  
  490.         cmp     [DlgSelIcon],-1
  491.         jne     @f
  492.         mpack   ebx,275,35+END_ICONS_AREAH
  493.         mov     edx,DCaptCreate
  494.         jmp     .DRD1
  495.       @@:
  496.         mpack   ebx,272,35+END_ICONS_AREAH
  497.         mov     edx,DCaptProperties
  498.      .DRD1:
  499. else
  500.         mov     ecx,[sc.work_button_text]
  501.         or      ecx,90000000h
  502.         mcall    ,<372,35+END_ICONS_AREAH>,,DCaptCancel
  503.  
  504.  
  505.         cmp     [DlgSelIcon],-1
  506.         jne     @f
  507.         mpack   ebx,277,35+END_ICONS_AREAH
  508.         mov     edx,DCaptCreate
  509.         jmp     .DRD1
  510.       @@:
  511.         mpack   ebx,277,35+END_ICONS_AREAH
  512.         mov     edx,DCaptProperties
  513.      .DRD1:
  514. end if
  515.         mcall
  516.  
  517.         pusha
  518.         mov     ecx,[sc.work_button_text]
  519.         or      ecx,90000000h
  520.         mcall 4,<END_ICONS_AREAW-30+4,33>,,DCaptDots
  521.         popa
  522.  
  523.         call DrawSelIcon
  524.  
  525.         mcall   12,2            ;RedrawWinEnd
  526.         ret
  527. endp
  528.  
  529.  
  530. proc DrawStdIcons
  531. local IcoX:DWORD,\
  532.       IcoY:DWORD,\
  533.       iIcon:DWORD
  534.  
  535.         mov     ecx,[sbIcons.position]
  536.         xor     eax,eax
  537.         m2m     dword[iIcon],0
  538.  
  539.         test    ecx,ecx
  540.         jz      .DST1
  541.      @@:
  542.         add     [iIcon],ICONS_DRAW_COUNTH
  543.         add     eax,IMG_SIZE*IMG_SIZE*4*ICONS_DRAW_COUNTH
  544.         loop    @b
  545.    .DST1:
  546.  
  547.         lea     esi,[eax+44]
  548.         add     esi,[raw_pointer]
  549.  
  550.         mov     [IcoX],ICONSX
  551.  
  552.         mov     ecx,ICONS_DRAW_COUNTW
  553.   .DrawIcons:
  554.         push    ecx
  555.  
  556.         mov     [IcoY],ICONSY
  557.  
  558.         mov     ecx,ICONS_DRAW_COUNTH
  559.   .DrawIcoStolb:
  560.         push    ecx
  561.  
  562.         mov     edi,DlgBufImg
  563.         mov     edx,IMG_SIZE
  564.  
  565.     .DrawLine:
  566.  
  567.  
  568.         mov     ecx,IMG_SIZE
  569.      .DrawPix:
  570.  
  571.         lodsd
  572.         test    eax,0FF000000h
  573.         jnz     @f
  574.         mov     eax,[sc.work]
  575.      @@:
  576.  
  577.         mov     [edi],ax
  578.         shr     eax,16
  579.         mov     [edi+2],al
  580.         add     edi,3
  581.  
  582.         loop    .DrawPix
  583.  
  584.         dec     edx
  585.         jnz    .DrawLine
  586.  
  587.         mov     edx,[IcoX]
  588.         shl     edx,16
  589.         mov     dx,word[IcoY]
  590.         mcall   7,DlgBufImg,<IMG_SIZE,IMG_SIZE>
  591.  
  592.         inc     [iIcon]
  593.         mov     eax,[iIcon]
  594.         cmp     eax,[icon_count]
  595.         jae     .endDrawIcon
  596.  
  597.         add     dword[IcoY],IMG_SIZE+SPCH
  598.         pop     ecx
  599.         loop    .DrawIcoStolb
  600.  
  601.         add     dword[IcoX],IMG_SIZE+SPCW
  602.         pop     ecx
  603.         loop    .DrawIcons
  604.         jmp     .endProc
  605.  
  606.     .endDrawIcon:
  607.  
  608.         mov     ecx,IMG_SIZE*IMG_SIZE
  609.         mov     edi,DlgBufImg
  610.         mov     eax,[sc.work]
  611.         mov     ebx,eax
  612.         shr     ebx,16
  613.      @@:
  614.         mov     word[edi],ax
  615.         mov     [edi+2],bl
  616.         add     edi,3
  617.         loop    @b
  618.  
  619.                                      ;§ â¨à ­¨¥ ­¥ ¨á¯®«ì§®¢ ­ëå ¬¥áâ
  620.         jmp     .Dalee
  621.  
  622.   .DrawIcons2:
  623.         push    ecx
  624.  
  625.         mov     [IcoY],ICONSY
  626.         mov     ecx,ICONS_DRAW_COUNTH
  627.   .DrawIcoStolb2:
  628.         push    ecx
  629.  
  630.         mov     edx,[IcoX]
  631.         shl     edx,16
  632.         mov     dx,word[IcoY]
  633.         mcall   7,DlgBufImg,<IMG_SIZE,IMG_SIZE>
  634.  
  635.      .Dalee:
  636.         add     dword[IcoY],IMG_SIZE+SPCH
  637.         pop     ecx
  638.         loop    .DrawIcoStolb2
  639.  
  640.         add     dword[IcoX],IMG_SIZE+SPCW
  641.         pop     ecx
  642.         loop    .DrawIcons2
  643.  
  644.    .endProc:
  645.  
  646.         ret
  647. endp
  648.  
  649. proc DrawSelIcon
  650.  
  651.        
  652.         mov     edx,[sc.work]
  653.         mcall 13,<ICONSX+18,3*8>,<59,12>
  654.        
  655.         mov     ecx,[sc.work_text]
  656.         or      ecx,90000000h
  657.         mcall 4,<ICONSX+18,59>,,DAreaIcon
  658.  
  659.         mov     edi,DAreaIcon
  660.         cmp     byte[edi],0
  661.         jne     @f
  662.         ret
  663.       @@:
  664.  
  665.         mov     al,[edi]
  666.         cmp     al,'9'
  667.         ja      .PathToIcon
  668.         cmp     al,'/'
  669.         jne     .GetIconInd
  670.    .PathToIcon:
  671.         mov     al,30h           ;§ £«ã誠!!!!!!!!!!!!!
  672.         mov     byte[edi+1],0
  673.    .GetIconInd:
  674. ;int3
  675.         sub     al,30h
  676.         cmp     byte[edi+1],0
  677.         je      @f
  678.         shl     eax,1
  679.         lea     eax,[eax*4+eax]
  680.         xor     edx,edx
  681.         mov     dl,[edi+1]
  682.         sub     dl,30h
  683.         add     eax,edx
  684.      @@:             ;eax=num icon
  685.         cmp     eax,[icon_count]
  686.         jb      @f
  687.         xor     eax,eax
  688.      @@:
  689.         test    eax,eax
  690.         je      .DI1
  691.         mov     ecx,eax
  692.         xor     eax,eax
  693.       @@:
  694.         add     eax,IMG_SIZE*IMG_SIZE*4
  695.         loop    @b
  696.      .DI1:
  697.         mov     esi,eax
  698.         add     esi,[raw_pointer]
  699.         add     esi,44
  700.  
  701.         mov     edi,DlgBufImg
  702.         mov     edx,IMG_SIZE
  703.     .DrawLine:
  704.  
  705.         mov     ecx,IMG_SIZE
  706.      .DrawPix:
  707.  
  708.         lodsd
  709.         test    eax,0FF000000h
  710.         jnz     @f
  711.         mov     eax,[sc.work]
  712.      @@:
  713.  
  714.         mov     word[edi],ax
  715.         shr     eax,16
  716.         mov     [edi+2],al
  717.         add     edi,3
  718.  
  719.         loop    .DrawPix
  720.  
  721.         dec     edx
  722.         jnz     .DrawLine
  723.  
  724.         mcall   7,DlgBufImg,<IMG_SIZE,IMG_SIZE>,<30,15>
  725.  
  726.         ret
  727. endp