From bd82c40504628e68d4f6e68862b284a6c800dca8 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 19 Nov 2024 13:44:21 +0300 Subject: [PATCH 01/26] fet: create copy folder for builder --- .gitignore | 5 +++++ build.js | 17 +++++++++++++++-- package.json | 5 +++++ setup.json | 12 +++++++++--- 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 363b46a..d7ef3f8 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,8 @@ build.yml/ # Texture Packer resource files Graphics/Draw/ASCII/TextureAtlases/Resources + + +# node js temp +node_modules/ +package-lock.json \ No newline at end of file diff --git a/build.js b/build.js index e3ccd32..9b215a4 100644 --- a/build.js +++ b/build.js @@ -1,6 +1,8 @@ const { execSync } = require('child_process'); const path = require('path'); const fs = require('fs'); +const { promisify } = require('util'); +const ncp = promisify(require('ncp').ncp); console.log("10% - Read setup.json;"); const config = JSON.parse(fs.readFileSync('setup.json', 'utf8')); @@ -30,8 +32,19 @@ try { console.log(`90% - Return in work directory: ${process.cwd()};`); process.chdir(config.projectDir); - console.log(`Complete with exit code 0.`); - process.exit(0); + + const sourceFolder = path.join(config.projectDir, config.copy.srcFolder); + const destFolder = path.join(buildConfig.folder, config.copy.destFolder); + console.log(`0% - Start copy source from ${sourceFolder} to ${destFolder}`); + ncp(sourceFolder, destFolder) + .then(() => { + console.log(`100% - Files copied successfully from ${sourceFolder} to ${destFolder}`); + process.exit(0); + }) + .catch(err => { + console.error(`Error copying files: ${err}`); + process.exit(1); + }); } catch (error) { console.error(`Error: ${error.message}`); process.exit(1); diff --git a/package.json b/package.json new file mode 100644 index 0000000..0d060be --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "ncp": "^2.0.0" + } +} diff --git a/setup.json b/setup.json index 13c063b..4906374 100644 --- a/setup.json +++ b/setup.json @@ -1,14 +1,20 @@ { "debug": { "input": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/main.asm", - "output": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Debug/tactickgame.exe" + "output": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Debug/tactickgame.exe", + "folder": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Debug/" }, "release": { "input": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/main.asm", - "output": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Release/tactickgame.exe" + "output": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Release/tactickgame.exe", + "folder": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Release/" }, "fasmPath": "C:/KostyaBetenya/FASM", "projectDir": "C:/KostyaBetenya/GitHub/TacticsGame-fasm", "ollyDbgPath": "C:/KostyaBetenya/OllyDbg/OllyDbg.exe", - "debugExecutablePath": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Debug/tactickgame.exe" + "debugExecutablePath": "C:/KostyaBetenya/GitHub/TacticsGame-fasm/bin/Debug/tactickgame.exe", + "copy": { + "srcFolder": "source", + "destFolder": "source" + } } \ No newline at end of file From e2164aab95e654f50f096a299b07ba45ba416980 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 19 Nov 2024 17:06:44 +0300 Subject: [PATCH 02/26] fix: create basic readme for setup --- README.md | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 833249d..19bcf32 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,7 @@ -18.08 - 1h 30min
-19.08 - 1h 11min
-20.08 - 5h 17min
-21.08 - 6h 7min
-22.08 - 7h 59min
-23.08 - 1h 49min
-24.08 - 2h 35min
-25.08 - 6h 56min
-26.08 - 1h 35min
-27.08 - 3h 53min
-28.08 - 3h 51min
-29.08 - 0h 51min
-30.08 - 3h 38min
-31.08 - 2h 17min
-01.09 - 0h 0min
-Total - h min \ No newline at end of file +# Setup + +- `npm install`; +- change `setup.json` - input your directions; +- `node build` | `node build Debug` | `node build Release`; + - `node build` equal `node build Debug`; +- `node run` | `node run Debug` - for start debag version or `node run Release` for Release version. \ No newline at end of file From 5da374748bb5d2c0e18f8f50c91cc95615ad5dc3 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 19 Nov 2024 17:23:26 +0300 Subject: [PATCH 03/26] fet: create exit page --- Graphics/Animations/Animations.inc | 4 +++- Graphics/Pages/Pages.inc | 4 +++- Graphics/Pages/PagesInclude.asm | 1 + Graphics/Pages/_components/ExitPage.asm | 11 +++++++++++ Keyboard/_components/OnHotkeyClick.asm | 9 ++++++++- Mouse/Events.inc | 6 ++++-- 6 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 Graphics/Pages/_components/ExitPage.asm diff --git a/Graphics/Animations/Animations.inc b/Graphics/Animations/Animations.inc index 3aaa55e..4d98add 100644 --- a/Graphics/Animations/Animations.inc +++ b/Graphics/Animations/Animations.inc @@ -105,4 +105,6 @@ Anim_HotkeysPage dd 2,\ Anim_btn_cl, Anim_HRetBtnFont_cl,\ Anim_btn_cl, Anim_HRetBtnHrst_cl -AnimsList dd Anim_LoadingPage, Anim_MainPage, Anim_GamePage, Anim_AboutPage, Anim_SettingsPage, Anim_PausePage, Anim_WinnerPage, Anim_HotkeysPage \ No newline at end of file +Anim_ExitPage dd 0 + +AnimsList dd Anim_LoadingPage, Anim_MainPage, Anim_GamePage, Anim_AboutPage, Anim_SettingsPage, Anim_PausePage, Anim_WinnerPage, Anim_HotkeysPage, Anim_ExitPage \ No newline at end of file diff --git a/Graphics/Pages/Pages.inc b/Graphics/Pages/Pages.inc index fc04ded..091793c 100644 --- a/Graphics/Pages/Pages.inc +++ b/Graphics/Pages/Pages.inc @@ -6,6 +6,7 @@ SettingsPage = 16 PausePage = 20 WinnerPage = 24 HotkeysPage = 28 +ExitPage = 32 PrevousPage dd MainPage CurentPage dd LoadingPage @@ -13,4 +14,5 @@ CurentPage dd LoadingPage PagesList dd Draw.Pages.LoadingPage, Draw.Pages.MainPage,\ Draw.Pages.GamePage, Draw.Pages.AboutPage,\ Draw.Pages.SettingsPage, Draw.Pages.PausePage, Draw.Pages.WinnerPage,\ - Draw.Pages.HotkeysPage \ No newline at end of file + Draw.Pages.HotkeysPage,\ + Draw.Pages.ExitPage \ No newline at end of file diff --git a/Graphics/Pages/PagesInclude.asm b/Graphics/Pages/PagesInclude.asm index a3a2f5e..e840dd9 100644 --- a/Graphics/Pages/PagesInclude.asm +++ b/Graphics/Pages/PagesInclude.asm @@ -11,4 +11,5 @@ include '_components/LoadingPage.asm' include '_components/PausePage.asm' include '_components/WinnerPage.asm' include '_components/HotkeysPage.asm' +include '_components/ExitPage.asm' include 'Page.asm' \ No newline at end of file diff --git a/Graphics/Pages/_components/ExitPage.asm b/Graphics/Pages/_components/ExitPage.asm new file mode 100644 index 0000000..4d518e0 --- /dev/null +++ b/Graphics/Pages/_components/ExitPage.asm @@ -0,0 +1,11 @@ +proc Draw.Pages.ExitPage + ; font layout + stdcall Draw.Pages.DefaultLayout, [PrevousPage] + mov ebx, [PrevousPage] + mov ebx, [PagesList + ebx] + stdcall ebx + ; main exit layout + stdcall Graphics.Draw.Shapes, font_design, font_dark_color + + ret +endp \ No newline at end of file diff --git a/Keyboard/_components/OnHotkeyClick.asm b/Keyboard/_components/OnHotkeyClick.asm index 57c5216..61a4a1d 100644 --- a/Keyboard/_components/OnHotkeyClick.asm +++ b/Keyboard/_components/OnHotkeyClick.asm @@ -33,8 +33,9 @@ endp proc Keyboard.OnHotkeyClick.Exit switch [CurentPage] + case .exitPage, ExitPage case .exitCall, LoadingPage - case .exitCall, MainPage + case .mainPage, MainPage case .gamePage, GamePage case .aboutPage, AboutPage case .prevousPage, SettingsPage @@ -43,6 +44,12 @@ proc Keyboard.OnHotkeyClick.Exit case .prevousPage, HotkeysPage jmp .exit + .exitPage: + stdcall Page.ChangePage, MainPage + jmp .exit + .mainPage: + stdcall Page.ChangePage, ExitPage + jmp .exit .exitCall: stdcall Application.Exit jmp .exit diff --git a/Mouse/Events.inc b/Mouse/Events.inc index 21455f5..f6824b0 100644 --- a/Mouse/Events.inc +++ b/Mouse/Events.inc @@ -9,7 +9,7 @@ mp_events dd 4,\ et_pagebutton, button_play_design, GamePage,\ et_pagebutton, button_about_design, AboutPage,\ et_pagebutton, button_stngs_design, SettingsPage,\ - et_wndbutton, button_exit_design, Application.Exit + et_pagebutton, button_exit_design, ExitPage gp_events dd 5,\ et_pagebutton, exitbtn_font_design, MainPage,\ @@ -42,4 +42,6 @@ wp_events dd 3,\ hp_events dd 1,\ et_prevpage, hp_return_circle_desing, PrevousPage -EventsList dd lp_events, mp_events, gp_events, ap_events, sp_events, pp_events, wp_events, hp_events +ep_events dd 0 + +EventsList dd lp_events, mp_events, gp_events, ap_events, sp_events, pp_events, wp_events, hp_events, ep_events From 1e47a7e85af58d90b7e76d7b6ec2084abdc0883e Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 19 Nov 2024 19:17:13 +0300 Subject: [PATCH 04/26] fet: add exit page with Q --- Graphics/Animations/Animations.inc | 14 ++++- Graphics/Includes/Data/Colors.inc | 4 ++ Graphics/Includes/Data/Letters.inc | 4 ++ .../Includes/Data/Letters/SpecialSymb.inc | 9 ++- Graphics/Includes/Data/Shapes.inc | 55 +++++++++++++++++++ Graphics/Includes/Data/Strings.inc | 12 ++++ Graphics/Includes/DataPrepears.asm | 11 ++++ Graphics/Pages/_components/ExitPage.asm | 12 ++++ Mouse/Events.inc | 4 +- 9 files changed, 122 insertions(+), 3 deletions(-) diff --git a/Graphics/Animations/Animations.inc b/Graphics/Animations/Animations.inc index 4d98add..e6ec064 100644 --- a/Graphics/Animations/Animations.inc +++ b/Graphics/Animations/Animations.inc @@ -105,6 +105,18 @@ Anim_HotkeysPage dd 2,\ Anim_btn_cl, Anim_HRetBtnFont_cl,\ Anim_btn_cl, Anim_HRetBtnHrst_cl -Anim_ExitPage dd 0 +Anim_EPYesFont_cl dd ep_yes_brdr_design,\ + yes_font_color, brown_text_color, brown_color +Anim_EPYesText_cl dd ep_yes_brdr_design,\ + yes_text_color, brown_color, brown_text_color +Anim_EPNoFont_cl dd ep_no_brdr_design,\ + no_font_color, brown_text_color, pale_color +Anim_EPNoText_cl dd ep_no_brdr_design,\ + no_text_color, pale_color, brown_text_color +Anim_ExitPage dd 4,\ + Anim_btn_cl, Anim_EPYesFont_cl,\ + Anim_btn_cl, Anim_EPYesText_cl,\ + Anim_btn_cl, Anim_EPNoFont_cl,\ + Anim_btn_cl, Anim_EPNoText_cl AnimsList dd Anim_LoadingPage, Anim_MainPage, Anim_GamePage, Anim_AboutPage, Anim_SettingsPage, Anim_PausePage, Anim_WinnerPage, Anim_HotkeysPage, Anim_ExitPage \ No newline at end of file diff --git a/Graphics/Includes/Data/Colors.inc b/Graphics/Includes/Data/Colors.inc index 503e21d..67944b8 100644 --- a/Graphics/Includes/Data/Colors.inc +++ b/Graphics/Includes/Data/Colors.inc @@ -91,6 +91,10 @@ lbbtn_font_color BackgroundColor ? lbbtn_text_color BackgroundColor ? chhtkeys_font_color BackgroundColor ? chhtkeys_text_color BackgroundColor ? +yes_font_color BackgroundColor ? +yes_text_color BackgroundColor ? +no_font_color BackgroundColor ? +no_text_color BackgroundColor ? TicksFontList_Colors dd milk_color, brown_color ; base TicksFontList_MltColors dd orange_color, body_color ; for "TO" Ticks diff --git a/Graphics/Includes/Data/Letters.inc b/Graphics/Includes/Data/Letters.inc index df6940a..bdbbaf1 100644 --- a/Graphics/Includes/Data/Letters.inc +++ b/Graphics/Includes/Data/Letters.inc @@ -69,6 +69,10 @@ fs_switch = -10 fs_default = 20 fs_HPhotkeys = 10 +fs_wantExit = 10 +fs_yesno = 5 + + include 'Letters/RussianLetters.inc' include 'Letters/Digits.inc' include 'Letters/SpecialSymb.inc' diff --git a/Graphics/Includes/Data/Letters/SpecialSymb.inc b/Graphics/Includes/Data/Letters/SpecialSymb.inc index 000e10e..180ab41 100644 --- a/Graphics/Includes/Data/Letters/SpecialSymb.inc +++ b/Graphics/Includes/Data/Letters/SpecialSymb.inc @@ -8,7 +8,14 @@ spl_46 dd 2, 20,\ 14, 14, 14, 17, 0, 10, 0, 7 ; x from 46 to 61 ; y from 1014 to 1032 -spl_47 dd ? +; '?' +spl_47 dd 6, 10,\ + 3, 24, 3, 28, 7, 28, 7, 24,\ + 3, 18, 7, 18, 7, 22, 3, 22,\ + 3, 18, 7, 18, 9, 12, 6, 10,\ + 6, 13, 9, 13, 9, 4, 6, 4,\ + 6, 5, 3, 0, 6, 0, 9, 4,\ + 0, 5, 2, 7, 6, 0, 3, 0 spl_48 dd ? spl_49 dd ? spl_50 dd ? diff --git a/Graphics/Includes/Data/Shapes.inc b/Graphics/Includes/Data/Shapes.inc index b56bb32..b955ac5 100644 --- a/Graphics/Includes/Data/Shapes.inc +++ b/Graphics/Includes/Data/Shapes.inc @@ -802,3 +802,58 @@ hp_return_chrest_coords dd 2,\ 1244, 408, 1248, 408, 1260, 420, 1256, 420,\ 1244, 420, 1248, 420, 1260, 408, 1256, 408,\ 0 +; exit page +ep_border_design DrawModel ? +ep_border_coords dd 2,\ + 745, 450, 1175, 630,\ + 725, 470, 1195, 610,\ + 4,\ + 745, 470, 20,\ + 745, 610, 20,\ + 1175, 470, 20,\ + 1175, 610, 20 +ep_font_desing DrawModel ? +ep_font_coords dd 2,\ + 747, 455, 1173, 625,\ + 730, 472, 1190, 608,\ + 4,\ + 747, 472, 17,\ + 747, 608, 17,\ + 1173, 472, 17,\ + 1173, 608, 17 +ep_yes_brdr_design DrawModel ? +ep_yes_brdr_coords dd 2,\ + 767, 543, 947, 597,\ + 757, 553, 957, 587,\ + 4,\ + 767, 553, 10,\ + 767, 587, 10,\ + 947, 553, 10,\ + 947, 587, 10 +ep_yes_font_design DrawModel ? +ep_yes_font_coords dd 2,\ + 767, 545, 946, 595,\ + 759, 553, 954, 587,\ + 4,\ + 767, 553, 8,\ + 767, 587, 8,\ + 946, 553, 8,\ + 946, 587, 8 +ep_no_brdr_design DrawModel ? +ep_no_brdr_coords dd 2,\ + 972, 543, 1152, 597,\ + 962, 553, 1162, 587,\ + 4,\ + 972, 553, 10,\ + 972, 587, 10,\ + 1152, 553, 10,\ + 1152, 587, 10 +ep_no_font_design DrawModel ? +ep_no_font_coords dd 2,\ + 972, 545, 1152, 595,\ + 964, 553, 1160, 587,\ + 4,\ + 972, 553, 8,\ + 972, 587, 8,\ + 1152, 553, 8,\ + 1152, 587, 8 diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index 70cc215..87519e2 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -54,6 +54,8 @@ tg_hotkeys = 8 tg_volume = 8 tg_switch = 6 tg_HPhotkeys = 10 +tg_wantExit = 10 +tg_yesno = 7 ; ====== Interfaces ====== ; struct Points @@ -170,6 +172,13 @@ str_mon_pos dd 911, 545 str_von_pos dd 1091, 545 str_hon_pos dd 1074, 603 +str_wantExit db 3, 29, 44, 23, 16, 20, 10, 20, 6, 44, 3, 29, 11, 20, 10, 47, 0 ; 'ВЫ ХОТИТЕ ВЫЙТИ?' +str_wantExit_pos dd 762, 485 +str_yes db 5, 1, 0 ; 'ДА' +str_yes_pos dd 835, 553 +str_no db 15, 6, 20, 0 ; 'НЕТ' +str_no_pos dd 1034, 552 + str_R_hk db 71, 0 ; 'R' str_R_hk_pos dd 1805, 29 str_S_hk db 72, 0 ; 'S' @@ -221,6 +230,9 @@ txt_hoff String ? txt_mon String ? txt_von String ? txt_hon String ? +txt_wantExit String ? +txt_yes String ? +txt_no String ? arr_of_letters dd ltr_RU_1, ltr_RU_2, ltr_RU_3, ltr_RU_4, ltr_RU_5, ltr_RU_6, ltr_RU_7,\ ; RU ltr_RU_8, ltr_RU_9, ltr_RU_10, ltr_RU_11, ltr_RU_12, ltr_RU_13, ltr_RU_14,\ diff --git a/Graphics/Includes/DataPrepears.asm b/Graphics/Includes/DataPrepears.asm index 5fe5bfb..8a0d3c9 100644 --- a/Graphics/Includes/DataPrepears.asm +++ b/Graphics/Includes/DataPrepears.asm @@ -94,6 +94,13 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertWithQuardCoords, hp_return_chrest_coords, hp_return_chrest_design stdcall Scripts.Getters.ConvertCoords, button_exit_coords, button_exit_design + stdcall Scripts.Getters.ConvertCoords, ep_border_coords, ep_border_design + stdcall Scripts.Getters.ConvertCoords, ep_font_coords, ep_font_desing + stdcall Scripts.Getters.ConvertCoords, ep_yes_brdr_coords, ep_yes_brdr_design + stdcall Scripts.Getters.ConvertCoords, ep_yes_font_coords, ep_yes_font_design + stdcall Scripts.Getters.ConvertCoords, ep_no_brdr_coords, ep_no_brdr_design + stdcall Scripts.Getters.ConvertCoords, ep_no_font_coords, ep_no_font_design + ; 375 44 485 32 86 Генадий Григорьевич ; repeat stdcall Scripts.Getters.ConvertRepeatCoords, book_strk_design @@ -182,6 +189,10 @@ proc Graphics.Draw.ASCIIPrepear stdcall Graphics.Draw.Text.Prepear, txt_hon, str_on, fs_switch, tg_switch, str_hon_pos stdcall Graphics.Draw.Text.Prepear, txt_HPhotkeys, str_chhotkeys, fs_HPhotkeys, tg_HPhotkeys, str_HPhotkeys_pos + + stdcall Graphics.Draw.Text.Prepear, txt_wantExit, str_wantExit, fs_wantExit, tg_wantExit, str_wantExit_pos + stdcall Graphics.Draw.Text.Prepear, txt_yes, str_yes, fs_yesno, tg_yesno, str_yes_pos + stdcall Graphics.Draw.Text.Prepear, txt_no, str_no, fs_yesno, tg_yesno, str_no_pos ret endp diff --git a/Graphics/Pages/_components/ExitPage.asm b/Graphics/Pages/_components/ExitPage.asm index 4d518e0..0d0ab4c 100644 --- a/Graphics/Pages/_components/ExitPage.asm +++ b/Graphics/Pages/_components/ExitPage.asm @@ -6,6 +6,18 @@ proc Draw.Pages.ExitPage stdcall ebx ; main exit layout stdcall Graphics.Draw.Shapes, font_design, font_dark_color + stdcall Graphics.Draw.Shapes, ep_border_design, brown_text_color + stdcall Graphics.Draw.Shapes, ep_font_desing, milk_light_color + stdcall Graphics.Draw.Text.Write, txt_wantExit, brown_text_color + ; yes + stdcall Graphics.Draw.Shapes, ep_yes_brdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, ep_yes_font_design, yes_font_color + stdcall Graphics.Draw.Text.Write, txt_yes, yes_text_color + ; no + stdcall Graphics.Draw.Shapes, ep_no_brdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, ep_no_font_design, no_font_color + stdcall Graphics.Draw.Text.Write, txt_no, no_text_color + ret endp \ No newline at end of file diff --git a/Mouse/Events.inc b/Mouse/Events.inc index f6824b0..c93e661 100644 --- a/Mouse/Events.inc +++ b/Mouse/Events.inc @@ -42,6 +42,8 @@ wp_events dd 3,\ hp_events dd 1,\ et_prevpage, hp_return_circle_desing, PrevousPage -ep_events dd 0 +ep_events dd 2,\ + et_wndbutton, ep_yes_brdr_design, Application.Exit,\ + et_prevpage, ep_no_brdr_design, PrevousPage EventsList dd lp_events, mp_events, gp_events, ap_events, sp_events, pp_events, wp_events, hp_events, ep_events From fa4bab510fb4bbb2aee7b65fe4d043aa7e03e9e4 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 19 Nov 2024 22:10:37 +0300 Subject: [PATCH 05/26] fet: draw hotkeys position blocks --- Graphics/Includes/Data/Shapes.inc | 111 +++++++++++++++++++++ Graphics/Includes/Data/Strings.inc | 2 +- Graphics/Includes/DataPrepears.asm | 15 ++- Graphics/Pages/_components/HotkeysPage.asm | 24 ++++- 4 files changed, 148 insertions(+), 4 deletions(-) diff --git a/Graphics/Includes/Data/Shapes.inc b/Graphics/Includes/Data/Shapes.inc index b955ac5..396e207 100644 --- a/Graphics/Includes/Data/Shapes.inc +++ b/Graphics/Includes/Data/Shapes.inc @@ -802,6 +802,117 @@ hp_return_chrest_coords dd 2,\ 1244, 408, 1248, 408, 1260, 420, 1256, 420,\ 1244, 420, 1248, 420, 1260, 408, 1256, 408,\ 0 +hp_playbrdr_design DrawModel ? +hp_playbrdr_coords dd 2,\ + 704, 501, 787, 535,\ + 701, 504, 791, 532,\ + 4,\ + 704, 504, 3,\ + 704, 532, 3,\ + 787, 504, 3,\ + 787, 532, 3 +hp_playfont_design DrawModel ? +hp_playfont_coords dd 2,\ + 704, 502, 788, 534,\ + 702, 504, 790, 532,\ + 4,\ + 704, 504, 2,\ + 704, 532, 2,\ + 788, 504, 2,\ + 788, 532, 2 + +hp_pausebrdr_design DrawModel ? +hp_pausebrdr_coords dd 2,\ + 1012, 500, 1096, 534,\ + 1009, 503, 1099, 531,\ + 4,\ + 1012, 503, 3,\ + 1012, 531, 3,\ + 1096, 503, 3,\ + 1096, 531, 3 +hp_pausefont_design DrawModel ? +hp_pausefont_coords dd 2,\ + 1012, 501, 1096, 533,\ + 1010, 503, 1098, 531,\ + 4,\ + 1012, 503, 2,\ + 1012, 531, 2,\ + 1096, 503, 2,\ + 1096, 531, 2 +hp_aboutbrdr_design DrawModel ? +hp_aboutbrdr_coords dd 2,\ + 704, 546, 788, 580,\ + 701, 549, 791, 577,\ + 4,\ + 704, 549, 3,\ + 704, 577, 3,\ + 788, 549, 3,\ + 788, 577, 3 +hp_aboutfont_design DrawModel ? +hp_aboutfont_coords dd 2,\ + 704, 547, 788, 579,\ + 702, 549, 790, 577,\ + 4,\ + 704, 549, 2,\ + 704, 577, 2,\ + 788, 549, 2,\ + 788, 577, 2 +hp_exitbrdr_design DrawModel ? +hp_exitbrdr_coords dd 2,\ + 1013, 545, 1097, 579,\ + 1010, 548, 1100, 576,\ + 4,\ + 1013, 548, 3,\ + 1013, 576, 3,\ + 1097, 548, 3,\ + 1097, 576, 3 +hp_exitfont_design DrawModel ? +hp_exitfont_coords dd 2,\ + 1013, 546, 1097, 578,\ + 1011, 548, 1099, 576,\ + 4,\ + 1013, 548, 2,\ + 1013, 576, 2,\ + 1097, 548, 2,\ + 1097, 576, 2 + +hp_stngbrdr_design DrawModel ? +hp_stngbrdr_coords dd 2,\ + 704, 591, 788, 625,\ + 701, 594, 791, 622,\ + 4,\ + 704, 594, 3,\ + 704, 622, 3,\ + 788, 594, 3,\ + 788, 622, 3 +hp_stngfont_design DrawModel ? +hp_stngfont_coords dd 2,\ + 704, 592, 788, 624,\ + 702, 594, 790, 622,\ + 4,\ + 704, 594, 2,\ + 704, 622, 2,\ + 788, 594, 2,\ + 788, 622, 2 + +hp_rstrbrdr_design DrawModel ? +hp_rstrbrdr_coords dd 2,\ + 1013, 590, 1097, 624,\ + 1010, 593, 1100, 621,\ + 4,\ + 1013, 593, 3,\ + 1013, 621, 3,\ + 1097, 593, 3,\ + 1097, 621, 3 +hp_rstrfont_design DrawModel ? +hp_rstrfont_coords dd 2,\ + 1013, 591, 1097, 623,\ + 1011, 593, 1099, 621,\ + 4,\ + 1013, 593, 2,\ + 1013, 621, 2,\ + 1097, 593, 2,\ + 1097, 621, 2 ; exit page ep_border_design DrawModel ? ep_border_coords dd 2,\ diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index 87519e2..be3902d 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -152,7 +152,7 @@ str_msettings_pos dd 845, 420 str_chhotkeys db 19, 14, 6, 15, 1, 44, 4, 16, 18, 33, 25, 10, 23, 44, 12, 13, 1, 3, 10, 26, 0 ; 'СМЕНА ГОРЯЧИХ КЛАВИШ' str_chhotkeys_pos dd 817, 637 -str_HPhotkeys_pos dd 698, 404 +str_HPhotkeys_pos dd 698, 414 str_music db 14, 21, 9, 29, 12, 1, 0 ; 'МУЗЫКА' str_music_pos dd 783, 540 diff --git a/Graphics/Includes/DataPrepears.asm b/Graphics/Includes/DataPrepears.asm index 8a0d3c9..36b48d6 100644 --- a/Graphics/Includes/DataPrepears.asm +++ b/Graphics/Includes/DataPrepears.asm @@ -8,7 +8,7 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, book_brdfnt_coords, book_brdfnt_design stdcall Scripts.Getters.ConvertCoords, book_brd_coords, book_brd_design stdcall Scripts.Getters.ConvertCoords, book_flgpl_coords, book_flgpl_design - + stdcall Scripts.Getters.ConvertCoords, button_exit_coords, button_exit_design stdcall Graphics.Draw.CoordsRectPrepears.ForAnimations stdcall Scripts.Getters.ConvertCoords, mp_gamefont_coords, mp_gamefont_design @@ -92,7 +92,18 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, hp_font_coords, hp_font_desing stdcall Scripts.Getters.ConvertCoords, hp_return_circle_coords, hp_return_circle_desing stdcall Scripts.Getters.ConvertWithQuardCoords, hp_return_chrest_coords, hp_return_chrest_design - stdcall Scripts.Getters.ConvertCoords, button_exit_coords, button_exit_design + stdcall Scripts.Getters.ConvertCoords, hp_playbrdr_coords, hp_playbrdr_design + stdcall Scripts.Getters.ConvertCoords, hp_playfont_coords, hp_playfont_design + stdcall Scripts.Getters.ConvertCoords, hp_pausebrdr_coords, hp_pausebrdr_design + stdcall Scripts.Getters.ConvertCoords, hp_pausefont_coords, hp_pausefont_design + stdcall Scripts.Getters.ConvertCoords, hp_aboutbrdr_coords, hp_aboutbrdr_design + stdcall Scripts.Getters.ConvertCoords, hp_aboutfont_coords, hp_aboutfont_design + stdcall Scripts.Getters.ConvertCoords, hp_exitbrdr_coords, hp_exitbrdr_design + stdcall Scripts.Getters.ConvertCoords, hp_exitfont_coords, hp_exitfont_design + stdcall Scripts.Getters.ConvertCoords, hp_stngbrdr_coords, hp_stngbrdr_design + stdcall Scripts.Getters.ConvertCoords, hp_stngfont_coords, hp_stngfont_design + stdcall Scripts.Getters.ConvertCoords, hp_rstrbrdr_coords, hp_rstrbrdr_design + stdcall Scripts.Getters.ConvertCoords, hp_rstrfont_coords, hp_rstrfont_design stdcall Scripts.Getters.ConvertCoords, ep_border_coords, ep_border_design stdcall Scripts.Getters.ConvertCoords, ep_font_coords, ep_font_desing diff --git a/Graphics/Pages/_components/HotkeysPage.asm b/Graphics/Pages/_components/HotkeysPage.asm index 9661510..20b32df 100644 --- a/Graphics/Pages/_components/HotkeysPage.asm +++ b/Graphics/Pages/_components/HotkeysPage.asm @@ -14,7 +14,29 @@ proc Draw.Pages.HotkeysPage stdcall Graphics.Draw.Shapes, hp_return_circle_desing, retbtn_font_color stdcall Graphics.Draw.Shapes, hp_return_chrest_design, retbtn_chrst_color - ; + ; PLAY + stdcall Graphics.Draw.Shapes, hp_playbrdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, hp_playfont_design, body_color + + ; PAUSE + stdcall Graphics.Draw.Shapes, hp_pausebrdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, hp_pausefont_design, body_color + + ; ABOUT + stdcall Graphics.Draw.Shapes, hp_aboutbrdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, hp_aboutfont_design, body_color + + ; EXIT + stdcall Graphics.Draw.Shapes, hp_exitbrdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, hp_exitfont_design, body_color + + ; SETINGS + stdcall Graphics.Draw.Shapes, hp_stngbrdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, hp_stngfont_design, body_color + + ; RESTART + stdcall Graphics.Draw.Shapes, hp_rstrbrdr_design, brown_text_color + stdcall Graphics.Draw.Shapes, hp_rstrfont_design, body_color ret endp \ No newline at end of file From 944180f71eed4fceb988f30c7d89f48fb7efff83 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 19 Nov 2024 22:20:32 +0300 Subject: [PATCH 06/26] fet: add ESP --- main.asm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.asm b/main.asm index 107ce46..a4cabbe 100644 --- a/main.asm +++ b/main.asm @@ -119,7 +119,11 @@ proc WindowProc hwnd,wmsg,wparam,lparam xor eax,eax jmp .finish .wmkeydown: - stdcall Keyboard.OnKeyDown + cmp [wparam],VK_ESCAPE + jne @F + stdcall Keyboard.OnHotkeyClick.Exit + @@: + stdcall Keyboard.OnKeyDown xor eax,eax jmp .finish .wmdestroy: From 79ea542487ff990b688cb55d24f7e90607c550f7 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Sun, 24 Nov 2024 23:38:22 +0300 Subject: [PATCH 07/26] fet: create save in file game board function --- .gitignore | 3 ++ Application/_components/Exit.asm | 1 + File/Includes.asm | 5 ++- File/Settings/IniFile.asm | 42 ++++++++++++++++++++++- File/Settings/IniFile.inc | 3 +- File/TicksPositions/Ticks.asm | 49 +++++++++++++++++++++++++++ File/TicksPositions/TicksPosition.inc | 7 ++++ main.asm | 1 + 8 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 File/TicksPositions/Ticks.asm create mode 100644 File/TicksPositions/TicksPosition.inc diff --git a/.gitignore b/.gitignore index d7ef3f8..f62522c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ /Release bin/ settings.txt +settings.inc +ticks.txt +ticks.inc # temp close .github/ diff --git a/Application/_components/Exit.asm b/Application/_components/Exit.asm index b090441..6beb03c 100644 --- a/Application/_components/Exit.asm +++ b/Application/_components/Exit.asm @@ -1,5 +1,6 @@ proc Application.Exit stdcall File.IniFile.Write + stdcall File.TicksPosition.Write invoke HeapDestroy, [hHeap] invoke ExitProcess, [msg.wParam] ret diff --git a/File/Includes.asm b/File/Includes.asm index ecd76b9..cb2d96b 100644 --- a/File/Includes.asm +++ b/File/Includes.asm @@ -3,4 +3,7 @@ include 'BMP/LoadBoat.asm' include 'BMP/BMP.inc' ; init settings file include 'Settings/IniFile.asm' -include 'Settings/Settings.inc' \ No newline at end of file +include 'Settings/Settings.inc' +; ticks +include 'TicksPositions/Ticks.asm' +include 'TicksPositions/TicksPosition.inc' \ No newline at end of file diff --git a/File/Settings/IniFile.asm b/File/Settings/IniFile.asm index 555e0cb..f8bd156 100644 --- a/File/Settings/IniFile.asm +++ b/File/Settings/IniFile.asm @@ -187,6 +187,46 @@ proc File.IniFile.IntToStr uses ecx edx ebx esi,\ ret endp +proc File.IniFile.ArrIntToStr uses eax ebx edx ecx,\ + prompt, arr, size + stdcall File.IniFile.WriteLine, [prompt] + mov ecx, [size] + mov ebx, [arr] + .convertLoop: + push ecx + mov edx, [ebx] + stdcall File.IniFile.IntToStr, edx + stdcall File.IniFile.WriteLine, strBuffer + pop ecx + add ebx, 4 + loop .convertLoop + mov eax, arrayBuffer + stdcall File.IniFile.WriteLine, NEXT_LINE + ret +endp + +proc File.IniFile.StrToArrInt uses eax ebx ecx,\ + arr, size + stdcall File.IniFile.ReadRule, edi + push edi + + mov edi, strBuffer + mov ecx, [size] + mov ebx, [arr] + .convertLoop: + xor eax, eax + mov al, byte [edi] + sub eax, '0' + mov [ebx], eax + add ebx, 4 + inc edi + loop .convertLoop + mov eax, arrayBuffer + + pop edi + ret +endp + proc File.IniFile.WriteRule,\ prompt, status stdcall File.IniFile.WriteLine, [prompt] @@ -195,7 +235,7 @@ proc File.IniFile.WriteRule,\ ret endp -proc File.IniFile.WriteLine,\ +proc File.IniFile.WriteLine uses eax,\ message locals messageLen dd ? diff --git a/File/Settings/IniFile.inc b/File/Settings/IniFile.inc index 196412b..a8adbfe 100644 --- a/File/Settings/IniFile.inc +++ b/File/Settings/IniFile.inc @@ -1,9 +1,10 @@ hIniFile dd ? -iniFilePath db 'settings.txt', 0 +iniFilePath db 'settings.inc', 0 readBuffer dd ? bufferLength dd 1000 bytesRead dd 0 strBuffer db 256 dup (0) +arrayBuffer db 256 dup (0) ; ==== prompts ==== ; NEXT_LINE db 13, 10, 0 diff --git a/File/TicksPositions/Ticks.asm b/File/TicksPositions/Ticks.asm new file mode 100644 index 0000000..f21e3ba --- /dev/null +++ b/File/TicksPositions/Ticks.asm @@ -0,0 +1,49 @@ +proc File.TicksPosition.Write + invoke CreateFile, ticksFilePath, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 + mov [hTicksFile], eax + cmp eax, INVALID_HANDLE_VALUE + jne @F + stdcall File.IniFile.Error + jmp .exit + @@: + + ; write settings in file + stdcall File.IniFile.IntToStr, [garbgeCounter] + stdcall File.IniFile.WriteRule, GARBAGE_COUNTER_PROMPT, eax + stdcall File.IniFile.IntToStr, [isGameStart] + stdcall File.IniFile.WriteRule, IS_GAME_START_PROMPT, eax + stdcall File.IniFile.IntToStr, [currentScore] + stdcall File.IniFile.WriteRule, CURRENT_SCORE_PROMPT, eax + stdcall File.IniFile.ArrIntToStr, TICKS_MATRIX_PROMPT, TicksMatrix, 64 + + .exit: + invoke CloseHandle, [hTicksFile] + ret + ret +endp + +proc File.TicksPosition.Read uses eax ebx ecx edx edi + invoke CreateFile, ticksFilePath, GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 + mov [hTicksFile], eax + cmp eax, INVALID_HANDLE_VALUE + jne @F + stdcall File.IniFile.Error + jmp .exit + @@: + ; length + invoke HeapAlloc, [hHeap], 8, [bufferLength] + mov [readBuffer], eax + invoke ReadFile, [hTicksFile], [readBuffer], [bufferLength], bytesRead, 0 +; ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ; +; !!!!!!!!!!!!!!!!!!!!!!!!!!! DO NOT TOUCH EDI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; + mov edi, [readBuffer] + stdcall File.IniFIle.ReadString, garbgeCounter, 1 + stdcall File.IniFIle.ReadString, isGameStart, 1 + stdcall File.IniFIle.ReadString, currentScore, 1 + stdcall File.IniFile.StrToArrInt, TicksMatrix, 64 +; !!!!!!!!!!!!!!!!!!!!! ALARM DIACTIVATE! GOOD LUCK :) !!!!!!!!!!!!!!!!!!!!!!!! ; + invoke HeapFree, [hHeap], 0, [readBuffer] + .exit: + invoke CloseHandle, [hTicksFile] + ret +endp diff --git a/File/TicksPositions/TicksPosition.inc b/File/TicksPositions/TicksPosition.inc new file mode 100644 index 0000000..588adea --- /dev/null +++ b/File/TicksPositions/TicksPosition.inc @@ -0,0 +1,7 @@ +hTicksFile dd ? +ticksFilePath db 'ticks.inc', 0 + +TICKS_MATRIX_PROMPT db "TICKS_MATRIX=", 0 +GARBAGE_COUNTER_PROMPT db "GARBAGE_COUNTER=", 0 +IS_GAME_START_PROMPT db "IS_GAME_START=", 0 +CURRENT_SCORE_PROMPT db "CURRENT_SCORE=", 0 \ No newline at end of file diff --git a/main.asm b/main.asm index a4cabbe..974ed44 100644 --- a/main.asm +++ b/main.asm @@ -42,6 +42,7 @@ section '.text' code readable executable ; prepear data stdcall File.IniFile.Read + stdcall File.TicksPosition.Read stdcall Graphics.Draw.CoordsRectPrepears stdcall Graphics.Colors.Prepear stdcall Graphics.Draw.ASCIIPrepear From 78a0d6a914ce12bd9d07c2816c1ac194575ccf5c Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Tue, 26 Nov 2024 20:22:05 +0300 Subject: [PATCH 08/26] fix: change ini file naming --- .gitignore | 6 ++---- File/Settings/IniFile.inc | 2 +- File/TicksPositions/TicksPosition.inc | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f62522c..6c9afdc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,8 @@ /Debug /Release bin/ -settings.txt -settings.inc -ticks.txt -ticks.inc +settings.ini +ticks.ini # temp close .github/ diff --git a/File/Settings/IniFile.inc b/File/Settings/IniFile.inc index a8adbfe..2c6f157 100644 --- a/File/Settings/IniFile.inc +++ b/File/Settings/IniFile.inc @@ -1,5 +1,5 @@ hIniFile dd ? -iniFilePath db 'settings.inc', 0 +iniFilePath db 'settings.ini', 0 readBuffer dd ? bufferLength dd 1000 bytesRead dd 0 diff --git a/File/TicksPositions/TicksPosition.inc b/File/TicksPositions/TicksPosition.inc index 588adea..a3f1b5b 100644 --- a/File/TicksPositions/TicksPosition.inc +++ b/File/TicksPositions/TicksPosition.inc @@ -1,5 +1,5 @@ hTicksFile dd ? -ticksFilePath db 'ticks.inc', 0 +ticksFilePath db 'ticks.ini', 0 TICKS_MATRIX_PROMPT db "TICKS_MATRIX=", 0 GARBAGE_COUNTER_PROMPT db "GARBAGE_COUNTER=", 0 From d267921d3b11d848d4d8acb4f2a59eb537f5ac01 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Wed, 27 Nov 2024 11:20:25 +0300 Subject: [PATCH 09/26] fet: create about page font panel --- Graphics/Includes/Data/Shapes.inc | 19 +++++++++++++++++++ Graphics/Includes/DataPrepears.asm | 3 +++ Graphics/Pages/_components/AboutPage.asm | 5 ++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Graphics/Includes/Data/Shapes.inc b/Graphics/Includes/Data/Shapes.inc index 396e207..81d0ed8 100644 --- a/Graphics/Includes/Data/Shapes.inc +++ b/Graphics/Includes/Data/Shapes.inc @@ -968,3 +968,22 @@ ep_no_font_coords dd 2,\ 972, 587, 8,\ 1152, 553, 8,\ 1152, 587, 8 +; === about page === ; +ap_brdr_design DrawModel ? +ap_brdr_coords dd 2,\ + 136, 195, 1783, 884,\ + 96, 235, 1823, 844,\ + 4,\ + 136, 235, 40,\ + 136, 844, 40,\ + 1783, 235, 40,\ + 1783, 844, 40 +ap_font_design DrawModel ? +ap_font_coords dd 2,\ + 138, 202, 1781, 877,\ + 103, 237, 1816, 842,\ + 4,\ + 138, 237, 35,\ + 138, 842, 35,\ + 1781, 237, 35,\ + 1781, 842, 35 \ No newline at end of file diff --git a/Graphics/Includes/DataPrepears.asm b/Graphics/Includes/DataPrepears.asm index 36b48d6..136bf52 100644 --- a/Graphics/Includes/DataPrepears.asm +++ b/Graphics/Includes/DataPrepears.asm @@ -112,6 +112,9 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, ep_no_brdr_coords, ep_no_brdr_design stdcall Scripts.Getters.ConvertCoords, ep_no_font_coords, ep_no_font_design + stdcall Scripts.Getters.ConvertCoords, ap_brdr_coords, ap_brdr_design + stdcall Scripts.Getters.ConvertCoords, ap_font_coords, ap_font_design + ; 375 44 485 32 86 Генадий Григорьевич ; repeat stdcall Scripts.Getters.ConvertRepeatCoords, book_strk_design diff --git a/Graphics/Pages/_components/AboutPage.asm b/Graphics/Pages/_components/AboutPage.asm index 25b4a85..c3e689e 100644 --- a/Graphics/Pages/_components/AboutPage.asm +++ b/Graphics/Pages/_components/AboutPage.asm @@ -1,4 +1,7 @@ proc Draw.Pages.AboutPage - + ; draw about block font + stdcall Graphics.Draw.Shapes, ap_brdr_design, btn_text_color + stdcall Graphics.Draw.Shapes, ap_font_design, milk_light_color + ;brown_medium_color ret endp \ No newline at end of file From 28c950a8effbc9e55f6d3aa9ecf99022bd9e126e Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Wed, 27 Nov 2024 20:21:54 +0300 Subject: [PATCH 10/26] fix: change bytes count for one circle draw --- Graphics/Includes/Data/Shapes.inc | 4 ++-- Mouse/_components/IsMouseInShape.asm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Graphics/Includes/Data/Shapes.inc b/Graphics/Includes/Data/Shapes.inc index 81d0ed8..9872a2f 100644 --- a/Graphics/Includes/Data/Shapes.inc +++ b/Graphics/Includes/Data/Shapes.inc @@ -51,7 +51,7 @@ ends struct Circle center Point ? radius dd ? - dots dd 2882 dup(?) + dots dd 722 dup(?) ends struct Circles @@ -68,7 +68,7 @@ struct DrawModel circles Circles ? ends -degreeCount dd 1440 +degreeCount dd 360 curentDeg dd 0 curentRudDeg dd ? diff --git a/Mouse/_components/IsMouseInShape.asm b/Mouse/_components/IsMouseInShape.asm index 712daa6..be8de5b 100644 --- a/Mouse/_components/IsMouseInShape.asm +++ b/Mouse/_components/IsMouseInShape.asm @@ -32,7 +32,7 @@ proc Mouse.CheckIsInShape uses ecx ebx,\ jne @f mov [result], eax @@: - add ebx, 11540 + add ebx, 2900 loop .checkCircles .exit: mov eax, [result] From 84af9d8bdf54009a1d2f02d5afae5c925f947ef3 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Wed, 27 Nov 2024 23:14:21 +0300 Subject: [PATCH 11/26] fix: create heap strings for memory control --- Graphics/Animations/Animations.inc | 3 +- Graphics/Draw/ASCII/Letters.asm | 18 ++- Graphics/Draw/Components/PauseButton.asm | 2 +- Graphics/Draw/Components/RecoveryButton.asm | 2 +- Graphics/Draw/Components/SettingsButton.asm | 2 +- Graphics/Draw/Text.asm | 53 ++++++- Graphics/Includes/Data/Letters.inc | 8 +- .../Includes/Data/Letters/SpecialSymb.inc | 13 +- Graphics/Includes/Data/Strings.inc | 140 +++++++---------- Graphics/Includes/DataPrepears.asm | 142 +++++++----------- Graphics/Pages/Pages.inc | 2 +- Graphics/Pages/_components/AboutPage.asm | 5 +- Graphics/Pages/_components/DefaultLayout.asm | 2 +- Graphics/Pages/_components/ExitPage.asm | 6 +- Graphics/Pages/_components/HotkeysPage.asm | 2 +- Graphics/Pages/_components/MainPage.asm | 16 +- Graphics/Pages/_components/PausePage.asm | 6 +- Graphics/Pages/_components/SettingsPage.asm | 18 +-- Graphics/Pages/_components/WinnerPage.asm | 12 +- Mouse/Controllers/OnClick.asm | 2 +- Mouse/Events.inc | 5 +- Mouse/_components/IsMouseInShape.asm | 2 +- main.asm | 2 +- 23 files changed, 228 insertions(+), 235 deletions(-) diff --git a/Graphics/Animations/Animations.inc b/Graphics/Animations/Animations.inc index e6ec064..aa762ca 100644 --- a/Graphics/Animations/Animations.inc +++ b/Graphics/Animations/Animations.inc @@ -34,7 +34,8 @@ Anim_GamePage dd 4,\ Anim_btn_cl, Anim_Settingsbtn_cl,\ Anim_btn_cl, Anim_Pausebtn_cl -Anim_AboutPage dd 1,\ +Anim_AboutPage dd 2,\ + Anim_btn_cl, Anim_Settingsbtn_cl,\ Anim_btn_cl, Anim_SubPages_cl Anim_SReturnFont_cl dd sp_return_circle_design,\ diff --git a/Graphics/Draw/ASCII/Letters.asm b/Graphics/Draw/ASCII/Letters.asm index a1abf6e..b27ea9f 100644 --- a/Graphics/Draw/ASCII/Letters.asm +++ b/Graphics/Draw/ASCII/Letters.asm @@ -68,15 +68,17 @@ proc Graphics.Draw.ASCII.Letters.CreateGLChar uses eax ecx ebx edi,\ ret endp -proc Graphics.Draw.ASCII.Letters.GetLetterLen uses ebx,\ +proc Graphics.Draw.ASCII.Letters.GetLetterLen,\ letter, multiplier mov ebx, [letter] - stdcall Math.Absolute, [multiplier] - mov eax, [multiplier] - cmp eax, 0 - jne @F - inc eax + cmp dword [ebx + 4], -1 + je @F + stdcall Scripts.Getters.GetIMULNumber, [ebx + 4], [multiplier] + mov ebx, 1 + jmp .exit @@: - stdcall Scripts.Getters.GetIMULNumber, [ebx + 4], eax - ret + stdcall Scripts.Getters.GetIMULNumber, [ebx + 8], [multiplier] + mov ebx, -1 + .exit: + ret endp \ No newline at end of file diff --git a/Graphics/Draw/Components/PauseButton.asm b/Graphics/Draw/Components/PauseButton.asm index b18d08a..d6034c5 100644 --- a/Graphics/Draw/Components/PauseButton.asm +++ b/Graphics/Draw/Components/PauseButton.asm @@ -1,6 +1,6 @@ proc Graphics.Draw.Components.PauseButton stdcall Graphics.Draw.Shapes, pause_btn_fnt_design, pause_button_color stdcall Graphics.Draw.Shapes, pause_btn_lines_design, book_title_color - stdcall Graphics.Draw.Text.Write, txt_P_hk, book_title_color + stdcall Graphics.Draw.Text.Write, [txt_P_hk], book_title_color ret endp \ No newline at end of file diff --git a/Graphics/Draw/Components/RecoveryButton.asm b/Graphics/Draw/Components/RecoveryButton.asm index 69cfe99..0cc82ad 100644 --- a/Graphics/Draw/Components/RecoveryButton.asm +++ b/Graphics/Draw/Components/RecoveryButton.asm @@ -5,6 +5,6 @@ proc Graphics.Draw.Components.RecoveryButton stdcall Graphics.Draw.Shapes, recovery_btn_fntblock_design, recovery_button_color stdcall Graphics.Draw.Shapes, recovery_btn_lftriangle_design, book_title_color stdcall Graphics.Draw.Shapes, recovery_btn_rgtriangle_design, book_title_color - stdcall Graphics.Draw.Text.Write, txt_R_hk, book_title_color + stdcall Graphics.Draw.Text.Write, [txt_R_hk], book_title_color ret endp \ No newline at end of file diff --git a/Graphics/Draw/Components/SettingsButton.asm b/Graphics/Draw/Components/SettingsButton.asm index bd81210..2550788 100644 --- a/Graphics/Draw/Components/SettingsButton.asm +++ b/Graphics/Draw/Components/SettingsButton.asm @@ -4,6 +4,6 @@ proc Graphics.Draw.Components.SettingsButton stdcall Graphics.Draw.Shapes, settings_btn_in_circle_design, settings_button_color stdcall Graphics.Draw.Shapes, settings_btn_mainline_design, book_title_color stdcall Graphics.Draw.Shapes, settings_btn_subline_design, book_title_color - stdcall Graphics.Draw.Text.Write, txt_S_hk, book_title_color + stdcall Graphics.Draw.Text.Write, [txt_S_hk], book_title_color ret endp \ No newline at end of file diff --git a/Graphics/Draw/Text.asm b/Graphics/Draw/Text.asm index 7b72cf0..1f29666 100644 --- a/Graphics/Draw/Text.asm +++ b/Graphics/Draw/Text.asm @@ -26,16 +26,45 @@ proc Graphics.Draw.Text.Write uses ebx ecx,\ ret endp +proc Graphics.Draw.Text.GetLength uses ebx edx,\ + string + mov ebx, [string] + xor eax, eax + xor edx, edx + .mainLoop: + mov dl, byte [ebx] + inc ebx + inc eax + cmp dl, 0 + jne .mainLoop + dec eax + ret +endp + proc Graphics.Draw.Text.Prepear uses eax ebx edi,\ result, string, fontSize, fontGap, position locals x dd ? y dd ? multiplier dd 4 - counterLen dd 0 + counterLen dd ? fs_multiplier dd ? + startX dd ? + startY dd ? endl + stdcall Graphics.Draw.Text.GetLength, [string] + mov [counterLen], eax + mov ebx, sizeof.Char ; sizeof Char + imul dword ebx ; Char * count + add eax, 4 ; main length + mov ebx, [result] + malloc eax + mov [ebx], eax .start: + mov ebx, spl_50 + add ebx, 8 + mov eax, [fontSize] + mov [ebx], eax ; multiplier stdcall Scripts.Getters.GetFSMultiplier, fs_default, [fontSize] mov [fs_multiplier], eax @@ -44,19 +73,21 @@ proc Graphics.Draw.Text.Prepear uses eax ebx edi,\ ; x mov eax, [ebx] mov [x], eax + mov [startX], eax ; y mov eax, [ebx + 4] mov [y], eax + mov [startY], eax .main: mov ebx, [string] mov edi, [result] + mov edi, [edi] add edi, 4 .while: xor eax, eax - mov al, [ebx] + mov al, byte [ebx] cmp eax, 0 je .exit - inc [counterLen] .do: dec eax mul dword [multiplier] @@ -64,15 +95,25 @@ proc Graphics.Draw.Text.Prepear uses eax ebx edi,\ xchg ebx, eax stdcall Graphics.Draw.ASCII.Letters.CreateGLChar, edi, [arr_of_letters + ebx], [x], [y], [fs_multiplier] stdcall Graphics.Draw.ASCII.Letters.GetLetterLen, [arr_of_letters + ebx], [fs_multiplier] - add eax, [fontGap] - add eax, 10 - add [x], eax + cmp ebx, -1 + je @F + add eax, [fontGap] + add eax, 10 + add [x], eax + jmp .exitFromWhile + @@: + add [y], eax + mov eax, [startX] + mov [x], eax + jmp .exitFromWhile + .exitFromWhile: pop ebx inc ebx add edi, 228 ; skip char jmp .while .exit: mov ebx, [result] + mov ebx, [ebx] mov eax, [counterLen] mov [ebx], eax ret diff --git a/Graphics/Includes/Data/Letters.inc b/Graphics/Includes/Data/Letters.inc index bdbbaf1..589ef30 100644 --- a/Graphics/Includes/Data/Letters.inc +++ b/Graphics/Includes/Data/Letters.inc @@ -49,13 +49,10 @@ fs_info = 20 fs_cost = 18 fs_watermark = 10 fs_return = 10 - fs_pause = 10 fs_exit = 1 fs_saveAexit = -1 - fs_hk = -5 - fs_winner = 10 fs_score = -10 fs_score_num = 5 @@ -65,13 +62,12 @@ fs_chhotkeys = -5 fs_music = -2 fs_hotkeys = -2 fs_switch = -10 - fs_default = 20 fs_HPhotkeys = 10 - fs_wantExit = 10 fs_yesno = 5 - +fs_gamerool = 27 +fs_grtext = 0 include 'Letters/RussianLetters.inc' include 'Letters/Digits.inc' diff --git a/Graphics/Includes/Data/Letters/SpecialSymb.inc b/Graphics/Includes/Data/Letters/SpecialSymb.inc index 180ab41..59703ef 100644 --- a/Graphics/Includes/Data/Letters/SpecialSymb.inc +++ b/Graphics/Includes/Data/Letters/SpecialSymb.inc @@ -2,12 +2,8 @@ spl_44 dd -1, 0 ; ',' spl_45 dd ? -; '<-' -spl_46 dd 2, 20,\ - 14, 0, 14, 3, 0, 10, 0, 7,\ - 14, 14, 14, 17, 0, 10, 0, 7 - ; x from 46 to 61 - ; y from 1014 to 1032 +; '.' +spl_46 dd ? ; '?' spl_47 dd 6, 10,\ 3, 24, 3, 28, 7, 28, 7, 24,\ @@ -16,9 +12,12 @@ spl_47 dd 6, 10,\ 6, 13, 9, 13, 9, 4, 6, 4,\ 6, 5, 3, 0, 6, 0, 9, 4,\ 0, 5, 2, 7, 6, 0, 3, 0 +; '!' spl_48 dd ? +; '-' spl_49 dd ? -spl_50 dd ? +; '\n' +spl_50 dd -1, -1, ? spl_51 dd ? spl_52 dd ? spl_53 dd ? \ No newline at end of file diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index be3902d..80b11dd 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -56,6 +56,8 @@ tg_switch = 6 tg_HPhotkeys = 10 tg_wantExit = 10 tg_yesno = 7 +tg_gamerool = 10 +tg_grtext = 5 ; ====== Interfaces ====== ; struct Points @@ -84,34 +86,6 @@ struct Char quads Quads ? ends -struct Chars - c1 Char ? - c2 Char ? - c3 Char ? - c4 Char ? - c5 Char ? - c6 Char ? - c7 Char ? - c8 Char ? - c9 Char ? - c10 Char ? - c11 Char ? - c12 Char ? - c13 Char ? - c14 Char ? - c15 Char ? - c16 Char ? - c17 Char ? - c18 Char ? - c19 Char ? - c20 Char ? -ends - -struct String - len dd 0 - chars Chars ? -ends - ; ====== Business models ====== ; str_headline db 20, 1, 12, 20, 10, 12, 1, 0 ; 'ТАКТИКА' str_headline_pos dd 673, 112 @@ -127,7 +101,6 @@ str_title db 13, 6, 15, 10, 15, 4, 18, 1, 5, 0 ; 'ЛЕНИНГР str_title_pos dd 411, 871 str_return db 15, 1, 9, 1, 5, 0 ; '<-' str_return_pos dd 55, 1001 - str_pause db 17, 1, 21, 9, 1, 0 ; 'ПАУЗА' str_pause_pos dd 882, 444 str_exit db 3, 29, 11, 20, 10, 0 ; 'ВЫЙТИ' @@ -135,7 +108,6 @@ str_exit_pos dd 915, 584 str_Mexit_pos dd 1184, 862 str_saveAexit db 19, 16, 23, 18, 1, 15, 10, 20, 30, 44, 10, 44, 3, 29, 11, 20, 10, 0 ; 'СОХРАНИТЬ И ВЫЙТИ' str_saveAexit_pos dd 802, 523 - str_winner db 17, 16, 2, 6, 5, 1, 0; 'ПОБЕДА' str_winner_pos dd 863, 393 str_score db 19, 25, 7, 20, 0 ; 'СЧЁТ' @@ -147,13 +119,10 @@ str_again_pos dd 907, 527 str_wexit_pos dd 917, 590 str_stats db 19, 20, 1, 20, 10, 19, 20, 10, 12, 1, 0 ; 'СТАТИСТИКА' str_stats_pos dd 867, 648 - str_msettings_pos dd 845, 420 - str_chhotkeys db 19, 14, 6, 15, 1, 44, 4, 16, 18, 33, 25, 10, 23, 44, 12, 13, 1, 3, 10, 26, 0 ; 'СМЕНА ГОРЯЧИХ КЛАВИШ' str_chhotkeys_pos dd 817, 637 str_HPhotkeys_pos dd 698, 414 - str_music db 14, 21, 9, 29, 12, 1, 0 ; 'МУЗЫКА' str_music_pos dd 783, 540 str_voice db 9, 3, 21, 12, 10, 0 ; 'ЗВУКИ' @@ -162,7 +131,6 @@ str_hotkeys db 4, 16, 18, 33, 25, 10, 6, 44, 12, 13, 1, 3, 10, 26, str_hotkeys_pos dd 802, 598 str_volume db 4, 18, 16, 14, 12, 16, 19, 20, 30, 0 ; 'ГРОМКОСТЬ' str_volume_pos dd 754, 506 - str_off db 68, 59, 59, 0 ; 'OFF' str_moff_pos dd 922, 545 str_voff_pos dd 1104, 545 @@ -171,14 +139,12 @@ str_on db 68, 67, 0 ; 'ON' str_mon_pos dd 911, 545 str_von_pos dd 1091, 545 str_hon_pos dd 1074, 603 - str_wantExit db 3, 29, 44, 23, 16, 20, 10, 20, 6, 44, 3, 29, 11, 20, 10, 47, 0 ; 'ВЫ ХОТИТЕ ВЫЙТИ?' str_wantExit_pos dd 762, 485 str_yes db 5, 1, 0 ; 'ДА' str_yes_pos dd 835, 553 str_no db 15, 6, 20, 0 ; 'НЕТ' str_no_pos dd 1034, 552 - str_R_hk db 71, 0 ; 'R' str_R_hk_pos dd 1805, 29 str_S_hk db 72, 0 ; 'S' @@ -186,53 +152,63 @@ str_S_hk_pos dd 1875, 29 str_P_hk db 69, 0 ; 'P' str_P_hk_pos dd 1736, 29 -str_cost db 'ЦЕНА 2р.50к.', 0 -str_info db 'СУВЕНИР-ГОЛОВОЛОМКА', 0 -str_watermark db 'АРТ. С-АГ-1648-А', 0 - +str_gamerool db 17, 18, 1, 3, 10, 13, 1, 44, 10, 4, 18, 29, 0; 'ПРАВИЛА ИГРЫ' +str_gamerool_pos dd 728, 273 + +str_grtext db 44, 44,\ + 18, 1, 9, 14, 6, 19, 20, 10, 3, 44,\ + 26, 1, 26, 12, 10, 44,\ + 10, 4, 18, 16, 12, 44, 0;,\ + ; 5, 6, 13, 1, 20, 44,\ + ; 17, 6, 18, 3, 29, 4, 10, 3, 1, 44,\ + ; 16, 5, 15, 16, 11, 44,\ + ; 10, 9, 44,\ + ; 1, 44,\ + ; 26, 1, 26, 12, 44,\ + ; 19, 0 +str_grtext_pos dd 174, 362 ; ====== Program models ====== ; -txt_headline String ? -txt_headline_bc String ? -txt_play String ? -txt_about String ? -txt_settings String ? -txt_Mexit String ? -txt_title String ? -txt_cost String ? -txt_info String ? -txt_watermark String ? -txt_return String ? - -txt_R_hk String ? -txt_P_hk String ? -txt_S_hk String ? - -txt_pause String ? -txt_exit String ? -txt_saveAexit String ? - -txt_winner String ? -txt_score String ? -txt_score_num String ? -txt_again String ? -txt_wexit String ? -txt_stats String ? -txt_msettings String ? -txt_chhotkeys String ? -txt_music String ? -txt_voice String ? -txt_hotkeys String ? -txt_HPhotkeys String ? -txt_volume String ? -txt_moff String ? -txt_voff String ? -txt_hoff String ? -txt_mon String ? -txt_von String ? -txt_hon String ? -txt_wantExit String ? -txt_yes String ? -txt_no String ? +txt_headline dd ? +txt_headline_bc dd ? +txt_play dd ? +txt_about dd ? +txt_settings dd ? +txt_Mexit dd ? +txt_title dd ? +txt_cost dd ? +txt_info dd ? +txt_watermark dd ? +txt_return dd ? +txt_R_hk dd ? +txt_P_hk dd ? +txt_S_hk dd ? +txt_pause dd ? +txt_exit dd ? +txt_saveAexit dd ? +txt_winner dd ? +txt_score dd ? +txt_score_num dd ? +txt_again dd ? +txt_wexit dd ? +txt_stats dd ? +txt_msettings dd ? +txt_chhotkeys dd ? +txt_music dd ? +txt_voice dd ? +txt_hotkeys dd ? +txt_HPhotkeys dd ? +txt_volume dd ? +txt_moff dd ? +txt_voff dd ? +txt_hoff dd ? +txt_mon dd ? +txt_von dd ? +txt_hon dd ? +txt_wantExit dd ? +txt_yes dd ? +txt_no dd ? +txt_gamerool dd ? +txt_grtext dd ? arr_of_letters dd ltr_RU_1, ltr_RU_2, ltr_RU_3, ltr_RU_4, ltr_RU_5, ltr_RU_6, ltr_RU_7,\ ; RU ltr_RU_8, ltr_RU_9, ltr_RU_10, ltr_RU_11, ltr_RU_12, ltr_RU_13, ltr_RU_14,\ diff --git a/Graphics/Includes/DataPrepears.asm b/Graphics/Includes/DataPrepears.asm index 136bf52..7349afa 100644 --- a/Graphics/Includes/DataPrepears.asm +++ b/Graphics/Includes/DataPrepears.asm @@ -1,4 +1,13 @@ +; 375 44 485 32 86 Генадий Григорьевич proc Graphics.Draw.CoordsRectPrepears + ; animation blocks + stdcall Graphics.Draw.CoordsRectPrepears.ForAnimations + ; quard obj + stdcall Scripts.Getters.ConvertWithQuardCoords, settings_btn_subline_coords, settings_btn_subline_design + stdcall Scripts.Getters.ConvertWithQuardCoords, pp_return_chrest_coords, pp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, wp_return_chrest_coords, wp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, sp_return_chrest_coords, sp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, hp_return_chrest_coords, hp_return_chrest_design ; default stdcall Scripts.Getters.ConvertCoords, font_coords, font_design stdcall Scripts.Getters.ConvertCoords, book_root_coords, book_root_design @@ -9,8 +18,6 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, book_brd_coords, book_brd_design stdcall Scripts.Getters.ConvertCoords, book_flgpl_coords, book_flgpl_design stdcall Scripts.Getters.ConvertCoords, button_exit_coords, button_exit_design - stdcall Graphics.Draw.CoordsRectPrepears.ForAnimations - stdcall Scripts.Getters.ConvertCoords, mp_gamefont_coords, mp_gamefont_design stdcall Scripts.Getters.ConvertCoords, mg_gamebrdr_coords, mp_gamebrdr_design stdcall Scripts.Getters.ConvertCoords, mp_grbgbrdr_coords, mp_grbgbrdr_design @@ -18,28 +25,22 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, mp_fntvertln_coords, mp_fntvertln_design stdcall Scripts.Getters.ConvertCoords, mp_fnthortln_coords, mp_fnthortln_design stdcall Scripts.Getters.ConvertCoords, exitbtn_font_coords, exitbtn_font_design - stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr1_coords, lp_bar_brdr1_design stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr2_coords, lp_bar_brdr2_design stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr3_coords, lp_bar_brdr3_design stdcall Scripts.Getters.ConvertCoords, lp_bar_main_coords, lp_bar_main_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_fnt_coords, recovery_btn_fnt_design stdcall Scripts.Getters.ConvertCoords, recovery_btn_out_circle_coords, recovery_btn_out_circle_design stdcall Scripts.Getters.ConvertCoords, recovery_btn_in_circle_coords, recovery_btn_in_circle_design stdcall Scripts.Getters.ConvertCoords, recovery_btn_fntblock_coords, recovery_btn_fntblock_design stdcall Scripts.Getters.ConvertCoords, recovery_btn_lftriangle_coords, recovery_btn_lftriangle_design stdcall Scripts.Getters.ConvertCoords, recovery_btn_rgtriangle_coords, recovery_btn_rgtriangle_design - stdcall Scripts.Getters.ConvertCoords, settings_btn_fnt_coords, settings_btn_fnt_design - stdcall Scripts.Getters.ConvertCoords, pause_btn_fnt_coords, pause_btn_fnt_design stdcall Scripts.Getters.ConvertCoords, pause_btn_lines_coords, pause_btn_lines_design stdcall Scripts.Getters.ConvertCoords, settings_btn_out_circle_coords, settings_btn_out_circle_design stdcall Scripts.Getters.ConvertCoords, settings_btn_in_circle_coords, settings_btn_in_circle_design stdcall Scripts.Getters.ConvertCoords, settings_btn_mainline_coords, settings_btn_mainline_design - stdcall Scripts.Getters.ConvertWithQuardCoords, settings_btn_subline_coords, settings_btn_subline_design - stdcall Scripts.Getters.ConvertCoords, pp_border_coords, pp_border_desing stdcall Scripts.Getters.ConvertCoords, pp_font_coords, pp_font_desing stdcall Scripts.Getters.ConvertCoords, pp_return_circle_coords, pp_return_circle_desing @@ -47,12 +48,9 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, pp_esbtn_font_coords, pp_esbtn_font_desing stdcall Scripts.Getters.ConvertCoords, pp_ebtn_brdr_coords, pp_ebtn_brdr_design stdcall Scripts.Getters.ConvertCoords, pp_ebtn_font_coords, pp_ebtn_font_desing - stdcall Scripts.Getters.ConvertWithQuardCoords, pp_return_chrest_coords, pp_return_chrest_design - stdcall Scripts.Getters.ConvertCoords, wp_border_coords, wp_border_design stdcall Scripts.Getters.ConvertCoords, wp_font_coords, wp_font_desing stdcall Scripts.Getters.ConvertCoords, wp_return_circle_coords, wp_return_circle_desing - stdcall Scripts.Getters.ConvertWithQuardCoords, wp_return_chrest_coords, wp_return_chrest_design stdcall Scripts.Getters.ConvertCoords, wp_line_coords, wp_line_design stdcall Scripts.Getters.ConvertCoords, wp_againbtn_brdr_coords, wp_againbtn_brdr_design stdcall Scripts.Getters.ConvertCoords, wp_againbtn_font_coords, wp_againbtn_font_design @@ -60,15 +58,12 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, wp_exitbtn_font_coords, wp_exitbtn_font_design stdcall Scripts.Getters.ConvertCoords, wp_leadbtn_brdr_coords, wp_leadbtn_brdr_design stdcall Scripts.Getters.ConvertCoords, wp_leadbtn_font_coords, wp_leadbtn_font_design - stdcall Scripts.Getters.ConvertCoords, sp_border_coords, sp_border_design stdcall Scripts.Getters.ConvertCoords, sp_font_coords, sp_font_design stdcall Scripts.Getters.ConvertCoords, sp_return_circle_coords, sp_return_circle_design - stdcall Scripts.Getters.ConvertWithQuardCoords, sp_return_chrest_coords, sp_return_chrest_design stdcall Scripts.Getters.ConvertCoords, sp_lines_coords, sp_lines_design stdcall Scripts.Getters.ConvertCoords, sp_chhkbrdr_coords, sp_chhkbrdr_design stdcall Scripts.Getters.ConvertCoords, sp_chhkfont_coords, sp_chhkfont_design - stdcall Scripts.Getters.ConvertCoords, sp_switch_mbrdr_coords, sp_switch_mbrdr_design stdcall Scripts.Getters.ConvertCoords, sp_switch_mfont_coords, sp_switch_mfont_design stdcall Scripts.Getters.ConvertCoords, sp_switch_vbrdr_coords, sp_switch_vbrdr_design @@ -84,14 +79,11 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, sp_switch_von_coords, sp_switch_von_design stdcall Scripts.Getters.ConvertCoords, sp_switch_hoff_coords, sp_switch_hoff_design stdcall Scripts.Getters.ConvertCoords, sp_switch_hon_coords, sp_switch_hon_design - stdcall Scripts.Getters.ConvertCoords, lp_boatsprite_coords, lp_boatsprite_design stdcall Scripts.Getters.ConvertCoords, mp_boatsprite_coords, mp_boatsprite_design - stdcall Scripts.Getters.ConvertCoords, hp_border_coords, hp_border_design stdcall Scripts.Getters.ConvertCoords, hp_font_coords, hp_font_desing stdcall Scripts.Getters.ConvertCoords, hp_return_circle_coords, hp_return_circle_desing - stdcall Scripts.Getters.ConvertWithQuardCoords, hp_return_chrest_coords, hp_return_chrest_design stdcall Scripts.Getters.ConvertCoords, hp_playbrdr_coords, hp_playbrdr_design stdcall Scripts.Getters.ConvertCoords, hp_playfont_coords, hp_playfont_design stdcall Scripts.Getters.ConvertCoords, hp_pausebrdr_coords, hp_pausebrdr_design @@ -104,18 +96,14 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Scripts.Getters.ConvertCoords, hp_stngfont_coords, hp_stngfont_design stdcall Scripts.Getters.ConvertCoords, hp_rstrbrdr_coords, hp_rstrbrdr_design stdcall Scripts.Getters.ConvertCoords, hp_rstrfont_coords, hp_rstrfont_design - stdcall Scripts.Getters.ConvertCoords, ep_border_coords, ep_border_design stdcall Scripts.Getters.ConvertCoords, ep_font_coords, ep_font_desing stdcall Scripts.Getters.ConvertCoords, ep_yes_brdr_coords, ep_yes_brdr_design stdcall Scripts.Getters.ConvertCoords, ep_yes_font_coords, ep_yes_font_design stdcall Scripts.Getters.ConvertCoords, ep_no_brdr_coords, ep_no_brdr_design stdcall Scripts.Getters.ConvertCoords, ep_no_font_coords, ep_no_font_design - stdcall Scripts.Getters.ConvertCoords, ap_brdr_coords, ap_brdr_design stdcall Scripts.Getters.ConvertCoords, ap_font_coords, ap_font_design - -; 375 44 485 32 86 Генадий Григорьевич ; repeat stdcall Scripts.Getters.ConvertRepeatCoords, book_strk_design ret @@ -128,18 +116,17 @@ proc Graphics.Draw.CoordsRectPrepears.ForAnimations endp proc Graphics.Colors.Prepear - stdcall Scripts.Getters.Color, [cl_background], font_color - stdcall Scripts.Getters.Color, [cl_root], book_root_color - stdcall Scripts.Getters.Color, [cl_stroke], book_strk_color - stdcall Scripts.Getters.Color, [cl_ending], book_endg_color - stdcall Scripts.Getters.Color, [cl_border], book_ebrd_color - stdcall Scripts.Getters.Color, [cl_button], button_color - stdcall Scripts.Getters.Color, [cl_headline], headline_color - stdcall Scripts.Getters.Color, [cl_headline_bc], headline_bc_color - stdcall Scripts.Getters.Color, [cl_flgpl], book_flgpl_color - stdcall Scripts.Getters.Color, [cl_text_buttom], btn_text_color - stdcall Scripts.Getters.Color, [cl_title], book_title_color - + stdcall Scripts.Getters.Color, [cl_background], font_color + stdcall Scripts.Getters.Color, [cl_root], book_root_color + stdcall Scripts.Getters.Color, [cl_stroke], book_strk_color + stdcall Scripts.Getters.Color, [cl_ending], book_endg_color + stdcall Scripts.Getters.Color, [cl_border], book_ebrd_color + stdcall Scripts.Getters.Color, [cl_button], button_color + stdcall Scripts.Getters.Color, [cl_headline], headline_color + stdcall Scripts.Getters.Color, [cl_headline_bc], headline_bc_color + stdcall Scripts.Getters.Color, [cl_flgpl], book_flgpl_color + stdcall Scripts.Getters.Color, [cl_text_buttom], btn_text_color + stdcall Scripts.Getters.Color, [cl_title], book_title_color stdcall Scripts.Getters.Color, [cl_milk], milk_color stdcall Scripts.Getters.Color, [cl_milk_light], milk_light_color stdcall Scripts.Getters.Color, [cl_brown], brown_color @@ -158,56 +145,48 @@ proc Graphics.Colors.Prepear stdcall Scripts.Getters.Color, [cl_orange], orange_color stdcall Scripts.Getters.Color, [cl_pale], pale_color stdcall Scripts.Getters.Color, [cl_brow_black], brown_black_color - ret endp proc Graphics.Draw.ASCIIPrepear - stdcall Graphics.Draw.Text.Prepear, txt_headline, str_headline, fs_headline, tg_headline, str_headline_pos - stdcall Graphics.Draw.Text.Prepear, txt_headline_bc, str_headline_bc, fs_headline, tg_headline, str_headline_bc_pos - stdcall Graphics.Draw.Text.Prepear, txt_play, str_play, fs_play, tg_play, str_play_pos - stdcall Graphics.Draw.Text.Prepear, txt_about, str_about, fs_about, tg_about, str_about_pos - stdcall Graphics.Draw.Text.Prepear, txt_settings, str_settings, fs_settings, tg_settings, str_settings_pos - stdcall Graphics.Draw.Text.Prepear, txt_Mexit, str_exit, fs_Mexit, tg_Mexit, str_Mexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_title, str_title, fs_title, tg_title, str_title_pos - stdcall Graphics.Draw.Text.Prepear, txt_return, str_return, fs_return, tg_return, str_return_pos - ;stdcall Graphics.Draw.Text.Prepear, txt_cost, str_cost, fs_cost, tg_cost - ;stdcall Graphics.Draw.Text.Prepear, txt_info, str_info, fs_info, tg_info - ;stdcall Graphics.Draw.Text.Prepear, txt_watermark, str_watermark, fs_watermark, tg_watermark - - stdcall Graphics.Draw.Text.Prepear, txt_R_hk, str_R_hk, fs_hk, tg_hk, str_R_hk_pos - stdcall Graphics.Draw.Text.Prepear, txt_P_hk, str_P_hk, fs_hk, tg_hk, str_P_hk_pos - stdcall Graphics.Draw.Text.Prepear, txt_S_hk, str_S_hk, fs_hk, tg_hk, str_S_hk_pos - - stdcall Graphics.Draw.Text.Prepear, txt_pause, str_pause, fs_pause, tg_pause, str_pause_pos - stdcall Graphics.Draw.Text.Prepear, txt_exit, str_exit, fs_exit, tg_exit, str_exit_pos - stdcall Graphics.Draw.Text.Prepear, txt_saveAexit, str_saveAexit, fs_saveAexit, tg_saveAexit, str_saveAexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_winner, str_winner, fs_winner, tg_winner, str_winner_pos - stdcall Graphics.Draw.Text.Prepear, txt_score, str_score, fs_score, tg_score, str_score_pos - stdcall Graphics.Draw.Text.Prepear, txt_score_num, str_score_num, fs_score_num, tg_score_num, str_score_num_pos - stdcall Graphics.Draw.Text.Prepear, txt_again, str_again, fs_again, tg_again, str_again_pos - stdcall Graphics.Draw.Text.Prepear, txt_wexit, str_exit, fs_again, tg_again, str_wexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_stats, str_stats, fs_again, tg_again, str_stats_pos - stdcall Graphics.Draw.Text.Prepear, txt_msettings, str_settings, fs_msettings, tg_msettings, str_msettings_pos - stdcall Graphics.Draw.Text.Prepear, txt_chhotkeys, str_chhotkeys, fs_chhotkeys, tg_chhotkeys, str_chhotkeys_pos - stdcall Graphics.Draw.Text.Prepear, txt_music, str_music, fs_music, tg_music, str_music_pos - stdcall Graphics.Draw.Text.Prepear, txt_voice, str_voice, fs_music, tg_voice, str_voice_pos - stdcall Graphics.Draw.Text.Prepear, txt_hotkeys, str_hotkeys, fs_hotkeys, tg_hotkeys, str_hotkeys_pos - stdcall Graphics.Draw.Text.Prepear, txt_volume, str_volume, fs_music, tg_volume, str_volume_pos - - stdcall Graphics.Draw.Text.Prepear, txt_moff, str_off, fs_switch, tg_switch, str_moff_pos - stdcall Graphics.Draw.Text.Prepear, txt_voff, str_off, fs_switch, tg_switch, str_voff_pos - stdcall Graphics.Draw.Text.Prepear, txt_hoff, str_off, fs_switch, tg_switch, str_hoff_pos - stdcall Graphics.Draw.Text.Prepear, txt_mon, str_on, fs_switch, tg_switch, str_mon_pos - stdcall Graphics.Draw.Text.Prepear, txt_von, str_on, fs_switch, tg_switch, str_von_pos - stdcall Graphics.Draw.Text.Prepear, txt_hon, str_on, fs_switch, tg_switch, str_hon_pos - - stdcall Graphics.Draw.Text.Prepear, txt_HPhotkeys, str_chhotkeys, fs_HPhotkeys, tg_HPhotkeys, str_HPhotkeys_pos - - stdcall Graphics.Draw.Text.Prepear, txt_wantExit, str_wantExit, fs_wantExit, tg_wantExit, str_wantExit_pos - stdcall Graphics.Draw.Text.Prepear, txt_yes, str_yes, fs_yesno, tg_yesno, str_yes_pos - stdcall Graphics.Draw.Text.Prepear, txt_no, str_no, fs_yesno, tg_yesno, str_no_pos - + stdcall Graphics.Draw.Text.Prepear, txt_headline, str_headline, fs_headline, tg_headline, str_headline_pos + stdcall Graphics.Draw.Text.Prepear, txt_headline_bc, str_headline_bc, fs_headline, tg_headline, str_headline_bc_pos + stdcall Graphics.Draw.Text.Prepear, txt_play, str_play, fs_play, tg_play, str_play_pos + stdcall Graphics.Draw.Text.Prepear, txt_about, str_about, fs_about, tg_about, str_about_pos + stdcall Graphics.Draw.Text.Prepear, txt_settings, str_settings, fs_settings, tg_settings, str_settings_pos + stdcall Graphics.Draw.Text.Prepear, txt_Mexit, str_exit, fs_Mexit, tg_Mexit, str_Mexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_title, str_title, fs_title, tg_title, str_title_pos + stdcall Graphics.Draw.Text.Prepear, txt_return, str_return, fs_return, tg_return, str_return_pos + stdcall Graphics.Draw.Text.Prepear, txt_R_hk, str_R_hk, fs_hk, tg_hk, str_R_hk_pos + stdcall Graphics.Draw.Text.Prepear, txt_P_hk, str_P_hk, fs_hk, tg_hk, str_P_hk_pos + stdcall Graphics.Draw.Text.Prepear, txt_S_hk, str_S_hk, fs_hk, tg_hk, str_S_hk_pos + stdcall Graphics.Draw.Text.Prepear, txt_pause, str_pause, fs_pause, tg_pause, str_pause_pos + stdcall Graphics.Draw.Text.Prepear, txt_exit, str_exit, fs_exit, tg_exit, str_exit_pos + stdcall Graphics.Draw.Text.Prepear, txt_saveAexit, str_saveAexit, fs_saveAexit, tg_saveAexit, str_saveAexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_winner, str_winner, fs_winner, tg_winner, str_winner_pos + stdcall Graphics.Draw.Text.Prepear, txt_score, str_score, fs_score, tg_score, str_score_pos + stdcall Graphics.Draw.Text.Prepear, txt_score_num, str_score_num, fs_score_num, tg_score_num, str_score_num_pos + stdcall Graphics.Draw.Text.Prepear, txt_again, str_again, fs_again, tg_again, str_again_pos + stdcall Graphics.Draw.Text.Prepear, txt_wexit, str_exit, fs_again, tg_again, str_wexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_stats, str_stats, fs_again, tg_again, str_stats_pos + stdcall Graphics.Draw.Text.Prepear, txt_msettings, str_settings, fs_msettings, tg_msettings, str_msettings_pos + stdcall Graphics.Draw.Text.Prepear, txt_chhotkeys, str_chhotkeys, fs_chhotkeys, tg_chhotkeys, str_chhotkeys_pos + stdcall Graphics.Draw.Text.Prepear, txt_music, str_music, fs_music, tg_music, str_music_pos + stdcall Graphics.Draw.Text.Prepear, txt_voice, str_voice, fs_music, tg_voice, str_voice_pos + stdcall Graphics.Draw.Text.Prepear, txt_hotkeys, str_hotkeys, fs_hotkeys, tg_hotkeys, str_hotkeys_pos + stdcall Graphics.Draw.Text.Prepear, txt_volume, str_volume, fs_music, tg_volume, str_volume_pos + stdcall Graphics.Draw.Text.Prepear, txt_moff, str_off, fs_switch, tg_switch, str_moff_pos + stdcall Graphics.Draw.Text.Prepear, txt_voff, str_off, fs_switch, tg_switch, str_voff_pos + stdcall Graphics.Draw.Text.Prepear, txt_hoff, str_off, fs_switch, tg_switch, str_hoff_pos + stdcall Graphics.Draw.Text.Prepear, txt_mon, str_on, fs_switch, tg_switch, str_mon_pos + stdcall Graphics.Draw.Text.Prepear, txt_von, str_on, fs_switch, tg_switch, str_von_pos + stdcall Graphics.Draw.Text.Prepear, txt_hon, str_on, fs_switch, tg_switch, str_hon_pos + stdcall Graphics.Draw.Text.Prepear, txt_HPhotkeys, str_chhotkeys, fs_HPhotkeys, tg_HPhotkeys, str_HPhotkeys_pos + stdcall Graphics.Draw.Text.Prepear, txt_wantExit, str_wantExit, fs_wantExit, tg_wantExit, str_wantExit_pos + stdcall Graphics.Draw.Text.Prepear, txt_yes, str_yes, fs_yesno, tg_yesno, str_yes_pos + stdcall Graphics.Draw.Text.Prepear, txt_no, str_no, fs_yesno, tg_yesno, str_no_pos + stdcall Graphics.Draw.Text.Prepear, txt_gamerool, str_gamerool, fs_gamerool, tg_gamerool, str_gamerool_pos + stdcall Graphics.Draw.Text.Prepear, txt_grtext, str_grtext, fs_grtext, tg_grtext, str_grtext_pos ret endp @@ -220,24 +199,19 @@ endp proc Game.PrepearTicks stdcall Game.CentersPrepear, TicksGameMap, TicksList_Centers, TicksMatrix stdcall Scripts.ModelsPrepear, TicksList_Centers, TicksList_Radiuses, TicksList_Float - stdcall Scripts.ModelsPrepear, TicksFontMltDrList_Centers, TicksFontList_Radiuses, TicksFontMltDrList_Float - ret endp proc Graphics.Colors.PrepearWithAlpha - ; stdcall Script.Colors.CopyColor, font_dark_color, font_color mov [font_dark_color.Red], 0.0 mov [font_dark_color.Green], 0.0 mov [font_dark_color.Blue], 0.0 - mov [font_dark_color.Alpha], 0.5 ret endp proc Graphics.Texture - stdcall Texture.Create, boatloading_texture, boatLoaderPath stdcall Texture.Create, boatbook_texture, boatBookPath ret diff --git a/Graphics/Pages/Pages.inc b/Graphics/Pages/Pages.inc index 091793c..59b9d13 100644 --- a/Graphics/Pages/Pages.inc +++ b/Graphics/Pages/Pages.inc @@ -9,7 +9,7 @@ HotkeysPage = 28 ExitPage = 32 PrevousPage dd MainPage -CurentPage dd LoadingPage +CurentPage dd MainPage PagesList dd Draw.Pages.LoadingPage, Draw.Pages.MainPage,\ Draw.Pages.GamePage, Draw.Pages.AboutPage,\ diff --git a/Graphics/Pages/_components/AboutPage.asm b/Graphics/Pages/_components/AboutPage.asm index c3e689e..1f7893a 100644 --- a/Graphics/Pages/_components/AboutPage.asm +++ b/Graphics/Pages/_components/AboutPage.asm @@ -2,6 +2,9 @@ proc Draw.Pages.AboutPage ; draw about block font stdcall Graphics.Draw.Shapes, ap_brdr_design, btn_text_color stdcall Graphics.Draw.Shapes, ap_font_design, milk_light_color - ;brown_medium_color + + ; text + stdcall Graphics.Draw.Text.Write, [txt_gamerool], btn_text_color + stdcall Graphics.Draw.Text.Write, [txt_grtext], btn_text_color ret endp \ No newline at end of file diff --git a/Graphics/Pages/_components/DefaultLayout.asm b/Graphics/Pages/_components/DefaultLayout.asm index c1b5a7b..ae6b353 100644 --- a/Graphics/Pages/_components/DefaultLayout.asm +++ b/Graphics/Pages/_components/DefaultLayout.asm @@ -18,7 +18,7 @@ proc Draw.Pages.DefaultLayout,\ jmp .exit @@: stdcall Graphics.Draw.Shapes, exitbtn_font_design, exit_button_color - stdcall Graphics.Draw.Text.Write, txt_return, brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_return], brown_text_color .exit: ret endp \ No newline at end of file diff --git a/Graphics/Pages/_components/ExitPage.asm b/Graphics/Pages/_components/ExitPage.asm index 0d0ab4c..5a8f055 100644 --- a/Graphics/Pages/_components/ExitPage.asm +++ b/Graphics/Pages/_components/ExitPage.asm @@ -8,16 +8,16 @@ proc Draw.Pages.ExitPage stdcall Graphics.Draw.Shapes, font_design, font_dark_color stdcall Graphics.Draw.Shapes, ep_border_design, brown_text_color stdcall Graphics.Draw.Shapes, ep_font_desing, milk_light_color - stdcall Graphics.Draw.Text.Write, txt_wantExit, brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_wantExit], brown_text_color ; yes stdcall Graphics.Draw.Shapes, ep_yes_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, ep_yes_font_design, yes_font_color - stdcall Graphics.Draw.Text.Write, txt_yes, yes_text_color + stdcall Graphics.Draw.Text.Write, [txt_yes], yes_text_color ; no stdcall Graphics.Draw.Shapes, ep_no_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, ep_no_font_design, no_font_color - stdcall Graphics.Draw.Text.Write, txt_no, no_text_color + stdcall Graphics.Draw.Text.Write, [txt_no], no_text_color ret endp \ No newline at end of file diff --git a/Graphics/Pages/_components/HotkeysPage.asm b/Graphics/Pages/_components/HotkeysPage.asm index 20b32df..38e6cea 100644 --- a/Graphics/Pages/_components/HotkeysPage.asm +++ b/Graphics/Pages/_components/HotkeysPage.asm @@ -8,7 +8,7 @@ proc Draw.Pages.HotkeysPage stdcall Graphics.Draw.Shapes, font_design, font_dark_color stdcall Graphics.Draw.Shapes, hp_border_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_font_desing, milk_light_color - stdcall Graphics.Draw.Text.Write, txt_HPhotkeys, brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_HPhotkeys], brown_text_color ; return button stdcall Graphics.Draw.Shapes, hp_return_circle_desing, retbtn_font_color diff --git a/Graphics/Pages/_components/MainPage.asm b/Graphics/Pages/_components/MainPage.asm index ff76677..6db3dbf 100644 --- a/Graphics/Pages/_components/MainPage.asm +++ b/Graphics/Pages/_components/MainPage.asm @@ -1,4 +1,7 @@ proc Draw.Pages.MainPage + .headline: + stdcall Graphics.Draw.Text.Write, [txt_headline_bc], headline_bc_color + stdcall Graphics.Draw.Text.Write, [txt_headline], headline_color .book: stdcall Graphics.Draw.Shapes, book_root_design, book_root_color stdcall Graphics.Draw.Shapes.Rect, book_strk_design, book_strk_color @@ -13,16 +16,13 @@ proc Draw.Pages.MainPage stdcall Graphics.Draw.Shapes, button_about_design, about_button_color stdcall Graphics.Draw.Shapes, button_stngs_design, settings_button_color stdcall Graphics.Draw.Shapes, button_exit_design, exit_button_color - .headline: - stdcall Graphics.Draw.Text.Write, txt_headline_bc, headline_bc_color - stdcall Graphics.Draw.Text.Write, txt_headline, headline_color .buttonText: - stdcall Graphics.Draw.Text.Write, txt_play, btn_text_color - stdcall Graphics.Draw.Text.Write, txt_about, btn_text_color - stdcall Graphics.Draw.Text.Write, txt_settings, btn_text_color - stdcall Graphics.Draw.Text.Write, txt_Mexit, btn_text_color + stdcall Graphics.Draw.Text.Write, [txt_play], btn_text_color + stdcall Graphics.Draw.Text.Write, [txt_about], btn_text_color + stdcall Graphics.Draw.Text.Write, [txt_settings], btn_text_color + stdcall Graphics.Draw.Text.Write, [txt_Mexit], btn_text_color .bookText: - stdcall Graphics.Draw.Text.Write, txt_title, book_title_color + stdcall Graphics.Draw.Text.Write, [txt_title], book_title_color .boat: stdcall Graphics.Draw.Sprite, [boatbook_texture], mp_boatsprite_design ret diff --git a/Graphics/Pages/_components/PausePage.asm b/Graphics/Pages/_components/PausePage.asm index d6e661f..206268e 100644 --- a/Graphics/Pages/_components/PausePage.asm +++ b/Graphics/Pages/_components/PausePage.asm @@ -16,14 +16,14 @@ proc Draw.Pages.PausePage ; save & exit stdcall Graphics.Draw.Shapes, pp_esbtn_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, pp_esbtn_font_desing, esbtn_font_color - stdcall Graphics.Draw.Text.Write, txt_saveAexit, esbtn_text_color + stdcall Graphics.Draw.Text.Write, [txt_saveAexit], esbtn_text_color ; exit stdcall Graphics.Draw.Shapes, pp_ebtn_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, pp_ebtn_font_desing, ebtn_font_color - stdcall Graphics.Draw.Text.Write, txt_exit, ebtn_text_color + stdcall Graphics.Draw.Text.Write, [txt_exit], ebtn_text_color ; txt_pause - stdcall Graphics.Draw.Text.Write, txt_pause, brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_pause], brown_text_color ret endp diff --git a/Graphics/Pages/_components/SettingsPage.asm b/Graphics/Pages/_components/SettingsPage.asm index 851bff7..7da98ab 100644 --- a/Graphics/Pages/_components/SettingsPage.asm +++ b/Graphics/Pages/_components/SettingsPage.asm @@ -9,7 +9,7 @@ proc Draw.Pages.SettingsPage stdcall Graphics.Draw.Shapes, sp_border_design, brown_text_color stdcall Graphics.Draw.Shapes, sp_font_design, milk_light_color stdcall Graphics.Draw.Shapes, sp_lines_design, book_ebrd_color - stdcall Graphics.Draw.Text.Write, txt_msettings, brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_msettings], brown_text_color ; return button stdcall Graphics.Draw.Shapes, sp_return_circle_design, retbtn_font_color @@ -18,22 +18,22 @@ proc Draw.Pages.SettingsPage ; change hot keys button stdcall Graphics.Draw.Shapes, sp_chhkbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, sp_chhkfont_design, chhtkeys_font_color - stdcall Graphics.Draw.Text.Write, txt_chhotkeys, chhtkeys_text_color + stdcall Graphics.Draw.Text.Write, [txt_chhotkeys], chhtkeys_text_color ; volume line stdcall Graphics.Draw.Shapes, sp_volume_font_design, brown_color stdcall Graphics.Draw.Shapes, sp_volume_cmpl_design, brown_text_color stdcall Graphics.Draw.Shapes, sp_volume_dot_design, brown_text_color - stdcall Graphics.Draw.Text.Write, txt_volume, brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_volume], brown_text_color - stdcall Draw.DrawSwitch, sp_switch_mbrdr_design, sp_switch_mfont_design, txt_music,\ - sp_switch_moff_design, txt_moff, sp_switch_mon_design, txt_mon, [IS_MUSIC_ON] + stdcall Draw.DrawSwitch, sp_switch_mbrdr_design, sp_switch_mfont_design, [txt_music],\ + sp_switch_moff_design, [txt_moff], sp_switch_mon_design, [txt_mon], [IS_MUSIC_ON] - stdcall Draw.DrawSwitch, sp_switch_vbrdr_design, sp_switch_vfont_design, txt_voice,\ - sp_switch_voff_design, txt_voff, sp_switch_von_design, txt_von, [IS_VOICE_ON] + stdcall Draw.DrawSwitch, sp_switch_vbrdr_design, sp_switch_vfont_design, [txt_voice],\ + sp_switch_voff_design, [txt_voff], sp_switch_von_design, [txt_von], [IS_VOICE_ON] - stdcall Draw.DrawSwitch, sp_switch_hbrdr_design, sp_switch_hfont_design, txt_hotkeys,\ - sp_switch_hoff_design, txt_hoff, sp_switch_hon_design, txt_hon, [IS_HOTKEY_ON] + stdcall Draw.DrawSwitch, sp_switch_hbrdr_design, sp_switch_hfont_design, [txt_hotkeys],\ + sp_switch_hoff_design, [txt_hoff], sp_switch_hon_design, [txt_hon], [IS_HOTKEY_ON] ret endp diff --git a/Graphics/Pages/_components/WinnerPage.asm b/Graphics/Pages/_components/WinnerPage.asm index 1166fe6..8184c9a 100644 --- a/Graphics/Pages/_components/WinnerPage.asm +++ b/Graphics/Pages/_components/WinnerPage.asm @@ -15,24 +15,24 @@ proc Draw.Pages.WinnerPage stdcall Graphics.Draw.Shapes, wp_return_chrest_design, retbtn_chrst_color ; txt winner - stdcall Graphics.Draw.Text.Write, txt_winner, brown_text_color - stdcall Graphics.Draw.Text.Write, txt_score_num, brown_black_color - stdcall Graphics.Draw.Text.Write, txt_score, brown_color + stdcall Graphics.Draw.Text.Write, [txt_winner], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_score_num], brown_black_color + stdcall Graphics.Draw.Text.Write, [txt_score], brown_color ; again button stdcall Graphics.Draw.Shapes, wp_againbtn_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, wp_againbtn_font_design, againbtn_font_color - stdcall Graphics.Draw.Text.Write, txt_again, againbtn_text_color + stdcall Graphics.Draw.Text.Write, [txt_again], againbtn_text_color ; exit button stdcall Graphics.Draw.Shapes, wp_exitbtn_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, wp_exitbtn_font_design, ebtn_font_color - stdcall Graphics.Draw.Text.Write, txt_wexit, ebtn_text_color + stdcall Graphics.Draw.Text.Write, [txt_wexit], ebtn_text_color ; leaderboard button stdcall Graphics.Draw.Shapes, wp_leadbtn_brdr_design, brown_text_color stdcall Graphics.Draw.Shapes, wp_leadbtn_font_design, lbbtn_font_color - stdcall Graphics.Draw.Text.Write, txt_stats, lbbtn_text_color + stdcall Graphics.Draw.Text.Write, [txt_stats], lbbtn_text_color ret endp diff --git a/Mouse/Controllers/OnClick.asm b/Mouse/Controllers/OnClick.asm index 202f2c4..008bdb4 100644 --- a/Mouse/Controllers/OnClick.asm +++ b/Mouse/Controllers/OnClick.asm @@ -65,7 +65,7 @@ proc Game.OnClick.TickButton uses eax ebx ecx edi,\ stdcall Game.OnTickClick, [matrixTick], ebx jmp .exit .exitFromLoop: - add ebx, 11540 ; skeep circle + add ebx, 2900 ; skeep circle dec ecx cmp ecx, 0 jne .mainLoop diff --git a/Mouse/Events.inc b/Mouse/Events.inc index c93e661..4543710 100644 --- a/Mouse/Events.inc +++ b/Mouse/Events.inc @@ -18,8 +18,9 @@ gp_events dd 5,\ et_pagebutton, pause_btn_fnt_design, PausePage,\ et_pagebutton, settings_btn_fnt_design, SettingsPage -ap_events dd 1,\ - et_pagebutton, exitbtn_font_design, MainPage +ap_events dd 2,\ + et_pagebutton, settings_btn_fnt_design, SettingsPage,\ + et_pagebutton, exitbtn_font_design, MainPage sp_events dd 6,\ et_prevpage, sp_return_circle_design, PrevousPage,\ diff --git a/Mouse/_components/IsMouseInShape.asm b/Mouse/_components/IsMouseInShape.asm index be8de5b..930a781 100644 --- a/Mouse/_components/IsMouseInShape.asm +++ b/Mouse/_components/IsMouseInShape.asm @@ -82,7 +82,7 @@ proc Mouse.CheckIsInRect,\ mov eax, [result] ret endp -proc Mouse.CheckIsInCircle,\ +proc Mouse.CheckIsInCircle uses ecx,\ centerXfl, centerYfl, radius locals result dd GL_FALSE diff --git a/main.asm b/main.asm index 974ed44..b94fa32 100644 --- a/main.asm +++ b/main.asm @@ -164,7 +164,7 @@ section '.data' data readable writeable boatBookPath db "source/ship_book.bmp", 0 hHeap dd ? - + msg MSG rc RECT pfd PIXELFORMATDESCRIPTOR From 8bac9bc871f72c93c3b87de48b7189d8b295c6d0 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Wed, 27 Nov 2024 23:25:35 +0300 Subject: [PATCH 12/26] fet: modified build by use bash scripts --- Graphics/Includes/Data/Strings.inc | 21 +++++++++++---------- build.js => builder/build.js | 0 debug.js => builder/debug.js | 0 package.json => builder/package.json | 0 run.js => builder/run.js | 0 setup.json => builder/setup.json | 0 dbg.bat | 4 ++++ init.bat | 3 +++ run.bat | 4 ++++ 9 files changed, 22 insertions(+), 10 deletions(-) rename build.js => builder/build.js (100%) rename debug.js => builder/debug.js (100%) rename package.json => builder/package.json (100%) rename run.js => builder/run.js (100%) rename setup.json => builder/setup.json (100%) create mode 100644 dbg.bat create mode 100644 init.bat create mode 100644 run.bat diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index 80b11dd..c3fc466 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -156,16 +156,17 @@ str_gamerool db 17, 18, 1, 3, 10, 13, 1, 44, 10, 4, 18, 29, 0; 'ПР str_gamerool_pos dd 728, 273 str_grtext db 44, 44,\ - 18, 1, 9, 14, 6, 19, 20, 10, 3, 44,\ - 26, 1, 26, 12, 10, 44,\ - 10, 4, 18, 16, 12, 44, 0;,\ - ; 5, 6, 13, 1, 20, 44,\ - ; 17, 6, 18, 3, 29, 4, 10, 3, 1, 44,\ - ; 16, 5, 15, 16, 11, 44,\ - ; 10, 9, 44,\ - ; 1, 44,\ - ; 26, 1, 26, 12, 44,\ - ; 19, 0 + 18, 1, 9, 14, 6, 19, 20, 10, 3, 44,\ ; 'Разместив' + 26, 1, 26, 12, 10, 44,\ ; 'шашки' + 10, 4, 18, 16, 12, 44,\ ; 'игрок' + 5, 6, 13, 1, 20, 44,\ ; 'делает' + 17, 6, 18, 3, 29, 4, 10, 3, 1, 44,\ ; 'первый' + 16, 5, 15, 16, 11, 44,\ ; 'ход' + 10, 9, 44,\ ; 'перепрыгивает' + 1, 44,\ ; 'одной' + 26, 1, 26, 12, 44,\ ; 'из' + 19,\ ; '4' + 0 ; 'шашек' str_grtext_pos dd 174, 362 ; ====== Program models ====== ; txt_headline dd ? diff --git a/build.js b/builder/build.js similarity index 100% rename from build.js rename to builder/build.js diff --git a/debug.js b/builder/debug.js similarity index 100% rename from debug.js rename to builder/debug.js diff --git a/package.json b/builder/package.json similarity index 100% rename from package.json rename to builder/package.json diff --git a/run.js b/builder/run.js similarity index 100% rename from run.js rename to builder/run.js diff --git a/setup.json b/builder/setup.json similarity index 100% rename from setup.json rename to builder/setup.json diff --git a/dbg.bat b/dbg.bat new file mode 100644 index 0000000..bcba653 --- /dev/null +++ b/dbg.bat @@ -0,0 +1,4 @@ +@echo off +cd builder +node build +node debug \ No newline at end of file diff --git a/init.bat b/init.bat new file mode 100644 index 0000000..ce2fdd1 --- /dev/null +++ b/init.bat @@ -0,0 +1,3 @@ +@echo off +cd builder +npm install \ No newline at end of file diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..9055a79 --- /dev/null +++ b/run.bat @@ -0,0 +1,4 @@ +@echo off +cd builder +node build +node run \ No newline at end of file From 2f77507cca9b2981dd793f88c37f8c558d2c30b1 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Wed, 27 Nov 2024 23:37:18 +0300 Subject: [PATCH 13/26] fet: finalize builder updates --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6c9afdc..69b88c5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ bin/ settings.ini ticks.ini +builder/ # temp close .github/ From f65261fd0de478e7057d3b1349d4ad6a22a5030f Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Wed, 27 Nov 2024 23:38:47 +0300 Subject: [PATCH 14/26] fix: game ini file rewrite after Alt+F4 exit --- main.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/main.asm b/main.asm index b94fa32..d1b4fcf 100644 --- a/main.asm +++ b/main.asm @@ -129,6 +129,7 @@ proc WindowProc hwnd,wmsg,wparam,lparam jmp .finish .wmdestroy: stdcall File.IniFile.Write + stdcall File.TicksPosition.Write invoke HeapDestroy, [hHeap] invoke wglMakeCurrent,0,0 invoke wglDeleteContext,[hrc] From 24e2ba4d927449b512d9c85414b0147415208a83 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Thu, 28 Nov 2024 00:51:17 +0300 Subject: [PATCH 15/26] fet: create fas file with labels for olly dbg --- .gitignore | 1 + builder/build.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 69b88c5..4623312 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ bin/ settings.ini ticks.ini builder/ +tactickgame.fas # temp close .github/ diff --git a/builder/build.js b/builder/build.js index 9b215a4..4a62b9c 100644 --- a/builder/build.js +++ b/builder/build.js @@ -26,7 +26,7 @@ try { process.chdir(config.fasmPath); console.log(`55% - Try to build;`); - const command = `fasm ${buildConfig.input} ${buildConfig.output}`; + const command = `fasm ${buildConfig.input} ${buildConfig.output} -s ${buildConfig.folder}tactickgame.fas`; execSync(command, { stdio: 'inherit' }); console.log(`85% - Success`); From 65e81983e1a24aab663818060883fee04dd9c743 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Thu, 28 Nov 2024 19:12:12 +0300 Subject: [PATCH 16/26] fet: create script for text convertation --- builder/textParser.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 builder/textParser.js diff --git a/builder/textParser.js b/builder/textParser.js new file mode 100644 index 0000000..ef63813 --- /dev/null +++ b/builder/textParser.js @@ -0,0 +1,28 @@ +const process = require('process'); + +const inputString = process.argv[2]; + +if (!inputString) { + console.log('Put string for encoding.'); + process.exit(1); +} + +let encodedString = ""; +for (let i = 0; i < inputString.length; i++) { + if (inputString.charCodeAt(i) >= 'А'.charCodeAt(0) && inputString.charCodeAt(i) <= 'Я'.charCodeAt(0)) + encodedString += (inputString.charCodeAt(i) - 'А'.charCodeAt(0) + 1) + ", "; + if (inputString.charCodeAt(i) >= '0'.charCodeAt(0) && inputString.charCodeAt(i) <= '9'.charCodeAt(0)) + encodedString += (inputString.charCodeAt(i) - '0'.charCodeAt(0) + 34) + ", "; + switch (inputString.charCodeAt(i)) { + case ' '.charCodeAt(0): encodedString += 44 + ", "; break; + case ','.charCodeAt(0): encodedString += 45 + ", "; break; + case '.'.charCodeAt(0): encodedString += 46 + ", "; break; + case '?'.charCodeAt(0): encodedString += 47 + ", "; break; + case '!'.charCodeAt(0): encodedString += 48 + ", "; break; + case '-'.charCodeAt(0): encodedString += 49 + ", "; break; + case '\n'.charCodeAt(0): encodedString += 50 + ", "; break; + } +} +encodedString += '0'; + +console.log(`Закодированная строка: ${encodedString}`); \ No newline at end of file From 4f74093ef55c1e370a68b7f59eef52ab6982d3fd Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Thu, 28 Nov 2024 19:29:53 +0300 Subject: [PATCH 17/26] fix: change encodings fixes --- builder/textParser.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/builder/textParser.js b/builder/textParser.js index ef63813..d593aca 100644 --- a/builder/textParser.js +++ b/builder/textParser.js @@ -9,12 +9,22 @@ if (!inputString) { let encodedString = ""; for (let i = 0; i < inputString.length; i++) { - if (inputString.charCodeAt(i) >= 'А'.charCodeAt(0) && inputString.charCodeAt(i) <= 'Я'.charCodeAt(0)) + + + if (inputString.charCodeAt(i) >= 'А'.charCodeAt(0) && inputString.charCodeAt(i) <= 'Е'.charCodeAt(0)) encodedString += (inputString.charCodeAt(i) - 'А'.charCodeAt(0) + 1) + ", "; + if (inputString.charCodeAt(i) >= 'а'.charCodeAt(0) && inputString.charCodeAt(i) <= 'е'.charCodeAt(0)) + encodedString += (inputString.charCodeAt(i) - 'а'.charCodeAt(0) + 1) + ", "; + if (inputString.charCodeAt(i) == 'ё'.charCodeAt(0) || inputString.charCodeAt(i) == 'Ё'.charCodeAt(0)) + encodedString += 7 + ", "; + if (inputString.charCodeAt(i) >= 'Ж'.charCodeAt(0) && inputString.charCodeAt(i) <= 'Я'.charCodeAt(0)) + encodedString += (inputString.charCodeAt(i) - 'Ж'.charCodeAt(0) + 8) + ", "; + if (inputString.charCodeAt(i) >= 'ж'.charCodeAt(0) && inputString.charCodeAt(i) <= 'я'.charCodeAt(0)) + encodedString += (inputString.charCodeAt(i) - 'ж'.charCodeAt(0) + 8) + ", "; if (inputString.charCodeAt(i) >= '0'.charCodeAt(0) && inputString.charCodeAt(i) <= '9'.charCodeAt(0)) encodedString += (inputString.charCodeAt(i) - '0'.charCodeAt(0) + 34) + ", "; switch (inputString.charCodeAt(i)) { - case ' '.charCodeAt(0): encodedString += 44 + ", "; break; + case ' '.charCodeAt(0): encodedString += 44 + ",\\\n"; break; case ','.charCodeAt(0): encodedString += 45 + ", "; break; case '.'.charCodeAt(0): encodedString += 46 + ", "; break; case '?'.charCodeAt(0): encodedString += 47 + ", "; break; @@ -25,4 +35,4 @@ for (let i = 0; i < inputString.length; i++) { } encodedString += '0'; -console.log(`Закодированная строка: ${encodedString}`); \ No newline at end of file +console.log(`Закодированная строка: \n${encodedString}`); \ No newline at end of file From feea0b33b729912af49c537e79a6a22dfe23af70 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Thu, 28 Nov 2024 21:00:46 +0300 Subject: [PATCH 18/26] fet: create about page --- Graphics/Draw/ASCII/Letters.asm | 2 + Graphics/Draw/Text.asm | 9 +- .../Includes/Data/Letters/SpecialSymb.inc | 8 +- Graphics/Includes/Data/Shapes.inc | 3 - Graphics/Includes/Data/Strings.inc | 127 ++++++++++++++++-- builder/build.js => build.js | 26 ++-- dbg.bat | 4 - builder/debug.js => debug.js | 0 init.bat | 3 - builder/package.json => package.json | 0 run.bat | 4 - builder/run.js => run.js | 0 builder/setup.json => setup.json | 0 builder/textParser.js => textParser.js | 0 14 files changed, 138 insertions(+), 48 deletions(-) rename builder/build.js => build.js (69%) delete mode 100644 dbg.bat rename builder/debug.js => debug.js (100%) delete mode 100644 init.bat rename builder/package.json => package.json (100%) delete mode 100644 run.bat rename builder/run.js => run.js (100%) rename builder/setup.json => setup.json (100%) rename builder/textParser.js => textParser.js (100%) diff --git a/Graphics/Draw/ASCII/Letters.asm b/Graphics/Draw/ASCII/Letters.asm index b27ea9f..62dcc3d 100644 --- a/Graphics/Draw/ASCII/Letters.asm +++ b/Graphics/Draw/ASCII/Letters.asm @@ -78,7 +78,9 @@ proc Graphics.Draw.ASCII.Letters.GetLetterLen,\ jmp .exit @@: stdcall Scripts.Getters.GetIMULNumber, [ebx + 8], [multiplier] + mov eax, 33 mov ebx, -1 + jmp .exit .exit: ret endp \ No newline at end of file diff --git a/Graphics/Draw/Text.asm b/Graphics/Draw/Text.asm index 1f29666..9f80295 100644 --- a/Graphics/Draw/Text.asm +++ b/Graphics/Draw/Text.asm @@ -52,6 +52,11 @@ proc Graphics.Draw.Text.Prepear uses eax ebx edi,\ startX dd ? startY dd ? endl + ; set font size + mov ebx, spl_50 + mov eax, 28 ; [fontSize] + mov dword [ebx + 8], 28 + ; memory creat stdcall Graphics.Draw.Text.GetLength, [string] mov [counterLen], eax mov ebx, sizeof.Char ; sizeof Char @@ -61,10 +66,6 @@ proc Graphics.Draw.Text.Prepear uses eax ebx edi,\ malloc eax mov [ebx], eax .start: - mov ebx, spl_50 - add ebx, 8 - mov eax, [fontSize] - mov [ebx], eax ; multiplier stdcall Scripts.Getters.GetFSMultiplier, fs_default, [fontSize] mov [fs_multiplier], eax diff --git a/Graphics/Includes/Data/Letters/SpecialSymb.inc b/Graphics/Includes/Data/Letters/SpecialSymb.inc index 59703ef..db7e80f 100644 --- a/Graphics/Includes/Data/Letters/SpecialSymb.inc +++ b/Graphics/Includes/Data/Letters/SpecialSymb.inc @@ -1,9 +1,9 @@ ; ' ' spl_44 dd -1, 0 ; ',' -spl_45 dd ? +spl_45 dd -1, 0 ; '.' -spl_46 dd ? +spl_46 dd -1, 0 ; '?' spl_47 dd 6, 10,\ 3, 24, 3, 28, 7, 28, 7, 24,\ @@ -13,9 +13,9 @@ spl_47 dd 6, 10,\ 6, 5, 3, 0, 6, 0, 9, 4,\ 0, 5, 2, 7, 6, 0, 3, 0 ; '!' -spl_48 dd ? +spl_48 dd -1, 0 ; '-' -spl_49 dd ? +spl_49 dd -1, 0 ; '\n' spl_50 dd -1, -1, ? spl_51 dd ? diff --git a/Graphics/Includes/Data/Shapes.inc b/Graphics/Includes/Data/Shapes.inc index 9872a2f..33054c7 100644 --- a/Graphics/Includes/Data/Shapes.inc +++ b/Graphics/Includes/Data/Shapes.inc @@ -74,7 +74,6 @@ curentRudDeg dd ? ; ====== Program models ====== ; font_design DrawModel ? - book_root_design DrawModel ? book_endg_design DrawModel ? book_brdcrn_design DrawModel ? @@ -82,11 +81,9 @@ book_corner_design DrawModel ? book_brdfnt_design DrawModel ? book_brd_design DrawModel ? book_flgpl_design DrawModel ? - button_play_design DrawModel ? button_about_design DrawModel ? button_stngs_design DrawModel ? - game_border_design DrawModel ? game_garbage_font_design DrawModel ? game_garbabe_border_design DrawModel ? diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index c3fc466..9abf0ed 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -57,7 +57,7 @@ tg_HPhotkeys = 10 tg_wantExit = 10 tg_yesno = 7 tg_gamerool = 10 -tg_grtext = 5 +tg_grtext = 8 ; ====== Interfaces ====== ; struct Points @@ -156,18 +156,119 @@ str_gamerool db 17, 18, 1, 3, 10, 13, 1, 44, 10, 4, 18, 29, 0; 'ПР str_gamerool_pos dd 728, 273 str_grtext db 44, 44,\ - 18, 1, 9, 14, 6, 19, 20, 10, 3, 44,\ ; 'Разместив' - 26, 1, 26, 12, 10, 44,\ ; 'шашки' - 10, 4, 18, 16, 12, 44,\ ; 'игрок' - 5, 6, 13, 1, 20, 44,\ ; 'делает' - 17, 6, 18, 3, 29, 4, 10, 3, 1, 44,\ ; 'первый' - 16, 5, 15, 16, 11, 44,\ ; 'ход' - 10, 9, 44,\ ; 'перепрыгивает' - 1, 44,\ ; 'одной' - 26, 1, 26, 12, 44,\ ; 'из' - 19,\ ; '4' - 0 ; 'шашек' -str_grtext_pos dd 174, 362 + 18, 1, 9, 14, 6, 19, 20, 10, 3, 44,\ + 26, 1, 26, 12, 10, 45, 44,\ + 10, 4, 18, 16, 12, 44,\ + 5, 6, 13, 1, 6, 20, 44,\ + 17, 6, 18, 3, 29, 11, 44,\ + 23, 16, 5, 44,\ + 49, 44,\ + 17, 6, 18, 6, 17, 18, 29, 4, 10, 3, 1, 6, 20, 44,\ + 16, 5, 15, 16, 11, 44,\ + 10, 9, 44,\ + 38, 44,\ + 26, 1, 26, 6, 12, 44,\ + 19,\ + 50,\ ; \n + 9, 1, 26, 20, 18, 10, 23, 16, 3, 1, 15, 15, 29, 23, 44,\ + 20, 16, 25, 6, 12, 44,\ + 17, 16, 13, 33, 44,\ + 3, 44,\ + 24, 6, 15, 20, 18, 1, 13, 30, 15, 21, 32, 44,\ + 20, 16, 25, 12, 21, 46, 44,\ + 26, 1, 26, 12, 1, 45, 44,\ + 25, 6, 18, 6, 9, 44,\ + 12, 16, 20, 16, 18, 21, 32, 44,\ + 17, 6, 18, 6, 17, 18, 29, 4, 15, 21, 13, 10, 45,\ + 50,\ ; \n + 19, 25, 10, 20, 1, 6, 20, 19, 33, 44,\ + 19, 28, 6, 5, 6, 15, 15, 16, 11, 45, 44,\ + 12, 1, 12, 44,\ + 3, 44,\ + 16, 2, 29, 25, 15, 29, 23, 44,\ + 26, 1, 26, 12, 1, 23, 45, 44,\ + 10, 44,\ + 19, 15, 10, 14, 1, 6, 20, 19, 33, 44,\ + 19, 44,\ + 10, 4, 18, 16, 3, 16, 4, 16, 44,\ + 17, 16, 13, 33, 46,\ + 50, 50,\ ; \n + 44, 44,\ ; \t + 17, 16, 5, 44,\ + 21, 5, 1, 18, 16, 14, 44,\ + 16, 12, 1, 9, 29, 3, 1, 32, 20, 19, 33, 44,\ + 5, 18, 21, 4, 10, 6, 44,\ + 26, 1, 26, 12, 10, 46, 44,\ + 19, 28, 6, 5, 1, 32, 20, 44,\ + 20, 21, 44,\ + 26, 1, 26, 12, 21, 45, 44,\ + 3, 9, 33, 20, 10, 6, 44,\ + 12, 16, 20, 16, 18, 16, 11, 44,\ + 17, 16, 9, 3, 16, 13, 33, 6, 20, 44,\ + 19, 16, 9, 5, 1, 20, 30,\ + 50,\ ; \n + 17, 6, 18, 19, 17, 6, 12, 20, 10, 3, 15, 29, 6, 44,\ + 21, 19, 13, 16, 3, 10, 33, 44,\ + 5, 13, 33, 44,\ + 19, 13, 6, 5, 21, 32, 27, 10, 23, 44,\ + 12, 16, 14, 2, 10, 15, 1, 24, 10, 11, 46, 44,\ + 23, 16, 5, 10, 20, 30, 44,\ + 19, 13, 6, 5, 21, 6, 20, 44,\ + 19, 20, 18, 16, 4, 16, 44,\ + 3, 5, 16, 13, 30, 44,\ + 13, 10, 15, 10, 11,\ + 50,\ + 10, 4, 18, 16, 3, 16, 4, 16, 44,\ + 17, 16, 13, 33, 45, 44,\ + 5, 6, 13, 1, 20, 30, 44,\ + 12, 1, 12, 10, 6, 49, 13, 10, 2, 16, 44,\ + 17, 6, 18, 6, 14, 6, 27, 6, 15, 10, 33, 44,\ + 2, 6, 9, 44,\ + 3, 9, 33, 20, 10, 33, 44,\ + 26, 1, 26, 12, 10, 44,\ + 15, 6, 13, 30, 9, 33, 46,\ + 50, 50,\ ; \n + 44, 44,\ ; \t + 3, 44,\ + 19, 13, 21, 25, 1, 6, 44,\ + 12, 16, 4, 5, 1, 44,\ + 9, 1, 44,\ + 16, 5, 10, 15, 44,\ + 23, 16, 5, 44,\ + 14, 16, 8, 15, 16, 44,\ + 19, 28, 6, 19, 20, 30, 44,\ + 15, 6, 19, 12, 16, 13, 30, 12, 16, 44,\ + 26, 1, 26, 6, 12, 45, 44,\ + 10, 4, 18, 16, 12, 44,\ + 10, 14, 6, 6, 20, 44,\ + 17, 18, 1, 3, 16, 44,\ + 3, 9, 33, 20, 30, 44,\ + 19, 20, 16, 13, 30, 12, 16,\ + 50,\ ; \n + 26, 1, 26, 6, 12, 45, 44,\ + 19, 12, 16, 13, 30, 12, 16, 44,\ + 19, 25, 10, 20, 1, 6, 20, 44,\ + 24, 6, 13, 6, 19, 16, 16, 2, 18, 1, 9, 15, 29, 14, 44,\ + 5, 13, 33, 44,\ + 5, 1, 13, 30, 15, 6, 11, 26, 6, 4, 16, 44,\ + 18, 1, 9, 3, 10, 20, 10, 33, 44,\ + 10, 4, 18, 29, 46,\ + 50, 50,\ + 44, 44,\ + 24, 6, 13, 30, 44,\ + 10, 4, 18, 29, 44,\ + 49, 44,\ + 15, 1, 44,\ + 17, 16, 13, 6, 44,\ + 16, 19, 20, 1, 7, 20, 19, 33, 44,\ + 6, 5, 10, 15, 19, 20, 3, 6, 15, 15, 1, 33, 44,\ + 26, 1, 26, 12, 1, 45, 44,\ + 12, 16, 20, 16, 18, 1, 33, 44,\ + 15, 1, 23, 16, 5, 10, 20, 19, 33, 44,\ + 3, 44,\ + 24, 6, 15, 20, 18, 6, 44,\ + 17, 16, 13, 33, 46, 0 +str_grtext_pos dd 154, 392 ; ====== Program models ====== ; txt_headline dd ? txt_headline_bc dd ? diff --git a/builder/build.js b/build.js similarity index 69% rename from builder/build.js rename to build.js index 4a62b9c..d5f45b0 100644 --- a/builder/build.js +++ b/build.js @@ -32,19 +32,19 @@ try { console.log(`90% - Return in work directory: ${process.cwd()};`); process.chdir(config.projectDir); - - const sourceFolder = path.join(config.projectDir, config.copy.srcFolder); - const destFolder = path.join(buildConfig.folder, config.copy.destFolder); - console.log(`0% - Start copy source from ${sourceFolder} to ${destFolder}`); - ncp(sourceFolder, destFolder) - .then(() => { - console.log(`100% - Files copied successfully from ${sourceFolder} to ${destFolder}`); - process.exit(0); - }) - .catch(err => { - console.error(`Error copying files: ${err}`); - process.exit(1); - }); + process.exit(0); + // const sourceFolder = path.join(config.projectDir, config.copy.srcFolder); + // const destFolder = path.join(buildConfig.folder, config.copy.destFolder); + // console.log(`0% - Start copy source from ${sourceFolder} to ${destFolder}`); + // ncp(sourceFolder, destFolder) + // .then(() => { + // console.log(`100% - Files copied successfully from ${sourceFolder} to ${destFolder}`); + // process.exit(0); + // }) + // .catch(err => { + // console.error(`Error copying files: ${err}`); + // process.exit(1); + // }); } catch (error) { console.error(`Error: ${error.message}`); process.exit(1); diff --git a/dbg.bat b/dbg.bat deleted file mode 100644 index bcba653..0000000 --- a/dbg.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -cd builder -node build -node debug \ No newline at end of file diff --git a/builder/debug.js b/debug.js similarity index 100% rename from builder/debug.js rename to debug.js diff --git a/init.bat b/init.bat deleted file mode 100644 index ce2fdd1..0000000 --- a/init.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -cd builder -npm install \ No newline at end of file diff --git a/builder/package.json b/package.json similarity index 100% rename from builder/package.json rename to package.json diff --git a/run.bat b/run.bat deleted file mode 100644 index 9055a79..0000000 --- a/run.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -cd builder -node build -node run \ No newline at end of file diff --git a/builder/run.js b/run.js similarity index 100% rename from builder/run.js rename to run.js diff --git a/builder/setup.json b/setup.json similarity index 100% rename from builder/setup.json rename to setup.json diff --git a/builder/textParser.js b/textParser.js similarity index 100% rename from builder/textParser.js rename to textParser.js From f41ff1536ce720f045a4a64b3ae832d1efeda351 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Thu, 28 Nov 2024 22:17:31 +0300 Subject: [PATCH 19/26] fet: fix some letters --- .../Includes/Data/Letters/RussianLetters.inc | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Graphics/Includes/Data/Letters/RussianLetters.inc b/Graphics/Includes/Data/Letters/RussianLetters.inc index 36e5fab..ed73b1e 100644 --- a/Graphics/Includes/Data/Letters/RussianLetters.inc +++ b/Graphics/Includes/Data/Letters/RussianLetters.inc @@ -46,11 +46,11 @@ ltr_RU_7 dd 6, 10,\ 6, -4, 6, -2, 9, -2, 9, -4 ; . (right) ; Ж ltr_RU_8 dd 5, 20,\ - 0, 0, 4, 0, 8, 9, 8, 17,\ ; \ (left-top) - 0, 28, 4, 28, 8, 18, 8, 10,\ ; / (left-bottom) - 8, 0, 12, 0, 12, 28, 8, 28,\ ; | (central) - 16, 0, 20, 0, 12, 17, 12, 9,\ ; / (right-top) - 12, 10, 12, 18, 16, 28, 20, 28 ; \ (right-bottom) + 0, 0, 4, 0, 7, 9, 7, 17,\ ; \ (left-top) + 0, 28, 4, 28, 7, 18, 7, 10,\ ; / (left-bottom) + 7, 0, 11, 0, 11, 28, 7, 28,\ ; | (central) + 14, 0, 18, 0, 11, 17, 11, 9,\ ; / (right-top) + 11, 10, 11, 18, 14, 28, 18, 28 ; \ (right-bottom) ; З ltr_RU_9 dd 7, 12,\ 0, 1, 0, 6, 4, 6, 4, 1,\ ; | (left-top) @@ -161,8 +161,8 @@ ltr_RU_27 dd 5, 12,\ 0, 0, 3, 0, 3, 27, 0, 27,\ ; | (left) 1, 24, 1, 28, 12, 28, 12, 24,\ ; - (bottom) 4, 10, 8, 10, 8, 24, 4, 24,\ ; | (center) - 9, 0, 12, 0, 9, 24, 12, 24,\ ; | (right) - 10, 24, 13, 24, 13, 19, 10, 19 ; \ (right) + 9, 0, 12, 0, 12, 28, 9, 28,\ ; | (right) + 11, 26, 13, 26, 13, 30, 11, 30 ; Ъ ltr_RU_28 dd 5, 14,\ 0, 0, 5, 0, 5, 4, 0, 4,\ ; - (top) @@ -173,10 +173,10 @@ ltr_RU_28 dd 5, 14,\ ; Ы ltr_RU_29 dd 5, 18,\ 0, 0, 4, 0, 4, 28, 0, 28,\ ; | (left) - 4, 10, 4, 14, 11, 14, 11, 10,\ ; - (center) - 8, 11, 12, 11, 12, 27, 8, 27,\ ; | (center) - 4, 24, 4, 28, 11, 28, 11, 24,\ ; - (bottom) - 14, 0, 18, 0, 18, 28, 14, 28 ; | (right) + 4, 10, 4, 14, 10, 14, 10, 10,\ ; - (center) + 7, 11, 11, 11, 11, 27, 7, 27,\ ; | (center) + 4, 24, 4, 28, 10, 28, 10, 24,\ ; - (bottom) + 12, 0, 16, 0, 16, 28, 12, 28 ; | (right) ; Ь ltr_RU_30 dd 4, 12,\ 0, 0, 4, 0, 4, 28, 0, 28,\ ; | (left) @@ -194,11 +194,11 @@ ltr_RU_31 dd 6, 12,\ ; Ю ltr_RU_32 dd 6, 19,\ 0, 0, 4, 0, 4, 28, 0, 28,\ ; | (left) - 4, 12, 7, 12, 7, 16, 4, 16,\ ; - (center) - 7, 1, 11, 1, 11, 27, 7, 27,\ ; | (center) - 8, 0, 8, 4, 18, 4, 18, 0,\ ; - (right-top) - 8, 24, 8, 28, 18, 28, 18, 24,\ ; - (right-bottom) - 15, 1, 19, 1, 19, 27, 15, 27 ; | (right) + 4, 12, 6, 12, 6, 16, 4, 16,\ ; - (center) + 6, 1, 10, 1, 10, 27, 6, 27,\ ; | (center) + 7, 0, 7, 4, 16, 4, 16, 0,\ ; - (right-top) + 7, 24, 7, 28, 16, 28, 16, 24,\ ; - (right-bottom) + 13, 1, 17, 1, 17, 27, 13, 27 ; | (right) ; Я ltr_RU_33 dd 5, 14,\ 2, 1, 6, 1, 6, 11, 2, 11,\ ; | (left-top) From fedf95b39d3c4ffbfca1be5c038e807d0d94c82d Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Thu, 28 Nov 2024 22:27:51 +0300 Subject: [PATCH 20/26] fix: change hotkeys labels from change to see --- Graphics/Includes/Data/Strings.inc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index 9abf0ed..1ef5962 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -120,9 +120,9 @@ str_wexit_pos dd 917, 590 str_stats db 19, 20, 1, 20, 10, 19, 20, 10, 12, 1, 0 ; 'СТАТИСТИКА' str_stats_pos dd 867, 648 str_msettings_pos dd 845, 420 -str_chhotkeys db 19, 14, 6, 15, 1, 44, 4, 16, 18, 33, 25, 10, 23, 44, 12, 13, 1, 3, 10, 26, 0 ; 'СМЕНА ГОРЯЧИХ КЛАВИШ' -str_chhotkeys_pos dd 817, 637 -str_HPhotkeys_pos dd 698, 414 +str_chhotkeys db 4, 16, 18, 33, 25, 10, 6, 44, 12, 13, 1, 3, 10, 26, 10, 0 ; 'ГОРЯЧИЕ КЛАВИШИ' +str_chhotkeys_pos dd 853, 637 +str_HPhotkeys_pos dd 771, 414 str_music db 14, 21, 9, 29, 12, 1, 0 ; 'МУЗЫКА' str_music_pos dd 783, 540 str_voice db 9, 3, 21, 12, 10, 0 ; 'ЗВУКИ' @@ -151,10 +151,8 @@ str_S_hk db 72, 0 ; 'S' str_S_hk_pos dd 1875, 29 str_P_hk db 69, 0 ; 'P' str_P_hk_pos dd 1736, 29 - str_gamerool db 17, 18, 1, 3, 10, 13, 1, 44, 10, 4, 18, 29, 0; 'ПРАВИЛА ИГРЫ' str_gamerool_pos dd 728, 273 - str_grtext db 44, 44,\ 18, 1, 9, 14, 6, 19, 20, 10, 3, 44,\ 26, 1, 26, 12, 10, 45, 44,\ From b26e755f025babbebe15d72605d89ac1aff8ac9c Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Fri, 29 Nov 2024 10:52:37 +0300 Subject: [PATCH 21/26] fet: create labels with hotkeys info --- Graphics/Includes/Data/Letters.inc | 1 + Graphics/Includes/Data/Strings.inc | 21 ++++++- Graphics/Includes/DataPrepears.asm | 66 ++++++++++++---------- Graphics/Pages/_components/HotkeysPage.asm | 6 ++ 4 files changed, 63 insertions(+), 31 deletions(-) diff --git a/Graphics/Includes/Data/Letters.inc b/Graphics/Includes/Data/Letters.inc index 589ef30..31449c1 100644 --- a/Graphics/Includes/Data/Letters.inc +++ b/Graphics/Includes/Data/Letters.inc @@ -68,6 +68,7 @@ fs_wantExit = 10 fs_yesno = 5 fs_gamerool = 27 fs_grtext = 0 +fs_hktext = 0 include 'Letters/RussianLetters.inc' include 'Letters/Digits.inc' diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index 1ef5962..052d611 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -58,6 +58,7 @@ tg_wantExit = 10 tg_yesno = 7 tg_gamerool = 10 tg_grtext = 8 +tg_hktext = 7 ; ====== Interfaces ====== ; struct Points @@ -121,7 +122,7 @@ str_stats db 19, 20, 1, 20, 10, 19, 20, 10, 12, 1, 0 ; 'СТАТ str_stats_pos dd 867, 648 str_msettings_pos dd 845, 420 str_chhotkeys db 4, 16, 18, 33, 25, 10, 6, 44, 12, 13, 1, 3, 10, 26, 10, 0 ; 'ГОРЯЧИЕ КЛАВИШИ' -str_chhotkeys_pos dd 853, 637 +str_chhotkeys_pos dd 855, 637 str_HPhotkeys_pos dd 771, 414 str_music db 14, 21, 9, 29, 12, 1, 0 ; 'МУЗЫКА' str_music_pos dd 783, 540 @@ -267,6 +268,18 @@ str_grtext db 44, 44,\ 24, 6, 15, 20, 18, 6, 44,\ 17, 16, 13, 33, 46, 0 str_grtext_pos dd 154, 392 +str_hkplay db 10, 4, 18, 1, 20, 30, 0 ; 'ИГРАТЬ' +str_hkplay_pos dd 804, 504 +str_hkabout db 16, 2, 44, 10, 4, 18, 6, 0 ; 'ОБ ИГРЕ' +str_hkabout_pos dd 804, 549 +str_hksettings db 15, 1, 19, 20, 18, 16, 11, 12, 10, 0 ; 'НАСТРОЙКИ' +str_hksettings_pos dd 804, 594 +str_hkpause db 17, 1, 21, 9, 1, 0 ; 'ПАУЗА' +str_hkpause_pos dd 1112, 504 +str_hkexit db 3, 29, 23, 16, 5, 0 ; 'ВЫХОД' +str_hkexit_pos dd 1112, 549 +str_hkrestart db 9, 1, 15, 16, 3, 16, 0 ; 'ЗАНОВО' +str_hkrestart_pos dd 1112, 594 ; ====== Program models ====== ; txt_headline dd ? txt_headline_bc dd ? @@ -309,6 +322,12 @@ txt_yes dd ? txt_no dd ? txt_gamerool dd ? txt_grtext dd ? +txt_hkplay dd ? +txt_hkabout dd ? +txt_hksettings dd ? +txt_hkpause dd ? +txt_hkexit dd ? +txt_hkrestart dd ? arr_of_letters dd ltr_RU_1, ltr_RU_2, ltr_RU_3, ltr_RU_4, ltr_RU_5, ltr_RU_6, ltr_RU_7,\ ; RU ltr_RU_8, ltr_RU_9, ltr_RU_10, ltr_RU_11, ltr_RU_12, ltr_RU_13, ltr_RU_14,\ diff --git a/Graphics/Includes/DataPrepears.asm b/Graphics/Includes/DataPrepears.asm index 7349afa..8d29fab 100644 --- a/Graphics/Includes/DataPrepears.asm +++ b/Graphics/Includes/DataPrepears.asm @@ -4,37 +4,37 @@ proc Graphics.Draw.CoordsRectPrepears stdcall Graphics.Draw.CoordsRectPrepears.ForAnimations ; quard obj stdcall Scripts.Getters.ConvertWithQuardCoords, settings_btn_subline_coords, settings_btn_subline_design - stdcall Scripts.Getters.ConvertWithQuardCoords, pp_return_chrest_coords, pp_return_chrest_design - stdcall Scripts.Getters.ConvertWithQuardCoords, wp_return_chrest_coords, wp_return_chrest_design - stdcall Scripts.Getters.ConvertWithQuardCoords, sp_return_chrest_coords, sp_return_chrest_design - stdcall Scripts.Getters.ConvertWithQuardCoords, hp_return_chrest_coords, hp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, pp_return_chrest_coords, pp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, wp_return_chrest_coords, wp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, sp_return_chrest_coords, sp_return_chrest_design + stdcall Scripts.Getters.ConvertWithQuardCoords, hp_return_chrest_coords, hp_return_chrest_design ; default - stdcall Scripts.Getters.ConvertCoords, font_coords, font_design - stdcall Scripts.Getters.ConvertCoords, book_root_coords, book_root_design - stdcall Scripts.Getters.ConvertCoords, book_endg_coords, book_endg_design - stdcall Scripts.Getters.ConvertCoords, book_brdcrn_coords, book_brdcrn_design - stdcall Scripts.Getters.ConvertCoords, book_corner_coords, book_corner_design - stdcall Scripts.Getters.ConvertCoords, book_brdfnt_coords, book_brdfnt_design - stdcall Scripts.Getters.ConvertCoords, book_brd_coords, book_brd_design - stdcall Scripts.Getters.ConvertCoords, book_flgpl_coords, book_flgpl_design - stdcall Scripts.Getters.ConvertCoords, button_exit_coords, button_exit_design - stdcall Scripts.Getters.ConvertCoords, mp_gamefont_coords, mp_gamefont_design - stdcall Scripts.Getters.ConvertCoords, mg_gamebrdr_coords, mp_gamebrdr_design - stdcall Scripts.Getters.ConvertCoords, mp_grbgbrdr_coords, mp_grbgbrdr_design - stdcall Scripts.Getters.ConvertCoords, mp_grbgfont_coords, mp_grbgfont_design - stdcall Scripts.Getters.ConvertCoords, mp_fntvertln_coords, mp_fntvertln_design - stdcall Scripts.Getters.ConvertCoords, mp_fnthortln_coords, mp_fnthortln_design - stdcall Scripts.Getters.ConvertCoords, exitbtn_font_coords, exitbtn_font_design - stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr1_coords, lp_bar_brdr1_design - stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr2_coords, lp_bar_brdr2_design - stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr3_coords, lp_bar_brdr3_design - stdcall Scripts.Getters.ConvertCoords, lp_bar_main_coords, lp_bar_main_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_fnt_coords, recovery_btn_fnt_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_out_circle_coords, recovery_btn_out_circle_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_in_circle_coords, recovery_btn_in_circle_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_fntblock_coords, recovery_btn_fntblock_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_lftriangle_coords, recovery_btn_lftriangle_design - stdcall Scripts.Getters.ConvertCoords, recovery_btn_rgtriangle_coords, recovery_btn_rgtriangle_design + stdcall Scripts.Getters.ConvertCoords, font_coords, font_design + stdcall Scripts.Getters.ConvertCoords, book_root_coords, book_root_design + stdcall Scripts.Getters.ConvertCoords, book_endg_coords, book_endg_design + stdcall Scripts.Getters.ConvertCoords, book_brdcrn_coords, book_brdcrn_design + stdcall Scripts.Getters.ConvertCoords, book_corner_coords, book_corner_design + stdcall Scripts.Getters.ConvertCoords, book_brdfnt_coords, book_brdfnt_design + stdcall Scripts.Getters.ConvertCoords, book_brd_coords, book_brd_design + stdcall Scripts.Getters.ConvertCoords, book_flgpl_coords, book_flgpl_design + stdcall Scripts.Getters.ConvertCoords, button_exit_coords, button_exit_design + stdcall Scripts.Getters.ConvertCoords, mp_gamefont_coords, mp_gamefont_design + stdcall Scripts.Getters.ConvertCoords, mg_gamebrdr_coords, mp_gamebrdr_design + stdcall Scripts.Getters.ConvertCoords, mp_grbgbrdr_coords, mp_grbgbrdr_design + stdcall Scripts.Getters.ConvertCoords, mp_grbgfont_coords, mp_grbgfont_design + stdcall Scripts.Getters.ConvertCoords, mp_fntvertln_coords, mp_fntvertln_design + stdcall Scripts.Getters.ConvertCoords, mp_fnthortln_coords, mp_fnthortln_design + stdcall Scripts.Getters.ConvertCoords, exitbtn_font_coords, exitbtn_font_design + stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr1_coords, lp_bar_brdr1_design + stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr2_coords, lp_bar_brdr2_design + stdcall Scripts.Getters.ConvertCoords, lp_bar_brdr3_coords, lp_bar_brdr3_design + stdcall Scripts.Getters.ConvertCoords, lp_bar_main_coords, lp_bar_main_design + stdcall Scripts.Getters.ConvertCoords, recovery_btn_fnt_coords, recovery_btn_fnt_design + stdcall Scripts.Getters.ConvertCoords, recovery_btn_out_circle_coords, recovery_btn_out_circle_design + stdcall Scripts.Getters.ConvertCoords, recovery_btn_in_circle_coords, recovery_btn_in_circle_design + stdcall Scripts.Getters.ConvertCoords, recovery_btn_fntblock_coords, recovery_btn_fntblock_design + stdcall Scripts.Getters.ConvertCoords, recovery_btn_lftriangle_coords, recovery_btn_lftriangle_design + stdcall Scripts.Getters.ConvertCoords, recovery_btn_rgtriangle_coords, recovery_btn_rgtriangle_design stdcall Scripts.Getters.ConvertCoords, settings_btn_fnt_coords, settings_btn_fnt_design stdcall Scripts.Getters.ConvertCoords, pause_btn_fnt_coords, pause_btn_fnt_design stdcall Scripts.Getters.ConvertCoords, pause_btn_lines_coords, pause_btn_lines_design @@ -187,6 +187,12 @@ proc Graphics.Draw.ASCIIPrepear stdcall Graphics.Draw.Text.Prepear, txt_no, str_no, fs_yesno, tg_yesno, str_no_pos stdcall Graphics.Draw.Text.Prepear, txt_gamerool, str_gamerool, fs_gamerool, tg_gamerool, str_gamerool_pos stdcall Graphics.Draw.Text.Prepear, txt_grtext, str_grtext, fs_grtext, tg_grtext, str_grtext_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkplay, str_hkplay, fs_hktext, tg_hktext, str_hkplay_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkabout, str_hkabout, fs_hktext, tg_hktext, str_hkabout_pos + stdcall Graphics.Draw.Text.Prepear, txt_hksettings, str_hksettings, fs_hktext, tg_hktext, str_hksettings_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkpause, str_hkpause, fs_hktext, tg_hktext, str_hkpause_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkexit, str_hkexit, fs_hktext, tg_hktext, str_hkexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkrestart, str_hkrestart, fs_hktext, tg_hktext, str_hkrestart_pos ret endp diff --git a/Graphics/Pages/_components/HotkeysPage.asm b/Graphics/Pages/_components/HotkeysPage.asm index 38e6cea..06b3f17 100644 --- a/Graphics/Pages/_components/HotkeysPage.asm +++ b/Graphics/Pages/_components/HotkeysPage.asm @@ -17,26 +17,32 @@ proc Draw.Pages.HotkeysPage ; PLAY stdcall Graphics.Draw.Shapes, hp_playbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_playfont_design, body_color + stdcall Graphics.Draw.Text.Write, [txt_hkplay], brown_text_color ; PAUSE stdcall Graphics.Draw.Shapes, hp_pausebrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_pausefont_design, body_color + stdcall Graphics.Draw.Text.Write, [txt_hkpause], brown_text_color ; ABOUT stdcall Graphics.Draw.Shapes, hp_aboutbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_aboutfont_design, body_color + stdcall Graphics.Draw.Text.Write, [txt_hkabout], brown_text_color ; EXIT stdcall Graphics.Draw.Shapes, hp_exitbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_exitfont_design, body_color + stdcall Graphics.Draw.Text.Write, [txt_hkexit], brown_text_color ; SETINGS stdcall Graphics.Draw.Shapes, hp_stngbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_stngfont_design, body_color + stdcall Graphics.Draw.Text.Write, [txt_hksettings], brown_text_color ; RESTART stdcall Graphics.Draw.Shapes, hp_rstrbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_rstrfont_design, body_color + stdcall Graphics.Draw.Text.Write, [txt_hkrestart], brown_text_color ret endp \ No newline at end of file From 0882121eae5c60f08d9773219dc66f02fbfef24e Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Fri, 29 Nov 2024 11:04:28 +0300 Subject: [PATCH 22/26] fet: create new special symbols --- .../Includes/Data/Letters/SpecialSymb.inc | 19 ++++++++++++++----- Graphics/Includes/Data/Strings.inc | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Graphics/Includes/Data/Letters/SpecialSymb.inc b/Graphics/Includes/Data/Letters/SpecialSymb.inc index db7e80f..221e1fe 100644 --- a/Graphics/Includes/Data/Letters/SpecialSymb.inc +++ b/Graphics/Includes/Data/Letters/SpecialSymb.inc @@ -1,9 +1,12 @@ ; ' ' spl_44 dd -1, 0 ; ',' -spl_45 dd -1, 0 +spl_45 dd 2, 5,\ + 0, 23, 5, 23, 5, 28, 0, 28,\ + 3, 26, 3, 30, 5, 30, 5, 26 ; '.' -spl_46 dd -1, 0 +spl_46 dd 1, 5,\ + 0, 23, 5, 23, 5, 28, 0, 28 ; '?' spl_47 dd 6, 10,\ 3, 24, 3, 28, 7, 28, 7, 24,\ @@ -13,11 +16,17 @@ spl_47 dd 6, 10,\ 6, 5, 3, 0, 6, 0, 9, 4,\ 0, 5, 2, 7, 6, 0, 3, 0 ; '!' -spl_48 dd -1, 0 +spl_48 dd 2, 12,\ + 4, 3, 8, 3, 8, 21, 4, 21,\ + 4, 24, 8, 24, 8, 28, 4, 28 ; '-' -spl_49 dd -1, 0 +spl_49 dd 1, 12,\ + 2, 11, 2, 15, 10, 15, 10, 11 ; '\n' spl_50 dd -1, -1, ? -spl_51 dd ? +; '"' +spl_51 dd 2, 12,\ + 2, 2, 5, 2, 5, 9, 2, 9,\ + 7, 2, 10, 2, 10, 9, 7, 9 spl_52 dd ? spl_53 dd ? \ No newline at end of file diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index 052d611..c4763f0 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -198,7 +198,7 @@ str_grtext db 44, 44,\ 16, 12, 1, 9, 29, 3, 1, 32, 20, 19, 33, 44,\ 5, 18, 21, 4, 10, 6, 44,\ 26, 1, 26, 12, 10, 46, 44,\ - 19, 28, 6, 5, 1, 32, 20, 44,\ + 51, 19, 28, 6, 5, 1, 32, 20, 51, 44,\ 20, 21, 44,\ 26, 1, 26, 12, 21, 45, 44,\ 3, 9, 33, 20, 10, 6, 44,\ @@ -235,7 +235,7 @@ str_grtext db 44, 44,\ 16, 5, 10, 15, 44,\ 23, 16, 5, 44,\ 14, 16, 8, 15, 16, 44,\ - 19, 28, 6, 19, 20, 30, 44,\ + 51, 19, 28, 6, 19, 20, 30, 51, 44,\ 15, 6, 19, 12, 16, 13, 30, 12, 16, 44,\ 26, 1, 26, 6, 12, 45, 44,\ 10, 4, 18, 16, 12, 44,\ From be13766b9cf426b8a26eff3d0c9b05bcf2aabd3e Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Fri, 29 Nov 2024 11:14:59 +0300 Subject: [PATCH 23/26] fix: add skip file reading if file size = 0 --- File/Settings/IniFile.asm | 5 ++++- File/TicksPositions/Ticks.asm | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/File/Settings/IniFile.asm b/File/Settings/IniFile.asm index f8bd156..c2e6a92 100644 --- a/File/Settings/IniFile.asm +++ b/File/Settings/IniFile.asm @@ -42,6 +42,8 @@ proc File.IniFile.Read uses eax ebx ecx edx edi invoke HeapAlloc, [hHeap], 8, [bufferLength] mov [readBuffer], eax invoke ReadFile, [hIniFile], [readBuffer], [bufferLength], bytesRead, 0 + cmp [bytesRead], 0 + je @F ; ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ; ; !!!!!!!!!!!!!!!!!!!!!!!!!!! DO NOT TOUCH EDI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; mov edi, [readBuffer] @@ -56,7 +58,8 @@ proc File.IniFile.Read uses eax ebx ecx edx edi stdcall File.IniFIle.ReadString, HK_SETTINGS, 0 stdcall File.IniFIle.ReadString, HK_RESTART, 0 ; !!!!!!!!!!!!!!!!!!!!! ALARM DIACTIVATE! GOOD LUCK :) !!!!!!!!!!!!!!!!!!!!!!!! ; - invoke HeapFree, [hHeap], 0, [readBuffer] + @@: + invoke HeapFree, [hHeap], 0, [readBuffer] .exit: invoke CloseHandle, [hIniFile] ret diff --git a/File/TicksPositions/Ticks.asm b/File/TicksPositions/Ticks.asm index f21e3ba..2bc0a57 100644 --- a/File/TicksPositions/Ticks.asm +++ b/File/TicksPositions/Ticks.asm @@ -34,6 +34,8 @@ proc File.TicksPosition.Read uses eax ebx ecx edx edi invoke HeapAlloc, [hHeap], 8, [bufferLength] mov [readBuffer], eax invoke ReadFile, [hTicksFile], [readBuffer], [bufferLength], bytesRead, 0 + cmp [bytesRead], 0 + je @F ; ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ALARM ; ; !!!!!!!!!!!!!!!!!!!!!!!!!!! DO NOT TOUCH EDI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; mov edi, [readBuffer] @@ -42,7 +44,8 @@ proc File.TicksPosition.Read uses eax ebx ecx edx edi stdcall File.IniFIle.ReadString, currentScore, 1 stdcall File.IniFile.StrToArrInt, TicksMatrix, 64 ; !!!!!!!!!!!!!!!!!!!!! ALARM DIACTIVATE! GOOD LUCK :) !!!!!!!!!!!!!!!!!!!!!!!! ; - invoke HeapFree, [hHeap], 0, [readBuffer] + @@: + invoke HeapFree, [hHeap], 0, [readBuffer] .exit: invoke CloseHandle, [hTicksFile] ret From 1115b99d058160cd955242eb1f962096bc075c43 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Fri, 29 Nov 2024 11:35:22 +0300 Subject: [PATCH 24/26] fix: add strings memory free functoin --- Application/Includes.asm | 3 ++- Application/_components/Exit.asm | 6 +++++- Application/_components/FreeMemory.asm | 16 ++++++++++++++++ Graphics/Includes/Data/Strings.inc | 8 ++++++++ main.asm | 8 +------- 5 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 Application/_components/FreeMemory.asm diff --git a/Application/Includes.asm b/Application/Includes.asm index 6ca59b8..65b3dd1 100644 --- a/Application/Includes.asm +++ b/Application/Includes.asm @@ -1 +1,2 @@ -include '_components/Exit.asm' \ No newline at end of file +include '_components/Exit.asm' +include '_components/FreeMemory.asm' \ No newline at end of file diff --git a/Application/_components/Exit.asm b/Application/_components/Exit.asm index 6beb03c..341f4f7 100644 --- a/Application/_components/Exit.asm +++ b/Application/_components/Exit.asm @@ -1,7 +1,11 @@ proc Application.Exit stdcall File.IniFile.Write stdcall File.TicksPosition.Write + stdcall Application.FreeMamory invoke HeapDestroy, [hHeap] - invoke ExitProcess, [msg.wParam] + invoke wglMakeCurrent,0,0 + invoke wglDeleteContext,[hrc] + invoke ReleaseDC,[hwnd],[hdc] + invoke PostQuitMessage,0 ret endp diff --git a/Application/_components/FreeMemory.asm b/Application/_components/FreeMemory.asm new file mode 100644 index 0000000..28b6a60 --- /dev/null +++ b/Application/_components/FreeMemory.asm @@ -0,0 +1,16 @@ +proc Application.FreeMamory + stdcall Application.FreeArray, [txts_array] + ret +endp + +proc Application.FreeArray uses eax ebx,\ + array + mov ebx, [array] + .freeLoop: + invoke HeapFree, [hHeap], 0, [ebx] + add ebx, 4 + mov eax, [ebx] + cmp eax, 0 + jne .freeLoop + ret +endp \ No newline at end of file diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index c4763f0..c6a1f0c 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -329,6 +329,14 @@ txt_hkpause dd ? txt_hkexit dd ? txt_hkrestart dd ? +txts_array dd txt_headline, txt_headline_bc, txt_play, txt_about, txt_settings, txt_return, txt_grtext,\ + txt_Mexit, txt_title, txt_cost, txt_info, txt_watermark, txt_R_hk, txt_P_hk,\ + txt_S_hk, txt_pause, txt_exit, txt_saveAexit, txt_winner, txt_score, txt_score_num,\ + txt_again, txt_wexit, txt_stats, txt_msettings, txt_chhotkeys, txt_music, txt_voice,\ + txt_hotkeys, txt_HPhotkeys, txt_volume, txt_moff, txt_voff, txt_hoff, txt_mon,\ + txt_von, txt_hon, txt_wantExit, txt_yes, txt_no, txt_gamerool, txt_hkplay,\ + txt_hkabout, txt_hksettings, txt_hkpause, txt_hkexit, txt_hkrestart, 0 + arr_of_letters dd ltr_RU_1, ltr_RU_2, ltr_RU_3, ltr_RU_4, ltr_RU_5, ltr_RU_6, ltr_RU_7,\ ; RU ltr_RU_8, ltr_RU_9, ltr_RU_10, ltr_RU_11, ltr_RU_12, ltr_RU_13, ltr_RU_14,\ ltr_RU_15, ltr_RU_16, ltr_RU_17, ltr_RU_18, ltr_RU_19, ltr_RU_20, ltr_RU_21,\ diff --git a/main.asm b/main.asm index d1b4fcf..a67b4e3 100644 --- a/main.asm +++ b/main.asm @@ -128,13 +128,7 @@ proc WindowProc hwnd,wmsg,wparam,lparam xor eax,eax jmp .finish .wmdestroy: - stdcall File.IniFile.Write - stdcall File.TicksPosition.Write - invoke HeapDestroy, [hHeap] - invoke wglMakeCurrent,0,0 - invoke wglDeleteContext,[hrc] - invoke ReleaseDC,[hwnd],[hdc] - invoke PostQuitMessage,0 + stdcall Application.Exit xor eax,eax jmp .finish .wmmousemove: From 5a63af772e8a77b9621521dd36bc649986b643f5 Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Fri, 29 Nov 2024 14:42:46 +0300 Subject: [PATCH 25/26] fix: change clobber flag --- build.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/build.js b/build.js index d5f45b0..82d1128 100644 --- a/build.js +++ b/build.js @@ -30,22 +30,21 @@ try { execSync(command, { stdio: 'inherit' }); console.log(`85% - Success`); - console.log(`90% - Return in work directory: ${process.cwd()};`); + console.log(`100% - Return in work directory: ${process.cwd()};`); process.chdir(config.projectDir); - process.exit(0); - // const sourceFolder = path.join(config.projectDir, config.copy.srcFolder); - // const destFolder = path.join(buildConfig.folder, config.copy.destFolder); - // console.log(`0% - Start copy source from ${sourceFolder} to ${destFolder}`); - // ncp(sourceFolder, destFolder) - // .then(() => { - // console.log(`100% - Files copied successfully from ${sourceFolder} to ${destFolder}`); - // process.exit(0); - // }) - // .catch(err => { - // console.error(`Error copying files: ${err}`); - // process.exit(1); - // }); + const sourceFolder = path.join(config.projectDir, config.copy.srcFolder); + const destFolder = path.join(buildConfig.folder, config.copy.destFolder); + console.log(`0% - Start copy source from ${sourceFolder} to ${destFolder}`); + ncp(sourceFolder, destFolder, { clobber: false }) + .then(() => { + console.log(`100% - Files copied successfully from ${sourceFolder} to ${destFolder}`); + process.exit(0); + }) + .catch(err => { + console.error(`Error copying files: ${err}`); + process.exit(1); + }); } catch (error) { console.error(`Error: ${error.message}`); process.exit(1); -} +} \ No newline at end of file From 942213e322d5e49631b0cf10aeba39bda17c9e5c Mon Sep 17 00:00:00 2001 From: Kostya Betenya Date: Fri, 29 Nov 2024 18:11:57 +0300 Subject: [PATCH 26/26] fet: create hotkeys info output --- Graphics/Includes/Data/Letters.inc | 1 + .../Includes/Data/Letters/EnglishLetters.inc | 14 ++- Graphics/Includes/Data/Strings.inc | 29 +++-- Graphics/Includes/DataPrepears.asm | 103 ++++++++++-------- Graphics/Pages/_components/HotkeysPage.asm | 6 + Scripts/Getters/Getters.asm | 10 ++ 6 files changed, 109 insertions(+), 54 deletions(-) diff --git a/Graphics/Includes/Data/Letters.inc b/Graphics/Includes/Data/Letters.inc index 31449c1..644f3a1 100644 --- a/Graphics/Includes/Data/Letters.inc +++ b/Graphics/Includes/Data/Letters.inc @@ -69,6 +69,7 @@ fs_yesno = 5 fs_gamerool = 27 fs_grtext = 0 fs_hktext = 0 +fs_hktextS = 0 include 'Letters/RussianLetters.inc' include 'Letters/Digits.inc' diff --git a/Graphics/Includes/Data/Letters/EnglishLetters.inc b/Graphics/Includes/Data/Letters/EnglishLetters.inc index 8851e52..3c2a2e3 100644 --- a/Graphics/Includes/Data/Letters/EnglishLetters.inc +++ b/Graphics/Includes/Data/Letters/EnglishLetters.inc @@ -1,5 +1,8 @@ ; A -ltr_EN_54 dd ? +ltr_EN_54 dd 3, 15,\ + 5, 0, 9, 0, 4, 28, 0, 28,\ ; / + 3, 18, 3, 22, 12, 22, 12, 18,\ ; - + 5, 0, 9, 0, 15, 28, 11, 28 ; \ ; B ltr_EN_55 dd ? ; C @@ -45,7 +48,12 @@ ltr_EN_69 dd 4, 12,\ 8, 1, 12, 1, 12, 11, 8, 11,\ ; | (right) 4, 8, 4, 12, 11, 12, 11, 8 ; - (center) ; Q -ltr_EN_70 dd ? +ltr_EN_70 dd 5, 12,\ + 0, 1, 4, 1, 4, 27, 0, 27,\ + 1, 0, 1, 4, 11, 4, 11, 0,\ + 8, 1, 12, 1, 12, 27, 8, 27,\ + 1, 24, 1, 28, 11, 28, 11, 24,\ + 7, 27, 13, 27, 15, 30, 10, 30 ; R ltr_EN_71 dd 5, 14,\ 0, 1, 4, 1, 4, 27, 0, 27,\ ; | (left) @@ -58,7 +66,7 @@ ltr_EN_72 dd 5, 14,\ 0, 1, 4, 1, 4, 13, 0, 13,\ ; | (left) 1, 0, 1, 4, 11, 4, 11, 0,\ ; - (top) 8, 11, 12, 11, 12, 27, 8, 27,\ ; | (right) - 4, 11, 4, 15, 11, 15, 11, 11,\ ; - (center) + 1, 11, 1, 15, 11, 15, 11, 11,\ ; - (center) 0, 23, 0, 27, 11, 27, 11, 23 ; - (bottom) ; T ltr_EN_73 dd ? diff --git a/Graphics/Includes/Data/Strings.inc b/Graphics/Includes/Data/Strings.inc index c6a1f0c..42be301 100644 --- a/Graphics/Includes/Data/Strings.inc +++ b/Graphics/Includes/Data/Strings.inc @@ -59,6 +59,7 @@ tg_yesno = 7 tg_gamerool = 10 tg_grtext = 8 tg_hktext = 7 +tg_hktextS = 0 ; ====== Interfaces ====== ; struct Points @@ -280,6 +281,13 @@ str_hkexit db 3, 29, 23, 16, 5, 0 ; 'ВЫХОД' str_hkexit_pos dd 1112, 549 str_hkrestart db 9, 1, 15, 16, 3, 16, 0 ; 'ЗАНОВО' str_hkrestart_pos dd 1112, 594 +str_hkplayS_pos dd 736, 504 +str_hkaboutS_pos dd 736, 549 +str_hksettingsS_pos dd 736, 594 +str_hkpauseS_pos dd 1044, 504 +str_hkexitS_pos dd 1044, 549 +str_hkrestartS_pos dd 1044, 594 +str_hotkey db 70, 0 ; 'ЗАНОВО' ; ====== Program models ====== ; txt_headline dd ? txt_headline_bc dd ? @@ -328,14 +336,21 @@ txt_hksettings dd ? txt_hkpause dd ? txt_hkexit dd ? txt_hkrestart dd ? +txt_hkplayS dd ? +txt_hkaboutS dd ? +txt_hksettingsS dd ? +txt_hkpauseS dd ? +txt_hkexitS dd ? +txt_hkrestartS dd ? -txts_array dd txt_headline, txt_headline_bc, txt_play, txt_about, txt_settings, txt_return, txt_grtext,\ - txt_Mexit, txt_title, txt_cost, txt_info, txt_watermark, txt_R_hk, txt_P_hk,\ - txt_S_hk, txt_pause, txt_exit, txt_saveAexit, txt_winner, txt_score, txt_score_num,\ - txt_again, txt_wexit, txt_stats, txt_msettings, txt_chhotkeys, txt_music, txt_voice,\ - txt_hotkeys, txt_HPhotkeys, txt_volume, txt_moff, txt_voff, txt_hoff, txt_mon,\ - txt_von, txt_hon, txt_wantExit, txt_yes, txt_no, txt_gamerool, txt_hkplay,\ - txt_hkabout, txt_hksettings, txt_hkpause, txt_hkexit, txt_hkrestart, 0 +txts_array dd txt_headline, txt_headline_bc, txt_play, txt_about, txt_settings, txt_return, txt_grtext,\ + txt_Mexit, txt_title, txt_cost, txt_info, txt_watermark, txt_R_hk, txt_P_hk,\ + txt_S_hk, txt_pause, txt_exit, txt_saveAexit, txt_winner, txt_score, txt_score_num,\ + txt_again, txt_wexit, txt_stats, txt_msettings, txt_chhotkeys, txt_music, txt_voice,\ + txt_hotkeys, txt_HPhotkeys, txt_volume, txt_moff, txt_voff, txt_hoff, txt_mon,\ + txt_von, txt_hon, txt_wantExit, txt_yes, txt_no, txt_gamerool, txt_hkplay,\ + txt_hkabout, txt_hksettings, txt_hkpause, txt_hkexit, txt_hkrestart, txt_hkplayS, txt_hkaboutS,\ + txt_hksettingsS, txt_hkpauseS, txt_hkexitS, txt_hkrestartS, 0 arr_of_letters dd ltr_RU_1, ltr_RU_2, ltr_RU_3, ltr_RU_4, ltr_RU_5, ltr_RU_6, ltr_RU_7,\ ; RU ltr_RU_8, ltr_RU_9, ltr_RU_10, ltr_RU_11, ltr_RU_12, ltr_RU_13, ltr_RU_14,\ diff --git a/Graphics/Includes/DataPrepears.asm b/Graphics/Includes/DataPrepears.asm index 8d29fab..08ca16a 100644 --- a/Graphics/Includes/DataPrepears.asm +++ b/Graphics/Includes/DataPrepears.asm @@ -149,50 +149,65 @@ proc Graphics.Colors.Prepear endp proc Graphics.Draw.ASCIIPrepear - stdcall Graphics.Draw.Text.Prepear, txt_headline, str_headline, fs_headline, tg_headline, str_headline_pos - stdcall Graphics.Draw.Text.Prepear, txt_headline_bc, str_headline_bc, fs_headline, tg_headline, str_headline_bc_pos - stdcall Graphics.Draw.Text.Prepear, txt_play, str_play, fs_play, tg_play, str_play_pos - stdcall Graphics.Draw.Text.Prepear, txt_about, str_about, fs_about, tg_about, str_about_pos - stdcall Graphics.Draw.Text.Prepear, txt_settings, str_settings, fs_settings, tg_settings, str_settings_pos - stdcall Graphics.Draw.Text.Prepear, txt_Mexit, str_exit, fs_Mexit, tg_Mexit, str_Mexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_title, str_title, fs_title, tg_title, str_title_pos - stdcall Graphics.Draw.Text.Prepear, txt_return, str_return, fs_return, tg_return, str_return_pos - stdcall Graphics.Draw.Text.Prepear, txt_R_hk, str_R_hk, fs_hk, tg_hk, str_R_hk_pos - stdcall Graphics.Draw.Text.Prepear, txt_P_hk, str_P_hk, fs_hk, tg_hk, str_P_hk_pos - stdcall Graphics.Draw.Text.Prepear, txt_S_hk, str_S_hk, fs_hk, tg_hk, str_S_hk_pos - stdcall Graphics.Draw.Text.Prepear, txt_pause, str_pause, fs_pause, tg_pause, str_pause_pos - stdcall Graphics.Draw.Text.Prepear, txt_exit, str_exit, fs_exit, tg_exit, str_exit_pos - stdcall Graphics.Draw.Text.Prepear, txt_saveAexit, str_saveAexit, fs_saveAexit, tg_saveAexit, str_saveAexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_winner, str_winner, fs_winner, tg_winner, str_winner_pos - stdcall Graphics.Draw.Text.Prepear, txt_score, str_score, fs_score, tg_score, str_score_pos - stdcall Graphics.Draw.Text.Prepear, txt_score_num, str_score_num, fs_score_num, tg_score_num, str_score_num_pos - stdcall Graphics.Draw.Text.Prepear, txt_again, str_again, fs_again, tg_again, str_again_pos - stdcall Graphics.Draw.Text.Prepear, txt_wexit, str_exit, fs_again, tg_again, str_wexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_stats, str_stats, fs_again, tg_again, str_stats_pos - stdcall Graphics.Draw.Text.Prepear, txt_msettings, str_settings, fs_msettings, tg_msettings, str_msettings_pos - stdcall Graphics.Draw.Text.Prepear, txt_chhotkeys, str_chhotkeys, fs_chhotkeys, tg_chhotkeys, str_chhotkeys_pos - stdcall Graphics.Draw.Text.Prepear, txt_music, str_music, fs_music, tg_music, str_music_pos - stdcall Graphics.Draw.Text.Prepear, txt_voice, str_voice, fs_music, tg_voice, str_voice_pos - stdcall Graphics.Draw.Text.Prepear, txt_hotkeys, str_hotkeys, fs_hotkeys, tg_hotkeys, str_hotkeys_pos - stdcall Graphics.Draw.Text.Prepear, txt_volume, str_volume, fs_music, tg_volume, str_volume_pos - stdcall Graphics.Draw.Text.Prepear, txt_moff, str_off, fs_switch, tg_switch, str_moff_pos - stdcall Graphics.Draw.Text.Prepear, txt_voff, str_off, fs_switch, tg_switch, str_voff_pos - stdcall Graphics.Draw.Text.Prepear, txt_hoff, str_off, fs_switch, tg_switch, str_hoff_pos - stdcall Graphics.Draw.Text.Prepear, txt_mon, str_on, fs_switch, tg_switch, str_mon_pos - stdcall Graphics.Draw.Text.Prepear, txt_von, str_on, fs_switch, tg_switch, str_von_pos - stdcall Graphics.Draw.Text.Prepear, txt_hon, str_on, fs_switch, tg_switch, str_hon_pos - stdcall Graphics.Draw.Text.Prepear, txt_HPhotkeys, str_chhotkeys, fs_HPhotkeys, tg_HPhotkeys, str_HPhotkeys_pos - stdcall Graphics.Draw.Text.Prepear, txt_wantExit, str_wantExit, fs_wantExit, tg_wantExit, str_wantExit_pos - stdcall Graphics.Draw.Text.Prepear, txt_yes, str_yes, fs_yesno, tg_yesno, str_yes_pos - stdcall Graphics.Draw.Text.Prepear, txt_no, str_no, fs_yesno, tg_yesno, str_no_pos - stdcall Graphics.Draw.Text.Prepear, txt_gamerool, str_gamerool, fs_gamerool, tg_gamerool, str_gamerool_pos - stdcall Graphics.Draw.Text.Prepear, txt_grtext, str_grtext, fs_grtext, tg_grtext, str_grtext_pos - stdcall Graphics.Draw.Text.Prepear, txt_hkplay, str_hkplay, fs_hktext, tg_hktext, str_hkplay_pos - stdcall Graphics.Draw.Text.Prepear, txt_hkabout, str_hkabout, fs_hktext, tg_hktext, str_hkabout_pos - stdcall Graphics.Draw.Text.Prepear, txt_hksettings, str_hksettings, fs_hktext, tg_hktext, str_hksettings_pos - stdcall Graphics.Draw.Text.Prepear, txt_hkpause, str_hkpause, fs_hktext, tg_hktext, str_hkpause_pos - stdcall Graphics.Draw.Text.Prepear, txt_hkexit, str_hkexit, fs_hktext, tg_hktext, str_hkexit_pos - stdcall Graphics.Draw.Text.Prepear, txt_hkrestart, str_hkrestart, fs_hktext, tg_hktext, str_hkrestart_pos + locals + address dd ? + endl + stdcall Graphics.Draw.Text.Prepear, txt_headline, str_headline, fs_headline, tg_headline, str_headline_pos + stdcall Graphics.Draw.Text.Prepear, txt_headline_bc, str_headline_bc, fs_headline, tg_headline, str_headline_bc_pos + stdcall Graphics.Draw.Text.Prepear, txt_play, str_play, fs_play, tg_play, str_play_pos + stdcall Graphics.Draw.Text.Prepear, txt_about, str_about, fs_about, tg_about, str_about_pos + stdcall Graphics.Draw.Text.Prepear, txt_settings, str_settings, fs_settings, tg_settings, str_settings_pos + stdcall Graphics.Draw.Text.Prepear, txt_Mexit, str_exit, fs_Mexit, tg_Mexit, str_Mexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_title, str_title, fs_title, tg_title, str_title_pos + stdcall Graphics.Draw.Text.Prepear, txt_return, str_return, fs_return, tg_return, str_return_pos + stdcall Graphics.Draw.Text.Prepear, txt_R_hk, str_R_hk, fs_hk, tg_hk, str_R_hk_pos + stdcall Graphics.Draw.Text.Prepear, txt_P_hk, str_P_hk, fs_hk, tg_hk, str_P_hk_pos + stdcall Graphics.Draw.Text.Prepear, txt_S_hk, str_S_hk, fs_hk, tg_hk, str_S_hk_pos + stdcall Graphics.Draw.Text.Prepear, txt_pause, str_pause, fs_pause, tg_pause, str_pause_pos + stdcall Graphics.Draw.Text.Prepear, txt_exit, str_exit, fs_exit, tg_exit, str_exit_pos + stdcall Graphics.Draw.Text.Prepear, txt_saveAexit, str_saveAexit, fs_saveAexit, tg_saveAexit, str_saveAexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_winner, str_winner, fs_winner, tg_winner, str_winner_pos + stdcall Graphics.Draw.Text.Prepear, txt_score, str_score, fs_score, tg_score, str_score_pos + stdcall Graphics.Draw.Text.Prepear, txt_score_num, str_score_num, fs_score_num, tg_score_num, str_score_num_pos + stdcall Graphics.Draw.Text.Prepear, txt_again, str_again, fs_again, tg_again, str_again_pos + stdcall Graphics.Draw.Text.Prepear, txt_wexit, str_exit, fs_again, tg_again, str_wexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_stats, str_stats, fs_again, tg_again, str_stats_pos + stdcall Graphics.Draw.Text.Prepear, txt_msettings, str_settings, fs_msettings, tg_msettings, str_msettings_pos + stdcall Graphics.Draw.Text.Prepear, txt_chhotkeys, str_chhotkeys, fs_chhotkeys, tg_chhotkeys, str_chhotkeys_pos + stdcall Graphics.Draw.Text.Prepear, txt_music, str_music, fs_music, tg_music, str_music_pos + stdcall Graphics.Draw.Text.Prepear, txt_voice, str_voice, fs_music, tg_voice, str_voice_pos + stdcall Graphics.Draw.Text.Prepear, txt_hotkeys, str_hotkeys, fs_hotkeys, tg_hotkeys, str_hotkeys_pos + stdcall Graphics.Draw.Text.Prepear, txt_volume, str_volume, fs_music, tg_volume, str_volume_pos + stdcall Graphics.Draw.Text.Prepear, txt_moff, str_off, fs_switch, tg_switch, str_moff_pos + stdcall Graphics.Draw.Text.Prepear, txt_voff, str_off, fs_switch, tg_switch, str_voff_pos + stdcall Graphics.Draw.Text.Prepear, txt_hoff, str_off, fs_switch, tg_switch, str_hoff_pos + stdcall Graphics.Draw.Text.Prepear, txt_mon, str_on, fs_switch, tg_switch, str_mon_pos + stdcall Graphics.Draw.Text.Prepear, txt_von, str_on, fs_switch, tg_switch, str_von_pos + stdcall Graphics.Draw.Text.Prepear, txt_hon, str_on, fs_switch, tg_switch, str_hon_pos + stdcall Graphics.Draw.Text.Prepear, txt_HPhotkeys, str_chhotkeys, fs_HPhotkeys, tg_HPhotkeys, str_HPhotkeys_pos + stdcall Graphics.Draw.Text.Prepear, txt_wantExit, str_wantExit, fs_wantExit, tg_wantExit, str_wantExit_pos + stdcall Graphics.Draw.Text.Prepear, txt_yes, str_yes, fs_yesno, tg_yesno, str_yes_pos + stdcall Graphics.Draw.Text.Prepear, txt_no, str_no, fs_yesno, tg_yesno, str_no_pos + stdcall Graphics.Draw.Text.Prepear, txt_gamerool, str_gamerool, fs_gamerool, tg_gamerool, str_gamerool_pos + stdcall Graphics.Draw.Text.Prepear, txt_grtext, str_grtext, fs_grtext, tg_grtext, str_grtext_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkplay, str_hkplay, fs_hktext, tg_hktext, str_hkplay_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkabout, str_hkabout, fs_hktext, tg_hktext, str_hkabout_pos + stdcall Graphics.Draw.Text.Prepear, txt_hksettings, str_hksettings, fs_hktext, tg_hktext, str_hksettings_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkpause, str_hkpause, fs_hktext, tg_hktext, str_hkpause_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkexit, str_hkexit, fs_hktext, tg_hktext, str_hkexit_pos + stdcall Graphics.Draw.Text.Prepear, txt_hkrestart, str_hkrestart, fs_hktext, tg_hktext, str_hkrestart_pos + stdcall Scripts.Convert.FromENtoASCII, [HK_PLAY], str_hotkey + stdcall Graphics.Draw.Text.Prepear, txt_hkplayS, str_hotkey, fs_hktextS, tg_hktextS, str_hkplayS_pos + stdcall Scripts.Convert.FromENtoASCII, [HK_ABOUT], str_hotkey + stdcall Graphics.Draw.Text.Prepear, txt_hkaboutS, str_hotkey, fs_hktextS, tg_hktextS, str_hkaboutS_pos + stdcall Scripts.Convert.FromENtoASCII, [HK_SETTINGS], str_hotkey + stdcall Graphics.Draw.Text.Prepear, txt_hksettingsS, str_hotkey, fs_hktextS, tg_hktextS, str_hksettingsS_pos + stdcall Scripts.Convert.FromENtoASCII, [HK_STOP], str_hotkey + stdcall Graphics.Draw.Text.Prepear, txt_hkpauseS, str_hotkey, fs_hktextS, tg_hktextS, str_hkpauseS_pos + stdcall Scripts.Convert.FromENtoASCII, [HK_EXIT], str_hotkey + stdcall Graphics.Draw.Text.Prepear, txt_hkexitS, str_hotkey, fs_hktextS, tg_hktextS, str_hkexitS_pos + stdcall Scripts.Convert.FromENtoASCII, [HK_RESTART], str_hotkey + stdcall Graphics.Draw.Text.Prepear, txt_hkrestartS, str_hotkey, fs_hktextS, tg_hktextS, str_hkrestartS_pos ret endp diff --git a/Graphics/Pages/_components/HotkeysPage.asm b/Graphics/Pages/_components/HotkeysPage.asm index 06b3f17..b3ca4bb 100644 --- a/Graphics/Pages/_components/HotkeysPage.asm +++ b/Graphics/Pages/_components/HotkeysPage.asm @@ -18,31 +18,37 @@ proc Draw.Pages.HotkeysPage stdcall Graphics.Draw.Shapes, hp_playbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_playfont_design, body_color stdcall Graphics.Draw.Text.Write, [txt_hkplay], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_hkplayS], brown_text_color ; PAUSE stdcall Graphics.Draw.Shapes, hp_pausebrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_pausefont_design, body_color stdcall Graphics.Draw.Text.Write, [txt_hkpause], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_hkpauseS], brown_text_color ; ABOUT stdcall Graphics.Draw.Shapes, hp_aboutbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_aboutfont_design, body_color stdcall Graphics.Draw.Text.Write, [txt_hkabout], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_hkaboutS], brown_text_color ; EXIT stdcall Graphics.Draw.Shapes, hp_exitbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_exitfont_design, body_color stdcall Graphics.Draw.Text.Write, [txt_hkexit], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_hkexitS], brown_text_color ; SETINGS stdcall Graphics.Draw.Shapes, hp_stngbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_stngfont_design, body_color stdcall Graphics.Draw.Text.Write, [txt_hksettings], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_hksettingsS], brown_text_color ; RESTART stdcall Graphics.Draw.Shapes, hp_rstrbrdr_design, brown_text_color stdcall Graphics.Draw.Shapes, hp_rstrfont_design, body_color stdcall Graphics.Draw.Text.Write, [txt_hkrestart], brown_text_color + stdcall Graphics.Draw.Text.Write, [txt_hkrestartS], brown_text_color ret endp \ No newline at end of file diff --git a/Scripts/Getters/Getters.asm b/Scripts/Getters/Getters.asm index f5eaa00..88a9524 100644 --- a/Scripts/Getters/Getters.asm +++ b/Scripts/Getters/Getters.asm @@ -565,3 +565,13 @@ proc Script.Colors.CopyColor uses eax ecx edx edi,\ loop .mainLoop ret endp +proc Scripts.Convert.FromENtoASCII uses eax ebx,\ + letter, address + xor eax, eax + mov al, byte [letter] + sub eax, 'A' + add eax, 54 + mov ebx, [address] + mov byte [ebx], al + ret +endp \ No newline at end of file