15 Commits

Author SHA1 Message Date
8a069d3fa9 TinyGL:
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 35s
Build system / Build (pull_request) Successful in 8m47s
- fix function glClearDepth
- fix bug with z-buffer (fix 'info3ds', 'info3ds_u', 'vox_tgl', ...)
- fix array functions: glDrawArrays, glDrawElements (fix 'test_array1')
2025-04-15 14:31:39 +02:00
e4cd8a4d74 Calc+ v1.0 (#189)
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 26s
Build system / Build (pull_request) Successful in 7m1s
- Bigger fonts
- System colors
- Code refactoring to make UI flexible and more readable
- Move from ISO to IMG
- Add to main menu, add to desktop instead of Calc, remove from App+
- Localization to all system languages
- Source code file is now UTF-8

Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: #189
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: Kiril Lipatov <lipatov.kiril@gmail.com>
Co-committed-by: Kiril Lipatov <lipatov.kiril@gmail.com>
2025-04-14 19:46:57 +02:00
75b6663ce0 Ftpc: Update (#185)
- fix for bugs with buffers 'remote_list_buf', 'buf_buffer2';
- fix stack leak when navigating files;
- change sorting of folders and files, clean code;
- added option to show|hide log;
- icons are taken from @reshare;
- added icons to the 'disconnect' and 'search' buttons.

Reviewed-on: #185
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: IgorA <aie85playm@gmail.com>
Co-committed-by: IgorA <aie85playm@gmail.com>
2025-04-10 18:47:13 +02:00
df0c5d8f48 Сharsets: Updated to 0.4.2 (#196)
30.03.2025 - 0.4.0
- Localization for all system languages
- Display all character scales
- Abolity to copy character codes
- Block on charpage 00 for CP866
- New character code half markers
- Navigation using keys (see hotkeys.txt)

03.04.2025 - 0.4.1
- Fixed bug with codes color subscription

04.04.2025 - 0.4.2
- Fixed bug with resetting UTF charpage to zero on double charset swap to CP866
- Improved charpage blocking for CP866 UX
- Improved char codes copying UI

Reviewed-on: #196
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: Burer <burer@kolibrios.org>
Co-committed-by: Burer <burer@kolibrios.org>
2025-04-10 16:24:11 +02:00
fcb9f49785 flood-it: Fixed buttons position (#193)
Reviewed-on: #193
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-04-03 12:32:18 +02:00
d6c44c6570 WebView 3.9
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 31s
Build system / Build (pull_request) Successful in 6m27s
- new homepages
- fix clash on a wrong <kosicon> number
- set proper internal page sizes
2025-04-03 10:50:04 +02:00
b8a1487bab Fixed menu.dat (ru_RU) after moving the period app
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 22s
Build system / Build (pull_request) Successful in 6m24s
Signed-off-by: Max Logaev <maxlogaev@proton.me>
2025-04-03 11:29:55 +03:00
00c2cfbcfc Period: Moved from IMG to ISO
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 32s
Build system / Build (pull_request) Successful in 6m27s
2025-04-03 10:00:33 +02:00
c398a2bbf4 Unz: Fixed bug #27 (#190)
Reviewed-on: #190
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-04-03 09:39:02 +02:00
58cf25fe43 menuetlibc: Fixed ef_exp.s (#177)
Fix for a similar problem: https://git.kolibrios.org/KolibriOS/kolibrios/commit/12a6b7f2

Reviewed-on: #177
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: IgorA <aie85playm@gmail.com>
Co-committed-by: IgorA <aie85playm@gmail.com>
2025-04-02 21:34:04 +02:00
8da45bab3e Eolite 5.32: Search fix (#191)
- LMB to open file, RMB to show in folder
- fix: correctly open folders
- fix UI: better list alignment
- Eolite: optimize OpenDir
- SelectList_ProcessMouse() better react on click

Reviewed-on: #191
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-04-02 21:26:12 +02:00
5abc319817 Boxlib: the tree_list can use large fonts, fix line number error
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 28s
Build system / Build (pull_request) Successful in 5m25s
2025-04-01 21:58:38 +02:00
ff625706c0 Eolite 5.31: (#187)
- fix: editbox edit text
- fix: remove unnecessary editbox form delete popin
- add: "Copy path" menu item
- add: "Search" to a burger menu

Reviewed-on: #187
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Reviewed-by: rgimad <rgimad@noreply.localhost>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-03-31 22:40:54 +02:00
81dafb3025 Floot-It v3.0 (#181)
- adopt window size to screen size
- bigger fonts
- proper colored 'S' and 'L' buttons
- fix issue: after won the game clicks count always increased to max
- code refactoring, translate comments to English
- help updated

Reviewed-on: #181
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-03-31 08:15:28 +02:00
58e2d0b844 Blocks: Added 2 models and 5 types of blocks (#180)
- Added 2 models (bird and castle);
- Added 5 types of blocks;
- Added block.asm to autobuild.

Co-authored-by: Max Logaev <maxlogaev@proton.me>
Reviewed-on: #180
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: IgorA <aie85playm@gmail.com>
Co-committed-by: IgorA <aie85playm@gmail.com>
2025-03-30 16:42:51 +02:00
74 changed files with 8233 additions and 2142 deletions

View File

@@ -49,8 +49,6 @@ img_files = {
{"MEDIA/IMGF/INVSOL.OBJ", "common/media/ImgF/invSol.obj"}, {"MEDIA/IMGF/INVSOL.OBJ", "common/media/ImgF/invSol.obj"},
{"MEDIA/PIXIESKN.PNG", SRC_PROGS .. "/cmm/pixie2/pixieskn.png"}, {"MEDIA/PIXIESKN.PNG", SRC_PROGS .. "/cmm/pixie2/pixieskn.png"},
{"NETWORK/FTPC.INI", SRC_PROGS .. "/network/ftpc/ftpc.ini"}, {"NETWORK/FTPC.INI", SRC_PROGS .. "/network/ftpc/ftpc.ini"},
{"NETWORK/FTPC_SYS.PNG", SRC_PROGS .. "/network/ftpc/ftpc_sys.png"},
{"NETWORK/FTPC_NOD.PNG", SRC_PROGS .. "/network/ftpc/ftpc_nod.png"},
{"NETWORK/FTPD.INI", "common/network/ftpd.ini"}, {"NETWORK/FTPD.INI", "common/network/ftpd.ini"},
{"NETWORK/KNMAP", "common/network/knmap"}, {"NETWORK/KNMAP", "common/network/knmap"},
{"NETWORK/USERS.INI", "common/network/users.ini"}, {"NETWORK/USERS.INI", "common/network/users.ini"},
@@ -157,7 +155,7 @@ extra_files = {
{"kolibrios/3D/info3ds/OBJECTS.PNG", SRC_PROGS .. "/develop/info3ds/objects.png"}, {"kolibrios/3D/info3ds/OBJECTS.PNG", SRC_PROGS .. "/develop/info3ds/objects.png"},
{"kolibrios/3D/info3ds/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"}, {"kolibrios/3D/info3ds/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"},
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"}, {"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
{"kolibrios/3D/blocks/", "../programs/bcc32/games/blocks/bin/*"}, {"kolibrios/3D/blocks/blocks.kex", "../programs/bcc32/games/blocks/bin/blocks.kex"},
{"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"}, {"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"},
{"kolibrios/3D/md2view/", "common/3d/md2view/*"}, {"kolibrios/3D/md2view/", "common/3d/md2view/*"},
{"kolibrios/3D/md2view/md2_model/", "common/3d/md2view/md2_model/*"}, {"kolibrios/3D/md2view/md2_model/", "common/3d/md2view/md2_model/*"},
@@ -412,6 +410,7 @@ tup.append_table(img_files, {
{"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"}, {"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"},
{"APM", VAR_PROGS .. "/system/apm/apm"}, {"APM", VAR_PROGS .. "/system/apm/apm"},
{"CALC", VAR_PROGS .. "/other/calc/trunk/calc"}, {"CALC", VAR_PROGS .. "/other/calc/trunk/calc"},
{"CALCPLUS", VAR_PROGS .. "/other/calcplus/calcplus"},
{"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"}, {"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"},
{"COLRDIAL", VAR_PROGS .. "/system/colrdial/color_dialog"}, {"COLRDIAL", VAR_PROGS .. "/system/colrdial/color_dialog"},
{"CROPFLAT", VAR_PROGS .. "/system/cropflat/cropflat"}, {"CROPFLAT", VAR_PROGS .. "/system/cropflat/cropflat"},
@@ -628,13 +627,12 @@ tup.append_table(extra_files, {
{"kolibrios/media/zsea/plugins/rotate.obj", VAR_PROGS .. "/media/zsea/plugins/rotate/rotate.obj"}, {"kolibrios/media/zsea/plugins/rotate.obj", VAR_PROGS .. "/media/zsea/plugins/rotate/rotate.obj"},
{"kolibrios/media/zsea/plugins/scaling.obj", VAR_PROGS .. "/media/zsea/plugins/scaling/scaling.obj"}, {"kolibrios/media/zsea/plugins/scaling.obj", VAR_PROGS .. "/media/zsea/plugins/scaling/scaling.obj"},
{"kolibrios/utils/AMDtemp", VAR_PROGS .. "/system/amd_temp_view/AMDtemp"}, {"kolibrios/utils/AMDtemp", VAR_PROGS .. "/system/amd_temp_view/AMDtemp"},
{"kolibrios/utils/calcplus", VAR_PROGS .. "/other/calcplus/calcplus"},
{"kolibrios/utils/kfm/kfm", VAR_PROGS .. "/fs/kfm/trunk/kfm"}, {"kolibrios/utils/kfm/kfm", VAR_PROGS .. "/fs/kfm/trunk/kfm"},
{"kolibrios/utils/tedit/t_edit", VAR_PROGS .. "/other/t_edit/t_edit"}, {"kolibrios/utils/tedit/t_edit", VAR_PROGS .. "/other/t_edit/t_edit"},
{"kolibrios/3D/blocks/block.bin", VAR_PROGS .. "/bcc32/games/blocks/block.bin"}
}) })
-- For russian build, add russian-only programs. -- For russian build, add russian-only programs.
if build_type == "ru_RU" then tup.append_table(img_files, { if build_type == "ru_RU" then tup.append_table(img_files, {
{"PERIOD", VAR_PROGS .. "/other/period/trunk/period"},
{"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"}, {"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"},
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"}, {"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
}) else tup.append_table(img_files, { }) else tup.append_table(img_files, {
@@ -642,6 +640,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
}) end }) end
if build_type == "ru_RU" then tup.append_table(extra_files, { if build_type == "ru_RU" then tup.append_table(extra_files, {
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/trunk/period"},
{"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"}, {"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"},
}) end }) end

View File

@@ -29,7 +29,6 @@ Dicty=/k/utils/DICTY.KEX,79
fNav=/k/utils/fNav/fNav,93 fNav=/k/utils/fNav/fNav,93
CncEditor=/k/utils/cnc_editor/cnc_editor,15 CncEditor=/k/utils/cnc_editor/cnc_editor,15
Life=/k/demos/life2,13 Life=/k/demos/life2,13
Calc+=/k/utils/calcplus,4
TinyBasic=/k/develop/TinyBasic/TinyBasic,91 TinyBasic=/k/develop/TinyBasic/TinyBasic,91
THashView=/k/utils/thashview,124 THashView=/k/utils/thashview,124
Notes=/k/utils/notes,117 Notes=/k/utils/notes,117

View File

@@ -235,8 +235,8 @@ ico=58
x=68 x=68
y=68 y=68
[21] [21]
name=CALC name=CALC+
path=CALC path=CALCPLUS
param= param=
ico=4 ico=4
x=204 x=204

View File

@@ -92,6 +92,7 @@
59 Screen keyboard |zkey 59 Screen keyboard |zkey
#10 **** DATA PROCESSING #10 **** DATA PROCESSING
16 Calculator |calc 16 Calculator |calc
16 Calculator+ |calcplus
03 Tinypad |tinypad 03 Tinypad |tinypad
28 CodeEdit |develop/cedit 28 CodeEdit |develop/cedit
21 Table processor |table 21 Table processor |table

View File

@@ -235,8 +235,8 @@ ico=58
x=68 x=68
y=68 y=68
[21] [21]
name=CALC name=CALC+
path=CALC path=CALCPLUS
param= param=
ico=4 ico=4
x=204 x=204

View File

@@ -96,6 +96,7 @@
24 NDN * |/kolibrios/utils/ndn/ndn 24 NDN * |/kolibrios/utils/ndn/ndn
#11 **** PROCESO DE DATOS #11 **** PROCESO DE DATOS
16 Calculadora |calc 16 Calculadora |calc
16 Calculadora+ |calcplus
16 Tinypad |tinypad 16 Tinypad |tinypad
16 CodeEdit |develop/cedit 16 CodeEdit |develop/cedit
16 Procesador de tablas |table 16 Procesador de tablas |table

View File

@@ -235,8 +235,8 @@ ico=58
x=68 x=68
y=68 y=68
[21] [21]
name=CALC name=CALC+
path=CALC path=CALCPLUS
param= param=
ico=4 ico=4
x=204 x=204

View File

@@ -80,6 +80,7 @@
65 NDN * |/kolibrios/utils/ndn/ndn 65 NDN * |/kolibrios/utils/ndn/ndn
#11 **** DATA PROCESSING **** #11 **** DATA PROCESSING ****
16 Kalkulaator |calc 16 Kalkulaator |calc
16 Kalkulaator+ |calcplus
16 Teksti redaktor |tinypad 16 Teksti redaktor |tinypad
16 CodeEdit |develop/cedit 16 CodeEdit |develop/cedit
16 Tabelarvutus |table 16 Tabelarvutus |table

View File

@@ -235,8 +235,8 @@ ico=58
x=68 x=68
y=68 y=68
[21] [21]
name=CALC name=CALC+
path=CALC path=CALCPLUS
param= param=
ico=4 ico=4
x=204 x=204

View File

@@ -79,6 +79,7 @@
65 NDN * |/kolibrios/utils/ndn/ndn 65 NDN * |/kolibrios/utils/ndn/ndn
#11 **** DATA PROCESSING #11 **** DATA PROCESSING
16 Calcolatrice |calc 16 Calcolatrice |calc
16 Calcolatrice+ |calcplus
16 Tinypad |tinypad 16 Tinypad |tinypad
16 CodeEdit |develop/cedit 16 CodeEdit |develop/cedit
16 Table Processor |table 16 Table Processor |table

View File

@@ -235,8 +235,8 @@ ico=58
x=68 x=68
y=68 y=68
[21] [21]
name=CALC name=CALC+
path=CALC path=CALCPLUS
param= param=
ico=4 ico=4
x=204 x=204

View File

@@ -90,6 +90,7 @@
59 <20><><EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |zkey 59 <20><><EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |zkey
#10 **** <20><><EFBFBD><EFBFBD> #10 **** <20><><EFBFBD><EFBFBD>
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |calc 16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |calc
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+ |calcplus
03 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Tinypad |tinypad 03 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Tinypad |tinypad
28 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CodeEdit |develop/cedit 28 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CodeEdit |develop/cedit
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |table 21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |table
@@ -119,7 +120,7 @@
45 <20><><EFBFBD><EFBFBD><20><><EFBFBD><E0A8AD><EFBFBD><EFBFBD><EFBFBD> |easyshot 45 <20><><EFBFBD><EFBFBD><20><><EFBFBD><E0A8AD><EFBFBD><EFBFBD><EFBFBD> |easyshot
29 FB2 <20><><EFBFBD><E2A0AB> |fb2read 29 FB2 <20><><EFBFBD><E2A0AB> |fb2read
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |aclock 16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |aclock
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |period 21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |/kolibrios/utils/period
59 <20><EFBFBD><E0A5AD><EFBFBD><EFBFBD> KJ|ABuIIIA |games/klavisha 59 <20><EFBFBD><E0A5AD><EFBFBD><EFBFBD> KJ|ABuIIIA |games/klavisha
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |demos/bcdclk 16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |demos/bcdclk
53 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |timer 53 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |timer

View File

@@ -0,0 +1,2 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("block.asm", "fasm -m 65636 %f %o " .. tup.getconfig("KPACK_CMD"), "block.bin")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,229 @@
// block name, color, step, coord: x,y,z, rotation: x,y,z
const m1=16711680;
const m2=16776960;
const m3=655615;
const m4=65315;
const m5=16777215;
const m6=16756655;
const m7=16776367;
const m8=0;
const m9=65498;
model_list=[
['b2x3x1', m1, 0, 4,-20, 3, 0,0,90],
['b2x3x1', m1, 0, 4,-12, 3, 0,0,90],
['b2x3x1', m1, 0, 4, -4, 3, 0,0,90],
['b2x3x1', m1, 0, 4, 4, 3, 0,0,90],
['b2x3x1', m1, 0, 4, 12, 3, 0,0,90],
['t2x3x1', m1, 0, 0, 20, 3, 0,0,90],
['b1x1x1', m1, 0, 0, 28, 3, 0,0,0],
['b1x1x1', m1, 0, -8,-16, 3, 0,0,0],
['b1x1x1', m1, 0, 8,-16, 3, 0,0,0],
['b2x4x1', m1, 0,-12,-12, 3, 0,0,0],
['b2x4x1', m1, 0, 8,-12, 3, 0,0,0],
['l2x2x1', m1, 0, -8, 4, 3, 0,0,90],
['l2x2x1', m1, 0, 8, 4, 3, 0,0,0],
['b1x6x1', m1, 1, 0, 20, 6, 0,0,0],
['b1x6x1', m1, 1, -4, 16, 6, 0,0,0],
['b1x6x1', m1, 1, 4, 16, 6, 0,0,0],
['b1x10x1', m1, 1, 0,-24, 6, 0,0,0],
['b2x8x1', m1, 1, -8,-16, 6, 0,0,0],
['b2x8x1', m1, 1, 4,-16, 6, 0,0,0],
['b2x3x1', m1, 1,-16, -8, 6, 0,0,0],
['b2x3x1', m1, 1, 12, -8, 6, 0,0,0],
['l2x2x1', m1, 1, -4,-20, 6, 0,0,-180],
['l2x2x1', m1, 1,-12,-12, 6, 0,0,-180],
['l2x2x1', m1, 1,-12, 4, 6, 0,0,90],
['l2x2x1', m1, 1, 12, 4, 6, 0,0,0],
['l2x2x1', m1, 1, 12,-12, 6, 0,0,-90],
['l2x2x1', m1, 1, 4,-20, 6, 0,0,-90],
['b2x3x1', m1, 2, 4,-24, 9, 0,0,90],
['b1x3x1', m1, 2, -8,-24, 9, 0,0,0],
['b1x3x1', m1, 2, 8,-24, 9, 0,0,0],
['b1x4x1', m1, 2,-12,-20, 9, 0,0,0],
['b1x4x1', m1, 2, 12,-20, 9, 0,0,0],
['b1x6x1', m1, 2,-16,-16, 9, 0,0,0],
['b1x6x1', m1, 2, 16,-16, 9, 0,0,0],
['t2x3x1', m1, 2,-12, 8, 9, 0,0,90],
['t2x3x1', m1, 2, 12, 8, 9, 0,0,90],
['b2x4x1', m1, 2, 4, 12, 9, 0,0,90],
['b1x2x1', m1, 2, 8, 12, 9, 0,0,0],
['b1x3x1', m2, 2, 4, 20, 9, 0,0,90],
['b1x3x1', m3, 2, 4, 24, 9, 0,0,90],
['t2x3x1', m3, 2, 0, 28, 9, 0,0,90],
['b2x3x1', m1, 3, 0,-28, 12, 0,0,90],
['b2x2x1', m1, 3, 4,-28, 12, 0,0,0],
['l2x2x1', m1, 3,-12,-20, 12, 0,0,-180],
['l2x2x1', m1, 3, 12,-20, 12, 0,0,-90],
['b2x4x1', m1, 3,-16,-16, 12, 0,0,0],
['b2x4x1', m1, 3, 12,-16, 12, 0,0,0],
['b1x3x1', m1, 3,-16, 0, 12, 0,0,0],
['b1x3x1', m1, 3, 16, 0, 12, 0,0,0],
['l2x2x1', m1, 3,-12, 12, 12, 0,0,-90],
['l2x2x1', m1, 3, 12, 12, 12, 0,0,180],
['b1x2x1', m2, 3, -4, 16, 12, 0,0,90],
['b1x2x1', m2, 3, 8, 16, 12, 0,0,90],
['t2x3x1', m3, 3, 0, 20, 12, 0,0,90],
['b1x3x1', m1, 4, 4,-28, 15, 0,0,90],
['l2x2x1', m1, 4, -8,-24, 15, 0,0,180],
['l2x2x1', m1, 4, 8,-24, 15, 0,0,-90],
['b1x2x1', m1, 4,-12,-20, 15, 0,0,90],
['b1x2x1', m1, 4, 16,-20, 15, 0,0,90],
['c1x2x1', m4, 4,-16,-16, 15, 0,0,90],
['c1x2x1', m4, 4, 20,-16, 15, 0,0,90],
['b1x4x1', m1, 4,-16,-12, 15, 0,0,0],
['b1x4x1', m1, 4, 16,-12, 15, 0,0,0],
['l2x2x1', m1, 4,-12, 4, 15, 0,0,90],
['l2x2x1', m1, 4, 12, 4, 15, 0,0,0],
['b1x1x1', m1, 4,-12, 12, 15, 0,0,0],
['b1x1x1', m1, 4, 12, 12, 15, 0,0,0],
['l2x2x1', m2, 4, -4, 12, 15, 0,0,90],
['l2x2x1', m2, 4, 4, 12, 15, 0,0,0],
['b1x2x1', m2, 4, 0, 16, 15, 0,0,0],
['b1x6x1', m1, 5,-16,-20, 18, 0,0,0],
['b1x6x1', m1, 5, 16,-20, 18, 0,0,0],
['b1x3x1', m1, 5, -8, 4, 18, 0,0,90],
['b1x3x1', m1, 5, 16, 4, 18, 0,0,90],
['l2x2x1', m1, 5, -8, 12, 18, 0,0,-90],
['l2x2x1', m1, 5, 8, 12, 18, 0,0,-180],
['b1x3x1', m2, 5, 4, 16, 18, 0,0,90],
['b1x2x1', m1, 5,-12,-24, 18, 0,0,0],
['b1x2x1', m1, 5, 12,-24, 18, 0,0,0],
['b2x3x1', m1, 5, 0,-28, 18, 0,0,90],
['b2x2x1', m1, 5, 4,-28, 18, 0,0,0],
['t2x3x1', m1, 6, 0,-28, 21, 0,0,90],
['l2x2x1', m1, 6, -8,-24, 21, 0,0,0],
['l2x2x1', m1, 6,-16,-20, 21, 0,0,0],
['l2x2x1', m1, 6, 8,-24, 21, 0,0,90],
['l2x2x1', m1, 6, 16,-20, 21, 0,0,90],
['b1x3x1', m1, 6,-16,-12, 21, 0,0,0],
['b1x3x1', m1, 6, 16,-12, 21, 0,0,0],
['l2x2x1', m1, 6,-12, 0, 21, 0,0,90],
['l2x2x1', m1, 6, -8, 8, 21, 0,0,-90],
['l2x2x1', m1, 6, 12, 0, 21, 0,0,0],
['l2x2x1', m1, 6, 8, 8, 21, 0,0,-180],
['b1x3x1', m1, 6, -4, 12, 21, 0,0,-90],
['b1x1x1', m1, 7, -8, 8, 24, 0,0,0],
['b2x3x1', m1, 7, -4, 12, 24, 0,0,-90],
['b1x1x1', m1, 7, 8, 8, 24, 0,0,0],
['l2x2x1', m1, 7,-12, 4, 24, 0,0,-90],
['l2x2x1', m1, 7, 12, 4, 24, 0,0,-180],
['b1x3x1', m1, 7,-16, 0, 24, 0,0,180],
['b1x3x1', m1, 7, 16, 0, 24, 0,0,180],
['l2x2x1', m1, 7,-16,-16, 24, 0,0,0],
['l2x2x1', m1, 7, 16,-16, 24, 0,0,90],
['l2x2x1', m1, 7, -8,-20, 24, 0,0,180],
['l2x2x1', m1, 7, 8,-20, 24, 0,0,-90],
['b1x3x1', m3, 7, 4,-24, 24, 0,0,90],
['b2x2x1', m5, 8, -8,-24, 27, 0,0,0],
['b2x3x1', m5, 8, 8,-24, 27, 0,0,90],
['b1x3x1', m1, 8,-12,-24, 27, 0,0,0],
['b1x3x1', m1, 8, 12,-24, 27, 0,0,0],
['b1x4x1', m1, 8,-16,-20, 27, 0,0,0],
['b1x4x1', m1, 8, 16,-20, 27, 0,0,0],
['l2x2x1', m1, 8,-16, 0, 27, 0,0,-90],
['l2x2x1', m1, 8, 16, 0, 27, 0,0,-180],
['l2x2x1', m1, 8, 8, 4, 27, 0,0,0],
['b2x4x1', m1, 8, 4, 4, 27, 0,0,90],
['b1x1x1', m1, 8,-12, 4, 27, 0,0,0],
['r1x1x1', m5, 9,-16,-20, 30, 0,0,0],
['r1x1x1', m5, 9, 16,-20, 30, 0,0,0],
['b1x2x1', m5, 9, -8,-20, 30, 0,0,90],
['b1x2x1', m5, 9, 12,-20, 30, 0,0,90],
['t2x3x1', m5, 9, 0,-20, 30, 0,0,-90],
['r1x1x1', m6, 9,-12,-24, 30, 0,0,0],
['r1x1x1', m6, 9, 12,-24, 30, 0,0,0],
['r1x2x1', m7, 9, -4,-28, 30, 0,0,0],
['r1x2x1', m7, 9, 4,-28, 30, 0,0,0],
['b1x4x1', m1, 9,-16,-16, 30, 0,0,0],
['b1x4x1', m1, 9, 16,-16, 30, 0,0,0],
['l2x2x1', m1, 9,-12, 0, 30, 0,0,90],
['l2x2x1', m1, 9, 12, 0, 30, 0,0,0],
['l2x2x1', m1, 9, 8, 8, 30, 0,0,-180],
['b2x3x1', m1, 9, 0, 4, 30, 0,0,90],
['l2x2x1', m5, 10, -4,-20, 33, 0,0,-180],
['l2x2x1', m5, 10,-12,-16, 33, 0,0,-180],
['l2x2x1', m5, 10, 4,-20, 33, 0,0,-90],
['l2x2x1', m5, 10, 12,-16, 33, 0,0,-90],
['a1x2x2', m7, 10, 0,-24, 30, 0,0,-180],
['r1x2x1', m7, 10, 0,-24, 33, 0,0,0],
['b1x2x1', m1, 10,-16,-12, 33, 0,0,0],
['l2x2x1', m1, 10,-16, 0, 33, 0,0,-90],
['b1x1x1', m1, 10,-12, 4, 33, 0,0,0],
['b2x4x1', m1, 10, 4, 4, 33, 0,0,90],
['l2x2x1', m1, 10, 8, 4, 33, 0,0,0],
['b2x4x1', m1, 10, 12,-12, 33, 0,0,0],
['b1x1x1', m1, 11, 0,-24, 36, 0,0,0],
['b1x1x1', m5, 11, -4,-24, 36, 0,0,0],
['b1x1x1', m5, 11, 4,-24, 36, 0,0,0],
['b1x1x3', m8, 11, -8,-24, 30, 0,0,0],
['b1x1x3', m8, 11, 8,-24, 30, 0,0,0],
['l2x2x1', m5, 11,-12,-20, 36, 0,0,0],
['l2x2x1', m5, 11, 12,-20, 36, 0,0,90],
['r1x1x1', m5, 11,-16,-16, 36, 0,0,90],
['r1x1x1', m5, 11, 16,-16, 36, 0,0,90],
['b1x4x1', m1, 11,-16,-12, 36, 0,0,0],
['b2x4x1', m1, 11, 12,-12, 36, 0,0,0],
['b2x3x1', m1, 11, 4, 0, 36, 0,0,0],
['l2x2x1', m1, 11, -8, 0, 36, 0,0,90],
['b1x3x1', m1, 11, 0, 8, 36, 0,0,90],
['b1x3x1', m1, 12, 4,-24, 39, 0,0,90],
['r1x1x1', m5, 12, -8,-24, 39, 0,0,0],
['r1x1x1', m5, 12, 8,-24, 39, 0,0,0],
['b1x1x1', m5, 12,-12,-20, 39, 0,0,0],
['b1x6x1', m5, 12, 12,-20, 39, 0,0,90],
['b1x1x1', m1, 12,-12,-16, 39, 0,0,0],
['l2x2x1', m1, 12,-16,-12, 39, 0,0,0],
['l2x2x1', m1, 12,-12, -4, 39, 0,0,90],
['b1x1x1', m1, 12, -8, 0, 39, 0,0,0],
['l2x2x1', m1, 12, -4, 4, 39, 0,0,90],
['l2x2x1', m1, 12, 4, 8, 39, 0,0,-180],
['b1x1x1', m1, 12, 8, 4, 39, 0,0,0],
['l2x2x1', m1, 12, 12, 0, 39, 0,0,-180],
['b1x2x1', m1, 12, 16, -8, 39, 0,0,0],
['l2x2x1', m1, 12, 12,-12, 39, 0,0,-90],
['l2x2x1', m1, 13, 4,-20, 42, 0,0,-90],
['l2x2x1', m1, 13, -4,-24, 42, 0,0,0],
['b2x6x1', m1, 13,-12,-20, 42, 0,0,0],
['b1x3x1', m1, 13, 0, 4, 42, 0,0,90],
['b2x2x1', m1, 13, 4, 0, 42, 0,0,0],
['b1x6x1', m1, 13, 12,-20, 42, 0,0,0],
['b1x4x1', m1, 14,-12,-16, 45, 0,0,0],
['b2x4x1', m1, 14, 4,-20, 45, 0,0,90],
['b2x6x1', m1, 14, 12,-12, 45, 0,0,90],
['b2x4x1', m1, 14, 4, -4, 45, 0,0,90],
['b1x3x1', m1, 14, 4, 4, 45, 0,0,90],
['l2x2x1', m1, 14, 8, -4, 45, 0,0,0],
['l2x2x1', m1, 14, 8,-16, 45, 0,0,-90],
['b2x4x1', m1, 15, -4,-16, 48, 0,0,0],
['b1x3x1', m1, 15, -8,-12, 48, 0,0,0],
['b1x3x1', m1, 15, 4, 0, 48, 0,0,90],
['b2x2x1', m1, 15, 4, -8, 48, 0,0,0],
['l2x2x1', m1, 15, 4,-12, 48, 0,0,-90],
['b1x3x1', m2, 16, 8,-12, 0, 0,0,0],
['b1x3x1', m2, 16, -8,-12, 0, 0,0,0],
['c1x2x1', m9, 17, 20,-16, 12, 0,0,0],
['b1x6x1', m4, 17, 0, 8, 0, 0,0,0, 1],
['b1x6x1', m9, 17, 0, 4, -3, 0,0,0, 1],
['b1x3x1', m4, 18, 0, 4, 3, 0,0,0, 1],
['b1x3x1', m2, 18, 0, 16, 3, 0,0,0, 1],
['c1x2x1', m4, 18, 0, 0, 6, 0,0,0, 1],
['b1x1x1', m4, 18, 0, 8, 6, 0,0,0, 1],
['b1x2x1', m2, 18, 0, 12, 6, 0,0,0, 1],
['b1x3x1', m2, 18, 0, 4, 9, 0,0,0, 1],
['c1x2x1', m9, 17, -20,-16, 12, 0,0,0],
['b1x6x1', m4, 17, 0, 8, 0, 0,0,0, 1],
['b1x6x1', m9, 17, 0, 4, -3, 0,0,0, 1],
['b1x3x1', m4, 18, 0, 4, 3, 0,0,0, 1],
['b1x3x1', m2, 18, 0, 16, 3, 0,0,0, 1],
['c1x2x1', m4, 18, 0, 0, 6, 0,0,0, 1],
['b1x1x1', m4, 18, 0, 8, 6, 0,0,0, 1],
['b1x2x1', m2, 18, 0, 12, 6, 0,0,0, 1],
['b1x3x1', m2, 18, 0, 4, 9, 0,0,0, 1],
];
model_animat=[
[192,'rotation','z','Left', -1.570796327, 0, 0.017453293],
[201,'rotation','z','Right', 0, 1.570796327, 0.017453293],
];

View File

@@ -0,0 +1,531 @@
// block name, color, step, coord: x,y,z, rotation: x,y,z
const m1=32768;
const m2=9474192;
const m3=16777215;
const m4=2164260863;
const m5=655615;
const m6=255;
const m7=16776960;
const m8=10824234;
const m9=16384;
const m10=0xc97e3b;
model_list=[
['b2x4x1', m2, 0,-28, -4, 6, 0,0,90],
['b2x3x1', m2, 0,-40, 4, 6, 0,0,0],
['b2x3x1', m2, 0,-32, 8, 6, 0,0,0],
['b2x6x1', m2, 0, -4, 8, 6, 0,0,90],
['b1x3x1', m2, 0, -4, 4, 6, 0,0,90],
['b2x4x1', m2, 0, -4, -4, 6, 0,0,90],
['b1x2x1', m2, 0, -8, -8, 6, 0,0,90],
['b2x3x1', m2, 0,-24, -8, 6, 0,0,0],
['b2x4x1', m2, 1,-12, -8, 9, 0,0,0],
['b2x2x1', m2, 1,-20, -4, 9, 0,0,0],
['b1x2x1', m2, 1,-20, -8, 9, 0,0,90],
['b2x3x1', m2, 1,-24, -4, 9, 0,0,90],
['b2x3x1', m2, 1,-40, -4, 9, 0,0,0],
['b1x2x1', m2, 1,-40, 8, 9, 0,0,0],
['b2x4x1', m2, 1,-24, 8, 9, 0,0,90],
['b1x2x1', m2, 1,-28, 16, 9, 0,0,90],
['l2x2x1', m2, 2, 0,-12, 6, 0,0,-90],
['l2x2x1', m2, 2, 8,-12, 6, 0,0,-90],
['b2x4x1', m2, 2, 12, -8, 6, 0,0,90],
['b2x4x1', m2, 2, 12, 0, 6, 0,0,90],
['b2x4x1', m2, 2, 12, 8, 6, 0,0,90],
['b2x4x1', m2, 2, 12, 16, 6, 0,0,90],
['b2x4x1', m2, 2, 28, 16, 6, 0,0,90],
['b2x4x1', m2, 2, 28, 8, 6, 0,0,90],
['b2x4x1', m2, 2, 28, 0, 6, 0,0,90],
['b1x4x1', m2, 2, 28, -4, 6, 0,0,90],
['b1x2x1', m2, 2, 24, -8, 6, 0,0,90],
['b2x2x1', m3, 3, 20, 16, 9, 0,0,0],
['b2x2x1', m2, 3, 12, 16, 9, 0,0,0],
['b1x3x1', m2, 3, 20, 12, 9, 0,0,90],
['b1x2x1', m2, 3, 20, 4, 9, 0,0,0],
['b1x3x1', m2, 3, 20, -8, 9, 0,0,0],
['l2x2x1', m2, 3, 24, -4, 9, 0,0,-90],
['b2x4x1', m2, 3, 12, -4, 9, 0,0,0],
['b2x6x1', m2, 3, 4, -4, 9, 0,0,0],
['b1x2x1', m2, 3, 8, 20, 9, 0,0,90],
['b1x2x1', m2, 3, 0, 16, 9, 0,0,0],
['b2x6x1', m2, 3, 0, 8, 9, 0,0,90],
['b2x3x1', m2, 3, -4, -4, 9, 0,0,0],
['b2x4x1', m2, 3, 12,-12, 9, 0,0,90],
['b1x1x1', m2, 3, 8,-16, 9, 0,0,0],
['b1x1x1', m2, 3, 0,-16, 9, 0,0,0],
['b1x4x1', m2, 4,-28, -4, 3, 0,0,90],
['b1x4x1', m2, 4,-40, 0, 3, 0,0,0],
['b1x4x1', m2, 4,-24, 12, 3, 0,0,90],
['b1x2x1', m2, 4,-28, 16, 3, 0,0,90],
['b1x4x1', m2, 4, -8, 12, 3, 0,0,90],
['l2x2x1', m2, 4, 0, 12, 3, 0,0,90],
['b1x4x1', m2, 4, 12, 20, 3, 0,0,90],
['b1x3x1', m2, 4, 24, 20, 3, 0,0,90],
['b1x3x1', m2, 4, 28, 12, 3, 0,0,0],
['b1x3x1', m2, 4, 28, 0, 3, 0,0,0],
['b1x4x1', m2, 4, 28, -4, 3, 0,0,90],
['b1x2x1', m2, 4, 24, -8, 3, 0,0,90],
['b1x3x1', m2, 4, 12,-12, 3, 0,0,0],
['l2x2x1', m2, 4, 8,-12, 3, 0,0,-180],
['b1x4x1', m2, 4, 0,-16, 3, 0,0,0],
['b1x2x1', m2, 4, -4, -4, 3, 0,0,90],
['b1x2x1', m2, 4, -8, -8, 3, 0,0,90],
['b1x4x1', m2, 4,-12, -4, 3, 0,0,90],
['b1x2x1', m2, 4,-20, -8, 3, 0,0,90],
['b20x20x1', m1, 5,-40,-40, 0, 0,0,0],
['b1x4x1', m3, 6,-28, -4, 12, 0,0,90],
['b2x4x1', m2, 6,-40, 0, 12, 0,0,0],
['b2x4x1', m2, 6,-32, 4, 12, 0,0,0],
['b2x6x1', m2, 6,-24, -8, 12, 0,0,0],
['b2x4x1', m2, 6, -4, 8, 12, 0,0,90],
['b2x4x1', m2, 6, -4, -4, 12, 0,0,90],
['b1x2x1', m2, 6, -8, -8, 12, 0,0,90],
['b1x3x1', m2, 6, 0, -8, 12, 0,0,0],
['b1x2x1', m2, 6, 0,-16, 12, 0,0,0],
['b1x2x1', m2, 6, 4,-12, 12, 0,0,0],
['b1x4x1', m2, 6, 8,-16, 12, 0,0,0],
['b1x4x1', m2, 6, 12,-12, 12, 0,0,0],
['b1x2x1', m2, 6, 20, -4, 12, 0,0,90],
['b1x2x1', m2, 6, 24, -8, 12, 0,0,90],
['b2x4x1', m2, 6, 16, 0, 12, 0,0,0],
['b1x2x1', m2, 6, 16, 16, 12, 0,0,0],
['b2x2x1', m3, 6, 20, 16, 12, 0,0,0],
['b2x4x1', m2, 6, 8, 8, 12, 0,0,0],
['b2x4x1', m2, 6, 0, 8, 12, 0,0,0],
['b2x6x1', m3, 7, 24, 16, 15, 0,0,90],
['b1x2x1', m3, 7, 0, 16, 15, 0,0,0],
['b1x4x1', m2, 7, 20, 0, 15, 0,0,0],
['b1x4x1', m2, 7, 16, 12, 15, 0,0,90],
['b2x4x1', m2, 7, 16, 4, 15, 0,0,90],
['b2x4x1', m2, 7, 16, -4, 15, 0,0,90],
['b2x4x1', m2, 7, -4, 0, 15, 0,0,0],
['b1x4x1', m2, 7, -8, 12, 15, 0,0,90],
['b1x4x1', m3, 7,-24, 12, 15, 0,0,90],
['b1x3x1', m3, 7,-40, 4, 15, 0,0,0],
['l2x2x1', m3, 7,-40, -4, 15, 0,0,0],
['b1x4x1', m3, 7,-20, -4, 15, 0,0,90],
['l2x2x1', m2, 7,-12, -4, 15, 0,0,180],
['l2x2x1', m2, 7, -8, -4, 15, 0,0,-90],
['b1x4x1', m2, 7, 0,-16, 15, 0,0,0],
['b1x2x1', m2, 7, 4,-12, 15, 0,0,0],
['b1x2x1', m2, 7, 8,-16, 15, 0,0,0],
['b1x2x1', m2, 7, 12,-12, 15, 0,0,0],
['b1x1x1', m3, 8, 24, 16, 18, 0,0,0],
['c1x1x1', m4, 8, 24, 20, 18, 0,0,0],
['b2x2x1', m3, 8, 16, 16, 18, 0,0,0],
['c1x1x1', m4, 8, 12, 20, 18, 0,0,0],
['c1x1x1', m4, 8, 12, 16, 18, 0,0,0],
['b1x2x1', m3, 8, 8, 16, 18, 0,0,0],
['c1x1x1', m4, 8, 4, 20, 18, 0,0,0],
['c1x1x1', m4, 8, 4, 16, 18, 0,0,0],
['b1x2x1', m3, 8, 0, 16, 18, 0,0,0],
['b1x2x1', m3, 8, -4, 12, 18, 0,0,90],
['b1x4x1', m3, 8,-12, 12, 18, 0,0,90],
['b1x4x1', m3, 8,-28, 12, 18, 0,0,90],
['b1x4x1', m3, 8,-40, -4, 18, 0,0,0],
['b1x4x1', m3, 8,-24, -4, 18, 0,0,90],
['b1x2x1', m3, 8,-16, -4, 18, 0,0,90],
['b2x2x1', m3, 8,-12, -8, 18, 0,0,0],
['b1x4x1', m3, 8, -4, -4, 18, 0,0,0],
['b2x4x1', m3, 8, 12,-12, 18, 0,0,90],
['b1x1x1', m3, 8, 0,-16, 18, 0,0,0],
['b1x1x1', m3, 8, 8,-16, 18, 0,0,0],
['b2x2x1', m3, 9, 20, 16, 21, 0,0,0],
['b1x2x1', m5, 9, 16, 16, 21, 0,0,0],
['b2x2x1', m3, 9, 8, 16, 21, 0,0,0],
['b2x2x1', m5, 9, 0, 16, 21, 0,0,0],
['b1x1x1', m3, 9, -4, 12, 21, 0,0,0],
['c1x1x1', m4, 9, -8, 12, 21, 0,0,0],
['b1x1x1', m3, 9,-12, 12, 21, 0,0,0],
['c1x1x1', m4, 9,-16, 12, 21, 0,0,0],
['b1x1x1', m3, 9,-20, 12, 21, 0,0,0],
['c1x1x1', m4, 9,-24, 12, 21, 0,0,0],
['b1x2x1', m3, 9,-28, 12, 21, 0,0,90],
['c1x1x1', m4, 9,-36, 12, 21, 0,0,0],
['b1x1x1', m3, 9,-40, 12, 21, 0,0,0],
['b2x3x1', m3, 9,-44, 0, 21, 0,0,0],
['b1x1x1', m3, 9,-40, -4, 21, 0,0,0],
['c1x1x1', m4, 9,-36, -4, 21, 0,0,0],
['b1x1x1', m3, 9,-32, -4, 21, 0,0,0],
['c1x1x1', m4, 9,-28, -4, 21, 0,0,0],
['b1x2x1', m3, 9,-20, -4, 21, 0,0,90],
['c1x1x1', m4, 9,-16, -4, 21, 0,0,0],
['b1x2x1', m3, 9,-12, -8, 21, 0,0,0],
['c1x1x1', m4, 9, -8, -8, 21, 0,0,0],
['b1x2x1', m3, 9, -4, -4, 21, 0,0,90],
['c1x1x1', m4, 9, -4, 0, 21, 0,0,0],
['b1x1x1', m3, 9, -4, 4, 21, 0,0,0],
['c1x1x1', m4, 9, -4, 8, 21, 0,0,0],
['b2x4x1', m3, 9, 12,-12, 21, 0,0,90],
['c1x1x1', m4, 9, 0,-16, 21, 0,0,0],
['c1x1x1', m4, 9, 8,-16, 21, 0,0,0],
['c1x1x1', m4, 10, 24, 20, 24, 0,0,0],
['l2x2x1', m3, 10, 20, 16, 24, 0,0,0],
['c1x1x1', m4, 10, 12, 20, 24, 0,0,0],
['c1x1x1', m4, 10, 8, 20, 24, 0,0,0],
['c1x1x1', m4, 10, 8, 16, 24, 0,0,0],
['c1x1x1', m4, 10, 12, 16, 24, 0,0,0],
['b1x4x1', m3, 10, -4, 0, 24, 0,0,0],
['b1x4x1', m3, 10, -8, 12, 24, 0,0,90],
['b1x4x1', m3, 10,-24, 12, 24, 0,0,90],
['b1x4x1', m3, 10,-40, 0, 24, 0,0,0],
['c1x1x1', m4, 10,-44, 8, 24, 0,0,0],
['c1x1x1', m4, 10,-44, 4, 24, 0,0,0],
['c1x1x1', m4, 10,-44, 0, 24, 0,0,0],
['b1x2x1', m3, 10,-36, -4, 24, 0,0,90],
['b1x4x1', m3, 10,-20, -4, 24, 0,0,90],
['b1x4x1', m3, 10, -4, -4, 24, 0,0,90],
['b1x2x1', m3, 10, -8, -8, 24, 0,0,90],
['l2x2x1', m3, 10, 4, -8, 24, 0,0,180],
['b1x2x1', m5, 10, 0,-16, 24, 0,0,0],
['l2x2x1', m3, 10, 12, -8, 24, 0,0,180],
['b1x2x1', m5, 10, 8,-16, 24, 0,0,0],
['b2x2x1', m3, 11, 24, 16, 27, 0,0,90],
['b2x2x1', m5, 11, 8, 16, 27, 0,0,0],
['b1x1x1', m3, 11, -4, 12, 27, 0,0,0],
['c1x1x1', m4, 11, -8, 12, 27, 0,0,0],
['b1x1x1', m3, 11,-12, 12, 27, 0,0,0],
['c1x1x1', m4, 11,-16, 12, 27, 0,0,0],
['b1x1x1', m3, 11,-20, 12, 27, 0,0,0],
['c1x1x1', m4, 11,-24, 12, 27, 0,0,0],
['b1x2x1', m3, 11,-28, 12, 27, 0,0,90],
['c1x1x1', m4, 11,-36, 12, 27, 0,0,0],
['b1x1x1', m3, 11,-40, 12, 27, 0,0,0],
['b2x3x1', m3, 11,-44, 0, 27, 0,0,0],
['b1x1x1', m3, 11,-40, -4, 27, 0,0,0],
['c1x1x1', m4, 11,-36, -4, 27, 0,0,0],
['b1x1x1', m3, 11,-32, -4, 27, 0,0,0],
['c1x1x1', m4, 11,-28, -4, 27, 0,0,0],
['b1x2x1', m3, 11,-20, -4, 27, 0,0,90],
['c1x1x1', m4, 11,-16, -4, 27, 0,0,0],
['b1x2x1', m3, 11,-12, -8, 27, 0,0,0],
['c1x1x1', m4, 11, -8, -8, 27, 0,0,0],
['b1x2x1', m3, 11, -4, -4, 27, 0,0,90],
['c1x1x1', m4, 11, -4, 0, 27, 0,0,0],
['b1x1x1', m3, 11, -4, 4, 27, 0,0,0],
['c1x1x1', m4, 11, -4, 8, 27, 0,0,0],
['b1x2x1', m5, 11, 0,-12, 27, 0,0,0],
['c1x1x1', m5, 11, 0,-16, 27, 0,0,0],
['f1x2x1', m5, 11, 4,-12, 27, 0,0,0],
['f1x2x1', m5, 11, 8,-12, 27, 0,0,0],
['c1x1x1', m5, 11, 8,-16, 27, 0,0,0],
['b1x2x1', m5, 11, 12,-12, 27, 0,0,0],
['b2x2x1', m3, 12, 20, 16, 30, 0,0,0],
['b1x4x1', m3, 12, -4, 0, 30, 0,0,0],
['b1x4x1', m3, 12, -8, 12, 30, 0,0,90],
['b1x4x1', m3, 12,-24, 12, 30, 0,0,90],
['b1x4x1', m3, 12,-40, 0, 30, 0,0,0],
['c1x1x1', m4, 12,-44, 8, 30, 0,0,0],
['c1x1x1', m4, 12,-44, 4, 30, 0,0,0],
['c1x1x1', m4, 12,-44, 0, 30, 0,0,0],
['b1x2x1', m3, 12,-36, -4, 30, 0,0,90],
['b1x4x1', m3, 12,-20, -4, 30, 0,0,90],
['b1x4x1', m3, 12, -4, -4, 30, 0,0,90],
['b1x2x1', m3, 12, -8, -8, 30, 0,0,90],
['b1x2x1', m5, 12, 8,-10, 30, 0,0,90],
['b2x2x1', m3, 13, -4, 12, 33, 0,0,0],
['c1x1x1', m4, 13, -8, 12, 33, 0,0,0],
['b1x1x1', m3, 13,-12, 12, 33, 0,0,0],
['c1x1x1', m4, 13,-16, 12, 33, 0,0,0],
['b1x1x1', m3, 13,-20, 12, 33, 0,0,0],
['c1x1x1', m4, 13,-24, 12, 33, 0,0,0],
['b1x2x1', m3, 13,-28, 12, 33, 0,0,90],
['c1x1x1', m4, 13,-36, 12, 33, 0,0,0],
['b1x1x1', m3, 13,-40, 12, 33, 0,0,0],
['b2x3x1', m3, 13,-44, 0, 33, 0,0,0],
['b1x1x1', m3, 13,-40, -4, 33, 0,0,0],
['c1x1x1', m4, 13,-36, -4, 33, 0,0,0],
['b1x1x1', m3, 13,-32, -4, 33, 0,0,0],
['c1x1x1', m4, 13,-28, -4, 33, 0,0,0],
['b1x2x1', m3, 13,-20, -4, 33, 0,0,90],
['c1x1x1', m4, 13,-16, -4, 33, 0,0,0],
['b1x2x1', m3, 13,-12, -8, 33, 0,0,0],
['c1x1x1', m4, 13, -8, -8, 33, 0,0,0],
['b1x1x1', m3, 13, -8, -4, 33, 0,0,90],
['c1x1x1', m4, 13, -4, 0, 33, 0,0,0],
['b1x1x1', m3, 13, -4, 4, 33, 0,0,0],
['c1x1x1', m4, 13, -4, 8, 33, 0,0,0],
['b2x2x1', m3, 13, -4, -8, 33, 0,0,0],
['b2x4x1', m3, 13, 28, 16, 33, 0,0,90],
['b1x2x1', m3, 14, 24, 12, 33, 0,0,90],
['b1x2x1', m3, 14, 24, 24, 33, 0,0,90],
['b2x4x1', m6, 14, 20, 12, 36, 0,0,0],
['b1x2x1', m6, 14, 28, 16, 36, 0,0,0],
['b1x2x1', m6, 14, 16, 16, 36, 0,0,0],
['c1x1x1', m4, 14, 0, 16, 36, 0,0,0],
['b1x1x1', m3, 14, -4, 16, 36, 0,0,0],
['b1x1x1', m3, 14, 0, 12, 36, 0,0,0],
['b1x4x1', m3, 14, -8, 12, 36, 0,0,90],
['b1x4x1', m3, 14,-24, 12, 36, 0,0,90],
['b1x4x1', m3, 14,-40, 0, 36, 0,0,0],
['b1x2x1', m3, 14,-36, -4, 36, 0,0,90],
['b1x4x1', m3, 14,-20, -4, 36, 0,0,90],
['b1x4x1', m3, 14, -4, -4, 36, 0,0,90],
['b1x4x1', m3, 14, -4, 0, 36, 0,0,0],
['b1x1x1', m3, 14, 0, -4, 36, 0,0,0],
['c1x1x1', m4, 14, 0, -8, 36, 0,0,0],
['b1x1x1', m3, 14, -4, -8, 36, 0,0,0],
['b1x2x1', m6, 14, -8, -8, 36, 0,0,90],
['b2x2x1', m3, 15, -4, 12, 39, 0,0,0],
['c1x1x1', m4, 15, -8, 12, 39, 0,0,0],
['b1x1x1', m3, 15,-12, 12, 39, 0,0,0],
['c1x1x1', m4, 15,-16, 12, 39, 0,0,0],
['b1x1x1', m3, 15,-20, 12, 39, 0,0,0],
['c1x1x1', m4, 15,-24, 12, 39, 0,0,0],
['b1x2x1', m3, 15,-28, 12, 39, 0,0,90],
['c1x1x1', m4, 15,-36, 12, 39, 0,0,0],
['b1x1x1', m3, 15,-40, 12, 39, 0,0,0],
['b1x1x1', m3, 15,-40, 4, 39, 0,0,0],
['b1x1x1', m3, 15,-40, -4, 39, 0,0,0],
['c1x1x1', m4, 15,-36, -4, 39, 0,0,0],
['b1x1x1', m3, 15,-32, -4, 39, 0,0,0],
['c1x1x1', m4, 15,-28, -4, 39, 0,0,0],
['b1x2x1', m3, 15,-20, -4, 39, 0,0,90],
['c1x1x1', m4, 15,-16, -4, 39, 0,0,0],
['b1x1x1', m3, 15,-12, -4, 39, 0,0,0],
['c1x1x1', m4, 15,-40, 8, 39, 0,0,0],
['c1x1x1', m4, 15, -4, 0, 39, 0,0,0],
['b1x1x1', m3, 15, -4, 4, 39, 0,0,0],
['c1x1x1', m4, 15, -4, 8, 39, 0,0,0],
['b2x2x1', m3, 15, -4, -8, 39, 0,0,0],
['c1x1x1', m4, 15,-40, 0, 39, 0,0,0],
['c1x1x1', m4, 15, -8, -4, 39, 0,0,0],
['c1x1x1', m4, 16, 0, 16, 42, 0,0,0],
['b1x1x1', m3, 16, -4, 16, 42, 0,0,0],
['b1x1x1', m3, 16, 0, 12, 42, 0,0,0],
['b1x4x1', m3, 16, -8, 12, 42, 0,0,90],
['b1x4x1', m3, 16,-24, 12, 42, 0,0,90],
['b1x4x1', m3, 16,-40, 0, 42, 0,0,0],
['b1x2x1', m3, 16,-36, -4, 42, 0,0,90],
['b1x4x1', m3, 16,-20, -4, 42, 0,0,90],
['b1x4x1', m3, 16, -4, -4, 42, 0,0,90],
['b1x4x1', m3, 16, -4, 0, 42, 0,0,0],
['b1x1x1', m3, 16, 0, -4, 42, 0,0,0],
['c1x1x1', m4, 16, 0, -8, 42, 0,0,0],
['b1x1x1', m3, 16, -4, -8, 42, 0,0,0],
['b2x2x1', m3, 17, -4, 12, 45, 0,0,0],
['b2x3x1', m6, 17, -8, 12, 45, 0,0,90],
['b2x2x1', m6, 17,-24, 12, 45, 0,0,0],
['b1x2x1', m6, 17,-28, 12, 45, 0,0,90],
['b2x2x1', m6, 17,-40, 12, 45, 0,0,0],
['b1x1x1', m3, 17,-40, 8, 45, 0,0,0],
['c1x1x1', m4, 17,-40, 4, 45, 0,0,0],
['b1x1x1', m3, 17,-40, 0, 45, 0,0,0],
['b2x4x1', m6, 17,-28, -8, 45, 0,0,90],
['b1x2x1', m6, 17,-20, -4, 45, 0,0,90],
['b2x3x1', m6, 17, -8, -8, 45, 0,0,90],
['b2x2x1', m3, 17, -4, -8, 45, 0,0,0],
['b1x1x1', m3, 17, -4, 0, 45, 0,0,0],
['c1x1x1', m4, 17, -4, 4, 45, 0,0,0],
['b1x1x1', m3, 17, -4, 8, 45, 0,0,0],
['c1x1x1', m3, 18,-24, -8, 15, 0,0,0],
['c1x1x1', m3, 18,-20, -8, 15, 0,0,0],
['c1x1x1', m3, 18,-32, 16, 15, 0,0,0],
['c1x1x1', m3, 18,-28, 16, 15, 0,0,0],
['c1x1x1', m3, 18,-24, -8, 18, 0,0,0],
['c1x1x1', m3, 18,-20, -8, 18, 0,0,0],
['c1x1x1', m3, 18,-32, 16, 18, 0,0,0],
['c1x1x1', m3, 18,-28, 16, 18, 0,0,0],
['c1x1x1', m3, 18,-24, -8, 21, 0,0,0],
['c1x1x1', m3, 18,-20, -8, 21, 0,0,0],
['c1x1x1', m3, 18,-32, 16, 21, 0,0,0],
['c1x1x1', m3, 18,-28, 16, 21, 0,0,0],
['c1x1x1', m4, 19,-24, -8, 24, 0,0,0],
['c1x1x1', m4, 19,-20, -8, 24, 0,0,0],
['c1x1x1', m4, 19,-32, 16, 24, 0,0,0],
['c1x1x1', m4, 19,-28, 16, 24, 0,0,0],
['c1x1x1', m3, 19,-24, -8, 27, 0,0,0],
['c1x1x1', m3, 19,-20, -8, 27, 0,0,0],
['c1x1x1', m3, 19,-32, 16, 27, 0,0,0],
['c1x1x1', m3, 19,-28, 16, 27, 0,0,0],
['c1x1x1', m3, 19,-24, -8, 30, 0,0,0],
['c1x1x1', m3, 19,-20, -8, 30, 0,0,0],
['c1x1x1', m3, 19,-32, 16, 30, 0,0,0],
['c1x1x1', m3, 19,-28, 16, 30, 0,0,0],
['c1x1x1', m4, 20,-24, -8, 33, 0,0,0],
['c1x1x1', m4, 20,-20, -8, 33, 0,0,0],
['c1x1x1', m4, 20,-32, 16, 33, 0,0,0],
['c1x1x1', m4, 20,-28, 16, 33, 0,0,0],
['c1x1x1', m3, 20,-24, -8, 36, 0,0,0],
['c1x1x1', m3, 20,-20, -8, 36, 0,0,0],
['c1x1x1', m3, 20,-32, 16, 36, 0,0,0],
['c1x1x1', m3, 20,-28, 16, 36, 0,0,0],
['c1x1x1', m3, 20,-24, -8, 39, 0,0,0],
['c1x1x1', m3, 20,-20, -8, 39, 0,0,0],
['c1x1x1', m3, 20,-32, 16, 39, 0,0,0],
['c1x1x1', m3, 20,-28, 16, 39, 0,0,0],
['c1x1x1', m4, 21,-24, -8, 42, 0,0,0],
['c1x1x1', m4, 21,-20, -8, 42, 0,0,0],
['c1x1x1', m4, 21,-32, 16, 42, 0,0,0],
['c1x1x1', m4, 21,-28, 16, 42, 0,0,0],
['c1x1x1', m3, 21,-24, -8, 45, 0,0,0],
['c1x1x1', m3, 21,-20, -8, 45, 0,0,0],
['c1x1x1', m3, 21,-32, 16, 45, 0,0,0],
['c1x1x1', m3, 21,-28, 16, 45, 0,0,0],
['c1x1x1', m3, 21,-24, -8, 48, 0,0,0],
['c1x1x1', m3, 21,-20, -8, 48, 0,0,0],
['c1x1x1', m3, 21,-32, 16, 48, 0,0,0],
['c1x1x1', m3, 21,-28, 16, 48, 0,0,0],
['c1x1x1', m3, 22, 20, 16, 39, 0,0,0],
['c1x1x1', m3, 22, 24, 16, 39, 0,0,0],
['c1x1x1', m3, 22, 24, 20, 39, 0,0,0],
['c1x1x1', m3, 22, 20, 20, 39, 0,0,0],
['b2x2x1', m3, 22, 20, 16, 42, 0,0,0],
['f1x2x1', m6, 22, 20, 16, 45, 0,0,0],
['f1x2x1', m6, 22, 24, 16, 45, 0,0,0],
['f1x2x1', m6, 23, 24, 18, 48, 0,0,90],
['c1x1x1', m6, 23, 0, 16, 48, 0,0,0],
['b1x3x1', m6, 23, -4, 12, 48, 0,0,90],
['b1x1x1', m3, 23, -8, 16, 48, 0,0,0],
['b2x4x1', m6, 23,-16, 8, 48, 0,0,90],
['b1x3x1', m6, 23,-32, 12, 48, 0,0,90],
['b1x1x1', m3, 23,-40, 16, 48, 0,0,0],
['b1x3x1', m3, 23,-40, 0, 48, 0,0,0],
['b1x3x1', m6, 23,-32, -4, 48, 0,0,90],
['b1x1x1', m3, 23,-40, -8, 48, 0,0,0],
['b2x4x1', m6, 23,-16, -4, 48, 0,0,90],
['b1x3x1', m6, 23, -4, -4, 48, 0,0,90],
['b1x1x1', m3, 23, -8, -8, 48, 0,0,0],
['c1x1x1', m6, 23, 0, -8, 48, 0,0,0],
['b1x3x1', m3, 23, -4, 0, 48, 0,0,0],
['c1x1x1', m6, 24, 22, 18, 51, 0,0,0],
['c1x1x1', m6, 24, 0, 16, 51, 0,0,90],
['c1x1x1', m6, 24, -8, 16, 51, 0,0,0],
['b2x6x1', m6, 24, -4, 8, 51, 0,0,90],
['b1x2x1', m6, 24,-28, 8, 51, 0,0,90],
['b2x2x1', m3, 24,-32, 12, 51, 0,0,0],
['b2x2x1', m6, 24,-40, 8, 51, 0,0,0],
['c1x1x1', m6, 24,-40, 16, 51, 0,0,0],
['b1x1x1', m3, 24,-40, 4, 51, 0,0,0],
['b2x4x1', m6, 24,-28, -4, 51, 0,0,90],
['c1x1x1', m6, 24,-40, -8, 51, 0,0,0],
['b1x2x1', m6, 24,-20, 0, 51, 0,0,90],
['b2x2x1', m3, 24,-24, -8, 51, 0,0,0],
['b2x4x1', m6, 24, -4, -4, 51, 0,0,90],
['c1x1x1', m6, 24, -8, -8, 51, 0,0,0],
['c1x1x1', m6, 24, 0, -8, 51, 0,0,0],
['b1x1x1', m3, 24, -4, 4, 51, 0,0,0],
['c1x1x1', m7, 25, 22, 18, 54, 0,0,0],
['b1x1x1', m3, 25, -4, 4, 54, 0,0,0],
['b1x3x1', m5, 25, -4, 8, 54, 0,0,90],
['b1x3x1', m5, 25, -4, 0, 54, 0,0,90],
['b2x3x1', m5, 25,-20, 0, 54, 0,0,0],
['b2x3x1', m5, 25,-28, 0, 54, 0,0,0],
['b1x3x1', m5, 25,-32, 8, 54, 0,0,90],
['b1x1x1', m3, 25,-40, 4, 54, 0,0,0],
['b1x3x1', m5, 25,-32, 0, 54, 0,0,90],
['c1x1x1', m3, 25,-32, 12, 54, 0,0,0],
['c1x1x1', m3, 25,-28, 12, 54, 0,0,0],
['c1x1x1', m3, 25,-28, 16, 54, 0,0,0],
['c1x1x1', m3, 25,-32, 16, 54, 0,0,0],
['c1x1x1', m3, 25,-24, -4, 54, 0,0,0],
['c1x1x1', m3, 25,-20, -4, 54, 0,0,0],
['c1x1x1', m3, 25,-20, -8, 54, 0,0,0],
['c1x1x1', m3, 25,-24, -8, 54, 0,0,0],
['c1x1x1', m3, 26,-32, 12, 57, 0,0,0],
['c1x1x1', m3, 26,-28, 12, 57, 0,0,0],
['c1x1x1', m3, 26,-28, 16, 57, 0,0,0],
['c1x1x1', m3, 26,-32, 16, 57, 0,0,0],
['c1x1x1', m3, 26,-24, -4, 57, 0,0,0],
['c1x1x1', m3, 26,-20, -4, 57, 0,0,0],
['c1x1x1', m3, 26,-20, -8, 57, 0,0,0],
['c1x1x1', m3, 26,-24, -8, 57, 0,0,0],
['f1x2x1', m6, 27,-20, -8, 60, 0,0,90],
['f1x2x1', m6, 27,-20, -4, 60, 0,0,90],
['f1x2x1', m6, 27,-22, -8, 63, 0,0,0],
['c1x1x1', m6, 27,-22, -6, 66, 0,0,0],
['c1x1x1', m7, 27,-22, -6, 69, 0,0,0],
['b2x2x1', m3, 28,-32, 12, 60, 0,0,0],
['b2x2x1', m5, 28,-32, 12, 63, 0,0,0],
['c1x1x1', m3, 28,-32, 12, 66, 0,0,0],
['c1x1x1', m3, 28,-28, 12, 66, 0,0,0],
['c1x1x1', m3, 28,-28, 16, 66, 0,0,0],
['c1x1x1', m3, 28,-32, 16, 66, 0,0,0],
['b2x2x1', m3, 28,-32, 12, 69, 0,0,0],
['f1x2x1', m5, 29,-28, 12, 72, 0,0,90],
['f1x2x1', m5, 29,-28, 16, 72, 0,0,90],
['f1x2x1', m5, 29,-30, 12, 75, 0,0,0],
['c1x1x1', m5, 29,-30, 12, 78, 0,0,0],
['c1x1x1', m5, 29,-30, 12, 81, 0,0,0],
['c1x1x1', m7, 29,-30, 12, 84, 0,0,0],
['b2x3x1', m5, 30, -8, 0, 57, 0,0,0],
['b2x3x1', m5, 30,-16, 0, 57, 0,0,0],
['b2x3x1', m5, 30,-24, 0, 57, 0,0,0],
['b2x3x1', m5, 30,-32, 0, 57, 0,0,0],
['b2x3x1', m5, 30,-40, 0, 57, 0,0,0],
['b1x4x1', m5, 30, -4, 4, 60, 0,0,90],
['b1x2x1', m5, 30,-20, 4, 60, 0,0,90],
['b1x4x1', m5, 30,-28, 4, 60, 0,0,90],
['b1x3x1', m5, 31, -4, 4, 63, 0,0,90],
['b1x4x1', m5, 31,-16, 4, 63, 0,0,90],
['b1x3x1', m5, 31,-32, 4, 63, 0,0,90],
['c1x1x1', m7, 31, -4, 4, 66, 0,0,0],
['c1x1x1', m7, 31,-40, 4, 66, 0,0,0],
['c1x1x1', m8, 32,-32,-36, 3, 0,0,0],
['b1x2x1', m9, 32, 0, 0, 3, 0,0,45, 1],
['b1x2x1', m9, 32, 0, 0, 6, 0,0,-45, 1],
['b1x2x1', m9, 32, 0, 0, 9, 0,0,45, 1],
['c1x1x1', m9, 32, 0, 0, 12, 0,0,0, 1],
['c1x1x1', m8, 33,-12,-24, 3, 0,0,0],
['b1x2x1', m9, 33, 0, 0, 3, 0,0,45, 1],
['b1x2x1', m9, 33, 0, 0, 6, 0,0,-45, 1],
['b1x2x1', m9, 33, 0, 0, 9, 0,0,45, 1],
['b1x2x1', m9, 33, 0, 0, 12, 0,0,-45, 1],
['b1x2x1', m9, 33, 0, 0, 15, 0,0,45, 1],
['c1x1x1', m9, 33, 0, 0, 18, 0,0,0, 1],
['c1x1x1', m8, 34, 16,-36, 3, 0,0,0],
['b1x2x1', m9, 34, 0, 0, 3, 0,0,45, 1],
['b1x2x1', m9, 34, 0, 0, 6, 0,0,-45, 1],
['b1x2x1', m9, 34, 0, 0, 9, 0,0,45, 1],
['c1x1x1', m9, 34, 0, 0, 12, 0,0,0, 1],
['c1x1x1', m8, 35, 32,-24, 3, 0,0,0],
['b1x2x1', m9, 35, 0, 0, 3, 0,0,45, 1],
['b1x2x1', m9, 35, 0, 0, 6, 0,0,-45, 1],
['b1x2x1', m9, 35, 0, 0, 9, 0,0,45, 1],
['b1x2x1', m9, 35, 0, 0, 12, 0,0,-45, 1],
['b1x2x1', m9, 35, 0, 0, 15, 0,0,45, 1],
['c1x1x1', m9, 35, 0, 0, 18, 0,0,0, 1],
['c1x1x1', m8, 36,-20, 28, 3, 0,0,0],
['b1x2x1', m9, 36, 0, 0, 3, 0,0,45, 1],
['b1x2x1', m9, 36, 0, 0, 6, 0,0,-45, 1],
['b1x2x1', m9, 36, 0, 0, 9, 0,0,45, 1],
['b1x2x1', m9, 36, 0, 0, 12, 0,0,-45, 1],
['b1x2x1', m9, 36, 0, 0, 15, 0,0,45, 1],
['c1x1x1', m9, 36, 0, 0, 18, 0,0,0, 1],
['c1x1x1', m8, 37, 16, 32, 3, 0,0,0],
['b1x2x1', m9, 37, 0, 0, 3, 0,0,45, 1],
['b1x2x1', m9, 37, 0, 0, 6, 0,0,-45, 1],
['b1x2x1', m9, 37, 0, 0, 9, 0,0,45, 1],
['c1x1x1', m9, 37, 0, 0, 12, 0,0,0, 1],
['c1x1x1', m3, 38, 36, -4, 3, 0,0,0],
['b1x2x1', m10, 38, 36, 0, 3, 0,0,90],
['b1x2x1', m10, 38, 36, 12, 3, 0,0,90],
['c1x1x1', m3, 38, 36, 16, 3, 0,0,0],
['c1x1x1', m3, 39, 36, -4, 6, 0,0,0],
['b1x2x1', m10, 39, 36, 0, 6, 0,0,90],
['b1x2x1', m10, 39, 36, 12, 6, 0,0,90],
['c1x1x1', m3, 39, 36, 16, 6, 0,0,0],
['c1x1x1', m3, 40, 36, -4, 9, 0,0,0],
['b1x2x1', m10, 40, 36, 0, 9, 0,0,90],
['b1x2x1', m10, 40, 36, 12, 9, 0,0,90],
['c1x1x1', m3, 40, 36, 16, 9, 0,0,0],
['c1x1x1', m3, 41, 36, -4, 12, 0,0,0],
['b1x2x1', m10, 41, 36, 0, 12, 0,0,90],
['b1x2x1', m10, 41, 36, 12, 12, 0,0,90],
['c1x1x1', m3, 41, 36, 16, 12, 0,0,0],
['b2x2x1', m3, 41, 32, 4, 12, 0,0,0],
['c1x1x1', m3, 42, 36, -4, 15, 0,0,0],
['b2x4x1', m10, 42, 32, 0, 15, 0,0,0],
['c1x1x1', m3, 42, 36, 16, 15, 0,0,0],
['b1x1x1', m3, 43, 36, -4, 18, 0,0,0],
['b1x2x1', m6, 43, 36, 0, 18, 0,0,90],
['b1x2x1', m6, 43, 36, 12, 18, 0,0,90],
['b1x1x1', m3, 43, 36, 16, 18, 0,0,0],
['b2x2x1', m10, 43, 32, 4, 18, 0,0,0],
['c1x1x1', m6, 44, 36, -4, 21, 0,0,0],
['c1x1x1', m6, 44, 36, 16, 21, 0,0,0],
['f1x2x1', m6, 44, 36, 4, 21, 0,0,0],
['f1x2x1', m6, 44, 32, 4, 21, 0,0,0],
['f1x2x1', m6, 44, 36, 6, 24, 0,0,90],
];

View File

@@ -270,11 +270,15 @@ void TWebBrowser::tag_h1234_caption()
void TWebBrowser::tag_kosicon() void TWebBrowser::tag_kosicon()
{ {
dword imgbuf[44]; dword imgbuf[44];
dword maxicon;
dword shared_i18 = memopen("ICONS18", NULL, SHM_READ); dword shared_i18 = memopen("ICONS18", NULL, SHM_READ);
maxicon = EDX / 18 / 18 / 4;
if (shared_i18) && (tag.get_number_of("n")) { if (shared_i18) && (tag.get_number_of("n")) {
if (draw_x + 18 > canvas.bufw) NewLine(); if (tag.number < maxicon) {
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18); if (draw_x + 18 > canvas.bufw) NewLine();
draw_x += 22; canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
draw_x += 22;
}
} }
} }

View File

@@ -571,10 +571,10 @@ void OpenPage(dword _open_URL)
//INTERNAL PAGE //INTERNAL PAGE
history.add(#new_url); history.add(#new_url);
WB1.custom_encoding = -1; WB1.custom_encoding = -1;
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)-1); if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home));
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test)-1); else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test));
else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory(); else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory();
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1); else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) { } else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
//WEB PAGE //WEB PAGE
@@ -589,7 +589,7 @@ void OpenPage(dword _open_URL)
if (!http.transfer) { if (!http.transfer) {
history.add(#new_url); history.add(#new_url);
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1); LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
} }
} else { } else {
//LOCAL PAGE //LOCAL PAGE
@@ -712,7 +712,7 @@ void EventSubmitOmnibox()
void LoadInternalPage(dword _bufdata, _in_bufsize){ void LoadInternalPage(dword _bufdata, _in_bufsize){
if (!_bufdata) || (!_in_bufsize) { if (!_bufdata) || (!_in_bufsize) {
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1); LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
} else { } else {
WB1.list.first = 0; //scroll page to the top WB1.list.first = 0; //scroll page to the top
DrawOmnibox(); DrawOmnibox();

View File

@@ -112,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
#define DEFAULT_URL URL_SERVICE_HOMEPAGE #define DEFAULT_URL URL_SERVICE_HOMEPAGE
char version[]="WebView 3.85"; char version[]="WebView 3.9";

View File

@@ -1,17 +1,49 @@
<html> <html><head><title>New tab</title></head>
<head> <body bgcolor=#fff>
<title>Homepage</title>
</head>
<body><pre>Welcome to WebView a Text-Based Browser.
KolibriOS Bookmarks: <table><tr><td width=20><td width=210><pre>
1. <a href=//kolibrios.org>Homepage</a> ___________________
2. <a href="//builds.kolibrios.org">Night-builds</a> |# : : #|
3. <a href="//ftp.kolibrios.org">FTP Server</a> | : WebView : |
| : TextBased : |
| : Browser : |
| : : |
| :_____________: |
| ___________ |
| | __ | |
| || | | |
\____||__|_______|__|<font color=#DDD>lc</font>
<font bg=#F8F15B>By the way,</font> <font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
<font bg=#3CE7FF> </font></font></font></font>
<td>
</pre>
<kosicon n=58><a href=//kolibrios.org>Homepage</a> &nbsp;
<kosicon n=50><a href="//builds.kolibrios.org">Night-builds</a> &nbsp;
<kosicon n=50><a href="//ftp.kolibrios.org">FTP Server</a>
<pre>
By the way,
<font color="#555555">&bull; You can check for browser updates from the main menu. <font color="#555555">&bull; You can check for browser updates from the main menu.
&bull; To run a web search, type a text in the adress box and press Ctrl+Enter. &bull; To run a web search, type a text in the adress box and press Ctrl+Enter.
&bull; Pressing F6 moves a text cursor to the omnibox. &bull; Pressing F6 moves a text cursor to the omnibox.
&bull; Click on a label in the bottom right corner to change the encoding of a page. &bull; You can manually change the encoding of a page by clicking on a label in the bottom right corner.
</font>
~+
* +
' |
() .-.,="``"=. - o -
'=/_ \ |
* | '=._ |
\ `=./`, '
. '=.__.=' `=' *
+ +
O * ' .<font color=#DDD>jgs</font>

View File

@@ -1,15 +1,49 @@
<html><head><meta charset="cp-866"> <html><head><title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head>
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AD><EFBFBD></title></head> <body bgcolor=#fff>
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD> WebView!
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS:<ol> <table><tr><td width=20><td width=210><pre>
<li><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><></a> ___________________
<li><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a> |# : : #|
<li><a href="//ftp.kolibrios.org">FTP <20><><EFBFBD></a></ol> | : WebView : |
| : <20><><EFBFBD><EFBFBD><EFBFBD><E2AEA2> : |
| : <20><><EFBFBD><EFBFBD> : |
| : : |
| :_____________: |
| ___________ |
| | __ | |
| || | | |
\____||__|_______|__|<font color=#DDD>lc</font>
<font bg=#F8F15B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,</font> <font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
<font bg=#3CE7FF> </font></font></font></font>
<td>
</pre>
<kosicon n=58><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><></a> &nbsp;
<kosicon n=50><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a> &nbsp;
<kosicon n=50><a href="//ftp.kolibrios.org">FTP <20><><EFBFBD></a>
<pre>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
<font color="#555555">&bull; <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <font color="#555555">&bull; <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
&bull; <20><><EFBFBD> <20><><EFBFBD><20> Google <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ctrl+Enter &bull; <20><><EFBFBD> <20><><EFBFBD><20> Google <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ctrl+Enter
&bull; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F6 <20><><EFBFBD><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. &bull; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F6 <20><><EFBFBD><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
&bull; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><><EFBFBD><E0A0AD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD>. &bull; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><><EFBFBD><E0A0AD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD>.
~+
* +
' |
() .-.,="``"=. - o -
'=/_ \ |
* | '=._ |
\ `=./`, '
. '=.__.=' `=' *
+ +
O * ' .<font color=#DDD>jgs</font>

View File

@@ -1,9 +1,8 @@
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2022 //Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2025
//GNU GPL license. //GNU GPL license.
/* /*
BUGS: BUGS:
- F1 in KFM (move Properties to an external app)
- Ctrl+1+2+3+4 in KFM - Ctrl+1+2+3+4 in KFM
- Highlight another commands on Ctrl|Shift in KFM like in Classic KFM - Highlight another commands on Ctrl|Shift in KFM like in Classic KFM
TODO: TODO:
@@ -11,9 +10,9 @@ TODO:
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334 http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
*/ */
#define ABOUT_TITLE "EOLITE 5.30" #define ABOUT_TITLE "Eolite 5.32"
#define TITLE_EOLITE "Eolite File Manager 5.30" #define TITLE_EOLITE "Eolite File Manager 5.32"
#define TITLE_KFM "Kolibri File Manager 2.30"; #define TITLE_KFM "Kolibri File Manager 2.32";
#define MEMSIZE 1024 * 250 #define MEMSIZE 1024 * 250
#include "../lib/clipboard.h" #include "../lib/clipboard.h"
@@ -444,6 +443,9 @@ void main()
} }
EventDriveClick(key_scancode); EventDriveClick(key_scancode);
break; break;
case SCAN_CODE_KEY_P:
EventCopyItemPath();
break;
case SCAN_CODE_KEY_X: case SCAN_CODE_KEY_X:
CopyFilesListToClipboard(CUT); CopyFilesListToClipboard(CUT);
break; break;
@@ -716,7 +718,7 @@ void DrawFilePanels()
DrawButtonsAroundList(); DrawButtonsAroundList();
path = location[active_panel^1]; path = location[active_panel^1];
active_panel ^= 1; active_panel ^= 1;
OpenDir2(WITH_REDRAW); OpenDir_without_unselect(WITH_REDRAW);
active_panel ^= 1; active_panel ^= 1;
if (!getSelectedCount()) files_inactive.count = files.count; if (!getSelectedCount()) files_inactive.count = files.count;
llist_copy(#files, #files_active); llist_copy(#files, #files_active);
@@ -729,38 +731,22 @@ void DrawFilePanels()
DrawButtonsAroundList(); DrawButtonsAroundList();
path = location[active_panel]; path = location[active_panel];
OpenDir2(WITH_REDRAW); OpenDir_without_unselect(WITH_REDRAW);
} }
} }
void OpenDir2(char redraw){ void OpenDir(char redraw) {
if (buf) free(buf);
if (GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
Write_Error(EAX);
history.add(path);
EventHistoryGoBack();
return;
}
SetCurDir(path);
if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
files.visible = math.min(files.h / files.item_h, files.count);
if (!strncmp(path, "/rd/1",5)) || (!strncmp(path, "/sys/",4))
dir_at_fat16 = true; else dir_at_fat16 = false;
Sorting();
SystemDiscs.Draw();
list_full_redraw = true;
List_ReDraw();
DrawPathBar();
}
void OpenDir(char redraw){
int errornum;
unselectAll(); unselectAll();
OpenDir_without_unselect(redraw);
}
void OpenDir_without_unselect(char redraw) {
int errornum;
if (buf) free(buf); if (buf) free(buf);
if (errornum = GetDir(#buf, #files.count, path, DIRS_NOROOT)) { if (errornum = GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
history.add(path); history.add(path);
//EventHistoryGoBack();
Dir_Up(); Dir_Up();
Write_Error(errornum); Write_Error(errornum);
return; return;
@@ -1055,7 +1041,6 @@ void EventHistoryGoForward()
} }
} }
void ShowOpenWithDialog() void ShowOpenWithDialog()
{ {
byte open_param[4097]; byte open_param[4097];
@@ -1149,6 +1134,7 @@ void ShowPopinForm(byte _popin_type)
break; break;
case POPIN_DELETE: case POPIN_DELETE:
if (!files.count) return; if (!files.count) return;
popin_string[0] = -1;
if (!getSelectedCount()) && (!strncmp(#file_name,"..",2)) return; if (!getSelectedCount()) && (!strncmp(#file_name,"..",2)) return;
popinx = DrawEolitePopup(T_YES, T_NO); popinx = DrawEolitePopup(T_YES, T_NO);
WriteTextCenter(popinx, 178, POPIN_W, sc.work_text, T_DELETE_FILE); WriteTextCenter(popinx, 178, POPIN_W, sc.work_text, T_DELETE_FILE);
@@ -1346,6 +1332,12 @@ void EventOpenSearch()
RunProgram(#program_path, #param); RunProgram(#program_path, #param);
} }
void EventCopyItemPath()
{
Clipboard__CopyText(#file_path);
}
void ProceedMouseGestures() void ProceedMouseGestures()
{ {
char stats; char stats;

View File

@@ -4,9 +4,11 @@ char file_actions[]=
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Enter "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Enter
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+Ent <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+Ent
- -
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+C <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+P
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+X -
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+V <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+C
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+X
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+V
- -
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |F2 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |F2
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Del <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Del
@@ -15,8 +17,10 @@ char empty_folder_actions[]=
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+V"; "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+V";
char burger_menu_items[] = char burger_menu_items[] =
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>|Ctrl+N "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>|Ctrl+N
-
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+G <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+G
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+R <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+F
-
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|F10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|F10
<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>"; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>";
@@ -25,6 +29,8 @@ char file_actions[]=
"Ava |Enter "Ava |Enter
Ava ... |Ctrl+Ent Ava ... |Ctrl+Ent
- -
Copy path |Ctrl+P
-
Kopeeri |Ctrl+C Kopeeri |Ctrl+C
L<EFBFBD>ika |Ctrl+X L<EFBFBD>ika |Ctrl+X
Aseta |Ctrl+V Aseta |Ctrl+V
@@ -36,8 +42,10 @@ char empty_folder_actions[]=
"Aseta |Ctrl+V"; "Aseta |Ctrl+V";
char burger_menu_items[] = char burger_menu_items[] =
"New window|Ctrl+N "New window|Ctrl+N
-
Open console here|Ctrl+G Open console here|Ctrl+G
V<EFBFBD>rskenda|Ctrl+R Search|Ctrl+F
-
Settings|F10 Settings|F10
About"; About";
@@ -46,6 +54,8 @@ char file_actions[]=
"Open |Enter "Open |Enter
Open with... |Ctrl+Ent Open with... |Ctrl+Ent
- -
Copy path |Ctrl+P
-
Copy |Ctrl+C Copy |Ctrl+C
Cut |Ctrl+X Cut |Ctrl+X
Paste |Ctrl+V Paste |Ctrl+V
@@ -57,8 +67,10 @@ char empty_folder_actions[]=
"Paste |Ctrl+V"; "Paste |Ctrl+V";
char burger_menu_items[] = char burger_menu_items[] =
"New window|Ctrl+N "New window|Ctrl+N
-
Open console here|Ctrl+G Open console here|Ctrl+G
Refresh folder|Ctrl+R Search|Ctrl+F
-
Settings|F10 Settings|F10
About"; About";
#endif #endif
@@ -76,17 +88,18 @@ void EventMenuClick(dword _id)
if (active_menu == MENU_FILE) switch(_id) { if (active_menu == MENU_FILE) switch(_id) {
case 1: EventOpen(0); break; case 1: EventOpen(0); break;
case 2: ShowOpenWithDialog(); break; case 2: ShowOpenWithDialog(); break;
case 3: CopyFilesListToClipboard(COPY); break; case 3: EventCopyItemPath(); break;
case 4: CopyFilesListToClipboard(CUT); break; case 4: CopyFilesListToClipboard(COPY); break;
case 5: EventPaste(path); break; case 5: CopyFilesListToClipboard(CUT); break;
case 6: FnProcess(2); break; case 6: EventPaste(path); break;
case 7: ShowPopinForm(POPIN_DELETE); break; case 7: FnProcess(2); break;
case 8: FnProcess(1); break; case 8: ShowPopinForm(POPIN_DELETE); break;
case 9: FnProcess(1); break;
} }
if (active_menu == MENU_BURGER) switch(_id) { if (active_menu == MENU_BURGER) switch(_id) {
case 1: EventOpenNewEolite(); break; case 1: EventOpenNewEolite(); break;
case 2: EventOpenConsoleHere(); break; case 2: EventOpenConsoleHere(); break;
case 3: EventRefreshDisksAndFolders(); break; case 3: EventOpenSearch(); break;
case 4: FnProcess(10); break; case 4: FnProcess(10); break;
case 5: EventShowAbout(); break; case 5: EventShowAbout(); break;
} }

View File

@@ -69,7 +69,7 @@ void settings_dialog()
case evKey: case evKey:
GetKeys(); GetKeys();
if (key_scancode==SCAN_CODE_ESC) ExitSettings(); if (key_scancode==SCAN_CODE_ESC) ExitSettings();
edit_box_key_c stdcall (#path_start_ed,key_ascii << 8); edit_box_key_c stdcall (#path_start_ed,key_editbox);
break; break;
case evReDraw: case evReDraw:

View File

@@ -50,10 +50,6 @@ opendialog open_folder_dialog =
NULL NULL
}; };
#define TOOLBAR_H 100
#define LISTX 0
#define LISTY TOOLBAR_H
//===================================================// //===================================================//
// // // //
// RESULTS // // RESULTS //
@@ -95,9 +91,7 @@ void SearchThread()
{ {
int prev_first, prev_cur_y; int prev_first, prev_cur_y;
#ifndef __COFF__
load_dll(Proc_lib, #OpenDialog_init,0); load_dll(Proc_lib, #OpenDialog_init,0);
#endif
OpenDialog_init stdcall (#open_folder_dialog); OpenDialog_init stdcall (#open_folder_dialog);
if (!ESBYTE[path]) strcpy(path, "/sys"); if (!ESBYTE[path]) strcpy(path, "/sys");
@@ -107,28 +101,43 @@ void SearchThread()
loop() switch(@WaitEvent()) loop() switch(@WaitEvent())
{ {
case evMouse: case evMouse:
edit_box_mouse stdcall (#edit_name); edit_box_mouse stdcall (#edit_name);
edit_box_mouse stdcall (#edit_path); edit_box_mouse stdcall (#edit_path);
prev_cur_y = select_list.cur_y;
if (SelectList_ProcessMouse()) { if (SelectList_ProcessMouse()) {
SelectList_Draw(); SelectList_Draw();
} else { } else {
SelectList_DrawLine(select_list.cur_y); SelectList_DrawLine(select_list.cur_y);
}
if (mouse.key&MOUSE_RIGHT) && (mouse.up) && (select_list.MouseOver()) EventOpenFile(false); if (select_list.MouseOver(mouse.x, mouse.y))
break; {
if (mouse.key&MOUSE_LEFT) && (mouse.up) {
if (prev_cur_y == select_list.cur_y) EventRunFile();
}
if (mouse.key&MOUSE_RIGHT) && (mouse.up) {
EventShowFileInFolder();
}
}
}
break;
case evButton: case evButton:
switch (@GetButtonID()) { switch (@GetButtonID()) {
case 1: @ExitProcess(); break; case 1: @ExitProcess(); break;
case BTN_SEARCH: EventSearch(); break; case BTN_SEARCH: EventSearch(); break;
case BTN_CHOOSE_PATH: EventChooseSearchInPath(); case BTN_CHOOSE_PATH: EventChooseSearchInPath();
} }
break;
break;
case evKey: case evKey:
@GetKeys(); GetKeys();
edit_box_key_c stdcall (#edit_name); edit_box_key_c stdcall (#edit_name, key_editbox);
edit_box_key_c stdcall (#edit_path); edit_box_key_c stdcall (#edit_path, key_editbox);
if (key_scancode == SCAN_CODE_TAB) { if (key_scancode == SCAN_CODE_TAB) {
if (edit_name.flags & ed_focus) { if (edit_name.flags & ed_focus) {
edit_name.flags >< edit_path.flags; edit_name.flags >< edit_path.flags;
@@ -143,7 +152,7 @@ void SearchThread()
if (edit_name.flags & ed_focus) || (edit_path.flags & ed_focus) { if (edit_name.flags & ed_focus) || (edit_path.flags & ed_focus) {
if (SCAN_CODE_ENTER == key_scancode) EventSearch(); if (SCAN_CODE_ENTER == key_scancode) EventSearch();
} else { } else {
if (SCAN_CODE_ENTER == key_scancode) EventOpenFile(true); if (SCAN_CODE_ENTER == key_scancode) EventRunFile();
prev_first = select_list.first; prev_first = select_list.first;
prev_cur_y = select_list.cur_y; prev_cur_y = select_list.cur_y;
if (select_list.ProcessKey(key_scancode)) { if (select_list.ProcessKey(key_scancode)) {
@@ -169,17 +178,24 @@ void SearchThread()
} }
} }
#define TOOLBAR_H 100
#define PAD 10
#define LISTX PAD
#define LISTY TOOLBAR_H
void draw_window_search() void draw_window_search()
{ {
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-1, Form.cheight-TOOLBAR_H-1); SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-LISTX-LISTX, Form.cheight-TOOLBAR_H-PAD);
SelectList_Draw(); SelectList_Draw();
DrawBar(0, TOOLBAR_H-1, Form.cwidth, 1, sc.line); DrawWideRectangle(0, LISTY-PAD-1, Form.cwidth, Form.cheight-TOOLBAR_H+PAD+1, 9, sc.work);
DrawRectangle(PAD-1, LISTY-1, select_list.w+1, select_list.h+1, sc.line);
DrawBar(0, 0, Form.cwidth, TOOLBAR_H-1, sc.work); DrawBar(0, 0, Form.cwidth, TOOLBAR_H-1, sc.work);
DrawEditBox(#edit_name); DrawEditBox(#edit_name);
WriteText(edit_name.left-2, edit_name.top-20, 0x90, sc.work_text, T_SEARCH_NAME); WriteText(edit_name.left-2, edit_name.top-20, 0x90, sc.work_text, T_SEARCH_NAME);
edit_path.width = Form.cwidth - 314; edit_path.width = Form.cwidth - 314;
DrawStandartCaptButton(PAD, 63, BTN_SEARCH, T_BUTTON_SEARCH);
DrawFileBox(#edit_path, T_SEARCH_PATH, BTN_CHOOSE_PATH); DrawFileBox(#edit_path, T_SEARCH_PATH, BTN_CHOOSE_PATH);
DrawStandartCaptButton(10, 63, BTN_SEARCH, T_BUTTON_SEARCH);
} }
void SelectList_DrawLine(dword i) void SelectList_DrawLine(dword i)
@@ -224,6 +240,12 @@ void SelectList_LineChanged()
return; return;
} }
void getfullpath(dword to, path, name) {
strcpy(to, path);
chrcat(to, '/');
strcat(to, name);
}
//===================================================// //===================================================//
// // // //
// EVENTS // // EVENTS //
@@ -238,22 +260,21 @@ void EventChooseSearchInPath()
} }
} }
void getfullpath(dword to, path, name) { void EventShowFileInFolder()
strcpy(to, path);
chrcat(to, '/');
strcat(to, name);
}
void EventOpenFile(int run_file_not_show_in_folder)
{ {
char full_path[4096]; char full_path[4096];
int pos = select_list.cur_y; int pos = select_list.cur_y;
getfullpath(#full_path, results.path.get(pos), results.name.get(pos)); getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
if (run_file_not_show_in_folder) { RunProgram(#program_path, #full_path);
RunProgram("/sys/@open", #full_path); }
} else {
RunProgram("/sys/file managers/eolite", #full_path); void EventRunFile()
} {
char full_path[4096];
int pos = select_list.cur_y;
getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
if (dir_exists(#full_path)) chrcat(#full_path, '/');
RunProgram("/sys/@open", #full_path);
} }
void EventSearch() void EventSearch()

View File

@@ -9,7 +9,6 @@
#pragma option -CPA #pragma option -CPA
#initallvar 0 #initallvar 0
#ifndef __COFF__
#jumptomain FALSE #jumptomain FALSE
#startaddress 0 #startaddress 0
@@ -30,17 +29,6 @@ dword I_Param = #param;
dword I_Path = #program_path; dword I_Path = #program_path;
char param[4096]; char param[4096];
char program_path[4096]; char program_path[4096];
#else
extern dword __argv;
extern dword __path;
dword I_Param = #__argv;
dword I_Path = #__path;
#define param __argv
#define program_path __path
#define ______INIT______ start
#endif
#define bool int #define bool int
@@ -403,6 +391,7 @@ inline fastcall int TestBit( EAX, CL)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#define MINIMIZED 0x02
#define ROLLED_UP 0x04 #define ROLLED_UP 0x04
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags) :void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
{ {

View File

@@ -116,17 +116,10 @@
EAX = 37; EAX = 37;
EBX = 2; EBX = 2;
$int 64 $int 64
$mov ebx, eax
$mov ecx, eax
key = EAX; key = EAX;
$and eax, 0x00000001 lkm = EAX&MOUSE_LEFT;
$shr ebx, 1 pkm = EAX&MOUSE_RIGHT;
$and ebx, 0x00000001 mkm = EAX&MOUSE_MIDDLE;
$shr ecx, 2
$and ecx, 0x00000001
lkm = EAX;
pkm = EBX;
mkm = ECX;
//when you release the MOUSE button //when you release the MOUSE button
// Mouse Move Event // Mouse Move Event

View File

@@ -6,37 +6,6 @@
#include "../lib/kolibri.h" #include "../lib/kolibri.h"
#endif #endif
#ifdef __COFF__
extern dword edit_box_draw;
extern dword edit_box_key_safe;
extern dword edit_box_mouse;
extern dword edit_box_set_text;
extern dword scrollbar_v_draw;
extern dword scrollbar_v_mouse;
extern dword scrollbar_h_draw;
extern dword scrollbar_h_mouse;
extern dword PathShow_prepare;
extern dword PathShow_draw;
extern dword progressbar_draw;
extern dword progressbar_progress;
extern dword frame_draw;
/*
Legacy support
For new programs need to use edit_box_key_safe (or edit_box_key_c
with a define below)
TODO: change in all cmm programs edit_box_key to edit_box_key_safe (edit_box_key_c)
See examples in eolite and imgedit
This define changed all edit_box_key_c to edit_box_key_safe identifier's
*/
#define edit_box_key_c edit_box_key_safe
#else
#ifndef INCLUDE_DLL_H #ifndef INCLUDE_DLL_H
#include "../lib/dll.h" #include "../lib/dll.h"
#endif #endif
@@ -242,5 +211,3 @@ struct frame
frame_draw stdcall (#frame123); frame_draw stdcall (#frame123);
} }
#endif

View File

@@ -44,15 +44,14 @@ signed SelectList_ProcessMouse()
return true; return true;
} }
if (mouse.up) && (mouse.click) if (mouse.up) && (select_list.ProcessMouse(mouse.x, mouse.y)) {
if (select_list.ProcessMouse(mouse.x, mouse.y)) { SelectList_LineChanged();
SelectList_LineChanged(); return true;
return true; }
}
return false; return false;
} }
void SelectList_DrawBorder() { :void SelectList_DrawBorder() {
DrawRectangle3D(select_list.x-2, select_list.y-2, DrawRectangle3D(select_list.x-2, select_list.y-2,
select_list.w+3+scroll1.size_x, select_list.h+3, select_list.w+3+scroll1.size_x, select_list.h+3,
sc.dark, sc.light); sc.dark, sc.light);
@@ -61,8 +60,8 @@ void SelectList_DrawBorder() {
void SelectList_DrawScroller() void SelectList_DrawScroller()
{ {
scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80); scroll1.bckg_col = sc.dark; // MixColors(sc.work, 0xBBBbbb, 80);
scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120); scroll1.frnt_col = sc.light; // MixColors(sc.work,0xFFFfff,120);
scroll1.line_col = sc.line; scroll1.line_col = sc.line;
scroll1.max_area = select_list.count; scroll1.max_area = select_list.count;

View File

@@ -1,2 +1,4 @@
if tup.getconfig("NO_FASM") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("charsets.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "charsets") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
tup.rule("charsets.asm", FASM .. " -dlang=" .. tup.getconfig("LANG") .. " %f %o" .. tup.getconfig("KPACK_CMD"), "%B")

View File

@@ -31,3 +31,19 @@ Development history
- Renamed to Charsets Viewer/Charsets - Renamed to Charsets Viewer/Charsets
- Symbol highlight UI tweaks - Symbol highlight UI tweaks
- Fixed rolled up bug - Fixed rolled up bug
30.03.2025 - 0.4.0
- Localization for all system languages
- Display all character scales
- Abolity to copy character codes
- Block on charpage 00 for CP866
- New character code half markers
- Navigation using keys (see hotkeys.txt)
03.04.2025 - 0.4.1
- Fixed bug with codes color subscription
04.04.2025 - 0.4.2
- Fixed bug with resetting UTF charpage to zero on double charset swap to CP866
- Improved charpage blocking for CP866 UX
- Improved char codes copying UI

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
Control hotkeys
- Navigate inside charpage:
- Arrows
- Num2/4/6/8
- Navigation between charpages:
- PgDN, PgUP - previous/next page
- Num0, Home - reset page to zero
- Change symbol scale:
- Num- and Num+

View File

@@ -1082,7 +1082,7 @@ l_libs_start:
lib_2 l_libs lib_name_2, file_name, system_dir_2, import_box_lib lib_2 l_libs lib_name_2, file_name, system_dir_2, import_box_lib
lib_3 l_libs lib_name_3, file_name, system_dir_3, import_buf2d lib_3 l_libs lib_name_3, file_name, system_dir_3, import_buf2d
lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu
lib_5 l_libs lib_name_5, file_name, system_dir_5, import_lib_tinygl lib_5 l_libs lib_name_5, file_name, system_dir_5, import_tinygl
lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini
l_libs_end: l_libs_end:
@@ -1287,7 +1287,7 @@ dd 0,0
akmenuitem_draw db 'kmenuitem_draw',0 akmenuitem_draw db 'kmenuitem_draw',0
align 4 align 4
import_lib_tinygl: import_tinygl:
macro E_LIB n macro E_LIB n
{ {
n dd sz_#n n dd sz_#n
@@ -1343,7 +1343,7 @@ buf_1:
align 4 align 4
el_focus dd tree1 el_focus dd tree1
tree1 tree_list size_one_list,300+2, tl_key_no_edit+tl_draw_par_line,\ tree1 tree_list size_one_list,300+2, tl_key_no_edit+tl_draw_par_line,\
16,16, 0xffffff,0xb0d0ff,0x400040, 5,35,195-16,250, 16,list_offs_text,0,\ 16,16, 0xffffff,0xb0d0ff,0x10400040, 5,35,195-16,250, 16,list_offs_text,0,\
el_focus,w_scr_t1,0 el_focus,w_scr_t1,0
align 4 align 4
@@ -1362,9 +1362,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD> lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD>
if lang eq ru_RU if lang eq ru_RU
capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 29.09.20',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.04.25',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else ; Default to en_US else ; Default to en_US
capt db 'info 3ds version 29.09.20',0 ;window caption capt db 'info 3ds version 14.04.25',0 ;window caption
end if end if
align 16 align 16

View File

@@ -1408,7 +1408,7 @@ buf_1:
align 4 align 4
el_focus dd tree1 el_focus dd tree1
tree1 tree_list size_one_list,300+2, tl_key_no_edit+tl_draw_par_line,\ tree1 tree_list size_one_list,300+2, tl_key_no_edit+tl_draw_par_line,\
16,16, 0xffffff,0xb0d0ff,0x400040, 5,47,195-16,250, 16,list_offs_text,0, el_focus,\ 16,16, 0xffffff,0xb0d0ff,0x10400040, 5,47,195-16,250, 16,list_offs_text,0, el_focus,\
w_scr_t1,0 w_scr_t1,0
align 4 align 4
@@ -1427,9 +1427,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD> lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD>
if lang eq ru_RU if lang eq ru_RU
capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 29.09.20',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.04.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else ; Default to en_US else ; Default to en_US
capt db 'info 3ds [user] version 29.09.20',0 ; Window caption capt db 'info 3ds [user] version 14.04.25',0 ; Window caption
end if end if
align 16 align 16

View File

@@ -812,9 +812,8 @@ proc draw_3d uses eax ebx ecx edi, o_data:dword
@@: @@:
stdcall [glDisable],GL_LIGHTING stdcall [glDisable],GL_LIGHTING
.end_l: .end_l:
stdcall [glTranslatef], 0.0,0.0,0.5 ;correct for z
stdcall [glScalef], [edi+obj_3d.x_scale],[edi+obj_3d.y_scale],[edi+obj_3d.z_scale] stdcall [glScalef], [edi+obj_3d.x_scale],[edi+obj_3d.y_scale],[edi+obj_3d.z_scale]
stdcall [glScalef], 1.0,1.0,0.7 ;correct for z stdcall [glScalef], 1.0,1.0,1.4 ;correct for z
stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_z],0.0,0.0,1.0
stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0
stdcall [glRotatef], [angle_x],1.0,0.0,0.0 stdcall [glRotatef], [angle_x],1.0,0.0,0.0

View File

@@ -951,13 +951,12 @@ endl
endp endp
align 4 align 4
proc glClearDepth uses eax, depth:dword proc glClearDepth uses eax, depth:qword
locals locals
p rd 2 p rd 2
endl endl
mov dword[p],OP_ClearDepth mov dword[p],OP_ClearDepth
mov eax,[depth] fld qword[depth]
fld qword[eax]
fstp dword[p+4] fstp dword[p+4]
lea eax,[ebp-8] ;=sizeof(dd)*2 lea eax,[ebp-8] ;=sizeof(dd)*2

View File

@@ -23,8 +23,7 @@ endl
imul ecx,ebx imul ecx,ebx
shl ecx,2 shl ecx,2
add ecx,[eax+GLContext.color_array] ;ecx = &context.color_array[i] add ecx,[eax+GLContext.color_array] ;ecx = &context.color_array[i]
mov ebx,ebp lea ebx,[ebp-20] ;=sizeof(dd)*5
sub ebx,20 ;=sizeof(dd)*5
mov edx,[ecx] mov edx,[ecx]
mov [ebx+4],edx mov [ebx+4],edx
mov edx,[ecx+4] mov edx,[ecx+4]
@@ -48,8 +47,7 @@ endl
imul esi,ebx imul esi,ebx
shl esi,2 shl esi,2
add esi,[eax+GLContext.normal_array] ;esi = &normal_array[ebx * (3 + c->normal_array_stride)] add esi,[eax+GLContext.normal_array] ;esi = &normal_array[ebx * (3 + c->normal_array_stride)]
mov edi,eax lea edi,[eax+GLContext.current_normal]
add edi,GLContext.current_normal
mov ecx,3 mov ecx,3
rep movsd rep movsd
mov dword[edi],0.0 mov dword[edi],0.0
@@ -92,8 +90,7 @@ endl
imul ecx,ebx imul ecx,ebx
shl ecx,2 shl ecx,2
add ecx,[eax+GLContext.vertex_array] ;ecx = &context.vertex_array[i] add ecx,[eax+GLContext.vertex_array] ;ecx = &context.vertex_array[i]
mov ebx,ebp lea ebx,[ebp-20] ;=sizeof(dd)*5
sub ebx,20 ;=sizeof(dd)*5
mov edx,[ecx] mov edx,[ecx]
mov [ebx+4],edx mov [ebx+4],edx
mov edx,[ecx+4] mov edx,[ecx+4]
@@ -130,8 +127,7 @@ endl
mov eax,[i] mov eax,[i]
mov dword[p+4],eax mov dword[p+4],eax
mov eax,ebp lea eax,[ebp-8] ;=sizeof(dd)*2
sub eax,8 ;=sizeof(dd)*2
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -139,10 +135,9 @@ endp
align 4 align 4
proc glopDrawArrays, context:dword, param:dword proc glopDrawArrays, context:dword, param:dword
locals locals
vi dd ?
idx dd ? idx dd ?
states dd ? states dd ?
size dd ? a_size dd ?
p rd 8 ;функция glopColor требует 8 параметров, другие функции требуют меньше, берем по максимуму что-бы не портить стек p rd 8 ;функция glopColor требует 8 параметров, другие функции требуют меньше, берем по максимуму что-бы не портить стек
endl endl
pushad pushad
@@ -155,132 +150,19 @@ pushad
mov [idx],eax ;param[2].i mov [idx],eax ;param[2].i
mov eax,[ebx+4] mov eax,[ebx+4]
mov [p+4],eax ;p[1].i = param[1].i mov [p+4],eax ;p[1].i = param[1].i
mov eax,ebp lea eax,[ebp-32] ;=sizeof(dd)*8
sub eax,32 ;=sizeof(dd)*8
stdcall glopBegin, edx,eax stdcall glopBegin, edx,eax
mov dword[vi],0 cmp ecx,1
jl @f
align 4 align 4
.cycle_0: ;for (int vi=0; vi<count; vi++) .cycle_0: ;for (int vi=0; vi<count; vi++)
cmp dword[vi],ecx call CopyArrayElementByIndex
jge .cycle_0_end
bt dword[states],1 ;2^1=COLOR_ARRAY
jnc @f
mov esi,[edx+GLContext.color_array_size]
mov [size],esi
add esi,[edx+GLContext.color_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.color_array] ;esi = &context.color_array[i]
mov edi,ebp
sub edi,28 ;edi = &p[1]
mov ebx,[esi+8]
mov [edi],ebx ;p[1].f = context.color_array[i+2]
mov ebx,[esi+4]
mov [edi+4],ebx ;p[2].f = context.color_array[i+1]
mov ebx,[esi]
mov [edi+8],ebx ;p[3].f = context.color_array[i]
add edi,12
cmp dword[size],3
jle .e1
add esi,12
movsd
jmp .e2
.e1:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
.e2:
mov edi,ebp
sub edi,32 ;edi = &p[0]
mov ebx,ebp
sub ebx,12 ;ebp-12 = &p[5]
push ebx
add ebx,4 ;ebp-8 = &p[6]
push ebx
add ebx,4 ;ebp-4 = &p[7]
push ebx
stdcall RGBFtoRGBI,[edi+12],[edi+8],[edi+4] ;call: r,g,b,&p[7],&p[6],&p[5]
stdcall glopColor, edx,edi ;(context, p(op,rf,gf,bf,af,ri,gi,bi))
@@:
bt dword[states],2 ;2^2=NORMAL_ARRAY
jnc @f
mov esi,[edx+GLContext.normal_array_stride]
add esi,3
imul esi,[idx]
shl esi,2
add esi,[edx+GLContext.normal_array] ;esi = &context.normal_array[ idx * (3 + context.normal_array_stride) ]
mov edi,edx
add edi,GLContext.current_normal
movsd ;context.current_normal.X = context.normal_array[i]
movsd
movsd
mov dword[edi],0.0 ;context.current_normal.W = 0.0f
@@:
bt dword[states],3 ;2^3=TEXCOORD_ARRAY
jnc @f
mov esi,[edx+GLContext.texcoord_array_size]
mov [size],esi
add esi,[edx+GLContext.texcoord_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.texcoord_array] ;esi = &context.texcoord_array[i]
mov edi,edx
add edi,GLContext.current_tex_coord
movsd ;context.current_tex_coord.X = ccontext.texcoord_array[i]
movsd
cmp dword[size],2
jle .e3
movsd
jmp .e4
.e3:
mov dword[edi],0.0 ;если задано 2 параметра, то 3-й ставим по умолчанию 0.0
add edi,4
.e4:
cmp dword[size],3
jle .e5
movsd
jmp @f
.e5:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
@@:
bt dword[states],0 ;2^0=VERTEX_ARRAY
jnc @f
mov esi,[edx+GLContext.vertex_array_size]
mov [size],esi
add esi,[edx+GLContext.vertex_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.vertex_array] ;esi = &context.vertex_array[i]
mov edi,ebp
sub edi,28 ;edi = &p[1]
movsd ;p[1].f = context.vertex_array[i]
movsd
cmp dword[size],2
jle .e6
movsd
jmp .e7
.e6:
mov dword[edi],0.0 ;если задано 2 параметра, то 3-й ставим по умолчанию 0.0
add edi,4
jmp .e8 ;и 4-й тоже ставим по умолчанию
.e7:
cmp dword[size],3
jle .e8
movsd
sub edi,20 ;edi=&p[0]
jmp .e9
.e8:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
sub edi,16 ;edi=&p[0]
.e9:
stdcall glopVertex, edx,edi
@@:
inc dword[idx] inc dword[idx]
inc dword[vi] loop .cycle_0
jmp .cycle_0 @@:
.cycle_0_end:
;mov eax,ebp lea eax,[ebp-32] ;=sizeof(dd)*8
;sub eax,32 ;=sizeof(dd)*8
stdcall glopEnd, edx,eax stdcall glopEnd, edx,eax
popad popad
ret ret
@@ -299,8 +181,7 @@ endl
mov eax,[count] mov eax,[count]
mov dword[p+12],eax mov dword[p+12],eax
mov eax,ebp lea eax,[ebp-16] ;=sizeof(dd)*4
sub eax,16 ;=sizeof(dd)*4
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -308,12 +189,12 @@ endp
align 4 align 4
proc glopDrawElements, context:dword, param:dword proc glopDrawElements, context:dword, param:dword
locals locals
type dd ?
indices dd ? ;указатель на 16 или 32 битные индексы
ii dd ? ii dd ?
idx dd ? idx dd ?
states dd ? states dd ?
type dd ? a_size dd ?
size dd ?
indices dd ? ;указатель на 16 или 32 битные индексы
p rd 8 p rd 8
endl endl
pushad pushad
@@ -328,8 +209,7 @@ pushad
mov [type],eax ;type = param[3].i mov [type],eax ;type = param[3].i
mov eax,[ebx+16] mov eax,[ebx+16]
mov [indices],eax ;*indices = param[4].p mov [indices],eax ;*indices = param[4].p
mov eax,ebp lea eax,[ebp-32] ;=sizeof(dd)*8
sub eax,32 ;=sizeof(dd)*8
stdcall glopBegin, edx,eax stdcall glopBegin, edx,eax
mov dword[ii],0 mov dword[ii],0
@@ -351,127 +231,133 @@ align 4
.end_0: .end_0:
mov [idx],esi mov [idx],esi
bt dword[states],1 ;2^1=COLOR_ARRAY call CopyArrayElementByIndex
jnc @f
mov esi,[edx+GLContext.color_array_size]
mov [size],esi
add esi,[edx+GLContext.color_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.color_array] ;esi = &context.color_array[i]
mov edi,ebp
sub edi,28 ;edi = &p[1]
mov ebx,[esi+8]
mov [edi],ebx ;p[1].f = context.color_array[i+2]
mov ebx,[esi+4]
mov [edi+4],ebx ;p[2].f = context.color_array[i+1]
mov ebx,[esi]
mov [edi+8],ebx ;p[3].f = context.color_array[i]
add edi,12
cmp dword[size],3
jle .e1
add esi,12
movsd
jmp .e2
.e1:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
.e2:
mov edi,ebp
sub edi,32 ;edi = &p[0]
mov ebx,ebp
sub ebx,12 ;ebp-12 = &p[5]
push ebx
add ebx,4 ;ebp-8 = &p[6]
push ebx
add ebx,4 ;ebp-4 = &p[7]
push ebx
stdcall RGBFtoRGBI,[edi+12],[edi+8],[edi+4] ;call: r,g,b,&p[7],&p[6],&p[5]
stdcall glopColor, edx,edi ;(context, p(op,rf,gf,bf,af,ri,gi,bi))
@@:
bt dword[states],2 ;2^2=NORMAL_ARRAY
jnc @f
mov esi,[edx+GLContext.normal_array_stride]
add esi,3
imul esi,[idx] ;esi = idx * (3 + context.normal_array_stride)
shl esi,2
add esi,[edx+GLContext.normal_array]
mov edi,edx
add edi,GLContext.current_normal
movsd ;context.current_normal.X = context.normal_array[i]
movsd
movsd
mov dword[edi],0.0 ;context.current_normal.W = 0.0f
@@:
bt dword[states],3 ;2^3=TEXCOORD_ARRAY
jnc @f
mov esi,[edx+GLContext.texcoord_array_size]
mov [size],esi
add esi,[edx+GLContext.texcoord_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.texcoord_array] ;esi = &context.texcoord_array[i]
mov edi,edx
add edi,GLContext.current_tex_coord
movsd ;context.current_tex_coord.X = ccontext.texcoord_array[i]
movsd
cmp dword[size],2
jle .e3
movsd
jmp .e4
.e3:
mov dword[edi],0.0 ;если задано 2 параметра, то 3-й ставим по умолчанию 0.0
add edi,4
.e4:
cmp dword[size],3
jle .e5
movsd
jmp @f
.e5:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
@@:
bt dword[states],0 ;2^0=VERTEX_ARRAY
jnc @f
mov esi,[edx+GLContext.vertex_array_size]
mov [size],esi
add esi,[edx+GLContext.vertex_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.vertex_array] ;esi = &context.vertex_array[i]
mov edi,ebp
sub edi,28 ;edi = &p[1]
movsd ;p[1].f = context.vertex_array[i]
movsd
cmp dword[size],2
jle .e6
movsd
jmp .e7
.e6:
mov dword[edi],0.0 ;если задано 2 параметра, то 3-й ставим по умолчанию 0.0
add edi,4
jmp .e8 ;и 4-й тоже ставим по умолчанию
.e7:
cmp dword[size],3
jle .e8
movsd
sub edi,20 ;edi=&p[0]
jmp .e9
.e8:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
sub edi,16 ;edi=&p[0]
.e9:
stdcall glopVertex, edx,edi
@@:
inc dword[ii] inc dword[ii]
jmp .cycle_0 jmp .cycle_0
.cycle_0_end: .cycle_0_end:
mov eax,ebp lea eax,[ebp-32] ;=sizeof(dd)*8
sub eax,32 ;=sizeof(dd)*8
stdcall glopEnd, edx,eax stdcall glopEnd, edx,eax
popad popad
ret ret
endp endp
;input:
; edx - GLContext
idx equ ebp-44
states equ ebp-40
a_size equ ebp-36
align 4
CopyArrayElementByIndex:
bt dword[states],1 ;2^1=COLOR_ARRAY
jnc @f
mov esi,[edx+GLContext.color_array_size]
mov [a_size],esi
add esi,[edx+GLContext.color_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.color_array] ;esi = &context.color_array[i]
lea edi,[ebp-28] ;edi = &p[1]
mov ebx,[esi+8]
mov [edi],ebx ;p[1].f = context.color_array[i+2]
mov ebx,[esi+4]
mov [edi+4],ebx ;p[2].f = context.color_array[i+1]
mov ebx,[esi]
mov [edi+8],ebx ;p[3].f = context.color_array[i]
add edi,12
cmp dword[a_size],3
jle .e1
add esi,12
movsd
jmp .e2
.e1:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
.e2:
lea edi,[ebp-32] ;edi = &p[0]
lea ebx,[ebp-12] ;ebp-12 = &p[5]
push ebx
add ebx,4 ;ebp-8 = &p[6]
push ebx
add ebx,4 ;ebp-4 = &p[7]
push ebx
stdcall RGBFtoRGBI,[edi+12],[edi+8],[edi+4] ;call: r,g,b,&p[7],&p[6],&p[5]
stdcall glopColor, edx,edi ;(context, p(op,rf,gf,bf,af,ri,gi,bi))
@@:
bt dword[states],2 ;2^2=NORMAL_ARRAY
jnc @f
mov esi,[edx+GLContext.normal_array_stride]
add esi,3
imul esi,[idx] ;esi = idx * (3 + context.normal_array_stride)
shl esi,2
add esi,[edx+GLContext.normal_array] ;esi = &context.normal_array[ idx * (3 + context.normal_array_stride) ]
lea edi,[edx+GLContext.current_normal]
movsd ;context.current_normal.X = context.normal_array[i]
movsd
movsd
mov dword[edi],0.0 ;context.current_normal.W = 0.0f
@@:
bt dword[states],3 ;2^3=TEXCOORD_ARRAY
jnc @f
mov esi,[edx+GLContext.texcoord_array_size]
mov [a_size],esi
add esi,[edx+GLContext.texcoord_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.texcoord_array] ;esi = &context.texcoord_array[i]
lea edi,[edx+GLContext.current_tex_coord]
movsd ;context.current_tex_coord.X = ccontext.texcoord_array[i]
movsd
cmp dword[a_size],2
jle .e3
movsd
jmp .e4
.e3:
mov dword[edi],0.0 ;если задано 2 параметра, то 3-й ставим по умолчанию 0.0
add edi,4
.e4:
cmp dword[a_size],3
jle .e5
movsd
jmp @f
.e5:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
@@:
bt dword[states],0 ;2^0=VERTEX_ARRAY
jnc @f
mov esi,[edx+GLContext.vertex_array_size]
mov [a_size],esi
add esi,[edx+GLContext.vertex_array_stride]
imul esi,[idx] ;esi = i
shl esi,2
add esi,[edx+GLContext.vertex_array] ;esi = &context.vertex_array[i]
lea edi,[ebp-28] ;edi = &p[1]
movsd ;p[1].f = context.vertex_array[i]
movsd
cmp dword[a_size],2
jle .e6
movsd
jmp .e7
.e6:
mov dword[edi],0.0 ;если задано 2 параметра, то 3-й ставим по умолчанию 0.0
add edi,4
jmp .e8 ;и 4-й тоже ставим по умолчанию
.e7:
cmp dword[a_size],3
jle .e8
movsd
sub edi,20 ;edi=&p[0]
jmp .e9
.e8:
mov dword[edi],1.0 ;если задано 3 параметра, то 4-й ставим по умолчанию 1.0
sub edi,16 ;edi=&p[0]
.e9:
stdcall glopVertex, edx,edi
@@:
ret
purge idx
purge states
purge a_size
align 4 align 4
proc glDrawElements uses eax, mode:dword, count:dword, type:dword, indices:dword proc glDrawElements uses eax, mode:dword, count:dword, type:dword, indices:dword
locals locals
@@ -488,8 +374,7 @@ endl
mov eax,[indices] mov eax,[indices]
mov dword[p+16],eax mov dword[p+16],eax
mov eax,ebp lea eax,[ebp-20] ;=sizeof(dd)*5
sub eax,20 ;=sizeof(dd)*5
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -533,8 +418,7 @@ endl
;assert(0); ;assert(0);
.end_f: .end_f:
mov eax,ebp lea eax,[ebp-8] ;=sizeof(dd)*2
sub eax,8 ;=sizeof(dd)*2
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -578,8 +462,7 @@ endl
;assert(0); ;assert(0);
.end_f: .end_f:
mov eax,ebp lea eax,[ebp-8] ;=sizeof(dd)*2
sub eax,8 ;=sizeof(dd)*2
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -612,8 +495,7 @@ endl
mov eax,[pointer] mov eax,[pointer]
mov dword[p+12],eax mov dword[p+12],eax
mov eax,ebp lea eax,[ebp-16] ;=sizeof(dd)*4
sub eax,16 ;=sizeof(dd)*4
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -646,8 +528,7 @@ endl
mov eax,[pointer] mov eax,[pointer]
mov dword[p+12],eax mov dword[p+12],eax
mov eax,ebp lea eax,[ebp-16] ;=sizeof(dd)*4
sub eax,16 ;=sizeof(dd)*4
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -676,8 +557,7 @@ endl
mov eax,[pointer] mov eax,[pointer]
mov dword[p+8],eax mov dword[p+8],eax
mov eax,ebp lea eax,[ebp-12] ;=sizeof(dd)*3
sub eax,12 ;=sizeof(dd)*3
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp
@@ -710,8 +590,7 @@ endl
mov eax,[pointer] mov eax,[pointer]
mov dword[p+12],eax mov dword[p+12],eax
mov eax,ebp lea eax,[ebp-16] ;=sizeof(dd)*4
sub eax,16 ;=sizeof(dd)*4
stdcall gl_add_op,eax stdcall gl_add_op,eax
ret ret
endp endp

View File

@@ -12,6 +12,15 @@ include '../opengl_const.inc'
@use_library @use_library
;Constants describing the house.3ds file (obtained using the info_3ds program)
VERTICES_OFFSET = 0x33 ;offset along which the coordinates of the vertices go
FACES_COUNT = 0x162 ;number of faces
FACES_OFFSET = 0x96b ;offset along which information about the edges goes
HOUSE_FILE_SIZE = 5297
txt_error_file_size db '"House.3ds file size does not match" -tE',0
align 4 align 4
start: start:
load_library name_tgl, library_path, system_path, import_tinygl load_library name_tgl, library_path, system_path, import_tinygl
@@ -20,20 +29,20 @@ start:
mcall SF_SET_EVENTS_MASK,0x27 mcall SF_SET_EVENTS_MASK,0x27
;заполняем массив индексов из файла house.3ds (который вшит внутрь данной программы) ;we fill the array of indices from the house.3ds file (which is embedded inside this program)
mov esi,house_3ds mov esi,house_3ds
add esi,0x1798 ;смещение по которому идет информация о гранях в файле 3ds (получено с использованием программы info_3ds) add esi,FACES_OFFSET
mov edi,Indices mov edi,Indices
mov eax,0x1a6 ;число граней в файле 3ds (получено с использованием программы info_3ds) mov eax,FACES_COUNT
@@: @@:
movsd movsd
movsw movsw
add esi,2 ;пропускаем свойства грани add esi,2 ;skip face properties
dec eax dec eax
or eax,eax or eax,eax
jnz @b jnz @b
;первоначальные настройки контекста tinygl ;tinygl initial context settings
stdcall [kosglMakeCurrent], 10,10,400,350,ctx1 stdcall [kosglMakeCurrent], 10,10,400,350,ctx1
stdcall [glEnable], GL_DEPTH_TEST stdcall [glEnable], GL_DEPTH_TEST
stdcall [glClearColor], 0.0,0.0,0.0,0.0 stdcall [glClearColor], 0.0,0.0,0.0,0.0
@@ -48,13 +57,13 @@ red_win:
align 4 align 4
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -140,29 +149,34 @@ caption db 'Test opengl 1.1 arrays, [Esc] - exit, [<-],[->],[Up],[Down] - rotate
align 4 align 4
draw_3d: draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;clear the color and depth buffer
mov eax,house_3ds.end-house_3ds
cmp eax,HOUSE_FILE_SIZE
je @f
notify_window_run txt_error_file_size
ret
@@:
call [glPushMatrix] call [glPushMatrix]
;масштаб и повороты ;scale and rotations
stdcall [glTranslatef], 0.0,0.0,0.5
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_z],0.0,0.0,1.0
stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0
stdcall [glRotatef], [angle_x],1.0,0.0,0.0 stdcall [glRotatef], [angle_x],1.0,0.0,0.0
;рисование через индексный массив ;drawing via index array
mov eax,house_3ds ;начало внедренного файла 3ds mov eax,house_3ds ;start of embedded 3ds file
add eax,0xeb ;смещение по которому идут координаты вершин (получено с использованием программы info_3ds) add eax,VERTICES_OFFSET
stdcall [glVertexPointer], 3, GL_FLOAT, 0, eax ;задаем массив для вершин, 3 - число координат для одной вершины stdcall [glVertexPointer], 3, GL_FLOAT, 0, eax ;we set an array for the vertices, 3 is the number of coordinates for one vertex
stdcall [glEnableClientState], GL_VERTEX_ARRAY ;включаем режим рисования вершин stdcall [glEnableClientState], GL_VERTEX_ARRAY ;turn on the vertex drawing mode
stdcall [glDrawElements], GL_TRIANGLES, 0x1a6*3, GL_UNSIGNED_SHORT, Indices ;mode, count, type, *indices stdcall [glDrawElements], GL_TRIANGLES, FACES_COUNT*3, GL_UNSIGNED_SHORT, Indices ;mode, count, type, *indices
stdcall [glDisableClientState], GL_VERTEX_ARRAY ;отключаем режим рисования вершин stdcall [glDisableClientState], GL_VERTEX_ARRAY ;disable vertex drawing mode
call [glPopMatrix] call [glPopMatrix]
ret ret
align 4 align 4
scale dd 0.0065 ;начальный масштаб (в идеальном случае должен вычислятся, но для даного примера подобран в ручную на глаз) scale dd 0.07 ;initial scale (ideally should be calculated)
delt_sc dd 0.0005 delt_sc dd 0.0005
angle_z dd 90.0 angle_z dd 90.0
angle_y dd 90.0 angle_y dd 90.0
@@ -170,10 +184,11 @@ angle_x dd 0.0
delt_size dd 3.0 delt_size dd 3.0
align 4 align 4
house_3ds: ;внедряем файл внутрь программы (в идеальном случае должен открыватся через окно диалога, но для облегчения примера вшит внутрь) house_3ds: ;we embed the file inside the program (ideally it should open through a dialog box)
file '../../../../../demos/view3ds/3ds_objects/House.3ds' file '../../../../../demos/view3ds/3ds_objects/House.3ds'
.end:
align 4 align 4
Indices rb 0x1a6*6 ;0x1a6 - число граней, на каждую грань по 3 точки, индекс точки 2 байта Indices rb FACES_COUNT*6 ;3 points per edge, point index 2 bytes
;-------------------------------------------------- ;--------------------------------------------------
align 4 align 4

View File

@@ -36,13 +36,13 @@ red_win:
align 16 align 16
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -141,7 +141,6 @@ stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим б
stdcall [glColor3f], 1.0, 1.0, 0.0 stdcall [glColor3f], 1.0, 1.0, 0.0
call [glPushMatrix] call [glPushMatrix]
stdcall [glTranslatef], 0.0,0.0,0.5
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_z],0.0,0.0,1.0

View File

@@ -60,6 +60,7 @@ load_libraries l_libs_start,l_libs_end
stdcall [buf2d_convert_text_matrix], buf_1 stdcall [buf2d_convert_text_matrix], buf_1
load_image_file 'toolb_1.png', image_data_toolbar load_image_file 'toolb_1.png', image_data_toolbar
call SetLight
call draw_3d call draw_3d
align 4 align 4
@@ -69,13 +70,13 @@ red_win:
align 4 align 4
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -303,11 +304,7 @@ draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины
call [glPushMatrix] call [glPushMatrix]
call SetLight
stdcall [glTranslatef], 0.0,0.0,0.5
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glScalef], 1.0, 1.0, 0.5
stdcall [glColor3f], 1.0, 1.0, 0.0 stdcall [glColor3f], 1.0, 1.0, 0.0
stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_z],0.0,0.0,1.0

View File

@@ -60,6 +60,7 @@ load_libraries l_libs_start,l_libs_end
stdcall [buf2d_convert_text_matrix], buf_1 stdcall [buf2d_convert_text_matrix], buf_1
load_image_file 'toolb_1.png', image_data_toolbar load_image_file 'toolb_1.png', image_data_toolbar
call SetLight
call draw_3d call draw_3d
align 4 align 4
@@ -69,13 +70,13 @@ red_win:
align 4 align 4
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -296,9 +297,6 @@ draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины
call [glPushMatrix] call [glPushMatrix]
call SetLight
stdcall [glTranslatef], 0.0,0.0,0.5
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glColor3f], 1.0, 1.0, 0.0 stdcall [glColor3f], 1.0, 1.0, 0.0

View File

@@ -88,13 +88,13 @@ red_win:
align 4 align 4
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -295,7 +295,6 @@ draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины
call [glPushMatrix] call [glPushMatrix]
stdcall [glTranslatef], 0.0,0.0,0.5
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_z],0.0,0.0,1.0
stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0

View File

@@ -88,13 +88,13 @@ red_win:
align 4 align 4
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -297,9 +297,8 @@ draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины
call [glPushMatrix] call [glPushMatrix]
stdcall [glTranslatef], 0.0,0.0,0.5
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glScalef], 1.0, 1.0, 0.1 ;прижимаем сферу, что-бы сразу не вылазила при увеличении stdcall [glScalef], 1.0, 1.0, 0.2 ;прижимаем сферу, что-бы сразу не вылазила при увеличении
stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0
stdcall [glRotatef], [angle_x],1.0,0.0,0.0 stdcall [glRotatef], [angle_x],1.0,0.0,0.0

View File

@@ -89,13 +89,13 @@ red_win:
align 4 align 4
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
cmp al,1 cmp al,EV_REDRAW
jz red_win jz red_win
cmp al,2 cmp al,EV_KEY
jz key jz key
cmp al,3 cmp al,EV_BUTTON
jz button jz button
jmp still jmp still
align 4 align 4
draw_window: draw_window:
@@ -268,8 +268,9 @@ draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины
call [glPushMatrix] call [glPushMatrix]
stdcall [glTranslatef], 0.0,0.0,-1.0 ;двигаем сферу на себя, что-бы отсечь переднюю часть
stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glScalef], 1.0, 1.0, 0.1 ;прижимаем сферу, что-бы сразу не вылазила при увеличении stdcall [glScalef], 1.0, 1.0, 0.2 ;прижимаем сферу, что-бы сразу не вылазила при увеличении
stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0
stdcall [glRotatef], [angle_x],1.0,0.0,0.0 stdcall [glRotatef], [angle_x],1.0,0.0,0.0

View File

@@ -185,7 +185,7 @@ align 4
cmp ecx,GL_SPOT_EXPONENT cmp ecx,GL_SPOT_EXPONENT
jne @f jne @f
mov ecx,[ebx+12] mov ecx,[ebx+12]
mov [edi+GLLight.spot_exponent],ecx ;l.spot_exponent=p[3] mov [edx+GLLight.spot_exponent],ecx ;l.spot_exponent=p[3]
jmp .end_f jmp .end_f
align 4 align 4
@@: @@:
@@ -193,7 +193,7 @@ align 4
jne .end_spot_c jne .end_spot_c
fld dword[ebp+12] ;float a=v.v[0] fld dword[ebp+12] ;float a=v.v[0]
; assert(a == 180 || (a>=0 && a<=90)); ; assert(a == 180 || (a>=0 && a<=90));
fst dword[edi+GLLight.spot_cutoff] ;l.spot_cutoff=a fst dword[edx+GLLight.spot_cutoff] ;l.spot_cutoff=a
fcom dword[an180f] ;if (a != 180) fcom dword[an180f] ;if (a != 180)
fstsw ax fstsw ax
sahf sahf
@@ -202,7 +202,7 @@ align 4
fmulp fmulp
fdiv dword[an180f] fdiv dword[an180f]
fcos fcos
fstp dword[edi+GLLight.cos_spot_cutoff] ;l.cos_spot_cutoff=cos(a * M_PI / 180.0) fstp dword[edx+GLLight.cos_spot_cutoff] ;l.cos_spot_cutoff=cos(a * M_PI / 180.0)
jmp .end_f jmp .end_f
@@: @@:
ffree st0 ffree st0
@@ -213,21 +213,21 @@ align 4
cmp ecx,GL_CONSTANT_ATTENUATION cmp ecx,GL_CONSTANT_ATTENUATION
jne @f jne @f
mov ecx,[ebx+12] mov ecx,[ebx+12]
mov [edi+GLLight.attenuation],ecx ;l->attenuation[0]=p[3] mov [edx+GLLight.attenuation],ecx ;l->attenuation[0]=p[3]
jmp .end_f jmp .end_f
align 4 align 4
@@: @@:
cmp ecx,GL_LINEAR_ATTENUATION cmp ecx,GL_LINEAR_ATTENUATION
jne @f jne @f
mov ecx,[ebx+12] mov ecx,[ebx+12]
mov [edi+GLLight.attenuation+4],ecx ;l->attenuation[1]=p[3] mov [edx+GLLight.attenuation+4],ecx ;l->attenuation[1]=p[3]
jmp .end_f jmp .end_f
align 4 align 4
@@: @@:
cmp ecx,GL_QUADRATIC_ATTENUATION cmp ecx,GL_QUADRATIC_ATTENUATION
jne @f jne @f
mov ecx,[ebx+12] mov ecx,[ebx+12]
mov [edi+GLLight.attenuation+8],ecx ;l->attenuation[2]=p[3] mov [edx+GLLight.attenuation+8],ecx ;l->attenuation[2]=p[3]
jmp .end_f jmp .end_f
align 4 align 4
@@: ;default: @@: ;default:
@@ -363,15 +363,14 @@ fl_1e_3 dd 1.0e-3
align 16 align 16
proc gl_shade_vertex, context:dword, v:dword proc gl_shade_vertex, context:dword, v:dword
locals locals
R dd ? ;float ebp-96 R dd ? ;float ebp-92
G dd ? ;float ebp-92 G dd ? ;float ebp-88
B dd ? ;float ebp-88 B dd ? ;float ebp-84
A dd ? ;float ebp-84 A dd ? ;float ebp-80
s V3 ;ebp-80 s V3 ;ebp-76
d V3 ;ebp-68 d V3 ;ebp-64
tmp dd ? ;float ebp-56 tmp dd ? ;float ebp-52
att dd ? ;float ebp-52 att dd ? ;float ebp-48
dot_spot dd ? ;float ebp-48
lR dd ? ;float ebp-44 lR dd ? ;float ebp-44
lB dd ? ;float ebp-40 lB dd ? ;float ebp-40
lG dd ? ;float ebp-36 lG dd ? ;float ebp-36
@@ -563,7 +562,6 @@ align 4
fmul dword[d+offs_Z] fmul dword[d+offs_Z]
faddp faddp
fchs fchs
fst dword[dot_spot]
cmp dword[twoside],0 ;if (twoside && dot_spot < 0) cmp dword[twoside],0 ;if (twoside && dot_spot < 0)
je @f je @f
ftst ;if (dot_spot<0) ftst ;if (dot_spot<0)

View File

@@ -197,21 +197,24 @@ push edi esi
add ebx,4 add ebx,4
inc esi inc esi
cmp byte[esi],'f' cmp byte[esi],'f' ;float
jne @f jne @f
fld dword[ebx] fld dword[ebx]
fstp qword[Data_Double] fstp qword[Data_Double]
call DoubleFloat_to_String call DoubleFloat_to_String
stdcall str_cat, edi,Data_String stdcall str_cat, edi,Data_String
@@: @@:
cmp byte[esi],'d' cmp byte[esi],'C' ;const
jne @f je @f
cmp byte[esi],'d' ;integer
je @f
jmp .no_param
@@:
stdcall str_len,edi stdcall str_len,edi
add edi,eax add edi,eax
sub ecx,eax sub ecx,eax
mov eax,dword[ebx] mov eax,dword[ebx]
stdcall convert_int_to_str,ecx stdcall convert_int_to_str,ecx
@@:
.no_param: .no_param:
inc esi inc esi
cmp byte[esi],0 cmp byte[esi],0

View File

@@ -134,7 +134,7 @@ endl
cmp dword[edx+GLContext.lighting_enabled],0 ;if(context.lighting_enabled) cmp dword[edx+GLContext.lighting_enabled],0 ;if(context.lighting_enabled)
jne .if_0 jne .if_0
cmp dword[eax+GLContext.texture_2d_enabled],0 cmp dword[edx+GLContext.texture_2d_enabled],0
jne .if_0 jne .if_0
jmp @f jmp @f
align 4 align 4

View File

@@ -17,7 +17,7 @@ proc ZB_plot uses eax ebx ecx edx edi, zb:dword, p:dword
mov edi,[ebx+ZBufferPoint.z] mov edi,[ebx+ZBufferPoint.z]
shr edi,ZB_POINT_Z_FRAC_BITS shr edi,ZB_POINT_Z_FRAC_BITS
cmp di,word[ecx] cmp di,word[ecx]
jl .end_f jb .end_f
if TGL_FEATURE_RENDER_BITS eq 24 if TGL_FEATURE_RENDER_BITS eq 24
mov eax,[ebx+ZBufferPoint.r] mov eax,[ebx+ZBufferPoint.r]
mov byte[edx],ah mov byte[edx],ah

View File

@@ -101,7 +101,7 @@ local .end_0
mov [zz],eax mov [zz],eax
mov ebx,[pz] mov ebx,[pz]
cmp ax,word[ebx] cmp ax,word[ebx]
jl .end_0 jb .end_0
RGBPIXEL RGBPIXEL
mov eax,dword[zz] mov eax,dword[zz]
mov ebx,[pz] mov ebx,[pz]

View File

@@ -102,7 +102,7 @@ local .end_0
mov [zz],eax mov [zz],eax
mov ebx,[pz] mov ebx,[pz]
cmp ax,word[ebx] cmp ax,word[ebx]
jl .end_0 jb .end_0
RGBPIXEL RGBPIXEL
mov eax,dword[zz] mov eax,dword[zz]
mov ebx,[pz] mov ebx,[pz]

View File

@@ -58,7 +58,7 @@ end if
mov eax,[z] mov eax,[z]
shr eax,ZB_POINT_Z_FRAC_BITS shr eax,ZB_POINT_Z_FRAC_BITS
cmp ax,word[esi+2*_a] ;if (zz >= pz[_a]) cmp ax,word[esi+2*_a] ;if (zz >= pz[_a])
jl .end_0 jb .end_0
;edi = pp ;edi = pp
mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение
if TGL_FEATURE_RENDER_BITS eq 24 if TGL_FEATURE_RENDER_BITS eq 24
@@ -103,7 +103,7 @@ local .end_0
mov eax,[z] mov eax,[z]
shr eax,ZB_POINT_Z_FRAC_BITS shr eax,ZB_POINT_Z_FRAC_BITS
cmp ax,word[esi+2*_a] ;if (zz >= pz[_a]) cmp ax,word[esi+2*_a] ;if (zz >= pz[_a])
jl .end_0 jb .end_0
;edi = pp ;edi = pp
mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение
if TGL_FEATURE_RENDER_BITS eq 24 if TGL_FEATURE_RENDER_BITS eq 24
@@ -171,7 +171,7 @@ local .end_0
mov eax,[z] mov eax,[z]
shr eax,ZB_POINT_Z_FRAC_BITS shr eax,ZB_POINT_Z_FRAC_BITS
cmp ax,word[esi+2*_a] ;if (zz >= pz[_a]) cmp ax,word[esi+2*_a] ;if (zz >= pz[_a])
jl .end_0 jb .end_0
;edi = pp ;edi = pp
mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение
if TGL_FEATURE_RENDER_BITS eq 24 if TGL_FEATURE_RENDER_BITS eq 24
@@ -251,7 +251,7 @@ local .end_0
mov eax,[z] mov eax,[z]
shr eax,ZB_POINT_Z_FRAC_BITS shr eax,ZB_POINT_Z_FRAC_BITS
cmp ax,word[esi+2*_a] ;if (zz >= pz[_a]) cmp ax,word[esi+2*_a] ;if (zz >= pz[_a])
jl .end_0 jb .end_0
;edi = pp ;edi = pp
mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение mov word[esi+2*_a],ax ;пишем в буфер глубины новое значение
if TGL_FEATURE_RENDER_BITS eq 24 if TGL_FEATURE_RENDER_BITS eq 24

View File

@@ -1,7 +1,6 @@
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TreeList <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> box_lib.obj ; SPDX-License-Identifier: GPL-2.0-only
; <EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A8AC><EFBFBD><EFBFBD><EFBFBD> GPL2 <20><><EFBFBD><E6A5AD><EFBFBD> ; TreeList: used as a ListBox or Tree control (determined by settings)
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> 12.01.2021 IgorA ; Copyright (C) 2009-2025 IgorA <aie85playm@gmail.com>
struct TreeNode struct TreeNode
type dw ? ;+ 0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><> type dw ? ;+ 0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><>
@@ -14,6 +13,52 @@ struct TreeNode
ends ends
;input:
; ecx - 0xXX...... font options
;output:
; eax - font height in pixels
align 4
proc get_font_h uses ebx
mov eax,ecx
shr eax,24
bt eax,4
jc @f
bt eax,5
jc @f
mov ebx,9
jmp .siz0
@@:
mov ebx,16
.siz0:
and eax,7
inc eax
imul eax,ebx
ret
endp
;input:
; ecx - 0xXX...... font options
;output:
; eax - font width in pixels
align 4
proc get_font_w uses ebx
mov eax,ecx
shr eax,24
bt eax,4
jc @f
bt eax,5
jc @f
mov ebx,6
jmp .siz0
@@:
mov ebx,8
.siz0:
and eax,7
inc eax
imul eax,ebx
ret
endp
;<3B><EFBFBD><EBA4A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᯨ᪠ <20> <20><EFBFBD><E1ADAE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>樨 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ;<3B><EFBFBD><EBA4A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᯨ᪠ <20> <20><EFBFBD><E1ADAE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>樨 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
align 16 align 16
proc tl_data_init uses eax ecx edi, tlist:dword proc tl_data_init uses eax ecx edi, tlist:dword
@@ -125,6 +170,7 @@ proc tl_key uses ebx ecx edi, tlist:dword
cmp tl_on_press,0 cmp tl_on_press,0
je @f je @f
call tl_on_press call tl_on_press
jmp .no_edit
@@: @@:
cmp ah,byte[ecx+1] ;Space cmp ah,byte[ecx+1] ;Space
jne @f jne @f
@@ -463,34 +509,24 @@ proc tl_draw, tlist:dword
cmp tl_capt_cy,9 ;9 - minimum caption height cmp tl_capt_cy,9 ;9 - minimum caption height
jl @f jl @f
mov ebx,edi ;calculate cursor position call tl_draw_caption_cur_pos
mov eax,tl_cur_pos
inc eax
lea edi,[txt_capt_cur.v]
stdcall tl_convert_to_str, 5
mov edi,ebx
mov eax,tl_tim_undo mov eax,tl_tim_undo
or eax,eax
jz @f
mov ebx,edi ;save edi
lea edi,[txt_capt_otm.v] lea edi,[txt_capt_otm.v]
stdcall tl_convert_to_str, 5 stdcall tl_convert_to_str, 5
mov edi,ebx ;restore edi mov edi,ebx ;restore edi
mov eax,SF_DRAW_TEXT ;captions
mov ebx,tl_box_left
shl ebx,16
add ebx,5*65536+3
add ebx,tl_box_top
mov ecx,tl_col_txt
or ecx,0x80000000
lea edx,[txt_capt_cur]
int 0x40
mov ebx,tl_box_left mov ebx,tl_box_left
shl ebx,16 shl ebx,16
add ebx,100*65536+3 add ebx,100*65536+3
mov ecx,tl_col_txt
and ecx,0x00ffffff
or ecx,0x80000000
add ebx,tl_box_top add ebx,tl_box_top
lea edx,[txt_capt_otm] lea edx,[txt_capt_otm]
int 0x40 mcall SF_DRAW_TEXT ;undo
@@: @@:
;cycle to nodes ;cycle to nodes
@@ -1163,10 +1199,11 @@ proc tl_draw_node_caption uses ebx ecx edx esi
ror ecx,16 ror ecx,16
mov ebx,ecx mov ebx,ecx
add bx,tl_img_cy ;<3B><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> add bx,tl_img_cy ;<3B><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sub bx,9 ;<3B><EFBFBD><E2ADA8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A5AA><EFBFBD>
mov ecx,tl_col_txt mov ecx,tl_col_txt
and ecx,0xffffff call get_font_h
mcall SF_DRAW_TEXT sub bx,ax ;<3B><EFBFBD><E2ADA8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A5AA><EFBFBD>
and ecx,0x37ffffff
mcall SF_DRAW_TEXT ;node text
@@: @@:
ret ret
endp endp
@@ -1179,13 +1216,15 @@ endp
align 4 align 4
proc tl_get_draw_text_len uses eax ecx edx proc tl_get_draw_text_len uses eax ecx edx
mov esi,eax ;<3B><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> mov esi,eax ;<3B><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
mov ecx,tl_col_txt
call get_font_w
mov ecx,eax
mov eax,tl_box_left mov eax,tl_box_left
add eax,tl_box_width add eax,tl_box_width
cmp eax,ebx cmp eax,ebx
jle .text_null ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><E0A0AD> jle .text_null ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><E0A0AD>
sub eax,ebx sub eax,ebx
xor edx,edx xor edx,edx
mov ecx,6 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
div ecx ;ᬮ<>ਬ ᪮<>쪮 ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> div ecx ;ᬮ<>ਬ ᪮<>쪮 ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>
cmp esi,eax cmp esi,eax
jl @f jl @f
@@ -1858,10 +1897,8 @@ pushad
.po8: .po8:
call tl_node_move_po8 ;㧫<> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>塞 8 <20><><EFBFBD> call tl_node_move_po8 ;㧫<> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>塞 8 <20><><EFBFBD>
.cur_mov: .cur_mov:
push dword edi stdcall tl_cur_perv, edi
call tl_cur_perv stdcall tl_draw, edi
push dword edi
call tl_draw
@@: @@:
popad popad
ret ret
@@ -1981,10 +2018,11 @@ tl_draw_caption_cur_pos:
add ebx,5*65536+3 add ebx,5*65536+3
add ebx,tl_box_top add ebx,tl_box_top
mov ecx,tl_col_txt mov ecx,tl_col_txt
and ecx,0x00ffffff
or ecx,0xc0000000 ;0x40000000 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8A8A2><EFBFBD> 䮭 梥⮬ edi or ecx,0xc0000000 ;0x40000000 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8A8A2><EFBFBD> 䮭 梥⮬ edi
lea edx,[txt_capt_cur] lea edx,[txt_capt_cur]
mov edi,tl_col_zag mov edi,tl_col_zag
mcall SF_DRAW_TEXT ;captions mcall SF_DRAW_TEXT ;row number
popad popad
@@: @@:
ret ret
@@ -2253,6 +2291,6 @@ align 4
jge @f jge @f
or al,0x30 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 ᨬ<><E1A8AC><EFBFBD> '0' or al,0x30 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 ᨬ<><E1A8AC><EFBFBD> '0'
stosb ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> al <20> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [edi] stosb ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> al <20> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [edi]
mov byte[edi],0 mov word[edi],' ' ;add space symbol and 0
@@: @@:
ret ret

View File

@@ -6,7 +6,7 @@ MK_C_SYM(__ieee754_expf)
fstl %st(1) fstl %st(1)
frndint frndint
fstl %st(2) fstl %st(2)
fsubrp fsubp
f2xm1 f2xm1
fld1 fld1
faddp faddp

View File

@@ -41,6 +41,7 @@ dd 1, start, init_end, end_mem, stack_top, params, 0
include 'lang.inc' ; Language support for locales: ru_RU (CP866), es_ES, en_US. include 'lang.inc' ; Language support for locales: ru_RU (CP866), es_ES, en_US.
include '../../macros.inc' include '../../macros.inc'
include '../../proc32.inc' include '../../proc32.inc'
include "../../string.inc"
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../dll.inc' include '../../dll.inc'
;include '../../debug.inc' ;include '../../debug.inc'
@@ -369,6 +370,12 @@ endl
mcall 30,4,,1 mcall 30,4,,1
jmp .n jmp .n
@@:
stdcall string.length, pathOut
add eax, pathOut
cmpne [eax - 1], byte '/', @f
mov [eax - 1], byte 0
dec dword[edtUnpPath.size]
@@: @@:
mcall 30,4,pathOut,1 mcall 30,4,pathOut,1
.n: .n:

View File

@@ -0,0 +1,5 @@
@del *.
@For /R %%i In (*.c) Do c-- "%%i"
@rename *.com *.
@pause
@del warning.txt

View File

@@ -1,9 +0,0 @@
@del lang.h--
@echo #define LANG_ENG 1 >lang.h--
C-- flood-it.c
@del flood-it
@rename flood-it.com flood-it
@kpack flood-it
@del lang.h--
@del warning.txt
@pause

View File

@@ -1,9 +0,0 @@
@del lang.h--
@echo #define LANG_RUS 1 >lang.h--
C-- flood-it.c
@del flood-it
@rename flood-it.com flood-it
@kpack flood-it
@del lang.h--
@del warning.txt
@pause

View File

@@ -1,49 +1,44 @@
//Leency 06.10.2011, Flood-it! v2.41, GPL // SPDX-License-Identifier: GPL-2.0-only
// Flood-it! - Strategy game: Flood the board with one color, within a step limit.
// Copyright (C) 2011-2025 Leency <lipatov.kiril@gmail.com>
#include "lib\kolibri.h" #include "lib\kolibri.h"
#include "lib\random.h" #include "lib\random.h"
#ifndef AUTOBUILD
#include "lang.h--"
#endif
system_colors sc; system_colors sc;
proc_info Form; proc_info Form;
dword stak[100]; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dword help_window_stak[100];
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #define DEFAULT_BLOCK_COUNT 14
int DIFFICULTY_LEV_PARAMS[]={ 28, 14, 25, //<2F><><EFBFBD><EFBFBD><EFBFBD> #define DEFAULT_MAX_CLICKS 25
17, 28, 50}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #define MAX_BLOCK_SIZE 28
char board_size = -1;
//<2F><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD>" int BLOCK_SIZE; //cell size
int BLOCK_SIZE = 28; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> int BLOCKS_NUM; //number of cells by X and Y
int BLOCKS_NUM = 14; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20> <20><> Y int MAX_CLICKS; //max clicks for win
int MAX_CLICKS = 25; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> int CLICKS; //how many clicks user already did
int game_end;
int CLICKS = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> #define USER_PANEL_WIDTH 144
#define USER_PANEL_WIDTH 119 //six colors are used in a game for a cells
//and seventh color is used to mark a cell during filling process
//<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD> <20><><EFBFBD><EFBFBD>, dword FIELD_COLORS[] = {0xf18db6, 0x605ca8, 0xfddc80, 0xdc4a20, 0x46b1e2, 0x7e9d1e, 0x232323};
//<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> char BOARD_SIZES[] = "S\0L";
dword FIELD_COLORS[]= {0xf18db6, 0x605ca8, 0xfddc80, 0xdc4a20, 0x46b1e2, 0x7e9d1e, 0x232323, 0};
char *BOARD_SIZES[]={ "S", "L", 0 };
#ifdef LANG_RUS #ifdef LANG_RUS
char *BUTTON_CAPTIONS[]={ " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [F2]", " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [F1]", " <20><>室 [Esc]", 0}; char *BUTTON_CAPTIONS[]={ " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [F2]", " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [F1]", " <20><>室 [Esc]", 0};
char CLICKS_TEXT[]=" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /"; char CLICKS_TEXT[]="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /";
char LEVELS_TEXT[]="<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:"; char LEVELS_TEXT[]=" <EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
char HELP_WINDOW_CAPTION[]="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; char HELP_WINDOW_CAPTION[]="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
char *HELP_TEXT[]={ "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> Flood-it?", char *HELP_TEXT[]={ "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> Flood-it?",
"", "",
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥⮬ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᫮ 室<><E5AEA4>.", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>, <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⪨. <20><EFBFBD><EBA1A5><EFBFBD><EFBFBD><>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>", "<EFBFBD>⨬ 梥⮬ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> - ⠪ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⨬ 梥⮬ - ⠪ <20><> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⪨ ⮩ <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>᪨. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><>",
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⪨ ⮩ <20><> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᫮ 室<><E5AEA4>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E0A0A7><EFBFBD><EFBFBD> <20><>᪨.",
"<EFBFBD><EFBFBD>᫮ 室<><E5AEA4>. <20><><EFBFBD><E8A0A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E2A5A3> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਭ樯<E0A8AD><E6A8AF> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,",
"<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!",
"", "",
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A0AA> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A0AA> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:",
"[Q] [W] [E]", "[Q] [W] [E]",
@@ -62,28 +57,25 @@ char *BOARD_SIZES[]={ "S", "L", 0 };
"vajutades nuppudele vasakul. Kui sa muudad v<>rvi pragusel alal,", "vajutades nuppudele vasakul. Kui sa muudad v<>rvi pragusel alal,",
"siis iga kokkupuutuv sama v<>rv muutub samaks. Nii saad ujutada", "siis iga kokkupuutuv sama v<>rv muutub samaks. Nii saad ujutada",
"teised alad m<>nguv<75>ljal <20>le. Valida saad 2 m<>nguv<75>lja suuruse", "teised alad m<>nguv<75>ljal <20>le. Valida saad 2 m<>nguv<75>lja suuruse",
"vahel. Proovi v<>li <20>le ujutada etteandtud k<>ikude arvuga!", "vahel.",
"Kaasahaarav ja l<>bus!",
"", "",
"M<EFBFBD>ngida saab ka klaviatuuriga:", "M<EFBFBD>ngida saab ka klaviatuuriga:",
"[Q] [W] [E]", "[Q] [W] [E]",
"[A] [S] [D]", "[A] [S] [D]",
0}; 0};
#else #else
char *BUTTON_CAPTIONS[]={ "New Game [F2]", "Help [F1]", "Exit [Esc]", 0}; char *BUTTON_CAPTIONS[]={ "Restart [F2]", " Help [F1]", " Exit [Esc]", 0};
char CLICKS_TEXT[]="Clicks: /"; char CLICKS_TEXT[]="Clicks: /";
char LEVELS_TEXT[]="Board:"; char LEVELS_TEXT[]="Board:";
char HELP_WINDOW_CAPTION[]="Help"; char HELP_WINDOW_CAPTION[]="Help";
char *HELP_TEXT[]={ "How to play Flood-it?", char *HELP_TEXT[]={ "How to play Flood-it?",
"", "",
"Flood the whole board with one color within the allowed steps.", "You start from the TOP LEFT corner and progress by selecting one",
"You start from the top left corner and progress by selecting one",
"of the colored buttons on the left. When you change your current area", "of the colored buttons on the left. When you change your current area",
"color, every adjacent square with the same color also changes, that", "color, every adjacent square with the same color also changes, that",
"way you can flood other areas of the board. Select from 3 sizes of", "way you can flood other areas of the board. Select from 2 sizes of",
"the board and try to flood-it in the least amount of steps!", "the board and try to flood-it in the least amount of steps!",
"Addictive and Fun!",
"", "",
"You can also play with keyboard:", "You can also play with keyboard:",
"[Q] [W] [E]", "[Q] [W] [E]",
@@ -92,7 +84,7 @@ char *BOARD_SIZES[]={ "S", "L", 0 };
#endif #endif
unsigned char color_matrix[28*28]; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> unsigned char color_matrix[28*28]; //our field
unsigned char loss_matrix[14*14]={ unsigned char loss_matrix[14*14]={
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -132,152 +124,162 @@ void main()
{ {
int key, id; int key, id;
set_board_size(0); //small board by default
new_game(); new_game();
loop() loop() switch(WaitEvent())
{ {
switch(WaitEvent()) case evButton:
{ id = GetButtonID();
case evButton: IF (id==1) || (id==4) ExitProcess();
id = GetButtonID(); IF (id==2) goto _NEW_GAME_MARK;
IF (id==1) || (id==4) ExitProcess(); IF (id==3) goto _HELP_MARK;
IF (id==2) goto _NEW_GAME_MARK; IF (id>=100) {
IF (id==3) goto _HELP_MARK; make_turn(id-100);
IF (id>=100) }
{ if (id==10) set_board_size(0);
make_turn(id-100); if (id==11) set_board_size(1);
break;
case evKey:
key = GetKeyScancode();
IF (key==01) //Escape
ExitProcess();
IF (key==59) //F1
{
_HELP_MARK:
CreateThread(#help_thread,#help_window_stak);
break; break;
} }
if (id>=10) IF (key==60) //F2
{ {
id=id-10*3; _NEW_GAME_MARK:
IF (BLOCK_SIZE == DIFFICULTY_LEV_PARAMS[id]) break; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BLOCK_SIZE = DIFFICULTY_LEV_PARAMS[id]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BLOCKS_NUM = DIFFICULTY_LEV_PARAMS[id+1]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20> <20><> Y
MAX_CLICKS = DIFFICULTY_LEV_PARAMS[id+2]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
new_game(); new_game();
draw_clicks_num();
MoveSize(-1, -1, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH, BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14); draw_field();
} break;
break; }
case evKey: IF (key==16) make_turn(0); //Q
key = GetKeyScancode(); IF (key==17) make_turn(1); //W
IF (key==01) //Escape IF (key==18) make_turn(2); //E
ExitProcess(); IF (key==30) make_turn(3); //A
IF (key==59) //F1 IF (key==31) make_turn(4); //S
{ IF (key==32) make_turn(5); //D
_HELP_MARK: break;
CreateThread(#help,#stak); case evReDraw:
} draw_window();
IF (key==60) //F2 }
{ }
_NEW_GAME_MARK:
new_game(); void set_board_size(char s)
draw_clicks_num(); {
draw_field(); if (board_size != s) {
} board_size = s;
IF (key==16) make_turn(0); //Q
IF (key==17) make_turn(1); //W BLOCKS_NUM = board_size + 1 * DEFAULT_BLOCK_COUNT;
IF (key==18) make_turn(2); //E MAX_CLICKS = board_size + 1 * DEFAULT_MAX_CLICKS;
IF (key==30) make_turn(3); //A
IF (key==31) make_turn(4); //S BLOCK_SIZE = GetScreenHeight() - 70 / BLOCKS_NUM;
IF (key==32) make_turn(5); //D if (BLOCK_SIZE > MAX_BLOCK_SIZE) BLOCK_SIZE = MAX_BLOCK_SIZE;
break;
case evReDraw: new_game();
draw_window();
} MoveSize(-1, -1, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH,
BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14);
} }
} }
void make_turn(int turn_id) void make_turn(int turn_id)
{ {
IF (color_matrix[0]==turn_id) return; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> IF (color_matrix[0]==turn_id) return; //ignore no-sence click: first item color is equal to a new color
IF (CLICKS>=MAX_CLICKS) return; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IF (!game_is_ended()) {
CLICKS++;
CLICKS++; draw_clicks_num();
draw_clicks_num(); fill_field(turn_id);
if (!game_is_ended()) draw_field();
fill_field(turn_id); }
draw_field();
check_for_end(); //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
} }
void draw_window() void draw_window()
{ {
int i, j; int i;
#define BUTTON_SIZE 28 #define BUTTON_SIZE 28
sc.get(); sc.get();
DefineAndDrawWindow(300,176, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH, BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14, 0x74,sc.work,0,0,"Flood-it!"); DefineAndDrawWindow(300,176, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH,
BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14, 0x74,0,"Flood-it!");
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> // Fix rolled-up bug
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
IF (Form.status_window==4) return; IF (Form.status_window==4) return;
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> -> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> // Fill background to reduce window redraw
for (i=0;i<=4;i++) for (i=0;i<=4;i++)
{ {
IF (i<>4) ESI = sc.work;
DrawRegion(USER_PANEL_WIDTH+i-5,i, BLOCK_SIZE*BLOCKS_NUM +9-i-i, BLOCK_SIZE*BLOCKS_NUM+9-i-i, sc.work); IF (i==4) ESI = sc.work_graph;
else DrawRegion(USER_PANEL_WIDTH+i-5,i, BLOCK_SIZE*BLOCKS_NUM +9-i-i, ESI);
DrawRegion(USER_PANEL_WIDTH+i-5,i, BLOCK_SIZE*BLOCKS_NUM +9-i-i, BLOCK_SIZE*BLOCKS_NUM+9-i-i, sc.work_graph); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
} }
DrawBar(0,0, USER_PANEL_WIDTH-5, BLOCK_SIZE*BLOCKS_NUM+10, sc.work); DrawBar(0,0, USER_PANEL_WIDTH-5, BLOCK_SIZE*BLOCKS_NUM+10, sc.work);
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> // Main buttons to fill the board
#define FILL_BUTTON_SIZE BUTTON_SIZE+8
for (i=0;i<6;i++) {
DefineButton(i%3*FILL_BUTTON_SIZE+17,calc(i/3)*FILL_BUTTON_SIZE+15,
FILL_BUTTON_SIZE,FILL_BUTTON_SIZE, i+100,FIELD_COLORS[i]);
}
// Menu buttons
for (i=0;i<3;i++)
{
DefineButton(17,i*31+140, 13*8+6, 25, i+2,sc.work_button);
WriteText(17+4,i*31+146,0x90,sc.work_button_text,BUTTON_CAPTIONS[i],0);
}
// Board size
WriteText(17,BLOCKS_NUM*BLOCK_SIZE-25+7,0x90,sc.work_text,#LEVELS_TEXT,0);
for (i=0;i<2;i++) for (i=0;i<2;i++)
for (j=0;j<3;j++)
DefineButton(j*BUTTON_SIZE+17,i*BUTTON_SIZE+15,BUTTON_SIZE,BUTTON_SIZE, i*3+j+100,FIELD_COLORS[i*3+j]);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (j=0;j<3;j++)
{ {
DefineButton(17,j*25+120, 13*6+6, 20, j+2,sc.work_button); IF (board_size == i) {
WriteText(17+4,j*25+127,0x80,sc.work_button_text,BUTTON_CAPTIONS[j],0); ESI=sc.work_button;
} EDI=sc.work_button_text;
} ELSE {
ESI = sc.work;
EDI = sc.work_text;
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DefineButton(i*32+69,BLOCKS_NUM*BLOCK_SIZE-24, 26,25, i+10,ESI);
WriteText(17,BLOCKS_NUM*BLOCK_SIZE-20+7,0x80,sc.work_text,#LEVELS_TEXT,0); WriteText(i*32+69+9,BLOCKS_NUM*BLOCK_SIZE-24+6,0x90,EDI,#BOARD_SIZES+i+i,0);
for (j=0;j<2;j++) $add ebx, 1<<16 //bold
{ $int 0x40
DefineButton(j*25+56,BLOCKS_NUM*BLOCK_SIZE-20, 20,20, j+10,sc.work_button);
IF (BLOCK_SIZE == DIFFICULTY_LEV_PARAMS[j*3]) EDI=0x800080;
else EDI=sc.work_button_text;
WriteText(j*25+56+8,BLOCKS_NUM*BLOCK_SIZE-20+7,0x80,EDI,BOARD_SIZES[j],0);
WriteText(j*25+56+9,BLOCKS_NUM*BLOCK_SIZE-20+7,0x80,EDI,BOARD_SIZES[j],0);
} }
draw_clicks_num(); draw_clicks_num();
draw_field(); draw_field();
} }
void randomly_fill_the_board()
{
int i;
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++) {
color_matrix[i] = random(6);
}
}
void new_game() void new_game()
{ {
int i;
CLICKS = 0; CLICKS = 0;
game_end = false;
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++) randomly_fill_the_board();
color_matrix[i] = random(6);
} }
void fill_field(int new_color_id) void fill_field(int new_color_id)
{ {
int i, j, int i, j,
old_color_id=color_matrix[0], old_color_id=color_matrix[0],
restart; restart;
int cur_cell;
#define MARKED 6 #define MARKED 6
color_matrix[0]=MARKED; color_matrix[0]=MARKED;
@@ -289,15 +291,16 @@ void fill_field(int new_color_id)
for (i=0;i<BLOCKS_NUM;i++) for (i=0;i<BLOCKS_NUM;i++)
for (j=0;j<BLOCKS_NUM;j++) for (j=0;j<BLOCKS_NUM;j++)
{ {
IF (color_matrix[i*BLOCKS_NUM+j]<>old_color_id) continue; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cur_cell = i*BLOCKS_NUM+j;
IF (color_matrix[i*BLOCKS_NUM+j]==MARKED) continue; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> IF (color_matrix[cur_cell]<>old_color_id) continue; //if not a needed color then continue
IF (color_matrix[cur_cell]==MARKED) continue; //if already marked then continue
IF (j>0) && (color_matrix[i*BLOCKS_NUM+j-1]==MARKED) color_matrix[i*BLOCKS_NUM+j]=MARKED; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> IF (j>0) && (color_matrix[i*BLOCKS_NUM+j-1]==MARKED) color_matrix[cur_cell]=MARKED; //left
IF (i>0) && (color_matrix[i-1*BLOCKS_NUM+j]==MARKED) color_matrix[i*BLOCKS_NUM+j]=MARKED; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IF (i>0) && (color_matrix[i-1*BLOCKS_NUM+j]==MARKED) color_matrix[cur_cell]=MARKED; //top
IF (j<BLOCKS_NUM-1) && (color_matrix[i*BLOCKS_NUM+j+1]==MARKED) color_matrix[i*BLOCKS_NUM+j]=MARKED; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IF (j<BLOCKS_NUM-1) && (color_matrix[i*BLOCKS_NUM+j+1]==MARKED) color_matrix[cur_cell]=MARKED; //right
IF (i<BLOCKS_NUM-1) && (color_matrix[i+1*BLOCKS_NUM+j]==MARKED) color_matrix[i*BLOCKS_NUM+j]=MARKED; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IF (i<BLOCKS_NUM-1) && (color_matrix[i+1*BLOCKS_NUM+j]==MARKED) color_matrix[cur_cell]=MARKED; //bottom
IF (color_matrix[i*BLOCKS_NUM+j]==MARKED) restart=1; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IF (color_matrix[cur_cell]==MARKED) restart=1;
} }
IF (restart) goto _RESTART_MARK; IF (restart) goto _RESTART_MARK;
@@ -305,101 +308,83 @@ void fill_field(int new_color_id)
IF (color_matrix[i]==MARKED) color_matrix[i]=new_color_id; IF (color_matrix[i]==MARKED) color_matrix[i]=new_color_id;
} }
void draw_win_or_loose_animation(dword matrix)
int check_for_end()
{ {
int i, j, ii, jj; int i, j, ii, jj;
for (i=0;i<14;i++) {
if (CLICKS>=MAX_CLICKS) //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
IF (CLICKS==MAX_CLICKS) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
{
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
IF (color_matrix[i]<>color_matrix[0]) goto _loss_MARK;
goto _WIN_MARK;
}
_loss_MARK:
for (i=0;i<14;i++)
for (j=0;j<14;j++)
{
IF (BLOCK_SIZE == DIFFICULTY_LEV_PARAMS[0])
{
ii=i;
jj=j;
}
else
{
ii=i*2;
jj=j*2;
}
color_matrix[ii*BLOCKS_NUM+jj]=loss_matrix[i*14+j];
color_matrix[ii+1*BLOCKS_NUM+jj]=loss_matrix[i*14+j];
color_matrix[ii*BLOCKS_NUM+jj+1]=loss_matrix[i*14+j];
color_matrix[ii+1*BLOCKS_NUM+jj+1]=loss_matrix[i*14+j];
draw_field();
//Pause(5);
}
return 1;
}
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
IF (color_matrix[i]<>color_matrix[0]) return 0;
//<2F><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MAX_CLICKS -> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
_WIN_MARK:
for (i=0;i<25;i++)
{
new_game();
draw_field();
Pause(7);
}
CLICKS=MAX_CLICKS;
for (i=0;i<14;i++)
for (j=0;j<14;j++) for (j=0;j<14;j++)
{ {
IF (BLOCK_SIZE == DIFFICULTY_LEV_PARAMS[0]) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ii = board_size * 2 + i;
{ jj = board_size * 2 + j;
ii=i; color_matrix[ii*BLOCKS_NUM+jj]=
jj=j; color_matrix[ii+1*BLOCKS_NUM+jj]=
} color_matrix[ii*BLOCKS_NUM+jj+1]=
else color_matrix[ii+1*BLOCKS_NUM+jj+1]=ESBYTE[i*14+j+matrix];
{ draw_field();
ii=i*2; }
jj=j*2; }
} }
color_matrix[ii*BLOCKS_NUM+jj]=win_matrix[i*14+j];
color_matrix[ii+1*BLOCKS_NUM+jj]=win_matrix[i*14+j]; int field_is_solid()
color_matrix[ii*BLOCKS_NUM+jj+1]=win_matrix[i*14+j]; {
color_matrix[ii+1*BLOCKS_NUM+jj+1]=win_matrix[i*14+j]; int i;
if (game_end) return 1;
game_end = 1;
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++) {
IF (color_matrix[i]<>color_matrix[0]) game_end = 0;
}
return game_end;
}
int game_is_ended()
{
int i;
if (game_end) return 1;
if (CLICKS>=MAX_CLICKS) //check for game end via max_clicks
{
IF (CLICKS==MAX_CLICKS) //probably user won on the last step
{
if (field_is_solid()) goto _WIN_MARK;
}
draw_win_or_loose_animation(#loss_matrix);
return 1;
} else {
if (!field_is_solid()) return 0;
//field is solid and CLICKS<MAX_CLICKS -> win
_WIN_MARK:
for (i=0;i<25;i++)
{
randomly_fill_the_board();
draw_field(); draw_field();
//Pause(5); Pause(7);
} }
return 1;
draw_win_or_loose_animation(#win_matrix);
return 1;
}
} }
void draw_clicks_num() void draw_clicks_num()
{ {
#define TEXT_X 21 #define TEXT_X 19
#define TEXT_Y 92 #define TEXT_Y 100
DrawBar(TEXT_X, TEXT_Y, USER_PANEL_WIDTH-TEXT_X-3,9, sc.work); DrawBar(TEXT_X, TEXT_Y, USER_PANEL_WIDTH-TEXT_X-5,16, sc.work);
WriteText(TEXT_X,TEXT_Y,0x80,sc.work_text,#CLICKS_TEXT,0); WriteText(TEXT_X,TEXT_Y,0x90,sc.work_text,#CLICKS_TEXT,0);
IF (CLICKS<10) EBX=9*6+TEXT_X; IF (CLICKS<10) EBX=9*8+TEXT_X;
else EBX=8*6+TEXT_X; else EBX=8*8+TEXT_X;
WriteText(EBX,TEXT_Y,0x80,sc.work_text,IntToStr(CLICKS),0); WriteText(EBX,TEXT_Y,0x90,sc.work_text,itoa_nosign(CLICKS),0);
WriteText(11*6+TEXT_X,TEXT_Y,0x80,sc.work_text,IntToStr(MAX_CLICKS),0); WriteText(11*8+TEXT_X,TEXT_Y,0x90,sc.work_text,itoa_nosign(MAX_CLICKS),0);
} }
@@ -417,7 +402,7 @@ void draw_field()
} }
void help() void help_thread()
{ {
int i; int i;
@@ -429,10 +414,10 @@ void help()
IF (GetKeyScancode()==001) ExitProcess(); //Esc IF (GetKeyScancode()==001) ExitProcess(); //Esc
break; break;
case evReDraw: case evReDraw:
for (i=0; HELP_TEXT[i]<>0; i++;) {}; //for (i=0; HELP_TEXT[i]<>0; i++;) {}; //calculate line numbers, predefined i=12 used to reduce size
DefineAndDrawWindow(400,200,610,i*19+25+GetSkinHeight(),0x34,sc.work,0,0,#HELP_WINDOW_CAPTION); DefineAndDrawWindow(400,200,612,12*19+25+GetSkinHeight(),0x34,sc.work,#HELP_WINDOW_CAPTION);
WriteText(6,12,0x90,sc.work_text,HELP_TEXT[0],0); //<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> WriteText(6,12,0x90,sc.work_text,HELP_TEXT[0],0); //for a bold text
for (i=0; HELP_TEXT[i]<>0; i++;) WriteText(5,i*19+12,0x90,sc.work_text,HELP_TEXT[i],0); for (i=0; HELP_TEXT[i]<>0; i++;) WriteText(7,i*19+12,0x90,sc.work_text,HELP_TEXT[i],0);
} }
} }

View File

@@ -23,6 +23,12 @@ dword I_Path = 0;
#define BT_HIDE 0x40000000 #define BT_HIDE 0x40000000
#define BT_NOFRAME 0x20000000 #define BT_NOFRAME 0x20000000
#define bool char
#define true 1
#define false 0
inline fastcall dword calc(EAX) { return EAX; }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -94,16 +100,11 @@ inline fastcall Pause(dword EBX)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
char buffer[11]=""; char buffer[5];
inline fastcall dword IntToStr(dword ESI) inline fastcall dword itoa_nosign(dword ESI)
{ {
$mov edi, #buffer $mov edi, #buffer
$mov ecx, 10 $mov ecx, 10
$test esi, esi
$jns f1
$mov al, '-'
$stosb
$neg esi
f1: f1:
$mov eax, esi $mov eax, esi
$push -'0' $push -'0'
@@ -126,7 +127,7 @@ f3:
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI) void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,EDI)
{ {
EAX = 12; // function 12:tell os about windowdraw EAX = 12; // function 12:tell os about windowdraw
EBX = 1; EBX = 1;
@@ -135,7 +136,7 @@ void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaC
EBX = x << 16 + sizeX; EBX = x << 16 + sizeX;
ECX = y << 16 + sizeY; ECX = y << 16 + sizeY;
EDX = mainAreaType << 24 | mainAreaColour; EDX = mainAreaType << 24 | mainAreaColour;
ESI = headerType << 24 | headerColour; ESI = 0;
$xor eax,eax $xor eax,eax
$int 0x40 $int 0x40
@@ -166,6 +167,13 @@ dword GetSkinHeight()
$pop ebx $pop ebx
} }
inline fastcall int GetScreenHeight()
{
$mov eax, 14
$int 0x40
$and eax,0x0000FFFF
}
void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) void WriteText(dword x,y,byte fontType, dword color, EDX, ESI)
{ {
EAX = 4; EAX = 4;
@@ -190,12 +198,20 @@ void DefineButton(dword x,y,w,h,EDX,ESI)
$int 0x40 $int 0x40
} }
void DrawRegion(dword x,y,width,height,EDX) void DrawRegion(dword x,y,s,EDX)
{ {
DrawBar(x,y,width,1,EDX); EAX = 13;
DrawBar(x,y+height,width,1,EDX); EBX = x<<16+s;
DrawBar(x,y,1,height,EDX); ECX = y<<16+1;
DrawBar(x+width,y,1,height+1,EDX); $int 0x40
ECX = y+s<<16+1;
$int 0x40
EBX = x<<16+1;
ECX = y<<16+s;
$int 0x40
EBX = x+s<<16+1;
ECX = y<<16+s+1;
$int 0x40
} }
inline fastcall dword WriteDebug(dword EDX) inline fastcall dword WriteDebug(dword EDX)

View File

@@ -343,7 +343,7 @@ void kos_Main()
void drawGameWindow() void drawGameWindow()
{ {
kos_DefineAndDrawWindow(windowX, windowY, WINDOW_WIDTH, WINDOW_HEIGHT, 0x34, 0x00FFFF, 0, 0, (Dword)HEADER_STRING); kos_DefineAndDrawWindow(windowX, windowY, WINDOW_WIDTH, WINDOW_HEIGHT, 0x33, 0x00FFFF, 0, 0, (Dword)HEADER_STRING);
bird.draw(); bird.draw();
for (int i = 0; i < tubeNumber; ++i) for (int i = 0; i < tubeNumber; ++i)
tubes[i].draw(); tubes[i].draw();
@@ -370,7 +370,7 @@ void redrawGameWindow()
void drawGameoverWindow() void drawGameoverWindow()
{ {
kos_DefineAndDrawWindow(windowX, windowY, WINDOW_WIDTH, WINDOW_HEIGHT, 0x34, 0x000000, 0, 0, (Dword)HEADER_STRING); kos_DefineAndDrawWindow(windowX, windowY, WINDOW_WIDTH, WINDOW_HEIGHT, 0x33, 0x000000, 0, 0, (Dword)HEADER_STRING);
kos_WriteTextToWindow(125, 50, 0x82, 0xFFFFFF, GAMEOVER_STRING, 0); kos_WriteTextToWindow(125, 50, 0x82, 0xFFFFFF, GAMEOVER_STRING, 0);
kos_WriteTextToWindow(135, 100, 0x81, 0xFFFFFF, scoreString, 0); kos_WriteTextToWindow(135, 100, 0x81, 0xFFFFFF, scoreString, 0);
kos_WriteTextToWindow(50, 150, 0x81, 0xFFFFFF, ANY_KEY_STRING, 0); kos_WriteTextToWindow(50, 150, 0x81, 0xFFFFFF, ANY_KEY_STRING, 0);
@@ -387,7 +387,7 @@ void WriteBorderedText(Word x, Word y, Byte fontType, Dword textColor, const cha
void drawMenuWindow() void drawMenuWindow()
{ {
kos_DefineAndDrawWindow(windowX, windowY, WINDOW_WIDTH, WINDOW_HEIGHT, 0x34, 0x00FFFF, 0, 0, (Dword)HEADER_STRING); kos_DefineAndDrawWindow(windowX, windowY, WINDOW_WIDTH, WINDOW_HEIGHT, 0x33, 0x00FFFF, 0, 0, (Dword)HEADER_STRING);
WriteBorderedText(85, 40, 0x4, 0xFFFFFF, HEADER_STRING, 6, 0x000000, 2); WriteBorderedText(85, 40, 0x4, 0xFFFFFF, HEADER_STRING, 6, 0x000000, 2);
WriteBorderedText(185, 80, 0x84, 0xFFFFFF, HEADER_STRING + 7, 0, 0x000000, 2); WriteBorderedText(185, 80, 0x84, 0xFFFFFF, HEADER_STRING + 7, 0, 0x000000, 2);

View File

@@ -16,9 +16,9 @@ include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load @use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
if lang eq ru_RU if lang eq ru_RU
caption db '<27><><EFBFBD><EFBFBD><E1ACAE> <20><><EFBFBD><EFBFBD><E1A5AB> 11.11.20',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> caption db '<27><><EFBFBD><EFBFBD><E1ACAE> <20><><EFBFBD><EFBFBD><E1A5AB> 14.04.25',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else ; Default to en_US else ; Default to en_US
caption db 'Voxel viewer 11.11.20',0 caption db 'Voxel viewer 14.04.25',0
end if end if
3d_wnd_l equ 5 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> tinygl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1ABA5> 3d_wnd_l equ 5 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> tinygl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1ABA5>
@@ -750,12 +750,8 @@ draw_3d:
je @f je @f
call SetLight call SetLight
@@: @@:
stdcall [glTranslatef], 0.0,0.0,0.5 ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> z <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><EFBFBD><E0A5A4><EFBFBD><EFBFBD> <20><> 0.0 <20><> 1.0, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><E1A5AA><EFBFBD><EFBFBD><EFBFBD>
;<3B><><EFBFBD><EFBFBD><E1A5AB><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><> -0.5 <20><> 0.5, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> +0.5
;<3B><> <20><><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1A5AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBABA5><EFBFBD> <20><> <20><EFBFBD><E0A5A4><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD>
;<3B> <20><><EFBFBD>ᨨ opengl <20><><EFBFBD> Win <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> -1.0 <20><> 1.0 <20><><EFBFBD><20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD>
stdcall [glScalef], [scale], [scale], [scale] ;㢥<><E3A2A5><EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><E1A5AB><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD>-<2D><> <20><> <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> stdcall [glScalef], [scale], [scale], [scale] ;㢥<><E3A2A5><EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><E1A5AB><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD>-<2D><> <20><> <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [glScalef], 1.0, 1.0, 0.25 ;<3B><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EAA5AA> <20><> <20><EFBFBD><EBABA0><EFBFBD><EFBFBD> <20><> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> stdcall [glScalef], 1.0, 1.0, 0.5 ;<3B><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EAA5AA> <20><> <20><EFBFBD><EBABA0><EFBFBD><EFBFBD> <20><> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD>
stdcall [glRotatef], [angle_x],1.0,0.0,0.0 stdcall [glRotatef], [angle_x],1.0,0.0,0.0
stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0
stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_z],0.0,0.0,1.0

View File

@@ -105,7 +105,6 @@ console: ;//////////////////////////////////////////////////////////////////////
mov eax, [esp+36] mov eax, [esp+36]
call write_to_file call write_to_file
@@:
popad popad
ret 4 ret 4

View File

@@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2013-2021. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2013-2025. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; ftpc.asm - FTP client for KolibriOS ;; ;; ftpc.asm - FTP client for KolibriOS ;;
@@ -36,8 +36,8 @@ use32
dd 1 ; header version dd 1 ; header version
dd start ; entry point dd start ; entry point
dd i_end ; initialized size dd i_end ; initialized size
dd mem+0x1000 ; required memory dd mem ; required memory
dd mem+0x1000 ; stack pointer dd stacktop ; stack pointer
dd buf_cmd ; parameters dd buf_cmd ; parameters
dd path ; path dd path ; path
@@ -83,12 +83,12 @@ start: ;////////////////////////////////////////////////////////////////////////
;< none ;; ;< none ;;
;;================================================================================================;; ;;================================================================================================;;
; initialize heap for using dynamic blocks ; initialize heap for using dynamic blocks
mcall 68, 11 mcall SF_SYS_MISC, SSF_HEAP_INIT
test eax, eax test eax, eax
je exit2 je exit2
; disable all events except network event ; disable all events except network event
mcall 40, EV_STACK mcall SF_SET_EVENTS_MASK, EV_STACK
; load libraries ; load libraries
stdcall dll.Load, @IMPORT stdcall dll.Load, @IMPORT
test eax, eax test eax, eax
@@ -125,16 +125,16 @@ start: ;////////////////////////////////////////////////////////////////////////
mov [acti_port_stop], ax mov [acti_port_stop], ax
invoke ini.get_str, path, str_general, str_dir, buf_buffer1, BUFFERSIZE, 0 invoke ini.get_str, path, str_general, str_dir, buf_buffer1, BUFFERSIZE, 0
mcall 30, 1, buf_buffer1 ; set working directory mcall SF_CURRENT_FOLDER, SSF_SET_CF, buf_buffer1 ; set working directory
; initialize log file ; initialize log file
invoke ini.get_str, path, str_general, str_logfile, log_file, 512, 0 invoke ini.get_str, path, str_general, str_logfile, log_file, 512, 0
mov [filestruct2.subfn], 2 mov [filestruct2.subfn], SSF_CREATE_FILE
mov [filestruct2.offset], 0 mov [filestruct2.offset], 0
mov [filestruct2.size], 0 mov [filestruct2.size], 0
mov [filestruct2.ptr], 0 mov [filestruct2.ptr], 0
mov [filestruct2.name], log_file mov [filestruct2.name], log_file
mcall 70, filestruct2 mcall SF_FILE, filestruct2
; Usage: ftpc [-cli] [ftp://username:password@server:port/path] ; Usage: ftpc [-cli] [ftp://username:password@server:port/path]
@@ -355,7 +355,7 @@ wait_for_servercommand: ;///////////////////////////////////////////////////////
; receive socket data with timeout ; receive socket data with timeout
.receive: .receive:
mcall 26, 9 mcall SF_SYSTEM_GET, SSF_TIME_COUNT
add eax, TIMEOUT*100 add eax, TIMEOUT*100
mov [timeout], eax mov [timeout], eax
.again: .again:
@@ -365,11 +365,11 @@ wait_for_servercommand: ;///////////////////////////////////////////////////////
je .closed je .closed
cmp ebx, EWOULDBLOCK cmp ebx, EWOULDBLOCK
jne .sock_err jne .sock_err
mcall 26, 9 mcall SF_SYSTEM_GET, SSF_TIME_COUNT
mov ebx, [timeout] mov ebx, [timeout]
sub ebx, eax sub ebx, eax
jle .timeout jle .timeout
mcall 23 ; Wait for event with timeout mcall SF_WAIT_EVENT_TIMEOUT ; Wait for event with timeout
jmp .again jmp .again
.sock_err: .sock_err:
@@ -524,7 +524,7 @@ transfer_queued:
; Error occured, we reached the end of the buffer before [queued] reached 0 ; Error occured, we reached the end of the buffer before [queued] reached 0
mov [queued], 0 mov [queued], 0
mcall 68, 13, [ptr_fname] ; free buffer mcall SF_SYS_MISC, SSF_MEM_FREE, [ptr_fname] ; free buffer
test eax, eax test eax, eax
jz error_heap jz error_heap
jmp wait_for_usercommand jmp wait_for_usercommand
@@ -535,7 +535,7 @@ transfer_queued:
dec [queued] dec [queued]
jnz cmd_retr jnz cmd_retr
mcall 68, 13, [ptr_fname] ; free buffer mcall SF_SYS_MISC, SSF_MEM_FREE, [ptr_fname] ; free buffer
test eax, eax test eax, eax
jz error_heap jz error_heap
jmp cmd_retr jmp cmd_retr
@@ -655,12 +655,12 @@ write_to_file: ;////////////////////////////////////////////////////////////////
mov eax, 0 mov eax, 0
ret ret
@@: @@:
mov [filestruct2.subfn], 3 mov [filestruct2.subfn], SSF_WRITE_FILE
m2m [filestruct2.offset], [logfile_offset] m2m [filestruct2.offset], [logfile_offset]
mov [filestruct2.size], ecx mov [filestruct2.size], ecx
mov [filestruct2.ptr], eax mov [filestruct2.ptr], eax
mov [filestruct2.name], log_file mov [filestruct2.name], log_file
mcall 70, filestruct2 mcall SF_FILE, filestruct2
test eax, eax test eax, eax
jz @f jz @f
mov [logfile_offset], -1 ; disable logging mov [logfile_offset], -1 ; disable logging
@@ -754,13 +754,13 @@ wait_for_keypress:
exit: exit:
mcall close, [controlsocket] mcall close, [controlsocket]
exit2: exit2:
mcall -1 mcall SF_TERMINATE_PROCESS
; data ; data
str_title db 'FTP client for KolibriOS',0 str_title db 'FTP client for KolibriOS',0
str_welcome db 'FTP client for KolibriOS v0.16',10 str_welcome db 'FTP client for KolibriOS v0.18',10
db 10,0 db 10,0
str_srv_addr db 'Please enter ftp server address.',10,0 str_srv_addr db 'Please enter ftp server address.',10,0
@@ -971,6 +971,7 @@ param_path rb 1024
param_port rb 6 param_port rb 6
sc system_colors sc system_colors
rb 1024 align 16
rb 4096
stacktop:
mem: mem:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

View File

@@ -7,6 +7,9 @@ include '../../load_lib.mac'
icon_tl_sys dd 0 icon_tl_sys dd 0
icon_tl_nod dd 0 icon_tl_nod dd 0
icon_buttons dd 0
lbl_after_enter dd 0
show_log db 0 ; 0 - hide log, 1 - show log
TLIST_SZ = 325+16 ;=341. 16 is x-size of scroll bar TLIST_SZ = 325+16 ;=341. 16 is x-size of scroll bar
TLIST1_X = 50 TLIST1_X = 50
@@ -15,6 +18,9 @@ BT_SZ_X = 40
SYS_COL = 0xe6e6e6 SYS_COL = 0xe6e6e6
BT_COL = 0xcccccc BT_COL = 0xcccccc
STR_COL = 0x595959 ;0x000000 STR_COL = 0x595959 ;0x000000
ICON_TOP_B = 2 ; top border
ICON_LEFT_B = 2 ; left border
ICON_SIZE = (18+ICON_LEFT_B)*(18+ICON_TOP_B)*3
; TODO: automatic resizing of GUI elements on window resizing ; TODO: automatic resizing of GUI elements on window resizing
@@ -45,8 +51,8 @@ gui: ;//////////////////////////////////////////////////////////////////////////
test eax, eax test eax, eax
jnz .exit jnz .exit
mcall 48, 3, sc, sizeof.system_colors mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
mcall 40, 0xC0000027 ; set event mask mcall SF_SET_EVENTS_MASK, 0xC0000027 ; set event mask
ret ret
.server_addr: .server_addr:
@@ -73,37 +79,42 @@ gui: ;//////////////////////////////////////////////////////////////////////////
; initialize tree list elements ; initialize tree list elements
stdcall [tl_data_init], tree1 stdcall [tl_data_init], tree1
stdcall [tl_data_init], tree2 stdcall [tl_data_init], tree2
or dword[tree1.style], 8 ;tl_cursor_pos_limited - restrict cursor move to existing nodes
or dword[tree2.style], 8 ;tl_cursor_pos_limited
; read icons
load_image_file 'ftpc_sys.png', icon_tl_sys
mov [filestruct.ptr], eax or dword[tree1.style], 8 ;tl_cursor_pos_limited - restrict cursor move to existing nodes
mov [filestruct.subfn], 0 or dword[tree2.style], 8 ;tl_cursor_pos_limited
mov [filestruct.offset], 54
mov [filestruct.size], ecx ; read icons
mcall 70, filestruct mcall SF_SYS_MISC, SSF_MEM_OPEN, str_icon_18,, 0
cmp ebx, 0 or eax, eax
jl @f jz @f
mov esi, eax
mov ecx, ICON_SIZE*11
mcall SF_SYS_MISC, SSF_MEM_ALLOC
mov ecx, eax
mov [icon_tl_sys], eax
stdcall copy_icon, eax,esi,31 ;active cursor
add eax, ICON_SIZE*3 ;skip not used icons
stdcall img_to_gray, ecx, eax, ICON_SIZE/3 ;not active cursor
m2m dword[tree1.data_img_sys], dword[icon_tl_sys] m2m dword[tree1.data_img_sys], dword[icon_tl_sys]
m2m dword[tree2.data_img_sys], dword[icon_tl_sys] m2m dword[tree2.data_img_sys], dword[icon_tl_sys]
@@:
; read nodes icon file ; read nodes icon file
load_image_file 'ftpc_nod.png', icon_tl_nod mov ecx, ICON_SIZE*2
mcall SF_SYS_MISC, SSF_MEM_ALLOC
mov [icon_tl_nod], eax
stdcall copy_icon, eax,esi,2
stdcall copy_icon, eax,esi,0
mov [filestruct.ptr], eax
;mov [filestruct.subfn], 0
;mov [filestruct.offset], 54
mov [filestruct.size], ecx
mcall 70, filestruct
cmp ebx, 0
jl @f
m2m dword[tree1.data_img], dword[icon_tl_nod] m2m dword[tree1.data_img], dword[icon_tl_nod]
m2m dword[tree2.data_img], dword[icon_tl_nod] m2m dword[tree2.data_img], dword[icon_tl_nod]
; initialize icon buttons
mov ecx, 18*18*4*2
mcall SF_SYS_MISC, SSF_MEM_ALLOC
mov [icon_buttons], eax
stdcall copy_icon_w, eax,esi, 4 ;disconnect
stdcall copy_icon_w, eax,esi,49 ;search
@@: @@:
call .draw call .draw
; create initial tree list for root_dir ; create initial tree list for root_dir
@@ -117,11 +128,11 @@ gui: ;//////////////////////////////////////////////////////////////////////////
jmp cmd_list jmp cmd_list
.redraw: .redraw:
call .draw call .draw
align 4 align 4
.still: .still:
mcall 10 mcall SF_WAIT_EVENT
dec eax dec eax
jz .redraw jz .redraw
@@ -146,65 +157,86 @@ gui: ;//////////////////////////////////////////////////////////////////////////
align 4 align 4
.draw: .draw:
mcall 12, 1 mcall SF_REDRAW, SSF_BEGIN_DRAW
; main window ; main window
mcall 0, <35,830>, <20,555>, 0x34000000+SYS_COL, 0x805080DD, str_title mcall SF_CREATE_WINDOW, <35,830>, <20,555-160>, 0x34000000+SYS_COL, 0x805080DD, str_title
;------------------------- ;-------------------------
; textedit components ; textedit components
;------------------------- ;-------------------------
mcall 9, procinfo, -1 mcall SF_THREAD_INFO, procinfo, -1
mov edi, tedit0 mov edi, tedit0
call EvSize call EvSize
movzx ebx,word[procinfo.client_box.width] movzx ebx,word[procinfo.client_box.width]
inc bx inc bx
mcall 13, , ted_wnd_t mcall SF_DRAW_RECT, , ted_wnd_t
stdcall [ted_draw], tedit0
; draw "disconnect" button ; draw "disconnect" button
mcall 8, <50,95>, <25,25>, 3, BT_COL mcall SF_DEFINE_BUTTON, <50,114>, <25,25>, 3, BT_COL
; icon
mcall SF_PUT_IMAGE_EXT, [icon_buttons], <18, 18>, <54, 29>, 32,, 0
; string "disconnect" ; string "disconnect"
mcall 4, <50+5,25+5>, 0xb0000000+STR_COL, str_disconnect mcall SF_DRAW_TEXT, <50+18+10,25+5>, 0xb0000000+STR_COL, str_disconnect
; draw "Show|Hide log" button
mcall SF_DEFINE_BUTTON, <50,79>, <326,25>, 10, BT_COL
; string "Show|Hide log"
cmp [show_log],0
je @f
stdcall [ted_draw], tedit0
mov edx, str_hide_log
jmp .end_log_1
@@:
mov edx, str_show_log
.end_log_1:
mcall SF_DRAW_TEXT, <50+5,326+5>, 0xb0000000+STR_COL
cmp [show_log],0
je @f
; draw "Copy" button ; draw "Copy" button
mcall 8, <50,40>, <326,25>, 4, BT_COL mcall SF_DEFINE_BUTTON, <129+5,40>, <326,25>, 4, BT_COL
; string "copy" ; string "copy"
mcall 4, <50+5,326+5>, 0xb0000000+STR_COL, str_copy mcall SF_DRAW_TEXT, <129+10,326+5>, 0xb0000000+STR_COL, str_copy
@@:
; draw "Search" button ; draw "Search" button
mcall 8, <TLIST2_X+TLIST_SZ-55,55>, <20,25>, 5, BT_COL mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-25,25>, <20,25>, 5, BT_COL
; icon
mov ebx, [icon_buttons]
add ebx, 18*18*4
mcall SF_PUT_IMAGE_EXT,, <18, 18>, <730, 24>, 32,, 0
; string "Search" ; string "Search"
mcall 4, <TLIST2_X+TLIST_SZ-55+5,20+5>, 0xb0000000+STR_COL, str_search ;mcall SF_DRAW_TEXT, <TLIST2_X+TLIST_SZ-55+5,20+5>, 0xb0000000+STR_COL, str_search
; draw "LIST" button ; draw "LIST" button
mcall 8, <TLIST2_X+TLIST_SZ-4*BT_SZ_X-15,BT_SZ_X>, <50,25>, 12, BT_COL mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-4*BT_SZ_X-15,BT_SZ_X>, <50,25>, 12, BT_COL
; string "LIST" ; string "LIST"
mcall 4, <TLIST2_X+TLIST_SZ-4*BT_SZ_X-15+5,50+5>, 0xb0000000+STR_COL, str_list mcall SF_DRAW_TEXT, <TLIST2_X+TLIST_SZ-4*BT_SZ_X-15+5,50+5>, 0xb0000000+STR_COL, str_list
; draw "DELE" button ; draw "DELE" button
mcall 8, <TLIST2_X+TLIST_SZ-3*BT_SZ_X-10,BT_SZ_X>, <50,25>, 7, BT_COL mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-3*BT_SZ_X-10,BT_SZ_X>, <50,25>, 7, BT_COL
; string "DELE" ; string "DELE"
mcall 4, <TLIST2_X+TLIST_SZ-3*BT_SZ_X-10+5,50+5>, 0xb0000000+STR_COL, str_dele mcall SF_DRAW_TEXT, <TLIST2_X+TLIST_SZ-3*BT_SZ_X-10+5,50+5>, 0xb0000000+STR_COL, str_dele
; draw "RDIR" button ; draw "RDIR" button
mcall 8, <TLIST2_X+TLIST_SZ-2*BT_SZ_X-5,BT_SZ_X>, <50,25>, 8, BT_COL mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-2*BT_SZ_X-5,BT_SZ_X>, <50,25>, 8, BT_COL
; string "RDIR" ; string "RDIR"
mcall 4, <TLIST2_X+TLIST_SZ-2*BT_SZ_X-5+5,50+5>, 0xb0000000+STR_COL, str_rdir mcall SF_DRAW_TEXT, <TLIST2_X+TLIST_SZ-2*BT_SZ_X-5+5,50+5>, 0xb0000000+STR_COL, str_rdir
; draw "RMD" button ; draw "RMD" button
mcall 8, <TLIST2_X+TLIST_SZ-BT_SZ_X,BT_SZ_X>, <50,25>, 9, BT_COL mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-BT_SZ_X,BT_SZ_X>, <50,25>, 9, BT_COL
; string "RMD" ; string "RMD"
mcall 4, <TLIST2_X+TLIST_SZ-BT_SZ_X+5,50+5>, 0xb0000000+STR_COL, str_rmd mcall SF_DRAW_TEXT, <TLIST2_X+TLIST_SZ-BT_SZ_X+5,50+5>, 0xb0000000+STR_COL, str_rmd
; draw "mkd" button ; draw "mkd" button
mcall 8, <TLIST2_X+TLIST_SZ-BT_SZ_X,BT_SZ_X>, <80,20>, 6, BT_COL mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-BT_SZ_X,BT_SZ_X>, <80,20>, 6, BT_COL
; string "mkd" ; string "mkd"
mcall 4, <TLIST2_X+TLIST_SZ-BT_SZ_X+5,80+5>, 0xb0000000+STR_COL, str_mkd mcall SF_DRAW_TEXT, <TLIST2_X+TLIST_SZ-BT_SZ_X+5,80+5>, 0xb0000000+STR_COL, str_mkd
; draw "cancel" button ; draw "cancel" button
;mcall 8, <555,55>, <308,25>, 10, BT_COL ;mcall SF_DEFINE_BUTTON, <555,55>, <308,25>, 10, BT_COL
; string "Cancel" ; string "Cancel"
;mcall 4, <555+5,308+5>, 0xb0000000+STR_COL, str_abort ;mcall SF_DRAW_TEXT, <555+5,308+5>, 0xb0000000+STR_COL, str_abort
; draw "change volume" button ; draw "change volume" button
mcall 8, <TLIST1_X+TLIST_SZ-55,55>, <100-20,22>, 11, BT_COL mcall SF_DEFINE_BUTTON, <TLIST1_X+TLIST_SZ-55,55>, <100-20,22>, 11, BT_COL
; string "Change" ; string "Change"
mcall 4, <TLIST1_X+TLIST_SZ-55+5,100-20+5>, 0xb0000000+STR_COL, str_change mcall SF_DRAW_TEXT, <TLIST1_X+TLIST_SZ-55+5,100-20+5>, 0xb0000000+STR_COL, str_change
;-------------------------- ;--------------------------
; tree list components ; tree list components
@@ -222,12 +254,12 @@ gui: ;//////////////////////////////////////////////////////////////////////////
stdcall [edit_box_draw], edit_volume stdcall [edit_box_draw], edit_volume
stdcall [edit_box_draw], edit_search stdcall [edit_box_draw], edit_search
mcall 12,2 mcall SF_REDRAW, SSF_END_DRAW
ret ret
align 16 align 16
.mouse: .mouse:
mcall 37, 1 mcall SF_MOUSE_GET, SSF_WINDOW_POSITION
cmp word[tedit0.wnd.top], ax cmp word[tedit0.wnd.top], ax
jg .no_edit jg .no_edit
@@ -235,7 +267,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
cmp word[tedit0.wnd.left], ax cmp word[tedit0.wnd.left], ax
jg .no_edit jg .no_edit
mcall 37, 3 mcall SF_MOUSE_GET, SSF_BUTTON_EXT
bt eax, 24 bt eax, 24
jnc @f jnc @f
@@ -243,12 +275,19 @@ gui: ;//////////////////////////////////////////////////////////////////////////
jmp .still jmp .still
@@: @@:
cmp [show_log],0
je .still
stdcall [ted_mouse], tedit0 stdcall [ted_mouse], tedit0
jmp .still jmp .still
.no_edit: .no_edit:
mov [lbl_after_enter], 0
stdcall [tl_mouse], tree1 stdcall [tl_mouse], tree1
stdcall [tl_mouse], tree2 stdcall [tl_mouse], tree2
cmp [lbl_after_enter], 0
jz @f
jmp [lbl_after_enter]
@@:
stdcall [edit_box_mouse], edit_mkd stdcall [edit_box_mouse], edit_mkd
stdcall [edit_box_mouse], edit_volume stdcall [edit_box_mouse], edit_volume
stdcall [edit_box_mouse], edit_search stdcall [edit_box_mouse], edit_search
@@ -256,9 +295,14 @@ gui: ;//////////////////////////////////////////////////////////////////////////
align 16 align 16
.key: .key:
mcall 2 mcall SF_GET_KEY
mov [lbl_after_enter], 0
stdcall [tl_key], tree1 stdcall [tl_key], tree1
stdcall [tl_key], tree2 stdcall [tl_key], tree2
cmp [lbl_after_enter], 0
jz @f
jmp [lbl_after_enter]
@@:
stdcall [edit_box_key], edit_mkd stdcall [edit_box_key], edit_mkd
stdcall [edit_box_key], edit_volume stdcall [edit_box_key], edit_volume
stdcall [edit_box_key], edit_search stdcall [edit_box_key], edit_search
@@ -266,13 +310,19 @@ gui: ;//////////////////////////////////////////////////////////////////////////
align 16 align 16
.button: .button:
mcall 17 mcall SF_GET_BUTTON
cmp ah, 3 cmp ah, 3
jne @f jne @f
ijmp eax, interface_addr, interface.server_addr ijmp eax, interface_addr, interface.server_addr
jmp .still jmp .still
@@:
cmp ah, 10
jne @f
call show_hide_log
jmp .still
@@: @@:
cmp ah, 4 cmp ah, 4
jne @f jne @f
@@ -310,7 +360,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
@@: @@:
cmp ah, 1 cmp ah, 1
je .exit je .exit
jmp .still jmp .still
.print: .print:
@@ -327,13 +377,15 @@ gui: ;//////////////////////////////////////////////////////////////////////////
cmp byte[esi], 0 cmp byte[esi], 0
jne @b jne @b
stdcall [ted_text_add], tedit0, tedit_buffer, ecx, ebx stdcall [ted_text_add], tedit0, tedit_buffer, ecx, ebx
cmp [show_log],0
je .end_log_2
stdcall [ted_draw], tedit0 stdcall [ted_draw], tedit0
.end_log_2:
; write to log file ; write to log file
mov eax, [esp+36] mov eax, [esp+36]
sub ecx, 2 ; 0a0d is not included sub ecx, 2 ; 0a0d is not included
call write_to_file call write_to_file
@@:
popad popad
ret 4 ret 4
@@ -353,13 +405,16 @@ gui: ;//////////////////////////////////////////////////////////////////////////
;< none ;; ;< none ;;
;;================================================================================================;; ;;================================================================================================;;
push edx cmp eax, 1
push eax jl data_loop
push edx eax
; check if any incomplete entry to be parsed ; check if any incomplete entry to be parsed
cmp byte[remote_list_buf], 0 cmp byte[remote_list_buf], 0
je .no_backlog je .no_backlog
; find end of remote_list_buf ; find end of remote_list_buf
mov edi, remote_list_buf mov edi, remote_list_buf
mov ecx, 1024 ;buffer size
mov al, 0 mov al, 0
repne scasb repne scasb
; copy rest of the incomplete entry to remote_list_buf ; copy rest of the incomplete entry to remote_list_buf
@@ -424,6 +479,8 @@ gui: ;//////////////////////////////////////////////////////////////////////////
mov byte[edi], 0 mov byte[edi], 0
; add node to tree list ; add node to tree list
and dword[tree2.style], not 8
stdcall [tl_cur_next], tree2
cmp word[node_entry2], 'fi' cmp word[node_entry2], 'fi'
jne @f jne @f
stdcall [tl_node_add], tree2, 0, node_entry2 stdcall [tl_node_add], tree2, 0, node_entry2
@@ -453,9 +510,9 @@ gui: ;//////////////////////////////////////////////////////////////////////////
.store_last_entry: .store_last_entry:
; find index of the last incomplete entry ; find index of the last incomplete entry
mov ecx, -1
mov eax, [esp] mov eax, [esp]
lea edi, [buf_buffer2+eax-2] lea edi, [buf_buffer2+eax-2]
mov ecx, eax
mov al, 0x0a mov al, 0x0a
std std
repne scasb repne scasb
@@ -470,9 +527,10 @@ gui: ;//////////////////////////////////////////////////////////////////////////
jne @b jne @b
.done_parsing: .done_parsing:
stdcall [tl_cur_beg], tree2
or dword[tree2.style], 8
call .draw ; to update tree list immediately in case of "auto_list" call .draw ; to update tree list immediately in case of "auto_list"
pop eax pop eax edx
pop edx
jmp data_loop jmp data_loop
; clear tree list and add ".." node before executing "LIST" ; clear tree list and add ".." node before executing "LIST"
@@ -494,7 +552,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
;;================================================================================================;; ;;================================================================================================;;
; detect abort ; detect abort
mcall 17 mcall SF_GET_BUTTON
cmp ah, 10 cmp ah, 10
je cmd_abor je cmd_abor
@@ -578,7 +636,8 @@ fun_on_enter:
cmp byte[esi], 0 cmp byte[esi], 0
jne @b jne @b
mov word[edi], 0x000a mov word[edi], 0x000a
jmp cmd_stor mov [lbl_after_enter], cmd_stor
ret
; Function to call when you press [Enter] ; Function to call when you press [Enter]
@@ -591,7 +650,8 @@ fun_on_enter2:
cmp dword[esi], 0x2E2E cmp dword[esi], 0x2E2E
jne @f jne @f
mov [auto_list], 1 mov [auto_list], 1
jmp cmd_cdup mov [lbl_after_enter], cmd_cdup
ret
@@: @@:
cmp word[eax], 'fo' cmp word[eax], 'fo'
@@ -610,12 +670,14 @@ fun_on_enter2:
; newline in console code ; newline in console code
cmp word[eax], 'fo' cmp word[eax], 'fo'
je @f je @f
jmp cmd_retr mov [lbl_after_enter], cmd_retr
ret
@@: @@:
stdcall [tl_info_clear], tree2 stdcall [tl_info_clear], tree2
mov [auto_list], 1 mov [auto_list], 1
jmp cmd_cwd mov [lbl_after_enter], cmd_cwd
ret
;;================================================================================================;; ;;================================================================================================;;
@@ -641,7 +703,7 @@ populate_local_tree_list: ;/////////////////////////////////////////////////////
jne @f jne @f
; removes last file name from filestruct.name ; removes last file name from filestruct.name
mcall 30, 2, filestruct.name,1024 ; get absolute path for cwd mcall SF_CURRENT_FOLDER, SSF_GET_CF, filestruct.name,1024 ; get absolute path for cwd
lea edi, [filestruct.name+eax] ; edi = pointer to the tail of file name lea edi, [filestruct.name+eax] ; edi = pointer to the tail of file name
mov al, '/' mov al, '/'
mov ecx, -1 mov ecx, -1
@@ -652,15 +714,15 @@ populate_local_tree_list: ;/////////////////////////////////////////////////////
mov ecx, filestruct.name mov ecx, filestruct.name
@@: @@:
mcall 30, 1, ; set cwd mcall SF_CURRENT_FOLDER, SSF_SET_CF ; set cwd
mcall 30, 2, filestruct.name, 1024 ; get absolute path for cwd mcall SF_CURRENT_FOLDER, SSF_GET_CF, filestruct.name, 1024 ; get absolute path for cwd
; clear all nodes in tree list ; clear all nodes in tree list
stdcall [tl_info_clear], tree1 stdcall [tl_info_clear], tree1
mov [filestruct.offset], 0 mov [filestruct.offset], 0
; read 32 blocks ; read 32 blocks
.outer: .outer:
mcall 70, filestruct mcall SF_FILE, filestruct
;int3 ;int3
test eax, eax test eax, eax
jz @f jz @f
@@ -746,6 +808,16 @@ EvSize:
ret ret
;
show_hide_log:
mov esi, 555
xor [show_log],1
jnz @f
sub esi, 160
@@:
mcall SF_CHANGE_WINDOW, -1, -1, -1
ret
;;================================================================================================;; ;;================================================================================================;;
filter_remote_list: ;/////////////////////////////////////////////////////////////////////////////;; filter_remote_list: ;/////////////////////////////////////////////////////////////////////////////;;
;;------------------------------------------------------------------------------------------------;; ;;------------------------------------------------------------------------------------------------;;
@@ -861,30 +933,133 @@ search: ;///////////////////////////////////////////////////////////////////////
pop edi esi edx ecx ebx pop edi esi edx ecx ebx
ret ret
align 4
proc copy_icon uses ebx ecx esi edi, buf_d:dword, buf_s:dword, ind:dword
;;------------------------------------------------------------------------------------------------;;
;> buf_d = pointer to destination buffer 24-bit
;> buf_s = pointer to source buffer 32-bit (with icons)
;> ind = icon index
;;------------------------------------------------------------------------------------------------;;
;< eax = pointer to destination buffer + icon size
;;------------------------------------------------------------------------------------------------;;
mov edi, [buf_d]
mov ecx, (18+ICON_LEFT_B)*ICON_TOP_B*3
mov al, 0xff
rep stosb ; make top border
; copy icon
mov esi, [ind]
imul esi, 18*18*4
add esi, [buf_s]
mov ebx, 18
.cycle0:
mov ecx, ICON_LEFT_B*3
rep stosb ; make left border
mov ecx, 18
@@:
movsw
movsb
inc esi ; skip transparent byte
loop @b
dec ebx
jnz .cycle0
mov eax, edi
ret
endp
align 4
proc img_to_gray, buf_rgb:dword, buf_g24:dword, pixels:dword
;;------------------------------------------------------------------------------------------------;;
; function for generating gray icons
;;------------------------------------------------------------------------------------------------;;
;> buf_rgb - buffer with input 24-bit color image
;> buf_g24 - buffer with output 24-bit gray image
;> pixels - number of pixels in the image
;;------------------------------------------------------------------------------------------------;;
pushad
mov esi, [buf_rgb]
mov edi, [buf_g24]
mov ecx, [pixels]
mov ebx, 3
@@:
movzx eax, byte[esi]
movzx edx, byte[esi+1]
add eax, edx
movzx edx, byte[esi+2]
add eax, edx
xor edx, edx
div ebx
mov ah, al
mov word[edi], ax
mov byte[edi+2], al
add esi, 3
add edi, 3
loop @b
popad
ret
endp
align 4
proc copy_icon_w uses ecx esi edi, buf_d:dword, buf_s:dword, ind:dword
;;------------------------------------------------------------------------------------------------;;
;> buf_d = pointer to destination buffer 32-bit
;> buf_s = pointer to source buffer 32-bit (with icons)
;> ind = icon index
;;------------------------------------------------------------------------------------------------;;
;< eax = pointer to destination buffer + icon size
;;------------------------------------------------------------------------------------------------;;
mov edi, [buf_d]
mov ecx, 18*18
mov esi, [ind]
imul esi, ecx
shl esi, 2
add esi, [buf_s]
rep movsd
mov eax, edi
mov ecx, 18*18
mov edi, [buf_d]
mov esi, [edi] ;copy transparent color
.cycle0:
cmp [edi], esi
jne @f
mov dword[edi], BT_COL
@@:
add edi, 4
loop .cycle0
ret
endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;hed db 'FTP Client for KolibriOS',0 ;hed db 'FTP Client for KolibriOS',0
str_change db 'Change',0 str_change db 'Change',0
str_disconnect db 'Disconnect',0 str_disconnect db 'Disconnect',0
str_show_log db 'Show log',0
str_hide_log db 'Hide log',0
str_copy db 'Copy',0 str_copy db 'Copy',0
str_mkd db 'MKD',0 str_mkd db 'MKD',0
str_dele db 'DELE',0 str_dele db 'DELE',0
str_rdir db 'RDIR',0 str_rdir db 'RDIR',0
str_rmd db 'RMD',0 str_rmd db 'RMD',0
str_abort db 'Cancel',0 str_abort db 'Cancel',0
str_search db 'Search',0 ;str_search db 'Search',0
str_list db 'LIST',0 str_list db 'LIST',0
str_null db 0 str_null db 0
str_icon_18 db 'ICONS18',0
;---------------------- ;----------------------
; tree list elements ; tree list elements
;---------------------- ;----------------------
tree1 tree_list 64, 500, tl_list_box_mode, 16, 16, \ tree1 tree_list 64, 500, tl_list_box_mode, 18+ICON_LEFT_B, 18+ICON_TOP_B, \
0xffffff, BT_COL, 0x000000, TLIST1_X, 105, TLIST_SZ-16, 185, 14, 4,\ 0xffffff, BT_COL, 0x10000000, TLIST1_X, 105, TLIST_SZ-16, 185, 15, 4,\
0, el_focus, wScr, fun_on_enter 0, el_focus, wScr, fun_on_enter
tree2 tree_list 64, 500, tl_list_box_mode, 16, 16, \ tree2 tree_list 64, 500, tl_list_box_mode, 18+ICON_LEFT_B, 18+ICON_TOP_B, \
0xffffff, BT_COL, 0x000000, TLIST2_X, 105, TLIST_SZ-16, 185, 14, 4, \ 0xffffff, BT_COL, 0x10000000, TLIST2_X, 105, TLIST_SZ-16, 185, 15, 4, \
0, el_focus, wScr2, fun_on_enter2 0, el_focus, wScr2, fun_on_enter2
; editbox for mkd ; editbox for mkd
@@ -896,7 +1071,7 @@ edit_volume edit_box TLIST_SZ-60, TLIST1_X, 80, 0xffffff, 0x94AECE, 0, \
0xAABBCC, 0x10000000, 99, root_dir, mouse_dd, 0 0xAABBCC, 0x10000000, 99, root_dir, mouse_dd, 0
; editbox for search ; editbox for search
edit_search edit_box TLIST_SZ-60, TLIST2_X, 22, 0xffffff, 0x94AECE, 0, \ edit_search edit_box TLIST_SZ-30, TLIST2_X, 22, 0xffffff, 0x94AECE, 0, \
0xAABBCC, 0x10000000, 99, filter,mouse_dd, 0 0xAABBCC, 0x10000000, 99, filter,mouse_dd, 0
; A subsidiary structure for scrolling ; A subsidiary structure for scrolling

View File

@@ -27,7 +27,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
.get_username: .get_username:
; in case of error when either login_gui.server_addr or ; in case of error when either login_gui.server_addr or
; login_gui.get_username is called, should resize window ; login_gui.get_username is called, should resize window
mcall 67, WIN_X, WIN_Y, WIN_W, WIN_H ; resize to login gui window size mcall SF_CHANGE_WINDOW, WIN_X, WIN_Y, WIN_W, WIN_H ; resize to login gui window size
.redraw: .redraw:
call .draw call .draw
@@ -44,22 +44,22 @@ login_gui: ;////////////////////////////////////////////////////////////////////
align 4 align 4
.draw: .draw:
mcall 12, 1 mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall 48, 3, sc, 40 mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, 40
edit_boxes_set_sys_color edit_usr,editboxes_end,sc edit_boxes_set_sys_color edit_usr,editboxes_end,sc
mov edx, 0x34000000 mov edx, 0x34000000
or edx, [sc.work] or edx, [sc.work]
mcall 0, <WIN_X,WIN_W>, <WIN_Y,WIN_H>, , 0x805080DD, str_title mcall SF_CREATE_WINDOW, <WIN_X,WIN_W>, <WIN_Y,WIN_H>, , 0x805080DD, str_title
call .draw_editboxes call .draw_editboxes
; draw "connect" button ; draw "connect" button
mcall 8, <162,65>, <150,25>, 2, [sc.work_button] mcall SF_DEFINE_BUTTON, <162,65>, <150,25>, 2, [sc.work_button]
; draw strings ; draw strings
mov ecx, 0x90000000 mov ecx, 0x90000000
or ecx, [sc.work_text] or ecx, [sc.work_text]
mcall 4, <3, 8>, , gui_str_usr mcall SF_DRAW_TEXT, <3, 8>, , gui_str_usr
mcall , <3,PAD*1+8>, , gui_str_pass mcall , <3,PAD*1+8>, , gui_str_pass
mcall , <3,PAD*2+8>, , gui_str_server mcall , <3,PAD*2+8>, , gui_str_server
mcall , <3,PAD*3+8>, , gui_str_port mcall , <3,PAD*3+8>, , gui_str_port
@@ -74,12 +74,12 @@ login_gui: ;////////////////////////////////////////////////////////////////////
mcall mcall
mov [str_error_addr], gui_str_null ; reset error string address mov [str_error_addr], gui_str_null ; reset error string address
mcall 12, 2 mcall SF_REDRAW, SSF_END_DRAW
ret ret
align 4 align 4
.still: .still:
mcall 10 ; wait for event mcall SF_WAIT_EVENT
dec eax dec eax
jz .redraw jz .redraw
dec eax dec eax
@@ -96,7 +96,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
jmp .still jmp .still
.button: .button:
mcall 17 mcall SF_GET_BUTTON
dec ah dec ah
jz .exit jz .exit
@@ -107,7 +107,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
jmp .still jmp .still
.key: .key:
mcall 2 mcall SF_GET_KEY
cmp ah,13 cmp ah,13
je .connect je .connect
@@ -122,12 +122,17 @@ login_gui: ;////////////////////////////////////////////////////////////////////
stdcall [edit_box_key], edit_path stdcall [edit_box_key], edit_path
jmp .still jmp .still
.connect: .connect:
mcall 67, 35, 20, 830, 555 ; resize to main gui window's coordinates mov esi, 555
or [show_log],0
jnz @f
sub esi, 160
@@:
mcall SF_CHANGE_WINDOW, 35, 20, 830 ; resize to main gui window's coordinates
cmp [param_server_addr], 0 cmp [param_server_addr], 0
jne gui.main jne gui.main
mov [str_error_addr], gui_str_no_srvr mov [str_error_addr], gui_str_no_srvr
jmp .redraw jmp .redraw

View File

@@ -190,10 +190,11 @@ data_loop:
mov [filestruct.ptr], buf_buffer2 mov [filestruct.ptr], buf_buffer2
mov [filestruct.size], eax mov [filestruct.size], eax
push eax push eax
mcall 70, filestruct mcall SF_FILE, filestruct
test eax, eax test eax, eax
jz @f jz @f
call error_fs call error_fs
add esp, 4 ; fix stack
jmp close_datacon jmp close_datacon
@@: @@:
pop eax pop eax
@@ -204,7 +205,7 @@ data_loop:
; storing, send all data ; storing, send all data
.stor: .stor:
mcall 70, filestruct mcall SF_FILE, filestruct
cmp eax, 6 ; end of file cmp eax, 6 ; end of file
je .last_call je .last_call
test eax, eax ; error test eax, eax ; error
@@ -244,7 +245,7 @@ data_loop:
mov ecx, eax ; eax is size of buffer received mov ecx, eax ; eax is size of buffer received
inc ecx inc ecx
add ecx, [size_fname] ; added old size to form new required size add ecx, [size_fname] ; added old size to form new required size
mcall 68, 20, , [ptr_fname] ; realloc mcall SF_SYS_MISC, SSF_MEM_REALLOC, , [ptr_fname]
test eax, eax test eax, eax
je error_heap je error_heap
mov [ptr_fname], eax ; eax contains the new block now mov [ptr_fname], eax ; eax contains the new block now

View File

@@ -82,13 +82,13 @@ cmd_retr:
mov ecx, 256-5 mov ecx, 256-5
call set_filename call set_filename
mov [filestruct.subfn], 2 ; create/rewrite file mov [filestruct.subfn], SSF_CREATE_FILE ; create/rewrite file
mov [filestruct.offset], 0 mov [filestruct.offset], 0
mov [filestruct.offset+4], 0 mov [filestruct.offset+4], 0
mov [filestruct.size], 0 mov [filestruct.size], 0
mov [filestruct.ptr], 0 mov [filestruct.ptr], 0
mcall 70, filestruct mcall SF_FILE, filestruct
test eax, eax test eax, eax
jz @f jz @f
call error_fs call error_fs
@@ -96,7 +96,7 @@ cmd_retr:
@@: @@:
; Prepare to write to the file ; Prepare to write to the file
mov [filestruct.subfn], 3 ; write to file mov [filestruct.subfn], SSF_WRITE_FILE
mov [operation], OPERATION_RETR mov [operation], OPERATION_RETR
; Request the file from server ; Request the file from server
@@ -138,7 +138,7 @@ cmd_stor:
mov [operation], OPERATION_STOR mov [operation], OPERATION_STOR
; get file size ; get file size
mov [filestruct.subfn], 5 mov [filestruct.subfn], SSF_GET_INFO
mov [filestruct.offset], 0 mov [filestruct.offset], 0
mov [filestruct.offset+4], 0 mov [filestruct.offset+4], 0
mov [filestruct.size], 0 mov [filestruct.size], 0
@@ -148,12 +148,12 @@ cmd_stor:
mov ecx, 256-5 mov ecx, 256-5
call set_filename call set_filename
mcall 70, filestruct mcall SF_FILE, filestruct
mov eax, dword[folder_buf+32] ; supports file size upto 4GB mov eax, dword[folder_buf+32] ; supports file size upto 4GB
mov [file_size], eax mov [file_size], eax
mov [filestruct.subfn], 0 ; read file mov [filestruct.subfn], SSF_READ_FILE
; mov [filestruct.offset], 0 ; mov [filestruct.offset], 0
; mov [filestruct.offset+4], 0 ; mov [filestruct.offset+4], 0
mov [filestruct.size], BUFFERSIZE mov [filestruct.size], BUFFERSIZE
@@ -191,12 +191,12 @@ cmd_lcwd:
mov byte[esi-1], 0 mov byte[esi-1], 0
; check whether entered path is valid (folder exists) ; check whether entered path is valid (folder exists)
mov [filestruct2.subfn], 5 mov [filestruct2.subfn], SSF_GET_INFO
mov [filestruct2.offset], 0 mov [filestruct2.offset], 0
mov [filestruct2.size], 0 mov [filestruct2.size], 0
mov [filestruct2.ptr], folder_buf mov [filestruct2.ptr], folder_buf
mov [filestruct2.name], buf_cmd+5 mov [filestruct2.name], buf_cmd+5
mcall 70, filestruct2 mcall SF_FILE, filestruct2
test eax, eax test eax, eax
jz @f jz @f
cmp eax, 2 cmp eax, 2
@@ -205,10 +205,10 @@ cmd_lcwd:
jmp wait_for_usercommand jmp wait_for_usercommand
@@: @@:
mcall 30, 1, buf_cmd+5 ; set working directory mcall SF_CURRENT_FOLDER, SSF_SET_CF, buf_cmd+5 ; set working directory
.print: .print:
mcall 30, 2, buf_cmd, 256 ; and read it again mcall SF_CURRENT_FOLDER, SSF_GET_CF, buf_cmd, 256 ; and read it again
icall eax, interface_addr, interface.print, str_lcwd, buf_cmd, str_newline icall eax, interface_addr, interface.print, str_lcwd, buf_cmd, str_newline
jmp wait_for_usercommand jmp wait_for_usercommand

View File

@@ -1,2 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("calcplus.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "calcplus") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
tup.rule("calcplus.asm", FASM .. " -dlang=" .. tup.getconfig("LANG") .. " %f %o" .. tup.getconfig("KPACK_CMD"), "%B")

View File

@@ -1,2 +0,0 @@
@fasm calcplus.asm calc+
@pause

File diff suppressed because it is too large Load Diff