From 0212e7a18edb35b3288fac9c4d2a447a1d411ba7 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 20 Aug 2015 10:06:51 +0000 Subject: [PATCH] Fix IO::readKPACK, font.h ability to load kpacked fonts, Eolite fix git-svn-id: svn://kolibrios.org@5751 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/include/icons.h | 5 ++--- programs/cmm/eolite/include/translations.h | 4 ++-- programs/cmm/lib/font.h | 2 +- programs/cmm/lib/io.h | 23 +++++++++++----------- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/programs/cmm/eolite/include/icons.h b/programs/cmm/eolite/include/icons.h index 3b048cb888..6dceacbd39 100644 --- a/programs/cmm/eolite/include/icons.h +++ b/programs/cmm/eolite/include/icons.h @@ -29,7 +29,7 @@ char *ext[]={ void Put_icon(dword extension, xx, yy, fairing_color, icon_n) { - int i, font_half_height; + int i; if (extension) for (i=0; ext[i]!=0; i+=2;) { @@ -43,8 +43,7 @@ void Put_icon(dword extension, xx, yy, fairing_color, icon_n) ficons_pal[0] = fairing_color; PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal); if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color); - if (font_size==9) font_half_height=0; else font_half_height=4; - if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+files.x+files.w-103,yy+font_half_height,files.font_type,0,extension); + if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+files.x+files.w-103,yy+4,files.font_type,0,extension); } diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 907bc72e8a..b78e49f950 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager v3.06" -#define ABOUT_TITLE "Eolite 3.06" +#define TITLE "Eolite File Manager v3.08" +#define ABOUT_TITLE "Eolite 3.08" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/lib/font.h b/programs/cmm/lib/font.h index 5d98b5641f..dbd9bc04c1 100644 --- a/programs/cmm/lib/font.h +++ b/programs/cmm/lib/font.h @@ -212,7 +212,7 @@ FONT font = 0; dword tmp; buffer_size = 0; IF(data)free(data); - if (io.read(path)!=0) + if (!io.readKPACK(path)) { debug("Error while loading font: "); debugln(path); diff --git a/programs/cmm/lib/io.h b/programs/cmm/lib/io.h index bc630c76f6..fa29fd82c1 100644 --- a/programs/cmm/lib/io.h +++ b/programs/cmm/lib/io.h @@ -286,16 +286,6 @@ __FILE file; ____BDVK BDVK; }io; -:dword IO::readKPACK(dword path1) -{ - dword sizes; - EAX = 68; - EBX = 27; - ECX = path.path(path1); - EDX = sizes; - $int 0x40; - return EAX; -} :byte __ConvertSize_size_prefix[8]; :dword IO::convert_size() { @@ -310,7 +300,16 @@ sprintf(#__ConvertSize_size_prefix,"%d %s",bytes,#size_nm); return #__ConvertSize_size_prefix; } - +:dword IO::readKPACK(dword path1) +{ + EAX = 68; + EBX = 27; + ECX = path1; + $int 0x40; + FILES_SIZE = EDX; + buffer_data = EAX; + return buffer_data; +} :int IO::write(dword PATH,data) { file.write(0,strlen(data),data,PATH); @@ -324,7 +323,7 @@ buffer_data = malloc(FILES_SIZE+1); result = file.read(0,FILES_SIZE,buffer_data,PATH); if (result!=0) buffer_data = free(buffer_data); //file read failed - return result; + return buffer_data; } :signed int IO::run(dword rpath,rparam)