Subversion Repositories Kolibri OS

Rev

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

Rev 5847 Rev 5867
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: 5847 $
8
$Revision: 5867 $
9
 
9
 
10
dtext_asciiz_esi:
10
dtext_asciiz_esi:
11
        btr     ecx, 31
11
        btr     ecx, 31
Line 16... Line 16...
16
; ecx = char color and flags flRRGGBB h
16
; ecx = char color and flags flRRGGBB h
17
; fl = ZBFFRSSS b
17
; fl = ZBFFRSSS b
18
; Z=1: edx -> zero terminated string, esi = ?
18
; Z=1: edx -> zero terminated string, esi = ?
19
; B=1: fill background with color eax
19
; B=1: fill background with color eax
20
; R=1: edi -> user area for redirect
20
; R=1: edi -> user area for redirect
21
; FF=3: UTF-8 8x16, FF=2: UTF-16LE 8x16, FF=0: 866 6x9
21
; FF=3: UTF-8 8x16, FF=2: UTF-16LE 8x16
-
 
22
; FF=1: cp866 8x16, FF=0: cp866 6x9
22
; SSS = (font multiplier)-1
23
; SSS = (font multiplier)-1
23
; edi=1: force output
24
; edi=1: force output
24
        and     eax, 0xFFFFFF
25
        and     eax, 0xFFFFFF
25
        bt      ecx, 30
26
        bt      ecx, 30
26
        jc      @f
27
        jc      @f
Line 62... Line 63...
62
        mov     esi, edx    ; -> string
63
        mov     esi, edx    ; -> string
63
        or      eax, 0xFF000000
64
        or      eax, 0xFF000000
64
        bt      ebx, 27
65
        bt      ebx, 27
65
        jc      .bufferReady
66
        jc      .bufferReady
66
        mov     eax, 9
67
        mov     eax, 9
67
        bt      ebx, 29
68
        test    ebx, 0x30000000
68
        jnc     @f
69
        jz      @f
69
        add     eax, 7
70
        add     eax, 7
70
@@:
71
@@:
71
        imul    eax, ecx
72
        imul    eax, ecx
72
        mov     [esp+32], eax
73
        mov     [esp+32], eax
73
        imul    ebp, eax
74
        imul    ebp, eax
Line 89... Line 90...
89
        and     eax, 0xFFFFFF
90
        and     eax, 0xFFFFFF
90
.bufferReady:
91
.bufferReady:
91
        mov     ebp, eax
92
        mov     ebp, eax
92
        xor     edx, edx
93
        xor     edx, edx
93
        bt      ebx, 29
94
        bt      ebx, 29
-
 
95
        jc      @f
-
 
96
        bt      ebx, 28
-
 
97
        jc      .draw866toUni
94
        jnc     .draw866
98
        jmp     .draw866
-
 
99
@@:
95
        bt      ebx, 28
100
        bt      ebx, 28
96
        jc      .drawUTF8
101
        jc      .drawUTF8
Line 97... Line 102...
97
 
102
 
98
; Stack map:
103
; Stack map:
Line 189... Line 194...
189
        pop     edi
194
        pop     edi
190
        add     edi, esi
195
        add     edi, esi
191
        pop     esi
196
        pop     esi
192
        jmp     .draw866
197
        jmp     .draw866
Line -... Line 198...
-
 
198
 
-
 
199
.draw866toUni:
-
 
200
        dec     dword [esp]
-
 
201
        js      .done
-
 
202
        xor     eax, eax
-
 
203
        mov     al, [esi]
-
 
204
        test    eax, eax
-
 
205
        jz      .done
-
 
206
        call    ansi2uni_char
-
 
207
        shl     eax, 4
-
 
208
        lea     ebx, [eax+fontUni]
-
 
209
        inc     esi
-
 
210
        pushd   esi edi 16
-
 
211
        mov     esi, [esp+12+fontMultiplier]
-
 
212
        call    drawChar
-
 
213
        imul    esi, 8*4
-
 
214
        pop     edi
-
 
215
        pop     edi
-
 
216
        add     edi, esi
-
 
217
        pop     esi
-
 
218
        jmp     .draw866toUni
193
 
219
 
194
.done:
220
.done:
195
        mov     ecx, edi
221
        mov     ecx, edi
196
        pop     eax eax eax esi edx ebx ebp ebp ebp
222
        pop     eax eax eax esi edx ebx ebp ebp ebp
197
        mov     edi, [esp]
223
        mov     edi, [esp]
Line 784... Line 810...
784
        ror     eax, 8
810
        ror     eax, 8
785
        ror     ebx, 8
811
        ror     ebx, 8
786
        mov     ebp, ebx
812
        mov     ebp, ebx
787
        ret
813
        ret
Line 788... Line 814...
788
 
814
 
-
 
815
fontSmoothing   db  2   ; = 0, 1 or 2
789
fontSmoothing   db  2
816
fontSize        db  0   ; user mode setting
790
font1:
817
font1:
791
  if lang eq sp
818
  if lang eq sp
792
  file 'char_sp.mt'
819
  file 'char_sp.mt'
793
  else if lang eq et
820
  else if lang eq et