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