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

Tomaaz

  • Guest
Basic FreeBASIC documentation? Please.
« on: 30. August 2016, 19:10:43 »
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: 30. August 2016, 19:28:40 by Tomaaz »

Tomaaz

  • Guest
Re: Basic FreeBASIC documentation? Please.
« Reply #1 on: 30. August 2016, 19:31:00 »
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
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: Basic FreeBASIC documentation? Please.
« Reply #2 on: 30. August 2016, 19:51:45 »
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
Best regards,
Cybermonkey

Tomaaz

  • Guest
Re: Basic FreeBASIC documentation? Please.
« Reply #3 on: 30. August 2016, 20:16:20 »
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: 30. August 2016, 20:25:28 by Tomaaz »

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: Basic FreeBASIC documentation? Please.
« Reply #4 on: 30. August 2016, 20:36:17 »
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: 31. August 2016, 17:43:11 by Cybermonkey »
Best regards,
Cybermonkey

Tomaaz

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