12,6 → 12,7 |
fullscreen = 1 |
n_points = 0x1800 |
delay = 2 |
const480 = 480 |
speed equ 0.004 |
|
|
25,10 → 26,10 |
dd i_end ; size of image |
dd i_end+0x1000 ; memory for app |
dd i_end+0x1000 ; esp |
dd 0x0 ; I_Param |
dd params ; I_Param |
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: |
|
include "lang.inc" |
35,6 → 36,22 |
include "figuresi.inc" |
include "..\..\..\macros.inc" |
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 |
finit |
call filling_alfbet ; fill table alfbet by casual numbers |
49,7 → 66,7 |
mcall |
|
mov [maxy],ax |
sub ax,480 |
sub ax,const480 |
jnc m5 |
xor ax,ax |
m5: |
58,7 → 75,7 |
|
shr eax,16 |
mov [maxx],ax |
sub ax,480 |
sub ax,const480 |
jnc m6 |
xor ax,ax |
m6: |
65,13 → 82,13 |
shr ax,1 |
mov [posx],ax |
|
mov [outsize],480+65536*480 |
mov [outsize],const480+65536*const480 |
jmp m4 |
nofullscreen: |
mov [posx],75 |
mov [posy],20 |
|
mov [outsize],450+65536*480 |
mov [outsize],const480+65536*const480 |
m4: |
|
red: |
78,9 → 95,7 |
call draw_window |
|
still: |
mov eax,23 |
mov ebx,delay |
mcall ; wait here for event |
mcall 23,delay ; wait here for event |
|
cmp eax,1 ; redraw request ? |
je red |
87,18 → 102,22 |
cmp eax,2 ; key in buffer ? |
je key |
cmp eax,3 ; button in buffer ? |
je button |
je close |
cmp eax,6 ; mouse moved ? |
je close |
|
|
call calcframe |
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] |
mov ecx,[outsize] ; ecx=image position in window [x]*65536+[y] |
mov ebx,scr ; ebx pointer to image in memory |
mov eax,07 ; putimage |
mcall |
jmp still |
|
key: |
cmp [screensaver], 0 |
jnz close |
|
mov eax,2 |
mcall |
|
108,16 → 127,12 |
jz close |
jmp still |
|
button: ; button |
mov eax,17 ; get id |
mcall |
|
; cmp ah,1 ; button id=1 ? |
; jne still |
|
close: |
mov eax,-1 ; close this program |
mcall |
cmp [screensaver], 0 |
jz @f |
mcall 70, f70 |
@@: |
mcall -1 |
|
|
; ********************************************* |
126,35 → 141,17 |
|
|
draw_window: |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
mcall |
mcall 12, 1 ;start draw |
|
cmp [flscr],0 |
jnz m2 |
mov ebx,1*65536+638 ; [x start] *65536 + [x size] |
mov ecx,1*65536+478 ; [y start] *65536 + [y size] |
mov edx,0x02000000 ; color of work area RRGGBB,8->color gl |
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl |
mov edi,0x005080d0 ; color of frames RRGGBB |
xor eax,eax ; function 0 : define and draw window |
mcall |
mcall 48,4 |
mov esi, eax |
; DRAW WINDOW |
mov ecx,100*65536+const480+4 ; [y start] *65536 + [y size] |
add ecx, esi |
mcall 0, 100*65536+const480+9,,0x74000000,,copyright |
|
; 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 |
m2: |
movzx ebx,[maxx] ; [x start] *65536 + [x size] |
172,9 → 169,7 |
mcall |
m3: |
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
mcall |
mcall 12, 2 ;end draw |
ret |
|
|
181,7 → 176,7 |
calcframe: |
cld |
mov edi,scr |
mov ecx,480*480*3/4 |
mov ecx,const480*const480*3/4 |
xor eax,eax |
rep stosd ; CLS |
|
292,7 → 287,7 |
|
mov eax,[x1] |
add eax,[mid] |
mul [const480] |
mul [consts] |
add eax,[y1] |
add eax,[mid] |
mul [const3] |
361,7 → 356,7 |
|
const3 dd 3 |
const6 dw 6 |
const480 dd 480 |
consts dd const480 |
|
mFl dd n_points |
pp1 dw 0 |
398,7 → 393,15 |
y1 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 |
alfbet: ; alfbet db n_points*4 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 (?) |