Rev 2 | Rev 24 | Go to most recent revision | Details | Compare with Previous | 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: |
||
12 | halyavin | 43 | ;eax - x |
44 | ;ebx - y |
||
45 | ;ecx - color |
||
46 | ;edx - ascii code |
||
47 | pushad |
||
48 | call [disable_mouse] |
||
49 | mov esi,9 |
||
50 | lea ebp,[0x3F600+8*edx+edx] |
||
51 | .symloop: |
||
52 | push esi |
||
53 | mov dl,byte [ebp] |
||
54 | mov esi,8 |
||
55 | .pixloop: |
||
56 | test dl,1 |
||
57 | jz .nopix |
||
58 | call [putpixel] |
||
59 | .nopix: |
||
60 | shr dl,1 |
||
61 | inc eax |
||
62 | dec esi |
||
63 | jnz .pixloop |
||
64 | sub eax,8 |
||
65 | inc ebx |
||
66 | inc ebp |
||
67 | pop esi |
||
68 | dec esi |
||
69 | jnz .symloop |
||
70 | popad |
||
71 | ret |
||
72 | |||
1 | ha | 73 | |
74 | |||
75 | dtext2: |
||
76 | |||
77 | ; eax x & y |
||
78 | ; ebx color |
||
79 | ; ecx start of text |
||
80 | ; edx length |
||
81 | ; edi 1 force |
||
82 | |||
83 | pushad |
||
84 | |||
85 | mov esi,edx |
||
86 | and esi,0xff |
||
87 | test esi,esi ; zero length ? |
||
88 | jnz @f |
||
89 | popad |
||
90 | ret |
||
91 | @@: |
||
92 | |||
93 | align 4 |
||
94 | letnew2: |
||
95 | |||
96 | push ecx |
||
97 | push edx |
||
98 | movzx ebx,ax |
||
99 | shr eax,16 |
||
100 | movzx edx,byte [ecx] |
||
12 | halyavin | 101 | mov ecx,[esp+2*4+32-16] |
1 | ha | 102 | call drawletter2 |
12 | halyavin | 103 | shl eax,16 |
104 | add eax,ebx |
||
1 | ha | 105 | pop edx |
106 | pop ecx |
||
107 | |||
108 | inc ecx |
||
109 | dec edx |
||
110 | jnz letnew2 |
||
111 | |||
112 | popad |
||
113 | ret |
||
114 | |||
115 | align 4 |
||
116 | drawletter2: |
||
12 | halyavin | 117 | ;eax - x |
118 | ;ebx - y |
||
119 | ;ecx - color |
||
120 | ;edx - symbol |
||
121 | ;edi - force? |
||
122 | ;result - eax=eax+sym_size |
||
123 | pushad |
||
124 | call [disable_mouse] |
||
125 | mov esi,9 |
||
126 | lea ebp,[0x3EC00+8*edx+edx] |
||
127 | push dword -1 ;size |
||
128 | .symloop: |
||
129 | push esi |
||
130 | mov dl,byte [ebp] |
||
131 | xor esi,esi |
||
132 | .pixloop: |
||
133 | test dl,1 |
||
134 | jz .nopix |
||
135 | cmp [esp+4],esi |
||
136 | jge .no_inc |
||
137 | mov [esp+4],esi |
||
138 | .no_inc: |
||
139 | call [putpixel] |
||
140 | .nopix: |
||
141 | shr dl,1 |
||
142 | inc esi |
||
143 | inc eax |
||
144 | cmp esi,8 |
||
145 | jl .pixloop |
||
146 | sub eax,8 |
||
147 | inc ebx |
||
148 | pop esi |
||
149 | inc ebp |
||
150 | dec esi |
||
151 | jnz .symloop |
||
152 | pop edx |
||
153 | test edx,edx |
||
154 | jge .nospace |
||
155 | mov edx,4 |
||
156 | .nospace: |
||
157 | add edx,2 |
||
158 | add [esp+32-4],edx |
||
159 | popad |
||
160 | ret |