From 393ef14fe3b6b1df7c6d6d20e4872b8e77bb5ec9 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 18 Aug 2011 13:58:49 +0000 Subject: [PATCH] Just Clicks v0.8: window rolling up bug fixed (finded by Mario) git-svn-id: svn://kolibrios.org@2056 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/games/clicks/trunk/History.txt | 7 ++++ programs/games/clicks/trunk/clicks.c-- | 18 ++++++---- programs/games/clicks/trunk/lib/kolibri.h-- | 40 +++++++++++++++++---- 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/programs/games/clicks/trunk/History.txt b/programs/games/clicks/trunk/History.txt index a67efecc03..048e6259e0 100644 --- a/programs/games/clicks/trunk/History.txt +++ b/programs/games/clicks/trunk/History.txt @@ -4,6 +4,13 @@ Just Clicks Copyright (C) 2008-2009 Leency История версий: +Just Clicks v0.8 (18.08.2011) +- убран мусор после схлопывания окна (нашёл Mario) + +Just Clicks v0.79 (27.01.2011) от clevermouse +- мультиязычность при сборке +- компилирование программы последней версией компилятора + Just Clicks v0.77 (08.09.2009) - существенно уменьшено потребляемое программой количество памяти - кнопки под стиль системы diff --git a/programs/games/clicks/trunk/clicks.c-- b/programs/games/clicks/trunk/clicks.c-- index 3784e58e16..ffab22837d 100644 --- a/programs/games/clicks/trunk/clicks.c-- +++ b/programs/games/clicks/trunk/clicks.c-- @@ -1,9 +1,12 @@ /* -Just Clicks v0.76 -Copyright (C) 2008 Leency +Just Clicks v0.8 +Copyright (C) 2011 Leency + +Just Clicks v0.79 +Copyright (C) 2011 clevermouse + Clickomania v0.3 Copyright (C) 2005 Ђ«ҐЄб ­¤а ЊгиЁЄ®ў aka Olaf -Compiled by C--Sphinx v0.239 b26 */ #pragma option meos @@ -18,6 +21,7 @@ Compiled by C--Sphinx v0.239 b26 byte i,j, XX, YY; system_colors sc; +proc_info Form; struct { @@ -208,11 +212,11 @@ void main() } break; case evReDraw: - WindowRedrawStatus(1); - DefineAndDrawWindow(400,276,177,201+GetSkinWidth(),0x74,0x10B2B4BF,0,0,"Just Clicks v0.77"); - WindowRedrawStatus(2); - sc.get(); + DefineAndDrawWindow(400,276,177,201+GetSkinWidth(),0x74,0x10B2B4BF,0,0,"Just Clicks v0.8"); DefineButton(150,-18,18,18,255+BT_HIDE+BT_NOFRAME,0); //Є­®Ї®зЄ  § ЄалвЁп :] + Form.GetInfo(SelfInfo); + IF (Form.height==GetSkinWidth()+3) BREAK; + sc.get(); DrawBar(0,168,168,29,sc.work); //Ї ­Ґ«мЄ  б­Ё§г #ifdef LANG_RUS DefineButton(9,172,76,19,254,sc.work_button); diff --git a/programs/games/clicks/trunk/lib/kolibri.h-- b/programs/games/clicks/trunk/lib/kolibri.h-- index 713e0d8b1e..c3e345c924 100644 --- a/programs/games/clicks/trunk/lib/kolibri.h-- +++ b/programs/games/clicks/trunk/lib/kolibri.h-- @@ -18,6 +18,27 @@ dword I_Icon = 0x0; #define BT_NOFRAME 0x20000000 +struct proc_info{ + dword use_cpu; + word pos_in_stack,num_slot,rezerv1; + char name[11]; + char rezerv2; + dword adress,use_memory,ID,left,top,width,height; + word status_slot,rezerv3; + dword work_left,work_top,work_width,work_height; + char status_window; + void GetInfo(dword ECX); + byte reserved[1024-71]; +#define SelfInfo -1 +}; + +void proc_info::GetInfo(dword ECX) +{ + EAX = 9; + EBX = #use_cpu; + $int 0x40 +} + struct system_colors{ dword frame,grab,grab_button,grab_button_text,grab_text,work,work_button,work_button_text,work_text,work_graph; void get(); @@ -61,6 +82,15 @@ inline fastcall dword GetSkinWidth() $int 0x40 } + +void DefineButton(dword x,y,w,h,EDX,ESI) +{ + EAX = 8; + EBX = x<<16+w; + ECX = y<<16+h; + $int 0x40 +} + inline fastcall void DeleteButton(dword EDX) { EAX = 8; @@ -69,6 +99,7 @@ inline fastcall void DeleteButton(dword EDX) } + inline fastcall void WindowRedrawStatus(dword EBX){ EAX = 12; $int 0x40 @@ -77,21 +108,16 @@ inline fastcall void WindowRedrawStatus(dword EBX){ void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI) { + WindowRedrawStatus(1); EAX = 0; EBX = x << 16 + sizeX; ECX = y << 16 + sizeY; EDX = mainAreaType << 24 | mainAreaColour; ESI = headerType << 24 | headerColour; $int 0x40 + WindowRedrawStatus(2); } -void DefineButton(dword x,y,w,h,EDX,ESI) -{ - EAX = 8; - EBX = x<<16+w; - ECX = y<<16+h; - $int 0x40 -} void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) {