mp3info: autobuild, add to IMG

git-svn-id: svn://kolibrios.org@7484 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2018-10-19 09:19:59 +00:00
parent 31a514faf0
commit 91939fc341
7 changed files with 49 additions and 22 deletions

View File

@ -441,6 +441,7 @@ tup.append_table(img_files, {
{"MEDIA/KIV", PROGS .. "/media/kiv/trunk/kiv"}, {"MEDIA/KIV", PROGS .. "/media/kiv/trunk/kiv"},
{"MEDIA/LISTPLAY", PROGS .. "/media/listplay/trunk/listplay"}, {"MEDIA/LISTPLAY", PROGS .. "/media/listplay/trunk/listplay"},
{"MEDIA/MIDAMP", PROGS .. "/media/midamp/trunk/midamp"}, {"MEDIA/MIDAMP", PROGS .. "/media/midamp/trunk/midamp"},
{"MEDIA/MP3INFO", PROGS .. "/media/mp3info/mp3info"},
{"MEDIA/PALITRA", PROGS .. "/media/palitra/trunk/palitra"}, {"MEDIA/PALITRA", PROGS .. "/media/palitra/trunk/palitra"},
{"MEDIA/STARTMUS", PROGS .. "/media/startmus/trunk/STARTMUS"}, {"MEDIA/STARTMUS", PROGS .. "/media/startmus/trunk/STARTMUS"},
{"NETWORK/PING", PROGS .. "/network/ping/ping"}, {"NETWORK/PING", PROGS .. "/network/ping/ping"},

View File

@ -56,9 +56,12 @@ void FileMenu()
rbmenu.SetSizes(0,0,10,0,18); rbmenu.SetSizes(0,0,10,0,18);
for (index=0; file_captions[index]!=0; index+=3) for (index=0; file_captions[index]!=0; index+=3)
{ {
if (itdir) && (file_captions[index+2]>=200) continue; if (selected_count > 0) {
if (selected_count > 0) && (file_captions[index+2]>=200) continue; //if there are files selected then show only specific menu items
if (selected_count > 0) && (file_captions[index+2]==100) continue; //do not show "open" for several files 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]); if (strlen(file_captions[index])>rbmenu.w) rbmenu.w = strlen(file_captions[index]);
rbmenu.count++; rbmenu.count++;
rbmenu.visible++; rbmenu.visible++;
@ -108,9 +111,11 @@ void MenuListRedraw()
for (index=0; file_captions[index*3]!=0; index++) for (index=0; file_captions[index*3]!=0; index++)
{ {
if ((itdir) && (file_captions[index*3+2]>=200)) continue; if (selected_count > 0) {
if (selected_count > 0) && (file_captions[index*3+2]==100) continue; if (file_captions[index*3+2]==100) continue;
if (selected_count > 0) && (file_captions[index*3+2]>=200) 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); DrawBar(1,start_y+2,1,rbmenu.item_h,0xFFFfff);
if (start_y/rbmenu.item_h==rbmenu.cur_y) if (start_y/rbmenu.item_h==rbmenu.cur_y)
{ {

View File

@ -43,6 +43,7 @@ Hot keys:
Change sound volume: Left/Right key Change sound volume: Left/Right key
Remove from the list: Delete Remove from the list: Delete
Permanently delete file: Shift + Delete Permanently delete file: Shift + Delete
Show file info: I
Repeat: R Repeat: R
Shuffle: S Shuffle: S
Mute: M Mute: M

View File

@ -10,14 +10,16 @@ typedef unsigned __int8 Byte;
#define FO_READ 0 #define FO_READ 0
#define FO_WRITE 2 #define FO_WRITE 2
//Process Events
#define EM_WINDOW_REDRAW 1 #define EM_WINDOW_REDRAW 1
#define EM_KEY_PRESS 2 #define EM_KEY_PRESS 2
#define EM_BUTTON_CLICK 4 #define EM_BUTTON_CLICK 3
#define EM_APP_CLOSE 8 #define EM_APP_CLOSE 4
#define EM_DRAW_BACKGROUND 16 #define EM_DRAW_BACKGROUND 5
#define EM_MOUSE_EVENT 32 #define EM_MOUSE_EVENT 6
#define EM_IPC 64 #define EM_IPC 7
#define EM_NETWORK 256 #define EM_NETWORK 8
#define EM_DEBUG 9
#define KM_CHARS 0 #define KM_CHARS 0
#define KM_SCANS 1 #define KM_SCANS 1
@ -27,6 +29,25 @@ typedef unsigned __int8 Byte;
#define PROCESS_ID_SELF -1 #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) #define abs(a) (a<0?0-a:a)

View File

@ -16,7 +16,7 @@
#define WHITE 0x00FFFFFF #define WHITE 0x00FFFFFF
// Visual properties // 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 BG_COLOR BLACK
#define TEXT_COLOR WHITE #define TEXT_COLOR WHITE
#define CUR_COLOR GREEN #define CUR_COLOR GREEN

View File

@ -39,15 +39,16 @@ void kos_Main()
Dword frame_start, frame_end; Dword frame_start, frame_end;
OnStart(); OnStart();
Menu(); Menu();
kos_SetMaskForEvents(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
for (;;) for (;;)
{ {
frame_start = kos_GetTime(); frame_start = kos_GetTime();
switch (kos_CheckForEvent()) switch (kos_CheckForEvent())
{ {
case 1: case EM_WINDOW_REDRAW:
DrawWindow(); DrawWindow();
break; break;
case 2: // key pressed, read it and ignore case EM_KEY_PRESS:
Byte keyCode; Byte keyCode;
kos_GetKey(keyCode); kos_GetKey(keyCode);
if (keyCode == 27) if (keyCode == 27)
@ -59,19 +60,16 @@ void kos_Main()
OnStart(); OnStart();
} }
break; break;
case 3: // button pressed; we have only one button, close case EM_BUTTON_CLICK: // button pressed; we have only one button, close
OnExit(); OnExit();
break; break;
case 6: // ñîáûòèå îò ìûøè (íàæàòèå íà êíîïêó ìûøè èëè ïåðåìåùåíèå; ñáðàñûâàåòñÿ ïðè ïðî÷òåíèè) case EM_MOUSE_EVENT: // ñîáûòèå îò ìûøè (íàæàòèå íà êíîïêó ìûøè èëè ïåðåìåùåíèå; ñáðàñûâàåòñÿ ïðè ïðî÷òåíèè)
OnMouseMove(); OnMouseMove();
if (ms.lbclick == 1) if (ms.lbclick == 1)
{ {
OnLMBClick(); OnLMBClick();
} }
break; break;
default:
OnMouseMove();
break;
} }
if (kos_GetButtonID(btn_id)) OnExit(); if (kos_GetButtonID(btn_id)) OnExit();
DrawBombs(); DrawBombs();
@ -92,7 +90,7 @@ void kos_Main()
void DrawWindow() void DrawWindow()
{ {
kos_WindowRedrawStatus(1); 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_WindowRedrawStatus(2);
kos_WriteTextToWindow(8, 10, 0, TEXT_COLOR, "Population: %", 16); kos_WriteTextToWindow(8, 10, 0, TEXT_COLOR, "Population: %", 16);
@ -368,7 +366,6 @@ void OnStart()
rtlSrand(kos_GetTime()); rtlSrand(kos_GetTime());
DrawWindow(); DrawWindow();
kos_SetMaskForEvents(39);
} }
void OnExit() void OnExit()

View File

@ -0,0 +1,2 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("mp3info.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "mp3info")