The Bus: fix misspell (thanks lev), a bit fix kfont labels position

git-svn-id: svn://kolibrios.org@6997 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2017-09-19 14:19:56 +00:00
parent 4316d5b6f0
commit 75936c8fc5
2 changed files with 10 additions and 10 deletions

View File

@ -273,7 +273,7 @@ inline fastcall dword b32(EAX) { return DSDWORD[EAX]; }
:int LABEL::WriteIntoWindowCenter(dword x,y,w,h; dword _background, _color; byte fontSizePoints; dword text1) :int LABEL::WriteIntoWindowCenter(dword x,y,w,h; dword _background, _color; byte fontSizePoints; dword text1)
{ {
getsize(fontSizePoints, text1); getsize(fontSizePoints, text1);
return WriteIntoWindow(w-size.width/2+x,y, _background, _color, fontSizePoints, text1); return WriteIntoWindow(w-size.width/2+x-1,y, _background, _color, fontSizePoints, text1);
} }
:void LABEL::ShowBuffer(dword _x, _y) :void LABEL::ShowBuffer(dword _x, _y)

View File

@ -25,7 +25,7 @@ libimg_image objects;
int frame_timeout = 1; int frame_timeout = 1;
int lives=0, level=0, score=0; int lifes=0, level=0, score=0;
int don_x, don_y, don_h, don_w=68, don_type, don_image_y, don_step_y, don_step_y_default=3; int don_x, don_y, don_h, don_w=68, don_type, don_image_y, don_step_y, don_step_y_default=3;
int don_h_mas[8] = { 36,72,36,74,24,64,48,74 }; int don_h_mas[8] = { 36,72,36,74,24,64,48,74 };
int bus_x, bus_w=42, bus_y, bus_h=88, bus_y_default=290; int bus_x, bus_w=42, bus_y, bus_h=88, bus_y_default=290;
@ -54,7 +54,7 @@ int active_menu_item=0;
#define ABOUT_TEXT "'Œ àèàã⪠ #define ABOUT_TEXT "'Œ àèàã⪠
¥àá¨ï v1.01 ¥àá¨ï v1.01
ë£à ©â¥ §  ¤¥à᪮£® ¬ àèàãâ稪 , ë£à ©â¥ §  ¤¥à§ª®£® ¬ àèàãâ稪 ,
ª®â®àë© ­¥á¥âáï ¤®¬®© ¯®á«¥ ᬥ­ë. ª®â®àë© ­¥á¥âáï ¤®¬®© ¯®á«¥ ᬥ­ë.
Ž­ 㦥 ¢ê¥¡ « àåã á ¬ã¦¨ª ¬¨ Ž­ 㦥 ¢ê¥¡ « àåã á ¬ã¦¨ª ¬¨
¨ ⥯¥àì ¥£® ­¨çâ® ­¥ ®áâ ­®¢¨â! ¨ ⥯¥àì ¥£® ­¨çâ® ­¥ ®áâ ­®¢¨â!
@ -64,7 +64,7 @@ int active_menu_item=0;
#define PAUSE_TEXT "<22>€“‡€" #define PAUSE_TEXT "<22>€“‡€"
#define GAME_OVER_TEXT "ˆ£à  ®ª®­ç¥­ " #define GAME_OVER_TEXT "ˆ£à  ®ª®­ç¥­ "
#define FINAL_SCORE_TEXT "”¨­ «ì­ë© áç¥â" #define FINAL_SCORE_TEXT "”¨­ «ì­ë© áç¥â"
#define LIVES_TEXT "†¨§­¨" #define LIFES_TEXT "†¨§­¨"
#define LEVEL_TEXT "“஢¥­ì" #define LEVEL_TEXT "“஢¥­ì"
#define SCORE_TEXT "‘ç¥â" #define SCORE_TEXT "‘ç¥â"
char *MENU_LIST[]={ char *MENU_LIST[]={
@ -86,7 +86,7 @@ Menu image from Freepik.com'tI"
#define PAUSE_TEXT "PAUSE" #define PAUSE_TEXT "PAUSE"
#define GAME_OVER_TEXT "GAME OVER" #define GAME_OVER_TEXT "GAME OVER"
#define FINAL_SCORE_TEXT "Final Score" #define FINAL_SCORE_TEXT "Final Score"
#define LIVES_TEXT "Lives" #define LIFES_TEXT "Lifes"
#define LEVEL_TEXT "Level" #define LEVEL_TEXT "Level"
#define SCORE_TEXT "Score" #define SCORE_TEXT "Score"
char *MENU_LIST[]={ char *MENU_LIST[]={
@ -203,7 +203,7 @@ void main()
if (screen_type==SCR_GAME) if (screen_type==SCR_GAME)
{ {
if ((don_x == bus_x)&&(don_y + don_h > bus_y )&&(don_y < bus_y + don_h )) { if ((don_x == bus_x)&&(don_y + don_h > bus_y )&&(don_y < bus_y + don_h )) {
lives--; lifes--;
DrawBus(bus_x*80+200,bus_y); DrawBus(bus_x*80+200,bus_y);
DrawBoom(bus_x*80+180,bus_y+10); DrawBoom(bus_x*80+180,bus_y+10);
pause(150); pause(150);
@ -211,7 +211,7 @@ void main()
DrawScreen(); DrawScreen();
} }
if (lives==0) { if (lifes==0) {
DrawGameOverMessage(); DrawGameOverMessage();
break; break;
} }
@ -249,7 +249,7 @@ void NewLevel()
void StartNewGame() void StartNewGame()
{ {
lives=3; lifes=3;
level=0; level=0;
score=0; score=0;
bus_y = bus_y_default; bus_y = bus_y_default;
@ -280,8 +280,8 @@ void DrawScreen()
if (screen_type==SCR_GAME) || (screen_type==SCR_PAUSE) if (screen_type==SCR_GAME) || (screen_type==SCR_PAUSE)
{ {
DrawHighway(); DrawHighway();
WriteText(20, 20, 0x81, 0xFFFFFF, LIVES_TEXT); WriteText(20, 20, 0x81, 0xFFFFFF, LIFES_TEXT);
WriteText(20, 46, 0x81, 0xFFFFFF, itoa(lives)); WriteText(20, 46, 0x81, 0xFFFFFF, itoa(lifes));
WriteText(20, 80, 0x81, 0xFFFFFF, LEVEL_TEXT); WriteText(20, 80, 0x81, 0xFFFFFF, LEVEL_TEXT);
WriteText(20, 106, 0x81, 0xFFFFFF, itoa(level)); WriteText(20, 106, 0x81, 0xFFFFFF, itoa(level));
WriteScore(); WriteScore();