diff --git a/data/common/File Managers/fNav/fnav.set b/data/common/File Managers/fNav/fnav.set index b3a92e9a1a..1274c10529 100644 --- a/data/common/File Managers/fNav/fnav.set +++ b/data/common/File Managers/fNav/fnav.set @@ -1 +1 @@ -/sys/TinyPad: asm, inc, txt, mac, log, dat /sys/media/kiv: gif, bmp, png, tga, jpg, ico, cur, tif, tiff, jpeg, ppm, pgm, pbm, pnm, pcx, wbmp, xcf /sys/Network/Webview: htm, html, mht, xhtml /sys/fb2read: fb2 /sys/develop/cObj: obj /sys/skincfg: skn /sys/rtfRead: rtf /sys/develop/t_edit: cpp, h, c, c--, pas, set, ext, ini /sys/media/pixie/pixie: mp3 /sys/media/AC97SND: wav, xm /sys/media/MIDAMP: mid /sys/media/listplay: m3u, lap, asf /sys/shell: sh /sys/3d/view3ds: 3ds, asc /sys/graph: cvs /sys/unz: zip, 7z /sys/table: csv /kolibrios/media/updf: pdf /kolibrios/media/fplay: avi, mpg, mov, flv, wmv, vob, mkv, mp4, mpeg, divx, 3gp, webm /kolibrios/emul/zsnes: smc /kolibrios/emul/psx4all: mcr /kolibrios/emul/fceu/fceu: nes /kolibrios/emul/e80/e80: sna /kolibrios/emul/gameboy: gb, gbc /kolibrios/emul/pokemini: min /sys/develop/heed: \ No newline at end of file +/sys/TinyPad: asm, inc, txt, mac, log, dat /sys/media/kiv: gif, bmp, png, tga, jpg, ico, cur, tif, tiff, jpeg, ppm, pgm, pbm, pnm, pcx, wbmp, xcf /sys/Network/Webview: htm, html, mht, xhtml /sys/fb2read: fb2 /sys/develop/cObj: obj /sys/skincfg: skn /sys/rtfRead: rtf /sys/develop/t_edit: cpp, h, c, c--, pas, set, ext, ini /sys/media/mgb: mgb /sys/media/pixie/pixie: mp3 /sys/media/AC97SND: wav, xm /sys/media/MIDAMP: mid /sys/media/listplay: m3u, lap, asf /sys/shell: sh /sys/3d/view3ds: 3ds, asc /sys/graph: cvs, grf /sys/unz: zip, 7z /sys/table: csv /kolibrios/media/updf: pdf /kolibrios/media/fplay: avi, mpg, mov, flv, wmv, vob, mkv, mp4, mpeg, divx, 3gp, webm /kolibrios/emul/zsnes: smc /kolibrios/emul/psx4all: mcr /kolibrios/emul/fceu/fceu: nes /kolibrios/emul/e80/e80: sna /kolibrios/emul/gameboy: gb, gbc /kolibrios/emul/pokemini: min /sys/develop/heed: \ No newline at end of file diff --git a/data/common/File Managers/icons.ini b/data/common/File Managers/icons.ini index d97bd4d711..d5a8690a40 100644 --- a/data/common/File Managers/icons.ini +++ b/data/common/File Managers/icons.ini @@ -154,6 +154,7 @@ drv=18 iso=19 cue=19 mdf=19 +csv=21 xls=21 xlsx=21 nes=23 @@ -167,7 +168,7 @@ c=27 java=27 pas=27 fb2=29 -csv=21 +mgb=47 [icons32] =45 diff --git a/data/common/File Managers/kfar.ini b/data/common/File Managers/kfar.ini index 758d3486eb..360097ad80 100644 --- a/data/common/File Managers/kfar.ini +++ b/data/common/File Managers/kfar.ini @@ -61,6 +61,7 @@ min=/kolibrios/emul/pokemini nc=/kolibrios/utils/cnc_editor/cnc_editor kf=/sys/KF_VIEW csv=/sys/table +mgb=/sys/mgb [Menu] AsmMenu1=&Edit,/sys/TinyPad diff --git a/data/common/File Managers/kfm.ini b/data/common/File Managers/kfm.ini index 9d8d64dfb5..189d087d79 100644 --- a/data/common/File Managers/kfm.ini +++ b/data/common/File Managers/kfm.ini @@ -214,7 +214,7 @@ mht /sys/network/WebView fb2 /sys/fb2read kla /sys/games/klavisha bin /sys/develop/heed -mgb /sys/develop/heed +mgb /sys/mgb <>end <>files_association1 diff --git a/data/common/icons16.png b/data/common/icons16.png index 4877a5e0f7..5869f6c1d5 100644 Binary files a/data/common/icons16.png and b/data/common/icons16.png differ diff --git a/data/common/icons32.png b/data/common/icons32.png index 43c7352c21..172f0dd950 100644 Binary files a/data/common/icons32.png and b/data/common/icons32.png differ diff --git a/data/common/settings/assoc.ini b/data/common/settings/assoc.ini index 268a63972b..1f7e6a5c1b 100644 --- a/data/common/settings/assoc.ini +++ b/data/common/settings/assoc.ini @@ -178,3 +178,4 @@ bas=/kolibrios/develop/TinyBasic/TinyBasic vox=/kolibrios/3D/voxel_editor/VOXEL_EDITOR +mgb=/sys/mgb \ No newline at end of file diff --git a/data/common/settings/games.ini b/data/common/settings/games.ini index af1e5a9058..7c35cc3ccc 100644 --- a/data/common/settings/games.ini +++ b/data/common/settings/games.ini @@ -32,7 +32,7 @@ Sea War=games/SW,66 Almaz=/k/games/almaz,81 Tanks=games/tanks,67 RocketForces=games/rforces,110 -Pig=/k/games/pig/pigex +Pig=/k/games/pig/pigex,120 ; Ataka=games/ataka,35 ;rus only Donkey=/k/games/donkey Loderunner=/k/games/LRL/LRL,41 diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index 9041ac328b..6a7c9526ac 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -114,7 +114,6 @@ void main() loop() switch(WaitEvent()) { case evMouse: - if (!CheckActiveProcess(Form.ID)) break; SelectList_ProcessMouse(); if (tabs.active_tab == SKINS) { diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 893eabf35a..f5dbb91558 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -54,13 +54,15 @@ dword col_selec, col_lpanel, col_work, col_graph, col_list_line=0xDDD7CF; int toolbar_buttons_x[7]={9,46,85,134,167,203}; -byte active_about=0; -word about_window; +bool active_about = false; +bool active_settings = false; +bool _not_draw = false; +bool menu_call_mouse = false; +bool exif_load = false; +bool dir_at_fat16 = NULL; + +word about_thread_id; word settings_window; -byte active_settings=0; -dword _not_draw = false; -byte menu_call_mouse=0; -byte exif_load=0; byte del_active=0; byte new_element_active=0; @@ -74,13 +76,12 @@ dword file_mas[6898]; int selected_count; int count_dir; -byte - path[4096], - file_path[4096], - file_name[256], - new_element_name[256], - temp[4096], - itdir; +byte path[4096]; +byte file_path[4096]; +byte file_name[256]; +byte new_element_name[256]; +byte temp[4096]; +bool itdir; char active_path[4096], inactive_path[4096]; @@ -132,7 +133,6 @@ byte cmd_free=0; void main() { - char selected_filename[256]; dword id; byte count_sl = 0; signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; @@ -341,7 +341,7 @@ void main() switch(id) { case CLOSE_BTN: - KillProcess(about_window); + KillProcess(about_thread_id); SaveIniSettings(); ExitProcess(); case PATH_BTN: @@ -371,14 +371,8 @@ void main() case 26: Paste(); break; - case 31...33: //sorting - id -= 30; - if (sort_type == id) sort_desc ^= 1; - else sort_type = id; - strcpy(#selected_filename, #file_name); - DrawList(); - Open_Dir(#path,WITH_REDRAW); - SelectFileByName(#selected_filename); + case 31...33: + EventSort(id-30); break; case 50...60: //Actions FnProcess(id-50); @@ -428,17 +422,18 @@ void main() { switch(key_scancode) { - case 059...068: - key_scancode -= 59; - if (key_scancode < SystemDiscs.list.count) + case SCAN_CODE_F1...SCAN_CODE_F3: + EventSort(key_scancode - 58); + break; + case SCAN_CODE_1...SCAN_CODE_10: + key_scancode-=2; + if (key_scancode >= SystemDiscs.list.count) break; + if (!two_panels.checked) { - if (!two_panels.checked) - { - DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click - pause(7); - } - SystemDiscs.Click(key_scancode); + DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click + pause(7); } + SystemDiscs.Click(key_scancode); break; case SCAN_CODE_KEY_X: Copy(#file_path, CUT); @@ -704,6 +699,22 @@ void List_ReDraw() if (new_element_active) && (col_selec != 0xCCCccc) NewElement_Form(new_element_active, #new_element_name); } +bool file_name_is_8_3(dword name) +{ + int name_len = strlen(name); + int dot_pos = strrchr(name, '.'); + if (name_len<=12) + { + if (dot_pos) { + if (name_len - dot_pos > 3) return false; + } + else { + if (name_len>8) return false; + } + return true; + } + return false; +} void Line_ReDraw(dword bgcol, filenum){ dword text_col=0, @@ -753,6 +764,7 @@ void Line_ReDraw(dword bgcol, filenum){ if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden? if (bgcol==col_selec) { + file_name_is_8_3(file_name_off); itdir = TestBit(attr, 4); strcpy(#file_name, file_name_off); if (!strcmp(#path,"/")) sprintf(#file_path,"%s%s",#path,file_name_off); @@ -815,6 +827,8 @@ void Open_Dir(dword dir_path, redraw){ SystemDiscs.Draw(); files.visible = files.h / files.item_h; if (files.count < files.visible) files.visible = files.count; + if (!strncmp(dir_path, "/rd/1/",5)) + dir_at_fat16 = true; else dir_at_fat16 = false; if (redraw!=ONLY_SHOW) Sorting(); list_full_redraw = true; if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();} @@ -841,7 +855,7 @@ inline Sorting() } for (j=files.count-1, file_off=files.count-1*304+buf+32; j>=0; j--, file_off-=304;) //files | folders { - if (!show_real_names.checked) strttl(file_off+40); + if (dir_at_fat16) && (file_name_is_8_3(file_off+40)) strttl(file_off+40); if (TestBit(ESDWORD[file_off],4)) //directory? { file_mas[d]=j; @@ -908,7 +922,7 @@ void SelectFileByName(dword that_file) int ind; files.KeyHome(); Open_Dir(#path,ONLY_OPEN); - if (!show_real_names.checked) strttl(that_file); + if (dir_at_fat16) && (file_name_is_8_3(that_file)) strttl(that_file); for (ind=files.count-1; ind>=0; ind--;) { if (!strcmp(file_mas[ind]*304+buf+72,that_file)) break; } files.cur_y = ind - 1; files.KeyDown(); @@ -1075,12 +1089,12 @@ void FnProcess(byte N) if (!active_about) { about_stak = malloc(4096); - about_window = CreateThread(#about_dialog,about_stak+4092); + about_thread_id = CreateThread(#about_dialog,about_stak+4092); break; } else { - ActivateWindow(GetProcessSlot(about_window)); + ActivateWindow(GetProcessSlot(about_thread_id)); } break; case 2: @@ -1208,4 +1222,15 @@ void EventRefreshDisksAndFolders() } } +void EventSort(dword id) +{ + char selected_filename[256]; + if (sort_type == id) sort_desc ^= 1; + else sort_type = id; + strcpy(#selected_filename, #file_name); + DrawList(); + Open_Dir(#path,WITH_REDRAW); + SelectFileByName(#selected_filename); +} + stop: diff --git a/programs/cmm/eolite/include/settings.h b/programs/cmm/eolite/include/settings.h index 014f4fd415..75b3bbb1e9 100644 --- a/programs/cmm/eolite/include/settings.h +++ b/programs/cmm/eolite/include/settings.h @@ -2,7 +2,6 @@ #ifdef LANG_RUS ?define TITLE_SETT "Настройки" ?define SHOW_DEVICE_CLASS "Выводить названия класса устройств" - ?define SHOW_REAL_NAMES "Показывать имена файлов не меняя регистр" ?define SHOW_STATUS_BAR "Показывать статус бар" ?define NOTIFY_COPY_END "Уведомлять о завершении копирования" ?define SHOW_BREADCRUMBS "Использовать 'хлебные крошки'" @@ -18,7 +17,6 @@ #else ?define TITLE_SETT "Settings" ?define SHOW_DEVICE_CLASS "Show device class name" - ?define SHOW_REAL_NAMES "Show file names in original case" ?define SHOW_STATUS_BAR "Show status bar" ?define NOTIFY_COPY_END "Notify when copying finished" ?define SHOW_BREADCRUMBS "Show breadcrumbs" @@ -40,7 +38,6 @@ edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x100000 more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; checkbox show_dev_name = { SHOW_DEVICE_CLASS }; -checkbox show_real_names = { SHOW_REAL_NAMES }; checkbox show_status_bar = { SHOW_STATUS_BAR }; checkbox info_after_copy = { NOTIFY_COPY_END }; checkbox show_breadcrumb = { SHOW_BREADCRUMBS }; @@ -86,7 +83,6 @@ void settings_dialog() break; } show_dev_name.click(id); - if (show_real_names.click(id)) action_buf=109; info_after_copy.click(id); two_panels.click(id); show_breadcrumb.click(id); @@ -133,7 +129,6 @@ void DrawSettingsCheckBoxes() int x=11, frx=26, but_x; y.n = 0; show_dev_name.draw(x, y.inc(14)); - show_real_names.draw(x, y.inc(25)); show_status_bar.draw(x, y.inc(25)); info_after_copy.draw(x, y.inc(25)); show_breadcrumb.draw(x, y.inc(25)); @@ -160,7 +155,6 @@ void LoadIniSettings() ini.section = "Eolite"; files.SetFont(6, 9, 10000000b); - show_real_names.checked = ini.GetInt("RealFileNamesCase", true); show_dev_name.checked = ini.GetInt("ShowDeviceName", true); show_status_bar.checked = ini.GetInt("ShowStatusBar", true); info_after_copy.checked = ini.GetInt("InfoAfterCopy", false); @@ -188,7 +182,6 @@ void SaveIniSettings() { ini.SetInt("ShowDeviceName", show_dev_name.checked); ini.SetInt("ShowStatusBar", show_status_bar.checked); - ini.SetInt("RealFileNamesCase", show_real_names.checked); ini.SetInt("InfoAfterCopy", info_after_copy.checked); ini.SetInt("BigIcons", big_icons.checked); ini.SetInt("TwoPanels", two_panels.checked); diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index ac86b25da1..6855bd9a76 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager 4.07" -#define ABOUT_TITLE "EOLITE 4.07" +#define TITLE "Eolite File Manager 4.1" +#define ABOUT_TITLE "EOLITE 4.1" #ifdef LANG_RUS ?define T_FILE "Файл" diff --git a/programs/cmm/examples/rgb.c b/programs/cmm/examples/rgb.c index 502652c327..809eaf32fb 100644 --- a/programs/cmm/examples/rgb.c +++ b/programs/cmm/examples/rgb.c @@ -41,7 +41,7 @@ int id; if (id==SETBG_BTN) EventSetBackground(#image,256,256); break; case evKey: - if (GetKey()==27) ExitProcess(); + if (GetKeys()==27) ExitProcess(); break; case evReDraw: system.color.get(); diff --git a/programs/cmm/lib/keyboard.h b/programs/cmm/lib/keyboard.h index e08a5392c5..5393e627f8 100644 --- a/programs/cmm/lib/keyboard.h +++ b/programs/cmm/lib/keyboard.h @@ -58,6 +58,17 @@ #define SCAN_CODE_F11 087 #define SCAN_CODE_F12 088 +#define SCAN_CODE_1 002 +#define SCAN_CODE_2 003 +#define SCAN_CODE_3 004 +#define SCAN_CODE_4 005 +#define SCAN_CODE_5 006 +#define SCAN_CODE_6 007 +#define SCAN_CODE_7 008 +#define SCAN_CODE_8 009 +#define SCAN_CODE_9 010 +#define SCAN_CODE_10 011 + #define SCAN_CODE_KEY_A 030 #define SCAN_CODE_KEY_B 048 #define SCAN_CODE_KEY_C 046 @@ -94,24 +105,6 @@ #define KEY_LWIN 01000000000b #define KEY_RWIN 10000000000b -inline fastcall word GetKey() //+Gluk fix -{ - $push edx -GETKEY: - $mov eax,2 - $int 0x40 - $cmp eax,1 - $jne GETKEYI - $mov ah,dh - $jmp GETKEYII //jz? -GETKEYI: - $mov dh,ah - $jmp GETKEY -GETKEYII: - $pop edx - $shr eax,8 -} - :unsigned char key_ascii; :dword key_scancode, key_modifier, key_editbox; :int GetKeys() diff --git a/programs/cmm/panels_cfg/panels_cfg.c b/programs/cmm/panels_cfg/panels_cfg.c index 9e538997cc..960df86e9d 100644 --- a/programs/cmm/panels_cfg/panels_cfg.c +++ b/programs/cmm/panels_cfg/panels_cfg.c @@ -135,8 +135,8 @@ void main() break; case evKey: - key = GetKey(); - if (key==27) ExitProcess(); + GetKeys(); + if (key_scancode == SCAN_CODE_ESC) ExitProcess(); break; case evReDraw: diff --git a/programs/cmm/pixie2/pixie.c b/programs/cmm/pixie2/pixie.c index e515c0c2ce..9b56e97bd7 100644 --- a/programs/cmm/pixie2/pixie.c +++ b/programs/cmm/pixie2/pixie.c @@ -30,23 +30,23 @@ char default_dir[] = "/rd/1"; od_filter filter2 = { 15, "MP3\0WAV\0XM\0\0" }; -#define ABOUT_MESSAGE "Pixie Player v2.93 Final +#define ABOUT_MESSAGE " v2.94 Final - A tiny music folder player. - Supports MP3, WAV, XM audio file formats. + A tiny music folder player. + Supports MP3, WAV, XM audio file formats. Hot keys: - Open file: O key - Play/Stop: Space or P key - Start playing selected file: Enter - Goto next/previous track: Ctrl + Left/Right - Change sound volume: Left/Right key - Remove from the list: Delete - Permanently delete file: Shift + Delete - Show file info: I - Repeat: R - Shuffle: S - Mute: M + Open file: O key + Play/Stop: Space or P key + Start playing selected file: Enter + Goto next/previous track: Ctrl + Left/Right + Change sound volume: Left/Right key + Remove from the list: Delete + Permanently delete file: Shift + Delete + Show file info: I + Repeat: R + Shuffle: S + Mute: M kolibri-n.org & aspero.pro" @@ -133,7 +133,6 @@ void main() WaitEventTimeout(10); switch(EAX & 0xFF) { case evMouse: - if (!CheckActiveProcess(Form.ID)) break; mouse.get(); scrollbar_v_mouse (#scroll1); if (list.first != scroll1.position) @@ -148,10 +147,10 @@ void main() if (mouse.dblclick) EventStartPlayingSelectedItem(); if (mouse.down) && (mouse.key&MOUSE_LEFT) && (list.ProcessMouse(mouse.x, mouse.y)) DrawPlayList(); - if (mouse.down) && (mouse.key&MOUSE_RIGHT) EventShowAbout(); } if(mouse.key&MOUSE_LEFT) && (mouse.x<14) && (window_mode == WINDOW_MODE_SMALL) EventDragWindow(); + if (mouse.down) && (mouse.y>skin_height) && (mouse.key&MOUSE_RIGHT) EventShowAbout(); break; case evButton: switch(GetButtonID()) { @@ -555,19 +554,23 @@ void ShowAboutThread() if (key_scancode == SCAN_CODE_ESC) ExitProcess(); break; case evReDraw: - DefineDragableWindow(150, 200, 400, 368); + DefineDragableWindow(150, 200, 400, 400); GetProcessInfo(#pop_up, SelfInfo); DrawBar(0, 0, pop_up.width, pop_up.height, theme.color_top_panel_bg); DrawRectangle(0, 0, pop_up.width, pop_up.height, theme.color_list_border); DefineHiddenButton(pop_up.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE); - img_draw stdcall(skin.image, pop_up.width-28, 0, 28, 18, skin.w - 29, 0); + //img_draw stdcall(skin.image, pop_up.width-28, 0, 28, 18, skin.w - 29, 0); DrawCaptButton(pop_up.width-10-80, pop_up.height - 34, 80, 24, 2, - theme.color_list_active_bg, theme.color_top_panel_song_name, "Cool"); + 0x171717, 0xF5EFB3, "Cool"); - WriteTextLines(10, 10, 0x90, theme.color_top_panel_song_name, ABOUT_MESSAGE, 19); - DrawIcon32(10, 48, theme.color_top_panel_bg, 65); + WriteText(131,16, 0x81, 0x8E7C61, "Pixie Player"); + WriteText(130,15, 0x81, 0xF5EFB3, "Pixie Player"); + + WriteTextLines(10, 40, 0x90, theme.color_top_panel_song_name, ABOUT_MESSAGE, 19); + DrawIcon32(45, 15, theme.color_top_panel_bg, 65); + DrawIcon32(pop_up.width-32-45, 15, theme.color_top_panel_bg, 65); } } diff --git a/programs/cmm/tmpdisk/t_gui.c b/programs/cmm/tmpdisk/t_gui.c index 55c944ac1d..ae8885f0fd 100644 --- a/programs/cmm/tmpdisk/t_gui.c +++ b/programs/cmm/tmpdisk/t_gui.c @@ -63,7 +63,6 @@ void Main_Window() switch(WaitEvent()) { case evMouse: - if (!CheckActiveProcess(Form.ID)) break; edit_box_mouse stdcall (#edit_disk_size); break; diff --git a/programs/media/kiv/trunk/kiv.asm b/programs/media/kiv/trunk/kiv.asm index fe9b4dc999..2c45f45b6d 100644 --- a/programs/media/kiv/trunk/kiv.asm +++ b/programs/media/kiv/trunk/kiv.asm @@ -1002,15 +1002,15 @@ draw_window: imul ebx, 10001h mcall - mcall SF_DEFINE_BUTTON, <5 + 25 * 0, 20>, <5, 20>, 'opn'+40000000h - mcall , <10 + 25 * 1, 20>, , 'bck'+40000000h - mcall , <10 + 25 * 2, 20>, , 'fwd'+40000000h - mcall , <15 + 25 * 3, 20>, , 'bgr'+40000000h - mcall , <15 + 25 * 4, 20>, , 'sld'+40000000h + mcall SF_DEFINE_BUTTON, <4 + 25 * 0, 21>, <4, 21>, 'opn'+40000000h + mcall , <9 + 25 * 1, 21>, , 'bck'+40000000h + mcall , <9 + 25 * 2, 21>, , 'fwd'+40000000h + mcall , <14 + 25 * 3, 21>, , 'bgr'+40000000h + mcall , <14 + 25 * 4, 21>, , 'sld'+40000000h pop ebx add ebx, 5 shl ebx, 16 - mov bl, 20 + mov bl, 21 mcall , , , 'flh'+40000000h add ebx, 25 * 65536 mcall , , , 'flv'+40000000h diff --git a/programs/media/kiv/trunk/kivicons.bmp b/programs/media/kiv/trunk/kivicons.bmp index 0a2502bebf..816ae2a34c 100644 Binary files a/programs/media/kiv/trunk/kivicons.bmp and b/programs/media/kiv/trunk/kivicons.bmp differ diff --git a/programs/system/mgb/trunk/mgb.asm b/programs/system/mgb/trunk/mgb.asm index 9c6164aff9..dfb5a4b994 100644 --- a/programs/system/mgb/trunk/mgb.asm +++ b/programs/system/mgb/trunk/mgb.asm @@ -1,10 +1,16 @@ ;============================================================================= -; Kolibri Graphics Benchmark 0.82 +; Kolibri Graphics Benchmark 0.9 ;-------------------------------------- ; MGB - Menuet Graphics Benchmark 0.3 ; Compile with FASM ; ;============================================================================= +; version: 0.9 +; last update: 15/04/2019 +; written by: Kiril Lipatov aka Leency +; changes: use big fonts, editing two comments, improve UI, show delta % +; Russian translation by Daniel Ovchinnikov +;--------------------------------------------------------------------- ; version: 0.82 ; last update: 03/11/2014 ; written by: Marat Zakiyanov aka Mario79, aka Mario @@ -75,9 +81,9 @@ use32 dd cur_dir_path include '../../../config.inc' ;for nightbuild -include '..\..\..\macros.inc' -include '..\..\..\proc32.inc' -;include '..\..\..\debug.inc' +include '../../../macros.inc' +include '../../../proc32.inc' +;include '../../../debug.inc' include '../../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../../develop/libraries/box_lib/load_lib.mac' include 'lang.inc' ;language support @@ -152,8 +158,8 @@ key: jz ActionTest cmp ah,'c' jz ActionComment - cmp ah,'p' - jz ActionPattern + cmp ah,'m' + jz ActionPatternMove cmp ah,'o' jz ActionOpen cmp ah,'s' @@ -185,9 +191,9 @@ ActionComment: jmp still ;--------------------------------------------------------------------- NotComment: - cmp ah,4 - jnz NotPattern -ActionPattern: + cmp ah,6 + jnz NotPatternCopy +ActionPatternMove: test dword [wFlags],1 jnz still mov esi,results_table @@ -204,8 +210,8 @@ ActionPattern: call DrawBars jmp still ;--------------------------------------------------------------------- -NotPattern: - cmp ah,5 +NotPatternCopy: + cmp ah,4 jnz NotOpen ActionOpen: test dword [wFlags],1 @@ -226,7 +232,7 @@ OpenDialog_Start_1: ret ;--------------------------------------------------------------------- NotOpen: - cmp ah,6 + cmp ah,5 jnz still ActionSave: test dword [wFlags],1 @@ -280,36 +286,36 @@ align 4 draw_window: mcall 12,1 mcall 48,4 - mov ebx,100*65536+72*5+14 - mov ecx,80*65536+TESTS_NUM*LINE_HEIGHT+15+20+35 + mov ebx,460*65536+(LINE_DESCRIPTION_CHARS+5)*8+16 + mov ecx,80*65536+TESTS_NUM*(LINE_HEIGHT+2)+15+38 add cx,ax xor eax,eax xor esi,esi mcall ,,,34000000h,,aCaption mov eax,8 - mov ebx,050036h+12 - mov ecx,5*65536+20 + mov ebx,20*65536+84 + mov ecx,4*65536+24 mov edx,2 mov esi,0x00007F7F @@: mcall - add ebx,72*65536 + add ebx,96*65536 inc edx cmp edx,7 jb @r - mov ecx,31 + mov ecx,33 mov edx,0x00007F7F - mov esi,(72*5)/2 + mov esi,(LINE_DESCRIPTION_CHARS*8)/2+20 call drawSeparator - mcall 4,<27,12>,0x80DDEEFF,aButtonsText + mcall 4,<46,9>,0x90DDEEFF,aButtonsText call DrawBars - mov ecx,TESTS_NUM*LINE_HEIGHT+15+21 + mov ecx,TESTS_NUM*LINE_HEIGHT+15+23 mov edx,0x00007F7F - mov esi,(72*5)/2 + mov esi,(LINE_DESCRIPTION_CHARS*8)/2+20 call drawSeparator mcall 12,2 ret @@ -584,7 +590,7 @@ DrawBars: add ecx,-2 shl ecx,16 mov cx,LINE_HEIGHT - mov ebx,0*65536+72*5+5 + mov ebx,0*65536+LINE_DESCRIPTION_CHARS*8+5 xor edx,edx mcall 13 pop ebx @@ -592,7 +598,7 @@ DrawBars: and ebx,0x0000FFFF or ebx,5*65536 mov edx,[edi+TEST_REC_SIZE-4] - mcall 4,,0x8000CCCC + mcall 4,,0x9000CCCC push '=' 0x00FFFF00 0x00FFFF7F 0x00FFFF7F mov eax,[edi+0] @@ -612,42 +618,90 @@ DrawBars: @@: pop ecx call int2str - add ebx,(72*5-6*8*2-6-10-5)*65536 ; 196 + add ebx,(LINE_DESCRIPTION_CHARS*8-8*8*2-20)*65536 ; 196 + add ecx,0x10000000 ;big font mcall 4,,,textarea,8 pop ecx mov eax,[edi+4] call int2str - add ebx,(6*8+6+10)*65536 + add ebx,(6*8+26)*65536 + add ecx,0x10000000 ;big font mcall 4 - pop ecx - add ebx,(-6-5)*65536 - mov edx,esp + ;pop ecx + ;add ebx,(-15)*65536 + ;mov edx,esp + ;mov esi,1 + ;add ecx,0x10000000 ;big font + ;mcall + + + ; draw difference + pop ecx + add ecx,0x10000000 ;big font + + pusha + mov esi,ecx + mov eax,[edi+0] + mov ecx,[edi+4] + cmp ecx,0 + je .difference_end ; no div by zero + imul eax,100 + xor edx,edx + div ecx + mov ecx, eax + sub ecx,100 + mov [sign],'+' + cmp ecx,0 + jge @f ; no need to invert positive rumber + neg ecx + mov [sign],'-' + @@: + cmp ecx,1 ; do not show <=1% results + jle .difference_end + cmp ecx,100 ; do not show >=100% results + je .difference_end + + push ecx esi + add ebx,(10*8)*65536 + mov ecx,esi + mov edx,sign mov esi,1 - mcall + mcall 4 + pop esi ecx + + add ebx,(1*8)*65536 + mov edx,ebx + mcall 47, 10000000000001000000000000000000b + + .difference_end: + popa + add esp,4 add edi,TEST_REC_SIZE add bx,LINE_HEIGHT jmp .next_result .exit: - mov ebx, 0*65536+72*5+5 - mov ecx, (TESTS_NUM*LINE_HEIGHT+15+25)*65536+26 + + + mov ebx, 0*65536+LINE_DESCRIPTION_CHARS*8+5 + mov ecx, (TESTS_NUM*LINE_HEIGHT+15+27)*65536+LINE_HEIGHT*2 xor edx, edx mcall 13 mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27) - mcall 4,,0x8000CCCC,aLeft + mcall 4,,0x9000CCCC,aLeft - add ebx, (6*10)*65536 - mcall ,,0x80FFFF00,comment_string_1 + add ebx, (8*10)*65536 + mcall ,,0x90FFFF00,comment_string_1 - mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27+12) - mcall ,,0x8000CCCC,aRight + mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27+LINE_HEIGHT) + mcall ,,0x9000CCCC,aRight - add ebx, (6*10)*65536 - mcall ,,0x80FFFF00,comment_string_2 + add ebx, (8*10)*65536 + mcall ,,0x90FFFF00,comment_string_2 ret ;--------------------------------------------------------------------- int2str: @@ -682,7 +736,21 @@ thread_comment: mov edi, edit1 mov [edi+48], eax ;ed_size mov [edi+52], eax ;ed_pos -;--------------------------------------------------------------------- + + mov esi,comment_string_2 + cld +@@: + lodsb + test al,al + jne @r + sub esi,comment_string_2 + mov eax,esi + dec eax + mov edi, edit2 + mov [edi+48], eax ;ed_size + mov [edi+52], eax ;ed_pos + + ;--------------------------------------------------------------------- .red: call .draw_window .still: @@ -694,7 +762,9 @@ thread_comment: cmp eax,3 ; button in buffer ? je .button - push dword name_editboxes + push dword edit1 + call [edit_box_mouse] + push dword edit2 call [edit_box_mouse] jmp .still ;--------------------------------------------------------------------- @@ -705,7 +775,9 @@ thread_comment: cmp ah,27 je .close - push dword name_editboxes + push dword edit1 + call [edit_box_key] + push dword edit2 call [edit_box_key] jmp .still ;--------------------------------------------------------------------- @@ -721,8 +793,10 @@ thread_comment: mcall 12,1 xor eax,eax xor esi,esi - mcall ,<100,300>,<100,80>,0x34780078,,aComment - push dword name_editboxes + mcall ,<110,300>,<120,120>,0x34C0C0C0,,aCommentT ; 0x34780078 + push dword edit1 + call [edit_box_draw] + push dword edit2 call [edit_box_draw] mcall 12,2 ret @@ -749,7 +823,7 @@ locLoadFile: locSaveFile: mov [stFileInfoBlock], 2 or dword [wFlags],1 - mov esi,results_table+4 + mov esi,results_table ;+4 to save Right Bar mov edi,mgb_data cld @@: @@ -793,8 +867,9 @@ results_table dd \ ?,?,testDrawPixel,aDrawingPixel,\ 0,0,0,0 ;--------------------------------------------------------------------- -LINE_HEIGHT = 13 +LINE_HEIGHT = 17 TEST_REC_SIZE = 16 +LINE_DESCRIPTION_CHARS = 58 TESTS_NUM = ($ - results_table) / TEST_REC_SIZE - 1 ;--------------------------------------------------------------------- if lang eq it @@ -814,16 +889,43 @@ if lang eq it aDrawingNumber db 'Decimal Number, 8 digits',0 aDrawingPixel db 'Singolo pixel',0 - aTestText db 'This is a 34-charachters test text' - aButtonsText db 'Test Commenti Pattern+ Apri Salva',0 - aCaption db 'Kolibri Graphical Benchmark 0.82',0 + aTestText db 'This is a 34-charachters test text' + aButtonsText db 'Test Commenti Apri Salva Move >',0 + aCaption db 'Kolibri Graphical Benchmark 0.9',0 aLeft db 'Sinistra:',0 aRight db 'Destra :',0 - aComment1 db 'Attuale ',0 - aComment2 db 'no pattern',0 - aComment db 'Commento',0 + aComment1 db 'Attuale test',0 + aComment2 db 'previous test',0 + aCommentT db 'Commenti',0 +else if lang eq ru + aDrawingWindow db 'Системное окно со скином, 325x400 px',0 + aDrawingBar db 'Закрашенный прямоугольник, 100x250 px',0 + aDrawingPicture db 'Картинка, 90x123, px',0 + aDrawingPictF73 db 'Картинка для блиттера, 90x123, px',0 + aGetScreenF36 db 'Чтение экрана из видеопамяти, 90x123, px',0 + aGetScreen_GS db 'Чтение экрана из видеокарты, 90x123, px',0 + aDrawingVLine db 'Больший катет, 350 px',0 + aDrawingHLine db 'Меньший катет, 270 px',0 + aDrawingFLine db 'Гипотенуза, 350 px',0 + aDrawingText1 db 'Системный текст маленький, 34 знака',0 + aDrawingText1m db 'Системный текст маленький (буф), 34 знака',0 + aDrawingText2 db 'Системный текст большой, 34 знака',0 + aDrawingText2m db 'Системный текст большой (буф), 34 знака',0 + aDrawingNumber db 'Десятичное число, 8 цифр',0 + aDrawingPixel db 'Одиночный пиксель',0 + + aTestText db 'This is a 34-charachters test text' + aButtonsText db 'Тест Названия Из файла В файл Вправо >',0 + aCaption db 'Графический бенчмарк для Колибри v0.9',0 + + aLeft db 'Слева:',0 + aRight db 'Справа:',0 + + aComment1 db 'этот тест',0 + aComment2 db 'предыдущий тест',0 + aCommentT db 'Редактировать комментарии',0 else aDrawingWindow db 'Window Of Type #3, 325x400 px',0 aDrawingBar db 'Filled Rectangle, 100x250 px',0 @@ -835,22 +937,22 @@ else aDrawingHLine db 'Horizontal Line, 270 px',0 aDrawingFLine db 'Free-angled Line, 350 px',0 aDrawingText1 db 'Fixed-width Text, 34 chars',0 - aDrawingText1m db 'Fixed-width Text(m), 34 chars',0 + aDrawingText1m db 'Fixed-width Text(mem), 34 chars',0 aDrawingText2 db 'Proportional Text, 34 chars',0 - aDrawingText2m db 'Proportional Text(m), 34 chars',0 + aDrawingText2m db 'Proportional Text(mem), 34 chars',0 aDrawingNumber db 'Decimal Number, 8 digits',0 aDrawingPixel db 'Single Pixel',0 - aTestText db 'This is a 34-charachters test text' - aButtonsText db 'Test Comment+ Pattern+ Open Save',0 - aCaption db 'Kolibri Graphical Benchmark 0.82',0 + aTestText db 'This is a 34-charachters test text' + aButtonsText db 'Test Comments Open Save Move >',0 + aCaption db 'Kolibri Graphical Benchmark 0.9',0 aLeft db 'Left :',0 aRight db 'Right :',0 - aComment1 db 'current',0 - aComment2 db 'no pattern',0 - aComment db 'Comment',0 + aComment1 db 'current test',0 + aComment2 db 'previous test',0 + aCommentT db 'Edit comments',0 end if ;--------------------------------------------------------------------- system_dir_Boxlib db '/sys/lib/box_lib.obj',0 @@ -919,9 +1021,11 @@ db 'MGB',0 .end: db 0 -start_temp_file_name: db 'pattern.mgb',0 +sign db ?,0 -path4 db '/rd/1/pattern.mgb',0 +start_temp_file_name: db 'results.mgb',0 + +path4 db '/rd/1/results.mgb',0 ;--------------------------------------------------------------------- align 4 params_f73: @@ -1037,14 +1141,16 @@ aEdit_box_mouse db 'edit_box_mouse',0 ;--------------------------------------------------------------------- ; for EDITBOX align 4 -name_editboxes: -edit1 edit_box 200,10,30,0xffffff,0xbbddff,0,0,0,255,comment_string_1,mouse_dd,ed_focus+ed_always_focus,0 -name_editboxes_end: +editboxes: +edit1 edit_box 260,12,15,0xffffff,0xbbddff,0xFF00FF,0x7F7F7F,\ + 0x90000000,43,comment_string_1,0,ed_focus,0 +edit2 edit_box 260,12,50,0xffffff,0xbbddff,0xFF00FF,0x7F7F7F,\ + 0x90000000,43,comment_string_2,0,0,0 +editboxes_end: ;--------------------------------------------------------------------- IM_END: align 4 -mouse_dd rd 1 area_for_f36 rd 1 dwTestEndTime rd 1 dwMainPID rd 1