IRCc 0.34: Faster text drawing, add some server command codes related to WHOIS reply.

git-svn-id: svn://kolibrios.org@9092 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2021-07-26 16:18:14 +00:00
parent a188a171dd
commit ae553821c2
3 changed files with 46 additions and 21 deletions

View File

@ -13,7 +13,7 @@
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
version equ '0.33' version equ '0.34'
; connection status ; connection status
STATUS_DISCONNECTED = 0 STATUS_DISCONNECTED = 0

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; Written by hidnplayr@kolibrios.org ;; ;; Written by hidnplayr@kolibrios.org ;;
@ -65,7 +65,9 @@ server_commands:
dd '311 ', cmd_justprint ; RPL_WHOISUSER dd '311 ', cmd_justprint ; RPL_WHOISUSER
dd '312 ', cmd_justprint ; RPL_WHOISSERVER dd '312 ', cmd_justprint ; RPL_WHOISSERVER
dd '317 ', cmd_justprint ; RPL_WHOISIDLE
dd '318 ', cmd_justprint ; RPL_ENDOFWHOIS dd '318 ', cmd_justprint ; RPL_ENDOFWHOIS
dd '319 ', cmd_justprint ; RPL_WHOISCHANNELS
dd '322 ', cmd_322 ; RPL_LIST dd '322 ', cmd_322 ; RPL_LIST
dd '323 ', cmd_323 ; RPL_LISTEND dd '323 ', cmd_323 ; RPL_LISTEND
dd '324 ', cmd_justprint ; RPL_CHANNELMODEIS dd '324 ', cmd_justprint ; RPL_CHANNELMODEIS
@ -74,6 +76,7 @@ server_commands:
dd '330 ', cmd_justprint dd '330 ', cmd_justprint
dd '332 ', cmd_topic ; topic dd '332 ', cmd_topic ; topic
dd '333 ', cmd_333 ; nickname and time of topic dd '333 ', cmd_333 ; nickname and time of topic
dd '338 ', cmd_justprint ; RPL_CHANPASSOK
dd '353 ', cmd_353 ; name reply dd '353 ', cmd_353 ; name reply
dd '366 ', cmd_366 ; end of names list dd '366 ', cmd_366 ; end of names list
dd '372 ', cmd_justprint ; motd dd '372 ', cmd_justprint ; motd
@ -83,6 +86,7 @@ server_commands:
dd '432 ', cmd_justprint ; erroneous nickname dd '432 ', cmd_justprint ; erroneous nickname
dd '433 ', cmd_justprint ; nickname already in use dd '433 ', cmd_justprint ; nickname already in use
dd '436 ', cmd_justprint ; nickname collision dd '436 ', cmd_justprint ; nickname collision
dd '671 ', cmd_justprint ; RPL_WHOISSECURE
dd 'join', cmd_join dd 'join', cmd_join
dd 'kick', cmd_kick dd 'kick', cmd_kick

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; Written by hidnplayr@kolibrios.org ;; ;; Written by hidnplayr@kolibrios.org ;;
@ -175,6 +175,12 @@ print_char:
;-----------------------------------------------
; Draw text of the current window to the screen
;
; IN: /
; OUT: /
;-----------------------------------------------
draw_channel_text: draw_channel_text:
mov edi, [window_active] mov edi, [window_active]
@ -312,7 +318,6 @@ draw_channel_text:
popa popa
push eax push eax
mov esi, [textbox_width]
.line: .line:
cmp byte[edx], 0 cmp byte[edx], 0
je .end_of_text je .end_of_text
@ -321,7 +326,6 @@ draw_channel_text:
cmp byte[edx], 10 cmp byte[edx], 10
je .newline_hard je .newline_hard
push esi
cmp byte[edx], 3 ; escape code for mIRC colors cmp byte[edx], 3 ; escape code for mIRC colors
jne .no_colors jne .no_colors
inc edx inc edx
@ -339,30 +343,47 @@ draw_channel_text:
or ecx, 0x40000000 or ecx, 0x40000000
.no_colors: .no_colors:
mov esi, 1 ;-------------------------------------------
mcall 4 ; draw text ; Count characters until 0, 10, 13 or 3 byte
mov esi, 1 push edx
xor esi, esi
dec esi
.next_char:
inc esi
cmp esi, [textbox_width]
je .cnt_done
mov al, byte[edx] mov al, byte[edx]
cmp al, 13
jbe .cnt_done
inc edx
test al, 10000000b test al, 10000000b
jz @f jz .next_char ; 1 byte wide
mov esi, 4
add edx, 4
and al, 11111000b and al, 11111000b
cmp al, 11110000b cmp al, 11110000b
je @f je .next_char ; 4 bytes wide
dec esi
dec edx
and al, 11110000b and al, 11110000b
cmp al, 11100000b cmp al, 11100000b
je @f je .next_char ; 3 bytes wide
dec esi dec edx ; 2 bytes wide
@@: jmp .next_char
.cnt_done:
mov eax, edx
pop edx
push eax
mcall 4 ; draw text
pop edx ; next start ptr
add ebx, FONT_WIDTH shl 16 cmp esi, [textbox_width]
add edx, esi je .line_full
pop esi imul esi, FONT_WIDTH shl 16
dec esi add ebx, esi
jnz .line jmp .line
jmp .line_full
.newline_hard: .newline_hard:
mov ecx, [colors.work_text] mov ecx, [colors.work_text]