***What it is Svgalib-Gpc is a set of units to access Svgalib routines from GNU Pascal programs and units. The development environment provided Svgalib 1.4.1, and the units probably wouldn't work with previous versions. ***How to use it First of all copy or move the units (*.pas) to a directory where you usually store your units, for example ~/units, and then remember to tell gpc about it, with the option --unit-path=$HOME/units, of course changing the path as appropriate. Then you just have to include the appropriate units in your programs, using the `uses' keyword. ***Contents of the units - vga.pas Everything which is located in vga.h has been translated into this unit. Some functions related to input devices support (like vga_getch() or vga_waitevent()) have been omitted on purpose. This is because input devices support (as far as keyboard and mouse) has been written using TFDDs (see gpc.pas from the gpc distribution) and placed in other units. Also, C function names have been slightly changed. See the example (which should be enough to explain): int vga_setmode(int mode); function VgaSetMode(mode: Integer) : Integer; - vgagl.pas No particular notes. - vganormalkeyboard.pas This unit is made to handle the keyboard in normal mode. It provides some useful functions: KeyboardInit: this is used to initialize the keyboard to be used in normal mode. For raw mode you should use vgarawkeyboard.pas instead. KeyboardClose: this closes the keyboard file (keyboard is treated as a file). AnyKeyPressed: this function returns a boolean value which tells if any of the key has been pressed. KeyPressed: this function returns a boolean value which tells if the key given as argument has been pressed. WaitKey: This read a character from the keyboard file: if the character is not there ready to be read, the function waits for it. After that the function returns the key pressed and flushes the file. GetKey: It's like Svgalib vga_getkey() but it's been rewritten using TFDD capabilities. KeyboardFile: This is a text variable useful if you want to select(2) on the Keyboard file and other files contemporarily. Under GNU-Pascal you must use IOSelect. - vgarawkeyboard.pas This is quite the same as vganormalkeyboard.pas, except that "Raw" is prepended to each function name. For example KeyPressed becomes RawKeyPressed. - vgajoystick.pas No particular notes. - vgamouse.pas MouseInit: Opens the mouse file and assigns related functions (with AssignTFDD) MouseClose: Close the mouse file. MouseMoved: Tells if the mouse is moved. Mousefile: It's a text variable, that is the mouse file. It's useful for using select(2) on the mouse file and other files (and maybe the keyboard file?). ***Aknowledgements Special thanks go to Frank Heckenbach who helped out with the TFDD stuff and to Peter Gerwinski who gave me the account on this server. 20020404: If any of you found any bug or have suggestions, please don't tell me because I don't care. I no longer work on these units. Nicola Girardi, nicola@gnu.de