Subversion Repositories Kolibri OS

Rev

Rev 1098 | 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
8346 IgorA 5
	xor     esi,esi
6
	mov     edx,[edi+8]
205 heavyiron 7
.check_next:
8346 IgorA 8
	mov     ah,[edx+esi]
9
	inc     esi
10
	test    ah,ah
11
	jnz     .check_next
12
	mcall   SF_DRAW_TEXT,[edi],[edi+4]
205 heavyiron 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
1098 Lrz 22
.text: dd text  ; +8
205 heavyiron 23
}
24
 
25
l_struc_size=12
26
macro draw_labels start,end
27
{
1098 Lrz 28
        mov     edi,start
29
        mov     ecx,((end-start)/l_struc_size)
205 heavyiron 30
@@:
1098 Lrz 31
        call    draw_label
32
        add     edi,l_struc_size
33
        loop    @r
205 heavyiron 34
}
35
 
36
macro labels_set_sys_color start,end,color_table
37
{
1098 Lrz 38
        mov     edi,start
39
        mov     ecx,((end-start)/l_struc_size)
40
        mov     esi,color_table
205 heavyiron 41
@@:
1098 Lrz 42
        push    dword [esi+32]
43
        pop     dword [edi+4]
44
        add     edi,l_struc_size
45
        loop    @r
205 heavyiron 46
}