From a487d52031a001b871bf58b05c5db6dccd8b3850 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Wed, 27 Feb 2013 10:17:08 +0000 Subject: [PATCH] @rb 0.62: fix memory usage, RMB using git-svn-id: svn://kolibrios.org@3281 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/rb/compile_en.bat | 8 ++++++++ programs/cmm/rb/compile_eng.bat | 9 --------- programs/cmm/rb/compile_ru.bat | 8 ++++++++ programs/cmm/rb/compile_rus.bat | 9 --------- programs/cmm/rb/rb.c | 10 +++++++--- 5 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 programs/cmm/rb/compile_en.bat delete mode 100644 programs/cmm/rb/compile_eng.bat create mode 100644 programs/cmm/rb/compile_ru.bat delete mode 100644 programs/cmm/rb/compile_rus.bat diff --git a/programs/cmm/rb/compile_en.bat b/programs/cmm/rb/compile_en.bat new file mode 100644 index 0000000000..3021e46592 --- /dev/null +++ b/programs/cmm/rb/compile_en.bat @@ -0,0 +1,8 @@ +@del lang.h-- +@echo #define LANG_ENG 1 >lang.h-- +..\C--\C-- rb.c +@del @rb +@del warning.txt +@del lang.h-- +@rename rb.com @rb +@pause \ No newline at end of file diff --git a/programs/cmm/rb/compile_eng.bat b/programs/cmm/rb/compile_eng.bat deleted file mode 100644 index 189e366dd6..0000000000 --- a/programs/cmm/rb/compile_eng.bat +++ /dev/null @@ -1,9 +0,0 @@ -del lang.h-- -echo #define LANG_ENG 1 >lang.h-- -..\C--\C-- rb.c -del @rb -del warning.txt -del lang.h-- -rename rb.com @rb -..\C--\kpack @rb -pause \ No newline at end of file diff --git a/programs/cmm/rb/compile_ru.bat b/programs/cmm/rb/compile_ru.bat new file mode 100644 index 0000000000..9809859dab --- /dev/null +++ b/programs/cmm/rb/compile_ru.bat @@ -0,0 +1,8 @@ +@del lang.h-- +@echo #define LANG_RUS 1 >lang.h-- +..\C--\C-- rb.c +@del @rb +@del warning.txt +@del lang.h-- +@rename rb.com @rb +@pause \ No newline at end of file diff --git a/programs/cmm/rb/compile_rus.bat b/programs/cmm/rb/compile_rus.bat deleted file mode 100644 index 9dbdd8c64c..0000000000 --- a/programs/cmm/rb/compile_rus.bat +++ /dev/null @@ -1,9 +0,0 @@ -del lang.h-- -echo #define LANG_RUS 1 >lang.h-- -..\C--\C-- rb.c -del @rb -del warning.txt -del lang.h-- -rename rb.com @rb -..\C--\kpack @rb -pause \ No newline at end of file diff --git a/programs/cmm/rb/rb.c b/programs/cmm/rb/rb.c index 125d20b693..c4b48e202e 100644 --- a/programs/cmm/rb/rb.c +++ b/programs/cmm/rb/rb.c @@ -1,5 +1,6 @@ -//@RB - v0.6 +//@RB - v0.62 +#define MEMSIZE 0x3E80 #include "..\lib\kolibri.h" #include "..\lib\strings.h" #include "..\lib\figures.h" @@ -39,7 +40,7 @@ dword stak[100]; void main() { mouse mm; - byte thread_id; + byte can_show; SetEventMask(100000b); loop() switch(WaitEvent()) @@ -47,10 +48,13 @@ void main() case evMouse: mm.get(); - if (GetPointOwner(mm.x, mm.y)==1) && (mm.pkm) + if (GetPointOwner(mm.x, mm.y)<>1) can_show = 0; + if (mm.pkm) can_show = 1; + if (!mm.pkm) && (can_show) { SwitchToAnotherThread(); CreateThread(#window,#stak); + can_show = 0; } } }