[REBOL] =?iso-8859-1?Q?Re:_The_OldsKool_Demo_:-)?=
From: s::jeudy::libertysurf::fr at: 19-Sep-2003 14:44
Yo all,
Thanks for ALL your feedbacks :)
@Anton:
Thank you very much for your optimizations! :)
That was exactly what I would like to optimize ;)
So, a new archive of the "OldsKool Demo" has been uploaded at :
http://reboleur.free.fr/OldsKool/OldsKool.zip
(including these optimizations + correction of 'merge (effects) for the new View Beta...).
Regards,
Sébastien 'Jedi' Jeudy.
http://reboleur.free.fr
---------- Initial Header -----------
>From : [rebol-bounce--rebol--com]
To : <[rebol-list--rebol--com]>
Cc :
Date : Fri, 19 Sep 2003 15:03:08 +1000
Subject : [REBOL] Re: The OldsKool Demo :-)
Very nice!
Now for some optimizations :)
; scroll1
;c1: load %c1.bmp c2: load %c2.bmp c3: ...
;cars1: [ " " c1 "A" c2 "B" c3 "C" c4 "D" c5 ...
Instead of using the system above, try this:
cars1: " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,:!?+-*/()"
bmps: copy []
repeat n length? cars1 [append bmps load join %c [n ".bmp"]]
And later on:
; scroll1
;for n1 1 nb-car-ecran1 1 [ ; Use repeat instead of for.
repeat n1 nb-car-ecran1 [ ; Less code and a little faster.
pos1: n1
either pos1 < (nb-car-ecran1 - pos-scroll1) [
;car1: select cars1 to-string " "
car1: if find cars1 " " [select bmps index? find cars1 " "]
] [ pos1: pos-scroll1 + n1 - nb-car-ecran1
;car1: select cars1 to-string scroll1/:pos1
car1: if find cars1 scroll1/:pos1 [pick bmps index? find cars1
scroll1/:pos1]
]
You could also save all your bitmaps in one file, then
you can load them all at once into bmps.
save %bmps1.r bmps
bmps: reduce load %bmps1.r
Anton.
--
Sébastien Jeudy
Annuaire Amiga Francophone - http://annuaire.amiga.free.fr
Annuaire Pegasos Francophone - http://annuaire.pegasos.free.fr
********** L'ADSL A 20 EUR/MOIS**********
Avec Tiscali, l'ADSL est à 20 EUR/mois. Vous pourrez chercher longtemps avant de trouver
moins cher !