Tales.lib is a qbasic library I programmed for my game Tales of Utopia.
They're difficult to use at first. Here's the instructions :

place tales.lib and tales.qlb in your game's directory. tales.asm is the
source code.

Cut and paste this code into your bas file.

'Asm Routines
DECLARE SUB TouPset (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL X%, BYVAL Y%, BYVAL Col%)
DECLARE SUB TouPcopy (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL toSeg%, BYVAL ToOff%)
DECLARE SUB TouCls (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL Col%)
DECLARE SUB TouFastCls (BYVAL ScrSeg%, BYVAL ScrOff%)
DECLARE SUB TouTilePut (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X%, BYVAL Y%)
DECLARE SUB TouSolidPut (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X%, BYVAL Y%)
DECLARE SUB TouPut (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X%, BYVAL Y%, BYVAL Inv%)
DECLARE SUB TouIPut (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X%, BYVAL Y%, BYVAL Inv%)
DECLARE SUB TouGet (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL Y2%)
DECLARE SUB TouClipPut (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X%, BYVAL Y%)
DECLARE SUB TouClipPut2 (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL SprSeg%, BYVAL SprOff%, BYVAL X%, BYVAL Y%)
DECLARE SUB TouFillBox (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL Y2%, BYVAL Col%)
DECLARE SUB TouBox (BYVAL ScrSeg%, BYVAL ScrOff%, BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL Y2%, BYVAL Col%)
'Mouse Routines
DECLARE SUB MouseShow ()
DECLARE SUB MouseHide ()
DECLARE SUB MouseData (X%, Y%, Button%)
DECLARE SUB MouseSet (BYVAL X%, BYVAL Y%)
DECLARE SUB MouseSetBounds (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL Y2%)
DECLARE FUNCTION MouseDriver% ()

You'll need a buffer too.

DIM SHARED Buffer%(31999)

That gives you a screen of memory to pass info into.

Tales lib is a screen 13 library. Therfore, I can't be held accountable to
anything you do to fuck up your program by using a different screen modes.
Tales lib comes largly without safety precautions, so if you something stupid
like get a graphic into a buffer where you don't have the space for it, or
draw a sprite outside the top and bottom buffers, it's your own problem :)

To accually use a command this creates, here's an example :

Code above +
SCREEN 13

TouPset VARSEG(Buffer%(0)), VARPTR(Buffer%(0)), 160, 100, 15
SLEEP
TouPcopy VARSEG(Buffer%(0)), VARPTR(Buffer%(0)), &HA000, 0

Personally, I'd use a better Lib than this one if I was making a game :)
This is just a quicky to use for my own projects.

- Terry Cavanagh.
