Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6020 → Rev 6021

/programs/cmm/lib/font.h
9,6 → 9,9
#include "../lib/obj/fs.h"
#endif
 
#include "../lib/patterns/rgb.h"
 
 
#define DEFAULT_FONT "/sys/fonts/Tahoma.kf"
 
:struct __SIZE
211,20 → 214,40
:void LABEL::apply_smooth()
{
dword i,line_w,to;
rgb.DwordToRgb(ShadowPixel(background,2)); //get shadowed pixel
line_w = size.width * 3;
to = size.height - 1 * line_w + raw - 3;
for(i=raw; i < to; i+=3)
{
if(i-raw%line_w +3 == line_w) continue;
// pixels position, where b - black, w - write
// bw
// wb
if(b24(i)==0x000000) && (b24(i+3)!=0x000000) && (b24(i+line_w)!=0x000000) && (b24(i+3+line_w)==0x000000)
{
ShadowImage(i+3, 1, 1, 2);
ShadowImage(i+line_w, 1, 1, 2);
ESBYTE[i+3] = rgb.b;
ESBYTE[i+4] = rgb.g;
ESBYTE[i+5] = rgb.r;
ESBYTE[i+line_w ] = rgb.b;
ESBYTE[i+line_w+1] = rgb.g;
ESBYTE[i+line_w+2] = rgb.r;
// // I don't know why but underneath code works slower then beneath
// DSDWORD[i] = DSDWORD[i] & 0xFF000000 | dark_background;
// DSDWORD[i+line_w] = DSDWORD[i+3+line_w] & 0xFF000000 | dark_background;
}
// wb
// bw
else if(b24(i)!=0x000000) && (b24(i+3)==0x000000) && (b24(i+line_w)==0x000000) && (b24(i+3+line_w)!=0x000000)
{
ShadowImage(i, 1, 1, 2);
ShadowImage(i+3+line_w, 1, 1, 2);
ESBYTE[i ] = rgb.b;
ESBYTE[i+1] = rgb.g;
ESBYTE[i+2] = rgb.r;
ESBYTE[i+line_w+3] = rgb.b;
ESBYTE[i+line_w+4] = rgb.g;
ESBYTE[i+line_w+5] = rgb.r;
// // I don't know why but underneath code works slower then beneath
// DSDWORD[i] = DSDWORD[i] & 0xFF000000 | dark_background;
// DSDWORD[i+3+line_w] = DSDWORD[i+3+line_w] & 0xFF000000 | dark_background;
}
}
}
281,9 → 304,11
IF(!text1)return;
IF(size.pt)IF(!changeSIZE())return;
if (size.pt != fontSizePoints) {
size.pt = fontSizePoints;
getsize(text1);
y -= size.offset_y;
}
color = _color;
background = _background;
 
/programs/cmm/lib/io.h
5,7 → 5,7
io.count(path) - êîëè÷åñòâî ôàéëîâ â äèððåêòîðèè path
io.size(path) - ðàçìåð (ôàéëà/ïàïêè) path
io.run(path,param) - çàïóñòèòü ôàéë path ñ ïàðàìåòðîì param
io.write(path,data) - çàïèñàòü ôàéë ñ äàííûìè data â äèððåêòîðèþ path
io.write(size,data,path) - çàïèñàòü ôàéë ñ äàííûìè data â äèððåêòîðèþ path
io.read(path) - ïðî÷èòàòü ôàéë path è âîçâðàòèòü óêàçàòåëü íà äàííûå
io.move(path1,path2) - ïåðåìåñòèòü (ôàéë/ïàïêó) èç path1 â path2
io.copy(path1,path2) - êîïèðîâàòü (ôàéë/ïàïêó) èç path1 â path2
/programs/cmm/lib/kolibri.h
1,4 → 1,5
//CODED by Veliant, Leency, Nable. GNU GPL licence.
//CODED by Veliant, Leency, Nable, Pavelyakov. GNU GPL licence.
 
#ifndef INCLUDE_KOLIBRI_H
#define INCLUDE_KOLIBRI_H
#print "[include <kolibri.h>]\n"
805,15 → 806,14
DOUBLE_CLICK_DELAY = GetMouseDoubleClickDelay();
__generator = GetStartTime();
$push ebx
$mov eax, 68
$mov ebx, 11
$int 0x40
mem_init();
$pop ebx
 
main();
ExitProcess();
}
______STOP______:
#endif
#endif
 
#ifndef INCLUDE_MEM_H
#include "../lib/mem.h"
#endif
/programs/cmm/lib/mem.h
21,6 → 21,7
{
$push ebx
$push ecx
 
$mov eax, 68
$mov ebx, 12
$mov ecx, size
36,6 → 37,7
$push ebx
$push ecx
$push edx
 
$mov eax, 68
$mov ebx, 20
$mov ecx, size
53,6 → 55,7
$push eax
$push ebx
$push ecx
$mov eax, 68
$mov ebx, 13
$mov ecx, mptr
/programs/cmm/lib/patterns/history.h
1,6 → 1,6
#include "..\lib\collection.h"
 
struct _History {
struct _history {
collection items;
int active;
int add();
7,9 → 7,9
int back();
int forward();
dword current();
} History;
} history;
 
int _History::add(dword in)
int _history::add(dword in)
{
if (!strcmp(in, items.get(active-1))) return 0;
items.count = active;
18,7 → 18,7
return 1;
}
int _History::back()
int _history::back()
{
if (active==1) return 0;
active--;
25,7 → 25,7
return 1;
}
 
int _History::forward()
int _history::forward()
{
if (active==items.count) return 0;
active++;
32,7 → 32,7
return 1;
}
 
dword _History::current()
dword _history::current()
{
return items.get(active-1);
}
/programs/cmm/lib/strings.h
506,7 → 506,7
searchin++;
if (DSBYTE[usestr_e]=='\0') return searchin;
}
return 0;
return -1;
}