Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
431 serge 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
983 diamond 3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
431 serge 4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
593 mikedld 8
$Revision: 2434 $
9
 
803 alver 10
; // Alver 22.06.2008 // {
11
align 4
12
dtext_asciiz_esi:                          ; for skins title out
2434 Serge 13
        push    eax
14
        xor     eax, eax
15
        inc     eax
16
        jmp     dtext.1
803 alver 17
; } \\ Alver \\
593 mikedld 18
 
1 ha 19
align 4
106 john 20
dtext:  ; Text String Output (rw by Johnny_B[john@kolibrios.org])
684 diamond 21
        ; ebx x & y
22
        ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
139 diamond 23
        ; X = ABnnb:
24
        ; nn = font
684 diamond 25
        ; A = 0 <=> output esi characters; otherwise output ASCIIZ string
26
        ; B = 1 <=> fill background with color eax
27
        ; edx start of text
1 ha 28
        ; edi 1 force
29
 
803 alver 30
; // Alver 22.06.2008 // {
2434 Serge 31
        push    eax
803 alver 32
        xor     eax, eax
33
.1:
34
; } \\ Alver \\
1 ha 35
        pushad
684 diamond 36
        movsx   eax, bx         ; eax=y
37
        sar     ebx, 16         ; ebx=x
38
        xchg    eax, ebx        ; eax=x, ebx=y
39
        cmp     esi, 255
139 diamond 40
        jb      .loop
684 diamond 41
        mov     esi, 255
139 diamond 42
.loop:
43
        test    ecx, ecx
44
        js      .test_asciiz
684 diamond 45
        dec     esi
139 diamond 46
        js      .end
47
        jmp     @f
48
.test_asciiz:
684 diamond 49
        cmp     byte [edx], 0
139 diamond 50
        jz      .end
803 alver 51
; // Alver 22.06.2008 // {
2434 Serge 52
        cmp     byte [esp+28], 1
53
        jne     @f
803 alver 54
        dec     esi
2434 Serge 55
        js      .end
803 alver 56
; } \\ Alver \\
139 diamond 57
@@:
684 diamond 58
        inc     edx
59
        pushad
60
        movzx   edx, byte [edx-1]
139 diamond 61
        test    ecx, 0x10000000
62
        jnz     .font2
63
        mov     esi, 9
381 serge 64
        lea     ebp, [FONT_I+8*edx+edx]
139 diamond 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
2434 Serge 72
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 73
        call    [putpixel]
74
        jmp     .pixloop1cont
12 halyavin 75
.nopix:
139 diamond 76
        test    ecx, 0x40000000
77
        jz      .pixloop1cont
78
        push    ecx
831 diamond 79
        mov     ecx, [esp+4+20h+20h]
2434 Serge 80
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 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
106 john 92
        popad
139 diamond 93
        add     eax, 6
94
        jmp     .loop
95
.font2:
96
        add     edx, edx
381 serge 97
        lea     ebp, [FONT_II+4*edx+edx+1]
139 diamond 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
2434 Serge 106
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 107
        call    [putpixel]
108
        jmp     .pixloop2cont
109
.nopix2:
110
        test    ecx, 0x40000000
111
        jz      .pixloop2cont
112
        push    ecx
831 diamond 113
        mov     ecx, [esp+12+20h+20h]
2434 Serge 114
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
139 diamond 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
2434 Serge 133
        pop     eax             ; << // Alver 22.06.2008 // <<
139 diamond 134
        ret