jpegview 0.18

Open file with parameter in patch. Size of parameter - 4 bytes. Parameter starts with the character "\", the unused characters are filled by a blank (ASCII 20h).
'\T  /hd0/1/1.jpg' - set background, mode: tile
'\S  /hd0/1/1.jpg' - set background, mode: stretch

git-svn-id: svn://kolibrios.org@606 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2007-08-09 21:20:30 +00:00
parent 85028a5147
commit 4b5d5984ce

View File

@ -29,13 +29,20 @@
; 5=light-blue,6=blue,7=salad,8=pink,9=yellow ; 5=light-blue,6=blue,7=salad,8=pink,9=yellow
; version 0.17 17th June 2007 ; version 0.17 17th June 2007
; diamond (background definition now uses shared memory) ; diamond (background definition now uses shared memory)
; version 0.18 9th August 2007
; Mario79
; Open file with parameter in patch:
; Size of parameter - 4 bytes. Parameter starts with the character "\",
; the unused characters are filled by a blank (ASCII 20h).
; '\T /hd0/1/1.jpg' - set background, mode: tile
; '\S /hd0/1/1.jpg' - set background, mode: stretch
memsize=20000h memsize=20000h
org 0 org 0
PARAMS = memsize - 1024 PARAMS = memsize - 1024
appname equ 'Jpegview ' appname equ 'Jpegview '
version equ '0.17' version equ '0.18'
use32 use32
@ -134,6 +141,17 @@ check_parameters:
jne @f jne @f
cmp [PARAMS+2], byte "L" cmp [PARAMS+2], byte "L"
je boot_set_background je boot_set_background
@@:
cmp byte [PARAMS], "\"
jne @f
cmp [PARAMS+1], byte "S"
jne .tile
mov [drawing_mode],2
jmp @f
.tile:
cmp [PARAMS+1], byte "T"
jne @f
mov [drawing_mode],1
@@: @@:
cmp byte [PARAMS], 1 cmp byte [PARAMS], 1
jz ipc_service jz ipc_service
@ -145,18 +163,27 @@ check_parameters:
mov ecx, 100 ; calculate length of parameter string mov ecx, 100 ; calculate length of parameter string
mov edi, PARAMS mov edi, PARAMS
repne scasb repne scasb
sub edi, PARAMS sub edi, PARAMS
mov ecx, edi mov ecx, edi
mov esi, PARAMS ; copy parameters to file name mov esi, PARAMS ; copy parameters to file name
mov edi, name_string mov edi, name_string
cmp byte [PARAMS], "\"
jne @f
add esi,4
sub ecx,4
@@:
cld cld
rep movsb rep movsb
jmp START.l1 ; return to beggining of the progra cmp byte [PARAMS], "\"
je boot_set_background.1
jmp START.l1 ; return to beggining of the progra
;****************************************************************************** ;******************************************************************************
boot_set_background: boot_set_background:
mov [drawing_mode],2
.1:
mcall 18,16 mcall 18,16
cmp eax,1024*2 cmp eax,1024*2
jb set_mono jb set_mono
@ -253,7 +280,7 @@ set_as_bgr2:
; Stretch the image to fit ; Stretch the image to fit
mov eax, 15 mov eax, 15
mov ebx, 4 mov ebx, 4
mov ecx, 2 mov ecx, [drawing_mode] ;2
mcall mcall
mov eax, 15 mov eax, 15
@ -672,6 +699,7 @@ include 'jpeglib.asm'
; DATA AREA ; DATA AREA
wcolor dd 0x000000 wcolor dd 0x000000
drawing_mode dd 2
title db appname,version,0 title db appname,version,0
setname db 'SLIDESHOW' setname db 'SLIDESHOW'
setnamelen: setnamelen: