End: added message on saving ram-drive. Also you can use fade effect. Just set "fade equ 1" in end.asm and compile program to yourself. Need translations update to it,ge.

git-svn-id: svn://kolibrios.org@4266 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2013-11-21 09:36:24 +00:00
parent 080b8dcdc4
commit 0d937c707a
2 changed files with 94 additions and 34 deletions

View File

@ -1,8 +1,8 @@
if lang eq ru
label2:
db '‚몫îç¨âì Ÿ¤à®',0
db '‚몫îç¨âě ź¤ŕ®',0
label3:
db '<EFBFBD>¥à¥§ ¯ã᪠Žâ¬¥­ ',0
db 'ŹĄŕĄ§ Żă᪠Žâ¬Ą­ ',0
label4:
db '‘®åà ­¨âì ­ áâனª¨ (Ctrl-S)',0
@ -33,9 +33,9 @@ else
end if
label5:
db '(End) (Home)',0
db '(End) (Home)',0
label6:
db '(Enter) (Esc)',0
db '(Enter) (Esc)',0
rdsave:
dd 7,0,hide,0,0
@ -90,9 +90,54 @@ aini_get_int db 'ini_get_int',0
aini_set_int db 'ini_set_int',0
;---------------------------------------------------------------------
check1 check_box2 20 shl 16 +8,96 shl 16 +8,6,0xffffff,0,0,label4
check1 check_box2 20 shl 16 +8,93 shl 16 +8,6,0xffffff,0,0,label4
hide db 'h',0
asettings db 'settings',0
aautosave db 'autosave',0
ini_file db '/sys/settings/rdsave.ini',0
If fade=1
color1 dd 0x019098d0
color2 dd 0xFFFFFF
color3 dd 0xe4dfe1
color4 dd 0x990022
color5 dd 0xaa7700
color6 dd 0x777777
color7 dd 0x007700
color8 dd 0x90FFFFFF
color21 dd 0x01505890
color22 dd 0xbfbfbf
color23 dd 0xa49fa1
color24 dd 0x590011
color25 dd 0x593700
color26 dd 0x373737
color27 dd 0x003700
color28 dd 0x90bfbfbf
else
color1 dd 0x019098d0
color2 dd 0xFFFFFF
color3 dd 0xe4dfe1
color4 dd 0x990022
color5 dd 0xaa7700
color6 dd 0x777777
color7 dd 0x007700
color8 dd 0x90FFFFFF
if lang eq ru
label7:
db '‘®ĺŕ ­Ą­¨Ą ®ˇŕ § ...',0
else
label7:
db 'Saving RAM-drive...',0
end if
end if

View File

@ -5,17 +5,18 @@
; <diamond> note that 'mov al,xx' is shorter than 'mov eax,xx'
; and if we know that high 24 bits of eax are zero, we can use 1st form
; the same about ebx,ecx,edx
fade equ 0
use32 ; âêëþ÷èòü 32-áèòíûé ðåæèì àññåìáëåðà
org 0x0 ; àäðåñàöèÿ ñ íóëÿ
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
org 0x0 ;  ¤à¥á æ¨ï á ­ã«ï
db 'MENUET01' ; 8-áàéòíûé èäåíòèôèêàòîð MenuetOS
dd 0x01 ; âåðñèÿ çàãîëîâêà (âñåãäà 1)
dd START ; àäðåñ ïåðâîé êîìàíäû
dd IM_END ; ðàçìåð ïðîãðàììû
dd I_END ; êîëè÷åñòâî ïàìÿòè
dd stacktop ; àäðåñ âåðøèíû ñòåêà
dd 0x0 ; àäðåñ áóôåðà äëÿ ïàðàìåòðîâ
db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
dd IM_END ; à §¬¥à ¯à®£à ¬¬ë
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd stacktop ;  ¤à¥á ¢¥à設ë á⥪ 
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢
dd cur_dir_path
include 'lang.inc'
@ -68,7 +69,7 @@ still:
@@:
mov [autosave],0
jmp still
key:
mov al,2
mcall ;eax=2 - get key code
@ -111,6 +112,22 @@ restart_kernel:
push 4
mcall_and_close:
if fade=1
; === FADE IN ===
mov eax, color1
@@:
mov ebx, [eax + 32]
mov [eax], ebx
add eax, 4
cmp eax, color21
jne @b
call draw_window
else
mov al,4
mcall ,<50,110> ,0x80000000,label7 ;eax=4 - write text
end if
invoke ini_set_int,ini_file,asettings,aautosave,[autosave]
cmp [autosave],1
jne no_save
@ -126,7 +143,7 @@ mcall_and_close:
dec eax
jnz no_red
call draw_window
no_red:
no_red:
pop ecx
mcall 9,proc_info
cmp [proc_info+50],9
@ -134,8 +151,7 @@ no_red:
jmp @b
no_save:
pop ecx
mcall 18,9
ret
mcall 18,9
checkbox:
btc dword [check1.flags],1
@ -148,7 +164,7 @@ checkbox:
push dword check1
call [check_box_draw2]
jmp still
draw_window:
mov al,12
mcall ,1
@ -161,27 +177,27 @@ draw_window:
lea ebx,[eax-110 shl 16+222]
shr ecx,1
shl ecx,16
lea ecx,[ecx-70 shl 16+117]
lea ecx,[ecx-70 shl 16+122]
xor eax,eax
mcall , , ,0x019098b0,0x01000000 ;define and draw window
mcall , , ,[color1],0x01000000 ;define and draw window
mov al,13
mcall ,<0,223> ,<0,118>
mcall ,<1,221>,<1,116>,0xffffff
mcall ,<2,220>,<2,115>,0xe4dfe1
mcall ,<0,223> ,<0,123>
mcall ,<1,221>,<1,121>,[color2]
mcall ,<2,220>,<2,120>, [color3]
mov al,8
mcall ,<16,90> ,<20,27>,4,0x990022 ;eax=8 - draw buttons
mcall ,<113,90>, ,2,0xaa7700
mcall , ,<54,27>,1,0x777777
mcall ,<16,90> , ,3,0x007700
mcall ,<16,90> ,<20,27>,4,[color4] ;eax=8 - draw buttons
mcall ,<113,90>, ,2,[color5]
mcall , ,<54,27>,1,[color6]
mcall ,<16,90> , ,3,[color7]
mov al,4
mcall ,<27,24> ,0x90ffffff,label2 ;eax=4 - write text
mcall ,<23,58> , ,label3
mcall ,<47,37> , ,label5
mcall ,<41,71> , ,label6
mcall ,<27,24> ,[color8],label2 ;eax=4 - write text
mcall ,<23,58> , ,label3
mcall ,<47,37> , ,label5
mcall ,<41,71> , ,label6
push dword check1
call [check_box_draw2]
@ -192,7 +208,6 @@ draw_window:
;---------------------------------------------------------------------
;data
include 'data.inc'
;---------------------------------------------------------------------
IM_END:
;---------------------------------------------------------------------
@ -211,4 +226,4 @@ library_path:
align 32
rb 4096
stacktop:
I_END: ; ìåòêà êîíöà ïðîãðàììû
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë