Search found 7624 matches

by D.J.Peters
Mar 25, 2020 4:57
Forum: Game Dev
Topic: A simple miner program
Replies: 12
Views: 426

Re: A simple miner program

Here are how to mirror a right walk to left walk and create one image strip with right and left walk circles. (in case if MultiPut V2.0 are too much) http://shiny3d.de/public/fb/miner_rl.png NOTE: testfile "miner-walk-right.png" must be in the same folder ! Of course you can mirror any ima...
by D.J.Peters
Mar 24, 2020 14:37
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 70
Views: 19301

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

@tone may be libfbsound-64.so not loaded while any open reference ! try the ldd command Joshy joshy@UBUNTUx86-64:~$ cd fbsound-1.1/tests/ joshy@UBUNTUx86-64:~/fbsound-1.1/tests$ fbc on_the_fly.bas joshy@UBUNTUx86-64:~/fbsound-1.1/tests$ ldd on_the_fly linux-vdso.so.1 (0x00007ffec15a5000) lib...
by D.J.Peters
Mar 22, 2020 14:46
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 55
Views: 1422

Re: Parse string to tree structure

UEZ wrote:@Joshy: I get several em when trying to compile your code ...
That means your fbc compiler or include files are not uptodate !

Often FreeBASIC for Linux setup isn't complete !

Joshy
by D.J.Peters
Mar 22, 2020 14:40
Forum: Linux
Topic: Linux Framebuffer
Replies: 9
Views: 368

Re: Linux Framebuffer

@Roland007 try this ! Joshy dim as integer iWidth,iHeight,iBits screeninfo(iWidth,iHeight,iBits) print iWidth,iHeight,iBits if screenres(iWidth,iHeight,iBits) then print "error: screenres() !" beep: sleep: end 1 end if if iBits<15 then ' 8-bit palette For y As Integer = 0 To iHeight-1 For ...
by D.J.Peters
Mar 22, 2020 14:20
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 70
Views: 19301

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

@tone as a beginner put the file : "fbs_on_the_fly.bas" in the original/unchanged fbsound-1.1/tests folder (don't move any file to any other place don't change the #include line ...) cd fbsound-1.1/tests fbc fbs_on_the_fly.bas fbs_on_the_fly.exe (windows) ./fbs_on_the_fly (linux) this shou...
by D.J.Peters
Mar 22, 2020 14:08
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 55
Views: 1422

Re: Parse string to tree structure

I changed the output line to:
print space(iif(j<2,0,(j-1)*2)) & "+ " & splitted(j)

A single file j=0 or the first folder from path j=1 get the same priority in the output !

Joshy
by D.J.Peters
Mar 22, 2020 1:30
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 55
Views: 1422

Re: Parse string to tree structure

D.J.Peters wrote:@badidea yours does produce an runtime error here (compile with -exx)

d:\done>d:\FreeBASIC\fbc32 -exx user_FS.bas
d:\done>user_FS.exe
Aborting due to runtime error 4 (out of memory) at line 45 of user_FS.bas::ADDITEM()
by D.J.Peters
Mar 22, 2020 1:01
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 55
Views: 1422

Re: Parse string to tree structure

@badidea yours does produce an runtime error here (compile with -exx) why is the file: "/path3/itemC" two times in your virtual filesystem ? Check out how short=elegant SortFS () is :-) Joshy #include "crt.bi" function getDepth(path as string) as integer var c=0,n = instr(path,&q...
by D.J.Peters
Mar 21, 2020 22:41
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 55
Views: 1422

Re: Parse string to tree structure

badidea wrote:For my purpose, these to paths need to be merged.
I never sayed I made your homework !

You need only change the "sorting" code to your needs thats all.

Joshy
by D.J.Peters
Mar 21, 2020 22:13
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 55
Views: 1422

Re: Parse string to tree structure

You can use strtok() to split the path in folders and items ! Joshy #include "crt.bi" const MAX_FILES = 10 ' <--- change it if you like function getDepth(path as string) as integer var c=0,n = instr(path,"/") while n c+=1 n = instr(n+1,path,"/") wend return c end functi...
by D.J.Peters
Mar 21, 2020 21:05
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 70
Views: 19301

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

file: fbs_on_the_fly.bas ' ###################### ' # fbs_on_the_fly.bas # '###################### '#include "../inc/fbsound.bi" #include "../inc/fbsound_dynamic.bi" sub MyCallback(byval pSamples as FBS_SAMPLE ptr, _ byval nChannels as integer, _ byval nSamples as integer) const ...
by D.J.Peters
Mar 21, 2020 20:00
Forum: Linux
Topic: Linux Framebuffer
Replies: 9
Views: 368

Re: Linux Framebuffer

Tested on slackware (long time ago) If your linux boot's with the frame buffer device enabled (looks the same as a text mode but it's a gfx console often one penguin per core at top left) then no Xlib are loaded or running any desktop manager but i can use screenres and the frame buffer device is us...
by D.J.Peters
Mar 18, 2020 10:34
Forum: General
Topic: Squares
Replies: 7671
Views: 468984

Re: Squares

@angros47 i donloaded the one GB xml/text file. On a older PC with WIN 10 4GB VisualCode, Geany, FBIDE, MS Editor, FireFox all creasched while opening the file exept an Hex-Editor I'm in love with :-) Than I reboot in Linux the simple editor gEdit does the job perfect including syntax highlighting. ...
by D.J.Peters
Mar 17, 2020 2:50
Forum: Beginners
Topic: string * 99 bug
Replies: 2
Views: 180

Re: string * 99 bug

'------------------------------------------------------------------------ '' main '------------------------------------------------------------------------ Function main(byref URL as string) as uinteger dim as string strr="start_" & chr(0) & chr(0) & chr(0) & chr(0) & ...
by D.J.Peters
Mar 15, 2020 13:01
Forum: Community Discussion
Topic: Is there any gui designer for freebasic on linux?
Replies: 8
Views: 323

Re: Is there any gui designer for freebasic on linux?

If you miss it so much write one and share it with us ;-)

I prever FLTK-C not GTK or wxWidgets not because I wrote the wrapper for FreeBASIC instead I like the small size of the fltk-c library :-)

But it's up to you choosing the right GUI and create a nice designer for it.

Joshy

Go to advanced search