Compare commits

..

31 Commits

Author SHA1 Message Date
32466e31f4 programs/shell: Show new fields of the sf18.13 struct
Kfetch command now reports
 - kernel ABI,
 - git hash (aka commit id),
 - release offset,
 - debug tag.

No svn revision anymore.
2025-03-17 23:22:45 +01:00
63cd6f0ac8 Movback: Added support window resizing 2025-03-17 22:31:37 +01:00
4fcc17675c Movback: Deleted trunk dir. Files moved 2025-03-17 22:31:37 +01:00
4e903ce12b kiv: show image bpp in win header 2025-03-17 22:24:04 +01:00
bfdb42c91f Tube: fix crash at some window sizes, remove outdated code with palette 2025-03-17 22:07:11 +02:00
55d641b0da kernel: Clean up svn-related code and data
* Rearrange sf18.13 version structure to
  + mention git hash and release offset,
  + separate OS release and kernel ABI numbers,
  + include an optional debug tag.
* Update the boot log and the blue screen to print the new fields.
* Update docs.
* No breaking changes.

Resolves #99.
2025-03-17 20:07:46 +01:00
0e7cff0715 ci: setup environment variables
ref: #146
Toolchain container was updated and fasm now in /home/autobuild/...
folder
2025-03-17 19:10:23 +01:00
4d30fd7a2b Eolite 5.29: Fixed bug in "Apply to all files?" dialog
- line height can no longer be smaller than icon size;
- fixed bug with edit box activation under "Apply to all files?" dialog;
- updated dates;
- fixed kfont initialization.
2025-03-17 18:22:15 +03:00
292bd1d739 webview 3.85: fix a specific case when col width was calculated wrong 2025-03-17 11:50:17 +01:00
1a756358f5 webview 3.84
- tagicon support
- draw_buf => BufIsInvalid() add check
2025-03-17 11:50:17 +01:00
009c0d0519 webview-3.83
- fixed collection.h that caused webview crash
- fix rolled-up bug
- add special symbol from builds.kolibrios.org/status.html
2025-03-17 11:50:17 +01:00
bab6267412 Boxlib: fix write null pointer in editbox 2025-03-17 10:55:32 +01:00
72196f42de Palitra(branch): UI and code refactoring. Fix a lot of issues (#154)
- Fixed the ID of the buttons, made the window always on top;
- Removed the visible rectangle when clicking on the palette;
- Fixed the position of the picker and palette buttons.

Reviewed-on: KolibriOS/kolibrios#154
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-03-17 10:54:19 +01:00
f1e958af41 Firework: fix and optimize window resizing 2025-03-17 01:09:45 +03:00
rgimad
78de535233 Apps/dbgboard: fix critical bug with stack overflow 2025-03-16 19:50:12 +01:00
e353771faa Pipet: Rewrite from C-- to FASM
- Rewritten from C-- to FASM
- Function to select not a single pixel, but a 7*7 rect from screen;
- Function to select each pixel from selected rect;
- Updated UX/UI.

Co-authored-by: leency <lipatov.kiril@gmail.com>
2025-03-16 13:17:33 +02:00
714cc0a65c cmm menu: fix marker 2025-03-15 23:28:13 +01:00
9357a21169 Plasma: Fix code style and added support for window resizing 2025-03-15 23:02:16 +01:00
75e732a437 Apps/plasma: Deleted trunk dir. Files moved 2025-03-15 23:02:16 +01:00
afd07534ab Apps/fire: Improved code style and readability 2025-03-15 22:31:23 +01:00
20aba254bc Apps/firework: Added support for window resizing 2025-03-15 22:35:09 +02:00
fbd99c82a4 Apps/firework: Improved code style and readability 2025-03-15 19:48:49 +02:00
784b02b4a4 3dcube: get rid of unnecessary files, refined build.bat and tupfile 2025-03-15 14:54:46 +01:00
rgimad
7a2e48bed2 Flip the bird in kfetch command (#144)
Co-authored-by:  Burer <taldariner@gmail.com>
Reviewed-on: KolibriOS/kolibrios#144
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: rgimad <33692565+rgimad@users.noreply.github.com>
Co-committed-by: rgimad <33692565+rgimad@users.noreply.github.com>
2025-03-14 23:44:53 +01:00
31ca1c76bb Apps/unvwater: Added support for window resizing 2025-03-15 00:56:49 +03:00
99ddd88ff8 Apps/unvwater: Improved code style and readability 2025-03-14 22:41:51 +01:00
4f1a8ef9a1 kf_font_viewer gets to be a part of syspanel
Syspanel gets bigger in less than 1 sector and we still have kf viewer in the IMG
2025-03-14 21:31:22 +01:00
93f12c7673 allow applications to work nicely without .kf files 2025-03-14 21:10:49 +01:00
Burer
3eb02af5fd [Other/Data] Optimized all .png images in repo using optipng -o7 2025-03-14 20:46:32 +01:00
rgimad
83d8146ad1 Apps/dbgboard: fix comments 2025-03-13 21:31:10 +03:00
rgimad
1974f45c50 Apps/dbgboard: add display modes and more highlighting 2025-03-13 17:24:09 +03:00
103 changed files with 1853 additions and 2383 deletions

View File

@@ -28,6 +28,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get describe - name: Get describe
id: vars id: vars
@@ -77,6 +79,7 @@ jobs:
- name: Build and install kerpack - name: Build and install kerpack
if: steps.cache-toolchain.outputs.cache-hit != 'true' if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: | run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH
cd ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/ cd ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/
make make
chmod +x kerpack chmod +x kerpack
@@ -85,6 +88,7 @@ jobs:
- name: Build and install kpack - name: Build and install kpack
if: steps.cache-toolchain.outputs.cache-hit != 'true' if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: | run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH
cd ${{ gitea.workspace }}/programs/other/kpack/linux/ cd ${{ gitea.workspace }}/programs/other/kpack/linux/
bash build.sh bash build.sh
chmod +x kpack chmod +x kpack
@@ -144,6 +148,7 @@ jobs:
- name: (en_US) Build KolibriOS - name: (en_US) Build KolibriOS
run: | run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH export PATH=/home/autobuild/tools/win32/bin:$PATH
source kos32-export-env-vars ${{ gitea.workspace }}
tup build-en_US tup build-en_US
- name: (en_US) Upload floppy image - name: (en_US) Upload floppy image
@@ -168,6 +173,7 @@ jobs:
- name: (ru_RU) Build KolibriOS - name: (ru_RU) Build KolibriOS
run: | run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH export PATH=/home/autobuild/tools/win32/bin:$PATH
source kos32-export-env-vars ${{ gitea.workspace }}
tup build-ru_RU tup build-ru_RU
- name: (ru_RU) Upload floppy image - name: (ru_RU) Upload floppy image
@@ -192,6 +198,7 @@ jobs:
- name: (es_ES) Build KolibriOS - name: (es_ES) Build KolibriOS
run: | run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH export PATH=/home/autobuild/tools/win32/bin:$PATH
source kos32-export-env-vars ${{ gitea.workspace }}
tup build-es_ES tup build-es_ES
- name: (es_ES) Upload floppy image - name: (es_ES) Upload floppy image

View File

@@ -456,14 +456,14 @@ tup.append_table(img_files, {
{"DEMOS/BCDCLK", VAR_PROGS .. "/demos/bcdclk/trunk/bcdclk"}, {"DEMOS/BCDCLK", VAR_PROGS .. "/demos/bcdclk/trunk/bcdclk"},
{"DEMOS/BUDHBROT", VAR_PROGS .. "/demos/buddhabrot/trunk/buddhabrot"}, {"DEMOS/BUDHBROT", VAR_PROGS .. "/demos/buddhabrot/trunk/buddhabrot"},
{"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/trunk/eyes"}, {"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/trunk/eyes"},
{"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/trunk/firework"}, {"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/firework"},
{"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/trunk/movback"}, {"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/movback"},
{"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/trunk/plasma"}, {"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/plasma"},
{"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"}, {"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"},
{"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"}, {"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"},
{"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"}, {"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"},
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"}, {"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"},
{"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/trunk/unvwater"}, {"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/unvwater"},
{"DEMOS/WEB", VAR_PROGS .. "/demos/web/trunk/web"}, {"DEMOS/WEB", VAR_PROGS .. "/demos/web/trunk/web"},
{"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/trunk/zeroline"}, {"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/trunk/zeroline"},
{"DEVELOP/BOARD", VAR_PROGS .. "/system/board/trunk/board"}, {"DEVELOP/BOARD", VAR_PROGS .. "/system/board/trunk/board"},
@@ -474,6 +474,7 @@ tup.append_table(img_files, {
{"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"}, {"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"},
{"DEVELOP/FASM", VAR_PROGS .. "/develop/fasm/1.73/fasm"}, {"DEVELOP/FASM", VAR_PROGS .. "/develop/fasm/1.73/fasm"},
{"DEVELOP/GENFILES", VAR_PROGS .. "/testing/genfiles/GenFiles"}, {"DEVELOP/GENFILES", VAR_PROGS .. "/testing/genfiles/GenFiles"},
{"DEVELOP/PIPET", VAR_PROGS .. "/other/pipet/pipet"},
{"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/trunk/h2d2b"}, {"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/trunk/h2d2b"},
{"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/trunk/heed"}, {"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/trunk/heed"},
{"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"}, {"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"},
@@ -669,7 +670,6 @@ tup.append_table(img_files, {
{"TMPDISK", VAR_PROGS .. "/cmm/tmpdisk/tmpdisk.com"}, {"TMPDISK", VAR_PROGS .. "/cmm/tmpdisk/tmpdisk.com"},
{"DEVELOP/CLIPVIEW", VAR_PROGS .. "/cmm/clipview/clipview.com"}, {"DEVELOP/CLIPVIEW", VAR_PROGS .. "/cmm/clipview/clipview.com"},
{"DEVELOP/MENU", VAR_PROGS .. "/cmm/menu/menu.com"}, {"DEVELOP/MENU", VAR_PROGS .. "/cmm/menu/menu.com"},
{"DEVELOP/PIPET", VAR_PROGS .. "/cmm/misc/pipet.com"},
{"File Managers/EOLITE", VAR_PROGS .. "/cmm/eolite/Eolite.com"}, {"File Managers/EOLITE", VAR_PROGS .. "/cmm/eolite/Eolite.com"},
{"File Managers/KFM2", VAR_PROGS .. "/cmm/misc/kfm2.com"}, {"File Managers/KFM2", VAR_PROGS .. "/cmm/misc/kfm2.com"},
{"DEVELOP/DIFF", VAR_PROGS .. "/cmm/diff/diff.com"}, {"DEVELOP/DIFF", VAR_PROGS .. "/cmm/diff/diff.com"},
@@ -694,7 +694,6 @@ tup.append_table(extra_files, {
{"kolibrios/utils/notes", VAR_PROGS .. "/cmm/notes/notes.com"}, {"kolibrios/utils/notes", VAR_PROGS .. "/cmm/notes/notes.com"},
{"kolibrios/utils/osupdate", VAR_PROGS .. "/cmm/misc/osupdate.com"}, {"kolibrios/utils/osupdate", VAR_PROGS .. "/cmm/misc/osupdate.com"},
{"kolibrios/utils/quark", VAR_PROGS .. "/cmm/quark/quark.com"}, {"kolibrios/utils/quark", VAR_PROGS .. "/cmm/quark/quark.com"},
{"kolibrios/utils/kf_view", VAR_PROGS .. "/cmm/kf_font_viewer/font_viewer.com"},
}) })
end -- tup.getconfig('NO_CMM') ~= 'full' end -- tup.getconfig('NO_CMM') ~= 'full'
@@ -891,10 +890,6 @@ for i,v in ipairs(img_files) do
str = string.gsub(str, "%%", "%%%%") -- escape % as %% str = string.gsub(str, "%%", "%%%%") -- escape % as %%
cmd += " && str=" .. str cmd += " && str=" .. str
cmd += ' && echo -n $str | dd status=none of=%o bs=1 seek=`expr 274 - length "$str"` conv=notrunc' cmd += ' && echo -n $str | dd status=none of=%o bs=1 seek=`expr 274 - length "$str"` conv=notrunc'
str2='$(get-current-cmtid|grep -oE "\\+[0-9]+")'
str2 = string.gsub(str2, "%$", "\\$") -- escape $ as \$
cmd += " && str2=" .. str2
cmd += ' && echo -n $str2 | dd status=none of=%o bs=1 seek=216 conv=notrunc'
end end
local_file = VAR_KERNEL .. "/.kernel.mnt" local_file = VAR_KERNEL .. "/.kernel.mnt"
tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}} tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -79,7 +79,7 @@ next=$TextEditor
[Assoc] [Assoc]
/=/sys/file managers/eolite /=/sys/file managers/eolite
kf=/kolibrios/utils/kf_view kf=/sys/syspanel
txt=$CodeEdit txt=$CodeEdit
log=$CodeEdit log=$CodeEdit

View File

@@ -3,10 +3,25 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../programs" or tup.getco
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())
-- environment variables
tup.import("KOLIBRIOS_BUILD_OFFSET") -- 1234
tup.import("KOLIBRIOS_BUILD_CMTID") -- 0xaabbccdd
tup.import("KOLIBRIOS_BUILD_DBGTAG") -- 0x61 for 'a', etc
str_build = ""
if KOLIBRIOS_BUILD_OFFSET then
str_build += " -dBUILD_OFFSET=" .. KOLIBRIOS_BUILD_OFFSET
end
if KOLIBRIOS_BUILD_CMTID then
str_build += " -dBUILD_CMTID=" .. KOLIBRIOS_BUILD_CMTID
end
if KOLIBRIOS_BUILD_DBGTAG then
str_build += " -dBUILD_DBGTAG=" .. KOLIBRIOS_BUILD_DBGTAG
end
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"}) tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o " .. tup.getconfig("KERPACK_CMD"), "kernel.mnt") tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -s %o.fas" .. str_build .. tup.getconfig("KERPACK_CMD"), {"kernel.mnt", extra_outputs = {"kernel.mnt.fas"}})
--tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -s %o.fas" .. tup.getconfig("KERPACK_CMD"), {"kernel.mnt", extra_outputs = {"kernel.mnt.fas"}})
--tup.rule({"kernel.mnt.fas", extra_inputs = {"kernel.mnt"}}, "symbols %f %o", "kernel.mnt.sym") --tup.rule({"kernel.mnt.fas", extra_inputs = {"kernel.mnt"}}, "symbols %f %o", "kernel.mnt.sym")
--tup.rule({"kernel.mnt.fas", extra_inputs = {"kernel.mnt"}}, "listing %f %o", "kernel.mnt.lst") --tup.rule({"kernel.mnt.fas", extra_inputs = {"kernel.mnt"}}, "listing %f %o", "kernel.mnt.lst")
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -dextended_primary_loader=1" .. tup.getconfig("KERPACK_CMD"), "kernel.mnt.ext_loader") tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o " .. str_build .. " -dextended_primary_loader=1 " .. tup.getconfig("KERPACK_CMD"), "kernel.mnt.ext_loader")
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -dpretest_build=1 -ddebug_com_base=0xe9", "kernel.mnt.pretest") tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o " .. str_build .. " -dpretest_build=1 -ddebug_com_base=0xe9", "kernel.mnt.pretest")

View File

@@ -29,23 +29,29 @@ macro line_space {
} }
d80x25_top: d80x25_top:
line_full_top line_full_top
if __REV__ > 0 ; draw seven digits of the git hash
__x = BUILD_CMTID
if __x > 0
__x = __x SHR 4
cur_line_pos = 75 cur_line_pos = 75
store byte ' ' at d80x25_top+cur_line_pos+1 store byte ' ' at d80x25_top+cur_line_pos+1
rev_var = __REV__ repeat 7
while rev_var > 0 digit = __x AND 0xf
store byte rev_var mod 10 + '0' at d80x25_top+cur_line_pos if digit > 9
cur_line_pos = cur_line_pos - 1 digit = digit - 10 + 'a'
rev_var = rev_var / 10 else
end while digit = digit + '0'
store byte ' ' at d80x25_top+cur_line_pos end if
store dword ' SVN' at d80x25_top+cur_line_pos-4 store byte digit at d80x25_top+cur_line_pos
cur_line_pos = cur_line_pos - 1
__x = __x SHR 4
end repeat
store byte ' ' at d80x25_top+cur_line_pos
store dword ' GIT' at d80x25_top+cur_line_pos-4
end if end if
space_msg: space_msg:
line_space line_space
verstr: verstr:
; line_space
; version string ; version string
db 186,32 db 186,32
repeat 78 repeat 78

View File

@@ -24,9 +24,38 @@ org 0
; struct kernel_header ; struct kernel_header
jmp start_of_code ; jump jmp start_of_code ; jump
db 'KolibriOS ' ; signature db 'KolibriOS ' ; signature
db 'v0.7.7.0 ',13,10,13,10,0 ; FIXME: get distribution version from git tag db 'v0.7.7.0' ; FIXME: get distribution version from git tag?
.offset db ' ',13,10,0
dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point
cur_line_pos = 0
offset_len = 0
__x = BUILD_OFFSET
if __x > 0
store byte '+' at .offset+cur_line_pos
if __x < 10
offset_len = 2 ; '+' and a digit
else if __x < 100
offset_len = 3
else if __x < 1000
offset_len = 4
else if __x < 10000
offset_len = 5
else
offset_len = 6
end if
cur_line_pos = cur_line_pos + offset_len - 1
while __x > 0
store byte __x mod 10 + '0' at .offset+cur_line_pos
cur_line_pos = cur_line_pos - 1
__x = __x / 10
end while
end if
if BUILD_DBGTAG > 0
store byte '-' at .offset+offset_len
store byte BUILD_DBGTAG at .offset+offset_len+1
end if
include "boot/bootstr.inc" ; language-independent boot messages include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc" include "boot/preboot.inc"

View File

@@ -227,6 +227,33 @@ struct kernel_header
; KERNEL.MNT file can be booted on BIOS as well as on UEFI. ; KERNEL.MNT file can be booted on BIOS as well as on UEFI.
ends ends
struct kernel_version
; OS release number, e.g. 0,7,7,0. Distro-specific.
osrel rb 4
; A single char like 'a' to append to the version, or 0 to omit it.
; 0 means 0.7.7.0+1234, 'a' means 0.7.7.0+1234-a, etc.
; This allows developers to determine the debug build by its log.
; Unfortunately, users sometimes mess things and test not the build they
; were asked to test.
dbgtag db ?
; The kernel itself doesn't have any version other than its ABI version.
; The minor and major parts were meant to mean significant compatible
; and incompatible changes correspondingly. It is for a developer to
; decide on what is a significant change.
abimin db ?
; The major ABI version must be at least 0x28 for backward compatibility
; with the old revision number: 0x2800 = 10240 > the last SVN revision.
abimaj dw ?
; In binary, e.g. a short git hash. A single dword is 8 digits which
; should be enough for the foreseeable future. We always can get space
; for four more digits from the two reserved bytes below if needed.
cmtid dd ?
reserved dw ?
; The number of commits from the last release.
offset dw ?
ends
assert sizeof.kernel_version = 16
DRIVE_DATA_SIZE = 16 DRIVE_DATA_SIZE = 16
OS_BASE = 0x80000000 OS_BASE = 0x80000000

View File

@@ -970,13 +970,21 @@ picture rb Xsize*Ysize*4 ; 32 бита
размером 16 байт для будущей совместимости, в будущем могут быть размером 16 байт для будущей совместимости, в будущем могут быть
добавлены некоторые поля. добавлены некоторые поля.
Структура буфера: Структура буфера:
db a,b,c,d для версии a.b.c.d db a,b,c,d для версии ОС a.b.c.d
db 0: зарезервировано db отладочная метка, для релиза всегда 0, иначе любой символ ASCII
dd REV - номер svn-ревизии ядра db младшая часть ABI ядра
Для ядра Kolibri 0.7.7.0+: dw старшая часть ABI ядра
dd идентификатор коммита, например краткий git-хэш в бинарном виде
dw зарезервировано
dw количество коммитов с момента последнего релиза
Пример структуры для ядра Kolibri 0.7.7.0+:
db 0,7,7,0 db 0,7,7,0
db 0 db 0
dd 1675 db 0
dw 40
dd 0xf26d5b28
dw 0
dw 1675
---------------------- Константы для регистров: ---------------------- ---------------------- Константы для регистров: ----------------------
eax - SF_SYSTEM (18) eax - SF_SYSTEM (18)

View File

@@ -962,13 +962,21 @@ Remarks:
16 byte buffer for the future compatibility, in the future 16 byte buffer for the future compatibility, in the future
some fields can be added. some fields can be added.
Structure of the buffer: Structure of the buffer:
db a,b,c,d for version a.b.c.d db a,b,c,d for os version a.b.c.d
db 0: reserved db debug tag, 0 for release, any ASCII char otherwise
dd REV - kernel SVN revision number db kernel ABI minor
For Kolibri 0.7.7.0+ kernel: dw kernel ABI major
dd commit id, e.g. short git hash in binary
dw reserved
dw the number of commits since the latest release
For Kolibri 0.7.7.0+ the structure is like this:
db 0,7,7,0 db 0,7,7,0
db 0 db 0
dd 1675 db 0
dw 40
dd 0xf26d5b28
dw 0
dw 1675
---------------------- Constants for registers: ---------------------- ---------------------- Constants for registers: ----------------------
eax - SF_SYSTEM (18) eax - SF_SYSTEM (18)

View File

@@ -30,6 +30,8 @@ format binary as "mnt"
include 'macros.inc' include 'macros.inc'
include 'struct.inc' include 'struct.inc'
ABI_MAJOR = 0x28
ABI_MINOR = 0
USE_COM_IRQ = 1 ; make irq 3 and irq 4 available for PCI devices USE_COM_IRQ = 1 ; make irq 3 and irq 4 available for PCI devices
VESA_1_2_VIDEO = 0 ; enable vesa 1.2 bank switch functions VESA_1_2_VIDEO = 0 ; enable vesa 1.2 bank switch functions
@@ -711,10 +713,33 @@ end if
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; show SVN version of kernel on the message board ; show OS version, offset, debug tag and commit id on the message board
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
mov eax, [version_inf.rev] mov eax, version_inf.osrel
DEBUGF 1, "K : kernel SVN r%d\n", eax DEBUGF 1, "K : OS version: %u.%u.%u.%u", [eax+0]:1, [eax+1]:1, \
[eax+2]:1, [eax+3]:1, ecx
movzx ecx, [version_inf.offset]
jecxz @f
DEBUGF 1, "+%u", ecx
@@:
movzx ecx, [version_inf.dbgtag]
jecxz @f
push ecx
mov ecx, esp
DEBUGF 1, "-%s", ecx
pop ecx
@@:
DEBUGF 1, "\n"
mov ecx, [version_inf.cmtid]
jecxz @f
DEBUGF 1, "K : Commit ID: %x\n", ecx
@@:
;-----------------------------------------------------------------------------
; show kernel ABI
;-----------------------------------------------------------------------------
movzx eax, [version_inf.abimaj]
movzx ecx, [version_inf.abimin]
DEBUGF 1, "K : Kernel ABI: %u.%u\n", eax, ecx
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; show CPU count on the message board ; show CPU count on the message board
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
@@ -2102,12 +2127,12 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_getversion: ; 18.13 = get kernel ID and version sysfn_getversion: ; 18.13 = get kernel ID and version
; if given memory address belongs to kernel then error ; if given memory address belongs to kernel then error
stdcall is_region_userspace, ecx, version_inf.size stdcall is_region_userspace, ecx, sizeof.kernel_version
jnz .addr_error jnz .addr_error
mov edi, ecx mov edi, ecx
mov esi, version_inf mov esi, version_inf
mov ecx, version_inf.size mov ecx, sizeof.kernel_version
rep movsb rep movsb
ret ret
.addr_error: ; if given memory address is illegal .addr_error: ; if given memory address is illegal
@@ -2287,11 +2312,18 @@ sound_flag db 0
endg endg
iglobal iglobal
version_inf: if ~ definite BUILD_DBGTAG
db 0,7,7,0 ; FIXME: Get distribution version from git tag BUILD_DBGTAG = 0
db 0 end if
.rev dd __REV__ if ~ definite BUILD_CMTID
.size = $ - version_inf BUILD_CMTID = 0
end if
if ~ definite BUILD_OFFSET
BUILD_OFFSET = 0
end if
align 4
version_inf kernel_version <0,7,7,0>, BUILD_DBGTAG, ABI_MINOR, ABI_MAJOR, \
BUILD_CMTID, 0, BUILD_OFFSET
endg endg
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
@@ -4457,8 +4489,6 @@ end if
include "data32.inc" include "data32.inc"
__REV__ = __REV
if ~ lang eq es_ES if ~ lang eq es_ES
diff16 "end of kernel code",0,$ diff16 "end of kernel code",0,$
end if end if

View File

@@ -5,16 +5,6 @@
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
__REV = 0
macro $Revision a {
match =: Num =$,a \{
if __REV < Num
__REV = Num
end if
\}
}
;// mike.dld, 2006-29-01 [ ;// mike.dld, 2006-29-01 [
; macros definition ; macros definition

View File

@@ -68,6 +68,7 @@ struct TWebBrowser {
void tag_a(); void tag_a();
void tag_p(); void tag_p();
void tag_img(); void tag_img();
void tag_kosicon();
void tag_div(); void tag_div();
void tag_h1234_caption(); void tag_h1234_caption();
void tag_ol_ul_dt(); void tag_ol_ul_dt();
@@ -176,7 +177,7 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
} }
} }
if (ESBYTE[bufpos] == '&') { if (ESBYTE[bufpos] == '&') {
bufpos = GetUnicodeSymbol(#linebuf, sizeof(TWebBrowser.linebuf), bufpos+1, bufpointer+bufsize); bufpos = GetUnicodeSymbol(#linebuf, sizeof(TWebBrowser.linebuf)-1, bufpos+1, bufpointer+bufsize);
continue; continue;
} }
if (ESBYTE[bufpos] == '<') && (is_html) { if (ESBYTE[bufpos] == '<') && (is_html) {

View File

@@ -67,7 +67,7 @@ bool _tag::parse(dword _bufpos, bufend)
if (!whitepos) || (whitepos > closepos) { if (!whitepos) || (whitepos > closepos) {
//no param //no param
strncpy(#name, bufpos, math.min(closepos - bufpos, sizeof(tag.name))); strncpy(#name, bufpos, math.min(closepos - bufpos, sizeof(tag.name)-1));
bufpos = closepos; bufpos = closepos;
} else { } else {
//we have param //we have param
@@ -76,7 +76,7 @@ bool _tag::parse(dword _bufpos, bufend)
if (openpos < strchr(closepos+1, '>')) break; if (openpos < strchr(closepos+1, '>')) break;
if (!closepos = EAX) {closepos = bufend;break;} if (!closepos = EAX) {closepos = bufend;break;}
} }
strncpy(#name, bufpos, math.min(whitepos - bufpos, sizeof(tag.name))); strncpy(#name, bufpos, math.min(whitepos - bufpos, sizeof(tag.name)-1));
bufpos = closepos; bufpos = closepos;
params = malloc(closepos - whitepos + 1); params = malloc(closepos - whitepos + 1);

View File

@@ -151,7 +151,7 @@ bool TWebBrowser::RenderImage(dword cur_img)
int img_x, img_y, img_w, img_h; int img_x, img_y, img_w, img_h;
dword imgbuf[44]; dword imgbuf[44];
if (!cur_img) return false; if (!cur_img) || (!buf_data) return false;
img_h = ESDWORD[cur_img+8]; img_h = ESDWORD[cur_img+8];
img_w = ESDWORD[cur_img+4]; img_w = ESDWORD[cur_img+4];

View File

@@ -10,6 +10,7 @@ void TWebBrowser::SetStyle()
if (tag.is("a")) { tag_a(); return; } if (tag.is("a")) { tag_a(); return; }
if (tag.is("p")) { tag_p(); return; } if (tag.is("p")) { tag_p(); return; }
if (tag.is("img")) { tag_img(); return; } if (tag.is("img")) { tag_img(); return; }
if (tag.is("kosicon")) { tag_kosicon(); return; }
if (tag.is("div")) { tag_div(); return; } if (tag.is("div")) { tag_div(); return; }
if (tag.is("br")) { /*draw_x++;*/NewLine(); return; } if (tag.is("br")) { /*draw_x++;*/NewLine(); return; }
if (tag.is("nav")) { style.nav = tag.opened; return; } if (tag.is("nav")) { style.nav = tag.opened; return; }
@@ -266,6 +267,17 @@ void TWebBrowser::tag_h1234_caption()
} }
} }
void TWebBrowser::tag_kosicon()
{
dword imgbuf[44];
dword shared_i18 = memopen("ICONS18", NULL, SHM_READ);
if (shared_i18) && (tag.get_number_of("n")) {
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;
}
}
void TWebBrowser::tag_img() void TWebBrowser::tag_img()
{ {
@@ -305,7 +317,7 @@ void TWebBrowser::tag_img()
img_decode stdcall (cache.current_buf, cache.current_size, 0); img_decode stdcall (cache.current_buf, cache.current_size, 0);
if (EAX) goto IMGOK; else goto NOIMG; if (EAX) goto IMGOK; else goto NOIMG;
} else { } else {
img_url.add(#img_path); if (img_url.get_pos_by_name(#img_path)==-1) img_url.add(#img_path);
goto NOIMG; goto NOIMG;
} }
@@ -453,9 +465,10 @@ void TWebBrowser::tag_table()
} }
if (table.cols.get(tr_pos-1)-td_pos>1) && (tag.get_number_of("width")) { if (table.cols.get(tr_pos-1)-td_pos>1) && (tag.get_number_of("width")) {
if (strchr(tag.value, '%')) { if (strchr(tag.value, '%')) {
tag.number = cur_cell_w - table.margin - 23 - left_gap * tag.number / 100; tag.number = cur_cell_w * tag.number / 100; //
} }
if (tag.number < draw_w) draw_w = tag.number; if (tag.number < list.w - table.margin - left_gap) draw_w = tag.number;
} }
draw_y = row_start_y; draw_y = row_start_y;
td_pos++; td_pos++;

View File

@@ -66,6 +66,7 @@ char *unicode_symbols[]={
"lowast","*", "lowast","*",
"#128154","<3", "#128154","<3",
"#128545",":(",
0}; 0};

View File

@@ -79,7 +79,7 @@ char default_dir[] = "/sys";
od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" }; od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" };
char editURL[URL_SIZE+1]; char editURL[URL_SIZE+1];
edit_box omnibox_edit = {, 0, 0, 0xffffff, edit_box omnibox_edit = {250, 0, 0, 0xffffff,
0x94AECE, 0xffffff, 0xffffff,0x10000000,URL_SIZE-2,#editURL,0,,19,19}; 0x94AECE, 0xffffff, 0xffffff,0x10000000,URL_SIZE-2,#editURL,0,,19,19};
//===================================================// //===================================================//
@@ -199,7 +199,7 @@ void main()
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
ProcessMenuClick(); ProcessMenuClick();
sc.get(); sc.get();
if (Form.status_window>2) break; if (Form.status_window & ROLLED_UP) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; } if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; } if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
draw_window(); draw_window();
@@ -258,6 +258,7 @@ void main()
free(http.content_pointer); free(http.content_pointer);
GetImg(false); GetImg(false);
} }
debugln("end evNetwork");
} }
break; break;
default: default:
@@ -516,7 +517,6 @@ bool GetLocalFileData(dword _path)
bool GetUrl(dword _http_url) bool GetUrl(dword _http_url)
{ {
char new_url_full[URL_SIZE+1]; char new_url_full[URL_SIZE+1];
if (!strncmp(_http_url,"http:",5)) { if (!strncmp(_http_url,"http:",5)) {
http.get(_http_url); http.get(_http_url);
return true; return true;
@@ -571,10 +571,10 @@ void OpenPage(dword _open_URL)
//INTERNAL PAGE //INTERNAL PAGE
history.add(#new_url); history.add(#new_url);
WB1.custom_encoding = -1; WB1.custom_encoding = -1;
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)); 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)); 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 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)) { } else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
//WEB PAGE //WEB PAGE
@@ -589,7 +589,7 @@ void OpenPage(dword _open_URL)
if (!http.transfer) { if (!http.transfer) {
history.add(#new_url); history.add(#new_url);
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)); LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
} }
} else { } else {
//LOCAL PAGE //LOCAL PAGE
@@ -602,7 +602,7 @@ void OpenPage(dword _open_URL)
strcpy(#new_url, "/tmp0/1/temp/word/document.xml"); strcpy(#new_url, "/tmp0/1/temp/word/document.xml");
} }
if (!GetLocalFileData(#new_url)) { if (!GetLocalFileData(#new_url)) {
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)); LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
} }
} }
} }
@@ -712,7 +712,7 @@ void EventSubmitOmnibox()
void LoadInternalPage(dword _bufdata, _in_bufsize){ void LoadInternalPage(dword _bufdata, _in_bufsize){
if (!_bufdata) || (!_in_bufsize) { if (!_bufdata) || (!_in_bufsize) {
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)); LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
} else { } else {
WB1.list.first = 0; //scroll page to the top WB1.list.first = 0; //scroll page to the top
DrawOmnibox(); DrawOmnibox();
@@ -870,7 +870,7 @@ void DrawStatusBar(dword _msg)
{ {
dword status_y = Form.cheight - STATUSBAR_H + 4; dword status_y = Form.cheight - STATUSBAR_H + 4;
dword status_w = Form.cwidth - 90; dword status_w = Form.cwidth - 90;
if (Form.status_window>2) return; if (Form.status_window & ROLLED_UP) return;
DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work); DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work);
if (_msg) { if (_msg) {
ESI = math.min(status_w/6, strlen(_msg)); ESI = math.min(status_w/6, strlen(_msg));
@@ -920,7 +920,7 @@ dword GetAbsoluteActiveURL()
void CheckContentType() void CheckContentType()
{ {
char content_type[64]; char content_type[64];
if (http.header_field("content-type", #content_type, sizeof(content_type))) // application || image if (http.header_field("content-type", #content_type, sizeof(content_type)-1)) // application || image
if (content_type[0] == 'i') { if (content_type[0] == 'i') {
EventDownloadAndOpenImage(http.cur_url); EventDownloadAndOpenImage(http.cur_url);
@@ -968,12 +968,14 @@ dword GetImg(bool _new)
for (i = 0; i < WB1.img_url.count; i++) for (i = 0; i < WB1.img_url.count; i++)
{ {
cur_img_url = WB1.img_url.get(i); cur_img_url = WB1.img_url.get(i);
if (debug_mode)
{debug("get img: ");debugln(cur_img_url);}
if (cache.has(cur_img_url)==false) { if (cache.has(cur_img_url)==false) {
prbar.max = WB1.img_url.count; prbar.max = WB1.img_url.count;
prbar.value = i; prbar.value = i;
if (GetUrl(cur_img_url)) {DrawStatusBar(cur_img_url); DrawProgress(); return;} if (GetUrl(cur_img_url)) {
DrawStatusBar(cur_img_url);
DrawProgress();
return;
}
} }
} }
if (_new) return; if (_new) return;

View File

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

View File

@@ -2,38 +2,38 @@
<title>TEST</title> <title>TEST</title>
<style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style> <style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style>
<body> <body>
<pre><a href=//wiby.org>wiby.org</a>
<a href=//www.xlr8yourmac.com/OSX/os_x_network_cards.html>OSX network cards</a>
<a href=//macintoshgarden.org/>Macintosh Garden</a>
<table><tr><td>Simplest: <pre><h2>HTTP</h2>
<a href=//nostalgy.net.ru/>nostalgy.net.ru</a> <a href=//th99.infania.net>Total Hardware 1999</a>
<a href=//wiby.org>wiby.org</a>
<a href=//menuetos.net>menuetos.net</a>
<a href=//macintosh.garden/>Macintosh Garden</a>
<a href=//pci-ids.ucw.cz>pci.ids</a> <a href=//pci-ids.ucw.cz>pci.ids</a>
<a href=//toastytech.com/guis/index.html>GUI Gallery</a>
<a href=//www.weitek.com/textual/support/driver.html>weitek</a>
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a>
<a href=//neonfloppy.sytes.net/articles/win3-usb/>neonfloppy</a>
<a href=//www.win31.de/eindex.htm>win31.de</a>
<h3>VPN-only</h3>
<a href=//dgmag.in>dgmag.in</a> <a href=//dgmag.in>dgmag.in</a>
<a href=//web.archive.org/web/https://bash.im>bash.im</a> <a href=//fdd5-25.pdp-11.ru>fdd5-25</a>
<a href=//web.archive.org/web/https://opennet.ru>opennet</a> <a href=//old-dos.ru>old-dos.ru</a>
<a href=//linux.org.ru>LOR</a> <a href=//artcon.ru>artcon.ru</a>
<a href=//web.archive.org/web/https://samlib.ru/b>samlib.ru/b</a> <a href=//nubo.ru>nubo.ru</a>
<a href=//web.archive.org/web/https://mirrors.pdp-11.ru>mirrors.pdp-11.ru</a> <a href=//mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
<a href=//web.archive.org/web/http://gona.mactar.hu/ATI_Mac/>ATI drivers for Mac</a> <a href=//nostalgy.net.ru/>nostalgy.net.ru</a>
<td>Simple:
<a href=//web.archive.org/web/http://lionovsky.us>lionovsky.us</a> <h2>HTTPS :(</h2>
<a href=//os-menuet.narod.ru>os-menuet.narod.ru</a> <a href=//os-menuet.narod.ru>os-menuet.narod.ru</a>
<a href=//mestack.narod.ru/index.html>mestack.narod.ru</a> <a href=//mestack.narod.ru/index.html>mestack.narod.ru</a>
<a href=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a> <a href=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a>
<a href=//vetusware.com>vetusware.com</a> <a href=//lionovsky.us>lionovsky.us</a>
<a href=//th99.infania.net>Total Hardware 1999</a>
<a href=//toastytech.com/guis/index.html>GUI Gallery</a>
<a href=//menuetos.net>menuetos.net</a>
<tr><td>
Moderate:
<a href=//fdd5-25.pdp-11.ru>fdd5-25</a>
<a href=//acmp.ru/index.asp?main=tasks>acmp.ru</a> <a href=//acmp.ru/index.asp?main=tasks>acmp.ru</a>
<a href=//old-dos.ru>old-dos.ru</a> <a href=//xn--80abh7bk0c.xn--p1ai>bashorg</a>
<a href=//www.weitek.com/textual/support/driver.html>weitek</a> <a href=//opennet.ru>opennet</a>
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a> <a href=//linux.org.ru>LOR</a>
<td>Complex: <a href=//www.xlr8yourmac.com/OSX/os_x_network_cards.html>OSX network cards</a>
<a href=//web.archive.org/web/https://artcon.ru>artcon.ru</a> <a href=//samlib.ru/b>samlib.ru/b</a>
<a href=//nubo.ru>nubo.ru</a> <a href=//vetusware.com>vetusware.com</a>
<a href=//electromyne.de>electromyne.de</a> <a href=//electromyne.de>electromyne.de</a>
<a href=//web.archive.org/web/20190403215447//www.thg.ru/>thg</a>

View File

@@ -11,9 +11,9 @@ TODO:
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334 http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
*/ */
#define ABOUT_TITLE "EOLITE 5.28" #define ABOUT_TITLE "EOLITE 5.29"
#define TITLE_EOLITE "Eolite File Manager 5.28" #define TITLE_EOLITE "Eolite File Manager 5.29"
#define TITLE_KFM "Kolibri File Manager 2.28"; #define TITLE_KFM "Kolibri File Manager 2.29";
#define MEMSIZE 1024 * 250 #define MEMSIZE 1024 * 250
#include "../lib/clipboard.h" #include "../lib/clipboard.h"
@@ -195,6 +195,8 @@ void main()
handle_param(); handle_param();
kfont.init(DEFAULT_FONT);
SystemDiscs.Get(); SystemDiscs.Get();
OpenDir(ONLY_OPEN); OpenDir(ONLY_OPEN);
llist_copy(#files_inactive, #files); llist_copy(#files_inactive, #files);

View File

@@ -175,8 +175,10 @@ void properties_dialog()
break; break;
case evMouse: case evMouse:
if (!apply_question_active) {
edit_box_mouse stdcall (#file_name_ed); edit_box_mouse stdcall (#file_name_ed);
edit_box_mouse stdcall (#path_to_file_ed); edit_box_mouse stdcall (#path_to_file_ed);
}
break; break;
case evKey: case evKey:

View File

@@ -7,7 +7,7 @@ edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x100000
#path_start,0, 100000000000010b,0,0}; #path_start,0, 100000000000010b,0,0};
more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL };
more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; more_less_box line_height = { NULL, 18, 64, LIST_LINE_HEIGHT };
checkbox show_dev_name = { SHOW_DEVICE_CLASS }; checkbox show_dev_name = { SHOW_DEVICE_CLASS };
checkbox big_icons = { BIG_ICONS }; checkbox big_icons = { BIG_ICONS };
checkbox colored_lines = { COLORED_LINES }; checkbox colored_lines = { COLORED_LINES };
@@ -134,7 +134,6 @@ void LoadIniSettings()
Form.height = ini.GetInt("WinH", efm*100+517); Form.height = ini.GetInt("WinH", efm*100+517);
ini.GetString("DefaultPath", #path_start, 4096, "/sys"); ini.GetString("DefaultPath", #path_start, 4096, "/sys");
path_start_ed.size = path_start_ed.pos = strlen(#path_start); path_start_ed.size = path_start_ed.pos = strlen(#path_start);
kfont.init(DEFAULT_FONT);
ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font smoothing",#temp,4096,"on"); ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font smoothing",#temp,4096,"on");
if(streq(#temp,"off")) kfont.smooth = false; else kfont.smooth = true; if(streq(#temp,"off")) kfont.smooth = false; else kfont.smooth = true;
} }

View File

@@ -1,6 +0,0 @@
if tup.getconfig("NO_CMM") ~= "" then return end
if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config
end
tup.rule("font_viewer.c", "c-- /D=$(C_LANG) /OPATH=%o %f" .. tup.getconfig("KPACK_CMD"), "font_viewer.com")

View File

@@ -1,4 +0,0 @@
@del kf_view
@C-- font_viewer.c
@rename font_viewer.com kf_view
if not exist kf_view ( @pause )

View File

@@ -26,15 +26,9 @@ struct collection_int
:void collection_int::add(dword _in) { :void collection_int::add(dword _in) {
unsigned i; unsigned i;
if (!buf) { if (!buf) || (count + 1 * DWSIZE4 >= buf_size) {
//if (buf_size) notify("'buf_size on empty buf' -A");
buf_size = 4096 * 5;
buf = malloc(4096 * 5);
//if (!buf) notify("'malloc error' -E");
} else if (count + 1 * DWSIZE4 >= buf_size) {
buf_size += 4096 * 5; buf_size += 4096 * 5;
buf = realloc(buf, buf_size); buf = realloc(buf, buf_size);
//if (!buf) notify("'realloc error' -E");
} }
i = count * DWSIZE4 + buf; i = count * DWSIZE4 + buf;
ESDWORD[i] = _in; ESDWORD[i] = _in;
@@ -77,8 +71,8 @@ struct collection_int
:void collection_int::drop() { :void collection_int::drop() {
count = 0; count = 0;
if (buf) buf = free(buf); //if (buf) buf = free(buf);
buf_size = 0; //buf_size = 0;
} }
/*======================================================== /*========================================================
@@ -97,31 +91,30 @@ struct collection
dword get(); //get_name_by_pos dword get(); //get_name_by_pos
dword get_pos_by_name(); dword get_pos_by_name();
void drop(); void drop();
void increase_data_size();
dword get_last(); dword get_last();
bool pop(); bool pop();
}; };
:void collection::increase_data_size() {
if (realloc_size<4096) realloc_size = 4096;
if (!data_size) {
data_size = realloc_size;
data_start = malloc(data_size);
} else {
data_size = data_size + realloc_size;
data_start = realloc(data_start, data_size);
}
}
:dword collection::add(dword in) { :dword collection::add(dword in) {
dword len = strlen(in); dword len = strlen(in);
while (offset.get(count) + len + 4 > data_size) { unsigned cur_buf_size;
increase_data_size();
if (!count) {
cur_buf_size = 0;
} else {
cur_buf_size = offset.get(count);
} }
strncpy(data_start+offset.get(count), in, len);
if (realloc_size<4096) realloc_size = 4096;
while (cur_buf_size + len + 4 > data_size) {
data_size += realloc_size;
data_start = realloc(data_start, data_size);
}
strncpy(data_start+cur_buf_size, in, len);
count++; count++;
offset.set(count, offset.get(count-1) + len + 1); offset.set(count, cur_buf_size + len + 1);
return data_start+offset.get(count-1); return data_start + cur_buf_size;
} }
:dword collection::get(dword pos) { :dword collection::get(dword pos) {

View File

@@ -17,17 +17,25 @@ struct CANVAS {
void Show(); void Show();
void Fill(); void Fill();
void DrawBar(); void DrawBar();
void DrawImage();
void WriteText(); void WriteText();
void PutPixel(); void PutPixel();
void AlignCenter(); void AlignCenter();
void AlignRight(); void AlignRight();
void IncreaseBufSize(); void IncreaseBufSize();
bool BufIsInvalid();
}; };
char draw_buf_not_enaught_ram[] = char draw_buf_not_enaught_ram[] =
"'CANVAS requested %i MB more memory than the system has. "'CANVAS requested %i MB more memory than the system has.
Application could be unstable.' -E"; Application could be unstable.' -E";
bool CANVAS::BufIsInvalid()
{
if (!buf_data) || (!bufw) return true;
return false;
}
bool CANVAS::Init(dword i_bufx, i_bufy, i_bufw, i_bufh) bool CANVAS::Init(dword i_bufx, i_bufy, i_bufw, i_bufh)
{ {
bufx = i_bufx; bufx = i_bufx;
@@ -45,6 +53,7 @@ bool CANVAS::Init(dword i_bufx, i_bufy, i_bufw, i_bufh)
void CANVAS::Fill(dword start_pointer, i_fill_color) void CANVAS::Fill(dword start_pointer, i_fill_color)
{ {
dword max_i = bufw * bufh * 4 - start_pointer/4; dword max_i = bufw * bufh * 4 - start_pointer/4;
if (BufIsInvalid()) return;
fill_color = i_fill_color | 0xFF000000; //set background color non-transparent fill_color = i_fill_color | 0xFF000000; //set background color non-transparent
@MEMSETD(buf_data+start_pointer+8, max_i, fill_color); @MEMSETD(buf_data+start_pointer+8, max_i, fill_color);
} }
@@ -52,6 +61,7 @@ void CANVAS::Fill(dword start_pointer, i_fill_color)
void CANVAS::DrawBar(dword x, y, w, h, color) void CANVAS::DrawBar(dword x, y, w, h, color)
{ {
dword i, j; dword i, j;
if (BufIsInvalid()) return;
if (y + h >= bufh) IncreaseBufSize(); if (y + h >= bufh) IncreaseBufSize();
for (j=0; j<h; j++) { for (j=0; j<h; j++) {
for (i = y+j*bufw+x<<2+8+buf_data; i<y+j*bufw+x+w<<2+8+buf_data; i+=4) { for (i = y+j*bufw+x<<2+8+buf_data; i<y+j*bufw+x+w<<2+8+buf_data; i+=4) {
@@ -60,12 +70,30 @@ void CANVAS::DrawBar(dword x, y, w, h, color)
} }
} }
void CANVAS::DrawImage(dword x, y, w, h, img)
{
dword i, j, p=0;
dword ystart;
if (BufIsInvalid()) return;
if (y < 0) y = 0;
if (x < 0) x = 0;
while (y + h >= bufh) IncreaseBufSize(); //WHY NOT WORKING?
for (j=0; j<h; j++) {
ystart = y + j * bufw + x;
for (i = ystart<<2+8+buf_data; i<ystart+w<<2+8+buf_data; i+=4) {
ESDWORD[i] = ESDWORD[img+p];
p+=4;
}
}
}
void CANVAS::WriteText(dword x, y, byte fontType, dword color, str_offset, strlen) void CANVAS::WriteText(dword x, y, byte fontType, dword color, str_offset, strlen)
{ {
#define BUGFIX_32000 32000 #define BUGFIX_32000 32000
dword ydiv=0; dword ydiv=0;
dword reserve_data_1, reserve_data_2; dword reserve_data_1, reserve_data_2;
dword new_buf_offset; dword new_buf_offset;
if (BufIsInvalid()) return;
if (y + 30 >= bufh) IncreaseBufSize(); if (y + 30 >= bufh) IncreaseBufSize();
if (y < BUGFIX_32000) { if (y < BUGFIX_32000) {
ESI = strlen; ESI = strlen;
@@ -92,6 +120,7 @@ void CANVAS::WriteText(dword x, y, byte fontType, dword color, str_offset, strle
void CANVAS::PutPixel(dword x, y, color) void CANVAS::PutPixel(dword x, y, color)
{ {
dword pos = y*bufw+x*4+8+buf_data; dword pos = y*bufw+x*4+8+buf_data;
if (BufIsInvalid()) return;
ESDWORD[pos] = color; ESDWORD[pos] = color;
} }
@@ -99,6 +128,7 @@ void CANVAS::AlignRight(dword x,y,w,h, content_width)
{ {
dword i, j, l; dword i, j, l;
dword content_left = w - content_width / 2; dword content_left = w - content_width / 2;
if (BufIsInvalid()) return;
for (j=0; j<h; j++) for (j=0; j<h; j++)
{ {
for (i=j*w+w-x*4, l=j*w+content_width+x*4; (i>=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4) for (i=j*w+w-x*4, l=j*w+content_width+x*4; (i>=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4)
@@ -112,6 +142,7 @@ void CANVAS::AlignCenter(dword x,y,w,h, content_width)
{ {
dword i, j, l; dword i, j, l;
dword content_left = w - content_width / 2; dword content_left = w - content_width / 2;
if (BufIsInvalid()) return;
for (j=0; j<h; j++) for (j=0; j<h; j++)
{ {
for (i=j*w+content_width+content_left*4, l=j*w+content_width+x*4; (i>=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4) for (i=j*w+content_width+content_left*4, l=j*w+content_width+x*4; (i>=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4)
@@ -123,6 +154,7 @@ void CANVAS::AlignCenter(dword x,y,w,h, content_width)
void CANVAS::Show(dword _y_offset, _h) void CANVAS::Show(dword _y_offset, _h)
{ {
if (BufIsInvalid()) return;
PutPaletteImage(_y_offset * bufw * 4 + buf_data+8, bufw, _h, bufx, bufy, 32, 0); PutPaletteImage(_y_offset * bufw * 4 + buf_data+8, bufw, _h, bufx, bufy, 32, 0);
} }
@@ -133,6 +165,8 @@ void CANVAS::IncreaseBufSize()
dword free_ram_size; dword free_ram_size;
char error_str[256]; char error_str[256];
if (!bufw) return;
if (!buf_data) { if (!buf_data) {
alloc_size = bufh * bufw * 4 + 8; alloc_size = bufh * bufw * 4 + 8;
buf_data = malloc(alloc_size); buf_data = malloc(alloc_size);

View File

@@ -66,10 +66,11 @@ int kfont_char_width[255];
:bool KFONT::init(dword font_path) :bool KFONT::init(dword font_path)
{ {
dword fsize_notused; dword fsize_notused;
if(font)free(font); if(font) font = free(font);
read_file(font_path, #font_begin, #fsize_notused); read_file(font_path, #font_begin, #fsize_notused);
if(!EAX) { if(!EAX) {
RunProgram("/sys/@notify", "'Error: KFONT is not loaded.' -E"); RunProgram("/sys/@notify", "'Error: KFONT is not loaded' -E");
kfont.height = 14;
return false; return false;
} }
changeSIZE(); changeSIZE();
@@ -99,6 +100,10 @@ int kfont_char_width[255];
:dword KFONT::getsize(byte font_size, dword text1) :dword KFONT::getsize(byte font_size, dword text1)
{ {
if (!font) {
size.width = strlen(text1) * 8;
return size.width;
}
size.height = size.width = 0; size.height = size.width = 0;
size.offset_x = size.offset_y = -1; size.offset_x = size.offset_y = -1;
if (size.pt != font_size) { if (size.pt != font_size) {
@@ -275,6 +280,11 @@ inline fastcall dword b32(EAX) { return DSDWORD[EAX]; }
{ {
if(!text1)return 0; if(!text1)return 0;
getsize(font_size, text1); getsize(font_size, text1);
if (!font) {
EDI = _background;
WriteText(x, y, 0xD0, _color, text1);
return size.width;
}
raw_size = NULL; raw_size = NULL;
WriteIntoBuffer(0, -size.offset_y, size.width-size.offset_x, WriteIntoBuffer(0, -size.offset_y, size.width-size.offset_x,
size.height-size.offset_y, _background, _color, font_size, text1); size.height-size.offset_y, _background, _color, font_size, text1);

View File

@@ -273,7 +273,7 @@ void draw_list()
} }
init = false; init = false;
if (selected) WriteText(5, selected-1*ITEM_H + menu1.y + menu1.text_y, TEXT_FONT_TYPE, 0xEE0000, "\x10"); // ? if (selected) WriteText(5, selected-1*ITEM_H + menu1.y + menu1.text_y +3, 0x80, 0xEE0000, "\x10"); // ?
} }
void click() void click()

View File

@@ -1,8 +1,4 @@
#define MEMSIZE 1024*30
#define ENTRY_POINT #main
#include "../lib/kfont.h"
#include "../lib/gui.h"
#define BARH 28 #define BARH 28
#define WINW 528 #define WINW 528
@@ -12,11 +8,8 @@ char active_tab = 0;
char colored = true; char colored = true;
dword checkbox_flag; dword checkbox_flag;
void main() void main_kfont()
{ {
proc_info Form;
mem_init();
checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ); checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ);
if (!param) strcpy(#param, DEFAULT_FONT); if (!param) strcpy(#param, DEFAULT_FONT);
@@ -48,7 +41,7 @@ void main()
case evReDraw: case evReDraw:
sc.get(); sc.get();
DefineAndDrawWindow(215,100,WINW+9,WINH+GetSkinHeight()+4,0x74,0xFFFFFF,#title,0); DefineAndDrawWindow(215,100,WINW+9,WINH+skin_h+4,0x74,0xFFFFFF,#title,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) break; if (Form.status_window&ROLLED_UP) break;
_DRAW_WINDOW_CONTENT: _DRAW_WINDOW_CONTENT:

View File

@@ -10,11 +10,13 @@ SOFTWARE CENTER v2.87
#include "..\lib\obj\libini.h" #include "..\lib\obj\libini.h"
#include "..\lib\kfont.h" #include "..\lib\kfont.h"
#include "..\lib\list_box.h" #include "..\lib\list_box.h"
#include "..\lib\collection.h"
proc_info Form; proc_info Form;
#include "font_viewer.h"
llist list; llist list;
collection app_path_collection=0; dword app_path_collection;
bool kolibrios_mounted; bool kolibrios_mounted;
int window_width, int window_width,
@@ -30,17 +32,11 @@ char window_title[128],
bool small_screen = false; bool small_screen = false;
struct SW_COLORS
{
dword list_bg;
dword text;
dword graph;
dword dark;
dword light;
} swc;
block selection[128]; block selection[128];
#define MAX_ITEMS 75
#define MAX_FPATH 1024
void load_ini_config(dword _ini_path) void load_ini_config(dword _ini_path)
{ {
_ini ini; _ini ini;
@@ -57,11 +53,10 @@ void main()
{ {
dword id; dword id;
kfont.init(DEFAULT_FONT); kfont.init(DEFAULT_FONT);
load_dll(libini, #lib_init,1);
kolibrios_mounted = dir_exists("/kolibrios"); if (streq(#param + strlen(#param) - 3, ".kf")) {
main_kfont();
if (param) { } else if (param) {
strcpy(#settings_ini_path, #param); strcpy(#settings_ini_path, #param);
} else { } else {
strcpy(#settings_ini_path, "/sys/settings/"); strcpy(#settings_ini_path, "/sys/settings/");
@@ -69,6 +64,11 @@ void main()
strcat(#settings_ini_path, ".ini"); strcat(#settings_ini_path, ".ini");
} }
load_dll(libini, #lib_init,1);
kolibrios_mounted = dir_exists("/kolibrios");
app_path_collection = malloc(MAX_FPATH*MAX_ITEMS);
load_ini_config(#settings_ini_path); load_ini_config(#settings_ini_path);
list.cur_y = -1; list.cur_y = -1;
list.y = 32; list.y = 32;
@@ -99,8 +99,8 @@ void main()
break; break;
case evReDraw: case evReDraw:
SetAppColors();
DefineAndDrawWindow(screen.w-window_width/2,screen.h-window_height/2,window_width,window_height,0x74,0,"",0); DefineAndDrawWindow(screen.w-window_width/2,screen.h-window_height/2,window_width,window_height,0x74,0,"",0);
sc.get();
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) { if (Form.status_window&ROLLED_UP) {
DrawTitle(#window_title); DrawTitle(#window_title);
@@ -114,37 +114,14 @@ void main()
DrawTopBar(); DrawTopBar();
} }
DrawList(); DrawList();
DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, swc.list_bg); DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, sc.light);
DrawSelection(); DrawSelection();
} }
} }
void SetAppColors()
{
dword bg_col, old_list_bg_color;
sc.get();
old_list_bg_color = swc.list_bg;
bg_col = sc.work;
if (skin_is_dark())
{
//dark colors
swc.list_bg = sc.work;
swc.text = sc.work_text;
swc.dark = sc.dark;
swc.light = sc.light;
} else {
//light colors
swc.list_bg = 0xF3F3F3;
swc.text = 0x000000;
swc.dark = 0xDCDCDC;
swc.light = 0xFCFCFC;
}
}
void DrawList() { void DrawList() {
list.count = 0; list.count = 0;
row = -1; row = -1;
app_path_collection.drop();
list_pos = list.y; list_pos = list.y;
list.column_max = window_width - 10 / list.item_w; list.column_max = window_width - 10 / list.item_w;
ini_enum_sections stdcall (#settings_ini_path, #process_sections); ini_enum_sections stdcall (#settings_ini_path, #process_sections);
@@ -168,7 +145,7 @@ byte draw_icons_from_section(dword key_value, key_name, sec_name, f_name)
col=0; col=0;
} }
if (col==0) DrawBar(0, row * list.item_h + list_pos, Form.cwidth, list.item_h, swc.list_bg); if (col==0) DrawBar(0, row * list.item_h + list_pos, Form.cwidth, list.item_h, sc.light);
DefineButton(col*list.item_w+6, row*list.item_h + list_pos,list.item_w,list.item_h-3,list.count + 100 + BT_HIDE,0); DefineButton(col*list.item_w+6, row*list.item_h + list_pos,list.item_w,list.item_h-3,list.count + 100 + BT_HIDE,0);
icon_char_pos = strchr(key_value, ','); icon_char_pos = strchr(key_value, ',');
@@ -177,20 +154,21 @@ byte draw_icons_from_section(dword key_value, key_name, sec_name, f_name)
selection[list.count].x = icon_x-2; selection[list.count].x = icon_x-2;
selection[list.count].y = icon_y-2; selection[list.count].y = icon_y-2;
if (icon_char_pos) ESBYTE[icon_char_pos] = '\0'; //delete icon from string if (icon_char_pos) ESBYTE[icon_char_pos] = '\0'; //delete icon from string
app_path_collection.add(key_value);
strncpy(list.count * MAX_FPATH + app_path_collection, key_value, MAX_FPATH);
text_x = col*list.item_w+5; text_x = col*list.item_w+5;
text_y = list.item_h - 40 / 2; text_y = list.item_h - 40 / 2;
if (!strchr(key_name, ' ')) {//|| (kfont.getsize(key_name)+30<list.item_w) <== too slow if (!strchr(key_name, ' ')) {//|| (kfont.getsize(key_name)+30<list.item_w) <== too slow
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos, list.item_w,0, swc.list_bg, swc.text, 12, key_name); kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos, list.item_w,0, sc.light, sc.work_text, 12, key_name);
} else { } else {
space_pos = strrchr(key_name, ' '); space_pos = strrchr(key_name, ' ');
ESBYTE[key_name+space_pos-1] = '\0'; ESBYTE[key_name+space_pos-1] = '\0';
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos - 2, list.item_w,0, swc.list_bg, swc.text, 12, key_name); kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos - 2, list.item_w,0, sc.light, sc.work_text, 12, key_name);
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos + 13, list.item_w,0, swc.list_bg, swc.text, 12, key_name+space_pos); kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos + 13, list.item_w,0, sc.light, sc.work_text, 12, key_name+space_pos);
} }
if (icon_char_pos) icon_id = atoi(icon_char_pos+1); if (icon_char_pos) icon_id = atoi(icon_char_pos+1);
if (Form.cwidth) draw_icon_32(icon_x, icon_y, swc.list_bg, icon_id); if (Form.cwidth) draw_icon_32(icon_x, icon_y, sc.light, icon_id);
list.count++; list.count++;
col++; col++;
return true; return true;
@@ -212,10 +190,9 @@ byte process_sections(dword sec_name, f_name)
old_row = row; old_row = row;
if (!small_screen) { if (!small_screen) {
DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, swc.list_bg); DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, sc.light);
text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, swc.list_bg, swc.text, 15, sec_name); text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, sc.light, sc.work_text, 15, sec_name);
DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 1, swc.dark); DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 2, sc.work);
DrawBar(text_len+20, row * list.item_h + list_pos + 21, Form.cwidth-text_len-20, 1, swc.light);
list_pos += 29; list_pos += 29;
} }
ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
@@ -233,7 +210,7 @@ void DrawTopBar()
void EventIconClick(dword appid) void EventIconClick(dword appid)
{ {
char run_app_path[4096]; char run_app_path[4096];
dword app_path = app_path_collection.get(appid); dword app_path = MAX_FPATH * appid + app_path_collection;
dword param_pos = strchr(app_path, '|'); dword param_pos = strchr(app_path, '|');
if (param_pos) { if (param_pos) {
ESBYTE[param_pos] = NULL; ESBYTE[param_pos] = NULL;
@@ -273,7 +250,7 @@ void DrawSelection()
int i; int i;
dword col; dword col;
for (i=0; i<list.count; i++) { for (i=0; i<list.count; i++) {
if (i==list.cur_y) col=0x0080FF; else col=swc.list_bg; if (i==list.cur_y) col=0x0080FF; else col=sc.light;
DrawWideRectangle(selection[i].x, selection[i].y, 36, 36, 2, col); DrawWideRectangle(selection[i].x, selection[i].y, 36, 36, 2, col);
} }
} }

View File

@@ -23,11 +23,8 @@ MAX_TRIANGLES equ 12
SCREEN_X equ 320 SCREEN_X equ 320
SCREEN_Y equ 200 SCREEN_Y equ 200
include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
;purge mov ;purge mov
include 'ascl.inc'
include 'ascgl.inc'
START: START:
init_sin_cos: init_sin_cos:
@@ -65,7 +62,47 @@ still:
; cmp eax,3 ; button in buffer ? ; cmp eax,3 ; button in buffer ?
jz button jz button
fps 220,8,cl_White,cl_Black
; FPS - Set Frame Per Second Display
fps_show_frequency=40
macro fps x,y,color,delcolor
{
local spdat,savetime,new_time,fps,fps_cntr,out_fps,new_time,ttt
local no_out_fps
jmp spdat
savetime dd 0
fps_cntr dd 0
fps dd 0
ttt dd 0
spdat:
get_time:
mov eax,3
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
cmp dword [ttt],0
je out_fps
dec dword [ttt]
jmp no_out_fps
new_time:
mov [savetime],eax
mov ebx,[fps_cntr]
mov [fps],ebx
mov [fps_cntr],0
out_fps:
mov dword [ttt],fps_show_frequency
mov eax,47
mov ebx,5*65536
mov edx,(x+1)*65536+y
mov esi,color+0xD0000000
mov edi,delcolor
mov ecx,[fps]
mcall
no_out_fps:
}
fps 220,5,0x00FFFfff,0x00000000
main_loop: main_loop:

View File

@@ -3,5 +3,4 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"}) tup.rule({"3DCUBE2.ASM"}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")
tup.rule({"3DCUBE2.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")

View File

@@ -1,624 +0,0 @@
lang equ ru_RU
;
; Assembler
; SMALL
; CODE
; Graphics
; Libary
;
; Ver 0.10 By Pavlushin Evgeni (RUSSIA)
; www.waptap@mail.ru
;InfoList
;0.01 LoadImage
;0.02 SetBmp
;0.03 Bmptoimg, Setimg ~01.03.2004
;0.04 Bug deleted, copyimg ~03.05.2004
;0.05 fullimg, collimg ~05.05.2004
;0.06 getimg ~09.05.2004
;0.07 convbmp ~13.05.2004
;0.08 fps ~14.05.2004
;0.09 drawfbox ~03.06.2004
;0.10 all macros optimized by halyavin, add at ~07.06.2004
;DrawBox
macro drawfbox x,y,xs,ys,color
{
mov ecx,y
mov ebx,x
shl ebx,16
add ebx,xs
shl ecx,16
add ecx,ys
mov edx,color
mov eax,13
mcall
}
; FPS - Set Frame Per Second Display
fps_show_frequency=40
macro fps x,y,color,delcolor
{
local spdat,savetime,new_time,fps,fps_cntr,out_fps,new_time,ttt
local no_out_fps
jmp spdat
savetime dd 0
fps_cntr dd 0
fps dd 0
ttt dd 0
spdat:
get_time:
mov eax,3
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
cmp dword [ttt],0
je out_fps
dec dword [ttt]
jmp no_out_fps
new_time:
mov [savetime],eax
mov ebx,[fps_cntr]
mov [fps],ebx
mov [fps_cntr],0
out_fps:
if ~(delcolor eq )
mov ebx,x*65536+30
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
mov ebx,5*65536
; mov bl,0
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
mcall
no_out_fps:
}
; COLLIMG - Collusion image's
_ldbounce_count=0;
macro collimg img1_off,x1,y1,img2_off,x2,y2,otv
{
local bounce,exit,_1dbounce,anot,bc,nbc
mov esi,[img1_off] ;xs1
mov edi,[img2_off] ;ys2
mov eax,x1 ;
mov ebx,x2 ;
call _1dbounce
mov edx,ecx
mov esi,[img1_off+4] ;ys1
mov edi,[img2_off+4] ;ys2
mov eax,y1 ;
mov ebx,y2 ;
call _1dbounce
add edx,ecx
cmp edx,2
je bounce
mov otv,0
jmp exit
_ldbounce_count=_ldbounce_count+1
if (_ldbounce_count = 1)
_1dbounce:
cmp ebx,eax
jnae anot
add eax,esi
cmp eax,ebx
jna nbc
jmp bc
anot:
add ebx,edi
cmp ebx,eax
jna nbc
bc:
mov ecx,1
ret
nbc:
mov ecx,0
ret
end if
bounce:
mov otv,1
exit:
}
; SETBMP - Set bmp to window
; (SYNTAX) SETBMP dd xstart ,dd ystart ,BMP_offset,dd soi
; (SAMPLE) SETBMP dword [xt],dword [yt],I_END,dword [tsoi]
; SETBMP 15,10,I_END,dword [tsoi]
; ( NOTE ) SOI - Start of image
macro setbmp arg1,arg2,arg3,arg4
{
local nodi
cmp word [arg3],word 'BM'
jne nodi
mov eax,7
mov ebx,arg4 ;[soi]
mov ecx,dword [arg3+18]
shl ecx,16
add ecx,dword [arg3+22]
if (arg1 eqtype 0) & (arg2 eqtype 0)
mov edx,arg1*65536+arg2
else
mov edx,arg1
shl edx,16
add edx,arg2
end if
mcall
nodi:
}
macro setimg arg1,arg2,arg3
{
local nodi
mov eax,7
mov ebx,arg3
add ebx,8
mov ecx,dword [arg3]
shl ecx,16
add ecx,dword [arg3+4]
if (arg1 eqtype 0) & (arg2 eqtype 0)
mov edx,arg1*65536+arg2
else
mov edx,arg1
shl edx,16
add edx,arg2
end if
mcall
}
;Not optimiz
macro getimg imgsrc,x,y,xs,ys,imgdest
{
local cyc
mov eax,xs
mov dword [imgdest],eax
mov eax,ys
mov dword [imgdest+4],eax
mov eax,dword [imgsrc] ;getx size
mov edi,eax
mov ebx,y
mul ebx
add eax,x
mov ebx,3
mul ebx ;eax=offset on imsrc
mov ecx,0
mov ebx,0
mov ebp,eax
mov esi,0
add esi,8
add ebp,8
cyc:
mov al,byte [imgsrc+ebp]
mov [imgdest+esi],al
mov al,byte [imgsrc+ebp+1]
mov [imgdest+esi+1],al
mov al,byte [imgsrc+ebp+2]
mov [imgdest+esi+2],al
add esi,3
add ebp,3
inc ecx
cmp ecx,xs
jne cyc
add ebp,edi
add ebp,edi
add ebp,edi
sub ebp,xs
sub ebp,xs
sub ebp,xs
mov ecx,0
inc ebx
cmp ebx,ys
jne cyc
}
;
macro bmptoimg bmp_off,soi,img_off
{
local nodix,conv
cmp word [bmp_off],word 'BM'
jne nodix
mov eax,dword [bmp_off+18]
mov ebx,dword [bmp_off+22]
mov dword [img_off],eax
mov dword [img_off+4],ebx
mul ebx
lea ecx,[eax+2*eax]
lea edi,[img_off+8]
mov esi,dword [soi]
cld
rep movsb
nodix:
}
macro copyimg img2_off,img1_off
{
local cop
mov eax,dword [img1_off]
mov ebx,dword [img1_off+4]
mul ebx
lea ecx,[eax+2*eax]
lea esi,[img1_off+8]
lea edi,[img2_off+8]
cld
rep movsb
}
macro fullimg img_off,xs,ys,color
{
local cop
mov eax,xs
mov ebx,ys
mov dword [img_off],eax
mov dword [img_off+4],ebx
mul ebx
lea ebp,[eax+2*eax]
mov esi,color
if color eqtype 0
mov ecx,color/65536
else
mov ecx,esi
shr ecx,16
end if
xor edi,edi
cop:
mov word [img_off+8+edi],si
add edi,2
mov byte [img_off+8+edi],cl
inc edi
cmp edi,ebp
jne cop
}
macro convbmp bmp_load_area,bmp_soi
{
local status,bps,dwps,soi,sop,eop,eos,process,fileinfo,string,end_bmp
local converttable,noaddelem,nextbit,convert1bpp,convert4bpp,convert2
local nextelem,convertno32,nomorestring,convert1,nextstring,yespicsize
local noaddword
;local qwe,bmpfn
; convert:
movzx eax,word [bmp_load_area+28]
mul dword [bmp_load_area+18]
mov ebx,32
div ebx
test edx,edx
je noaddword
inc eax
noaddword:
mov dword [dwps],eax ;dwps-doublewords per string
shl eax,2
mov dword [bps],eax ;bps-bytes per string
cmp dword [bmp_load_area+34],0
jne yespicsize ;if picture size is defined
mul dword [bmp_load_area+22]
mov dword [bmp_load_area+34],eax
yespicsize:
mov eax,bmp_load_area
mov ebx,eax
add ebx, [bmp_load_area+2];file size
inc ebx
mov dword [bmp_soi],ebx ;soi-start of image area for drawing
add eax, [bmp_load_area+10]
mov dword [sop],eax ;sop-start of picture in file
add eax, [bmp_load_area+34]
mov dword [eop],eax ;eop-end of picture in file
mov eax, [bmp_load_area+18]
lea eax,[eax+2*eax] ;3x pixels in eax
mov edi,dword [bmp_soi] ;initializing
mov esi,dword [eop]
sub esi,dword [bps]
nextstring:
push edi
cmp word [bmp_load_area+28],24
jne convertno32
mov ecx,[dwps]
cld
rep movsd
convert1:
pop edi
sub esi,dword [bps]
sub esi,dword [bps]
cmp esi,dword [sop]
jb end_bmp;nomorestring
add edi,eax
jmp nextstring
; nomorestring:
; jmp end_bmp
convertno32:
mov ebx,bmp_load_area
add ebx, [bmp_load_area+14]
add ebx,14 ;start of color table
push esi
add esi,dword [bps]
mov dword [eos],esi
pop esi
nextelem:
push eax
movzx eax,byte [esi]
cmp word [bmp_load_area+28],4
je convert4bpp
cmp word [bmp_load_area+28],1
je convert1bpp
call converttable
convert2:
pop eax
inc esi
cmp esi,dword [eos]
jae convert1
add edi,3
jmp nextelem
convert4bpp:
shl ax,4
shr al,4
push ax
movzx eax,ah
call converttable
add edi,3
pop ax
movzx eax,al
call converttable
jmp convert2
convert1bpp:
mov ecx,eax
mov edx,7
nextbit:
xor eax,eax
bt ecx,edx
jnc noaddelem
inc eax
noaddelem:
push edx
call converttable
pop edx
dec edx
cmp edx,0xffffffff
je convert2
add edi,3
jmp nextbit
converttable:
shl eax,2
add eax,ebx
mov edx, dword [eax]
mov dword [edi],edx
ret
; DATA AREA
;status dd 0 ;bit0=1 if file thread is created
bps dd 0
dwps dd 0
;soi dd 0
sop dd 0
eop dd 0
eos dd 0
;process dd 0
end_bmp:
; mov eax,dword [soi]
; mov dword [bmp_soi],eax
}
; LOADBMP - Load bmp image from file
; (SYNTAX) LOADBMP 'file_path',temp_area(rb 0x10000),load_area,dd soi
; (SAMPLE) LOADBMP '/sys/menuet.bmp',temp_area,I_END,tsoi
; ( NOTE ) Macros create on Base of
; Picture browser by lisovin@26.ru & Ivan Poddubny
; SOI - Start of image
macro loadbmp bmp_file_name,bmp_temp_area,bmp_load_area,bmp_soi
{
local status,bps,dwps,soi,sop,eop,eos,process,fileinfo,string,end_bmp
local converttable,noaddelem,nextbit,convert1bpp,convert4bpp,convert2
local nextelem,convertno32,nomorestring,convert1,nextstring,yespicsize
local noaddword
;local qwe,bmpfn
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
mcall
mov eax,[bmp_load_area+2]
shr eax,9 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 512 <20> <20><EFBFBD><E0A8A1><EFBFBD><EFBFBD> 1 - <20><><EFBFBD><EFBFBD><20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
inc eax
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
mcall
; jmp qwe
;bmpfn db bmp_file_name
;qwe:
; mov eax,6
; mov ebx,bmpfn
; mov ecx,0
; mov edx,0xFFFFFF
; mov esi,bmp_load_area
; mov edi,0
; mcall
; convert:
movzx eax,word [bmp_load_area+28]
mul dword [bmp_load_area+18]
mov ebx,32
div ebx
test edx,edx
je noaddword
inc eax
noaddword:
mov dword [dwps],eax ;dwps-doublewords per string
shl eax,2
mov dword [bps],eax ;bps-bytes per string
cmp dword [bmp_load_area+34],0
jne yespicsize ;if picture size is defined
mul dword [bmp_load_area+22]
mov dword [bmp_load_area+34],eax
yespicsize:
mov eax,bmp_load_area
push eax
add eax, [bmp_load_area+2];file size
inc eax
mov dword [soi],eax ;soi-start of image area for drawing
pop eax
add eax, [bmp_load_area+10]
mov dword [sop],eax ;sop-start of picture in file
add eax, [bmp_load_area+34]
mov dword [eop],eax ;eop-end of picture in file
mov eax, [bmp_load_area+18]
mov ebx,3
mul ebx ;3x pixels in eax
mov edi,dword [soi] ;initializing
mov esi,dword [eop]
sub esi,dword [bps]
nextstring:
push edi
cmp word [bmp_load_area+28],24
jne convertno32
mov ecx,[dwps]
cld
rep movsd
convert1:
pop edi
sub esi,dword [bps]
sub esi,dword [bps]
cmp esi,dword [sop]
jb nomorestring
add edi,eax
jmp nextstring
nomorestring:
jmp end_bmp
convertno32:
mov ebx,bmp_load_area
add ebx, [bmp_load_area+14]
add ebx,14 ;start of color table
push esi
add esi,dword [bps]
mov dword [eos],esi
pop esi
nextelem:
push eax
movzx eax,byte [esi]
cmp word [bmp_load_area+28],4
je convert4bpp
cmp word [bmp_load_area+28],1
je convert1bpp
call converttable
convert2:
pop eax
inc esi
cmp esi,dword [eos]
jae convert1
add edi,3
jmp nextelem
convert4bpp:
shl ax,4
shr al,4
push ax
movzx eax,ah
call converttable
add edi,3
pop ax
movzx eax,al
call converttable
jmp convert2
convert1bpp:
mov ecx,eax
mov edx,7
nextbit:
xor eax,eax
bt ecx,edx
jnc noaddelem
inc eax
noaddelem:
push edx
call converttable
pop edx
dec edx
cmp edx,0xffffffff
je convert2
add edi,3
jmp nextbit
converttable:
shl eax,2
add eax,ebx
mov edx, dword [eax]
mov dword [edi],edx
ret
; DATA AREA
;status dd 0 ;bit0=1 if file thread is created
bps dd 0
dwps dd 0
soi dd 0
sop dd 0
eop dd 0
eos dd 0
;process dd 0
; DATA AREA
fileinfo:
dd 0
dd 0
dd 1 ;number of blocks of 512 bytes
dd bmp_load_area
dd bmp_temp_area
string:
db bmp_file_name,0
db ' '
db ' '
db ' '
db ' ',0
end_bmp:
mov eax,dword [soi]
mov dword [bmp_soi],eax
}

View File

@@ -1,499 +0,0 @@
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
;
; Assembler
; SMALL
; CODE
; Libary
;
; Ver 0.09 By Pavlushin Evgeni (RUSSIA)
; www.waptap@mail.ru
;InfoList
;0.01 scank,putpix,puttxt
;0.02 label,random,colors
;0.03 window,startwd,endwd,attributes
;0.04 close,delay,scevent ~30.04.2004
;0.05 small random, ~04.05.2004
;0.06 wtevent ~09.05.2004
;0.07 timeevent ~23.05.2004
;0.08 txtput ~14.06.2004
;0.09 opendialog,savedialog ~20.06.2004
macro opendialog redproc,openoff,erroff,path,testtime
{
local still, dlg_file, clip_file, redwait
local button, key, red, zzz, still, zzz2, incf, file_is_open, zzz3
mov ecx,200
zzz3:
mov byte [path+ecx-1],0
loop zzz3
dec byte [clip_file+7]
incf:
inc byte [clip_file+7]
mov eax,6
mov ebx,clip_file
mov ecx,0
or edx,-1
mov esi,path
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
jne incf
mov ecx,200
zzz2:
mov byte [path+ecx],0
loop zzz2
mov ebx,clip_file
mov ecx,path
mov edx,100
mov esi,0
mov eax,33
mcall
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
mcall
still:
scevent red,key,button
cmp byte [path],0
jne file_is_open
cmp dword [redwait],testtime ;20
jnae zzz
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
mov esi,path
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
zzz:
delay 5
inc dword [redwait]
jmp still
file_is_open:
mov eax,32
mov ebx,clip_file
mcall
jmp openoff
key: ; key
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
mcall
red:
call redproc
jmp still
dlg_file db 'SYSXTREE '
clip_file db 'OPENCLPACLP'
db 'O' ;Dialog type O-open S-save
db 0 ;Marker
redwait dd 0
}
macro savedialog redproc,openoff,erroff,path,testtime
{
local still, dlg_file, clip_file, redwait, zzz3
local button, key, red, zzz, still, zzz2, incf, file_is_open
mov ecx,200
zzz3:
mov byte [path+ecx-1],0
loop zzz3
dec byte [clip_file+7]
incf:
inc byte [clip_file+7]
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
mov esi,path
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
jne incf
mov ecx,200
zzz2:
mov byte [path+ecx],0
loop zzz2
mov ebx,clip_file
mov ecx,path
mov edx,100
mov esi,0
mov eax,33
mcall
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
mcall
still:
scevent red,key,button
cmp byte [path],0
jne file_is_open
cmp dword [redwait],testtime ;20
jnae zzz
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
mov esi,path
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
zzz:
delay 5
inc dword [redwait]
jmp still
file_is_open:
mov eax,32
mov ebx,clip_file
mcall
jmp openoff
key: ; key
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
mcall
red:
call redproc
jmp still
dlg_file db 'SYSXTREE '
clip_file db 'SAVECLPACLP'
db 'S' ;Dialog type O-open S-save
db 0 ;Marker
redwait dd 0
}
; RANDOM - generate random count (small)
; (SYNTAX) RANDOM MaxCount,OutArgument
; (SAMPLE) RANDOM 10000,eax
; ( NOTE ) Maxint<65536 ; use random 65536,eax for more combinations
randomuse = 0
macro random arg1,arg2
{
local rxproc
randomuse = randomuse + 1
jmp rxproc
if defined randomuse & randomuse = 1
randomproc:
jmp rnj
rsx1 dw 0x4321
rsx2 dw 0x1234
rnj:
; mov eax,arg1
push bx
push cx
push dx
push si
push di
mov cx,ax
mov ax,word ptr rsx1
mov bx,word ptr rsx2
mov si,ax
mov di,bx
mov dl,ah
mov ah,al
mov al,bh
mov bh,bl
xor bl,bl
rcr dl,1
rcr ax,1
rcr bx,1
add bx,di
adc ax,si
add bx,0x62e9
adc ax,0x3619
mov word ptr rsx1,bx
mov word ptr rsx2,ax
xor dx,dx
cmp ax,0
je nodiv
cmp cx,0
je nodiv
div cx
nodiv:
mov ax,dx
pop di
pop si
pop dx
pop cx
pop bx
; mov arg2,0
; mov arg2,eax
ret
end if
rxproc:
mov eax,arg1
call randomproc
mov arg2,0
mov arg2,eax
}
macro scank
{
mov eax,10
mcall
}
macro putpix x,y,color
{
mov ebx,x
mov ecx,y
mov edx,color
mov eax,1
mcall
}
macro puttxt x,y,offs,size,color
{
mov ebx,x
shl ebx,16
add ebx,y
mov ecx,color
mov edx,offs
mov esi,size
mov eax,4
mcall
}
;_ equ '____'
;macro libtest x,y,color
;{
;if x = as dword
; mov ebx,x
;end if
; mov ecx,y
; mov edx,color
; mov eax,1
; mcall
;}
macro outcount data, x, y, color, numtype
{
mov ecx,data
mov ebx,numtype
mov bl,0
mov edx,x*65536+y
mov esi,color
mov eax,47
mcall
}
; SCEVENT - Scan event
macro scevent red,key,but
{
mov eax,11
mcall
dec eax
jz red
dec eax
jz key
dec eax
jz but
}
; WTEVENT - Wait event
macro wtevent red,key,but
{
mov eax,10
mcall
dec eax
jz red
dec eax
jz key
dec eax
jz but
}
; TIMEEVENT - Wite for event with timeout
macro timeevent xfps,noevent,red,key,but
{
mov eax,23
mov ebx,xfps
mcall
cmp eax,0
je noevent
dec eax
jz red
dec eax
jz key
dec eax
jz but
}
; CLOSE - Close program
macro close
{
mov eax,-1
mcall
}
; DELAY - Create delay 1/100 sec
; (SYNTAX) Delay time
; (SAMPLE) Delay 100 ;delay 2 sec 1/100*200=2 sec
macro delay arg1
{
mov eax,5
mov ebx,arg1
mcall
}
; WINDOW - Draw window
; (SYNTAX) WINDOW Xstart,Ystart,'Text',Color
; (SAMPLE) WINDOW 10,10,640+8,480+24,window_Skinned
macro window arg1,arg2,arg3,arg4,arg5
{
mov ebx,arg1*65536+arg3
mov ecx,arg2*65536+arg4
mov edx,arg5
mov eax,0
mcall
}
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
{
mov ebx,arg1*65536+arg3
mov ecx,arg2*65536+arg4
mov edx,arg5
mov esi,arg6
mov edi,arg7
mov eax,0
mcall
}
; STARTWD - Start of window draw
macro startwd
{
mov eax,12
mov ebx,1
mcall
}
; ENDWD - End window draw
macro endwd
{
mov eax,12
mov ebx,2
mcall
}
; LABEL - Put text to frame
; (SYNTAX) LABEL Xstart,Ystart,'Text',Color
; (SAMPLE) LABEL 10,12,'Hello World!',cl_Green+font_Big
macro label arg1,arg2,arg3,arg4
{
local asd,lab
jmp asd
lab db arg3 ;arg label
asd:
mov ebx,arg1 ;arg1=y arg2=x
shl ebx,16
add ebx,arg2
mov ecx,arg4 ;arg4 color
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
mcall
}
;Key's
key_Up equ 178
key_Down equ 177
key_Right equ 179
key_Left equ 176
key_Esc equ 27
key_Space equ 32
key_Enter equ 13
key_Bspace equ 8
key_F1 equ 50
key_F2 equ 51
key_F3 equ 52
key_F4 equ 53
key_F5 equ 54
key_F6 equ 55
key_F7 equ 56
key_F8 equ 57
key_F9 equ 48
key_F10 equ 49
key_F11 equ 68
key_F12 equ 255
key_Home equ 180
key_End equ 181
key_PgUp equ 184
key_PgDown equ 183
;Attributes
;Window Attributes
window_Skinned equ 0x03000000
window_Type2 equ 0x02000000
window_Type1 equ 0x00000000
window_Reserve equ 0x01000000
;Font Attributes
font_Big equ 0x10000000
;Colors
cl_White equ 0x00ffffff
cl_Black equ 0x00000000
cl_Grey equ 0x00888888
cl_Red equ 0x00ff0000
cl_Lime equ 0x0000ff00
cl_Green equ 0x0000af00
cl_Blue equ 0x000000ff
cl_Purple equ 0x008080ff
cl_Violet equ 0x008040ff
cl_Cyan equ 0x0040e0ff

View File

@@ -0,0 +1,3 @@
@fasm 3dcube2.asm 3dcube2
@kpack 3dcube2
if not exist 3dcube2 ( @pause )

View File

@@ -1,6 +0,0 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause

View File

@@ -1,6 +0,0 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause

View File

@@ -1,82 +1,60 @@
; ;
; FIRE for MENUET - Compile with FASM ; Fire for Kolibri OS - Compile with FASM
; ;
use32 use32
org 0
org 0x0
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
dd 1 ; header version dd 1 ; header version
dd START ; program start dd START ; program start
dd I_END ; image size dd image_end ; image size
dd mem_end ; reguired amount of memory dd mem_end ; reguired amount of memory
dd mem_end dd stacktop
dd 0,0 ; no parameters, no path dd 0,0 ; no parameters, no path
include '..\..\..\macros.inc' include '..\..\macros.inc'
include '..\..\KOSfuncs.inc'
Screen_W equ 480
START: START:
red:
; ************************************************ ; ************************************************
; ********* WINDOW DEFINITIONS AND DRAW ********** ; ********* WINDOW DEFINITIONS AND DRAW **********
; ************************************************ ; ************************************************
draw_window: draw_window:
mov eax,12 ; tell os about redraw mcall SF_REDRAW, SSF_BEGIN_DRAW
mov ebx,1
mcall
xor eax,eax ; define and draw window mcall SF_CREATE_WINDOW,<100,Screen_W+1>,<70,222>,0x01000000,0,0
mov ebx,100*65536+321
mov ecx,70*65536+222
mov edx,0x01000000
mov esi,0x00000000
mov edi,0x00000000
mcall
mcall 13,0*65536+321,0*65536+30,0 mcall SF_DRAW_RECT,<0,Screen_W+1>,<0,30>,0
mcall ,0*65536+1 ,0*65536+222 mcall ,<0,1>,<0,222>
mcall ,321*65536+1,0*65536+223 mcall ,<Screen_W+1,1>,<0,223>
mcall ,0*65536+321,222*65536+1 mcall ,<0,Screen_W+1>,<222,1>
mcall SF_DRAW_TEXT,<(Screen_W-108)/2,8>,dword 0x00FFFFFF,text,textlen-text
mov al,4 ; 'FIRE FOR KOLIBRI' mcall SF_DEFINE_BUTTON,<(Screen_W+1-19),12>,<5,12>,1,0x009a0000
mov ebx,106*65536+8
mov ecx,dword 0x00FFFFFF
mov edx,text
mov esi,textlen-text
mcall
mov al,8
mov ebx,(321-19)*65536+12 ; button start x & size
mov ecx,5*65536+12 ; button start y & size
mov edx,1 ; button number
mov esi,0x009a0000
mcall
mov ebx,ecx ;5*65536+12 mov ebx,ecx ;5*65536+12
inc edx inc edx
mcall mcall
mov ebx,18*65536+12
inc edx inc edx
mcall mcall ,<18,12>
mov ebx,31*65536+12
inc edx inc edx
mcall mcall ,<31,12>
mov al,12 ; tell os about redraw end mcall SF_REDRAW, SSF_END_DRAW
mov ebx,2
mcall
sta: ; calculate fire image sta: ; calculate fire image
mov esi, FireScreen+0x2300-80 mov esi, FireScreen.end+Screen_W*3-Screen_W/4
mov ecx, 80 mov ecx, Screen_W/4
mov eax, [FireSeed] mov eax, [FireSeed]
NEWLINE: NEWLINE:
@@ -89,7 +67,7 @@ sta: ; calculate fire image
mov [FireSeed], eax mov [FireSeed], eax
mov ecx, 0x2300-80 mov ecx, (Screen_W*200)/8+Screen_W*3-Screen_W/4
sub esi, ecx sub esi, ecx
xor edx, edx xor edx, edx
xor eax, eax xor eax, eax
@@ -103,7 +81,7 @@ sta: ; calculate fire image
add eax, edx add eax, edx
mov dl, [esi] mov dl, [esi]
add eax, edx add eax, edx
mov dl, [esi + 80] mov dl, [esi + Screen_W/4]
jmp typedone jmp typedone
notype1: notype1:
@@ -114,7 +92,7 @@ sta: ; calculate fire image
; mov dl, [esi - 2] ; mov dl, [esi - 2]
; add eax, edx ; add eax, edx
lea eax, [eax + edx*2] lea eax, [eax + edx*2]
mov dl, [esi + 78] mov dl, [esi + Screen_W/4-2]
; notype2: ; notype2:
; type 2 is never used ; type 2 is never used
@@ -124,7 +102,7 @@ sta: ; calculate fire image
; add eax, edx ; add eax, edx
; mov dl, [esi] ; mov dl, [esi]
; add eax, edx ; add eax, edx
; mov dl, [esi + 80] ; mov dl, [esi + Screen_W/4]
; notype3: ; notype3:
typedone: typedone:
@@ -135,12 +113,10 @@ typedone:
ZERO: ZERO:
mov [esi - 81], al mov [esi - Screen_W/4-1], al
loop FIRELOOP loop FIRELOOP
mov al, 5 ; in this moment always high 24 bits of eax are zero! mcall SF_SLEEP,[delay]
mov ebx,[delay]
mcall
inc [calc] inc [calc]
cmp [calc], byte 2 cmp [calc], byte 2
@@ -169,7 +145,7 @@ typedone:
mov [edi+3],ecx mov [edi+3],ecx
mov [edi+6],ecx mov [edi+6],ecx
mov [edi+9],cx mov [edi+9],cx
lea ebx, [edi+320*3] lea ebx, [edi+Screen_W*3]
mov [ebx+0],ecx mov [ebx+0],ecx
mov [ebx+3],ecx mov [ebx+3],ecx
mov [ebx+6],ecx mov [ebx+6],ecx
@@ -177,50 +153,43 @@ typedone:
add edi,12 add edi,12
inc edx inc edx
cmp edx,80 cmp edx,Screen_W/4
jnz nnl jnz nnl
xor edx,edx xor edx,edx
add edi,320*3 add edi,Screen_W*3
nnl: nnl:
cmp esi,FireScreen+8000; 0x2000 cmp esi,FireScreen.end
jnz newc jnz newc
mov al,7 ; display image
; high 24 bits of eax are zero!
pop ebx pop ebx
mov ecx,4*80*65536+200 mcall SF_PUT_IMAGE,,<Screen_W,200>,<1,22>
mov edx,1*65536+22
mcall
nodrw: nodrw:
mov eax,11 ; check if os wants to talk to us mcall SF_CHECK_EVENT ; check if os wants to talk to us
mcall
dec eax dec eax
jz red jz draw_window
cmp al, 3-1 cmp al, 3-1
jnz nob4 jnz nob4
button: ; get button id button: ; get button id
mov al,17 mcall SF_GET_BUTTON
mcall
shr eax, 8 shr eax, 8
dec eax dec eax
jnz noclose jnz @f
or eax,-1 ; close this program mcall SF_TERMINATE_PROCESS ; close this program
mcall @@:
noclose:
dec eax ; change fire type dec eax ; change fire type
jnz nob2 jnz @f
xor [type], 1 xor [type], 1
nob2: @@:
dec eax ; change delay dec eax ; change delay
jnz nob3 jnz @f
xor [delay], 1 xor [delay], 1
nob3: @@:
dec eax ; change color dec eax ; change color
jnz nob4 jnz nob4
@@ -233,7 +202,7 @@ typedone:
fcok: fcok:
mov [fcolor],eax mov [fcolor],eax
mov edi,ImageData mov edi,ImageData
mov ecx,(320*600)/4 mov ecx,(Screen_W*200*3)/4
xor eax,eax xor eax,eax
rep stosd rep stosd
@@ -246,19 +215,23 @@ fcolor dd 2
xx db 'x' xx db 'x'
type db 0 type db 0
calc db 0 calc db 0
delay dd 0 delay dd 1
FireSeed dd 0x1234 FireSeed dd 0x1234
text: db 'FIRE FOR KOLIBRI' text: db 'Fire for Kolibri'
textlen: textlen:
I_END: align 4
image_end:
FireScreen: FireScreen:
rb 0x2300 rb (Screen_W*200)/8 ;wisible fire
.end:
rb Screen_W*3 ;hidden fire (need for generation)
ImageData: ImageData:
rb 320*200*3 rb Screen_W*200*3
; stack ; stack
align 512 align 512
rb 512 rb 512
stacktop:
mem_end: mem_end:

View File

@@ -1,2 +0,0 @@
@fasm fire.asm fire
@pause

View File

@@ -1,6 +1,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SPDX-License-Identifier: GPL-2.0-only
; A firework demo ; A firework demo
; Programmed by Yaniv LEVIATHAN ; Copyright (C) 2010-2025 KolibriOS team
;
; Initially ðrogrammed by Yaniv Leviathan
; http://yaniv.leviathanonline.com ; http://yaniv.leviathanonline.com
; Converted to DexOS, By Dex ; Converted to DexOS, By Dex
; Converted to KolibriOS, By Asper ; Converted to KolibriOS, By Asper
@@ -11,19 +14,24 @@
; optionally AVX, AVX2, AVX512 ; optionally AVX, AVX2, AVX512
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use32 use32
org 0x0 org 0
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
dd 0x01 ; version dd 1 ; version
dd STARTAPP ; program start dd STARTAPP ; program start
dd I_END ; program image size dd I_END ; program image size
dd E_END ; required amount of memory dd E_END ; required amount of memory
dd stacktop ; reserved=no extended header dd stacktop ; reserved=no extended header
dd 0, 0 dd 0, 0
include '../../../macros.inc' include '../../macros.inc'
SCREEN_WIDTH = 320 include '../../KOSfuncs.inc'
SCREEN_HEIGHT = 200
SCREEN_WIDTH = 600 ;.. mod 8 == 0
Screen_W dd SCREEN_WIDTH
Screen_H dd 400
lost_bytes dd 0
SIMD equ SSE SIMD equ SSE
SIMD_BYTES = 8 SIMD_BYTES = 8
; SSE 8 ; SSE 8
@@ -46,9 +54,11 @@ PART_SIZE = 20
macro shade macro shade
{ {
local .lop local .lop
mov ecx, [Screen_H]
imul ecx, [Screen_W]
shr ecx, 3 ;ecx = Screen_W * Screen_H / SIMD_BYTES
mov edi, [buffer]
if SIMD eq SSE if SIMD eq SSE
mov ecx, SCREEN_WIDTH * SCREEN_HEIGHT / SIMD_BYTES
mov edi, buffer
movq mm1, qword [sub_mask] movq mm1, qword [sub_mask]
.lop: .lop:
movq mm0, [edi] movq mm0, [edi]
@@ -57,8 +67,6 @@ if SIMD eq SSE
add edi, SIMD_BYTES add edi, SIMD_BYTES
loop .lop loop .lop
else if SIMD eq AVX else if SIMD eq AVX
mov ecx, SCREEN_WIDTH * SCREEN_HEIGHT / SIMD_BYTES
mov edi, buffer
vmovdqa xmm1, xword [sub_mask] vmovdqa xmm1, xword [sub_mask]
.lop: .lop:
vmovdqa xmm0, [edi] vmovdqa xmm0, [edi]
@@ -67,8 +75,6 @@ else if SIMD eq AVX
add edi, SIMD_BYTES add edi, SIMD_BYTES
loop .lop loop .lop
else if SIMD eq AVX2 else if SIMD eq AVX2
mov ecx, SCREEN_WIDTH * SCREEN_HEIGHT / SIMD_BYTES
mov edi, buffer
vmovdqa ymm1, yword [sub_mask] vmovdqa ymm1, yword [sub_mask]
.lop: .lop:
vmovdqa ymm0, [edi] vmovdqa ymm0, [edi]
@@ -77,8 +83,6 @@ else if SIMD eq AVX2
add edi, SIMD_BYTES add edi, SIMD_BYTES
loop .lop loop .lop
else if SIMD eq AVX512 else if SIMD eq AVX512
mov ecx, SCREEN_WIDTH * SCREEN_HEIGHT / SIMD_BYTES
mov edi, buffer
vmovdqa64 zmm1, zword [sub_mask] vmovdqa64 zmm1, zword [sub_mask]
.lop: .lop:
vmovdqa64 zmm0, [edi] vmovdqa64 zmm0, [edi]
@@ -91,10 +95,18 @@ end if
macro blur_prepare macro blur_prepare
{ {
mov ecx, (SCREEN_WIDTH * SCREEN_HEIGHT - SCREEN_WIDTH * 2 - SIMD_BYTES*2) / SIMD_BYTES mov ecx, [Screen_H]
mov edi, buffer + SCREEN_WIDTH + SIMD_BYTES dec ecx
dec ecx
imul ecx, [Screen_W]
sub ecx, SIMD_BYTES*2
shr ecx, 3 ;ecx = (Screen_W * (Screen_H - 2) - SIMD_BYTES*2) / SIMD_BYTES
mov edi, SIMD_BYTES
add edi, [buffer]
add edi, [Screen_W]
} }
; eax = [Screen_W]
macro blur macro blur
{ {
local .lop local .lop
@@ -104,8 +116,10 @@ if SIMD eq SSE
movq mm1, [edi + 1] movq mm1, [edi + 1]
movq mm2, [edi - 1] movq mm2, [edi - 1]
movq mm3, mm0 movq mm3, mm0
movq mm4, [edi - SCREEN_WIDTH] neg eax
movq mm5, [edi + SCREEN_WIDTH] movq mm4, [edi + eax]
neg eax
movq mm5, [edi + eax]
pavgb mm0, mm1 ; mm0 = avg(cur,cur+1) pavgb mm0, mm1 ; mm0 = avg(cur,cur+1)
pavgb mm3, mm2 ; mm3 = avg(cur,cur-1) pavgb mm3, mm2 ; mm3 = avg(cur,cur-1)
@@ -120,11 +134,13 @@ else if SIMD eq AVX
.lop: .lop:
vmovdqa xmm0, [edi] vmovdqa xmm0, [edi]
vmovdqa xmm1, xmm0 vmovdqa xmm1, xmm0
vmovdqa xmm2, [edi - SCREEN_WIDTH] neg eax
vmovdqa xmm2, [edi + eax]
neg eax
vpavgb xmm0, xmm0, [edi + 1] vpavgb xmm0, xmm0, [edi + 1]
vpavgb xmm1, xmm1, [edi - 1] vpavgb xmm1, xmm1, [edi - 1]
vpavgb xmm2, xmm2, [edi + SCREEN_WIDTH] vpavgb xmm2, xmm2, [edi + eax]
vpavgb xmm1, xmm1, xmm2 vpavgb xmm1, xmm1, xmm2
vpavgb xmm0, xmm0, xmm1 vpavgb xmm0, xmm0, xmm1
@@ -135,11 +151,13 @@ else if SIMD eq AVX2
.lop: .lop:
vmovdqa ymm0, [edi] vmovdqa ymm0, [edi]
vmovdqa ymm1, ymm0 vmovdqa ymm1, ymm0
vmovdqa ymm2, [edi - SCREEN_WIDTH] neg eax
vmovdqa ymm2, [edi + eax]
neg eax
vpavgb ymm0, ymm0, [edi + 1] vpavgb ymm0, ymm0, [edi + 1]
vpavgb ymm1, ymm1, [edi - 1] vpavgb ymm1, ymm1, [edi - 1]
vpavgb ymm2, ymm2, [edi + SCREEN_WIDTH] vpavgb ymm2, ymm2, [edi + eax]
vpavgb ymm1, ymm1, ymm2 vpavgb ymm1, ymm1, ymm2
vpavgb ymm0, ymm0, ymm1 vpavgb ymm0, ymm0, ymm1
@@ -150,11 +168,13 @@ else if SIMD eq AVX512
.lop: .lop:
vmovdqa64 zmm0, [edi] vmovdqa64 zmm0, [edi]
vmovdqa64 zmm1, zmm0 vmovdqa64 zmm1, zmm0
vmovdqa64 zmm2, [edi - SCREEN_WIDTH] neg eax
vmovdqa64 zmm2, [edi + eax]
neg eax
vpavgb zmm0, zmm0, [edi + 1] vpavgb zmm0, zmm0, [edi + 1]
vpavgb zmm1, zmm1, [edi - 1] vpavgb zmm1, zmm1, [edi - 1]
vpavgb zmm2, zmm2, [edi + SCREEN_WIDTH] vpavgb zmm2, zmm2, [edi + eax]
vpavgb zmm1, zmm1, zmm2 vpavgb zmm1, zmm1, zmm2
vpavgb zmm0, zmm0, zmm1 vpavgb zmm0, zmm0, zmm1
@@ -164,6 +184,7 @@ else if SIMD eq AVX512
end if end if
} }
; eax = [Screen_W]
macro blur_right macro blur_right
{ {
local .lop local .lop
@@ -171,8 +192,8 @@ if SIMD eq SSE
.lop: .lop:
movq mm0, [edi] movq mm0, [edi]
movq mm1, [edi + 1] movq mm1, [edi + 1]
movq mm2, [edi + SCREEN_WIDTH] movq mm2, [edi + eax]
movq mm3, [edi + SCREEN_WIDTH + 1] movq mm3, [edi + eax + 1]
pavgb mm0, mm1 pavgb mm0, mm1
pavgb mm3, mm2 pavgb mm3, mm2
pavgb mm0, mm3 pavgb mm0, mm3
@@ -182,9 +203,9 @@ if SIMD eq SSE
else if SIMD eq AVX else if SIMD eq AVX
.lop: .lop:
vmovdqa xmm0, [edi] vmovdqa xmm0, [edi]
vmovdqu xmm1, [edi + SCREEN_WIDTH + 1] vmovdqu xmm1, [edi + eax + 1]
vpavgb xmm2, xmm0, [edi + 1] vpavgb xmm2, xmm0, [edi + 1]
vpavgb xmm3, xmm1, [edi + SCREEN_WIDTH] vpavgb xmm3, xmm1, [edi + eax]
vpavgb xmm4, xmm2, xmm3 vpavgb xmm4, xmm2, xmm3
vmovdqa [edi], xmm4 vmovdqa [edi], xmm4
add edi, SIMD_BYTES add edi, SIMD_BYTES
@@ -192,9 +213,9 @@ else if SIMD eq AVX
else if SIMD eq AVX2 else if SIMD eq AVX2
.lop: .lop:
vmovdqa ymm0, [edi] vmovdqa ymm0, [edi]
vmovdqu ymm1, [edi + SCREEN_WIDTH + 1] vmovdqu ymm1, [edi + eax + 1]
vpavgb ymm2, ymm0, [edi + 1] vpavgb ymm2, ymm0, [edi + 1]
vpavgb ymm3, ymm1, [edi + SCREEN_WIDTH] vpavgb ymm3, ymm1, [edi + eax]
vpavgb ymm4, ymm2, ymm3 vpavgb ymm4, ymm2, ymm3
vmovdqa [edi], ymm4 vmovdqa [edi], ymm4
add edi, SIMD_BYTES add edi, SIMD_BYTES
@@ -202,9 +223,9 @@ else if SIMD eq AVX2
else if SIMD eq AVX512 else if SIMD eq AVX512
.lop: .lop:
vmovdqa64 zmm0, [edi] vmovdqa64 zmm0, [edi]
vmovdqu64 zmm1, [edi + SCREEN_WIDTH + 1] vmovdqu64 zmm1, [edi + eax + 1]
vpavgb zmm2, zmm0, [edi + 1] vpavgb zmm2, zmm0, [edi + 1]
vpavgb zmm3, zmm1, [edi + SCREEN_WIDTH] vpavgb zmm3, zmm1, [edi + eax]
vpavgb zmm4, zmm2, zmm3 vpavgb zmm4, zmm2, zmm3
vmovdqa64 [edi], zmm4 vmovdqa64 [edi], zmm4
add edi, SIMD_BYTES add edi, SIMD_BYTES
@@ -217,12 +238,12 @@ STARTAPP:
init_palette: init_palette:
mov edi, pal mov edi, pal
xor eax, eax xor eax, eax
red_loop: @@:
stosd stosd
stosd stosd
add eax, 0x040000 add eax, 0x040000
and eax, 0xFFFFFF and eax, 0xFFFFFF
jnz red_loop jnz @b
mov eax, 63*4 SHL 16 mov eax, 63*4 SHL 16
@@: @@:
@@ -231,11 +252,9 @@ red_loop:
add ax, 0x0404 add ax, 0x0404
jnc @b jnc @b
;zero_buffer: ;init buffer
mov ecx, SCREEN_WIDTH * SCREEN_HEIGHT / 4 mcall SF_SYS_MISC,SSF_HEAP_INIT
; mov edi, buffer call OnResize
xor eax, eax
rep stosd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Main Functions ; Main Functions
@@ -253,30 +272,64 @@ end virtual
jmp MAIN jmp MAIN
align 4
OnResize:
mov ecx,[Screen_W]
imul ecx,[Screen_H]
;ecx = SCREEN_W*SCREEN_H
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[buffer]
mov [buffer],eax
ret
align 4
red: red:
mcall 9, proc_info, -1 mcall SF_THREAD_INFO, proc_info, -1
x = 100 areacolor = 0x53224466
y = 70 mcall SF_REDRAW, SSF_BEGIN_DRAW
xsize = SCREEN_WIDTH+9 mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
ysize = SCREEN_HEIGHT+4 add eax, 4
areacolor = 0x54224466 push eax ;for test resize
mov eax, 12 ; function 12:tell os about windowdraw add eax, [Screen_H]
mov ebx, 1 ; 1, start of draw lea ecx, [(70 shl 16) + eax]
int 0x40 mov ebx, [Screen_W]
mov eax, 48 lea ebx, [(100 shl 16) + 9 + ebx]
mov ebx, 4 mcall SF_CREATE_WINDOW,,, areacolor,, window_title
int 0x40
lea ecx, [(y SHL 16) + ysize + eax]
xor eax, eax ; function 0 : define and draw window
mov ebx, (x SHL 16) + xsize ; [x start] *65536 + [x size]
mov edx, areacolor ; color of work area RRGGBB
mov edi, window_title
int 0x40
mov eax, 12 ; end of redraw
mov ebx, 2
int 0x40
;test resize
pop eax
cmp dword[proc_info.box.height],0
je .resize_end
sub eax,[proc_info.box.height]
neg eax
cmp eax,[Screen_H]
je .end_h
cmp eax,32 ;min height
jge @f
mov eax,32
@@:
mov [Screen_H],eax
xor eax,eax
mov [Screen_W],eax
.end_h:
mov eax,[proc_info.box.width]
sub eax,9
mov [lost_bytes],eax
and eax,0xffff-(SIMD_BYTES-1)
cmp eax,[Screen_W]
je .resize_end
cmp eax,64 ;min width
jge @f
mov eax,64
@@:
mov [Screen_W],eax
call OnResize
.resize_end:
mcall SF_REDRAW, SSF_END_DRAW ; end of redraw
align 4
MAIN: MAIN:
test [proc_info.wnd_state], 0x04 test [proc_info.wnd_state], 0x04
jnz still jnz still
@@ -291,11 +344,15 @@ MAIN:
cmp eax, 5 cmp eax, 5
jb .new_particle jb .new_particle
cmp eax, SCREEN_WIDTH - 5 mov edx, [Screen_W]
sub edx, 5
cmp eax, edx
jge .new_particle jge .new_particle
cmp ebx, 5 cmp ebx, 5
jb .new_particle jb .new_particle
cmp ebx, SCREEN_HEIGHT - 5 mov edx, [Screen_H]
sub edx, 5
cmp ebx, edx
jl .part_ok jl .part_ok
.new_particle: .new_particle:
@@ -303,9 +360,11 @@ MAIN:
jmp .advance_particles jmp .advance_particles
.part_ok: .part_ok:
imul edi, ebx, SCREEN_WIDTH mov edi, ebx
imul edi, [Screen_W]
mov dl, [ebp+COLOR_OFFSET] mov dl, [ebp+COLOR_OFFSET]
mov [buffer+eax+edi], dl add eax,[buffer]
mov [eax+edi], dl
mov eax, [ebp+X_SPEED_OFFSET] mov eax, [ebp+X_SPEED_OFFSET]
add [ebp+X_OFFSET], eax add [ebp+X_OFFSET], eax
@@ -324,6 +383,7 @@ MAIN:
shade shade
; jmp .copy_buffer_to_video ; jmp .copy_buffer_to_video
blur_prepare blur_prepare
mov eax, [Screen_W]
test dword [blur_right_flag] , 0x800000 test dword [blur_right_flag] , 0x800000
jnz .do_blur_right jnz .do_blur_right
blur blur
@@ -339,22 +399,32 @@ MAIN:
.copy_buffer_to_video: .copy_buffer_to_video:
mcall 48, 4 mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
lea edx, [(5 SHL 16) + eax] lea edx, [(5 shl 16) + eax]
mov eax, 65
mov ebx, buffer
mov ecx, (SCREEN_WIDTH SHL 16) + SCREEN_HEIGHT
push 8 push 8
pop esi pop esi
mov edi, pal
xor ebp, ebp xor ebp, ebp
int 0x40 mov ecx, [Screen_W]
shl ecx, 16
add ecx, [Screen_H]
mcall SF_PUT_IMAGE_EXT, [buffer],,,, pal
and [lost_bytes], SIMD_BYTES-1
jz still
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
mov ecx, eax
shl ecx, 16
add ecx, [Screen_H]
mov ebx, [Screen_W]
add ebx, 5 ;left border
shl ebx, 16
add ebx, [lost_bytes]
xor edx, edx
mcall SF_DRAW_RECT
align 4
still: still:
mov eax, 11 ; Test if there is an event in the queue. mcall SF_WAIT_EVENT_TIMEOUT, 1
int 0x40
dec eax ; redraw request ? dec eax ; redraw request ?
jz red jz red
@@ -365,10 +435,9 @@ still:
jmp MAIN jmp MAIN
align 4
key: key:
mov eax, 2 mcall SF_GET_KEY
int 0x40
; cmp ah, 1 ; Test Esc in Scan ; cmp ah, 1 ; Test Esc in Scan
; je close_app ; je close_app
cmp ah, 27 ; Test Esc in ASCII cmp ah, 27 ; Test Esc in ASCII
@@ -378,8 +447,7 @@ key:
button: button:
; we have only one button, close ; we have only one button, close
close_app: close_app:
mov eax, -1 ; close this program mcall SF_TERMINATE_PROCESS
int 0x40
init_particle: init_particle:
rdtsc rdtsc
@@ -389,7 +457,7 @@ init_particle:
call rand call rand
cdq cdq
;xor dx, dx ;xor dx, dx
mov ebx, SCREEN_WIDTH mov ebx, [Screen_W]
div ebx div ebx
shl edx, 6 shl edx, 6
mov [4 + global_x], edx mov [4 + global_x], edx
@@ -397,7 +465,7 @@ init_particle:
call rand call rand
cdq cdq
;xor dx, dx ;xor dx, dx
mov ebx, SCREEN_HEIGHT mov ebx, [Screen_H]
div ebx div ebx
shl edx, 6 shl edx, 6
mov [4 + global_y], edx mov [4 + global_y], edx
@@ -444,7 +512,8 @@ proc_info process_information
align 16 align 16
pal rb 256 * 4 pal rb 256 * 4
align SIMD_BYTES align SIMD_BYTES
buffer rb SCREEN_WIDTH * SCREEN_HEIGHT buffer dd 0
E_END: align 4
rd 0x200 rd 1024
stacktop: stacktop:
E_END:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

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

View File

@@ -1,15 +1,24 @@
include "lang.inc" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include "../../../macros.inc" ; SPDX-License-Identifier: GPL-2.0-only
include "../../../KOSfuncs.inc" ; A MoveBack demo
; Copyright (C) 2010-2025 KolibriOS team
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
WND_SIZE_X = 320 include "../../macros.inc"
WND_SIZE_Y = 200 include "../../KOSfuncs.inc"
KOS_APP_START
Screen_W dd 600-10 ;10 px for borders
Screen_H dd 400
VC_DELTA = 1 VC_DELTA = 1
HC_DELTA = 2 HC_DELTA = 2
MEOS_APP_START
CODE CODE
mcall SF_SYS_MISC,SSF_HEAP_INIT
call OnResize
fninit fninit
call init_sinus_table call init_sinus_table
call init_background call init_background
@@ -17,6 +26,7 @@ CODE
mcall SF_SET_EVENTS_MASK, 101b mcall SF_SET_EVENTS_MASK, 101b
jmp .paint_window jmp .paint_window
align 4
.event_loop: .event_loop:
mcall SF_WAIT_EVENT_TIMEOUT, 1 mcall SF_WAIT_EVENT_TIMEOUT, 1
@@ -34,23 +44,62 @@ CODE
add word [hor_counter],HC_DELTA add word [hor_counter],HC_DELTA
call handle_animation call handle_animation
xor ebp,ebp xor ebp,ebp
mcall SF_PUT_IMAGE_EXT, virtual_screen_8,<WND_SIZE_X,WND_SIZE_Y>,<0,0>,8,_palette mov ecx,[Screen_W]
shl ecx,16
add ecx,[Screen_H]
mcall SF_PUT_IMAGE_EXT, [virtual_screen_8],,<0,0>,8,_palette
jmp .event_loop jmp .event_loop
.paint_window: .paint_window:
mcall SF_THREAD_INFO, proc_info,-1 mcall SF_THREAD_INFO, proc_info,-1
cmp dword[proc_info.box.height],0
je .resize_end
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
add eax,4
sub eax,[proc_info.box.height]
neg eax
cmp eax,[Screen_H]
je .end_h
cmp eax,32 ;min height
jge @f
mov eax,32
@@:
mov [Screen_H],eax
xor eax,eax
mov [Screen_W],eax
.end_h:
mov eax,[proc_info.box.width]
sub eax,9
cmp eax,[Screen_W]
je .resize_end
cmp eax,64 ;min width
jge @f
mov eax,64
@@:
mov [Screen_W],eax
call OnResize
.resize_end:
mcall SF_REDRAW, SSF_BEGIN_DRAW mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
lea ecx,[eax + (100 shl 16) + WND_SIZE_Y+4] lea ecx,[eax + (100 shl 16) +4]
add ecx,[Screen_H]
mov edi,title mov edi,title
mcall SF_CREATE_WINDOW, <100,WND_SIZE_X+9>,,0x74000000 mov ebx,(100 shl 16)+9
add ebx,[Screen_W]
mcall SF_CREATE_WINDOW,,,0x73000000
test [proc_info.wnd_state], 0x04 test [proc_info.wnd_state], 0x04
jnz @f jnz @f
xor ebp,ebp xor ebp,ebp
mcall SF_PUT_IMAGE_EXT, virtual_screen_8,<WND_SIZE_X,WND_SIZE_Y>,<0,0>,8,_palette mov ecx,[Screen_W]
shl ecx,16
add ecx,[Screen_H]
mcall SF_PUT_IMAGE_EXT, [virtual_screen_8],,<0,0>,8,_palette
@@: @@:
mcall SF_REDRAW, SSF_END_DRAW mcall SF_REDRAW, SSF_END_DRAW
@@ -105,6 +154,14 @@ init_background:
jne .ib_vertical jne .ib_vertical
ret ret
align 4
OnResize:
mov ecx,[Screen_W]
imul ecx,[Screen_H]
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[virtual_screen_8]
mov [virtual_screen_8],eax
ret
s_OFFX = 0 s_OFFX = 0
s_OFFY = 2 s_OFFY = 2
@@ -120,10 +177,12 @@ handle_animation:
add ebx,ebx add ebx,ebx
mov ax,[sinetable+ebx] mov ax,[sinetable+ebx]
mov [esp+s_OFFX],ax mov [esp+s_OFFX],ax
mov edi,virtual_screen_8 mov edi,[virtual_screen_8]
mov edx,WND_SIZE_Y-1 mov edx,[Screen_H]
dec edx
.a_ver: .a_ver:
mov ecx,WND_SIZE_X-1 mov ecx,[Screen_W]
dec ecx
mov bx,[esp+s_OFFY] mov bx,[esp+s_OFFY]
add bx,dx add bx,dx
and ebx,255 and ebx,255
@@ -153,8 +212,7 @@ UDATA
_palette: rd 256 _palette: rd 256
virtual_screen_8: virtual_screen_8 dd ?
rb WND_SIZE_X*WND_SIZE_Y
background: background:
rb 256*256 rb 256*256
@@ -164,4 +222,4 @@ UDATA
proc_info process_information proc_info process_information
MEOS_APP_END KOS_APP_END

View File

@@ -1,7 +0,0 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"movback.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "movback")

View File

@@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause

View File

@@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())

View File

@@ -1,48 +1,104 @@
; Originally written by Jarek Pelczar ; Originally written by Jarek Pelczar
include "lang.inc" include "..\..\macros.inc"
include "..\..\..\macros.inc" include "..\..\KOSfuncs.inc"
WND_SIZE_X = 320 KOS_APP_START
WND_SIZE_Y = 200
WND_SIZE_X dd 640
WND_SIZE_Y dd 400
title db 'Plasma',0
MEOS_APP_START
CODE CODE
mcall SF_SYS_MISC,SSF_HEAP_INIT
call OnResize
fninit fninit
mcall 40,101b mcall SF_SET_EVENTS_MASK, 101b
call init_palette call init_palette
call init_texture call init_texture
jmp .paint_window jmp .paint_window
.event_loop: .event_loop:
mcall 23,1 mcall SF_WAIT_EVENT_TIMEOUT, 1
test eax,eax test eax,eax
je .draw_screen je .draw_screen
dec eax dec eax
je .paint_window je .paint_window
or eax,-1 mcall SF_TERMINATE_PROCESS
mcall
.draw_screen: .draw_screen:
xor ebp,ebp xor ebp,ebp
mcall 65,virtual_screen_8,<WND_SIZE_X,WND_SIZE_Y>,0,8,_palette mov ecx,[WND_SIZE_X]
shl ecx,16
add ecx,[WND_SIZE_Y]
mcall SF_PUT_IMAGE_EXT, [virtual_screen_8],,0,8,_palette
call rotate_pal call rotate_pal
jmp .event_loop jmp .event_loop
.paint_window: .paint_window:
mcall 12,1 mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall 48,4 ; get skin height ;if window resize
lea ecx,[eax + (110 shl 16) + WND_SIZE_Y + 4] mcall SF_THREAD_INFO,procinfo,-1
cmp dword[procinfo.box.height],0
je .resize_end
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
add eax,4
sub eax,[procinfo.box.height]
neg eax
cmp eax,[WND_SIZE_Y]
je .end_h
cmp eax,32 ;min height
jge @f
mov eax,32
@@:
mov [WND_SIZE_Y],eax
xor eax,eax
mov [WND_SIZE_X],eax
.end_h:
mov eax,[procinfo.box.width]
sub eax,9
cmp eax,[WND_SIZE_X]
je .resize_end
cmp eax,64 ;min width
jge @f
mov eax,64
@@:
mov [WND_SIZE_X],eax
call OnResize
call init_texture
.resize_end:
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
lea ecx,[eax + (110 shl 16) + 4]
add ecx,[WND_SIZE_Y]
mov edi,title mov edi,title
mcall 0,<110,WND_SIZE_X+9>,,0x74000000 mov ebx,[WND_SIZE_X]
add ebx,(110 shl 16)+9
mcall SF_CREATE_WINDOW,,,0x73000000
xor ebp,ebp xor ebp,ebp
mcall 65,virtual_screen_8,<WND_SIZE_X,WND_SIZE_Y>,0,8,_palette mov ecx,[WND_SIZE_X]
shl ecx,16
add ecx,[WND_SIZE_Y]
mcall SF_PUT_IMAGE_EXT, [virtual_screen_8],,0,8,_palette
mcall 12,2 mcall SF_REDRAW, SSF_END_DRAW
jmp .event_loop jmp .event_loop
align 4
OnResize:
mov ecx,[WND_SIZE_X]
imul ecx,[WND_SIZE_Y]
mcall SF_SYS_MISC,SSF_MEM_ALLOC,, [virtual_screen_8]
mov [virtual_screen_8],eax
ret
align 4
init_palette: init_palette:
mov edi,_palette mov edi,_palette
mov ecx,64 mov ecx,64
@@ -92,7 +148,7 @@ init_texture:
mov [_fpom16],180 mov [_fpom16],180
fidiv [_fpom16] fidiv [_fpom16]
fstp [_st_rad] fstp [_st_rad]
mov edi,virtual_screen_8 mov edi,[virtual_screen_8]
cdq cdq
.itex_vertical: .itex_vertical:
xor ecx,ecx xor ecx,ecx
@@ -120,10 +176,10 @@ init_texture:
inc eax inc eax
stosb stosb
inc ecx inc ecx
cmp ecx,WND_SIZE_X cmp ecx,[WND_SIZE_X]
jne .itex_horizontal jne .itex_horizontal
inc edx inc edx
cmp edx,WND_SIZE_Y cmp edx,[WND_SIZE_Y]
jne .itex_vertical jne .itex_vertical
ret ret
@@ -141,7 +197,6 @@ rotate_pal:
DATA DATA
_multiplier dd 63.5 _multiplier dd 63.5
title db 'Plasma',0
UDATA UDATA
_fpom32 rd 1 _fpom32 rd 1
@@ -149,7 +204,7 @@ UDATA
_st_rad rd 1 _st_rad rd 1
_palette: rd 256 _palette: rd 256
virtual_screen_8: virtual_screen_8 rd 1
rb WND_SIZE_X*WND_SIZE_Y procinfo process_information
MEOS_APP_END KOS_APP_END

View File

@@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause

View File

@@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause

View File

@@ -20,7 +20,7 @@ include '../../KOSfuncs.inc'
title db 'Tube - FPU',0 title db 'Tube - FPU',0
SCREEN_W dd 640-10 ;10 px for borders SCREEN_W dd 600-10 ;10 px for borders
SCREEN_H dd 400-10 SCREEN_H dd 400-10
align 4 align 4
@@ -28,7 +28,8 @@ START:
mcall SF_SYS_MISC,SSF_HEAP_INIT mcall SF_SYS_MISC,SSF_HEAP_INIT
call OnResize call OnResize
call draw_window call draw_window
call init_tube fninit
fldz
push ebx push ebx
still: still:
@@ -56,8 +57,6 @@ OnResize:
;ecx = SCREEN_W*SCREEN_H ;ecx = SCREEN_W*SCREEN_H
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[PIXBUF] mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[PIXBUF]
mov [PIXBUF],eax mov [PIXBUF],eax
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[buf1]
mov [buf1],eax
lea ecx,[ecx+2*ecx] lea ecx,[ecx+2*ecx]
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[buf2] mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[buf2]
mov [buf2],eax mov [buf2],eax
@@ -159,14 +158,14 @@ STORE_1:
call display_image call display_image
pop esi pop esi ;esi=PIXBUF
mov ecx,[SCREEN_W] mov ecx,[SCREEN_W]
imul ecx,[SCREEN_H] imul ecx,[SCREEN_H]
align 4 align 4
BLUR: BLUR:
inc esi
sar byte [esi],2 sar byte [esi],2
inc esi
loop BLUR loop BLUR
ret ret
@@ -185,13 +184,15 @@ newp:
movzx edx,byte [esi] movzx edx,byte [esi]
shl edx,4 shl edx,4
mov [edi],edx mov word [edi],dx ;blue,green
;shr edx,16
;mov [edi+2],dl ;red - not used
add edi,3 add edi,3
inc esi inc esi
cmp esi,eax cmp esi,eax
jbe newp jb newp
xor edx,edx xor edx,edx
mov ecx,[SCREEN_W] mov ecx,[SCREEN_W]
@@ -253,57 +254,10 @@ align 4
TEXUV: TEXUV:
rd 1 rd 1
align 4
init_tube:
mov ecx,256
mov edi,[buf1]
PAL1:
mov edx,3C8h
mov eax,ecx
inc edx
sar al,1
js PAL2
mul al
shr ax,6
PAL2:
mov al,0
jns PAL3
sub al,cl
shr al,1
shr al,1
PAL3:
mov ebx,ecx
mov [ebx+edi],bh
loop PAL1
mov ecx,256
TEX:
mov bx,cx
add ax,cx
rol ax,cl
mov dh,al
sar dh,5
adc dl,dh
adc dl,[ebx+255+edi]
shr dl,1
mov [ebx+edi],dl
not bh
mov [ebx+edi],dl
loop TEX
fninit
fldz
ret
align 4 align 4
image_end: image_end:
PIXBUF rd 1 PIXBUF rd 1
buf1 rd 1
buf2 rd 1 buf2 rd 1
procinfo process_information procinfo process_information

View File

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

View File

@@ -1,142 +0,0 @@
include 'proc32.inc'
macro start_draw_window x,y,xsize,ysize,areacolor,caption;,capsize
{
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
int 0x40
; DRAW WINDOW
mov eax, 48 ; function 48.4 : get skin height
mov ebx, 4
int 0x40
push eax
lea ecx, [y*65536+ysize+eax]; [y start] *65536 + [y size] + [skin_height]
xor eax, eax ; function 0 : define and draw window
mov ebx, x*65536+xsize ; [x start] *65536 + [x size]
mov edx, areacolor ; color of work area RRGGBB
;mov esi, 0x00334455 ; color of grab bar RRGGBB
mov edi, caption;0x00ddeeff ; color of frames RRGGBB
int 0x40
; WINDOW LABEL
;mov eax, 4 ; function 4 : write text to window
;mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
;mov ecx, 0x00ffffff ; color of text RRGGBB
;mov edx, caption ; pointer to text beginning
;mov esi, capsize ; text length
;mov eax, 71 ; function 71.1
;mov ebx, 1 ; set window caption
;mov ecx, caption ; pointer to text
;int 0x40
pop eax
}
macro end_draw_window
{
mov eax, 12 ; end of redraw
mov ebx, 2
int 0x40
}
proc draw_button stdcall, x:dword, y:dword, xsize:dword, ysize:dword, \
id:dword, butcolor:dword, text:dword, textlen:byte, textcolor:dword
;pusha
mov ebx, dword [x]
shl ebx, 16
add ebx, dword [xsize] ; [x start] *65536 + [x size]
mov ecx, dword [y]
shl ecx, 16
add ecx, dword [ysize] ; [y start] *65536 + [y size]
mov edx, dword [id] ; button id
mov esi, dword [butcolor] ; button color RRGGBB
mov eax, 8 ; function 8 : define and draw button
int 0x40
mov ebx, dword [x]
add ebx, 5
shl ebx, 16
mov eax, dword [ysize]
sub eax, 5
shr eax, 1
add ebx, eax
add ebx, dword [y] ;mov ebx, (x+5)*65536+y+(ysize-5)/2 ; Draw button text
mov ecx, dword [textcolor]
mov edx, dword [text]
xor eax, eax
mov al, byte [textlen]
mov esi, eax
mov eax, 4
int 0x40
;popa
ret
endp
macro outtextxy x,y,prompt,prompt_len,color
{
pusha
mov ebx, x*65536+y ; draw info text with function 4
mov ecx, color
mov edx, prompt
xor eax, eax
mov al, prompt_len
mov esi, eax
mov eax, 4
int 0x40
popa
}
;proc bar x:dword, y:dword, xsize:dword, ysize:dword, color:dword
macro bar x, y, xsize, ysize, color
{
pusha
mov eax, 13
;mov ebx, [x]
;shl ebx, 16
;add ebx, [xsize]
;mov ecx, [y]
;shl ecx, 16
;add ecx, [ysize]
;mov edx, [color]
mov ebx, x*65536+xsize
mov ecx, y*65536+ysize
mov edx, color
int 0x40
popa
;ret
;endp
}
macro line x1,y1,x2,y2,color
{
pusha
mov eax, 38
mov ebx, x1*65536+x2
mov ecx, y1*65536+y2
mov edx, color
int 0x40
popa
}
macro rectangle x,y,xsize,ysize,color
{
x2=x+xsize
y2=y+ysize
line x,y,x2,y,color
line x,y,x,y2,color
line x,y2,x2,y2,color
line x2,y,x2,y2,color
}
macro putpixel x,y,color
{
mov eax, 1
mov ebx, x
mov ecx, y
mov edx, color
int 0x40
}

View File

@@ -1,191 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; A unvwater demo
; Programmed by Octavio Vega Fernandez
; http://octavio.vega.fernandez.googlepages.com/CV4.HTM
; Converted to KolibriOS, By Asper
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use32
org 0x0
db 'MENUET01' ; header
dd 1 ; version
dd STARTAPP ; program start
dd I_END ; program image size
dd MEM ; size memory for program
dd STACKTOP ; pointer of stack
dd 0
dd 0
;macro start_draw_window x,y,xsize,ysize,areacolor,caption;,capsize
;{
; mov eax, 12 ; function 12:tell os about windowdraw
; mov ebx, 1 ; 1, start of draw
; int 0x40
; ; DRAW WINDOW
; mov eax, 48 ; function 48.4 : get skin height
; mov ebx, 4
; int 0x40
; push eax
; lea ecx, [y*65536+ysize+eax]; [y start] *65536 + [y size] + [skin_height]
; xor eax, eax ; function 0 : define and draw window
; mov ebx, x*65536+xsize ; [x start] *65536 + [x size]
; mov edx, areacolor ; color of work area RRGGBB
; ;mov esi, 0x00334455 ; color of grab bar RRGGBB
; mov edi, caption;0x00ddeeff ; color of frames RRGGBB
; int 0x40
; pop eax
;}
;
;macro end_draw_window
;{
; mov eax, 12 ; end of redraw
; mov ebx, 2
; int 0x40
;}
include "aspapi.inc"
SCREEN_WIDTH equ 100h
SCREEN_HEIGHT equ 100h
STARTAPP:
mov eax, 18 ;Get CPU speed
mov ebx, 5
int 0x40
shr eax, 28
mov dword [delay], eax
init_palette:
mov edi, Paleta
;xor eax, eax
mov eax, 0x40
@@:
stosd
inc al
jnz @b
MAIN:
l1:
xor esi, esi
l11:
xor ebx, ebx
mov edx, 303h
sub esi, 101h
l2:
and esi, 0xFFFF ;esi=si
add bl, [esi+img]
adc bh, ah
inc esi
dec dh
jnz l2
mov dh, 3
add esi, 100h-3
dec dl
jnz l2
sub esi, 1ffh
and esi, 0xFFFF ;esi=si
mov al, [img+esi]
sub bx, ax
shl ax, 2
sub bx, ax
shr bx, 2
mov ax, bx
shr ax, 7
sub bx, ax
mov [img+esi], bl
inc si
jnz l11
call copy_buffer_to_video
still:
mov eax, 11 ; Test if there is an event in the queue.
int 0x40
cmp al,1 ; redraw request ?
jz red
cmp al,2 ; key in buffer ?
jz key
cmp al,3 ; button in buffer ?
jz button
jmp MAIN
red:
call draw_window
jmp MAIN
key:
mov eax, 2
int 0x40
cmp ah, 27 ; Test Esc in ASCII
je close_app
jmp MAIN
button:
mov eax, 17 ; Get pressed button code
int 0x40
cmp ah, 1 ; Test x button
je close_app
jmp MAIN
draw_window:
start_draw_window 100,70,SCREEN_WIDTH+9,SCREEN_HEIGHT+4,0x54224466,labelt;, 14;labellen-labelt
mov dword [skin_h], eax
end_draw_window
ret
fail:
; Type something here.
close_app:
mov eax, -1 ; close this program
int 0x40
copy_buffer_to_video:
pusha
; mov eax, 18 ;@WAITVSYNC();
; mov ebx, 14
; int 0x40
mov eax, 5 ;delay
mov ebx, dword [delay]
int 0x40
mov eax, dword [skin_h]
lea edx, [5*65536+eax]
mov eax, 65
mov ebx, img
mov ecx, SCREEN_WIDTH*65536+SCREEN_HEIGHT ;ecx = w*65536+h
; mov edx, 5*65536+25 ;edx = x*65536+y
mov esi, 8
mov edi, Paleta
xor ebp, ebp
int 0x40
popa
ret
; DATA AREA
; Application Title
labelt db 'UnvWater demo',0
delay dd 0
skin_h dd 25 ; Skin height.
I_END:
Paleta rb 1024
img db 1
rb 10000h
rb 256
STACKTOP:
MEM:

View File

@@ -0,0 +1,233 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SPDX-License-Identifier: GPL-2.0-only
; Unvwater demo
; Copyright (C) 2010-2025 KolibriOS team
;
; Initially programmed by Octavio Vega Fernandez (c) in OctASM
; http://octavio.vega.fernandez.googlepages.com/CV4.HTM
; Converted to FASM for KolibriOS by Asper
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use32
org 0x0
db 'MENUET01' ; header
dd 1 ; version
dd STARTAPP ; program start
dd I_END ; program image size
dd MEM ; size memory for program
dd STACKTOP ; pointer of stack
dd 0,0
include '../../proc32.inc'
include '../../macros.inc'
include '../../KOSfuncs.inc'
Screen_W dd 600-10 ;10 px for borders
Screen_H dd 400
align 4
STARTAPP:
mcall SF_SYS_MISC,SSF_HEAP_INIT
call OnResize
mcall SF_SYSTEM, SSF_GET_CPU_FREQUENCY
shr eax, 28
mov dword [delay], eax
init_palette:
mov edi, Paleta
mov eax, 0x40
@@:
stosd
inc al
jnz @b
align 4
MAIN:
xor esi, esi
mov edi, [img]
mov ecx, [Screen_W]
imul ecx, [Screen_H]
l11:
xor ebx, ebx
mov edx, 303h
sub esi, [Screen_W]
dec esi
l2:
cmp esi,0
jge @f
add esi, ecx
@@:
cmp esi, ecx
jl @f
sub esi, ecx
@@:
add bl, [esi+edi]
adc bh, ah
inc esi
dec dh
jnz l2
mov dh, 3
add esi, [Screen_W]
sub esi, 3
dec dl
jnz l2
sub esi, [Screen_W]
sub esi, [Screen_W]
inc esi
cmp esi,0
jge @f
add esi, ecx
@@:
cmp esi, ecx
jl @f
sub esi, ecx
@@:
mov al, [edi+esi]
sub bx, ax
shl ax, 2
sub bx, ax
shr bx, 2
mov ax, bx
shr ax, 7
sub bx, ax
mov [edi+esi], bl
inc esi
cmp esi, ecx
jl l11
call copy_buffer_to_video
still:
mcall SF_CHECK_EVENT ; Test if there is an event in the queue.
cmp al,EV_REDRAW
jz red
cmp al,EV_KEY
jz key
cmp al,EV_BUTTON
jz button
jmp MAIN
red:
call draw_window
jmp MAIN
key:
mcall SF_GET_KEY
cmp ah, 27 ; Test Esc in ASCII
je close_app
jmp MAIN
button:
mcall SF_GET_BUTTON ; Get pressed button code
cmp ah, 1 ; Test x button
je close_app
jmp MAIN
align 4
draw_window:
mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
mov [skin_h], eax
lea ecx, [70*65536+4+eax]
add ecx, [Screen_H] ; [y start] *65536 + [y size] + [skin_height]
mov ebx, 100 shl 16
add ebx, [Screen_W]
add ebx, 9
mov edi, labelt
mcall SF_CREATE_WINDOW,,, 0x53224466
mcall SF_THREAD_INFO,procinfo,-1
mov eax, [skin_h]
add eax, 4
sub eax, [procinfo.box.height]
neg eax
cmp eax, [Screen_H]
je .end_h
cmp eax,32 ;min height
jge @f
mov eax,32
@@:
mov [Screen_H],eax
xor eax,eax
mov [Screen_W],eax
.end_h:
mov eax,[procinfo.box.width]
sub eax,9
cmp eax,[Screen_W]
je .resize_end
cmp eax,64 ;min width
jge @f
mov eax,64
@@:
mov [Screen_W],eax
call OnResize
.resize_end:
mcall SF_REDRAW, SSF_END_DRAW
ret
fail:
; Type something here.
close_app:
mcall SF_TERMINATE_PROCESS
align 4
OnResize:
mov ecx,[Screen_W]
imul ecx,[Screen_H]
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[img]
mov byte[eax],1 ; set the coordinate of the start of the first wave:
; eax+0 -> point(0,0), eax+H*W+W -> point(W,H)
mov [img],eax
ret
align 4
copy_buffer_to_video:
pusha
;mcall SF_SYSTEM, SSF_WAIT_RETRACE
mcall SF_SLEEP, [delay]
mov eax, [skin_h]
lea edx, [5*65536+eax]
mov ecx, [Screen_W]
shl ecx, 16
add ecx, [Screen_H]
;mov edx, 5*65536+25 ;edx = x*65536+y
mov esi, 8
mov edi, Paleta
xor ebp, ebp
mcall SF_PUT_IMAGE_EXT, [img]
popa
ret
; DATA AREA
; Application Title
labelt db 'UnvWater demo',0
delay dd 0
skin_h dd 25 ; Skin height.
I_END:
Paleta rb 1024
img dd 0
procinfo process_information
rb 256
align 4
STACKTOP:
MEM:

View File

@@ -601,6 +601,8 @@ edit_box_mouse:
jnz edit_box_mouse.mouse_left_button jnz edit_box_mouse.mouse_left_button
and word ed_flags,ed_mouse_on_off and word ed_flags,ed_mouse_on_off
mov ebx,ed_mouse_variable mov ebx,ed_mouse_variable
or ebx,ebx
jz edit_box_exit
push 0 push 0
pop dword [ebx] pop dword [ebx]
jmp edit_box_exit jmp edit_box_exit
@@ -610,13 +612,14 @@ edit_box_mouse:
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><><><E4AEAA><EFBFBD><EFBFBD><E0AEA2> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><><><E4AEAA><EFBFBD><EFBFBD><E0AEA2> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;---------------------------------------------------------- ;----------------------------------------------------------
mov eax,ed_mouse_variable mov eax,ed_mouse_variable
test eax,eax
jz @f ;<3B>᫨ ed_mouse_variable=0
push dword [eax] push dword [eax]
pop eax pop eax
test eax,eax test eax,eax
jz @f jz @f ;<3B>᫨ [ed_mouse_variable]=0
cmp eax,edi cmp eax,edi
je @f jne edit_box_mouse._blur
jmp edit_box_mouse._blur
;---------------------------------------------------------- ;----------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E2ADAE>⥫쭮 0 <20>.<2E> <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ;--- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E2ADAE>⥫쭮 0 <20>.<2E> <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
;---------------------------------------------------------- ;----------------------------------------------------------
@@ -672,8 +675,11 @@ edit_box_mouse._mshift:
or word ed_flags,ed_mouse_on or word ed_flags,ed_mouse_on
mov ed_pos,eax mov ed_pos,eax
mov ebx,ed_mouse_variable mov ebx,ed_mouse_variable
or ebx,ebx
jz edit_box_mouse.mv_end
push edi push edi
pop dword [ebx] pop dword [ebx]
edit_box_mouse.mv_end:
bts word ed_flags,1 bts word ed_flags,1
call edit_box_draw.bg call edit_box_draw.bg
jmp edit_box_mouse.m_sh jmp edit_box_mouse.m_sh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -1675,6 +1675,14 @@ proc generate_window_header
mov eax, [ebx+Image.Height] mov eax, [ebx+Image.Height]
call bin2dec call bin2dec
mov eax, [ebx+Image.Type]
dec eax
shl eax, 2
add eax, BppTypeNames
mov eax, [eax]
mov dword[edi], eax
add edi, 4
mov byte[edi], ')' mov byte[edi], ')'
inc edi inc edi
@@ -2544,6 +2552,18 @@ db 'XBM',0
.end: .end:
db 0 db 0
BppTypeNames:
db '@08b'
db '@24b'
db '@32b'
db '@15b'
db '@16b'
db '@01b'
db '@8gr'
db '@02b'
db '@04b'
db '@08a'
draw_window_fake: draw_window_fake:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

View File

@@ -1,12 +1,12 @@
draw_palitra: draw_palitra:
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD>
;mcall SF_DRAW_RECT, 110 shl 16+148, 9 shl 16+148, [sc.work] ;mcall SF_DRAW_RECT, PALITRA_XW, PALITRA_YW, [sc.work]
cmp [renmode],2 cmp [renmode],MODE_PIPET
je cyrcle_draw je cyrcle_draw
;cmp [renmode],1 ;cmp [renmode],1
;je picker_draw ;je picker_draw
cmp [renmode],0 cmp [renmode],MODE_PALITRA
je sheme_draw je sheme_draw
ret ret
@@ -39,6 +39,15 @@ draw_palitra:
;mov ebx,109*65536+150 ;mov ebx,109*65536+150
;mov ecx, 10*65536+150 ;mov ecx, 10*65536+150
;mcall ;mcall
PIPET_CELLW = 13
PIPET_AREA_W = PIPET_CELLW*PIPET_CELL_COUNT_X
PIPET_AREA_H = PIPET_CELLW*PIPET_CELL_COUNT_Y
PIPET_CELL_COUNT_X = 15
PIPET_CELL_COUNT_Y = 13
PIPET_SELECTED_X = PIPET_AREA_W/2+PALITRA_X
PIPET_SELECTED_Y = PIPET_AREA_H/2+DRAWY+2
call mouse_local ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⥫쭮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> call mouse_local ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⥫쭮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ecx, [mouse_x] ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov ecx, [mouse_x] ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov edx, [mouse_y] ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov edx, [mouse_y] ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -52,38 +61,39 @@ draw_palitra:
call desktop_get call desktop_get
call mouse_global call mouse_global
mov ebx,112*65536+11 mov ebx,PALITRA_X*65536+PIPET_CELLW
mov esi,0 ; counter=8 mov esi,0 ; counter=8
circle_loop: circle_loop:
mov ecx, 10*65536+11 mov ecx, (DRAWY+1)*65536+PIPET_CELLW
mov edi,0 mov edi,0
circle_loop2: circle_loop2:
call circle_pixel_read call circle_pixel_read
mcall SF_DRAW_RECT mcall SF_DRAW_RECT
add ecx,11 shl 16 add ecx,PIPET_CELLW shl 16
inc edi inc edi
cmp edi,13 cmp edi,PIPET_CELL_COUNT_Y
jne circle_loop2 jne circle_loop2
add ebx,11 shl 16 add ebx,PIPET_CELLW shl 16
inc esi inc esi
cmp esi,13 cmp esi,PIPET_CELL_COUNT_X
jne circle_loop jne circle_loop
mcall SF_DRAW_RECT, 177*65536+13, 76*65536+13, 0 mcall SF_DRAW_RECT, <PIPET_SELECTED_X-10, PIPET_CELLW+4>, <PIPET_SELECTED_Y-10, PIPET_CELLW+4>, 0xFF0000
mov ecx, [mouse_x] mov ecx, [mouse_x]
mov edx, [mouse_y] mov edx, [mouse_y]
inc ecx inc ecx
inc ecx
inc edx inc edx
mov ebx, edx mov ebx, edx
imul ebx, [desctop_w] imul ebx, [desctop_w]
add ebx, ecx add ebx, ecx
mcall SF_GET_PIXEL mcall SF_GET_PIXEL
mov edx,eax mov edx,eax
mcall SF_DRAW_RECT, 178*65536+11, 77*65536+11 mcall SF_DRAW_RECT, <PIPET_SELECTED_X-8, PIPET_CELLW>, <PIPET_SELECTED_Y-8, PIPET_CELLW>
ret ret
end_cyrcle_draw: end_cyrcle_draw:
mcall SF_DRAW_RECT, 111*65536+145, 9*65536+145, 0x666666 mcall SF_DRAW_RECT, <PALITRA_X-1, PIPET_AREA_W+2>, <DRAWY, PIPET_AREA_H+2>, [sc.work_graph]
ret ret
circle_pixel_read: circle_pixel_read:
@@ -124,20 +134,20 @@ draw_palitra:
sheme_draw: sheme_draw:
mov eax,SF_DRAW_RECT ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD> mov eax,SF_DRAW_RECT ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD>
mov edx,0x222222 ; <EFBFBD> mov edx,0x222222 ; <EFBFBD>
mov ecx, palitra_yw ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> y [<EFBFBD>-<EFBFBD><EFBFBD> y]*65536 + [<EFBFBD><EFBFBD><EFBFBD>] mov ecx, PALITRA_YW ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> y [<EFBFBD>-<EFBFBD><EFBFBD> y]*65536 + [<EFBFBD><EFBFBD><EFBFBD>]
mov esi,2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov esi,2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
re_draw: re_draw:
mov ebx,palitra_xw ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x [<EFBFBD>-<EFBFBD><EFBFBD> x]*65536 + [<EFBFBD><EFBFBD><EFBFBD>] mov ebx,PALITRA_XW ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x [<EFBFBD>-<EFBFBD><EFBFBD> x]*65536 + [<EFBFBD><EFBFBD><EFBFBD>]
mov edi,2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov edi,2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for_fon_loop: for_fon_loop:
int 0x40 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> int 0x40 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
add ebx,(palitra_w+2) shl 16 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> add ebx,(PALITRA_W+2) shl 16 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>
dec edi ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dec edi ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp edi,0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> cmp edi,0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>
jnz for_fon_loop ; <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> jnz for_fon_loop ; <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
dec esi ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> dec esi ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
cmp esi,0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> cmp esi,0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>
mov ecx,(palitra_w+DRAWY+3) shl 16+palitra_w ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> y [<EFBFBD>-<EFBFBD><EFBFBD> y]*65536 + [<EFBFBD><EFBFBD><EFBFBD>] mov ecx,(PALITRA_W+DRAWY+3) shl 16+PALITRA_W ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> y [<EFBFBD>-<EFBFBD><EFBFBD> y]*65536 + [<EFBFBD><EFBFBD><EFBFBD>]
jnz re_draw ; <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> jnz re_draw ; <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
;................................................................................................. ;.................................................................................................
@@ -146,12 +156,12 @@ draw_palitra:
mov eax,SF_DRAW_RECT ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD> mov eax,SF_DRAW_RECT ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD>
mov edx,0x0FFFFFFF ; <EFBFBD> mov edx,0x0FFFFFFF ; <EFBFBD>
mov esi,4 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> (#4,8) mov esi,4 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> (#4,8)
mov ebx,(palitra_x-CELLW-3) shl 16+CELLW ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x [<EFBFBD>-<EFBFBD><EFBFBD> x]*65536 + [<EFBFBD><EFBFBD><EFBFBD>] mov ebx,(PALITRA_X-CELLW-3) shl 16+CELLW ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x [<EFBFBD>-<EFBFBD><EFBFBD> x]*65536 + [<EFBFBD><EFBFBD><EFBFBD>]
for_abz: for_abz:
;;push esi ; <EFBFBD><EFBFBD><EFBFBD>࠭塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD> ;;push esi ; <EFBFBD><EFBFBD><EFBFBD>࠭塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>
cmp esi,2 cmp esi,2
jne x2_line jne x2_line
mov ebx,(palitra_x-CELLW-3) shl 16+CELLW mov ebx,(PALITRA_X-CELLW-3) shl 16+CELLW
x2_line: x2_line:
add ebx,3 shl 16 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x add ebx,3 shl 16 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x
mov edi,8 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> mov edi,8 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
@@ -161,7 +171,7 @@ draw_palitra:
mov ecx, (1-CELLW/3) shl 16+CELLW ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> y [<EFBFBD>-<EFBFBD><EFBFBD> y]*65536 + [<EFBFBD><EFBFBD><EFBFBD>] mov ecx, (1-CELLW/3) shl 16+CELLW ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> y [<EFBFBD>-<EFBFBD><EFBFBD> y]*65536 + [<EFBFBD><EFBFBD><EFBFBD>]
cmp esi,2 cmp esi,2
jg y2_line ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> jg y2_line ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ecx,(palitra_w+4-(CELLW/3)) shl 16+CELLW mov ecx,(PALITRA_W+4-(CELLW/3)) shl 16+CELLW
y2_line: y2_line:
add ebx,(CELLW+1) shl 16 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x add ebx,(CELLW+1) shl 16 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> x
for_loop: for_loop:

View File

@@ -78,7 +78,8 @@
include 'draw_utils.inc' include 'draw_utils.inc'
include 'draw_palitra.inc' include 'draw_palitra.inc'
MODE_PALITRA = 0
MODE_PIPET = 1
WIN_W = 374 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD> WIN_W = 374 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
WIN_H = 251 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> WIN_H = 251 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
@@ -95,12 +96,13 @@
ICONS = 18 ; icon size ICONS = 18 ; icon size
SLIDEW = 25 SLIDEW = 25
palitra_x = Left_Border+SliderPanel_W+12 PALITRA_X = Left_Border+SliderPanel_W+12
palitra_w = CELLW*(8)+8+1 PALITRA_W = CELLW*(8)+8+1
palitra_xw = palitra_x shl 16 + palitra_w PALITRA_XW = PALITRA_X shl 16 + PALITRA_W
palitra_yw = DRAWY shl 16 + palitra_w PALITRA_YW = DRAWY shl 16 + PALITRA_W
START: START:
mcall SF_SYSTEM, SSF_WINDOW_BEHAVIOR, SSSF_SET_WB, -1, 1 ;always on top
mcall SF_SYS_MISC,SSF_HEAP_INIT ; <20><><EFBFBD><EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> mcall SF_SYS_MISC,SSF_HEAP_INIT ; <20><><EFBFBD><EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mcall SF_SYS_MISC, SSF_MEM_OPEN, i18_name mcall SF_SYS_MISC, SSF_MEM_OPEN, i18_name
mov [icons18], eax mov [icons18], eax
@@ -138,7 +140,7 @@ key: ;
;end_key ;end_key
mouse: mouse:
cmp [renmode],2 cmp [renmode],MODE_PIPET
jne left jne left
call cyrcle_draw call cyrcle_draw
jmp center jmp center
@@ -171,7 +173,7 @@ button:
cmp ah, 12 ; <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NEXT cmp ah, 12 ; <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NEXT
jne next_bg ; <20><><EFBFBD><E5AEA4> jne next_bg ; <20><><EFBFBD><E5AEA4>
inc [pnext] ; 㢥<><E3A2A5><EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> inc [pnext] ; 㢥<><E3A2A5><EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov [renmode],0 ; <20><><EFBFBD><EFBFBD><EFBFBD> 梥⮢<E6A2A5><E2AEA2> <20><EFBFBD> mov [renmode],MODE_PALITRA ; <20><><EFBFBD><EFBFBD><EFBFBD> 梥⮢<E6A2A5><E2AEA2> <20><EFBFBD>
mov eax,[pnext] ; <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><E7A5AD> <20> <20><><EFBFBD> mov eax,[pnext] ; <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><E7A5AD> <20> <20><><EFBFBD>
cmp al,6 ; <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFA2AB><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cmp al,6 ; <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFA2AB><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne next_redraw ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᨬ㬠 <20><> <20><> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> jne next_redraw ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᨬ㬠 <20><> <20><> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2>
@@ -181,19 +183,19 @@ button:
call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jmp still ; <20><EFBFBD><E5AEA4> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E3A3AE><><E1AEA1><EFBFBD><EFBFBD> jmp still ; <20><EFBFBD><E5AEA4> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E3A3AE><><E1AEA1><EFBFBD><EFBFBD>
next_bg: next_bg:
cmp ah, 14 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BACKGROUND cmp ah, 14 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> GRADIENT
jne next_bg2 ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E5AEA4> jne next_bg2 ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E5AEA4>
call set_background ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> call set_background ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jmp still ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD> jmp still ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
next_bg2: next_bg2:
cmp ah, 16 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BACKGROUND cmp ah, 16 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NOISY
jne circle_bg ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E5AEA4> jne circle_bg ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E5AEA4>
call set_background2 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> call set_background2 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jmp still ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD> jmp still ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
circle_bg: circle_bg:
cmp ah, 15 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E3A3AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cmp ah, 15 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E3A3AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne next_end ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E5AEA4> jne next_end ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E5AEA4>
mov [renmode],2 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><E3A3AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov [renmode],MODE_PIPET ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><E3A3AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jmp still ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD> jmp still ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
next_end: next_end:
@@ -252,13 +254,8 @@ button:
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
;----------------------------------------------------------------------------------------------------/ ;----------------------------------------------------------------------------------------------------/
draw_main: draw_main:
; <20><EFBFBD><E3ADAA><EFBFBD> 12: <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mcall SF_REDRAW,SSF_BEGIN_DRAW mcall SF_REDRAW,SSF_BEGIN_DRAW
; <20><EFBFBD><E3ADAA><EFBFBD> 48 - <20><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
; <20><EFBFBD><E3ADAA><EFBFBD> 48 - <20><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
mov ecx,eax ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AAA8> mov ecx,eax ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AAA8>
@@ -288,10 +285,10 @@ draw_main:
call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
call draw_result ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> call draw_result ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall SF_DEFINE_BUTTON, <palitra_x,palitra_w*2+1 > , <DRAWY,palitra_w*2+2>, 7+BT_HIDE ; palitra mcall SF_DEFINE_BUTTON, <PALITRA_X,PALITRA_W*2+1 > , <DRAWY,PALITRA_W*2+2>, 7+BT_HIDE+BT_NOFRAME ; palitra
inc edx inc edx
mcall , <10,22>, <56,128> ; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1ABA0><EFBFBD>஬ red mcall , <10,22>, <54,136> ; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1ABA0><EFBFBD>஬ red
add ebx,25*65536 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> add ebx,25*65536 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
inc edx ; ID = 9 inc edx ; ID = 9
int 0x40 ; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1ABA0><EFBFBD>஬ green int 0x40 ; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1ABA0><EFBFBD>஬ green
@@ -303,103 +300,64 @@ draw_main:
int 0x40 ; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1ABA0><EFBFBD>஬ alpha int 0x40 ; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1ABA0><EFBFBD>஬ alpha
; <20><EFBFBD><E3ADAA><EFBFBD> 8 - <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD>/㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>) ; <20><EFBFBD><E3ADAA><EFBFBD> 8 - <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD>/㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>)
mcall , <13,19>, <20,18>, 0x0D+BT_HIDE mcall , <10,22>, <16,20>, 13+BT_HIDE
call draw_bottom_panel call draw_bottom_panel
call draw_left_panel call draw_right_panel
; <20><EFBFBD><E3ADAA><EFBFBD> 12: <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mcall SF_REDRAW,SSF_END_DRAW mcall SF_REDRAW,SSF_END_DRAW
ret ret
;#___________________________________________________________________________________________________ ;#_______________________________________________________
;****************************************************************************************************| ;*******************************************************|
; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | --------------------------------------------------------/
;----------------------------------------------------------------------------------------------------/
;------------------------------------------------------------------------------------------------+ ;------------------------------------------------------------------------------------------------+
draw_left_panel: ; <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SL97: <20><><><E1A0AC> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E0A0A2>. draw_right_panel:
;................................................................................................. ;.................................................................................................
; button_next_colorsheme ; button_next_colorsheme
mcall SF_DEFINE_BUTTON, <ICONX,ICONS+3>, <DRAWY,ICONS+3>, 12+BT_HIDE mcall SF_DEFINE_BUTTON, <ICONX,ICONS+3>, <DRAWY,ICONS+3>, 12+BT_HIDE
; palitra button ; ID = 14 ; palitra button ; ID = 14
mcall , ,(DRAWY+150) shl 16 + ICONS+3, 14+BT_HIDE mcall , ,(DRAWY+141) shl 16 + ICONS+3, 14+BT_HIDE
; pipet button ; ID = 15 ; pipet button ; ID = 15
mcall , , (DRAWY+150) shl 16 + ICONS+3, 15+BT_HIDE mcall , , (DRAWY+174) shl 16 + ICONS+3, 15+BT_HIDE
mov ebx,[icons18bg] mov ebx,[icons18bg]
add ebx,ICONS*ICONS*4*53 add ebx,ICONS*ICONS*4*53
mcall SF_PUT_IMAGE_EXT, ebx, <ICONS,ICONS>, <ICONX+2,DRAWY+2>, 32, 0, 0 mcall SF_PUT_IMAGE_EXT, ebx, <ICONS,ICONS>, <ICONX+2,DRAWY+2>, 32, 0, 0
add ebx,ICONS*ICONS*4*(39-53) add ebx,ICONS*ICONS*4*(39-53)
mov edx,(ICONX+2)*65536+WIN_H-90 mov edx,(ICONX+2)*65536+DRAWY+174+2
mcall mcall
mov ebx,[icons18] mov ebx,[icons18]
add ebx,ICONS*ICONS*4*(53-1) add ebx,ICONS*ICONS*4*(53-1)
sub edx,40 mov edx,(ICONX+2)*65536+DRAWY+141+2
mcall mcall
stdcall DrawDeepRectangle, ICONX-1, DRAWY-1, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph] stdcall DrawDeepRectangle, ICONX-1, DRAWY-1, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph]
stdcall DrawDeepRectangle, ICONX, DRAWY, ICONS+3, ICONS+3, [sc.work_light], [sc.work_dark] stdcall DrawDeepRectangle, ICONX, DRAWY, ICONS+3, ICONS+3, [sc.work_light], [sc.work_dark]
stdcall DrawDeepRectangle, ICONX-1, DRAWY+109, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph] stdcall DrawDeepRectangle, ICONX-1, DRAWY+140, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph]
stdcall DrawDeepRectangle, ICONX, DRAWY+110, ICONS+3, ICONS+3, [sc.work_dark], [sc.work_light] stdcall DrawDeepRectangle, ICONX, DRAWY+141, ICONS+3, ICONS+3, [sc.work_dark], [sc.work_light]
stdcall DrawDeepRectangle, ICONX+1, DRAWY+111, ICONS+1, ICONS+1, 0xFFFfff, 0xFFFfff stdcall DrawDeepRectangle, ICONX+1, DRAWY+142, ICONS+1, ICONS+1, 0xFFFfff, 0xFFFfff
stdcall DrawDeepRectangle, ICONX-1, DRAWY+149, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph] stdcall DrawDeepRectangle, ICONX-1, DRAWY+173, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph]
stdcall DrawDeepRectangle, ICONX, DRAWY+150, ICONS+3, ICONS+3, [sc.work_light], [sc.work_dark] stdcall DrawDeepRectangle, ICONX, DRAWY+174, ICONS+3, ICONS+3, [sc.work_light], [sc.work_dark]
;stdcall DrawRectangle3D, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark] ;Leency: draw rectangle around the button, buggy now ret
;mov eax,13 ; draw rect
;mov ebx,266 shl 16+16 ; [x] + [size]
;mov ecx,9 shl 16+16 ; [y] + [size]
;mov edx,0x666666 ; RGB
;push esi ; backup esi
;mov esi,8 ; counter=8
;draw_lpanel: ; loop label
; int 0x40 ; call draw black rect
; add ecx,19 shl 16 ; move rect
; dec esi ; decrement counter
; cmp esi,0 ; if counter!=zero
; jne draw_lpanel ; then goto label
; mov esi,8 ; else counter=8
; mov ebx,267 shl 16+14 ; [x] + [size]
; mov ecx,10 shl 16+14 ; [y] + [size]
; mov edx,0xF3F3F3 ; RGB
;draw_lpanel2: ; 2 loop label
; int 0x40 ; call draw white rect
; add ecx,19 shl 16 ; move rect
; dec esi ; decrement counter
; cmp esi,0 ; if counter!=0
; jne draw_lpanel2 ; then goto label2
;pop esi ; restore esi
; draw_left_arrow for button_next_colorsheme
;mov eax,4 ; Write string
;mov ebx,272 shl 16+13 ; [x] + [y]
;mov ecx,0x0 ; RGB
;mov edx,larrow ; string pointer
;mov esi,1 ; count symbol
;int 0x40 ; call
;mov eax,38 ; draw line
;mov ebx,270 shl 16+272 ; [start x] + [end x]
;mov ecx,16 shl 16+16 ; [start y] + [end y]
;mov edx,0x0 ; RGB
;int 0x40 ; call
ret ; return
;................................................................................................. ;.................................................................................................
;------------------------------------------------------------------------------------------------+ ;------------------------------------------------------------------------------------------------+
draw_bottom_panel: ; <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> draw_bottom_panel: ; <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;................................................................................................. ;.................................................................................................
mcall SF_DEFINE_BUTTON, <129,90>, <WIN_H-27,16>, 16, [sc.work_button] mcall SF_DEFINE_BUTTON, <129,90>, <WIN_H-27,18>, 14, [sc.work_button]
add ebx, 100 shl 16 add ebx, 100 shl 16
add edx, 2 add edx, 2
@@ -408,7 +366,7 @@ draw_main:
; Write string ; Write string
mov ecx,[sc.work_text] ; RGB mov ecx,[sc.work_text] ; RGB
add ecx, 0x90000000 add ecx, 0x90000000
mcall SF_DRAW_TEXT, <35, WIN_H-26>, ,bground mcall SF_DRAW_TEXT, <35, WIN_H-25>, ,bground
mov ecx, [sc.work_button_text] mov ecx, [sc.work_button_text]
add ecx, 0x90000000 add ecx, 0x90000000
@@ -892,8 +850,7 @@ endp
;****************************************************************************************************| ;****************************************************************************************************|
; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
;----------------------------------------------------------------------------------------------------/ ;----------------------------------------------------------------------------------------------------/
circle: title db 'Palitra v0.8',0 ; <20><EFBFBD><E0A0AD> <20><><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
title db 'Palitra v0.77',0 ; <20><EFBFBD><E0A0AD> <20><><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
hidden db 'Hidden',0 hidden db 'Hidden',0
; hex db '#',0 ; <20><><EFBFBD> <20><EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD><20><><EFBFBD><><E2A5AA><EFBFBD> ; hex db '#',0 ; <20><><EFBFBD> <20><EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD><20><><EFBFBD><><E2A5AA><EFBFBD>
cname db 'RGBAx' ; <20><EFBFBD><E0A0AD><><E0A0A7><EFBFBD><EFBFBD> 梥⮢ (red,green,blue) x-<2D><><20><><EFBFBD><EFBFBD><EFBFBD> cname db 'RGBAx' ; <20><EFBFBD><E0A0AD><><E0A0A7><EFBFBD><EFBFBD> 梥⮢ (red,green,blue) x-<2D><><20><><EFBFBD><EFBFBD><EFBFBD>
@@ -937,7 +894,7 @@ I_END:
cblue rb 1 ; <20><EFBFBD><E0A0AD><><E1A8AD><><E1AFA5><EFBFBD> cblue rb 1 ; <20><EFBFBD><E0A0AD><><E1A8AD><><E1AFA5><EFBFBD>
calpha rb 1 ; <20><EFBFBD><E0A0AD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD> calpha rb 1 ; <20><EFBFBD><E0A0AD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD>
pnext rd 1 ; <20><><EFBFBD><EFBFBD><20><><EFBFBD><E0A5AA><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> pnext rd 1 ; <20><><EFBFBD><EFBFBD><20><><EFBFBD><E0A5AA><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
renmode rd 1 ; <><E0A5A6> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> (1-梥⮢<E6A2A5><E2AEA2> <20><EFBFBD>,2-<2D><><EFBFBD><EFBFBD>,3-<2D><><EFBFBD><E3A3AE><EFBFBD>) renmode rd 1 ; <><E0A5A6> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> (0-梥⮢<E6A2A5><E2AEA2> <20><EFBFBD>,1-<2D><><EFBFBD><EFBFBD>⪠)
params rb 20 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC> params rb 20 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC>
params_c rb 9 ; <20><><EFBFBD>񬭨<EFBFBD> <20><><EFBFBD><><E6A2A5> params_c rb 9 ; <20><><EFBFBD>񬭨<EFBFBD> <20><><EFBFBD><><E6A2A5>
bgimg_buf rd 1 ; buffer for a generated image bgimg_buf rd 1 ; buffer for a generated image

View File

@@ -2,17 +2,10 @@ DOS-866
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC><20><><EFBFBD> <20><><EFBFBD><EFBFBD><20>ணࠬ<E0AEA3><E0A0AC> Palitra <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC><20><><EFBFBD> <20><><EFBFBD><EFBFBD><20>ணࠬ<E0AEA3><E0A0AC> Palitra
$ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E0A0AC>
------------------------------------------------------------------------------+
<EFBFBD>ணࠬ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBA1AE> 梥⮢ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E2A0A2><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD> 䮭 ࠡ<><EFBFBD> <20><EFBFBD>.
..............................................................................+
$ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC>஬ N $ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC>஬ N
------------------------------------------------------------------------------+ ------------------------------------------------------------------------------+
<EFBFBD><EFBFBD>ᨫ쭮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>, <20><><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮮ⢥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮮ⢥<E1AEAE><E2A2A5><EFBFBD><E2A2AE><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A8A0><EFBFBD> <20><><EFBFBD><EFBFBD>᪠: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A8A0><EFBFBD> <20><><EFBFBD><EFBFBD>᪠:
/sys/media/palitra N 00FF00FF 00FF0000 /sys/media/palitra N 00FF00FF 00FF0000
/sys/media/palitra N 00F724A3 00736698 /sys/media/palitra N 00F724A3 00736698
@@ -21,7 +14,10 @@ $
$ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC>஬ H $ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC>஬ H
------------------------------------------------------------------------------+ ------------------------------------------------------------------------------+
<EFBFBD>ணࠬ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AAA0><EFBFBD><EFBFBD> <20> hidden mode <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><E3A6A0> <EFBFBD>ணࠬ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AAA0><EFBFBD><EFBFBD> <20> hidden mode <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><><E6A2A5> <20><> /settings/wallpaper.dat. <20><>᫥ 祣<>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>᫥ 祣<>,<><E6A2A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <EFBFBD><EFBFBD> <20><EFBFBD> <20><EFBFBD><E0A0A4><EFBFBD><20><><><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥⮢. <EFBFBD><EFBFBD> <20><EFBFBD> <20><EFBFBD><E0A0A4><EFBFBD><20><><><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥⮢.
/sys/media/palitra H 00FF00FF 00FF0000
/sys/media/palitra H 00F724A3 00736698
..............................................................................+ ..............................................................................+

View File

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

View File

@@ -1,3 +1,10 @@
; SPDX-License-Identifier: GPL-2.0-only
; SPDX-FileCopyrightText: 2025 KolibriOS Team
; FileContributor: Pipet 1.0 in C-- by Leency
; FileContributor: Pipet 2.0 in FASM by Burer
;---------------------------------------------------------------------
use32 use32
org 0 org 0
@@ -11,29 +18,53 @@ org 0
dd 0 dd 0
include "../../macros.inc" include "../../macros.inc"
include "../../KOSfuncs.inc"
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
START: START:
mcall 40, 0x00000027 mcall SF_SET_EVENTS_MASK, 0x00000027
mcall 18, 25, 2, -1, 1 mcall SF_SYSTEM, SSF_WINDOW_BEHAVIOR, SSSF_SET_WB, -1, 1
mcall 66, 1, 1 mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1
mcall SF_SYS_MISC, SSF_HEAP_INIT
; initializing 7*7 rect of pixels from screen
mcall SF_SYS_MISC, SSF_MEM_ALLOC, 7*7*3
mov [sel_rect], eax
; loading and converting pipet icon from ICONS18W
mcall SF_SYS_MISC, , 18*18*4
mov [pip_icon], eax
mcall SF_SYS_MISC, SSF_MEM_OPEN, win_icons_name, , 0
add eax, 39*18*18*4
mov [win_icons], eax
mov esi, eax
mov edi, [pip_icon]
mov ecx, 18*18
cld
rep movsd
call get_pixels
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
still: still:
mcall 10 mcall SF_WAIT_EVENT
cmp eax, 1 cmp eax, 1
je redraw je redraw
cmp eax, 6
je mouse
cmp eax, 2 cmp eax, 2
je key je key
cmp eax, 3 cmp eax, 3
je button je button
cmp eax, 6
je mouse
jmp still jmp still
@@ -43,38 +74,39 @@ redraw:
call draw_window call draw_window
key: key:
mcall 2 mcall SF_GET_KEY
cmp ah, 1 cmp ah, 1
je button.exit je button.exit
cmp ah, 25
je make_pick_active
cmp ah, 19 cmp ah, 19
je draw_copied_rgb je copy_col_rgb
cmp ah, 46 cmp ah, 46
je draw_copied_hex je copy_col_hex
jmp still jmp still
button: button:
mcall 17 mcall SF_GET_BUTTON
cmp ah, 11 cmp ah, 11
je draw_copied_hex ; copy HEX color je make_pick_active
cmp ah, 12 cmp ah, 12
je draw_copied_rgb ; copy RGB color je copy_col_hex ; copy HEX color
cmp ah, 13 cmp ah, 13
je draw_picked_rect ; make pick active again je copy_col_rgb ; copy RGB color
cmp ah, 14
je pick_col_cell ; make pick active again
cmp ah, 1 cmp ah, 1
jne still jne still
.exit: .exit:
mcall -1 mcall SF_TERMINATE_PROCESS
mouse: mouse:
mcall 37, 2 mcall SF_MOUSE_GET, SSF_BUTTON
test ax, 0x01 test ax, 0x0001
jz mouse.move jz .move
cmp [pick_act], 0x00
je .move
mov [pick_act], 0x00 ; left mouse button click mov [pick_act], 0x00 ; left mouse button click
@@ -82,80 +114,98 @@ mouse:
cmp [pick_act], 0x00 cmp [pick_act], 0x00
je still je still
call get_pixel call get_pixels
call draw_update call draw_update
jmp still jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; read pixel from screen by mouse coords ; window redraw function
get_pixel:
mcall 37, 0
mov edx, eax
mcall 36, sel_color, <1, 1>,
ret
;---------------------------------------------------------------------
draw_window: draw_window:
mcall 12, 1 mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall 48, 3, win_cols, sizeof.system_colors mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, win_cols, sizeof.system_colors
mcall , 4, mcall , SSF_GET_SKIN_HEIGHT,
mov ecx, eax mov ecx, eax
add ecx, WIN_Y * 65536 + WIN_H add ecx, WIN_Y * 65536 + WIN_H
mov edx, [win_cols.work] mov edx, [win_cols.work]
add edx, 0x34000000 add edx, 0x34000000
mcall 0, <WIN_X, WIN_W>, , , , header mcall SF_CREATE_WINDOW, <WIN_X, WIN_W>, , , , header
; icon background color conversion
mov esi, [pip_icon]
mov ecx, 18*18
.icon_loop:
mov eax, [esi]
cmp eax, [win_cols.work]
jne .skip_change
mov ebx, [win_cols.work_light]
mov [esi], ebx
.skip_change:
add esi, 4
loop .icon_loop
call draw_base call draw_base
call draw_update call draw_update
mcall 12, 2 mcall SF_REDRAW, SSF_END_DRAW
ret ret
;---------------------------------------------------------------------
; draw basic elements of window ; draw basic elements of window
draw_base: draw_base:
mcall 13, <BUT_HEX_X, BUT_HEX_W>, <BUT_HEX_Y, BUT_HEX_H>, [win_cols.work_graph] mcall SF_DRAW_RECT, <BUT_PIP_X, BUT_PIP_H>, <BUT_PIP_Y, BUT_PIP_H>, [win_cols.work_graph]
mcall , <BUT_COL_X, BUT_COL_W>, ,
mcall , <BUT_HEX_X, BUT_HEX_W>, <BUT_HEX_Y, BUT_HEX_H>,
mcall , , <BUT_RGB_Y, BUT_HEX_H>, mcall , , <BUT_RGB_Y, BUT_HEX_H>,
mcall , <BUT_REC_X, BUT_REC_W>, <BUT_REC_Y, BUT_REC_H>, mcall , <BUT_REC_X, BUT_REC_W>, <BUT_REC_Y, BUT_REC_H>,
mcall , <BUT_HEX_X, BUT_HEX_W - 1>, <BUT_HEX_Y, BUT_HEX_H - 1>, [win_cols.work_dark] mcall , <BUT_PIP_X, BUT_PIP_H - 1>, <BUT_PIP_Y, BUT_PIP_H - 1>, [win_cols.work_dark]
mcall , <BUT_COL_X, BUT_COL_W - 1>, ,
mcall , <BUT_HEX_X, BUT_HEX_W - 1>, <BUT_HEX_Y, BUT_HEX_H - 1>,
mcall , , <BUT_RGB_Y, BUT_HEX_H - 1>, mcall , , <BUT_RGB_Y, BUT_HEX_H - 1>,
mcall , <BUT_REC_X, BUT_REC_W - 1>, <BUT_REC_Y, BUT_REC_H - 1>, mcall , <BUT_REC_X, BUT_REC_W - 1>, <BUT_REC_Y, BUT_REC_H - 1>,
mcall , <BUT_HEX_X + 1, BUT_HEX_W - 2>, <BUT_HEX_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text] mcall , <BUT_PIP_X + 1, BUT_PIP_H - 2>, <BUT_PIP_Y + 1, BUT_PIP_H - 2>, [win_cols.work_light]
mcall , <BUT_COL_X + 1, BUT_COL_W - 2>, , [win_cols.work_button_text]
mcall , <BUT_HEX_X + 1, BUT_HEX_W - 2>, <BUT_HEX_Y + 1, BUT_HEX_H - 2>,
mcall , , <BUT_RGB_Y + 1, BUT_HEX_H - 2>,
mcall , <BUT_REC_X + 1, BUT_REC_W - 2>, <BUT_REC_Y + 1, BUT_REC_H - 2>, mcall , <BUT_REC_X + 1, BUT_REC_W - 2>, <BUT_REC_Y + 1, BUT_REC_H - 2>,
; buttons 11, 12 and 13 ; buttons 11, 12, 13 and 14
mcall 8, <BUT_HEX_X + 1, BUT_HEX_W - 3>, <BUT_HEX_Y + 1, BUT_HEX_H - 3>, 0x4000000B mcall SF_DEFINE_BUTTON, <BUT_PIP_X + 1, BUT_PIP_W - 3>, <BUT_PIP_Y + 1, BUT_PIP_H - 3>, 0x4000000B
mcall , , <BUT_RGB_Y + 1, BUT_HEX_H - 3>, 0x4000000C mcall , <BUT_HEX_X + 1, BUT_HEX_W - 3>, <BUT_HEX_Y + 1, BUT_HEX_H - 3>, 0x4000000C
mcall , <BUT_REC_X + 1, BUT_REC_W - 3>, <BUT_REC_Y + 1, BUT_REC_H - 3>, 0x4000000D mcall , , <BUT_RGB_Y + 1, BUT_HEX_H - 3>, 0x4000000D
mcall , <BUT_REC_X + 2, BUT_REC_W - 4>, <BUT_REC_Y + 2, BUT_REC_H - 4>, 0x6000000E
; 18*18 pixels icon
mcall SF_PUT_IMAGE_EXT, [pip_icon], 0x00120012, 0x000B000F, 32
ret
; drawing text on buttons and colorful rect ; drawing text on buttons and colorful rect
draw_update: draw_update:
mcall 13, <BUT_REC_X + 2, BUT_REC_W - 4>, <BUT_REC_Y + 2, BUT_REC_H - 4>, [sel_color] ; current color rect
mcall SF_DRAW_RECT, <BUT_COL_X + 2, BUT_COL_W - 4>, <BUT_COL_Y + 2, BUT_COL_H - 4>, [sel_color]
; color codes
mcall , <BUT_RGB_X + 1, BUT_HEX_W - 2>, <BUT_RGB_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text] mcall , <BUT_RGB_X + 1, BUT_HEX_W - 2>, <BUT_RGB_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text]
mcall 47, 0x00060100, [sel_color], <BUT_HEX_X + 25, BUT_HEX_Y + 4>, 0x50000000, [win_cols.work_button_text] mcall SF_DRAW_NUMBER, 0x00060100, [sel_color], <BUT_HEX_X + 26, BUT_HEX_Y + 5>, 0x50000000, [win_cols.work_button_text]
mov ebx, 0x00030000 mov ebx, 0x00030000
xor ecx, ecx xor ecx, ecx
mov edx, 65536 * 77 + 46 mov edx, 65536 * 78 + 81
xor edi, edi xor edi, edi
dr_loop: dr_loop:
@@ -168,18 +218,150 @@ draw_update:
cmp edi, 3 cmp edi, 3
jb dr_loop jb dr_loop
; 7*7 pixels grid
mov eax, SF_DRAW_RECT
mov ebx, 118 * 65536 + 12
mov ecx, 14 * 65536 + 12
mov esi, [sel_rect]
mov edi, 49
.du_loop_rect:
mcall , , , dword [esi]
add ebx, 12 * 65536
cmp ebx, 196 * 65536
jle .du_loop_rect_row
mov ebx, 118 * 65536 + 12
add ecx, 12 * 65536
.du_loop_rect_row:
add esi, 3
dec edi
cmp edi, 0
jne .du_loop_rect
; selection of one pixel from 7*7 grid
mov cl, [cell_act_y]
mov al, 12
mul cl
add ax, 14
shl eax, 16
mov ax, 12
mov ecx, eax
mov bl, [cell_act_x]
mov al, 12
mul bl
add ax, 118
shl eax, 16
mov ax, 12
mov ebx, eax
mcall SF_DRAW_RECT, , , 0x00FF0000
add ebx, 2 * 65536 - 4
add ecx, 2 * 65536 - 4
mcall , , , [sel_color]
ret
;---------------------------------------------------------------------
; making pipet active again
make_pick_active:
mov [pick_act], 0x01
mov [cell_act_x], 0x03
mov [cell_act_y], 0x03
mcall SF_DRAW_RECT, <BUT_REC_X + 1, BUT_REC_W - 2>, <BUT_REC_Y + 1, BUT_REC_H - 2>, [win_cols.work_button_text]
mcall SF_DRAW_TEXT, <BUT_REC_X + 28, BUT_REC_Y + 37>, 0x10000000, mes_pick, 4
mcall SF_SLEEP, 50
mcall SF_DRAW_RECT, <BUT_PIP_X + 1, BUT_PIP_W - 2>, <BUT_PIP_Y + 1, BUT_PIP_H - 2>, [win_cols.work_light]
mcall SF_PUT_IMAGE_EXT, [pip_icon], 0x00120012, 0x000B000F, 32
call draw_update
jmp still
; read array of pixels from screen by mouse coords
get_pixels:
mcall SF_MOUSE_GET, SSF_SCREEN_POSITION
mov edx, eax
mcall SF_GET_SCREEN_SIZE
mov ebx, eax
; clamping mouse coords to stay within the screen
call clamp_pixels
mcall SF_GET_IMAGE, sel_color, <1, 1>,
sub edx, 0x00030003
mcall SF_GET_IMAGE, [sel_rect], <7, 7>,
ret
; clamping mouse coords to stay within the screen
clamp_pixels:
mov eax, edx
shr eax, 16
mov cx, ax
mov ax, dx
push ax
push cx
mov ax, bx
mov di, ax
mov eax, ebx
shr eax, 16
mov si, ax
pop cx
pop ax
.check_min_x:
cmp cx, 3
jge .check_min_y
mov cx, 3
.check_min_y:
cmp ax, 3
jge .check_max_x
mov ax, 3
.check_max_x:
mov dx, si
sub dx, 3
cmp cx, dx
jle .check_max_y
mov cx, dx
.check_max_y:
mov dx, di
sub dx, 3
cmp ax, dx
jle .combine_coords
mov ax, dx
.combine_coords:
xor edx, edx
mov dx, cx
rol edx, 16
mov dx, ax
ret ret
; copy color HEX code ; copy color HEX code
draw_copied_hex: copy_col_hex:
mcall 13, <BUT_HEX_X + 2, BUT_HEX_W - 4>, <BUT_HEX_Y + 2, BUT_HEX_H - 4>, [win_cols.work_button_text] mcall SF_DRAW_RECT, <BUT_HEX_X + 2, BUT_HEX_W - 4>, <BUT_HEX_Y + 2, BUT_HEX_H - 4>, [win_cols.work_button_text]
mov ebx, [sel_color] mov ebx, [sel_color]
mov ecx, 6 mov ecx, 6
ch_loop: ; iterate over all HEX-color digits ch_loop: ; iterate over all hex-digits of color
mov al, bl mov al, bl
and al, 0x0F and al, 0x0F
add al, 0x30 add al, 0x30
@@ -193,23 +375,20 @@ draw_copied_hex:
shr ebx, 4 shr ebx, 4
loop ch_loop loop ch_loop
mcall 54, 2, color_hex.end - color_hex, color_hex mcall SF_CLIPBOARD, 2, color_hex.end - color_hex, color_hex
mcall SF_DRAW_TEXT, <BUT_HEX_X + 1, BUT_HEX_Y + 5>, 0x10000000, mes_copy, 12
mcall SF_SLEEP, 50
mcall 4, <BUT_HEX_X + 1, BUT_HEX_Y + 4>, 0x10000000, mes_copy, 12 mcall SF_DRAW_RECT, <BUT_HEX_X + 1, BUT_HEX_W - 2>, <BUT_HEX_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text]
mcall 5, 50
mcall 13, <BUT_HEX_X + 1, BUT_HEX_W - 2>, <BUT_HEX_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text]
call draw_update call draw_update
jmp still jmp still
; copy color RGB code
copy_col_rgb:
; copy color RBG code mcall SF_DRAW_RECT, <BUT_HEX_X + 2, BUT_HEX_W - 4>, <BUT_RGB_Y + 2, BUT_HEX_H - 4>, [win_cols.work_button_text]
draw_copied_rgb:
mcall 13, <BUT_RGB_X + 2, BUT_HEX_W - 4>, <BUT_RGB_Y + 2, BUT_HEX_H - 4>, [win_cols.work_button_text]
mov bl, 10 mov bl, 10
mov edx, [sel_color] mov edx, [sel_color]
@@ -237,31 +416,45 @@ draw_copied_rgb:
jg cr_loop jg cr_loop
mcall 54, 2, color_rgb.end - color_rgb, color_rgb mcall SF_CLIPBOARD, 2, color_rgb.end - color_rgb, color_rgb
mcall SF_DRAW_TEXT, <BUT_HEX_X + 1, BUT_RGB_Y + 5>, 0x10000000, mes_copy, 12
mcall SF_SLEEP, 50
mcall 4, <9, 46>, 0x10000000, mes_copy, 12 mcall SF_DRAW_RECT, <BUT_HEX_X + 1, BUT_HEX_W - 2>, <BUT_RGB_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text]
mcall 5, 50
mcall 13, <BUT_RGB_X + 1, BUT_HEX_W - 2>, <BUT_RGB_Y + 1, BUT_HEX_H - 2>, [win_cols.work_button_text]
call draw_update call draw_update
jmp still jmp still
; picking one color cell from 7*7 grid
pick_col_cell:
; make color picking active again mcall SF_MOUSE_GET, 1
draw_picked_rect:
mcall 13, <BUT_REC_X + 2, BUT_REC_W - 4>, <BUT_REC_Y + 2, BUT_REC_H - 4>, [win_cols.work_button_text] push eax
sub ax, 14
mov bl, 12
div bl
mov [cell_act_y], al
mcall 4, <BUT_REC_X + 9, BUT_REC_Y + 18>, 0x10000000, mes_pick, 4 pop eax
shr eax, 16
sub ax, 118
div bl
mov [cell_act_x], al
mov [pick_act], 0x01 xor ebx, ebx
mov bl, [cell_act_y]
mov al, 7
mul bl
add al, [cell_act_x]
mov bx, 3
mul bx
add eax, [sel_rect]
mcall 5, 50 mov ebx, dword [eax]
and ebx, 0x00FFFFFF
mcall 13, <BUT_REC_X + 1, BUT_REC_W - 2>, <BUT_REC_Y + 1, BUT_REC_H - 2>, [win_cols.work_button_text] mov [sel_color], ebx
call draw_update call draw_update
jmp still jmp still
@@ -269,44 +462,62 @@ draw_picked_rect:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
WIN_X = 100 WIN_X = 100
WIN_W = 183 WIN_W = 221
WIN_Y = 100 WIN_Y = 100
WIN_H = 77 WIN_H = 112
BUT_PIP_X = 8
BUT_PIP_W = 24
BUT_PIP_Y = 12
BUT_PIP_H = 24
BUT_COL_X = 40
BUT_COL_W = 68
BUT_COL_Y = 12
BUT_COL_H = 24
BUT_HEX_X = 8 BUT_HEX_X = 8
BUT_HEX_W = 98 BUT_HEX_W = 100
BUT_HEX_Y = 12 BUT_HEX_Y = 44
BUT_HEX_H = 22 BUT_HEX_H = 24
BUT_RGB_X = 8 BUT_RGB_X = 8
BUT_RGB_Y = 42 BUT_RGB_Y = 76
BUT_REC_X = 114 BUT_REC_X = 116
BUT_REC_W = 52 BUT_REC_W = 88
BUT_REC_Y = 12 BUT_REC_Y = 12
BUT_REC_H = 52 BUT_REC_H = 88
;---------------------------------------------------------------------
win_cols system_colors
win_icons_name db 'ICONS18W', 0
win_icons dd 0x00000000
pip_icon dd 0x00000000
if lang eq ru_RU if lang eq ru_RU
header db 'Пипетка', 0 header db '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 0
else if lang eq es_ES else if lang eq es_ES
header db "Pipeta", 0 header db 'Pipeta', 0
else else
header db "Pipet", 0 header db 'Pipet', 0
endf endf
mes_copy db ' Copied ' mes_copy db ' Copied '
mes_pick db 'Pick' mes_pick db 'Pick'
win_cols system_colors
win_header db 24
rgb_cols: rgb_cols:
dd 0x000000FF dd 0x000000FF
dd 0x00008000 dd 0x00008000
dd 0x00FF0000 dd 0x00FF0000
pick_act db 0x01 pick_act db 0x01
cell_act_x db 0x03
cell_act_y db 0x03
sel_rect dd 0x00000000
sel_color: sel_color:
db 0xCF db 0xCF
db 0xD7 db 0xD7

View File

@@ -2,6 +2,16 @@
Main advantages over the old board: Main advantages over the old board:
* Bigger font * Bigger font
* Scrolling (like in other console apps) * Scrolling (like in other console apps)
* K : and L: messages highligting * Messages highligting
* K : - kernel messages (K: also supported because some code in kernel prints such)
* L: - launcher messages
* I: - information
* W: - warning
* E: - error
* S: - success
* Three display modes (You can switch modes using `Tab` key)
* User messages
* Kernel messages
* Both kernel and user messages
Also, like the old board it writes log to /tmp0/1/boardlog.txt (or you can pass another path in args like `/sys/develop/dbgboard /tmp0/1/hgfdhgfh.txt`), you can view log file in cedit by hitting `F2` key Also, like the old board it writes log to /tmp0/1/boardlog.txt (or you can pass another path in args like `/sys/develop/dbgboard /tmp0/1/hgfdhgfh.txt`), you can view log file in cedit by hitting `F2` key

View File

@@ -25,18 +25,38 @@ purge mov,add,sub
include '../../KOSfuncs.inc' include '../../KOSfuncs.inc'
; include '../../debug-fdo.inc' ; include '../../debug-fdo.inc'
include '../../proc32.inc' include '../../proc32.inc'
include '../../struct.inc'
include '../../dll.inc' include '../../dll.inc'
include '../../if.inc' include '../../if.inc'
include '../../string.inc' include '../../string.inc'
CON_WINDOW_CLOSED = 0x200 CON_WINDOW_CLOSED = 0x200
TEXT_COLOR_LIGHTGRAY = 7
TEXT_COLOR_LIGHTBLUE = 9
TEXT_COLOR_LIGHTGREEN = 10
TEXT_COLOR_LIGHTCYAN = 11
TEXT_COLOR_LIGHTRED = 12
TEXT_COLOR_LIGHTMAGENTA = 13
TEXT_COLOR_YELLOW = 14 TEXT_COLOR_YELLOW = 14
TEXT_COLOR_WHITE = 15 TEXT_COLOR_WHITE = 15
TEXT_COLOR_LIGHTGRAY = 7
; TEXT_COLOR_LIGHTGREEN = 10
proc set_text_color stdcall uses eax, _color RB_CAPACITY = 4096*6
MODES_COUNT = 3
MODE_USER = 0
MODE_KERNEL = 1
MODE_BOTH = 2
struct RING_BUFFER
buffer dd ?
capacity dd ?
pos dd ?
bytes_filled dd ?
ends
assert sizeof.RING_BUFFER = 16 ; for BSF
proc set_text_color stdcall uses eax ecx edx, _color
and [_color], 0x0F and [_color], 0x0F
invoke con_get_flags invoke con_get_flags
and eax, 0x3F0 and eax, 0x3F0
@@ -95,12 +115,162 @@ proc write_file stdcall uses ebx, _path, _buf, _count, _pos_lo, _pos_hi, _out_by
ret ret
endp endp
proc ring_buffer_push_byte stdcall uses eax edx esi edi, _rb, _byte
mov esi, [_rb]
mov eax, [esi + RING_BUFFER.bytes_filled]
.if eax < [esi + RING_BUFFER.capacity]
inc [esi + RING_BUFFER.bytes_filled]
.endif
mov edi, [esi + RING_BUFFER.buffer]
add edi, [esi + RING_BUFFER.pos]
mov eax, [_byte]
mov byte [edi], al
mov eax, [esi + RING_BUFFER.pos]
inc eax
xor edx, edx
div [esi + RING_BUFFER.capacity]
mov [esi + RING_BUFFER.pos], edx ; put remainder
ret
endp
proc print_ring_buffer stdcall uses eax ebx ecx edx esi, _rb
mov esi, [_rb]
mov eax, [esi + RING_BUFFER.capacity]
xor ebx, ebx
.if eax = [esi + RING_BUFFER.bytes_filled]
mov ebx, [esi + RING_BUFFER.pos]
.endif
xor ecx, ecx
.while ecx < [esi + RING_BUFFER.bytes_filled]
mov eax, ebx
add eax, ecx
xor edx, edx
div [esi + RING_BUFFER.capacity]
mov eax, [esi + RING_BUFFER.buffer]
add eax, edx
mov eax, [eax]
mov byte [chr], al
stdcall print_next_char
inc ecx
.endw
ret
endp
; in - __chr
proc push_to_buffers_next_char uses ebx
.if [__is_start_line] = 1
mov eax, __prefix
add eax, [__prefix_index]
mov bl, byte [__chr]
mov [eax], bl
.if [__prefix_index] = 2
.if dword [__prefix] = 'K :'
mov [current_rb], rb_kernel
.elseif dword [__prefix] = 'K: '
mov [current_rb], rb_kernel
.else
mov [current_rb], rb_user
.endif
mov [__is_start_line], 0
mov [__prefix_index], 0
movzx eax, byte [__prefix]
stdcall ring_buffer_push_byte, [current_rb], eax
movzx eax, byte [__prefix + 1]
stdcall ring_buffer_push_byte, [current_rb], eax
movzx eax, byte [__prefix + 2]
stdcall ring_buffer_push_byte, [current_rb], eax
mov dword [__prefix], 0
.else
inc [__prefix_index]
.endif
.else
movzx eax, byte [__chr]
stdcall ring_buffer_push_byte, [current_rb], eax
.if byte [__chr] = 10
mov [__is_start_line], 1
mov [current_rb], rb_user
.endif
.endif
ret
endp
; in - chr
proc print_next_char uses ebx
.if [is_start_line] = 1
mov eax, prefix
add eax, [prefix_index]
mov bl, byte [chr]
mov [eax], bl
.if [prefix_index] = 2
.if dword [prefix] = 'K :'
stdcall set_text_color, TEXT_COLOR_YELLOW
mov [is_kernel_printing], 1
.elseif dword [prefix] = 'K: '
stdcall set_text_color, TEXT_COLOR_YELLOW
mov [is_kernel_printing], 1
.elseif dword [prefix] = 'L: '
stdcall set_text_color, TEXT_COLOR_WHITE
mov [is_kernel_printing], 0
.elseif dword [prefix] = 'I: '
stdcall set_text_color, TEXT_COLOR_LIGHTCYAN
mov [is_kernel_printing], 0
.elseif dword [prefix] = 'W: '
stdcall set_text_color, TEXT_COLOR_LIGHTMAGENTA
mov [is_kernel_printing], 0
.elseif dword [prefix] = 'E: '
stdcall set_text_color, TEXT_COLOR_LIGHTRED
mov [is_kernel_printing], 0
.elseif dword [prefix] = 'S: '
stdcall set_text_color, TEXT_COLOR_LIGHTGREEN
mov [is_kernel_printing], 0
.else
stdcall set_text_color, TEXT_COLOR_LIGHTGRAY
mov [is_kernel_printing], 0
.endif
.if [is_kernel_printing] = 1
.if [current_mode] = MODE_KERNEL | [current_mode] = MODE_BOTH
invoke con_write_asciiz, prefix
.endif
.else
.if [current_mode] = MODE_USER | [current_mode] = MODE_BOTH
invoke con_write_asciiz, prefix
.endif
.endif
mov [is_start_line], 0
mov [prefix_index], 0
mov dword [prefix], 0
.else
inc [prefix_index]
.endif
.else
.if [is_kernel_printing] = 1
.if [current_mode] = MODE_KERNEL | [current_mode] = MODE_BOTH
invoke con_write_asciiz, chr
.endif
.else
.if [current_mode] = MODE_USER | [current_mode] = MODE_BOTH
invoke con_write_asciiz, chr
.endif
.endif
.if byte [chr] = 10
mov [is_start_line], 1
stdcall set_text_color, TEXT_COLOR_LIGHTGRAY
.endif
.endif
ret
endp
start: start:
;; if there is a second instance of conboard is running then exit ;; if there is a second instance of dbgboard is running then exit
mcall SF_THREAD_INFO, thread_info, -1 mcall SF_THREAD_INFO, thread_info, -1
stdcall string.copy, thread_info + process_information.process_name, thread_name stdcall string.copy, thread_info + process_information.process_name, thread_name
stdcall string.to_lower_case, thread_name stdcall string.to_lower_case, thread_name
xor edx, edx ; conboard instance count xor edx, edx ; dbgboard instance count
xor esi, esi xor esi, esi
.while esi < 256 ; NOTE: add to macros.inc MAX_THREAD_COUNT = 256 .while esi < 256 ; NOTE: add to macros.inc MAX_THREAD_COUNT = 256
mcall SF_THREAD_INFO, thread_info, esi mcall SF_THREAD_INFO, thread_info, esi
@@ -122,7 +292,10 @@ start:
jnz .exit jnz .exit
invoke con_start, 1 invoke con_start, 1
invoke con_init, 80, 32, -1, -1, title mov eax, [current_mode]
shl eax, 2 ; *4
add eax, title_base
invoke con_init, 80, 32, -1, -1, [eax]
.if byte [_cmdline] <> 0 .if byte [_cmdline] <> 0
mov [log_file_path], _cmdline mov [log_file_path], _cmdline
@@ -137,6 +310,30 @@ start:
mov [struct_open_in_notepad.filename], eax mov [struct_open_in_notepad.filename], eax
mcall SF_FILE, struct_open_in_notepad mcall SF_FILE, struct_open_in_notepad
.endif .endif
.if ah = 0x0F ; Tab
mov eax, [current_mode]
inc eax
.if eax >= MODES_COUNT
xor eax, eax
.endif
mov [current_mode], eax
shl eax, BSF sizeof.RING_BUFFER
add eax, rb_base
mov [current_rb], eax
mov eax, [current_mode]
shl eax, 2 ; *4
add eax, title_base
invoke con_set_title, [eax]
invoke con_cls
; clear the printer context before printing the ring buffer
mov dword [chr], 0
mov dword [prefix], 0
mov [prefix_index], 0
mov [is_start_line], 1
mov [is_kernel_printing], 0
stdcall print_ring_buffer, [current_rb]
.endif
.endif .endif
mcall SF_BOARD, SSF_DEBUG_READ mcall SF_BOARD, SSF_DEBUG_READ
@@ -145,35 +342,14 @@ start:
jz .main_loop_cond jz .main_loop_cond
.endif .endif
mov [chr], al mov [chr], al
mov [__chr], al
.if [is_start_line] = 1 stdcall ring_buffer_push_byte, rb_both, eax ; we always push to "both" buffer
mov eax, prefix stdcall push_to_buffers_next_char ; push byte to user or kernel messages ring buffer depending on current state
add eax, [prefix_index]
mov bl, byte [chr]
mov [eax], bl
.if [prefix_index] = 2
.if dword [prefix] = 'K :'
stdcall set_text_color, TEXT_COLOR_YELLOW
.elseif dword [prefix] = 'L: '
stdcall set_text_color, TEXT_COLOR_WHITE
.else
stdcall set_text_color, TEXT_COLOR_LIGHTGRAY
.endif
mov [is_start_line], 0
mov [prefix_index], 0
invoke con_write_asciiz, prefix
mov dword [prefix], 0
.else
inc [prefix_index]
.endif
.else
invoke con_write_asciiz, chr
.if byte [chr] = 10
mov [is_start_line], 1
stdcall set_text_color, TEXT_COLOR_LIGHTGRAY
.endif
.endif
stdcall print_next_char
; append char to logfile, if no logfile then create it
stdcall get_file_attrib, [log_file_path], file_info_buf stdcall get_file_attrib, [log_file_path], file_info_buf
.if eax = 5 ; file not found .if eax = 5 ; file not found
stdcall create_file, [log_file_path] stdcall create_file, [log_file_path]
@@ -193,14 +369,34 @@ start:
; data: ; data:
title db 'Debug & message board',0 title_base:
dd title_mode_user
dd title_mode_kernel
dd title_mode_both
title_mode_user db 'Debug board - [Tab] switches mode: USER_kernel_both [F2] opens log file',0
title_mode_kernel db 'Debug board - [Tab] switches mode: user_KERNEL_both [F2] opens log file',0
title_mode_both db 'Debug board - [Tab] switches mode: user_kernel_BOTH [F2] opens log file',0
log_file_path dd default_log_file_path log_file_path dd default_log_file_path
default_log_file_path db '/tmp0/1/BOARDLOG.TXT',0 default_log_file_path db '/tmp0/1/BOARDLOG.TXT',0
; to use only in print_next_char
chr db 0, 0, 0, 0
prefix db 0,0,0,0 prefix db 0,0,0,0
prefix_index dd 0 prefix_index dd 0
is_start_line dd 1 is_start_line dd 1
is_kernel_printing dd 0 ; 1 if kernel is now printing (after K:), else 0
; to use only in push_to_buffers_next_char
__chr db 0, 0, 0, 0
__prefix db 0,0,0,0
__prefix_index dd 0
__is_start_line dd 1
current_mode dd MODE_BOTH
current_rb dd 0
bytes_written dd 0 bytes_written dd 0
chr db 0, 0
struct_open_in_notepad: struct_open_in_notepad:
dd SSF_START_APP dd SSF_START_APP
@@ -210,6 +406,23 @@ struct_open_in_notepad:
dd 0 dd 0
db '/sys/develop/cedit', 0 db '/sys/develop/cedit', 0
rb_base:
rb_user:
dd rb_user_buf
dd RB_CAPACITY
dd 0
dd 0
rb_kernel:
dd rb_kernel_buf
dd RB_CAPACITY
dd 0
dd 0
rb_both:
dd rb_both_buf
dd RB_CAPACITY
dd 0
dd 0
; include_debug_strings ; include_debug_strings
@@ -224,7 +437,9 @@ import console, \
con_kbhit, 'con_kbhit', \ con_kbhit, 'con_kbhit', \
con_getch2, 'con_getch2', \ con_getch2, 'con_getch2', \
con_set_flags, 'con_set_flags', \ con_set_flags, 'con_set_flags', \
con_get_flags, 'con_get_flags' con_get_flags, 'con_get_flags', \
con_set_title, 'con_set_title',\
con_cls, 'con_cls'
align 16 align 16
_image_end: _image_end:
@@ -237,6 +452,10 @@ _cmdline rb 256
thread_info process_information thread_info process_information
thread_name rb 16 thread_name rb 16
rb_user_buf rb RB_CAPACITY
rb_kernel_buf rb RB_CAPACITY
rb_both_buf rb RB_CAPACITY
; reserve for stack: ; reserve for stack:
rb 4096 rb 4096
align 16 align 16

View File

@@ -1,2 +0,0 @@
../../develop/ktcc/trunk/source/kos32-tcc -I../../develop/ktcc/trunk/libc.obj/include -nostdlib ../../develop/ktcc/trunk/bin/lib/crt0.o -L../../develop/ktcc/trunk/bin/lib shell.c system/kolibri.c -o shell -ltcc -lc.obj
../../other/kpack/linux/kpack shell

View File

@@ -1,3 +1,4 @@
#include "../system/kolibri.h"
void get_str_meminfo(char *str) { void get_str_meminfo(char *str) {
unsigned mem_all_mib = kol_system_mem() / 1024; unsigned mem_all_mib = kol_system_mem() / 1024;
@@ -6,48 +7,55 @@ void get_str_meminfo(char *str) {
} }
int cmd_kfetch(char param[]) { int cmd_kfetch(char param[]) {
char *str_krnl_ver = malloc(64); struct kernel_version kv;
get_str_kernel_version(str_krnl_ver, "%d.%d.%d.%d. SVN-rev.: %d"); int eol;
char *str_uptime = malloc(64); kol_get_kernel_ver(&kv);
char str_os_rel_offset_dbgtag[24];
eol = sprintf(str_os_rel_offset_dbgtag, "%d.%d.%d.%d", kv.osrel[0],
kv.osrel[1], kv.osrel[2], kv.osrel[3]);
if (kv.offset)
eol += sprintf(str_os_rel_offset_dbgtag + eol, "+%u", kv.offset);
if (kv.dbgtag)
sprintf(str_os_rel_offset_dbgtag + eol, "-%c", kv.dbgtag);
char str_krn_abi_cmtid[32];
eol = sprintf(str_krn_abi_cmtid, "ABI %u.%u", kv.abimaj, kv.abimin);
if (kv.cmtid)
sprintf(str_krn_abi_cmtid + eol, ", git %08x", kv.cmtid);
char str_uptime[64];
get_str_uptime(str_uptime, "%d day(s), %d:%d:%d.%d"); get_str_uptime(str_uptime, "%d day(s), %d:%d:%d.%d");
char *str_resolution = malloc(24); char str_resolution[24];
ksys_pos_t resol = _ksys_screen_size(); ksys_pos_t resol = _ksys_screen_size();
sprintf(str_resolution, "%u x %u", resol.x + 1, resol.y + 1); sprintf(str_resolution, "%u x %u", resol.x + 1, resol.y + 1);
char *str_cpu_info = malloc(16); char str_cpu_info[16];
get_str_cpu_info(str_cpu_info); get_str_cpu_info(str_cpu_info);
char *str_meminfo = malloc(24); char str_meminfo[24];
get_str_meminfo(str_meminfo); get_str_meminfo(str_meminfo);
printf(/*"\033[0;34;40m \033[0m\n\r"*/ printf(
/*"\033[0;34;40m \033[0m\n\r"*/ "\033[0;34;40m \033[0;31;40m \033[0;34;40m. \033[0m\n\r"
/*"\033[0;34;40m \033[0m\n\r"*/ "\033[0;34;40m \033[0;31;40m \033[0;34;40m.\033[0;1;30;40m@\033[0;34;40mt \033[0m\n\r"
"\033[0;34;40m .\033[0;31;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m8\033[0;1;30;46m8X\033[0;5;30;40mX\033[0;32;40m:.\033[0;34;40m;\033[0;35;44mX\033[0;1;35;47m8\033[0;1;30;46m88\033[0;34;40mS\033[0;31;40m.\033[0;34;40m \033[0;32;40m \033[0;34;40m.\033[0;32;40m.\033[0;1;30;40m8\033[0;34;40m8\033[0;1;30;40m8\033[0;34;40m8; \033[0m\n\r"
"\033[0;34;40m t\033[0;1;30;40m@\033[0;34;40m.\033[0;31;40m \033[0;34;40m \033[0m\n\r" "\033[0;5;34;40m8\033[0;1;30;45m8\033[0;5;35;44m:\033[0;5;37;44m8\033[0;37;46m@\033[0;5;36;40m8\033[0;32;40m;;\033[0;30;44m8\033[0;1;34;45m8\033[0;5;1;35;44m8\033[0;5;37;46m8\033[0;1;36;46m%%\033[0;1;30;40m8\033[0;31;40m \033[0;34;40m \033[0;32;40m.\033[0;34;40m.\033[0;31;40mt\033[0;34;46m8\033[0;5;37;46m@\033[0;5;37;47m.\033[0;5;37;46m%%\033[0;5;36;46m @\033[0;5;36;40m8\033[0;34;40mt \033[0;32;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m ;8\033[0;1;30;40m8\033[0;34;40m8\033[0;1;30;40m8\033[0;32;40m.\033[0;34;40m.\033[0;32;40m \033[0;34;40m \033[0;31;40m.\033[0;34;40mS\033[0;1;30;46m88\033[0;1;35;47m8\033[0;35;44mX\033[0;34;40m;\033[0;32;40m.:\033[0;5;30;40mX\033[0;1;30;46mX8\033[0;34;40m8\033[0m\n\r" "\033[0;32;40m \033[0;1;30;44mX\033[0;37;45m8\033[0;5;35;44m.\033[0;5;35;45m;\033[0;5;35;44m \033[0;5;37;44m8\033[0;36;47m@\033[0;1;30;46m88\033[0;1;30;45m8\033[0;5;35;44m \033[0;5;37;45m8\033[0;1;34;47m8\033[0;1;30;46m@\033[0;5;36;40m8\033[0;34;40m:\033[0;32;40m \033[0;31;40m \033[0;1;30;44m8\033[0;5;36;46mt.\033[0;5;37;46mX8\033[0;1;30;46mS8\033[0;5;37;46m@\033[0;1;37;47mt\033[0;1;34;45m8\033[0;1;30;45m8\033[0;34;45m8\033[0;1;30;45m8\033[0;35;44m8\033[0;1;30;45m@\033[0;35;44m8\033[0;5;35;40m8\033[0;1;30;44m8\033[0;5;35;40m8\033[0;34;40m@\033[0m\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m t\033[0;5;36;40m8\033[0;5;36;46m@ \033[0;5;37;46m%%\033[0;5;37;47m.\033[0;5;37;46m@\033[0;34;46m8\033[0;31;40mt\033[0;34;40m.\033[0;32;40m.\033[0;34;40m \033[0;31;40m \033[0;1;30;40m8\033[0;1;36;46m%%\033[0;5;37;46m8\033[0;5;1;35;44m8\033[0;1;34;45m8\033[0;30;44m8\033[0;32;40m;;\033[0;5;36;40m8\033[0;37;46m@\033[0;5;37;44m8\033[0;5;35;44m:\033[0;1;30;45m8\033[0;5;34;40m8\033[0m\n\r" "\033[0;31;40m :\033[0;5;34;40m8\033[0;1;30;45m8\033[0;1;34;47m8\033[0;1;35;45m:\033[0;5;1;34;45m8\033[0;5;37;44m8\033[0;5;1;35;44m8\033[0;1;36;47mX\033[0;1;34;47m@\033[0;37;46m8\033[0;5;36;44m.\033[0;5;35;45m.\033[0;5;36;46m%%\033[0;5;37;46mX\033[0;1;30;46m8%%\033[0;5;34;40m8\033[0;1;36;46m%%\033[0;5;36;46m \033[0;36;47m8\033[0;1;33;43mt\033[0;5;33;43m \033[0;1;33;47m8\033[0;5;33;43m \033[0;1;33;43m;\033[0;33;41m8\033[0;5;30;40m8\033[0;34;40m@S;\033[0;32;40m.\033[0;34;40m.\033[0;32;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m@\033[0;5;35;40m8\033[0;1;30;44m8\033[0;5;35;40m8\033[0;35;44m8\033[0;1;30;45m@\033[0;35;44m8\033[0;1;30;45m8\033[0;34;45m8\033[0;1;30;45m8\033[0;1;34;45m8\033[0;1;37;47mt\033[0;5;37;46m@\033[0;1;30;46m8S\033[0;5;37;46m8X\033[0;5;36;46m.t\033[0;1;30;44m8\033[0;31;40m \033[0;32;40m \033[0;34;40m:\033[0;5;36;40m8\033[0;1;30;46m@\033[0;1;34;47m8\033[0;5;37;45m8\033[0;5;35;44m \033[0;1;30;45m8\033[0;1;30;46m88\033[0;36;47m@\033[0;5;37;44m8\033[0;5;35;44m \033[0;5;35;45m;\033[0;5;35;44m.\033[0;37;45m8\033[0;1;30;44mX\033[0;32;40m \033[0m %s\n\r" "\033[0;31;40m \033[0;34;40m .;\033[0;35;44m%%\033[0;35;47m8\033[0;5;35;44m \033[0;5;1;35;44m8\033[0;1;35;47m8\033[0;5;1;34;45m8\033[0;5;37;45m8\033[0;5;1;34;45m8\033[0;1;37;47m.\033[0;1;34;46m8\033[0;1;34;45m88\033[0;5;36;46m@;\033[0;1;36;46m.S\033[0;5;36;46m:8\033[0;5;37;43mX\033[0;5;33;41m \033[0;5;33;43m \033[0;5;1;33;41m8\033[0;1;30;43m8\033[0;31;40m;\033[0;34;40m.\033[0;32;40m::.\033[0;34;40m \033[0;32;40m \033[0;31;40m \033[0;34;40m \033[0m %s%s\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;32;40m \033[0;34;40m.\033[0;32;40m.\033[0;34;40m;S@\033[0;5;30;40m8\033[0;33;41m8\033[0;1;33;43m;\033[0;5;33;43m \033[0;1;33;47m8\033[0;5;33;43m \033[0;1;33;43mt\033[0;36;47m8\033[0;5;36;46m \033[0;1;36;46m%%\033[0;5;34;40m8\033[0;1;30;46m%%8\033[0;5;37;46mX\033[0;5;36;46m%%\033[0;5;35;45m.\033[0;5;36;44m.\033[0;37;46m8\033[0;1;34;47m@\033[0;1;36;47mX\033[0;5;1;35;44m8\033[0;5;37;44m8\033[0;5;1;34;45m8\033[0;1;35;45m:\033[0;1;34;47m8\033[0;1;30;45m8\033[0;5;34;40m8\033[0;31;40m: \033[0m %s%s\n\r" "\033[0;31;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m%%\033[0;5;35;40m8\033[0;1;30;45m8\033[0;5;1;35;44m8\033[0;35;47m8\033[0;5;35;44m;\033[0;1;34;45m8\033[0;5;35;44m;\033[0;5;1;34;45m8\033[0;5;37;44m8\033[0;1;35;47m@\033[0;1;34;47m@\033[0;1;36;46mS\033[0;1;36;47m@\033[0;5;37;46mX\033[0;5;36;46m88\033[0;1;30;43m8\033[0;5;1;31;43m8\033[0;5;33;41m \033[0;5;31;41mS\033[0;1;30;41m@\033[0;31;40m;\033[0;34;40m. \033[0;32;40m \033[0;31;40m \033[0;34;40m \033[0m %s%s\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m.::\033[0;34;40m.\033[0;31;40m;\033[0;1;30;43m8\033[0;5;1;33;41m8\033[0;5;33;43m \033[0;5;33;41m \033[0;5;37;43mX\033[0;5;36;46m8:\033[0;1;36;46mS.\033[0;5;36;46m;@\033[0;1;34;45m88\033[0;1;34;46m8\033[0;1;37;47m.\033[0;5;1;34;45m8\033[0;5;37;45m8\033[0;5;1;34;45m8\033[0;1;35;47m8\033[0;5;1;35;44m8\033[0;5;35;44m \033[0;35;47m8\033[0;35;44m%%\033[0;34;40m;. \033[0;31;40m \033[0m %s%s\n\r" "\033[0;31;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m ;\033[0;32;40m%%\033[0;34;40m8\033[0;1;30;44m@\033[0;1;30;45m8\033[0;1;34;45m8\033[0;37;45m@\033[0;1;30;45m8\033[0;1;34;45m88\033[0;5;35;44mX\033[0;1;30;46m8\033[0;36;47m8\033[0;5;36;46mX\033[0;5;37;42m8\033[0;37;46mS\033[0;1;32;47m8\033[0;37;43mS\033[0;1;32;46m8\033[0;5;33;40mS\033[0;32;40m:\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;32;40m \033[0;34;40m .\033[0;31;40m;\033[0;1;30;41m@\033[0;5;31;41mS\033[0;5;33;41m \033[0;5;1;31;43m8\033[0;1;30;43m8\033[0;5;36;46m88\033[0;5;37;46mX\033[0;1;36;47m@\033[0;1;36;46mS\033[0;1;34;47m@\033[0;1;35;47m@\033[0;5;37;44m8\033[0;5;1;34;45m8\033[0;5;35;44m;\033[0;1;34;45m8\033[0;5;35;44m;\033[0;35;47m8\033[0;5;1;35;44m8\033[0;1;30;45m8\033[0;5;35;40m8\033[0;34;40m%%\033[0;32;40m \033[0;34;40m \033[0;31;40m \033[0m %s%s\n\r" "\033[0;32;40m \033[0;34;40m :\033[0;32;40m;\033[0;34;40m:S\033[0;5;34;40m@\033[0;1;30;45m8\033[0;5;34;44m.\033[0;1;30;45m8\033[0;34;45m8\033[0;1;30;45m8\033[0;1;34;46m8\033[0;5;36;46m8\033[0;5;33;43m \033[0;5;37;42m8\033[0;5;37;46m8\033[0;1;33;47mX\033[0;5;36;42m;\033[0;1;36;46m%%\033[0;32;40m@.\033[0;34;40m. \033[0;32;40m \033[0;34;40m \033[0m %s%s\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m:\033[0;5;33;40mS\033[0;1;32;46m8\033[0;37;43mS\033[0;1;32;47m8\033[0;37;46mS\033[0;5;37;42m8\033[0;5;36;46mX\033[0;36;47m8\033[0;1;30;46m8\033[0;5;35;44mX\033[0;1;34;45m88\033[0;1;30;45m8\033[0;37;45m@\033[0;1;34;45m8\033[0;1;30;45m8\033[0;1;30;44m@\033[0;34;40m8\033[0;32;40m%%\033[0;34;40m; \033[0;32;40m \033[0;34;40m \033[0;31;40m \033[0m %s%s\n\r" "\033[0;32;40m \033[0;34;40m \033[0;31;40m \033[0;34;40m.\033[0;32;40m.\033[0;34;40m \033[0;1;30;44mS\033[0;5;35;40m;\033[0;5;34;44m8\033[0;1;30;46mX\033[0;1;36;46mS\033[0;5;36;46mX\033[0;1;36;46mX@\033[0;5;36;42m \033[0;1;33;47m@\033[0;5;36;42m.\033[0;1;36;46mt\033[0;5;36;40m8\033[0;31;40m;\033[0;34;40m.\033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m .\033[0;32;40m.@\033[0;1;36;46m%%\033[0;5;36;42m;\033[0;1;33;47mX\033[0;5;37;46m8\033[0;5;37;42m8\033[0;5;33;43m \033[0;5;36;46m8\033[0;1;34;46m8\033[0;1;30;45m8\033[0;34;45m8\033[0;1;30;45m8\033[0;5;34;44m.\033[0;1;30;45m8\033[0;5;34;40m@\033[0;34;40mS:\033[0;32;40m;\033[0;34;40m: \033[0;32;40m \033[0m %s%s\n\r" "\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;31;40m \033[0;34;40m .\033[0;5;36;40m8\033[0;1;30;46mt@\033[0;1;36;46mS%%\033[0;5;36;46m;\033[0;1;32;47m8\033[0;5;37;43m@\033[0;5;36;42mt\033[0;1;36;46m%%\033[0;1;30;46m@\033[0;1;30;40mX\033[0;32;40m. \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m %s%s\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m.\033[0;31;40m;\033[0;5;36;40m8\033[0;1;36;46mt\033[0;5;36;42m.\033[0;1;33;47m@\033[0;5;36;42m \033[0;1;36;46m@X\033[0;5;36;46mX\033[0;1;36;46mS\033[0;1;30;46mX\033[0;5;34;44m8\033[0;5;35;40m;\033[0;1;30;44mS\033[0;34;40m \033[0;32;40m.\033[0;34;40m.\033[0;31;40m \033[0;34;40m \033[0;32;40m \033[0m\n\r" "\033[0;34;40m \033[0;31;40m:\033[0;30;44m8\033[0;5;36;40mX\033[0;1;30;46m.\033[0;1;36;46mX\033[0;5;37;42m88\033[0;1;32;43m8\033[0;5;32;42m.\033[0;32;46m8\033[0;1;30;46mS\033[0;5;32;40m8\033[0;32;40m;: \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m %s%s\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m .\033[0;1;30;40mX\033[0;1;30;46m@\033[0;1;36;46m%%\033[0;5;36;42mt\033[0;5;37;43m@\033[0;1;32;47m8\033[0;5;36;46m;\033[0;1;36;46m%%S\033[0;1;30;46m@t\033[0;5;36;40m8\033[0;34;40m. \033[0;31;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;32;40m \033[0;5;35;40m8\033[0;5;35;44m%%\033[0;37;45m@\033[0;5;35;44m8\033[0;1;30;46m8\033[0;5;36;40m t\033[0;32;46m8\033[0;5;36;40m8\033[0;5;32;40m8\033[0;32;40m;\033[0;34;40m \033[0;31;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m %s%s\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m :;\033[0;5;32;40m8\033[0;1;30;46mS\033[0;32;46m8\033[0;5;32;42m.\033[0;1;32;43m8\033[0;5;37;42m88\033[0;1;36;46mX\033[0;1;30;46m.\033[0;5;36;40mX\033[0;30;44m8\033[0;31;40m:\033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;31;40m \033[0;1;30;40m8\033[0;5;36;44m8\033[0;1;35;47m8\033[0;1;30;45m8\033[0;5;34;44m8\033[0;1;30;45m8\033[0;34;45m8\033[0;1;30;45m8\033[0;5;34;40mX\033[0;31;40m \033[0;34;40m. \033[0;31;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;31;40m \033[0;34;40m \033[0;32;40m;\033[0;5;32;40m8\033[0;5;36;40m8\033[0;32;46m8\033[0;5;36;40mt \033[0;1;30;46m8\033[0;5;35;44m8\033[0;37;45m@\033[0;5;35;44m%%\033[0;5;35;40m8\033[0;32;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;31;40m.\033[0;32;40m.\033[0;34;40m@\033[0;34;45m@\033[0;5;37;45m8\033[0;5;35;44m;\033[0;1;34;45m8\033[0;5;35;44m%%\033[0;1;30;45m8\033[0;1;34;45m88\033[0;30;44m8\033[0;31;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;32;40m \033[0;31;40m \033[0;34;40m .\033[0;31;40m \033[0;5;34;40mX\033[0;1;30;45m8\033[0;34;45m8\033[0;1;30;45m8\033[0;5;34;44m8\033[0;1;30;45m8\033[0;1;35;47m8\033[0;5;36;44m8\033[0;1;30;40m8\033[0;31;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;32;40m \033[0;34;40m.\033[0;31;40m.\033[0;1;30;44m8\033[0;35;47m8\033[0;5;35;44m%%\033[0;5;35;45mS\033[0;5;35;44m:\033[0;37;45m@\033[0;5;35;44m%%\033[0;1;30;45m8\033[0;1;34;45m8\033[0;5;35;40m8\033[0;31;40m: \033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;31;40m \033[0;30;44m8\033[0;1;34;45m88\033[0;1;30;45m8\033[0;5;35;44m%%\033[0;1;34;45m8\033[0;5;35;44m;\033[0;5;37;45m8\033[0;34;45m@\033[0;34;40m@\033[0;32;40m.\033[0;31;40m.\033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;32;40m \033[0;31;40m \033[0;32;40m;\033[0;30;44m8\033[0;5;35;45m;\033[0;5;35;44mt\033[0;35;47m8\033[0;5;35;44mt\033[0;35;47m8\033[0;5;37;45m@\033[0;1;34;45m888\033[0;30;44m8\033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;32;40m \033[0;34;40m \033[0;31;40m :\033[0;5;35;40m8\033[0;1;34;45m8\033[0;1;30;45m8\033[0;5;35;44m%%\033[0;37;45m@\033[0;5;35;44m:\033[0;5;35;45mS\033[0;5;35;44m%%\033[0;35;47m8\033[0;1;30;44m8\033[0;31;40m.\033[0;34;40m.\033[0;32;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;31;40m \033[0;32;40mS\033[0;34;40m@\033[0;5;34;40mX\033[0;1;35;45m.\033[0;1;34;44m8\033[0;5;35;45m \033[0;5;34;44m \033[0;1;30;45m8\033[0;5;35;44m:\033[0;5;37;45m@\033[0;1;30;40m8\033[0;31;40m.\033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0;30;44m8\033[0;1;34;45m888\033[0;5;37;45m@\033[0;35;47m8\033[0;5;35;44mt\033[0;35;47m8\033[0;5;35;44mt\033[0;5;35;45m;\033[0;30;44m8\033[0;32;40m;\033[0;31;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;31;40m \033[0;32;40m \033[0;31;40m.\033[0;32;40m;\033[0;34;40m;8\033[0;32;40m%%\033[0;5;34;40m8\033[0;34;40m8\033[0;1;30;44m8\033[0;1;30;40m8\033[0;34;40m;.\033[0;31;40m \033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0;31;40m.\033[0;1;30;40m8\033[0;5;37;45m@\033[0;5;35;44m:\033[0;1;30;45m8\033[0;5;34;44m \033[0;5;35;45m \033[0;1;34;44m8\033[0;1;35;45m.\033[0;5;34;40mX\033[0;34;40m@\033[0;32;40mS\033[0;31;40m \033[0;34;40m \033[0m\n\r" "\033[0;34;40m \033[0;32;40m \033[0;31;40m \033[0;32;40m.\033[0;31;40m.\033[0;32;40m.\033[0;31;40m.\033[0;32;40m.\033[0;31;40m:. \033[0;32;40m. \033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r",
"\033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0;31;40m \033[0;34;40m.;\033[0;1;30;40m8\033[0;1;30;44m8\033[0;34;40m8\033[0;5;34;40m8\033[0;32;40m%%\033[0;34;40m8;\033[0;32;40m;\033[0;31;40m.\033[0;32;40m \033[0;31;40m \033[0;34;40m \033[0m\n\r"
"\033[0;34;40m \033[0;31;40m \033[0;34;40m \033[0;32;40m .\033[0;31;40m .:\033[0;32;40m.\033[0;31;40m.\033[0;32;40m.\033[0;31;40m.\033[0;32;40m.\033[0;31;40m \033[0;32;40m \033[0;34;40m \033[0m\n\r", "\033[0;36mOS\033[0m: KolibriOS ", str_os_rel_offset_dbgtag, "\033[0;36mKernel\033[0m: ", str_krn_abi_cmtid, "\033[0;36mUptime\033[0m: ", str_uptime, "\033[0;36mResolution\033[0m: ", str_resolution, "\033[0;36mCPU\033[0m: ", str_cpu_info, "\033[0;36mMemory\033[0m: ", str_meminfo
"\033[0;36mOS\033[0m: KolibriOS", "\033[0;36mKernel\033[0m: ", str_krnl_ver, "\033[0;36mUptime\033[0m: ", str_uptime, "\033[0;36mResolution\033[0m: ", str_resolution, "\033[0;36mCPU\033[0m: ", str_cpu_info, "\033[0;36mMemory\033[0m: ", str_meminfo); );
free(str_krnl_ver);
free(str_uptime);
free(str_resolution);
free(str_cpu_info);
free(str_meminfo);
return TRUE; return TRUE;
} }

View File

@@ -1,20 +1,21 @@
#include "../system/kolibri.h"
void get_str_kernel_version(char *str, const char *fmt) { void get_str_kernel_version(char *str, const char *fmt) {
char *kvbuf; struct kernel_version kv;
char *vA, *vB, *vC, *vD;
unsigned *Rev;
kvbuf = malloc(16); kol_get_kernel_ver(&kv);
kol_get_kernel_ver(kvbuf); char str_offset[8] = {'\0'};
vA = kvbuf+0; if (kv.offset)
vB = kvbuf+1; sprintf(str_offset, "+%u", kv.offset);
vC = kvbuf+2; char str_dbgtag[4] = {'\0'};
vD = kvbuf+3; if (kv.dbgtag)
Rev = (unsigned*)(kvbuf + 5); sprintf(str_dbgtag, "-%c", kv.dbgtag);
char str_cmtid[16] = {'\0'};
if (kv.cmtid)
sprintf(str_cmtid, " (%08x)", kv.cmtid);
sprintf (str, fmt, *vA, *vB, *vC, *vD, *Rev); sprintf(str, fmt, kv.osrel[0], kv.osrel[1], kv.osrel[2], kv.osrel[3],
str_offset, str_dbgtag, str_cmtid, kv.abimaj, kv.abimin);
free(kvbuf);
} }
void get_str_cpu_info(char *str) { void get_str_cpu_info(char *str) {

View File

@@ -1,5 +1,5 @@
#define SHELL_VERSION "0.8.3" #define SHELL_VERSION "0.8.4"
char cmdline[256]; char cmdline[256];

View File

@@ -59,7 +59,7 @@ const command_t COMMANDS[]=
#define CMD_SLEEP_USAGE " sleep <time in the 1/100 of second>\n\r" #define CMD_SLEEP_USAGE " sleep <time in the 1/100 of second>\n\r"
#define CMD_TOUCH_USAGE " touch <filename>\n\r" #define CMD_TOUCH_USAGE " touch <filename>\n\r"
#define CMD_UPTIME_FMT " Uptime: %d day(s), %d:%d:%d.%d\n\r" #define CMD_UPTIME_FMT " Uptime: %d day(s), %d:%d:%d.%d\n\r"
#define CMD_VER_FMT1 " KolibriOS v%d.%d.%d.%d. Kernel SVN-rev.: %d\n\r" #define CMD_VER_FMT1 " KolibriOS v%u.%u.%u.%u%s%s%s, kernel ABI %u.%u\n\r"
#define CMD_WAITFOR_FMT " Awaing finish PID %d\n\r" #define CMD_WAITFOR_FMT " Awaing finish PID %d\n\r"
#define EXEC_STARTED_FMT " '%s' started. PID = %d\n\r" #define EXEC_STARTED_FMT " '%s' started. PID = %d\n\r"
#define EXEC_SCRIPT_ERROR_FMT "Error in '%s' : script must start with #SHS line\n\r" #define EXEC_SCRIPT_ERROR_FMT "Error in '%s' : script must start with #SHS line\n\r"

Some files were not shown because too many files have changed in this diff Show More