home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 2
/
DATAFILE_PDCD2.iso
/
utilities3
/
_yass2
/
!Yass2
/
!Help
next >
Wrap
Text File
|
1993-05-15
|
16KB
|
369 lines
______________________________________________________________________________
| | |
| YY YY 2222 | © Copyright 1993, Ian Palmer. |
| YY YY 22 22 | |
| YY YY aaaa sssss sssss 22 | All rights reserved. |
| YYYY aa ss ss 22 |—————————————————————————————————————|
| YY aaaaa ssss ssss 22 | "We must have done something wrong."|
| YY aa aa ss ss 22 | "Oook." |
| YY aaaaa sssss sssss 222222 | "Maybe He is out." |
| | "Or busy..." |
|________________________________________| "Do you think we could give up and |
| __ _ | go back to bed?" |
| by / _ _ /_) _ / _ _ _ | WHO ARE WE WAITING FOR EXACTLY? |
| _/_(_|_| ) / (_|_(_| ) )_|/_|~ | -- "Eric" by Terry Pratchett |
|________________________________________|_____________________________________|
Introduction
------------
Yass 2 is 'Yet Another Screen Saver' designed especially for the users of
Risc-OS 3 (version 3.10 or later). But hold on a mo... Risc-OS 3 users don't
need another screen saver, they have the wonderful ScreenBlanker module.
Well that's just it, the ScreenBlanker module does it's job, but it is rather
dull, to put it mildly. Yass 2 has been designed, not to replace the
ScreenBlanker module, but to augment it.
What Yass 2 offers is an alternative to the ScreenBlanker module whilst using
the desktop, but allows the module to work normally when you are outside the
desktop. Yass 2's alternative is a programmable screen saver which not only
allows you to write your own screen saver displays, but also allows you to have
a selection of screen savers which it will swap between randomly, making sure
that your screen saver does not become dull.
Most screen saver programs available for the Arc have one, or more, of the
following problems :
• They don't allow other tasks to operate whilst the screen is blanked
(ie. they don't multitask).
• They don't work outside the desktop.
• They have one or two rather dull displays, or even worse just blank the
screen.
• If programmable, they tend to only allow one selected display at a time,
meaning that when you want a change, you have to make the change yourself.
• They don't handle ALL keys (inc. shift, ctrl, etc.)
• Some can be fairly large programs.
When using Yass 2 fully, you don't suffer any of the above problems.
How to use Yass 2
-----------------
When you run Yass 2 for the first time you will probably need to set it up for
your own preferences. With Yass 2 loaded, press SELECT over it's iconbar icon.
This will bring up the Yass SetUp window.
This window allows you to set the following :
• The Yass 2 (Desk Top) blanking time
• The non desktop (Standard) blanking time
• The 'Sleep' corner
• The 'No Sleep' corner
If you have disabled (killed) the ScreenBlanker module then you will be unable
to set the second option. The two blanking times can be altered by using the up
and down arrows, the time can be set in steps of 30 seconds. Either can be
switched off by setting the time to zero (displayed as 'Off'). Holding down
SHIFT when altering the saver times makes the time step in 1 second units,
thus allowing complete control down to the second.
The 'Sleep' corner is a corner of the screen where if the mouse pointer is
moved the screen saver is started instantly (Desktop only). The 'No Sleep'
corner is a corner where the screen saver will never start up (Desktop only).
Either can be set by clicking over the icon for the corner you require (the
current corner is indicated by the raised icon). Pressing SELECT over a corner
will make that corner the selected corner, pressing ADJUST over any of the
corners will make no corner selected).
Once you have selected your blanking times and corner options, you can now
select which screen savers you want Yass 2 to use. This is done by bringing up
the main menu, and then the 'Savers' submenu. This menu lists all the screen
saver modules known to Yass 2. Those with ticks show the currently selected
modules. Holding down SHIFT and selecting one of the savers will make that
saver the only selected saver (ie. will tick that saver and un-tick all the
others).
If only 1 saver module is ticked, that saver will always be used. If none are
ticked then the default saver is used (blank screen). If more than one is
selected then one will be picked at random, that saver will run for a certain
amount of time, and then another one of the selected savers will be picked, and
so on.
Once you have selected the savers you want to use, go back to the main menu,
and bring up the 'Status' submenu. Clicking on the 'Save' entry in this menu
will save you selections.
The Screen Saver in action
--------------------------
When the desired length of keyboard and mouse inactivity has taken place, one
of the selected screen savers will be started. This will run for a period of
time (set by the screen saver itself) and then another of the selected savers
will be started to take over. This ensures that the screen saver doesn't become
too boring.
During screen saving other desktop applications will still multi-task, and thus
the speed of the action of the screen saver will depend upon the number of
applications running.
As soon as you move the mouse, press a mouse button, press any key on the
keyboard or if a window is opened on the screen, the screen saver will stop and
return the desktop to normal.
When running non multi-tasking applications the built in screen saver module
will take over screen saving as normal.
Yass 2 tries to make as little impact on the desktop as it can. When the
screen saver is not active, Yass 2 checks the keyboard and mouse once a second.
When running a screen saver, Yass 2 automatically adjusts the amount of
CPU time it takes according to the general load of the computer, the higher
the load the lower the demands Yass 2 makes (but your display will tend to
grind, but you can't have anything).
You can force Yass 2 to always use small chunks of CPU time when running a
screen saver by selecting the 'Slow' option on the status menu. This will
force Yass2 to run the saver modules VERY slowly.
Creating your own screen saver modules
--------------------------------------
Creating your own display modules for the screen saver is very simple. Anyone
with a fairly good grasp of Basic can do it, and no knowlege of Wimp
programming is required.
All you need to do is create your own Basic program containing three functions.
These functions will be called by Yass 2 when necessary. The three functions
handle initialisation, running the saver, and tidying up.
First you need to pick a name for your saver module (the filename). In the
description below we are creating a saver module called 'Test' which will draw
random lines on the screen.
- Initialisation
During initialization you should do the following :
Clear the screen (calling PROCclearscreen(-1) )
Initialize your variables, and claim any memory you need.
Try to use as many LOCAL variables as tou can, and prefix your globals with
your modules name (eg. test_x%).
The initialization function should be given the name of your module followed by
'_start', for example 'FNtest_start' (note the 'test' is all in lower case).
Claiming memory should NOT use the DIM command. Instead you should call a
special function called FNmalloc which takes the number of bytes you require as
it's parameter, for esample "test_b% = FNmalloc(128)" will make test_b% point
to a block of memory 128 bytes long. FNmalloc returns zero if memory is not
available (very unlikely, but you should handle this situation (see below)).
The initialization function should return 0 if it managed to initialize
correcly. If it could not initialize correctly it should first deallocate any