Rev 2499 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2499 | Rev 2522 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
- | 4 | ;; Distributed FOR KOLIBRIOS AND ITS DIRECT BRANCHES ONLY ;; |
|
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; under conditions of the GNU General Public License ;; |
5 | ;; ;; |
6 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 8... | ||
7 | 8 | ||
Line 8... | Line -... | ||
8 | $Revision: 2499 $ |
- | |
9 | 9 | $Revision: 2522 $ |
|
10 | ; // Alver 22.06.2008 // { |
10 | |
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 |
- | |
Line 16... | Line 15... | ||
16 | jmp dtext.1 |
15 | inc eax |
17 | ; } \\ Alver \\ |
16 | jmp dtext.1 |
18 | 17 | ||
19 | align 4 |
18 | align 4 |
Line 25... | Line 24... | ||
25 | ; A = 0 <=> output esi characters; otherwise output ASCIIZ string |
24 | ; A = 0 <=> output esi characters; otherwise output ASCIIZ string |
26 | ; B = 1 <=> fill background with color eax |
25 | ; B = 1 <=> fill background with color eax |
27 | ; edx start of text |
26 | ; edx start of text |
28 | ; edi 1 force |
27 | ; edi 1 force |
Line 29... | Line 28... | ||
29 | 28 | ||
- | 29 | test ecx, 0x20000000 |
|
- | 30 | jnz .font3 |
|
30 | ; // Alver 22.06.2008 // { |
31 | |
31 | push eax |
32 | push eax |
32 | xor eax, eax |
33 | xor eax, eax |
33 | .1: |
- | |
34 | ; } \\ Alver \\ |
34 | .1: |
35 | pushad |
35 | pushad |
Line 36... | Line 36... | ||
36 | call [_display.disable_mouse] |
36 | call [_display.disable_mouse] |
37 | 37 | ||
Line 48... | Line 48... | ||
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 // { |
- | |
54 | cmp byte [esp+28], 1 ; was the entry point = dtext.1 ? |
53 | cmp byte [esp+28], 1 ; was the entry point = dtext.1 ? |
55 | jne @f |
54 | jne @f |
56 | dec esi |
55 | dec esi |
57 | js .end |
56 | js .end |
58 | ; } \\ Alver \\ |
- | |
59 | @@: |
57 | @@: |
60 | inc edx |
58 | inc edx |
61 | pushad ; esp -= 64 ! |
59 | pushad ; esp -= 64 ! |
62 | movzx edx, byte [edx-1] |
60 | movzx edx, byte [edx-1] |
63 | test ecx, 0x10000000 |
61 | test ecx, 0x10000000 |
Line 90... | Line 88... | ||
90 | dec esi |
88 | dec esi |
91 | jnz .symloop1 |
89 | jnz .symloop1 |
92 | popad |
90 | popad |
93 | add eax, 6 |
91 | add eax, 6 |
94 | jmp .loop |
92 | jmp .loop |
- | 93 | ||
95 | .font2: |
94 | .font2: |
96 | add edx, edx |
95 | add edx, edx |
97 | lea ebp, [FONT_II+4*edx+edx+1] |
96 | lea ebp, [FONT_II+4*edx+edx+1] |
98 | push 9 |
97 | push 9 |
99 | movzx esi, byte [ebp-1] |
98 | movzx esi, byte [ebp-1] |
Line 126... | Line 125... | ||
126 | add dword [esp+28], esi |
125 | add dword [esp+28], esi |
127 | popad |
126 | popad |
128 | jmp .loop |
127 | jmp .loop |
129 | .end: |
128 | .end: |
130 | popad |
129 | popad |
131 | pop eax ; << // Alver 22.06.2008 // << |
130 | pop eax |
132 | ret |
131 | ret |
Line 133... | Line 132... | ||
133 | 132 | ||
Line 134... | Line 133... | ||
134 | diff10 "old font code size",dtext,$ |
133 | diff10 "old font code size",dtext,$ |
135 | 134 | ||
136 | ;===================================================== |
135 | ;===================================================== |
137 | ; NEW FONTS |
136 | ; NEW FONTS |
- | 137 | ;_____________________________________________________ |
|
- | 138 | ; |
|
- | 139 | align 4 |
|
- | 140 | .font3: |
|
- | 141 | pushad |
|
- | 142 | call [_display.disable_mouse] |
|
- | 143 | movsx eax, bx ; eax=y |
|
- | 144 | sar ebx, 16 ; ebx=x |
|
- | 145 | xchg eax, ebx ; eax=x, ebx=y |
|
- | 146 | ||
- | 147 | xor ebp, ebp ; font# |
|
- | 148 | mov [font_check_routine], ebp |
|
- | 149 | ||
- | 150 | test ecx, ecx |
|
- | 151 | js .checked |
|
- | 152 | inc [font_check_routine]; .check_esi |
|
- | 153 | .checked: |
|
- | 154 | mov edi, ecx ; colour |
|
- | 155 | and edi, 0x0FFFFFF ; RGB |
|
- | 156 | align 4 |
|
- | 157 | .draw_char: |
|
- | 158 | mov cl, byte[edx] ; char# |
|
- | 159 | movzx ecx, cl |
|
- | 160 | call nsvf_draw_char |
|
- | 161 | add eax, 6 |
|
- | 162 | test [font_check_routine], 1 |
|
- | 163 | jz .check_asciz |
|
- | 164 | ||
- | 165 | .check_esi: |
|
- | 166 | inc edx |
|
- | 167 | dec esi |
|
- | 168 | jz .exit |
|
- | 169 | jmp .draw_char |
|
- | 170 | ||
- | 171 | align 4 |
|
- | 172 | .check_asciz: |
|
- | 173 | or byte[edx], 0 |
|
- | 174 | jz .exit |
|
- | 175 | inc edx |
|
- | 176 | jmp .draw_char |
|
- | 177 | ||
- | 178 | align 4 |
|
- | 179 | .exit: |
|
- | 180 | popad |
|
- | 181 | ret |
|
- | 182 | ||
- | 183 | align 4 |
|
- | 184 | ||
- | 185 | font_check_routine dd ? |
|
Line 138... | Line 186... | ||
138 | ;_____________________________________________________ |
186 | |
139 | ; |
187 | |
Line 140... | Line 188... | ||
140 | 188 | ||
Line 167... | Line 215... | ||
167 | movzx ecx, dl |
215 | movzx ecx, dl |
168 | xor edi, edi |
216 | xor edi, edi |
169 | mov ebp, edi |
217 | mov ebp, edi |
Line 170... | Line 218... | ||
170 | 218 | ||
171 | 219 | ||
172 | sdsh_draw_char: |
220 | nsvf_draw_char: |
173 | ; eax = left side X |
221 | ; eax = left side X |
174 | ; ebx = bottom Y |
222 | ; ebx = bottom Y |
175 | ; edi = color 0x0RRGGBB |
223 | ; edi = colour 0x0RRGGBB |
176 | ; ebp = font@ |
224 | ; ebp = font@ |
177 | ; ecx = ascii, zero-extended to 32bits |
225 | ; ecx = ascii, zero-extended to 32bits |
178 | push ecx |
226 | push ecx |
179 | push edx |
227 | push edx |
180 | push ebp |
228 | push ebp |
181 | shl ebp, 4 |
229 | shl ebp, 4 |
182 | add ebp, sdsh_data.info |
230 | add ebp, sdsh_data.info |
183 | ; call ch_checkscreen |
231 | call ch_checkscreen |
184 | ; jb .exit |
232 | jb .exit |
185 | ; call ch_checkwin |
233 | call ch_checkwin |
186 | ; jc .exit |
234 | jc .exit |
187 | mov edx, [ebp + 4] ; chartable addr |
235 | mov edx, [ebp + 4] ; chartable addr |
188 | mov cx, word[edx + ecx*2] ; tick info |
236 | mov cx, word[edx + ecx*2] ; tick info |
189 | mov edx, ecx |
237 | mov edx, ecx |
Line 468... | Line 516... | ||
468 | diff16 "checkwin : ",0,$ |
516 | diff16 "checkwin : ",0,$ |
469 | ch_checkwin: |
517 | ch_checkwin: |
470 | ; eax = x coordinate |
518 | ; eax = x coordinate |
471 | ; ebx = y coordinate |
519 | ; ebx = y coordinate |
472 | ; ebp -> font info |
520 | ; ebp -> font info |
473 | ;!destroys ch, edx! |
- | |
- | 521 | ||
474 | push eax |
522 | push eax |
475 | push ebx |
523 | push ebx |
- | 524 | push ecx |
|
- | 525 | push edx |
|
476 | mov ch, byte[CURRENT_TASK] |
526 | mov ch, byte[CURRENT_TASK] |
477 | mov al, byte [ebp] ; char X-width |
- | |
478 | mov edx, [_display.width] ; screen X-size |
527 | mov edx, [_display.width] ; screen X-size |
479 | imul edx, ebx |
528 | imul edx, ebx |
480 | add edx, [_WinMapAddress] |
529 | add edx, [_WinMapAddress] |
481 | add edx, eax |
530 | add edx, eax |
482 | cmp ch, byte [edx] |
531 | cmp ch, byte [edx] |
483 | jne .fail |
532 | jne .fail |
484 | movzx eax, byte [ebp] |
533 | movzx eax, byte [ebp] ; char X-width |
485 | cmp ch, byte [edx+eax] |
534 | cmp ch, byte [edx+eax] |
486 | jne .fail |
535 | jne .fail |
487 | movzx ebx, byte [ebp+1] |
536 | movzx ebx, byte [ebp+1] |
488 | imul ebx, [_display.width] |
537 | imul ebx, [_display.width] |
489 | cmp ch, byte [edx+ebx] |
538 | cmp ch, byte [edx+ebx] |
Line 493... | Line 542... | ||
493 | clc |
542 | clc |
494 | je .done |
543 | je .done |
495 | .fail: |
544 | .fail: |
496 | stc ; CF means the charbox is invisible |
545 | stc ; CF means the charbox is invisible |
497 | .done: |
546 | .done: |
- | 547 | pop edx |
|
- | 548 | pop ecx |
|
498 | pop ebx |
549 | pop ebx |
499 | pop eax |
550 | pop eax |
500 | ret |
551 | ret |
Line 501... | Line 552... | ||
501 | 552 | ||
502 | align 4 |
553 | align 4 |
503 | diff16 "ch_putpix : ",0,$ |
554 | diff16 "ch_putpix : ",0,$ |
504 | ; ch_putpixel: |
555 | ch_putpixel: |
505 | ; eax = x coordinate |
556 | ; eax = x coordinate |
506 | ; ebx = y coordinate |
557 | ; ebx = y coordinate |
507 | ; edi = 0x0RRGGBB |
558 | ; edi = 0x0RRGGBB |
508 | push edx |
559 | push edx |
Line 511... | Line 562... | ||
511 | lea edx, [edx+eax*4] |
562 | lea edx, [edx+eax*4] |
512 | mov [LFB_BASE+edx], edi |
563 | mov [LFB_BASE+edx], edi |
513 | pop edx |
564 | pop edx |
514 | ret |
565 | ret |
515 | ;) |
566 | ;) |
516 | ch_putpixel: |
567 | ;ch_putpixel2: |
517 | ; test version!!! ===== to be removed!! |
568 | ; test version!!! ===== to be removed!! |
518 | ; eax = x coordinate |
569 | ; eax = x coordinate |
519 | ; ebx = y coordinate |
570 | ; ebx = y coordinate |
520 | ; edi = 0x0RRGGBB |
571 | ; edi = 0x0RRGGBB |
521 | push edx |
572 | push edx |