Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Convienience Functions

Author
Message
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 17th Oct 2005 19:33 Edited at: 24th Oct 2005 04:50
I made a few functions to make certain tedious commands to write out a little easier. I will take suggestions for new commands from anyone who feels like it would be nice to not have to write out the same thing over and over.

Here are the commands:

rndcol()-
replace rgb(rnd(255) , rnd(255) , rnd(255)) with rndcol()

rndcolbox(left , top , right , bottom)-
replace box left , top , right , bottom , rgb(rnd(255) , rnd(255) , rnd(255)) , rgb(rnd(255) , rnd(255) , rnd(255)) , rgb(rnd(255) , rnd(255) , rnd(255)) , rgb(rnd(255) , rnd(255) , rnd(255)) with rndcolbox(left , top , right , bottom)

imagesprite(image$ , imagenum , spritenum , x , y)-
replace
load image image$ , imagenum
sprite spritenum , x , y , imagenum
with
imagesprite(image$ , imagenum , spritenum , x , y)

bgimage(image$ , imagenum , x , y)-
replace
load image image$ , imagenum
paste image imagenum , x , y
with
bgimage(image$ , imagenum , x , y)

fillcirc(x , y , rad)-
replace
for cir = 0 to rad
circle x , y , cir
next cir
with
fillcirc(x , y , rad)

Again I will be accepting suggestions to add to the list.

[Edit]No more download. Decided it was stupid to have to download functions so putting them in code boxes.



Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 22nd Oct 2005 16:35
Hmmm, well even though I see where you're coming from, it still kinda takes the fun outta programming, try something like a distance function, I hate always having to type out stuff like sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2) lol, its annoying


NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 23rd Oct 2005 05:49
atanfull() does not return a value between 0 and 360, but a value between -180 and +180. Therefore, below is a function to get an angle between points, which is between 0 and 360.





+NanoBrain+
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 24th Oct 2005 04:48
I like that NanoBrain. Wow it took a while for some replies but I'm glad to see some people actually posted after all. Maybe we can get some more ideas.

NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 27th Oct 2005 18:55
Antidote,

Sven B accually showed me a more effecient way to return a positive value from atanfull().





+NanoBrain+

Login to post a reply

Server time is: 2024-11-26 05:09:19
Your offset time is: 2024-11-26 05:09:19