Subversion Repositories Kolibri OS

Rev

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

  1. macro use_label
  2. {
  3. draw_label:
  4. pusha
  5.         xor     esi,esi
  6.         mov     edx,[edi+8]
  7. .check_next:
  8.         mov     ah,[edx+esi]
  9.         inc     esi
  10.         test    ah,ah
  11.         jnz     .check_next
  12.         mcall   SF_DRAW_TEXT,[edi],[edi+4]
  13. popa
  14. ret
  15. }
  16.  
  17. struc label left,top,color,text
  18. {
  19. .top: dw top ; +0
  20. .left: dw left ; +2
  21. .color: dd color; +4
  22. .text: dd text  ; +8
  23. }
  24.  
  25. l_struc_size=12
  26. macro draw_labels start,end
  27. {
  28.         mov     edi,start
  29.         mov     ecx,((end-start)/l_struc_size)
  30. @@:
  31.         call    draw_label
  32.         add     edi,l_struc_size
  33.         loop    @r
  34. }
  35.  
  36. macro labels_set_sys_color start,end,color_table
  37. {
  38.         mov     edi,start
  39.         mov     ecx,((end-start)/l_struc_size)
  40.         mov     esi,color_table
  41. @@:
  42.         push    dword [esi+32]
  43.         pop     dword [edi+4]
  44.         add     edi,l_struc_size
  45.         loop    @r
  46. }