convert utf-8 and refactoring draw buttons

This commit is contained in:
2026-02-17 00:18:12 +04:00
parent e2174e7a4a
commit 82c9cca556
5 changed files with 188 additions and 238 deletions

View File

@@ -121,122 +121,21 @@ Draw_first_menu_picture:
Draw_buttons:
;;===Draw_buttons===========================================================================================================
stdcall draw.Button, labelButtonPlay, 0x000000D0, [button_x_left], [button_y_top], [button_width_short], [button_height]
stdcall draw.Button, labelButtonExit, 0x000000D1, [button_x_right], [button_y_top], [button_width_short], [button_height]
mov ebx, [button_x_left]
shl ebx, 16
mov bx, word[button_width_short]
mov ecx, [button_y_top]
shl ecx, 16
add cx, word[button_height]
mcall 8, , ,0x000000D0,[button_color] ; top left button
shr ecx, 16
mov bx, cx
mov edx, [button_height]
shr edx, 1
sub edx, 3 ; ~half of font height
add bx, dx
ror ebx, 16
mov edx, [button_width_short]
shr edx, 1
sub edx, string_button_play.size*3
add bx, dx
ror ebx, 16
mcall 4, ,[button_text_color],string_button_play
mov ebx, [button_x_right]
shl ebx, 16
mov bx, word[button_width_short]
mov ecx, [button_y_top]
shl ecx, 16
add cx, word[button_height]
mcall 8, , ,0x000000D1, ; top right button
shr ecx, 16
mov bx, cx
mov edx, [button_height]
shr edx, 1
sub edx, 3 ; ~half of font height
add bx, dx
ror ebx, 16
mov edx, [button_width_short]
shr edx, 1
sub edx, string_button_exit.size*3
add bx, dx
ror ebx, 16
mcall 4, ,[button_text_color],string_button_exit
mov ebx, [button_x_left]
shl ebx, 16
mov bx, word[button_width_long]
mov ecx, [button_y_middle]
shl ecx, 16
add cx, word[button_height]
mcall 8, , ,0x000000D2, ; middle button
shr ecx, 16
mov bx, cx
mov edi, [button_height]
shr edi, 1
sub edi, 3 ; ~half of font height
add bx, di
ror ebx, 16
mov edi, [button_width_long]
shr edi, 1
cmp [play_mode], 0
jne @f
sub edi, string_button_pm_classic.size*3
mov edx, string_button_pm_classic
jmp .skip
cmp [play_mode], CLASSIC_MODE
jne @f
mov eax, labelButtonClassic
jmp .drawButtonMode
@@:
sub edi, string_button_pm_levels.size*3
mov edx, string_button_pm_levels
.skip:
add bx, di
ror ebx, 16
mcall 4, ,[button_text_color],
mov ebx, [button_x_left]
shl ebx, 16
mov bx, word[button_width_short]
mov ecx, [button_y_bottom]
shl ecx, 16
add cx, word[button_height]
mcall 8, , ,0x000000D3, ; bottom left button
shr ecx, 16
mov bx, cx
mov edx, [button_height]
shr edx, 1
sub edx, 3 ; ~half of font height
add bx, dx
ror ebx, 16
mov edx, [button_width_short]
shr edx, 1
sub edx, string_button_inc.size*3
add bx, dx
ror ebx, 16
mcall 4, ,[button_text_color],string_button_inc
mov ebx, [button_x_right]
shl ebx, 16
mov bx, word[button_width_short]
mov ecx, [button_y_bottom]
shl ecx, 16
add cx, word[button_height]
mcall 8, , ,0x000000D4,
shr ecx, 16
mov bx, cx
mov edx, [button_height]
shr edx, 1
sub edx, 3 ; ~half of font height
add bx, dx
ror ebx, 16
mov edx, [button_width_short]
shr edx, 1
sub edx, string_button_dec.size*3
add bx, dx
ror ebx, 16
mcall 4, ,[button_text_color],string_button_dec
mov eax, labelButtonLevels
.drawButtonMode:
stdcall draw.Button, eax, 0x000000D2, [button_x_left], [button_y_middle], [button_width_long], [button_height]
stdcall draw.Button, labelButtonInc, 0x000000D3, [button_x_left], [button_y_bottom], [button_width_short], [button_height]
stdcall draw.Button, labelButtonDec, 0x000000D4, [button_x_right], [button_y_bottom], [button_width_short], [button_height]
ret
;;---Draw_buttons----------------------------------------------------------------------------------------------------------

View File

@@ -1,52 +1,66 @@
macro defLabel name, color, [text]
{
common
local ..str
..str db text, 0
name#.len = $ - ..str - 1
name LABEL color, name#.len, ..str
}
macro defNumber name, color, size
{
common
name#.len = size
name LABEL color, name#.len, 0
}
; -----------------------------
; <EFBFBD>¨áã¥â ⥪áâ ¯® yPosition ¨ 業âà¨àãï ⥪áâ ¯® è¨à¨­¥ íªà ­ 
; á ãç¥â®¬ ¤«¨­ë ⥪áâ  ¨ 㪠§ ­­®£® ᬥ饭¨ï ¢ ᨬ¢®« å
; input: pText - 㪠§ â¥«ì ­  áâàãªâãàã
; yPosition - ¯®§¨æ¨ï Y
; countOffset - ª®«-¢® ᨬ¢®«®¢ ¤«ï ᬥ饭¨ï
; Рисует кнопку с текстовой меткой
; input: pLabel - указатель на структуру LABEL
; id - идентификатор кнопки
; xPosition - позиция X
; yPosition - позиция Y
; bWidth - ширина кнопки
; bHeight - высота кнопки
; -----------------------------
proc draw.Navigation pText, yPosition, countOffset
mov eax, [pText]
mov eax, [eax + LABEL.size]
sub eax, [countOffset]
stdcall draw.GetNavigationX, eax
stdcall draw.Label, [pText], eax, [yPosition], 0
proc draw.Button pLabel, id, xPosition, yPosition, bWidth, bHeight
mcall 8, <[xPosition], [bWidth]>, <[yPosition], [bHeight]>, [id], [button_color]
; позиция X для размещения текста
mov eax, [bHeight]
shr eax, 1
add [yPosition], eax
; позиция Y для размещения текста
mov eax, [pLabel]
mov eax, [eax+LABEL.size]
neg eax
mul [configFont.width]
add eax, [bWidth]
add eax, 4
shr eax, 1
add [xPosition], eax
; размещаем текст на кнопке
stdcall draw.Label, [pLabel], [xPosition], [yPosition]
ret
endp
; -----------------------------
; <EFBFBD>¨áã¥â ç¨á«® ¯® yPosition ¨ 業âà¨àãï ç¨á«® ¯® è¨à¨­¥ íªà ­ 
; á ãç¥â®¬ ¤«¨­ë ç¨á«  ¨ 㪠§ ­­®£® ᬥ饭¨ï ¢ ᨬ¢®« å
; input: pNumber - 㪠§ â¥«ì ­  áâàãªâãàã
; yPosition - ¯®§¨æ¨ï Y
; countOffset - ª®«-¢® ᨬ¢®«®¢ ¤«ï ᬥ饭¨ï
; Рисует текст по yPosition и центрируя текст по ширине экрана
; с учетом длины текста и указанного смещения в символах
; input: pLabel - указатель на структуру LABEL
; yPosition - позиция Y
; countOffset - кол-во символов для смещения
; -----------------------------
proc draw.NavigationNumber pNumber, yPosition, countOffset
mov eax, [pNumber]
proc draw.Navigation pLabel, yPosition, countOffset
mov eax, [pLabel]
mov eax, [eax + LABEL.size]
sub eax, [countOffset]
stdcall draw.GetNavigationX, eax
stdcall draw.Number, [pNumber], eax, [yPosition], 0
stdcall draw.Label, [pLabel], eax, [yPosition], 0
ret
endp
; -----------------------------
; ‚®§¢à é ¥â ª®®à¤¨­ âã X ¤«ï à §¬¥é¥­¨ï ⥪áâ  ¯® 業âàã íªà ­ 
; á ãç¥â®¬ 㪠§ ­­®£® ᬥ饭¨ï ¢ ᨬ¢®« å
; input: countOffset - ª®«-¢® ᨬ¢®«®¢ ¤«ï ᬥ饭¨ï
; output: eax - ª®®à¤¨­ â  X
; Рисует число по yPosition и центрируя число по ширине экрана
; с учетом длины числа и указанного смещения в символах
; input: pLabel - указатель на структуру LABEL
; yPosition - позиция Y
; countOffset - кол-во символов для смещения
; -----------------------------
proc draw.NavigationNumber pLabel, yPosition, countOffset
mov eax, [pLabel]
mov eax, [eax + LABEL.size]
sub eax, [countOffset]
stdcall draw.GetNavigationX, eax
stdcall draw.Number, [pLabel], eax, [yPosition], 0
ret
endp
; -----------------------------
; Возвращает координату X для размещения текста по центру экрана
; с учетом указанного смещения в символах
; input: countOffset - кол-во символов для смещения
; output: eax - координата X
; -----------------------------
proc draw.GetNavigationX countOffset
mov eax, [countOffset]
@@ -58,33 +72,37 @@ proc draw.GetNavigationX countOffset
ret
endp
; -----------------------------
; ”®à¬¨àã¥â ¢ ®¤­®¬ ॣ¨áâॠª®®à¤¨­ âë ¢ ­ã¦­®¬ ä®à¬ â¥ ¤®¡ ¢«ïï
; è¨à¨­ã ᬥ饭¨ï ᨬ¢®«®¢ ¯® X ¥á«¨ 㪠§ ­® ª®«-¢®
; input: xPosition - ¯®§¨æ¨ï ¯® X
; yPosition - ¯®§¨æ¨ï ¯® Y
; countOffset - ª®«-¢® ᨬ¢®«®¢ ¤«ï ᬥ饭¨ï
; output: eax - ª®®à¤¨­ â  ¢ ä®à¬ â¥ X*65536+Y
; Формирует в одном регистре координаты в нужном формате добавляя
; ширину смещения символов по X если указано кол-во
; input: xPosition - позиция по X
; yPosition - позиция по Y
; countOffset - кол-во символов для смещения
; output: eax - координата в формате X*65536+Y
; -----------------------------
proc draw._prepareCoord xPosition, yPosition, countOffset
mov eax, [countOffset]
mul [configFont.width]
add eax, [xPosition]
shl eax, 16
mov ebx, [configFont.height]
shr ebx, 1
sub [yPosition], ebx
add eax, [yPosition]
ret
endp
; -----------------------------
; <EFBFBD>¨áã¥â ⥪áâ ¯® 㪠§ ­­®© ¯®§¨æ¨¨ X ¨ Y
; ¨ ᬥ頥⠭  è¨à¨­ã ᨬ¢®«®¢ ¯® X ¥á«¨ 㪠§ ­®
; input: pText - 㪠§ â¥«ì ­  áâàãªâãàã
; xPosition - ¯®§¨æ¨ï X
; yPosition - ¯®§¨æ¨ï Y
; countOffset - ª®«-¢® ᨬ¢®«®¢ ¤«ï ᬥ饭¨ï
; Рисует текст по указанной позиции X и Y
; и смещает на ширину символов по X если указано
; input: pLabel - указатель на структуру LABEL
; xPosition - позиция X
; yPosition - позиция Y
; countOffset - кол-во символов для смещения
; -----------------------------
proc draw.Label pText, xPosition, yPosition, countOffset
proc draw.Label pLabel, xPosition, yPosition, countOffset
stdcall draw._prepareCoord, [xPosition], [yPosition], [countOffset]
mov ebx, eax
mov eax, [pText]
mov eax, [pLabel]
mov ecx, [configFont.mask]
or ecx, [eax + LABEL.color]
mov edx, [eax + LABEL.value]
@@ -92,17 +110,17 @@ proc draw.Label pText, xPosition, yPosition, countOffset
ret
endp
; -----------------------------
; <EFBFBD>¨áã¥â ç¨á«® ¯® 㪠§ ­­®© ¯®§¨æ¨¨ X ¨ Y
; ¨ ᬥ頥⠭  è¨à¨­ã ᨬ¢®«®¢ ¯® X ¥á«¨ 㪠§ ­®
; input: pNumber - 㪠§ â¥«ì ­  áâàãªâãàã
; xPosition - ¯®§¨æ¨ï X
; yPosition - ¯®§¨æ¨ï Y
; countOffset - ª®«-¢® ᨬ¢®«®¢ ¤«ï ᬥ饭¨ï
; Рисует число по указанной позиции X и Y
; и смещает на ширину символов по X если указано
; input: pLabel - указатель на структуру LABEL
; xPosition - позиция X
; yPosition - позиция Y
; countOffset - кол-во символов для смещения
; -----------------------------
proc draw.Number pNumber, xPosition, yPosition, countOffset
proc draw.Number pLabel, xPosition, yPosition, countOffset
stdcall draw._prepareCoord, [xPosition], [yPosition], [countOffset]
mov edx, eax
mov eax, [pNumber]
mov eax, [pLabel]
mov ebx, [eax + LABEL.size]
shl ebx, 16
mov ecx, [eax + LABEL.value]
@@ -112,21 +130,21 @@ proc draw.Number pNumber, xPosition, yPosition, countOffset
ret
endp
; -----------------------------
; “áâ ­®¢¨âì ­ áâனª¨ èà¨äâ  ¢ § ¢¨á¨¬®á⨠®â à §¬¥à  ï祩ª¨
; ãáâ ­ ¢«¨¢ ¥â ¢ëá®âã, è¨à¨­ã ᨬ¢®«  ¨ ¬ áªã ¤«ï à¨á®¢ ­¨ï ⥪áâ  ¨ ç¨á« 
; input: squareSideLength - à §¬¥à ï祩ª¨
; Установить настройки шрифта в зависимости от размера ячейки
; устанавливает высоту, ширину символа и маску для рисования текста и числа
; input: squareSideLength - размер ячейки
; -----------------------------
proc draw.setConfigFont squareSideLength
cmp [squareSideLength], MIN_SQUARE_SIDE_LENGTH_FONT
jg @f
cmp [configFont.flag], FONT_SMALL
je .return
mov [configFont.flag], FONT_SMALL
jmp .set
cmp [squareSideLength], MIN_SQUARE_SIDE_LENGTH_FONT
jg @f
cmp [configFont.flag], FONT_SMALL
je .return
mov [configFont.flag], FONT_SMALL
jmp .set
@@:
cmp [configFont.flag], FONT_LARGE
cmp [configFont.flag], FONT_LARGE
je .return
mov [configFont.flag], FONT_LARGE
mov [configFont.flag], FONT_LARGE
.set:
mov eax, [configFont.flag]
lea ebx, [eax + 8]
@@ -134,11 +152,12 @@ proc draw.setConfigFont squareSideLength
mov [configFont.mask], ebx
lea ebx, [eax*2 + 6]
mov [configFont.width], ebx
lea ebx, [8 + eax*4]
lea ebx, [7 + eax*4]
lea ebx, [ebx + eax*2]
mov [configFont.height], ebx
lea ebx, [eax + 4]
shl ebx, 28
mov [configFont.maskNumber], ebx
.return:
ret
endp
endp

View File

@@ -131,6 +131,9 @@ Draw_game_over_strings:
mov [edit1.left], eax
mov eax, [posLabel.yBottom]
sub eax, 3
mov ebx, [configFont.height]
shr ebx, 1
sub eax, ebx
mov [edit1.top], eax
mov eax, [configFont.mask]
or [edit1.text_color], eax

View File

@@ -62,10 +62,10 @@ mcall 26, 9
jz .button ;
.button: ; ¯à®æ¥¤ãà  ®¡à ¡®ª¨ ª­®¯®ª ¢ ¯à®£à ¬¬¥
mcall 17 ; äã­ªæ¨ï 17: ¯®«ãç¨âì ­®¬¥à ­ ¦ â®© ª­®¯ª¨
.button: ; процедура обрабоки кнопок в программе
mcall 17 ; функция 17: получить номер нажатой кнопки
shr eax, 8 ; ᤢ¨£ ¥¬ ॣ¨áâà eax ­  8 ¡¨â ¢¯à ¢®, çâ®¡ë ¯®«ãç¨âì ­®¬¥à ­ ¦ â®© ª­®¯ª¨
shr eax, 8 ; сдвигаем регистр eax на 8 бит вправо, чтобы получить номер
cmp eax, 1
je Save_do_smth_else_and_exit

View File

@@ -10,7 +10,10 @@ use32
include '../../proc32.inc'
include '../../macros.inc'
include '../../dll.inc'
include 'lang.inc'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../encoding.inc'
include '../../debug.inc'
;;===Define_chapter============================================================================================================
@@ -29,6 +32,7 @@ DEFAULT_LABEL_COLOR equ 0xffffff
DEFAULT_LABEL_END_COLOR equ 0xff9900
DEFAULT_NUMBER_END_COLOR equ 0xffdd44
DEFAULT_HISCORE equ 777
DEFAULT_BUTTON_TEXT_COLOR equ 0x000000
SCORE_EAT equ 100
@@ -185,8 +189,9 @@ align 4
;
invoke ini.get_color, cur_dir_path, aTheme_name, aButton_color, 0xDDDDDD
or [button_color], eax
invoke ini.get_color, cur_dir_path, aTheme_name, aButton_text_color, 0x000000
or [button_text_color], eax
invoke ini.get_color, cur_dir_path, aTheme_name, configColor.buttonText, DEFAULT_BUTTON_TEXT_COLOR
mov [labelButtonPlay.color], eax
mov [button_text_color], eax
invoke ini.get_color, cur_dir_path, aTheme_name, aStone_color, 0x5f8700
or [stone_color], eax
invoke ini.get_color, cur_dir_path, aTheme_name, aSplash_background_color, 0xAAAA00
@@ -481,20 +486,17 @@ Set_geometry:
shr cx, 1
add cx, dx
mov word[wp_y], cx
; ?????????? ????? ??? ?????? ??
; ????? ?? Y
mov ecx, [configFont.height]
mov ebx, ecx
shr ebx, 1
; зафиксируем позиции для меток
; Y
mov ebx, 13 ; одинаковый отступ от границ грида
mov eax, [gbym1]
sub eax, ecx
sub eax, ebx
mov [posLabel.yTop], eax
mov eax, [gbym1_plus_gh_mul_gs]
add eax, ecx
sub eax, ebx
add eax, ebx
mov [posLabel.yCenter], eax
add eax, ecx
add eax, ebx
shr ebx, 1
add eax, ebx
mov [posLabel.yBottom], eax
; x
@@ -2276,7 +2278,6 @@ aYou_win_picture_color db 'You_win_picture_color',0
aEat_color db 'Eat_color',0
aEdit_box_selection_color db 'Edit_box_selection_color',0
aButton_color db 'Button_color',0
aButton_text_color db 'Button_text_color',0
aStone_color db 'Stone_color',0
aSplash_background_color db 'Splash_background_color',0
aSplash_level_string_color db 'Splash_level_string_color',0
@@ -2294,7 +2295,7 @@ config:
configFont:
.flag dd 0
.width dd 6
.height dd 9
.height dd 7
.mask dd 0x80000000
.maskNumber dd 0x40000000
@@ -2310,54 +2311,82 @@ configColor:
.labelChampionName db 'Champion_name_color',0
.labelGameOver db 'Game_over_string_color',0
.numberGameOver db 'Game_over_hiscore_color',0
.buttonText db 'Button_text_color',0
macro defLabel name, color, [text]
{
common
local ..str
if lang eq ru_RU
..str cp866 text, 0
else if lang eq ru_RU
..str cp850 text, 0
else
..str db text, 0
end if
name#.len = $ - ..str - 1
name LABEL color, name#.len, ..str
}
macro defNumber name, color, size
{
common
name#.len = size
name LABEL color, name#.len, 0
}
if lang eq ru_RU
szZ string_button_play ,'ˆƒ<EFBFBD>œ'
szZ string_button_exit ,'‚›•Ž„'
szZ string_button_inc ,'+INC+'
szZ string_button_dec ,'-dec-'
szZ string_button_pm_classic,'०¨¬ Š‹€‘‘ˆ—…‘Šˆ‰'
szZ string_button_pm_levels ,'०¨¬ “<>Ž<C5BD>…‰'
defLabel labelButtonPlay , DEFAULT_BUTTON_TEXT_COLOR, 'ИГРАТЬ'
defLabel labelButtonExit , DEFAULT_BUTTON_TEXT_COLOR, 'ВЫХОД'
defLabel labelButtonClassic, DEFAULT_BUTTON_TEXT_COLOR, 'режим КЛАССИЧЕСКИЙ'
defLabel labelButtonLevels , DEFAULT_BUTTON_TEXT_COLOR, 'режим УРОВНЕЙ'
defLabel labelButtonInc , DEFAULT_BUTTON_TEXT_COLOR, 'УВЕЛИЧИТЬ'
defLabel labelButtonDec , DEFAULT_BUTTON_TEXT_COLOR, 'УМЕНЬШИТЬ'
defLabel labelScore , DEFAULT_LABEL_COLOR, '‘—…’ : '
defLabel labelLevel , DEFAULT_LABEL_COLOR, '<EFBFBD>Ž<EFBFBD>œ : '
defLabel labelHiscore , DEFAULT_LABEL_COLOR, '‹“—˜ˆ‰ ‘—…’ : '
defLabel labelChampion , DEFAULT_LABEL_COLOR, '—…Œ<EFBFBD>ˆŽ<EFBFBD> : '
defLabel labelMenu , DEFAULT_NAVIGATION_COLOR, '<27>€†Œˆ… ',0x27,'ESC',0x27,' „‹Ÿ ‚›•Ž„€ Œ…<C592>ž'
defLabel labelExit , DEFAULT_NAVIGATION_COLOR, '<EFBFBD>€†Œˆ ',0x27,'ESC',0x27,' „‹Ÿ ‚›•Ž„€ ˆ‡ ˆƒ<CB86>'
defLabel labelStart , DEFAULT_NAVIGATION_COLOR, '<EFBFBD>€†Œˆ ',0x27,'ENTER',0x27,' Ž<EFBFBD> <20>€—€œ'
defLabel labelPause , DEFAULT_NAVIGATION_COLOR, '<EFBFBD>€†Œˆ ',0x27,'SPACE',0x27, ' „‹Ÿ <20>€“‡'
defLabel labelApply , DEFAULT_NAVIGATION_COLOR, '‚‚…„ˆ’… ˆŒŸ ˆ <20>€†Œˆ ',0x27,'ENTER',0x27
defLabel labelResume , DEFAULT_NAVIGATION_COLOR, '<EFBFBD>€†Œˆ ',0x27,'SPACE',0x27, ' „‹Ÿ <20><>ބކ…<E280A0>ˆŸ'
defLabel labelCongratulations, DEFAULT_LABEL_END_COLOR, '<EFBFBD>®§¤à ¢«ï¥¬!!! <20>®¢ë© «ãç訩 áç¥â : '
defLabel labelEnterName , DEFAULT_LABEL_END_COLOR, '’¥¯¥àì ¢ë 祬¯¨®­! ‚¢¥¤¨â¥ ᢮¥ ¨¬ï : '
defLabel labelScore , DEFAULT_LABEL_COLOR, 'СЧЕТ : '
defLabel labelLevel , DEFAULT_LABEL_COLOR, 'УРОВЕНЬ : '
defLabel labelHiscore , DEFAULT_LABEL_COLOR, 'ЛУЧШИЙ СЧЕТ : '
defLabel labelChampion, DEFAULT_LABEL_COLOR, 'ЧЕМПИОН : '
defLabel labelMenu , DEFAULT_NAVIGATION_COLOR, 'НАЖМИТЕ ',0x27,'ESC',0x27,' ДЛЯ ВЫХОДА В МЕНЮ'
defLabel labelExit , DEFAULT_NAVIGATION_COLOR, 'НАЖМИТЕ ',0x27,'ESC',0x27,' ДЛЯ ВЫХОДА ИЗ ИГРЫ'
defLabel labelStart , DEFAULT_NAVIGATION_COLOR, 'НАЖМИТЕ ',0x27,'ENTER',0x27,' ЧТОБЫ НАЧАТЬ'
defLabel labelPause , DEFAULT_NAVIGATION_COLOR, 'НАЖМИТЕ ',0x27,'SPACE',0x27, ' ДЛЯ ПАУЗЫ'
defLabel labelApply , DEFAULT_NAVIGATION_COLOR, 'ВВЕДИТЕ ИМЯ И НАЖМИТЕ ',0x27,'ENTER',0x27
defLabel labelResume, DEFAULT_NAVIGATION_COLOR, 'НАЖМИТЕ ',0x27,'SPACE',0x27, ' ДЛЯ ПРОДОЛЖЕНИЯ'
defLabel labelCongratulations, DEFAULT_LABEL_END_COLOR, 'Поздравляем!!! Новый лучший счет : '
defLabel labelEnterName , DEFAULT_LABEL_END_COLOR, 'Теперь вы чемпион! Введите свое имя : '
else
szZ string_button_play ,'PLAY'
szZ string_button_exit ,'EXIT'
szZ string_button_inc ,'+INC+'
szZ string_button_dec ,'-dec-'
szZ string_button_pm_classic,'CLASSIC mode'
szZ string_button_pm_levels ,'LEVELS mode'
defLabel labelButtonPlay , DEFAULT_BUTTON_TEXT_COLOR, 'PLAY'
defLabel labelButtonExit , DEFAULT_BUTTON_TEXT_COLOR, 'EXIT'
defLabel labelButtonClassic, DEFAULT_BUTTON_TEXT_COLOR, 'CLASSIC mode'
defLabel labelButtonLevels , DEFAULT_BUTTON_TEXT_COLOR, 'LEVELS mode'
defLabel labelButtonInc , DEFAULT_BUTTON_TEXT_COLOR, '+INC+'
defLabel labelButtonDec , DEFAULT_BUTTON_TEXT_COLOR, '-dec-'
defLabel labelScore , DEFAULT_LABEL_COLOR, 'SCORE : '
defLabel labelLevel , DEFAULT_LABEL_COLOR, 'LEVEL : '
defLabel labelHiscore , DEFAULT_LABEL_COLOR, 'HI-SCORE : '
defLabel labelChampion , DEFAULT_LABEL_COLOR, 'CHAMPION : '
defLabel labelMenu , DEFAULT_NAVIGATION_COLOR, 'MENU - ',0x27,'ESC',0x27
defLabel labelExit , DEFAULT_NAVIGATION_COLOR, 'PRESS ',0x27,'ESC',0x27,' TO EXIT'
defLabel labelStart , DEFAULT_NAVIGATION_COLOR, 'PRESS ',0x27,'ENTER',0x27,' TO START'
defLabel labelPause , DEFAULT_NAVIGATION_COLOR, 'PAUSE - ',0x27,'SPACE',0x27
defLabel labelApply , DEFAULT_NAVIGATION_COLOR, 'APPLY NAME - ',0x27,'ENTER',0x27
defLabel labelResume , DEFAULT_NAVIGATION_COLOR, 'RESUME - ',0x27,'SPACE',0x27
defLabel labelCongratulations, DEFAULT_LABEL_END_COLOR, 'Congratulations!!! New hi-score is : '
defLabel labelEnterName , DEFAULT_LABEL_END_COLOR, 'You are the champion! Enter your name : '
defLabel labelScore , DEFAULT_LABEL_COLOR, 'SCORE : '
defLabel labelLevel , DEFAULT_LABEL_COLOR, 'LEVEL : '
defLabel labelHiscore , DEFAULT_LABEL_COLOR, 'HI-SCORE : '
defLabel labelChampion, DEFAULT_LABEL_COLOR, 'CHAMPION : '
defLabel labelMenu , DEFAULT_NAVIGATION_COLOR, 'MENU - ',0x27,'ESC',0x27
defLabel labelExit , DEFAULT_NAVIGATION_COLOR, 'PRESS ',0x27,'ESC',0x27,' TO EXIT'
defLabel labelStart , DEFAULT_NAVIGATION_COLOR, 'PRESS ',0x27,'ENTER',0x27,' TO START'
defLabel labelPause , DEFAULT_NAVIGATION_COLOR, 'PAUSE - ',0x27,'SPACE',0x27
defLabel labelApply , DEFAULT_NAVIGATION_COLOR, 'APPLY NAME - ',0x27,'ENTER',0x27
defLabel labelResume, DEFAULT_NAVIGATION_COLOR, 'RESUME - ',0x27,'SPACE',0x27
defLabel labelCongratulations, DEFAULT_LABEL_END_COLOR, 'Congratulations!!! New hi-score is : '
defLabel labelEnterName , DEFAULT_LABEL_END_COLOR, 'You are the champion! Enter your name : '
end if
defNumber numberScore , DEFAULT_LABEL_COLOR, 7
defNumber numberLevel , DEFAULT_LABEL_COLOR, 2
defNumber numberHiscore , DEFAULT_LABEL_COLOR, 7
defLabel labelChampionName, DEFAULT_LABEL_COLOR, 15 dup (0x20)
defLabel labelChampionName, DEFAULT_LABEL_COLOR, CHAMPION_NAME_LENGTH dup (0x20)
defNumber numberGameOver , DEFAULT_NUMBER_END_COLOR, 7
edit1 edit_box 65,397,0x0,0x000000,0x000000,0x000000,0x000000,0x80000000,15,hed,mouse_dd,ed_focus,hed_end-hed-1,hed_end-hed-1
edit1 edit_box 65,397,0x0,0x000000,0x000000,0x000000,0x000000,0x80000000,CHAMPION_NAME_LENGTH,hed,mouse_dd,ed_focus,hed_end-hed-1,hed_end-hed-1
hed db '',0
;;---Variables-------------------------------------------------------------------------------------------------------------