Search found 279 matches

by RayBritton
Nov 02, 2010 16:44
Forum: Beginners
Topic: SUB must be defined before main program?
Replies: 7
Views: 1491

You can write the functions or the functions prototype before the code, but yes, either of those must be both the function is called ie: declare function foo(bar as integer) as integer 'main code including call to foo function foo(bar as integer) as integer 'code end function or function foo(bar as ...
by RayBritton
Nov 02, 2010 16:40
Forum: Beginners
Topic: FUNCTIONS need a type to return?
Replies: 5
Views: 1557

There are two method types subs and functions, functions return a value, subs don't. Both accept parameters.

Code: Select all

declare sub MethodA(value as integer)
declare function MethodB(value as integer) as integer
I don't know what you mean by default data type.
by RayBritton
May 28, 2010 9:22
Forum: General
Topic: Detecting ALT Key and CAPS
Replies: 7
Views: 1860

Why not just use multikey?
by RayBritton
May 08, 2010 16:17
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

@rolliebollocks

I don't see why that's a problem, if I type \n in input nothing happens, so nothing should happen in this either. But thanks for the info.
by RayBritton
May 08, 2010 11:39
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

@Rens Sorry and thank you. This should be bug free: textbox.bi 'Draw string/inkey input type 'Ray Britton (C) 2010 'Released under X11/MIT License #include once "fbgfx.bi" type TextBoxType private: as string message 'the string that draw string draws as string prompt 'prompt to show an inp...
by RayBritton
May 08, 2010 11:37
Forum: Sources, Examples, Tips and Tricks
Topic: Chisock demo
Replies: 0
Views: 1470

Chisock demo

Since chisock is missing off ch0as' servers for the moment, I've uploaded a copy to here , and here's a demo program showing how to use it, if the examples included with chisock aren't enough, it isn't written that well, as it wasn't meant for others to read, but since it might be useful here it is,...
by RayBritton
May 04, 2010 22:23
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

Updated again, see last post please.
by RayBritton
Apr 23, 2010 9:22
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

@Rens

Ah of course the space, thank you, that was quite silly of me to forget.

I did like the cursor, I plan adding on that blinks, as a full block (chr(219)) instead of a underscore though.

It is rather odd that we both made one, but this type of function is needed.
by RayBritton
Apr 22, 2010 13:08
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

Removed, see last post.
by RayBritton
Apr 08, 2010 8:34
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

@joseywales It should work fine there. I think.
by RayBritton
Apr 07, 2010 15:26
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

Ah thank you, I was unsure of how to fix. Code updated.
by RayBritton
Apr 07, 2010 8:14
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

Removed, see last post.
by RayBritton
Apr 06, 2010 19:23
Forum: Sources, Examples, Tips and Tricks
Topic: Draw String Input Thing
Replies: 15
Views: 5782

Draw String Input Thing

Hey all No idea if this that useful, but here it is anyway: This 'object' uses draw string and inkey to give you a transparent input function that doesn't pause the program. If anyone tries this program you'll notice a limitation, the text box area can't go off the screen. The red line background is...
by RayBritton
Mar 13, 2010 12:13
Forum: Sources, Examples, Tips and Tricks
Topic: dynamic custom mouse cursor, using simple sprite
Replies: 10
Views: 3571

I'd do this: #include "fbgfx.bi" screen 19,32 dim as fb.image ptr mouse mouse=imagecreate(32,32) 'or whatever bload(mouse,"cursor.bmp") setmouse 400,300,0 dim as integer mx,my,mb do getmouse mx,my,,mb put (mx,my),mouse,trans loop until mb>0 and for animated #include "fbgfx.b...
by RayBritton
Feb 14, 2010 9:44
Forum: General
Topic: Is this file packing method a good idea?
Replies: 13
Views: 3877

Most modern games seem to do this way, just have a few very large files that contain all the media.

And most can be opened and examined within seconds, so they are likely just steams of data like cha0s said.