Documentation

Documentation

Here you will find the documentation of all functions implemented so far.
(Explanations come soon …)
Here is the work in progress: http://egsl.wdfiles.com/local--files/about/egsldocumentation.html

Screen functions

  • openwindow (x,y,b,caption)
  • closewindow()
  • clearscreen()
  • cls() [only Lua]
  • colour (r,g,b)
  • redraw()
  • backcolour (r,g,b)
  • togglefullscreen()
  • setcaption (caption)
  • resizewindow (width,height)

Graphics primitives functions

  • line (x1,y1,x2,y2)
  • dot (x,y)
  • circle (x,y,radius)
  • fillcircle (x,y,radius)
  • fillbox (x1,y1,x2,y2)
  • box (x1,y1,x2,y2)
  • ellipse (x,y,xradius,yradius)
  • fillellipse (x,y,xradius,yradius)
  • triangle (x1,y1,x2,y2,x3,y3)
  • filltriangle (x1,y1,x2,y2,x3,y3)

Image functions

  • loadimage (filename)
  • putimage (x,y,image)
  • drawimage (x,y,w,h,xscreen,yscreen,image)
  • copyimage (x,y,w,h,srcimage)
  • grabimage (x,y,w,h)
  • imagewidth (image)
  • imageheight (image)
  • saveimage (image,filename)
  • fliphorizontal (srcimage)
  • flipvertical (srcimage)
  • zoomimage (srcimage,x,y)
  • rotateimage (srcimage,angle,zoom)
  • colourkey (r,g,b)
  • nocolourkey()

Input functions

  • getkey()
  • inkey()
  • mousex()
  • mousey()
  • mouseb()
  • joystickplugged()
  • getjoyx()
  • getjoyy()
  • getjoybutton(button)
  • numberjoybuttons()
  • mousehide()
  • mouseshow()
  • mousezone (x1,y1,x2,y2)
  • keystate (key)

Text functions

  • text (x,y,text,font) [in Pascal: textout (x,y,text,font)]
  • drawtext (x,y,text)
  • loadfont (font,size)
  • input (x,y,length)
  • ttfinput (x,y,length,font,fontspacing,fontsize)

Sound/Music functions

  • loadsound (soundfile)
  • playsound (soundname,volume)
  • playmusic (musicfile,volume,loop)
  • loadmusic (musicfile)
  • pausemusic()
  • resumemusic()

Helper functions

  • wait (ms)
  • timeleft()
  • setframetimer (frames)
  • timerticks()
  • ostype()
  • boxcoll (x1,y1,w1,h1,x2,y2,w2,h2)
  • rnd()
  • int (number)
  • chr (code)
  • asc (char)
  • val (string)
  • left (string, pos)
  • right (string, pos)
  • mid (string, start, length)
  • insert (string1, string2, pos)
  • len (string)
  • time()
  • date()
  • uppercase (string)
  • lowercase (string)
  • arguments()

License (zlib)

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.