Rev 2 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ha | 1 | align 4 |
2 | dtext: |
||
3 | ; eax x & y |
||
4 | ; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
||
5 | ; ecx start of text |
||
6 | ; edx length |
||
7 | ; edi 1 force |
||
8 | |||
9 | test ebx,0x10000000 |
||
10 | jnz dtext2 |
||
11 | |||
12 | pushad |
||
13 | |||
14 | mov esi, edx |
||
15 | and esi, 0xff |
||
16 | test esi, esi ; zero length ? |
||
17 | jnz @f |
||
18 | popad |
||
19 | ret |
||
20 | @@: |
||
21 | align 4 |
||
22 | .letnew: |
||
23 | |||
24 | push eax ecx edx |
||
25 | movzx ebx,ax |
||
26 | shr eax,16 |
||
27 | movzx edx,byte [ecx] |
||
28 | mov ecx,[esp+3*4+32-16] |
||
29 | call drawletter |
||
30 | pop edx ecx eax |
||
31 | |||
32 | add eax,6*65536 |
||
33 | |||
34 | inc ecx |
||
35 | dec edx |
||
36 | jnz .letnew |
||
37 | |||
38 | popad |
||
39 | ret |
||
40 | |||
41 | align 4 |
||
42 | drawletter: |
||
43 | |||
44 | ; eax x |
||
45 | ; ebx y |
||
46 | ; ecx color |
||
47 | ; edx letter |
||
48 | ; esi shl size |
||
49 | ; edi force |
||
50 | |||
51 | pushad |
||
52 | call [disable_mouse] |
||
53 | xor eax, eax |
||
54 | xor ebx, ebx ; 0x37000+eax+ebx*8 |
||
55 | inc esi |
||
56 | align 4 |
||
57 | chc: |
||
58 | |||
59 | push eax |
||
60 | push ebx |
||
61 | |||
62 | mov edx,ebx |
||
63 | shl edx,3 |
||
64 | add edx,eax |
||
65 | add edx,0x37000+8 |
||
66 | mov ecx,[esp+32-12+8] |
||
67 | imul ecx,8*10 |
||
68 | add edx,ecx |
||
69 | cmp [edx],byte 'o' |
||
70 | jnz .nopix |
||
71 | mov eax,[esp+4] |
||
72 | mov ebx,[esp+0] |
||
73 | add eax,[esp+32+2*4-4] |
||
74 | add ebx,[esp+32+2*4-16] |
||
75 | mov ecx,[esp+32+2*4-8] |
||
76 | ;;;call [disable_mouse] |
||
77 | call [putpixel] |
||
78 | .nopix: |
||
79 | pop ebx |
||
80 | pop eax |
||
81 | |||
82 | inc eax |
||
83 | cmp eax,5 ; ebp |
||
84 | jne chc |
||
85 | |||
86 | xor eax, eax |
||
87 | |||
88 | inc ebx |
||
89 | cmp ebx,9 ; ebp |
||
90 | jne chc |
||
91 | |||
92 | popad |
||
93 | ret |
||
94 | |||
95 | |||
96 | dtext2: |
||
97 | |||
98 | ; eax x & y |
||
99 | ; ebx color |
||
100 | ; ecx start of text |
||
101 | ; edx length |
||
102 | ; edi 1 force |
||
103 | |||
104 | pushad |
||
105 | |||
106 | mov esi,edx |
||
107 | and esi,0xff |
||
108 | test esi,esi ; zero length ? |
||
109 | jnz @f |
||
110 | popad |
||
111 | ret |
||
112 | @@: |
||
113 | |||
114 | align 4 |
||
115 | letnew2: |
||
116 | |||
117 | push eax |
||
118 | push ecx |
||
119 | push edx |
||
120 | movzx ebx,ax |
||
121 | shr eax,16 |
||
122 | movzx edx,byte [ecx] |
||
123 | mov ecx,[esp+3*4+32-16] |
||
124 | call drawletter2 |
||
125 | pop edx |
||
126 | pop ecx |
||
127 | pop eax |
||
128 | |||
129 | push edx |
||
130 | movzx edx,byte [ecx] |
||
131 | imul edx,10*10 |
||
132 | add edx,0x30000 |
||
133 | cmp [edx+6],byte ' ' |
||
134 | jne nocharadd8 |
||
135 | add eax,8*65536 |
||
136 | jmp charaddok |
||
137 | nocharadd8: |
||
138 | movzx edx,byte [edx+6] |
||
139 | sub edx,47 |
||
140 | shl edx,16 |
||
141 | add eax,edx |
||
142 | charaddok: |
||
143 | pop edx |
||
144 | |||
145 | inc ecx |
||
146 | dec edx |
||
147 | jnz letnew2 |
||
148 | |||
149 | popad |
||
150 | ret |
||
151 | |||
152 | align 4 |
||
153 | drawletter2: |
||
154 | |||
155 | ; eax x |
||
156 | ; ebx y |
||
157 | ; ecx color |
||
158 | ; edx letter |
||
159 | ; esi shl size |
||
160 | ; edi force |
||
161 | |||
162 | pushad |
||
163 | call [disable_mouse] |
||
164 | xor eax, eax |
||
165 | xor ebx, ebx ; +eax+ebx*8 |
||
166 | inc esi |
||
167 | |||
168 | align 4 |
||
169 | chc2: |
||
170 | |||
171 | push eax |
||
172 | push ebx |
||
173 | |||
174 | ; cmp esi,1 |
||
175 | ; je noldiv |
||
176 | ; xor edx,edx |
||
177 | ; div esi |
||
178 | ; push eax |
||
179 | ; xor edx,edx |
||
180 | ; mov eax,ebx |
||
181 | ; div esi |
||
182 | ; mov ebx,eax |
||
183 | ; pop eax |
||
184 | ; noldiv: |
||
185 | |||
186 | mov edx,ebx |
||
187 | ;shl edx,3 |
||
188 | imul edx,10 |
||
189 | add edx,eax |
||
190 | add edx,0x30000+8+2 |
||
191 | mov ecx,[esp+32-12+8] |
||
192 | ;shl ecx,6 |
||
193 | imul ecx,10*10 |
||
194 | add edx,ecx |
||
195 | cmp [edx],byte 'o' |
||
196 | jnz nopix2 |
||
197 | mov eax,[esp+4] |
||
198 | mov ebx,[esp+0] |
||
199 | add eax,[esp+32+2*4-4] |
||
200 | add ebx,[esp+32+2*4-16] |
||
201 | mov ecx,[esp+32+2*4-8] |
||
202 | ;;;call [disable_mouse] |
||
203 | call [putpixel] |
||
204 | nopix2: |
||
205 | pop ebx |
||
206 | pop eax |
||
207 | |||
208 | ;mov ebp,7 |
||
209 | ;imul ebp,esi |
||
210 | |||
211 | inc eax |
||
212 | cmp eax,7 ;ebp |
||
213 | jnz chc2 |
||
214 | |||
215 | xor eax, eax |
||
216 | |||
217 | ;mov ebp,9 |
||
218 | ;imul ebp,esi |
||
219 | |||
220 | inc ebx |
||
221 | cmp ebx,9 ; ebp |
||
222 | jnz chc2 |
||
223 | |||
224 | popad |
||
225 | ret |