add use params (h- hidden, n- normal). Add file readme.txt

git-svn-id: svn://kolibrios.org@3099 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Akyltist 2012-12-12 17:01:34 +00:00
parent 7adfc23a16
commit 3fb43d5326
2 changed files with 218 additions and 23 deletions

View File

@ -28,6 +28,9 @@
;; - „®¡ ¢«¥­® ¨§¬¥­¥­¨¥ ä®­  à ¡®ç¥£® á⮫  £à ¤¨¥­â­®© § «¨¢ª®©. |
;; - Š®á¬¥â¨ç¥áª¨¥ ¯à ¢ª¨. |
;; - <20>¥¡®«ìè ï ¤¥®¯â¨¬¨§ æ¨ï. |
;; 0.6.0 - „®¡ ¢«¥­  ¢®§¬®¦­®áâì § ¯ã᪠ á ¯ à ¬¥âà ¬¨ |
;; - „®¡ ¢«¥­ ०¨¬ H (hidden) ¯à®¨§¢®¤¨â § ¬¥­ã ä®­  à ¡®ç¥£® á⮫  £à ¤¨¥­â­®© § «¨¢ª®©. |
;; - <20>®«ìè ï ¤¥®¯â¨¬¨§ æ¨ï. |
;.....................................................................................................
;; All rights reserved. |
;; |
@ -66,16 +69,44 @@
dd I_END
dd 0x100000
dd 0x1000
dd 0x0
dd params
dd 0x0
include '..\..\..\macros.inc'
WIN_W equ 295 ; è¨à¨­  ®ª­ 
WIN_H equ 195 ; ¢ëá®â  ®ª­ 
WIN_X equ 250 ; ª®®à¤¨­ â  å ®ª­ 
WIN_Y equ 190 ; ª®®à¤¨­ â  ã ®ª­ 
WIN_W equ 295 ; è¨à¨­  ®ª­ 
WIN_H equ 195 ; ¢ëá®â  ®ª­ 
WIN_X equ 250 ; ª®®à¤¨­ â  å ®ª­ 
WIN_Y equ 190 ; ª®®à¤¨­ â  ã ®ª­ 
START:
; ®¡à ¡®âª  ¯ à ¬¥â஢ ª®¬ ­¤­®© áâப¨
mov edi,params ; 㪠§ â¥«ì ­  áâபã
call str_len ; ¯®«ãç ¥¬ ¤«¨­ã áâப¨
cmp eax,0 ; áâà ¢­¨¢ ¥¬ ¤«¨­ã á ­ã«ñ¬
je red ; ¥á«¨ ¯ à ¬¥â஢ ­¥â â® ã室¨¬
call _read_params ; ¨­ ç¥ ç¨â ¥¬ ¯ à ¬¥âàë æ¢¥â  (®ç¥­ì ªà¨¢®)
xor eax,eax ; § ­ã«ï¥¬ ॣ¨áâà
mov al,byte [params] ; ç¨â ¥¬ ¯ à ¬¥âà ¬®¤ 
cmp al,'N' ; áà ¢­¨¢ ¥¬ á normal mode
jne _no_normalmode ; ¥á«¨ ­¥â â® ã室¨¬ ­  ¯à®¢¥àªã ¤ «ìè¥
mov [runmode],1 ; ¥á«¨ ¤  â® ãáâ ­ ¢«¨¢ ¥¬ ¥£®
jmp red ; ¨¤ñ¬ ­  ®âà¨á®¢ªã
_no_normalmode: ; ¥á«¨ ­¥ normal mode â®
cmp al,'H' ; ¢®§¬®¦­® hidden mode
jne _no_hiddenmode ; ¥á«¨ ­¥ ®­ â® ã室¨¬ ¤ «ìè¥
mov [runmode],2 ; ¥á«¨ ®­ â® ãáâ ­ ¢«¨¢ ¥¬ çâ® íâ® ®­ (­ å?)
call set_background ; ¬¥­ï¥¬ ä®­
jmp bexit ; ¨ § ªà뢠¥¬ ¯à®£ã
_no_hiddenmode: ; ¥á«¨ ­¥ hidden mode
cmp al,'D' ; ¢®§¬®¦­® íâ® color dialog mode
jne _no_dialogmode ; ¥á«¨ ¢áñ â ª¨ ­¥ ®­ â® ã室¨¬
mov [runmode],3 ; ¨­ ç¥ 㪠§ë¢ ¥¬ çâ® íâ® â ª¨ ®­
jmp red ; ¨ ã室¨¬ ­  ¢ë¯®«­¥­¨¥
_no_dialogmode: ; ¥á«¨ íâ® ­¨ ®¤¨­ ¨§ § ï¢«¥­ëå ¬®¤®¢
mov [runmode],1 ; â® á¡à á뢠¥¬ ­  ¤¥ä®«â
jmp red ; ¨ à¨á㥬
;#___________________________________________________________________________________________________
;****************************************************************************************************|
; Ž<C5BD>Ž<C5BD>Ž‰ –ˆŠ‹ <20><>Žƒ<C5BD>€ŒŒ - Ž<><C5BD><EFBFBD>ŽŠ€ Ž<E28098>ˆ‰ |
@ -197,12 +228,26 @@ draw_main:
int 0x40 ; <20>à¥à뢠­¨¥
mov ecx,eax ; ‡ ¯®¬¨­ ¥¬ ¢ëá®âã ᪨­ 
mov edi,[runmode]
cmp edi,2
jne no_hiddenmode
mov edi,hidden
jmp set_title
no_hiddenmode:
cmp edi,3
jne no_dialogmode
mov edi,hidden
jmp set_title
no_dialogmode:
mov edi,title ; ‡ £®«®¢®ª ®ª­ 
set_title:
xor eax,eax ; Žç¨é ¥¬ eax (mov eax,0) (”ã­ªæ¨ï 0)
mov ebx,WIN_X shl 16+WIN_W ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
add ecx,WIN_Y shl 16+WIN_H ; ‚ëá®â  ᪨­  + [ª®®à¤¨­ â  ¯® y]*65536 + [à §¬¥à ¯® y] (168 ¤«ï ¢¥àᨨ 0.2)
mov edx,[sc.work] ; ‚¨¤¨¬® áâ¨«ì ®ª­  ¯® ¤¥ä®«âã
or edx,0x34000000 ; ˆ«¨ ®ª­® ᮠ᪨­®¬ 䨪á¨à®¢ ­­ëå à §¬¥à®¢
mov edi,title ; ‡ £®«®¢®ª ®ª­ 
int 0x40 ; <20>à¥à뢠­¨¥
@ -238,7 +283,6 @@ draw_main:
call draw_bottom_panel
call draw_left_panel
mov eax,12 ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­®
mov ebx,2 ; 2 - ª®­¥æ à¨á®¢ ­¨ï
int 0x40 ; <20>à¥à뢠­¨¥
@ -827,6 +871,68 @@ draw_value:
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
;end_draw_value
_read_params:
mov al,[params+2]
mov [params_c+0],al
mov al,[params+3]
mov [params_c+1],al
mov al,[params+4]
mov [params_c+2],al
mov al,[params+5]
mov [params_c+3],al
mov al,[params+6]
mov [params_c+4],al
mov al,[params+7]
mov [params_c+5],al
mov al,[params+8]
mov [params_c+6],al
mov al,[params+9]
mov [params_c+7],al
mov esi,params_c
mov ecx,16
call ascii2int
mov [color],eax
mov al,[params+11]
mov [params_c+0],al
mov al,[params+12]
mov [params_c+1],al
mov al,[params+13]
mov [params_c+2],al
mov al,[params+14]
mov [params_c+3],al
mov al,[params+15]
mov [params_c+4],al
mov al,[params+16]
mov [params_c+5],al
mov al,[params+17]
mov [params_c+6],al
mov al,[params+18]
mov [params_c+7],al
mov esi,params_c
mov ecx,16
call ascii2int
mov [color2],eax
ret
hex_digit:
;.................................................................................................
; <20>८¡à §®¢ ­¨¥ ¢ ASCII (¢­¥ § ¢¨á¨¬®á⨠®â á¨á⥬ë áç¨á«¥­¨ï)
@ -874,6 +980,50 @@ int2ascii:
ret ; ¨ ¢®§¢à é ¥¬ ã¯à ¢«¥­¨¥
;end_int2ascii
char2byte:
sub al,'0'
cmp al,10
jb done
add al,'0'
and al,0x5f
sub al,'A'-10
and al,0x0f
done:
ret
;end_char2byte
ascii2int:
;.................................................................................................
; <20>८¡à §®¢ ­¨¥ áâப¨ ¢ ç¨á«®
;.................................................................................................
; esi - 㪠§ â¥«ì ­  ­ã«ìâ¥à¬¨­¨à®¢ ­­ãî áâபã
; ecx - ®á­®¢ ­¨¥ á¨á⥬ë áç¨á«¥­¨ï
; ‚®§¢à é ¥â eax - ç¨á«®
push esi
xor eax,eax
xor ebx,ebx
cmp byte [esi],'-'
jnz .next
inc esi
.next:
lodsb
or al,al
jz .done
call char2byte
imul ebx,ecx
add ebx,eax
jmp .next
.done:
xchg ebx,eax
pop esi
cmp byte [esi],'-'
jz .negate
ret
.negate:
neg eax
ret
;end_ascii2int
get_spectr:
;.................................................................................................
; ¢®§¢à é ¥â r,g,b á®á⮢«ïî騥 梥â 
@ -928,26 +1078,36 @@ str_len:
ret
;end_str_len
;.................................................................................................
; ¢®§¢à é ¥â 㪠§ â¥«ì ­  ¯¥à¢®¥ ¢å®¦¤¥­¨¥ Chr L (¢å®¤->EDI string ; ¢ë室->EAX offset)
;.................................................................................................
;strscan:
; push ecx ; ¤«¨­  áâப¨
; push ebx ; 㪠§ â¥«ì ­  ᨬ¢®« (bl)
; push esi ; ¯à¨£®¤¨âáï
; push edi ; 㪠§ â¥«ì ­  áâபã
; mov esi, edi
; mov al,bl
; repne scasb
; sub edi, esi
; mov eax, edi
; dec eax
; pop edi
; pop esi
; pop ebx
; pop ecx
; ret
;end;
;#___________________________________________________________________________________________________
;****************************************************************************************************|
; <20>ŽŠ <20><EFBFBD>…Œ…<C592><E280A6>ˆ ŠŽ<C5A0><E28099> |
;----------------------------------------------------------------------------------------------------/
struct map_colors
c1 db 0
c2 db 0
c3 db 0
c4 db 0
c5 db 0
c6 db 0
c7 db 0
c8 db 0
c9 db 0
c10 db 0
c11 db 0
c12 db 0
ends
cm db 12 dup(0)
color dd 00000000h ; åà ­¨â §­ ç¥­¨¥ ¢ë¡à ­­®£® 梥â 
color2 dd 00FFFFFFh ; åà ­¨â §­ ç¥­¨¥ ¢â®à®£® ¢ë¡à ­­®£® 梥â 
@ -956,7 +1116,8 @@ ends
mouse_f dd 0 ; åà ­¨â ¤ ­­ë¥ ® ⮬ ª ª ï ª­®¯ª  ¬ëè¨ ¡ë«  ­ ¦ â 
desctop_w dd 0 ; åà ­¨â è¨à¨­ã íªà ­ 
sc system_colors ; åà ­¨â áâàãªâãàã á¨á⥬­ëå 梥⮢ ᪨­ 
title db 'Palitra v0.5',0 ; åà ­¨â ¨¬ï ¯à®£à ¬¬ë
title db 'Palitra v0.6',0 ; åà ­¨â ¨¬ï ¯à®£à ¬¬ë
hidden db 'Hidden',0
hex db '#',0 ; ¤«ï ¢ë¢®¤  à¥èñ⪨ ª ª ⥪áâ 
cname db 'RGBAx' ; åà ­¨â à §àï¤ë 梥⮢ (red,green,blue) x-¬¥âª  ª®­æ 
cred db 0 ; åà ­¨¬ ªà á­ë© ᯥªàâ
@ -968,6 +1129,9 @@ ends
bground db 'BACKGROUND',0 ; ¨¬ï ª­®¯ª¨ - 14
pnext dd 0 ; áç¥â稪 ¯¥à¥ª«î祭¨ï ¯ «¨âàë
renmode dd 0 ; ०¨¬ ®âà¨á®¢ª¨ (1-梥⮢ ï á奬 ,2-¯¨¯¥âª ,3-ªà㣮¢ ï)
runmode dd 1 ; ०¨¬ § ¯ã᪠ (1-normal, 2-hidden, 3-colordialog)
params db 20 dup(0) ; ¯à¨ñ¬ ¯ à ¬¥â஢
params_c db 9 dup(0) ; ¯à¨ñ¬­¨ª ¤«ï 梥â 
I_END:

View File

@ -0,0 +1,31 @@
DOS-866
Ž¯¨á ­¨¥ ¯ à ¬¥â஢ ¤«ï § ¯ã᪠ ¯à®£à ¬¬ë Palitra
$ § ¯ã᪠¡¥§ ¯ à ¬¥â஢
------------------------------------------------------------------------------+
<EFBFBD>ணࠬ¬  ¤ ñâ ¢®§¬®¦­®áâì ¢ë¡®à  æ¢¥â®¢ ¨§ ¯ «¨âàë ¨ ãáâ ¢­®¢ª¨ ¨å ¯à¨ ¦¥« ­¨¨
ª ª ä®­ à ¡®ç¥£® á⮫ .
..............................................................................+
$ § ¯ãáª á ¯ à ¬¥â஬ N
------------------------------------------------------------------------------+
à ¢­®á¨«ì­® § ¯ãáªã ¡¥§ ¯ à ¬¥â஢ §  ¨áª«î祭¨¥¬ ⮣®, çâ® æ¢¥â  ¯® 㬮«ç ­¨î
¡ã¤ãâ ᮮ⢥âá⢮¢ âì ¯¥à¥¤ ­­ë¬ ¢ ¯ à ¬¥âà å. ‚®§¬®¦­ë ¢ à¨ ­âë § ¯ã᪠:
/rd/1/media/palitra N 00FF00FF 00FF0000
/rd/1/media/palitra N 00F724A3 00736698
..............................................................................+
$ § ¯ãáª á ¯ à ¬¥â஬ H
------------------------------------------------------------------------------+
<EFBFBD>ணࠬ¬  § ¯ã᪠¥âáï ¢ hidden mode ¡¥§ ®âà¨á®¢ª¨ ®ª­  ¯à¨«®¦¥­¨ï ¨ ¢ ª ç¥á⢥
¯¥à¥¤ ¢ ¥¬ëå ¯ à ¬¥â஢ âॡã¥â ¯¥à¥¤ çã ¤¢ãå 梥⮢ ¢ ¢¨¤¥ HEX áâப¨. <20>®á«¥
祣®, ¯®«ã祭­ë¥ æ¢¥â  ¡ã¤ã⠨ᯮ«ì§®¢ ­ë ¤«ï § «¨¢ª¨ ä®­  à ¡®ç¥£® á⮫  £à -
¤¨¥­â®¬ ¨§ 㪠§ ­­ëå 梥⮢. <20> ¯à¨¬¥à ¢®§¬®¦­ë ¢ à¨ ­âë § ¯ã᪠:
/rd/1/media/palitra H 00FF00FF 00FF0000
/rd/1/media/palitra H 00F724A3 00736698
..............................................................................+