Rev 2430 | Rev 2453 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2288 | clevermous | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
||
4 | ;; Distributed under terms of the GNU General Public License ;; |
||
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
7 | |||
8 | $Revision: 2436 $ |
||
9 | |||
2436 | mario79 | 10 | ;------------------------------------------------------------------------------ |
2288 | clevermous | 11 | align 4 |
12 | dtext_asciiz_esi: ; for skins title out |
||
13 | push eax |
||
14 | xor eax, eax |
||
15 | inc eax |
||
16 | jmp dtext.1 |
||
2436 | mario79 | 17 | ;------------------------------------------------------------------------------ |
2288 | clevermous | 18 | align 4 |
19 | dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
||
20 | ; ebx x & y |
||
21 | ; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
||
22 | ; X = ABnnb: |
||
23 | ; nn = font |
||
24 | ; A = 0 <=> output esi characters; otherwise output ASCIIZ string |
||
25 | ; B = 1 <=> fill background with color eax |
||
26 | ; edx start of text |
||
27 | ; edi 1 force |
||
28 | push eax |
||
29 | xor eax, eax |
||
2436 | mario79 | 30 | ;-------------------------------------- |
31 | align 4 |
||
2288 | clevermous | 32 | .1: |
33 | pushad |
||
34 | movsx eax, bx ; eax=y |
||
35 | sar ebx, 16 ; ebx=x |
||
36 | xchg eax, ebx ; eax=x, ebx=y |
||
37 | cmp esi, 255 |
||
38 | jb .loop |
||
39 | mov esi, 255 |
||
2436 | mario79 | 40 | ;-------------------------------------- |
41 | align 4 |
||
2288 | clevermous | 42 | .loop: |
43 | test ecx, ecx |
||
44 | js .test_asciiz |
||
45 | dec esi |
||
46 | js .end |
||
47 | jmp @f |
||
2436 | mario79 | 48 | ;-------------------------------------- |
49 | align 4 |
||
2288 | clevermous | 50 | .test_asciiz: |
51 | cmp byte [edx], 0 |
||
52 | jz .end |
||
2436 | mario79 | 53 | |
2288 | clevermous | 54 | cmp byte [esp+28], 1 |
55 | jne @f |
||
56 | dec esi |
||
57 | js .end |
||
2436 | mario79 | 58 | ;-------------------------------------- |
59 | align 4 |
||
2288 | clevermous | 60 | @@: |
61 | inc edx |
||
62 | pushad |
||
63 | movzx edx, byte [edx-1] |
||
64 | test ecx, 0x10000000 |
||
65 | jnz .font2 |
||
66 | mov esi, 9 |
||
67 | lea ebp, [FONT_I+8*edx+edx] |
||
2436 | mario79 | 68 | ;-------------------------------------- |
69 | align 4 |
||
2288 | clevermous | 70 | .symloop1: |
71 | mov dl, byte [ebp] |
||
72 | or dl, 1 shl 6 |
||
2436 | mario79 | 73 | ;-------------------------------------- |
74 | align 4 |
||
2288 | clevermous | 75 | .pixloop1: |
76 | shr dl, 1 |
||
77 | jz .pixloop1end |
||
78 | jnc .nopix |
||
2430 | mario79 | 79 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2288 | clevermous | 80 | call [putpixel] |
81 | jmp .pixloop1cont |
||
2436 | mario79 | 82 | ;-------------------------------------- |
83 | align 4 |
||
2288 | clevermous | 84 | .nopix: |
85 | test ecx, 0x40000000 |
||
86 | jz .pixloop1cont |
||
87 | push ecx |
||
88 | mov ecx, [esp+4+20h+20h] |
||
2430 | mario79 | 89 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2288 | clevermous | 90 | call [putpixel] |
91 | pop ecx |
||
2436 | mario79 | 92 | ;-------------------------------------- |
93 | align 4 |
||
2288 | clevermous | 94 | .pixloop1cont: |
95 | inc eax |
||
96 | jmp .pixloop1 |
||
2436 | mario79 | 97 | ;-------------------------------------- |
98 | align 4 |
||
2288 | clevermous | 99 | .pixloop1end: |
100 | sub eax, 6 |
||
101 | inc ebx |
||
102 | inc ebp |
||
103 | dec esi |
||
104 | jnz .symloop1 |
||
105 | popad |
||
106 | add eax, 6 |
||
107 | jmp .loop |
||
2436 | mario79 | 108 | ;-------------------------------------- |
109 | align 4 |
||
2288 | clevermous | 110 | .font2: |
111 | add edx, edx |
||
112 | lea ebp, [FONT_II+4*edx+edx+1] |
||
113 | push 9 |
||
114 | movzx esi, byte [ebp-1] |
||
2436 | mario79 | 115 | ;-------------------------------------- |
116 | align 4 |
||
2288 | clevermous | 117 | .symloop2: |
118 | mov dl, byte [ebp] |
||
119 | push esi |
||
2436 | mario79 | 120 | ;-------------------------------------- |
121 | align 4 |
||
2288 | clevermous | 122 | .pixloop2: |
123 | shr dl, 1 |
||
124 | jnc .nopix2 |
||
2430 | mario79 | 125 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2288 | clevermous | 126 | call [putpixel] |
127 | jmp .pixloop2cont |
||
2436 | mario79 | 128 | ;-------------------------------------- |
129 | align 4 |
||
2288 | clevermous | 130 | .nopix2: |
131 | test ecx, 0x40000000 |
||
132 | jz .pixloop2cont |
||
133 | push ecx |
||
134 | mov ecx, [esp+12+20h+20h] |
||
2430 | mario79 | 135 | and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area |
2288 | clevermous | 136 | call [putpixel] |
137 | pop ecx |
||
2436 | mario79 | 138 | ;-------------------------------------- |
139 | align 4 |
||
2288 | clevermous | 140 | .pixloop2cont: |
141 | inc eax |
||
142 | dec esi |
||
143 | jnz .pixloop2 |
||
144 | pop esi |
||
145 | sub eax, esi |
||
146 | inc ebx |
||
147 | inc ebp |
||
148 | dec dword [esp] |
||
149 | jnz .symloop2 |
||
150 | pop eax |
||
151 | add dword [esp+28], esi |
||
152 | popad |
||
153 | jmp .loop |
||
2436 | mario79 | 154 | ;-------------------------------------- |
155 | align 4 |
||
2288 | clevermous | 156 | .end: |
157 | popad |
||
2436 | mario79 | 158 | pop eax |
2288 | clevermous | 159 | ret |
2436 | mario79 | 160 | ;------------------------------------------------------------------------------=>=> |