mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-25 18:29:36 +03:00
c-- libraries update
git-svn-id: svn://kolibrios.org@3003 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1838b89b65
commit
41086737df
@ -115,7 +115,6 @@ inline fastcall ScancodesGeting(){
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
|
||||
inline fastcall word GetKey() //+Gluk fix
|
||||
{
|
||||
$push edx
|
||||
@ -212,12 +211,11 @@ inline fastcall int KillProcess( ECX)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
#define TURN_OFF 2
|
||||
#define REBOOT 3
|
||||
#define KERNEL 4
|
||||
inline fastcall int ExitSystem( ECX)
|
||||
{
|
||||
#define TURN_OFF 2
|
||||
#define REBOOT 3
|
||||
#define KERNEL 4
|
||||
|
||||
$mov eax, 18
|
||||
$mov ebx, 9
|
||||
$int 0x40
|
||||
@ -282,6 +280,12 @@ inline fastcall int TestBit( EAX, CL)
|
||||
$and eax,1
|
||||
}
|
||||
|
||||
inline fastcall int PlaySpeaker( ESI)
|
||||
{
|
||||
$mov eax, 55
|
||||
$mov ebx, 55
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -323,6 +327,15 @@ void WriteText(dword x,y,byte fontType, dword color, EDX, ESI)
|
||||
$int 0x40;
|
||||
}
|
||||
|
||||
void WriteNumber(dword x,y,byte fontType, dword color, count, ECX)
|
||||
{
|
||||
EAX = 47;
|
||||
EBX = count<<16;
|
||||
EDX = x<<16+y;
|
||||
ESI = fontType<<24+color;
|
||||
$int 0x40;
|
||||
}
|
||||
|
||||
void CopyScreen(dword EBX, x, y, sizeX, sizeY)
|
||||
{
|
||||
EAX = 36;
|
||||
|
@ -21,9 +21,11 @@
|
||||
|
||||
dword generator; // random number generator - äëÿ ãåíåðàöèè ñëó÷àéíûõ ÷èñåë
|
||||
|
||||
:int random(int max)
|
||||
inline fastcall int random( ECX)
|
||||
// get pseudo-random number - ïîëó÷èòü ïñåâäîñëó÷àéíîå ÷èñëî
|
||||
{
|
||||
$push ebx
|
||||
|
||||
$rdtsc // eax & edx
|
||||
$xor eax,edx
|
||||
$not eax
|
||||
@ -35,11 +37,12 @@ dword generator; // random number generator -
|
||||
generator = EBX;
|
||||
|
||||
EAX += EBX;
|
||||
EAX = EAX % max;
|
||||
return EAX;
|
||||
EAX = EAX % ECX;
|
||||
|
||||
$pop ebx
|
||||
}
|
||||
|
||||
:randomize()
|
||||
inline fastcall randomize()
|
||||
// initialize random number generator - èíèöèàëèçèðîâàòü ãåíåðàòîð ñëó÷àéíûõ ÷èñåë
|
||||
{
|
||||
asm
|
||||
|
@ -10,6 +10,7 @@
|
||||
// atoi( EAX)
|
||||
// strupr( ESI)
|
||||
// strlwr( ESI)
|
||||
// strttl( EDX)
|
||||
// strtok( ESI)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -47,6 +48,8 @@ L1:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
inline fastcall signed int strcmpi( ESI,EDI)
|
||||
@ -216,6 +219,22 @@ inline fastcall strlwr( ESI)
|
||||
}while(AL!=0);
|
||||
}
|
||||
|
||||
inline fastcall strttl( EDX)
|
||||
{
|
||||
AL=DSBYTE[EDX];
|
||||
IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f;
|
||||
IF (AL>=160) && (AL<=175) DSBYTE[EDX] = AL - 32; //à-ï
|
||||
IF (AL>=224) && (AL<=239) DSBYTE[EDX] = AL - 80; //à-ï
|
||||
do{
|
||||
EDX++;
|
||||
AL=DSBYTE[EDX];
|
||||
IF(AL>='A')&&(AL<='Z'){DSBYTE[EDX]=AL|0x20; CONTINUE;}
|
||||
IF(AL>='€')&&(AL<='<EFBFBD>')DSBYTE[EDX]=AL|0x20; // -¯
|
||||
IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï
|
||||
}while(AL!=0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline fastcall unsigned int strstr( EBX, EDX)
|
||||
{
|
||||
|
25
programs/network/htmlv/lib/truetype.h
Normal file
25
programs/network/htmlv/lib/truetype.h
Normal file
@ -0,0 +1,25 @@
|
||||
//ýòî âñòàâèòü ïîñëå çàãðóçêè îñíîâíûõ áèáëèîòåê
|
||||
|
||||
dword libtruetype = #att;
|
||||
|
||||
char att[] = "/sys/lib/truetype.obj"; //"truetype.obj\0";
|
||||
|
||||
dword truetype = #att_truetype;
|
||||
dword get_length = #att_get_length;
|
||||
dword get_width = #att_get_width;
|
||||
dword text_out = #att_text_out;
|
||||
|
||||
dword am3__ = 0x0;
|
||||
dword bm3__ = 0x0;
|
||||
|
||||
//import libimg , \
|
||||
|
||||
char att_truetype[] = "truetype";
|
||||
char att_get_length[] = "get_length";
|
||||
char att_get_width[] = "get_width";
|
||||
char att_text_out[] = "text_out";
|
||||
|
||||
//load_dll2(libtruetype, #truetype,0);
|
||||
|
||||
//à ýòî - â ìîìåíò îòðèñîâêè îêíà
|
||||
//text_out stdcall (#text, -1, 40, 0xFF0000, 100, 100);
|
@ -1,20 +0,0 @@
|
||||
//ýòî âñòàâèòü ïîñëå çàãðóçêè îñíîâíûõ áèáëèîòåê
|
||||
|
||||
dword libtruetype = #att;
|
||||
|
||||
char att[23] = "/sys/lib/truetype.obj\0"; //"truetype.obj\0";
|
||||
|
||||
|
||||
dword truetype = #att_truetype;
|
||||
dword get_length = #att_get_length;
|
||||
dword get_width = #att_get_width;
|
||||
dword text_out = #att_text_out;
|
||||
|
||||
dword am3__ = 0x0;
|
||||
dword bm3__ = 0x0;
|
||||
|
||||
|
||||
char att_truetype[10] = "truetype\0";
|
||||
char att_get_length[12] = "get_length\0";
|
||||
char att_get_width[11] = "get_width\0";
|
||||
char att_text_out[10] = "text_out\0";
|
Loading…
Reference in New Issue
Block a user