Compare commits
4 Commits
qrcodegen
...
70b05aaa86
Author | SHA1 | Date | |
---|---|---|---|
70b05aaa86 | |||
a617d45245 | |||
929a75f751 | |||
9d0cfa8dfb |
@@ -49,8 +49,6 @@ img_files = {
|
||||
{"MEDIA/IMGF/INVSOL.OBJ", "common/media/ImgF/invSol.obj"},
|
||||
{"MEDIA/PIXIESKN.PNG", SRC_PROGS .. "/cmm/pixie2/pixieskn.png"},
|
||||
{"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/KNMAP", "common/network/knmap"},
|
||||
{"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/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"},
|
||||
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
|
||||
{"kolibrios/3D/blocks/blocks.kex", "../programs/bcc32/games/blocks/bin/blocks.kex"},
|
||||
{"kolibrios/3D/blocks/", "../programs/bcc32/games/blocks/bin/*"},
|
||||
{"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"},
|
||||
{"kolibrios/3D/md2view/", "common/3d/md2view/*"},
|
||||
{"kolibrios/3D/md2view/md2_model/", "common/3d/md2view/md2_model/*"},
|
||||
@@ -631,10 +629,10 @@ tup.append_table(extra_files, {
|
||||
{"kolibrios/utils/calcplus", VAR_PROGS .. "/other/calcplus/calcplus"},
|
||||
{"kolibrios/utils/kfm/kfm", VAR_PROGS .. "/fs/kfm/trunk/kfm"},
|
||||
{"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.
|
||||
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"},
|
||||
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
|
||||
}) else tup.append_table(img_files, {
|
||||
@@ -642,7 +640,6 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||
}) end
|
||||
|
||||
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"},
|
||||
}) end
|
||||
|
||||
|
@@ -119,7 +119,7 @@
|
||||
45 <20><><EFBFBD><EFBFBD>⮩ <20><>ਭ<EFBFBD><E0A8AD><EFBFBD><EFBFBD><EFBFBD> |easyshot
|
||||
29 FB2 <20><>⠫<EFBFBD><E2A0AB> |fb2read
|
||||
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> |/kolibrios/utils/period
|
||||
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |period
|
||||
59 <20>७<EFBFBD><E0A5AD><EFBFBD><EFBFBD> KJ|ABuIIIA |games/klavisha
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |demos/bcdclk
|
||||
53 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |timer
|
||||
|
@@ -1,2 +0,0 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
tup.rule("block.asm", "fasm -m 65636 %f %o " .. tup.getconfig("KPACK_CMD"), "block.bin")
|
BIN
programs/bcc32/games/blocks/bin/block.bin
Normal file
BIN
programs/bcc32/games/blocks/bin/block.bin
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,229 +0,0 @@
|
||||
// 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],
|
||||
];
|
@@ -1,531 +0,0 @@
|
||||
// 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],
|
||||
];
|
@@ -270,15 +270,11 @@ void TWebBrowser::tag_h1234_caption()
|
||||
void TWebBrowser::tag_kosicon()
|
||||
{
|
||||
dword imgbuf[44];
|
||||
dword maxicon;
|
||||
dword shared_i18 = memopen("ICONS18", NULL, SHM_READ);
|
||||
maxicon = EDX / 18 / 18 / 4;
|
||||
if (shared_i18) && (tag.get_number_of("n")) {
|
||||
if (tag.number < maxicon) {
|
||||
if (draw_x + 18 > canvas.bufw) NewLine();
|
||||
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
|
||||
draw_x += 22;
|
||||
}
|
||||
if (draw_x + 18 > canvas.bufw) NewLine();
|
||||
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
|
||||
draw_x += 22;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -571,10 +571,10 @@ void OpenPage(dword _open_URL)
|
||||
//INTERNAL PAGE
|
||||
history.add(#new_url);
|
||||
WB1.custom_encoding = -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));
|
||||
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)-1);
|
||||
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test)-1);
|
||||
else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory();
|
||||
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
|
||||
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
|
||||
//WEB PAGE
|
||||
@@ -589,7 +589,7 @@ void OpenPage(dword _open_URL)
|
||||
|
||||
if (!http.transfer) {
|
||||
history.add(#new_url);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
}
|
||||
} else {
|
||||
//LOCAL PAGE
|
||||
@@ -712,7 +712,7 @@ void EventSubmitOmnibox()
|
||||
|
||||
void LoadInternalPage(dword _bufdata, _in_bufsize){
|
||||
if (!_bufdata) || (!_in_bufsize) {
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
} else {
|
||||
WB1.list.first = 0; //scroll page to the top
|
||||
DrawOmnibox();
|
||||
|
@@ -112,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.9";
|
||||
char version[]="WebView 3.85";
|
@@ -1,49 +1,17 @@
|
||||
<html><head><title>New tab</title></head>
|
||||
<body bgcolor=#fff>
|
||||
<html>
|
||||
<head>
|
||||
<title>Homepage</title>
|
||||
</head>
|
||||
<body><pre>Welcome to WebView a Text-Based Browser.
|
||||
|
||||
<table><tr><td width=20><td width=210><pre>
|
||||
___________________
|
||||
|# : : #|
|
||||
| : WebView : |
|
||||
| : TextBased : |
|
||||
| : Browser : |
|
||||
| : : |
|
||||
| :_____________: |
|
||||
| ___________ |
|
||||
| | __ | |
|
||||
| || | | |
|
||||
\____||__|_______|__|<font color=#DDD>lc</font>
|
||||
KolibriOS Bookmarks:
|
||||
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>
|
||||
|
||||
<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>
|
||||
<kosicon n=50><a href="//builds.kolibrios.org">Night-builds</a>
|
||||
<kosicon n=50><a href="//ftp.kolibrios.org">FTP Server</a>
|
||||
<pre>
|
||||
|
||||
By the way,
|
||||
<font bg=#F8F15B>By the way,</font>
|
||||
<font color="#555555">• You can check for browser updates from the main menu.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• Pressing F6 moves a text cursor to the omnibox.
|
||||
• You can manually change the encoding of a page by clicking on a label in the bottom right corner.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~+
|
||||
|
||||
* +
|
||||
' |
|
||||
() .-.,="``"=. - o -
|
||||
'=/_ \ |
|
||||
* | '=._ |
|
||||
\ `=./`, '
|
||||
. '=.__.=' `=' *
|
||||
+ +
|
||||
O * ' .<font color=#DDD>jgs</font>
|
||||
• Click on a label in the bottom right corner to change the encoding of a page.
|
||||
</font>
|
||||
|
@@ -1,49 +1,15 @@
|
||||
<html><head><title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head>
|
||||
<body bgcolor=#fff>
|
||||
<html><head><meta charset="cp-866">
|
||||
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></title></head>
|
||||
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD>㧥<EFBFBD> WebView!
|
||||
|
||||
<table><tr><td width=20><td width=210><pre>
|
||||
___________________
|
||||
|# : : #|
|
||||
| : WebView : |
|
||||
| : <20><><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> : |
|
||||
| : <20><><EFBFBD>㧥<EFBFBD> : |
|
||||
| : : |
|
||||
| :_____________: |
|
||||
| ___________ |
|
||||
| | __ | |
|
||||
| || | | |
|
||||
\____||__|_______|__|<font color=#DDD>lc</font>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS:<ol>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<kosicon n=50><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
<kosicon n=50><a href="//ftp.kolibrios.org">FTP <20><>ࢥ<EFBFBD></a>
|
||||
<pre>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
<font bg=#F8F15B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,</font>
|
||||
<font color="#555555">• <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>
|
||||
• <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
|
||||
• <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>.
|
||||
• <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>
|
@@ -1,8 +1,9 @@
|
||||
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2025
|
||||
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2022
|
||||
//GNU GPL license.
|
||||
|
||||
/*
|
||||
BUGS:
|
||||
- F1 in KFM (move Properties to an external app)
|
||||
- Ctrl+1+2+3+4 in KFM
|
||||
- Highlight another commands on Ctrl|Shift in KFM like in Classic KFM
|
||||
TODO:
|
||||
@@ -10,9 +11,9 @@ TODO:
|
||||
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
|
||||
*/
|
||||
|
||||
#define ABOUT_TITLE "Eolite 5.32"
|
||||
#define TITLE_EOLITE "Eolite File Manager 5.32"
|
||||
#define TITLE_KFM "Kolibri File Manager 2.32";
|
||||
#define ABOUT_TITLE "EOLITE 5.30"
|
||||
#define TITLE_EOLITE "Eolite File Manager 5.30"
|
||||
#define TITLE_KFM "Kolibri File Manager 2.30";
|
||||
|
||||
#define MEMSIZE 1024 * 250
|
||||
#include "../lib/clipboard.h"
|
||||
@@ -443,9 +444,6 @@ void main()
|
||||
}
|
||||
EventDriveClick(key_scancode);
|
||||
break;
|
||||
case SCAN_CODE_KEY_P:
|
||||
EventCopyItemPath();
|
||||
break;
|
||||
case SCAN_CODE_KEY_X:
|
||||
CopyFilesListToClipboard(CUT);
|
||||
break;
|
||||
@@ -718,7 +716,7 @@ void DrawFilePanels()
|
||||
DrawButtonsAroundList();
|
||||
path = location[active_panel^1];
|
||||
active_panel ^= 1;
|
||||
OpenDir_without_unselect(WITH_REDRAW);
|
||||
OpenDir2(WITH_REDRAW);
|
||||
active_panel ^= 1;
|
||||
if (!getSelectedCount()) files_inactive.count = files.count;
|
||||
llist_copy(#files, #files_active);
|
||||
@@ -731,22 +729,38 @@ void DrawFilePanels()
|
||||
|
||||
DrawButtonsAroundList();
|
||||
path = location[active_panel];
|
||||
OpenDir_without_unselect(WITH_REDRAW);
|
||||
OpenDir2(WITH_REDRAW);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenDir(char redraw) {
|
||||
unselectAll();
|
||||
OpenDir_without_unselect(redraw);
|
||||
void OpenDir2(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_without_unselect(char redraw) {
|
||||
void OpenDir(char redraw){
|
||||
int errornum;
|
||||
|
||||
unselectAll();
|
||||
if (buf) free(buf);
|
||||
if (errornum = GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
|
||||
history.add(path);
|
||||
//EventHistoryGoBack();
|
||||
Dir_Up();
|
||||
Write_Error(errornum);
|
||||
return;
|
||||
@@ -1041,6 +1055,7 @@ void EventHistoryGoForward()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ShowOpenWithDialog()
|
||||
{
|
||||
byte open_param[4097];
|
||||
@@ -1134,7 +1149,6 @@ void ShowPopinForm(byte _popin_type)
|
||||
break;
|
||||
case POPIN_DELETE:
|
||||
if (!files.count) return;
|
||||
popin_string[0] = -1;
|
||||
if (!getSelectedCount()) && (!strncmp(#file_name,"..",2)) return;
|
||||
popinx = DrawEolitePopup(T_YES, T_NO);
|
||||
WriteTextCenter(popinx, 178, POPIN_W, sc.work_text, T_DELETE_FILE);
|
||||
@@ -1332,12 +1346,6 @@ void EventOpenSearch()
|
||||
RunProgram(#program_path, #param);
|
||||
}
|
||||
|
||||
|
||||
void EventCopyItemPath()
|
||||
{
|
||||
Clipboard__CopyText(#file_path);
|
||||
}
|
||||
|
||||
void ProceedMouseGestures()
|
||||
{
|
||||
char stats;
|
||||
|
@@ -4,11 +4,9 @@ char file_actions[]=
|
||||
"<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> |Ctrl+P
|
||||
-
|
||||
<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> |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> |Del
|
||||
@@ -17,10 +15,8 @@ char empty_folder_actions[]=
|
||||
"<EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD> |Ctrl+V";
|
||||
char burger_menu_items[] =
|
||||
"<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>|Ctrl+F
|
||||
-
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+R
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ன<EFBFBD><EFBFBD>|F10
|
||||
<EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>";
|
||||
|
||||
@@ -29,8 +25,6 @@ char file_actions[]=
|
||||
"Ava |Enter
|
||||
Ava ... |Ctrl+Ent
|
||||
-
|
||||
Copy path |Ctrl+P
|
||||
-
|
||||
Kopeeri |Ctrl+C
|
||||
L<EFBFBD>ika |Ctrl+X
|
||||
Aseta |Ctrl+V
|
||||
@@ -42,10 +36,8 @@ char empty_folder_actions[]=
|
||||
"Aseta |Ctrl+V";
|
||||
char burger_menu_items[] =
|
||||
"New window|Ctrl+N
|
||||
-
|
||||
Open console here|Ctrl+G
|
||||
Search|Ctrl+F
|
||||
-
|
||||
V<EFBFBD>rskenda|Ctrl+R
|
||||
Settings|F10
|
||||
About";
|
||||
|
||||
@@ -54,8 +46,6 @@ char file_actions[]=
|
||||
"Open |Enter
|
||||
Open with... |Ctrl+Ent
|
||||
-
|
||||
Copy path |Ctrl+P
|
||||
-
|
||||
Copy |Ctrl+C
|
||||
Cut |Ctrl+X
|
||||
Paste |Ctrl+V
|
||||
@@ -67,10 +57,8 @@ char empty_folder_actions[]=
|
||||
"Paste |Ctrl+V";
|
||||
char burger_menu_items[] =
|
||||
"New window|Ctrl+N
|
||||
-
|
||||
Open console here|Ctrl+G
|
||||
Search|Ctrl+F
|
||||
-
|
||||
Refresh folder|Ctrl+R
|
||||
Settings|F10
|
||||
About";
|
||||
#endif
|
||||
@@ -88,18 +76,17 @@ void EventMenuClick(dword _id)
|
||||
if (active_menu == MENU_FILE) switch(_id) {
|
||||
case 1: EventOpen(0); break;
|
||||
case 2: ShowOpenWithDialog(); break;
|
||||
case 3: EventCopyItemPath(); break;
|
||||
case 4: CopyFilesListToClipboard(COPY); break;
|
||||
case 5: CopyFilesListToClipboard(CUT); break;
|
||||
case 6: EventPaste(path); break;
|
||||
case 7: FnProcess(2); break;
|
||||
case 8: ShowPopinForm(POPIN_DELETE); break;
|
||||
case 9: FnProcess(1); break;
|
||||
case 3: CopyFilesListToClipboard(COPY); break;
|
||||
case 4: CopyFilesListToClipboard(CUT); break;
|
||||
case 5: EventPaste(path); break;
|
||||
case 6: FnProcess(2); break;
|
||||
case 7: ShowPopinForm(POPIN_DELETE); break;
|
||||
case 8: FnProcess(1); break;
|
||||
}
|
||||
if (active_menu == MENU_BURGER) switch(_id) {
|
||||
case 1: EventOpenNewEolite(); break;
|
||||
case 2: EventOpenConsoleHere(); break;
|
||||
case 3: EventOpenSearch(); break;
|
||||
case 3: EventRefreshDisksAndFolders(); break;
|
||||
case 4: FnProcess(10); break;
|
||||
case 5: EventShowAbout(); break;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ void settings_dialog()
|
||||
case evKey:
|
||||
GetKeys();
|
||||
if (key_scancode==SCAN_CODE_ESC) ExitSettings();
|
||||
edit_box_key_c stdcall (#path_start_ed,key_editbox);
|
||||
edit_box_key_c stdcall (#path_start_ed,key_ascii << 8);
|
||||
break;
|
||||
|
||||
case evReDraw:
|
||||
|
@@ -50,6 +50,10 @@ opendialog open_folder_dialog =
|
||||
NULL
|
||||
};
|
||||
|
||||
#define TOOLBAR_H 100
|
||||
#define LISTX 0
|
||||
#define LISTY TOOLBAR_H
|
||||
|
||||
//===================================================//
|
||||
// //
|
||||
// RESULTS //
|
||||
@@ -91,7 +95,9 @@ void SearchThread()
|
||||
{
|
||||
int prev_first, prev_cur_y;
|
||||
|
||||
#ifndef __COFF__
|
||||
load_dll(Proc_lib, #OpenDialog_init,0);
|
||||
#endif
|
||||
OpenDialog_init stdcall (#open_folder_dialog);
|
||||
|
||||
if (!ESBYTE[path]) strcpy(path, "/sys");
|
||||
@@ -101,43 +107,28 @@ void SearchThread()
|
||||
loop() switch(@WaitEvent())
|
||||
{
|
||||
case evMouse:
|
||||
|
||||
edit_box_mouse stdcall (#edit_name);
|
||||
edit_box_mouse stdcall (#edit_path);
|
||||
|
||||
|
||||
prev_cur_y = select_list.cur_y;
|
||||
|
||||
if (SelectList_ProcessMouse()) {
|
||||
SelectList_Draw();
|
||||
} else {
|
||||
SelectList_DrawLine(select_list.cur_y);
|
||||
|
||||
if (select_list.MouseOver(mouse.x, mouse.y))
|
||||
{
|
||||
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;
|
||||
if (mouse.key&MOUSE_RIGHT) && (mouse.up) && (select_list.MouseOver()) EventOpenFile(false);
|
||||
break;
|
||||
|
||||
case evButton:
|
||||
switch (@GetButtonID()) {
|
||||
case 1: @ExitProcess(); break;
|
||||
case BTN_SEARCH: EventSearch(); break;
|
||||
case BTN_CHOOSE_PATH: EventChooseSearchInPath();
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case evKey:
|
||||
GetKeys();
|
||||
edit_box_key_c stdcall (#edit_name, key_editbox);
|
||||
edit_box_key_c stdcall (#edit_path, key_editbox);
|
||||
@GetKeys();
|
||||
edit_box_key_c stdcall (#edit_name);
|
||||
edit_box_key_c stdcall (#edit_path);
|
||||
if (key_scancode == SCAN_CODE_TAB) {
|
||||
if (edit_name.flags & ed_focus) {
|
||||
edit_name.flags >< edit_path.flags;
|
||||
@@ -152,7 +143,7 @@ void SearchThread()
|
||||
if (edit_name.flags & ed_focus) || (edit_path.flags & ed_focus) {
|
||||
if (SCAN_CODE_ENTER == key_scancode) EventSearch();
|
||||
} else {
|
||||
if (SCAN_CODE_ENTER == key_scancode) EventRunFile();
|
||||
if (SCAN_CODE_ENTER == key_scancode) EventOpenFile(true);
|
||||
prev_first = select_list.first;
|
||||
prev_cur_y = select_list.cur_y;
|
||||
if (select_list.ProcessKey(key_scancode)) {
|
||||
@@ -178,24 +169,17 @@ void SearchThread()
|
||||
}
|
||||
}
|
||||
|
||||
#define TOOLBAR_H 100
|
||||
#define PAD 10
|
||||
#define LISTX PAD
|
||||
#define LISTY TOOLBAR_H
|
||||
|
||||
void draw_window_search()
|
||||
{
|
||||
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-LISTX-LISTX, Form.cheight-TOOLBAR_H-PAD);
|
||||
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-1, Form.cheight-TOOLBAR_H-1);
|
||||
SelectList_Draw();
|
||||
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, TOOLBAR_H-1, Form.cwidth, 1, sc.line);
|
||||
DrawBar(0, 0, Form.cwidth, TOOLBAR_H-1, sc.work);
|
||||
DrawEditBox(#edit_name);
|
||||
WriteText(edit_name.left-2, edit_name.top-20, 0x90, sc.work_text, T_SEARCH_NAME);
|
||||
edit_path.width = Form.cwidth - 314;
|
||||
DrawStandartCaptButton(PAD, 63, BTN_SEARCH, T_BUTTON_SEARCH);
|
||||
DrawFileBox(#edit_path, T_SEARCH_PATH, BTN_CHOOSE_PATH);
|
||||
DrawStandartCaptButton(10, 63, BTN_SEARCH, T_BUTTON_SEARCH);
|
||||
}
|
||||
|
||||
void SelectList_DrawLine(dword i)
|
||||
@@ -240,12 +224,6 @@ void SelectList_LineChanged()
|
||||
return;
|
||||
}
|
||||
|
||||
void getfullpath(dword to, path, name) {
|
||||
strcpy(to, path);
|
||||
chrcat(to, '/');
|
||||
strcat(to, name);
|
||||
}
|
||||
|
||||
//===================================================//
|
||||
// //
|
||||
// EVENTS //
|
||||
@@ -260,21 +238,22 @@ void EventChooseSearchInPath()
|
||||
}
|
||||
}
|
||||
|
||||
void EventShowFileInFolder()
|
||||
{
|
||||
char full_path[4096];
|
||||
int pos = select_list.cur_y;
|
||||
getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
|
||||
RunProgram(#program_path, #full_path);
|
||||
void getfullpath(dword to, path, name) {
|
||||
strcpy(to, path);
|
||||
chrcat(to, '/');
|
||||
strcat(to, name);
|
||||
}
|
||||
|
||||
void EventRunFile()
|
||||
void EventOpenFile(int run_file_not_show_in_folder)
|
||||
{
|
||||
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);
|
||||
if (run_file_not_show_in_folder) {
|
||||
RunProgram("/sys/@open", #full_path);
|
||||
} else {
|
||||
RunProgram("/sys/file managers/eolite", #full_path);
|
||||
}
|
||||
}
|
||||
|
||||
void EventSearch()
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#pragma option -CPA
|
||||
#initallvar 0
|
||||
|
||||
#ifndef __COFF__
|
||||
#jumptomain FALSE
|
||||
|
||||
#startaddress 0
|
||||
@@ -29,6 +30,17 @@ dword I_Param = #param;
|
||||
dword I_Path = #program_path;
|
||||
char param[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
|
||||
|
||||
@@ -391,7 +403,6 @@ inline fastcall int TestBit( EAX, CL)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#define MINIMIZED 0x02
|
||||
#define ROLLED_UP 0x04
|
||||
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
|
||||
{
|
||||
|
@@ -116,10 +116,17 @@
|
||||
EAX = 37;
|
||||
EBX = 2;
|
||||
$int 64
|
||||
$mov ebx, eax
|
||||
$mov ecx, eax
|
||||
key = EAX;
|
||||
lkm = EAX&MOUSE_LEFT;
|
||||
pkm = EAX&MOUSE_RIGHT;
|
||||
mkm = EAX&MOUSE_MIDDLE;
|
||||
$and eax, 0x00000001
|
||||
$shr ebx, 1
|
||||
$and ebx, 0x00000001
|
||||
$shr ecx, 2
|
||||
$and ecx, 0x00000001
|
||||
lkm = EAX;
|
||||
pkm = EBX;
|
||||
mkm = ECX;
|
||||
|
||||
//when you release the MOUSE button
|
||||
// Mouse Move Event
|
||||
|
@@ -6,6 +6,37 @@
|
||||
#include "../lib/kolibri.h"
|
||||
#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
|
||||
#include "../lib/dll.h"
|
||||
#endif
|
||||
@@ -211,3 +242,5 @@ struct frame
|
||||
frame_draw stdcall (#frame123);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
@@ -44,14 +44,15 @@ signed SelectList_ProcessMouse()
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mouse.up) && (select_list.ProcessMouse(mouse.x, mouse.y)) {
|
||||
SelectList_LineChanged();
|
||||
return true;
|
||||
}
|
||||
if (mouse.up) && (mouse.click)
|
||||
if (select_list.ProcessMouse(mouse.x, mouse.y)) {
|
||||
SelectList_LineChanged();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
:void SelectList_DrawBorder() {
|
||||
void SelectList_DrawBorder() {
|
||||
DrawRectangle3D(select_list.x-2, select_list.y-2,
|
||||
select_list.w+3+scroll1.size_x, select_list.h+3,
|
||||
sc.dark, sc.light);
|
||||
@@ -60,8 +61,8 @@ signed SelectList_ProcessMouse()
|
||||
|
||||
void SelectList_DrawScroller()
|
||||
{
|
||||
scroll1.bckg_col = sc.dark; // MixColors(sc.work, 0xBBBbbb, 80);
|
||||
scroll1.frnt_col = sc.light; // MixColors(sc.work,0xFFFfff,120);
|
||||
scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80);
|
||||
scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120);
|
||||
scroll1.line_col = sc.line;
|
||||
|
||||
scroll1.max_area = select_list.count;
|
||||
|
@@ -170,6 +170,7 @@ proc tl_key uses ebx ecx edi, tlist:dword
|
||||
cmp tl_on_press,0
|
||||
je @f
|
||||
call tl_on_press
|
||||
jmp .no_edit
|
||||
@@:
|
||||
cmp ah,byte[ecx+1] ;Space
|
||||
jne @f
|
||||
|
@@ -6,7 +6,7 @@ MK_C_SYM(__ieee754_expf)
|
||||
fstl %st(1)
|
||||
frndint
|
||||
fstl %st(2)
|
||||
fsubp
|
||||
fsubrp
|
||||
f2xm1
|
||||
fld1
|
||||
faddp
|
||||
|
@@ -41,7 +41,6 @@ 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 '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include "../../string.inc"
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../dll.inc'
|
||||
;include '../../debug.inc'
|
||||
@@ -370,12 +369,6 @@ endl
|
||||
|
||||
mcall 30,4,,1
|
||||
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
|
||||
.n:
|
||||
|
@@ -1,5 +0,0 @@
|
||||
@del *.
|
||||
@For /R %%i In (*.c) Do c-- "%%i"
|
||||
@rename *.com *.
|
||||
@pause
|
||||
@del warning.txt
|
9
programs/games/flood-it/compile_eng.bat
Normal file
9
programs/games/flood-it/compile_eng.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@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
|
9
programs/games/flood-it/compile_rus.bat
Normal file
9
programs/games/flood-it/compile_rus.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@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
|
@@ -1,44 +1,49 @@
|
||||
// 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>
|
||||
//Leency 06.10.2011, Flood-it! v2.41, GPL
|
||||
|
||||
#include "lib\kolibri.h"
|
||||
#include "lib\random.h"
|
||||
|
||||
#ifndef AUTOBUILD
|
||||
#include "lang.h--"
|
||||
#endif
|
||||
|
||||
system_colors sc;
|
||||
proc_info Form;
|
||||
dword help_window_stak[100];
|
||||
dword stak[100]; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#define DEFAULT_BLOCK_COUNT 14
|
||||
#define DEFAULT_MAX_CLICKS 25
|
||||
#define MAX_BLOCK_SIZE 28
|
||||
char board_size = -1;
|
||||
int BLOCK_SIZE; //cell size
|
||||
int BLOCKS_NUM; //number of cells by X and Y
|
||||
int MAX_CLICKS; //max clicks for win
|
||||
int CLICKS; //how many clicks user already did
|
||||
int game_end;
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int DIFFICULTY_LEV_PARAMS[]={ 28, 14, 25, //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
||||
17, 28, 50}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
//<2F><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD>"
|
||||
int BLOCK_SIZE = 28; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
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 = 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>
|
||||
|
||||
#define USER_PANEL_WIDTH 144
|
||||
int CLICKS = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
//six colors are used in a game for a cells
|
||||
//and seventh color is used to mark a cell during filling process
|
||||
dword FIELD_COLORS[] = {0xf18db6, 0x605ca8, 0xfddc80, 0xdc4a20, 0x46b1e2, 0x7e9d1e, 0x232323};
|
||||
char BOARD_SIZES[] = "S\0L";
|
||||
#define USER_PANEL_WIDTH 119
|
||||
|
||||
//<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>,
|
||||
//<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>
|
||||
dword FIELD_COLORS[]= {0xf18db6, 0x605ca8, 0xfddc80, 0xdc4a20, 0x46b1e2, 0x7e9d1e, 0x232323, 0};
|
||||
char *BOARD_SIZES[]={ "S", "L", 0 };
|
||||
|
||||
|
||||
#ifdef LANG_RUS
|
||||
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><EFBFBD>: /";
|
||||
char LEVELS_TEXT[]=" <EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
|
||||
char CLICKS_TEXT[]=" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /";
|
||||
char LEVELS_TEXT[]="<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?",
|
||||
"",
|
||||
"<EFBFBD>롥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨪<EFBFBD><EFBFBD>. <20><><EFBFBD>⪨ <20><><EFBFBD><EFBFBD><EFBFBD><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> <20><><EFBFBD>⪨ ⮩ <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>᪨. <20><>墠<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD> <20>㦭<EFBFBD> <20><>",
|
||||
"<EFBFBD><EFBFBD>࠭<EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD> <20><> 室<EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD>㯭<EFBFBD> <20><><EFBFBD> ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><>᪨.",
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 梥⮬ <20><> <20><>࠭<EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD> <20><> 室<><E5AEA4>.",
|
||||
"<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> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>",
|
||||
"<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>⪨ ⮩ <20><> <20><><EFBFBD><EFBFBD>᪨. <20><>墠<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>㦭<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쭮<EFBFBD>",
|
||||
"<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>:",
|
||||
"[Q] [W] [E]",
|
||||
@@ -57,25 +62,28 @@ char BOARD_SIZES[] = "S\0L";
|
||||
"vajutades nuppudele vasakul. Kui sa muudad v<>rvi pragusel alal,",
|
||||
"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",
|
||||
"vahel.",
|
||||
"vahel. Proovi v<>li <20>le ujutada etteandtud k<>ikude arvuga!",
|
||||
"Kaasahaarav ja l<>bus!",
|
||||
"",
|
||||
"M<EFBFBD>ngida saab ka klaviatuuriga:",
|
||||
"[Q] [W] [E]",
|
||||
"[A] [S] [D]",
|
||||
0};
|
||||
#else
|
||||
char *BUTTON_CAPTIONS[]={ "Restart [F2]", " Help [F1]", " Exit [Esc]", 0};
|
||||
char *BUTTON_CAPTIONS[]={ "New Game [F2]", "Help [F1]", "Exit [Esc]", 0};
|
||||
char CLICKS_TEXT[]="Clicks: /";
|
||||
char LEVELS_TEXT[]="Board:";
|
||||
|
||||
char HELP_WINDOW_CAPTION[]="Help";
|
||||
char *HELP_TEXT[]={ "How to play Flood-it?",
|
||||
"",
|
||||
"You start from the TOP LEFT corner and progress by selecting one",
|
||||
"Flood the whole board with one color within the allowed steps.",
|
||||
"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",
|
||||
"color, every adjacent square with the same color also changes, that",
|
||||
"way you can flood other areas of the board. Select from 2 sizes of",
|
||||
"way you can flood other areas of the board. Select from 3 sizes of",
|
||||
"the board and try to flood-it in the least amount of steps!",
|
||||
"Addictive and Fun!",
|
||||
"",
|
||||
"You can also play with keyboard:",
|
||||
"[Q] [W] [E]",
|
||||
@@ -84,7 +92,7 @@ char BOARD_SIZES[] = "S\0L";
|
||||
#endif
|
||||
|
||||
|
||||
unsigned char color_matrix[28*28]; //our field
|
||||
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 loss_matrix[14*14]={
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
@@ -124,162 +132,152 @@ void main()
|
||||
{
|
||||
int key, id;
|
||||
|
||||
set_board_size(0); //small board by default
|
||||
new_game();
|
||||
|
||||
loop() switch(WaitEvent())
|
||||
loop()
|
||||
{
|
||||
case evButton:
|
||||
id = GetButtonID();
|
||||
IF (id==1) || (id==4) ExitProcess();
|
||||
IF (id==2) goto _NEW_GAME_MARK;
|
||||
IF (id==3) goto _HELP_MARK;
|
||||
IF (id>=100) {
|
||||
make_turn(id-100);
|
||||
}
|
||||
if (id==10) set_board_size(0);
|
||||
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);
|
||||
switch(WaitEvent())
|
||||
{
|
||||
case evButton:
|
||||
id = GetButtonID();
|
||||
IF (id==1) || (id==4) ExitProcess();
|
||||
IF (id==2) goto _NEW_GAME_MARK;
|
||||
IF (id==3) goto _HELP_MARK;
|
||||
IF (id>=100)
|
||||
{
|
||||
make_turn(id-100);
|
||||
break;
|
||||
}
|
||||
IF (key==60) //F2
|
||||
{
|
||||
_NEW_GAME_MARK:
|
||||
}
|
||||
if (id>=10)
|
||||
{
|
||||
id=id-10*3;
|
||||
|
||||
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();
|
||||
draw_clicks_num();
|
||||
draw_field();
|
||||
break;
|
||||
}
|
||||
IF (key==16) make_turn(0); //Q
|
||||
IF (key==17) make_turn(1); //W
|
||||
IF (key==18) make_turn(2); //E
|
||||
IF (key==30) make_turn(3); //A
|
||||
IF (key==31) make_turn(4); //S
|
||||
IF (key==32) make_turn(5); //D
|
||||
break;
|
||||
case evReDraw:
|
||||
draw_window();
|
||||
}
|
||||
}
|
||||
|
||||
void set_board_size(char s)
|
||||
{
|
||||
if (board_size != s) {
|
||||
board_size = s;
|
||||
|
||||
BLOCKS_NUM = board_size + 1 * DEFAULT_BLOCK_COUNT;
|
||||
MAX_CLICKS = board_size + 1 * DEFAULT_MAX_CLICKS;
|
||||
|
||||
BLOCK_SIZE = GetScreenHeight() - 70 / BLOCKS_NUM;
|
||||
if (BLOCK_SIZE > MAX_BLOCK_SIZE) BLOCK_SIZE = MAX_BLOCK_SIZE;
|
||||
|
||||
new_game();
|
||||
|
||||
MoveSize(-1, -1, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH,
|
||||
BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14);
|
||||
|
||||
MoveSize(-1, -1, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH, BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14);
|
||||
}
|
||||
break;
|
||||
case evKey:
|
||||
key = GetKeyScancode();
|
||||
IF (key==01) //Escape
|
||||
ExitProcess();
|
||||
IF (key==59) //F1
|
||||
{
|
||||
_HELP_MARK:
|
||||
CreateThread(#help,#stak);
|
||||
}
|
||||
IF (key==60) //F2
|
||||
{
|
||||
_NEW_GAME_MARK:
|
||||
new_game();
|
||||
draw_clicks_num();
|
||||
draw_field();
|
||||
}
|
||||
IF (key==16) make_turn(0); //Q
|
||||
IF (key==17) make_turn(1); //W
|
||||
IF (key==18) make_turn(2); //E
|
||||
IF (key==30) make_turn(3); //A
|
||||
IF (key==31) make_turn(4); //S
|
||||
IF (key==32) make_turn(5); //D
|
||||
break;
|
||||
case evReDraw:
|
||||
draw_window();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void make_turn(int turn_id)
|
||||
{
|
||||
IF (color_matrix[0]==turn_id) return; //ignore no-sence click: first item color is equal to a new color
|
||||
IF (!game_is_ended()) {
|
||||
CLICKS++;
|
||||
draw_clicks_num();
|
||||
fill_field(turn_id);
|
||||
if (!game_is_ended()) draw_field();
|
||||
}
|
||||
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 (CLICKS>=MAX_CLICKS) return; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
CLICKS++;
|
||||
draw_clicks_num();
|
||||
|
||||
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()
|
||||
{
|
||||
int i;
|
||||
int i, j;
|
||||
#define BUTTON_SIZE 28
|
||||
|
||||
sc.get();
|
||||
|
||||
DefineAndDrawWindow(300,176, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH,
|
||||
BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14, 0x74,0,"Flood-it!");
|
||||
DefineAndDrawWindow(300,176, BLOCK_SIZE*BLOCKS_NUM +14+USER_PANEL_WIDTH, BLOCK_SIZE*BLOCKS_NUM +GetSkinHeight()+14, 0x74,sc.work,0,0,"Flood-it!");
|
||||
|
||||
// Fix rolled-up bug
|
||||
//<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>
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
IF (Form.status_window==4) return;
|
||||
|
||||
// Fill background to reduce window redraw
|
||||
//<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>
|
||||
for (i=0;i<=4;i++)
|
||||
{
|
||||
ESI = sc.work;
|
||||
IF (i==4) ESI = sc.work_graph;
|
||||
DrawRegion(USER_PANEL_WIDTH+i-5,i, BLOCK_SIZE*BLOCKS_NUM +9-i-i, ESI);
|
||||
IF (i<>4)
|
||||
DrawRegion(USER_PANEL_WIDTH+i-5,i, BLOCK_SIZE*BLOCKS_NUM +9-i-i, BLOCK_SIZE*BLOCKS_NUM+9-i-i, sc.work);
|
||||
else
|
||||
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);
|
||||
|
||||
// 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);
|
||||
|
||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
IF (board_size == i) {
|
||||
ESI=sc.work_button;
|
||||
EDI=sc.work_button_text;
|
||||
} ELSE {
|
||||
ESI = sc.work;
|
||||
EDI = sc.work_text;
|
||||
}
|
||||
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]);
|
||||
|
||||
DefineButton(i*32+69,BLOCKS_NUM*BLOCK_SIZE-24, 26,25, i+10,ESI);
|
||||
WriteText(i*32+69+9,BLOCKS_NUM*BLOCK_SIZE-24+6,0x90,EDI,#BOARD_SIZES+i+i,0);
|
||||
$add ebx, 1<<16 //bold
|
||||
$int 0x40
|
||||
//<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);
|
||||
WriteText(17+4,j*25+127,0x80,sc.work_button_text,BUTTON_CAPTIONS[j],0);
|
||||
}
|
||||
|
||||
//<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>
|
||||
WriteText(17,BLOCKS_NUM*BLOCK_SIZE-20+7,0x80,sc.work_text,#LEVELS_TEXT,0);
|
||||
for (j=0;j<2;j++)
|
||||
{
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
void randomly_fill_the_board()
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++) {
|
||||
color_matrix[i] = random(6);
|
||||
}
|
||||
}
|
||||
|
||||
void new_game()
|
||||
{
|
||||
int i;
|
||||
|
||||
CLICKS = 0;
|
||||
game_end = false;
|
||||
randomly_fill_the_board();
|
||||
|
||||
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++)
|
||||
color_matrix[i] = random(6);
|
||||
}
|
||||
|
||||
|
||||
void fill_field(int new_color_id)
|
||||
{
|
||||
int i, j,
|
||||
old_color_id=color_matrix[0],
|
||||
restart;
|
||||
int cur_cell;
|
||||
#define MARKED 6
|
||||
|
||||
color_matrix[0]=MARKED;
|
||||
@@ -291,16 +289,15 @@ void fill_field(int new_color_id)
|
||||
for (i=0;i<BLOCKS_NUM;i++)
|
||||
for (j=0;j<BLOCKS_NUM;j++)
|
||||
{
|
||||
cur_cell = i*BLOCKS_NUM+j;
|
||||
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 (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>
|
||||
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 (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[cur_cell]=MARKED; //top
|
||||
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[cur_cell]=MARKED; //bottom
|
||||
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 (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 (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 (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 (color_matrix[cur_cell]==MARKED) restart=1;
|
||||
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 (restart) goto _RESTART_MARK;
|
||||
|
||||
@@ -308,83 +305,101 @@ void fill_field(int 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;
|
||||
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++)
|
||||
{
|
||||
ii = board_size * 2 + i;
|
||||
jj = board_size * 2 + j;
|
||||
color_matrix[ii*BLOCKS_NUM+jj]=
|
||||
color_matrix[ii+1*BLOCKS_NUM+jj]=
|
||||
color_matrix[ii*BLOCKS_NUM+jj+1]=
|
||||
color_matrix[ii+1*BLOCKS_NUM+jj+1]=ESBYTE[i*14+j+matrix];
|
||||
draw_field();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int field_is_solid()
|
||||
{
|
||||
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();
|
||||
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=i;
|
||||
jj=j;
|
||||
}
|
||||
else
|
||||
{
|
||||
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];
|
||||
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];
|
||||
draw_field();
|
||||
Pause(7);
|
||||
}
|
||||
|
||||
draw_win_or_loose_animation(#win_matrix);
|
||||
return 1;
|
||||
}
|
||||
//Pause(5);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void draw_clicks_num()
|
||||
{
|
||||
#define TEXT_X 19
|
||||
#define TEXT_Y 100
|
||||
#define TEXT_X 21
|
||||
#define TEXT_Y 92
|
||||
|
||||
DrawBar(TEXT_X, TEXT_Y, USER_PANEL_WIDTH-TEXT_X-5,16, sc.work);
|
||||
DrawBar(TEXT_X, TEXT_Y, USER_PANEL_WIDTH-TEXT_X-3,9, sc.work);
|
||||
|
||||
WriteText(TEXT_X,TEXT_Y,0x90,sc.work_text,#CLICKS_TEXT,0);
|
||||
WriteText(TEXT_X,TEXT_Y,0x80,sc.work_text,#CLICKS_TEXT,0);
|
||||
|
||||
IF (CLICKS<10) EBX=9*8+TEXT_X;
|
||||
else EBX=8*8+TEXT_X;
|
||||
IF (CLICKS<10) EBX=9*6+TEXT_X;
|
||||
else EBX=8*6+TEXT_X;
|
||||
|
||||
WriteText(EBX,TEXT_Y,0x90,sc.work_text,itoa_nosign(CLICKS),0);
|
||||
WriteText(EBX,TEXT_Y,0x80,sc.work_text,IntToStr(CLICKS),0);
|
||||
|
||||
WriteText(11*8+TEXT_X,TEXT_Y,0x90,sc.work_text,itoa_nosign(MAX_CLICKS),0);
|
||||
WriteText(11*6+TEXT_X,TEXT_Y,0x80,sc.work_text,IntToStr(MAX_CLICKS),0);
|
||||
}
|
||||
|
||||
|
||||
@@ -402,7 +417,7 @@ void draw_field()
|
||||
}
|
||||
|
||||
|
||||
void help_thread()
|
||||
void help()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -414,10 +429,10 @@ void help_thread()
|
||||
IF (GetKeyScancode()==001) ExitProcess(); //Esc
|
||||
break;
|
||||
case evReDraw:
|
||||
//for (i=0; HELP_TEXT[i]<>0; i++;) {}; //calculate line numbers, predefined i=12 used to reduce size
|
||||
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); //for a bold text
|
||||
for (i=0; HELP_TEXT[i]<>0; i++;) WriteText(7,i*19+12,0x90,sc.work_text,HELP_TEXT[i],0);
|
||||
for (i=0; HELP_TEXT[i]<>0; i++;) {};
|
||||
DefineAndDrawWindow(400,200,610,i*19+25+GetSkinHeight(),0x34,sc.work,0,0,#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>
|
||||
for (i=0; HELP_TEXT[i]<>0; i++;) WriteText(5,i*19+12,0x90,sc.work_text,HELP_TEXT[i],0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -23,12 +23,6 @@ dword I_Path = 0;
|
||||
#define BT_HIDE 0x40000000
|
||||
#define BT_NOFRAME 0x20000000
|
||||
|
||||
#define bool char
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
inline fastcall dword calc(EAX) { return EAX; }
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -100,11 +94,16 @@ inline fastcall Pause(dword EBX)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
char buffer[5];
|
||||
inline fastcall dword itoa_nosign(dword ESI)
|
||||
char buffer[11]="";
|
||||
inline fastcall dword IntToStr(dword ESI)
|
||||
{
|
||||
$mov edi, #buffer
|
||||
$mov ecx, 10
|
||||
$test esi, esi
|
||||
$jns f1
|
||||
$mov al, '-'
|
||||
$stosb
|
||||
$neg esi
|
||||
f1:
|
||||
$mov eax, esi
|
||||
$push -'0'
|
||||
@@ -127,7 +126,7 @@ f3:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,EDI)
|
||||
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI)
|
||||
{
|
||||
EAX = 12; // function 12:tell os about windowdraw
|
||||
EBX = 1;
|
||||
@@ -136,7 +135,7 @@ void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaC
|
||||
EBX = x << 16 + sizeX;
|
||||
ECX = y << 16 + sizeY;
|
||||
EDX = mainAreaType << 24 | mainAreaColour;
|
||||
ESI = 0;
|
||||
ESI = headerType << 24 | headerColour;
|
||||
$xor eax,eax
|
||||
$int 0x40
|
||||
|
||||
@@ -167,13 +166,6 @@ dword GetSkinHeight()
|
||||
$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)
|
||||
{
|
||||
EAX = 4;
|
||||
@@ -198,20 +190,12 @@ void DefineButton(dword x,y,w,h,EDX,ESI)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
void DrawRegion(dword x,y,s,EDX)
|
||||
void DrawRegion(dword x,y,width,height,EDX)
|
||||
{
|
||||
EAX = 13;
|
||||
EBX = x<<16+s;
|
||||
ECX = y<<16+1;
|
||||
$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
|
||||
DrawBar(x,y,width,1,EDX);
|
||||
DrawBar(x,y+height,width,1,EDX);
|
||||
DrawBar(x,y,1,height,EDX);
|
||||
DrawBar(x+width,y,1,height+1,EDX);
|
||||
}
|
||||
|
||||
inline fastcall dword WriteDebug(dword EDX)
|
||||
|
@@ -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 ;;
|
||||
;; ;;
|
||||
;; ftpc.asm - FTP client for KolibriOS ;;
|
||||
@@ -36,8 +36,8 @@ use32
|
||||
dd 1 ; header version
|
||||
dd start ; entry point
|
||||
dd i_end ; initialized size
|
||||
dd mem+0x1000 ; required memory
|
||||
dd mem+0x1000 ; stack pointer
|
||||
dd mem ; required memory
|
||||
dd stacktop ; stack pointer
|
||||
dd buf_cmd ; parameters
|
||||
dd path ; path
|
||||
|
||||
@@ -83,12 +83,12 @@ start: ;////////////////////////////////////////////////////////////////////////
|
||||
;< none ;;
|
||||
;;================================================================================================;;
|
||||
; initialize heap for using dynamic blocks
|
||||
mcall 68, 11
|
||||
mcall SF_SYS_MISC, SSF_HEAP_INIT
|
||||
test eax, eax
|
||||
je exit2
|
||||
|
||||
; disable all events except network event
|
||||
mcall 40, EV_STACK
|
||||
mcall SF_SET_EVENTS_MASK, EV_STACK
|
||||
; load libraries
|
||||
stdcall dll.Load, @IMPORT
|
||||
test eax, eax
|
||||
@@ -125,16 +125,16 @@ start: ;////////////////////////////////////////////////////////////////////////
|
||||
mov [acti_port_stop], ax
|
||||
|
||||
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
|
||||
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.size], 0
|
||||
mov [filestruct2.ptr], 0
|
||||
mov [filestruct2.name], log_file
|
||||
mcall 70, filestruct2
|
||||
mcall SF_FILE, filestruct2
|
||||
|
||||
; Usage: ftpc [-cli] [ftp://username:password@server:port/path]
|
||||
|
||||
@@ -355,7 +355,7 @@ wait_for_servercommand: ;///////////////////////////////////////////////////////
|
||||
|
||||
; receive socket data with timeout
|
||||
.receive:
|
||||
mcall 26, 9
|
||||
mcall SF_SYSTEM_GET, SSF_TIME_COUNT
|
||||
add eax, TIMEOUT*100
|
||||
mov [timeout], eax
|
||||
.again:
|
||||
@@ -365,11 +365,11 @@ wait_for_servercommand: ;///////////////////////////////////////////////////////
|
||||
je .closed
|
||||
cmp ebx, EWOULDBLOCK
|
||||
jne .sock_err
|
||||
mcall 26, 9
|
||||
mcall SF_SYSTEM_GET, SSF_TIME_COUNT
|
||||
mov ebx, [timeout]
|
||||
sub ebx, eax
|
||||
jle .timeout
|
||||
mcall 23 ; Wait for event with timeout
|
||||
mcall SF_WAIT_EVENT_TIMEOUT ; Wait for event with timeout
|
||||
jmp .again
|
||||
|
||||
.sock_err:
|
||||
@@ -524,7 +524,7 @@ transfer_queued:
|
||||
|
||||
; Error occured, we reached the end of the buffer before [queued] reached 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
|
||||
jz error_heap
|
||||
jmp wait_for_usercommand
|
||||
@@ -535,7 +535,7 @@ transfer_queued:
|
||||
dec [queued]
|
||||
jnz cmd_retr
|
||||
|
||||
mcall 68, 13, [ptr_fname] ; free buffer
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [ptr_fname] ; free buffer
|
||||
test eax, eax
|
||||
jz error_heap
|
||||
jmp cmd_retr
|
||||
@@ -655,12 +655,12 @@ write_to_file: ;////////////////////////////////////////////////////////////////
|
||||
mov eax, 0
|
||||
ret
|
||||
@@:
|
||||
mov [filestruct2.subfn], 3
|
||||
mov [filestruct2.subfn], SSF_WRITE_FILE
|
||||
m2m [filestruct2.offset], [logfile_offset]
|
||||
mov [filestruct2.size], ecx
|
||||
mov [filestruct2.ptr], eax
|
||||
mov [filestruct2.name], log_file
|
||||
mcall 70, filestruct2
|
||||
mcall SF_FILE, filestruct2
|
||||
test eax, eax
|
||||
jz @f
|
||||
mov [logfile_offset], -1 ; disable logging
|
||||
@@ -754,13 +754,13 @@ wait_for_keypress:
|
||||
exit:
|
||||
mcall close, [controlsocket]
|
||||
exit2:
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
|
||||
|
||||
; data
|
||||
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
|
||||
str_srv_addr db 'Please enter ftp server address.',10,0
|
||||
|
||||
@@ -971,6 +971,7 @@ param_path rb 1024
|
||||
param_port rb 6
|
||||
|
||||
sc system_colors
|
||||
rb 1024
|
||||
|
||||
align 16
|
||||
rb 4096
|
||||
stacktop:
|
||||
mem:
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 283 B |
Binary file not shown.
Before Width: | Height: | Size: 640 B |
@@ -7,6 +7,8 @@ include '../../load_lib.mac'
|
||||
|
||||
icon_tl_sys dd 0
|
||||
icon_tl_nod 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
|
||||
TLIST1_X = 50
|
||||
@@ -15,6 +17,9 @@ BT_SZ_X = 40
|
||||
SYS_COL = 0xe6e6e6
|
||||
BT_COL = 0xcccccc
|
||||
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
|
||||
|
||||
@@ -45,8 +50,8 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
test eax, eax
|
||||
jnz .exit
|
||||
|
||||
mcall 48, 3, sc, sizeof.system_colors
|
||||
mcall 40, 0xC0000027 ; set event mask
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
|
||||
mcall SF_SET_EVENTS_MASK, 0xC0000027 ; set event mask
|
||||
ret
|
||||
|
||||
.server_addr:
|
||||
@@ -73,37 +78,36 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
; initialize tree list elements
|
||||
stdcall [tl_data_init], tree1
|
||||
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
|
||||
mov [filestruct.subfn], 0
|
||||
mov [filestruct.offset], 54
|
||||
mov [filestruct.size], ecx
|
||||
mcall 70, filestruct
|
||||
cmp ebx, 0
|
||||
jl @f
|
||||
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
|
||||
mcall SF_SYS_MISC, SSF_MEM_OPEN, str_icon_18,, 0
|
||||
or eax, eax
|
||||
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[tree2.data_img_sys], dword[icon_tl_sys]
|
||||
|
||||
@@:
|
||||
; 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[tree2.data_img], dword[icon_tl_nod]
|
||||
|
||||
|
||||
@@:
|
||||
call .draw
|
||||
; create initial tree list for root_dir
|
||||
@@ -121,7 +125,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
align 4
|
||||
.still:
|
||||
mcall 10
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
dec eax
|
||||
jz .redraw
|
||||
@@ -146,65 +150,79 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
align 4
|
||||
.draw:
|
||||
mcall 12, 1
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
; 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
|
||||
;-------------------------
|
||||
mcall 9, procinfo, -1
|
||||
mcall SF_THREAD_INFO, procinfo, -1
|
||||
mov edi, tedit0
|
||||
call EvSize
|
||||
|
||||
movzx ebx,word[procinfo.client_box.width]
|
||||
inc bx
|
||||
mcall 13, , ted_wnd_t
|
||||
stdcall [ted_draw], tedit0
|
||||
mcall SF_DRAW_RECT, , ted_wnd_t
|
||||
|
||||
; draw "disconnect" button
|
||||
mcall 8, <50,95>, <25,25>, 3, BT_COL
|
||||
mcall SF_DEFINE_BUTTON, <50,95>, <25,25>, 3, BT_COL
|
||||
; string "disconnect"
|
||||
mcall 4, <50+5,25+5>, 0xb0000000+STR_COL, str_disconnect
|
||||
mcall SF_DRAW_TEXT, <50+5,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
|
||||
mcall 8, <50,40>, <326,25>, 4, BT_COL
|
||||
mcall SF_DEFINE_BUTTON, <129+5,40>, <326,25>, 4, BT_COL
|
||||
; 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
|
||||
mcall 8, <TLIST2_X+TLIST_SZ-55,55>, <20,25>, 5, BT_COL
|
||||
mcall SF_DEFINE_BUTTON, <TLIST2_X+TLIST_SZ-55,55>, <20,25>, 5, BT_COL
|
||||
; 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
|
||||
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"
|
||||
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
|
||||
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"
|
||||
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
|
||||
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"
|
||||
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
|
||||
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"
|
||||
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
|
||||
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"
|
||||
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
|
||||
;mcall 8, <555,55>, <308,25>, 10, BT_COL
|
||||
;mcall SF_DEFINE_BUTTON, <555,55>, <308,25>, 10, BT_COL
|
||||
; 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
|
||||
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"
|
||||
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
|
||||
@@ -222,12 +240,12 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
stdcall [edit_box_draw], edit_volume
|
||||
stdcall [edit_box_draw], edit_search
|
||||
|
||||
mcall 12,2
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
|
||||
align 16
|
||||
.mouse:
|
||||
mcall 37, 1
|
||||
mcall SF_MOUSE_GET, SSF_WINDOW_POSITION
|
||||
cmp word[tedit0.wnd.top], ax
|
||||
jg .no_edit
|
||||
|
||||
@@ -235,7 +253,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
cmp word[tedit0.wnd.left], ax
|
||||
jg .no_edit
|
||||
|
||||
mcall 37, 3
|
||||
mcall SF_MOUSE_GET, SSF_BUTTON_EXT
|
||||
bt eax, 24
|
||||
jnc @f
|
||||
|
||||
@@ -243,12 +261,19 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
jmp .still
|
||||
|
||||
@@:
|
||||
cmp [show_log],0
|
||||
je .still
|
||||
stdcall [ted_mouse], tedit0
|
||||
jmp .still
|
||||
|
||||
.no_edit:
|
||||
mov [lbl_after_enter], 0
|
||||
stdcall [tl_mouse], tree1
|
||||
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_volume
|
||||
stdcall [edit_box_mouse], edit_search
|
||||
@@ -256,9 +281,14 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
align 16
|
||||
.key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
mov [lbl_after_enter], 0
|
||||
stdcall [tl_key], tree1
|
||||
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_volume
|
||||
stdcall [edit_box_key], edit_search
|
||||
@@ -266,13 +296,19 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
align 16
|
||||
.button:
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
|
||||
cmp ah, 3
|
||||
jne @f
|
||||
ijmp eax, interface_addr, interface.server_addr
|
||||
jmp .still
|
||||
|
||||
@@:
|
||||
cmp ah, 10
|
||||
jne @f
|
||||
call show_hide_log
|
||||
jmp .still
|
||||
|
||||
@@:
|
||||
cmp ah, 4
|
||||
jne @f
|
||||
@@ -310,7 +346,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
@@:
|
||||
cmp ah, 1
|
||||
je .exit
|
||||
|
||||
|
||||
jmp .still
|
||||
|
||||
.print:
|
||||
@@ -327,7 +363,10 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
cmp byte[esi], 0
|
||||
jne @b
|
||||
stdcall [ted_text_add], tedit0, tedit_buffer, ecx, ebx
|
||||
cmp [show_log],0
|
||||
je .end_log_2
|
||||
stdcall [ted_draw], tedit0
|
||||
.end_log_2:
|
||||
; write to log file
|
||||
mov eax, [esp+36]
|
||||
sub ecx, 2 ; 0a0d is not included
|
||||
@@ -424,6 +463,8 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
mov byte[edi], 0
|
||||
|
||||
; add node to tree list
|
||||
and dword[tree2.style], not 8
|
||||
stdcall [tl_cur_next], tree2
|
||||
cmp word[node_entry2], 'fi'
|
||||
jne @f
|
||||
stdcall [tl_node_add], tree2, 0, node_entry2
|
||||
@@ -470,6 +511,8 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
jne @b
|
||||
|
||||
.done_parsing:
|
||||
stdcall [tl_cur_beg], tree2
|
||||
or dword[tree2.style], 8
|
||||
call .draw ; to update tree list immediately in case of "auto_list"
|
||||
pop eax
|
||||
pop edx
|
||||
@@ -494,7 +537,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
;;================================================================================================;;
|
||||
|
||||
; detect abort
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
cmp ah, 10
|
||||
je cmd_abor
|
||||
|
||||
@@ -578,7 +621,8 @@ fun_on_enter:
|
||||
cmp byte[esi], 0
|
||||
jne @b
|
||||
mov word[edi], 0x000a
|
||||
jmp cmd_stor
|
||||
mov [lbl_after_enter], cmd_stor
|
||||
ret
|
||||
|
||||
|
||||
; Function to call when you press [Enter]
|
||||
@@ -591,7 +635,8 @@ fun_on_enter2:
|
||||
cmp dword[esi], 0x2E2E
|
||||
jne @f
|
||||
mov [auto_list], 1
|
||||
jmp cmd_cdup
|
||||
mov [lbl_after_enter], cmd_cdup
|
||||
ret
|
||||
|
||||
@@:
|
||||
cmp word[eax], 'fo'
|
||||
@@ -610,12 +655,14 @@ fun_on_enter2:
|
||||
; newline in console code
|
||||
cmp word[eax], 'fo'
|
||||
je @f
|
||||
jmp cmd_retr
|
||||
mov [lbl_after_enter], cmd_retr
|
||||
ret
|
||||
|
||||
@@:
|
||||
stdcall [tl_info_clear], tree2
|
||||
mov [auto_list], 1
|
||||
jmp cmd_cwd
|
||||
mov [lbl_after_enter], cmd_cwd
|
||||
ret
|
||||
|
||||
|
||||
;;================================================================================================;;
|
||||
@@ -641,7 +688,7 @@ populate_local_tree_list: ;/////////////////////////////////////////////////////
|
||||
jne @f
|
||||
|
||||
; 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
|
||||
mov al, '/'
|
||||
mov ecx, -1
|
||||
@@ -652,15 +699,15 @@ populate_local_tree_list: ;/////////////////////////////////////////////////////
|
||||
mov ecx, filestruct.name
|
||||
|
||||
@@:
|
||||
mcall 30, 1, ; set cwd
|
||||
mcall 30, 2, filestruct.name, 1024 ; get absolute path for cwd
|
||||
mcall SF_CURRENT_FOLDER, SSF_SET_CF ; set cwd
|
||||
mcall SF_CURRENT_FOLDER, SSF_GET_CF, filestruct.name, 1024 ; get absolute path for cwd
|
||||
; clear all nodes in tree list
|
||||
stdcall [tl_info_clear], tree1
|
||||
mov [filestruct.offset], 0
|
||||
|
||||
; read 32 blocks
|
||||
.outer:
|
||||
mcall 70, filestruct
|
||||
mcall SF_FILE, filestruct
|
||||
;int3
|
||||
test eax, eax
|
||||
jz @f
|
||||
@@ -746,6 +793,16 @@ EvSize:
|
||||
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: ;/////////////////////////////////////////////////////////////////////////////;;
|
||||
;;------------------------------------------------------------------------------------------------;;
|
||||
@@ -861,11 +918,81 @@ search: ;///////////////////////////////////////////////////////////////////////
|
||||
pop edi esi edx ecx ebx
|
||||
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
|
||||
|
||||
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
;hed db 'FTP Client for KolibriOS',0
|
||||
str_change db 'Change',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_mkd db 'MKD',0
|
||||
str_dele db 'DELE',0
|
||||
@@ -876,15 +1003,17 @@ str_search db 'Search',0
|
||||
str_list db 'LIST',0
|
||||
str_null db 0
|
||||
|
||||
str_icon_18 db 'ICONS18',0
|
||||
|
||||
;----------------------
|
||||
; tree list elements
|
||||
;----------------------
|
||||
tree1 tree_list 64, 500, tl_list_box_mode, 16, 16, \
|
||||
0xffffff, BT_COL, 0x000000, TLIST1_X, 105, TLIST_SZ-16, 185, 14, 4,\
|
||||
tree1 tree_list 64, 500, tl_list_box_mode, 18+ICON_LEFT_B, 18+ICON_TOP_B, \
|
||||
0xffffff, BT_COL, 0x10000000, TLIST1_X, 105, TLIST_SZ-16, 185, 14, 4,\
|
||||
0, el_focus, wScr, fun_on_enter
|
||||
|
||||
tree2 tree_list 64, 500, tl_list_box_mode, 16, 16, \
|
||||
0xffffff, BT_COL, 0x000000, TLIST2_X, 105, TLIST_SZ-16, 185, 14, 4, \
|
||||
tree2 tree_list 64, 500, tl_list_box_mode, 18+ICON_LEFT_B, 18+ICON_TOP_B, \
|
||||
0xffffff, BT_COL, 0x10000000, TLIST2_X, 105, TLIST_SZ-16, 185, 14, 4, \
|
||||
0, el_focus, wScr2, fun_on_enter2
|
||||
|
||||
; editbox for mkd
|
||||
|
@@ -27,7 +27,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
.get_username:
|
||||
; in case of error when either login_gui.server_addr or
|
||||
; 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:
|
||||
call .draw
|
||||
@@ -44,22 +44,22 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
|
||||
align 4
|
||||
.draw:
|
||||
mcall 12, 1
|
||||
mcall 48, 3, sc, 40
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, 40
|
||||
edit_boxes_set_sys_color edit_usr,editboxes_end,sc
|
||||
mov edx, 0x34000000
|
||||
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
|
||||
|
||||
; 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
|
||||
mov ecx, 0x90000000
|
||||
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*2+8>, , gui_str_server
|
||||
mcall , <3,PAD*3+8>, , gui_str_port
|
||||
@@ -74,12 +74,12 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
mcall
|
||||
mov [str_error_addr], gui_str_null ; reset error string address
|
||||
|
||||
mcall 12, 2
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
|
||||
align 4
|
||||
.still:
|
||||
mcall 10 ; wait for event
|
||||
mcall SF_WAIT_EVENT
|
||||
dec eax
|
||||
jz .redraw
|
||||
dec eax
|
||||
@@ -96,7 +96,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
jmp .still
|
||||
|
||||
.button:
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
|
||||
dec ah
|
||||
jz .exit
|
||||
@@ -107,7 +107,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
jmp .still
|
||||
|
||||
.key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
|
||||
cmp ah,13
|
||||
je .connect
|
||||
@@ -122,12 +122,17 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
stdcall [edit_box_key], edit_path
|
||||
|
||||
jmp .still
|
||||
|
||||
|
||||
.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
|
||||
jne gui.main
|
||||
|
||||
jne gui.main
|
||||
|
||||
mov [str_error_addr], gui_str_no_srvr
|
||||
jmp .redraw
|
||||
|
||||
|
@@ -190,10 +190,11 @@ data_loop:
|
||||
mov [filestruct.ptr], buf_buffer2
|
||||
mov [filestruct.size], eax
|
||||
push eax
|
||||
mcall 70, filestruct
|
||||
mcall SF_FILE, filestruct
|
||||
test eax, eax
|
||||
jz @f
|
||||
call error_fs
|
||||
add esp, 4 ; fix stack
|
||||
jmp close_datacon
|
||||
@@:
|
||||
pop eax
|
||||
@@ -204,7 +205,7 @@ data_loop:
|
||||
|
||||
; storing, send all data
|
||||
.stor:
|
||||
mcall 70, filestruct
|
||||
mcall SF_FILE, filestruct
|
||||
cmp eax, 6 ; end of file
|
||||
je .last_call
|
||||
test eax, eax ; error
|
||||
@@ -244,7 +245,7 @@ data_loop:
|
||||
mov ecx, eax ; eax is size of buffer received
|
||||
inc ecx
|
||||
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
|
||||
je error_heap
|
||||
mov [ptr_fname], eax ; eax contains the new block now
|
||||
|
@@ -82,13 +82,13 @@ cmd_retr:
|
||||
mov ecx, 256-5
|
||||
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+4], 0
|
||||
mov [filestruct.size], 0
|
||||
mov [filestruct.ptr], 0
|
||||
|
||||
mcall 70, filestruct
|
||||
mcall SF_FILE, filestruct
|
||||
test eax, eax
|
||||
jz @f
|
||||
call error_fs
|
||||
@@ -96,7 +96,7 @@ cmd_retr:
|
||||
@@:
|
||||
; Prepare to write to the file
|
||||
|
||||
mov [filestruct.subfn], 3 ; write to file
|
||||
mov [filestruct.subfn], SSF_WRITE_FILE
|
||||
mov [operation], OPERATION_RETR
|
||||
|
||||
; Request the file from server
|
||||
@@ -138,7 +138,7 @@ cmd_stor:
|
||||
mov [operation], OPERATION_STOR
|
||||
|
||||
; get file size
|
||||
mov [filestruct.subfn], 5
|
||||
mov [filestruct.subfn], SSF_GET_INFO
|
||||
mov [filestruct.offset], 0
|
||||
mov [filestruct.offset+4], 0
|
||||
mov [filestruct.size], 0
|
||||
@@ -148,12 +148,12 @@ cmd_stor:
|
||||
mov ecx, 256-5
|
||||
call set_filename
|
||||
|
||||
mcall 70, filestruct
|
||||
mcall SF_FILE, filestruct
|
||||
|
||||
mov eax, dword[folder_buf+32] ; supports file size upto 4GB
|
||||
mov [file_size], eax
|
||||
|
||||
mov [filestruct.subfn], 0 ; read file
|
||||
mov [filestruct.subfn], SSF_READ_FILE
|
||||
; mov [filestruct.offset], 0
|
||||
; mov [filestruct.offset+4], 0
|
||||
mov [filestruct.size], BUFFERSIZE
|
||||
@@ -191,12 +191,12 @@ cmd_lcwd:
|
||||
mov byte[esi-1], 0
|
||||
|
||||
; check whether entered path is valid (folder exists)
|
||||
mov [filestruct2.subfn], 5
|
||||
mov [filestruct2.subfn], SSF_GET_INFO
|
||||
mov [filestruct2.offset], 0
|
||||
mov [filestruct2.size], 0
|
||||
mov [filestruct2.ptr], folder_buf
|
||||
mov [filestruct2.name], buf_cmd+5
|
||||
mcall 70, filestruct2
|
||||
mcall SF_FILE, filestruct2
|
||||
test eax, eax
|
||||
jz @f
|
||||
cmp eax, 2
|
||||
@@ -205,10 +205,10 @@ cmd_lcwd:
|
||||
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:
|
||||
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
|
||||
|
||||
jmp wait_for_usercommand
|
||||
|
@@ -1,209 +0,0 @@
|
||||
; Now being rewritten from https://github.com/nayuki/QR-Code-generator/blob/master/c/qrcodegen.c
|
||||
|
||||
; __DEBUG__ = 1
|
||||
; __DEBUG_LEVEL__ = DBG_ALL
|
||||
; DBG_ALL = 0 ; all messages
|
||||
; DBG_INFO = 1 ; info and errors
|
||||
; DBG_ERR = 2 ; only errors
|
||||
|
||||
include '../../proc32.inc'
|
||||
include '../../struct.inc'
|
||||
include '../../if.inc'
|
||||
; include '../../debug-fdo.inc'
|
||||
|
||||
; The error correction level in a QR Code symbol.
|
||||
qrcodegen_Ecc_LOW = 0 ; The QR Code can tolerate about 7% erroneous codewords
|
||||
qrcodegen_Ecc_MEDIUM = 1 ; The QR Code can tolerate about 15% erroneous codewords
|
||||
qrcodegen_Ecc_QUARTILE = 2 ; The QR Code can tolerate about 25% erroneous codewords
|
||||
qrcodegen_Ecc_HIGH = 3 ; The QR Code can tolerate about 30% erroneous codewords
|
||||
|
||||
; The mask pattern used in a QR Code symbol.
|
||||
;
|
||||
; A special value to tell the QR Code encoder to
|
||||
; automatically select an appropriate mask pattern:
|
||||
qrcodegen_Mask_AUTO = -1
|
||||
; The eight actual mask patterns:
|
||||
qrcodegen_Mask_0 = 0
|
||||
qrcodegen_Mask_1 = 1
|
||||
qrcodegen_Mask_2 = 2
|
||||
qrcodegen_Mask_3 = 3
|
||||
qrcodegen_Mask_4 = 4
|
||||
qrcodegen_Mask_5 = 5
|
||||
qrcodegen_Mask_6 = 6
|
||||
qrcodegen_Mask_7 = 7
|
||||
|
||||
; Describes how a segment's data bits are interpreted.
|
||||
qrcodegen_Mode_NUMERIC = 0x1
|
||||
qrcodegen_Mode_ALPHANUMERIC = 0x2
|
||||
qrcodegen_Mode_BYTE = 0x4
|
||||
qrcodegen_Mode_KANJI = 0x8
|
||||
qrcodegen_Mode_ECI = 0x7
|
||||
|
||||
; A segment of character/binary/control data in a QR Code symbol.
|
||||
; The mid-level way to create a segment is to take the payload data
|
||||
; and call a factory function such as qrcodegen_makeNumeric().
|
||||
; The low-level way to create a segment is to custom-make the bit buffer
|
||||
; and initialize a qrcodegen_Segment struct with appropriate values.
|
||||
; Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
|
||||
; Any segment longer than this is meaningless for the purpose of generating QR Codes.
|
||||
; Moreover, the maximum allowed bit length is 32767 because
|
||||
; the largest QR Code (version 40) has 31329 modules.
|
||||
struct qrcodegen_Segment
|
||||
; The mode indicator of this segment.
|
||||
mode dd ? ; qrcodegen_Mode
|
||||
|
||||
; The length of this segment's unencoded data. Measured in characters for
|
||||
; numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
|
||||
; Always zero or positive. Not the same as the data's bit length.
|
||||
numChars dd ?
|
||||
|
||||
; The data bits of this segment, packed in bitwise big endian.
|
||||
; Can be null if the bit length is zero.
|
||||
data dd ?
|
||||
|
||||
; The number of valid data bits used in the buffer. Requires
|
||||
; 0 <= bitLength <= 32767, and bitLength <= (capacity of data array) * 8.
|
||||
; The character count (numChars) must agree with the mode and the bit buffer length.
|
||||
bitLength dd ?
|
||||
ends
|
||||
|
||||
; The minimum version number supported in the QR Code Model 2 standard
|
||||
qrcodegen_VERSION_MIN = 1
|
||||
; The maximum version number supported in the QR Code Model 2 standard
|
||||
qrcodegen_VERSION_MAX = 40
|
||||
|
||||
; Calculates the number of bytes needed to store any QR Code up to and including the given version number,
|
||||
; as a compile-time constant. For example, 'uint8_t buffer[qrcodegen_BUFFER_LEN_FOR_VERSION(25)];'
|
||||
; can store any single QR Code from version 1 to 25 (inclusive). The result fits in an int (or int16).
|
||||
; Requires qrcodegen_VERSION_MIN <= n <= qrcodegen_VERSION_MAX.
|
||||
; TODO make this fasm macro:
|
||||
; #define qrcodegen_BUFFER_LEN_FOR_VERSION(n) ((((n) * 4 + 17) * ((n) * 4 + 17) + 7) / 8 + 1)
|
||||
|
||||
; The worst-case number of bytes needed to store one QR Code, up to and including
|
||||
; version 40. This value equals 3918, which is just under 4 kilobytes.
|
||||
; Use this more convenient value to avoid calculating tighter memory bounds for buffers.
|
||||
; TODO make this fasm macro:
|
||||
; #define qrcodegen_BUFFER_LEN_MAX qrcodegen_BUFFER_LEN_FOR_VERSION(qrcodegen_VERSION_MAX)
|
||||
|
||||
INT16_MAX = 32767
|
||||
|
||||
; Sentinel value for use in only some functions
|
||||
LENGTH_OVERFLOW = -1
|
||||
|
||||
; Based on the table ECC_CODEWORDS_PER_BLOCK
|
||||
qrcodegen_REED_SOLOMON_DEGREE_MAX = 30
|
||||
|
||||
; For automatic mask pattern selection.
|
||||
PENALTY_N1 = 3
|
||||
PENALTY_N2 = 3
|
||||
PENALTY_N3 = 40
|
||||
PENALTY_N4 = 10
|
||||
|
||||
|
||||
; CODE:
|
||||
|
||||
proc qrcodegen_encodeBinary, dataAndTemp, dataLen, qrcode, ecl, minVersion, maxVersion, mask, boostEcl
|
||||
locals
|
||||
seg qrcodegen_Segment
|
||||
endl
|
||||
mov [seg + qrcodegen_Segment.mode], qrcodegen_Mode_BYTE
|
||||
stdcall calcSegmentBitLength, [seg + qrcodegen_Segment.mode], [dataLen]
|
||||
mov [seg + qrcodegen_Segment.bitLength], eax
|
||||
.if [seg + qrcodegen_Segment.bitLength] = LENGTH_OVERFLOW
|
||||
mov byte [qrcode + 0], 0 ; Set size to invalid value for safety
|
||||
jmp .ret
|
||||
.endif
|
||||
mov eax, [dataLen]
|
||||
mov [seg + qrcodegen_Segment.numChars], eax
|
||||
mov eax, [dataAndTemp]
|
||||
mov [seg + qrcodegen_Segment.data], eax
|
||||
lea eax, [seg]
|
||||
stdcall qrcodegen_encodeSegmentsAdvanced, eax, 1, [ecl], [minVersion], [maxVersion], [mask], [boostEcl], [dataAndTemp], [qrcode]
|
||||
.ret:
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
|
||||
; Returns the number of data bits needed to represent a segment
|
||||
; containing the given number of characters using the given mode. Notes:
|
||||
; - Returns LENGTH_OVERFLOW on failure, i.e. numChars > INT16_MAX
|
||||
; or the number of needed bits exceeds INT16_MAX (i.e. 32767).
|
||||
; - Otherwise, all valid results are in the range [0, INT16_MAX].
|
||||
; - For byte mode, numChars measures the number of bytes, not Unicode code points.
|
||||
; - For ECI mode, numChars must be 0, and the worst-case number of bits is returned.
|
||||
; An actual ECI segment can have shorter data. For non-ECI modes, the result is exact.
|
||||
|
||||
proc calcSegmentBitLength uses edx ebx, mode, numChars
|
||||
.if [numChars] > INT16_MAX
|
||||
mov eax, LENGTH_OVERFLOW
|
||||
jmp .ret
|
||||
.endif
|
||||
mov eax, [numChars]
|
||||
.if [mode] = qrcodegen_Mode_NUMERIC
|
||||
; eax = ceil(10/3 * n)
|
||||
xor edx, edx
|
||||
mov ebx, 10
|
||||
mul ebx
|
||||
add eax, 2
|
||||
mov ebx, 3
|
||||
div eax, ebx
|
||||
.elseif [mode] = qrcodegen_Mode_ALPHANUMERIC
|
||||
; eax = ceil(11/2 * n)
|
||||
xor edx, edx
|
||||
mov ebx, 11
|
||||
mul eax, ebx
|
||||
inc eax
|
||||
mov ebx, 2
|
||||
div eax, ebx
|
||||
.elseif [mode] = qrcodegen_Mode_BYTE
|
||||
shl eax, 3 ; *8
|
||||
.elseif [mode] = qrcodegen_Mode_KANJI
|
||||
xor edx, edx
|
||||
mov ebx, 13
|
||||
mul ebx
|
||||
.elseif [mode] = qrcodegen_Mode_ECI
|
||||
.if [numChars] = 0
|
||||
mov eax, 3*8
|
||||
.endif
|
||||
.else ; Invalid argument
|
||||
mov eax, LENGTH_OVERFLOW
|
||||
jmp .ret
|
||||
.endif
|
||||
; TODO assert(result >= 0)
|
||||
.if eax > INT16_MAX
|
||||
mov eax, LENGTH_OVERFLOW
|
||||
.endif
|
||||
.ret:
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
|
||||
; DATA:
|
||||
|
||||
; include_debug_strings
|
||||
|
||||
; The set of all legal characters in alphanumeric mode, where each character
|
||||
; value maps to the index in the string. For checking text and encoding segments.
|
||||
ALPHANUMERIC_CHARSET db "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",0
|
||||
|
||||
; For generating error correction codes.
|
||||
ECC_CODEWORDS_PER_BLOCK db \
|
||||
\ ; Version: (note that index 0 is for padding, and is set to an illegal value)
|
||||
\ ; 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
|
||||
-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, \ ; Low
|
||||
-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \ ; Medium
|
||||
-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, \ ; Quartile
|
||||
-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 ; High
|
||||
|
||||
; For generating error correction codes.
|
||||
NUM_ERROR_CORRECTION_BLOCKS db \
|
||||
\ ; Version: (note that index 0 is for padding, and is set to an illegal value)
|
||||
\ ; 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
|
||||
-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25, \ ; Low
|
||||
-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49, \ ; Medium
|
||||
-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68, \ ; Quartile
|
||||
-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81 ; High
|
||||
|
||||
|
Reference in New Issue
Block a user