From 91939fc341f0d5e4a5b4acc767793c8132f3fedb Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 19 Oct 2018 09:19:59 +0000 Subject: [PATCH] mp3info: autobuild, add to IMG git-svn-id: svn://kolibrios.org@7484 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 1 + programs/cmm/eolite/include/menu.h | 17 +++++++----- programs/cmm/pixie2/pixie.c | 1 + programs/games/rforces/trunk/kosSyst.h | 33 ++++++++++++++++++----- programs/games/rforces/trunk/properties.h | 2 +- programs/games/rforces/trunk/rforces.cpp | 15 +++++------ programs/media/mp3info/Tupfile.lua | 2 ++ 7 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 programs/media/mp3info/Tupfile.lua diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 1d4b23d04..561f4e08a 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -441,6 +441,7 @@ tup.append_table(img_files, { {"MEDIA/KIV", PROGS .. "/media/kiv/trunk/kiv"}, {"MEDIA/LISTPLAY", PROGS .. "/media/listplay/trunk/listplay"}, {"MEDIA/MIDAMP", PROGS .. "/media/midamp/trunk/midamp"}, + {"MEDIA/MP3INFO", PROGS .. "/media/mp3info/mp3info"}, {"MEDIA/PALITRA", PROGS .. "/media/palitra/trunk/palitra"}, {"MEDIA/STARTMUS", PROGS .. "/media/startmus/trunk/STARTMUS"}, {"NETWORK/PING", PROGS .. "/network/ping/ping"}, diff --git a/programs/cmm/eolite/include/menu.h b/programs/cmm/eolite/include/menu.h index 1cde96bcb..634950ec7 100644 --- a/programs/cmm/eolite/include/menu.h +++ b/programs/cmm/eolite/include/menu.h @@ -56,9 +56,12 @@ void FileMenu() rbmenu.SetSizes(0,0,10,0,18); for (index=0; file_captions[index]!=0; index+=3) { - if (itdir) && (file_captions[index+2]>=200) continue; - if (selected_count > 0) && (file_captions[index+2]>=200) continue; - if (selected_count > 0) && (file_captions[index+2]==100) continue; //do not show "open" for several files + if (selected_count > 0) { + //if there are files selected then show only specific menu items + if (file_captions[index+2]>=200) continue; + if (file_captions[index+2]==100) continue; + } + else if (itdir) && (file_captions[index+2]>=200) continue; if (strlen(file_captions[index])>rbmenu.w) rbmenu.w = strlen(file_captions[index]); rbmenu.count++; rbmenu.visible++; @@ -108,9 +111,11 @@ void MenuListRedraw() for (index=0; file_captions[index*3]!=0; index++) { - if ((itdir) && (file_captions[index*3+2]>=200)) continue; - if (selected_count > 0) && (file_captions[index*3+2]==100) continue; - if (selected_count > 0) && (file_captions[index*3+2]>=200) continue; + if (selected_count > 0) { + if (file_captions[index*3+2]==100) continue; + if (file_captions[index*3+2]>=200) continue; + } + else if ((itdir) && (file_captions[index*3+2]>=200)) continue; DrawBar(1,start_y+2,1,rbmenu.item_h,0xFFFfff); if (start_y/rbmenu.item_h==rbmenu.cur_y) { diff --git a/programs/cmm/pixie2/pixie.c b/programs/cmm/pixie2/pixie.c index a29c5961c..2a6589be7 100644 --- a/programs/cmm/pixie2/pixie.c +++ b/programs/cmm/pixie2/pixie.c @@ -43,6 +43,7 @@ Hot keys: 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 diff --git a/programs/games/rforces/trunk/kosSyst.h b/programs/games/rforces/trunk/kosSyst.h index a6a2a95fd..36f84128f 100644 --- a/programs/games/rforces/trunk/kosSyst.h +++ b/programs/games/rforces/trunk/kosSyst.h @@ -10,14 +10,16 @@ typedef unsigned __int8 Byte; #define FO_READ 0 #define FO_WRITE 2 +//Process Events #define EM_WINDOW_REDRAW 1 #define EM_KEY_PRESS 2 -#define EM_BUTTON_CLICK 4 -#define EM_APP_CLOSE 8 -#define EM_DRAW_BACKGROUND 16 -#define EM_MOUSE_EVENT 32 -#define EM_IPC 64 -#define EM_NETWORK 256 +#define EM_BUTTON_CLICK 3 +#define EM_APP_CLOSE 4 +#define EM_DRAW_BACKGROUND 5 +#define EM_MOUSE_EVENT 6 +#define EM_IPC 7 +#define EM_NETWORK 8 +#define EM_DEBUG 9 #define KM_CHARS 0 #define KM_SCANS 1 @@ -27,6 +29,25 @@ typedef unsigned __int8 Byte; #define PROCESS_ID_SELF -1 +//Event mask bits for function 40 +#define EVM_REDRAW 1b +#define EVM_KEY 10b +#define EVM_BUTTON 100b +#define EVM_EXIT 1000b +#define EVM_BACKGROUND 10000b +#define EVM_MOUSE 100000b +#define EVM_IPC 1000000b +#define EVM_STACK 10000000b +#define EVM_DEBUG 100000000b +#define EVM_STACK2 1000000000b +#define EVM_MOUSE_FILTER 0x80000000 +#define EVM_CURSOR_FILTER 0x40000000 + +//Button options +#define BT_DEL 0x80000000 +#define BT_HIDE 0x40000000 +#define BT_NOFRAME 0x20000000 + #define abs(a) (a<0?0-a:a) diff --git a/programs/games/rforces/trunk/properties.h b/programs/games/rforces/trunk/properties.h index 2d2b2ee6f..6375291d4 100644 --- a/programs/games/rforces/trunk/properties.h +++ b/programs/games/rforces/trunk/properties.h @@ -16,7 +16,7 @@ #define WHITE 0x00FFFFFF // Visual properties -#define GAME_NAME "Rocket Forces v0.1 (F2 - new game, Esc - exit) " +#define GAME_NAME "Rocket Forces v1.12 (F2 - new game, Esc - exit) " #define BG_COLOR BLACK #define TEXT_COLOR WHITE #define CUR_COLOR GREEN diff --git a/programs/games/rforces/trunk/rforces.cpp b/programs/games/rforces/trunk/rforces.cpp index 6d15921f8..92f654f66 100644 --- a/programs/games/rforces/trunk/rforces.cpp +++ b/programs/games/rforces/trunk/rforces.cpp @@ -39,15 +39,16 @@ void kos_Main() Dword frame_start, frame_end; OnStart(); Menu(); + kos_SetMaskForEvents(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); for (;;) { frame_start = kos_GetTime(); switch (kos_CheckForEvent()) { - case 1: + case EM_WINDOW_REDRAW: DrawWindow(); break; - case 2: // key pressed, read it and ignore + case EM_KEY_PRESS: Byte keyCode; kos_GetKey(keyCode); if (keyCode == 27) @@ -59,19 +60,16 @@ void kos_Main() OnStart(); } break; - case 3: // button pressed; we have only one button, close + case EM_BUTTON_CLICK: // button pressed; we have only one button, close OnExit(); break; - case 6: // событие от мыши (нажатие на кнопку мыши или перемещение; сбрасывается при прочтении) + case EM_MOUSE_EVENT: // событие от мыши (нажатие на кнопку мыши или перемещение; сбрасывается при прочтении) OnMouseMove(); if (ms.lbclick == 1) { OnLMBClick(); } break; - default: - OnMouseMove(); - break; } if (kos_GetButtonID(btn_id)) OnExit(); DrawBombs(); @@ -92,7 +90,7 @@ void kos_Main() void DrawWindow() { kos_WindowRedrawStatus(1); - kos_DefineAndDrawWindow(10, 40, WINDOW_WIDTH + 8, WINDOW_HEIGHT + kos_GetSkinHeight(), 0x34, BG_COLOR, 0, 0, (Dword)header); + kos_DefineAndDrawWindow(10, 40, WINDOW_WIDTH + 8, WINDOW_HEIGHT + kos_GetSkinHeight() + 12, 0x34, BG_COLOR, 0, 0, (Dword)header); kos_WindowRedrawStatus(2); kos_WriteTextToWindow(8, 10, 0, TEXT_COLOR, "Population: %", 16); @@ -368,7 +366,6 @@ void OnStart() rtlSrand(kos_GetTime()); DrawWindow(); - kos_SetMaskForEvents(39); } void OnExit() diff --git a/programs/media/mp3info/Tupfile.lua b/programs/media/mp3info/Tupfile.lua new file mode 100644 index 000000000..7dadd19c8 --- /dev/null +++ b/programs/media/mp3info/Tupfile.lua @@ -0,0 +1,2 @@ +if tup.getconfig("NO_FASM") ~= "" then return end +tup.rule("mp3info.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "mp3info")