Subversion Repositories Kolibri OS

Rev

Rev 205 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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