mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-23 17:29:37 +03:00
mp3info: autobuild, add to IMG
git-svn-id: svn://kolibrios.org@7484 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
31a514faf0
commit
91939fc341
@ -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"},
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
2
programs/media/mp3info/Tupfile.lua
Normal file
2
programs/media/mp3info/Tupfile.lua
Normal 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")
|
Loading…
Reference in New Issue
Block a user