home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff323.lzh
/
Show
/
Show.doc
< prev
next >
Wrap
Text File
|
1990-02-27
|
10KB
|
201 lines
Show
2.0
by Sebastiano Vigna
There are many public-domain utilities which show IFF ILBM files.
None of those I've seen 'til now meets the goal: every program has its
idiosyncrasies. If you can display overscan pictures, then every picture
with more than 640 pixel on a line will be shifted as 700 pixel ones; if
you want to see a directory of pictures, you must enter the single
filenames; some programs crash with PAL pictures; some others do the same
with pictures larger than any screen; you never have an option to force a
screen mode (for the tech-folks out there: old IFF ILBM files don't have
the CAMG chunk!); you can't use a comfortable file requester when you don't
know exactly the name of the file (who can remember GRABBiT file names?);
often you can't press the right mouse button, or a useless drag bar will
corrupt the picture...
If one program has one feature, lacks another, so I decided to
write a show utility; but I surely never succeeded if I didn't have the
best friend of an Amiga programmer: the ARP library. If I had been able
to write
Show
, it's only to ARP's credit. Pattern matching, resource
tracking, powerful resident functions... The only drawback is that you
MUST have the arp.library (V39!) in your libs: directory in order to run
Show
. Otherwise, a message will be displayed, and
Show
will refuse to run.
Note that you can't run
Show
from Workbench: it works only from CLI.
Sorry. As a reward, it's re-usable, yet not pure, i.e. you can make it
resident and use it many times, but you can't run it in many CLI at the
same time.
Show
can process
ANY
IFF ILBM file (including Photon Paint files,
Excellence! files etc.); this means not only IFF ILBM FORMs, but also
nested ILBM, FTXT, etc. FORMs, CATs, LISTs and PROPs! It will always try
to find the screen type that fits the best, and won't give up if you want
to see 1x1 brushes or
VERY
large pictures (I tried upto 2048x2048).
Nevertheless, you can force the screen type with several options. The
program won't show you cycles from programs like DeLuxePaint. I don't
think cycling is "standard IFF". It's "standard EA".
To get the syntax in AmigaDOS/ARP style type:
Show ?
This will give you:
Files/...,Secs/k,F=Fade/k,N=NOMOUSE/s,R=REPEAT/s,C=CENTER/s,
B=BLACKBACKGROUND/s,NOFASTDRAW/s,Width/k,Height/k,ALL/s,
HIRES/s,LACE/s,LORES/s,NOLACE/s,HAM/s,HALFBRITE/s:
If you ask more help with "?", you will see:
Show
2.0 © 1990 Sebastiano Vigna
Usage: Show <wildcards [...] | !> [SECS seconds] [FADE speed]
[NOMOUSE] [REPEAT] [CENTER] [BLACKBACKGROUND]
[NOFASTDRAW] [WIDTH width] [HEIGHT height] [ALL]
[HIRES | LORES] [LACE | NOLACE] [HAM | HALFBRITE]
The same help is displayed if you call
Show
with no argument.
The first argument for
Show
is a list of patterns (or file names)
as long as you want; you will get every picture that match one of the
patterns.
Alternatively, you can give only the "!" character, that will
display the famous Heath File Requester and will make you able to scan the
entire file system.
When you're tired of looking at your picture, take the mouse
pointer at the very top of the screen and press the right button (you can
also simply press the RETURN, SPACE or ESCAPE keys). You can always drag
or depth-arrange the screen (the gadgets seem not to be there, but they do
really are!) with the left mouse button. To stop a pattern matching search
use CTRL-C.
If the screen size is for some reasons less than the size of the
picture, you can move around with cursor keys alone (8 pixels), ALTed (16
pixels, lowest=weakest), SHIFTed (64 pixels) or CTRLed (128 pixels,
highest=strongest). A noteworthy feature of
Show
is that the picture is
NOT
decrunched one time for all in a
VERY
large chunk of memory: a fast LM
routine decrunches the file in real-time every time you move (the routine
could indeed be faster, but it has lot of controls to get rid of damaged
IFF BODY chunks; safety always first). This is not as fast as the
memory-eating method, but I think it's
MUCH
better! Very huge pictures
(e.g., 800x900) will be shown in a full screen (generated on the fly at
Workbench size) from which you can move around. Overscan pictures will
retain their size of it's not greater than 400x300 lo-res pixels (400x250
on a NTSC Amiga).
A weird effect of this method is that you can see pictures that
can't be even *LOADED* in your Amiga. Let's suppose you have a really
crunched picture; the BODY chunk and a 256x256 lo-res screen could take
much less than the decrunched picture, so you could create pictures that
only Show 2.0 could let you see in all of their parts. Why would you want
to do this, well, that's another matter.
The second (optional, as any of the remaining) argument is the
keyword SECS followed by a number between 1 and 1000.
Show
will check
neither the right mouse button nor CURSOR/RETURN/SPACE/ESCAPE/CTRL-C, and
will display the picture for the number of seconds specified.
The third argument lets you specify a FADE speed (between 1 and 4)
at which you want to fade in/out every picture. The higher the number, the
slower the fade. Note that HAM pictures can't be faded.
Now we have a lot of options:
- NOMOUSE will kill the mouse pointer while
Show
is displaying a picture;
- REPEAT will endless restart from the first pattern when it has finished
with the last;
- CENTER will force the screen to be centered (640x200 pictures on PAL
screens look so ugly...) and will of course overscan if needed;
- BLACKBACKGROUND will create a 0-bitplane (almost no memory consuming!)
black screen that will stay until you saw the last picture.
Aesthetical-only.
All of the preceeding options can be shortened with their first
letter. Please note that centering is done via Preferences, i.e. EVERY
screen open will be silently "moved". Watch out for side-effects.
- NOFASTDRAW leaves the program at priority 0; by default,
Show
will
surround the BODY decrunching operations with a SetTaskPri(1): this will
not lock the system, but in a multitasking situation
Show
will perform fast
when needed;
- WIDTH and HEIGHT want an argument that specify the dimensions of the
show screen (WIDTH will be padded to the next word boundary). However,
Show
is an intelligent program, and will almost always find by itself the
right screen. WARNING: dimensions allowed are from 64 to 1024, at your
own risk. Your Amiga won't crash, but weird things can happen...
- ALL scans recursively all of the subdirectories during the wildcard
search.
Now, graphics options. You can force all screens to be HIRES or
LORES, (inter)LACE or NO(inter)LACE, to be HAM or (EXTRA_)HALFBRITE. Note
that if
Show
find as six bitplanes picture with no indications (i.e. no
CAMG chunk), it won't set by default the HAM flag.
And now, some examples:
SHOW MyPics:* SECS 5 FADE 0 NOMOUSE BLACKBACKGROUND REPEAT CENTER ALL
will generate a real (and endless!) slide show of the pictures in the
MyPics: dir and in all its subdirs, centered and with no mouse hanging
around. Note that in order to stop the slide show, you must put in front
the Workbench screen with the AMIGA-N keys, quickly select the
Show
CLI
window and press CTRL-C. With the SECS option, CTRL-C during screen
displays is not checked. WARNING: I found out that if you use DMouse and
you want to send back a picture using the two mouse buttons, the system can
deadlock! (A strange interaction with the 0-depth screen?) Use AMIGA-N.
SHOW df0:*.image df0:pictures/*.pic HIRES LACE
will show the files ending with .image on the drive df0: and the files
ending with .pic in the directory df0:pictures forcing (if possible)
Show
to use always high resolution, interlaced screens. Usually, setting the
HIRES flag on pictures with more than 4 bitplanes leads you to see
absolutely nothing.
SHOW dh0:hirespic LORES NOLACE
will show an hi-res picture in lo-res, i.e. "zooming in". You can move
around with cursor keys, as above.
WIDTH and HEIGHT can be usefull when you have a picture that cannot be
displayed because there's not enough Chip RAM (usually, you got the "Can't
open Screen" error message). Try then:
Show pic WIDTH 128 HEIGHT 128
This, usually, will allow you to peek something.
Credits, etc.
I am proud to announce that
Show
showed perfectly .LBM files of an
MS-DOS known game directly from the original disk (via CrossDos, of
course).
I wish to thank some people, first of all the ARP team for the
arp.library and John Toebes at Lattice for the best Amiga C. Speed and
compactness of
Show
come from the fabulous 5.04 release. Dulcis in fundo
(I like SO much latin!) thanks to Luca Spada (the SkyLink SysOp) for his
enthusiasm about
Show
1.0, that persuaded me to create a 2.0 version.
A word about debugging: I don't have much time to debug, so maybe
some nasty bugs are lurking around the code. If you find something please
write me or leave me a message at BIX. Comments, suggestions, as well as
$, are definitively welcome.
This software is not exactly public domain. It is freely
distributable, copyrighted software. You can copy it, spread it, use it,
include it in commercial packages as a "bonus" at no fee, but you cannot
sell it. This brief note should always stay together with the program. I
hope
Show
will help you to enjoy more (if possible) your Amiga.
Sebastiano Vigna
BIX: svigna
Address:
Sebastiano Vigna
Via Valparaiso, 18
20144 MILANO Italia