Search found 501 matches

by jdebord
Apr 23, 2021 6:51
Forum: General
Topic: gmp 6.2.1 and mpfr 4.1.0
Replies: 52
Views: 34739

Re: gmp 6.2.1 and mpfr 4.1.0

According to mpfr-fb.bi : Constructor mpfr ( ) mpfr_init2(@num, mpfr_digits_precision * 3.33) mpfr_set_si(@num, 0, mpfr_rounding_mode) End Constructor Does this mean that the number of bits is equal to 3.33 times the number of digits (rounded, of course) E. g. for a standard double precision number ...
by jdebord
Apr 09, 2021 9:11
Forum: Game Dev
Topic: a roguelike game converted from cpp to FB
Replies: 17
Views: 4469

Re: need help coding a roguelike game

Richard Clark made a very good tutorial in FreeBASIC :

https://users.freebasic-portal.de/rdc/tutorials.html
by jdebord
Feb 09, 2021 10:40
Forum: General
Topic: Pentacles
Replies: 153
Views: 19338

Re: Pentacles

Nice demo :)

It seems that the variable k is not used.
by jdebord
Jul 03, 2020 5:56
Forum: Libraries & Headers
Topic: mpdecimal for Windows
Replies: 12
Views: 3677

Re: mpdecimal for Windows

Just downloaded. Not yet tested ...

The web site for mpdecimal is here:

http://www.bytereef.org/mpdecimal/index.html

EDIT. Tested now. The two demo programs work well. The DLL too, but the file name (libmpdec.so.2.5.0) cannot be modified.
by jdebord
Jun 30, 2020 6:08
Forum: General
Topic: Embedding a Spreadsheet
Replies: 35
Views: 7359

Re: Embedding a Spreadsheet

Unfortunately, all of the FB parsers I have come across have made the tacit assumption that the formula is going to return a number and that is arguments are going to be numbers. Not true for my problem domain. Actually, I don't think I've seen any that can have the argument of a function, be anoth...
by jdebord
Jun 27, 2020 6:30
Forum: General
Topic: Embedding a Spreadsheet
Replies: 35
Views: 7359

Re: Embedding a Spreadsheet

You may check SEE (Simple expression evaluator) by krcko :

http://www.unilim.fr/pages_perso/jean.d ... th/see.zip
by jdebord
Jun 18, 2020 7:19
Forum: Sources, Examples, Tips and Tricks
Topic: PHP-like associative arrays
Replies: 45
Views: 16938

Re: PHP-like associative arrays

This seems to work:

Code: Select all

for i as integer = 0 to 10
  array.Item(i) = i
  print array.Item(i) 
next i
by jdebord
Feb 10, 2020 7:47
Forum: Game Dev
Topic: Moving on random spline loops with near const speed !
Replies: 8
Views: 2207

Re: Moving on random spline loops with near const speed !

Works well with Windows 10 + FB 32 bits

Thanks for this nice demo !
by jdebord
Dec 30, 2019 9:54
Forum: Beginners
Topic: Playing non-file audio
Replies: 16
Views: 2457

Re: Playing non-file audio

If I understand correctly : The samples are stored in an array of signed 16-bit integers. The values are -32768 to 32767. There are 65536 possible values. The dynamic is 20*log(65536) ~ 96 dB For stereo the channels L = left and R = right are alterned : channel: L R L R ... L R index: 0 1 2 3 ... n-...
by jdebord
Dec 29, 2019 18:34
Forum: Beginners
Topic: Playing non-file audio
Replies: 16
Views: 2457

Re: Playing non-file audio

FBSound is here:

http://shiny3d.de/public/fbsound/fbsound-1.1.zip

See the sample program fbs_create_wave.bas in the `tests` subdirectory.
by jdebord
Dec 26, 2019 7:56
Forum: Libraries & Headers
Topic: FLTK-C-1.3.3 for FreeBASIC
Replies: 433
Views: 198102

Re: FLTK-C-1.3.3 for FreeBASIC

Hello D. J. Peters,

Did you make any progress with the new add-on:

https://freebasic.net/forum/viewtopic.p ... 65#p254486

This seemed to be very promising.
by jdebord
Oct 21, 2019 8:41
Forum: Libraries & Headers
Topic: FLTK-C-1.3.3 for FreeBASIC
Replies: 433
Views: 198102

Re: FLTK-C-1.3.3 for FreeBASIC

Another pixmap example. It may bring back some memories ... #include "fltk-c.bi" dim as zstring ptr croco_xpm(...) => {@"136 64 16 1", _ @"` c #373431", _ @". c #699ca9", _ @"# c #afa875", _ @"a c #47656a", _ @"b c #777146", _ @&q...
by jdebord
Oct 14, 2019 6:54
Forum: Libraries & Headers
Topic: FLTK-C-1.3.3 for FreeBASIC
Replies: 433
Views: 198102

Re: FLTK-C-1.3.3 for FreeBASIC

Nice picture :) I have saved it for my own programs.
by jdebord
Aug 31, 2019 8:35
Forum: Windows
Topic: DEF FN Not Working?
Replies: 2
Views: 4521

Re: DEF FN Not Working?

You can use a macro instead :

Code: Select all

#define fna(x) (4 * (x))
but don't forget the parentheses :)
by jdebord
Aug 12, 2019 7:18
Forum: Libraries & Headers
Topic: FLTK-C-1.3.3 for FreeBASIC
Replies: 433
Views: 198102

Re: FLTK-C-1.3.3 for FreeBASIC

An example using graphic functions (Draw...) and the "extended" window widget: #include "fltk-main.bi" function draw_text cdecl (self as any ptr) as long DrawSetColor FL_WHITE DrawRectFill 0, 0, 300, 300 DrawSetColor FL_BLUE DrawRectFill 10, 10, 130, 80 DrawRectFill 10, 110, 130,...