Re: [Ql-Users] Snowfall

2010-11-27 Thread Dilwyn Jones
Thanks - apart from reminding of my days of typing in ZX81 programs 
from magazine listings and then trying to save space (defining 
variables from text values, I seem to recall was one method) you 
have inspired me to fire up my copy of QL2K and try your listing 
out.  I had to use an editor to strip out the CR characters as you 
suggest and then QLAYT.EXE to link the file into my win1_ 
directory.


It mostly works until density% becomes 5 at which point it fails at 
line 310 with bad parameter, presumably because it is trying to 
do a RND(1 to 0).


Any suggestions?



Well spotted!

(snip)

Should work with changing that line to 310 IF RND(1 TO 6-density%)=1 
THEN
which should make sure it gives a snow density of 1 to 5, whichis 
what I'd intended.


Just tried it on QemuLator and that seems to work.

I suppose next step is to make the snow get plotted with OVER -1 so 
that the XOR effect could work over a background picture.


Just noticed as well how much QemuLator slows down while I'm typing 
this email - the snowfall has become, well, almost standstill snow!


Dare I say  that's snow good ;o)

Dilwyn Jones



___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Snowfall

2010-11-27 Thread Stephen Meech

On 27/11/2010 11:28, Dilwyn Jones wrote:

It mostly works until density% becomes 5 at which point it fails at
line 310 with bad parameter, presumably because it is trying to do a
RND(1 to 0).


Well spotted!



Should work with changing that line to 310 IF RND(1 TO 6-density%)=1 THEN
which should make sure it gives a snow density of 1 to 5, whichis what
I'd intended.


That's what I did - 5 seemed arbitrary anyway.


When I figure out how to copy it from QPC to QemuLator (floppy disk?) or
QL2K I'll test it in QDOS. Just goes to show the dangers of assuming
that because it ran OK on one computer doesn't mean it'll always run OK
on another!


I'm using QL2K.
--
Regards,

Stephen
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm