CMM libraries: fix list_box scroll down, some small changes for other

git-svn-id: svn://kolibrios.org@5421 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-02-18 19:52:40 +00:00
parent 116c711027
commit 7a9fbb1b26
4 changed files with 44 additions and 31 deletions

View File

@ -23,19 +23,6 @@ struct BDVK{
char name[518];
};
inline fastcall void SetCurDir( ECX)
{
$mov eax,30
$mov ebx,1
$int 0x40
}
inline fastcall void GetCurDir( ECX, EDX)
{
$mov eax,30
$mov ebx,2
$int 0x40
}
///////////////////////////
// Ïàðàìåòðû ôàéëà //
@ -227,9 +214,9 @@ enum
return error;
}
:void notify(dword notify_param)
:dword notify(dword notify_param)
{
RunProgram("@notify", notify_param);
return RunProgram("@notify", notify_param);
}
:dword abspath(dword relative_path) //GetAbsolutePathFromRelative()

View File

@ -240,6 +240,13 @@ inline fastcall void ActivateWindow( ECX)
$int 0x40
}
inline fastcall int MinimizeWindow()
{
EAX = 18;
EBX = 10;
$int 0x40
}
inline fastcall int CreateThread( ECX,EDX)
{
$mov eax,51
@ -324,6 +331,24 @@ inline fastcall int GetScreenHeight()
$and eax,0x0000FFFF
}
inline fastcall int GetClientTop()
{
$mov eax, 48
$mov ebx, 5
$int 0x40
$mov eax, ebx
$shr eax, 16
}
inline fastcall int GetClientHeight()
{
$mov eax, 48
$mov ebx, 5
$int 0x40
$mov eax, ebx
}
inline fastcall dword LoadLibrary( ECX)
{
$mov eax, 68

View File

@ -16,22 +16,22 @@ struct llist
int KeyEnd();
void SetSizes(int xx, yy, ww, hh, min_hh, line_hh);
int MouseScroll(dword scroll_state);
//void debug_values();
// void debug_values();
};
/*
void llist::debug_values()
{
debug("current: ");
debugi(current);
debug("first: ");
debugi(first);
debug("visible: ");
debugi(visible);
debug("count: ");
debugi(count);
}
*/
// void llist::debug_values()
// {
// debug("current: ");
// debugi(current);
// debug("first: ");
// debugi(first);
// debug("visible: ");
// debugi(visible);
// debug("count: ");
// debugi(count);
// }
void llist::ClearList()
@ -65,7 +65,8 @@ int llist::MouseScroll(dword scroll_state)
}
if (scroll_state == 1)
{
if (visible+first+3 >= count) first = count - visible; else first+=2;
if (visible + first == count) return 0;
if (visible+first+3 > count) first = count - visible; else first+=2;
return 1;
}
return 0;

View File

@ -6,7 +6,7 @@ struct libimg_image {
{
dword image_pointer;
image_pointer = load_image(file_path);
if (!image_pointer) notify("Error: Image not loaded");
if (!image_pointer) notify("'Error: Image not loaded' -E");
ESDWORD[struct_pointer] = image_pointer;
ESDWORD[struct_pointer+4] = DSWORD[image_pointer+4];
ESDWORD[struct_pointer+8] = DSWORD[image_pointer+8];