diff --git a/programs/cmm/lib/file_system.h b/programs/cmm/lib/file_system.h index 7b1b0e147c..f6931d7697 100644 --- a/programs/cmm/lib/file_system.h +++ b/programs/cmm/lib/file_system.h @@ -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() diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 4a9dba6fa1..74eb3ad164 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -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 diff --git a/programs/cmm/lib/list_box.h b/programs/cmm/lib/list_box.h index daa3be3ba4..462fbb1e17 100644 --- a/programs/cmm/lib/list_box.h +++ b/programs/cmm/lib/list_box.h @@ -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; diff --git a/programs/cmm/lib/patterns/libimg_load_skin.h b/programs/cmm/lib/patterns/libimg_load_skin.h index eeda3d9613..546f2a9ee9 100644 --- a/programs/cmm/lib/patterns/libimg_load_skin.h +++ b/programs/cmm/lib/patterns/libimg_load_skin.h @@ -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];