Rev 24 | Rev 139 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 24 | Rev 106 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | align 4 |
1 | align 4 |
2 | dtext: |
2 | dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
3 | ; eax x & y |
3 | ; eax x & y |
4 | ; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
4 | ; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
5 | ; ecx start of text |
5 | ; ecx start of text |
6 | ; edx length |
6 | ; edx length |
7 | ; edi 1 force |
7 | ; edi 1 force |
Line 8... | Line -... | ||
8 | - | ||
9 | test ebx,0x10000000 |
- | |
10 | jnz dtext2 |
- | |
11 | 8 | ||
Line -... | Line 9... | ||
- | 9 | pushad |
|
- | 10 | ||
- | 11 | mov esi,edx ;esi=length |
|
12 | pushad |
12 | mov ebp,ecx ;ebp=ptr to text |
13 | 13 | mov ecx,ebx ;ecx=color |
|
- | 14 | movzx ebx,ax ;ebx=y |
|
- | 15 | shr eax,16 ;eax=x |
|
- | 16 | and esi, 0xFF ;limit of text = 255 symbols |
|
14 | mov esi, edx |
17 | |
15 | and esi, 0xff |
18 | dtext.lnew: |
16 | test esi, esi ; zero length ? |
19 | test esi, esi ; zero length ? |
17 | jnz @f |
- | |
18 | popad |
20 | jnz @f |
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 |
- | |
Line -... | Line 21... | ||
- | 21 | jmp dtext.output_end |
|
35 | dec edx |
22 | @@: |
- | 23 | ||
- | 24 | movzx edx,byte [ebp] ;edx=ascii code |
|
36 | jnz .letnew |
25 | test edx,edx |
Line 37... | Line 26... | ||
37 | 26 | jz dtext.output_end |
|
38 | popad |
27 | test ecx,0x10000000 |
- | 28 | jnz dtext.letnew2 |
|
- | 29 | ||
39 | ret |
30 | align 4 |
40 | 31 | .letnew: |
|
41 | align 4 |
32 | |
42 | drawletter: |
33 | drawletter: ;output char of type 1(monotype) |
43 | ;eax - x |
34 | ;eax - x |
Line 66... | Line 57... | ||
66 | inc ebp |
57 | inc ebp |
67 | pop esi |
58 | pop esi |
68 | dec esi |
59 | dec esi |
69 | jnz .symloop |
60 | jnz .symloop |
70 | popad |
61 | popad |
71 | ret |
- | |
72 | - | ||
73 | - | ||
74 | - | ||
75 | dtext2: |
- | |
76 | - | ||
77 | ; eax x & y |
- | |
78 | ; ebx color |
- | |
79 | ; ecx start of text |
- | |
80 | ; edx length |
- | |
81 | ; edi 1 force |
- | |
Line 82... | Line 62... | ||
82 | 62 | ||
Line 83... | Line 63... | ||
83 | pushad |
63 | add eax,6 |
84 | 64 | ||
85 | mov esi,edx |
- | |
86 | and esi,0xff |
65 | inc ebp ;ptr to text |
87 | test esi,esi ; zero length ? |
- | |
88 | jnz @f |
- | |
89 | popad |
- | |
Line 90... | Line -... | ||
90 | ret |
- | |
91 | @@: |
66 | dec esi ;length |
Line 92... | Line -... | ||
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] |
- | |
101 | mov ecx,[esp+2*4+32-16] |
- | |
102 | call drawletter2 |
- | |
103 | shl eax,16 |
- | |
104 | add eax,ebx |
- | |
105 | pop edx |
- | |
106 | pop ecx |
- | |
Line 107... | Line -... | ||
107 | - | ||
108 | inc ecx |
67 | jnz dtext.lnew |
Line 109... | Line 68... | ||
109 | dec edx |
68 | |
110 | jnz letnew2 |
69 | jmp dtext.output_end |
111 | 70 | ||
112 | popad |
71 | |
113 | ret |
72 | dtext.letnew2: |
114 | 73 | ||
115 | align 4 |
74 | align 4 |
Line 146... | Line 105... | ||
146 | dec esi |
105 | dec esi |
147 | jnz .symloop |
106 | jnz .symloop |
148 | movzx edx,byte [ebp-10] |
107 | movzx edx,byte [ebp-10] |
149 | add [esp+32-4],edx |
108 | add [esp+32-4],edx |
150 | popad |
109 | popad |
- | 110 | ||
- | 111 | ||
- | 112 | inc ebp ;ptr to text |
|
- | 113 | dec esi ;length |
|
- | 114 | jnz dtext.lnew |
|
- | 115 | ||
- | 116 | ||
- | 117 | dtext.output_end: |
|
- | 118 | popad |
|
151 | ret |
119 | ret |
152 | 120 |