Rev 9826 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9826 | Rev 9978 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; Written by hidnplayr@kolibrios.org ;; |
6 | ;; Written by hidnplayr@kolibrios.org ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
Line 317... | Line 317... | ||
317 | mcall 13 ; draw rectangle |
317 | mcall 13 ; draw rectangle |
318 | popa |
318 | popa |
Line 319... | Line 319... | ||
319 | 319 | ||
320 | push eax |
320 | push eax |
- | 321 | .line: |
|
- | 322 | cmp byte[edx], 0x20 |
|
321 | .line: |
323 | jae .printable |
322 | cmp byte[edx], 0 |
324 | cmp byte[edx], 0 |
323 | je .end_of_text |
325 | je .end_of_text |
324 | cmp byte[edx], 13 |
326 | cmp byte[edx], 13 |
325 | je .newline_soft |
327 | je .newline_soft |
Line 328... | Line 330... | ||
328 | 330 | ||
329 | cmp byte[edx], 3 ; escape code for mIRC colors |
331 | cmp byte[edx], 3 ; escape code for mIRC colors |
330 | jne .no_colors |
332 | jne .no_colors |
331 | inc edx |
333 | inc edx |
332 | call dec_to_esi |
334 | call dec_to_esi |
333 | jz .no_colors |
335 | jz .line |
334 | mov ecx, [irc_colors + 4*esi] |
336 | mov ecx, [irc_colors + 4*esi] |
Line 335... | Line 337... | ||
335 | or ecx, 0x30000000 |
337 | or ecx, 0x30000000 |
336 | 338 | ||
337 | cmp byte[edx], ',' ; background color? |
339 | cmp byte[edx], ',' ; background color? |
338 | jne .no_colors |
340 | jne .line |
339 | inc edx |
341 | inc edx |
340 | call dec_to_esi |
342 | call dec_to_esi |
341 | jz .no_colors |
343 | jz .line |
342 | mov edi, [irc_colors + 4*esi] |
344 | mov edi, [irc_colors + 4*esi] |
Line -... | Line 345... | ||
- | 345 | or ecx, 0x40000000 |
|
- | 346 | .no_colors: |
|
- | 347 | ||
- | 348 | ; Some non-printable, just skip it |
|
343 | or ecx, 0x40000000 |
349 | inc edx |
344 | .no_colors: |
350 | jmp .line |
Line -... | Line 351... | ||
- | 351 | ||
345 | 352 | ;------------------------------------------- |
|
346 | ;------------------------------------------- |
353 | ; Count characters until 0, 10, 13 or 3 byte |
347 | ; Count characters until 0, 10, 13 or 3 byte |
354 | |
348 | 355 | .printable: |
|
349 | push edx |
356 | push edx |
350 | xor esi, esi |
357 | xor esi, esi |
351 | dec esi |
358 | dec esi |
352 | .next_char: |
359 | .next_char: |
353 | inc esi |
360 | inc esi |
354 | cmp esi, [textbox_width] |
361 | cmp esi, [textbox_width] |
Line 355... | Line 362... | ||
355 | je .cnt_done |
362 | je .cnt_done |
356 | mov al, byte[edx] |
363 | mov al, byte[edx] |
357 | cmp al, 13 |
364 | cmp al, 0x20 |