From 9883b8911deaf02bbc61f48314f53cf0fc7c218d Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 4 Dec 2016 19:30:30 +0000 Subject: [PATCH] forget fs.obj git-svn-id: svn://kolibrios.org@6784 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 1 - data/common/lib/fs.obj | Bin 4511 -> 0 bytes programs/cmm/lib/font.h | 28 ++++---- programs/cmm/lib/obj/fs.h | 141 -------------------------------------- 4 files changed, 13 insertions(+), 157 deletions(-) delete mode 100644 data/common/lib/fs.obj delete mode 100644 programs/cmm/lib/obj/fs.h diff --git a/data/Tupfile.lua b/data/Tupfile.lua index da3bd4b8dd..ea0052ad50 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -58,7 +58,6 @@ img_files = { {"File Managers/ICONS.INI", "common/File Managers/icons.ini"}, {"File Managers/KFM.INI", "common/File Managers/kfm.ini"}, {"LIB/PIXLIB.OBJ", "common/lib/pixlib.obj"}, - {"LIB/FS.OBJ", "common/lib/fs.obj"}, {"LIB/ARRAY.OBJ", "common/lib/array.obj"}, {"LIB/LIBRARY.OBJ", "common/lib/library.obj"}, {"LIB/ICONV.OBJ", "common/lib/iconv.obj"}, diff --git a/data/common/lib/fs.obj b/data/common/lib/fs.obj deleted file mode 100644 index f1cac432499dc53ea4efef3e02f04be497ff6646..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4511 zcmV;Q5n%31P(w>lH~;`a0002rJOC!v=i-5PF*oCcDQQm3y~5Y$Jo)A;{ldI*P9sUo zOUyb|v{%46eZY2QK>jNWOl)WtN-E^x8)P5v^Pqb}ekze%-?-eW<%xlJ1UU;i&X*4aHhduDGd+>-fvG z-emAjlHesvJA-XG$!+vF4pY-N_PiE!Iju_DGexd?xZW1-6L-+n(!YXdWjCaU zq$<&MGaFZJO@HA|`hn&c-)r^Il?X!BX7@-Wy3sLcf-Ccd4@kjuvYX8)13r3R3n~OH z_YMd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dNDlHg76QrXuu1z^2rK>^zoN}kI8o~9e@W;=w;HIvSW9*ye zgBov$R7$q9@=V%f>p6wvr$hv#^j#Ltmh926Hbu&xFMKGE$oD!FPG6gyeFpd|u-ja+ zQh_`-9;1lgCk$q*jt>|OIamh_@lyPcu*6aC|5Q+wXlMlJY3Q+a<9`N%ptxvnX5`z7 zPOdF%DsdQUvdU6^`%ff~H=RhnHvRQB%hYc^I$&(!@y^d)YBL24tIyO5PApA9pX?Fc zYCI!LRU|(yr^kB;GCxnwFU|B^00l;~D|%oFSQKxkLmmz5*67f*YmnyH2k9jf;O49# zhnH8@9h$q~WZP5A2y2pImsgnxZ(vfy!v+ig)Oo{ibR!99gC3r8yZy#Z_-S|i=(&)rI2BJW4xvc#mnles&cNA zy-I~KYU=9t*?z`@>ZWNJMno9k%0F&Blz+jA*lHL^<-l=eEiX|QKxGB`(h~DwM4~am zc4%NiqXo<;kyAFJ;SL)atk5^r{4OnaLKZ|G>tqx6Jb1J?cJXuL-|xexGmD}Mcs_DL zY)%ps`{qxDLVUR3qXLoWYZuguf$gzP3xoKZPz&qM$VCh!QiR|+Ntb87PG^f=BnA@4 zdD2Yc2dVF#q7#U93#S!=Yn{41I1MATWV<+_&8Yy8l4ZhOGWjqpmY+r9&r|-s1Qv(m z;kUz;RdsghquNk74kk#inw&zv;yb?Yf1Z#!qrEkuPooIhOVpevE2SDAe^7zJ*2SB+ xcyHcB#kfkMLwNs6*52>o6xKy>Hl0Wl>H`e~jBeXt+M2qEk}`Jy0KWhL000I*%q0K- diff --git a/programs/cmm/lib/font.h b/programs/cmm/lib/font.h index a0f54d1c65..9acf9e1c95 100644 --- a/programs/cmm/lib/font.h +++ b/programs/cmm/lib/font.h @@ -5,8 +5,8 @@ #include "../lib/math.h" #endif -#ifndef INCLUDE_FS_H -#include "../lib/obj/fs.h" +#ifndef INCLUDE_IO_H +#include "../lib/io.h" #endif #include "../lib/patterns/rgb.h" @@ -180,27 +180,25 @@ byte Cp866ToAnsi(byte s) { ELSE IF(s>=224)&&(s<=239)s+=16; ELSE IF(s==241)s=184; //e rus with dots (yo) ELSE IF(s==240)s=168; //E rus with dots (yo) - ELSE IF(s==242)s='E'; //E urk (ye) - ELSE IF(s==243)s=186; //e urk (ye) - ELSE IF(s==244)s='I'; //I urk (yi) - ELSE IF(s==245)s=191; //i urk (yi) + ELSE IF(s==242)s='E'; //E ukr (ye) + ELSE IF(s==243)s=186; //e ukr (ye) + ELSE IF(s==244)s='I'; //I ukr (yi) + ELSE IF(s==245)s=191; //i ukr (yi) return s; } :byte LABEL::init(dword font_path) { - lib_init_fs(); + IO label_io; IF(font)free(font); - IF(!fs.read(font_path)) { - debug("Error while loading font: "); - debugln(font_path); - //io.run("/sys/@notify","'Error: Font is not loaded.' -E"); + label_io.read(font_path); + IF(!EAX) { + notify("'Error: KFONT is not loaded.' -E"); return false; } - font_begin = font = EAX; - EBX = font_begin + ECX; - height = DSBYTE[EBX-1]; - width = DSBYTE[EBX-2]; + font_begin = font = label_io.buffer_data; + height = DSBYTE[calc(font_begin+label_io.FILES_SIZE)-1]; + width = DSBYTE[calc(font_begin+label_io.FILES_SIZE)-2]; block = math.ceil(height*width/32); smooth = true; return true; diff --git a/programs/cmm/lib/obj/fs.h b/programs/cmm/lib/obj/fs.h deleted file mode 100644 index 34b7dc023f..0000000000 --- a/programs/cmm/lib/obj/fs.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef INCLUDE_LIBFS_H -#define INCLUDE_LIBFS_H -#print "[include ]\n" - -#ifndef INCLUDE_KOLIBRI_H -#include "../lib/kolibri.h" -#endif - -#ifndef INCLUDE_DLL_H -#include "../lib/dll.h" -#endif - -:struct FILE_SYSTEM_FUNCTION -{ - dword remove_pointer; - byte remove(dword path); - - dword open_pointer; - dword open(dword path); - - dword read_pointer; - dword read(dword path); - - dword run_pointer; - dword run(dword path,arg); - - dword move_pointer; - byte move(dword path1,path2); - - dword copy_pointer; - byte copy(dword path1,path2); - - dword write_pointer; - byte write(dword path1,path2,path3); - - dword get_size_pointer; - qword get_size(dword path); - - dword callback_copy_pointer; - byte callback_copy(dword path1,path2,ptr); -} fs; - -:byte FILE_SYSTEM_FUNCTION::remove(dword path) -{ - dword tmp = path; - lib_init_fs(); - remove_pointer stdcall(tmp); - return EAX; -} - -:dword FILE_SYSTEM_FUNCTION::read(dword path) -{ - dword tmp = path; - lib_init_fs(); - read_pointer stdcall(tmp); - return EAX; -} - -:byte FILE_SYSTEM_FUNCTION::write(dword path1,path2,path3) -{ - dword tmp1 = path1; - dword tmp2 = path2; - dword tmp3 = path3; - lib_init_fs(); - write_pointer stdcall(tmp1,tmp2,tmp3); - return EAX; -} - -:dword FILE_SYSTEM_FUNCTION::run(dword path,arg) -{ - dword tmp1 = path1; - dword tmp2 = arg; - lib_init_fs(); - run_pointer stdcall(tmp1,tmp2); - return EAX; -} - -:qword FILE_SYSTEM_FUNCTION::get_size(dword path) -{ - dword tmp = path; - lib_init_fs(); - //get_size_pointer stdcall(tmp); - $push tmp - $call get_size_pointer - $add esi,4 -} - -:dword FILE_SYSTEM_FUNCTION::open(dword path) -{ - dword tmp = path; - lib_init_fs(); - open_pointer stdcall(tmp); - return EAX; -} - -:byte FILE_SYSTEM_FUNCTION::move(dword path1,path2) -{ - dword tmp1 = path1; - dword tmp2 = path2; - lib_init_fs(); - move_pointer stdcall(tmp1,tmp2); - return EAX; -} - -:byte FILE_SYSTEM_FUNCTION::copy(dword path1,path2) -{ - dword tmp1 = path1; - dword tmp2 = path2; - lib_init_fs(); - copy_pointer stdcall(tmp1,tmp2); - return EAX; -} - -:byte FILE_SYSTEM_FUNCTION::callback_copy(dword path1,path2,ptr) -{ - dword tmp1 = path1; - dword tmp2 = path2; - lib_init_fs(); - callback_copy_pointer stdcall(tmp1,tmp2,ptr); - return EAX; -} - - -:byte __CHECK_FS__ = 0; -:void lib_init_fs() -{ - IF(__CHECK_FS__)return; - library.load("/sys/LIB/FS.OBJ"); - fs.remove_pointer = library.get("fs.remove"); - fs.get_size_pointer = library.get("fs.get_size"); - fs.move_pointer = library.get("fs.move"); - fs.open_pointer = library.get("fs.open"); - fs.copy_pointer = library.get("fs.copy"); - fs.read_pointer = library.get("fs.read"); - fs.run_pointer = library.get("fs.execute"); - fs.write_pointer = library.get("fs.write"); - fs.callback_copy_pointer = library.get("fs.callback_copy"); - __CHECK_FS__ = true; -} - -#endif \ No newline at end of file