04-03-2006, 04:40 PM
Well I decided to release this today. It's a small library used to make those wheels of mine. I added a new function to the Line wheel drawing. You can space them out now!
It's only been tested on Windows. I would imagine it's not hard to compile the source on Linux (Can someone try?) seeing as it's all done in FBGFXLIB2.
Download Pritchard's Function Library.rar(55kb): Pritchard's Function Library.rar
Download Pritchard's Function Library.zip(60kb): Pritchard's Function Library.zip
Here's a code example:
Read the Help.txt for more information.
It's only been tested on Windows. I would imagine it's not hard to compile the source on Linux (Can someone try?) seeing as it's all done in FBGFXLIB2.
Download Pritchard's Function Library.rar(55kb): Pritchard's Function Library.rar
Download Pritchard's Function Library.zip(60kb): Pritchard's Function Library.zip
Here's a code example:
Code:
defint a-z
#Include "Pritch_Functions.bi"
randomize timer
screen 19, 24, 2
dim workpage
dim image as ubyte ptr 'Image pointer :D
image = imagecreate(12,12)
bload "image.bmp", image
workpage = 0
dim test_num as double
test_num = 2^56
dim speed = 3 ' The speed of rotation
dim rotation as single ' The degree of rotation
dim lines as single ' So i can boost the values by less than 1
dim lines_2 as integer ' Since numbers are rounded down, lines_2 = lines is just what we want
do
lines += .04
lines_2 = lines ' Remember transferring a single to an integer!
rotation += speed 'Increase the degree of rotation by speed
if rotation > 359 then rotation = 0
if rotation < 0 then rotation = 359 ' Just in case you use rotation -= speed
Line (0, 0)-(799, 599), rgb(255, 255, 255), bf
Wheel_Line(162, 180, 200, lines_2, 20, 5, rotation, rgb(rnd * 255, rnd * 255, rnd * 255))
Wheel_Pset(600, 205, 200, lines_2, 5, rotation, rgb(rnd * 255, rnd * 255, rnd * 255))
Wheel_Image(image, 162, 420, 200, lines_2, 80, rotation)
Wheel_Alpha(image, 200, 600, 420, 200, lines_2, 80, rotation)
Locate 1, 1: Print "SNO_PRINT test:": SNO_PRINT(test_num)
workpage = workpage xor 1
screensync
screenset workpage, workpage xor 1
loop until multikey(&h01)
Read the Help.txt for more information.
will Live Forever, or Die Trying >_<;;