Subversion Repositories Kolibri OS

Rev

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

Rev 5839 Rev 5847
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: 5839 $
8
$Revision: 5847 $
9
 
9
 
10
dtext_asciiz_esi:
10
dtext_asciiz_esi:
11
        btr     ecx, 31
11
        btr     ecx, 31
Line 247... Line 247...
247
        jnz     .square
247
        jnz     .square
248
        mov     [edi], ebp
248
        mov     [edi], ebp
249
        inc     esi
249
        inc     esi
250
        cmp     [fontSmoothing], 0
250
        cmp     [fontSmoothing], 0
251
        jz      .nextPixel
251
        jz      .nextPixel
252
.checkLeftSubP:     ; subpixel smoothing
252
.checkLeftSM:     ; smoothing
253
        bsf     eax, edx
253
        bsf     eax, edx
254
        dec     eax
254
        dec     eax
255
        js      .checkRightSubP
255
        js      .checkRightSM
256
        bt      [ebx], eax
256
        bt      [ebx], eax
257
        jc      .checkRightSubP
257
        jc      .checkRightSM
258
        dec     eax
258
        dec     eax
259
        js      .checkLeftDownSubP
259
        js      .checkLeftDownSM
260
        bt      [ebx], eax
260
        bt      [ebx], eax
261
        jc      .checkRightSubP
261
        jc      .checkRightSM
262
.checkLeftDownSubP:
262
.checkLeftDownSM:
263
        inc     eax
263
        inc     eax
264
        bt      [ebx+1], eax
264
        bt      [ebx+1], eax
265
        jnc     .checkLeftUpSubP
265
        jnc     .checkLeftUpSM
266
        inc     eax
266
        inc     eax
267
        bt      [ebx+1], eax
267
        bt      [ebx+1], eax
268
        jnc     @f
268
        jnc     @f
269
        bt      [ebx-1], eax
269
        bt      [ebx-1], eax
270
        jc      .checkRightSubP
270
        jc      .checkRightSM
271
        dec     eax
271
        dec     eax
272
        dec     eax
272
        dec     eax
273
        js      @f
273
        js      @f
274
        bt      [ebx+1], eax
274
        bt      [ebx+1], eax
275
        jnc     @f
275
        jnc     @f
276
        inc     eax
276
        inc     eax
277
.checkLeftUpSubP:
277
.checkLeftUpSM:
278
        bt      [ebx-1], eax
278
        bt      [ebx-1], eax
279
        jnc     .checkRightSubP
279
        jnc     .checkRightSM
280
        inc     eax
280
        inc     eax
281
        bt      [ebx-1], eax
281
        bt      [ebx-1], eax
282
        jnc     @f
282
        jnc     @f
283
        bt      [ebx+1], eax
283
        bt      [ebx+1], eax
284
        jc      .checkRightSubP
284
        jc      .checkRightSM
285
        dec     eax
285
        dec     eax
286
        dec     eax
286
        dec     eax
287
        js      @f
287
        js      @f
288
        bt      [ebx-1], eax
288
        bt      [ebx-1], eax
289
        jc      .checkRightSubP
289
        jc      .checkRightSM
290
@@:
290
@@:
291
        mov     ecx, [esp+20+deltaToScreen]
291
        mov     ecx, [esp+20+deltaToScreen]
292
        mov     eax, [edi-4]
292
        mov     eax, [edi-4]
293
        test    ecx, ecx
293
        test    ecx, ecx
294
        jz      @f
294
        jz      @f
Line 299... Line 299...
299
        popa
299
        popa
300
@@:
300
@@:
301
        push    ebx edx
301
        push    ebx edx
302
        mov     ebx, ebp
302
        mov     ebx, ebp
303
        xor     ecx, ecx
303
        xor     ecx, ecx
-
 
304
        cmp     [fontSmoothing], 1
-
 
305
        jnz     .subpixelLeft
-
 
306
        call    antiAliasing
-
 
307
        jmp     @f
-
 
308
.subpixelLeft:
304
        mov     cl, bl
309
        mov     cl, bl
305
        lea     edx, [ecx*8+ecx]
310
        lea     edx, [ecx*8+ecx]
306
        lea     edx, [ecx*2+edx]
311
        lea     edx, [ecx*2+edx]
307
        mov     cl, al
312
        mov     cl, al
308
        lea     ecx, [ecx*4+ecx]
313
        lea     ecx, [ecx*4+ecx]
Line 330... Line 335...
330
        mov     dl, bl
335
        mov     dl, bl
331
        add     ecx, edx
336
        add     ecx, edx
332
        shr     ecx, 3
337
        shr     ecx, 3
333
        mov     al, cl
338
        mov     al, cl
334
        rol     eax, 16
339
        rol     eax, 16
-
 
340
@@:
335
        mov     [edi-4], eax
341
        mov     [edi-4], eax
336
        pop     edx ebx
342
        pop     edx ebx
337
.checkRightSubP:
343
.checkRightSM:
338
        bsf     eax, edx
344
        bsf     eax, edx
339
        inc     eax
345
        inc     eax
340
        bt      [ebx], eax
346
        bt      [ebx], eax
341
        jc      .nextPixel
347
        jc      .nextPixel
342
        inc     eax
348
        inc     eax
343
        bt      [ebx], eax
349
        bt      [ebx], eax
344
        jc      .nextPixel
350
        jc      .nextPixel
345
        dec     eax
351
        dec     eax
346
.checkRightDownSubP:
352
.checkRightDownSM:
347
        bt      [ebx+1], eax
353
        bt      [ebx+1], eax
348
        jnc     .checkRightUpSubP
354
        jnc     .checkRightUpSM
349
        dec     eax
355
        dec     eax
350
        bt      [ebx+1], eax
356
        bt      [ebx+1], eax
351
        jnc     @f
357
        jnc     @f
352
        bt      [ebx-1], eax
358
        bt      [ebx-1], eax
353
        jc      .nextPixel
359
        jc      .nextPixel
354
        inc     eax
360
        inc     eax
355
        inc     eax
361
        inc     eax
356
        bt      [ebx+1], eax
362
        bt      [ebx+1], eax
357
        jnc     @f
363
        jnc     @f
358
        dec     eax
364
        dec     eax
359
.checkRightUpSubP:
365
.checkRightUpSM:
360
        bt      [ebx-1], eax
366
        bt      [ebx-1], eax
361
        jnc     .nextPixel
367
        jnc     .nextPixel
362
        dec     eax
368
        dec     eax
363
        bt      [ebx-1], eax
369
        bt      [ebx-1], eax
364
        jnc     @f
370
        jnc     @f
Line 380... Line 386...
380
        popa
386
        popa
381
@@:
387
@@:
382
        push    ebx edx
388
        push    ebx edx
383
        mov     ebx, ebp
389
        mov     ebx, ebp
384
        xor     ecx, ecx
390
        xor     ecx, ecx
-
 
391
        cmp     [fontSmoothing], 1
-
 
392
        jnz     .subpixelRight
-
 
393
        call    antiAliasing
-
 
394
        jmp     @f
-
 
395
.subpixelRight:
385
        mov     cl, al
396
        mov     cl, al
386
        mov     edx, ecx
397
        mov     edx, ecx
387
        shl     ecx, 3
398
        shl     ecx, 3
388
        sub     ecx, edx
399
        sub     ecx, edx
389
        mov     dl, bl
400
        mov     dl, bl
Line 411... Line 422...
411
        lea     ecx, [ecx*4+ecx]
422
        lea     ecx, [ecx*4+ecx]
412
        add     edx, ecx
423
        add     edx, ecx
413
        shr     edx, 4
424
        shr     edx, 4
414
        mov     al, dl
425
        mov     al, dl
415
        rol     eax, 16
426
        rol     eax, 16
-
 
427
@@:
416
        mov     [edi+4], eax
428
        mov     [edi+4], eax
417
        pop     edx ebx
429
        pop     edx ebx
418
        jmp     .nextPixel
430
        jmp     .nextPixel
Line 419... Line 431...
419
 
431
 
Line 754... Line 766...
754
        add     edi, eax
766
        add     edi, eax
755
        dec     dword [esp+4]
767
        dec     dword [esp+4]
756
        jnz     drawChar
768
        jnz     drawChar
757
        ret
769
        ret
Line -... Line 770...
-
 
770
 
-
 
771
antiAliasing:
-
 
772
        mov     bp, 3
-
 
773
@@:
-
 
774
        mov     cl, al
-
 
775
        mov     dl, bl
-
 
776
        lea     ecx, [ecx*2+ecx]
-
 
777
        add     ecx, edx
-
 
778
        shr     ecx, 2
-
 
779
        mov     al, cl
-
 
780
        ror     eax, 8
-
 
781
        ror     ebx, 8
-
 
782
        dec     bp
-
 
783
        jnz     @b
-
 
784
        ror     eax, 8
-
 
785
        ror     ebx, 8
-
 
786
        mov     ebp, ebx
-
 
787
        ret
758
 
788
 
759
fontSmoothing   db  1
789
fontSmoothing   db  2
760
font1:
790
font1:
761
  if lang eq sp
791
  if lang eq sp
762
  file 'char_sp.mt'
792
  file 'char_sp.mt'
763
  else if lang eq et
793
  else if lang eq et