Subversion Repositories Kolibri OS

Rev

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

  1.     use32
  2.     org     0x0
  3. ;-------------------------------------------------------------------------------
  4.     db      "MENUET01"
  5.     dd      1, main, __dataend, __memend, __stackend, 0, sys_path
  6. ;-------------------------------------------------------------------------------
  7.     include "../../../macros.inc"
  8.     include "../../../proc32.inc"
  9.     include "../../../dll.inc"
  10.     include "../../../develop/libraries/box_lib/load_lib.mac"
  11.     ;include "../../../debug.inc"
  12.  
  13.     include "DATA.INC"
  14.     include "NAME.INC"
  15.  
  16.     @use_library_mem     \
  17.             mem.Alloc,   \
  18.             mem.Free,    \
  19.             mem.ReAlloc, \
  20.             dll.Load
  21. ;================================================================================
  22. main:
  23. ; ==== Init ====
  24.     mcall   18, 7
  25.     mov     [win.psid], eax
  26.  
  27.     mcall   40, EVM_REDRAW+EVM_BUTTON+EVM_MOUSE ;+EVM_DEKSTOP to update colors on skin change
  28.  
  29. ; ==== Load libs ====
  30.     load_libraries load_lib_start, load_lib_end
  31.  
  32. ; ==== Config LibINI ====
  33.     invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, 1
  34.     mov     [dock_items.location], eax
  35.     invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.fsize_name, 0
  36.     mov     [dock_items.fsize], eax
  37.     invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.ashow_name, 0
  38.     mov     [dock_items.ashow], eax
  39.  
  40.     invoke  ini.sections, ini_data.file_name, sections_callback
  41.  
  42. ; ==== Load colors ====
  43.     mcall   48, 3, color
  44.     or      dword[color.bg],    0x10000000
  45.     or      dword[color.frame], 0x10000000
  46.     or      dword[color.text],  0x80000000
  47.  
  48. ; ==== Config LibIMG ====
  49.     mov     dword[fi.p00], 5
  50.     mov     dword[fi.p16], buf_128
  51.     mov     dword[fi.p21], img_data.file_name
  52.  
  53.     mcall   70, fi
  54.  
  55.     mov     edx, [buf_128 + 32]
  56.     imul    edx, 10
  57.  
  58.     stdcall mem.Alloc, edx
  59.     mov     [img_data.rgb_object], eax
  60.  
  61.     mov     dword[fi.p00], 0
  62.     mov     dword[fi.p12], edx
  63.     m2m     dword[fi.p16], dword[img_data.rgb_object]
  64.     mov     dword[fi.p21], img_data.file_name
  65.  
  66.     mcall   70, fi
  67.  
  68.     cmp     ebx, 0xFFFFFFFF
  69.     je      @f
  70.  
  71.     stdcall dword[img.decode], dword[img_data.rgb_object], ebx, 0
  72.     mov     dword[img_data.object], eax
  73.  
  74.   ; === ALPHA ===
  75.     mov     edi, eax
  76.     add     edi, 8
  77.     mov     edi, [edi]
  78.     imul    edi, 128
  79.     sub     edi, 4
  80.  
  81.     add     eax, 24
  82.     mov     eax, [eax]
  83.  .setalpha:
  84.     mov     ebx, [eax + edi]
  85.     shr     ebx, 24
  86.     cmp     ebx, 0
  87.     jne     .nonalpha
  88.  
  89.     mov     ecx, [color.bg]
  90.     mov     [eax + edi], ecx
  91.  .nonalpha:
  92.     sub     edi, 4
  93.     cmp     edi, 0
  94.     jne     .setalpha
  95.  
  96.   ; === CONVERTING TO BGR
  97.     stdcall dword[img.toRGB], dword[img_data.object], dword[img_data.rgb_object]
  98.     stdcall dword[img.destroy], dword[img_data.object]
  99.  
  100. ; ==== Config window ====
  101.     mov     eax, dword[dock_items.location]
  102.     and     eax, 1b
  103.     cmp     eax, 0
  104.     je      .vert
  105.     jmp     .setshape
  106.  
  107.  .vert:
  108.     mov     byte[win.isvert], 1
  109.  
  110.  .setshape:
  111.     cmp     byte[win.isvert], 1
  112.     je      .vert_sp
  113.  
  114.  .horz_sp:
  115.     call    .HORZ_WIDTH
  116.     call    .HORZ_X
  117.     call    .HORZ_HEIGHT
  118.     cmp     dword[dock_items.location], 1
  119.     je      .settop
  120.  
  121.  .setbottom:
  122.     call    .HORZ_Y_BOTTOM
  123.     jmp     .SETDEF
  124.  
  125.  .settop:
  126.     call    .HORZ_Y_TOP
  127.     jmp     .SETDEF
  128.  
  129.  
  130.  .vert_sp:
  131.     call    .VERT_WIDTH
  132.     call    .VERT_HEIGHT
  133.     call    .VERT_Y
  134.     cmp     dword[dock_items.location], 2
  135.     je      .setleft
  136.  
  137.  .setright:
  138.     call    .VERT_X_RIGHT
  139.     jmp     .SETDEF
  140.  
  141.  .setleft:
  142.     call    .VERT_X_LEFT
  143.     jmp     .SETDEF
  144.  
  145. ;-------------------------------------------------------------------------------
  146.  .HORZ_WIDTH:
  147.     cmp     [dock_items.fsize], byte 1
  148.     je      @f
  149.     mov     eax, BUTTON_SIZE
  150.     mov     ebx, [dock_items.count]
  151.     imul    eax, ebx
  152.     add     eax, 24
  153.     dec     eax
  154.     jmp     .set_hw
  155.   @@:
  156.     mcall   14
  157.     shr     eax, 16
  158.  .set_hw:
  159.     mov     [win.width_opn], eax
  160.     mov     [win.width_hdn], eax
  161.  
  162.     ret
  163.  
  164. ;-------------------------------------------------------------------------------
  165.  .HORZ_X:
  166.     mcall   14
  167.     shr     eax, 17
  168.     mov     ecx, [win.width_opn]
  169.     shr     ecx, 1
  170.     sub     eax, ecx
  171.     mov     [win.x_opn], eax
  172.     mov     [win.x_hdn], eax
  173.  
  174.     ret
  175.  
  176. ;-------------------------------------------------------------------------------
  177.  .HORZ_HEIGHT:
  178.     mov     dword[win.height_hdn], 3
  179.     mov     dword[win.height_opn], BUTTON_SIZE
  180.  
  181.     ret
  182.  
  183. ;-------------------------------------------------------------------------------
  184.  .HORZ_Y_BOTTOM:
  185.     mcall   14
  186.     and     eax, 0xFFFF
  187.     dec     eax
  188.     mov     [win.y_hdn], eax
  189.     sub     eax, 43
  190.     mov     [win.y_opn], eax
  191.  
  192.     ret
  193.  
  194.  .HORZ_Y_TOP:
  195.     mov     dword[win.y_opn], 0
  196.     mov     dword[win.y_hdn], 0
  197.  
  198.     ret
  199.  
  200. ;-------------------------------------------------------------------------------
  201.  .VERT_WIDTH:
  202.     mov     dword[win.width_opn], BUTTON_SIZE
  203.     mov     dword[win.width_hdn], 3
  204.  
  205.     ret
  206.  
  207. ;-------------------------------------------------------------------------------
  208.  .VERT_X_LEFT:
  209.     mov     dword[win.x_opn], 0
  210.     mov     dword[win.x_hdn], 0
  211.  
  212.     ret
  213.  
  214.  .VERT_X_RIGHT:
  215.     mcall   14
  216.     and     eax, 0xFFFF0000
  217.     shr     eax, 16
  218.     mov     [win.x_hdn], eax
  219.     sub     eax, BUTTON_SIZE
  220.     mov     [win.x_opn], eax
  221.  
  222.     ret
  223.  
  224. ;-------------------------------------------------------------------------------
  225.  .VERT_HEIGHT:
  226.     cmp     [dock_items.fsize], byte 1
  227.     je      @f
  228.     mov     eax, BUTTON_SIZE
  229.     mov     ebx, [dock_items.count]
  230.     imul    eax, ebx
  231.     dec     eax
  232.     jmp     .set_vh
  233.   @@:
  234.     mcall   14
  235.     and     eax, 0xFFFF
  236.  .set_vh:
  237.     mov     [win.height_opn], eax
  238.     mov     [win.height_hdn], eax
  239.  
  240.     ret
  241.  
  242. ;-------------------------------------------------------------------------------
  243.  .VERT_Y:
  244.     mcall   14
  245.     and     eax, 0xFFFF
  246.     shr     eax, 1
  247.  
  248.     mov     esi, [win.height_opn]
  249.     shr     esi, 1
  250.     sub     eax, esi
  251.  
  252.     mov     [win.y_hdn], eax
  253.     mov     [win.y_opn], eax
  254.  
  255.     ret
  256.  
  257. ;-------------------------------------------------------------------------------
  258.  .SETDEF:
  259.     mov     eax, [win.width_hdn]
  260.     mov     [win.width], eax
  261.  
  262.     mov     eax, [win.x_hdn]
  263.     mov     [win.x], eax
  264.  
  265.     mov     eax, [win.height_hdn]
  266.     mov     [win.height], eax
  267.  
  268.     mov     eax, [win.y_hdn]
  269.     mov     [win.y], eax
  270.        
  271.     cmp     byte[dock_items.ashow],1
  272.     jne     .not_ashow
  273.  
  274.     mov     eax, [win.width_opn]
  275.     mov     [win.width], eax
  276.  
  277.     mov     eax, [win.x_opn]
  278.     mov     [win.x], eax
  279.  
  280.     mov     eax, [win.height_opn]
  281.     mov     [win.height], eax
  282.  
  283.     mov     eax, [win.y_opn]
  284.     mov     [win.y], eax
  285.  
  286.  .not_ashow:
  287.  
  288.  
  289. ;-------------------------------------------------------------------------------
  290. ; ==== START ====
  291.     mcall   9, win.procinfo, -1
  292.     mov     ecx, [win.procinfo + 30]
  293.     mcall   18, 21
  294.     and     eax, 0xFFFF
  295.     mov     [win.sid], eax
  296.  
  297.     call    main_loop
  298. ;-------------------------------------------------------------------------------
  299. exit:
  300.     stdcall mem.Free, [img_data.rgb_object]
  301.     mcall   18, 2, [nwin.sid]
  302.     mcall   -1
  303. ;-------------------------------------------------------------------------------
  304. main_loop:
  305.     mcall   10
  306.  
  307.     cmp     eax, EV_REDRAW
  308.     je      event_redraw
  309.  
  310.     cmp     eax, EV_BUTTON
  311.     je      event_button
  312.  
  313.     cmp     eax, EV_MOUSE
  314.     je      event_mouse
  315.  
  316.     jmp     main_loop
  317. ;-------------------------------------------------------------------------------
  318. event_redraw:
  319.     call    DRAW_WINDOW
  320.     jmp     main_loop
  321. ;-------------------------------------------------------------------------------
  322. DRAW_WINDOW:
  323.     mcall   12, 1
  324.  
  325.     mov     esi, [color.bg]
  326.     or      esi, 0x01000000
  327.     mcall   0, <[win.x], [win.width]>, <[win.y], [win.height]>, [color.bg], , [color.frame]
  328.  
  329.     mov     edi, 0
  330.   @@:
  331.     cmp     edi, [dock_items.count]
  332.     je      @f
  333.  
  334.     push    edi
  335.     mov     eax, 8
  336.     mov     edx, 0x60000002
  337.     mov     esi, [color.bg]
  338.     imul    edi, BUTTON_SIZE
  339.     add     edi, 12
  340.     shl     edi, 16
  341.     add     edi, BUTTON_SIZE
  342.     cmp     byte[win.isvert], 1
  343.     je      .vert_btn
  344.     mcall   , edi, <0, BUTTON_SIZE>
  345.     jmp     .endbtn
  346.  .vert_btn:
  347.     sub     edi, 12 shl 16
  348.     mcall   , <0, BUTTON_SIZE>, edi
  349.  .endbtn:
  350.     pop     edi
  351.  
  352.     cmp     byte[dock_items.separator + edi], 1
  353.     jne     .end_separator
  354.  
  355.  .draw_separator:
  356.     push    ebx
  357.     push    ecx
  358.  
  359.     mov     eax, 13
  360.     mov     ebx, edi
  361.     imul    ebx, BUTTON_SIZE
  362.     add     ebx, BUTTON_SIZE
  363.     add     ebx, 12
  364.     dec     ebx
  365.     shl     ebx, 16
  366.     add     ebx, 2
  367.  
  368.     cmp     byte[win.isvert], 1
  369.     je      .vert_draw_sep
  370.     mcall   , , <4,  36>, [color.frame]
  371.     jmp     .end_inner_sep
  372.  .vert_draw_sep:
  373.     sub     ebx, 12 shl 16
  374.     mov     ecx, ebx
  375.     mcall   , <4, 36>, , [color.frame]
  376.  .end_inner_sep:
  377.     pop     ecx
  378.     pop     ebx
  379.  .end_separator:
  380.  
  381.     cmp     byte[win.isvert], 1
  382.     je      .vert_dig
  383.     mov     edx, ebx
  384.     and     edx, 0xFFFF0000
  385.     add     edx, 0x00060006
  386.     jmp     .digend
  387.  .vert_dig:
  388.     mov     edx, ecx
  389.     and     edx, 0xFFFF0000
  390.     shr     edx, 16
  391.     add     edx, 0x00060006
  392.  .digend:
  393.  
  394.     imul    ebx, edi, 4
  395.     add     ebx, dock_items.icon
  396.     mov     ebx, [ebx]
  397.     imul    ebx, ICON_SIZE_BGR
  398.     add     ebx, [img_data.rgb_object]
  399.  
  400.     mcall   7, , <32, 32>
  401.  
  402.     inc     edi
  403.     jmp     @b
  404.   @@:
  405.  
  406.     mcall   12, 2
  407.  
  408.     ret
  409. ;-------------------------------------------------------------------------------
  410. event_button:
  411.     mcall   17
  412.  
  413.         ;; it must not be possible to close dock
  414.     ;cmp     ah, 1
  415.     ;je     .button_close
  416.  
  417.     cmp     ah, 2
  418.     je      .button_dock
  419.  
  420.     jmp     @f
  421.  
  422.  ;.button_close:
  423.  ;   jmp     exit
  424.  
  425.  .button_dock:
  426.     mov     edi, [win.button_index]
  427.     imul    edi, 256
  428.  
  429.     mov     dword[fi.p00], 7
  430.  
  431.     mov     esi, edi
  432.     add     esi, dock_items.path
  433.     mov     dword[fi.p21], esi
  434.  
  435.     mov     esi, edi
  436.     add     esi, dock_items.param
  437.     mov     dword[fi.p08], esi
  438.  
  439.     mcall   70, fi
  440.  
  441.     mov     ecx, eax
  442.     mcall   18, 21
  443.     and     eax, 0xFFFF
  444.     mov     [win.psid], eax
  445.  
  446.     jmp     wnd_hide
  447.  
  448.   @@:
  449.     jmp     main_loop
  450. ;-------------------------------------------------------------------------------
  451. event_mouse:
  452.   ; ==== IS MOUSE INNER ====
  453.     mcall   37, 1
  454.     mov     edi, eax
  455.     mov     esi, eax
  456.     shr     edi, 16
  457.     and     esi, 0xFFFF
  458.  
  459.     cmp     edi, 0
  460.     jl      wnd_hide
  461.     dec     edi
  462.     cmp     edi, [win.width]
  463.     jg      wnd_hide
  464.     cmp     esi, 0
  465.     jl      wnd_hide
  466.     dec     esi
  467.     cmp     esi, [win.height]
  468.     jg      wnd_hide
  469.  
  470.   ; ==== COUNT INDEX ====
  471.  
  472.     mov     eax, [dock_items.location]
  473.     and     eax, 1b
  474.     cmp     eax, 1
  475.     jne     .vert
  476.     mov     eax, edi
  477.     jmp     .nxt
  478.  
  479.  .vert:
  480.     mov     eax, esi
  481.     add     eax, 12
  482.  
  483.  .nxt:
  484.     sub     eax, 12
  485.     mov     edx, 0
  486.     mov     ebx, BUTTON_SIZE
  487.     div     ebx
  488.  
  489.     cmp     eax, [dock_items.count]
  490.     jge     .set0
  491.     jmp     .nxtcmp
  492.  
  493.  .set0:
  494.     mov     eax, 100
  495.  
  496.  .nxtcmp:
  497.     cmp     [win.button_index], eax
  498.     je      .nxt2
  499.  
  500.     push    dword[win.button_index]
  501.     pop     dword[win.prev_index]
  502.  
  503.     mov     [win.button_index], eax
  504.  
  505.  ; ==== DRAW SELECTION ====
  506.     call    DRAW_SELECTION
  507.  
  508.  .nxt2:
  509.     mov     eax, [win.button_index]
  510.     imul    eax, BUTTON_SIZE
  511.     cmp     byte[win.isvert], 1
  512.     je      .vert_name
  513.     add     eax, [win.x]
  514.     mov     [nwin.x], eax
  515.     mov     byte[nwin.change_shape], 1
  516.     mcall   13, <0, [win.width]>, <[win.height], 1>, [color.frame]
  517.     jmp     .vert_end
  518.  .vert_name:
  519.     add     eax, [win.y]
  520.     add     eax, 14
  521.     mov     [nwin.y], eax
  522.     mov     byte[nwin.change_shape], 1
  523.     mcall   13, <[win.width], 1>, <0, [win.height]>, [color.frame]
  524.  .vert_end:
  525.  
  526.  ; ==== OPEN/CLOSE WINDOW ====
  527.     cmp     byte[win.state], 1
  528.     je      main_loop
  529.  
  530.     mov     edx, esp
  531.     add     edx, 512
  532.     mcall   51, 1, n_main
  533.  
  534.     mov     eax, 18
  535.  
  536.     mcall   , 7
  537.     mov     [win.psid], eax
  538.  
  539.     mcall   18, 3, [win.sid]
  540.  
  541.     mov     byte[win.state], 1
  542.  
  543.     mov     eax, [win.width_opn]
  544.     mov     [win.width], eax
  545.  
  546.     mov     eax, [win.x_opn]
  547.     mov     [win.x], eax
  548.  
  549.     mov     eax, [win.height_opn]
  550.     mov     [win.height], eax
  551.  
  552.     mov     eax, [win.y_opn]
  553.     mov     [win.y], eax
  554.  
  555.  
  556.     cmp     byte[dock_items.ashow],1
  557.     je     .change_nothing
  558.     mcall   67, [win.x], [win.y], [win.width], [win.height]
  559.  
  560.   .change_nothing:
  561.     call    DRAW_WINDOW
  562.     call    DRAW_SELECTION
  563.     jmp     main_loop
  564.  
  565. ;-------------------------------------------------------------------------------
  566. wnd_hide:
  567.     cmp     byte[win.state], 0
  568.     je      main_loop
  569.  
  570.     mov     byte[nwin.close], 1
  571.  
  572.     mcall   18, 3, [win.psid]
  573.  
  574.     mov     byte[win.state], 0
  575.     mov     byte[win.button_index], -1
  576.  
  577.     cmp     byte[dock_items.ashow],1
  578.     je     .do_no_hide
  579.  
  580.     mov     eax, [win.width_hdn]
  581.     mov     [win.width], eax
  582.  
  583.     mov     eax, [win.x_hdn]
  584.     mov     [win.x], eax
  585.  
  586.     mov     eax, [win.height_hdn]
  587.     mov     [win.height], eax
  588.  
  589.     mov     eax, [win.y_hdn]
  590.     mov     [win.y], eax
  591.  
  592.     mcall   67, [win.x], [win.y], [win.width], [win.height]
  593.  
  594.   .do_no_hide:
  595.     call    DRAW_WINDOW
  596.     jmp     main_loop
  597. ;-------------------------------------------------------------------------------
  598. DRAW_SELECTION:
  599.     mov     ebx, [win.prev_index]
  600.     imul    ebx, BUTTON_SIZE
  601.     add     ebx, 14
  602.     shl     ebx, 16
  603.     add     ebx, 40
  604.     mov     ecx, 0x00020028
  605.  
  606.     cmp     byte[win.isvert], 1
  607.     jne     @f
  608.     xchg    ebx, ecx
  609.     sub     ecx, 0x000C0000
  610.   @@:
  611.  
  612.     mcall   13, , , [color.bg]
  613.  
  614.     mov     edx, ebx
  615.     shr     ecx, 16
  616.     mov     dx, cx
  617.     add     edx, 0x00040004
  618.  
  619.     mov     ebx, [win.prev_index]
  620.     imul    ebx, 4
  621.     add     ebx, dock_items.icon
  622.     mov     ebx, [ebx]
  623.     imul    ebx, ICON_SIZE_BGR
  624.     add     ebx, [img_data.rgb_object]
  625.  
  626.     mcall   7, , <32, 32>
  627.  
  628.     mov     ebx, [win.button_index]
  629.     imul    ebx, BUTTON_SIZE
  630.     add     ebx, 14
  631.     shl     ebx, 16
  632.     add     ebx, 40
  633.     mov     ecx, 0x00020028
  634.  
  635.     cmp     byte[win.isvert], 1
  636.     jne     @f
  637.     xchg    ebx, ecx
  638.     sub     ecx, 0x000C0000
  639.   @@:
  640.  
  641.     mcall   13, , , [color.bt]
  642.  
  643.     mov     edx, ebx
  644.     shr     ecx, 16
  645.     mov     dx, cx
  646.     add     edx, 0x00040004
  647.  
  648.     mov     ecx, [win.button_index]
  649.     imul    ecx, 4
  650.     add     ecx, dock_items.icon
  651.     mov     ecx, [ecx]
  652.     imul    ecx, ICON_SIZE_BGR
  653.     add     ecx, [img_data.rgb_object]
  654.  
  655.     mov     ebx, sel_img
  656.  
  657.     mov     edi, 0
  658.   @@:
  659.     mov     al, byte[ecx + 2]
  660.     shl     eax, 8
  661.     mov     al, byte[ecx + 1]
  662.     shl     eax, 8
  663.     mov     al, byte[ecx + 0]
  664.  
  665.     or      eax, 0x10000000
  666.     cmp     eax, [color.bg]
  667.     jne     .notbg
  668.     mov     eax, [color.bt]
  669.  .notbg:
  670.  
  671.     mov     byte[ebx + 0], al
  672.     shr     eax, 8
  673.     mov     byte[ebx + 1], al
  674.     shr     eax, 8
  675.     mov     byte[ebx + 2], al
  676.  
  677.     add     ebx, 3
  678.     add     ecx, 3
  679.  
  680.     add     edi, 3
  681.  
  682.     cmp     edi, 1024 * 3
  683.     jne     @b
  684.  
  685.     mcall   7, sel_img, <32, 32>
  686.  
  687.     ret
  688. ;-------------------------------------------------------------------------------
  689. proc sections_callback, _file_name, _section_name
  690.     mov     eax, [_section_name]
  691.     cmp     byte[eax], '@'
  692.     jne     @f
  693.  
  694.     dec     dword[dock_items.count]
  695.     jmp     .endproc
  696.  
  697.   @@:
  698.     ; ==== GET NAME ====
  699.     mov     ebx, [dock_items.count]
  700.     imul    ebx, 16
  701.     add     ebx, dock_items.name
  702.  
  703.     mov     eax, [_section_name]
  704.  
  705.     mov     edi, 0
  706.   @@:
  707.     mov     cl, byte[eax]
  708.     mov     byte[ebx + edi], cl
  709.  
  710.     inc     eax
  711.     inc     edi
  712.     cmp     edi, 10
  713.     jne     @b
  714.  
  715.   ; ==== GET PATH ====
  716.     mov     ebx, [dock_items.count]
  717.     imul    ebx, 256
  718.     add     ebx, dock_items.path
  719.  
  720.     invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
  721.  
  722.   ; === GET  PARAM ===
  723.     mov     ebx, [dock_items.count]
  724.     imul    ebx, 256
  725.     add     ebx, dock_items.param
  726.  
  727.     invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
  728.  
  729.   ; ==== GET ICON ====
  730.     invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
  731.  
  732.     mov     ebx, [dock_items.count]
  733.     imul    ebx, 4
  734.     mov     [dock_items.icon + ebx], eax
  735.  
  736.   ; ==== GET SEPARATOR ====
  737.     invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
  738.  
  739.     mov     ebx, [dock_items.count]
  740.     mov     byte[dock_items.separator + ebx], al
  741.  
  742.   ; ====== END =======
  743.  .endproc:
  744.     mov     eax, 1
  745.     inc     dword[dock_items.count]
  746.     ret
  747. endp
  748. ;-------------------------------------------------------------------------------
  749.     include "MEMORY.INC"