Update fs.obj
git-svn-id: svn://kolibrios.org@5885 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ab10597e23
commit
9762f47f5e
@ -70,7 +70,7 @@ img_files = {
|
||||
{"SETTINGS/NETWORK.INI", build_type .. "/settings/network.ini"},
|
||||
{"NETWORK/FTPD.INI", "common/network/ftpd.ini"},
|
||||
{"NETWORK/USERS.INI", "common/network/users.ini"},
|
||||
{"KFVIEWER", "common/kfviewer"},
|
||||
{"FONT_VIEWER", "common/font_viewer"},
|
||||
}
|
||||
-- For russian build, add russian-only files.
|
||||
if build_type == "rus" then tup.append_table(img_files, {
|
||||
|
BIN
data/common/font_viewer
Normal file
BIN
data/common/font_viewer
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -15,7 +15,7 @@ exec=/sys/media/kiv
|
||||
icon=70
|
||||
|
||||
[FontViewer]
|
||||
exec=/sys/kfviewer
|
||||
exec=/sys/FONT_VIEWER
|
||||
|
||||
[Animage]
|
||||
exec=/sys/media/animage
|
||||
|
@ -35,7 +35,7 @@ void main()
|
||||
font_option.use_smooth = 1;
|
||||
font_option.bg_color = 0xDADADA;
|
||||
|
||||
strcpy(#title, "Kolibri font preview: ");
|
||||
strcpy(#title, "Font preview: ");
|
||||
strcat(#title, #param);
|
||||
font_title.prepare(5, 4, #title);
|
||||
loop()
|
||||
|
@ -6,7 +6,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_IO_H
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/obj/fs.h"
|
||||
#endif
|
||||
|
||||
:struct __OFFSET_FONT
|
||||
@ -306,12 +306,13 @@ inline fastcall dword b24(EBX) { return DSDWORD[EBX] << 8; }
|
||||
}
|
||||
:byte FONT::load(dword path)
|
||||
{
|
||||
lib_init_fs();
|
||||
buffer_size = 0;
|
||||
use_smooth = true;
|
||||
IF(data)free(data);
|
||||
IF(!io.read(path)) { debug("Error while loading font: "); debugln(path); return false; }
|
||||
begin = data = io.buffer_data;
|
||||
EBX = begin + io.FILES_SIZE;
|
||||
IF(!fs.read(path)) { debug("Error while loading font: "); debugln(path); return false; }
|
||||
begin = data = EAX;
|
||||
EBX = begin + ECX;
|
||||
$dec ebx
|
||||
height = DSBYTE[EBX];
|
||||
$dec ebx
|
||||
|
@ -15,6 +15,9 @@
|
||||
dword remove_pointer;
|
||||
byte remove(dword path);
|
||||
|
||||
dword read_pointer;
|
||||
dword read(dword path);
|
||||
|
||||
dword move_pointer;
|
||||
byte move(dword path1,path2);
|
||||
|
||||
@ -32,6 +35,13 @@
|
||||
return EAX;
|
||||
}
|
||||
|
||||
:dword FILE_SYSTEM_FUNCTION::read(dword path)
|
||||
{
|
||||
dword tmp = path;
|
||||
read_pointer stdcall(tmp);
|
||||
return EAX;
|
||||
}
|
||||
|
||||
:qword FILE_SYSTEM_FUNCTION::get_size(dword path)
|
||||
{
|
||||
dword tmp = path;
|
||||
@ -55,14 +65,17 @@
|
||||
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.copy_pointer = library.get("fs.copy");
|
||||
//alert(itoa(fs.get_size("/sys/")));
|
||||
fs.read_pointer = library.get("fs.read");
|
||||
__CHECK_FS__ = true;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user