Search found 6120 matches

by dodicat
Jan 26, 2020 22:52
Forum: Windows
Topic: Windows graphics tutorial
Replies: 73
Views: 2166

Re: Windows graphics tutorial

I tried your spheres in GDI. better to use -O3 optimisation. edit:made the window fixed size with blue frame. #include "windows.bi" #define cdXSize 640 '//cdYSize*1.6 #define cdYSize 400 #define cdColFondo 0 #define MAIN_ICON 100 ' // IDI_APPLICATION #define cdVCursor IDC_ARROW #define cdV...
by dodicat
Jan 26, 2020 21:58
Forum: Projects
Topic: Rebus generator
Replies: 10
Views: 452

Re: Rebus generator

It's a big job to take on.
Thank you for reconstructing my nomdyploom.
by dodicat
Jan 26, 2020 21:49
Forum: Windows
Topic: Windows graphics tutorial
Replies: 73
Views: 2166

Re: Windows graphics tutorial

Not the code of course, I translated your template thing from tiny c to fb. (Not a difficult task I know) But the music link (YouTube). Maybe I am too old for that fast music. Anything you can't whistle is not music to my ear. I prefer the sixties stuff. https://www.freebasic.net/forum/viewtopic.php...
by dodicat
Jan 26, 2020 21:12
Forum: Tips and Tricks
Topic: Some Variations of a Binary Fractal Tree
Replies: 16
Views: 519

Re: Some Variations of a Binary Fractal Tree

I tried this tree by hurtado by winapi GDI shapes. It is a bit slower of course. #include "windows.bi" Const xres=800 Const yres=600 Const c1 = 27 Const c2 =6 Const c3 =3 Dim Shared As Ubyte mColores(0 To 19) Dim Shared As Ulong miColor(2 To 10) Declare Function WndProc(As HWND,As UINT, As...
by dodicat
Jan 26, 2020 14:06
Forum: Windows
Topic: Windows graphics tutorial
Replies: 73
Views: 2166

Re: Windows graphics tutorial

Cairo is desperately slow to replace direct pixel drawing with anti aliased lines.
hurtado.
I have no complaints whatsoever about your graphics, in fact they are very nice, but that music must be hard to play, for it is hard to listen to.
by dodicat
Jan 26, 2020 13:47
Forum: General
Topic: Squares
Replies: 7633
Views: 457166

Re: Squares

If this is any help, look at the strings and v2,v3 and v4. Using your method of looping. function cremainder(mods() As long,remainders() As long) As longint dim as longint max=1 for n as long=lbound(mods) to ubound(mods) max*=mods(n) next dim as long b,c,d dim as long s(lbound(mods) to ubound(mods))...
by dodicat
Jan 26, 2020 13:16
Forum: General
Topic: Squares
Replies: 7633
Views: 457166

Re: Squares

Hi Albert. I see that you add 1 (then 2 in your last post) i.e. in compress_loop v2 = ( v1 mod 2 ) + 1 I have used a select case in the decompress_loop to test for values of n1 which are missed if the 1 is not added.(in the case ELSE) This might help in debugging. The 2,3,11 gives value (in theory) ...
by dodicat
Jan 25, 2020 14:40
Forum: Tips and Tricks
Topic: Some Variations of a Binary Fractal Tree
Replies: 16
Views: 519

Re: Some Variations of a Binary Fractal Tree

Yea hurtado, I know that integer plods through 0 to 255 in four loops for rgba(r,g,b,a) just as well as ulong. But as you have seen integer is actually longint in 64 bits. So, depending on how you use colours (via pointers e.t.c.), strange aberrations can occur flipping between the 64 and 32 bit com...
by dodicat
Jan 25, 2020 13:02
Forum: Tips and Tricks
Topic: Some Variations of a Binary Fractal Tree
Replies: 16
Views: 519

Re: Some Variations of a Binary Fractal Tree

Nice hurtado. Using 32 bit colour ulong (or double) will hold all values in fb 32 bit or fb 64 bit. I avoid using Integer or uinteger for 32 bit colours. basiccoder2 You can adjust the colour for the second BresLine, which seems mainly the trunk. for example: if i>2 then c=rgb(cast(ubyte ptr,@c)[2]+...
by dodicat
Jan 23, 2020 19:51
Forum: Tips and Tricks
Topic: Some Variations of a Binary Fractal Tree
Replies: 16
Views: 519

Re: Some Variations of a Binary Fractal Tree

paul doe . . . (being both Greenpeace members) . . . my respect. Here is my variation screenres 900,700,32 color ,rgb(150,150,150) cls type point as long x,y as ulong col end type type angle as single cosa,sina declare sub set(as single) end type sub angle.set(a as single) cosa=cos(a) sina=sin(a) en...
by dodicat
Jan 23, 2020 12:49
Forum: Tips and Tricks
Topic: Heapsort, up/down, integer, with Tagged array
Replies: 5
Views: 300

Re: Heapsort, up/down, integer, with Tagged array

hi dafhi. Originally ppf wanted to sort data a few columns at a time from a datasheet. This would equate to sorting udt's by chosen fields, thus the dot. I agree, normally you might want to swap the whole udt, for example 3D positions by the .z field. I can easily add another choice in the macro. #m...
by dodicat
Jan 21, 2020 17:24
Forum: Game Dev
Topic: war ship sim [ opengl ]
Replies: 2
Views: 264

Re: war ship sim [ opengl ]

If I comment out:
'camara.use
in the loop I see a pinkish chequered floor, but no ships.
by dodicat
Jan 19, 2020 18:25
Forum: Beginners
Topic: SQLite seek and recordset
Replies: 9
Views: 437

Re: SQLite seek and recordset

FreeBASIC runs fine on Win XP. Whether or not certain WinApi functions still work on XP can be googled for or simply tested out. I daresay the kernell dll's change dramatically for each new version of windows. But in the main I can run fb programs on XP, although I don't use XP much now myself (but ...
by dodicat
Jan 18, 2020 16:01
Forum: Projects
Topic: prime numbers searcher in QB
Replies: 9
Views: 3080

Re: prime numbers searcher in QB

Integer. Your c++ code takes 73 seconds here: Started! to:2000000 2000003 Wall time passed: 73 s. Press any key to continue . . . Your translation to fb takes about 45 seconds. I used Dev c++, g++ from Mingw wouldn't compile it. I had to add #include <stdlib.h> #define _int64 long long #define nullp...
by dodicat
Jan 17, 2020 12:17
Forum: Beginners
Topic: Key inkey getkey
Replies: 21
Views: 496

Re: Key inkey getkey

ivory348 Many of the examples in the help files need #lang "fblite" or #lang "deprecated" added at the top to compile. (Just that they haven't been updated) The latest compiler (default #lang "fb" which need not to be written) will not compile if you use chr$, left$, in...

Go to advanced search