Beta version (203 routines, 5700 lines of code)
 +-+     +-+                      +-+
 |  \    | |  +------+   +----+   | |         +-------+  +----+
 | + \   | |  |+-----+  +      +  | |         +--+ +--+  |+--\ \
 | |\ \  | |  ||        | +--+ |  | |            | |     |+--/ /
 | | \ \ | |  |+--+     | |  | |  | |            | |     |   ++
 | |  \ \| |  |+--+     | |  | |  | |            | |     |   ++
 | |   \ + |  ||        | +--+ |  | |            | |     |+--\ \
 | |    \  |  |+-----+  +      +  | +------+  +--+ +--+  |+--/ /
 +-+     +-+  +------+   +----+   +--------+  +-------+  +----+   v1.6
          THE BIGGEST PURE-QB MODE 13h OPEN SOURCE LIBRARY FOR QB EVER


                                     ==========================================
                                                                    NeoLib v1.6
                                                         By Neo Deus Ex Machina
                                                    (C) HAR-SoftWare, 2003-2004
                                                 http://www.harsoftware.cjb.net
                                     ==========================================
                                             Official Library of the QuickBasic
                                                      Caliber Programming Compo
                                                           Summer & Autumn 2003
                                     ==========================================
CAUTION! To read this document well, use Notepad, with WORDWRAP ENABLED! And,
adjust the window so that the following line fits exactly in the window!:
0123456789012345678901234567890123456789012345678901234567890123456789012345678#

################################################################################
# 1. CONTENTS ##################################################################
################################################################################
1. CONTENTS
2. WHAT'S NEW IN THIS VERSION?
3. DISCLAIMER
4. FACTS ABOUT NeoLib
5. CREDITS
6. ROUTINE REFERENCE LIST
7. INTRODUCTION
8. INSTALLING NeoLib
9. NeoLib CONCEPTS
10. STARTING NeoLib
11. ROUTINE REFERENCE
12. OPEN SOURCE REMARKS
13. NeoLib EDITORS
14. PROGRAMMER'S WARNING!
15. BUG REPORT
16. FINAL NOTES

################################################################################
# 2. WHAT'S NEW IN THIS VERSION? ###############################################
################################################################################
This version 1.6 has fully been tested on several machines on different speeds,
resulting in great compatibility on presumably all computers with different
operating systems and hardware. Furthermore, this is the first version in which
the library is near completion! Enjoy!

################################################################################
# 3. DISCLAIMER ################################################################
################################################################################
You are not allowed to copy any of the source code, accompanying distributed
files, and program executables for own use, without permission of the author and
all contributors. However, if you legally use this library, credit still is to
be given in some part of your program. (Please ;)  ). Also, the author is not
responsible for any damage caused by the usage of this library and/or 
accompanying files. Blablablablablabla. And hereby I hope that you enjoy using 
this library!

################################################################################
# 4. FACTS ABOUT NeoLib ########################################################
################################################################################
Here following some facts about NeoLib itself.
NeoLib is PureQB (!!!) and is therefore one of the fastest libraries on the
world, existing for QuickBasic. NeoLib counts an extraordinarily large number of
usable and useful routines, all easy to understand and easy to use. NeoLib is
currently only usable in QuickBasic 4.5. Some functions require specific data to
be inserted, and since NeoLib is out for speed in the code, there is no error
checking for erroneous data. Only one person, Neo, coded the entire library.
The library was created for Adigun Azikiwe Polacks QuickBasic Caliber
Programming Compo Summer & Autumn 2003, for Customized Category #3.

At the moment, NeoLib contains 203 routines! (Which is equal to 5700 lines of
code).

################################################################################
# 5. CREDITS ###################################################################
################################################################################
Competition Manager:
- Adigun Azikiwe Polack
Coder:
- Neo Deus Ex Machina
Betatesters:
- The Oracle
- akOOma
- TurboFX
- Dav
- elcalen
- Nekrophidius
- Dr_Davenstein
- Plasma
- and everyone else whom I forgot, who will be added on notice :)
Greets to:
- Adigun Azikiwe Polack
- The Oracle
- Zack
- akOOma
- Agravein
- Fro Moe
- muratelic
- wildcard
- FlingMaster
- Marcade
- Plasma (357)
- relsoft
- L_O_J
- TheBigBasicQ
- Nekrophidius
- Rhiannon
- Hexadecimal Disaster
- Jocke The Beast
- Piptol
- Josiah
- Dav
- TurboFX
- ScrapYard
- aetherFox
- BlueKeyboard
- Mofu
- WizardLife
- Na_Th_An
- Toonski
- Vance
- Jark
- Antoni Gual
- Toshi
- Sumo Jo
- Zap
- Webberboy
- Blitz
- Radioman
- Joakim
- The Glenn
- Hard Rock
- Lithium
- Sterling Christensen
- Agamemnus
- Ninkazu
- Megaman
- Moneo
- Mango
- Meg
- Mech
- Lachie Dazdarian
- and anyone else I forgot...
Resources:
- Ralf Brown's Interrupt and Ports List
- Angelo Mottela's DirectQB
- Bobby's CosmoX
- Relsoft's RelLib
- AAP's Game Pad Library
- Plasma's CDROM Code
- FFix from Dav's Code Post
- OverLoad Library
- My own massive amount of knowledge ;)

################################################################################
# 6. ROUTINE REFERENCE LIST ####################################################
################################################################################
Main Module (4 routines)
- neoInit FUNCTION
- neoClose SUB
- neoFFix SUB
- neoVSync SUB
EMS Module (15 routines)
- neoEMSalloc FUNCTION
- neoEMSexist FUNCTION
- neoEMSfreeHandles FUNCTION
- neoEMSfreePages FUNCTION
- neoEMSgetErrorMsg FUNCTION
- neoEMSisError FUNCTION
- neoEMSpageFrame FUNCTION
- neoEMStotalPages FUNCTION
- neoEMSversion FUNCTION
- neoEMSdealloc SUB
- neoEMSexchange SUB
- neoEMSmap SUB
- neoEMSmapX SUB
- neoEMSmove SUB
- neoEMSrealloc SUB
EMS Layer Module (16 routines)
- neoLayerCreate FUNCTION
- neoLayerFreeLayers FUNCTION
- neoLayerGetHandle FUNCTION
- neoLayerClear SUB
- neoLayerCopy SUB
- neoLayerCopyBlend SUB
- neoLayerCopyColor SUB
- neoLayerCopyForward SUB
- neoLayerCopyTrans SUB
- neoLayerExchange SUB
- neoLayerFilter SUB
- neoLayerLighting SUB
- neoLayerLoad SUB
- neoLayerMirror SUB
- neoLayerRemove SUB
- neoLayerSave SUB
Drawing Primitives Module (17 routines)
- neoDrawPoint FUNCTION
- neoDrawBox SUB
- neoDrawBoxF SUB
- neoDrawBoxTrans SUB
- neoDrawCircle SUB
- neoDrawCircleF SUB
- neoDrawEllipse SUB
- neoDrawEllipseF SUB
- neoDrawHLine SUB
- neoDrawInitLayers SUB
- neoDrawLine SUB
- neoDrawLineGouraud SUB
- neoDrawPixel SUB
- neoDrawPolygon SUB
- neoDrawPolygonGouraud SUB
- neoDrawSetClipBox SUB
- neoDrawVLine SUB
Palette Module (30 routines)
- neoPalGetRelativeCol FUNCTION
- neoPalSearch FUNCTION
- neoPalSearchIn FUNCTION
- neoPalExtractFromBMP SUB
- neoPalFadeIn SUB
- neoPalFadePalX SUB
- neoPalFadePalStepX SUB
- neoPalFadeStepIn SUB
- neoPalFadeStepTo SUB
- neoPalFadeStepX SUB
- neoPalFadeTo SUB
- neoPalFadeX SUB
- neoPalGet SUB
- neoPalGetCol SUB
- neoPalGradient SUB
- neoPalGrey SUB
- neoPalLoad SUB
- neoPalLoadPP256Pal SUB
- neoPalNegative SUB
- neoPalOff SUB
- neoPalOldSkool SUB
- neoPalRotateFull SUB
- neoPalRotatePart SUB
- neoPalSave SUB
- neoPalSavePP256Pal SUB
- neoPalSet SUB
- neoPalSetCol SUB
- neoPalStringGetCol SUB
- neoPalStringOff SUB
- neoPalStringSetCol SUB
Keyboard Module (10 routines)
- neoKeybInkeyScan FUNCTION
- neoKeybGetLeds SUB
- neoKeybGetShift SUB
- neoKeybGetShiftEnhanced SUB
- neoKeybOn SUB
- neoKeybOff SUB
- neoKeybSetKey SUB
- neoKeybSetLeds SUB
- neoKeybSetSpeed SUB
- neoKeybWaitKey SUB
Mouse Module (13 routines)
- neoMouseGetButtons FUNCTION
- neoMouseInit FUNCTION
- neoMouseLB FUNCTION
- neoMouseMB FUNCTION
- neoMouseRB FUNCTION
- neoMouseX FUNCTION
- neoMouseY FUNCTION
- neoMouseHide SUB
- neoMouseSetPos SUB
- neoMouseSetRange SUB
- neoMouseSetSensitivity SUB
- neoMouseSetShape SUB
- neoMouseShow SUB
CDROM Module (24 routines)
- neoCdromChanged FUNCTION
- neoCdromDriveExist FUNCTION
- neoCdromGetDriveLetters FUNCTION
- neoCdromGetErrorMsg FUNCTION
- neoCdromGetVersion FUNCTION
- neoCdromHeadPosition FUNCTION
- neoCdromInit FUNCTION
- neoCdromIsError FUNCTION
- neoCdromRB2HSG FUNCTION
- neoCdromSize FUNCTION
- neoCdromClose SUB
- neoCdromDiskInfo SUB
- neoCdromGetInfo SUB
- neoCdromHSG2RB SUB
- neoCdromLock SUB
- neoCdromOpen SUB
- neoCdromPlay SUB
- neoCdromPlayRaw SUB
- neoCdromRead SUB
- neoCdromResume SUB
- neoCdromStop SUB
- neoCdromTrackInfo SUB
- neoCdromUnlock SUB
- neoCdromWrite SUB
VXMS Module (9 routines)
- neoVXMSalloc FUNCTION
- neoVXMSfree FUNCTION
- neoVXMSinit FUNCTION
- neoVXMSdealloc SUB
- neoVXMSexchange SUB
- neoVXMSmove SUB
- neoVXMSread SUB
- neoVXMSrealloc SUB
- neoVXMSwrite SUB
Sprite Module (17 routines)
- neoSpriteCollide FUNCTION
- neoSpriteCollideOnLayer FUNCTION
- neoSpriteSize FUNCTION
- neoSpriteConvert SUB
- neoSpriteGet SUB
- neoSpriteInitLayers SUB
- neoSpriteLighting SUB
- neoSpriteMirror SUB
- neoSpritePut SUB
- neoSpritePutBit SUB
- neoSpritePutBlend SUB
- neoSpritePutColor SUB
- neoSpritePutForward SUB
- neoSpritePutRotate SUB
- neoSpritePutTrans SUB
- neoSpriteScale SUB
- neoSpriteSetClipBox SUB
Long FileName Module (11 routines)
- neoLFNgetCurrDir FUNCTION
- neoLFNgetFileSystem FUNCTION
- neoLFNgetFullPath FUNCTION
- neoLFNgetShortPath FUNCTION
- neoLFNshortFileName FUNCTION
- neoLFNchangeDir SUB
- neoLFNdeleteFile SUB
- neoLFNmakeDir SUB
- neoLFNrenameDir SUB
- neoLFNrenameFile SUB
- neoLFNremoveDir SUB
DOS Module (15 routines)
- neoDOSgetCurrentDir FUNCTION
- neoDOSgetCurrentDrive FUNCTION
- neoDOSgetCurrentEXE FUNCTION
- neoDOSgetFileAttributes FUNCTION
- neoDOSgetFullPath FUNCTION
- neoDOSgetOpenedDateTime FUNCTION
- neoDOSgetTime FUNCTION
- neoDOSisDir FUNCTION
- neoDOSisFile FUNCTION
- neoDOSsearchDir FUNCTION
- neoDOSsearchFile FUNCTION
- neoDOSdisableDrive SUB
- neoDOSenableDrive SUB
- neoDOSsearchFileThrough SUB
- neoDOSsetFileAttributes SUB
Font Module (14 routines)
- neoFontLen FUNCTION
- neoFontOpen FUNCTION
- neoFontClose SUB
- neoFontInitLayers SUB
- neoFontPrint SUB
- neoFontPrintB SUB
- neoFontPrintG SUB
- neoFontPrintN SUB
- neoFontPrintS SUB
- neoFontPrintSB SUB
- neoFontPrintSN SUB
- neoFontPrintT SUB
- neoFontSetClipBox SUB
- neoFontSetTexture SUB
Image Module (5 routines)
- neoImageLoadArrayBMP SUB
- neoImageLoadBMP SUB
- neoImageLoadPP256Put SUB
- neoImageSaveArrayBMP SUB
- neoImageSaveBMP SUB
Joystick Module (3 routines)
- neoJoyDetected FUNCTION
- neoJoyButton SUB
- neoJoyXY SUB
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
TOTAL AMOUNT OF ROUTINES: 203
TOTAL AMOUNT OF LINES: 5700
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

################################################################################
# 7. INTRODUCTION ##############################################################
################################################################################
What is NeoLib?
===============
NeoLib is a library made in QB, for QB. Officially, version 1.6 has been made
for Adiguns QuickBasic Caliber Programming Compo Summer & Autumn 2003. NeoLib
covers Mode 13h (320x200x256) graphics mode, and some external devices. Also, I
think Mode 7h (320x?x256) or VESA/SVGA can be made accessible in future
versions. What it all is about you can view here in this manual. ;*)

System Requirements
===================
For the Library in general, you need at least a 386 computer to run. The further
system requirements are determined by which modules you wish to use. If you wish
to use EMS, Layers, Drawing or Sprite Routines in your programs, you need to
activate EMS in Windows or DOS. To do this, follow the next text.

Windows 95, Windows 98, DOS, or similar
---------------------------------------
Make sure the following lines are in the Config.sys file on the root of your OS
(usually C:\).
DOS=HIGH,UMB
DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE RAM
If you wish, you can add the amount of kB EMS you want available to DOS. Do this
between EMM386.EXE and RAM. So if you want 10 MB of free EMS available to
DOS, replace the third line above by this one:
DEVICE=C:\WINDOWS\EMM386.EXE 10000 RAM
Now the EMS should work, under Windows and DOS.

Windows NT, Windows 2000, Windows XP, or similar
------------------------------------------------
Look up a Config.nt file in your Windows folder. It usually is in
C:\WINDOWS\SYSTEM32. Now, add the following line to it:
EMM=RAM
If you also have a line in which it says: FILES=40, then change 40 to 60.

If it still doesnt work
------------------------
Try deactivating some unused devices in BIOS, especially the USB Keyboard and
USB Mouse support if you dont have either of these.
If you get an error with an errormessage in which theyre talking about a D-
switch, modify the line as follows (only Win95, Win98, DOS!):
DEVICE=C:\WINDOWS\EMM386.EXE RAM D=64

################################################################################
# 8. INSTALLING NeoLib #########################################################
################################################################################
First, make sure you have:
- neoCDROM.obj
- neoDOS.obj
- neoDRAW.obj
- neoEMS.obj
- neoFONT.obj
- neoIMAGE.obj
- neoJOY.obj
- neoKEYB.obj
- neoLAYER.obj
- neoLFN.obj
- neoMOUSE.obj
- neoPAL.obj
- neoSPRT.obj
- neoVXMS.obj
In a directory called Obj. Furthermore:
- neoCDROM.bi
- neoDOS.bi
- neoDRAW.bi
- neoEMS.bi
- neoFONT.bi
- neoIMAGE.bi
- neoJOY.bi
- neoKEYB.bi
- neoLAYER.bi
- neoLFN.bi
- neoMOUSE.bi
- neoPAL.bi
- neoSPRT.bi
- neoVXMS.bi
In a directory called Include. Then you need to have a directory called Exe.
And a directory called 'Source'. If youve verified you have all files, run
MANAGER.EXE in the main folder. Here, you need to choose which modules you want
to use and which one you dont want to use. If you dont choose a module here,
you cant use the routines which comes with the module in your program. Choose
wisely and never choose more than you need, because QB loads the library
directly into memory, leaving you with less memory space. If youre done
choosing the modules, select Build Library and the library will automatically
be built for you. Now the files:
- neoLib.lib
- neoLib.qlb
- neoLib.bi
Have been made and are in the NeoLib root directory.
NOTE: You need STANDARD.FNT from the Font Directory if you want to use fonts.

If you are using the QB IDE
---------------------------
Copy these three files to your QB folder, then start QB by typing:
qb /L neoLib
Which will then start up with neoLib. Then, in QB, type the following:
$INCLUDE: neoLib.bi
To include the neoLib include file, which is needed for the function
declarations, constants and types. You are now ready to use NeoLib. Be sure to
read the NeoLib Concepts, a little further in this document.

If you are using the MED IDE
----------------------------
Follow the previously described steps until you have to start up QB. Now, start
up MED, and to use the NeoLib library, insert the following lines in your
program:
$INCLUDE: neoLib.bi
$LIB: neoLib.lib
Now, dont forget to read the NeoLib Concepts, a little further ahead in the
document.
NOTE: you dont need the neoLib.qlb file if you are working in the MED IDE.

################################################################################
# 9. NeoLib CONCEPTS ###########################################################
################################################################################
Layer System
------------
NeoLib is able to access EMS Memory for use for storage of data. However, it is
also possible to create video buffers, a.k.a. layers in EMS. Use neoLayerCreate
to create layers. One layer is 65536 kB big and this is one video buffer. In
NeoLib you can specify an EMS layer by its number. The number of the EMS layers
start with 1 (one). So the first four layers you created have the numbers 1, 2,
3, and 4. The number 0 (zero) is the screen. Here's a small example on how to
use layers (note that I don't use any functions from the MAIN module here!):
'********************************************************
'all integers for speed
DEFINT A-Z

'include the neoLib include file
'$INCLUDE: 'neolib.bi'

'set up the required screen mode
SCREEN 13

'create 2 EMS layers and store the error code in Result
Result = neoLayerCreate(2)

'check for error
IF Result = 0 THEN
	PRINT "Error occured!"
	END	'exit
END IF

'initialize the layers for drawing
neoDrawInitLayers

'clear both layers
neoLayerClear 1, 0
neoLayerClear 2, 0

'draw some lines on the first layer
neoDrawLine 1, 100, 200, 100, 150, 5
neoDrawLine 1, 0, 0, 319, 199, 1

'copy the first layer to the second
neoLayerCopy 1, 2

'clear the first layer
neoLayerClear 1, 0

'copy the second layer to screen (the VIDEO constant is defined as zero)
neoLayerCopy 2, VIDEO
'now you should see 2 lines on the screen

'wait for a keypress
neoKeybWaitKey

'now copy the first layer to screen
neoLayerCopy 1, VIDEO
'now you should see everything black again (because layer 1 was cleared)

'wait for keypress
neoKeybWaitKey

'remove the layers out of memory
neoLayerRemove

'exit
END
'************************************************************

Clipbox System
--------------
An extra feature in the some modules is the Clipbox. The clipbox is a screen
region that specifies where can be drawn and where can't be drawn. Everything in
the box will be drawn, but everything outside the box will not be draw by the
draw routines. Use neoDrawSetClipBox to set the clipbox onto the specified
parameters. Note that by calling neoDrawInitLayers the EMS layers are
initialized and the clipbox is set to (0,0)-(319,199), which covers the whole
screen. This means that every draw command only draws what is within the box of
(0,0)-(319,199). If the box was at (100,100)-(150,150) only the pixels in that
box would have been drawn.
The following modules currently have their own clipbox:
- Draw Module:  -> neoDrawInitLayers to initialize the layers for drawing
                -> neoDrawSetClipBox to set the clipbox for drawing
- Sprite Module:-> neoSpriteInitLayers to initialize the layers for sprites
                -> neoSpriteSetClipBox to set the clipbox for sprites
- Font Module:  -> neoFontInitLayers to initialize the layers for fonts
                -> neoFontSetClipBox to set the clipbox for fonts
The reason that I didn't create one clipbox for all modules is that lots of nice
effects can be created by using different clipboxes for different modules! Try
some!

String Palettes
---------------
In NeoLib I use 768-byte string palettes for storage of palettes. So every
stringpalette you get from, or put in, NeoLib will be a 768-byte string palette.
Do NOT dim your strings as fixed-length, else the palette routines will not
work. Just declare them as string. The format of a 768-byte string palette is as
follows:
- Offset 0: Red (0-63)
- Offset 1: Green (0-63)
- Offset 2: Blue (0-63)
And that 256 times, because there are 256 colors usable. So indeed 3*256=768.
The point is that you can just use these 768-byte strings as if it were a self-
defined palette type, for use with NeoLib.

Virtual XMS System
------------------
NeoLib contains a Virtual XMS system. Because I never really got 'real' XMS
working in Pure-QB, I included a Virtual XMS module, which can emulate XMS real
fast. Just use the Virtual XMS as if it were real XMS. Allocate a Virtual XMS
region by calling neoVXMSalloc, and deallocate it with neoVXMSdealloc. After
allocation, you can use e.g. neoVXMSmove, neoVXMSread, neoVXMSwrite, etc, to
respectively move bytes in VXMS, read bytes from VXMS, or write bytes to VXMS.
Note that a VXMS region is specified by its handle, which neoVXMSalloc returned.
Keep this handle for doing VXMS operations, and for deallocating the VXMS. After
deallocating, the handle is invalid.

Blending
--------
NeoLib contains functions which you can blend stuff with. They're scattered all
over the library, but you can recognise them by 'Blend', a post-fix 'B' or a
'Trans' in the name. Blending is mixing colours together. E.g. there is a
routine called 'neoDrawBoxTrans'. When you want to draw a red box with this
routine on a green background, a yellow box will be drawn. Furthermore, there
are two ways to blend, namely Negative and Positive Blend. Suppose you have two
colours, Grey (32,32,32) and Dark Red (32,0,0). When using Positive Blending,
the blended colour will be Pink-like (63,32,32). But when using Negative
Blending, the blended colour will be Dark Cyan (0,32,32). It's up to you to
decide which Blending Function you need, either Negative or Positive but keep in
mind that Positive Blending adds two colours together and Negative Blending
subtracts colours from eachother. For the rest, it's just experimenting with
NeoLib's Blending routines! 

Font File Format
----------------
The NeoLib Font Module uses external files as Fonts. These files must have a
size of 2048 bytes and I will explain the format now. First, we'll have to look
at the format of a character. The characters 8x8 pixels, one bit per pixel. So
an 'A' would be the following:
00011000 = &H18
00111100 = &H3C
00111100 = &H3C
01100110 = &H66
01111110 = &H7E
01100110 = &H66
01100110 = &H66
00000000 = &H00
Note that the right column and the last row should be completely 0, or your text
may seem to 'stick' together (the spacing is gone).
Anyway, when you've determined all bit values of the character, these bit values
are sequentially written to file, the first row first. Since there are 256
characters and 8 byte per character, there are 2048 bytes needed. The format of
each character 8-byte structure is also stored sequentially in the file,
starting at character 0, ending with character 255. So the first byte of the
file is the first row of character 0. The last byte is the last row of character
255. With this knowledge, you should be able to make yourself a Font File.

################################################################################
# 10. STARTING NeoLib ##########################################################
################################################################################
In this chapter, the concepts of initializing and closing down NeoLib are
explained.

NOTE: I ADVICE YOU TO MAKE USE OF THE MAIN MODULE, AS THIS IS THE EASIEST WAY OF
      STARTING AND CLOSING NEOLIB. ALSO IT IS MUCH MORE EFFICIENT.

Using the MAIN Module
---------------------
First of all, there is the MAIN Module. It contains a.o. the following routines:
- neoInit
- neoClose
These routines are for initializing and closing down NeoLib. neoInit is called
with a parameter that indicates the amount of EMS layers you want to start with.
neoClose is called without any parameter. This is the simplest way of starting
up NeoLib so that you can use it.

NOTE: neoFFix is NOT automatically installed when calling neoInit.
NOTE: The default font in NeoLib is NULL (no font). You can specify a font by
      using the neoFontOpen and neoFontClose routines.

Not using the MAIN Module
-------------------------
If you're not using the Main Module, I should really advice you to use it.
However, if you really don't want to use it, here's how to start up NeoLib with-
out the MAIN Module. (In the following piece of text all modules are described.
If you don't plan to use one of these, leave the code belonging to that module).

===========
STARTING UP
===========
a. First of all, you initialize the Layer Module. You can do that by calling the
   following code:
   *****************
   Result% = neoLayerCreate(n%)
   'check for correct result here
   *****************
   You have to code the error trapping for Result%, and specify n% => How many
   layers you want to create.
NOTE: make sure the amount of free layers is enough! Use neoLayerFreeLayers or
      neoEMSfreePages (divide by 4).

b. Then you initialize the Draw Module, using this:
   *****************
   neoDrawInitLayers
   *****************

c. Then you initialize the Sprite Module, using this:
   *****************
   neoSpriteInitLayers
   *****************

d. Then you initialize the Keyboard Module, using this:
   *****************
   neoKeybOn
   OUT &H60, &HF3
   FOR I = 0 TO 249: NEXT I
   OUT &H60, 0
   *****************

e. Then you initialize the Font Module, using this:
   *****************
   neoFontInitLayers
   *****************

f. Load mode 13h:
   *****************
   SCREEN 13
   *****************

g. Then you load your own Font for use with the Font Module:
   *****************
   YOURFONTHANDLE% = neoFontOpen("YOURFONT.FNT")
   *****************
   Be sure to keep the YOURFONTHANDLE%, because it is necessary to draw text.

h. Call the Float Fix if you wish:
   *****************
   neoFFix
   *****************

============
CLOSING DOWN
============
i. Unload the Float Fix if you wish:
   *****************
   neoFFix
   *****************
   NOTE: The first call to neoFFix installs the FFix, the second call unloads it
         again. The third installs, the fourth unloads, etc, etc.

j. Unload you own Font used for the Font Module:
   *****************
   neoFontClose YOURFONTHANDLE%
   *****************

k. Unload the layers you in the Layer Module:
   *****************
   neoLayerRemove
   *****************

l. Re-Initialize the Draw Module
   *****************
   neoDrawInitLayers
   neoDrawSetClipBox 0, 0, 0, 0
   *****************

m. Re-initialize the Font Module
   *****************
   neoFontInitLayers
   neoFontSetClipBox 0, 0, 0, 0
   *****************

n. Re-initialize the Sprite Module
   *****************
   neoSpriteInitLayers
   neoSpriteSetClipBox 0, 0, 0, 0
   *****************

o. Return to Mode 3h (text mode):
   *****************
   SCREEN 0
   WIDTH 80, 25
   *****************

Starting and closing NeoLib with modules that aren't affected by MAIN Module
----------------------------------------------------------------------------
Some modules you need to initialize yourself however, which are:
- CDROM Module
- DOS Module*
- EMS Module**
- FONT Module
- IMAGE Module*
- JOY Module
- LFN Module*
- MOUSE Module
- PAL Module*
- VXMS Module

*: These modules don't need initialization
**: Is initialized by MAIN, but not for user. If you want to use EMS for own
    purposes, initialization is required.

CDROM Module
------------
Start up with:
   - neoCdromInit%
   - neoCdromDriveExist%
   - neoCdromGetDriveLetters$
   - neoCdromGetVersion$
Close down with:
   No specific closing down routines. Be sure that all audio tracks have stopped
   playing (use neoCdromStop).

EMS Module
----------
Start up with:
   - neoEMSexist%
   - neoEMSalloc%
Close down with:
   - neoEMSdealloc
NOTE: Keep the handle!

FONT Module
-----------
Only needs extra loading of Font:
Start up with:
   - neoFontInitLayers
   - neoFontOpen
Close down with:
   - neoFontClose

JOY Module
----------
Start up with:
   - neoJoyDetected%
Close down with:
   No specific closing down routines.

MOUSE Module
------------
Start up with:
   - neoMouseInit%
   - neoMouseShow
Close down with:
   - neoMouseHide

VXMS Module
-----------
Start up with:
   - neoVXMSinit%
   - neoVXMSalloc%
Close down with:
   - neoVXMSdealloc
NOTE: Keep the handle!

################################################################################
# 11. ROUTINE REFERENCE ########################################################
################################################################################
================================================================================
Main Module ====================================================================
================================================================================
--------------------------------------------------------------------------------
neoInit FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoInit% (Layers AS INTEGER)

Arguments:
- Layers: the amount of EMS layers you want to start NeoLib with

Returns:
-  0: NeoLib initialization failed
- -1: NeoLib initialization successful

Description:
This function is the Main function of NeoLib. With this function, NeoLib is
initialized as well as all dependant modules. This routine initializes the
EMS Layer Module, Draw Module, Font Module, Sprite Module and the Keyboard
Module. It is recommended that you call this function in the beginning of your
program. Close down with neoClose.

See also:
neoClose

--------------------------------------------------------------------------------
neoClose SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoClose ()

Arguments:
None

Description:
Call this routine when you're done with NeoLib. All layers and other used
memory by NeoLib will be removed.

See also:
neoInit

--------------------------------------------------------------------------------
neoFFix SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFFix ()

Arguments:
None

Description:
This routine installs the Floating Point Fix to speed up floating point
calculations in QB 4.5. Speed of the floating point calculations will be
increased drastically. (50% to 300%). Note that the first call to this routine
installs the FFix, and the second call removes the FFix again. In general, when
the FFix has been installed this routine removes the FFix, else it installs the
FFix.

--------------------------------------------------------------------------------
neoVSync SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVSync (Times AS INTEGER)

Arguments:
- Amount of vertical retraces to await

Description:
This routine waits for a number of vertical retraces (1/60 second).

================================================================================
EMS Module =====================================================================
================================================================================
--------------------------------------------------------------------------------
neoEMSalloc FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSalloc% (NoPages AS INTEGER)

Arguments:
- NoPages: the number of pages you want to allocate (1 page = 16 kB)

Returns:
The EMS handle, for use with the EMS region you allocated.

Description:
This function allocates a specified number of pages in EMS. Each pages is equal
to 16384 bytes, 16 kB. This function does not check if therere enough EMS pages
left. Do this by calling neoEMSfreePages.

See also:
neoEMSdealloc, neoEMSrealloc

--------------------------------------------------------------------------------
neoEMSexist FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSexist% ()

Arguments:
None

Returns:
-  0: EMS does not exist on this machine or cannot be used
- -1: EMS exists and can be used

Description:
This function checks if there is EMS on the machine and if it can be used. It
then returns 0 or 1. (True or False).

--------------------------------------------------------------------------------
neoEMSfreeHandles FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSfreeHandles% ()

Arguments:
None

Returns:
The number of free EMS handles

Description:
This function returns the number of free EMS handles left for you to use.

See also:
neoEMSfreePages

--------------------------------------------------------------------------------
neoEMSfreePages FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSfreePages% ()

Arguments:
None

Returns:
The number of free EMS pages

Description:
The function returns the number of free EMS pages you can allocate using
neoEMSalloc.

See also:
neoEMSfreeHandles

--------------------------------------------------------------------------------
neoEMSgetErrorMsg FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSgetErrorMsg$ ()

Arguments:
None

Returns:
The error message describing the last EMS error that occured.

Description:
This function returns the description of the last EMS error that occured. Use
neoEMSisError to determine if an error had occured.

See also:
neoEMSisError

--------------------------------------------------------------------------------
neoEMSisError FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSisError% ()

Arguments:
None

Returns:
-1 or 0 (true or false), whether an EMS error had occured.

Description:
This function returns whether an EMS error had occured. Be sure to check this
function often to know sure the EMS operations went ok. Use neoEMSgetErrorMsg to
retrieve the message describing the error.

See also:
neoEMSgetErrorMsg

--------------------------------------------------------------------------------
neoEMSpageFrame FUNCTION
--------------------------------------------------------------------------------
Prototypes:
DECLARE FUNCTION neoEMSpageFrame% ()

Arguments:
None

Returns:
The segment of the memory in which the EMS pageframe is located.

Description:
This function returns the location of the EMS pageframe. All mapped pages, using
neoEMSmap or neoEMSmapX will be mapped in this pageframe. You can then directly
Poke into the pageframe to change data if you wish.

See also:
neoEMSmap, neoEMSmapX

--------------------------------------------------------------------------------
neoEMStotalPages FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMStotalPages% ()

Arguments:
None

Returns:
The total amount of pages available in the system.

Description:
This function returns the total amount of pages available to the system, or to
the VDM if youre running WinNT/2000/XP. Multiply this value by 16 to get the
total amount of kbytes.

See also:
neoEMSfreePages

--------------------------------------------------------------------------------
neoEMSversion FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoEMSversion$ ()

Arguments:
None

Returns:
A string containing the EMS version.

Description:
This function returns a string containing the EMS version in Major.Minor format.

--------------------------------------------------------------------------------
neoEMSdealloc SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoEMSdealloc (Handle AS INTEGER)

Arguments:
- Handle: the EMS handle of the EMS region you want to deallocate

Description:
This sub deallocates a memory region, previously allocated by neoEMSalloc.

See also:
neoEMSalloc, neoEMSrealloc

--------------------------------------------------------------------------------
neoEMSexchange SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoEMSexchange (SrcHandle AS INTEGER, SrcSegmentOrPage AS INTEGER,
                            SrcOffset AS INTEGER, DstHandle AS INTEGER,
                            DstSegmentOrPage AS INTEGER, DstOffset AS INTEGER,
                            DataLength AS LONG)

Arguments:
- SrcHandle: the source memory handle, use the EMS handle if the source is EMS,
             use 0 here if the source is conventional memory
- SrcSegmentOrPage: if the source is conventional memory, fill in the segment 
             here. If the source is EMS, fill in the EMS page number here
- SrcOffset: the offset within the EMS page or within the segment
- DstHandle: the destination memory handle, use an EMS handle if the destination
             is EMS, use 0 if the destination is conventional memory
- DstSegmentOrPage: if the destination is conventional memory, fill in the 
                    segment here. If the destination is EMS, fill in the
                    destination page here
- DstOffset: the offset within the EMS page or segment
- DataLength: amount of bytes to swap from source to destination and vice versa

Description:
This routine swaps the contents of two memory regions.

See also:
neoEMSmove

--------------------------------------------------------------------------------
neoEMSmap SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoEMSmap (LogicalPage AS INTEGER, PhysicalPage AS INTEGER,
                       Handle AS INTEGER)

Arguments:
- LogicalPage: the EMS page number to map into the EMS pageframe
- PhysicalPage: the pageframe page number, can be 0-3
- Handle: the EMS handle to retrieve the EMS page from

Description:
This routine maps an EMS page into the EMS pageframe.

See also:
neoEMSmapX

--------------------------------------------------------------------------------
neoEMSmapX SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoEMSmapX (LogicalOffset AS INTEGER, PhysicalOffset AS INTEGER,
                        NoPages AS INTEGER, Handle AS INTEGER)

Arguments:
- LogicalOffset: the EMS page to start mapping with
- PhysicalOffset: the EMS pageframe page to start mapping in
- NoPages: the number of EMS pages to map into the pageframe (0-3)
- Handle: the EMS handle to retrieve the EMS pages from

Description:
This routine maps an X amount of pages into the EMS pageframe.

See also:
neoEMSmap

--------------------------------------------------------------------------------
neoEMSmove SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoEMSmove (SrcHandle AS INTEGER, SrcSegmentOrPage AS INTEGER,
                        SrcOffset AS INTEGER, DstHandle AS INTEGER,
                        DstSegmentOrPage AS INTEGER, DstOffset AS INTEGER,
                        DataLength AS LONG)

Arguments:
- SrcHandle: the source memory handle, use 0 if conventional memory, or the EMS
             handle if the source is EMS
- SrcSegmentOrPage: if the source memory type is EMS, use the EMS page here,
                    else use the segment
- SrcOffset: the offset within an EMS page or within a segment
- DstHandle: the destination memory handle, use 0 if conventional memory, or the
             EMS handle if the destination is EMS
- DstSegmentOrPage: the destination EMS page or segment
- DstOffset: the offset within an EMS page or within a segment
- DataLength: the number of bytes to copy from source to destination

Description:
This routine copies (not moves) the contents of a specified memory region to
another.

See also:
neoEMSexchange

--------------------------------------------------------------------------------
neoEMSrealloc SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoEMSrealloc (Handle AS INTEGER, NoPages AS INTEGER)

Arguments:
- Handle: the handle of a memory region previously allocated with neoEMSalloc
- NoPages: the number of pages to reallocate

Description:
This function tries to reallocate memory to the handle specified.

See also:
neoEMSalloc, neoEMSdealloc

================================================================================
EMS Layer Module ===============================================================
================================================================================
--------------------------------------------------------------------------------
neoLayerCreate FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLayerCreate% (NoLayers AS INTEGER)

Arguments:
- NoLayers: the number of layers to create (1 layer = 4 EMS pages)

Returns: 
-  0: Layers were not successfully created, or EMS error occured
- -1: Layer were successfully created

Description:
This function tries to create a specified amount of layers, for use with drawing
routines and double buffering et cetera. Be sure to remove the layers if your
program exits. Do this with neoLayerRemove.

See also:
neoLayerRemove

--------------------------------------------------------------------------------
neoLayerFreeLayers FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLayerFreeLayers% ()

Arguments:
None

Returns:
The amount of free EMS Layers

Description:
This function returns the amount of free usable EMS Layers.

--------------------------------------------------------------------------------
neoLayerGetHandle FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLayerGetHandle% ()

Arguments:
None

Returns:
The handle of the EMS layers

Description:
This function returns the handle of the EMS layer which were allocated by
neoLayerCreate.

See also:
NeoLayerCreate

--------------------------------------------------------------------------------
neoLayerClear SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerClear (Layer AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer number which you want to clear, use the VIDEO (0) to identify
         the screen
- Colour: the colour to clear the layer or screen to

Description:
This routine clears either the screen or a specified layer.

--------------------------------------------------------------------------------
neoLayerCopy SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerCopy (SrcLayer AS INTEGER, DstLayer AS INTEGER)

Arguments:
- SrcLayer: the source layer number, use VIDEO (0) if the source is the screen
- DstLayer: the destination layer number, use VIDEO if the destination is screen

Description:
This routine copies the contents of the source layer to the destination layer.

See also:
neoLayerCopyTrans

--------------------------------------------------------------------------------
neoLayerCopyBlend SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerCopyBlend (SrcLayer AS INTEGER, DstLayer AS INTEGER,
                               StdPal AS STRING, Neg AS INTEGER)

Arguments:
- SrcLayer: the source layer number, use VIDEO for screen
- DstLayer: the destination layer number, use VIDEO for screen
- StdPal: a 768-byte string palette (see Palette Module) which is the current
- Neg: either TRUE or FALSE, whether to use negative blending instead of
       positive blending.

Description:
This routine copies the contents of the source layer to the destination layer,
and thereby blending the contents of both layers which each other. Use this to
create some very nice translucency effect for example.

See also:
None

--------------------------------------------------------------------------------
neoLayerCopyColor SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerCopyColor (SrcLayer AS INTEGER, DstLayer AS INTEGER,
                               TransCol AS INTEGER, ReplaceCol AS INTEGER)

Arguments:
- SrcLayer: the source layer number, use VIDEO for screen
- DstLayer: the destination layer number, use VIDEO for screen
- TransCol: the transparent color of both layers
- ReplaceCol: the color to draw the pixels in

Description:
This routine copies the contents of the source layer to the destination layer,
thereby skipping all pixels with color TransCol, but all non-TransCol pixels on
the source layer will be drawn in color ReplaceCol.

See also:
None

--------------------------------------------------------------------------------
neoLayerCopyForward SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerCopyForward (SrcLayer AS INTEGER, DstLayer AS INTEGER,
                                 CheckCol AS INTEGER, TransCol AS INTEGER)

Arguments:
- SrcLayer: the source layer number, use VIDEO for screen
- DstLayer: the destination layer number, use VIDEO for screen
- CheckCol: the color which will be overdrawn on DstLayer
- TransCol: the color which will be skipped during copy

Description:
This routine copies the contents of the source layer to the destination layer,
but only if the destination pixel on the destination layer are of color CheckCol
and all colors of color TransCol on the source layer are skipped. This routine
allows Backward-rendering! First draw your foreground, then your background!

See also:
None

--------------------------------------------------------------------------------
neoLayerCopyTrans SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerCopyTrans (SrcLayer AS INTEGER, DstLayer AS INTEGER,
                               TransCol AS INTEGER)

Arguments:
- SrcLayer: the source layer number, use VIDEO (0) if source is screen
- DstLayer: the destination layer number, use VIDEO if destination is screen
- TransCol: the color which must be skipped while copying data

Description:
This routine copies the contents of SrcLayer to DstLayer, while skipping all
pixels with color TransCol. The pixels on DstLayer will then remain intact, so a
Transparent copy is made.

See also:
neoLayerCopy

--------------------------------------------------------------------------------
neoLayerExchange SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerExchange (SrcLayer AS INTEGER, DstLayer AS INTEGER)

Arguments:
- SrcLayer: the layer number of the first layer
- DstLayer: the layer number of the second layer

Description:
This routine swaps the contents of two layers. So all contents of DstLayer will
be in SrcLayer and the contents of SrcLayer will be in DstLayer after this
routine.

See also:
neoLayerCopy

--------------------------------------------------------------------------------
neoLayerFilter SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerFilter (Layer AS INTEGER, FromCol AS INTEGER,
                            ToCol AS INTEGER)

Arguments:
- Layer: the layer to apply filter to
- FromCol: the color to filter out of the layer
- ToCol: the color to replace the filtered out pixels by

Description:
This routine searches for all occurances of pixels with color FromCol, and 
replaces them by pixels with color ToCol. You can use this routine to quickly
change colour instead of redrawing everything.

See also:
None

--------------------------------------------------------------------------------
neoLayerLighting SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerLighting (Layer AS INTEGER, LightFactor AS INTEGER,
                              StdPal AS STRING)

Arguments:
- Layer: the layer number to perform light effects on, use VIDEO for screen
- LightFactor: a factor which determines the lightening or darkening (positive
               factors will lighten, negative will darken). Max = 63, min = -63
- StdPal: the 768-byte string palette holding the current palette

Description:
This routine darkens or lightens a specified layer using the supplied palette.
Use this to create some cool lighting effects!

See also:
None

--------------------------------------------------------------------------------
neoLayerLoad SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerLoad (Layer AS INTEGER, Filename AS STRING)

Arguments:
- Layer: the layer to load the file onto
- Filename: the file to load into a layer

Description:
This routine restores a neoLayerSave'd file, by reading the whole file into a
specified layer.

See also:
neoLayerSave

--------------------------------------------------------------------------------
neoLayerMirror SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerMirror (Layer AS INTEGER, HorVerBits AS INTEGER)

Arguments:
- Layer: the layer number to apply mirroring to
- HorVerBits: specifies which way to mirror the layer

Description:
This routine mirrors a specified layer on the specified way. You can use two
constants for ease. Specifying HORIZONTAL at HorVerBits causes the layer to be
mirror horizontally (everything up will come down etc), and specifying VERTICAL
causes the layer to be mirrored vertically (everything left will come right
etc). To apply both horizontal and vertical mirroring, specify, at HorVerBits,
the following expression: HORIZONTAL + VERTICAL.

See also:
None

--------------------------------------------------------------------------------
neoLayerRemove SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerRemove ()

Arguments:
None

Description:
This routine removes and deallocates your layers. You have to do this at the end
of your program, or else the layers won't be freed until you reboot. Do this
because it is not automatically done for you!

See also:
neoLayerCreate

--------------------------------------------------------------------------------
neoLayerSave SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLayerSave (Layer AS INTEGER, Filename AS STRING)

Arguments:
- Layer: the layer to save to a file
- Filename: the file name of the file to save the layer to

Description:
This routine saves a layer into a file. You can restore the layer by calling
neoLayerLoad.

See also:
neoLayerLoad

================================================================================
Drawing Primitives Module ======================================================
================================================================================
--------------------------------------------------------------------------------
neoDrawPoint FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDrawPoint% (Layer AS INTEGER, fromX AS INTEGER,
                                fromY AS INTEGER)

Arguments:
- Layer: the layer to retrieve pixel data from
- fromX: the x-coordinate of the requested pixel
- fromY: the y-coordinate of the requested pixel

Returns:
The pixel color of of the pixel at location (fromX, fromY).

Description:
This function is almost the same as QB's own POINT, but this function can also
read pixel data from layers.

See also:
neoDrawPixel

--------------------------------------------------------------------------------
neoDrawBox SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawBox (Layer AS INTEGER, StartX AS INTEGER, StartY AS INTEGER,
                        EndX AS INTEGER, EndY AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer to draw a box on
- StartX: the x-coordinate of the upperleft corner of the box
- StartY: the y-coordinate of the upperleft corner of the box
- EndX: the x-coordinate of the lowerright corner of the box
- EndY: the y-coordinate of the lowerright corner of the box
- Colour: the color to draw the box in

Description:
This routine draws a box on a specified layer. A box is a rectangle, of which
two corners have the coordinates (StartX, StartY) and (EndX, EndY). This routine
is affected by the clipbox.

See also:
neoDrawBoxF, neoDrawBoxTrans

--------------------------------------------------------------------------------
neoDrawBoxF SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawBoxF (Layer AS INTEGER, StartX AS INTEGER, StartY AS INTEGER,
                         EndX AS INTEGER, EndY AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer to draw a box on
- StartX: the x-coordinate of the upperleft corner of the box
- StartY: the y-coordinate of the upperleft corner of the box
- EndX: the x-coordinate of the lowerright corner of the box
- EndY: the y-coordinate of the lowerright corner of the box
- Colour: the color to draw the box in and to fill it with

Description:
This routine does almost the same as normal neoDrawBox, but this routine also
fills the box with the specified color. This routine is affected by the clipbox.

See also:
neoDrawBox, neoDrawBoxTrans

--------------------------------------------------------------------------------
neoDrawBoxTrans SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawBoxTrans (Layer AS INTEGER, StartX AS INTEGER,
                             StartY AS INTEGER, EndX AS INTEGER,
                             EndY AS INTEGER, Colour AS INTEGER,
                             StdPal AS STRING, Neg AS INTEGER)

Arguments:
- Layer: the layer to draw a blended box on
- StartX: the x-coordinate of the upperleft corner of the box
- StartY: the y-coordinate of the upperleft corner of the box
- EndX: the x-coordinate of the lowerright corner of the box
- EndY: the y-coordinate of the lowerright corner of the box
- Colour: the colour to blend with the background
- StdPal: a 768-byte string palette which holds the current palette
- Neg: TRUE or FALSE, whether to blend negative or to blend positive

Description:
This routine looks like neoDrawBoxF, except for the fact that this routine
doesn't draw a filled box, instead it draws a filled box blended with the
background. Use this to create nice translucency effects for instance.

See also:
neoDrawBox, neoDrawBoxF

--------------------------------------------------------------------------------
neoDrawCircle SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawCircle (Layer AS INTEGER, MiddleX AS INTEGER,
                           MiddleY AS INTEGER, Radius AS INTEGER,
                           Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the circle on
- MiddleX: the x-coordinate of the center of the circle
- MiddleY: the y-coordinate of the center of the circle
- Radius: the radius of the circle to draw (Radius = distance from the center
          to anywhere on the circle itself)
- Colour: the colour to draw the circle with

Description:
This routine draws a circle on the specified layer in the specified color. This
routine is affected by the clipbox.

See also:
neoDrawCircleF

--------------------------------------------------------------------------------
neoDrawCircleF SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawCircleF (Layer AS INTEGER, MiddleX AS INTEGER,
                            MiddleY AS INTEGER, Radius AS INTEGER,
                            Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the circle on
- MiddleX: the x-coordinate of the center of the circle
- MiddleY: the y-coordinate of the center of the circle
- Radius: the radius of the circle to draw (Radius = distance from the center
          to anywhere on the circle itself)
- Colour: the colour to draw the circle with and to fill it with

Description:
This routine draws a filled circle on the specified layer in the specified color
and there after fills it with the specified color. This routine is affected by
the clipbox.

See also:
neoDrawCircle

--------------------------------------------------------------------------------
neoDrawEllipse SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawEllipse (Layer AS INTEGER, MiddleX AS INTEGER,
                            MiddleY AS INTEGER, XRadius AS INTEGER,
                            YRadius AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the ellipse on
- MiddleX: the x-coordinate of the center of the ellipse
- MiddleY: the y-coordinate of the center of the ellipse
- XRadius: the radius on the X-Side of the ellipse
- YRadius: the radius on the Y-Side of the ellipse
- Colour: the colour to draw the ellipse in

Description:
This routine draws an ellipse on the specified layer with the specified color.
This routine is affected by the clipbox.

See also:
neoDrawEllipseF

--------------------------------------------------------------------------------
neoDrawEllipseF SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawEllipseF (Layer AS INTEGER, MiddleX AS INTEGER,
                             MiddleY AS INTEGER, XRadius AS INTEGER,
                             YRadius AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the ellipse on
- MiddleX: the x-coordinate of the center of the ellipse
- MiddleY: the y-coordinate of the center of the ellipse
- XRadius: the radius on the X-Side of the ellipse
- YRadius: the radius on the Y-Side of the ellipse
- Colour: the colour to draw the ellipse in and to fill it with

Description:
This routine draws a filled ellipse on the specified layer with the specified
color and also fills it with that color. This routine is affected by the
clipbox.

See also:
neoDrawEllipse

--------------------------------------------------------------------------------
neoDrawHLine SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawHLine (Layer AS INTEGER, OnY AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the horizontal line on
- OnY: the y-coordinate of the horizontal line
- Colour: the color to draw the line with

Description:
This routine draws a horizontal line, from left to right, on a specified layer
using the specified color. This routine is affected by the clipbox.

See also:
neoDrawVLine, neoDrawLine

--------------------------------------------------------------------------------
neoDrawInitLayers SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawInitLayers ()

Arguments:
None

Description:
This routine initializes the layers allocated by neoLayerCreate for usage of the
drawing routines in the Drawing Primitives Module. Be sure to call this routine
before using any of the drawing routines on layers!

See also:
neoLayerCreate

--------------------------------------------------------------------------------
neoDrawLine SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawLine (Layer AS INTEGER, StartX AS INTEGER, StartY AS INTEGER,
                         EndX AS INTEGER, EndY AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: layer to draw the line on
- StartX: x-coordinate of the start position of the line
- StartY: y-coordinate of the start position of the line
- EndX: x-coordinate of the end position of the line
- EndY: y-coordinate of the end position of the line
- Colour: colour to draw the line in

Description:
Draws a line on a specified layer in the specified color. If the line you draw
is a vertical or a horizontal, please take advantage of neoDrawHLine and
neoDrawVLine because these routines are faster. Affected by the clipbox.

See also:
neoDrawLineGouraud, neoDrawHLine, neoDrawVLine

--------------------------------------------------------------------------------
neoDrawLineGouraud SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawLineGouraud (Layer AS INTEGER, StartX AS INTEGER,
                                StartY AS INTEGER, EndX AS INTEGER,
                                EndY AS INTEGER, StartCol AS INTEGER,
                                EndCol AS INTEGER)

Arguments:
- Layer: the layer to draw the line on
- StartX: the x-coordinate of the start position of the line
- StartY: the y-coordinate of the start position of the line
- EndX: the x-coordinate of the end position of the line
- EndY: the y-coordinate of the end position of the line
- StartCol: the color of the start position
- EndCol: the color of the end position

Description:
This routine draws a gouraud shaded line on a layer, thereby shading the colors
from StartCol to EndCol while drawing. StartCol is the color of the start
position of the line, and EndCol is the color of the end position of the line.
Between those positions the colors are shaded from StartCol to EndCol. This
routine is just a little slower than standard neoDrawLine. Clipbox-affected.

See also:
neoDrawLine

--------------------------------------------------------------------------------
neoDrawPixel SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawPixel (Layer AS INTEGER, toX AS INTEGER, toY AS INTEGER,
                          Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the pixel to
- toX: the x-coordinate of the position where to draw the pixel
- toY: the y-coordinate of the position where to draw the pixel
- Colour: the color of the pixel

Description:
Almost identical to QB's PSET, this routine is also able to place pixels on
layers. It is affected by the clipbox.

See also:
neoDrawPoint

--------------------------------------------------------------------------------
neoDrawPolygon SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawPolygon (Layer AS INTEGER, PolyArray() AS ANY,
                            Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the polygon on
- PolyArray(): an array of type 'PolyStruct' containing the points to draw
- Colour: the colour of the polygon

Description:
This routine draws a polygon on specified layer in the specified color.
PolyArray() is an array of type 'PolyStruct' in which all points are stored.
Note that all points from Lbound(PolyArray) to Ubound(PolyArray) are drawn.
Only the X and Y subvariables are read and this is clipbox-affected.

See also:
neoDrawPolygonGouraud

--------------------------------------------------------------------------------
neoDrawPolygonGouraud SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawPolygonGouraud (Layer AS INTEGER, PolyArray() AS ANY)

Arguments:
- Layer: the layer to draw the polygon on
- PolyArray(): an array of type 'PolyStruct' containing the points to draw
               and their colours

Description:
This routine draws a gouraud shaded polygon on the specified layer. PolyArray()
is an array of type 'PolyStruct' in which all points and their colors are
stored. All points in Lbound(PolyArray) and Ubound(PolyArray) are drawn. For
this routine, the X, Y and C subvariables are needed and it is affected by the
clipbox.

See also:
neoDrawPolygon

--------------------------------------------------------------------------------
neoDrawSetClipBox SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawSetClipBox (X1 AS INTEGER, Y1 AS INTEGER, X2 AS INTEGER,
                               Y2 AS INTEGER)

Arguments:
- X1: the x-coordinate of the upperleft corner of the clipbox, standard 0
- Y1: the y-coordinate of the upperleft corner of the clipbox, standard 0
- X2: the x-coordinate of the lowerright corner of the clipbox, standard 319
- Y2: the y-coordinate of the lowerright corner of the clipbox, standard 199

Description:
This routine sets the clipbox to the specified box boundary. All calls to any
draw function supporting clipbox will then be affected by the new clipbox.
Everything on or in the boundary will be drawn and everything outside it will
not be drawn at all. The standard values of the clipbox are initialized by
neoDrawInitLayers.

See also:
None

--------------------------------------------------------------------------------
neoDrawVLine SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDrawVLine (Layer AS INTEGER, OnX AS INTEGER, Colour AS INTEGER)

Arguments:
- Layer: the layer to draw the vertical line on
- OnX: the x-coordinate of the vertical line
- Colour: the color of the vertical line

Description:
This routine draws a vertical line on the specified layer in the specified
color. This routine is affected by the clipbox.

See also:
neoDrawHLine

================================================================================
Palette Module =================================================================
================================================================================
--------------------------------------------------------------------------------
neoPalGetRelativeCol FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoPalGetRelativeCol& (ColorNumber AS INTEGER)

Arguments:
- ColorNumber: the number of the color to return the relative from

Returns:
The relative color of the specified color in the palette

Description:
This function returns the relative color of a color in the palette you
specified. The relative color is equal to:
relcol = 65536 * blue + 256 * green + red
Which makes it excellent to be used with QB's PALETTE routine, or with any PP256
palette.

See also:
neoPalLoadPP256Pal, neoPalSavePP256Pal

--------------------------------------------------------------------------------
neoPalSearch FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoPalSearch% (Red AS INTEGER, Green AS INTEGER,
                                Blue AS INTEGER)

Arguments:
- Red: the amount of red to search for
- Green: the amount of green to search for
- Blue: the amount of blue to search for

Returns:
The index of the color which best fits the specified color amounts

Description:
This function searches the entire current palette for the color that best
matches the specified color amounts.

See also:
neoPalSearchIn

--------------------------------------------------------------------------------
neoPalSearchIn FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoPalSearchIn% (PalString AS STRING, Red AS INTEGER,
                                  Green AS INTEGER, Blue AS INTEGER)

Arguments:
- PalString: the 768-byte string palette to search in
- Red: the amount of red to search for
- Green: the amount of green to search for
- Blue: the amount of blue to search for

Returns:
The index of the best matching color in the string palette you supplied

Description:
This function returns the index of the color in the string palette that best
matches the color amounts you specified.

See also:
neoPalSearch

--------------------------------------------------------------------------------
neoPalExtractFromBMP SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalExtractFromBMP (Filename AS STRING, PalString AS STRING)

Arguments:
- Filename: the filename of the bmp file you want to extract
- PalString: a string to store the bmp palette in

Description:
This routine extracts the palette from the specified bmp file and stores it into
the string palette called PalString. After this operation, PalString will
contain a 768-byte string palette.

See also:
None

--------------------------------------------------------------------------------
neoPalFadeIn SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadeIn (PalString AS STRING)

Arguments:
- PalString: the 768-byte string palette to fade into

Description:
This routine fades the current palette to the specified palette.

See also:
neoPalFadeStepIn

--------------------------------------------------------------------------------
neoPalFadePalX SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadePalX (PalString AS STRING, BeginCol AS INTEGER,
                            EndCol AS INTEGER)

Arguments:
- PalString: the 768-byte palette to fade partly into
- BeginCol: the startcolor which has to be faded
- EndCol: the endcolor which has to be faded

Description:
This routine fades only the colors between BeginCol and EndCol to the colors
in the string palette. (Crossfade).

See also:
neoPalFadePalStepX

--------------------------------------------------------------------------------
neoPalFadePalStepX SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadePalStepX (PalString AS STRING, BeginCol AS INTEGER,
                                EndCol AS INTEGER)

Arguments:
- PalString: the 768-byte palette to fade one step into
- BeginCol: the startcolor which has to be faded
- EndCol: the endcolor which has to be faded

Description:
This routine fades only the colors between BeginCol and EndCol one step towards
the colors specified in PalString. (Crossfade).

See also:
neoPalFadePalX

--------------------------------------------------------------------------------
neoPalFadeStepIn SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadeStepIn (PalString AS STRING)

Arguments:
- PalString: the string palette to fade one step into

Description:
This routine slightly differs from neoPalFadeIn for the fact it does not fade
the entire palette immediately to the string palette, but only one step. So that
the user can define a fading speed.

See also:
neoPalFadeIn

--------------------------------------------------------------------------------
neoPalFadeStepTo SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadeStepTo (Red AS INTEGER, Green AS INTEGER, Blue AS INTEGER)

Arguments:
- Red: the amount of red to fade to
- Green: the amount of green to fade to
- Blue: the amount of blue to fade to

Description:
This routine fades the entire palette one step towards the specified color.

See also:
neoPalFadeTo

--------------------------------------------------------------------------------
neoPalFadeStepX SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadeStepX (BeginCol AS INTEGER, EndCol AS INTEGER,
                             Red AS INTEGER, Green AS INTEGER, Blue AS INTEGER)

Arguments:
- BeginCol: the begincolor to begin fading with
- EndCol: the endcolor to end fading with
- Red: the amount of red to fade to
- Green: the amount of green to fade to
- Blue: the amount of blue to fade to

Description:
Slightly differs from neoPalFadeX for the fact that it only fades one step
towards the specified color. Only the colors between BeginCol and EndCol are
faded (crossfade).

See also:
neoPalFadeX

--------------------------------------------------------------------------------
neoPalFadeTo SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadeTo (Red AS INTEGER, Green AS INTEGER, Blue AS INTEGER)

Arguments:
- Red: the amount of red to fade to
- Green: the amount of green to fade to
- Blue: the amount of blue to fade to

Description:
This routine fades the entire palette to the specified color.

See also:
neoPalFadeStepTo

--------------------------------------------------------------------------------
neoPalFadeX SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalFadeX (BeginCol AS INTEGER, EndCol AS INTEGER, Red AS INTEGER,
                         Green AS INTEGER, Blue AS INTEGER)

Arguments:
- BeginCol: the color to begin fading with
- EndCol: the color to end fading with
- Red: the amount of red to fade to
- Green: the amount of green to fade to
- Blue: the amount of blue to fade to

Description:
This routine fades only part of the palette to the specified color. Only the
colors between BeginCol and EndCol are faded. (Crossfade).

See also:
neoPalFadeStepX

--------------------------------------------------------------------------------
neoPalGet SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalGet (PalString AS STRING)

Arguments:
- PalString: a string to store the current palette in

Description:
This routine stores the current palette in PalString. So after this operation
PalString is a 768-byte string palette. To restore a 768-byte string palette,
use neoPalSet.

See also:
neoPalSet

--------------------------------------------------------------------------------
neoPalGetCol SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalGetCol (ColorNumber AS INTEGER, Red AS INTEGER,
                          Green AS INTEGER, Blue AS INTEGER)

Arguments:
- ColorNumber: the index of the color in the current palette to read data from
- Red: an integer to store the amount of red in
- Green: an integer to store the amount of green in
- Blue: an integer to store the amount of blue in

Description:
This routine retrieves color data from the specified color. To set color data,
use neoPalSetCol.

See also:
neoPalSetCol

--------------------------------------------------------------------------------
neoPalGradient SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalGradient (StartCol AS INTEGER, StartR AS INTEGER,
                            StartG AS INTEGER, StartB AS INTEGER,
                            EndCol AS INTEGER, EndR AS INTEGER, EndG AS INTEGER,
                            EndB AS INTEGER)

Arguments:
- StartCol: the color to start gradienting with
- StartR: the amount of red of the start color
- StartG: the amount of green of the start color
- StartB: the amount of blue of the start color
- EndCol: the color to end gradienting with
- EndR: the amount of red of the end color
- EndG: the amount of green of the end color
- EndB: the amount of blue of the end color

Description:
This routine creates a gradient between StartCol and EndCol in which the colors
fade with equal steps from the start color you specified to the end color you
specified. StartCol and EndCol must differ from each other.

See also:
None

--------------------------------------------------------------------------------
neoPalGrey SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalGrey (Amount AS INTEGER)

Arguments:
- Amount: amount of grey to set

Description:
This routine sets the entire palette to the amount of grey specified. In case
Amount equals 0, this routine does the same as neoPalOff.

See also:
neoPalOff, neoPalOldSkool

--------------------------------------------------------------------------------
neoPalLoad SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalLoad (PalString AS STRING, Filename AS STRING)

Arguments:
- PalString: a string to store the palette from the file in
- Filename: a file containing the 768-byte string palette

Description:
This file loads as 768 byte file into PalString. The file could have been saved
by e.g. neoPalSave or the DirectQB palette save routine.

See also:
neoPalSave

--------------------------------------------------------------------------------
neoPalLoadPP256Pal SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalLoadPP256Pal (PalString AS STRING, Filename AS STRING)

Arguments:
- PalString: a string to store the palette from the file in
- Filename: a file containing the 1024-byte long int palette

Description:
This routine loads a PP256 palette from a file into a string. The PP256 palette
is in the 1024-byte long int format, which neoLib doesn't support in the palette
routines. Therefore this format is automatically converted to 768-byte format.
PalString will thus contain the 768-byte string palette.

See also:
neoPalSavePP256Pal

--------------------------------------------------------------------------------
neoPalNegative SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalNegative ()

Arguments:
None

Description:
This routine calculates the negative of the current palette and replaces the
current palette by the negative. E.g. white becomes black, black becomes white,
red becomes aqua, yellow becomes blue, etc.

See also:
None

--------------------------------------------------------------------------------
neoPalOff SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalOff ()

Arguments:
None

Description:
This routine sets the entire palette to black.

See also:
neoPalGrey

--------------------------------------------------------------------------------
neoPalOldSkool SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalOldSkool ()

Arguments:
None

Description:
This routine converts the current palette to the same palette in greyscales.

See also:
neoPalGrey

--------------------------------------------------------------------------------
neoPalRotateFull SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalRotateFull (Direction AS INTEGER)

Arguments:
- Direction: the direction to rotate the palette to. You can use the predefined
             constants LEFT and RIGHT for ease.

Description:
This routine rotates the full palette in a specified direction. You can use
LEFT and RIGHT for ease. If you want to rotate only part of the palette, you
can use neoPalRotatePart.

See also:
neoPalRotatePart

--------------------------------------------------------------------------------
neoPalRotatePart SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalRotatePart (Direction AS INTEGER, BeginCol AS INTEGER,
                              EndCol AS INTEGER)

Arguments:
- Direction: the direction to rotate to. You can use LEFT or RIGHT for ease.
- BeginCol: the color to start rotating with
- EndCol: the color to end rotating with

Description:
This routine rotates part of the palette in the specified direction. You can use
LEFT or RIGHT for the direction. Only the colors between BeginCol and EndCol are
rotated.

See also:
neoPalRotateFull

--------------------------------------------------------------------------------
neoPalSave SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalSave (PalString AS STRING, Filename AS STRING)

Arguments:
- PalString: the 768-byte string palette to write to file
- Filename: the filename of the file to write the palette to

Description:
This routine stores a 768-byte palette in a file. The palette can then be read
again by neoPalLoad.

See also:
neoPalLoad

--------------------------------------------------------------------------------
neoPalSavePP256Pal SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalSavePP256Pal (PalString AS STRING, Filename AS STRING)

Arguments:
- PalString: the 768-byte string to store in a file
- Filename: the filename of the file to write the palette to

Description:
This routine writes a PP256-compatible palette file to a file. PalString must be
of type 768-byte string, as this is the only format supported in NeoLib.
However, the palette is converted in memory to the PP256 format, 1024-byte long
integer. After the operation, PalString will still be a 768-byte string. You can
also load these PP256 palettes again by neoPalLoadPP256Pal.

See also:
neoPalLoadPP256Pal

--------------------------------------------------------------------------------
neoPalSet SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalSet (PalString AS STRING)

Arguments:
- PalString: the 768-byte string palette to make current

Description:
This routine sets the specified 768-byte string palette as the current palette.
The older palette will be overwritten. You can prevent overwriting by retrieving
it by neoPalGet before you make a new palette current.

See also:
neoPalGet

--------------------------------------------------------------------------------
neoPalSetCol SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalSetCol (ColorNumber AS INTEGER, Red AS INTEGER,
                          Green AS INTEGER, Blue AS INTEGER)

Arguments:
- ColorNumber: the index of the color to change
- Red: the amount of red for the new color
- Green: the amount of green for the new color
- Blue: the amount of blue for the new color

Description:
This routine changes a specified color in the current palette to the color
created from the amounts of red, green and blue you specified. To retrieve color
data you can use neoPalGetCol.

See also:
neoPalGetCol

--------------------------------------------------------------------------------
neoPalStringGetCol SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalStringGetCol (PalString AS STRING, ColorNumber AS INTEGER,
                                Red AS INTEGER, Green AS INTEGER,
                                Blue AS INTEGER)

Arguments:
- PalString: 768-byte string palette to retrieve color data from
- ColorNumber: the color number to retrieve color data from
- Red: the amount of red of the specified color is stored in here
- Green: the amount of green of the specified color is stored in here
- Blue: the amount of blue of the specified coolor is stored in here

Description:
This routine reads color data of a specified color from a 768-byte string
palette and stores the color hues into the Red, Green and Blue variables. Using
neoPalStringSetCol you can modify color data in a string palette.

See also:
neoPalStringSetCol

--------------------------------------------------------------------------------
neoPalStringOff SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalStringOff (PalString AS STRING)

Arguments:
- PalString: the 768-byte string palette to set to black

Description:
This routine sets a 768-byte string palette to black.

See also:
None

--------------------------------------------------------------------------------
neoPalStringSetCol SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoPalStringSetCol (PalString AS STRING, ColorNumber AS INTEGER,
                                Red AS INTEGER, Green AS INTEGER,
                                Blue AS INTEGER)

Arguments:
- PalString: the 768-byte string palette to change color data from
- ColorNumber: the number of the color to change
- Red: the amount of red for the new color
- Green: the amount of green for the new color
- Blue: the amount of blue for the new color

Description:
This routine modifies color data of a specified color number in a 768-byte
string palette. If you want to retrieve color data from it, you can use
neoPalStringGetCol.

See also:
neoPalStringGetCol

================================================================================
Keyboard Module ================================================================
================================================================================
--------------------------------------------------------------------------------
neoKeybInkeyScan FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoKeybInkeyScan% ()

Arguments:
None

Returns:
The scancode of the pressed key or 0 if no key is pressed

Description:
This function returns the scancode of a pressed key, or 0 if no key is pressed.

See also:
None

--------------------------------------------------------------------------------
neoKeybGetLeds SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybGetLeds (NumLock AS INTEGER, CapsLock AS INTEGER,
                            ScrollLock AS INTEGER)

Arguments:
- NumLock: the status of the numlock led is stored in here
- CapsLock: the status of the capslock led is stored in here
- ScrollLock: the status of the scrolllock led is stored in here

Description:
This routine stores the led status of each led into the corresponding argument
variables. The status can either be -1 (on/active) or 0 (off/deactive).

See also:
neoKeybSetLeds

--------------------------------------------------------------------------------
neoKeybGetShift SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybGetShift (LeftShift AS INTEGER, RightShift AS INTEGER,
                             Alt AS INTEGER, Control AS INTEGER)

Arguments:
- LeftShift: the press status of left shift is stored in here
- RightShift: the press status of right shift is stored in here
- Alt: the press status of the Alt button is stored in here
- Control: the press status of the Ctrl button is stored in here

Description:
This routine reads the keyboard for the press states of Left/Right-Shift, Alt
and Control and stores the states in the corresponding variables. If you want
to make difference between Left/Right-Alt or Left/Right-Control, you must use
neoKeybGetShiftEnhanced, which can only be used at an enhanced keyboard. Try it,
if it doesn't work you don't have one :).

See also:
neoKeybGetShiftEnhanced

--------------------------------------------------------------------------------
neoKeybGetShiftEnhanced SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybGetShiftEnhanced (LeftControl AS INTEGER,
                                     RightControl AS INTEGER,
                                     LeftAlt AS INTEGER, RightAlt AS INTEGER,
                                     SysReq AS INTEGER)

Arguments:
- LeftControl: the press state of the left ctrl button is stored in here
- RightControl: the press state of the right ctrl button is stored in here
- LeftAlt: the press state of the left alt button is stored in here
- RightAlt: the press state of the right alt button is stored in here
- SysReq: the press state of the SysReq (SysRq) button, also labeled, Prt Scr or
          Print Screen, is stored in this variable

Description:
This routine reads the press states of L-Ctrl, R-Ctrl, L-Alt, R-Alt and SysReq
and stores them into the corresponding variables. The SysReq/PrtScr button is
above your insert button, next to the scroll lock button. If you have an old
keyboard there is a chance there isn't such a button. This routine only works if
you have an enhanced keyboard. Try to see if you have one :).

See also:
neoKeybGetShift

--------------------------------------------------------------------------------
neoKeybOn SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybOn ()

Arguments:
None

Description:
This routine activates the keyboard. It could be deactivated by neoKeybOff.

See also:
neoKeybOff

--------------------------------------------------------------------------------
neoKeybOff SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybOff ()

Arguments:
None

Description:
This routine deactives the keyboard. No keypresses are read when the keyboard is
off. Use neoKeybOn to reactivate the keyboard. Very handy if you don't want the
user to press anything that might hinder your program.

See also:
neoKeybOn

--------------------------------------------------------------------------------
neoKeybSetKey SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybSetKey (ScanCode AS INTEGER, ASCIIcode AS INTEGER)

Arguments:
- ScanCode: the scancode of the key to put in the keyboard buffer
- ASCIIcode: the ascii code of the key to put in the keyboard buffer

Description:
This routine puts a key in the keyboard buffer, as if it had been pressed. Note
that the supplied scancode and asciicode must refer to the same character.

See also:
neoKeybInkeyScan

--------------------------------------------------------------------------------
neoKeybSetLeds SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybSetLeds (NumLock AS INTEGER, CapsLock AS INTEGER,
                            ScrollLock AS INTEGER)

Arguments:
- NumLock: the status to set numlock at
- CapsLock: the status to set capslock at
- ScrollLock: the status to set scrolllock at

Description:
This routine sets the state of the keyboard leds. The state must be -1 or 0, for
respectively on or off. Note that this function uses cloaked leds, which means
that you can't see the leds on your keyboard changing, but they really are on
the state you specified. You can test this with neoKeybGetLeds.

See also:
neoKeybGetLeds

--------------------------------------------------------------------------------
neoKeybSetSpeed SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybSetSpeed (TypemativDelay AS INTEGER, TypematicRate AS SINGLE)

Arguments:
- TypemativDelay: the key-delay to use
- TypematicRate: the key-repeation-delay to use

Description:
This routine sets the speed of the keyboard. TypemativDelay can be 250, 500,
750 or 1000 (milliseconds). TypematicRate can be any number between 2 and 30
(milliseconds). Note that this function may not work on Windows NT systems.

See also:
None

--------------------------------------------------------------------------------
neoKeybWaitKey SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoKeybWaitKey ()

Arguments:
None

Description:
This routine waits for a key to be pressed. QB only exits this routine when a
key has been pressed.

See also:
None

================================================================================
Mouse Module ===================================================================
================================================================================
--------------------------------------------------------------------------------
neoMouseGetButtons FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseGetButtons% ()

Arguments:
None

Returns:
The number of buttons on the mouse

Description:
This function returns the number of buttons on the mouse. If your mouse has more
buttons than this function returns, your dos driver can't support more.

See also:
neoMouseLB, neoMouseMB, neoMouseRB

--------------------------------------------------------------------------------
neoMouseInit FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseInit% ()

Arguments:
None

Returns:
- -1: Mouse found and ready for use
-  0: Mouse not found

Description:
This function checks if a mouse is present and resets the driver. If no mouse is
present, this function returns 0, if there is, it returns -1. Please call this
function before using any of the other Mouse functions in NeoLib.

See also:
None

--------------------------------------------------------------------------------
neoMouseLB FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseLB% ()

Arguments:
None

Returns:
- -1: Left Mouse button is being pressed
-  0: Left mouse button is not being pressed

Description:
This function returns the press status of the left mouse button.

See also:
neoMouseMB, neoMouseRB

--------------------------------------------------------------------------------
neoMouseMB FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseMB% ()

Arguments:
None

Returns:
- -1: Middle mouse button is being pressed
-  0: Middle mouse button is not being pressed

Description:
This function returns the press status of the middle mouse button. This only
returns the correct value if you mouse driver support more than 2 buttons.

See also:
neoMouseLB, neoMouseRB

--------------------------------------------------------------------------------
neoMouseRB FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseRB% ()

Arguments:
None

Returns:
- -1: Right mouse button is being pressed
-  0: Right mouse button is not being pressed

Description:
This function returns the press state of the right mouse button.

See also:
neoMouseLB, neoMouseMB

--------------------------------------------------------------------------------
neoMouseX FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseX% ()

Arguments:
None

Returns:
The current mode 13h mouse x position

Description:
This function returns the mouse's x position according to the Mode 13h screen
width. So the x values range from 0 to 319.

See also:
neoMouseY

--------------------------------------------------------------------------------
neoMouseY FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoMouseY% ()

Arguments:
None

Returns:
The current mode 13h mouse y position

Description:
This function returns the mouse's y position according to the Mode 13h screen
height. So the y values range from 0 to 199.

See also:
neoMouseX

--------------------------------------------------------------------------------
neoMouseHide SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoMouseHide ()

Arguments:
None

Description:
This routine 'hides' the mouse. So after this call, the mouse pointer is not
visible on the screen. Note that if you call this routine multiple times, you
also need multiple calls to neoMouseShow to 'unhide' the mouse cursor!

See also:
neoMouseShow

--------------------------------------------------------------------------------
neoMouseSetPos SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoMouseSetPos (NewX AS INTEGER, NewY AS INTEGER)

Arguments:
- NewX: the new x position of the mouse (0-319)
- NewY: the new y position of the mouse (0-199)

Description:
This routine sets the mouse position to the supplied position. So the mouse will
be set to (NewX, NewY). Note that there is no error checking for an invalid
position!

See also:
neoMouseX, neoMouseY

--------------------------------------------------------------------------------
neoMouseSetRange SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoMouseSetRange (MinX AS INTEGER, MinY AS INTEGER, MaxX AS INTEGER,
                              MaxY AS INTEGER)

Arguments:
- MinX: the x-coordinate of the upperleft corner of the range box
- MinY: the y-coordinate of the upperleft corner of the range box
- MaxX: the x-coordinate of the lowerright corner of the range box
- MaxY: the y-coordinate of the lowerright corner of the range box

Description:
This routine sets the mouse range box. By calling this routine with a set of
values, the mouse pointer cannot leave the box you specified.

See also:
None

--------------------------------------------------------------------------------
neoMouseSetSensitivity SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoMouseSetSensitivity (Xsens AS INTEGER, Ysens AS INTEGER)

Arguments:
- Xsens: the sensitivity on the x-axis (standard 8)
- Ysens: the sensitivity on the y-axis (standard 16)

Description:
This routine sets the number of mickeys required to move one pixel down or up.
A mickey is the smallest movement a mouse can measure. Note, this routine does
not always work with many OSes.

See also:
None

--------------------------------------------------------------------------------
neoMouseSetShape SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoMouseSetShape (NewShape AS STRING, HotX AS INTEGER,
                              HotY AS INTEGER)

Arguments:
- NewShape: a 64-byte mouse pointer string
- HotX: the x-position on the sprite which is the 'click-point'
- HotY: the y-position on the sprite which is the 'click-point'

Description:
This routine sets the supplied cursor as the standard graphics mode cursor. Note
that the 64 byte string consists of a 32 byte screen mask and a 32 byte cursor
mask. This makes it fully compatible with DirectQB's Cursor Editor.

See also:
None

--------------------------------------------------------------------------------
neoMouseShow SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoMouseShow ()

Arguments:
None

Description:
This routine makes the mouse pointer visible. Note that if you had called
neoMouseHide multiple times, you also need to call this routine multiple times!

See also:
neoMouseHide

================================================================================
CDROM Module ===================================================================
================================================================================
--------------------------------------------------------------------------------
neoCdromChanged FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromChanged% (DriveLetter AS STRING)

Arguments:
- DriveLetter: the letter of the drive to test for changes

Returns:
- -1: cd was changed since last operation
-  0: cd wasn't changed since last operation

Description:
This function checks whether the CD in the CDROM drive had been changed since
the last call to the CDrom drive.

--------------------------------------------------------------------------------
neoCdromDriveExist FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromDriveExist% (DriveLetter AS STRING)

Arguments:
- DriveLetter: the letter (!) of the drive to test if it is a CDROM drive

Returns:
- -1: the supplied drive letter is a cdrom drive
-  0: the supplied drive letter is not a cdrom drive

Description:
This function returns whether a specified drive is a cdrom drive, and if it is
usable. For being usable, you need MSCDEX or MSCDEXNT installed.

See also:
neoCdromGetDriveLetters

--------------------------------------------------------------------------------
neoCdromGetDriveLetters FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromGetDriveLetters$ ()

Arguments:
None

Returns:
A variable length string with all cdrom drive letters in it

Description:
This function returns all cdrom drive letters. One byte per drive, so it is only
one letter if you have 1 drive, e.g. "D", so not "D:\" or similar.

See also:
neoCdromDriveExist

--------------------------------------------------------------------------------
neoCdromGetErrorMsg FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromGetErrorMsg$ ()

Arguments:
None

Returns:
A string holding the description of the most recent error occured

Description:
Call this routine if an error had occured to see what the error means.

See also:
neoCdromIsError

--------------------------------------------------------------------------------
neoCdromGetVersion FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromGetVersion$ ()

Arguments:
None

Returns:
The version of the MSCDEX installed

Description:
This function returns the version of the installed MSCDEX. It is in Major.Minor
format. Note that if this returns 0.0, there is no MSCDEX.

See also:
None

--------------------------------------------------------------------------------
neoCdromHeadPosition FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromHeadPosition& (DriveLetter AS STRING)

Arguments:
- DriveLetter: the drive to return the head position from

Returns:
A LONG containing the sector the head of the drive is at.

Description:
This routine returns the current head location of the specified drive.

--------------------------------------------------------------------------------
neoCdromInit FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromInit% ()

Arguments:
None

Returns:
-  0: CDrom drives initialized successfully
- -1: MSCDEX not installed
- -2: No CDrom drives exist
- -3: No CDrom drives supported by MSCDEX

Description:
This routine initializes all cdrom drives and check whether they are supported.

--------------------------------------------------------------------------------
neoCdromIsError FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromIsError% ()

Arguments:
None

Returns:
- -1: an error had occured
-  0: no error occured

Description:
This routine returns whether a CDROM Drive error had occured recently. Check out
neoCdromGetErrorMsg to retrieve the error message.

See also:
neoCdromGetErrorMsg

--------------------------------------------------------------------------------
neoCdromRB2HSG FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromRB2HSG& (Minutes AS INTEGER, Seconds AS INTEGER,
                                  Frames AS INTEGER)

Arguments:
- Minutes: amount of minutes
- Seconds: amount of seconds
- Frames: amount of frames (= 1/75 second)

Returns:
The sector number which corresponds to the given Red Book address.

Description:
This routine converts a Red Book address to a High Sierra address.

See also:
neoCdromHSG2RB

--------------------------------------------------------------------------------
neoCdromSize FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoCdromSize& (DriveLetter AS STRING)

Arguments:
- DriveLetter: the drive to retrieve disc size from

Returns:
Total size (in bytes) of a cd in the specified drive.

Description:
This routines returns the amount of used bytes on a cd.

--------------------------------------------------------------------------------
neoCdromClose SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromClose (DriveLetter AS STRING)

Arguments:
- DriveLetter: the drive to close the tray of

Description:
This routine closes the tray of the specified drive. Note that this doesn't work
under WinXP or similar.

See also:
neoCdromOpen

--------------------------------------------------------------------------------
neoCdromDiskInfo SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromDiskInfo (DriveLetter AS STRING, FirstTrack AS INTEGER,
                              LastTrack AS INTEGER)

Arguments:
- DriveLetter: the drive to retrieve CD Data from
- FirstTrack: the first valid track of the CD is stored in here
- LastTrack: the last valid track of the CD is stored in here

Description:
This routine retrieves the first and last valid track of a cd in the specified
drive.

See also:
neoCdromTrackInfo

--------------------------------------------------------------------------------
neoCdromGetInfo SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromGetInfo (DriveLetter AS STRING, BitFlags AS LONG)

Arguments:
- DriveLetter: the drive to retrieve drive data from
- BitFlags: all drive data is stored in here

Description:
This routine retrieves drive data of the specified drive. The BitFlags has the
following format:
- Open Flag (bit 0): flag whether the drive is open or closed
- Locked Flag (bit 1): flag whether the drive is locked or unlocked
- Cooked Raw Flag (bit 2): whether the drive supports cooked and/or raw reading
- Read Write Flag (bit 3): whether the drive has read and write capabilities
- DatAV Flag (bit 4): whether the drive can play audio tracks
- Interleaving (bit 5): whether the drive supports interleaving
- Prefetching (bit 7): whether the drive supports prefetching
- AudioManip (bit 8): whether the drive supports audio channel manipulation
- HSGRBAddressing (bit 9): whether the drive supports HSG and/or RB addresses
That way, you can retrieve much data about the drive itself.

--------------------------------------------------------------------------------
neoCdromHSG2RB SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromHSG2RB (Sectors AS LONG, Minutes AS INTEGER,
                            Seconds AS INTEGER, Frames AS INTEGER)

Arguments:
- Sectors: the amount of sectors to convert to Red Book
- Minutes: amount of minutes are stored in here
- Seconds: amount of seconds are stored in here
- Frames: amount of frames are stored in here

Description:
This routine converts a given Sector Address (HSG) to a Red Book address.

See also:
neoCdromRB2HSG

--------------------------------------------------------------------------------
neoCdromLock SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromLock (DriveLetter AS STRING)

Arguments:
- DriveLetter: drive to lock

Description:
Locks the tray door of a cdrom drive (Can't be opened until unlock).

See also:
neoCdromUnlock

--------------------------------------------------------------------------------
neoCdromOpen SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromOpen (DriveLetter AS STRING)

Arguments:
- DriveLetter: drive to open tray of

Description:
This routine opens the drive tray of the specified drive

See also:
neoCdromClose

--------------------------------------------------------------------------------
neoCdromPlay SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromPlay (DriveLetter AS STRING, TrackNumber AS INTEGER,
                          StartSector AS LONG, NumSectors AS LONG)

Arguments:
- DriveLetter: drive to play audio on
- TrackNumber: number of the track to play
- StartSector: the starting sector of the track is stored in here
- NumSectors: the number of sectors the track is big is stored in here

Description:
This routine plays an audio track on a specified drive. Also returns the track's
starting sector and the number of sectors the track is big. Pause/Stop by a call
to neoCdromStop and resume by calling neoCdromResume.

See also:
neoCdromPlayRaw, neoCdromStop, neoCdromResume

--------------------------------------------------------------------------------
neoCdromPlayRaw SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromPlayRaw (DriveLetter AS STRING, StartSector AS LONG,
                             NumSectors AS LONG)

Arguments:
- DriveLetter: drive to play audio on
- StartSector: starting sector to play
- NumSectors: amount of sectors to play

Description:
This routine plays sectors as if it were audio. Pause/Stop with neoCdromStop and
resume with neoCdromResume.

See also:
neoCdromPlay, neoCdromStop, neoCdromResume

--------------------------------------------------------------------------------
neoCdromRead SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromRead (DriveLetter AS STRING, StartSector AS LONG,
                          NumSectors AS INTEGER, Buffer AS STRING)

Arguments:
- DriveLetter: the drive letter to read from
- StartSector: the starting sector to read
- NumSectors: the number of sectors to read
- Buffer: a string buffer to hold all read data. Must have enough space to store
          all read data.

Description:
This routine reads a specified amount of sectors from the cd. Note that one
sector equals 2336 bytes, so now you can calculate how much space Buffer needs
to have. This routine doesn't work with many OSes!

See also:
neoCdromWrite

--------------------------------------------------------------------------------
neoCdromResume SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromResume (DriveLetter AS STRING)

Arguments:
- DriveLetter: drive to resume playing audio on

Description:
Resumes playing audio stopped by neoCdromStopped on the specified drive.

See also:
neoCdromStop, neoCdromPlay, neoCdromPlayRaw

--------------------------------------------------------------------------------
neoCdromStop SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromStop (DriveLetter AS STRING)

Arguments:
- DriveLetter: drive to stop playing audio on

Description:
This routine stops the playing of audio on the specified drive. Audio playing
can be resumed by neoCdromResume.

See also:
neoCdromResume, neoCdromPlay, neoCdromPlayRaw

--------------------------------------------------------------------------------
neoCdromTrackInfo SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromTrackInfo (DriveLetter AS STRING, TrackNumber AS INTEGER,
                               StartSector AS LONG, TrackType AS INTEGER)

Arguments:
- DriveLetter: drive of which the cd's track is checked
- TrackNumber: track number to retrieve data of
- StartSector: the sector's starting sector is stored in here
- TrackType: the tracktype is stored in here

Description:
This routine retrieves track data and stores it into StartSector and TrackType.
Use any of the constants DAT or CDA to check TrackType.

--------------------------------------------------------------------------------
neoCdromUnlock SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromUnlock (DriveLetter AS STRING)

Arguments:
- DriveLetter: drive to unlock the tray of

Description:
Unlocks a specified drive's tray locked by neoCdromLock.

See also:
neoCdromLock

--------------------------------------------------------------------------------
neoCdromWrite SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoCdromWrite (DriveLetter AS STRING, StartSector AS LONG,
                           NumSectors AS INTEGER, Buffer AS STRING)

Arguments:
- DriveLetter: the drive letter to write to
- StartSector: the starting sector to write
- NumSectors: the number of sectors to write
- Buffer: a buffer containing all data to write

Description:
This routine writes a specified amount of sectors to cd. Note that one sector
equals 2336 bytes, so have enough space in Buffer! Warning! This routine
doesn't work with many OSes, or doesn't even work at all!

See also:
neoCdromRead

================================================================================
VXMS Module ====================================================================
================================================================================
--------------------------------------------------------------------------------
neoVXMSalloc FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoVXMSalloc% (KBytes AS LONG)

Arguments:
- KBytes: the amount of kilobytes to reserve

Returns:
A handle of the allocated VXMS region

Description:
This function allocates a number of kilobytes in VXMS and then returns the
handle to the region. Keep this handle until you deallocate it using the routine
neoVXMSdealloc!

See also:
neoVXMSdealloc, neoVXMSrealloc

--------------------------------------------------------------------------------
neoVXMSfree FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoVXMSfree& ()

Arguments:
None

Returns:
The amount of kilobytes free VXMS.

See also:
None

--------------------------------------------------------------------------------
neoVXMSinit FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoVXMSinit% ()

Arguments:
None

Returns:
- -1: VXMS is found and can be used
-  0: VXMS is not found or cannot be used

Description:
This function returns whether the VXMS system on the computer is found and can
be used.

See also:
None

--------------------------------------------------------------------------------
neoVXMSdealloc SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVXMSdealloc (Handle AS INTEGER)

Arguments:
- Handle: the handle of the memory region to deallocate

Description:
This routine deallocates a VXMS region previously allocated by neoVXMSalloc.

See also:
neoVXMSalloc, neoVXMSrealloc

--------------------------------------------------------------------------------
neoVXMSexchange SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVXMSexchange (FirstHandle AS INTEGER, FirstOffset AS LONG,
                             SecondHandle AS INTEGER, SecondOffset AS LONG,
                             DataLength AS LONG)

Arguments:
- FirstHandle: a handle of a VXMS region to swap
- FirstOffset: the offset in the VXMS region to begin swapping with
- SecondHandle: a handle of another VXMS region to swap
- SecondOffset: the offset in the other VXMS region to begin swapping with
- DataLength: the amount of bytes to swap

Description:
This routine swaps two specified VXMS regions. It doesn't matter if the
specified regions overlap. Use neoVXMSmove if you want to copy the data instead
of swapping it.

See also:
neoVXMSmove

--------------------------------------------------------------------------------
neoVXMSmove SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVXMSmove (FirstHandle AS INTEGER, FirstOffset AS LONG,
                         SecondHandle AS INTEGER, SecondOffset AS LONG,
                         DataLength AS LONG)

Arguments:
- FirstHandle: a handle of the source VXMS region
- FirstOffset: the offset in the source VXMS region to begin copying with
- SecondHandle: a handle of the destination VXMS region
- SecondOffset: the offset in the destination VXMS region to copy to

Description:
This routine copies a specified VXMS region to a specified address in an other
VXMS region. Overlapping VXMS regions do not matter. Use neoVXMSexchange if you
want to swap the data instead of copying it.

See also:
neoVXMSexchange

--------------------------------------------------------------------------------
neoVXMSread SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVXMSread (Handle AS INTEGER, Offset AS LONG, DataLength AS LONG,
                         BufferSeg AS INTEGER, BufferOff AS INTEGER)

Arguments:
- Handle: a handle of the VXMS region to read data from
- Offset: the offset in the VXMS region to begin reading from
- DataLength: the amount of bytes to read
- BufferSeg: the segment address of the buffer where read data is stored
- BufferOff: the offset address of the buffer where read data is stored

Description:
This routine reads data from a specified VXMS region into the buffer. The only
thing you need to make sure is that the buffer can hold the amount of bytes read
with this operation. After this operation this buffer is filled with the data
from VXMS.

See also:
neoVXMSwrite

--------------------------------------------------------------------------------
neoVXMSrealloc SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVXMSrealloc (Handle AS INTEGER, KBytes AS LONG)

Arguments:
- Handle: the handle of a VXMS region to change the size of
- KBytes: the new size of the VXMS region

Description:
This routine changes the size of a previously allocated VXMS region. Note that
there is no error checking to make sure the new size has been reached.

See also:
neoVXMSdealloc, neoVXMSalloc

--------------------------------------------------------------------------------
neoVXMSwrite SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoVXMSwrite (BufferSeg AS INTEGER, BufferOff AS INTEGER,
                          Handle AS INTEGER, Offset AS LONG, DataLength AS LONG)

Arguments:
- BufferSeg: the segment address of the buffer containing the write data
- BufferOff: the offset address of the buffer containing the write data
- Handle: the handle of the VXMS region to copy the data to
- Offset: the offset in the VXMS region to start copying to
- DataLength: the amount of bytes to copy

Description:
This routine writes data from a buffer to VXMS. Make sure the buffer holds the
amount of bytes to copy. After this operation, the specified VXMS region
contains the data you wanted to copy.

See also:
neoVXMSread

================================================================================
Sprite Module ==================================================================
================================================================================
--------------------------------------------------------------------------------
neoSpriteCollide FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoSpriteCollide% (X1 AS INTEGER, Y1 AS INTEGER,
                                    BufferSeg1 AS INTEGER,
                                    BufferOff1 AS INTEGER, X2 AS INTEGER,
                                    Y2 AS INTEGER, BufferSeg2 AS INTEGER,
                                    BufferOff2 AS INTEGER, TransCol AS INTEGER)

Arguments:
- X1: the x-coordinate of the first sprite
- Y1: the y-coordinate of the first sprite
- BufferSeg1: the buffer segment of the first sprite
- BufferOff1: the buffer offset of the first sprite
- X2: the x-coordinate of the second sprite
- Y2: the y-coordinate of the second sprite
- BufferSeg2: the buffer segment of the second sprite
- BufferOff2: the buffer offset of the second sprite
- TransCol: the transparent color of both sprites, can't collide

Returns:
The first color sprite one is colliding with on sprite two. If no collision, it
returns TransCol.

Description:
This function checks if the first and second sprite collide and then returns the
first color sprite one is colliding with on sprite two. When no collision has
been detected, this function returns TransCol. Compatible with QB's sprites.

See also:
neoSpriteCollideOnLayer

--------------------------------------------------------------------------------
neoSpriteCollideOnLayer FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoSpriteCollideOnLayer% (Layer AS INTEGER, X1 AS INTEGER,
                                           Y1 AS INTEGER, BufferSeg AS INTEGER,
                                           BufferOff AS INTEGER,
                                           TransCol AS INTEGER)

Arguments:
- Layer: the layer to check collision on
- X1: the sprite x-coordinate
- Y1: the sprite y-coordinate
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color on the layer and sprite, can't collide

Returns:
The first color on the layer the specified sprite on the specified coordinates
is colliding with. If there's no collision, TransCol is returned.

Description:
This function checks for collision of a sprite on a layer. It returns the first
color on the layer the sprite is colliding with. If no collision has been
detected, TransCol is returned. Compatible with QB's sprites.

See also:
neoSpriteCollide

--------------------------------------------------------------------------------
neoSpriteSize FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoSpriteSize% (StartX AS INTEGER, StartY AS INTEGER,
                                 EndX AS INTEGER, EndY AS INTEGER)

Arguments:
- StartX: the upperleft x-coordinate of the sprite
- StartY: the upperleft y-coordinate of the sprite
- EndX: the lowerright x-coordinate of the sprite
- EndY: the lowerright y-coordinate of the sprite

Returns:
The amount of bytes needed to store a sprite with the selected bounds.

Description:
This function returns the amount of bytes needed to store a sprite with the
selected dimensions, specified by their upperleft and lowerright coordinates.
Very handy if you don't know how large to define an array for sprite storage.

See also:
None

--------------------------------------------------------------------------------
neoSpriteConvert SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteConvert (BufferSeg AS INTEGER, BufferOff AS INTEGER,
                              DoNotConvert AS INTEGER, ConvertTo AS INTEGER)

Arguments:
- BufferSeg: segment of the sprite to convert
- BufferOff: offset of the sprite to convert
- DoNotConvert: indicates the transparent color (won't be included in the mask)
- ConvertTo: colour to convert the sprite to

Description:
This routine converts a GET/PUT compatible sprite. Which means, it generates a
mask of the sprites, thereby skipping colours DoNotConvert and converting other
colours to ConvertTo. Very useful for shadowing, blending, masking, etc.

See also:
None

--------------------------------------------------------------------------------
neoSpriteGet SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteGet (Layer AS INTEGER, StartX AS INTEGER,
                          StartY AS INTEGER, EndX AS INTEGER, EndY AS INTEGER,
                          BufferSeg AS INTEGER, BufferOff AS INTEGER)

Arguments:
- Layer: the layer to read the sprite from
- StartX: the upperleft x-coordinate of the sprite
- StartY: the upperleft y-coordinate of the sprite
- EndX: the lowerright x-coordinate of the sprite
- EndY: the lowerright y-coordinate of the sprite
- BufferSeg: the segment of the buffer to store the sprite in
- BufferOff: the offset of the buffer to store the sprite in

Description:
This routine does the same as QB's GET (gfx). It reads pixels data from a layer
and stores them into an array. The only advantage of this routine above GET is
that this one can read from EMS layers. The format the sprite is stored in the
array is equal to the format of QB's PUT.

See also:
neoSpritePut, neoSpritePutBlend, neoSpritePutColor, neoSpritePutForward,
neoSpritePutRotate, neoSpritePutTrans, neoSpritePutBit

--------------------------------------------------------------------------------
neoSpriteInitLayers SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteInitLayers ()

Arguments:
None

Description:
Almost similar to neoDrawInitLayers, this routine initializes the layers for
sprite drawing. Call this function before using any routine of the Sprite
Module! Or your QB may be acting very weird...

See also:
neoDrawInitLayers

--------------------------------------------------------------------------------
neoSpriteLighting SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteLighting (BufferSeg AS INTEGER, BufferOff AS INTEGER,
                               LightFactor AS INTEGER, StdPal AS STRING)

Arguments:
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- LightFactor: the amount of units in which the light changes color, min = -63,
               max = 63. Positive values will lighten, negative will darken.
- StdPal: the 768-byte string palette holding your current palette. The light
          effects will be based upon this palette.

Description:
This routine darkens or lightens a sprite according to the supplied lightfactor.
The StdPal is your current 768-byte string palette. You can use neoPalGet to
retrieve the current palette.

See also:
neoLayerLighting, neoPalGet

--------------------------------------------------------------------------------
neoSpriteMirror SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteMirror (BufferSeg AS INTEGER, BufferOff AS INTEGER,
                             HorVerFlags AS INTEGER)

Arguments:
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- HorVerFlags: the mirroring modes. Use HORIZONTAL or VERTICAL, or you can use
               HORIZONTAL + VERTICAL for both mirroring modes.

Description:
This routine mirrors a sprite in the specified directions.

See also:
neoLayerMirror

--------------------------------------------------------------------------------
neoSpritePut SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePut (Layer AS INTEGER, PutX AS INTEGER, PutY AS INTEGER,
                          BufferSeg AS INTEGER, BufferOff AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate on the layer to put the sprite on
- PutY: the y-coordinate on the layer to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite

Description:
Similar to QB's PUT, this routine puts a sprite somewhere on a layer. The only
advantage of this routine above PUT is that this one can put on EMS layers. This
routine is compatible with QB's GET/PUT. Note that this routine puts the sprite
SOLID.

See also:
neoSpriteGet, neoSpritePutBlend, neoSpritePutColor, neoSpritePutForward,
neoSpritePutRotate, neoSpritePutTrans, neoSpritePutBit

--------------------------------------------------------------------------------
neoSpritePutBit SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePutBit (Layer AS INTEGER, PutX AS INTEGER, PutY AS INTEGER,
                             BufferSeg AS INTEGER, BufferOff AS INTEGER,
                             TransCol AS INTEGER, BitMode AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate to put the sprite on
- PutY: the y-coordinate to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color of the sprite
- BitMode: the bitoperation you want performed, use any of the constants ORBITS,
           XORBITS or ANDBITS here

Description:
This routine puts a sprite on a layer, and thereby performing the requested bit
operations with both the destination pixel and the source pixel. Compatible with
QB's GET/PUT.

See also:
neoSpriteGet, neoSpritePut, neoSpritePutBlend, neoSpritePutColor,
neoSpritePutForward, neoSpritePutRotate, neoSpritePutTrans

--------------------------------------------------------------------------------
neoSpritePutBlend SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePutBlend (Layer AS INTEGER, PutX AS INTEGER,
                               PutY AS INTEGER, BufferSeg AS INTEGER,
                               BufferOff AS INTEGER, TransCol AS INTEGER,
                               StdPal AS STRING, Neg AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate to put the sprite on
- PutY: the y-coordinate to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color of the sprite
- StdPal: the 768-byte string palette holding the current palette
- Neg: TRUE or FALSE, whether to blend negatively or positively

Description:
This routine puts a sprite on a layer, and thereby blending the sprite nicely
over the layer. This means that the colors are mixed. E.g. red and blue becomes
lila, blue and green becomes aqua, yellow and blue becomes white (not green!
Green only comes when mixing paint, not light!). Compatible with QB's GET/PUT.
The best blended colors are retrieved from StdPal.

See also:
neoSpriteGet, neoSpritePut, neoSpritePutBit, neoSpritePutColor,
neoSpritePutForward, neoSpritePutRotate, neoSpritePutTrans

--------------------------------------------------------------------------------
neoSpritePutColor SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePutColor (Layer AS INTEGER, PutX AS INTEGER,
                               PutY AS INTEGER, BufferSeg AS INTEGER,
                               BufferOff AS INTEGER, TransCol AS INTEGER,
                               PutColor AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate to put the sprite on
- PutY: the y-coordinate to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color of the sprite
- PutColor: the color to draw the sprite in

Description:
This routine puts a sprite on a layer, but only in the color PutColor you
specified. This can be used e.g. when an enemy is hit, it turns completely white
for example. Compatible with QB's GET/PUT.

See also:
neoSpriteGet, neoSpritePut, neoSpritePutBit, neoSpritePutBlend,
neoSpritePutForward, neoSpritePutRotate, neoSpritePutTrans

--------------------------------------------------------------------------------
neoSpritePutForward SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePutForward (Layer AS INTEGER, PutX AS INTEGER,
                                 PutY AS INTEGER, BufferSeg AS INTEGER,
                                 BufferOff AS INTEGER, TransCol AS INTEGER,
                                 CheckCol AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate to put the sprite on
- PutY: the y-coordinate to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color of the sprite
- CheckCol: the color which will be overwritten

Description:
This routine puts a sprite on a layer. But only the pixels are drawn where the
destination pixel is CheckCol. This allows backward rendering, first draw the
foreground, then the background! Compatible with QB's GET/PUT.

See also:
neoSpriteGet, neoSpritePut, neoSpritePutBit, neoSpritePutBlend,
neoSpritePutColor, neoSpritePutRotate, neoSpritePutTrans

--------------------------------------------------------------------------------
neoSpritePutRotate SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePutRotate (Layer AS INTEGER, PutX AS INTEGER,
                                PutY AS INTEGER, BufferSeg AS INTEGER,
                                BufferOff AS INTEGER, TransCol AS INTEGER,
                                Angle AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate to put the sprite on
- PutY: the y-coordinate to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color of the sprite
- Angle: the angle in degrees to draw the sprite in (0-360)

Description:
This routine puts a sprite on layer, but rotated on the specified angle. Note
that due to the Matrix Rotation Formula, some 'holes' may arise when the sprite
is drawn rotated. Compatible with QB's GET/PUT.

See also:
neoSpriteGet, neoSpritePut, neoSpritePutBit, neoSpritePutBlend,
neoSpritePutColor, neoSpritePutForward, neoSpritePutTrans

--------------------------------------------------------------------------------
neoSpritePutTrans SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpritePutTrans (Layer AS INTEGER, PutX AS INTEGER,
                               PutY AS INTEGER, BufferSeg AS INTEGER,
                               BufferOff AS INTEGER, TransCol AS INTEGER)

Arguments:
- Layer: the layer to put the sprite on
- PutX: the x-coordinate to put the sprite on
- PutY: the y-coordinate to put the sprite on
- BufferSeg: the buffer segment of the sprite
- BufferOff: the buffer offset of the sprite
- TransCol: the transparent color of the sprite

Description:
Almost similar to neoSpritePut, but this routine can draw transparent sprites,
instead of solid.

See also:
neoSpriteGet, neoSpritePut, neoSpritePutBit, neoSpritePutBlend,
neoSpritePutColor, neoSpritePutForward, neoSpritePutRotate

--------------------------------------------------------------------------------
neoSpriteScale SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteScale (SpriteArray() AS INTEGER, ZoomFactor AS SINGLE)

Arguments:
- SpriteArray(): the array containing the sprite
- ZoomFactor: the zoom factor to use

Description:
This routine resizes one (!) sprite in the sprite array. The zoomfactor is the
amount of times to zoom in, use e.g. 2 to make the sprite twice as big, or use
0.5 to make the sprite twice as small. Warning! This routine CANNOT resize
animations! When the sprite array contains more than one sprite, only one
resized sprite is left after the operation! The rest is trashed! Compatible with
QB's GET/PUT.

See also:
None

NOTE: Very buggy at the moment!

--------------------------------------------------------------------------------
neoSpriteSetClipBox SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoSpriteSetClipBox (X1 AS INTEGER, Y1 AS INTEGER, X2 AS INTEGER,
                                 Y2 AS INTEGER)

Arguments:
- X1: the upperleft x-coordinate of the clipbox
- Y1: the upperleft y-coordinate of the clipbox
- X2: the lowerright x-coordinate of the clipbox
- Y2: the lowerright y-coordinate of the clipbox

Description:
This routine sets the clipbox for the sprite drawing routines. This clipbox is
different than that of the Draw Module or the Font Module! This routine is
automatically called by neoSpriteInitLayers. The reason that I didn't create 1
clipbox for all drawing modules is that you can create some nice effects with
all separate clipboxes for each type of drawing.

See also:
neoSpriteInitLayers

================================================================================
Long FileName Module ===========================================================
================================================================================
WARNING: ALL LONG FILENAME ROUTINES REQUIRE WINDOWS ACTIVE!!!
--------------------------------------------------------------------------------
neoLFNgetCurrDir FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLFNgetCurrDir$ ()

Arguments:
None

Returns:
A string holding the current directory

Description:
This routine returns the current directory, which can be longer than 64. Note
that this function is almost the same as neoDOSgetCurrentDir and that
neoDOSgetCurrentDrive can be used to get the current drive.

See also:
neoDOSgetCurrentDir, neoDOSgetCurrentDrive

--------------------------------------------------------------------------------
neoLFNgetFileSystem FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLFNgetFileSystem$(DriveLetter AS STRING)

Arguments:
- DriveLetter: letter of the drive to get file system of

Returns:
A string holding the filesystem of that drive

Description:
This routine returns the filesystem of a specified drive. E.g. "FAT32", "NTFS",
or "CDFS".

--------------------------------------------------------------------------------
neoLFNgetFullPath FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLFNgetFullPath$(FileName AS STRING)

Arguments:
- FileName: file to get the full path of

Returns:
A string holding the file's full path

Description:
This routine returns the specified file's full path. Note that this function 
returns the long directorynames, not directories like MYDIRS~1.

See also:
neoLFNgetShortPath

--------------------------------------------------------------------------------
neoLFNgetShortPath FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLFNgetShortPath$(FileName AS STRING)

Arguments:
- FileName: file to get the short path of

Returns:
A string holding the file's short path

Description:
This routine returns the specified file's short path. Note that this function
doesn't return long dirnames, but directories like MYDIRS~1. Also note that this
function does the same as neoDOSgetFullPath.

See also:
neoLFNgetFullPath, neoDOSgetFullPath

--------------------------------------------------------------------------------
neoLFNshortFileName FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoLFNshortFileName$(LongFileName AS STRING)

Arguments:
- LongFileName: a file's name to be converted

Returns:
A string holding the specified file's short filename

Description:
This routine returns the short filename of a long filename. Files like for
instance HELLOIAMNEO.EXE will become HELLOI~1.EXE or similar.

--------------------------------------------------------------------------------
neoLFNchangeDir SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLFNchangeDir(DirName AS STRING)

Arguments:
- DirName: name of the directory to CHDIR to

Description:
Changes to a directory. Does the same as QB's CHDIR, but supports long
filenames.

--------------------------------------------------------------------------------
neoLFNdeleteFile SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLFNdeleteFile(FileName AS STRING)

Arguments:
- FileName: file to delete

Description:
Deletes a file. Does the same as QB's KILL but supports long filenames.

--------------------------------------------------------------------------------
neoLFNmakeDir SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLFNmakeDir(DirName AS STRING)

Arguments:
- DirName: name of the directory to make

Description:
Makes a directory. Does the same as QB's MKDIR but supports long filenames.

--------------------------------------------------------------------------------
neoLFNrenameDir SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLFNrenameDir(DirName AS STRING, NewDirName AS STRING)

Arguments:
- DirName: name of the directory to change name of
- NewDirName: new name of the directory

Description:
Changes a directory's name. Supports long filenames.

--------------------------------------------------------------------------------
neoLFNrenameFile SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLFNrenameFile(FileName AS STRING, NewFileName AS STRING)

Arguments:
- FileName: name of the file to change name of
- NewFileName: new name of the file

Description:
Changes a file's name. Does the same as QB's NAME AS but supports long
filenames.

--------------------------------------------------------------------------------
neoLFNremoveDir SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoLFNremoveDir(DirName AS STRING)

Arguments:
- DirName: directory to remove

Description:
Removes a directory. Does the same as QB's RMDIR but supports long filenames.

================================================================================
DOS Module =====================================================================
================================================================================
--------------------------------------------------------------------------------
neoDOSgetCurrentDir FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetCurrentDir$ ()

Arguments:
None

Returns:
The current directory on the current drive

Description:
This routine returns the current directory on the current drive, excluding the
drive letter.

See also:
neoDOSgetCurrentDrive

--------------------------------------------------------------------------------
neoDOSgetCurrentDrive FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetCurrentDrive$ ()

Arguments:
None

Returns:
The current drive letter

Description:
Returns the drive letter of the current drive.

See also:
neoDOSgetCurrentDir

--------------------------------------------------------------------------------
neoDOSgetCurrentEXE FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetCurrentEXE$ ()

Arguments:
None

Returns:
Full path and drive data of the currently running EXE

Description:
This routine returns the name of the currently running EXE (the EXE in which
this function is called), including drive letter and path.

--------------------------------------------------------------------------------
neoDOSgetFileAttributes FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetFileAttributes% (FileName AS STRING)

Arguments:
- FileName: the filename to retrieve attributes from

Returns:
Bit flags of the file's attributes

Description:
This routine returns the file attributes of the specified file. The return value
is composed of the following:
- Read Only flag (Bit 0)
- Hidden flag (Bit 1)
- System flag (Bit 2)
- Volume Label flag (Bit 3)
- Directory flag (Bit 4)
- Archive flag (Bit 5)
- Sharable flag (Bit 7)
You can perform bit-operations using any of the constants FILEREADONLY,
FILEHIDDEN, FILESYSTEM, FILEVOLUMELABEL, FILEDIRECTORY, FILEARCHIVE,
FILESHARABLE. You can set file attributes by calling neoDOSsetFileAttributes.

See also:
neoDOSsetFileAttributes

--------------------------------------------------------------------------------
neoDOSgetFullPath FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetFullPath$ (FileName AS STRING)

Arguments:
- FileName: file to get the full path of

Returns:
The full path of the specified file

Description:
This routine returns the full path of a specified file.

--------------------------------------------------------------------------------
neoDOSgetOpenedDateTime FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetOpenedDateTime$ (FileHandle AS INTEGER)

Arguments:
- FileHandle: a filehandle of the file to retrieve opening date/time from

Returns:
A string holding the opened date/time of the specified file's handle.

Description:
This function returns the date and time of when the file you opened was opened.

--------------------------------------------------------------------------------
neoDOSgetTime FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSgetTime$ ()

Arguments:
None

Returns:
The current time in 1/100th second precisely.

Description:
This routine returns current time in 1/100th second precisely, in the format as
follows: h:m:s.x. So the time 1 hour, 30 minutes, 5 seconds and a half would be
returned as 1:30:5.50.

--------------------------------------------------------------------------------
neoDOSisDir FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSisDir% (FileName AS STRING)

Arguments:
- FileName: file to check if it is a directory

Returns:
- -1: file is directory
-  0: file is not directory

Description:
This routine checks whether a given file is a directory. This may sound strange,
but directories are infact nothing more than also files.

See also:
neoDOSisFile

--------------------------------------------------------------------------------
neoDOSisFile FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSisFile% (FileName AS STRING)

Arguments:
- FileName: file to check if it is really a file

Returns:
- -1: file is file
-  0: file is not file

Description:
This routine checks whether a given file is really a file. This may sound
strange, but keep in mind that directories are also infact nothing more than
files!

See also:
neoDOSisDir

--------------------------------------------------------------------------------
neoDOSsearchDir FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSsearchDir$ (DirMask AS STRING)

Arguments:
- DirMask: the mask of the directory to find. Supports wildcards.

Returns:
A directory's name which corresponds to the DirMask.

Description:
This routine searches for directories with a given mask. When a mask is supplied
this routine searches for the first corresponding directory. When a mask is
omitted (null string, "") this routine continues searching for a corresponding
directory with the last supplied mask. It is recommended you check this
function's results with neoDOSisDir, to really be sure of the case.

See also:
neoDOSsearchFile

--------------------------------------------------------------------------------
neoDOSsearchFile FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoDOSsearchFile$ (FileMask AS STRING)

Arguments:
- FileMask: mask of the file to find. Supports wildcards.

Returns:
A file's name which corresponds to the FileMask.

Description:
This routines searches for files with the given mask. When a mask is supplied
this routine searches the first corresponding file. WHen a mask is omitted,
i.e. null string ("") this routine continues searching for a corresponding file
with the last given file mask.

See also:
neoDOSsearchDir

--------------------------------------------------------------------------------
neoDOSdisableDrive SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDOSdisableDrive (DriveLetter AS STRING)

Arguments:
- DriveLetter: letter of the drive to make inaccessible

Description:
This routine makes the supplied drive inaccessible for as long as your program
runs.

See also:
neoDOSenableDrive

--------------------------------------------------------------------------------
neoDOSenableDrive SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDOSenableDrive (DriveLetter AS STRING)

Arguments:
- DriveLetter: letter of the drive to make accessible

Description:
This routine makes the supplied drive accessible again.

See also:
neoDOSdisableDrive

--------------------------------------------------------------------------------
neoDOSsearchFileThrough SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDOSsearchFileThrough (FileMask AS STRING, Root AS STRING,
                                     TempFile AS STRING,
                                     FileOpenMode AS INTEGER)

Arguments:
- FileMask: mask of the file to search for
- Root: the directory to start searching in
- TempFile: the file to which all results are stored
- FileOpenMode: whether to Append or Output to the temporary file

Description:
This routine searches for a file in all directories and sub-directories,
starting at the Root. Hereby all results are stored in TempFile. The File Open
Mode indicates whether to append the result file or to overwrite it. This can
be handy when more searches have to be performed and the results still have to
be stored in one file. Use the constants DELETEONEXISTING or APPENDONEXISTING
for this open mode argument.

--------------------------------------------------------------------------------
neoDOSsetFileAttributes SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoDOSsetFileAttributes (FileName AS STRING,
                                     FileAttributes AS INTEGER)

Arguments:
- FileName: file to change attributes of
- FileAttributes: new file attributes

Description:
This routine applies new file attributes to a file. Use any of the constants
FILEREADONLY, FILEHIDDEN, FILESYSTEM, FILEVOLUMELABEL, FILEDIRECTORY,
FILEARCHIVE and FILESHARABLE for ease (use OR or + to indicate more attributes).
Note that the directory flag can't be overwritten, so that you can't change a
file to a directory or vice-versa.

See also:
neoDOSgetFileAttributes

================================================================================
Font Module ====================================================================
================================================================================
--------------------------------------------------------------------------------
neoFontLen FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoFontLen% (Text AS STRING)

Arguments:
- Text: text to retrieve length in pixels of

Returns:
The amount of pixels needed to display the text

Description:
This routine returns the amount of (horizontal) pixels needed to display the
text.

--------------------------------------------------------------------------------
neoFontOpen FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoFontOpen% (FontFile AS STRING)

Arguments:
- FontFile: the font file to open

Returns:
File handle of the font file, to be used with NeoLib's font routines. Do not
lose this variable! And close the font file using neoFontClose.

Description:
This routine opens a font file and makes it ready to be used with NeoLib. Don't
forget to close the file with neoFontClose.

See also:
neoFontClose

--------------------------------------------------------------------------------
neoFontClose SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontClose (FontHandle AS INTEGER)

Arguments:
- FontHandle: handle of the font file to close

Description:
Closes a font file opened by neoFontOpen.

See also:
neoFontOpen

--------------------------------------------------------------------------------
neoFontInitLayers SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontInitLayers ()

Arguments:
None

Description:
This routine initializes the Font Module and makes all created EMS Layers
ready for use with the Font Module.

--------------------------------------------------------------------------------
neoFontPrint SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrint (FontHandle AS INTEGER, Layer AS INTEGER,
                          Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                          Colour AS INTEGER, Italic AS INTEGER)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: layer to print text on
- Text: the text to print
- xPos: x-position of the text
- yPos: y-position of the text
- Colour: colour to display text with
- Italic: TRUE or FALSE whether to display the text in italic

Description:
This routine prints text on the specified layer with the specified colour,
either italic or not.

See also:
neoFontPrintB, neoFontPrintG, neoFontPrintN, neoFontPrintS, neoFontPrintT

--------------------------------------------------------------------------------
neoFontPrintB SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintB (FontHandle AS INTEGER, Layer AS INTEGER,
                           Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                           Colour AS INTEGER, Italic AS INTEGER,
                           Textured AS INTEGER, Gradiented AS INTEGER,
                           StdPal AS STRING, Neg AS INTEGER)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: the layer to print text on
- Text: the text to print
- xPos: x-coordinate of the text
- yPos: y-position of the text
- Colour: colour to display the text with
- Italic: whether or not to display text in italic
- Textured: whether or not to display text textured
- Gradiented: whether or not to gradient the text
- StdPal: a 768-byte string palette holding the current palette
- Neg: TRUE or FALSE, indicating whether to use positive or negative blending

Description:
Prints blended text on a layer.

See also:
neoFontPrint, neoFontPrintG, neoFontPrintN, neoFontPrintS, neoFontPrintSB,
neoFontPrintT

--------------------------------------------------------------------------------
neoFontPrintG SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintG (FontHandle AS INTEGER, Layer AS INTEGER,
                           Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                           Colour AS INTEGER, Italic AS INTEGER)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: layer to print text on
- Text: the text to print
- xPos: x-position of the text
- yPos: y-position of the text
- Colour: begin colour to display text with
- Italic: TRUE or FALSE whether to display the text in italic

Description:
This routine draws gradiented text on a layer. The colours start at Colour.

See also:
neoFontPrint, neoFontPrintB, neoFontPrintN, neoFontPrintS, neoFontPrintT

--------------------------------------------------------------------------------
neoFontPrintN SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintN (FontHandle AS INTEGER, Layer AS INTEGER,
                           Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                           Italic AS INTEGER, StdPal AS STRING)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: layer to print text on
- Text: text to print
- xPos: x-position to print text
- yPos: y-position to print text
- Italic: whether or not to print text italic
- StdPal: 768-byte string holding the current palette

Description:
Prints text on the layer, thereby negativising the background.

See also:
neoFontPrint, neoFontPrintB, neoFontPrintG, neoFontPrintS, neoFontPrintT

--------------------------------------------------------------------------------
neoFontPrintS SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintS (FontHandle AS INTEGER, Layer AS INTEGER,
                           Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                           xScale AS INTEGER, yScale AS INTEGER,
                           Colour AS INTEGER, Italic AS INTEGER,
                           Textured AS INTEGER, Gradiented AS INTEGER)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: the layer to print text on
- Text: the text to print
- xPos: x-coordinate of the text
- yPos: y-position of the text
- xScale: x-axis scale to print text with
- yScale: y-axis scale to print text with
- Colour: colour to display the text with
- Italic: whether or not to display text in italic
- Textured: whether or not to display text textured
- Gradiented: whether or not to gradient the text

Description:
Prints scaled text on a layer.

See also:
neoFontPrint, neoFontPrintB, neoFontPrintG, neoFontPrintN, neoFontPrintT,
neoFontPrintSB, neoFontPrintSN

--------------------------------------------------------------------------------
neoFontPrintSB SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintSB (FontHandle AS INTEGER, Layer AS INTEGER,
                            Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                            xScale AS INTEGER, yScale AS INTEGER,
                            Colour AS INTEGER, Italic AS INTEGER,
                            Textured AS INTEGER, Gradiented AS INTEGER,
                            StdPal AS STRING, Neg AS INTEGER)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: the layer to print text on
- Text: the text to print
- xPos: x-coordinate of the text
- yPos: y-position of the text
- xScale: x-axis scale to print text with
- yScale: y-axis scale to print text with
- Colour: colour to display the text with
- Italic: whether or not to display text in italic
- Textured: whether or not to display text textured
- Gradiented: whether or not to gradient the text
- StdPal: a 768-byte string palette holding the current palette
- Neg: TRUE or FALSE, indicating whether to use positive or negative blending

Description:
Prints scaled blended text on a layer.

See also:
neoFontPrintB, neoFontPrintS, neoFontPrintSN

--------------------------------------------------------------------------------
neoFontPrintSN SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintSN (FontHandle AS INTEGER, Layer AS INTEGER,
                            Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                            xScale AS INTEGER, yScale AS INTEGER,
                            Italic AS INTEGER, StdPal AS STRING)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: the layer to print text on
- Text: the text to print
- xPos: x-coordinate of the text
- yPos: y-position of the text
- xScale: x-axis scale to print text with
- yScale: y-axis scale to print text with
- Italic: whether or not to display text in italic
- StdPal: a 768-byte string palette holding the current palette

Description:
Prints scaled text on a layer, thereby negativising the background.

See also:
neoFontPrintN, neoFontPrintSB, neoFontPrintS

--------------------------------------------------------------------------------
neoFontPrintT SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontPrintT (FontHandle AS INTEGER, Layer AS INTEGER,
                           Text AS STRING, xPos AS INTEGER, yPos AS INTEGER,
                           Italic AS INTEGER)

Arguments:
- FontHandle: the handle of the font to draw with
- Layer: the layer to print text on
- Text: the text to print
- xPos: x-coordinate of the text
- yPos: y-position of the text
- Italic: whether or not to display text in italic

Description:
Draws textured text on a layer. Note that for texturing, a texture needs to be
installed with neoFontSetTexture!!!

See also:
neoFontSetTexture, neoFontPrint, neoFontPrintB, neoFontPrintG, neoFontPrintN,
neoFontPrintS

--------------------------------------------------------------------------------
neoFontSetClipBox SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontSetClipBox (X1 AS INTEGER, Y1 AS INTEGER, X2 AS INTEGER,
                               Y2 AS INTEGER)

Arguments:
- X1: x-coordinate of the upperleft corner of the clipbox
- Y1: y-coordinate of the upperleft corner of the clipbox
- X2: x-coordinate of the lowerright corner of the clipbox
- Y2: y-coordinate of the lowerright corner of the clipbox

Description:
This routine sets the clipbox for font printing. All font routines will not draw
pixels outside this clipbox.

--------------------------------------------------------------------------------
neoFontSetTexture SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoFontSetTexture (TexSeg AS INTEGER, TexOff AS INTEGER)

Arguments:
- TexSeg: texture segment, use VARSEG
- TexOff: texture offset, use VARPTR

Description:
This routine installs a font texture used by the Font Module to print textured
text. The texture must be 8x8 in dimension and must either be GETed or retrieved
by neoSpriteGet, i.e. GET/PUT compatible.

See also:
neoFontPrintT

================================================================================
Image Module ===================================================================
================================================================================
--------------------------------------------------------------------------------
neoImageLoadArrayBMP SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoImageLoadArrayBMP (Filename AS STRING, Array() AS INTEGER,
                                  Pal AS STRING)

Arguments:
- Filename: bmp file to load
- Array(): array to store BMP file in
- Pal: the palette will be stored in here

Description:
This routine stores a BMP picture in an Array(), thereby making it GET/PUT
compatible. The palette will be stored in the 'Pal' argument, as 768-byte
string palette.

See also:
neoImageLoadBMP, neoImageSaveArrayBMP

--------------------------------------------------------------------------------
neoImageLoadBMP SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoImageLoadBMP (Filename AS STRING, Layer AS INTEGER, X AS INTEGER,
                             Y AS INTEGER, Pal AS STRING)

Arguments:
- Filename: bmp file to load
- Layer: layer to put BMP on
- X: the x-coordinate to put picture
- Y: the y-coordinate to put picture
- Pal: the palette will be stored in here

Description:
This routine loads a BMP picture onto a layer on the designated coordinates. The
palette of the BMP will be stored in Pal.

See also:
neoImageLoadArrayBMP, neoImageSaveBMP

--------------------------------------------------------------------------------
neoImageLoadPP256Put SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoImageLoadPP256Put (Filename AS STRING, Array() AS INTEGER)

Arguments:
- Filename: PUT file to load
- Array(): array store the put file in

Description:
This routine loads a PP256-Put file into an array, thereby making it GET/PUT
compatible.

--------------------------------------------------------------------------------
neoImageSaveArrayBMP SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoImageSaveArrayBMP (Filename AS STRING, ArraySeg AS INTEGER,
                                  ArrayOff AS INTEGER, Pal AS STRING)

Arguments:
- Filename: filename to store the array to
- ArraySeg: segment of the array to store
- ArrayOff: offset of the array to store
- Pal: 768-byte string palette holding the Array picture's palette

Description:
This routine saves a GET/PUT compatible Array-picture to a file in BMP format.

See also:
neoImageLoadArrayBMP, neoImageSaveBMP

--------------------------------------------------------------------------------
neoImageSaveBMP SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoImageSaveBMP (Filename AS STRING, Layer AS INTEGER, X AS INTEGER,
                             Y AS INTEGER, Wid AS INTEGER, Hei AS INTEGER,
                             Pal AS STRING)

Arguments:
- Filename: filename to store image to
- Layer: layer to retrieve image data from
- X: x-coordinate of the upperleft corner of the image on the layer
- Y: y-coordinate of the upperleft corner of the image on the layer
- Wid: width of the image on the layer
- Hei: heigth of the image on the layer
- Pal: 768-byte string palette holding the layer's palette

Description:
This routine saves part of a layer into a file using BMP format. The X, Y, Wid
and Hei arguments are used to define a box on the layer defining the area to
save to BMP file.

See also:
neoImageLoadBMP, neoImageSaveArrayBMP

================================================================================
Joystick Module ================================================================
================================================================================
--------------------------------------------------------------------------------
neoJoyDetected FUNCTION
--------------------------------------------------------------------------------
Prototype:
DECLARE FUNCTION neoJoyDetected% ()

Arguments:
None

Returns:
- -1: Joystick/Gamepad found and usable
-  0: Joystick/Gamepad not found

Description:
This routine checks for presence of a joystick or gamepad.

--------------------------------------------------------------------------------
neoJoyButton SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoJoyButton (ButtonA AS INTEGER, ButtonB AS INTEGER,
                          ButtonC AS INTEGER, ButtonD AS INTEGER)

Arguments:
- ButtonA: the status of button A is stored in here
- ButtonB: the status of button B is stored in here
- ButtonC: the status of button C is stored in here
- ButtonD: the status of button D is stored in here

Description:
This routine retrieves a Joystick's or Gamepad's button statuses and stores them
into the 4 arguments.

See also:
neoJoyXY

--------------------------------------------------------------------------------
neoJoyXY SUB
--------------------------------------------------------------------------------
Prototype:
DECLARE SUB neoJoyXY (X AS INTEGER, Y AS INTEGER)

Arguments:
- X: the x-position of the joystick is stored in here (0-199)
- Y: the y-position of the joystick is stored in here (0-199)

Description:
This routine retrieves a Joystick's or Gamepad's X and Y coordinates and stores
them into the 2 arguments. This is a slow process when there's no joystick or
gamepad available! Check first with neoJoyDetected.

See also:
neoJoyButton

################################################################################
# 12. OPEN SOURCE REMARKS ######################################################
################################################################################
Since NeoLib v1.6 is open source, I need to state some rules, which all editors
and users of NeoLib v1.6 should follow.
First of all, I (Neo) would like to have credits if you edited or used NeoLib
for your own purposes. Anyone who doesn't give credits, isn't allowed to use
this library...
Also, only people who know how NeoLib works and what NeoLib's structure is may
edit NeoLib, this to prevent errorfilled (buggy) NeoLib versions to be released.
Finally, I would like all routines to keep their name, as well as the library.
Any added routines by any editor should also follow the name standard:
- first 3 letters of name are 'neo' in lower case
- then there is the module name, beginning with a capital
- then the routine name, using capitals whenever a new word is created
E.g.: neoSpritePutBlend
      \-/\----/\------/
       |    |      |
      id    |    Routine name, following the capital standard
         Module
- give your edited NeoLib version another version number. It may not be already
  existing.
- Update this manual
NOTE: STEALING of routines is not allowed!

################################################################################
# 13. NeoLib EDITORS ###########################################################
################################################################################
If you've edited NeoLib or contributed to it in some way, you are allowed to
put your name in this section, together with a description about what you did
for NeoLib (and your email address if you wish).

################################################################################
# 14. PROGRAMMER'S WARNING! ####################################################
################################################################################
This version, version 1.6 is quite buggy. What the causes of this buggyness are,
... I don't know. I think it's got something to do with memory overlapping
because the total library (all 15 modules) are too big for QB to handle :).

Anyway, YOU ARE WARNED!

################################################################################
# 15. BUG REPORT ###############################################################
################################################################################
The following bugs were found (and corrected):
- neoFFix bug. QB IDE crashed when used too often. This was caused by not
  restoring the Int 3Dh vector. It has been corrected now. Calls to neoFFix will
  now either install or remove FFix depending on its existance. (Thanks to
  Plasma for pointing this out!).
The following bugs may still be there:
- neoSpriteScale bug. Seems to crash on non-square sprites and/or factors that
  aren't a power of two (negative powers allowed).
- neoFONT/neoIMAGE module in combination with neoFFix. Seems to get some strange
  memory violation errors.

################################################################################
# 16. FINAL NOTES ##############################################################
################################################################################
Have fun using NeoLib v1.6! 
If you have any questions or have you found a bug? You can contact me at these
addresses:
Email: hendrikantoniorecinos@hotmail.com
Email: arecinos@gmx.net
(the latter supports > 1 MB attachments).

Or visit any of the following sites to contact me:
http://www.qbasicnews.com
http://www.qbnz.com
http://www.harsoftware.cjb.net

And here's my last note... I'd like to see any NeoLib creation you made!
Especially cool games! ;)

Signing off,

Neo Deus Ex Machina


[EOF - End Of File]
Last updated 16th of March 2004