Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6742 → Rev 6738

/programs/cmm/lib/kolibri.h
66,8 → 66,6
#include "../lib/mouse.h"
#include "../lib/keyboard.h"
 
:dword calc(EAX) { return EAX; }
 
:struct raw_image {
dword w, h, data;
};
331,7 → 329,7
 
//------------------------------------------------------------------------------
 
:void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, bgcolor, title)
void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, EDI, ESI)
{
EAX = 12; // function 12:tell os about windowdraw
EBX = 1;
340,12 → 338,10
$xor EAX,EAX
EBX = x << 16 + size_w;
ECX = y << 16 + size_h;
 
EDX = WindowType << 24 | WindowAreaColor;
EDI = bgcolor;
ESI = title;
$int 0x40
 
 
EAX = 12; // function 12:tell os about windowdraw
EBX = 2;
$int 0x40
385,17 → 381,15
$int 0x40;
}
 
:dword WriteBufText(dword x,y,byte fontType, dword color, str_offset, buf_offset)
dword WriteBufText(dword x,y,byte fontType, dword color, EDX, EDI)
{
EAX = 4;
EBX = x<<16+y;
ECX = fontType<<24+color;
EDX = str_offset;
EDI = buf_offset;
$int 0x40;
}
 
:void WriteNumber(dword x,y,byte fontType, dword color, count, number_or_offset)
void WriteNumber(dword x,y,byte fontType, dword color, count, number_or_offset)
{
EAX = 47;
EBX = count<<16;
445,13 → 439,12
$int 0x40
}
 
:void DrawBar(dword x,y,w,h,color)
void DrawBar(dword x,y,w,h,EDX)
{
if (h<=0) || (h>60000) || (w<=0) || (w>60000) return; //bad boy :)
EAX = 13;
EBX = x<<16+w;
ECX = y<<16+h;
EDX = color;
$int 0x40
}
 
480,13 → 473,11
$int 0x40
}
 
:void UnsafeDefineButton(dword x,y,w,h,id,color)
void UnsafeDefineButton(dword x,y,w,h,EDX,ESI)
{
EAX = 8;
EBX = x<<16+w;
ECX = y<<16+h;
EDX = id;
ESI = color;
$int 0x40
}
 
617,6 → 608,7
screen.width = GetScreenWidth();
screen.height = GetScreenHeight();
//program_path_length = strlen(I_Path);
DOUBLE_CLICK_DELAY = GetMouseDoubleClickDelay();
__generator = GetStartTime();
/programs/cmm/lib/keyboard.h
50,6 → 50,8
#define KEY_LWIN 01000000000b
#define KEY_RWIN 10000000000b
 
dword calc(EAX) { return EAX; }
 
inline fastcall word GetKey() //+Gluk fix
{
$push edx
/programs/cmm/lib/strings.h
356,7 → 356,7
}
}
 
:void strncat(dword text1, text2, signed len)
void strncat(dword text1, text2, signed len)
signed o1,o2;
char s;
{
413,13 → 413,13
}
 
 
inline fastcall unsigned int chrnum( ESI, BL)
int chrnum(dword searchin, char symbol)
{
int num = 0;
while(DSBYTE[ESI])
while(DSBYTE[searchin])
{
if (DSBYTE[ESI] == BL) num++;
ESI++;
if (DSBYTE[searchin] == symbol) num++;
searchin++;
}
return num;
}