diff --git a/programs/games/FindNumbers/trunk/FindNumbers.c-- b/programs/games/FindNumbers/trunk/FindNumbers.c-- index ef68a2e95c..d273350efc 100644 --- a/programs/games/FindNumbers/trunk/FindNumbers.c-- +++ b/programs/games/FindNumbers/trunk/FindNumbers.c-- @@ -4,6 +4,34 @@ //#include "..\lib\kolibri.h--" //подключаем библиотеку с KolibriOS API #include "kolibri.h--" +#ifndef AUTOBUILD +#include "lang.h--" +#endif + +#ifdef LANG_RUS + ?define TOP_TEXT_COL 4 + ?define TOP_TEXT "Соберите все числа от 10 до 90 по порядку..." + ?define BOT_LEFT_TEXT_COL 4 + ?define BOT_LEFT_TEXT "Ищем число: " + ?define BOT_RIGHT_TEXT_COL 162 + ?define BOT_RIGHT_TEXT "Осталось найти: " + ?define BOT_LEFT_NUMBER_COL 70 + ?define BOT_RIGHT_NUMBER_COL 252 + ?define F2_TEXT "Заново (F2)" + ?define WIN_TEXT "Вы нашли все числа! :)" +#else + ?define TOP_TEXT_COL 2 + ?define TOP_TEXT "Collect all numbers from 10 to 90 in order..." + ?define BOT_LEFT_TEXT_COL 2 + ?define BOT_LEFT_TEXT "Looking for number: " + ?define BOT_RIGHT_TEXT_COL 156 + ?define BOT_RIGHT_TEXT "Remains to find: " + ?define BOT_LEFT_NUMBER_COL 116 + ?define BOT_RIGHT_NUMBER_COL 252 + ?define F2_TEXT "Anew (F2)" + ?define WIN_TEXT "You have found all numbers! :)" +#endif + int find=10; struct { @@ -86,18 +114,18 @@ void draw_window() DrawBar(0,299,271,1,0x0CFF0C); //линия снизу if (find<=90) { - WriteText(4,4,0x80,0x000000,"Соберите все числа от 10 до 90 по порядку..."); - WriteText(4,289,0x80,0x000000,"Ищем число: "); - WriteText(162,289,0x80,0x000000,"Осталось найти: "); - WriteNumber(70,289,0x80,0,find); - WriteNumber(252,289,0x80,0,90-find+1); - DrawFlatButton(155,300,115,14,582,0xAFFFAF,"Заново (F2)"); - WriteText(4,304,0x80,0x000000,"Made by Artemonische,2010"); + WriteText(TOP_TEXT_COL,4,0x80,0x000000,TOP_TEXT); + WriteText(BOT_LEFT_TEXT_COL,289,0x80,0x000000,BOT_LEFT_TEXT); + WriteText(BOT_RIGHT_TEXT_COL,289,0x80,0x000000,BOT_RIGHT_TEXT); + WriteNumber(BOT_LEFT_NUMBER_COL,289,0x80,0,find); + WriteNumber(BOT_RIGHT_NUMBER_COL,289,0x80,0,90-find+1); + DrawFlatButton(155,300,115,14,582,0xAFFFAF,F2_TEXT); + WriteText(2,304,0x80,0x000000,"Made by Artemonische,2010"); } IF (find==91) { - WriteText(70,100,0x80,0x000000,"Вы нашли все числа! :)"); - DrawFlatButton(100,110,70,20,582,0xE4DFE1,"Заново (F2)"); + WriteText(70,100,0x80,0x000000,WIN_TEXT); + DrawFlatButton(100,110,70,20,582,0xE4DFE1,F2_TEXT); } WindowRedrawStatus(2); //конец перерисовки окна } diff --git a/programs/games/FindNumbers/trunk/Tupfile.lua b/programs/games/FindNumbers/trunk/Tupfile.lua index 941f5b51e0..92a4207607 100644 --- a/programs/games/FindNumbers/trunk/Tupfile.lua +++ b/programs/games/FindNumbers/trunk/Tupfile.lua @@ -1,2 +1,6 @@ if tup.getconfig("NO_CMM") ~= "" then return end -tup.rule("FindNumbers.c--", "c-- %f" .. tup.getconfig("KPACK_CMD"), "FindNumbers") +if tup.getconfig("LANG") == "ru" +then C_LANG = "LANG_RUS" +else C_LANG = "LANG_ENG" -- this includes default case without config +end +tup.rule("FindNumbers.c--", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "FindNumbers.com") diff --git a/programs/games/FindNumbers/trunk/compile_en.bat b/programs/games/FindNumbers/trunk/compile_en.bat new file mode 100644 index 0000000000..5c0460f2e1 --- /dev/null +++ b/programs/games/FindNumbers/trunk/compile_en.bat @@ -0,0 +1,11 @@ +@del lang.h-- +@echo #define LANG_ENG 1 >lang.h-- + +@del FindNumbers +cls +@C-- "FindNumbers.c--" +@rename FindNumbers.com FindNumbers + +@del warning.txt +@del lang.h-- +@pause \ No newline at end of file diff --git a/programs/games/FindNumbers/trunk/compile_ru.bat b/programs/games/FindNumbers/trunk/compile_ru.bat new file mode 100644 index 0000000000..5b604a8935 --- /dev/null +++ b/programs/games/FindNumbers/trunk/compile_ru.bat @@ -0,0 +1,11 @@ +@del lang.h-- +@echo #define LANG_RUS 1 >lang.h-- + +@del FindNumbers +cls +@C-- "FindNumbers.c--" +@rename FindNumbers.com FindNumbers + +@del warning.txt +@del lang.h-- +@pause \ No newline at end of file