Search found 5916 matches

by dodicat
Oct 22, 2019 21:16
Forum: General
Topic: Squares
Replies: 7043
Views: 427533

Re: Squares

They are certainly all different, coming from the same kind of template.
#44 is quite nice.
I'll look up some of my old ones, most stuff needs updated slightly now for the current compiler.
I have a bad filing system, they are all over the place.
by dodicat
Oct 22, 2019 19:43
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

I suppose with pointers the logic goes: If you have UDT pointer fields then obviously you want to use these pointers for some task. If then you then save an array of these udts, with the pointer fields loaded with addresses (4 bits or 8 bits), then, upon opening the file at some time, these pointers...
by dodicat
Oct 22, 2019 19:10
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

So long as you remember that on retrieving any file udt data (using enum) you must use integer<32> ~ long. The file can be written using either the 32 or 64 bit compiler (i.e. 32 or 64 bit enums), and retrieved by either the 32 or 64 bit compiler. I meant to say that enum is a convenient way of crea...
by dodicat
Oct 22, 2019 18:30
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

Surely an enum is only a shortcut to integer<32> constants, giving then names. Saving to file and retrieving from file requires only to remember a 32 bit variable is used for a particular udt field. Save to file. Enum Shapes circle = 1 square triangle End Enum Type Block As Shapes Shape End Type dim...
by dodicat
Oct 22, 2019 12:28
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

Thanks fxm. But with the constructor in place, I get the answer with This.Shape = rhs. I didn't think you would have to use clng(rhs). I don't understand your sentence: the compiler declared with one parameter (already called "conversion constructor") applies the good implicit conversion b...
by dodicat
Oct 22, 2019 12:09
Forum: Beginners
Topic: Calculating intersection points
Replies: 8
Views: 256

Re: Calculating intersection points

For fun. The grey triangle lies in 3D space. The ray goes towards the mouse (whose z value is 500 into the screen), from it's start position. If it intersects the triangle the intersection points are shown, otherwise is is a miss. Note I have shown the miss ray even although it might be behind the t...
by dodicat
Oct 22, 2019 11:11
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

D.J.Peters. Slight typo, your constants should be of type eshapes. Others. Am I missing something here? Why are you using constructors? Surely if .shape is a long, it takes on the values of 1, 2 or 3, and that is it, writing to a file or not. Enum Shapes Circle = 1 square triangle End Enum Type Bloc...
by dodicat
Oct 21, 2019 18:37
Forum: Beginners
Topic: Calculating intersection points
Replies: 8
Views: 256

Re: Calculating intersection points

Here is a 2D line intersection method (co-ordinate geometry). Type Pt As Double x,y End Type Type Line As Pt s,f declare sub draw(col as ulong) End Type sub line.draw(col as ulong) ..draw string(s.x,s.y),"("+str(s.x)+" , "+str(s.y)+")" ..draw string(f.x,f.y),"(&quo...
by dodicat
Oct 20, 2019 14:22
Forum: General
Topic: GCC compile delay on large projects?
Replies: 7
Views: 409

Re: GCC compile delay on large projects?

You really will notice a long compile time with gcc if you have a large data section. That is DATA 1,2,3,78 , ... (maybe 10000 + elements, say loading a bitmap via it's colours). If the data is in an include file it takes ages to load and compile. Here is a tester. Use a bitmap of about 800 X 600, 3...
by dodicat
Oct 19, 2019 20:18
Forum: Tips and Tricks
Topic: Quick run tool - Windows
Replies: 20
Views: 1163

Re: Quick run tool - Windows

Thanks TT. Taskbar at the top, I never thought of that. I believe it can be at either side also? Line 60 (ish) SetWindowPos(consoleWindow,0,100,100,0,0,SWP_NOSIZE or SWP_NOZORDER ) should keep it clear. I have noted your suggestions. I could have a drop list of compiler options to choose from (fbedi...
by dodicat
Oct 19, 2019 19:42
Forum: Documentation
Topic: RGB and RGBA
Replies: 5
Views: 131

Re: RGB and RGBA

jj2007. I am using double to capture a 32 bit colour instead of ulong. if I use double for a loop variable also and pick ulong/double at random then double still has the edge (small) here with 32 bits, ulong has the edge (small) with 64 bits. screen 20,32 dim as integer w,h screeninfo w,h dim as dou...
by dodicat
Oct 19, 2019 18:49
Forum: Documentation
Topic: RGB and RGBA
Replies: 5
Views: 131

Re: RGB and RGBA

For me here using double is faster than ulong (By about 5% to 10%). Tested 32/64 gas (32) /gcc with optimisations or not. So is double (on both 32/64) a feasible alternative to ulong for a colour? And also, if I use double for the loop variable e.g. for x as double=0 to w-1 for y as double=0 to h-1 ...
by dodicat
Oct 19, 2019 17:42
Forum: General
Topic: Squares
Replies: 7043
Views: 427533

Re: Squares

Thanks Albert. Get back to it sometime, maybe after Brexit. We are all entranced here in Scotland watching the English parliament in action- every day. I daresay so is Wales and Ireland, N. and S. and maybe half of Europe. Your doodle looks like the Nautilus, forever out there roaming the ocean, min...
by dodicat
Oct 15, 2019 22:40
Forum: General
Topic: Squares
Replies: 7043
Views: 427533

Re: Squares

Albert. Getting away from compression for a bit, I have the same problem with fbide on Linux, only graphics code will [quick] run from the ide. fbedit has exactly the same problem.(all in wine). To get a console just wine cmd You can navigate around the file system (Linux and all). But Linux files w...
by dodicat
Oct 14, 2019 22:25
Forum: General
Topic: Squares
Replies: 7043
Views: 427533

Re: Squares

Albert. I installed wine in Linux. I didn't use fbide but my little quickrunner as posted last week. It runs OK with fbc.exe (the windows distro), but not with fbc (The Linux distro). Seems I cannot run Linux executable files from within wine. If I try say ./somefile from within wine cmd I get a pil...

Go to advanced search