Search found 1390 matches

by badidea
Jun 03, 2019 19:31
Forum: General
Topic: Squares
Replies: 6746
Views: 384587

Re: Squares

Try 400 'compression' loops, and your compressed data looks like this: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
by badidea
Jun 02, 2019 20:15
Forum: Beginners
Topic: How to get and use a dictionary
Replies: 14
Views: 625

Re: How to get and use a dictionary

There are open source dictionaries which are used by e.g. Firefox.
E.g. this one: https://sourceforge.net/projects/wordli ... Dicts/6.0/
by badidea
Jun 01, 2019 21:07
Forum: Tips and Tricks
Topic: ConsRuler() helper Sub
Replies: 5
Views: 299

Re: ConsRuler() helper Sub

It doesn't work here on red hat Linux, the Fibonacci numbers don't line up with the ruler. Ok, then same thing here?: fibonacci 620 10 20 30 40 50 60 70 80 90 100 110 | | | | | | | | | | | ....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|....|...
by badidea
Jun 01, 2019 21:00
Forum: Beginners
Topic: How to get and use a dictionary
Replies: 14
Views: 625

Re: How to get and use a dictionary

For my tetris game (https://freebasic.net/forum/viewtopic.php?f=17&t=27438&start=75#p260233) I made something similar. Find (nearly) all freebasic keywords within the tetris grid (up/down, left/right) using "instr". Code without the game: Find all keywords within a string . I your ...
by badidea
Jun 01, 2019 19:53
Forum: Tips and Tricks
Topic: ConsRuler() helper Sub
Replies: 5
Views: 299

Re: ConsRuler() helper Sub

dodicat wrote:Pseudo correlation of Fibonacci and fb console.
Probably only windows.

I don't see the correlation between Fibonacci and the ruler (must be the beer affecting my brain), but it seems to work fine on Linux.
by badidea
May 31, 2019 22:15
Forum: General
Topic: Squares
Replies: 6746
Views: 384587

Re: Squares

Just for fun, a (non-square) color wheel const as integer NUM_COLORS = 6 * 256 dim as ulong colorWheel(NUM_COLORS - 1) dim as integer colorIndex = 0 for section as integer = 0 to 6 - 1 for intensity as integer = 0 to 256 - 1 select case section case 0: colorWheel(colorIndex) = rgb(255, intensity, 0)...
by badidea
May 30, 2019 15:35
Forum: Tips and Tricks
Topic: Simple Name-Generator
Replies: 6
Views: 359

Re: Simple Name-Generator

Mr. or Ms. Spr?
by badidea
May 27, 2019 22:13
Forum: General
Topic: Memory access ? (Solved on 64 bit distro)
Replies: 11
Views: 500

Re: Memory access ?

IMO I have 32 bit app compiled on 64 bit distro, by default. But why ? Are you sure you installed 64-bit FBC? I have both installed (for testing). Renamed them after installing to fbc32 & fbc64: badidea@laptop:~$ fbc32 --version FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built fo...
by badidea
May 27, 2019 17:09
Forum: General
Topic: Memory access ? (Solved on 64 bit distro)
Replies: 11
Views: 500

Re: Memory access ?

For the 'default' stuff that FBC needs, see: https://www.freebasic.net/wiki/wikka.ph ... Installing
by badidea
May 27, 2019 6:39
Forum: General
Topic: Change string to ordered index ?
Replies: 22
Views: 881

Re: Change string to ordered index ?

What do you mean with 17M? 17 Megabyte? That is close to nothing.
by badidea
May 26, 2019 22:24
Forum: General
Topic: Explicit contructor needed for string in UDT?
Replies: 3
Views: 237

Re: Explicit contructor needed for string in UDT?

fxm wrote:A var-len string is a pseudo-object which has its own (hidden) default constructor.

Which it needs for memory allocation I suppose?
I ran into this again today. A bit annoying.
Anyway, thanks for the explanation. I think I understand the issue :-)
by badidea
May 25, 2019 21:08
Forum: General
Topic: Change string to ordered index ?
Replies: 22
Views: 881

Re: Change string to ordered index ?

Something like this? type data_type dim as string text dim as integer count declare operator cast () as string end type operator data_type.cast () as string return str(count) + " x " + text end operator '------------------------------------------------------------------------------- type s...
by badidea
May 23, 2019 22:34
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 41
Views: 2538

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

I can post the sound, if you would like to experiment with it. I'll post the whole program eventually, but it isn't really a game yet... It isn't that impressive right now, and you can't even die yet. :p I can try something, but not in the next 16 hours (sleep and work first). I once started some c...
by badidea
May 23, 2019 21:58
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 41
Views: 2538

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

Some thoughts on the sound looping question... If the last sample value of the sound does not line up with the first sample value of the sound, I would expect some 'pop'. I was playing a bit with this in the ALSA topic: https://freebasic.net/forum/viewtopic.php?f=5&t=26821&hilit=alsa#p248912...
by badidea
May 23, 2019 21:30
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 41
Views: 2538

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

Sorry to be a pest, but I have another question. Is there an utility to determine if a sound is currently playing? I made this routine (after some advice somewhere in this topic): function my_fbs_Sound_playing(hSound as integer) as boolean dim as integer nLoops fbs_Get_SoundLoops(hSound, @nLoops) i...

Go to advanced search