Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2133 → Rev 2134

/programs/fs/Eolite/trunk/lib/kolibri.h--
33,10 → 33,16
 
 
struct mouse{
int x,y,lkm,pkm,hor,vert;
unsigned int x,y,lkm,pkm,hor,vert;
void get();
};
 
int TestBit(EAX, CL)
{
$shr eax,cl
$and eax,1
}
 
void mouse::get()
{
EAX = 37;
47,6 → 53,7
$and ebx,0x0000FFFF
x = EAX;
y = EBX;
EAX = 37;
EBX = 2;
$int 0x40
56,7 → 63,8
$and ebx, 0x00000001
lkm = EAX;
pkm = EBX;
EAX = 37; //áªà®««
EAX = 37; //scroll
EBX = 7;
$int 0x40
$mov ebx, eax
81,12 → 89,26
#define SelfInfo -1
};
 
void proc_info::GetInfo(dword ECX)
void proc_info::GetInfo(dword EBX, ECX)
{
EAX = 9;
EBX = #use_cpu;
$int 0x40
}
 
int GetSlot(dword ECX)
{
EAX = 18;
EBX = 21;
$int 0x40
}
 
int ActiveProcess()
{
EAX = 18;
EBX = 7;
$int 0x40
}
 
//-------------------------------------------------------------------------------
 
inline fastcall dword WaitEvent(){
100,9 → 122,20
$int 0x40
}
 
inline fastcall word GetKey(){
EAX = 2; // just read this key from buffer
inline fastcall word GetKey(){ //Gluk fix
$push edx
@getkey:
$mov eax,2
$int 0x40
$cmp eax,1
$jne getkeyi
$mov ah,dh
$jmp getkeyii //jz?
@getkeyi:
$mov dh,ah
$jmp getkey
@getkeyii:
$pop edx
EAX = EAX >> 8;
}
 
149,7 → 182,7
 
 
inline fastcall void WindowRedrawStatus(dword EBX){
EAX = 12; //tell os about windowdraw
EAX = 12;
$int 0x40
}
 
188,13 → 221,6
$jnz l1
}
 
byte fastcall TestBit(EAX, CL)
{
$shr eax,cl
$and eax,1
}
 
 
char buffer[11]="";
inline fastcall dword IntToStr(dword ESI)
{
223,23 → 249,6
$ret
}
 
 
dword StrToCol(char* htmlcolor)
{
dword j=1, color=0; char ch=0x00;
IF (ESBYTE[htmlcolor]<>'#') RETURN;
FOR (;j<7;j++)
{
ch=ESBYTE[htmlcolor+j];
IF ((ch>='0') && (ch<='9')) ch -= '0';
IF ((ch>='A') && (ch<='F')) ch -= 'A'-10;
IF ((ch>='a') && (ch<='f')) ch -= 'a'-10;
color = color*0x10 + ch;
}
EAX=color;
}
 
 
inline fastcall int strcmp(ESI, EDI)
{
loop()
332,30 → 341,30
DrawRegion_3D(x,y,width,height,0x94AECE,0x94AECE);
DrawRegion_3D(x+1,y+1,width-2,height-2,0xFFFFFF,0xC7C7C7);
DrawBar(x+2,y+2,width-3,height-3,color); //§ «¨¢ª 
IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //ª­®¯ª 
IF (id<>0) DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF); //ª­®¯ª 
WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0);
}
 
void PutImage(dword EBX,w,h,x,y)
void PutPaletteImage(dword EBX,w,h,x,y, EDI)
{
EAX = 7;
EAX = 65;
ECX = w<<16+h;
EDX = x<<16+y;
ESI = 8;
EBP = 0;
$int 0x40
}
 
void PutPaletteImage(dword EBX,w,h,x,y, EDI)
void PutImage(dword EBX,w,h,x,y)
{
EAX = 65;
EAX = 7;
ECX = w<<16+h;
EDX = x<<16+y;
ESI = 8;
EBP = 0;
$int 0x40
}
 
//------------------------------------------------------------------------------
void WriteDebug(dword EDX)
/*void WriteDebug(dword EDX)
{
$mov eax, 63
$mov ebx, 1
372,3 → 381,23
$mov cl, 10
$int 0x40
}
 
inline fastcall void WriteFullDebug(dword ESI)
{
WriteDebug("");
WriteDebug(ESI);
WriteDebug("Number of files:");
WriteDebug(IntToStr(count));
WriteDebug("but_num:");
WriteDebug(IntToStr(but_num));
WriteDebug("curbtn");
WriteDebug(IntToStr(curbtn));
WriteDebug("ra_kadrom:");
WriteDebug(IntToStr(za_kadrom));
Pause(200);
}*/