Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1767 → Rev 1768

/programs/games/clicks/trunk/clicks.c--
12,8 → 12,12
#include "files\boxes.txt"
#include "files\cups.txt"
 
#ifndef AUTOBUILD
#include "lang.h--"
#endif
 
byte i,j, XX, YY;
system_colors sc;
 
struct
{
125,37 → 129,59
{
DefineButton(j*21,y-22, 20, 20, num+BT_HIDE, 0);
PutImage(matrix[num].color-1*1323+#img,21,21,j*21,y-22);
} ELSE DrawBar(j*21,y-22,21,21, 0xB2B4BF);
}
ELSE
DrawBar(j*21,y-22,21,21, 0xB2B4BF);
num++;
}
y=y+21;
}
DrawBar(90,178,71,8,0xE4DFE1);
IF (check_for_end()==1) WriteText(90,178,0x80,0,"¥§ã«ìâ â:",10);
ELSE WriteText(96,178,0x80,0,"Žáâ «®áì:",10);
#ifdef LANG_RUS
DrawBar(90,178,71,8,sc.work);
IF (check_for_end()==1) WriteText(90,178,0x80,sc.work_text,"¥§ã«ìâ â:",10);
ELSE WriteText(96,178,0x80,sc.work_text,"Žáâ «®áì:",10);
#else
DrawBar(108,178,60,8,sc.work);
IF (check_for_end()==1) WriteText(108,178,0x80,sc.work_text,"Result:",10);
ELSE WriteText(108,178,0x80,sc.work_text,"Blocks:",10);
#endif
FOR (i=0;i<8;i++) FOR (j=0;j<8;j++) IF (matrix[j*8+i].mark==0) count_blocks++;
WriteNumber(150,178,0x80,0,count_blocks);
WriteNumber(150,178,0x80,sc.work_text,count_blocks);
//
if (check_for_end()==1) && (count_blocks<8)
{
DrawFlatButton(21,42,125,62,0,0xE4DFE1,"");
DrawFlatButton();
#ifdef LANG_RUS
IF (count_blocks==0) copystr(" ‹ãçè¥ ¢á¥å!", #temp);
IF (count_blocks==1) copystr(" à¥ªà á­®", #temp);
IF (count_blocks==2) copystr("Žç¥­ì å®à®è®!", #temp);
#else
IF (count_blocks==0) copystr("The best!", #temp);
IF (count_blocks==1) copystr("Wonderful", #temp);
IF (count_blocks==2) copystr("Very good", #temp);
#endif
IF (count_blocks>=3) //¡ £!!!
{
#ifdef LANG_RUS
copystr(" ¥¯«®å®", #temp);
#else
copystr(" Not bed", #temp);
#endif
count_blocks=3;
}
PutImage(count_blocks*42*37*3+#cups,42,37,63,48);
PutImage(count_blocks*4662+#cups,42,37,63,48);
#ifdef LANG_RUS
WriteText(46,91,0x80,0x0,#temp,0);
#else
WriteText(58,91,0x80,0x0,#temp,0);
#endif
}
}
 
 
void main()
{ byte id, skin_width;
randomize();
{ byte id;
//randomize();
ReDraw_Blocks(1);
loop()
{
183,16 → 209,35
break;
case evReDraw:
WindowRedrawStatus(1);
skin_width = GetSkinWidth();
DefineAndDrawWindow(400,276,177,201+skin_width,0x74,0x10B2B4BF,0,0,"Just Clicks v0.76");
DefineButton(150,2-skin_width,18,18,255+BT_HIDE+BT_NOFRAME,0x0866CC00);
DrawBar(0,168,168,29,0xE4DFE1);
//DrawFlatButton(9,172,84,19,254,0xE4DFE1,"New game (F2)");
DrawFlatButton(4,172,80,19,254,0xE4DFE1,"‡ ­®¢® (F2)");
DefineAndDrawWindow(400,276,177,201+GetSkinWidth(),0x74,0x10B2B4BF,0,0,"Just Clicks v0.77");
WindowRedrawStatus(2);
sc.get();
DefineButton(150,-18,18,18,255+BT_HIDE+BT_NOFRAME,0); //ª­®¯®çª  § ªàëâ¨ï :]
DrawBar(0,168,168,29,sc.work); //¯ ­¥«ìª  á­¨§ã
#ifdef LANG_RUS
DefineButton(9,172,76,19,254,sc.work_button);
WriteText(16,178,0x80,sc.work_button_text,"‡ ­®¢® (F2)",0);
#else
DefineButton(9,172,86,19,254,sc.work_button);
WriteText(15,178,0x80,sc.work_button_text,"New game (F2)",0);
#endif
ReDraw_Blocks(0);
WindowRedrawStatus(2);
}
}
}
 
 
void DrawFlatButton()
{
DrawBar(21,42,125,1,0x94AECE); //¯®«®á  £®à ᢥàåã
DrawBar(21,104,125,1,0x94AECE); //¯®«®á  £®à á­¨§ã
DrawBar(21,42,1,62,0x94AECE); //¯®«®á  ¢¥àâ á«¥¢ 
DrawBar(146,42,1,63,0x94AECE); //¯®«®á  ¢¥àâ á¯à ¢ 
DrawBar(22,43,124,1,0xFFFFFF); //¯®«®á  £®à ¡¥« ï
DrawBar(22,103,123,1,0xC7C7C7); //â¥­ì ¢¥àâ
DrawBar(22,43,1,61,0xFFFFFF); //¯®«®á  ¢¥àâ ¡¥« ï
DrawBar(145,44,1,60,0xC7C7C7); //â¥­ì ¢¥àâ
DrawBar(23,44,122,59,0xE4DFE1); //§ «¨¢ª 
}
 
stop: