#ifdef LANG_RUS ?define T_DEVICES "Устройства" ?define T_ACTIONS "Действия" char *actions[] = { 59, "Новый файл", "F9", 57, "Новая папка", "F7", 60, "Настройки", "F10", 0,0,0 }; ?define T_PROG "Программы " ?define T_SYS "Система " ?define T_UNC "Неизвестно " ?define T_CD "CD-ROM " ?define T_FD "Дискета " ?define T_HD "Жесткий диск " ?define T_SATA "SATA диск " ?define T_USB "USB диск " ?define T_RAM "RAM диск " #else ?define T_DEVICES "Devices" ?define T_ACTIONS "Actions" char *actions[] = { 59, "New file", "F9", 57, "New folder", "F7", 60, "Settings", "F10", 0,0,0 }; ?define T_PROG "Programs " ?define T_SYS "System " ?define T_UNC "Unknown " ?define T_CD "CD-ROM " ?define T_FD "Floppy disk " ?define T_HD "Hard disk " ?define T_SATA "SATA disk " ?define T_USB "USB disk " ?define T_RAM "RAM disk " #endif struct _SystemDiscs { collection list; int dev_num; void Get(); void Draw(); void DrawSelect(); void DrawOptions(); void Click(); } SystemDiscs=0; #define DEV_H 17 #define DEV_H_HOR 20 void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name) { switch(disk_first_letter) { case 'r': ESBYTE[dev_icon]=0; strcpy(disc_name, T_SYS); break; case 'k': ESBYTE[dev_icon]=1; strcpy(disc_name, T_PROG); break; case 'f': ESBYTE[dev_icon]=2; strcpy(disc_name, T_FD); break; case 'c': ESBYTE[dev_icon]=3; strcpy(disc_name, T_CD); break; case 'h': case 'b': ESBYTE[dev_icon]=4; strcpy(disc_name, T_HD); break; case 's': ESBYTE[dev_icon]=4; strcpy(disc_name, T_SATA); break; case 't': ESBYTE[dev_icon]=5; strcpy(disc_name, T_RAM); break; case 'u': ESBYTE[dev_icon]=6; strcpy(disc_name, T_USB); break; default: ESBYTE[dev_icon]=5; } } void _SystemDiscs::Get() { bool kolibrios_exists=false; char dev_name[10], sys_discs[10]; int i1, j1, dev_num_i, dev_disc_num; dword devbuf; list.drop(); devbuf = malloc(10000); ReadDir(19, devbuf, "/"); dev_num = dev_num_i = EBX; for (i1=0; i1