Subversion Repositories Kolibri OS

Rev

Rev 6472 | Rev 6900 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6472 Rev 6899
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 6472 $
8
$Revision: 6899 $
9
 
9
 
10
dtext:
10
dtext:
11
; edx -> string
11
; edx -> string
Line 33... Line 33...
33
        bt      ecx, 27
33
        bt      ecx, 27
34
        jc      .redirect
34
        jc      .redirect
35
        mov     ebp, [_display.width]
35
        mov     ebp, [_display.width]
36
        xor     edi, edi
36
        xor     edi, edi
37
        jmp     @f
37
        jmp     @f
-
 
38
 
38
.ret:
39
.ret:
39
        add     esp, 28
40
        add     esp, 28
40
        ret
41
        ret
-
 
42
 
41
.redirect:
43
.redirect:
42
        mov     ebp, [edi]
44
        mov     ebp, [edi]
43
        add     edi, 8
45
        add     edi, 8
44
@@:
46
@@:
45
        shl     ebp, 2
47
        shl     ebp, 2
Line 86... Line 88...
86
        mov     edi, edx
88
        mov     edi, edx
87
        mov     eax, ebx
89
        mov     eax, ebx
88
        and     eax, 0xFFFFFF
90
        and     eax, 0xFFFFFF
89
.bufferReady:
91
.bufferReady:
90
        mov     ebp, eax
92
        mov     ebp, eax
-
 
93
        mov     eax, [esp+8]
-
 
94
        shr     eax, 2
-
 
95
        sub     eax, [esp+16]
-
 
96
        shr     eax, 3
-
 
97
        xor     edx, edx
-
 
98
        div     dword[esp+4]
-
 
99
        mov     ecx, [esp]
-
 
100
        cmp     eax, ecx
-
 
101
        jnc     @f
-
 
102
        mov     [esp], eax
-
 
103
@@:
91
        xor     edx, edx
104
        xor     edx, edx
92
        bt      ebx, 29
105
        bt      ebx, 29
93
        jc      @f
106
        jc      @f
94
        bt      ebx, 28
107
        bt      ebx, 28
95
        jc      .draw866toUni
108
        jc      .draw866toUni
-
 
109
        lea     eax, [eax*4+eax]
-
 
110
        shr     eax, 2
-
 
111
        inc     eax
-
 
112
        mov     [esp], ecx
-
 
113
        cmp     eax, ecx
-
 
114
        jnc     .draw866
-
 
115
        mov     [esp], eax
96
        jmp     .draw866
116
        jmp     .draw866
-
 
117
 
97
@@:
118
@@:
98
        bt      ebx, 28
119
        bt      ebx, 28
99
        jc      .drawUTF8
120
        jc      .drawUTF8
Line 100... Line 121...
100
 
121
 
Line 205... Line 226...
205
        mov     edi, [esp]
226
        mov     edi, [esp]
206
        test    edi, edi
227
        test    edi, edi
207
        jnz     @f
228
        jnz     @f
208
        pop     eax
229
        pop     eax
209
        ret
230
        ret
-
 
231
 
210
@@:         ; redraw from buffer to screen
232
@@: ; redraw from buffer to screen
211
        push    eax
233
        push    eax
212
        sub     ecx, edi
234
        sub     ecx, edi
213
        shr     ecx, 2
235
        shr     ecx, 2
214
        add     edx, ecx
236
        add     edx, ecx
Line 226... Line 248...
226
        xchg    esi, edi
248
        xchg    esi, edi
227
        call    __sys_putpixel
249
        call    __sys_putpixel
228
        xchg    esi, edi
250
        xchg    esi, edi
229
        pop     ecx
251
        pop     ecx
230
        jmp     .drawPicture
252
        jmp     .drawPicture
-
 
253
 
231
@@:
254
@@:
232
        pop     edi
255
        pop     edi
233
        mov     ecx, [esp]
256
        mov     ecx, [esp]
234
        add     edi, [esp+4]
257
        add     edi, [esp+4]
235
        inc     ebx
258
        inc     ebx
Line 315... Line 338...
315
        xor     ecx, ecx
338
        xor     ecx, ecx
316
        cmp     [fontSmoothing], 1
339
        cmp     [fontSmoothing], 1
317
        jnz     .subpixelLeft
340
        jnz     .subpixelLeft
318
        call    antiAliasing
341
        call    antiAliasing
319
        jmp     @f
342
        jmp     @f
-
 
343
 
320
.subpixelLeft:
344
.subpixelLeft:
321
        mov     cl, bl
345
        mov     cl, bl
322
        lea     edx, [ecx*8+ecx]
346
        lea     edx, [ecx*8+ecx]
323
        lea     edx, [ecx*2+edx]
347
        lea     edx, [ecx*2+edx]
324
        mov     cl, al
348
        mov     cl, al
Line 402... Line 426...
402
        xor     ecx, ecx
426
        xor     ecx, ecx
403
        cmp     [fontSmoothing], 1
427
        cmp     [fontSmoothing], 1
404
        jnz     .subpixelRight
428
        jnz     .subpixelRight
405
        call    antiAliasing
429
        call    antiAliasing
406
        jmp     @f
430
        jmp     @f
-
 
431
 
407
.subpixelRight:
432
.subpixelRight:
408
        mov     cl, al
433
        mov     cl, al
409
        mov     edx, ecx
434
        mov     edx, ecx
410
        shl     ecx, 3
435
        shl     ecx, 3
411
        sub     ecx, edx
436
        sub     ecx, edx