12,7 → 12,6 |
dword I_Param = #param; |
dword I_Icon = 0x0; |
dword skin_width; |
|
char param[256]=""; |
|
//Events |
121,10 → 120,11 |
$int 0x40 |
} |
|
inline fastcall void ExitProcess(){ |
EAX = -1; // close this program |
/*inline fastcall void SetEventMask(dword EBX){ |
$mov eax,40 |
//$mov ebx,100111b |
$int 0x40 |
} |
}*/ |
|
inline fastcall word GetKey(){ |
EAX = 2; // just read this key from buffer |
138,41 → 138,102 |
EAX = EAX >> 8; |
} |
|
inline fastcall void ExitProcess(){ |
EAX = -1; // close this program |
$int 0x40 |
} |
|
inline fastcall void DrawTitle(dword ECX) |
/*void Pause(dword EBX) |
{ // 㧠, ¢ á®âëå ¤®«ïå ᥪã¤ë EBX = value |
$mov eax, 5 |
$int 0x40 |
}*/ |
|
//------------------------------------------------------------------------------ |
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword |
mainAreaColor,byte headerType,dword headerColor,EDI) |
{ |
EBX = x << 16 + sizeX; |
ECX = y << 16 + sizeY; |
EDX = mainAreaType << 24 | mainAreaColor; |
ESI = headerType << 24 | headerColor; |
$xor eax,eax |
$int 0x40 |
} |
|
inline fastcall void DrawTitle(dword ECX){ |
EAX = 71; |
EBX = 1; |
$int 0x40; |
} |
|
inline fastcall dword GetSkinWidth() |
{ |
|
inline fastcall void WindowRedrawStatus(dword EBX){ |
EAX = 12; //tell os about windowdraw |
$int 0x40 |
} |
|
inline fastcall dword GetSkinWidth(){ |
EAX = 48; |
EBX = 4; |
$int 0x40 |
} |
|
|
inline fastcall void DeleteButton(dword EDX) |
{ |
EAX = 8; |
EDX = EDX + BT_DEL; |
$int 0x40; |
inline fastcall dword MoveSize(dword EBX,ECX,EDX,ESI){ |
EAX = 67; |
$int 0x40 |
} |
|
//------------------------------------------------------------------------------ |
|
inline fastcall dword strlen(dword EDI) |
{ |
#speed |
inline fastcall dword strlen(dword EDI){ |
ECX=EAX=0; |
ECX--; |
$REPNE $SCASB |
EAX=EAX-2-ECX; |
#codesize |
EAX-=2+ECX; |
} |
|
|
inline fastcall copystr(dword ESI,EDI) |
{ |
$cld |
l1: |
$lodsb |
$stosb |
$test al,al |
$jnz l1 |
} |
|
|
char buffer[11]=""; |
inline fastcall dword IntToStr(dword ESI) |
{ |
$mov edi, #buffer |
$mov ecx, 10 |
$test esi, esi |
$jns f1 |
$mov al, '-' |
$stosb |
$neg esi |
f1: |
$mov eax, esi |
$push -'0' |
f2: |
$xor edx, edx |
$div ecx |
$push edx |
$test eax, eax |
$jnz f2 |
f3: |
$pop eax |
$add al, '0' |
$stosb |
$jnz f3 |
$mov eax, #buffer |
$ret |
} |
|
|
inline fastcall int strcmp(dword EAX,EBX) |
{ |
#speed |
206,38 → 267,25 |
#codesize |
} |
|
|
inline fastcall void WindowRedrawStatus(dword EBX) |
{ |
EAX = 12; // function 12:tell os about windowdraw |
//------------------------------------------------------------------------------ |
inline fastcall void PutPixel(dword EBX,ECX,EDX){ |
EAX=1; |
ECX+=skin_width; |
$int 0x40 |
} |
|
|
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI) |
{ |
EBX = x << 16 + sizeX; |
ECX = y << 16 + sizeY; |
EDX = mainAreaType << 24 | mainAreaColour; |
ESI = headerType << 24 | headerColour; |
$xor eax,eax |
void DefineButton(dword x,y,w,h,EDX,ESI){ |
EAX = 8; |
EBX = x<<16+w; |
ECX = skin_width+y<<16+h; |
$int 0x40 |
} |
|
|
inline fastcall void SetEventMask(dword EBX,ECX,EDX) //Coded by Leency :D |
inline fastcall void DeleteButton(dword EDX) |
{ |
$mov eax,40 |
$mov ebx,100111b |
$int 0x40 |
} |
|
void DefineButton(dword x,y,w,h,EDX,ESI) |
{ |
EAX = 8; |
EBX = x<<16+w; |
ECX = skin_width+y<<16+h; |
$int 0x40 |
EDX += BT_DEL; |
$int 0x40; |
} |
|
void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
248,12 → 296,6 |
$int 0x40; |
} |
|
inline fastcall void PutPixel(dword EBX,ECX,EDX) |
{ |
EAX=1; |
$int 0x40 |
} |
|
void DrawBar(dword x,y,w,h,EDX) |
{ |
#speed |
280,11 → 322,10 |
DrawBar(x+1,y+1,1,height-1,0xFFFFFF); //¯®«®á ¢¥à¢ ¡¥« ¯ |
DrawBar(x+width-1,y+2,1,height-2,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,y,width,height,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) |
{ |
EAX = 7; |
293,56 → 334,17 |
$int 0x40 |
} |
|
|
void copystr(dword s,d) |
void PutPaletteImage(dword EBX,w,h,x,y, EDI) |
{ |
$mov esi,s |
$mov edi,d |
$cld |
l1: |
$lodsb |
$stosb |
$test al,al |
$jnz l1 |
} |
|
|
int j=0; |
char buffer[11]=""; |
inline fastcall dword IntToStr(dword ESI) |
{ |
$mov edi, #buffer |
$mov ecx, 10 |
$test esi, esi |
$jns f1 |
$mov al, '-' |
$stosb |
$neg esi |
f1: |
$mov eax, esi |
$push -'0' |
f2: |
$xor edx, edx |
$div ecx |
$push edx |
$test eax, eax |
$jnz f2 |
f3: |
$pop eax |
$add al, '0' |
$stosb |
$jnz f3 |
$mov eax, #buffer |
$ret |
} |
|
|
inline fastcall dword MoveSize(dword EBX,ECX,EDX,ESI) |
{ |
EAX = 67; |
EAX = 65; |
ECX = w<<16+h; |
EDX = x<<16+y+skin_width; |
ESI = 8; |
EBP = 0; |
$int 0x40 |
} |
|
//------------------------------------------------------------------------------ |
|
f70 CopyFile_f; |
BDVK CopyFile_atr; |
360,7 → 362,7 |
$mov ebx, #CopyFile_f |
$int 0x40 |
|
if (EAX == 0) |
if (!EAX) |
{ |
cBufer = malloc(CopyFile_atr.sizelo); |
CopyFile_f.func = 0; |
374,7 → 376,7 |
$mov ebx, #CopyFile_f |
$int 0x40 |
|
IF (EAX == 0) |
IF (!EAX) |
{ |
CopyFile_f.func = 2; |
CopyFile_f.param1 = 0; |