Author Topic: Basic FreeBASIC documentation? Please.  (Read 3961 times)

Tomaaz

  • Guest
Basic FreeBASIC documentation? Please.
« on: August 30, 2016, 05:10:43 PM »
Could you post here the basics of using Pulsar with FreeBASIC? Thanx!

EDIT I don't need anything complex. Just list all types and functions an i will try to compare it to EGSL documentation. I may guess something, as well. ;) FreeBASIC plus Pulsar finally works without problems on my new Linux installation and I would like it to give it a try.
« Last Edit: August 30, 2016, 05:28:40 PM by Tomaaz »

Tomaaz

  • Guest
Re: Basic FreeBASIC documentation? Please.
« Reply #1 on: August 30, 2016, 05:31:00 PM »
And please, reply to my message. If you don't have a time or don't want to waste your time for it, that's fine. I just want to know if there is a chance I'll learn something here in a not so distance future. ;)

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: Basic FreeBASIC documentation? Please.
« Reply #2 on: August 30, 2016, 05:51:45 PM »
So here is the complete list of functions. Just have a look into the source, I might have commented most functions ...  ;)

openwindow setactivewindow closeapplication wait color redraw circle clearwindow cls closewindow backcolor dot line getkey fillcircle mousex mousey mousebutton ellipse fillellipse loadimage hidemouse showmouse keystate timeleft setframetimer colorkey loadsound playsound drawtext mousezone loadmusic playmusic pausemusic resumemusic togglefullscreen spritewidth spriteheight nocolorkey timerticks joystickplugged getjoyx getjoyy getjoybutton numberjoybuttons setcaption triangle filltriangle boxcoll resizewindow freeimage windowwidth windowheight bmptext bmpinput bmpfont imagecoll circlecoll roundcoll sidecoll sync insidetriangle insiderectangle insidecircle drawtile tileset warpmouse bmpfontheight bmpfontwidth rectangle fillrectangle createsprite loadsprite freesprite drawsprite drawspritepart spritecolor setvirtualsize bmpfontsize bmpinputcolor bmpinputbackcolor textsize textwidth textheight textinputcolor textinputbackcolor messagebox setscalequality seticon fullscreen fademusic haltmusic freesound freemusic updateanimations createanimation drawanimation animationheight animationwidth framenumeber setanimationspeed setanimationloop haltanimation animationstopped circletoboxcoll linecoll createbmpfont bmpfontangle createparticles updateparticles setparticlesize setparticletype setparticleimage resetparticles texttype

Tomaaz

  • Guest
Re: Basic FreeBASIC documentation? Please.
« Reply #3 on: August 30, 2016, 06:16:20 PM »
Thanx! What about things like p2d.window, p2d.image, p2d.sprite...? Why to check a pressed key I need to use p2d.getkey() and not getkey(), while other functions doesn't require p2d (keystate)?
« Last Edit: August 30, 2016, 06:25:28 PM by Tomaaz »

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: Basic FreeBASIC documentation? Please.
« Reply #4 on: August 30, 2016, 06:36:17 PM »
That is because FBC has its own getkey function which can't be undefined - see the pulsar2d.bi (also valid for INPUT and Window). Sprite, image, font and anim can be used without p2d prefix, but I prefer the p2d for clarification.

Oh I forgot something: also to have a compatibility to the FreePascal implementation. There is no prefix but the types are p2dwindow, p2dsprite etc. So it's easier to port projects if someone wants to do that.
« Last Edit: August 31, 2016, 03:43:11 PM by Cybermonkey »

Tomaaz

  • Guest
Re: Basic FreeBASIC documentation? Please.
« Reply #5 on: August 30, 2016, 08:29:15 PM »
That makes sense. Thanx a lot! :)