diff --git a/programs/cmm/liza/compile.bat b/programs/cmm/liza/compile.bat index ece1b06217..d728f718d6 100644 --- a/programs/cmm/liza/compile.bat +++ b/programs/cmm/liza/compile.bat @@ -1,5 +1,5 @@ ..\C--\C-- liza.c -@del liza_mail -@rename liza.com liza_mail +@del liza +@rename liza.com liza @del warning.txt @pause \ No newline at end of file diff --git a/programs/cmm/liza/img/letter_icons.h b/programs/cmm/liza/img/letter_icons.h new file mode 100644 index 0000000000..c9f5cc67d2 --- /dev/null +++ b/programs/cmm/liza/img/letter_icons.h @@ -0,0 +1 @@ +dword letter_icons_pal[]= {0x008080C0,0x00ADADAD,0x00ABABAB,0x00A9A9A9,0x00A8A8A8,0x00B2B2B2,0x00F0F0F0,0x00FFFFFF,0x00F1F1F1,0x00B0B0B0,0x00D1D1D1,0x00DEDEDE,0x00FCFCFC,0x00F6F6F6,0x00F4F4F4,0x00F5F5F5,0x00DFDFDF,0x00CECECE,0x00ACACAC,0x00F8F8F8,0x00BEBEBE,0x00D8D8D8,0x00F3F3F3,0x00ECECEC,0x00DCDCDC,0x00BBBBBB,0x00A5A5A5,0x00EEEEEE,0x00B5B5B5,0x00D6D6D6,0x00EDEDED,0x00E6E6E6,0x00DADADA,0x009F9F9F,0x00E3E3E3,0x00AEAEAE,0x00E9E9E9,0x00D7D7D7,0x00E4E4E4,0x00E5E5E5,0x00989898,0x00CFCFCF,0x007C7C7C,0x00787878,0x00E0E0E0,0x00919191,0x00D2D2D2,0x009D9D9D,0x00F2F2F2,0x00999999,0x009B9B9B,0x00A7A7A7,0x00A2A2A2,0x00D4D4D4,0x008B8B8B,0x00CDCDCD,0x00A1A1A1,0x00858585,0x00EBEBEB,0x00E7E7E7,0x009A9A9A,0x00818181,0x00D9D9D9,0x00EAEAEA,0x00828282,0x00606060,0x00848484,0x00838383,0x00179C15,0x00F7F7CD,0x008FF778,0x00E4F7C0,0x00C2F7A6,0x00F3F6C2,0x00EBF7BF,0x00ADF791,0x0095F77E,0x002CF21F,0x0038E82A,0x0026DC17,0x0025CC1D,0x0020E915,0x00179714,0x00169C13,0x0026E21D,0x0029EC1D,0x0015909B,0x00B7F7FA,0x0078F6EC,0x00C3F9FB,0x00A6F6E3,0x0091F6E5,0x007DF7EC,0x001FE9F2,0x0029E2E8,0x0021CFDB,0x001DC2CB,0x0015DEE9,0x0012818B,0x001DD7E2,0x001DE3EC} \ No newline at end of file diff --git a/programs/cmm/liza/img/letter_icons.png b/programs/cmm/liza/img/letter_icons.png new file mode 100644 index 0000000000..0c7e6479c3 Binary files /dev/null and b/programs/cmm/liza/img/letter_icons.png differ diff --git a/programs/cmm/liza/img/letter_icons.raw b/programs/cmm/liza/img/letter_icons.raw new file mode 100644 index 0000000000..25cbae6b28 Binary files /dev/null and b/programs/cmm/liza/img/letter_icons.raw differ diff --git a/programs/cmm/liza/in_out_mail.png b/programs/cmm/liza/in_out_mail.png deleted file mode 100644 index 875d244cdd..0000000000 Binary files a/programs/cmm/liza/in_out_mail.png and /dev/null differ diff --git a/programs/cmm/liza/in_out_mail.raw b/programs/cmm/liza/in_out_mail.raw deleted file mode 100644 index 3842474829..0000000000 --- a/programs/cmm/liza/in_out_mail.raw +++ /dev/null @@ -1 +0,0 @@ -贴ϴﰰ꼼ڸ窪䵵ٲतی؉ڝѧ꭭ꫫԖ̤ϐƢ礤NJީdddddd贴ϴﰰxڸ窪~ٲत,,,,*8&% ؉ڝ&)ꫫԖꅅ,ϐƢ礤NJީdddddd贴ϴ꼼曐xÛ䵵盐}یԛ)!ѧ꭭̤ܛƢ㋁ީdddddd \ No newline at end of file diff --git a/programs/cmm/liza/liza.c b/programs/cmm/liza/liza.c index 74d3a7051b..3e3046da5f 100644 --- a/programs/cmm/liza/liza.c +++ b/programs/cmm/liza/liza.c @@ -2,24 +2,25 @@ //libraries #define MEMSIZE 0xA0000 -#include "..\lib\kolibri.h" -#include "..\lib\strings.h" -#include "..\lib\mem.h" -#include "..\lib\dll.h" -#include "..\lib\encoding.h" -#include "..\lib\figures.h" -#include "..\lib\file_system.h" -#include "..\lib\list_box.h" -#include "..\lib\socket_new.h" +#include "../lib/kolibri.h" +#include "../lib/strings.h" +#include "../lib/mem.h" +#include "../lib/dll.h" +#include "../lib/encoding.h" +#include "../lib/figures.h" +#include "../lib/file_system.h" +#include "../lib/list_box.h" +#include "../lib/socket_new.h" //*.obj libraries -#include "..\lib\lib.obj\box_lib.h" -#include "..\lib\lib.obj\network.h" -#include "..\lib\lib.obj\libio_lib.h" -#include "..\lib\lib.obj\libimg_lib.h" -#include "..\lib\lib.obj\netcode.h" -#include "..\lib\lib.obj\iconv.h" +#include "../lib/lib.obj/box_lib.h" +#include "../lib/lib.obj/network.h" +#include "../lib/lib.obj/libio_lib.h" +#include "../lib/lib.obj/libimg_lib.h" +#include "../lib/lib.obj/netcode.h" +#include "../lib/lib.obj/iconv.h" //images -byte in_out_mail[18*36] = FROM "in_out_mail.raw"; +byte letter_icons[sizeof(file "img/letter_icons.raw")] = FROM "img/letter_icons.raw"; +#include "img/letter_icons.h" //connection algorithm enum { @@ -45,9 +46,9 @@ enum { #define WIN_H 440 #define WIN_MIN_W 500 #define WIN_MIN_H 380 -#define LOGIN_HEADER "Login - Email client Liza 0.9a" -#define OPTIONS_HEADER "Options - Email client Liza 0.9a" -#define MAILBOX_HEADER "Mail Box - Email client Liza 0.9a" +#define LOGIN_HEADER "Login - Email client Liza 0.9b" +#define OPTIONS_HEADER "Options - Email client Liza 0.9b" +#define MAILBOX_HEADER "Mail Box - Email client Liza 0.9b" #define BUFFERSIZE 512 proc_info Form; system_colors sc; @@ -113,7 +114,9 @@ void OpenMailDat() ReadFile(0, 512, #read_data, "/sys/network/mail.dat"); if (!read_data) { - strcpy(#email_text, "example@mail.com"); + //strcpy(#email_text, "example@mail.com"); + strcpy(#email_text, "eiroglif@yandex.ru"); //temporarily, for testing + strcpy(#pass_text, "rostov"); } else { diff --git a/programs/cmm/liza/mail_box.c b/programs/cmm/liza/mail_box.c index d86c15bea7..9ff15ac76c 100644 --- a/programs/cmm/liza/mail_box.c +++ b/programs/cmm/liza/mail_box.c @@ -163,32 +163,8 @@ void MailBoxLoop() case evKey: key = GetKey(); - if (key == 177){ //down - if (aim) break; - if (mail_list.current >= mail_list.count-1) break; - mail_list.current++ ; - if (mail_list.current >= mail_list.first + mail_list.visible) mail_list.first++ ; - DrawMailList(); - aim = SEND_RETR; - } - if (key == 178){ //up - if (aim) break; - if (mail_list.current<=0) break; - mail_list.current-- ; - if (mail_list.current < mail_list.first) mail_list.first-- ; - DrawMailList(); - aim = SEND_RETR; - } - if (key == 180){ //home - if (aim) break; - mail_list.first = mail_list.current = 0; - DrawMailList(); - aim = SEND_RETR; - } - if (key == 181){ //end - if (aim) break; - mail_list.first = mail_list.count - mail_list.visible; - mail_list.current = mail_list.count - 1; + if (!aim) && (mail_list.ProcessKey(key)) + { DrawMailList(); aim = SEND_RETR; } @@ -285,11 +261,13 @@ void MailBoxLoop() if (!mailbuffer) {debug("alloc error!"); aim=NULL; break;} mailpointer = mailbuffer; aim = GET_ANSWER_RETR; + debugi(letter_size); } if (aim == GET_ANSWER_RETR) { ticks = Receive(socketnum, mailpointer, letter_size + mailbuffer - mailpointer , MSG_DONTWAIT); + debugi(ticks); if (ticks == 0xffffffff) break; //debugi(EAX); @@ -352,27 +330,23 @@ void DrawToolbar() DrawBar(0, mail_list.y-1, mail_list.w,1, 0xf0f0f0); } - void DrawMailList() { int i, on_y, on_x, direction; + dword sel_col; mail_list.visible = mail_list.h / mail_list.line_h; for (i=30; i<150; i++) DeleteButton(i); for (i=0; (i