Post your favorite SUBs here!
Posted: Sat Sep 03, 2005 1:04 pm
The best, fastest, and most useful will be put into PQBC's latest project, ECLIPSE.
Discuss QBasic, Freebasic, QB64 and more
http://petesqbsite.com/phpBB3/
Code: Select all
DIM SHARED RCol%, GCol%, BCol%
SCREEN 13
SUB PutRGB(col%)
OUT &H3C8, col%
OUT &H3C9, RCol%
OUT &H3C9, GCol%
OUT &H3C9, BCol%
END SUB
SUB GetRGB(col%)
OUT &H3C7, col%
RCol% = INP(&H3C9)
GCol% = INP(&H3C9)
BCol% = INP(&H3C9)
END SUB
Code: Select all
Function MathDistance (x1 as double, y1 as double, x2 as double, y2 as double) as double
Return Sqr( ( x1 - x2 ) ^ 2 + ( y1 - y2 ) ^ 2 )
End function
lolDrV wrote:6" ham on wheat with pickles and black pepper.
(Sorry, couldn't resist )
Sorry for not being more specific. It needs to be:Rattrapmax6 wrote:Should be SUBs and FUNCTIONs.... And is this QB or FB or both? Cause I have mountians of FB SUBs and FUNCTIONs I put into code,.. or at least I think,.. but half are probaly useless w/o the code,...
.scr or .exe? or both? In any case I have a cool 3D one made in FB (FBSVR.scr), and I'm sure Mitth will let you have some of his he has made, which are also cool,... I'll ask him,..PQBC wrote: GRAPHICS PEOPLE I need screen savers! Any and all are allowed, but if they are in FB, they need to be pre-compiled.
Looking for people to do your work for you, eh?PQBC wrote:The best, fastest, and most useful will be put into PQBC's latest project, ECLIPSE.
Code: Select all
function intmax(a as integer, b as integer) as integer
if a >= b then
intmax = a
else
intmax = b
end if
end function
function intmin(a as integer, b as integer) as integer
if a >= b then
intmin = b
else
intmin = a
end if
end function
sub plotchar(char as integer, x as integer, y as integer, colr as integer)
def seg = &HB800
poke (y * 80 + x) * 2, char '' might have these swapped - mind fuzzy - can't remember :)
poke (y * 80 + x) * 2 + 1, colr
end sub
of course! I don't have any ideas. If I did, I could probably make SUBs/FUNCTIONs, but this is quicker and less strain on my little brain.Nekrophidius wrote:Looking for people to do your work for you, eh?PQBC wrote:The best, fastest, and most useful will be put into PQBC's latest project, ECLIPSE.