Subversion Repositories Kolibri OS

Rev

Rev 1098 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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