home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1992-09-28 | 2.0 KB | 63 lines |
- >MkSolid
- auxillary library file for "MakeSpGen"
- creates "rotating buckets"
- (lots of "same" words ie highly optimisable)
- *********************************************************************
- These are constants
- _Define_Constants
- i, r%, g%, b%
- B Usage$ = "[-Side <r>] [-NSpoke <n>] [-Colours <rrGGbb:...>]"
- & Param$ = "Side,NSpoke/e,Colours"
- E Side = 0.6 :
- (0, 1) of each square
- K NSpoke = 3 :
- positive integer, number of
- ' Colours$ = "ffFFff:ddBB22:228833"
- Col%(255/7)
- *********************************************************************
- " Parse the command line
- _Params(b%)
- getr(Side, b%!0)
- geti(NSpoke, b%!4)
- getz(Colours$, b%!8)
- _Read_Colours(Colours$, Col%(), NSpoke)
- *********************************************************************
- ! The mode has been set
- _Define_Palette
- 19, &0, 16, &00, &00, &00 :
- palette
- 19, &1, 16, &00, &ff, &00
- 19, &2, 16, &ee, &00, &00
- 19, &3, 16, &ff, &bb, &44
- 19, &4, 16, &ee, &ee, &00
- 19, &5, 16, &bb, &88, &55
- 19, &6, 16, &aa, &44, &bb
- 19, &7, 16, &44, &ff, &00
- 19, &8, 16, &66, &dd, &ff
- 19, &9, 16, &44, &33, &bb
- 19, &a, 16, &77, &77, &77
- 19, &b, 16, &bb, &ff, &dd
- 19, &c, 16, &11, &11, &dd
- 19, &d, 16, &ff, &99, &44
- 19, &e, 16, &ff, &ff, &ff
- 19, &f, 16, &ee, &ee, &ee
- *********************************************************************
- f = (0, 1]
- 6. xc, yc = OS co-ordinates of center
- _Draw_Frame(f, xc, yc)
- f2, r, s, x, y, t, dx, dy
- spoke%
- r = RMax * Side
- s = RMax - r
- spoke%= 0
- NSpoke-1
- >9
- "ColourTrans_SetGCOL", Col%(spoke%),,, &100, 0
- ?- x = xc + r*
- *(f + spoke%/NSpoke))
- @- y = yc + r*
- *(f + spoke%/NSpoke))
- A0
- x-s+0.5, y-s+0.5, s*2+0.5, s*2+0.5
- spoke%
-