Rev 983 | Rev 2288 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 983 | Rev 1300 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. 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 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | 7 | ||
8 | $Revision: 983 $ |
8 | $Revision: 1300 $ |
9 | 9 | ||
10 | ; // Alver 22.06.2008 // { |
10 | ; // Alver 22.06.2008 // { |
11 | align 4 |
11 | align 4 |
12 | dtext_asciiz_esi: ; for skins title out |
12 | dtext_asciiz_esi: ; for skins title out |
13 | push eax |
13 | push eax |
14 | xor eax, eax |
14 | xor eax, eax |
15 | inc eax |
15 | inc eax |
16 | jmp dtext.1 |
16 | jmp dtext.1 |
17 | ; } \\ Alver \\ |
17 | ; } \\ Alver \\ |
18 | 18 | ||
19 | align 4 |
19 | align 4 |
20 | dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
20 | dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
21 | ; ebx x & y |
21 | ; ebx x & y |
22 | ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
22 | ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
23 | ; X = ABnnb: |
23 | ; X = ABnnb: |
24 | ; nn = font |
24 | ; nn = font |
25 | ; A = 0 <=> output esi characters; otherwise output ASCIIZ string |
25 | ; A = 0 <=> output esi characters; otherwise output ASCIIZ string |
26 | ; B = 1 <=> fill background with color eax |
26 | ; B = 1 <=> fill background with color eax |
27 | ; edx start of text |
27 | ; edx start of text |
28 | ; edi 1 force |
28 | ; edi 1 force |
29 | 29 | ||
30 | ; // Alver 22.06.2008 // { |
30 | ; // Alver 22.06.2008 // { |
31 | push eax |
31 | push eax |
32 | xor eax, eax |
32 | xor eax, eax |
33 | .1: |
33 | .1: |
34 | ; } \\ Alver \\ |
34 | ; } \\ Alver \\ |
35 | pushad |
35 | pushad |
36 | call [disable_mouse] |
36 | call [_display.disable_mouse] |
37 | 37 | ||
38 | movsx eax, bx ; eax=y |
38 | movsx eax, bx ; eax=y |
39 | sar ebx, 16 ; ebx=x |
39 | sar ebx, 16 ; ebx=x |
40 | xchg eax, ebx ; eax=x, ebx=y |
40 | xchg eax, ebx ; eax=x, ebx=y |
41 | cmp esi, 255 |
41 | cmp esi, 255 |
42 | jb .loop |
42 | jb .loop |
43 | mov esi, 255 |
43 | mov esi, 255 |
44 | .loop: |
44 | .loop: |
45 | test ecx, ecx |
45 | test ecx, ecx |
46 | js .test_asciiz |
46 | js .test_asciiz |
47 | dec esi |
47 | dec esi |
48 | js .end |
48 | js .end |
49 | jmp @f |
49 | jmp @f |
50 | .test_asciiz: |
50 | .test_asciiz: |
51 | cmp byte [edx], 0 |
51 | cmp byte [edx], 0 |
52 | jz .end |
52 | jz .end |
53 | ; // Alver 22.06.2008 // { |
53 | ; // Alver 22.06.2008 // { |
54 | cmp byte [esp+28], 1 |
54 | cmp byte [esp+28], 1 |
55 | jne @f |
55 | jne @f |
56 | dec esi |
56 | dec esi |
57 | js .end |
57 | js .end |
58 | ; } \\ Alver \\ |
58 | ; } \\ Alver \\ |
59 | @@: |
59 | @@: |
60 | inc edx |
60 | inc edx |
61 | pushad |
61 | pushad |
62 | movzx edx, byte [edx-1] |
62 | movzx edx, byte [edx-1] |
63 | test ecx, 0x10000000 |
63 | test ecx, 0x10000000 |
64 | jnz .font2 |
64 | jnz .font2 |
65 | mov esi, 9 |
65 | mov esi, 9 |
66 | lea ebp, [FONT_I+8*edx+edx] |
66 | lea ebp, [FONT_I+8*edx+edx] |
67 | .symloop1: |
67 | .symloop1: |
68 | mov dl, byte [ebp] |
68 | mov dl, byte [ebp] |
69 | or dl, 1 shl 6 |
69 | or dl, 1 shl 6 |
70 | .pixloop1: |
70 | .pixloop1: |
71 | shr dl, 1 |
71 | shr dl, 1 |
72 | jz .pixloop1end |
72 | jz .pixloop1end |
73 | jnc .nopix |
73 | jnc .nopix |
74 | call [putpixel] |
74 | call [putpixel] |
75 | jmp .pixloop1cont |
75 | jmp .pixloop1cont |
76 | .nopix: |
76 | .nopix: |
77 | test ecx, 0x40000000 |
77 | test ecx, 0x40000000 |
78 | jz .pixloop1cont |
78 | jz .pixloop1cont |
79 | push ecx |
79 | push ecx |
80 | mov ecx, [esp+4+20h+20h] |
80 | mov ecx, [esp+4+20h+20h] |
81 | call [putpixel] |
81 | call [putpixel] |
82 | pop ecx |
82 | pop ecx |
83 | .pixloop1cont: |
83 | .pixloop1cont: |
84 | inc eax |
84 | inc eax |
85 | jmp .pixloop1 |
85 | jmp .pixloop1 |
86 | .pixloop1end: |
86 | .pixloop1end: |
87 | sub eax, 6 |
87 | sub eax, 6 |
88 | inc ebx |
88 | inc ebx |
89 | inc ebp |
89 | inc ebp |
90 | dec esi |
90 | dec esi |
91 | jnz .symloop1 |
91 | jnz .symloop1 |
92 | popad |
92 | popad |
93 | add eax, 6 |
93 | add eax, 6 |
94 | jmp .loop |
94 | jmp .loop |
95 | .font2: |
95 | .font2: |
96 | add edx, edx |
96 | add edx, edx |
97 | lea ebp, [FONT_II+4*edx+edx+1] |
97 | lea ebp, [FONT_II+4*edx+edx+1] |
98 | push 9 |
98 | push 9 |
99 | movzx esi, byte [ebp-1] |
99 | movzx esi, byte [ebp-1] |
100 | .symloop2: |
100 | .symloop2: |
101 | mov dl, byte [ebp] |
101 | mov dl, byte [ebp] |
102 | push esi |
102 | push esi |
103 | .pixloop2: |
103 | .pixloop2: |
104 | shr dl, 1 |
104 | shr dl, 1 |
105 | jnc .nopix2 |
105 | jnc .nopix2 |
106 | call [putpixel] |
106 | call [putpixel] |
107 | jmp .pixloop2cont |
107 | jmp .pixloop2cont |
108 | .nopix2: |
108 | .nopix2: |
109 | test ecx, 0x40000000 |
109 | test ecx, 0x40000000 |
110 | jz .pixloop2cont |
110 | jz .pixloop2cont |
111 | push ecx |
111 | push ecx |
112 | mov ecx, [esp+12+20h+20h] |
112 | mov ecx, [esp+12+20h+20h] |
113 | call [putpixel] |
113 | call [putpixel] |
114 | pop ecx |
114 | pop ecx |
115 | .pixloop2cont: |
115 | .pixloop2cont: |
116 | inc eax |
116 | inc eax |
117 | dec esi |
117 | dec esi |
118 | jnz .pixloop2 |
118 | jnz .pixloop2 |
119 | pop esi |
119 | pop esi |
120 | sub eax, esi |
120 | sub eax, esi |
121 | inc ebx |
121 | inc ebx |
122 | inc ebp |
122 | inc ebp |
123 | dec dword [esp] |
123 | dec dword [esp] |
124 | jnz .symloop2 |
124 | jnz .symloop2 |
125 | pop eax |
125 | pop eax |
126 | add dword [esp+28], esi |
126 | add dword [esp+28], esi |
127 | popad |
127 | popad |
128 | jmp .loop |
128 | jmp .loop |
129 | .end: |
129 | .end: |
130 | popad |
130 | popad |
131 | pop eax ; << // Alver 22.06.2008 // << |
131 | pop eax ; << // Alver 22.06.2008 // << |
132 | ret |
132 | ret |
133 | >< |
133 | >< |
134 | >><>=>=> |
134 | >><>=>=> |