diff --git a/kernel/branches/Kolibri-A/trunk/gui/font.inc b/kernel/branches/Kolibri-A/trunk/gui/font.inc index 9b8e0820dd..f1b4dd74f9 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/font.inc +++ b/kernel/branches/Kolibri-A/trunk/gui/font.inc @@ -1,20 +1,19 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; +;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; +;; Distributed FOR KOLIBRIOS AND ITS DIRECT BRANCHES ONLY ;; +;; under conditions of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $Revision$ -; // Alver 22.06.2008 // { align 4 dtext_asciiz_esi: ; for skins title out push eax xor eax, eax inc eax jmp dtext.1 -; } \\ Alver \\ align 4 dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) @@ -27,11 +26,12 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) ; edx start of text ; edi 1 force -; // Alver 22.06.2008 // { + test ecx, 0x20000000 + jnz .font3 + push eax xor eax, eax .1: -; } \\ Alver \\ pushad call [_display.disable_mouse] @@ -50,12 +50,10 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) .test_asciiz: cmp byte [edx], 0 jz .end -; // Alver 22.06.2008 // { cmp byte [esp+28], 1 ; was the entry point = dtext.1 ? jne @f dec esi js .end -; } \\ Alver \\ @@: inc edx pushad ; esp -= 64 ! @@ -92,6 +90,7 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) popad add eax, 6 jmp .loop + .font2: add edx, edx lea ebp, [FONT_II+4*edx+edx+1] @@ -128,7 +127,7 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) jmp .loop .end: popad - pop eax ; << // Alver 22.06.2008 // << + pop eax ret diff10 "old font code size",dtext,$ @@ -137,6 +136,55 @@ diff10 "old font code size",dtext,$ ; NEW FONTS ;_____________________________________________________ ; +align 4 +.font3: + pushad + call [_display.disable_mouse] + movsx eax, bx ; eax=y + sar ebx, 16 ; ebx=x + xchg eax, ebx ; eax=x, ebx=y + + xor ebp, ebp ; font# + mov [font_check_routine], ebp + + test ecx, ecx + js .checked + inc [font_check_routine]; .check_esi +.checked: + mov edi, ecx ; colour + and edi, 0x0FFFFFF ; RGB +align 4 +.draw_char: + mov cl, byte[edx] ; char# + movzx ecx, cl + call nsvf_draw_char + add eax, 6 + test [font_check_routine], 1 + jz .check_asciz + +.check_esi: + inc edx + dec esi + jz .exit + jmp .draw_char + +align 4 +.check_asciz: + or byte[edx], 0 + jz .exit + inc edx + jmp .draw_char + +align 4 +.exit: + popad + ret + +align 4 + +font_check_routine dd ? + + align 8 sdsh_data: @@ -169,10 +217,10 @@ draw_char: mov ebp, edi -sdsh_draw_char: +nsvf_draw_char: ; eax = left side X ; ebx = bottom Y -; edi = color 0x0RRGGBB +; edi = colour 0x0RRGGBB ; ebp = font@ ; ecx = ascii, zero-extended to 32bits push ecx @@ -180,10 +228,10 @@ sdsh_draw_char: push ebp shl ebp, 4 add ebp, sdsh_data.info -; call ch_checkscreen -; jb .exit -; call ch_checkwin -; jc .exit + call ch_checkscreen + jb .exit + call ch_checkwin + jc .exit mov edx, [ebp + 4] ; chartable addr mov cx, word[edx + ecx*2] ; tick info mov edx, ecx @@ -214,17 +262,17 @@ diff16 "parse_tick : ",0,$ pushad mov dx, word[edx] movzx ecx, dl - test dl, 0xE0 - jz .lntick.short ; ticks #0..31 + test dl, 0xE0 + jz .lntick.short ; ticks #0..31 cmp dl, 0xE0 - jae .lntick.long ; ticks #224..255 + jae .lntick.long ; ticks #224..255 cmp dl, 0xD8 - jae .cstick ; ticks #216..223 + jae .cstick ; ticks #216..223 .gptick: push edx cmp dl, 38 - jb .sptick ; special ticks #32-37 - ; general ticks #38..215 + jb .sptick ; special ticks #32-37 + ; general ticks #38..215 mov cl, dh shr cl, 3 ; number of origin mov edx, [ebp+8] ; orig. table @@ -240,7 +288,7 @@ diff16 "parse_tick : ",0,$ .gptick.1: ; 1-byte tickgroups .v1-v4: lea esi, [sdsh_data.v1+edx] - inc dh ; dh = 1 vertex + inc dh ; dh = 1 vertex sub dl, 2 ; .v1 : 2 ticks only (#38, 39) jae .gptick.1v2v4 mov dl, dh @@ -249,8 +297,8 @@ diff16 "parse_tick : ",0,$ .gptick.1v2v4: ; 1-byte tickgroups .v2-v4 : 8, 16 and 16 ticks - inc dh ; dh = 2 vertice - add dl, 8 + inc dh ; dh = 2 vertice + add dl, 8 shr dl, 4 jmp .gptick.done @@ -276,8 +324,8 @@ diff16 "parse_tick : ",0,$ .gptick.4: ; 4-byte tickgroups .v13-16: 4 ticks each - cmp dl, 128 ; fix this when needed - jae .exit ; not implemented yet! + cmp dl, 128 ; fix this when needed + jae .exit ; not implemented yet! sub dl, 128 lea esi, [sdsh_data.v13 + edx*4] mov dh, 13 @@ -470,18 +518,19 @@ ch_checkwin: ; eax = x coordinate ; ebx = y coordinate ; ebp -> font info -;!destroys ch, edx! + push eax push ebx + push ecx + push edx mov ch, byte[CURRENT_TASK] - mov al, byte [ebp] ; char X-width mov edx, [_display.width] ; screen X-size imul edx, ebx add edx, [_WinMapAddress] add edx, eax cmp ch, byte [edx] jne .fail - movzx eax, byte [ebp] + movzx eax, byte [ebp] ; char X-width cmp ch, byte [edx+eax] jne .fail movzx ebx, byte [ebp+1] @@ -495,13 +544,15 @@ ch_checkwin: .fail: stc ; CF means the charbox is invisible .done: + pop edx + pop ecx pop ebx pop eax ret align 4 diff16 "ch_putpix : ",0,$ -; ch_putpixel: + ch_putpixel: ; eax = x coordinate ; ebx = y coordinate ; edi = 0x0RRGGBB @@ -513,7 +564,7 @@ diff16 "ch_putpix : ",0,$ pop edx ret ;) -ch_putpixel: +;ch_putpixel2: ; test version!!! ===== to be removed!! ; eax = x coordinate ; ebx = y coordinate diff --git a/kernel/branches/Kolibri-A/trunk/gui/fonts/sd_data.asm b/kernel/branches/Kolibri-A/trunk/gui/fonts/sd_data.asm index 19d4cb7ae1..784ab1dc51 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/fonts/sd_data.asm +++ b/kernel/branches/Kolibri-A/trunk/gui/fonts/sd_data.asm @@ -97,20 +97,20 @@ align 4 db 0x38 ; 28 db 0x41 ; 29 db 0x30 ; 30 - db 0x47 ; 31 J + db 0x37 ; 31 J align 4 diff16 "sdsh_data.tick_table: ",0,$ .tick_table: - db 0, 0, 0, 0, 0, 0 ;32..37 (reserved) + db 0, 0, 0, 0, 0, 0 ;32..37 (reserved) .v1: - ; 38 39 + ; 38 39 db 01b ; XX XX db 11b ; X X .v2: - ; 40 41 42 43 44 45 + ; 40 41 42 43 44 45 db 0100b ;40 XXX XXX XX XX XX XX db 1100b ;41 X X X XX X X db 0001b ;42 X X X @@ -120,7 +120,7 @@ diff16 "sdsh_data.tick_table: ",0,$ db 0 ;46 db 0 ;47 .v3: - ; 48 49 50 51 52 53 54 55 + ; 48 49 50 51 52 53 54 55 db 010100b ;48 XXX XX XX XX XXXX XX XXX XX db 000011b ;49 X X X X X X X X db 010001b ;50 X X X X X X X @@ -129,50 +129,51 @@ diff16 "sdsh_data.tick_table: ",0,$ db 000111b ;53 db 001100b ;54 db 010101b ;55 - db 0, 0, 0, 0 ;56..59 - db 0, 0, 0, 0 ;60..63 + db 0, 0, 0, 0 ;56..59 + db 0, 0, 0, 0 ;60..63 .v4: - ; 64 65 66 67 68 69 + ; 64 65 66 67 68 69 db 01010001b ;64: XX XX XXXX Y XX XX db 01000101b ;65: X X X X X X db 01010000b ;66: X X X X XXX XXX db 01010010b ;67: X X X db 00011101b ;68: X X X db 00110101b ;69: X - db 0 ;70: - db 0 ;71: - db 0, 0, 0, 0 ;72..75 - db 0, 0, 0, 0 ;76..79 + db 10100000b ;70: + db 0 ;71: + db 0, 0, 0, 0 ;72..75 + db 0, 0, 0, 0 ;76..79 .v5: db 00000001b, 01b ;80: )( db 00000001b, 10b ;81: /7X db 01000101b, 01b ;82: 8u - db 01010100b, 01b ;83: BPRa + db 01010100b, 01b ;83: db 00000010b, 01b ;84: \X& db 00010100b, 00b ;85: ahnu— db 10111000b, 00b ;86: - db 0, 0 ;87: + db 0, 0 ;87: .v6: - db 01000000b, 0101b ;88: Jfg - db 01010100b, 0001b ;89: - db 0, 0, 0, 0 ;90,91 - db 0, 0, 0, 0 ;92,93 - db 0, 0, 0, 0 ;94,95 + db 01000000b, 0101b ;88: Jfg + db 01010100b, 0001b ;89: BPRa + db 11010010b, 0001b ;90: s$ + db 0, 0 ;91 + db 0, 0, 0, 0 ;92,93 + db 0, 0, 0, 0 ;94,95 .v7: db 11011001b, 011001b ;96: > gptick 8, 0, 96 .ch0_63: ; ? - gptick 7, 1, 64 - + gptick 4, 1, 64 + gptick 24, 2, 38 + ritick 2, 2, 0 .ch0_66: ; B .ch0_130: ; B gptick 10, 6, 51 + gptick 4, 0, 89 + lntick 0, 2, 2, 7 .ch0_80: ; P .ch0_144: ; .ch0_82: ; R - gptick 9, 0, 83 + gptick 9, 0, 98 .ch0_75: ; K .ch0_138: ; K lntick 0, 2, 2, 7 @@ -522,12 +531,12 @@ diff16 "sdsh_data.chars: ",0,$ lntick 1, 5, 1, 4 .ch0_67: ; C .ch0_145: ; - ritick 5, 3, 0 + ritick 4, 3, 0 .ch0_71: ; G gptick 5, 4, 116 - gptick 4, 5, 49 + gptick 13, 0, 49 .ch0_68: ; D - gptick 9, 0, 96 + gptick 9, 0, 97 .ch0_76: ; L lntick 0, 2, 2, 7 lntick 1, 2, 0, 4 @@ -543,19 +552,18 @@ diff16 "sdsh_data.chars: ",0,$ .ch0_141: ; H lntick 1, 5, 0, 3 lntick 0, 2, 2, 7 - lntick 5, 5, 2, 7 + lntick 4, 2, 2, 7 .ch0_73: ; I lntick 1, 8, 0, 3 lntick 2, 3, 2, 5 lntick 1, 2, 0, 3 .ch0_74: ; J gptick 31, 6, 88 - lntick 3, 8, 0, 3 + lntick 2, 8, 0, 3 .ch0_84: ; T .ch0_146: ; ’ - lntick 3, 3, 2, 5 - lntick 2, 2, 0, 3 - lntick 1, 8, 0, 5 + lntick 2, 2, 2, 6 + lntick 0, 8, 0, 5 .ch0_77: ; M .ch0_140: ; M gptick 21, 2, 38 @@ -576,7 +584,7 @@ diff16 "sdsh_data.chars: ",0,$ .ch0_118: ; v .ch0_121: ; y gptick 12, 6, 96 - lntick 2, 0, 2, 2 + lntick 1, 0, 1, 2 .ch0_88: ; X .ch0_149: ; gptick 1, 2, 81 @@ -609,8 +617,8 @@ diff16 "sdsh_data.chars: ",0,$ lntick 3, 8, 3, 2 .ch0_97: ; a .ch0_160: ; - gptick 5, 4, 83 - gptick 16, 0, 85 + gptick 5, 4, 89 + gptick 7, 2, 70 .ch0_129: ; lntick 1, 8, 0, 3 .ch0_98: ; b @@ -667,8 +675,6 @@ diff16 "sdsh_data.chars: ",0,$ .ch0_114: ; r lntick 1, 2, 2, 5 gptick 21, 1, 38 -.ch0_115: ; s - gptick 1, 0, 120 .ch0_116: ; t gptick 16, 0, 49 gptick 20, 3, 38 @@ -689,7 +695,7 @@ diff16 "sdsh_data.chars: ",0,$ .ch0_122: ; z lntick 0, 2, 0, 5 lntick 0, 6, 0, 5 - lntick 1, 2, 3, 3 + lntick 1, 3, 1, 3 .ch0_123: ; { gptick 5, 3, 43 gptick 23, 2, 38 @@ -698,144 +704,142 @@ diff16 "sdsh_data.chars: ",0,$ gptick 24, 6, 38 .ch0_126: ; ~ gptick 2, 1, 39 - lntick 3, 3, 1, 2 + lntick 3, 4, 1, 2 .ch0_127: ; lntick 2, 2, 2, 3 lntick 2, 6, 2, 3 .ch0_131: ; - lntick 1, 8, 0, 4 .ch0_132: ; - lntick 1, 3, 2, 5 lntick 1, 8, 0, 4 + lntick 1, 2, 2, 6 lntick 0, 1, 2, 2 .ch0_150: ; lntick 0, 2, 0, 5 lntick 3, 3, 2, 6 ritick 4, 1, 0 lntick 0, 3, 2, 6 -.ch0_134: ; +.ch0_134: ; ZH gptick 4, 6, 86 gptick 6, 2, 86 -.ch0_148: ; +.ch0_148: ; EF lntick 2, 2, 2, 7 cstick 1, 8, 0, 3 -.ch0_137: ; +.ch0_137: ; IJ gptick 25, 2, 39 -.ch0_136: ; +.ch0_136: ; I lntick 0, 2, 2, 7 lntick 1, 4, 1, 3 -.ch0_139: ; +.ch0_139: ; K lntick 4, 2, 2, 7 gptick 26, 2, 66 lntick 0, 2, 1, 2 -.ch0_143: ; +.ch0_143: ; PE lntick 0, 2, 2, 7 lntick 1, 8, 0, 3 -.ch0_151: ; +.ch0_151: ; CHA lntick 4, 2, 2, 7 -.ch0_147: ; +.ch0_147: ; UU gptick 27, 4, 85 lntick 4, 3, 2, 6 lntick 1, 2, 0, 3 -.ch0_155: ; - lntick 16, 0, 82 -.ch0_152: ; -.ch0_153: ; +.ch0_155: ; YY + gptick 3, 0, 82 +.ch0_152: ; SHA +.ch0_153: ; SCHA lntick 0, 3, 2, 6 lntick 4, 2, 2, 7 lntick 2, 3, 2, 6 lntick 0, 2, 0, 5 lntick 4, 1, 2, 2 -.ch0_154: ; -.ch0_156: ; - lntick 26, 0, 82 +.ch0_154: ; TVZNAK +.ch0_156: ; MZNAK + gptick 14, 0, 89 lntick 1, 3, 2, 6 ritick 0, 8, 0 -.ch0_135: ; +.ch0_135: ; ZE ritick 3, 5, 0 -.ch0_157: ; +.ch0_157: ; AE gptick 8, 1, 64 gptick 10, 6, 65 lntick 1, 5, 0, 4 -.ch0_158: ; +.ch0_158: ; JU gptick 28, 7, 80 lntick 2, 3, 2, 5 lntick 0, 2, 2, 7 ritick 1, 5, 0 -.ch0_159: ; +.ch0_159: ; JA gptick 13, 4, 89 lntick 4, 2, 2, 7 lntick 0, 2, 1, 3 -.ch0_161: ; +.ch0_161: ; be gptick 8, 1, 42 -.ch0_162: ; +.ch0_162: ; ve .ch0_111: ; o -.ch0_174: ; +.ch0_174: ; o cstick 1, 6, 0, 3 gptick 3, 2, 44 ritick 2, 7, 0 -.ch0_163: ; +.ch0_163: ; ge lntick 1, 6, 0, 4 -.ch0_164: ; +.ch0_164: ; de lntick 1, 2, 2, 4 gptick 23, 0, 49 gptick 19, 0, 41 lntick 0, 1, 2, 2 -.ch0_166: ; +.ch0_166: ; zhe gptick 12, 6, 82 gptick 1, 2, 82 lntick 2, 2, 2, 5 -.ch0_167: ; +.ch0_167: ; ze lntick 2, 4, 0, 2 -.ch0_237: ; +.ch0_237: ; ae gptick 2, 1, 50 gptick 7, 5, 50 lntick 2, 4, 0, 3 -.ch0_169: ; +.ch0_169: ; ji gptick 28, 5, 39 -.ch0_168: ; +.ch0_168: ; ii lntick 4, 2, 2, 5 lntick 1, 3, 1, 3 -.ch0_170: ; - lntick 1, 2, 2, 5 - gptick 6, 3, 54 - ritick 1, 5, 0 -.ch0_171: ; +.ch0_170: ; ka + lntick 0, 2, 2, 5 + gptick 5, 3, 54 +.ch0_171: ; el gptick 1, 1, 67 -.ch0_172: ; +.ch0_172: ; em lntick 4, 2, 2, 5 gptick 13, 5, 39 -.ch0_173: ; +.ch0_173: ; en lntick 0, 2, 2, 5 lntick 1, 4, 0, 3 -.ch0_175: ; +.ch0_175: ; pe lntick 4, 2, 2, 5 lntick 0, 2, 2, 4 -.ch0_226: ; +.ch0_226: ; te lntick 0, 6, 0, 5 lntick 2, 2, 2, 4 -.ch0_228: ; ä +.ch0_228: ; ef cstick 1, 6, 0, 3 lntick 2, 0, 2, 6 -.ch0_229: ; å +.ch0_229: ; ha lntick 0, 2, 1, 5 lntick 4, 2, 3, 5 -.ch0_230: ; æ +.ch0_230: ; tse lntick 0, 2, 2, 5 lntick 3, 3, 2, 4 gptick 22, 0, 52 -.ch0_231: ; ç +.ch0_231: ; che gptick 27, 4, 48 -.ch0_232: ; è -.ch0_233: ; é +.ch0_232: ; sha +.ch0_233: ; scha lntick 4, 2, 2, 5 lntick 0, 3, 2, 4 lntick 2, 3, 2, 4 lntick 0, 2, 0, 4 lntick 5, 1, 2, 2 -.ch0_234: ; ê +.ch0_234: ; tvznak gptick 24, 0, 68 - gptick 6, 0, 49 + gptick 3, 0, 49 .ch0_235: ; ë .ch0_236: ; ì lntick 0, 3, 2, 4 @@ -866,7 +870,7 @@ diff16 "sdsh_data.chars: ",0,$ lntick 1, 0, 1, 4 lntick 3, 0, 1, 2 .ch0_184: ; - lntick 3, 0, 2, 6 + lntick 2, 0, 2, 6 .ch0_181: ; lntick 0, 3, 0, 2 lntick 0, 5, 0, 2 @@ -881,6 +885,7 @@ diff16 "sdsh_data.chars: ",0,$ .ch0_185: ; gptick 11, 0, 49 gptick 9, 6, 52 + lntick 3, 0, 2, 9 .ch0_182: ; .ch0_215: ; ritick 0, 4, 0 @@ -892,15 +897,16 @@ diff16 "sdsh_data.chars: ",0,$ .ch0_204: ; gptick 15, 4, 49 gptick 30, 2, 52 + lntick 1, 0, 2, 9 .ch0_187: ; - lntick 4, 0, 2, 5 + lntick 3, 0, 2, 5 lntick 0, 5, 0, 4 gptick 11, 0, 49 .ch0_188: ; ritick 0, 5, 0 lntick 0, 3, 0, 4 .ch0_189: ; - lntick 4, 4, 2, 5 + lntick 3, 4, 2, 5 lntick 1, 5, 2, 4 lntick 0, 4, 0, 3 .ch0_190: ;