Subversion Repositories Kolibri OS

Rev

Rev 5884 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5884 Rev 5885
Line 4... Line 4...
4
#ifndef INCLUDE_MATH_H
4
#ifndef INCLUDE_MATH_H
5
#include "../lib/math.h"
5
#include "../lib/math.h"
6
#endif
6
#endif
Line 7... Line 7...
7
 
7
 
8
#ifndef INCLUDE_IO_H
8
#ifndef INCLUDE_IO_H
9
#include "../lib/io.h"
9
#include "../lib/obj/fs.h"
Line 10... Line 10...
10
#endif
10
#endif
11
 
11
 
12
:struct __OFFSET_FONT
12
:struct __OFFSET_FONT
Line 304... Line 304...
304
        }
304
        }
305
        return rw;
305
        return rw;
306
}
306
}
307
:byte FONT::load(dword path)
307
:byte FONT::load(dword path)
308
{
308
{
-
 
309
	lib_init_fs();
309
	buffer_size = 0;
310
	buffer_size = 0;
310
	use_smooth = true;
311
	use_smooth = true;
311
	IF(data)free(data);
312
	IF(data)free(data);
312
	IF(!io.read(path)) { debug("Error while loading font: "); debugln(path); return false; }
313
	IF(!fs.read(path)) { debug("Error while loading font: "); debugln(path); return false; }
313
	begin = data = io.buffer_data;
314
	begin = data = EAX;
314
	EBX = begin + io.FILES_SIZE;
315
	EBX = begin + ECX;
315
	$dec ebx
316
	$dec ebx
316
	height = DSBYTE[EBX];
317
	height = DSBYTE[EBX];
317
	$dec ebx
318
	$dec ebx
318
	width = DSBYTE[EBX];
319
	width = DSBYTE[EBX];
319
	block = math.ceil(height*width/32);
320
	block = math.ceil(height*width/32);