forked from KolibriOS/kolibrios
crownscr: can be used as a screensaver now
git-svn-id: svn://kolibrios.org@9449 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e4ec81f666
commit
0dea1e1980
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -71,6 +71,7 @@
|
|||||||
59 Hotkeys |mykey
|
59 Hotkeys |mykey
|
||||||
56 Clipboard viewer |develop/clipview
|
56 Clipboard viewer |develop/clipview
|
||||||
62 Calendar |calendar
|
62 Calendar |calendar
|
||||||
|
33 Online update * |/kolibrios/utils/osupdate
|
||||||
48 Process manager |cpu
|
48 Process manager |cpu
|
||||||
24 Terminal |terminal
|
24 Terminal |terminal
|
||||||
05 Save ramdisk |rdsave
|
05 Save ramdisk |rdsave
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
24 ’¥à¬¨ « |terminal
|
24 ’¥à¬¨ « |terminal
|
||||||
24 Š®á®«ì SHELL |shell
|
24 Š®á®«ì SHELL |shell
|
||||||
05 ‘®åà ¥¨¥ ®¡à § |rdsave
|
05 ‘®åà ¥¨¥ ®¡à § |rdsave
|
||||||
|
33 𦀩<>帛 恣陋◤平言 * |/kolibrios/utils/osupdate
|
||||||
#8 **** ‘¨á⥬ > ”Œ
|
#8 **** ‘¨á⥬ > ”Œ
|
||||||
50 Eolite |File Managers/Eolite
|
50 Eolite |File Managers/Eolite
|
||||||
05 KFM2 |File Managers/kfm2
|
05 KFM2 |File Managers/kfm2
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
fullscreen = 1
|
fullscreen = 1
|
||||||
n_points = 0x1800
|
n_points = 0x1800
|
||||||
delay = 2
|
delay = 2
|
||||||
|
const480 = 480
|
||||||
speed equ 0.004
|
speed equ 0.004
|
||||||
|
|
||||||
|
|
||||||
@ -25,16 +26,32 @@ use32
|
|||||||
dd i_end ; size of image
|
dd i_end ; size of image
|
||||||
dd i_end+0x1000 ; memory for app
|
dd i_end+0x1000 ; memory for app
|
||||||
dd i_end+0x1000 ; esp
|
dd i_end+0x1000 ; esp
|
||||||
dd 0x0 ; I_Param
|
dd params ; I_Param
|
||||||
dd 0x0 ; I_Icon
|
dd 0x0 ; I_Icon
|
||||||
|
|
||||||
copyright db 'Crown_s Soft(c) Screensaver v1.13m www.crown-s-soft.com',0
|
copyright db 'Crown_s Soft(c) Screensaver - www.crown-s-soft.com',0
|
||||||
copyrightlen:
|
copyrightlen:
|
||||||
|
|
||||||
include "lang.inc"
|
include "lang.inc"
|
||||||
include "figuresi.inc"
|
include "figuresi.inc"
|
||||||
include "..\..\..\macros.inc"
|
include "..\..\..\macros.inc"
|
||||||
start:
|
start:
|
||||||
|
cmp dword[params], '@ss'
|
||||||
|
setz [screensaver]
|
||||||
|
mov ebx, EVM_REDRAW + EVM_KEY
|
||||||
|
cmovz ebx, EVM_REDRAW + EVM_KEY + EVM_MOUSE
|
||||||
|
mcall 40
|
||||||
|
|
||||||
|
cmp [flscr],0
|
||||||
|
jz @f
|
||||||
|
mov edi, transparent_cursor
|
||||||
|
xor eax, eax
|
||||||
|
mov ecx, 32*32
|
||||||
|
rep stosd
|
||||||
|
mcall 37, 4, transparent_cursor, 2
|
||||||
|
mov ecx, eax
|
||||||
|
mcall 37, 5
|
||||||
|
@@:
|
||||||
cld
|
cld
|
||||||
finit
|
finit
|
||||||
call filling_alfbet ; fill table alfbet by casual numbers
|
call filling_alfbet ; fill table alfbet by casual numbers
|
||||||
@ -49,7 +66,7 @@ start:
|
|||||||
mcall
|
mcall
|
||||||
|
|
||||||
mov [maxy],ax
|
mov [maxy],ax
|
||||||
sub ax,480
|
sub ax,const480
|
||||||
jnc m5
|
jnc m5
|
||||||
xor ax,ax
|
xor ax,ax
|
||||||
m5:
|
m5:
|
||||||
@ -58,47 +75,49 @@ start:
|
|||||||
|
|
||||||
shr eax,16
|
shr eax,16
|
||||||
mov [maxx],ax
|
mov [maxx],ax
|
||||||
sub ax,480
|
sub ax,const480
|
||||||
jnc m6
|
jnc m6
|
||||||
xor ax,ax
|
xor ax,ax
|
||||||
m6:
|
m6:
|
||||||
shr ax,1
|
shr ax,1
|
||||||
mov [posx],ax
|
mov [posx],ax
|
||||||
|
|
||||||
mov [outsize],480+65536*480
|
mov [outsize],const480+65536*const480
|
||||||
jmp m4
|
jmp m4
|
||||||
nofullscreen:
|
nofullscreen:
|
||||||
mov [posx],75
|
mov [posx],75
|
||||||
mov [posy],20
|
mov [posy],20
|
||||||
|
|
||||||
mov [outsize],450+65536*480
|
mov [outsize],const480+65536*const480
|
||||||
m4:
|
m4:
|
||||||
|
|
||||||
red:
|
red:
|
||||||
call draw_window
|
call draw_window
|
||||||
|
|
||||||
still:
|
still:
|
||||||
mov eax,23
|
mcall 23,delay ; wait here for event
|
||||||
mov ebx,delay
|
|
||||||
mcall ; wait here for event
|
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je red
|
je red
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je key
|
je key
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je button
|
je close
|
||||||
|
cmp eax,6 ; mouse moved ?
|
||||||
|
je close
|
||||||
|
|
||||||
call calcframe
|
call calcframe
|
||||||
mov edx,dword [posy] ; edx=image position in window [x]*65536+[y]
|
|
||||||
mov ecx,[outsize] ; ecx=image position in window [x]*65536+[y]
|
|
||||||
mov ebx,scr ; ebx pointer to image in memory
|
|
||||||
mov eax,07 ; putimage
|
mov eax,07 ; putimage
|
||||||
|
mov ebx,scr ; ebx pointer to image in memory
|
||||||
|
mov ecx,[outsize] ; ecx=image position in window [w]*65536+[h]
|
||||||
|
mov edx,dword [posy] ; edx=image position in window [x]*65536+[y]
|
||||||
mcall
|
mcall
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
key:
|
key:
|
||||||
|
cmp [screensaver], 0
|
||||||
|
jnz close
|
||||||
|
|
||||||
mov eax,2
|
mov eax,2
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
@ -108,16 +127,12 @@ key:
|
|||||||
jz close
|
jz close
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
button: ; button
|
|
||||||
mov eax,17 ; get id
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; cmp ah,1 ; button id=1 ?
|
|
||||||
; jne still
|
|
||||||
|
|
||||||
close:
|
close:
|
||||||
mov eax,-1 ; close this program
|
cmp [screensaver], 0
|
||||||
mcall
|
jz @f
|
||||||
|
mcall 70, f70
|
||||||
|
@@:
|
||||||
|
mcall -1
|
||||||
|
|
||||||
|
|
||||||
; *********************************************
|
; *********************************************
|
||||||
@ -126,35 +141,17 @@ close:
|
|||||||
|
|
||||||
|
|
||||||
draw_window:
|
draw_window:
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
mcall 12, 1 ;start draw
|
||||||
mov ebx,1 ; 1, start of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp [flscr],0
|
cmp [flscr],0
|
||||||
jnz m2
|
jnz m2
|
||||||
mov ebx,1*65536+638 ; [x start] *65536 + [x size]
|
mcall 48,4
|
||||||
mov ecx,1*65536+478 ; [y start] *65536 + [y size]
|
mov esi, eax
|
||||||
mov edx,0x02000000 ; color of work area RRGGBB,8->color gl
|
; DRAW WINDOW
|
||||||
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl
|
mov ecx,100*65536+const480+4 ; [y start] *65536 + [y size]
|
||||||
mov edi,0x005080d0 ; color of frames RRGGBB
|
add ecx, esi
|
||||||
xor eax,eax ; function 0 : define and draw window
|
mcall 0, 100*65536+const480+9,,0x74000000,,copyright
|
||||||
mcall
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
|
|
||||||
mov ecx,0x10ddeeff ; color of text RRGGBB
|
|
||||||
mov edx,copyright ; pointer to text beginning
|
|
||||||
mov esi,copyrightlen-copyright; text length
|
|
||||||
mov eax,4 ; function 4 : write text to window
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; CLOSE BUTTON
|
|
||||||
mov ebx,(640-19)*65536+12 ; [x start] *65536 + [x size]
|
|
||||||
mov ecx,5*65536+12 ; [y start] *65536 + [y size]
|
|
||||||
mov edx,1 ; button id
|
|
||||||
mov esi,0x6688dd ; button color RRGGBB
|
|
||||||
mov eax,8 ; function 8 : define and draw button
|
|
||||||
mcall
|
|
||||||
jmp m3
|
jmp m3
|
||||||
m2:
|
m2:
|
||||||
movzx ebx,[maxx] ; [x start] *65536 + [x size]
|
movzx ebx,[maxx] ; [x start] *65536 + [x size]
|
||||||
@ -172,16 +169,14 @@ draw_window:
|
|||||||
mcall
|
mcall
|
||||||
m3:
|
m3:
|
||||||
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
mcall 12, 2 ;end draw
|
||||||
mov ebx,2 ; 2, end of draw
|
|
||||||
mcall
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
calcframe:
|
calcframe:
|
||||||
cld
|
cld
|
||||||
mov edi,scr
|
mov edi,scr
|
||||||
mov ecx,480*480*3/4
|
mov ecx,const480*const480*3/4
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
rep stosd ; CLS
|
rep stosd ; CLS
|
||||||
|
|
||||||
@ -292,7 +287,7 @@ turn:
|
|||||||
|
|
||||||
mov eax,[x1]
|
mov eax,[x1]
|
||||||
add eax,[mid]
|
add eax,[mid]
|
||||||
mul [const480]
|
mul [consts]
|
||||||
add eax,[y1]
|
add eax,[y1]
|
||||||
add eax,[mid]
|
add eax,[mid]
|
||||||
mul [const3]
|
mul [const3]
|
||||||
@ -361,7 +356,7 @@ align 2
|
|||||||
|
|
||||||
const3 dd 3
|
const3 dd 3
|
||||||
const6 dw 6
|
const6 dw 6
|
||||||
const480 dd 480
|
consts dd const480
|
||||||
|
|
||||||
mFl dd n_points
|
mFl dd n_points
|
||||||
pp1 dw 0
|
pp1 dw 0
|
||||||
@ -398,7 +393,15 @@ align 2
|
|||||||
y1 dd ?
|
y1 dd ?
|
||||||
z1 dd ?
|
z1 dd ?
|
||||||
|
|
||||||
|
f70: ; run
|
||||||
|
dd 7, 0, 0, 0, 0
|
||||||
|
db '/sys/@SS',0
|
||||||
|
|
||||||
|
screensaver db ?
|
||||||
|
params rb 4
|
||||||
|
transparent_cursor rd 32*32
|
||||||
|
|
||||||
align 16
|
align 16
|
||||||
alfbet: ; alfbet db n_points*4 dup (?)
|
alfbet: ; alfbet db n_points*4 dup (?)
|
||||||
scr = alfbet+n_points*4 ; scr db 480*480*3+1 dup (?)
|
scr = alfbet+n_points*4 ; scr db 480*480*3+1 dup (?)
|
||||||
i_end = scr+480*480*3+1 ; i_param db 256 dup (?)
|
i_end = scr+const480*const480*3+1 ; i_param db 256 dup (?)
|
||||||
|
@ -417,7 +417,7 @@ turtle Turtle 0.0, 0.0, 0.0, <180, 255, 255>
|
|||||||
|
|
||||||
f70: ; run
|
f70: ; run
|
||||||
dd 7, 0, 0, 0, 0
|
dd 7, 0, 0, 0, 0
|
||||||
db '/sys/@ss',0
|
db '/sys/@SS',0
|
||||||
i_end:
|
i_end:
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
@ -427,7 +427,7 @@ frame_start dd ?
|
|||||||
color dd ?
|
color dd ?
|
||||||
|
|
||||||
proc_info process_information
|
proc_info process_information
|
||||||
params rb 0x400
|
params rb 4
|
||||||
transparent_cursor rd 32*32
|
transparent_cursor rd 32*32
|
||||||
screensaver db ?
|
screensaver db ?
|
||||||
align 4
|
align 4
|
||||||
|
Loading…
Reference in New Issue
Block a user