Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
2288 clevermous 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
8
$Revision: 2430 $
9
 
10
; // Alver 22.06.2008 // {
11
align 4
12
dtext_asciiz_esi:                          ; for skins title out
13
        push    eax
14
        xor     eax, eax
15
        inc     eax
16
        jmp     dtext.1
17
; } \\ Alver \\
18
 
19
align 4
20
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
21
        ; ebx x & y
22
        ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
23
        ; X = ABnnb:
24
        ; nn = font
25
        ; A = 0 <=> output esi characters; otherwise output ASCIIZ string
26
        ; B = 1 <=> fill background with color eax
27
        ; edx start of text
28
        ; edi 1 force
29
 
30
; // Alver 22.06.2008 // {
31
        push    eax
32
        xor     eax, eax
33
.1:
34
; } \\ Alver \\
35
        pushad
36
        movsx   eax, bx         ; eax=y
37
        sar     ebx, 16         ; ebx=x
38
        xchg    eax, ebx        ; eax=x, ebx=y
39
        cmp     esi, 255
40
        jb      .loop
41
        mov     esi, 255
42
.loop:
43
        test    ecx, ecx
44
        js      .test_asciiz
45
        dec     esi
46
        js      .end
47
        jmp     @f
48
.test_asciiz:
49
        cmp     byte [edx], 0
50
        jz      .end
51
; // Alver 22.06.2008 // {
52
        cmp     byte [esp+28], 1
53
        jne     @f
54
        dec     esi
55
        js      .end
56
; } \\ Alver \\
57
@@:
58
        inc     edx
59
        pushad
60
        movzx   edx, byte [edx-1]
61
        test    ecx, 0x10000000
62
        jnz     .font2
63
        mov     esi, 9
64
        lea     ebp, [FONT_I+8*edx+edx]
65
.symloop1:
66
        mov     dl, byte [ebp]
67
        or      dl, 1 shl 6
68
.pixloop1:
69
        shr     dl, 1
70
        jz      .pixloop1end
71
        jnc     .nopix
2430 mario79 72
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
2288 clevermous 73
        call    [putpixel]
74
        jmp     .pixloop1cont
75
.nopix:
76
        test    ecx, 0x40000000
77
        jz      .pixloop1cont
78
        push    ecx
79
        mov     ecx, [esp+4+20h+20h]
2430 mario79 80
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
2288 clevermous 81
        call    [putpixel]
82
        pop     ecx
83
.pixloop1cont:
84
        inc     eax
85
        jmp     .pixloop1
86
.pixloop1end:
87
        sub     eax, 6
88
        inc     ebx
89
        inc     ebp
90
        dec     esi
91
        jnz     .symloop1
92
        popad
93
        add     eax, 6
94
        jmp     .loop
95
.font2:
96
        add     edx, edx
97
        lea     ebp, [FONT_II+4*edx+edx+1]
98
        push    9
99
        movzx   esi, byte [ebp-1]
100
.symloop2:
101
        mov     dl, byte [ebp]
102
        push    esi
103
.pixloop2:
104
        shr     dl, 1
105
        jnc     .nopix2
2430 mario79 106
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
2288 clevermous 107
        call    [putpixel]
108
        jmp     .pixloop2cont
109
.nopix2:
110
        test    ecx, 0x40000000
111
        jz      .pixloop2cont
112
        push    ecx
113
        mov     ecx, [esp+12+20h+20h]
2430 mario79 114
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
2288 clevermous 115
        call    [putpixel]
116
        pop     ecx
117
.pixloop2cont:
118
        inc     eax
119
        dec     esi
120
        jnz     .pixloop2
121
        pop     esi
122
        sub     eax, esi
123
        inc     ebx
124
        inc     ebp
125
        dec     dword [esp]
126
        jnz     .symloop2
127
        pop     eax
128
        add     dword [esp+28], esi
129
        popad
130
        jmp     .loop
131
.end:
132
        popad
133
        pop     eax             ; << // Alver 22.06.2008 // <<
134
        ret