View3DS: better key and scroll support
icons16.png: better icons 'run' and 'monitor/screensaver' some fixes git-svn-id: svn://kolibrios.org@9454 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
bcdd96a753
commit
532075fe18
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -17,7 +17,7 @@ PCI=on
|
||||
[screensaver]
|
||||
timeout=10 ;in minutes
|
||||
program=/sys/demos/spiral
|
||||
available=3d/crownscr;demos/web;demos/zeroline;demos/spiral
|
||||
available=3d/crownscr|demos/web|demos/zeroline|demos/spiral
|
||||
|
||||
[style]
|
||||
buttons_gradient=1
|
||||
|
@ -1,123 +1,123 @@
|
||||
#0 **** MAIN
|
||||
58 Welcome |welcome.htm
|
||||
00 2D Demos > |@1
|
||||
00 3D Demos > |@2
|
||||
00 Graphics > |@3
|
||||
00 Multimedia > |@4
|
||||
00 Development > |@5
|
||||
00 System > |@7
|
||||
00 Data processing > |@10
|
||||
00 Network > |@11
|
||||
00 Other > |@14
|
||||
23 Game Center |allgames
|
||||
60 System panel |syspanel
|
||||
18 Documentation |docpack
|
||||
53 Run |run
|
||||
04 Shut down |end
|
||||
58 Welcome |welcome.htm
|
||||
00 2D Demos > |@1
|
||||
00 3D Demos > |@2
|
||||
00 Graphics > |@3
|
||||
00 Multimedia > |@4
|
||||
00 Development > |@5
|
||||
00 System > |@7
|
||||
00 Data processing > |@10
|
||||
00 Network > |@11
|
||||
00 Other > |@14
|
||||
23 Game Center |allgames
|
||||
60 System panel |syspanel
|
||||
18 Documentation |docpack
|
||||
53 Run |run
|
||||
04 Shut down |end
|
||||
#1 **** DEMOS
|
||||
16 Fractal |demos/tinyfrac
|
||||
16 Eyes |demos/eyes
|
||||
16 Tube |demos/tube
|
||||
16 Plasma |demos/plasma
|
||||
16 Spiral |demos/spiral
|
||||
16 Moveback |demos/movback
|
||||
16 TranTest |demos/trantest
|
||||
16 WEB |demos/web
|
||||
16 FireWork |demos/firework
|
||||
16 UnvWater |demos/unvwater
|
||||
16 Fractal |demos/tinyfrac
|
||||
16 Eyes |demos/eyes
|
||||
16 Tube |demos/tube
|
||||
16 Plasma |demos/plasma
|
||||
16 Spiral |demos/spiral
|
||||
16 Moveback |demos/movback
|
||||
16 TranTest |demos/trantest
|
||||
16 Web |demos/web
|
||||
16 FireWork |demos/firework
|
||||
16 UnvWater |demos/unvwater
|
||||
#2 **** 3D
|
||||
15 ScreenSaver |3d/crownscr
|
||||
15 3D-labyrinth |3d/free3d04
|
||||
15 3D-cube |3d/3dcube2
|
||||
15 Ray tracing |3d/ray
|
||||
15 View3DS |3d/view3ds
|
||||
15 Gears |3d/gears
|
||||
15 3D-waved area |3d/3dwav
|
||||
15 Crown Screensaver |3d/crownscr
|
||||
15 Labyrinth |3d/free3d04
|
||||
15 Cube |3d/3dcube2
|
||||
15 Ray tracing |3d/ray
|
||||
15 View3DS |3d/view3ds
|
||||
15 Gears |3d/gears
|
||||
15 Waved area |3d/3dwav
|
||||
#3 **** GRAPHICS
|
||||
06 Kolibri Image Viewer |media/kiv
|
||||
06 zSea Image Viewer * |/kolibrios/media/zsea/zsea
|
||||
38 Animage |media/animage
|
||||
38 IconEdit |media/iconedit
|
||||
40 Image Filtering |media/imgf/imgf
|
||||
52 Palitra |media/palitra
|
||||
39 Pipet |develop/pipet
|
||||
06 Kolibri Image Viewer |media/kiv
|
||||
06 zSea Image Viewer * |/kolibrios/media/zsea/zsea
|
||||
38 Animage |media/animage
|
||||
38 IconEdit |media/iconedit
|
||||
40 Image Filtering |media/imgf/imgf
|
||||
52 Palitra |media/palitra
|
||||
39 Pipet |develop/pipet
|
||||
#4 **** MULTIMEDIA
|
||||
53 Pixie Audio |media/pixie
|
||||
07 MidAMP |media/midamp
|
||||
22 Toy piano |media/piano
|
||||
11 Fplay Video * |/kolibrios/media/fplay
|
||||
53 Pixie Audio |media/pixie
|
||||
07 MidAMP |media/midamp
|
||||
22 Toy piano |media/piano
|
||||
11 Fplay Video * |/kolibrios/media/fplay
|
||||
#5 **** DEV
|
||||
54 Flat Assembler |develop/fasm
|
||||
03 Example.asm |example.asm
|
||||
49 Debugger |develop/mtdbg
|
||||
13 Debug Board |develop/board
|
||||
09 KPack Archiver |kpack
|
||||
20 Diff Tool |develop/diff
|
||||
34 Base Converter |develop/h2d2b
|
||||
59 Character table |develop/ASCIIVju
|
||||
59 Key ASCII-codes |develop/keyascii
|
||||
59 Key SCAN-codes |develop/scancode
|
||||
54 Flat Assembler |develop/fasm
|
||||
03 Example.asm |example.asm
|
||||
49 Debugger |develop/mtdbg
|
||||
13 Debug Board |develop/board
|
||||
09 KPack Archiver |kpack
|
||||
20 Diff Tool |develop/diff
|
||||
34 Base Converter |develop/h2d2b
|
||||
59 Character table |develop/ASCIIVju
|
||||
59 Key ASCII-codes |develop/keyascii
|
||||
59 Key SCAN-codes |develop/scancode
|
||||
#6 **** EMUL
|
||||
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
|
||||
16 e80 (ZX Spectrum) * |/kolibrios/emul/e80/e80
|
||||
23 Gameboy Color * |/kolibrios/emul/gameboy
|
||||
23 FCE Ultra (NES) * |/kolibrios/emul/fceu/fceu
|
||||
23 ZSNES * |/kolibrios/emul/zsnes/zsnes
|
||||
16 ScummVM * |/kolibrios/emul/scummvm
|
||||
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
|
||||
16 e80 (ZX Spectrum) * |/kolibrios/emul/e80/e80
|
||||
23 Gameboy Color * |/kolibrios/emul/gameboy
|
||||
23 FCE Ultra (NES) * |/kolibrios/emul/fceu/fceu
|
||||
23 ZSNES * |/kolibrios/emul/zsnes/zsnes
|
||||
16 ScummVM * |/kolibrios/emul/scummvm
|
||||
#7 **** SYSTEM
|
||||
00 File Managers > |@8
|
||||
00 Accessibility > |@9
|
||||
59 Hotkeys |mykey
|
||||
56 Clipboard viewer |develop/clipview
|
||||
62 Calendar |calendar
|
||||
33 Online update * |/kolibrios/utils/osupdate
|
||||
48 Process manager |cpu
|
||||
24 Terminal |terminal
|
||||
05 Save ramdisk |rdsave
|
||||
24 Shell |shell
|
||||
51 Virtual disks |tmpdisk
|
||||
00 File Managers > |@8
|
||||
00 Accessibility > |@9
|
||||
59 Hotkeys |mykey
|
||||
56 Clipboard viewer |develop/clipview
|
||||
62 Calendar |calendar
|
||||
33 Online update * |/kolibrios/utils/osupdate
|
||||
48 Process manager |cpu
|
||||
24 Terminal |terminal
|
||||
05 Save ramdisk |rdsave
|
||||
24 Shell |shell
|
||||
51 Virtual disks |tmpdisk
|
||||
#8 **** FM
|
||||
50 Eolite |File Managers/Eolite
|
||||
05 KFM2 |File Managers/kfm2
|
||||
20 fNav |File Managers/fNav/fNav
|
||||
64 KFAR |File Managers/kfar
|
||||
65 NDN * |/kolibrios/utils/ndn/ndn
|
||||
50 Eolite |File Managers/Eolite
|
||||
05 KFM2 |File Managers/kfm2
|
||||
20 fNav |File Managers/fNav/fNav
|
||||
64 KFAR |File Managers/kfar
|
||||
65 NDN * |/kolibrios/utils/ndn/ndn
|
||||
#9 **** ACCESSIBILITY
|
||||
49 Screen magnifier |magnify
|
||||
59 Screen keyboard |zkey
|
||||
49 Screen magnifier |magnify
|
||||
59 Screen keyboard |zkey
|
||||
#10 **** DATA PROCESSING
|
||||
16 Calculator |calc
|
||||
03 Tinypad |tinypad
|
||||
28 CodeEdit |develop/cedit
|
||||
21 Table processor |table
|
||||
47 Graph builder |graph
|
||||
16 Hex editor |develop/heed
|
||||
09 Unarchiver Unz |unz
|
||||
16 Calculator |calc
|
||||
03 Tinypad |tinypad
|
||||
28 CodeEdit |develop/cedit
|
||||
21 Table processor |table
|
||||
47 Graph builder |graph
|
||||
16 Hex editor |develop/heed
|
||||
09 Unarchiver Unz |unz
|
||||
#11 **** NETWORK
|
||||
00 Clients > |@12
|
||||
00 Servers > |@13
|
||||
25 Network devices |network/netcfg
|
||||
16 Network status |network/netstat
|
||||
00 Clients > |@12
|
||||
00 Servers > |@13
|
||||
25 Network devices |network/netcfg
|
||||
16 Network status |network/netstat
|
||||
#12 **** CLIENTS
|
||||
13 IRC |network/ircc
|
||||
20 FTP |network/ftpc
|
||||
20 TFTP |network/tftpc
|
||||
24 Ping |network/ping
|
||||
24 Telnet |network/telnet
|
||||
24 Synergy |network/synergyc
|
||||
24 DNS lookup |network/nslookup
|
||||
61 VNC Viewer |network/vncc
|
||||
33 Downloader |network/downloader
|
||||
12 Text-based browser |network/webview
|
||||
13 IRC |network/ircc
|
||||
20 FTP |network/ftpc
|
||||
20 TFTP |network/tftpc
|
||||
24 Ping |network/ping
|
||||
24 Telnet |network/telnet
|
||||
24 Synergy |network/synergyc
|
||||
24 DNS lookup |network/nslookup
|
||||
61 VNC Viewer |network/vncc
|
||||
33 Downloader |network/downloader
|
||||
12 Text-based browser |network/webview
|
||||
#13 **** SERVERS
|
||||
24 FTP |network/ftpd
|
||||
24 FTP |network/ftpd
|
||||
#14 **** OTHER
|
||||
00 Emulators* > |@6
|
||||
16 Analog clock |aclock
|
||||
16 Binary clock |demos/bcdclk
|
||||
29 FB2 Reader |fb2read
|
||||
53 Timer |timer
|
||||
45 Screenshooter |scrshoot
|
||||
45 Easyshot |easyshot
|
||||
03 RTF reader |rtfread
|
||||
00 Emulators* > |@6
|
||||
16 Analog clock |aclock
|
||||
16 Binary clock |demos/bcdclk
|
||||
29 FB2 Reader |fb2read
|
||||
53 Timer |timer
|
||||
45 Screenshooter |scrshoot
|
||||
45 Easyshot |easyshot
|
||||
03 RTF reader |rtfread
|
||||
##
|
||||
|
@ -173,12 +173,12 @@ struct libimg_image
|
||||
:void libimg_image::convert_into(dword _to)
|
||||
{
|
||||
img_convert stdcall(image, 0, _to, 0, 0);
|
||||
$push eax
|
||||
img_destroy stdcall(image);
|
||||
$pop eax
|
||||
if (!EAX) {
|
||||
notify("'LibImg convertation error!'E");
|
||||
} else {
|
||||
$push eax
|
||||
img_destroy stdcall(image);
|
||||
$pop eax
|
||||
image = EAX;
|
||||
set_vars();
|
||||
}
|
||||
@ -230,52 +230,4 @@ struct libimg_image
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
/*
|
||||
// DRAW ICON PATTERN / TEMP
|
||||
*/
|
||||
/////////////////////////////
|
||||
|
||||
:void DrawIcon32(dword x,y, _bg, icon_n) {
|
||||
static dword bg;
|
||||
static dword pure_img32;
|
||||
if (!pure_img32) || (bg!=_bg) {
|
||||
bg = _bg;
|
||||
if (pure_img32) img_destroy stdcall(pure_img32);
|
||||
img_from_file stdcall("/sys/icons32.png");
|
||||
pure_img32 = EAX;
|
||||
//now fill transparent with another color
|
||||
EDX = ESDWORD[EAX+4] * ESDWORD[EAX+8] * 4 + ESDWORD[EAX+24];
|
||||
for (ESI = ESDWORD[EAX+24]; ESI < EDX; ESI += 4) {
|
||||
if (DSDWORD[ESI]==0x00000000) DSDWORD[ESI] = bg;
|
||||
}
|
||||
}
|
||||
img_draw stdcall(pure_img32, x, y, 32, 32, 0, icon_n*32);
|
||||
}
|
||||
|
||||
:int DrawIcon16(dword x,y, _bg, icon_n) {
|
||||
static dword bg;
|
||||
static dword pure_img16;
|
||||
dword bgshadow;
|
||||
int size;
|
||||
if (!pure_img16) || (bg!=_bg) {
|
||||
bg = _bg;
|
||||
bgshadow = MixColors(bg, 0, 220);
|
||||
if (pure_img16) img_destroy stdcall(pure_img16);
|
||||
img_from_file stdcall("/sys/icons16.png");
|
||||
pure_img16 = EAX;
|
||||
//now fill transparent with another color
|
||||
EDX = ESDWORD[EAX+4] * ESDWORD[EAX+8] * 4 + ESDWORD[EAX+24];
|
||||
for (ESI = ESDWORD[EAX+24]; ESI < EDX; ESI += 4) {
|
||||
if (DSDWORD[ESI]==0xffFFFfff) DSDWORD[ESI] = bg;
|
||||
if (DSDWORD[ESI]==0xffCACBD6) DSDWORD[ESI] = bgshadow;
|
||||
}
|
||||
}
|
||||
size = ESDWORD[pure_img16+4]; //get image width
|
||||
img_draw stdcall(pure_img16, x, y, size, size, 0, icon_n*size);
|
||||
return size;
|
||||
}
|
||||
|
||||
#endif
|
@ -80,7 +80,7 @@
|
||||
menu:
|
||||
db 2 ; button number = index
|
||||
db 'rotary ' ; label
|
||||
db 3 ; max flag + 1 , if = 255, no flag
|
||||
db 4 ; max flag + 1 , if = 255, no flag
|
||||
r_flag db 1 ; flag
|
||||
dd axl_f ; offset to flags description
|
||||
|
||||
@ -289,6 +289,7 @@ flags: ; flags description
|
||||
db ' y '
|
||||
db 'x+y '
|
||||
db ' x '
|
||||
db 'keys'
|
||||
onoff_f:
|
||||
db 'off '
|
||||
db 'on '
|
||||
@ -353,7 +354,7 @@ base_vector:
|
||||
if Ext=SSE3
|
||||
db ' (SSE3)'
|
||||
end if
|
||||
db ' 0.074',0
|
||||
db ' 0.075',0
|
||||
labellen:
|
||||
STRdata db '-1 '
|
||||
lab_vert:
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
; application : View3ds ver. 0.074 - tiny .3ds and .asc files viewer
|
||||
; application : View3ds ver. 0.075 - tiny .3ds and .asc files viewer
|
||||
; with a few graphics effects demonstration.
|
||||
; compiler : FASM
|
||||
; system : KolibriOS
|
||||
@ -18,6 +18,7 @@
|
||||
; 1) Read from a file (*.3DS standard)
|
||||
; 2) Written in manually (at the end of the code) ; now not exist
|
||||
|
||||
format binary as ""
|
||||
|
||||
SIZE_X equ 512
|
||||
SIZE_Y equ 512 ; ///// I want definitely
|
||||
@ -163,11 +164,8 @@ still:
|
||||
je key
|
||||
cmp eax,3 ; button event ?
|
||||
je button
|
||||
cmp eax,6 ; mouse event ?
|
||||
jne @f
|
||||
cmp [edit_flag],1 ; handle mouse only when edit is active
|
||||
jne @f
|
||||
|
||||
mov esi,eax
|
||||
mov eax,37
|
||||
mov ebx,7 ; get mouse scroll
|
||||
int 0x40
|
||||
@ -176,7 +174,12 @@ still:
|
||||
je button.zoom_in
|
||||
cmp eax, 1
|
||||
je button.zoom_out
|
||||
mov eax,esi
|
||||
|
||||
cmp eax,6 ; mouse event ?
|
||||
jne @f
|
||||
cmp [edit_flag],1 ; handle mouse only when edit is active
|
||||
jne @f
|
||||
mov eax,37
|
||||
mov ebx,3 ;read mouse state
|
||||
int 0x40
|
||||
@ -214,24 +217,54 @@ still:
|
||||
key: ; key
|
||||
mov eax,2 ; just read it and ignore
|
||||
int 0x40
|
||||
shr eax,16 ; use scancodes (al)
|
||||
|
||||
cmp ah, '+'
|
||||
cmp al, 013 ;+
|
||||
je button.zoom_in
|
||||
cmp ah, '='
|
||||
je button.zoom_in
|
||||
cmp ah, '-'
|
||||
cmp al, 012 ;-
|
||||
je button.zoom_out
|
||||
cmp ah, 176 ;left
|
||||
cmp al, 075 ;left
|
||||
je add_vec_buttons.x_minus
|
||||
cmp ah, 179 ;right
|
||||
cmp al, 077 ;right
|
||||
je add_vec_buttons.x_plus
|
||||
cmp ah, 178 ;up
|
||||
cmp al, 072 ;up
|
||||
je add_vec_buttons.y_minus
|
||||
cmp ah, 177 ;down
|
||||
cmp al, 080 ;down
|
||||
je add_vec_buttons.y_plus
|
||||
cmp al, 073 ;page up
|
||||
je .rot_inc_y
|
||||
cmp al, 081 ;page down
|
||||
je .rot_dec_y
|
||||
cmp al, 051 ;<
|
||||
je .rot_dec_x
|
||||
cmp al, 052 ;>
|
||||
je .rot_inc_x
|
||||
cmp al, 057 ;space
|
||||
je .rot_z
|
||||
|
||||
jmp noclose
|
||||
|
||||
.rot_inc_x:
|
||||
inc [angle_x]
|
||||
and [angle_x],0xff
|
||||
jmp noclose.end_rot
|
||||
.rot_dec_x:
|
||||
dec [angle_x]
|
||||
and [angle_x],0xff
|
||||
jmp noclose.end_rot
|
||||
.rot_inc_y:
|
||||
inc [angle_y]
|
||||
and [angle_y],0xff
|
||||
jmp noclose.end_rot
|
||||
.rot_dec_y:
|
||||
dec [angle_y]
|
||||
and [angle_y],0xff
|
||||
jmp noclose.end_rot
|
||||
.rot_z:
|
||||
inc [angle_z]
|
||||
and [angle_z],0xff
|
||||
jmp noclose.end_rot
|
||||
|
||||
button: ; button
|
||||
mov eax,17 ; get id
|
||||
int 0x40
|
||||
@ -303,6 +336,7 @@ still:
|
||||
.next_m4:
|
||||
cmp ah,14
|
||||
jne @f
|
||||
.xchg:
|
||||
call exchange
|
||||
@@:
|
||||
cmp ah,15
|
||||
@ -486,7 +520,7 @@ still:
|
||||
jne .no_x
|
||||
inc [angle_x]
|
||||
and [angle_x],0xff
|
||||
mov [angle_z],0
|
||||
;mov [angle_z],0
|
||||
jmp .end_rot
|
||||
|
||||
.no_x:
|
||||
@ -494,7 +528,7 @@ still:
|
||||
jne .no_y
|
||||
inc [angle_y]
|
||||
and [angle_y],0xff
|
||||
mov [angle_z],0
|
||||
;mov [angle_z],0
|
||||
jmp .end_rot
|
||||
|
||||
.no_y:
|
||||
@ -503,7 +537,7 @@ still:
|
||||
mov cx,[angle_x]
|
||||
inc cx
|
||||
and cx,0xff
|
||||
mov [angle_z],0
|
||||
;mov [angle_z],0
|
||||
mov [angle_y],cx
|
||||
mov [angle_x],cx
|
||||
.end_rot:
|
||||
|
Loading…
Reference in New Issue
Block a user